Ruby  2.7.1p83(2020-03-31revisiona0c7c23c9cec0d0ffcba012279cd652d28ad5bf3)
parse.c
Go to the documentation of this file.
1 /* A Bison parser, made by GNU Bison 3.0.4. */
2 
3 /* Bison implementation for Yacc-like parsers in C
4 
5  Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
6 
7  This program is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 
20 /* As a special exception, you may create a larger work that contains
21  part or all of the Bison parser skeleton and distribute that work
22  under terms of your choice, so long as that work isn't itself a
23  parser generator using the skeleton or a modified version thereof
24  as a parser skeleton. Alternatively, if you modify or redistribute
25  the parser skeleton itself, you may (at your option) remove this
26  special exception, which will cause the skeleton and the resulting
27  Bison output files to be licensed under the GNU General Public
28  License without this special exception.
29 
30  This special exception was added by the Free Software Foundation in
31  version 2.2 of Bison. */
32 
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34  simplifying the original so-called "semantic" parser. */
35 
36 /* All symbols defined below should begin with yy or YY, to avoid
37  infringing on user name space. This should be done even for local
38  variables, as they might otherwise be expanded by user macros.
39  There are some unavoidable exceptions within include files to
40  define necessary library symbols; they are noted "INFRINGES ON
41  USER NAME SPACE" below. */
42 
43 /* Identify Bison output. */
44 #define YYBISON 1
45 
46 /* Bison version. */
47 #define YYBISON_VERSION "3.0.4"
48 
49 /* Skeleton name. */
50 #define YYSKELETON_NAME "yacc.c"
51 
52 /* Pure parsers. */
53 #define YYPURE 1
54 
55 /* Push parsers. */
56 #define YYPUSH 0
57 
58 /* Pull parsers. */
59 #define YYPULL 1
60 
61 
62 
63 
64 /* Copy the first part of user declarations. */
65 #line 12 "parse.y" /* yacc.c:339 */
66 
67 
68 #if !YYPURE
69 # error needs pure parser
70 #endif
71 #define YYDEBUG 1
72 #define YYERROR_VERBOSE 1
73 #define YYSTACK_USE_ALLOCA 0
74 #define YYLTYPE rb_code_location_t
75 #define YYLTYPE_IS_DECLARED 1
76 
77 #include "ruby/ruby.h"
78 #include "ruby/st.h"
79 #include "ruby/encoding.h"
80 #include "internal.h"
81 #include "node.h"
82 #include "parse.h"
83 #include "symbol.h"
84 #include "regenc.h"
85 #include <stdio.h>
86 #include <errno.h>
87 #include <ctype.h>
88 #include "probes.h"
89 
90 #ifndef WARN_PAST_SCOPE
91 # define WARN_PAST_SCOPE 0
92 #endif
93 
94 #define TAB_WIDTH 8
95 
96 #define yydebug (p->debug) /* disable the global variable definition */
97 
98 #define YYMALLOC(size) rb_parser_malloc(p, (size))
99 #define YYREALLOC(ptr, size) rb_parser_realloc(p, (ptr), (size))
100 #define YYCALLOC(nelem, size) rb_parser_calloc(p, (nelem), (size))
101 #define YYFREE(ptr) rb_parser_free(p, (ptr))
102 #define YYFPRINTF rb_parser_printf
103 #define YYPRINT(out, tok, val) parser_token_value_print(p, (tok), &(val))
104 #define YY_LOCATION_PRINT(File, loc) \
105  rb_parser_printf(p, "%d.%d-%d.%d", \
106  (loc).beg_pos.lineno, (loc).beg_pos.column,\
107  (loc).end_pos.lineno, (loc).end_pos.column)
108 #define YYLLOC_DEFAULT(Current, Rhs, N) \
109  do \
110  if (N) \
111  { \
112  (Current).beg_pos = YYRHSLOC(Rhs, 1).beg_pos; \
113  (Current).end_pos = YYRHSLOC(Rhs, N).end_pos; \
114  } \
115  else \
116  { \
117  (Current).beg_pos = YYRHSLOC(Rhs, 0).end_pos; \
118  (Current).end_pos = YYRHSLOC(Rhs, 0).end_pos; \
119  } \
120  while (0)
121 
122 #define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current) \
123  rb_parser_set_location_from_strterm_heredoc(p, &p->lex.strterm->u.heredoc, &(Current))
124 #define RUBY_SET_YYLLOC_OF_NONE(Current) \
125  rb_parser_set_location_of_none(p, &(Current))
126 #define RUBY_SET_YYLLOC(Current) \
127  rb_parser_set_location(p, &(Current))
128 #define RUBY_INIT_YYLLOC() \
129  { \
130  {p->ruby_sourceline, (int)(p->lex.ptok - p->lex.pbeg)}, \
131  {p->ruby_sourceline, (int)(p->lex.pcur - p->lex.pbeg)}, \
132  }
133 
135  EXPR_BEG_bit, /* ignore newline, +/- is a sign. */
136  EXPR_END_bit, /* newline significant, +/- is an operator. */
137  EXPR_ENDARG_bit, /* ditto, and unbound braces. */
138  EXPR_ENDFN_bit, /* ditto, and unbound braces. */
139  EXPR_ARG_bit, /* newline significant, +/- is an operator. */
140  EXPR_CMDARG_bit, /* newline significant, +/- is an operator. */
141  EXPR_MID_bit, /* newline significant, +/- is an operator. */
142  EXPR_FNAME_bit, /* ignore newline, no reserved words. */
143  EXPR_DOT_bit, /* right after `.' or `::', no reserved words. */
144  EXPR_CLASS_bit, /* immediate after `class', no here document. */
145  EXPR_LABEL_bit, /* flag bit, label is allowed. */
146  EXPR_LABELED_bit, /* flag bit, just after a label. */
147  EXPR_FITEM_bit, /* symbol literal as FNAME. */
149 };
150 /* examine combinations */
152 #define DEF_EXPR(n) EXPR_##n = (1 << EXPR_##n##_bit)
154  DEF_EXPR(END),
155  DEF_EXPR(ENDARG),
156  DEF_EXPR(ENDFN),
157  DEF_EXPR(ARG),
158  DEF_EXPR(CMDARG),
159  DEF_EXPR(MID),
160  DEF_EXPR(FNAME),
161  DEF_EXPR(DOT),
162  DEF_EXPR(CLASS),
163  DEF_EXPR(LABEL),
164  DEF_EXPR(LABELED),
165  DEF_EXPR(FITEM),
166  EXPR_VALUE = EXPR_BEG,
167  EXPR_BEG_ANY = (EXPR_BEG | EXPR_MID | EXPR_CLASS),
168  EXPR_ARG_ANY = (EXPR_ARG | EXPR_CMDARG),
169  EXPR_END_ANY = (EXPR_END | EXPR_ENDARG | EXPR_ENDFN),
171 };
172 #define IS_lex_state_for(x, ls) ((x) & (ls))
173 #define IS_lex_state_all_for(x, ls) (((x) & (ls)) == (ls))
174 #define IS_lex_state(ls) IS_lex_state_for(p->lex.state, (ls))
175 #define IS_lex_state_all(ls) IS_lex_state_all_for(p->lex.state, (ls))
176 
177 # define SET_LEX_STATE(ls) \
178  (p->lex.state = \
179  (p->debug ? \
180  rb_parser_trace_lex_state(p, p->lex.state, (ls), __LINE__) : \
181  (enum lex_state_e)(ls)))
182 
184 
185 static const rb_code_location_t NULL_LOC = { {0, -1}, {0, -1} };
186 
187 # define SHOW_BITSTACK(stack, name) (p->debug ? rb_parser_show_bitstack(p, stack, name, __LINE__) : (void)0)
188 # define BITSTACK_PUSH(stack, n) (((p->stack) = ((p->stack)<<1)|((n)&1)), SHOW_BITSTACK(p->stack, #stack"(push)"))
189 # define BITSTACK_POP(stack) (((p->stack) = (p->stack) >> 1), SHOW_BITSTACK(p->stack, #stack"(pop)"))
190 # define BITSTACK_SET_P(stack) (SHOW_BITSTACK(p->stack, #stack), (p->stack)&1)
191 # define BITSTACK_SET(stack, n) ((p->stack)=(n), SHOW_BITSTACK(p->stack, #stack"(set)"))
192 
193 /* A flag to identify keyword_do_cond, "do" keyword after condition expression.
194  Examples: `while ... do`, `until ... do`, and `for ... in ... do` */
195 #define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
196 #define COND_POP() BITSTACK_POP(cond_stack)
197 #define COND_P() BITSTACK_SET_P(cond_stack)
198 #define COND_SET(n) BITSTACK_SET(cond_stack, (n))
199 
200 /* A flag to identify keyword_do_block; "do" keyword after command_call.
201  Example: `foo 1, 2 do`. */
202 #define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n))
203 #define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
204 #define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
205 #define CMDARG_SET(n) BITSTACK_SET(cmdarg_stack, (n))
206 
207 struct vtable {
208  ID *tbl;
209  int pos;
210  int capa;
211  struct vtable *prev;
212 };
213 
214 struct local_vars {
215  struct vtable *args;
216  struct vtable *vars;
217  struct vtable *used;
218 # if WARN_PAST_SCOPE
219  struct vtable *past;
220 # endif
221  struct local_vars *prev;
222 # ifndef RIPPER
223  struct {
224  NODE *outer, *inner, *current;
225  } numparam;
226 # endif
227 };
228 
229 enum {
231  NO_PARAM = 0,
233 };
234 
235 #define NUMPARAM_ID_P(id) numparam_id_p(id)
236 #define NUMPARAM_ID_TO_IDX(id) (unsigned int)(((id) >> ID_SCOPE_SHIFT) - tNUMPARAM_1 + 1)
237 #define NUMPARAM_IDX_TO_ID(idx) TOKEN2LOCALID((tNUMPARAM_1 + (idx) - 1))
238 static int
239 numparam_id_p(ID id)
240 {
241  if (!is_local_id(id)) return 0;
242  unsigned int idx = NUMPARAM_ID_TO_IDX(id);
243  return idx > 0 && idx <= NUMPARAM_MAX;
244 }
245 static void numparam_name(struct parser_params *p, ID id);
246 
247 #define DVARS_INHERIT ((void*)1)
248 #define DVARS_TOPSCOPE NULL
249 #define DVARS_TERMINAL_P(tbl) ((tbl) == DVARS_INHERIT || (tbl) == DVARS_TOPSCOPE)
250 
251 typedef struct token_info {
252  const char *token;
254  int indent;
255  int nonspc;
256  struct token_info *next;
257 } token_info;
258 
260 
261 /*
262  Structure of Lexer Buffer:
263 
264  lex.pbeg lex.ptok lex.pcur lex.pend
265  | | | |
266  |------------+------------+------------|
267  |<---------->|
268  token
269 */
270 struct parser_params {
272 
273  YYSTYPE *lval;
274 
275  struct {
277  VALUE (*gets)(struct parser_params*,VALUE);
278  VALUE input;
279  VALUE prevline;
280  VALUE lastline;
281  VALUE nextline;
282  const char *pbeg;
283  const char *pcur;
284  const char *pend;
285  const char *ptok;
286  union {
287  long ptr;
288  VALUE (*call)(VALUE, int);
289  } gets_;
290  enum lex_state_e state;
291  /* track the nest level of any parens "()[]{}" */
292  int paren_nest;
293  /* keep p->lex.paren_nest at the beginning of lambda "->" to detect tLAMBEG and keyword_do_LAMBDA */
294  int lpar_beg;
295  /* track the nest level of only braces "{}" */
296  int brace_nest;
297  } lex;
300  int tokidx;
301  int toksiz;
302  int tokline;
303  int heredoc_end;
304  int heredoc_indent;
306  char *tokenbuf;
307  struct local_vars *lvtbl;
308  st_table *pvtbl;
309  st_table *pktbl;
310  int line_count;
311  int ruby_sourceline; /* current line no. */
312  const char *ruby_sourcefile; /* current source file */
314  rb_encoding *enc;
318 
321 
322  ID cur_arg;
323 
324  rb_ast_t *ast;
325  int node_id;
326 
327  int max_numparam;
328 
329  unsigned int command_start:1;
330  unsigned int eofp: 1;
331  unsigned int ruby__end__seen: 1;
332  unsigned int debug: 1;
333  unsigned int has_shebang: 1;
334  unsigned int in_defined: 1;
335  unsigned int in_kwarg: 1;
336  unsigned int in_def: 1;
337  unsigned int in_class: 1;
338  unsigned int token_seen: 1;
339  unsigned int token_info_enabled: 1;
340 # if WARN_PAST_SCOPE
341  unsigned int past_scope_enabled: 1;
342 # endif
343  unsigned int error_p: 1;
344  unsigned int cr_seen: 1;
345 
346 #ifndef RIPPER
347  /* Ruby core only */
348 
349  unsigned int do_print: 1;
350  unsigned int do_loop: 1;
351  unsigned int do_chomp: 1;
352  unsigned int do_split: 1;
353  unsigned int warn_location: 1;
354 
356  NODE *eval_tree;
359  const struct rb_iseq_struct *parent_iseq;
360 #else
361  /* Ripper only */
362 
363  struct {
364  VALUE token;
365  int line;
366  int col;
367  } delayed;
368 
369  VALUE value;
370  VALUE result;
371  VALUE parsing_thread;
372 #endif
373 };
374 
375 #define intern_cstr(n,l,en) rb_intern3(n,l,en)
376 
377 #define STR_NEW(ptr,len) rb_enc_str_new((ptr),(len),p->enc)
378 #define STR_NEW0() rb_enc_str_new(0,0,p->enc)
379 #define STR_NEW2(ptr) rb_enc_str_new((ptr),strlen(ptr),p->enc)
380 #define STR_NEW3(ptr,len,e,func) parser_str_new((ptr),(len),(e),(func),p->enc)
381 #define TOK_INTERN() intern_cstr(tok(p), toklen(p), p->enc)
382 
383 static st_table *
384 push_pvtbl(struct parser_params *p)
385 {
386  st_table *tbl = p->pvtbl;
387  p->pvtbl = st_init_numtable();
388  return tbl;
389 }
390 
391 static void
392 pop_pvtbl(struct parser_params *p, st_table *tbl)
393 {
394  st_free_table(p->pvtbl);
395  p->pvtbl = tbl;
396 }
397 
398 static st_table *
399 push_pktbl(struct parser_params *p)
400 {
401  st_table *tbl = p->pktbl;
402  p->pktbl = 0;
403  return tbl;
404 }
405 
406 static void
407 pop_pktbl(struct parser_params *p, st_table *tbl)
408 {
409  if (p->pktbl) st_free_table(p->pktbl);
410  p->pktbl = tbl;
411 }
412 
413 static int parser_yyerror(struct parser_params*, const YYLTYPE *yylloc, const char*);
414 #define yyerror0(msg) parser_yyerror(p, NULL, (msg))
415 #define yyerror1(loc, msg) parser_yyerror(p, (loc), (msg))
416 #define yyerror(yylloc, p, msg) parser_yyerror(p, yylloc, msg)
417 #define token_flush(ptr) ((ptr)->lex.ptok = (ptr)->lex.pcur)
418 
419 #ifdef RIPPER
420 #define compile_for_eval (0)
421 #else
422 #define compile_for_eval (p->parent_iseq != 0)
423 #endif
424 
425 #define token_column ((int)(p->lex.ptok - p->lex.pbeg))
426 
427 #define CALL_Q_P(q) ((q) == TOKEN2VAL(tANDDOT))
428 #define NODE_CALL_Q(q) (CALL_Q_P(q) ? NODE_QCALL : NODE_CALL)
429 #define NEW_QCALL(q,r,m,a,loc) NEW_NODE(NODE_CALL_Q(q),r,m,a,loc)
430 
431 #define lambda_beginning_p() (p->lex.lpar_beg == p->lex.paren_nest)
432 
433 static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
434 
435 #ifndef RIPPER
436 static inline void
437 rb_discard_node(struct parser_params *p, NODE *n)
438 {
439  rb_ast_delete_node(p->ast, n);
440 }
441 #endif
442 
443 #ifdef RIPPER
444 static inline VALUE
445 add_mark_object(struct parser_params *p, VALUE obj)
446 {
447  if (!SPECIAL_CONST_P(obj)
448  && !RB_TYPE_P(obj, T_NODE) /* Ripper jumbles NODE objects and other objects... */
449  ) {
451  }
452  return obj;
453 }
454 #else
455 static NODE* node_newnode_with_locals(struct parser_params *, enum node_type, VALUE, VALUE, const rb_code_location_t*);
456 #endif
457 
458 static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE, const rb_code_location_t*);
459 #define rb_node_newnode(type, a1, a2, a3, loc) node_newnode(p, (type), (a1), (a2), (a3), (loc))
460 
461 static NODE *nd_set_loc(NODE *nd, const YYLTYPE *loc);
462 
463 static int
464 parser_get_node_id(struct parser_params *p)
465 {
466  int node_id = p->node_id;
467  p->node_id++;
468  return node_id;
469 }
470 
471 #ifndef RIPPER
472 static inline void
473 set_line_body(NODE *body, int line)
474 {
475  if (!body) return;
476  switch (nd_type(body)) {
477  case NODE_RESCUE:
478  case NODE_ENSURE:
479  nd_set_line(body, line);
480  }
481 }
482 
483 #define yyparse ruby_yyparse
484 
485 static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
486 static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
487 #define new_nil(loc) NEW_NIL(loc)
488 static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*);
489 static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*);
490 static NODE *logop(struct parser_params*,ID,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
491 
492 static NODE *newline_node(NODE*);
493 static void fixpos(NODE*,NODE*);
494 
495 static int value_expr_gen(struct parser_params*,NODE*);
496 static void void_expr(struct parser_params*,NODE*);
497 static NODE *remove_begin(NODE*);
498 static NODE *remove_begin_all(NODE*);
499 #define value_expr(node) value_expr_gen(p, (node) = remove_begin(node))
500 static NODE *void_stmts(struct parser_params*,NODE*);
501 static void reduce_nodes(struct parser_params*,NODE**);
502 static void block_dup_check(struct parser_params*,NODE*,NODE*);
503 
504 static NODE *block_append(struct parser_params*,NODE*,NODE*);
505 static NODE *list_append(struct parser_params*,NODE*,NODE*);
506 static NODE *list_concat(NODE*,NODE*);
507 static NODE *arg_append(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
508 static NODE *last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc);
509 static NODE *rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc);
510 static NODE *literal_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
511 static NODE *new_evstr(struct parser_params*,NODE*,const YYLTYPE*);
512 static NODE *evstr2dstr(struct parser_params*,NODE*);
513 static NODE *splat_array(NODE*);
514 static void mark_lvar_used(struct parser_params *p, NODE *rhs);
515 
516 static NODE *call_bin_op(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*);
517 static NODE *call_uni_op(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*);
518 static NODE *new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc);
519 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);
520 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;}
521 
522 static bool args_info_empty_p(struct rb_args_info *args);
523 static NODE *new_args(struct parser_params*,NODE*,NODE*,ID,NODE*,NODE*,const YYLTYPE*);
524 static NODE *new_args_tail(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
525 static NODE *new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc);
526 static NODE *new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, ID rest_arg, NODE *post_args, const YYLTYPE *loc);
527 static NODE *new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc);
528 static NODE *new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc);
529 static NODE *new_case3(struct parser_params *p, NODE *val, NODE *pat, const YYLTYPE *loc);
530 
531 static NODE *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc);
532 static NODE *args_with_numbered(struct parser_params*,NODE*,int);
533 
534 static VALUE negate_lit(struct parser_params*, VALUE);
535 static NODE *ret_args(struct parser_params*,NODE*);
536 static NODE *arg_blk_pass(NODE*,NODE*);
537 static NODE *new_yield(struct parser_params*,NODE*,const YYLTYPE*);
538 static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*);
539 
540 static NODE *gettable(struct parser_params*,ID,const YYLTYPE*);
541 static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*);
542 
543 static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
544 static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
545 
546 static void rb_backref_error(struct parser_params*,NODE*);
547 static NODE *node_assign(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
548 
549 static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc);
550 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);
551 static NODE *new_attr_op_assign(struct parser_params *p, NODE *lhs, ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc);
552 static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc);
553 static NODE *new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc);
554 
555 static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc);
556 
557 static NODE *opt_arg_append(NODE*, NODE*);
558 static NODE *kwd_append(NODE*, NODE*);
559 
560 static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
561 static NODE *new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
562 
563 static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc);
564 
565 static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *);
566 
567 #define make_list(list, loc) ((list) ? (nd_set_loc(list, loc), list) : NEW_ZLIST(loc))
568 
569 static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
570 
571 static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
572 
573 static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
574 
575 static ID *local_tbl(struct parser_params*);
576 
577 static VALUE reg_compile(struct parser_params*, VALUE, int);
578 static void reg_fragment_setenc(struct parser_params*, VALUE, int);
579 static int reg_fragment_check(struct parser_params*, VALUE, int);
580 static NODE *reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc);
581 
582 static int literal_concat0(struct parser_params *p, VALUE head, VALUE tail);
583 static NODE *heredoc_dedent(struct parser_params*,NODE*);
584 
585 static void check_literal_when(struct parser_params *p, NODE *args, const YYLTYPE *loc);
586 
587 #define get_id(id) (id)
588 #define get_value(val) (val)
589 #define get_num(num) (num)
590 #else /* RIPPER */
591 #define NODE_RIPPER NODE_CDECL
592 
593 static inline int ripper_is_node_yylval(VALUE n);
594 
595 static inline VALUE
596 ripper_new_yylval(struct parser_params *p, ID a, VALUE b, VALUE c)
597 {
598  if (ripper_is_node_yylval(c)) c = RNODE(c)->nd_cval;
599  add_mark_object(p, b);
600  add_mark_object(p, c);
601  return (VALUE)NEW_CDECL(a, b, c, &NULL_LOC);
602 }
603 
604 static inline int
605 ripper_is_node_yylval(VALUE n)
606 {
607  return RB_TYPE_P(n, T_NODE) && nd_type(RNODE(n)) == NODE_RIPPER;
608 }
609 
610 #define value_expr(node) ((void)(node))
611 #define remove_begin(node) (node)
612 #define void_stmts(p,x) (x)
613 #define rb_dvar_defined(id, base) 0
614 #define rb_local_defined(id, base) 0
615 static ID ripper_get_id(VALUE);
616 #define get_id(id) ripper_get_id(id)
617 static VALUE ripper_get_value(VALUE);
618 #define get_value(val) ripper_get_value(val)
619 #define get_num(num) (int)get_id(num)
620 static VALUE assignable(struct parser_params*,VALUE);
621 static int id_is_var(struct parser_params *p, ID id);
622 
623 #define method_cond(p,node,loc) (node)
624 #define call_bin_op(p, recv,id,arg1,op_loc,loc) dispatch3(binary, (recv), STATIC_ID2SYM(id), (arg1))
625 #define match_op(p,node1,node2,op_loc,loc) call_bin_op(0, (node1), idEqTilde, (node2), op_loc, loc)
626 #define call_uni_op(p, recv,id,op_loc,loc) dispatch2(unary, STATIC_ID2SYM(id), (recv))
627 #define logop(p,id,node1,node2,op_loc,loc) call_bin_op(0, (node1), (id), (node2), op_loc, loc)
628 
629 #define new_nil(loc) Qnil
630 
631 static VALUE new_regexp(struct parser_params *, VALUE, VALUE, const YYLTYPE *);
632 
633 static VALUE const_decl(struct parser_params *p, VALUE path);
634 
635 static VALUE var_field(struct parser_params *p, VALUE a);
636 static VALUE assign_error(struct parser_params *p, VALUE a);
637 
638 static VALUE parser_reg_compile(struct parser_params*, VALUE, int, VALUE *);
639 
640 #endif /* !RIPPER */
641 
642 /* forward declaration */
644 
646 VALUE rb_parser_reg_compile(struct parser_params* p, VALUE str, int options);
647 int rb_reg_fragment_setenc(struct parser_params*, VALUE, int);
650 void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
651 PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt, ...), 2, 3);
656 
657 static void error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc);
658 static void error_duplicate_pattern_key(struct parser_params *p, ID id, const YYLTYPE *loc);
659 static void parser_token_value_print(struct parser_params *p, enum yytokentype type, const YYSTYPE *valp);
660 static ID formal_argument(struct parser_params*, ID);
661 static ID shadowing_lvar(struct parser_params*,ID);
662 static void new_bv(struct parser_params*,ID);
663 
664 static void local_push(struct parser_params*,int);
665 static void local_pop(struct parser_params*);
666 static void local_var(struct parser_params*, ID);
667 static void arg_var(struct parser_params*, ID);
668 static int local_id(struct parser_params *p, ID id);
669 static int local_id_ref(struct parser_params*, ID, ID **);
670 #ifndef RIPPER
671 static ID internal_id(struct parser_params*);
672 #endif
673 
674 static const struct vtable *dyna_push(struct parser_params *);
675 static void dyna_pop(struct parser_params*, const struct vtable *);
676 static int dyna_in_block(struct parser_params*);
677 #define dyna_var(p, id) local_var(p, id)
678 static int dvar_defined(struct parser_params*, ID);
679 static int dvar_defined_ref(struct parser_params*, ID, ID**);
680 static int dvar_curr(struct parser_params*,ID);
681 
682 static int lvar_defined(struct parser_params*, ID);
683 
684 static NODE *numparam_push(struct parser_params *p);
685 static void numparam_pop(struct parser_params *p, NODE *prev_inner);
686 
687 #ifdef RIPPER
688 # define METHOD_NOT idNOT
689 #else
690 # define METHOD_NOT '!'
691 #endif
692 
693 #define idFWD_REST '*'
694 #ifdef RUBY3_KEYWORDS
695 #define idFWD_KWREST idPow /* Use simple "**", as tDSTAR is "**arg" */
696 #else
697 #define idFWD_KWREST 0
698 #endif
699 #define idFWD_BLOCK '&'
700 
701 #define RE_OPTION_ONCE (1<<16)
702 #define RE_OPTION_ENCODING_SHIFT 8
703 #define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
704 #define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
705 #define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
706 #define RE_OPTION_MASK 0xff
707 #define RE_OPTION_ARG_ENCODING_NONE 32
708 
709 /* structs for managing terminator of string literal and heredocment */
710 typedef struct rb_strterm_literal_struct {
711  union {
712  VALUE dummy;
713  long nest;
714  } u0;
715  union {
716  VALUE dummy;
717  long func; /* STR_FUNC_* (e.g., STR_FUNC_ESCAPE and STR_FUNC_EXPAND) */
718  } u1;
719  union {
720  VALUE dummy;
721  long paren; /* '(' of `%q(...)` */
722  } u2;
723  union {
724  VALUE dummy;
725  long term; /* ')' of `%q(...)` */
726  } u3;
728 
729 #define HERETERM_LENGTH_BITS ((SIZEOF_VALUE - 1) * CHAR_BIT - 1)
730 
732  VALUE lastline; /* the string of line that contains `<<"END"` */
733  long offset; /* the column of END in `<<"END"` */
734  int sourceline; /* lineno of the line that contains `<<"END"` */
735  unsigned length /* the length of END in `<<"END"` */
736 #if HERETERM_LENGTH_BITS < SIZEOF_INT * CHAR_BIT
738 # define HERETERM_LENGTH_MAX ((1U << HERETERM_LENGTH_BITS) - 1)
739 #else
740 # define HERETERM_LENGTH_MAX UINT_MAX
741 #endif
742  ;
743 #if HERETERM_LENGTH_BITS < SIZEOF_INT * CHAR_BIT
744  unsigned quote: 1;
745  unsigned func: 8;
746 #else
747  uint8_t quote;
748  uint8_t func;
749 #endif
750 };
752 
753 #define STRTERM_HEREDOC IMEMO_FL_USER0
754 
755 struct rb_strterm_struct {
756  VALUE flags;
757  union {
760  } u;
761 };
762 
763 #ifndef RIPPER
764 void
766 {
767  rb_strterm_t *strterm = (rb_strterm_t*)obj;
768  if (RBASIC(obj)->flags & STRTERM_HEREDOC) {
769  rb_strterm_heredoc_t *heredoc = &strterm->u.heredoc;
770  rb_gc_mark(heredoc->lastline);
771  }
772 }
773 #endif
774 
775 #define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(p, yyres, yystr)
776 size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
777 
778 #define TOKEN2ID(tok) ( \
779  tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
780  tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
781  tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
782  tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
783  tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
784  tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
785  ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
786 
787 /****** Ripper *******/
788 
789 #ifdef RIPPER
790 #define RIPPER_VERSION "0.1.0"
791 
792 static inline VALUE intern_sym(const char *name);
793 
794 #include "eventids1.c"
795 #include "eventids2.c"
796 
797 static VALUE ripper_dispatch0(struct parser_params*,ID);
798 static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
799 static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
800 static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
801 static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
802 static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
803 static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
804 static void ripper_error(struct parser_params *p);
805 
806 #define dispatch0(n) ripper_dispatch0(p, TOKEN_PASTE(ripper_id_, n))
807 #define dispatch1(n,a) ripper_dispatch1(p, TOKEN_PASTE(ripper_id_, n), (a))
808 #define dispatch2(n,a,b) ripper_dispatch2(p, TOKEN_PASTE(ripper_id_, n), (a), (b))
809 #define dispatch3(n,a,b,c) ripper_dispatch3(p, TOKEN_PASTE(ripper_id_, n), (a), (b), (c))
810 #define dispatch4(n,a,b,c,d) ripper_dispatch4(p, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d))
811 #define dispatch5(n,a,b,c,d,e) ripper_dispatch5(p, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e))
812 #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))
813 
814 #define yyparse ripper_yyparse
815 
816 #define ID2VAL(id) STATIC_ID2SYM(id)
817 #define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
818 #define KWD2EID(t, v) ripper_new_yylval(p, keyword_##t, get_value(v), 0)
819 
820 #define params_new(pars, opts, rest, pars2, kws, kwrest, blk) \
821  dispatch7(params, (pars), (opts), (rest), (pars2), (kws), (kwrest), (blk))
822 
823 #define escape_Qundef(x) ((x)==Qundef ? Qnil : (x))
824 
825 static inline VALUE
826 new_args(struct parser_params *p, VALUE pre_args, VALUE opt_args, VALUE rest_arg, VALUE post_args, VALUE tail, YYLTYPE *loc)
827 {
828  NODE *t = (NODE *)tail;
829  VALUE kw_args = t->u1.value, kw_rest_arg = t->u2.value, block = t->u3.value;
830  return params_new(pre_args, opt_args, rest_arg, post_args, kw_args, kw_rest_arg, escape_Qundef(block));
831 }
832 
833 static inline VALUE
834 new_args_tail(struct parser_params *p, VALUE kw_args, VALUE kw_rest_arg, VALUE block, YYLTYPE *loc)
835 {
836  NODE *t = rb_node_newnode(NODE_ARGS_AUX, kw_args, kw_rest_arg, block, &NULL_LOC);
837  add_mark_object(p, kw_args);
838  add_mark_object(p, kw_rest_arg);
839  add_mark_object(p, block);
840  return (VALUE)t;
841 }
842 
843 static inline VALUE
844 args_with_numbered(struct parser_params *p, VALUE args, int max_numparam)
845 {
846  return args;
847 }
848 
849 static VALUE
850 new_array_pattern(struct parser_params *p, VALUE constant, VALUE pre_arg, VALUE aryptn, const YYLTYPE *loc)
851 {
852  NODE *t = (NODE *)aryptn;
853  struct rb_ary_pattern_info *apinfo = t->nd_apinfo;
855 
856  if (apinfo) {
857  pre_args = rb_ary_entry(apinfo->imemo, 0);
858  rest_arg = rb_ary_entry(apinfo->imemo, 1);
859  post_args = rb_ary_entry(apinfo->imemo, 2);
860  }
861 
862  if (!NIL_P(pre_arg)) {
863  if (!NIL_P(pre_args)) {
864  rb_ary_unshift(pre_args, pre_arg);
865  }
866  else {
867  pre_args = rb_ary_new_from_args(1, pre_arg);
868  }
869  }
870  return dispatch4(aryptn, constant, pre_args, rest_arg, post_args);
871 }
872 
873 static VALUE
874 new_array_pattern_tail(struct parser_params *p, VALUE pre_args, VALUE has_rest, VALUE rest_arg, VALUE post_args, const YYLTYPE *loc)
875 {
876  NODE *t;
877  struct rb_ary_pattern_info *apinfo;
878 
879  if (has_rest) {
880  rest_arg = dispatch1(var_field, rest_arg ? rest_arg : Qnil);
881  }
882  else {
883  rest_arg = Qnil;
884  }
885 
887  apinfo = ZALLOC(struct rb_ary_pattern_info);
888  rb_imemo_tmpbuf_set_ptr(tmpbuf, apinfo);
889  apinfo->imemo = rb_ary_new_from_args(4, pre_args, rest_arg, post_args, tmpbuf);
890 
891  t = rb_node_newnode(NODE_ARYPTN, Qnil, Qnil, (VALUE)apinfo, &NULL_LOC);
892  RB_OBJ_WRITTEN(p->ast, Qnil, apinfo->imemo);
893 
894  return (VALUE)t;
895 }
896 
897 #define new_hash(p,h,l) rb_ary_new_from_args(0)
898 
899 static VALUE
900 new_unique_key_hash(struct parser_params *p, VALUE ary, const YYLTYPE *loc)
901 {
902  return ary;
903 }
904 
905 static VALUE
906 new_hash_pattern(struct parser_params *p, VALUE constant, VALUE hshptn, const YYLTYPE *loc)
907 {
908  NODE *t = (NODE *)hshptn;
909  VALUE kw_args = t->u1.value, kw_rest_arg = t->u2.value;
910  return dispatch3(hshptn, constant, kw_args, kw_rest_arg);
911 }
912 
913 static VALUE
914 new_hash_pattern_tail(struct parser_params *p, VALUE kw_args, VALUE kw_rest_arg, const YYLTYPE *loc)
915 {
916  NODE *t;
917  if (kw_rest_arg) {
918  kw_rest_arg = dispatch1(var_field, kw_rest_arg);
919  }
920  else {
921  kw_rest_arg = Qnil;
922  }
923  t = rb_node_newnode(NODE_HSHPTN, kw_args, kw_rest_arg, 0, &NULL_LOC);
924 
925  add_mark_object(p, kw_args);
926  add_mark_object(p, kw_rest_arg);
927  return (VALUE)t;
928 }
929 
930 #define new_defined(p,expr,loc) dispatch1(defined, (expr))
931 
932 static VALUE heredoc_dedent(struct parser_params*,VALUE);
933 
934 #else
935 #define ID2VAL(id) (id)
936 #define TOKEN2VAL(t) ID2VAL(t)
937 #define KWD2EID(t, v) keyword_##t
938 #endif /* RIPPER */
939 
940 #ifndef RIPPER
941 # define Qnone 0
942 # define Qnull 0
943 # define ifndef_ripper(x) (x)
944 #else
945 # define Qnone Qnil
946 # define Qnull Qundef
947 # define ifndef_ripper(x)
948 #endif
949 
950 # define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
951 # define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
952 # define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
953 # define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
954 # define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
955 # define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
956 # define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
957 # define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
958 # define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
959 # define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
960 # define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
961 # define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
962 # define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
963 # define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
964 # define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
965 # define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
966 # define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
967 # define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
968 # define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
969 # define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
970 #ifdef RIPPER
971 static ID id_warn, id_warning, id_gets, id_assoc;
972 # define WARN_S_L(s,l) STR_NEW(s,l)
973 # define WARN_S(s) STR_NEW2(s)
974 # define WARN_I(i) INT2NUM(i)
975 # define WARN_ID(i) rb_id2str(i)
976 # define WARN_IVAL(i) i
977 # define PRIsWARN "s"
978 # define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
979 # define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
980 # ifdef HAVE_VA_ARGS_MACRO
981 # define WARN_CALL(...) rb_funcall(__VA_ARGS__)
982 # else
983 # define WARN_CALL rb_funcall
984 # endif
985 # define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
986 # define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
987 # ifdef HAVE_VA_ARGS_MACRO
988 # define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
989 # else
990 # define WARNING_CALL rb_funcall
991 # endif
992 PRINTF_ARGS(static void ripper_compile_error(struct parser_params*, const char *fmt, ...), 2, 3);
993 # define compile_error ripper_compile_error
994 #else
995 # define WARN_S_L(s,l) s
996 # define WARN_S(s) s
997 # define WARN_I(i) i
998 # define WARN_ID(i) rb_id2name(i)
999 # define WARN_IVAL(i) NUM2INT(i)
1000 # define PRIsWARN PRIsVALUE
1001 # define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
1002 # define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
1003 # define WARN_CALL rb_compile_warn
1004 # define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1005 # define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1006 # define WARNING_CALL rb_compile_warning
1007 PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const char *fmt, ...), 2, 3);
1008 # define compile_error parser_compile_error
1009 #endif
1010 
1011 static void token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc);
1012 static void token_info_push(struct parser_params*, const char *token, const rb_code_location_t *loc);
1013 static void token_info_pop(struct parser_params*, const char *token, const rb_code_location_t *loc);
1014 static void token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc);
1015 
1016 #define WARN_EOL(tok) \
1017  (looking_at_eol_p(p) ? \
1018  (void)rb_warning0("`" tok "' at the end of line without an expression") : \
1019  (void)0)
1020 static int looking_at_eol_p(struct parser_params *p);
1021 
1022 #line 1023 "parse.c" /* yacc.c:339 */
1023 
1024 # ifndef YY_NULLPTR
1025 # if defined __cplusplus && 201103L <= __cplusplus
1026 # define YY_NULLPTR nullptr
1027 # else
1028 # define YY_NULLPTR 0
1029 # endif
1030 # endif
1031 
1032 /* Enabling verbose error messages. */
1033 #ifdef YYERROR_VERBOSE
1034 # undef YYERROR_VERBOSE
1035 # define YYERROR_VERBOSE 1
1036 #else
1037 # define YYERROR_VERBOSE 0
1038 #endif
1039 
1040 /* In a future release of Bison, this section will be replaced
1041  by #include "y.tab.h". */
1042 #ifndef YY_YY_Y_TAB_H_INCLUDED
1043 # define YY_YY_Y_TAB_H_INCLUDED
1044 /* Debug traces. */
1045 #ifndef YYDEBUG
1046 # define YYDEBUG 0
1047 #endif
1048 #if YYDEBUG
1049 #ifndef yydebug
1050 extern int yydebug;
1051 #endif
1052 #endif
1053 
1054 /* Token type. */
1055 #ifndef YYTOKENTYPE
1056 # define YYTOKENTYPE
1057  enum yytokentype
1058  {
1059  END_OF_INPUT = 0,
1060  keyword_class = 258,
1061  keyword_module = 259,
1062  keyword_def = 260,
1063  keyword_undef = 261,
1064  keyword_begin = 262,
1065  keyword_rescue = 263,
1066  keyword_ensure = 264,
1067  keyword_end = 265,
1068  keyword_if = 266,
1069  keyword_unless = 267,
1070  keyword_then = 268,
1071  keyword_elsif = 269,
1072  keyword_else = 270,
1073  keyword_case = 271,
1074  keyword_when = 272,
1075  keyword_while = 273,
1076  keyword_until = 274,
1077  keyword_for = 275,
1078  keyword_break = 276,
1079  keyword_next = 277,
1080  keyword_redo = 278,
1081  keyword_retry = 279,
1082  keyword_in = 280,
1083  keyword_do = 281,
1084  keyword_do_cond = 282,
1085  keyword_do_block = 283,
1086  keyword_do_LAMBDA = 284,
1087  keyword_return = 285,
1088  keyword_yield = 286,
1089  keyword_super = 287,
1090  keyword_self = 288,
1091  keyword_nil = 289,
1092  keyword_true = 290,
1093  keyword_false = 291,
1094  keyword_and = 292,
1095  keyword_or = 293,
1096  keyword_not = 294,
1097  modifier_if = 295,
1098  modifier_unless = 296,
1099  modifier_while = 297,
1100  modifier_until = 298,
1101  modifier_rescue = 299,
1102  keyword_alias = 300,
1103  keyword_defined = 301,
1104  keyword_BEGIN = 302,
1105  keyword_END = 303,
1106  keyword__LINE__ = 304,
1107  keyword__FILE__ = 305,
1108  keyword__ENCODING__ = 306,
1109  tIDENTIFIER = 307,
1110  tFID = 308,
1111  tGVAR = 309,
1112  tIVAR = 310,
1113  tCONSTANT = 311,
1114  tCVAR = 312,
1115  tLABEL = 313,
1116  tINTEGER = 314,
1117  tFLOAT = 315,
1118  tRATIONAL = 316,
1119  tIMAGINARY = 317,
1120  tCHAR = 318,
1121  tNTH_REF = 319,
1122  tBACK_REF = 320,
1123  tSTRING_CONTENT = 321,
1124  tREGEXP_END = 322,
1125  tSP = 323,
1126  tUPLUS = 132,
1127  tUMINUS = 133,
1128  tPOW = 134,
1129  tCMP = 135,
1130  tEQ = 140,
1131  tEQQ = 141,
1132  tNEQ = 142,
1133  tGEQ = 139,
1134  tLEQ = 138,
1135  tANDOP = 148,
1136  tOROP = 149,
1137  tMATCH = 143,
1138  tNMATCH = 144,
1139  tDOT2 = 128,
1140  tDOT3 = 129,
1141  tBDOT2 = 130,
1142  tBDOT3 = 131,
1143  tAREF = 145,
1144  tASET = 146,
1145  tLSHFT = 136,
1146  tRSHFT = 137,
1147  tANDDOT = 150,
1148  tCOLON2 = 147,
1149  tCOLON3 = 324,
1150  tOP_ASGN = 325,
1151  tASSOC = 326,
1152  tLPAREN = 327,
1153  tLPAREN_ARG = 328,
1154  tRPAREN = 329,
1155  tLBRACK = 330,
1156  tLBRACE = 331,
1157  tLBRACE_ARG = 332,
1158  tSTAR = 333,
1159  tDSTAR = 334,
1160  tAMPER = 335,
1161  tLAMBDA = 336,
1162  tSYMBEG = 337,
1163  tSTRING_BEG = 338,
1164  tXSTRING_BEG = 339,
1165  tREGEXP_BEG = 340,
1166  tWORDS_BEG = 341,
1167  tQWORDS_BEG = 342,
1168  tSYMBOLS_BEG = 343,
1169  tQSYMBOLS_BEG = 344,
1170  tSTRING_END = 345,
1171  tSTRING_DEND = 346,
1172  tSTRING_DBEG = 347,
1173  tSTRING_DVAR = 348,
1174  tLAMBEG = 349,
1175  tLABEL_END = 350,
1176  tLOWEST = 351,
1177  tUMINUS_NUM = 352,
1178  tLAST_TOKEN = 353
1179  };
1180 #endif
1181 
1182 /* Value type. */
1183 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
1184 
1185 union YYSTYPE
1186 {
1187 #line 978 "parse.y" /* yacc.c:355 */
1188 
1189  VALUE val;
1190  NODE *node;
1191  ID id;
1192  int num;
1193  st_table *tbl;
1194  const struct vtable *vars;
1195  struct rb_strterm_struct *strterm;
1196 
1197 #line 1196 "parse.c" /* yacc.c:355 */
1198 };
1199 
1200 typedef union YYSTYPE YYSTYPE;
1201 # define YYSTYPE_IS_TRIVIAL 1
1202 # define YYSTYPE_IS_DECLARED 1
1203 #endif
1204 
1205 /* Location type. */
1206 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
1207 typedef struct YYLTYPE YYLTYPE;
1208 struct YYLTYPE
1209 {
1210  int first_line;
1211  int first_column;
1212  int last_line;
1213  int last_column;
1214 };
1215 # define YYLTYPE_IS_DECLARED 1
1216 # define YYLTYPE_IS_TRIVIAL 1
1217 #endif
1218 
1219 
1220 
1221 int yyparse (struct parser_params *p);
1222 
1223 #endif /* !YY_YY_Y_TAB_H_INCLUDED */
1224 
1225 /* Copy the second part of user declarations. */
1226 
1227 #line 1226 "parse.c" /* yacc.c:358 */
1228 
1229 #ifdef short
1230 # undef short
1231 #endif
1232 
1233 #ifdef YYTYPE_UINT8
1234 typedef YYTYPE_UINT8 yytype_uint8;
1235 #else
1236 typedef unsigned char yytype_uint8;
1237 #endif
1238 
1239 #ifdef YYTYPE_INT8
1240 typedef YYTYPE_INT8 yytype_int8;
1241 #else
1242 typedef signed char yytype_int8;
1243 #endif
1244 
1245 #ifdef YYTYPE_UINT16
1246 typedef YYTYPE_UINT16 yytype_uint16;
1247 #else
1248 typedef unsigned short int yytype_uint16;
1249 #endif
1250 
1251 #ifdef YYTYPE_INT16
1252 typedef YYTYPE_INT16 yytype_int16;
1253 #else
1254 typedef short int yytype_int16;
1255 #endif
1256 
1257 #ifndef YYSIZE_T
1258 # ifdef __SIZE_TYPE__
1259 # define YYSIZE_T __SIZE_TYPE__
1260 # elif defined size_t
1261 # define YYSIZE_T size_t
1262 # elif ! defined YYSIZE_T
1263 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1264 # define YYSIZE_T size_t
1265 # else
1266 # define YYSIZE_T unsigned int
1267 # endif
1268 #endif
1269 
1270 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1271 
1272 #ifndef YY_
1273 # if defined YYENABLE_NLS && YYENABLE_NLS
1274 # if ENABLE_NLS
1275 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1276 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
1277 # endif
1278 # endif
1279 # ifndef YY_
1280 # define YY_(Msgid) Msgid
1281 # endif
1282 #endif
1283 
1284 #ifndef YY_ATTRIBUTE
1285 # if (defined __GNUC__ \
1286  && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
1287  || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
1288 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
1289 # else
1290 # define YY_ATTRIBUTE(Spec) /* empty */
1291 # endif
1292 #endif
1293 
1294 #ifndef YY_ATTRIBUTE_PURE
1295 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
1296 #endif
1297 
1298 #ifndef YY_ATTRIBUTE_UNUSED
1299 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
1300 #endif
1301 
1302 #if !defined _Noreturn \
1303  && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
1304 # if defined _MSC_VER && 1200 <= _MSC_VER
1305 # define _Noreturn __declspec (noreturn)
1306 # else
1307 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
1308 # endif
1309 #endif
1310 
1311 /* Suppress unused-variable warnings by "using" E. */
1312 #if ! defined lint || defined __GNUC__
1313 # define YYUSE(E) ((void) (E))
1314 #else
1315 # define YYUSE(E) /* empty */
1316 #endif
1317 
1318 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
1319 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
1320 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
1321  _Pragma ("GCC diagnostic push") \
1322  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
1323  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
1324 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
1325  _Pragma ("GCC diagnostic pop")
1326 #else
1327 # define YY_INITIAL_VALUE(Value) Value
1328 #endif
1329 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1330 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1331 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
1332 #endif
1333 #ifndef YY_INITIAL_VALUE
1334 # define YY_INITIAL_VALUE(Value) /* Nothing. */
1335 #endif
1336 
1337 
1338 #if ! defined yyoverflow || YYERROR_VERBOSE
1339 
1340 /* The parser invokes alloca or malloc; define the necessary symbols. */
1341 
1342 # ifdef YYSTACK_USE_ALLOCA
1343 # if YYSTACK_USE_ALLOCA
1344 # ifdef __GNUC__
1345 # define YYSTACK_ALLOC __builtin_alloca
1346 # elif defined __BUILTIN_VA_ARG_INCR
1347 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1348 # elif defined _AIX
1349 # define YYSTACK_ALLOC __alloca
1350 # elif defined _MSC_VER
1351 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1352 # define alloca _alloca
1353 # else
1354 # define YYSTACK_ALLOC alloca
1355 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
1356 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1357  /* Use EXIT_SUCCESS as a witness for stdlib.h. */
1358 # ifndef EXIT_SUCCESS
1359 # define EXIT_SUCCESS 0
1360 # endif
1361 # endif
1362 # endif
1363 # endif
1364 # endif
1365 
1366 # ifdef YYSTACK_ALLOC
1367  /* Pacify GCC's 'empty if-body' warning. */
1368 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
1369 # ifndef YYSTACK_ALLOC_MAXIMUM
1370  /* The OS might guarantee only one guard page at the bottom of the stack,
1371  and a page size can be as small as 4096 bytes. So we cannot safely
1372  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1373  to allow for a few compiler-allocated temporary stack slots. */
1374 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1375 # endif
1376 # else
1377 # define YYSTACK_ALLOC YYMALLOC
1378 # define YYSTACK_FREE YYFREE
1379 # ifndef YYSTACK_ALLOC_MAXIMUM
1380 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1381 # endif
1382 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
1383  && ! ((defined YYMALLOC || defined malloc) \
1384  && (defined YYFREE || defined free)))
1385 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1386 # ifndef EXIT_SUCCESS
1387 # define EXIT_SUCCESS 0
1388 # endif
1389 # endif
1390 # ifndef YYMALLOC
1391 # define YYMALLOC malloc
1392 # if ! defined malloc && ! defined EXIT_SUCCESS
1393 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1394 # endif
1395 # endif
1396 # ifndef YYFREE
1397 # define YYFREE free
1398 # if ! defined free && ! defined EXIT_SUCCESS
1399 void free (void *); /* INFRINGES ON USER NAME SPACE */
1400 # endif
1401 # endif
1402 # endif
1403 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1404 
1405 
1406 #if (! defined yyoverflow \
1407  && (! defined __cplusplus \
1408  || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
1409  && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1410 
1411 /* A type that is properly aligned for any stack member. */
1412 union yyalloc
1413 {
1417 };
1418 
1419 /* The size of the maximum gap between one aligned stack and the next. */
1420 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1421 
1422 /* The size of an array large to enough to hold all stacks, each with
1423  N elements. */
1424 # define YYSTACK_BYTES(N) \
1425  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
1426  + 2 * YYSTACK_GAP_MAXIMUM)
1427 
1428 # define YYCOPY_NEEDED 1
1429 
1430 /* Relocate STACK from its old location to the new one. The
1431  local variables YYSIZE and YYSTACKSIZE give the old and new number of
1432  elements in the stack, and YYPTR gives the new location of the
1433  stack. Advance YYPTR to a properly aligned location for the next
1434  stack. */
1435 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1436  do \
1437  { \
1438  YYSIZE_T yynewbytes; \
1439  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1440  Stack = &yyptr->Stack_alloc; \
1441  yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1442  yyptr += yynewbytes / sizeof (*yyptr); \
1443  } \
1444  while (0)
1445 
1446 #endif
1447 
1448 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
1449 /* Copy COUNT objects from SRC to DST. The source and destination do
1450  not overlap. */
1451 # ifndef YYCOPY
1452 # if defined __GNUC__ && 1 < __GNUC__
1453 # define YYCOPY(Dst, Src, Count) \
1454  __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
1455 # else
1456 # define YYCOPY(Dst, Src, Count) \
1457  do \
1458  { \
1459  YYSIZE_T yyi; \
1460  for (yyi = 0; yyi < (Count); yyi++) \
1461  (Dst)[yyi] = (Src)[yyi]; \
1462  } \
1463  while (0)
1464 # endif
1465 # endif
1466 #endif /* !YYCOPY_NEEDED */
1467 
1468 /* YYFINAL -- State number of the termination state. */
1469 #define YYFINAL 3
1470 /* YYLAST -- Last index in YYTABLE. */
1471 #define YYLAST 13766
1472 
1473 /* YYNTOKENS -- Number of terminals. */
1474 #define YYNTOKENS 154
1475 /* YYNNTS -- Number of nonterminals. */
1476 #define YYNNTS 266
1477 /* YYNRULES -- Number of rules. */
1478 #define YYNRULES 759
1479 /* YYNSTATES -- Number of states. */
1480 #define YYNSTATES 1243
1481 
1482 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
1483  by yylex, with out-of-bounds checking. */
1484 #define YYUNDEFTOK 2
1485 #define YYMAXUTOK 353
1486 
1487 #define YYTRANSLATE(YYX) \
1488  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1489 
1490 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
1491  as returned by yylex, without out-of-bounds checking. */
1492 static const yytype_uint8 yytranslate[] =
1493 {
1494  0, 2, 2, 2, 2, 2, 2, 2, 2, 71,
1495  153, 74, 72, 73, 2, 2, 2, 2, 2, 2,
1496  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1497  2, 2, 152, 140, 2, 2, 2, 138, 133, 2,
1498  148, 149, 136, 134, 146, 135, 68, 137, 2, 2,
1499  2, 2, 2, 2, 2, 2, 2, 2, 128, 151,
1500  130, 126, 129, 127, 2, 2, 2, 2, 2, 2,
1501  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1502  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1503  2, 145, 69, 150, 132, 2, 147, 2, 2, 2,
1504  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1505  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1506  2, 2, 2, 143, 131, 144, 141, 2, 88, 89,
1507  90, 91, 75, 76, 77, 78, 94, 95, 83, 82,
1508  79, 80, 81, 86, 87, 92, 93, 97, 84, 85,
1509  96, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1510  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1511  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1512  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1513  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1514  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1515  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1516  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1517  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1518  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1519  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1520  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1521  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1522  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1523  35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1524  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1525  55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1526  65, 66, 67, 70, 98, 99, 100, 101, 102, 103,
1527  104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
1528  114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
1529  124, 125, 139, 142
1530 };
1531 
1532 #if YYDEBUG
1533  /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
1534 static const yytype_uint16 yyrline[] =
1535 {
1536  0, 1176, 1176, 1176, 1202, 1208, 1215, 1222, 1229, 1235,
1537  1236, 1242, 1255, 1253, 1264, 1275, 1281, 1288, 1295, 1302,
1538  1308, 1313, 1312, 1322, 1322, 1329, 1336, 1346, 1354, 1361,
1539  1369, 1377, 1389, 1401, 1411, 1425, 1426, 1434, 1442, 1451,
1540  1458, 1461, 1468, 1475, 1483, 1490, 1497, 1505, 1512, 1522,
1541  1527, 1536, 1539, 1540, 1544, 1548, 1552, 1557, 1564, 1566,
1542  1556, 1574, 1577, 1584, 1584, 1584, 1590, 1591, 1594, 1595,
1543  1604, 1614, 1624, 1633, 1644, 1651, 1658, 1665, 1672, 1680,
1544  1688, 1695, 1702, 1711, 1712, 1721, 1722, 1731, 1738, 1745,
1545  1752, 1759, 1766, 1773, 1780, 1787, 1794, 1803, 1804, 1813,
1546  1820, 1829, 1836, 1845, 1852, 1859, 1866, 1876, 1883, 1893,
1547  1900, 1907, 1917, 1924, 1931, 1938, 1945, 1952, 1959, 1966,
1548  1973, 1983, 1990, 1993, 2000, 2007, 2016, 2017, 2018, 2019,
1549  2024, 2031, 2038, 2041, 2048, 2048, 2058, 2059, 2060, 2061,
1550  2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 2070, 2071,
1551  2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 2080, 2081,
1552  2082, 2083, 2084, 2085, 2086, 2087, 2090, 2090, 2090, 2091,
1553  2091, 2092, 2092, 2092, 2093, 2093, 2093, 2093, 2094, 2094,
1554  2094, 2094, 2095, 2095, 2095, 2096, 2096, 2096, 2096, 2097,
1555  2097, 2097, 2097, 2098, 2098, 2098, 2098, 2099, 2099, 2099,
1556  2099, 2100, 2100, 2100, 2100, 2101, 2101, 2104, 2111, 2118,
1557  2126, 2134, 2142, 2150, 2158, 2165, 2173, 2182, 2191, 2203,
1558  2215, 2227, 2239, 2243, 2247, 2251, 2255, 2259, 2263, 2267,
1559  2271, 2275, 2279, 2283, 2287, 2291, 2292, 2296, 2300, 2304,
1560  2308, 2312, 2316, 2320, 2324, 2328, 2332, 2336, 2336, 2341,
1561  2350, 2356, 2357, 2358, 2359, 2362, 2366, 2373, 2380, 2381,
1562  2385, 2392, 2401, 2406, 2417, 2424, 2453, 2454, 2457, 2458,
1563  2459, 2463, 2470, 2479, 2487, 2494, 2502, 2510, 2514, 2514,
1564  2551, 2560, 2564, 2570, 2577, 2584, 2591, 2600, 2601, 2604,
1565  2611, 2618, 2627, 2628, 2629, 2630, 2631, 2632, 2633, 2634,
1566  2635, 2636, 2637, 2645, 2644, 2659, 2659, 2666, 2666, 2674,
1567  2682, 2689, 2696, 2703, 2711, 2718, 2725, 2732, 2739, 2739,
1568  2744, 2748, 2752, 2759, 2760, 2769, 2768, 2779, 2790, 2801,
1569  2811, 2822, 2821, 2838, 2837, 2852, 2861, 2909, 2908, 2932,
1570  2931, 2954, 2953, 2977, 2983, 2976, 3003, 3004, 3003, 3029,
1571  3036, 3043, 3050, 3059, 3066, 3072, 3089, 3095, 3101, 3107,
1572  3113, 3119, 3125, 3131, 3137, 3143, 3149, 3155, 3161, 3167,
1573  3182, 3189, 3195, 3202, 3203, 3204, 3207, 3208, 3211, 3212,
1574  3224, 3225, 3234, 3235, 3238, 3246, 3255, 3262, 3271, 3278,
1575  3285, 3292, 3299, 3308, 3316, 3325, 3329, 3333, 3337, 3341,
1576  3347, 3352, 3357, 3361, 3365, 3369, 3373, 3377, 3385, 3389,
1577  3393, 3397, 3401, 3405, 3409, 3413, 3417, 3423, 3424, 3430,
1578  3439, 3451, 3455, 3464, 3466, 3470, 3475, 3481, 3484, 3488,
1579  3492, 3496, 3481, 3520, 3528, 3538, 3543, 3549, 3559, 3573,
1580  3580, 3587, 3596, 3605, 3613, 3621, 3628, 3636, 3644, 3651,
1581  3658, 3671, 3679, 3689, 3690, 3694, 3689, 3711, 3712, 3716,
1582  3711, 3735, 3743, 3750, 3758, 3767, 3779, 3780, 3784, 3790,
1583  3791, 3793, 3794, 3795, 3783, 3808, 3809, 3812, 3813, 3821,
1584  3831, 3832, 3837, 3845, 3849, 3855, 3858, 3867, 3870, 3877,
1585  3880, 3881, 3883, 3884, 3893, 3902, 3907, 3916, 3925, 3930,
1586  3930, 3935, 3941, 3940, 3952, 3957, 3957, 3964, 3973, 3977,
1587  3986, 3990, 3994, 3998, 4002, 4005, 4009, 4018, 4022, 4026,
1588  4030, 4036, 4037, 4046, 4055, 4059, 4063, 4067, 4071, 4075,
1589  4081, 4083, 4092, 4100, 4114, 4115, 4138, 4142, 4148, 4154,
1590  4155, 4164, 4173, 4185, 4197, 4198, 4199, 4200, 4212, 4226,
1591  4227, 4228, 4229, 4230, 4231, 4232, 4233, 4234, 4242, 4241,
1592  4254, 4264, 4277, 4284, 4291, 4300, 4312, 4315, 4322, 4329,
1593  4332, 4336, 4339, 4346, 4349, 4350, 4353, 4370, 4371, 4372,
1594  4381, 4391, 4400, 4406, 4416, 4422, 4431, 4433, 4442, 4452,
1595  4458, 4467, 4476, 4486, 4492, 4502, 4508, 4518, 4528, 4547,
1596  4553, 4563, 4573, 4614, 4617, 4616, 4633, 4637, 4642, 4646,
1597  4650, 4632, 4671, 4678, 4685, 4692, 4695, 4696, 4699, 4709,
1598  4710, 4711, 4712, 4715, 4725, 4726, 4736, 4737, 4738, 4739,
1599  4742, 4743, 4744, 4745, 4746, 4749, 4750, 4751, 4752, 4753,
1600  4754, 4755, 4758, 4771, 4780, 4787, 4796, 4797, 4801, 4800,
1601  4810, 4818, 4827, 4842, 4842, 4856, 4860, 4864, 4868, 4872,
1602  4878, 4883, 4888, 4892, 4896, 4900, 4904, 4908, 4912, 4916,
1603  4920, 4924, 4928, 4932, 4936, 4940, 4945, 4951, 4960, 4968,
1604  4976, 4984, 4994, 4995, 5003, 5012, 5020, 5041, 5043, 5056,
1605  5066, 5074, 5084, 5091, 5100, 5107, 5117, 5124, 5133, 5134,
1606  5137, 5145, 5153, 5163, 5173, 5183, 5190, 5199, 5206, 5215,
1607  5216, 5219, 5227, 5237, 5238, 5241, 5251, 5255, 5261, 5266,
1608  5266, 5290, 5291, 5300, 5302, 5325, 5336, 5343, 5351, 5370,
1609  5371, 5372, 5375, 5376, 5377, 5378, 5381, 5382, 5383, 5386,
1610  5387, 5390, 5391, 5394, 5395, 5398, 5399, 5402, 5403, 5406,
1611  5409, 5412, 5415, 5416, 5417, 5420, 5421, 5424, 5425, 5429
1612 };
1613 #endif
1614 
1615 #if YYDEBUG || YYERROR_VERBOSE || 0
1616 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1617  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1618 static const char *const yytname[] =
1619 {
1620  "\"end-of-input\"", "error", "$undefined", "\"`class'\"",
1621  "\"`module'\"", "\"`def'\"", "\"`undef'\"", "\"`begin'\"",
1622  "\"`rescue'\"", "\"`ensure'\"", "\"`end'\"", "\"`if'\"", "\"`unless'\"",
1623  "\"`then'\"", "\"`elsif'\"", "\"`else'\"", "\"`case'\"", "\"`when'\"",
1624  "\"`while'\"", "\"`until'\"", "\"`for'\"", "\"`break'\"", "\"`next'\"",
1625  "\"`redo'\"", "\"`retry'\"", "\"`in'\"", "\"`do'\"",
1626  "\"`do' for condition\"", "\"`do' for block\"", "\"`do' for lambda\"",
1627  "\"`return'\"", "\"`yield'\"", "\"`super'\"", "\"`self'\"", "\"`nil'\"",
1628  "\"`true'\"", "\"`false'\"", "\"`and'\"", "\"`or'\"", "\"`not'\"",
1629  "\"`if' modifier\"", "\"`unless' modifier\"", "\"`while' modifier\"",
1630  "\"`until' modifier\"", "\"`rescue' modifier\"", "\"`alias'\"",
1631  "\"`defined?'\"", "\"`BEGIN'\"", "\"`END'\"", "\"`__LINE__'\"",
1632  "\"`__FILE__'\"", "\"`__ENCODING__'\"", "\"local variable or method\"",
1633  "\"method\"", "\"global variable\"", "\"instance variable\"",
1634  "\"constant\"", "\"class variable\"", "tLABEL", "\"integer literal\"",
1635  "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
1636  "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
1637  "\"literal content\"", "tREGEXP_END", "'.'", "\"backslash\"",
1638  "\"escaped space\"", "\"escaped horizontal tab\"",
1639  "\"escaped form feed\"", "\"escaped carriage return\"",
1640  "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
1641  "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
1642  "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
1643  "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
1644  "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
1645  "\"( arg\"", "\")\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"",
1646  "\"**arg\"", "\"&\"", "\"->\"", "\"symbol literal\"",
1647  "\"string literal\"", "\"backtick literal\"", "\"regexp literal\"",
1648  "\"word list\"", "\"verbatim word list\"", "\"symbol list\"",
1649  "\"verbatim symbol list\"", "\"terminator\"", "\"'}'\"", "tSTRING_DBEG",
1650  "tSTRING_DVAR", "tLAMBEG", "tLABEL_END", "tLOWEST", "'='", "'?'", "':'",
1651  "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'", "'*'", "'/'", "'%'",
1652  "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'", "'}'", "'['", "','",
1653  "'`'", "'('", "')'", "']'", "';'", "' '", "'\\n'", "$accept", "program",
1654  "$@1", "top_compstmt", "top_stmts", "top_stmt", "begin_block",
1655  "bodystmt", "$@2", "compstmt", "stmts", "stmt_or_begin", "$@3", "stmt",
1656  "$@4", "command_asgn", "command_rhs", "expr", "@5", "@6", "$@7",
1657  "expr_value", "expr_value_do", "$@8", "$@9", "command_call",
1658  "block_command", "cmd_brace_block", "fcall", "command", "mlhs",
1659  "mlhs_inner", "mlhs_basic", "mlhs_item", "mlhs_head", "mlhs_post",
1660  "mlhs_node", "lhs", "cname", "cpath", "fname", "fitem", "undef_list",
1661  "$@10", "op", "reswords", "arg", "$@11", "relop", "rel_expr",
1662  "arg_value", "aref_args", "arg_rhs", "paren_args", "opt_paren_args",
1663  "opt_call_args", "call_args", "command_args", "$@12", "block_arg",
1664  "opt_block_arg", "args", "mrhs_arg", "mrhs", "primary", "$@13", "$@14",
1665  "$@15", "$@16", "$@17", "@18", "@19", "$@20", "@21", "$@22", "@23",
1666  "@24", "@25", "@26", "primary_value", "k_begin", "k_if", "k_unless",
1667  "k_while", "k_until", "k_case", "k_for", "k_class", "k_module", "k_def",
1668  "k_do", "k_do_block", "k_rescue", "k_ensure", "k_when", "k_else",
1669  "k_elsif", "k_end", "k_return", "then", "do", "if_tail", "opt_else",
1670  "for_var", "f_marg", "f_marg_list", "f_margs", "f_rest_marg",
1671  "block_args_tail", "opt_block_args_tail", "block_param",
1672  "opt_block_param", "block_param_def", "opt_bv_decl", "bv_decls", "bvar",
1673  "lambda", "@27", "@28", "@29", "@30", "$@31", "f_larglist",
1674  "lambda_body", "do_block", "block_call", "method_call", "brace_block",
1675  "brace_body", "@32", "@33", "@34", "do_body", "@35", "@36", "@37",
1676  "case_args", "case_body", "cases", "p_case_body", "@38", "@39", "@40",
1677  "$@41", "$@42", "$@43", "p_cases", "p_top_expr", "p_top_expr_body",
1678  "p_expr", "p_as", "p_alt", "p_lparen", "p_lbracket", "p_expr_basic",
1679  "@44", "@45", "@46", "p_args", "p_args_head", "p_args_tail",
1680  "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw", "p_kw_label",
1681  "p_kwrest", "p_kwnorest", "p_value", "p_primitive", "$@47", "p_variable",
1682  "p_var_ref", "p_const", "opt_rescue", "exc_list", "exc_var",
1683  "opt_ensure", "literal", "strings", "string", "string1", "xstring",
1684  "regexp", "words", "word_list", "word", "symbols", "symbol_list",
1685  "qwords", "qsymbols", "qword_list", "qsym_list", "string_contents",
1686  "xstring_contents", "regexp_contents", "string_content", "@48", "$@49",
1687  "@50", "@51", "@52", "@53", "string_dvar", "symbol", "ssym", "sym",
1688  "dsym", "numeric", "simple_numeric", "user_variable", "keyword_variable",
1689  "var_ref", "var_lhs", "backref", "superclass", "$@54", "f_arglist",
1690  "@55", "args_tail", "opt_args_tail", "f_args", "args_forward",
1691  "f_bad_arg", "f_norm_arg", "f_arg_asgn", "f_arg_item", "f_arg",
1692  "f_label", "f_kw", "f_block_kw", "f_block_kwarg", "f_kwarg",
1693  "kwrest_mark", "f_no_kwarg", "f_kwrest", "f_opt", "f_block_opt",
1694  "f_block_optarg", "f_optarg", "restarg_mark", "f_rest_arg",
1695  "blkarg_mark", "f_block_arg", "opt_f_block_arg", "singleton", "$@56",
1696  "assoc_list", "assocs", "assoc", "operation", "operation2", "operation3",
1697  "dot_or_colon", "call_op", "call_op2", "opt_terms", "opt_nl", "rparen",
1698  "rbracket", "rbrace", "trailer", "term", "terms", "none", YY_NULLPTR
1699 };
1700 #endif
1701 
1702 # ifdef YYPRINT
1703 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
1704  (internal) symbol number NUM (which must be that of a token). */
1705 static const yytype_uint16 yytoknum[] =
1706 {
1707  0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1708  265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1709  275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1710  285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1711  295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1712  305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1713  315, 316, 317, 318, 319, 320, 321, 322, 46, 92,
1714  323, 9, 12, 13, 11, 132, 133, 134, 135, 140,
1715  141, 142, 139, 138, 148, 149, 143, 144, 128, 129,
1716  130, 131, 145, 146, 136, 137, 150, 147, 324, 325,
1717  326, 327, 328, 329, 330, 331, 332, 333, 334, 335,
1718  336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
1719  346, 347, 348, 349, 350, 351, 61, 63, 58, 62,
1720  60, 124, 94, 38, 43, 45, 42, 47, 37, 352,
1721  33, 126, 353, 123, 125, 91, 44, 96, 40, 41,
1722  93, 59, 32, 10
1723 };
1724 # endif
1725 
1726 #define YYPACT_NINF -1028
1727 
1728 #define yypact_value_is_default(Yystate) \
1729  (!!((Yystate) == (-1028)))
1730 
1731 #define YYTABLE_NINF -760
1732 
1733 #define yytable_value_is_error(Yytable_value) \
1734  (!!((Yytable_value) == (-760)))
1735 
1736  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1737  STATE-NUM. */
1738 static const yytype_int16 yypact[] =
1739 {
1740  -1028, 133, 3772, -1028, 9176, -1028, -1028, -1028, 8634, -1028,
1741  -1028, -1028, -1028, -1028, -1028, -1028, 9302, 9302, -1028, -1028,
1742  -1028, 5241, 4800, -1028, -1028, -1028, -1028, 533, 8489, 1,
1743  100, 124, -1028, -1028, -1028, 4065, 4947, -1028, -1028, 4212,
1744  -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, 10940, 10940,
1745  10940, 10940, 200, 6689, 9428, 9806, 10184, 8918, -1028, 8344,
1746  -1028, -1028, -1028, 155, 181, 247, 265, 1275, 11066, 10940,
1747  -1028, 232, -1028, 1140, -1028, 319, -1028, -1028, 14, 411,
1748  330, -1028, 332, 11318, -1028, 380, 2654, 644, 46, 425,
1749  -1028, 11192, 11192, -1028, -1028, 7671, 11440, 11562, 11684, 8198,
1750  9302, 819, 108, -1028, -1028, 456, -1028, -1028, -1028, -1028,
1751  -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, 717, 729,
1752  -1028, 420, 783, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
1753  -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
1754  -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
1755  -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
1756  -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
1757  -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
1758  -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
1759  -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
1760  -1028, -1028, 432, -1028, -1028, -1028, 479, 10940, 524, 6840,
1761  10940, 10940, 10940, -1028, 10940, -1028, 503, 4337, 542, -1028,
1762  -1028, 513, 515, 267, 365, 614, 366, 545, -1028, -1028,
1763  7545, -1028, 9302, 9554, -1028, -1028, 7797, -1028, 11192, 858,
1764  -1028, 574, 6991, -1028, 7142, -1028, -1028, 598, 605, 14,
1765  -1028, 522, -1028, 718, 3380, 3380, 791, 9428, -1028, 6689,
1766  657, 232, -1028, 1140, 1, 682, -1028, 1140, 1, 665,
1767  371, 519, -1028, 542, 673, 519, -1028, 1, 763, 1275,
1768  11806, 677, -1028, 690, 708, 716, 724, -1028, -1028, -1028,
1769  -1028, -1028, 481, -1028, 580, 678, 953, -1028, -1028, -1028,
1770  -1028, 748, -1028, -1028, -1028, -1028, -1028, -1028, -1028, 7923,
1771  11192, 11192, 11192, 11192, 9428, 11192, 11192, -1028, -1028, -1028,
1772  721, -1028, -1028, -1028, -1028, -1028, 10310, -1028, 6689, 9047,
1773  684, 10310, -1028, 10940, 10940, 10940, 10940, 10940, -1028, -1028,
1774  10940, 10940, 10940, 10940, 10940, 10940, 10940, 10940, 10940, -1028,
1775  -1028, 10940, 10940, 10940, 10940, 10940, 10940, 10940, 10940, 10940,
1776  10940, -1028, -1028, 12269, 9302, 12359, 5833, 319, 86, 86,
1777  7293, 11192, 7293, 232, -1028, 691, 777, -1028, -1028, 741,
1778  822, 53, 68, 69, 681, 956, 11192, 733, -1028, 714,
1779  891, -1028, -1028, -1028, -1028, 130, 291, 527, 572, 582,
1780  586, 608, 653, 663, -1028, -1028, -1028, 666, -1028, -1028,
1781  -1028, 13619, -1028, -1028, 11066, 11066, -1028, -1028, 374, -1028,
1782  -1028, -1028, 618, 10940, 10940, 9680, -1028, -1028, 12449, 9302,
1783  12539, 10940, 10940, 9932, -1028, 1, 710, -1028, -1028, 10940,
1784  1, -1028, 711, 1, 722, -1028, 107, -1028, -1028, -1028,
1785  -1028, -1028, 8634, -1028, 10940, 726, 728, 12449, 12539, 10940,
1786  1140, 100, 1, -1028, -1028, 8049, 732, 1, -1028, -1028,
1787  10058, -1028, -1028, 10184, -1028, -1028, -1028, 574, 893, -1028,
1788  -1028, 734, 11806, 12629, 9302, 12719, -1028, -1028, -1028, -1028,
1789  -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, 786, 101,
1790  988, 102, 10940, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
1791  -1028, -1028, 757, -1028, -1028, -1028, 882, -1028, 882, 10940,
1792  -1028, 760, 767, 874, -1028, 1, 11806, 774, -1028, -1028,
1793  -1028, 880, 806, 4043, -1028, -1028, -1028, 963, 400, -1028,
1794  718, 3896, 3896, 3896, 3896, 4484, 3134, 3896, 3896, 3380,
1795  3380, 759, 759, 3267, 1222, 1222, 1464, 406, 406, 718,
1796  718, 718, 1115, 1115, 3482, 4359, 5535, 4506, -1028, 605,
1797  -1028, 1, 850, -1028, 1016, -1028, -1028, 5094, 882, 925,
1798  -1028, 5984, 922, 6437, 882, 60, 882, 914, 927, 76,
1799  12809, 9302, 12899, -1028, 319, -1028, 893, -1028, -1028, -1028,
1800  12989, 9302, 13079, 5833, 11192, -1028, -1028, -1028, -1028, -1028,
1801  -1028, 2683, -1028, 4190, -1028, -1028, -1028, 8634, 10940, -1028,
1802  10940, 542, -1028, 545, 3918, 4653, 1, 453, 458, -1028,
1803  -1028, -1028, -1028, 9680, -1028, 9932, -1028, -1028, 11192, 4337,
1804  -1028, -1028, 605, 605, -1028, -1028, -9, -1028, -1028, 519,
1805  11806, 734, 381, 686, 1, 362, 407, -1028, -1028, 1249,
1806  -1028, 566, -1028, 794, -1028, -1028, 568, 795, -1028, 718,
1807  -1028, -1028, 804, -1028, -1028, -1028, -1028, 812, 10436, 9428,
1808  -1028, 734, 11806, 9428, 11066, 10940, 13169, 9302, 13259, 12202,
1809  832, 11066, 11066, -1028, 721, 816, 1020, 11066, 11066, -1028,
1810  -1028, 721, -1028, -1028, -1028, 10562, 755, -1028, 825, -1028,
1811  950, -1028, -1028, -1028, -1028, -1028, -1028, 927, 882, -1028,
1812  10688, 882, 33, 278, 1, 77, 83, 7293, 232, 11192,
1813  5833, 995, 686, -1028, 1, 882, 107, 820, 8779, 108,
1814  411, -1028, -1028, -1028, -1028, 10940, 10940, 462, 10940, 10940,
1815  824, 107, -1028, -1028, 626, -1028, -1028, -1028, -1028, -1028,
1816  -1028, -1028, -1028, -1028, -1028, -1028, -1028, 843, -1028, 843,
1817  10940, 833, -1028, 734, -1028, 4337, 5388, 5682, 1, 466,
1818  470, -1028, -1028, 3091, 3091, 751, -1028, 616, 345, -1028,
1819  940, 899, -1028, 871, -1028, -1028, 815, -1028, -1028, 336,
1820  -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, 10940,
1821  -1028, -1028, -1028, -1028, -1028, -1028, 11066, -1028, -1028, -1028,
1822  -1028, -1028, 760, -1028, 904, -1028, -1028, -1028, 7293, -1028,
1823  -1028, -1028, -1028, 7293, 11192, 882, -1028, -1028, 882, -1028,
1824  -1028, 882, -1028, 10940, -1028, 54, -1028, 113, 882, 5833,
1825  232, 882, -1028, -1028, -1028, 1877, 5833, 1686, -1028, -1028,
1826  -1028, 10940, 9932, -1028, 1519, -1028, 1385, 7142, -1028, -1028,
1827  5833, 862, 538, -1028, -1028, -1028, -1028, 12202, 12083, -1028,
1828  257, 866, -1028, -1028, -1028, 964, -1028, 12202, 3091, 3091,
1829  751, 616, 547, 3621, 3621, 4337, -1028, -1028, 11928, 86,
1830  -1028, -1028, 6563, -1028, 86, -1028, -1028, -1028, -1028, -1028,
1831  10814, 6135, -1028, 882, -1028, -1028, -1028, -1028, -1028, -1028,
1832  -1028, -1028, -1028, -1028, 1537, -1028, -1028, -1028, -1028, -1028,
1833  -1028, 1, 1, -1028, -1028, 896, -1028, 877, 10940, -1028,
1834  883, 106, 887, 887, -1028, 894, 980, 895, 987, -1028,
1835  882, 232, 820, 1686, -1028, -1028, -1028, -1028, 1, 912,
1836  920, 901, 12050, -1028, 911, 887, 887, -1028, 916, 918,
1837  -1028, 929, -1028, -1028, 276, 27, 3, 1, 12169, -1028,
1838  919, -1028, -1028, 1, 932, -1028, 12202, -1028, -1028, 348,
1839  -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
1840  1, 1, 1, 1, 994, -1028, 1025, 118, 135, 179,
1841  5833, 1078, 5984, 3621, 10940, -1028, 92, -1028, 1537, 1208,
1842  -1028, 949, 1, 954, -1028, -1028, -1028, 10940, 1686, -1028,
1843  -1028, 1060, -1028, -1028, -1028, -1028, 216, -1028, -1028, 1686,
1844  -1028, -1028, 1096, -1028, -1028, -1028, -1028, 5833, 1, 63,
1845  7419, 972, -1028, 12050, 1686, -1028, 1049, 1030, 1060, -1028,
1846  -1028, -1028, 1686, -1028, 1096, -1028, 1424, -1028, 978, 12202,
1847  -1028, 43, 899, 982, -1028, 288, -1028, 257, 899, -1028,
1848  -1028, 1079, -1028, -1028, -1028, -1028, 222, 13349, 9302, 13439,
1849  925, -1028, 825, 86, 886, 255, -1028, -1028, -1028, -1028,
1850  -1028, -1028, 1, -1028, 1537, -1028, 1560, -1028, -1028, -1028,
1851  983, 986, -1028, 1082, 887, -1028, 989, -1028, 990, -1028,
1852  989, 882, 992, 5833, 7142, -1028, 1019, -1028, 1030, -1028,
1853  998, 1001, -1028, 13529, -1028, 887, 1003, -1028, 1011, 1003,
1854  -1028, 592, -1028, -1028, 12202, 1012, -1028, 1015, 12202, -1028,
1855  -1028, -1028, -1028, -1028, 134, 158, 1, 315, 318, -1028,
1856  -1028, -1028, 11192, 11192, 12083, -1028, -1028, 1017, 1021, 1686,
1857  -1028, 1096, -1028, -1028, 1096, -1028, 1096, -1028, -1028, -1028,
1858  -1028, 882, 1027, -1028, 1686, -1028, 1096, -1028, 1024, 1029,
1859  -1028, 1096, -1028, 1096, -1028, -1028, 1424, -1028, 1012, 12202,
1860  12202, 1012, 457, -1028, -1028, -1028, -1028, 1560, 1560, 989,
1861  1041, 989, 989, -1028, -1028, 1003, 1043, 1003, 1003, -1028,
1862  -1028, 1012, -1028, 1021, -1028, 1096, -1028, -1028, -1028, -1028,
1863  1096, -1028, -1028, -1028, 6286, 989, 1003, 150, -1028, -1028,
1864  -1028, -1028, -1028
1865 };
1866 
1867  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1868  Performed when YYTABLE does not specify something else to do. Zero
1869  means the default is an error. */
1870 static const yytype_uint16 yydefact[] =
1871 {
1872  2, 0, 0, 1, 0, 361, 362, 363, 0, 354,
1873  355, 356, 359, 357, 358, 360, 349, 350, 351, 352,
1874  372, 278, 278, 636, 635, 637, 638, 747, 0, 747,
1875  0, 0, 640, 639, 641, 729, 731, 632, 631, 730,
1876  634, 626, 627, 628, 629, 577, 646, 647, 0, 0,
1877  0, 0, 0, 0, 305, 759, 759, 95, 325, 597,
1878  597, 599, 601, 0, 0, 0, 0, 0, 0, 0,
1879  3, 745, 6, 9, 35, 40, 52, 67, 278, 66,
1880  0, 83, 0, 87, 97, 0, 61, 235, 250, 0,
1881  303, 0, 0, 63, 63, 745, 0, 0, 0, 0,
1882  314, 68, 323, 292, 293, 576, 578, 294, 295, 296,
1883  298, 297, 299, 575, 616, 617, 574, 624, 642, 643,
1884  300, 0, 301, 71, 5, 8, 176, 187, 177, 200,
1885  173, 193, 183, 182, 203, 204, 198, 181, 180, 175,
1886  201, 205, 206, 185, 174, 188, 192, 194, 186, 179,
1887  195, 202, 197, 196, 189, 199, 184, 172, 191, 190,
1888  171, 178, 169, 170, 166, 167, 168, 126, 128, 127,
1889  161, 162, 157, 139, 140, 141, 148, 145, 147, 142,
1890  143, 163, 164, 149, 150, 154, 158, 144, 146, 136,
1891  137, 138, 151, 152, 153, 155, 156, 159, 160, 165,
1892  131, 133, 28, 129, 130, 132, 0, 0, 0, 0,
1893  0, 0, 0, 597, 0, 273, 0, 257, 283, 81,
1894  277, 759, 0, 642, 643, 0, 301, 759, 723, 82,
1895  747, 79, 0, 759, 448, 78, 747, 748, 0, 0,
1896  23, 247, 0, 10, 0, 349, 350, 317, 449, 0,
1897  229, 0, 314, 230, 220, 221, 311, 0, 21, 0,
1898  0, 745, 17, 20, 747, 85, 16, 307, 747, 0,
1899  752, 752, 258, 0, 0, 752, 721, 747, 0, 0,
1900  0, 93, 353, 0, 103, 104, 111, 427, 621, 620,
1901  622, 619, 0, 618, 0, 0, 0, 584, 593, 589,
1902  595, 625, 56, 241, 242, 755, 756, 4, 757, 746,
1903  0, 0, 0, 0, 0, 0, 0, 364, 453, 442,
1904  72, 457, 322, 365, 457, 438, 0, 99, 0, 91,
1905  88, 0, 57, 0, 0, 0, 0, 0, 253, 254,
1906  0, 0, 0, 0, 218, 219, 0, 0, 0, 251,
1907  252, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1908  0, 741, 742, 0, 759, 0, 0, 62, 0, 0,
1909  0, 0, 0, 745, 333, 746, 0, 383, 382, 0,
1910  0, 642, 643, 301, 121, 122, 0, 0, 124, 650,
1911  0, 642, 643, 301, 341, 196, 189, 199, 184, 166,
1912  167, 168, 126, 127, 719, 343, 718, 0, 80, 744,
1913  743, 0, 324, 579, 0, 0, 134, 726, 311, 284,
1914  728, 280, 0, 0, 0, 0, 274, 282, 0, 759,
1915  0, 0, 0, 0, 275, 747, 0, 316, 279, 677,
1916  747, 269, 759, 747, 759, 268, 747, 321, 55, 25,
1917  27, 26, 0, 318, 0, 0, 0, 0, 0, 0,
1918  19, 0, 747, 309, 15, 746, 84, 747, 306, 312,
1919  754, 753, 259, 754, 261, 313, 722, 0, 110, 625,
1920  101, 96, 0, 0, 759, 0, 326, 428, 603, 623,
1921  606, 604, 598, 580, 581, 600, 582, 602, 0, 0,
1922  0, 0, 0, 758, 7, 29, 30, 31, 32, 33,
1923  53, 54, 0, 454, 453, 73, 0, 458, 0, 0,
1924  36, 288, 0, 39, 287, 747, 0, 89, 100, 51,
1925  41, 49, 0, 262, 283, 207, 37, 0, 301, 58,
1926  227, 234, 236, 237, 238, 245, 246, 239, 240, 216,
1927  217, 243, 244, 747, 231, 232, 233, 222, 223, 224,
1928  225, 226, 255, 256, 732, 734, 733, 735, 447, 278,
1929  445, 747, 732, 734, 733, 735, 446, 278, 0, 759,
1930  374, 0, 373, 0, 0, 0, 0, 331, 0, 311,
1931  0, 759, 0, 63, 339, 121, 122, 123, 648, 337,
1932  0, 759, 0, 0, 0, 344, 739, 740, 346, 732,
1933  733, 278, 42, 262, 208, 48, 215, 0, 0, 725,
1934  0, 285, 281, 759, 732, 733, 747, 732, 733, 724,
1935  315, 749, 264, 270, 265, 272, 320, 24, 0, 248,
1936  11, 34, 0, 759, 214, 22, 86, 18, 308, 752,
1937  0, 94, 736, 109, 747, 732, 733, 429, 607, 0,
1938  583, 0, 586, 0, 591, 588, 0, 0, 592, 228,
1939  451, 455, 0, 371, 452, 459, 437, 291, 0, 0,
1940  98, 92, 0, 0, 0, 0, 0, 759, 0, 0,
1941  0, 0, 0, 444, 76, 0, 450, 0, 0, 267,
1942  443, 74, 266, 304, 366, 759, 759, 566, 759, 375,
1943  759, 329, 377, 64, 376, 330, 468, 0, 0, 368,
1944  0, 0, 736, 310, 747, 732, 733, 0, 0, 0,
1945  0, 121, 122, 125, 747, 0, 747, 653, 0, 439,
1946  69, 135, 727, 286, 276, 0, 0, 450, 0, 0,
1947  759, 747, 260, 102, 450, 430, 608, 612, 613, 614,
1948  605, 615, 585, 587, 594, 590, 596, 759, 70, 759,
1949  0, 289, 38, 90, 50, 263, 732, 733, 747, 732,
1950  733, 560, 564, 0, 0, 0, 505, 499, 502, 558,
1951  0, 59, 485, 487, 489, 492, 539, 544, 545, 546,
1952  549, 550, 551, 552, 553, 555, 554, 556, 557, 0,
1953  47, 212, 46, 213, 77, 750, 0, 44, 210, 45,
1954  211, 75, 567, 568, 759, 569, 367, 369, 0, 12,
1955  14, 573, 370, 0, 0, 0, 378, 380, 0, 65,
1956  469, 0, 335, 0, 461, 0, 334, 450, 0, 0,
1957  0, 0, 450, 342, 720, 676, 0, 676, 347, 440,
1958  441, 0, 271, 319, 676, 609, 747, 0, 418, 417,
1959  0, 290, 450, 547, 548, 122, 562, 0, 0, 501,
1960  0, 0, 504, 427, 561, 0, 60, 0, 542, 543,
1961  0, 491, 490, 0, 0, 249, 43, 209, 0, 0,
1962  571, 572, 0, 381, 0, 327, 328, 470, 332, 462,
1963  0, 0, 336, 0, 649, 338, 683, 680, 679, 678,
1964  681, 689, 698, 677, 0, 710, 699, 714, 713, 709,
1965  675, 747, 747, 682, 684, 685, 687, 661, 691, 696,
1966  759, 702, 759, 759, 707, 661, 712, 661, 0, 659,
1967  0, 0, 653, 676, 431, 434, 610, 416, 747, 0,
1968  685, 401, 693, 694, 759, 759, 759, 705, 401, 401,
1969  399, 421, 456, 460, 747, 519, 507, 747, 508, 514,
1970  0, 534, 597, 747, 525, 530, 533, 527, 529, 537,
1971  751, 559, 486, 488, 540, 541, 563, 498, 495, 597,
1972  747, 747, 747, 747, 0, 570, 0, 642, 643, 301,
1973  0, 759, 0, 0, 0, 463, 759, 340, 0, 394,
1974  386, 388, 747, 391, 384, 651, 652, 0, 0, 668,
1975  690, 0, 656, 717, 700, 701, 0, 658, 657, 0,
1976  671, 711, 0, 673, 715, 345, 654, 0, 747, 0,
1977  0, 0, 419, 0, 407, 409, 0, 692, 0, 396,
1978  398, 397, 0, 412, 0, 414, 0, 506, 517, 0,
1979  500, 512, 523, 509, 515, 0, 503, 526, 532, 538,
1980  536, 0, 493, 494, 496, 497, 311, 0, 759, 0,
1981  759, 13, 759, 0, 477, 480, 483, 484, 464, 466,
1982  467, 465, 747, 393, 0, 686, 0, 703, 660, 688,
1983  661, 661, 697, 702, 759, 716, 661, 708, 661, 685,
1984  661, 0, 0, 0, 0, 432, 0, 420, 704, 400,
1985  401, 401, 311, 0, 695, 759, 401, 706, 401, 401,
1986  425, 747, 423, 426, 0, 520, 521, 510, 0, 516,
1987  535, 531, 524, 528, 736, 310, 747, 732, 733, 565,
1988  379, 471, 0, 0, 481, 385, 387, 389, 392, 0,
1989  664, 0, 666, 655, 0, 672, 0, 669, 674, 348,
1990  433, 0, 0, 611, 0, 404, 0, 406, 736, 310,
1991  395, 0, 413, 0, 410, 415, 0, 422, 518, 0,
1992  0, 513, 450, 472, 478, 479, 482, 0, 0, 661,
1993  661, 661, 661, 436, 435, 401, 401, 401, 401, 424,
1994  522, 511, 473, 390, 665, 0, 662, 667, 670, 405,
1995  0, 402, 408, 411, 0, 661, 401, 759, 663, 403,
1996  475, 476, 474
1997 };
1998 
1999  /* YYPGOTO[NTERM-NUM]. */
2000 static const yytype_int16 yypgoto[] =
2001 {
2002  -1028, -1028, -1028, 923, -1028, 62, 730, -552, -1028, -35,
2003  -1028, 731, -1028, 72, -1028, -212, -254, -66, -1028, -1028,
2004  -1028, -32, -88, -1028, -1028, -36, -1028, -260, 641, 25,
2005  1106, -141, -6, -68, -1028, -410, -19, 2212, -370, 1108,
2006  -40, -24, -1028, -1028, 5, -1028, 2954, -1028, 1121, -1028,
2007  1541, -1028, 652, 426, 601, -307, 94, -10, -1028, -360,
2008  -218, 66, -1028, -310, -52, -1028, -1028, -1028, -1028, -1028,
2009  -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, 32,
2010  -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028,
2011  -1028, -1028, -1028, -1028, -1028, 509, -1028, 210, 981, -368,
2012  -1028, 126, -700, -1028, -1024, -1001, 198, 116, 355, 317,
2013  -1028, 461, -1028, -860, -1028, 30, 350, -1028, -1028, -1028,
2014  -1028, -1028, -1028, -1028, 494, -1028, -1028, -95, 723, -1028,
2015  -1028, -1028, 915, -1028, -1028, -1028, -1028, -680, -1028, -1,
2016  -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -1028, -526,
2017  -1028, -1028, -1028, -1028, 354, -1028, -1028, -1028, -824, -1028,
2018  230, -609, -594, -781, -1028, 177, -1028, 178, 190, -1028,
2019  -376, -1028, 373, -1028, -1028, 166, -1028, -1028, 263, 485,
2020  499, -1028, 1171, 747, 1110, 1394, -1028, 780, 1448, -1028,
2021  1612, 1744, -1028, -1028, -57, -1028, -1028, -199, -1028, -1028,
2022  -1028, -1028, -1028, -1028, -1028, 0, -1028, -1028, -1028, -1028,
2023  -37, 2020, 1174, 1178, 2236, 1512, -1028, -1028, 329, -1028,
2024  -705, 314, -773, 429, -1027, -785, -603, -908, 236, -200,
2025  258, 243, -1028, -1028, -503, -690, -213, -984, -987, 234,
2026  274, -1028, -846, -1028, -513, -379, -1028, -1028, -1028, 6,
2027  -417, -1028, -275, -1028, -1028, -87, -1028, -71, 23, 185,
2028  -583, 322, -194, -60, -44, -2
2029 };
2030 
2031  /* YYDEFGOTO[NTERM-NUM]. */
2032 static const yytype_int16 yydefgoto[] =
2033 {
2034  -1, 1, 2, 70, 71, 72, 243, 578, 902, 579,
2035  261, 262, 461, 263, 452, 74, 530, 75, 539, 689,
2036  886, 368, 370, 371, 839, 76, 77, 515, 249, 79,
2037  80, 264, 81, 82, 83, 481, 84, 216, 388, 389,
2038  200, 201, 202, 617, 567, 204, 86, 454, 359, 87,
2039  218, 269, 535, 568, 700, 440, 441, 231, 232, 220,
2040  426, 442, 523, 524, 88, 366, 268, 467, 638, 287,
2041  717, 588, 730, 728, 603, 605, 737, 738, 952, 251,
2042  90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
2043  321, 324, 705, 828, 720, 833, 834, 674, 252, 581,
2044  713, 835, 836, 380, 1020, 1021, 1022, 1023, 1129, 1055,
2045  958, 867, 868, 959, 1141, 1142, 486, 487, 657, 755,
2046  864, 1049, 954, 1125, 325, 101, 102, 322, 512, 513,
2047  671, 767, 516, 517, 675, 769, 845, 721, 1101, 718,
2048  840, 907, 1013, 1203, 1222, 1234, 1242, 1093, 1094, 1072,
2049  792, 793, 893, 894, 794, 878, 880, 877, 977, 978,
2050  979, 1145, 980, 983, 984, 985, 986, 987, 988, 795,
2051  796, 883, 797, 798, 799, 706, 824, 899, 830, 103,
2052  104, 105, 106, 107, 108, 109, 498, 661, 110, 500,
2053  111, 112, 499, 501, 292, 295, 296, 492, 659, 658,
2054  756, 865, 956, 1050, 760, 113, 114, 293, 115, 116,
2055  117, 223, 224, 120, 225, 226, 599, 729, 856, 857,
2056  1108, 1029, 931, 443, 933, 934, 1119, 936, 937, 938,
2057  939, 963, 964, 940, 941, 942, 943, 944, 967, 968,
2058  945, 946, 947, 948, 949, 1032, 407, 604, 274, 444,
2059  228, 123, 642, 570, 608, 602, 411, 307, 436, 437,
2060  696, 882, 472, 582, 375, 266
2061 };
2062 
2063  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
2064  positive, shift that token. If negative, reduce the rule whose
2065  number is the opposite. If YYTABLE_NINF, syntax error. */
2066 static const yytype_int16 yytable[] =
2067 {
2068  124, 583, 365, 294, 240, 282, 372, 412, 205, 434,
2069  838, 308, 235, 203, 410, 330, 629, 597, 260, 291,
2070  969, 536, 227, 227, 374, 367, 367, 309, 205, 367,
2071  301, 282, 302, 203, 89, 308, 89, 841, 281, 1143,
2072  317, 215, 215, 747, 282, 282, 282, 265, 222, 222,
2073  238, 735, 241, 272, 276, 1117, 629, 571, -116, 405,
2074  369, 271, 275, 373, 203, 622, 125, 580, 320, 1000,
2075  1002, 754, 651, 622, 73, 1137, 73, 474, -112, 1068,
2076  1166, 476, 221, 221, 951, 89, 89, 712, 569, 283,
2077  577, 955, 1123, -113, -120, 1147, 495, 497, 1051, 580,
2078  222, -119, -115, 885, 203, 1168, 227, 827, -117, 719,
2079  219, 229, 1001, 1003, -353, 283, 681, -84, 462, 529,
2080  1109, 270, 626, 222, 222, 215, 267, 222, 379, 390,
2081  390, -112, 222, 3, 317, 430, 611, -98, -114, 1024,
2082  1034, 847, -353, -353, 315, 316, 1109, -116, -113, -523,
2083  930, 852, 930, 569, 237, 577, 422, 318, 1035, 930,
2084  612, 615, 233, 791, 458, 827, 221, 663, 667, 1143,
2085  446, -118, 448, 1069, 260, 716, 965, 654, 851, -107,
2086  1048, -732, 1111, 643, 1166, 1117, 1124, 525, 1122, 1148,
2087  464, -353, -120, 1118, 408, 872, 485, 1137, -636, -103,
2088  910, 308, 529, 529, 879, 305, 1223, 306, 1131, 456,
2089  643, 305, 480, 306, -104, -111, 1138, 465, 629, 427,
2090  664, 668, -110, -106, 260, 427, 434, -636, 282, -108,
2091  733, 445, 1097, 1024, 1103, -119, 227, 305, 227, 306,
2092  124, 89, 479, 242, 367, 367, 367, 367, 930, 510,
2093  511, 318, 935, 265, 935, 215, 256, 215, 215, -105,
2094  237, 935, 222, 960, 222, 222, 1109, 244, 222, -112,
2095  222, -112, 773, 622, 89, 622, 89, 282, 505, 506,
2096  507, 508, -732, 1109, 724, -116, -113, -116, -113, 89,
2097  520, 89, 592, 260, 734, 531, 221, 913, 221, 662,
2098  477, 662, 587, -118, 950, 367, -733, 297, 997, -118,
2099  527, -118, 283, 308, 73, 981, 1099, 643, 973, 1024,
2100  594, 1024, 265, 1210, 435, 927, 438, 643, -115, 460,
2101  -120, -117, -120, 298, 922, 584, 1100, 586, 1216, 585,
2102  1206, 89, 222, 222, 222, 222, 89, 222, 222, 928,
2103  935, 974, 976, 970, 488, 885, 315, 316, 222, -635,
2104  89, 283, 445, 537, 965, 926, -644, 976, 976, 982,
2105  575, 504, 965, -119, 965, -119, 885, 989, 531, 531,
2106  778, 73, 1079, 305, 1073, 306, 509, -106, -635, 215,
2107  989, 989, 522, -112, 1070, 823, 222, 522, 89, 299,
2108  1080, 1164, 89, 222, 89, 744, -107, 873, 874, 490,
2109  491, 569, 1150, 577, 480, 876, 575, 300, 222, 1084,
2110  1085, 447, 1024, 1024, -109, 935, -733, 445, 637, 237,
2111  282, 623, -108, 890, 814, 575, 935, 810, 812, 323,
2112  427, 821, 427, 817, 819, 629, 537, 537, 234, 466,
2113  688, 960, 205, 468, 215, 752, 326, 203, 480, 960,
2114  1078, 222, 763, 575, -645, 432, -115, 763, -115, -117,
2115  -114, -117, 529, 459, 282, 1146, 649, 911, 327, 529,
2116  529, 891, 445, 333, 892, 529, 529, 1095, -106, -747,
2117  575, -113, -120, 361, 965, 1121, 965, 89, 237, 415,
2118  -119, 965, 622, 965, 319, 727, 331, -107, -106, 215,
2119  989, -106, 994, 995, 283, -106, 222, 470, 1115, 414,
2120  996, 362, 363, 1115, 471, 714, -120, -107, 1113, -732,
2121  -107, 1010, 744, -108, -107, 1198, 1012, 1240, 736, 1201,
2122  965, 970, 356, 357, 358, 1115, 708, 488, 710, 970,
2123  1146, 970, 748, -108, 1146, 1113, -108, 749, 283, 694,
2124  -108, 861, 896, 1037, 1038, 697, 935, 701, 60, 698,
2125  364, 1181, 751, 1202, 989, 702, 690, 707, 416, -115,
2126  418, 960, 753, 361, -117, 1059, 1060, 1061, -114, 445,
2127  361, 1221, -115, 741, 695, -637, -117, 575, 282, 445,
2128  489, 740, 490, 491, 529, 1220, 1146, 575, -114, 702,
2129  -114, 362, 428, 89, 480, 89, 215, 205, 362, 457,
2130  630, 427, 203, 222, -637, 632, 215, 236, 634, 423,
2131  282, 636, 488, 222, 488, 89, 222, 816, 976, 750,
2132  -638, 702, 424, 78, 859, 78, 488, 646, 531, 695,
2133  -640, -105, 648, 966, -639, 531, 531, 78, 78, 425,
2134  429, 531, 531, 367, -114, 473, 962, 429, 849, -638,
2135  222, 970, 471, 970, 234, 319, -641, 695, 970, -640,
2136  970, 236, 283, -639, 488, 445, 237, 490, 491, 490,
2137  491, 433, 848, 575, 78, 78, -747, 850, 858, 493,
2138  237, 490, 491, 825, 831, -641, 837, -729, 837, 78,
2139  680, 89, 215, 431, 283, 89, 537, 970, 762, 222,
2140  765, -630, 453, 537, 537, 1161, 338, 339, 676, 537,
2141  537, -633, 78, 78, 606, 1173, 78, 493, 1196, 490,
2142  491, 78, 618, 203, 488, 237, 230, 695, 427, -630,
2143  -630, 772, -105, 233, -310, 774, 1190, 695, 361, 89,
2144  -633, 222, 89, 607, 826, 869, -747, 869, 367, 237,
2145  827, 522, -105, 349, 350, -105, -642, -630, -630, -105,
2146  531, 1156, -310, -310, -643, 595, 362, 483, 703, 596,
2147  914, 576, -301, 901, 711, 333, 715, 494, 903, 490,
2148  491, 695, 904, 595, -642, -642, 463, 875, -83, 361,
2149  695, 881, -643, -643, 643, 469, -644, 475, 1114, 478,
2150  -301, -301, 900, 482, -729, 502, -630, 514, -645, -729,
2151  528, -310, 972, 589, -733, 484, 333, 362, 590, 832,
2152  827, 966, 503, -112, 598, 1135, 282, 593, 537, 966,
2153  78, 966, 488, -642, 962, -113, 576, 633, 962, 631,
2154  89, -643, 962, -103, 962, 89, 222, 1011, 635, -301,
2155  640, 78, 641, 78, 78, -104, 1016, 78, -98, 78,
2156  650, 89, 415, 78, 576, 78, 591, 361, 89, 971,
2157  459, 1046, 673, 354, 355, 356, 357, 358, 78, 89,
2158  78, 670, 89, 888, 889, 660, -283, 490, 491, -120,
2159  282, 576, 449, 678, 695, 362, 409, -119, 679, 1089,
2160  682, 854, 450, 451, 683, 1075, 1162, 1163, 842, -111,
2161  1006, 846, 684, 704, 89, 709, 863, -110, 1033, 716,
2162  1033, 1033, 1081, 89, 719, 853, 764, 766, 768, 697,
2163  78, 78, 78, 78, 78, 78, 78, 78, -284, 361,
2164  809, -311, 1033, 1033, 1033, 827, 815, 78, 855, 78,
2165  862, 966, 78, 966, 866, 1090, -115, 1092, 966, -285,
2166  966, 971, -730, 100, 962, 100, 962, 362, 600, -311,
2167  -311, 962, 884, 962, 1057, 693, -106, 100, 100, 885,
2168  695, 282, 887, 699, 898, 78, 881, 78, -286, 831,
2169  990, 78, 78, 78, 837, 1126, 781, 966, 576, 488,
2170  496, -736, 1027, 1028, -633, 695, 695, 78, 576, 1031,
2171  962, 361, 1041, 1036, 100, 100, 601, 699, -311, 1044,
2172  1039, 1042, 89, 1052, 89, 905, 1053, 1054, 906, 100,
2173  1086, 908, -633, -633, 488, 78, 78, 1058, 912, 362,
2174  686, 915, 1062, -736, 1064, 1074, 614, 616, 693, 699,
2175  78, 971, 100, 100, 490, 491, 100, 998, 1077, 89,
2176  1066, 100, 89, 614, 616, 1128, 445, 826, 707, 1182,
2177  837, -736, -736, 361, 575, 1104, 367, 367, 361, -730,
2178  1106, -633, 961, 1127, -730, 1132, 78, 665, 687, 490,
2179  491, 644, 1033, 215, 576, 698, 1025, 1026, 921, 816,
2180  222, 362, 1087, 1017, 1144, 78, 362, 1133, 1149, 1169,
2181  1204, 1205, 1171, 1033, 1035, 1174, 1176, 922, -736, 1183,
2182  -736, 1180, -117, -732, 1184, 488, -114, 1186, 916, 1191,
2183  917, 918, 919, 920, 921, 89, 89, 1193, 1199, 1067,
2184  1045, 1200, -108, 1207, 1197, 455, -105, 1208, 926, 927,
2185  1088, 1214, -732, 922, 800, 601, 119, -733, 119, 695,
2186  310, 311, 312, 313, 314, 1082, 1083, 1225, 801, 1230,
2187  100, 645, 333, 928, 222, 222, 647, 924, 493, 1237,
2188  490, 491, 377, 1150, 926, 927, 394, 1105, 360, 346,
2189  347, 100, 739, 100, 100, 829, 1102, 100, 1160, 100,
2190  1167, 957, 78, 100, 78, 100, 1219, 119, 119, 928,
2191  870, 285, 78, 991, 860, 837, 1241, 672, 100, 518,
2192  100, 993, 78, 1096, 78, 78, 351, 352, 353, 354,
2193  355, 356, 357, 358, 1151, 1152, 1159, 285, 992, 1040,
2194  916, 1043, 917, 918, 919, 920, 89, 1153, 800, 800,
2195  382, 392, 392, 392, 1091, 1116, 413, 406, 1120, 78,
2196  666, 1047, 801, 801, 932, 1063, 1065, 1165, 1130, 1112,
2197  100, 100, 100, 100, 100, 100, 100, 100, 1136, 333,
2198  1139, 1134, 1110, 757, 758, 1076, 759, 100, 0, 100,
2199  0, 0, 100, 46, 47, 0, 346, 347, 0, 0,
2200  78, 0, 0, 0, 78, 78, 0, 0, 78, 0,
2201  0, 1179, 78, 78, 41, 42, 43, 44, 78, 78,
2202  0, 0, 0, 811, 813, 100, 0, 100, 0, 818,
2203  820, 100, 100, 100, 0, 353, 354, 355, 356, 357,
2204  358, 0, 800, 800, 0, 0, 0, 100, 78, 0,
2205  78, 78, 800, 800, 800, 0, 801, 801, 800, 800,
2206  0, 0, 0, 119, 0, 0, 801, 801, 801, 0,
2207  0, 1213, 801, 801, 0, 100, 100, 811, 813, 0,
2208  818, 820, 0, 0, 0, 1209, 0, 1211, 0, 0,
2209  100, 0, 1212, 0, 0, 0, 119, 0, 119, 0,
2210  1215, 0, 1217, 0, 1170, 1172, 0, 0, 0, 1218,
2211  1175, 119, 1177, 119, 1178, 0, 802, 916, 0, 917,
2212  918, 919, 920, 921, 0, 0, 100, 1185, 1187, 0,
2213  0, 0, 0, 1192, 285, 1194, 1195, 78, 0, 0,
2214  0, 1235, 922, 800, 0, 100, 1236, 0, 897, 78,
2215  0, 800, 0, 0, 78, 78, 1140, 801, 917, 918,
2216  919, 920, 0, 119, 0, 801, 924, 0, 119, 0,
2217  78, 0, 925, 926, 927, 0, 0, 78, 800, 0,
2218  0, 0, 119, 285, 0, 0, 0, 0, 78, 0,
2219  0, 78, 801, 897, 122, 576, 122, 0, 928, 0,
2220  0, 929, 0, 1224, 1226, 1227, 1228, 0, 0, 0,
2221  802, 802, 1229, 1231, 1232, 1233, 0, 0, 237, 0,
2222  119, 333, 0, 78, 119, 0, 119, 0, 0, 1238,
2223  0, 0, 78, 1239, 800, 0, 0, 0, 346, 347,
2224  0, 0, 100, 0, 100, 122, 122, 0, 801, 286,
2225  0, 916, 100, 917, 918, 919, 920, 921, 0, 0,
2226  0, 0, 100, 0, 100, 100, 0, 0, 0, 916,
2227  0, 917, 918, 919, 920, 286, 922, 273, 354, 355,
2228  356, 357, 358, 0, 0, 0, 0, 0, 383, 393,
2229  393, 0, 916, 0, 917, 918, 919, 920, 0, 100,
2230  924, 0, 0, 0, 802, 802, 925, 926, 927, 800,
2231  0, 0, 0, 800, 802, 802, 802, 0, 1018, 119,
2232  802, 802, 0, 801, 1019, 0, 0, 801, 0, 800,
2233  0, 78, 928, 78, 0, 929, 285, 0, 0, 0,
2234  100, 1018, 0, 801, 100, 100, 0, 953, 100, 0,
2235  0, 0, 100, 100, 0, 0, 0, 0, 100, 100,
2236  0, 0, 0, 0, 800, 800, 0, 0, 78, 0,
2237  0, 78, 0, 0, 0, 0, 0, 0, 801, 801,
2238  285, 0, 0, 0, 0, 0, 0, 0, 100, 0,
2239  100, 100, 0, 0, 0, 0, 0, 0, 0, 0,
2240  0, 122, 0, 0, 0, 802, 0, 0, 0, 78,
2241  0, 0, 0, 802, 0, 0, 0, 0, 916, 0,
2242  917, 918, 919, 920, 921, 0, 0, 0, 417, 0,
2243  0, 419, 420, 421, 122, 119, 122, 119, 0, 0,
2244  802, 0, 0, 922, 78, 78, 0, 0, 0, 122,
2245  0, 122, 0, 0, 0, 0, 0, 119, 0, 0,
2246  0, 0, 0, 0, 0, 0, 0, 924, 0, 0,
2247  0, 0, 286, 925, 926, 927, 0, 100, 0, 803,
2248  0, 0, 0, 78, 78, 0, 0, 0, 0, 100,
2249  0, 0, 0, 0, 100, 100, 802, 0, 0, 928,
2250  0, 122, 929, 0, 285, 0, 122, 0, 0, 0,
2251  100, 0, 0, 0, 0, 0, 0, 100, 0, 0,
2252  122, 286, 0, 538, 0, 0, 0, 0, 100, 0,
2253  0, 100, 0, 119, 0, 0, 285, 119, 0, 0,
2254  0, 0, 0, 808, 0, 0, 0, 521, 0, 0,
2255  0, 0, 534, 0, 0, 78, 0, 0, 122, 0,
2256  0, 0, 122, 100, 122, 0, 0, 0, 0, 0,
2257  0, 802, 100, 803, 803, 802, 0, 0, 0, 0,
2258  0, 119, 0, 0, 119, 0, 0, 0, 0, 0,
2259  0, 802, 0, 0, 0, 0, 0, 0, 0, 0,
2260  0, 0, 0, 0, 0, 0, 538, 538, 0, 916,
2261  0, 917, 918, 919, 920, 921, 0, 0, 0, 0,
2262  0, 0, 0, 0, 0, 0, 802, 802, 0, 0,
2263  0, 0, 0, 0, 922, 0, 0, 808, 808, 0,
2264  0, 0, 0, 0, 0, 619, 621, 0, 923, 0,
2265  0, 0, 0, 0, 273, 0, 0, 122, 924, 0,
2266  0, 0, 0, 0, 925, 926, 927, 803, 803, 0,
2267  0, 100, 0, 100, 286, 0, 0, 803, 803, 803,
2268  0, 0, 119, 803, 803, 0, 0, 119, 0, 0,
2269  928, 621, 0, 929, 273, 0, 0, 0, 0, 0,
2270  0, 0, 118, 119, 118, 0, 0, 0, 100, 0,
2271  119, 100, 0, 0, 0, 0, 0, 0, 286, 0,
2272  0, 119, 0, 0, 119, 0, 0, 0, 0, 0,
2273  0, 808, 808, 0, 0, 0, 0, 0, 0, 0,
2274  677, 808, 808, 808, 0, 0, 0, 808, 808, 100,
2275  0, 0, 1008, 118, 118, 0, 119, 284, 0, 0,
2276  0, 0, 0, 804, 0, 119, 0, 0, 803, 0,
2277  0, 0, 0, 122, 0, 122, 803, 0, 0, 0,
2278  0, 0, 0, 284, 100, 100, 0, 0, 0, 0,
2279  0, 0, 0, 0, 0, 122, 381, 391, 391, 391,
2280  0, 0, 0, 803, 0, 0, 0, 0, 0, 0,
2281  0, 0, 0, 0, 0, 0, 392, 805, 0, 0,
2282  0, 0, 0, 100, 100, 0, 0, 0, 0, 0,
2283  0, 0, 808, 0, 0, 0, 0, 0, 0, 742,
2284  808, 743, 286, 0, 0, 0, 0, 0, 0, 0,
2285  0, 761, 0, 0, 621, 0, 273, 804, 804, 803,
2286  0, 0, 0, 0, 119, 0, 119, 808, 0, 0,
2287  0, 122, 0, 0, 286, 122, 538, 0, 0, 0,
2288  0, 0, 0, 538, 538, 0, 0, 0, 0, 538,
2289  538, 0, 0, 0, 85, 100, 85, 0, 0, 771,
2290  0, 119, 0, 0, 119, 0, 0, 392, 0, 118,
2291  0, 805, 805, 0, 0, 0, 0, 0, 121, 122,
2292  121, 0, 122, 808, 0, 0, 822, 0, 0, 0,
2293  0, 0, 0, 0, 803, 0, 0, 0, 803, 0,
2294  0, 844, 118, 0, 118, 85, 85, 0, 0, 0,
2295  0, 804, 804, 0, 803, 0, 0, 118, 0, 118,
2296  0, 804, 804, 804, 0, 0, 0, 804, 804, 121,
2297  121, 0, 0, 0, 0, 0, 0, 119, 119, 0,
2298  284, 806, 0, 0, 0, 0, 0, 0, 378, 803,
2299  803, 871, 0, 0, 0, 0, 0, 0, 808, 0,
2300  0, 0, 808, 0, 0, 805, 805, 0, 538, 118,
2301  0, 0, 0, 0, 118, 805, 805, 805, 808, 0,
2302  122, 805, 805, 0, 0, 122, 0, 0, 118, 284,
2303  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2304  0, 122, 0, 0, 0, 0, 0, 0, 122, 0,
2305  0, 0, 804, 808, 808, 0, 0, 0, 0, 122,
2306  804, 0, 122, 0, 909, 0, 118, 0, 0, 0,
2307  118, 0, 118, 0, 0, 806, 806, 0, 0, 0,
2308  0, 0, 0, 273, 0, 0, 0, 804, 119, 0,
2309  1009, 0, 0, 0, 122, 0, 0, 0, 0, 0,
2310  0, 85, 0, 122, 0, 0, 805, 0, 0, 0,
2311  0, 0, 0, 807, 805, 0, 0, 0, 0, 0,
2312  0, 0, 0, 0, 0, 121, 0, 0, 0, 0,
2313  0, 1015, 0, 0, 85, 0, 85, 0, 0, 0,
2314  0, 805, 0, 804, 0, 0, 0, 0, 0, 85,
2315  0, 85, 0, 0, 393, 0, 0, 0, 121, 1030,
2316  121, 0, 0, 0, 0, 118, 0, 0, 0, 806,
2317  806, 0, 0, 121, 0, 121, 0, 0, 0, 806,
2318  806, 806, 284, 0, 0, 806, 806, 0, 0, 0,
2319  0, 0, 0, 0, 0, 0, 0, 805, 0, 0,
2320  0, 85, 122, 0, 122, 0, 85, 807, 807, 0,
2321  0, 0, 0, 0, 0, 0, 0, 0, 804, 0,
2322  85, 0, 804, 532, 0, 121, 284, 0, 0, 0,
2323  121, 0, 0, 0, 0, 1098, 0, 0, 804, 122,
2324  0, 0, 122, 0, 121, 393, 0, 121, 1107, 0,
2325  0, 0, 0, 0, 0, 0, 0, 0, 85, 0,
2326  0, 0, 85, 0, 85, 0, 0, 0, 0, 0,
2327  806, 0, 805, 804, 804, 0, 805, 0, 806, 0,
2328  0, 118, 121, 118, 0, 0, 121, 0, 121, 0,
2329  0, 0, 805, 0, 0, 0, 0, 0, 0, 0,
2330  0, 807, 807, 118, 0, 806, 532, 532, 0, 0,
2331  0, 807, 807, 807, 0, 122, 122, 807, 807, 0,
2332  0, 0, 0, 0, 0, 0, 0, 805, 805, 0,
2333  121, 121, 0, 0, 0, 0, 0, 0, 0, 0,
2334  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2335  284, 0, 0, 0, 0, 0, 0, 85, 0, 332,
2336  0, 806, 0, -759, 0, 0, 0, 0, 0, 0,
2337  0, -759, -759, -759, 0, 0, -759, -759, -759, 118,
2338  -759, 121, 284, 118, 0, 0, 0, 0, -759, -759,
2339  -759, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2340  -759, -759, 807, -759, -759, -759, -759, -759, 0, 0,
2341  807, 333, 334, 335, 336, 337, 338, 339, 340, 341,
2342  342, 343, 344, 345, 0, 0, 122, 118, 346, 347,
2343  118, -759, 0, 0, 0, 0, 806, 807, 0, 0,
2344  806, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2345  0, 0, 0, 0, 0, 0, 806, 0, 0, -759,
2346  -759, 348, 0, 349, 350, 351, 352, 353, 354, 355,
2347  356, 357, 358, 85, 0, 85, 0, 0, 0, 0,
2348  0, 0, 0, -759, 0, 0, 0, 0, 0, 0,
2349  0, 806, 806, 807, 0, 85, 0, 121, 0, 121,
2350  0, 0, 0, 0, 0, 0, -759, -759, 0, 0,
2351  0, 233, -759, 0, -759, 0, -759, 0, 0, 121,
2352  0, 0, 0, 0, 0, 0, 0, 0, 118, 0,
2353  0, 0, 0, 118, 0, 0, 0, 0, 0, 0,
2354  0, 0, 0, 0, 0, 0, 0, 0, 0, 118,
2355  0, 0, 0, 0, 0, 0, 118, 0, 0, 0,
2356  0, 0, 0, 0, 0, 0, 0, 118, 807, 0,
2357  118, 85, 807, 0, 0, 85, 532, 0, 0, 0,
2358  0, 0, 0, 532, 532, 0, 0, 0, 807, 532,
2359  532, 0, 0, 0, 0, 121, 0, 0, 1007, 121,
2360  121, 0, 118, 0, 0, 0, 0, 121, 121, 0,
2361  0, 118, 0, 121, 121, 0, 0, 0, 0, 85,
2362  0, 0, 85, 807, 807, 0, 0, 0, 0, 0,
2363  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2364  0, 0, 0, 121, 0, 0, 121, 0, 0, 0,
2365  217, 217, 0, 0, 0, 0, 0, 0, 0, 0,
2366  0, 0, 391, 0, 0, 0, 0, 0, 0, 0,
2367  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2368  0, 0, 250, 253, 254, 255, 0, 0, 0, 217,
2369  217, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2370  0, 0, 303, 304, 0, 0, 0, 0, 532, 0,
2371  118, 0, 118, 0, 0, 0, 0, 0, 0, 0,
2372  85, 0, 0, 0, 0, 85, 0, 0, 0, 0,
2373  0, 0, 121, 0, 217, 0, 0, 0, 0, 0,
2374  0, 85, 0, 0, 121, 0, 0, 118, 85, 121,
2375  118, 0, 0, 391, 0, 0, 0, 0, 0, 85,
2376  0, 0, 85, 0, 0, 121, 0, 0, 0, 0,
2377  0, 0, 121, 0, 0, 0, 0, 0, 0, 0,
2378  0, 0, 0, 121, 0, 0, 121, 0, 0, 0,
2379  1005, 0, 0, 0, 85, 0, 0, 0, 0, 0,
2380  0, 0, 0, 85, 23, 24, 25, 26, 0, 0,
2381  0, 0, 0, 0, 0, 0, 0, 0, 121, 0,
2382  32, 33, 34, 118, 118, 0, 0, 121, 0, 0,
2383  41, 42, 43, 44, 45, 0, 0, 0, 0, 0,
2384  0, 217, 0, 0, 217, 217, 217, 0, 303, 0,
2385  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2386  0, 0, 0, 0, 217, 0, 217, 217, 0, 0,
2387  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2388  0, 789, 59, 60, 61, 62, 63, 64, 65, 66,
2389  0, 333, 334, 335, 336, 337, 338, 339, 340, 0,
2390  342, 343, 85, 0, 85, 0, 0, 0, 346, 347,
2391  279, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2392  0, 0, 0, 0, 0, 0, 121, 0, 121, 0,
2393  0, 0, 0, 0, 118, 0, 0, 0, 0, 85,
2394  0, 0, 85, 349, 350, 351, 352, 353, 354, 355,
2395  356, 357, 358, 0, 0, 0, 0, 0, 0, 0,
2396  217, 0, 0, 121, 0, 533, 121, 540, 541, 542,
2397  543, 544, 0, 0, 545, 546, 547, 548, 549, 550,
2398  551, 552, 553, 0, 0, 554, 555, 556, 557, 558,
2399  559, 560, 561, 562, 563, 0, 0, 0, 217, 0,
2400  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2401  0, 0, 0, 0, 0, 85, 85, 0, 0, 0,
2402  0, 0, 0, 0, 333, 334, 335, 336, 337, 338,
2403  339, 340, 341, 342, 343, 344, 345, 0, 0, 121,
2404  121, 346, 347, 0, 0, 0, 0, 0, 613, 613,
2405  0, 0, 0, 0, 0, 0, 0, 613, 217, 217,
2406  0, 0, 0, 217, 0, 613, 613, 217, 0, 0,
2407  0, 0, 0, 255, 348, 0, 349, 350, 351, 352,
2408  353, 354, 355, 356, 357, 358, 0, 0, 639, 0,
2409  0, 0, 0, 613, 0, 0, 0, 0, 0, 0,
2410  237, 0, 0, 0, 217, 0, 0, 217, 0, 0,
2411  0, 0, 0, 0, 0, 0, 0, 0, 217, 0,
2412  0, 0, 0, 0, 0, 0, 85, 0, 0, 0,
2413  0, 0, 0, 0, 0, 0, 669, 333, 334, 335,
2414  336, 337, 338, 339, 340, 341, 342, 343, -760, -760,
2415  121, 0, 0, 217, 346, 347, 0, 0, 0, 0,
2416  0, 0, -736, 0, 0, 0, 0, 0, 0, 0,
2417  -736, -736, -736, 0, 0, 0, -736, -736, 0, -736,
2418  0, 0, 0, 0, 0, 0, 0, -736, -736, 349,
2419  350, 351, 352, 353, 354, 355, 356, 357, 358, -736,
2420  -736, 0, -736, -736, -736, -736, -736, 0, 0, 0,
2421  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2422  0, 0, 0, 0, 0, 217, 0, 0, 0, 0,
2423  -736, 0, 0, 0, 0, 217, 0, 0, 0, -736,
2424  -736, -736, -736, -736, -736, -736, -736, -736, -736, -736,
2425  -736, -736, 217, 0, 217, 0, -736, -736, -736, -736,
2426  0, 691, 0, 0, 0, 0, 0, 217, 0, 217,
2427  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2428  0, 0, -736, 0, 0, 0, 0, 0, -116, -736,
2429  0, -736, -736, -736, -736, -736, -736, -736, -736, -736,
2430  -736, 0, 0, 0, 0, -736, -736, -736, -107, 0,
2431  0, -736, 217, -736, 0, -736, 0, 0, 613, 775,
2432  0, 217, 0, 0, 0, 613, 613, 0, 0, 0,
2433  0, 613, 613, 0, 23, 24, 25, 26, 0, 217,
2434  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2435  32, 33, 34, 781, 217, 0, 0, 782, 0, 981,
2436  41, 42, 43, 44, 45, 0, 0, 0, 0, 0,
2437  0, 0, 0, 0, 0, 0, 0, 0, 922, 613,
2438  613, 0, 613, 613, 0, 0, 0, 0, 0, 0,
2439  0, 783, 784, 0, 0, 0, 0, 0, 0, 785,
2440  0, 0, 786, 0, 217, 787, 788, 0, 975, 926,
2441  0, 789, 59, 999, 61, 62, 63, 64, 65, 66,
2442  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2443  0, 0, 0, 790, 0, 0, 0, 0, 0, 0,
2444  279, 0, 0, 895, 0, 0, 0, 0, 0, 0,
2445  613, 0, -759, 4, 0, 5, 6, 7, 8, 9,
2446  0, 0, 0, 10, 11, 0, 0, 0, 12, 0,
2447  13, 14, 15, 16, 17, 18, 19, 217, 0, 0,
2448  0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
2449  0, 27, 0, 0, 0, 613, 217, 28, 29, 30,
2450  31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2451  0, 41, 42, 43, 44, 45, 46, 47, 0, 0,
2452  0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
2453  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2454  0, 0, 50, 51, 217, 0, 0, 0, 0, 0,
2455  52, 0, 0, 53, 54, 0, 55, 56, 0, 57,
2456  0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
2457  66, 0, 217, 0, 0, 0, 0, 0, 0, 0,
2458  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2459  0, 67, 68, 69, 0, 0, 0, 0, -736, 0,
2460  0, 0, 0, -759, 0, -759, -736, -736, -736, 0,
2461  0, -736, -736, -736, 0, -736, 0, 0, 0, 0,
2462  0, 0, 0, -736, -736, -736, -736, -736, 0, 0,
2463  0, 0, 0, 0, 0, -736, -736, 0, -736, -736,
2464  -736, -736, -736, 0, 0, 0, 0, 0, 217, 0,
2465  0, 0, 0, 333, -760, -760, -760, -760, 338, 339,
2466  0, 217, -760, -760, 0, 0, -736, 0, 0, 0,
2467  346, 347, 0, 0, 0, -736, -736, -736, -736, -736,
2468  -736, -736, -736, -736, -736, -736, -736, -736, 0, 0,
2469  0, 0, -736, -736, -736, -736, 0, 745, -736, 0,
2470  0, 0, 0, 0, -736, 349, 350, 351, 352, 353,
2471  354, 355, 356, 357, 358, 0, 0, 0, -736, 0,
2472  0, -736, 217, 0, -116, -736, -736, -736, -736, -736,
2473  -736, -736, -736, -736, -736, -736, -736, 0, 0, 0,
2474  0, -736, -736, -736, -736, -630, 0, -736, -736, -736,
2475  0, -736, 0, -630, -630, -630, 0, 0, -630, -630,
2476  -630, 0, -630, 0, 0, 0, 0, 685, 0, 0,
2477  -630, 0, -630, -630, -630, 0, 0, 0, 0, 0,
2478  0, 0, -630, -630, 0, -630, -630, -630, -630, -630,
2479  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2480  333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
2481  343, 344, 345, -630, 0, 0, 0, 346, 347, 0,
2482  0, 0, -630, -630, -630, -630, -630, -630, -630, -630,
2483  -630, -630, -630, -630, -630, 0, 0, 0, 0, -630,
2484  -630, -630, -630, 0, -630, -630, 0, 0, 0, 0,
2485  348, -630, 349, 350, 351, 352, 353, 354, 355, 356,
2486  357, 358, 0, 0, 0, -630, 0, 0, -630, -257,
2487  0, -630, -630, -630, -630, -630, -630, -630, -630, -630,
2488  -630, -630, -630, -630, 0, 0, 0, 0, 0, -630,
2489  -630, -630, -633, 0, -630, -630, -630, 0, -630, 0,
2490  -633, -633, -633, 0, 0, -633, -633, -633, 0, -633,
2491  0, 0, 0, 0, 685, 0, 0, -633, 0, -633,
2492  -633, -633, 0, 0, 0, 0, 0, 0, 0, -633,
2493  -633, 0, -633, -633, -633, -633, -633, 0, 0, 0,
2494  0, 0, 0, 0, 0, 0, 0, 333, 334, 335,
2495  336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
2496  -633, 0, 0, 0, 346, 347, 0, 0, 0, -633,
2497  -633, -633, -633, -633, -633, -633, -633, -633, -633, -633,
2498  -633, -633, 0, 0, 0, 0, -633, -633, -633, -633,
2499  0, -633, -633, 0, 0, 0, 0, 348, -633, 349,
2500  350, 351, 352, 353, 354, 355, 356, 357, 358, 0,
2501  0, 0, -633, 0, 0, -633, 0, 0, -633, -633,
2502  -633, -633, -633, -633, -633, -633, -633, -633, -633, -633,
2503  -633, 0, 0, 0, 0, 0, -633, -633, -633, -737,
2504  0, -633, -633, -633, 0, -633, 0, -737, -737, -737,
2505  0, 0, -737, -737, -737, 0, -737, 0, 0, 0,
2506  0, 0, 0, 0, -737, -737, -737, -737, -737, 0,
2507  0, 0, 0, 0, 0, 0, -737, -737, 0, -737,
2508  -737, -737, -737, -737, 0, 0, 0, 0, 0, 0,
2509  0, 0, 0, 0, 333, 334, 335, 336, 337, 338,
2510  339, 340, 341, 342, 343, 344, 345, -737, 0, 0,
2511  0, 346, 347, 0, 0, 0, -737, -737, -737, -737,
2512  -737, -737, -737, -737, -737, -737, -737, -737, -737, 0,
2513  0, 0, 0, -737, -737, -737, -737, 0, 0, -737,
2514  0, 0, 0, 0, 348, -737, 349, 350, 351, 352,
2515  353, 354, 355, 356, 357, 358, 0, 0, 0, -737,
2516  0, 0, -737, 0, 0, 0, -737, -737, -737, -737,
2517  -737, -737, -737, -737, -737, -737, -737, -737, 0, 0,
2518  0, 0, -737, -737, -737, -737, -738, 0, -737, -737,
2519  -737, 0, -737, 0, -738, -738, -738, 0, 0, -738,
2520  -738, -738, 0, -738, 0, 0, 0, 0, 0, 0,
2521  0, -738, -738, -738, -738, -738, 0, 0, 0, 0,
2522  0, 0, 0, -738, -738, 0, -738, -738, -738, -738,
2523  -738, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2524  0, 333, 334, 335, 336, 337, 338, 339, 0, 0,
2525  342, 343, 0, 0, -738, 0, 0, 0, 346, 347,
2526  0, 0, 0, -738, -738, -738, -738, -738, -738, -738,
2527  -738, -738, -738, -738, -738, -738, 0, 0, 0, 0,
2528  -738, -738, -738, -738, 0, 0, -738, 0, 0, 0,
2529  0, 0, -738, 349, 350, 351, 352, 353, 354, 355,
2530  356, 357, 358, 0, 0, 0, -738, 0, 0, -738,
2531  0, 0, 0, -738, -738, -738, -738, -738, -738, -738,
2532  -738, -738, -738, -738, -738, 0, 0, 0, 0, -738,
2533  -738, -738, -738, -310, 0, -738, -738, -738, 0, -738,
2534  0, -310, -310, -310, 0, 0, -310, -310, -310, 0,
2535  -310, 0, 0, 0, 0, 0, 0, 0, -310, 0,
2536  -310, -310, -310, 0, 0, 0, 0, 0, 0, 0,
2537  -310, -310, 0, -310, -310, -310, -310, -310, 0, 0,
2538  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2539  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2540  0, -310, 0, 0, 0, 0, 0, 0, 0, 0,
2541  -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
2542  -310, -310, -310, 0, 0, 0, 0, -310, -310, -310,
2543  -310, 0, 746, -310, 0, 0, 0, 0, 0, -310,
2544  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2545  0, 0, 0, -310, 0, 0, -310, 0, 0, -118,
2546  -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
2547  -310, -310, 0, 0, 0, 0, 0, -310, -310, -310,
2548  -449, 0, -310, -310, -310, 0, -310, 0, -449, -449,
2549  -449, 0, 0, -449, -449, -449, 0, -449, 0, 0,
2550  0, 0, 0, 0, 0, -449, -449, -449, -449, 0,
2551  0, 0, 0, 0, 0, 0, 0, -449, -449, 0,
2552  -449, -449, -449, -449, -449, 0, 0, 0, 0, 0,
2553  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2554  0, 0, 0, 0, 0, 0, 0, 0, -449, 0,
2555  0, 0, 0, 0, 0, 0, 0, -449, -449, -449,
2556  -449, -449, -449, -449, -449, -449, -449, -449, -449, -449,
2557  0, 0, 0, 0, -449, -449, -449, -449, 0, 0,
2558  -449, 0, 0, 0, 0, 0, -449, 0, 0, 0,
2559  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2560  -449, 0, 0, 0, 0, 0, 0, -449, 0, -449,
2561  -449, -449, -449, -449, -449, -449, -449, -449, -449, 0,
2562  0, 0, 0, -449, -449, -449, -449, -302, 233, -449,
2563  -449, -449, 0, -449, 0, -302, -302, -302, 0, 0,
2564  -302, -302, -302, 0, -302, 0, 0, 0, 0, 0,
2565  0, 0, -302, 0, -302, -302, -302, 0, 0, 0,
2566  0, 0, 0, 0, -302, -302, 0, -302, -302, -302,
2567  -302, -302, 0, 0, 0, 0, 0, 0, 0, 0,
2568  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2569  0, 0, 0, 0, 0, -302, 0, 0, 0, 0,
2570  0, 0, 0, 0, -302, -302, -302, -302, -302, -302,
2571  -302, -302, -302, -302, -302, -302, -302, 0, 0, 0,
2572  0, -302, -302, -302, -302, 0, 0, -302, 0, 0,
2573  0, 0, 0, -302, 0, 0, 0, 0, 0, 0,
2574  0, 0, 0, 0, 0, 0, 0, -302, 0, 0,
2575  -302, 0, 0, 0, -302, -302, -302, -302, -302, -302,
2576  -302, -302, -302, -302, -302, -302, 0, 0, 0, 0,
2577  0, -302, -302, -302, -759, 0, -302, -302, -302, 0,
2578  -302, 0, -759, -759, -759, 0, 0, -759, -759, -759,
2579  0, -759, 0, 0, 0, 0, 0, 0, 0, -759,
2580  -759, -759, -759, 0, 0, 0, 0, 0, 0, 0,
2581  0, -759, -759, 0, -759, -759, -759, -759, -759, 0,
2582  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2583  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2584  0, 0, -759, 0, 0, 0, 0, 0, 0, 0,
2585  0, -759, -759, -759, -759, -759, -759, -759, -759, -759,
2586  -759, -759, -759, -759, 0, 0, 0, 0, -759, -759,
2587  -759, -759, 0, 0, -759, 0, 0, 0, 0, 0,
2588  -759, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2589  0, 0, 0, 0, -759, 0, 0, 0, 0, 0,
2590  0, -759, 0, -759, -759, -759, -759, -759, -759, -759,
2591  -759, -759, -759, 0, 0, 0, 0, -759, -759, -759,
2592  -759, -317, 233, -759, -759, -759, 0, -759, 0, -317,
2593  -317, -317, 0, 0, -317, -317, -317, 0, -317, 0,
2594  0, 0, 0, 0, 0, 0, -317, 0, -317, -317,
2595  0, 0, 0, 0, 0, 0, 0, 0, -317, -317,
2596  0, -317, -317, -317, -317, -317, 0, 0, 0, 0,
2597  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2598  0, 0, 0, 0, 0, 0, 0, 0, 0, -317,
2599  0, 0, 0, 0, 0, 0, 0, 0, -317, -317,
2600  -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
2601  -317, 0, 0, 0, 0, -317, -317, -317, -317, 0,
2602  0, -317, 0, 0, 0, 0, 0, -317, 0, 0,
2603  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2604  0, -317, 0, 0, 0, 0, 0, 0, -317, 0,
2605  -317, -317, -317, -317, -317, -317, -317, -317, -317, -317,
2606  0, 0, 0, 0, 0, -317, -317, -317, -736, 230,
2607  -317, -317, -317, 0, -317, 0, -736, -736, -736, 0,
2608  0, 0, -736, -736, 0, -736, 0, 0, 0, 0,
2609  0, 0, 0, -736, -736, 0, 0, 0, 0, 0,
2610  0, 0, 0, 0, 0, -736, -736, 0, -736, -736,
2611  -736, -736, -736, 0, 0, 0, 0, 0, 0, 0,
2612  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2613  0, 0, 0, 0, 0, 0, -736, 0, 0, 0,
2614  0, 0, 0, 0, 0, -736, -736, -736, -736, -736,
2615  -736, -736, -736, -736, -736, -736, -736, -736, 0, 0,
2616  0, 0, -736, -736, -736, -736, 0, 691, 0, 0,
2617  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2618  0, 0, 0, 0, 0, 0, 0, 0, -736, 0,
2619  0, 0, 0, 0, -116, -736, 0, -736, -736, -736,
2620  -736, -736, -736, -736, -736, -736, -736, 0, 0, 0,
2621  0, -736, -736, -736, -736, -310, 0, -736, 0, -736,
2622  0, -736, 0, -310, -310, -310, 0, 0, 0, -310,
2623  -310, 0, -310, 0, 0, 0, 0, 0, 0, 0,
2624  -310, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2625  0, 0, -310, -310, 0, -310, -310, -310, -310, -310,
2626  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2627  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2628  0, 0, 0, -310, 0, 0, 0, 0, 0, 0,
2629  0, 0, -310, -310, -310, -310, -310, -310, -310, -310,
2630  -310, -310, -310, -310, -310, 0, 0, 0, 0, -310,
2631  -310, -310, -310, 0, 692, 0, 0, 0, 0, 0,
2632  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2633  0, 0, 0, 0, 0, -310, 0, 0, 0, 0,
2634  0, -118, -310, 0, -310, -310, -310, -310, -310, -310,
2635  -310, -310, -310, -310, 0, 0, 0, 0, 0, -310,
2636  -310, -109, -310, 0, -310, 0, -310, 0, -310, 0,
2637  -310, -310, -310, 0, 0, 0, -310, -310, 0, -310,
2638  0, 0, 0, 0, 0, 0, 0, -310, 0, 0,
2639  0, 0, 0, 0, 0, 0, 0, 0, 0, -310,
2640  -310, 0, -310, -310, -310, -310, -310, 0, 0, 0,
2641  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2642  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2643  -310, 0, 0, 0, 0, 0, 0, 0, 0, -310,
2644  -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
2645  -310, -310, 0, 0, 0, 0, -310, -310, -310, -310,
2646  0, 692, 0, 0, 0, 0, 0, 0, 0, 0,
2647  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2648  0, 0, -310, 0, 0, 0, 0, 0, -118, -310,
2649  0, -310, -310, -310, -310, -310, -310, -310, -310, -310,
2650  -310, 0, 0, 0, 0, 0, -310, -310, -310, 0,
2651  0, -310, 0, -310, 257, -310, 5, 6, 7, 8,
2652  9, -759, -759, -759, 10, 11, 0, 0, -759, 12,
2653  0, 13, 14, 15, 16, 17, 18, 19, 0, 0,
2654  0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
2655  0, 0, 27, 0, 0, 0, 0, 0, 28, 29,
2656  258, 31, 32, 33, 34, 35, 36, 37, 38, 39,
2657  40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
2658  0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
2659  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2660  0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
2661  0, 52, 0, 0, 53, 54, 0, 55, 56, 0,
2662  57, 0, 0, 58, 59, 60, 61, 62, 63, 64,
2663  65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
2664  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2665  0, 0, 67, 68, 69, 0, 0, 0, 0, 0,
2666  0, 0, 0, 0, -759, 257, -759, 5, 6, 7,
2667  8, 9, 0, 0, -759, 10, 11, 0, -759, -759,
2668  12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
2669  0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
2670  26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2671  29, 258, 31, 32, 33, 34, 35, 36, 37, 38,
2672  39, 40, 0, 41, 42, 43, 44, 45, 46, 47,
2673  0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
2674  49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2675  0, 0, 0, 0, 50, 51, 0, 0, 0, 0,
2676  0, 0, 52, 0, 0, 53, 54, 0, 55, 56,
2677  0, 57, 0, 0, 58, 59, 60, 61, 62, 63,
2678  64, 65, 66, 0, 0, 0, 0, 0, 0, 0,
2679  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2680  0, 0, 0, 67, 68, 69, 0, 0, 0, 0,
2681  0, 0, 0, 0, 0, -759, 257, -759, 5, 6,
2682  7, 8, 9, 0, 0, -759, 10, 11, 0, 0,
2683  -759, 12, -759, 13, 14, 15, 16, 17, 18, 19,
2684  0, 0, 0, 0, 0, 20, 21, 22, 23, 24,
2685  25, 26, 0, 0, 27, 0, 0, 0, 0, 0,
2686  28, 29, 258, 31, 32, 33, 34, 35, 36, 37,
2687  38, 39, 40, 0, 41, 42, 43, 44, 45, 46,
2688  47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2689  48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
2690  0, 0, 0, 0, 0, 50, 51, 0, 0, 0,
2691  0, 0, 0, 52, 0, 0, 53, 54, 0, 55,
2692  56, 0, 57, 0, 0, 58, 59, 60, 61, 62,
2693  63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
2694  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2695  0, 0, 0, 0, 67, 68, 69, 0, 0, 0,
2696  0, 0, 0, 0, 0, 0, -759, 257, -759, 5,
2697  6, 7, 8, 9, 0, 0, -759, 10, 11, 0,
2698  0, -759, 12, 0, 13, 14, 15, 16, 17, 18,
2699  19, -759, 0, 0, 0, 0, 20, 21, 22, 23,
2700  24, 25, 26, 0, 0, 27, 0, 0, 0, 0,
2701  0, 28, 29, 258, 31, 32, 33, 34, 35, 36,
2702  37, 38, 39, 40, 0, 41, 42, 43, 44, 45,
2703  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
2704  0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
2705  0, 0, 0, 0, 0, 0, 50, 51, 0, 0,
2706  0, 0, 0, 0, 52, 0, 0, 53, 54, 0,
2707  55, 56, 0, 57, 0, 0, 58, 59, 60, 61,
2708  62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
2709  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2710  0, 0, 0, 0, 0, 67, 68, 69, 0, 0,
2711  0, 0, 0, 0, 0, 0, 0, -759, 257, -759,
2712  5, 6, 7, 8, 9, 0, 0, -759, 10, 11,
2713  0, 0, -759, 12, 0, 13, 14, 15, 16, 17,
2714  18, 19, 0, 0, 0, 0, 0, 20, 21, 22,
2715  23, 24, 25, 26, 0, 0, 27, 0, 0, 0,
2716  0, 0, 28, 29, 258, 31, 32, 33, 34, 35,
2717  36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
2718  45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
2719  0, 0, 48, 49, 0, 0, 0, 0, 0, 0,
2720  0, 0, 0, 0, 0, 0, 0, 50, 51, 0,
2721  0, 0, 0, 0, 0, 52, 0, 0, 53, 54,
2722  0, 55, 56, 0, 57, 0, 0, 58, 59, 60,
2723  61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
2724  0, 0, 0, 0, 257, 0, 5, 6, 7, 8,
2725  9, 0, -759, -759, 10, 11, 67, 68, 69, 12,
2726  0, 13, 14, 15, 16, 17, 18, 19, -759, 0,
2727  -759, 0, 0, 20, 21, 22, 23, 24, 25, 26,
2728  0, 0, 27, 0, 0, 0, 0, 0, 28, 29,
2729  258, 31, 32, 33, 34, 35, 36, 37, 38, 39,
2730  40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
2731  0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
2732  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2733  0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
2734  0, 52, 0, 0, 53, 54, 0, 55, 56, 0,
2735  57, 0, 0, 58, 59, 60, 61, 62, 63, 64,
2736  65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
2737  257, 0, 5, 6, 7, 8, 9, 0, 0, 0,
2738  10, 11, 67, 68, 69, 12, 0, 13, 14, 15,
2739  16, 17, 18, 19, -759, 0, -759, 0, 0, 20,
2740  21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
2741  0, 0, 0, 0, 28, 29, 258, 31, 32, 33,
2742  34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
2743  43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
2744  0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
2745  0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
2746  51, 0, 0, 0, 0, 0, 0, 52, 0, 0,
2747  259, 54, 0, 55, 56, 0, 57, 0, 0, 58,
2748  59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
2749  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2750  0, 0, 0, 0, 0, 0, 0, 0, 67, 68,
2751  69, 0, 0, 0, 0, 0, 0, 0, -759, 0,
2752  -759, 257, -759, 5, 6, 7, 8, 9, 0, 0,
2753  0, 10, 11, 0, 0, 0, 12, 0, 13, 14,
2754  15, 16, 17, 18, 19, 0, 0, 0, 0, 0,
2755  20, 21, 22, 23, 24, 25, 26, 0, 0, 27,
2756  0, 0, 0, 0, 0, 28, 29, 258, 31, 32,
2757  33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
2758  42, 43, 44, 45, 46, 47, 0, 0, 0, 0,
2759  0, 0, 0, 0, 0, 48, 49, 0, 0, 0,
2760  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2761  50, 51, 0, 0, 0, 0, 0, 0, 52, 0,
2762  0, 53, 54, 0, 55, 56, 0, 57, 0, 0,
2763  58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
2764  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2765  0, 0, 0, 0, 0, 0, 0, 0, 0, 67,
2766  68, 69, 0, 0, 0, 0, 0, 0, 0, -759,
2767  0, -759, 4, -759, 5, 6, 7, 8, 9, 0,
2768  0, 0, 10, 11, 0, 0, 0, 12, 0, 13,
2769  14, 15, 16, 17, 18, 19, 0, 0, 0, 0,
2770  0, 20, 21, 22, 23, 24, 25, 26, 0, 0,
2771  27, 0, 0, 0, 0, 0, 28, 29, 30, 31,
2772  32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
2773  41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
2774  0, 0, 0, 0, 0, 0, 48, 49, 0, 0,
2775  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2776  0, 50, 51, 0, 0, 0, 0, 0, 0, 52,
2777  0, 0, 53, 54, 0, 55, 56, 0, 57, 0,
2778  0, 58, 59, 60, 61, 62, 63, 64, 65, 66,
2779  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2780  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2781  67, 68, 69, 0, 0, -759, 0, 0, 0, 0,
2782  0, 0, -759, 257, -759, 5, 6, 7, 8, 9,
2783  0, 0, 0, 10, 11, 0, 0, 0, 12, 0,
2784  13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
2785  0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
2786  0, 27, 0, 0, 0, 0, 0, 28, 29, 258,
2787  31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2788  0, 41, 42, 43, 44, 45, 46, 47, 0, 0,
2789  0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
2790  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2791  0, 0, 50, 51, 0, 0, 0, 0, 0, 0,
2792  52, 0, 0, 53, 54, 0, 55, 56, 0, 57,
2793  0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
2794  66, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2795  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2796  0, 67, 68, 69, 0, 0, -759, 0, 0, 0,
2797  0, 0, 0, -759, 257, -759, 5, 6, 7, 8,
2798  9, 0, 0, -759, 10, 11, 0, 0, 0, 12,
2799  0, 13, 14, 15, 16, 17, 18, 19, 0, 0,
2800  0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
2801  0, 0, 27, 0, 0, 0, 0, 0, 28, 29,
2802  258, 31, 32, 33, 34, 35, 36, 37, 38, 39,
2803  40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
2804  0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
2805  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2806  0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
2807  0, 52, 0, 0, 53, 54, 0, 55, 56, 0,
2808  57, 0, 0, 58, 59, 60, 61, 62, 63, 64,
2809  65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
2810  257, 0, 5, 6, 7, 8, 9, 0, 0, 0,
2811  10, 11, 67, 68, 69, 12, 0, 13, 14, 15,
2812  16, 17, 18, 19, -759, 0, -759, 0, 0, 20,
2813  21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
2814  0, 0, 0, 0, 28, 29, 258, 31, 32, 33,
2815  34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
2816  43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
2817  0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
2818  0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
2819  51, 0, 0, 0, 0, 0, 0, 52, 0, 0,
2820  53, 54, 0, 55, 56, 0, 57, 0, 0, 58,
2821  59, 60, 61, 62, 63, 64, 65, 66, 0, -759,
2822  0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
2823  7, 0, 9, 0, 0, 0, 10, 11, 67, 68,
2824  69, 12, 0, 13, 14, 15, 16, 17, 18, 19,
2825  -759, 0, -759, 0, 0, 20, 21, 22, 23, 24,
2826  25, 26, 0, 0, 206, 0, 0, 0, 0, 0,
2827  0, 29, 0, 0, 32, 33, 34, 35, 36, 37,
2828  38, 39, 40, 207, 41, 42, 43, 44, 45, 46,
2829  47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2830  48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
2831  0, 0, 0, 0, 0, 50, 51, 0, 0, 0,
2832  0, 0, 0, 208, 0, 0, 209, 54, 0, 55,
2833  56, 0, 210, 211, 212, 58, 59, 213, 61, 62,
2834  63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
2835  0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
2836  0, 0, 10, 11, 67, 214, 69, 12, 0, 13,
2837  14, 15, 16, 17, 18, 19, 0, 0, 237, 0,
2838  0, 20, 21, 22, 23, 24, 25, 26, 0, 0,
2839  27, 0, 0, 0, 0, 0, 0, 29, 0, 0,
2840  32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
2841  41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
2842  0, 0, 0, 0, 0, 0, 48, 49, 0, 0,
2843  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2844  0, 50, 51, 0, 0, 0, 0, 0, 0, 208,
2845  0, 0, 209, 54, 0, 55, 56, 0, 0, 0,
2846  0, 58, 59, 60, 61, 62, 63, 64, 65, 66,
2847  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2848  5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
2849  67, 68, 69, 12, 0, 13, 14, 15, 16, 17,
2850  18, 19, 305, 0, 306, 0, 0, 20, 21, 22,
2851  23, 24, 25, 26, 0, 0, 27, 0, 0, 0,
2852  0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
2853  36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
2854  45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
2855  0, 0, 48, 49, 0, 0, 0, 0, 0, 0,
2856  0, 0, 0, 0, 0, 0, 0, 50, 51, 0,
2857  0, 0, 0, 0, 0, 208, 0, 0, 209, 54,
2858  0, 55, 56, 0, 0, 0, 0, 58, 59, 60,
2859  61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
2860  0, 0, 0, 0, 0, 0, 5, 6, 7, 8,
2861  9, 0, 0, 0, 10, 11, 67, 68, 69, 12,
2862  0, 13, 14, 15, 16, 17, 18, 19, 0, 0,
2863  237, 0, 0, 20, 21, 22, 23, 24, 25, 26,
2864  0, 0, 27, 0, 0, 0, 0, 0, 28, 29,
2865  30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
2866  40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
2867  0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
2868  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2869  0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
2870  0, 52, 0, 0, 53, 54, 0, 55, 56, 0,
2871  57, 0, 0, 58, 59, 60, 61, 62, 63, 64,
2872  65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
2873  0, 0, 5, 6, 7, 8, 9, 0, 0, 0,
2874  10, 11, 67, 68, 69, 12, 0, 13, 14, 15,
2875  16, 17, 18, 19, 503, 0, 0, 0, 0, 20,
2876  21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
2877  0, 0, 0, 0, 28, 29, 258, 31, 32, 33,
2878  34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
2879  43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
2880  0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
2881  0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
2882  51, 0, 0, 0, 0, 0, 0, 52, 0, 0,
2883  53, 54, 0, 55, 56, 0, 57, 0, 0, 58,
2884  59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
2885  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2886  0, 0, 0, 0, 0, 0, 0, 0, 67, 68,
2887  69, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2888  503, 126, 127, 128, 129, 130, 131, 132, 133, 134,
2889  135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
2890  145, 146, 147, 148, 149, 0, 0, 0, 150, 151,
2891  152, 395, 396, 397, 398, 157, 158, 159, 0, 0,
2892  0, 0, 0, 160, 161, 162, 163, 399, 400, 401,
2893  402, 168, 37, 38, 403, 40, 0, 0, 0, 0,
2894  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2895  0, 0, 0, 170, 171, 172, 173, 174, 175, 176,
2896  177, 178, 0, 0, 179, 180, 0, 0, 0, 0,
2897  181, 182, 183, 184, 0, 0, 0, 0, 0, 0,
2898  0, 0, 0, 0, 0, 185, 186, 0, 0, 0,
2899  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2900  0, 0, 0, 0, 0, 0, 0, 187, 188, 189,
2901  190, 191, 192, 193, 194, 195, 196, 0, 197, 198,
2902  0, 0, 0, 0, 0, 199, 404, 126, 127, 128,
2903  129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
2904  139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
2905  149, 0, 0, 0, 150, 151, 152, 153, 154, 155,
2906  156, 157, 158, 159, 0, 0, 0, 0, 0, 160,
2907  161, 162, 163, 164, 165, 166, 167, 168, 288, 289,
2908  169, 290, 0, 0, 0, 0, 0, 0, 0, 0,
2909  0, 0, 0, 0, 0, 0, 0, 0, 0, 170,
2910  171, 172, 173, 174, 175, 176, 177, 178, 0, 0,
2911  179, 180, 0, 0, 0, 0, 181, 182, 183, 184,
2912  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2913  0, 185, 186, 0, 0, 0, 0, 0, 0, 0,
2914  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2915  0, 0, 0, 187, 188, 189, 190, 191, 192, 193,
2916  194, 195, 196, 0, 197, 198, 0, 0, 0, 0,
2917  0, 199, 126, 127, 128, 129, 130, 131, 132, 133,
2918  134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
2919  144, 145, 146, 147, 148, 149, 0, 0, 0, 150,
2920  151, 152, 153, 154, 155, 156, 157, 158, 159, 0,
2921  0, 0, 0, 0, 160, 161, 162, 163, 164, 165,
2922  166, 167, 168, 239, 0, 169, 0, 0, 0, 0,
2923  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2924  0, 0, 0, 0, 170, 171, 172, 173, 174, 175,
2925  176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
2926  0, 181, 182, 183, 184, 0, 0, 0, 0, 0,
2927  0, 0, 0, 0, 0, 0, 185, 186, 0, 0,
2928  59, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2929  0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
2930  189, 190, 191, 192, 193, 194, 195, 196, 0, 197,
2931  198, 0, 0, 0, 0, 0, 199, 126, 127, 128,
2932  129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
2933  139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
2934  149, 0, 0, 0, 150, 151, 152, 153, 154, 155,
2935  156, 157, 158, 159, 0, 0, 0, 0, 0, 160,
2936  161, 162, 163, 164, 165, 166, 167, 168, 0, 0,
2937  169, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2938  0, 0, 0, 0, 0, 0, 0, 0, 0, 170,
2939  171, 172, 173, 174, 175, 176, 177, 178, 0, 0,
2940  179, 180, 0, 0, 0, 0, 181, 182, 183, 184,
2941  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2942  0, 185, 186, 0, 0, 59, 0, 0, 0, 0,
2943  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2944  0, 0, 0, 187, 188, 189, 190, 191, 192, 193,
2945  194, 195, 196, 0, 197, 198, 0, 0, 0, 0,
2946  0, 199, 126, 127, 128, 129, 130, 131, 132, 133,
2947  134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
2948  144, 145, 146, 147, 148, 149, 0, 0, 0, 150,
2949  151, 152, 153, 154, 155, 156, 157, 158, 159, 0,
2950  0, 0, 0, 0, 160, 161, 162, 163, 164, 165,
2951  166, 167, 168, 0, 0, 169, 0, 0, 0, 0,
2952  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2953  0, 0, 0, 0, 170, 171, 172, 173, 174, 175,
2954  176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
2955  0, 181, 182, 183, 184, 0, 0, 0, 0, 0,
2956  0, 0, 0, 0, 0, 0, 185, 186, 0, 0,
2957  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2958  0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
2959  189, 190, 191, 192, 193, 194, 195, 196, 0, 197,
2960  198, 5, 6, 7, 0, 9, 199, 0, 0, 10,
2961  11, 0, 0, 0, 12, 0, 13, 14, 15, 245,
2962  246, 18, 19, 0, 0, 0, 0, 0, 20, 247,
2963  248, 23, 24, 25, 26, 0, 0, 206, 0, 0,
2964  0, 0, 0, 0, 277, 0, 0, 32, 33, 34,
2965  35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
2966  44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
2967  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2968  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2969  0, 0, 0, 0, 0, 0, 278, 0, 0, 209,
2970  54, 0, 55, 56, 0, 0, 0, 0, 58, 59,
2971  60, 61, 62, 63, 64, 65, 66, 0, 0, 0,
2972  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2973  5, 6, 7, 0, 9, 0, 0, 279, 10, 11,
2974  0, 0, 0, 12, 280, 13, 14, 15, 245, 246,
2975  18, 19, 0, 0, 0, 0, 0, 20, 247, 248,
2976  23, 24, 25, 26, 0, 0, 206, 0, 0, 0,
2977  0, 0, 0, 277, 0, 0, 32, 33, 34, 35,
2978  36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
2979  45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
2980  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2981  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2982  0, 0, 0, 0, 0, 278, 0, 0, 209, 54,
2983  0, 55, 56, 0, 0, 0, 0, 58, 59, 60,
2984  61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
2985  0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
2986  6, 7, 8, 9, 0, 0, 279, 10, 11, 0,
2987  0, 0, 12, 526, 13, 14, 15, 16, 17, 18,
2988  19, 0, 0, 0, 0, 0, 20, 21, 22, 23,
2989  24, 25, 26, 0, 0, 27, 0, 0, 0, 0,
2990  0, 28, 29, 30, 31, 32, 33, 34, 35, 36,
2991  37, 38, 39, 40, 0, 41, 42, 43, 44, 45,
2992  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
2993  0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
2994  0, 0, 0, 0, 0, 0, 50, 51, 0, 0,
2995  0, 0, 0, 0, 52, 0, 0, 53, 54, 0,
2996  55, 56, 0, 57, 0, 0, 58, 59, 60, 61,
2997  62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
2998  0, 0, 0, 0, 0, 5, 6, 7, 0, 9,
2999  0, 0, 0, 10, 11, 67, 68, 69, 12, 0,
3000  13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
3001  0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
3002  0, 206, 0, 0, 0, 0, 0, 0, 29, 0,
3003  0, 32, 33, 34, 35, 36, 37, 38, 39, 40,
3004  207, 41, 42, 43, 44, 45, 46, 47, 0, 0,
3005  0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
3006  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3007  0, 0, 50, 51, 0, 0, 0, 0, 0, 0,
3008  208, 0, 0, 209, 54, 0, 55, 56, 0, 210,
3009  211, 212, 58, 59, 213, 61, 62, 63, 64, 65,
3010  66, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3011  0, 5, 6, 7, 8, 9, 0, 0, 0, 10,
3012  11, 67, 214, 69, 12, 0, 13, 14, 15, 16,
3013  17, 18, 19, 0, 0, 0, 0, 0, 20, 21,
3014  22, 23, 24, 25, 26, 0, 0, 27, 0, 0,
3015  0, 0, 0, 28, 29, 0, 31, 32, 33, 34,
3016  35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
3017  44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
3018  0, 0, 0, 48, 49, 0, 0, 0, 0, 0,
3019  0, 0, 0, 0, 0, 0, 0, 0, 50, 51,
3020  0, 0, 0, 0, 0, 0, 52, 0, 0, 53,
3021  54, 0, 55, 56, 0, 57, 0, 0, 58, 59,
3022  60, 61, 62, 63, 64, 65, 66, 0, 0, 0,
3023  0, 0, 0, 0, 0, 0, 0, 5, 6, 7,
3024  0, 9, 0, 0, 0, 10, 11, 67, 68, 69,
3025  12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
3026  0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
3027  26, 0, 0, 206, 0, 0, 0, 0, 0, 0,
3028  29, 0, 0, 32, 33, 34, 35, 36, 37, 38,
3029  39, 40, 207, 41, 42, 43, 44, 45, 46, 47,
3030  0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
3031  49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3032  0, 0, 0, 0, 50, 439, 0, 0, 0, 0,
3033  0, 0, 208, 0, 0, 209, 54, 0, 55, 56,
3034  0, 210, 211, 212, 58, 59, 213, 61, 62, 63,
3035  64, 65, 66, 0, 0, 0, 0, 0, 0, 0,
3036  0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
3037  0, 10, 11, 67, 214, 69, 12, 0, 13, 14,
3038  15, 245, 246, 18, 19, 0, 0, 0, 0, 0,
3039  20, 247, 248, 23, 24, 25, 26, 0, 0, 206,
3040  0, 0, 0, 0, 0, 0, 29, 0, 0, 32,
3041  33, 34, 35, 36, 37, 38, 39, 40, 207, 41,
3042  42, 43, 44, 45, 46, 47, 0, 0, 0, 0,
3043  0, 0, 0, 0, 0, 48, 49, 0, 0, 0,
3044  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3045  50, 51, 0, 0, 0, 0, 0, 0, 208, 0,
3046  0, 209, 54, 0, 55, 56, 0, 620, 211, 212,
3047  58, 59, 213, 61, 62, 63, 64, 65, 66, 0,
3048  0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
3049  6, 7, 0, 9, 0, 0, 0, 10, 11, 67,
3050  214, 69, 12, 0, 13, 14, 15, 245, 246, 18,
3051  19, 0, 0, 0, 0, 0, 20, 247, 248, 23,
3052  24, 25, 26, 0, 0, 206, 0, 0, 0, 0,
3053  0, 0, 29, 0, 0, 32, 33, 34, 35, 36,
3054  37, 38, 39, 40, 207, 41, 42, 43, 44, 45,
3055  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
3056  0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
3057  0, 0, 0, 0, 0, 0, 50, 51, 0, 0,
3058  0, 0, 0, 0, 208, 0, 0, 209, 54, 0,
3059  55, 56, 0, 210, 211, 0, 58, 59, 213, 61,
3060  62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
3061  0, 0, 0, 0, 0, 5, 6, 7, 0, 9,
3062  0, 0, 0, 10, 11, 67, 214, 69, 12, 0,
3063  13, 14, 15, 245, 246, 18, 19, 0, 0, 0,
3064  0, 0, 20, 247, 248, 23, 24, 25, 26, 0,
3065  0, 206, 0, 0, 0, 0, 0, 0, 29, 0,
3066  0, 32, 33, 34, 35, 36, 37, 38, 39, 40,
3067  207, 41, 42, 43, 44, 45, 46, 47, 0, 0,
3068  0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
3069  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3070  0, 0, 50, 51, 0, 0, 0, 0, 0, 0,
3071  208, 0, 0, 209, 54, 0, 55, 56, 0, 0,
3072  211, 212, 58, 59, 213, 61, 62, 63, 64, 65,
3073  66, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3074  0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
3075  11, 67, 214, 69, 12, 0, 13, 14, 15, 245,
3076  246, 18, 19, 0, 0, 0, 0, 0, 20, 247,
3077  248, 23, 24, 25, 26, 0, 0, 206, 0, 0,
3078  0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
3079  35, 36, 37, 38, 39, 40, 207, 41, 42, 43,
3080  44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
3081  0, 0, 0, 48, 49, 0, 0, 0, 0, 0,
3082  0, 0, 0, 0, 0, 0, 0, 0, 50, 51,
3083  0, 0, 0, 0, 0, 0, 208, 0, 0, 209,
3084  54, 0, 55, 56, 0, 620, 211, 0, 58, 59,
3085  213, 61, 62, 63, 64, 65, 66, 0, 0, 0,
3086  0, 0, 0, 0, 0, 0, 0, 5, 6, 7,
3087  0, 9, 0, 0, 0, 10, 11, 67, 214, 69,
3088  12, 0, 13, 14, 15, 245, 246, 18, 19, 0,
3089  0, 0, 0, 0, 20, 247, 248, 23, 24, 25,
3090  26, 0, 0, 206, 0, 0, 0, 0, 0, 0,
3091  29, 0, 0, 32, 33, 34, 35, 36, 37, 38,
3092  39, 40, 207, 41, 42, 43, 44, 45, 46, 47,
3093  0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
3094  49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3095  0, 0, 0, 0, 50, 51, 0, 0, 0, 0,
3096  0, 0, 208, 0, 0, 209, 54, 0, 55, 56,
3097  0, 0, 211, 0, 58, 59, 213, 61, 62, 63,
3098  64, 65, 66, 0, 0, 0, 0, 0, 0, 0,
3099  0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
3100  0, 10, 11, 67, 214, 69, 12, 0, 13, 14,
3101  15, 16, 17, 18, 19, 0, 0, 0, 0, 0,
3102  20, 21, 22, 23, 24, 25, 26, 0, 0, 206,
3103  0, 0, 0, 0, 0, 0, 29, 0, 0, 32,
3104  33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
3105  42, 43, 44, 45, 46, 47, 0, 0, 0, 0,
3106  0, 0, 0, 0, 0, 48, 49, 0, 0, 0,
3107  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3108  50, 51, 0, 0, 0, 0, 0, 0, 208, 0,
3109  0, 209, 54, 0, 55, 56, 0, 519, 0, 0,
3110  58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
3111  0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
3112  6, 7, 0, 9, 0, 0, 0, 10, 11, 67,
3113  214, 69, 12, 0, 13, 14, 15, 245, 246, 18,
3114  19, 0, 0, 0, 0, 0, 20, 247, 248, 23,
3115  24, 25, 26, 0, 0, 206, 0, 0, 0, 0,
3116  0, 0, 29, 0, 0, 32, 33, 34, 35, 36,
3117  37, 38, 39, 40, 0, 41, 42, 43, 44, 45,
3118  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
3119  0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
3120  0, 0, 0, 0, 0, 0, 50, 51, 0, 0,
3121  0, 0, 0, 0, 208, 0, 0, 209, 54, 0,
3122  55, 56, 0, 770, 0, 0, 58, 59, 60, 61,
3123  62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
3124  0, 0, 0, 0, 0, 5, 6, 7, 0, 9,
3125  0, 0, 0, 10, 11, 67, 214, 69, 12, 0,
3126  13, 14, 15, 245, 246, 18, 19, 0, 0, 0,
3127  0, 0, 20, 247, 248, 23, 24, 25, 26, 0,
3128  0, 206, 0, 0, 0, 0, 0, 0, 29, 0,
3129  0, 32, 33, 34, 35, 36, 37, 38, 39, 40,
3130  0, 41, 42, 43, 44, 45, 46, 47, 0, 0,
3131  0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
3132  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3133  0, 0, 50, 51, 0, 0, 0, 0, 0, 0,
3134  208, 0, 0, 209, 54, 0, 55, 56, 0, 519,
3135  0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
3136  66, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3137  0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
3138  11, 67, 214, 69, 12, 0, 13, 14, 15, 245,
3139  246, 18, 19, 0, 0, 0, 0, 0, 20, 247,
3140  248, 23, 24, 25, 26, 0, 0, 206, 0, 0,
3141  0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
3142  35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
3143  44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
3144  0, 0, 0, 48, 49, 0, 0, 0, 0, 0,
3145  0, 0, 0, 0, 0, 0, 0, 0, 50, 51,
3146  0, 0, 0, 0, 0, 0, 208, 0, 0, 209,
3147  54, 0, 55, 56, 0, 843, 0, 0, 58, 59,
3148  60, 61, 62, 63, 64, 65, 66, 0, 0, 0,
3149  0, 0, 0, 0, 0, 0, 0, 5, 6, 7,
3150  0, 9, 0, 0, 0, 10, 11, 67, 214, 69,
3151  12, 0, 13, 14, 15, 245, 246, 18, 19, 0,
3152  0, 0, 0, 0, 20, 247, 248, 23, 24, 25,
3153  26, 0, 0, 206, 0, 0, 0, 0, 0, 0,
3154  29, 0, 0, 32, 33, 34, 35, 36, 37, 38,
3155  39, 40, 0, 41, 42, 43, 44, 45, 46, 47,
3156  0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
3157  49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3158  0, 0, 0, 0, 50, 51, 0, 0, 0, 0,
3159  0, 0, 208, 0, 0, 209, 54, 0, 55, 56,
3160  0, 1014, 0, 0, 58, 59, 60, 61, 62, 63,
3161  64, 65, 66, 0, 0, 0, 0, 0, 0, 0,
3162  0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
3163  0, 10, 11, 67, 214, 69, 12, 0, 13, 14,
3164  15, 245, 246, 18, 19, 0, 0, 0, 0, 0,
3165  20, 247, 248, 23, 24, 25, 26, 0, 0, 206,
3166  0, 0, 0, 0, 0, 0, 29, 0, 0, 32,
3167  33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
3168  42, 43, 44, 45, 46, 47, 0, 0, 0, 0,
3169  0, 0, 0, 0, 0, 48, 49, 0, 0, 0,
3170  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3171  50, 51, 0, 0, 0, 0, 0, 0, 208, 0,
3172  0, 209, 54, 0, 55, 56, 0, 0, 0, 0,
3173  58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
3174  0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
3175  6, 7, 0, 9, 0, 0, 0, 10, 11, 67,
3176  214, 69, 12, 0, 13, 14, 15, 16, 17, 18,
3177  19, 0, 0, 0, 0, 0, 20, 21, 22, 23,
3178  24, 25, 26, 0, 0, 206, 0, 0, 0, 0,
3179  0, 0, 29, 0, 0, 32, 33, 34, 35, 36,
3180  37, 38, 39, 40, 0, 41, 42, 43, 44, 45,
3181  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
3182  0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
3183  0, 0, 0, 0, 0, 0, 50, 51, 0, 0,
3184  0, 0, 0, 0, 208, 0, 0, 209, 54, 0,
3185  55, 56, 0, 0, 0, 0, 58, 59, 60, 61,
3186  62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
3187  0, 0, 0, 0, 0, 5, 6, 7, 0, 9,
3188  0, 0, 0, 10, 11, 67, 214, 69, 12, 0,
3189  13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
3190  0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
3191  0, 27, 0, 0, 0, 0, 0, 0, 29, 0,
3192  0, 32, 33, 34, 35, 36, 37, 38, 39, 40,
3193  0, 41, 42, 43, 44, 45, 46, 47, 0, 0,
3194  0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
3195  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3196  0, 0, 50, 51, 0, 0, 0, 0, 0, 0,
3197  208, 0, 0, 209, 54, 0, 55, 56, 0, 0,
3198  0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
3199  66, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3200  0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
3201  11, 67, 68, 69, 12, 0, 13, 14, 15, 245,
3202  246, 18, 19, 0, 0, 0, 0, 0, 20, 247,
3203  248, 23, 24, 25, 26, 0, 0, 206, 0, 0,
3204  0, 0, 0, 0, 277, 0, 0, 32, 33, 34,
3205  35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
3206  44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
3207  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3208  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3209  0, 0, 0, 0, 0, 0, 278, 0, 0, 328,
3210  54, 0, 55, 56, 0, 329, 0, 0, 58, 59,
3211  60, 61, 62, 63, 64, 65, 66, 0, 0, 0,
3212  0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
3213  0, 10, 11, 0, 0, 0, 12, 279, 13, 14,
3214  15, 245, 246, 18, 19, 0, 0, 0, 0, 0,
3215  20, 247, 248, 23, 24, 25, 26, 0, 0, 206,
3216  0, 0, 0, 0, 0, 0, 277, 0, 0, 32,
3217  33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
3218  42, 43, 44, 45, 46, 47, 0, 0, 0, 0,
3219  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3220  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3221  0, 0, 0, 0, 0, 0, 0, 0, 376, 0,
3222  0, 53, 54, 0, 55, 56, 0, 57, 0, 0,
3223  58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
3224  0, 0, 0, 0, 0, 5, 6, 7, 0, 9,
3225  0, 0, 0, 10, 11, 0, 0, 0, 12, 279,
3226  13, 14, 15, 245, 246, 18, 19, 0, 0, 0,
3227  0, 0, 20, 247, 248, 23, 24, 25, 26, 0,
3228  0, 206, 0, 0, 0, 0, 0, 0, 277, 0,
3229  0, 32, 33, 34, 384, 36, 37, 38, 385, 40,
3230  0, 41, 42, 43, 44, 45, 46, 47, 0, 0,
3231  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3232  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3233  0, 0, 0, 0, 0, 0, 386, 0, 0, 0,
3234  387, 0, 0, 209, 54, 0, 55, 56, 0, 0,
3235  0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
3236  66, 0, 0, 0, 0, 0, 0, 5, 6, 7,
3237  0, 9, 0, 0, 0, 10, 11, 0, 0, 0,
3238  12, 279, 13, 14, 15, 245, 246, 18, 19, 0,
3239  0, 0, 0, 0, 20, 247, 248, 23, 24, 25,
3240  26, 0, 0, 206, 0, 0, 0, 0, 0, 0,
3241  277, 0, 0, 32, 33, 34, 384, 36, 37, 38,
3242  385, 40, 0, 41, 42, 43, 44, 45, 46, 47,
3243  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3244  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3245  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3246  0, 0, 387, 0, 0, 209, 54, 0, 55, 56,
3247  0, 0, 0, 0, 58, 59, 60, 61, 62, 63,
3248  64, 65, 66, 0, 0, 0, 0, 0, 0, 5,
3249  6, 7, 0, 9, 0, 0, 0, 10, 11, 0,
3250  0, 0, 12, 279, 13, 14, 15, 245, 246, 18,
3251  19, 0, 0, 0, 0, 0, 20, 247, 248, 23,
3252  24, 25, 26, 0, 0, 206, 0, 0, 0, 0,
3253  0, 0, 277, 0, 0, 32, 33, 34, 35, 36,
3254  37, 38, 39, 40, 0, 41, 42, 43, 44, 45,
3255  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
3256  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3257  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3258  0, 0, 0, 0, 278, 0, 0, 328, 54, 0,
3259  55, 56, 0, 0, 0, 0, 58, 59, 60, 61,
3260  62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
3261  0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
3262  11, 0, 0, 0, 12, 279, 13, 14, 15, 245,
3263  246, 18, 19, 0, 0, 0, 0, 0, 20, 247,
3264  248, 23, 24, 25, 26, 0, 0, 206, 0, 0,
3265  0, 0, 0, 0, 277, 0, 0, 32, 33, 34,
3266  35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
3267  44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
3268  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3269  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3270  0, 0, 0, 0, 0, 0, 1004, 0, 0, 209,
3271  54, 0, 55, 56, 0, 0, 0, 0, 58, 59,
3272  60, 61, 62, 63, 64, 65, 66, 0, 0, 0,
3273  0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
3274  0, 10, 11, 0, 0, 0, 12, 279, 13, 14,
3275  15, 245, 246, 18, 19, 0, 0, 0, 0, 0,
3276  20, 247, 248, 23, 24, 25, 26, 0, 0, 206,
3277  0, 0, 0, 0, 0, 0, 277, 0, 0, 32,
3278  33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
3279  42, 43, 44, 45, 46, 47, 23, 24, 25, 26,
3280  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3281  0, 0, 32, 33, 34, 781, 0, 0, 0, 782,
3282  0, 0, 41, 42, 43, 44, 45, 0, 1056, 0,
3283  0, 209, 54, 0, 55, 56, 0, 0, 0, 0,
3284  58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
3285  0, 0, 0, 783, 784, 0, 0, 0, 0, 0,
3286  0, 785, 0, 0, 786, 0, 0, 787, 788, 279,
3287  975, 0, 0, 789, 59, 60, 61, 62, 63, 64,
3288  65, 66, 23, 24, 25, 26, 0, 0, 0, 0,
3289  0, 0, 0, 0, 0, 790, 0, 0, 32, 33,
3290  34, 781, 279, 0, 0, 782, 0, 0, 41, 42,
3291  43, 44, 45, 0, 0, 23, 24, 25, 26, 0,
3292  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3293  0, 32, 33, 34, 781, 0, 0, 0, 782, 783,
3294  784, 41, 42, 43, 44, 45, 0, 785, 0, 0,
3295  786, 0, 0, 787, 788, 0, 1071, 0, 0, 789,
3296  59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
3297  0, 0, 783, 784, 0, 0, 0, 0, 0, 0,
3298  785, 790, 0, 786, 0, 0, 787, 788, 279, 0,
3299  0, 0, 789, 59, 60, 61, 62, 63, 64, 65,
3300  66, 564, 565, 0, 0, 566, 0, 0, 0, 0,
3301  0, 0, 0, 0, 790, 0, 0, 0, 0, 0,
3302  0, 279, 0, 0, 170, 171, 172, 173, 174, 175,
3303  176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
3304  0, 181, 182, 183, 184, 0, 0, 0, 0, 0,
3305  0, 0, 0, 0, 0, 0, 185, 186, 0, 0,
3306  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3307  0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
3308  189, 190, 191, 192, 193, 194, 195, 196, 0, 197,
3309  198, 572, 573, 0, 0, 574, 199, 233, 0, 0,
3310  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3311  0, 0, 0, 0, 170, 171, 172, 173, 174, 175,
3312  176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
3313  0, 181, 182, 183, 184, 0, 0, 0, 0, 0,
3314  0, 0, 0, 0, 0, 0, 185, 186, 0, 0,
3315  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3316  0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
3317  189, 190, 191, 192, 193, 194, 195, 196, 0, 197,
3318  198, 624, 565, 0, 0, 625, 199, 233, 0, 0,
3319  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3320  0, 0, 0, 0, 170, 171, 172, 173, 174, 175,
3321  176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
3322  0, 181, 182, 183, 184, 0, 0, 0, 0, 0,
3323  0, 0, 0, 0, 0, 0, 185, 186, 0, 0,
3324  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3325  0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
3326  189, 190, 191, 192, 193, 194, 195, 196, 0, 197,
3327  198, 627, 573, 0, 0, 628, 199, 233, 0, 0,
3328  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3329  0, 0, 0, 0, 170, 171, 172, 173, 174, 175,
3330  176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
3331  0, 181, 182, 183, 184, 0, 0, 0, 0, 0,
3332  0, 0, 0, 0, 0, 0, 185, 186, 0, 0,
3333  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3334  0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
3335  189, 190, 191, 192, 193, 194, 195, 196, 0, 197,
3336  198, 652, 565, 0, 0, 653, 199, 233, 0, 0,
3337  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3338  0, 0, 0, 0, 170, 171, 172, 173, 174, 175,
3339  176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
3340  0, 181, 182, 183, 184, 0, 0, 0, 0, 0,
3341  0, 0, 0, 0, 0, 0, 185, 186, 0, 0,
3342  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3343  0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
3344  189, 190, 191, 192, 193, 194, 195, 196, 0, 197,
3345  198, 655, 573, 0, 0, 656, 199, 233, 0, 0,
3346  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3347  0, 0, 0, 0, 170, 171, 172, 173, 174, 175,
3348  176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
3349  0, 181, 182, 183, 184, 0, 0, 0, 0, 0,
3350  0, 0, 0, 0, 0, 0, 185, 186, 0, 0,
3351  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3352  0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
3353  189, 190, 191, 192, 193, 194, 195, 196, 0, 197,
3354  198, 722, 565, 0, 0, 723, 199, 233, 0, 0,
3355  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3356  0, 0, 0, 0, 170, 171, 172, 173, 174, 175,
3357  176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
3358  0, 181, 182, 183, 184, 0, 0, 0, 0, 0,
3359  0, 0, 0, 0, 0, 0, 185, 186, 0, 0,
3360  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3361  0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
3362  189, 190, 191, 192, 193, 194, 195, 196, 0, 197,
3363  198, 725, 573, 0, 0, 726, 199, 233, 0, 0,
3364  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3365  0, 0, 0, 0, 170, 171, 172, 173, 174, 175,
3366  176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
3367  0, 181, 182, 183, 184, 0, 0, 0, 0, 0,
3368  0, 0, 0, 0, 0, 0, 185, 186, 0, 0,
3369  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3370  0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
3371  189, 190, 191, 192, 193, 194, 195, 196, 0, 197,
3372  198, 731, 565, 0, 0, 732, 199, 233, 0, 0,
3373  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3374  0, 0, 0, 0, 170, 171, 172, 173, 174, 175,
3375  176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
3376  0, 181, 182, 183, 184, 0, 0, 0, 0, 0,
3377  0, 0, 0, 0, 0, 0, 185, 186, 0, 0,
3378  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3379  0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
3380  189, 190, 191, 192, 193, 194, 195, 196, 0, 197,
3381  198, 609, 573, 0, 0, 610, 199, 233, 0, 0,
3382  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3383  0, 0, 0, 0, 170, 171, 172, 173, 174, 175,
3384  176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
3385  0, 181, 182, 183, 184, 0, 0, 0, 0, 0,
3386  0, 0, 0, 0, 0, 0, 185, 186, 0, 0,
3387  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3388  0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
3389  189, 190, 191, 192, 193, 194, 195, 196, 0, 197,
3390  198, 776, 565, 0, 0, 777, 199, 233, 0, 0,
3391  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3392  0, 0, 0, 0, 170, 171, 172, 173, 174, 175,
3393  176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
3394  0, 181, 182, 183, 184, 0, 0, 0, 0, 0,
3395  0, 0, 0, 0, 0, 0, 185, 186, 0, 0,
3396  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3397  0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
3398  189, 190, 191, 192, 193, 194, 195, 196, 0, 197,
3399  198, 779, 573, 0, 0, 780, 199, 233, 0, 0,
3400  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3401  0, 0, 0, 0, 170, 171, 172, 173, 174, 175,
3402  176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
3403  0, 181, 182, 183, 184, 0, 0, 0, 0, 0,
3404  0, 0, 0, 0, 0, 0, 185, 186, 0, 0,
3405  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3406  0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
3407  189, 190, 191, 192, 193, 194, 195, 196, 0, 197,
3408  198, 1154, 565, 0, 0, 1155, 199, 233, 0, 0,
3409  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3410  0, 0, 0, 0, 170, 171, 172, 173, 174, 175,
3411  176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
3412  0, 181, 182, 183, 184, 0, 0, 0, 0, 0,
3413  0, 0, 0, 0, 0, 0, 185, 186, 0, 0,
3414  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3415  0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
3416  189, 190, 191, 192, 193, 194, 195, 196, 0, 197,
3417  198, 1157, 573, 0, 0, 1158, 199, 233, 0, 0,
3418  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3419  0, 0, 0, 0, 170, 171, 172, 173, 174, 175,
3420  176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
3421  0, 181, 182, 183, 184, 0, 0, 0, 0, 0,
3422  0, 0, 0, 0, 0, 0, 185, 186, 0, 0,
3423  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3424  0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
3425  189, 190, 191, 192, 193, 194, 195, 196, 0, 197,
3426  198, 1188, 565, 0, 0, 1189, 199, 233, 0, 0,
3427  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3428  0, 0, 0, 0, 170, 171, 172, 173, 174, 175,
3429  176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
3430  0, 181, 182, 183, 184, 0, 0, 0, 0, 0,
3431  0, 0, 0, 0, 0, 0, 185, 186, 0, 0,
3432  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3433  0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
3434  189, 190, 191, 192, 193, 194, 195, 196, 0, 197,
3435  198, 609, 573, 0, 0, 610, 199, 233, 0, 0,
3436  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3437  0, 0, 0, 0, 170, 171, 172, 173, 174, 175,
3438  176, 177, 178, 0, 0, 179, 180, 0, 0, 0,
3439  0, 181, 182, 183, 184, 0, 0, 0, 0, 0,
3440  0, 0, 0, 0, 0, 0, 185, 186, 0, 0,
3441  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3442  0, 0, 0, 0, 0, 0, 0, 0, 187, 188,
3443  189, 190, 191, 192, 193, 194, 195, 196, 0, 197,
3444  198, 0, 0, 0, 0, 0, 199
3445 };
3446 
3447 static const yytype_int16 yycheck[] =
3448 {
3449  2, 369, 89, 60, 28, 57, 94, 102, 8, 227,
3450  710, 71, 22, 8, 101, 83, 433, 387, 53, 59,
3451  866, 331, 16, 17, 95, 91, 92, 71, 28, 95,
3452  67, 83, 68, 28, 2, 95, 4, 717, 57, 1066,
3453  26, 16, 17, 626, 96, 97, 98, 53, 16, 17,
3454  27, 603, 29, 55, 56, 1039, 473, 364, 25, 99,
3455  92, 55, 56, 95, 59, 425, 4, 13, 78, 893,
3456  894, 654, 482, 433, 2, 1062, 4, 271, 25, 52,
3457  1104, 275, 16, 17, 857, 53, 54, 27, 363, 57,
3458  365, 864, 29, 25, 25, 52, 295, 296, 958, 13,
3459  68, 25, 25, 100, 99, 1106, 100, 15, 25, 17,
3460  16, 17, 893, 894, 68, 83, 526, 126, 259, 331,
3461  1028, 55, 429, 91, 92, 100, 54, 95, 96, 97,
3462  98, 13, 100, 0, 26, 222, 411, 146, 25, 924,
3463  34, 724, 96, 97, 37, 38, 1054, 13, 13, 146,
3464  855, 734, 857, 428, 153, 430, 213, 143, 52, 864,
3465  414, 415, 148, 689, 251, 15, 100, 66, 66, 1196,
3466  236, 13, 238, 146, 209, 25, 866, 484, 730, 146,
3467  953, 148, 1028, 458, 1208, 1169, 123, 328, 1048, 146,
3468  261, 145, 13, 1039, 100, 778, 283, 1184, 68, 146,
3469  146, 261, 414, 415, 787, 151, 1207, 153, 1054, 244,
3470  485, 151, 280, 153, 146, 146, 1062, 261, 635, 221,
3471  119, 119, 146, 146, 259, 227, 444, 97, 280, 146,
3472  600, 233, 1013, 1018, 1019, 13, 230, 151, 232, 153,
3473  242, 209, 279, 143, 310, 311, 312, 313, 953, 315,
3474  316, 143, 855, 259, 857, 230, 56, 232, 233, 146,
3475  153, 864, 230, 866, 232, 233, 1174, 143, 236, 151,
3476  238, 153, 682, 633, 242, 635, 244, 329, 310, 311,
3477  312, 313, 148, 1191, 591, 151, 151, 153, 153, 257,
3478  326, 259, 379, 328, 601, 331, 230, 849, 232, 498,
3479  277, 500, 373, 25, 856, 371, 148, 152, 891, 151,
3480  329, 153, 280, 373, 242, 58, 1016, 592, 870, 1104,
3481  386, 1106, 328, 1169, 230, 109, 232, 602, 13, 257,
3482  151, 13, 153, 152, 77, 370, 1016, 372, 1184, 371,
3483  1164, 309, 310, 311, 312, 313, 314, 315, 316, 133,
3484  953, 877, 878, 866, 66, 100, 37, 38, 326, 68,
3485  328, 329, 364, 331, 1054, 108, 99, 893, 894, 112,
3486  365, 309, 1062, 151, 1064, 153, 100, 880, 414, 415,
3487  687, 309, 34, 151, 978, 153, 314, 25, 97, 364,
3488  893, 894, 326, 126, 977, 705, 364, 331, 366, 152,
3489  52, 146, 370, 371, 372, 623, 25, 783, 784, 121,
3490  122, 686, 124, 688, 482, 785, 411, 152, 386, 1002,
3491  1003, 236, 1207, 1208, 146, 1028, 148, 429, 452, 153,
3492  482, 425, 25, 97, 694, 430, 1039, 691, 692, 28,
3493  442, 701, 444, 697, 698, 862, 414, 415, 22, 264,
3494  537, 1054, 452, 268, 429, 649, 126, 452, 526, 1062,
3495  986, 429, 661, 458, 99, 99, 151, 666, 153, 151,
3496  13, 153, 684, 99, 526, 1069, 470, 845, 146, 691,
3497  692, 145, 484, 77, 148, 697, 698, 1013, 126, 144,
3498  485, 126, 126, 68, 1184, 1047, 1186, 465, 153, 99,
3499  126, 1191, 862, 1193, 78, 593, 126, 126, 146, 484,
3500  1013, 149, 888, 889, 482, 153, 484, 146, 1031, 99,
3501  890, 96, 97, 1036, 153, 585, 126, 146, 1031, 148,
3502  149, 899, 750, 126, 153, 1144, 904, 1237, 604, 1148,
3503  1230, 1054, 136, 137, 138, 1058, 581, 66, 583, 1062,
3504  1144, 1064, 99, 146, 1148, 1058, 149, 99, 526, 569,
3505  153, 99, 816, 942, 943, 99, 1169, 577, 112, 99,
3506  145, 1123, 638, 1156, 1077, 577, 553, 579, 146, 126,
3507  56, 1184, 650, 68, 126, 964, 965, 966, 126, 591,
3508  68, 1200, 126, 617, 571, 68, 126, 592, 650, 601,
3509  119, 611, 121, 122, 816, 1199, 1200, 602, 151, 611,
3510  153, 96, 97, 581, 682, 583, 591, 617, 96, 97,
3511  435, 623, 617, 591, 97, 440, 601, 148, 443, 126,
3512  682, 446, 66, 601, 66, 603, 604, 99, 1164, 633,
3513  68, 643, 100, 2, 739, 4, 66, 462, 684, 626,
3514  68, 25, 467, 866, 68, 691, 692, 16, 17, 146,
3515  145, 697, 698, 729, 126, 146, 866, 145, 728, 97,
3516  638, 1184, 153, 1186, 248, 249, 68, 654, 1191, 97,
3517  1193, 148, 650, 97, 66, 687, 153, 121, 122, 121,
3518  122, 146, 727, 688, 53, 54, 149, 729, 738, 119,
3519  153, 121, 122, 705, 706, 97, 708, 26, 710, 68,
3520  525, 679, 687, 99, 682, 683, 684, 1230, 152, 687,
3521  152, 68, 148, 691, 692, 1093, 82, 83, 518, 697,
3522  698, 68, 91, 92, 68, 1114, 95, 119, 146, 121,
3523  122, 100, 124, 738, 66, 153, 148, 724, 750, 68,
3524  97, 679, 126, 148, 68, 683, 1135, 734, 68, 727,
3525  97, 729, 730, 97, 9, 767, 150, 769, 834, 153,
3526  15, 705, 146, 129, 130, 149, 68, 96, 97, 153,
3527  816, 1088, 96, 97, 68, 52, 96, 97, 578, 56,
3528  850, 365, 68, 828, 584, 77, 586, 119, 833, 121,
3529  122, 778, 834, 52, 96, 97, 149, 56, 126, 68,
3530  787, 788, 96, 97, 1089, 150, 99, 144, 1031, 56,
3531  96, 97, 824, 146, 143, 77, 145, 106, 99, 148,
3532  146, 145, 867, 56, 148, 145, 77, 96, 97, 14,
3533  15, 1054, 151, 126, 130, 1058, 898, 25, 816, 1062,
3534  209, 1064, 66, 145, 1054, 126, 430, 146, 1058, 149,
3535  828, 145, 1062, 146, 1064, 833, 834, 902, 146, 145,
3536  144, 230, 144, 232, 233, 146, 911, 236, 146, 238,
3537  146, 849, 99, 242, 458, 244, 145, 68, 856, 866,
3538  99, 951, 10, 134, 135, 136, 137, 138, 257, 867,
3539  259, 144, 870, 88, 89, 119, 146, 121, 122, 126,
3540  962, 485, 54, 146, 891, 96, 97, 126, 44, 1006,
3541  146, 736, 64, 65, 44, 982, 40, 41, 718, 146,
3542  898, 721, 126, 8, 902, 13, 751, 146, 940, 25,
3543  942, 943, 999, 911, 17, 735, 152, 152, 144, 99,
3544  309, 310, 311, 312, 313, 314, 315, 316, 146, 68,
3545  128, 68, 964, 965, 966, 15, 150, 326, 148, 328,
3546  146, 1184, 331, 1186, 131, 1010, 126, 1012, 1191, 146,
3547  1193, 958, 26, 2, 1184, 4, 1186, 96, 97, 96,
3548  97, 1191, 52, 1193, 962, 569, 146, 16, 17, 100,
3549  977, 1053, 131, 577, 100, 364, 983, 366, 146, 1011,
3550  144, 370, 371, 372, 1016, 1050, 52, 1230, 592, 66,
3551  67, 26, 126, 146, 68, 1002, 1003, 386, 602, 146,
3552  1230, 68, 52, 146, 53, 54, 145, 611, 145, 52,
3553  146, 146, 1010, 131, 1012, 835, 126, 146, 838, 68,
3554  56, 841, 96, 97, 66, 414, 415, 146, 848, 96,
3555  97, 851, 146, 68, 146, 146, 414, 415, 642, 643,
3556  429, 1048, 91, 92, 121, 122, 95, 892, 146, 1047,
3557  151, 100, 1050, 431, 432, 1053, 1088, 9, 1090, 1124,
3558  1092, 96, 97, 68, 1089, 146, 1162, 1163, 68, 143,
3559  146, 145, 866, 131, 148, 56, 465, 119, 145, 121,
3560  122, 459, 1114, 1088, 688, 99, 931, 932, 58, 99,
3561  1088, 96, 97, 913, 146, 484, 96, 97, 146, 146,
3562  1162, 1163, 146, 1135, 52, 146, 146, 77, 143, 120,
3563  145, 149, 126, 148, 146, 66, 126, 146, 52, 146,
3564  54, 55, 56, 57, 58, 1123, 1124, 146, 146, 974,
3565  950, 146, 146, 146, 1141, 242, 146, 146, 108, 109,
3566  145, 144, 148, 77, 689, 145, 2, 148, 4, 1156,
3567  40, 41, 42, 43, 44, 1000, 1001, 146, 689, 146,
3568  209, 461, 77, 133, 1162, 1163, 465, 101, 119, 1234,
3569  121, 122, 96, 124, 108, 109, 98, 1022, 87, 94,
3570  95, 230, 611, 232, 233, 706, 1018, 236, 1092, 238,
3571  1104, 866, 581, 242, 583, 244, 1196, 53, 54, 133,
3572  769, 57, 591, 883, 740, 1237, 1237, 514, 257, 324,
3573  259, 887, 601, 1013, 603, 604, 131, 132, 133, 134,
3574  135, 136, 137, 138, 1077, 1077, 1090, 83, 885, 945,
3575  52, 947, 54, 55, 56, 57, 1234, 1077, 783, 784,
3576  96, 97, 98, 99, 1011, 1039, 105, 99, 1042, 638,
3577  500, 952, 783, 784, 855, 968, 969, 1102, 1054, 1031,
3578  309, 310, 311, 312, 313, 314, 315, 316, 1062, 77,
3579  1064, 1058, 1028, 54, 55, 983, 57, 326, -1, 328,
3580  -1, -1, 331, 64, 65, -1, 94, 95, -1, -1,
3581  679, -1, -1, -1, 683, 684, -1, -1, 687, -1,
3582  -1, 1121, 691, 692, 59, 60, 61, 62, 697, 698,
3583  -1, -1, -1, 691, 692, 364, -1, 366, -1, 697,
3584  698, 370, 371, 372, -1, 133, 134, 135, 136, 137,
3585  138, -1, 877, 878, -1, -1, -1, 386, 727, -1,
3586  729, 730, 887, 888, 889, -1, 877, 878, 893, 894,
3587  -1, -1, -1, 209, -1, -1, 887, 888, 889, -1,
3588  -1, 1181, 893, 894, -1, 414, 415, 745, 746, -1,
3589  748, 749, -1, -1, -1, 1169, -1, 1171, -1, -1,
3590  429, -1, 1176, -1, -1, -1, 242, -1, 244, -1,
3591  1184, -1, 1186, -1, 1110, 1111, -1, -1, -1, 1193,
3592  1116, 257, 1118, 259, 1120, -1, 689, 52, -1, 54,
3593  55, 56, 57, 58, -1, -1, 465, 1130, 1131, -1,
3594  -1, -1, -1, 1136, 280, 1138, 1139, 816, -1, -1,
3595  -1, 1225, 77, 978, -1, 484, 1230, -1, 816, 828,
3596  -1, 986, -1, -1, 833, 834, 52, 978, 54, 55,
3597  56, 57, -1, 309, -1, 986, 101, -1, 314, -1,
3598  849, -1, 107, 108, 109, -1, -1, 856, 1013, -1,
3599  -1, -1, 328, 329, -1, -1, -1, -1, 867, -1,
3600  -1, 870, 1013, 861, 2, 1089, 4, -1, 133, -1,
3601  -1, 136, -1, 1209, 1210, 1211, 1212, -1, -1, -1,
3602  783, 784, 1215, 1216, 1217, 1218, -1, -1, 153, -1,
3603  366, 77, -1, 902, 370, -1, 372, -1, -1, 1235,
3604  -1, -1, 911, 1236, 1069, -1, -1, -1, 94, 95,
3605  -1, -1, 581, -1, 583, 53, 54, -1, 1069, 57,
3606  -1, 52, 591, 54, 55, 56, 57, 58, -1, -1,
3607  -1, -1, 601, -1, 603, 604, -1, -1, -1, 52,
3608  -1, 54, 55, 56, 57, 83, 77, 56, 134, 135,
3609  136, 137, 138, -1, -1, -1, -1, -1, 96, 97,
3610  98, -1, 52, -1, 54, 55, 56, 57, -1, 638,
3611  101, -1, -1, -1, 877, 878, 107, 108, 109, 1144,
3612  -1, -1, -1, 1148, 887, 888, 889, -1, 101, 465,
3613  893, 894, -1, 1144, 107, -1, -1, 1148, -1, 1164,
3614  -1, 1010, 133, 1012, -1, 136, 482, -1, -1, -1,
3615  679, 101, -1, 1164, 683, 684, -1, 148, 687, -1,
3616  -1, -1, 691, 692, -1, -1, -1, -1, 697, 698,
3617  -1, -1, -1, -1, 1199, 1200, -1, -1, 1047, -1,
3618  -1, 1050, -1, -1, -1, -1, -1, -1, 1199, 1200,
3619  526, -1, -1, -1, -1, -1, -1, -1, 727, -1,
3620  729, 730, -1, -1, -1, -1, -1, -1, -1, -1,
3621  -1, 209, -1, -1, -1, 978, -1, -1, -1, 1088,
3622  -1, -1, -1, 986, -1, -1, -1, -1, 52, -1,
3623  54, 55, 56, 57, 58, -1, -1, -1, 207, -1,
3624  -1, 210, 211, 212, 242, 581, 244, 583, -1, -1,
3625  1013, -1, -1, 77, 1123, 1124, -1, -1, -1, 257,
3626  -1, 259, -1, -1, -1, -1, -1, 603, -1, -1,
3627  -1, -1, -1, -1, -1, -1, -1, 101, -1, -1,
3628  -1, -1, 280, 107, 108, 109, -1, 816, -1, 689,
3629  -1, -1, -1, 1162, 1163, -1, -1, -1, -1, 828,
3630  -1, -1, -1, -1, 833, 834, 1069, -1, -1, 133,
3631  -1, 309, 136, -1, 650, -1, 314, -1, -1, -1,
3632  849, -1, -1, -1, -1, -1, -1, 856, -1, -1,
3633  328, 329, -1, 331, -1, -1, -1, -1, 867, -1,
3634  -1, 870, -1, 679, -1, -1, 682, 683, -1, -1,
3635  -1, -1, -1, 689, -1, -1, -1, 326, -1, -1,
3636  -1, -1, 331, -1, -1, 1234, -1, -1, 366, -1,
3637  -1, -1, 370, 902, 372, -1, -1, -1, -1, -1,
3638  -1, 1144, 911, 783, 784, 1148, -1, -1, -1, -1,
3639  -1, 727, -1, -1, 730, -1, -1, -1, -1, -1,
3640  -1, 1164, -1, -1, -1, -1, -1, -1, -1, -1,
3641  -1, -1, -1, -1, -1, -1, 414, 415, -1, 52,
3642  -1, 54, 55, 56, 57, 58, -1, -1, -1, -1,
3643  -1, -1, -1, -1, -1, -1, 1199, 1200, -1, -1,
3644  -1, -1, -1, -1, 77, -1, -1, 783, 784, -1,
3645  -1, -1, -1, -1, -1, 424, 425, -1, 91, -1,
3646  -1, -1, -1, -1, 433, -1, -1, 465, 101, -1,
3647  -1, -1, -1, -1, 107, 108, 109, 877, 878, -1,
3648  -1, 1010, -1, 1012, 482, -1, -1, 887, 888, 889,
3649  -1, -1, 828, 893, 894, -1, -1, 833, -1, -1,
3650  133, 470, -1, 136, 473, -1, -1, -1, -1, -1,
3651  -1, -1, 2, 849, 4, -1, -1, -1, 1047, -1,
3652  856, 1050, -1, -1, -1, -1, -1, -1, 526, -1,
3653  -1, 867, -1, -1, 870, -1, -1, -1, -1, -1,
3654  -1, 877, 878, -1, -1, -1, -1, -1, -1, -1,
3655  519, 887, 888, 889, -1, -1, -1, 893, 894, 1088,
3656  -1, -1, 898, 53, 54, -1, 902, 57, -1, -1,
3657  -1, -1, -1, 689, -1, 911, -1, -1, 978, -1,
3658  -1, -1, -1, 581, -1, 583, 986, -1, -1, -1,
3659  -1, -1, -1, 83, 1123, 1124, -1, -1, -1, -1,
3660  -1, -1, -1, -1, -1, 603, 96, 97, 98, 99,
3661  -1, -1, -1, 1013, -1, -1, -1, -1, -1, -1,
3662  -1, -1, -1, -1, -1, -1, 962, 689, -1, -1,
3663  -1, -1, -1, 1162, 1163, -1, -1, -1, -1, -1,
3664  -1, -1, 978, -1, -1, -1, -1, -1, -1, 618,
3665  986, 620, 650, -1, -1, -1, -1, -1, -1, -1,
3666  -1, 659, -1, -1, 633, -1, 635, 783, 784, 1069,
3667  -1, -1, -1, -1, 1010, -1, 1012, 1013, -1, -1,
3668  -1, 679, -1, -1, 682, 683, 684, -1, -1, -1,
3669  -1, -1, -1, 691, 692, -1, -1, -1, -1, 697,
3670  698, -1, -1, -1, 2, 1234, 4, -1, -1, 678,
3671  -1, 1047, -1, -1, 1050, -1, -1, 1053, -1, 209,
3672  -1, 783, 784, -1, -1, -1, -1, -1, 2, 727,
3673  4, -1, 730, 1069, -1, -1, 705, -1, -1, -1,
3674  -1, -1, -1, -1, 1144, -1, -1, -1, 1148, -1,
3675  -1, 720, 242, -1, 244, 53, 54, -1, -1, -1,
3676  -1, 877, 878, -1, 1164, -1, -1, 257, -1, 259,
3677  -1, 887, 888, 889, -1, -1, -1, 893, 894, 53,
3678  54, -1, -1, -1, -1, -1, -1, 1123, 1124, -1,
3679  280, 689, -1, -1, -1, -1, -1, -1, 96, 1199,
3680  1200, 770, -1, -1, -1, -1, -1, -1, 1144, -1,
3681  -1, -1, 1148, -1, -1, 877, 878, -1, 816, 309,
3682  -1, -1, -1, -1, 314, 887, 888, 889, 1164, -1,
3683  828, 893, 894, -1, -1, 833, -1, -1, 328, 329,
3684  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3685  -1, 849, -1, -1, -1, -1, -1, -1, 856, -1,
3686  -1, -1, 978, 1199, 1200, -1, -1, -1, -1, 867,
3687  986, -1, 870, -1, 843, -1, 366, -1, -1, -1,
3688  370, -1, 372, -1, -1, 783, 784, -1, -1, -1,
3689  -1, -1, -1, 862, -1, -1, -1, 1013, 1234, -1,
3690  898, -1, -1, -1, 902, -1, -1, -1, -1, -1,
3691  -1, 209, -1, 911, -1, -1, 978, -1, -1, -1,
3692  -1, -1, -1, 689, 986, -1, -1, -1, -1, -1,
3693  -1, -1, -1, -1, -1, 209, -1, -1, -1, -1,
3694  -1, 910, -1, -1, 242, -1, 244, -1, -1, -1,
3695  -1, 1013, -1, 1069, -1, -1, -1, -1, -1, 257,
3696  -1, 259, -1, -1, 962, -1, -1, -1, 242, 938,
3697  244, -1, -1, -1, -1, 465, -1, -1, -1, 877,
3698  878, -1, -1, 257, -1, 259, -1, -1, -1, 887,
3699  888, 889, 482, -1, -1, 893, 894, -1, -1, -1,
3700  -1, -1, -1, -1, -1, -1, -1, 1069, -1, -1,
3701  -1, 309, 1010, -1, 1012, -1, 314, 783, 784, -1,
3702  -1, -1, -1, -1, -1, -1, -1, -1, 1144, -1,
3703  328, -1, 1148, 331, -1, 309, 526, -1, -1, -1,
3704  314, -1, -1, -1, -1, 1014, -1, -1, 1164, 1047,
3705  -1, -1, 1050, -1, 328, 1053, -1, 331, 1027, -1,
3706  -1, -1, -1, -1, -1, -1, -1, -1, 366, -1,
3707  -1, -1, 370, -1, 372, -1, -1, -1, -1, -1,
3708  978, -1, 1144, 1199, 1200, -1, 1148, -1, 986, -1,
3709  -1, 581, 366, 583, -1, -1, 370, -1, 372, -1,
3710  -1, -1, 1164, -1, -1, -1, -1, -1, -1, -1,
3711  -1, 877, 878, 603, -1, 1013, 414, 415, -1, -1,
3712  -1, 887, 888, 889, -1, 1123, 1124, 893, 894, -1,
3713  -1, -1, -1, -1, -1, -1, -1, 1199, 1200, -1,
3714  414, 415, -1, -1, -1, -1, -1, -1, -1, -1,
3715  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3716  650, -1, -1, -1, -1, -1, -1, 465, -1, 25,
3717  -1, 1069, -1, 0, -1, -1, -1, -1, -1, -1,
3718  -1, 8, 9, 10, -1, -1, 13, 14, 15, 679,
3719  17, 465, 682, 683, -1, -1, -1, -1, 25, 26,
3720  27, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3721  37, 38, 978, 40, 41, 42, 43, 44, -1, -1,
3722  986, 77, 78, 79, 80, 81, 82, 83, 84, 85,
3723  86, 87, 88, 89, -1, -1, 1234, 727, 94, 95,
3724  730, 68, -1, -1, -1, -1, 1144, 1013, -1, -1,
3725  1148, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3726  -1, -1, -1, -1, -1, -1, 1164, -1, -1, 96,
3727  97, 127, -1, 129, 130, 131, 132, 133, 134, 135,
3728  136, 137, 138, 581, -1, 583, -1, -1, -1, -1,
3729  -1, -1, -1, 120, -1, -1, -1, -1, -1, -1,
3730  -1, 1199, 1200, 1069, -1, 603, -1, 581, -1, 583,
3731  -1, -1, -1, -1, -1, -1, 143, 144, -1, -1,
3732  -1, 148, 149, -1, 151, -1, 153, -1, -1, 603,
3733  -1, -1, -1, -1, -1, -1, -1, -1, 828, -1,
3734  -1, -1, -1, 833, -1, -1, -1, -1, -1, -1,
3735  -1, -1, -1, -1, -1, -1, -1, -1, -1, 849,
3736  -1, -1, -1, -1, -1, -1, 856, -1, -1, -1,
3737  -1, -1, -1, -1, -1, -1, -1, 867, 1144, -1,
3738  870, 679, 1148, -1, -1, 683, 684, -1, -1, -1,
3739  -1, -1, -1, 691, 692, -1, -1, -1, 1164, 697,
3740  698, -1, -1, -1, -1, 679, -1, -1, 898, 683,
3741  684, -1, 902, -1, -1, -1, -1, 691, 692, -1,
3742  -1, 911, -1, 697, 698, -1, -1, -1, -1, 727,
3743  -1, -1, 730, 1199, 1200, -1, -1, -1, -1, -1,
3744  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3745  -1, -1, -1, 727, -1, -1, 730, -1, -1, -1,
3746  16, 17, -1, -1, -1, -1, -1, -1, -1, -1,
3747  -1, -1, 962, -1, -1, -1, -1, -1, -1, -1,
3748  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3749  -1, -1, 48, 49, 50, 51, -1, -1, -1, 55,
3750  56, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3751  -1, -1, 68, 69, -1, -1, -1, -1, 816, -1,
3752  1010, -1, 1012, -1, -1, -1, -1, -1, -1, -1,
3753  828, -1, -1, -1, -1, 833, -1, -1, -1, -1,
3754  -1, -1, 816, -1, 100, -1, -1, -1, -1, -1,
3755  -1, 849, -1, -1, 828, -1, -1, 1047, 856, 833,
3756  1050, -1, -1, 1053, -1, -1, -1, -1, -1, 867,
3757  -1, -1, 870, -1, -1, 849, -1, -1, -1, -1,
3758  -1, -1, 856, -1, -1, -1, -1, -1, -1, -1,
3759  -1, -1, -1, 867, -1, -1, 870, -1, -1, -1,
3760  898, -1, -1, -1, 902, -1, -1, -1, -1, -1,
3761  -1, -1, -1, 911, 33, 34, 35, 36, -1, -1,
3762  -1, -1, -1, -1, -1, -1, -1, -1, 902, -1,
3763  49, 50, 51, 1123, 1124, -1, -1, 911, -1, -1,
3764  59, 60, 61, 62, 63, -1, -1, -1, -1, -1,
3765  -1, 207, -1, -1, 210, 211, 212, -1, 214, -1,
3766  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3767  -1, -1, -1, -1, 230, -1, 232, 233, -1, -1,
3768  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3769  -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
3770  -1, 77, 78, 79, 80, 81, 82, 83, 84, -1,
3771  86, 87, 1010, -1, 1012, -1, -1, -1, 94, 95,
3772  139, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3773  -1, -1, -1, -1, -1, -1, 1010, -1, 1012, -1,
3774  -1, -1, -1, -1, 1234, -1, -1, -1, -1, 1047,
3775  -1, -1, 1050, 129, 130, 131, 132, 133, 134, 135,
3776  136, 137, 138, -1, -1, -1, -1, -1, -1, -1,
3777  326, -1, -1, 1047, -1, 331, 1050, 333, 334, 335,
3778  336, 337, -1, -1, 340, 341, 342, 343, 344, 345,
3779  346, 347, 348, -1, -1, 351, 352, 353, 354, 355,
3780  356, 357, 358, 359, 360, -1, -1, -1, 364, -1,
3781  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3782  -1, -1, -1, -1, -1, 1123, 1124, -1, -1, -1,
3783  -1, -1, -1, -1, 77, 78, 79, 80, 81, 82,
3784  83, 84, 85, 86, 87, 88, 89, -1, -1, 1123,
3785  1124, 94, 95, -1, -1, -1, -1, -1, 414, 415,
3786  -1, -1, -1, -1, -1, -1, -1, 423, 424, 425,
3787  -1, -1, -1, 429, -1, 431, 432, 433, -1, -1,
3788  -1, -1, -1, 439, 127, -1, 129, 130, 131, 132,
3789  133, 134, 135, 136, 137, 138, -1, -1, 454, -1,
3790  -1, -1, -1, 459, -1, -1, -1, -1, -1, -1,
3791  153, -1, -1, -1, 470, -1, -1, 473, -1, -1,
3792  -1, -1, -1, -1, -1, -1, -1, -1, 484, -1,
3793  -1, -1, -1, -1, -1, -1, 1234, -1, -1, -1,
3794  -1, -1, -1, -1, -1, -1, 502, 77, 78, 79,
3795  80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
3796  1234, -1, -1, 519, 94, 95, -1, -1, -1, -1,
3797  -1, -1, 0, -1, -1, -1, -1, -1, -1, -1,
3798  8, 9, 10, -1, -1, -1, 14, 15, -1, 17,
3799  -1, -1, -1, -1, -1, -1, -1, 25, 26, 129,
3800  130, 131, 132, 133, 134, 135, 136, 137, 138, 37,
3801  38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
3802  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3803  -1, -1, -1, -1, -1, 591, -1, -1, -1, -1,
3804  68, -1, -1, -1, -1, 601, -1, -1, -1, 77,
3805  78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3806  88, 89, 618, -1, 620, -1, 94, 95, 96, 97,
3807  -1, 99, -1, -1, -1, -1, -1, 633, -1, 635,
3808  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3809  -1, -1, 120, -1, -1, -1, -1, -1, 126, 127,
3810  -1, 129, 130, 131, 132, 133, 134, 135, 136, 137,
3811  138, -1, -1, -1, -1, 143, 144, 145, 146, -1,
3812  -1, 149, 678, 151, -1, 153, -1, -1, 684, 685,
3813  -1, 687, -1, -1, -1, 691, 692, -1, -1, -1,
3814  -1, 697, 698, -1, 33, 34, 35, 36, -1, 705,
3815  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3816  49, 50, 51, 52, 720, -1, -1, 56, -1, 58,
3817  59, 60, 61, 62, 63, -1, -1, -1, -1, -1,
3818  -1, -1, -1, -1, -1, -1, -1, -1, 77, 745,
3819  746, -1, 748, 749, -1, -1, -1, -1, -1, -1,
3820  -1, 90, 91, -1, -1, -1, -1, -1, -1, 98,
3821  -1, -1, 101, -1, 770, 104, 105, -1, 107, 108,
3822  -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
3823  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3824  -1, -1, -1, 132, -1, -1, -1, -1, -1, -1,
3825  139, -1, -1, 809, -1, -1, -1, -1, -1, -1,
3826  816, -1, 0, 1, -1, 3, 4, 5, 6, 7,
3827  -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
3828  18, 19, 20, 21, 22, 23, 24, 843, -1, -1,
3829  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
3830  -1, 39, -1, -1, -1, 861, 862, 45, 46, 47,
3831  48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
3832  -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
3833  -1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
3834  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3835  -1, -1, 90, 91, 910, -1, -1, -1, -1, -1,
3836  98, -1, -1, 101, 102, -1, 104, 105, -1, 107,
3837  -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
3838  118, -1, 938, -1, -1, -1, -1, -1, -1, -1,
3839  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3840  -1, 139, 140, 141, -1, -1, -1, -1, 0, -1,
3841  -1, -1, -1, 151, -1, 153, 8, 9, 10, -1,
3842  -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
3843  -1, -1, -1, 25, 26, 27, 28, 29, -1, -1,
3844  -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
3845  42, 43, 44, -1, -1, -1, -1, -1, 1014, -1,
3846  -1, -1, -1, 77, 78, 79, 80, 81, 82, 83,
3847  -1, 1027, 86, 87, -1, -1, 68, -1, -1, -1,
3848  94, 95, -1, -1, -1, 77, 78, 79, 80, 81,
3849  82, 83, 84, 85, 86, 87, 88, 89, -1, -1,
3850  -1, -1, 94, 95, 96, 97, -1, 99, 100, -1,
3851  -1, -1, -1, -1, 106, 129, 130, 131, 132, 133,
3852  134, 135, 136, 137, 138, -1, -1, -1, 120, -1,
3853  -1, 123, 1088, -1, 126, 127, 128, 129, 130, 131,
3854  132, 133, 134, 135, 136, 137, 138, -1, -1, -1,
3855  -1, 143, 144, 145, 146, 0, -1, 149, 150, 151,
3856  -1, 153, -1, 8, 9, 10, -1, -1, 13, 14,
3857  15, -1, 17, -1, -1, -1, -1, 44, -1, -1,
3858  25, -1, 27, 28, 29, -1, -1, -1, -1, -1,
3859  -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
3860  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3861  77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3862  87, 88, 89, 68, -1, -1, -1, 94, 95, -1,
3863  -1, -1, 77, 78, 79, 80, 81, 82, 83, 84,
3864  85, 86, 87, 88, 89, -1, -1, -1, -1, 94,
3865  95, 96, 97, -1, 99, 100, -1, -1, -1, -1,
3866  127, 106, 129, 130, 131, 132, 133, 134, 135, 136,
3867  137, 138, -1, -1, -1, 120, -1, -1, 123, 146,
3868  -1, 126, 127, 128, 129, 130, 131, 132, 133, 134,
3869  135, 136, 137, 138, -1, -1, -1, -1, -1, 144,
3870  145, 146, 0, -1, 149, 150, 151, -1, 153, -1,
3871  8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
3872  -1, -1, -1, -1, 44, -1, -1, 25, -1, 27,
3873  28, 29, -1, -1, -1, -1, -1, -1, -1, 37,
3874  38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
3875  -1, -1, -1, -1, -1, -1, -1, 77, 78, 79,
3876  80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
3877  68, -1, -1, -1, 94, 95, -1, -1, -1, 77,
3878  78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3879  88, 89, -1, -1, -1, -1, 94, 95, 96, 97,
3880  -1, 99, 100, -1, -1, -1, -1, 127, 106, 129,
3881  130, 131, 132, 133, 134, 135, 136, 137, 138, -1,
3882  -1, -1, 120, -1, -1, 123, -1, -1, 126, 127,
3883  128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
3884  138, -1, -1, -1, -1, -1, 144, 145, 146, 0,
3885  -1, 149, 150, 151, -1, 153, -1, 8, 9, 10,
3886  -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
3887  -1, -1, -1, -1, 25, 26, 27, 28, 29, -1,
3888  -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
3889  41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
3890  -1, -1, -1, -1, 77, 78, 79, 80, 81, 82,
3891  83, 84, 85, 86, 87, 88, 89, 68, -1, -1,
3892  -1, 94, 95, -1, -1, -1, 77, 78, 79, 80,
3893  81, 82, 83, 84, 85, 86, 87, 88, 89, -1,
3894  -1, -1, -1, 94, 95, 96, 97, -1, -1, 100,
3895  -1, -1, -1, -1, 127, 106, 129, 130, 131, 132,
3896  133, 134, 135, 136, 137, 138, -1, -1, -1, 120,
3897  -1, -1, 123, -1, -1, -1, 127, 128, 129, 130,
3898  131, 132, 133, 134, 135, 136, 137, 138, -1, -1,
3899  -1, -1, 143, 144, 145, 146, 0, -1, 149, 150,
3900  151, -1, 153, -1, 8, 9, 10, -1, -1, 13,
3901  14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
3902  -1, 25, 26, 27, 28, 29, -1, -1, -1, -1,
3903  -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
3904  44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3905  -1, 77, 78, 79, 80, 81, 82, 83, -1, -1,
3906  86, 87, -1, -1, 68, -1, -1, -1, 94, 95,
3907  -1, -1, -1, 77, 78, 79, 80, 81, 82, 83,
3908  84, 85, 86, 87, 88, 89, -1, -1, -1, -1,
3909  94, 95, 96, 97, -1, -1, 100, -1, -1, -1,
3910  -1, -1, 106, 129, 130, 131, 132, 133, 134, 135,
3911  136, 137, 138, -1, -1, -1, 120, -1, -1, 123,
3912  -1, -1, -1, 127, 128, 129, 130, 131, 132, 133,
3913  134, 135, 136, 137, 138, -1, -1, -1, -1, 143,
3914  144, 145, 146, 0, -1, 149, 150, 151, -1, 153,
3915  -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
3916  17, -1, -1, -1, -1, -1, -1, -1, 25, -1,
3917  27, 28, 29, -1, -1, -1, -1, -1, -1, -1,
3918  37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
3919  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3920  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3921  -1, 68, -1, -1, -1, -1, -1, -1, -1, -1,
3922  77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3923  87, 88, 89, -1, -1, -1, -1, 94, 95, 96,
3924  97, -1, 99, 100, -1, -1, -1, -1, -1, 106,
3925  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3926  -1, -1, -1, 120, -1, -1, 123, -1, -1, 126,
3927  127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
3928  137, 138, -1, -1, -1, -1, -1, 144, 145, 146,
3929  0, -1, 149, 150, 151, -1, 153, -1, 8, 9,
3930  10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
3931  -1, -1, -1, -1, -1, 25, 26, 27, 28, -1,
3932  -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
3933  40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
3934  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3935  -1, -1, -1, -1, -1, -1, -1, -1, 68, -1,
3936  -1, -1, -1, -1, -1, -1, -1, 77, 78, 79,
3937  80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
3938  -1, -1, -1, -1, 94, 95, 96, 97, -1, -1,
3939  100, -1, -1, -1, -1, -1, 106, -1, -1, -1,
3940  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3941  120, -1, -1, -1, -1, -1, -1, 127, -1, 129,
3942  130, 131, 132, 133, 134, 135, 136, 137, 138, -1,
3943  -1, -1, -1, 143, 144, 145, 146, 0, 148, 149,
3944  150, 151, -1, 153, -1, 8, 9, 10, -1, -1,
3945  13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
3946  -1, -1, 25, -1, 27, 28, 29, -1, -1, -1,
3947  -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
3948  43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
3949  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3950  -1, -1, -1, -1, -1, 68, -1, -1, -1, -1,
3951  -1, -1, -1, -1, 77, 78, 79, 80, 81, 82,
3952  83, 84, 85, 86, 87, 88, 89, -1, -1, -1,
3953  -1, 94, 95, 96, 97, -1, -1, 100, -1, -1,
3954  -1, -1, -1, 106, -1, -1, -1, -1, -1, -1,
3955  -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
3956  123, -1, -1, -1, 127, 128, 129, 130, 131, 132,
3957  133, 134, 135, 136, 137, 138, -1, -1, -1, -1,
3958  -1, 144, 145, 146, 0, -1, 149, 150, 151, -1,
3959  153, -1, 8, 9, 10, -1, -1, 13, 14, 15,
3960  -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
3961  26, 27, 28, -1, -1, -1, -1, -1, -1, -1,
3962  -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
3963  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3964  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3965  -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
3966  -1, 77, 78, 79, 80, 81, 82, 83, 84, 85,
3967  86, 87, 88, 89, -1, -1, -1, -1, 94, 95,
3968  96, 97, -1, -1, 100, -1, -1, -1, -1, -1,
3969  106, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3970  -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
3971  -1, 127, -1, 129, 130, 131, 132, 133, 134, 135,
3972  136, 137, 138, -1, -1, -1, -1, 143, 144, 145,
3973  146, 0, 148, 149, 150, 151, -1, 153, -1, 8,
3974  9, 10, -1, -1, 13, 14, 15, -1, 17, -1,
3975  -1, -1, -1, -1, -1, -1, 25, -1, 27, 28,
3976  -1, -1, -1, -1, -1, -1, -1, -1, 37, 38,
3977  -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
3978  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3979  -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
3980  -1, -1, -1, -1, -1, -1, -1, -1, 77, 78,
3981  79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
3982  89, -1, -1, -1, -1, 94, 95, 96, 97, -1,
3983  -1, 100, -1, -1, -1, -1, -1, 106, -1, -1,
3984  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3985  -1, 120, -1, -1, -1, -1, -1, -1, 127, -1,
3986  129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
3987  -1, -1, -1, -1, -1, 144, 145, 146, 0, 148,
3988  149, 150, 151, -1, 153, -1, 8, 9, 10, -1,
3989  -1, -1, 14, 15, -1, 17, -1, -1, -1, -1,
3990  -1, -1, -1, 25, 26, -1, -1, -1, -1, -1,
3991  -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
3992  42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
3993  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3994  -1, -1, -1, -1, -1, -1, 68, -1, -1, -1,
3995  -1, -1, -1, -1, -1, 77, 78, 79, 80, 81,
3996  82, 83, 84, 85, 86, 87, 88, 89, -1, -1,
3997  -1, -1, 94, 95, 96, 97, -1, 99, -1, -1,
3998  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3999  -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
4000  -1, -1, -1, -1, 126, 127, -1, 129, 130, 131,
4001  132, 133, 134, 135, 136, 137, 138, -1, -1, -1,
4002  -1, 143, 144, 145, 146, 0, -1, 149, -1, 151,
4003  -1, 153, -1, 8, 9, 10, -1, -1, -1, 14,
4004  15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
4005  25, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4006  -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
4007  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4008  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4009  -1, -1, -1, 68, -1, -1, -1, -1, -1, -1,
4010  -1, -1, 77, 78, 79, 80, 81, 82, 83, 84,
4011  85, 86, 87, 88, 89, -1, -1, -1, -1, 94,
4012  95, 96, 97, -1, 99, -1, -1, -1, -1, -1,
4013  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4014  -1, -1, -1, -1, -1, 120, -1, -1, -1, -1,
4015  -1, 126, 127, -1, 129, 130, 131, 132, 133, 134,
4016  135, 136, 137, 138, -1, -1, -1, -1, -1, 144,
4017  145, 146, 0, -1, 149, -1, 151, -1, 153, -1,
4018  8, 9, 10, -1, -1, -1, 14, 15, -1, 17,
4019  -1, -1, -1, -1, -1, -1, -1, 25, -1, -1,
4020  -1, -1, -1, -1, -1, -1, -1, -1, -1, 37,
4021  38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
4022  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4023  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4024  68, -1, -1, -1, -1, -1, -1, -1, -1, 77,
4025  78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
4026  88, 89, -1, -1, -1, -1, 94, 95, 96, 97,
4027  -1, 99, -1, -1, -1, -1, -1, -1, -1, -1,
4028  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4029  -1, -1, 120, -1, -1, -1, -1, -1, 126, 127,
4030  -1, 129, 130, 131, 132, 133, 134, 135, 136, 137,
4031  138, -1, -1, -1, -1, -1, 144, 145, 146, -1,
4032  -1, 149, -1, 151, 1, 153, 3, 4, 5, 6,
4033  7, 8, 9, 10, 11, 12, -1, -1, 15, 16,
4034  -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4035  -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4036  -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
4037  47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
4038  57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
4039  -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
4040  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4041  -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
4042  -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
4043  107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
4044  117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
4045  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4046  -1, -1, 139, 140, 141, -1, -1, -1, -1, -1,
4047  -1, -1, -1, -1, 151, 1, 153, 3, 4, 5,
4048  6, 7, -1, -1, 10, 11, 12, -1, 14, 15,
4049  16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
4050  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
4051  36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
4052  46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
4053  56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
4054  -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
4055  76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4056  -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
4057  -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
4058  -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
4059  116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
4060  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4061  -1, -1, -1, 139, 140, 141, -1, -1, -1, -1,
4062  -1, -1, -1, -1, -1, 151, 1, 153, 3, 4,
4063  5, 6, 7, -1, -1, 10, 11, 12, -1, -1,
4064  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
4065  -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
4066  35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4067  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
4068  55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
4069  65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4070  75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
4071  -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
4072  -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
4073  105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
4074  115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
4075  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4076  -1, -1, -1, -1, 139, 140, 141, -1, -1, -1,
4077  -1, -1, -1, -1, -1, -1, 151, 1, 153, 3,
4078  4, 5, 6, 7, -1, -1, 10, 11, 12, -1,
4079  -1, 15, 16, -1, 18, 19, 20, 21, 22, 23,
4080  24, 25, -1, -1, -1, -1, 30, 31, 32, 33,
4081  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4082  -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
4083  54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
4084  64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
4085  -1, 75, 76, -1, -1, -1, -1, -1, -1, -1,
4086  -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
4087  -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
4088  104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
4089  114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
4090  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4091  -1, -1, -1, -1, -1, 139, 140, 141, -1, -1,
4092  -1, -1, -1, -1, -1, -1, -1, 151, 1, 153,
4093  3, 4, 5, 6, 7, -1, -1, 10, 11, 12,
4094  -1, -1, 15, 16, -1, 18, 19, 20, 21, 22,
4095  23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
4096  33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
4097  -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
4098  53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
4099  63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
4100  -1, -1, 75, 76, -1, -1, -1, -1, -1, -1,
4101  -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
4102  -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
4103  -1, 104, 105, -1, 107, -1, -1, 110, 111, 112,
4104  113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
4105  -1, -1, -1, -1, 1, -1, 3, 4, 5, 6,
4106  7, -1, 9, 10, 11, 12, 139, 140, 141, 16,
4107  -1, 18, 19, 20, 21, 22, 23, 24, 151, -1,
4108  153, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4109  -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
4110  47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
4111  57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
4112  -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
4113  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4114  -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
4115  -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
4116  107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
4117  117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
4118  1, -1, 3, 4, 5, 6, 7, -1, -1, -1,
4119  11, 12, 139, 140, 141, 16, -1, 18, 19, 20,
4120  21, 22, 23, 24, 151, -1, 153, -1, -1, 30,
4121  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4122  -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
4123  51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
4124  61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
4125  -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
4126  -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
4127  91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
4128  101, 102, -1, 104, 105, -1, 107, -1, -1, 110,
4129  111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
4130  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4131  -1, -1, -1, -1, -1, -1, -1, -1, 139, 140,
4132  141, -1, -1, -1, -1, -1, -1, -1, 149, -1,
4133  151, 1, 153, 3, 4, 5, 6, 7, -1, -1,
4134  -1, 11, 12, -1, -1, -1, 16, -1, 18, 19,
4135  20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
4136  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
4137  -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
4138  50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
4139  60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
4140  -1, -1, -1, -1, -1, 75, 76, -1, -1, -1,
4141  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4142  90, 91, -1, -1, -1, -1, -1, -1, 98, -1,
4143  -1, 101, 102, -1, 104, 105, -1, 107, -1, -1,
4144  110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
4145  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4146  -1, -1, -1, -1, -1, -1, -1, -1, -1, 139,
4147  140, 141, -1, -1, -1, -1, -1, -1, -1, 149,
4148  -1, 151, 1, 153, 3, 4, 5, 6, 7, -1,
4149  -1, -1, 11, 12, -1, -1, -1, 16, -1, 18,
4150  19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
4151  -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
4152  39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
4153  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
4154  59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
4155  -1, -1, -1, -1, -1, -1, 75, 76, -1, -1,
4156  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4157  -1, 90, 91, -1, -1, -1, -1, -1, -1, 98,
4158  -1, -1, 101, 102, -1, 104, 105, -1, 107, -1,
4159  -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
4160  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4161  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4162  139, 140, 141, -1, -1, 144, -1, -1, -1, -1,
4163  -1, -1, 151, 1, 153, 3, 4, 5, 6, 7,
4164  -1, -1, -1, 11, 12, -1, -1, -1, 16, -1,
4165  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
4166  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4167  -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
4168  48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4169  -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
4170  -1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
4171  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4172  -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
4173  98, -1, -1, 101, 102, -1, 104, 105, -1, 107,
4174  -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
4175  118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4176  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4177  -1, 139, 140, 141, -1, -1, 144, -1, -1, -1,
4178  -1, -1, -1, 151, 1, 153, 3, 4, 5, 6,
4179  7, -1, -1, 10, 11, 12, -1, -1, -1, 16,
4180  -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4181  -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4182  -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
4183  47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
4184  57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
4185  -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
4186  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4187  -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
4188  -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
4189  107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
4190  117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
4191  1, -1, 3, 4, 5, 6, 7, -1, -1, -1,
4192  11, 12, 139, 140, 141, 16, -1, 18, 19, 20,
4193  21, 22, 23, 24, 151, -1, 153, -1, -1, 30,
4194  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4195  -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
4196  51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
4197  61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
4198  -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
4199  -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
4200  91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
4201  101, 102, -1, 104, 105, -1, 107, -1, -1, 110,
4202  111, 112, 113, 114, 115, 116, 117, 118, -1, 120,
4203  -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
4204  5, -1, 7, -1, -1, -1, 11, 12, 139, 140,
4205  141, 16, -1, 18, 19, 20, 21, 22, 23, 24,
4206  151, -1, 153, -1, -1, 30, 31, 32, 33, 34,
4207  35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4208  -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
4209  55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
4210  65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4211  75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
4212  -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
4213  -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
4214  105, -1, 107, 108, 109, 110, 111, 112, 113, 114,
4215  115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
4216  -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
4217  -1, -1, 11, 12, 139, 140, 141, 16, -1, 18,
4218  19, 20, 21, 22, 23, 24, -1, -1, 153, -1,
4219  -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
4220  39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
4221  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
4222  59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
4223  -1, -1, -1, -1, -1, -1, 75, 76, -1, -1,
4224  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4225  -1, 90, 91, -1, -1, -1, -1, -1, -1, 98,
4226  -1, -1, 101, 102, -1, 104, 105, -1, -1, -1,
4227  -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
4228  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4229  3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
4230  139, 140, 141, 16, -1, 18, 19, 20, 21, 22,
4231  23, 24, 151, -1, 153, -1, -1, 30, 31, 32,
4232  33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
4233  -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
4234  53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
4235  63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
4236  -1, -1, 75, 76, -1, -1, -1, -1, -1, -1,
4237  -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
4238  -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
4239  -1, 104, 105, -1, -1, -1, -1, 110, 111, 112,
4240  113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
4241  -1, -1, -1, -1, -1, -1, 3, 4, 5, 6,
4242  7, -1, -1, -1, 11, 12, 139, 140, 141, 16,
4243  -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4244  153, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4245  -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
4246  47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
4247  57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
4248  -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
4249  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4250  -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
4251  -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
4252  107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
4253  117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
4254  -1, -1, 3, 4, 5, 6, 7, -1, -1, -1,
4255  11, 12, 139, 140, 141, 16, -1, 18, 19, 20,
4256  21, 22, 23, 24, 151, -1, -1, -1, -1, 30,
4257  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4258  -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
4259  51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
4260  61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
4261  -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
4262  -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
4263  91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
4264  101, 102, -1, 104, 105, -1, 107, -1, -1, 110,
4265  111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
4266  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4267  -1, -1, -1, -1, -1, -1, -1, -1, 139, 140,
4268  141, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4269  151, 3, 4, 5, 6, 7, 8, 9, 10, 11,
4270  12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
4271  22, 23, 24, 25, 26, -1, -1, -1, 30, 31,
4272  32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
4273  -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
4274  52, 53, 54, 55, 56, 57, -1, -1, -1, -1,
4275  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4276  -1, -1, -1, 75, 76, 77, 78, 79, 80, 81,
4277  82, 83, -1, -1, 86, 87, -1, -1, -1, -1,
4278  92, 93, 94, 95, -1, -1, -1, -1, -1, -1,
4279  -1, -1, -1, -1, -1, 107, 108, -1, -1, -1,
4280  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4281  -1, -1, -1, -1, -1, -1, -1, 129, 130, 131,
4282  132, 133, 134, 135, 136, 137, 138, -1, 140, 141,
4283  -1, -1, -1, -1, -1, 147, 148, 3, 4, 5,
4284  6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
4285  16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
4286  26, -1, -1, -1, 30, 31, 32, 33, 34, 35,
4287  36, 37, 38, 39, -1, -1, -1, -1, -1, 45,
4288  46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
4289  56, 57, -1, -1, -1, -1, -1, -1, -1, -1,
4290  -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
4291  76, 77, 78, 79, 80, 81, 82, 83, -1, -1,
4292  86, 87, -1, -1, -1, -1, 92, 93, 94, 95,
4293  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4294  -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
4295  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4296  -1, -1, -1, 129, 130, 131, 132, 133, 134, 135,
4297  136, 137, 138, -1, 140, 141, -1, -1, -1, -1,
4298  -1, 147, 3, 4, 5, 6, 7, 8, 9, 10,
4299  11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
4300  21, 22, 23, 24, 25, 26, -1, -1, -1, 30,
4301  31, 32, 33, 34, 35, 36, 37, 38, 39, -1,
4302  -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
4303  51, 52, 53, 54, -1, 56, -1, -1, -1, -1,
4304  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4305  -1, -1, -1, -1, 75, 76, 77, 78, 79, 80,
4306  81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
4307  -1, 92, 93, 94, 95, -1, -1, -1, -1, -1,
4308  -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
4309  111, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4310  -1, -1, -1, -1, -1, -1, -1, -1, 129, 130,
4311  131, 132, 133, 134, 135, 136, 137, 138, -1, 140,
4312  141, -1, -1, -1, -1, -1, 147, 3, 4, 5,
4313  6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
4314  16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
4315  26, -1, -1, -1, 30, 31, 32, 33, 34, 35,
4316  36, 37, 38, 39, -1, -1, -1, -1, -1, 45,
4317  46, 47, 48, 49, 50, 51, 52, 53, -1, -1,
4318  56, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4319  -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
4320  76, 77, 78, 79, 80, 81, 82, 83, -1, -1,
4321  86, 87, -1, -1, -1, -1, 92, 93, 94, 95,
4322  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4323  -1, 107, 108, -1, -1, 111, -1, -1, -1, -1,
4324  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4325  -1, -1, -1, 129, 130, 131, 132, 133, 134, 135,
4326  136, 137, 138, -1, 140, 141, -1, -1, -1, -1,
4327  -1, 147, 3, 4, 5, 6, 7, 8, 9, 10,
4328  11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
4329  21, 22, 23, 24, 25, 26, -1, -1, -1, 30,
4330  31, 32, 33, 34, 35, 36, 37, 38, 39, -1,
4331  -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
4332  51, 52, 53, -1, -1, 56, -1, -1, -1, -1,
4333  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4334  -1, -1, -1, -1, 75, 76, 77, 78, 79, 80,
4335  81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
4336  -1, 92, 93, 94, 95, -1, -1, -1, -1, -1,
4337  -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
4338  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4339  -1, -1, -1, -1, -1, -1, -1, -1, 129, 130,
4340  131, 132, 133, 134, 135, 136, 137, 138, -1, 140,
4341  141, 3, 4, 5, -1, 7, 147, -1, -1, 11,
4342  12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
4343  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4344  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4345  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
4346  52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4347  62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
4348  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4349  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4350  -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
4351  102, -1, 104, 105, -1, -1, -1, -1, 110, 111,
4352  112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
4353  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4354  3, 4, 5, -1, 7, -1, -1, 139, 11, 12,
4355  -1, -1, -1, 16, 146, 18, 19, 20, 21, 22,
4356  23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
4357  33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
4358  -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
4359  53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
4360  63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
4361  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4362  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4363  -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
4364  -1, 104, 105, -1, -1, -1, -1, 110, 111, 112,
4365  113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
4366  -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
4367  4, 5, 6, 7, -1, -1, 139, 11, 12, -1,
4368  -1, -1, 16, 146, 18, 19, 20, 21, 22, 23,
4369  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
4370  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4371  -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
4372  54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
4373  64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
4374  -1, 75, 76, -1, -1, -1, -1, -1, -1, -1,
4375  -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
4376  -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
4377  104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
4378  114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
4379  -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
4380  -1, -1, -1, 11, 12, 139, 140, 141, 16, -1,
4381  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
4382  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4383  -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
4384  -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4385  58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
4386  -1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
4387  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4388  -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
4389  98, -1, -1, 101, 102, -1, 104, 105, -1, 107,
4390  108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
4391  118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4392  -1, 3, 4, 5, 6, 7, -1, -1, -1, 11,
4393  12, 139, 140, 141, 16, -1, 18, 19, 20, 21,
4394  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4395  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4396  -1, -1, -1, 45, 46, -1, 48, 49, 50, 51,
4397  52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4398  62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
4399  -1, -1, -1, 75, 76, -1, -1, -1, -1, -1,
4400  -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
4401  -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
4402  102, -1, 104, 105, -1, 107, -1, -1, 110, 111,
4403  112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
4404  -1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
4405  -1, 7, -1, -1, -1, 11, 12, 139, 140, 141,
4406  16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
4407  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
4408  36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
4409  46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
4410  56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4411  -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
4412  76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4413  -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
4414  -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
4415  -1, 107, 108, 109, 110, 111, 112, 113, 114, 115,
4416  116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
4417  -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
4418  -1, 11, 12, 139, 140, 141, 16, -1, 18, 19,
4419  20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
4420  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
4421  -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
4422  50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
4423  60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
4424  -1, -1, -1, -1, -1, 75, 76, -1, -1, -1,
4425  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4426  90, 91, -1, -1, -1, -1, -1, -1, 98, -1,
4427  -1, 101, 102, -1, 104, 105, -1, 107, 108, 109,
4428  110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
4429  -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
4430  4, 5, -1, 7, -1, -1, -1, 11, 12, 139,
4431  140, 141, 16, -1, 18, 19, 20, 21, 22, 23,
4432  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
4433  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4434  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
4435  54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
4436  64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
4437  -1, 75, 76, -1, -1, -1, -1, -1, -1, -1,
4438  -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
4439  -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
4440  104, 105, -1, 107, 108, -1, 110, 111, 112, 113,
4441  114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
4442  -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
4443  -1, -1, -1, 11, 12, 139, 140, 141, 16, -1,
4444  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
4445  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4446  -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
4447  -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4448  58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
4449  -1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
4450  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4451  -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
4452  98, -1, -1, 101, 102, -1, 104, 105, -1, -1,
4453  108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
4454  118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4455  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
4456  12, 139, 140, 141, 16, -1, 18, 19, 20, 21,
4457  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4458  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4459  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
4460  52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
4461  62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
4462  -1, -1, -1, 75, 76, -1, -1, -1, -1, -1,
4463  -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
4464  -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
4465  102, -1, 104, 105, -1, 107, 108, -1, 110, 111,
4466  112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
4467  -1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
4468  -1, 7, -1, -1, -1, 11, 12, 139, 140, 141,
4469  16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
4470  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
4471  36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
4472  46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
4473  56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4474  -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
4475  76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4476  -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
4477  -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
4478  -1, -1, 108, -1, 110, 111, 112, 113, 114, 115,
4479  116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
4480  -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
4481  -1, 11, 12, 139, 140, 141, 16, -1, 18, 19,
4482  20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
4483  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
4484  -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
4485  50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
4486  60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
4487  -1, -1, -1, -1, -1, 75, 76, -1, -1, -1,
4488  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4489  90, 91, -1, -1, -1, -1, -1, -1, 98, -1,
4490  -1, 101, 102, -1, 104, 105, -1, 107, -1, -1,
4491  110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
4492  -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
4493  4, 5, -1, 7, -1, -1, -1, 11, 12, 139,
4494  140, 141, 16, -1, 18, 19, 20, 21, 22, 23,
4495  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
4496  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4497  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
4498  54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
4499  64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
4500  -1, 75, 76, -1, -1, -1, -1, -1, -1, -1,
4501  -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
4502  -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
4503  104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
4504  114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
4505  -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
4506  -1, -1, -1, 11, 12, 139, 140, 141, 16, -1,
4507  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
4508  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4509  -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
4510  -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4511  -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
4512  -1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
4513  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4514  -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
4515  98, -1, -1, 101, 102, -1, 104, 105, -1, 107,
4516  -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
4517  118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4518  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
4519  12, 139, 140, 141, 16, -1, 18, 19, 20, 21,
4520  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4521  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4522  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
4523  52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4524  62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
4525  -1, -1, -1, 75, 76, -1, -1, -1, -1, -1,
4526  -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
4527  -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
4528  102, -1, 104, 105, -1, 107, -1, -1, 110, 111,
4529  112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
4530  -1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
4531  -1, 7, -1, -1, -1, 11, 12, 139, 140, 141,
4532  16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
4533  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
4534  36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
4535  46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
4536  56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
4537  -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
4538  76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4539  -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
4540  -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
4541  -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
4542  116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
4543  -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
4544  -1, 11, 12, 139, 140, 141, 16, -1, 18, 19,
4545  20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
4546  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
4547  -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
4548  50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
4549  60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
4550  -1, -1, -1, -1, -1, 75, 76, -1, -1, -1,
4551  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4552  90, 91, -1, -1, -1, -1, -1, -1, 98, -1,
4553  -1, 101, 102, -1, 104, 105, -1, -1, -1, -1,
4554  110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
4555  -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
4556  4, 5, -1, 7, -1, -1, -1, 11, 12, 139,
4557  140, 141, 16, -1, 18, 19, 20, 21, 22, 23,
4558  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
4559  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4560  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
4561  54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
4562  64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
4563  -1, 75, 76, -1, -1, -1, -1, -1, -1, -1,
4564  -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
4565  -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
4566  104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
4567  114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
4568  -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
4569  -1, -1, -1, 11, 12, 139, 140, 141, 16, -1,
4570  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
4571  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4572  -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
4573  -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4574  -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
4575  -1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
4576  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4577  -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
4578  98, -1, -1, 101, 102, -1, 104, 105, -1, -1,
4579  -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
4580  118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4581  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
4582  12, 139, 140, 141, 16, -1, 18, 19, 20, 21,
4583  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4584  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4585  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
4586  52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4587  62, 63, 64, 65, -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, 98, -1, -1, 101,
4591  102, -1, 104, 105, -1, 107, -1, -1, 110, 111,
4592  112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
4593  -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
4594  -1, 11, 12, -1, -1, -1, 16, 139, 18, 19,
4595  20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
4596  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
4597  -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
4598  50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
4599  60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
4600  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4601  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4602  -1, -1, -1, -1, -1, -1, -1, -1, 98, -1,
4603  -1, 101, 102, -1, 104, 105, -1, 107, -1, -1,
4604  110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
4605  -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
4606  -1, -1, -1, 11, 12, -1, -1, -1, 16, 139,
4607  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
4608  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4609  -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
4610  -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4611  -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
4612  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4613  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4614  -1, -1, -1, -1, -1, -1, 94, -1, -1, -1,
4615  98, -1, -1, 101, 102, -1, 104, 105, -1, -1,
4616  -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
4617  118, -1, -1, -1, -1, -1, -1, 3, 4, 5,
4618  -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
4619  16, 139, 18, 19, 20, 21, 22, 23, 24, -1,
4620  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
4621  36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
4622  46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
4623  56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
4624  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4625  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4626  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4627  -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
4628  -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
4629  116, 117, 118, -1, -1, -1, -1, -1, -1, 3,
4630  4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
4631  -1, -1, 16, 139, 18, 19, 20, 21, 22, 23,
4632  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
4633  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4634  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
4635  54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
4636  64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
4637  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4638  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4639  -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
4640  104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
4641  114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
4642  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
4643  12, -1, -1, -1, 16, 139, 18, 19, 20, 21,
4644  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4645  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4646  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
4647  52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4648  62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
4649  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4650  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4651  -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
4652  102, -1, 104, 105, -1, -1, -1, -1, 110, 111,
4653  112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
4654  -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
4655  -1, 11, 12, -1, -1, -1, 16, 139, 18, 19,
4656  20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
4657  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
4658  -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
4659  50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
4660  60, 61, 62, 63, 64, 65, 33, 34, 35, 36,
4661  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4662  -1, -1, 49, 50, 51, 52, -1, -1, -1, 56,
4663  -1, -1, 59, 60, 61, 62, 63, -1, 98, -1,
4664  -1, 101, 102, -1, 104, 105, -1, -1, -1, -1,
4665  110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
4666  -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
4667  -1, 98, -1, -1, 101, -1, -1, 104, 105, 139,
4668  107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
4669  117, 118, 33, 34, 35, 36, -1, -1, -1, -1,
4670  -1, -1, -1, -1, -1, 132, -1, -1, 49, 50,
4671  51, 52, 139, -1, -1, 56, -1, -1, 59, 60,
4672  61, 62, 63, -1, -1, 33, 34, 35, 36, -1,
4673  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4674  -1, 49, 50, 51, 52, -1, -1, -1, 56, 90,
4675  91, 59, 60, 61, 62, 63, -1, 98, -1, -1,
4676  101, -1, -1, 104, 105, -1, 107, -1, -1, 110,
4677  111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
4678  -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
4679  98, 132, -1, 101, -1, -1, 104, 105, 139, -1,
4680  -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
4681  118, 52, 53, -1, -1, 56, -1, -1, -1, -1,
4682  -1, -1, -1, -1, 132, -1, -1, -1, -1, -1,
4683  -1, 139, -1, -1, 75, 76, 77, 78, 79, 80,
4684  81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
4685  -1, 92, 93, 94, 95, -1, -1, -1, -1, -1,
4686  -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
4687  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4688  -1, -1, -1, -1, -1, -1, -1, -1, 129, 130,
4689  131, 132, 133, 134, 135, 136, 137, 138, -1, 140,
4690  141, 52, 53, -1, -1, 56, 147, 148, -1, -1,
4691  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4692  -1, -1, -1, -1, 75, 76, 77, 78, 79, 80,
4693  81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
4694  -1, 92, 93, 94, 95, -1, -1, -1, -1, -1,
4695  -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
4696  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4697  -1, -1, -1, -1, -1, -1, -1, -1, 129, 130,
4698  131, 132, 133, 134, 135, 136, 137, 138, -1, 140,
4699  141, 52, 53, -1, -1, 56, 147, 148, -1, -1,
4700  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4701  -1, -1, -1, -1, 75, 76, 77, 78, 79, 80,
4702  81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
4703  -1, 92, 93, 94, 95, -1, -1, -1, -1, -1,
4704  -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
4705  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4706  -1, -1, -1, -1, -1, -1, -1, -1, 129, 130,
4707  131, 132, 133, 134, 135, 136, 137, 138, -1, 140,
4708  141, 52, 53, -1, -1, 56, 147, 148, -1, -1,
4709  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4710  -1, -1, -1, -1, 75, 76, 77, 78, 79, 80,
4711  81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
4712  -1, 92, 93, 94, 95, -1, -1, -1, -1, -1,
4713  -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
4714  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4715  -1, -1, -1, -1, -1, -1, -1, -1, 129, 130,
4716  131, 132, 133, 134, 135, 136, 137, 138, -1, 140,
4717  141, 52, 53, -1, -1, 56, 147, 148, -1, -1,
4718  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4719  -1, -1, -1, -1, 75, 76, 77, 78, 79, 80,
4720  81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
4721  -1, 92, 93, 94, 95, -1, -1, -1, -1, -1,
4722  -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
4723  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4724  -1, -1, -1, -1, -1, -1, -1, -1, 129, 130,
4725  131, 132, 133, 134, 135, 136, 137, 138, -1, 140,
4726  141, 52, 53, -1, -1, 56, 147, 148, -1, -1,
4727  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4728  -1, -1, -1, -1, 75, 76, 77, 78, 79, 80,
4729  81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
4730  -1, 92, 93, 94, 95, -1, -1, -1, -1, -1,
4731  -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
4732  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4733  -1, -1, -1, -1, -1, -1, -1, -1, 129, 130,
4734  131, 132, 133, 134, 135, 136, 137, 138, -1, 140,
4735  141, 52, 53, -1, -1, 56, 147, 148, -1, -1,
4736  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4737  -1, -1, -1, -1, 75, 76, 77, 78, 79, 80,
4738  81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
4739  -1, 92, 93, 94, 95, -1, -1, -1, -1, -1,
4740  -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
4741  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4742  -1, -1, -1, -1, -1, -1, -1, -1, 129, 130,
4743  131, 132, 133, 134, 135, 136, 137, 138, -1, 140,
4744  141, 52, 53, -1, -1, 56, 147, 148, -1, -1,
4745  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4746  -1, -1, -1, -1, 75, 76, 77, 78, 79, 80,
4747  81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
4748  -1, 92, 93, 94, 95, -1, -1, -1, -1, -1,
4749  -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
4750  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4751  -1, -1, -1, -1, -1, -1, -1, -1, 129, 130,
4752  131, 132, 133, 134, 135, 136, 137, 138, -1, 140,
4753  141, 52, 53, -1, -1, 56, 147, 148, -1, -1,
4754  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4755  -1, -1, -1, -1, 75, 76, 77, 78, 79, 80,
4756  81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
4757  -1, 92, 93, 94, 95, -1, -1, -1, -1, -1,
4758  -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
4759  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4760  -1, -1, -1, -1, -1, -1, -1, -1, 129, 130,
4761  131, 132, 133, 134, 135, 136, 137, 138, -1, 140,
4762  141, 52, 53, -1, -1, 56, 147, 148, -1, -1,
4763  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4764  -1, -1, -1, -1, 75, 76, 77, 78, 79, 80,
4765  81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
4766  -1, 92, 93, 94, 95, -1, -1, -1, -1, -1,
4767  -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
4768  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4769  -1, -1, -1, -1, -1, -1, -1, -1, 129, 130,
4770  131, 132, 133, 134, 135, 136, 137, 138, -1, 140,
4771  141, 52, 53, -1, -1, 56, 147, 148, -1, -1,
4772  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4773  -1, -1, -1, -1, 75, 76, 77, 78, 79, 80,
4774  81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
4775  -1, 92, 93, 94, 95, -1, -1, -1, -1, -1,
4776  -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
4777  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4778  -1, -1, -1, -1, -1, -1, -1, -1, 129, 130,
4779  131, 132, 133, 134, 135, 136, 137, 138, -1, 140,
4780  141, 52, 53, -1, -1, 56, 147, 148, -1, -1,
4781  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4782  -1, -1, -1, -1, 75, 76, 77, 78, 79, 80,
4783  81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
4784  -1, 92, 93, 94, 95, -1, -1, -1, -1, -1,
4785  -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
4786  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4787  -1, -1, -1, -1, -1, -1, -1, -1, 129, 130,
4788  131, 132, 133, 134, 135, 136, 137, 138, -1, 140,
4789  141, 52, 53, -1, -1, 56, 147, 148, -1, -1,
4790  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4791  -1, -1, -1, -1, 75, 76, 77, 78, 79, 80,
4792  81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
4793  -1, 92, 93, 94, 95, -1, -1, -1, -1, -1,
4794  -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
4795  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4796  -1, -1, -1, -1, -1, -1, -1, -1, 129, 130,
4797  131, 132, 133, 134, 135, 136, 137, 138, -1, 140,
4798  141, 52, 53, -1, -1, 56, 147, 148, -1, -1,
4799  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4800  -1, -1, -1, -1, 75, 76, 77, 78, 79, 80,
4801  81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
4802  -1, 92, 93, 94, 95, -1, -1, -1, -1, -1,
4803  -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
4804  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4805  -1, -1, -1, -1, -1, -1, -1, -1, 129, 130,
4806  131, 132, 133, 134, 135, 136, 137, 138, -1, 140,
4807  141, 52, 53, -1, -1, 56, 147, 148, -1, -1,
4808  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4809  -1, -1, -1, -1, 75, 76, 77, 78, 79, 80,
4810  81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
4811  -1, 92, 93, 94, 95, -1, -1, -1, -1, -1,
4812  -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
4813  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4814  -1, -1, -1, -1, -1, -1, -1, -1, 129, 130,
4815  131, 132, 133, 134, 135, 136, 137, 138, -1, 140,
4816  141, 52, 53, -1, -1, 56, 147, 148, -1, -1,
4817  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4818  -1, -1, -1, -1, 75, 76, 77, 78, 79, 80,
4819  81, 82, 83, -1, -1, 86, 87, -1, -1, -1,
4820  -1, 92, 93, 94, 95, -1, -1, -1, -1, -1,
4821  -1, -1, -1, -1, -1, -1, 107, 108, -1, -1,
4822  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4823  -1, -1, -1, -1, -1, -1, -1, -1, 129, 130,
4824  131, 132, 133, 134, 135, 136, 137, 138, -1, 140,
4825  141, -1, -1, -1, -1, -1, 147
4826 };
4827 
4828  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
4829  symbol of state STATE-NUM. */
4830 static const yytype_uint16 yystos[] =
4831 {
4832  0, 155, 156, 0, 1, 3, 4, 5, 6, 7,
4833  11, 12, 16, 18, 19, 20, 21, 22, 23, 24,
4834  30, 31, 32, 33, 34, 35, 36, 39, 45, 46,
4835  47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
4836  57, 59, 60, 61, 62, 63, 64, 65, 75, 76,
4837  90, 91, 98, 101, 102, 104, 105, 107, 110, 111,
4838  112, 113, 114, 115, 116, 117, 118, 139, 140, 141,
4839  157, 158, 159, 167, 169, 171, 179, 180, 182, 183,
4840  184, 186, 187, 188, 190, 191, 200, 203, 218, 233,
4841  234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
4842  252, 279, 280, 333, 334, 335, 336, 337, 338, 339,
4843  342, 344, 345, 359, 360, 362, 363, 364, 365, 366,
4844  367, 368, 369, 405, 419, 159, 3, 4, 5, 6,
4845  7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
4846  17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
4847  30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
4848  45, 46, 47, 48, 49, 50, 51, 52, 53, 56,
4849  75, 76, 77, 78, 79, 80, 81, 82, 83, 86,
4850  87, 92, 93, 94, 95, 107, 108, 129, 130, 131,
4851  132, 133, 134, 135, 136, 137, 138, 140, 141, 147,
4852  194, 195, 196, 198, 199, 359, 39, 58, 98, 101,
4853  107, 108, 109, 112, 140, 183, 191, 200, 204, 210,
4854  213, 215, 233, 365, 366, 368, 369, 403, 404, 210,
4855  148, 211, 212, 148, 207, 211, 148, 153, 412, 54,
4856  195, 412, 143, 160, 143, 21, 22, 31, 32, 182,
4857  200, 233, 252, 200, 200, 200, 56, 1, 47, 101,
4858  163, 164, 165, 167, 185, 186, 419, 167, 220, 205,
4859  215, 403, 419, 204, 402, 403, 419, 46, 98, 139,
4860  146, 190, 218, 233, 365, 366, 369, 223, 54, 55,
4861  57, 194, 348, 361, 348, 349, 350, 152, 152, 152,
4862  152, 364, 179, 200, 200, 151, 153, 411, 417, 418,
4863  40, 41, 42, 43, 44, 37, 38, 26, 143, 207,
4864  211, 244, 281, 28, 245, 278, 126, 146, 101, 107,
4865  187, 126, 25, 77, 78, 79, 80, 81, 82, 83,
4866  84, 85, 86, 87, 88, 89, 94, 95, 127, 129,
4867  130, 131, 132, 133, 134, 135, 136, 137, 138, 202,
4868  202, 68, 96, 97, 145, 409, 219, 171, 175, 175,
4869  176, 177, 176, 175, 411, 418, 98, 184, 191, 233,
4870  257, 365, 366, 369, 52, 56, 94, 98, 192, 193,
4871  233, 365, 366, 369, 193, 33, 34, 35, 36, 49,
4872  50, 51, 52, 56, 148, 194, 367, 400, 210, 97,
4873  409, 410, 281, 336, 99, 99, 146, 204, 56, 204,
4874  204, 204, 348, 126, 100, 146, 214, 419, 97, 145,
4875  409, 99, 99, 146, 214, 210, 412, 413, 210, 91,
4876  209, 210, 215, 377, 403, 419, 171, 413, 171, 54,
4877  64, 65, 168, 148, 201, 157, 163, 97, 409, 99,
4878  167, 166, 185, 149, 411, 418, 413, 221, 413, 150,
4879  146, 153, 416, 146, 416, 144, 416, 412, 56, 364,
4880  187, 189, 146, 97, 145, 409, 270, 271, 66, 119,
4881  121, 122, 351, 119, 119, 351, 67, 351, 340, 346,
4882  343, 347, 77, 151, 159, 175, 175, 175, 175, 167,
4883  171, 171, 282, 283, 106, 181, 286, 287, 286, 107,
4884  179, 204, 215, 216, 217, 185, 146, 190, 146, 169,
4885  170, 179, 191, 200, 204, 206, 217, 233, 369, 172,
4886  200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
4887  200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
4888  200, 200, 200, 200, 52, 53, 56, 198, 207, 406,
4889  407, 209, 52, 53, 56, 198, 207, 406, 161, 163,
4890  13, 253, 417, 253, 163, 175, 163, 411, 225, 56,
4891  97, 145, 409, 25, 171, 52, 56, 192, 130, 370,
4892  97, 145, 409, 228, 401, 229, 68, 97, 408, 52,
4893  56, 406, 170, 200, 206, 170, 206, 197, 124, 204,
4894  107, 204, 213, 403, 52, 56, 209, 52, 56, 404,
4895  413, 149, 413, 146, 413, 146, 413, 195, 222, 200,
4896  144, 144, 406, 406, 206, 160, 413, 165, 413, 403,
4897  146, 189, 52, 56, 209, 52, 56, 272, 353, 352,
4898  119, 341, 351, 66, 119, 119, 341, 66, 119, 200,
4899  144, 284, 282, 10, 251, 288, 251, 204, 146, 44,
4900  413, 189, 146, 44, 126, 44, 97, 145, 409, 173,
4901  412, 99, 99, 207, 211, 412, 414, 99, 99, 207,
4902  208, 211, 419, 251, 8, 246, 329, 419, 163, 13,
4903  163, 251, 27, 254, 417, 251, 25, 224, 293, 17,
4904  248, 291, 52, 56, 209, 52, 56, 176, 227, 371,
4905  226, 52, 56, 192, 209, 161, 171, 230, 231, 208,
4906  211, 195, 204, 204, 214, 99, 99, 414, 99, 99,
4907  403, 171, 416, 187, 414, 273, 354, 54, 55, 57,
4908  358, 369, 152, 351, 152, 152, 152, 285, 144, 289,
4909  107, 204, 167, 189, 167, 200, 52, 56, 209, 52,
4910  56, 52, 56, 90, 91, 98, 101, 104, 105, 110,
4911  132, 303, 304, 305, 308, 323, 324, 326, 327, 328,
4912  333, 334, 337, 338, 339, 342, 344, 345, 366, 128,
4913  170, 206, 170, 206, 181, 150, 99, 170, 206, 170,
4914  206, 181, 204, 217, 330, 419, 9, 15, 247, 249,
4915  332, 419, 14, 249, 250, 255, 256, 419, 256, 178,
4916  294, 291, 251, 107, 204, 290, 251, 414, 163, 417,
4917  175, 161, 414, 251, 413, 148, 372, 373, 194, 281,
4918  278, 99, 146, 413, 274, 355, 131, 265, 266, 419,
4919  265, 204, 414, 324, 324, 56, 192, 311, 309, 414,
4920  310, 412, 415, 325, 52, 100, 174, 131, 88, 89,
4921  97, 145, 148, 306, 307, 200, 170, 206, 100, 331,
4922  419, 163, 162, 163, 175, 251, 251, 295, 251, 204,
4923  146, 253, 251, 161, 417, 251, 52, 54, 55, 56,
4924  57, 58, 77, 91, 101, 107, 108, 109, 133, 136,
4925  374, 376, 377, 378, 379, 380, 381, 382, 383, 384,
4926  387, 388, 389, 390, 391, 394, 395, 396, 397, 398,
4927  161, 376, 232, 148, 276, 376, 356, 262, 264, 267,
4928  380, 382, 383, 385, 386, 389, 390, 392, 393, 396,
4929  398, 412, 163, 161, 303, 107, 303, 312, 313, 314,
4930  316, 58, 112, 317, 318, 319, 320, 321, 322, 388,
4931  144, 270, 326, 308, 324, 324, 192, 414, 413, 112,
4932  312, 317, 312, 317, 98, 191, 233, 365, 366, 369,
4933  253, 163, 253, 296, 107, 204, 163, 251, 101, 107,
4934  258, 259, 260, 261, 379, 413, 413, 126, 146, 375,
4935  204, 146, 399, 419, 34, 52, 146, 399, 399, 146,
4936  375, 52, 146, 375, 52, 251, 417, 372, 376, 275,
4937  357, 267, 131, 126, 146, 263, 98, 233, 146, 399,
4938  399, 399, 146, 263, 146, 263, 151, 413, 52, 146,
4939  414, 107, 303, 316, 146, 348, 415, 146, 303, 34,
4940  52, 348, 413, 413, 414, 414, 56, 97, 145, 409,
4941  163, 332, 163, 301, 302, 303, 314, 317, 204, 256,
4942  291, 292, 260, 379, 146, 413, 146, 204, 374, 381,
4943  394, 396, 384, 388, 390, 398, 382, 391, 396, 380,
4944  382, 161, 267, 29, 123, 277, 163, 131, 233, 262,
4945  393, 396, 56, 97, 385, 390, 382, 392, 396, 382,
4946  52, 268, 269, 378, 146, 315, 316, 52, 146, 146,
4947  124, 319, 321, 322, 52, 56, 209, 52, 56, 329,
4948  255, 253, 40, 41, 146, 413, 258, 261, 259, 146,
4949  375, 146, 375, 399, 146, 375, 146, 375, 375, 251,
4950  149, 161, 163, 120, 146, 263, 146, 263, 52, 56,
4951  399, 146, 263, 146, 263, 263, 146, 412, 315, 146,
4952  146, 315, 414, 297, 175, 175, 312, 146, 146, 382,
4953  396, 382, 382, 251, 144, 382, 396, 382, 382, 269,
4954  316, 315, 298, 259, 375, 146, 375, 375, 375, 263,
4955  146, 263, 263, 263, 299, 382, 382, 163, 375, 263,
4956  256, 293, 300
4957 };
4958 
4959  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
4960 static const yytype_uint16 yyr1[] =
4961 {
4962  0, 154, 156, 155, 157, 158, 158, 158, 158, 159,
4963  159, 160, 162, 161, 161, 163, 164, 164, 164, 164,
4964  165, 166, 165, 168, 167, 167, 167, 167, 167, 167,
4965  167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
4966  167, 169, 169, 169, 169, 169, 169, 169, 169, 170,
4967  170, 170, 171, 171, 171, 171, 171, 172, 173, 174,
4968  171, 171, 175, 177, 178, 176, 179, 179, 180, 180,
4969  181, 182, 183, 183, 183, 183, 183, 183, 183, 183,
4970  183, 183, 183, 184, 184, 185, 185, 186, 186, 186,
4971  186, 186, 186, 186, 186, 186, 186, 187, 187, 188,
4972  188, 189, 189, 190, 190, 190, 190, 190, 190, 190,
4973  190, 190, 191, 191, 191, 191, 191, 191, 191, 191,
4974  191, 192, 192, 193, 193, 193, 194, 194, 194, 194,
4975  194, 195, 195, 196, 197, 196, 198, 198, 198, 198,
4976  198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
4977  198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
4978  198, 198, 198, 198, 198, 198, 199, 199, 199, 199,
4979  199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
4980  199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
4981  199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
4982  199, 199, 199, 199, 199, 199, 199, 200, 200, 200,
4983  200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
4984  200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
4985  200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
4986  200, 200, 200, 200, 200, 200, 200, 201, 200, 200,
4987  200, 202, 202, 202, 202, 203, 203, 204, 205, 205,
4988  205, 205, 206, 206, 207, 207, 208, 208, 209, 209,
4989  209, 209, 209, 210, 210, 210, 210, 210, 212, 211,
4990  213, 214, 214, 215, 215, 215, 215, 216, 216, 217,
4991  217, 217, 218, 218, 218, 218, 218, 218, 218, 218,
4992  218, 218, 218, 219, 218, 220, 218, 221, 218, 218,
4993  218, 218, 218, 218, 218, 218, 218, 218, 222, 218,
4994  218, 218, 218, 218, 218, 223, 218, 218, 218, 218,
4995  218, 224, 218, 225, 218, 218, 218, 226, 218, 227,
4996  218, 228, 218, 229, 230, 218, 231, 232, 218, 218,
4997  218, 218, 218, 233, 234, 235, 236, 237, 238, 239,
4998  240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
4999  250, 251, 252, 253, 253, 253, 254, 254, 255, 255,
5000  256, 256, 257, 257, 258, 258, 259, 259, 260, 260,
5001  260, 260, 260, 261, 261, 262, 262, 262, 262, 262,
5002  263, 263, 264, 264, 264, 264, 264, 264, 264, 264,
5003  264, 264, 264, 264, 264, 264, 264, 265, 265, 266,
5004  266, 267, 267, 268, 268, 269, 269, 271, 272, 273,
5005  274, 275, 270, 276, 276, 277, 277, 278, 279, 279,
5006  279, 279, 280, 280, 280, 280, 280, 280, 280, 280,
5007  280, 281, 281, 283, 284, 285, 282, 287, 288, 289,
5008  286, 290, 290, 290, 290, 291, 292, 292, 294, 295,
5009  296, 297, 298, 299, 293, 300, 300, 301, 301, 301,
5010  302, 302, 302, 302, 302, 303, 304, 304, 305, 305,
5011  306, 307, 308, 308, 308, 308, 308, 308, 308, 309,
5012  308, 308, 310, 308, 308, 311, 308, 312, 312, 312,
5013  312, 312, 312, 312, 312, 313, 313, 314, 314, 314,
5014  314, 315, 315, 316, 317, 317, 317, 317, 317, 317,
5015  318, 318, 319, 319, 320, 320, 321, 321, 322, 323,
5016  323, 323, 323, 323, 323, 323, 323, 323, 323, 324,
5017  324, 324, 324, 324, 324, 324, 324, 324, 325, 324,
5018  326, 327, 328, 328, 328, 329, 329, 330, 330, 330,
5019  331, 331, 332, 332, 333, 333, 334, 335, 335, 335,
5020  336, 337, 338, 339, 340, 340, 341, 341, 342, 343,
5021  343, 344, 345, 346, 346, 347, 347, 348, 348, 349,
5022  349, 350, 350, 351, 352, 351, 353, 354, 355, 356,
5023  357, 351, 358, 358, 358, 358, 359, 359, 360, 361,
5024  361, 361, 361, 362, 363, 363, 364, 364, 364, 364,
5025  365, 365, 365, 365, 365, 366, 366, 366, 366, 366,
5026  366, 366, 367, 367, 368, 368, 369, 369, 371, 370,
5027  370, 372, 372, 373, 372, 374, 374, 374, 374, 374,
5028  375, 375, 376, 376, 376, 376, 376, 376, 376, 376,
5029  376, 376, 376, 376, 376, 376, 376, 377, 378, 378,
5030  378, 378, 379, 379, 380, 381, 381, 382, 382, 383,
5031  384, 384, 385, 385, 386, 386, 387, 387, 388, 388,
5032  389, 390, 390, 391, 392, 393, 393, 394, 394, 395,
5033  395, 396, 396, 397, 397, 398, 399, 399, 400, 401,
5034  400, 402, 402, 403, 403, 404, 404, 404, 404, 405,
5035  405, 405, 406, 406, 406, 406, 407, 407, 407, 408,
5036  408, 409, 409, 410, 410, 411, 411, 412, 412, 413,
5037  414, 415, 416, 416, 416, 417, 417, 418, 418, 419
5038 };
5039 
5040  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
5041 static const yytype_uint8 yyr2[] =
5042 {
5043  0, 2, 0, 2, 2, 1, 1, 3, 2, 1,
5044  2, 3, 0, 6, 3, 2, 1, 1, 3, 2,
5045  1, 0, 3, 0, 4, 3, 3, 3, 2, 3,
5046  3, 3, 3, 3, 4, 1, 3, 3, 5, 3,
5047  1, 3, 3, 6, 5, 5, 5, 5, 3, 1,
5048  3, 1, 1, 3, 3, 3, 2, 0, 0, 0,
5049  6, 1, 1, 0, 0, 4, 1, 1, 1, 4,
5050  3, 1, 2, 3, 4, 5, 4, 5, 2, 2,
5051  2, 2, 2, 1, 3, 1, 3, 1, 2, 3,
5052  5, 2, 4, 2, 4, 1, 3, 1, 3, 2,
5053  3, 1, 3, 1, 1, 4, 3, 3, 3, 3,
5054  2, 1, 1, 1, 4, 3, 3, 3, 3, 2,
5055  1, 1, 1, 2, 1, 3, 1, 1, 1, 1,
5056  1, 1, 1, 1, 0, 4, 1, 1, 1, 1,
5057  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5058  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5059  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5060  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5061  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5062  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5063  1, 1, 1, 1, 1, 1, 1, 3, 3, 6,
5064  5, 5, 5, 5, 4, 3, 3, 3, 2, 2,
5065  2, 2, 3, 3, 3, 3, 3, 3, 4, 2,
5066  2, 3, 3, 3, 3, 1, 3, 3, 3, 3,
5067  3, 2, 2, 3, 3, 3, 3, 0, 4, 6,
5068  1, 1, 1, 1, 1, 3, 3, 1, 1, 2,
5069  4, 2, 1, 3, 3, 3, 1, 1, 1, 1,
5070  2, 4, 2, 1, 2, 2, 4, 1, 0, 2,
5071  2, 2, 1, 1, 2, 3, 4, 1, 1, 3,
5072  4, 2, 1, 1, 1, 1, 1, 1, 1, 1,
5073  1, 1, 1, 0, 4, 0, 3, 0, 4, 3,
5074  3, 2, 3, 3, 1, 4, 3, 1, 0, 6,
5075  4, 3, 2, 1, 2, 0, 3, 6, 6, 4,
5076  4, 0, 6, 0, 5, 5, 6, 0, 6, 0,
5077  7, 0, 5, 0, 0, 7, 0, 0, 9, 1,
5078  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5079  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5080  1, 1, 1, 1, 1, 2, 1, 1, 1, 5,
5081  1, 2, 1, 1, 1, 3, 1, 3, 1, 3,
5082  5, 1, 3, 2, 1, 4, 2, 2, 2, 1,
5083  2, 0, 6, 8, 4, 6, 4, 2, 6, 2,
5084  4, 6, 2, 4, 2, 4, 1, 1, 1, 3,
5085  4, 1, 4, 1, 3, 1, 1, 0, 0, 0,
5086  0, 0, 7, 4, 1, 3, 3, 3, 2, 4,
5087  5, 5, 2, 4, 4, 3, 3, 3, 2, 1,
5088  4, 3, 3, 0, 0, 0, 5, 0, 0, 0,
5089  5, 1, 2, 3, 4, 5, 1, 1, 0, 0,
5090  0, 0, 0, 0, 11, 1, 1, 1, 3, 3,
5091  1, 2, 3, 1, 1, 1, 3, 1, 3, 1,
5092  1, 1, 1, 4, 4, 3, 4, 4, 3, 0,
5093  4, 2, 0, 4, 2, 0, 4, 1, 1, 2,
5094  3, 5, 2, 4, 1, 2, 3, 2, 4, 1,
5095  3, 1, 3, 1, 3, 1, 2, 1, 3, 1,
5096  1, 3, 2, 1, 1, 3, 2, 1, 2, 1,
5097  3, 3, 2, 2, 1, 1, 1, 2, 2, 1,
5098  1, 1, 1, 1, 1, 1, 1, 1, 0, 3,
5099  1, 2, 2, 3, 1, 6, 1, 1, 1, 1,
5100  2, 1, 2, 1, 1, 1, 1, 1, 1, 2,
5101  3, 3, 3, 4, 0, 3, 1, 2, 4, 0,
5102  3, 4, 4, 0, 3, 0, 3, 0, 2, 0,
5103  2, 0, 2, 1, 0, 3, 0, 0, 0, 0,
5104  0, 8, 1, 1, 1, 1, 1, 1, 2, 1,
5105  1, 1, 1, 3, 1, 2, 1, 1, 1, 1,
5106  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5107  1, 1, 1, 1, 1, 1, 1, 1, 0, 4,
5108  0, 3, 3, 0, 3, 4, 2, 2, 2, 1,
5109  2, 0, 6, 8, 4, 6, 4, 6, 2, 4,
5110  6, 2, 4, 2, 4, 1, 0, 1, 1, 1,
5111  1, 1, 1, 1, 1, 1, 3, 1, 3, 1,
5112  2, 1, 2, 1, 1, 3, 1, 3, 1, 1,
5113  2, 2, 1, 3, 3, 1, 3, 1, 3, 1,
5114  1, 2, 1, 1, 1, 2, 2, 1, 1, 0,
5115  4, 1, 2, 1, 3, 3, 2, 4, 2, 1,
5116  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5117  1, 1, 1, 1, 1, 0, 1, 0, 1, 2,
5118  2, 2, 0, 1, 1, 1, 1, 1, 2, 0
5119 };
5120 
5121 
5122 #define yyerrok (yyerrstatus = 0)
5123 #define yyclearin (yychar = YYEMPTY)
5124 #define YYEMPTY (-2)
5125 #define YYEOF 0
5126 
5127 #define YYACCEPT goto yyacceptlab
5128 #define YYABORT goto yyabortlab
5129 #define YYERROR goto yyerrorlab
5130 
5131 
5132 #define YYRECOVERING() (!!yyerrstatus)
5133 
5134 #define YYBACKUP(Token, Value) \
5135 do \
5136  if (yychar == YYEMPTY) \
5137  { \
5138  yychar = (Token); \
5139  yylval = (Value); \
5140  YYPOPSTACK (yylen); \
5141  yystate = *yyssp; \
5142  goto yybackup; \
5143  } \
5144  else \
5145  { \
5146  yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
5147  YYERROR; \
5148  } \
5149 while (0)
5150 
5151 /* Error token number */
5152 #define YYTERROR 1
5153 #define YYERRCODE 256
5154 
5155 
5156 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
5157  If N is 0, then set CURRENT to the empty location which ends
5158  the previous symbol: RHS[0] (always defined). */
5159 
5160 #ifndef YYLLOC_DEFAULT
5161 # define YYLLOC_DEFAULT(Current, Rhs, N) \
5162  do \
5163  if (N) \
5164  { \
5165  (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
5166  (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
5167  (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
5168  (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
5169  } \
5170  else \
5171  { \
5172  (Current).first_line = (Current).last_line = \
5173  YYRHSLOC (Rhs, 0).last_line; \
5174  (Current).first_column = (Current).last_column = \
5175  YYRHSLOC (Rhs, 0).last_column; \
5176  } \
5177  while (0)
5178 #endif
5179 
5180 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
5181 
5182 
5183 /* Enable debugging if requested. */
5184 #if YYDEBUG
5185 
5186 # ifndef YYFPRINTF
5187 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
5188 # define YYFPRINTF fprintf
5189 # endif
5190 
5191 # define YYDPRINTF(Args) \
5192 do { \
5193  if (yydebug) \
5194  YYFPRINTF Args; \
5195 } while (0)
5196 
5197 
5198 /* YY_LOCATION_PRINT -- Print the location on the stream.
5199  This macro was not mandated originally: define only if we know
5200  we won't break user code: when these are the locations we know. */
5201 
5202 #ifndef YY_LOCATION_PRINT
5203 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
5204 
5205 /* Print *YYLOCP on YYO. Private, do not rely on its existence. */
5206 
5208 static unsigned
5209 yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
5210 {
5211  unsigned res = 0;
5212  int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
5213  if (0 <= yylocp->first_line)
5214  {
5215  res += YYFPRINTF (p, "%d", yylocp->first_line);
5216  if (0 <= yylocp->first_column)
5217  res += YYFPRINTF (p, ".%d", yylocp->first_column);
5218  }
5219  if (0 <= yylocp->last_line)
5220  {
5221  if (yylocp->first_line < yylocp->last_line)
5222  {
5223  res += YYFPRINTF (p, "-%d", yylocp->last_line);
5224  if (0 <= end_col)
5225  res += YYFPRINTF (p, ".%d", end_col);
5226  }
5227  else if (0 <= end_col && yylocp->first_column < end_col)
5228  res += YYFPRINTF (p, "-%d", end_col);
5229  }
5230  return res;
5231  }
5232 
5233 # define YY_LOCATION_PRINT(File, Loc) \
5234  yy_location_print_ (File, &(Loc))
5235 
5236 # else
5237 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
5238 # endif
5239 #endif
5240 
5241 
5242 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
5243 do { \
5244  if (yydebug) \
5245  { \
5246  YYFPRINTF (p, "%s ", Title); \
5247  yy_symbol_print (stderr, \
5248  Type, Value, Location, p); \
5249  YYFPRINTF (p, "\n"); \
5250  } \
5251 } while (0)
5252 
5253 
5254 /*----------------------------------------.
5255 | Print this symbol's value on YYOUTPUT. |
5256 `----------------------------------------*/
5257 
5258 static void
5259 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
5260 {
5261  FILE *yyo = yyoutput;
5262  YYUSE (yyo);
5263  YYUSE (yylocationp);
5264  YYUSE (p);
5265  if (!yyvaluep)
5266  return;
5267 # ifdef YYPRINT
5268  if (yytype < YYNTOKENS)
5269  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
5270 # endif
5271  YYUSE (yytype);
5272 }
5273 
5274 
5275 /*--------------------------------.
5276 | Print this symbol on YYOUTPUT. |
5277 `--------------------------------*/
5278 
5279 static void
5280 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
5281 {
5282  YYFPRINTF (p, "%s %s (",
5283  yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
5284 
5285  YY_LOCATION_PRINT (yyoutput, *yylocationp);
5286  YYFPRINTF (p, ": ");
5287  yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, p);
5288  YYFPRINTF (p, ")");
5289 }
5290 
5291 /*------------------------------------------------------------------.
5292 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
5293 | TOP (included). |
5294 `------------------------------------------------------------------*/
5295 
5296 static void
5297 ruby_parser_yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop, struct parser_params *p)
5298 #define yy_stack_print(b, t) ruby_parser_yy_stack_print(b, t, p)
5299 {
5300  YYFPRINTF (p, "Stack now");
5301  for (; yybottom <= yytop; yybottom++)
5302  {
5303  int yybot = *yybottom;
5304  YYFPRINTF (p, " %d", yybot);
5305  }
5306  YYFPRINTF (p, "\n");
5307 }
5308 
5309 # define YY_STACK_PRINT(Bottom, Top) \
5310 do { \
5311  if (yydebug) \
5312  yy_stack_print ((Bottom), (Top)); \
5313 } while (0)
5314 
5315 
5316 /*------------------------------------------------.
5317 | Report that the YYRULE is going to be reduced. |
5318 `------------------------------------------------*/
5319 
5320 static void
5321 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, struct parser_params *p)
5322 {
5323  unsigned long int yylno = yyrline[yyrule];
5324  int yynrhs = yyr2[yyrule];
5325  int yyi;
5326  YYFPRINTF (p, "Reducing stack by rule %d (line %lu):\n",
5327  yyrule - 1, yylno);
5328  /* The symbols being reduced. */
5329  for (yyi = 0; yyi < yynrhs; yyi++)
5330  {
5331  YYFPRINTF (p, " $%d = ", yyi + 1);
5332  yy_symbol_print (stderr,
5333  yystos[yyssp[yyi + 1 - yynrhs]],
5334  &(yyvsp[(yyi + 1) - (yynrhs)])
5335  , &(yylsp[(yyi + 1) - (yynrhs)]) , p);
5336  YYFPRINTF (p, "\n");
5337  }
5338 }
5339 
5340 # define YY_REDUCE_PRINT(Rule) \
5341 do { \
5342  if (yydebug) \
5343  yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
5344 } while (0)
5345 
5346 /* Nonzero means print parse trace. It is left uninitialized so that
5347  multiple parsers can coexist. */
5348 #ifndef yydebug
5349 int yydebug;
5350 #endif
5351 #else /* !YYDEBUG */
5352 # define YYDPRINTF(Args)
5353 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
5354 # define YY_STACK_PRINT(Bottom, Top)
5355 # define YY_REDUCE_PRINT(Rule)
5356 #endif /* !YYDEBUG */
5357 
5358 
5359 /* YYINITDEPTH -- initial size of the parser's stacks. */
5360 #ifndef YYINITDEPTH
5361 # define YYINITDEPTH 200
5362 #endif
5363 
5364 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
5365  if the built-in stack extension method is used).
5366 
5367  Do not make this value too large; the results are undefined if
5368  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
5369  evaluated with infinite-precision integer arithmetic. */
5370 
5371 #ifndef YYMAXDEPTH
5372 # define YYMAXDEPTH 10000
5373 #endif
5374 
5375 
5376 #if YYERROR_VERBOSE
5377 
5378 # ifndef yystrlen
5379 # if defined __GLIBC__ && defined _STRING_H
5380 # define yystrlen strlen
5381 # else
5382 /* Return the length of YYSTR. */
5383 static YYSIZE_T
5384 yystrlen (const char *yystr)
5385 {
5386  YYSIZE_T yylen;
5387  for (yylen = 0; yystr[yylen]; yylen++)
5388  continue;
5389  return yylen;
5390 }
5391 # endif
5392 # endif
5393 
5394 # ifndef yystpcpy
5395 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
5396 # define yystpcpy stpcpy
5397 # else
5398 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
5399  YYDEST. */
5400 static char *
5401 yystpcpy (char *yydest, const char *yysrc)
5402 {
5403  char *yyd = yydest;
5404  const char *yys = yysrc;
5405 
5406  while ((*yyd++ = *yys++) != '\0')
5407  continue;
5408 
5409  return yyd - 1;
5410 }
5411 # endif
5412 # endif
5413 
5414 # ifndef yytnamerr
5415 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
5416  quotes and backslashes, so that it's suitable for yyerror. The
5417  heuristic is that double-quoting is unnecessary unless the string
5418  contains an apostrophe, a comma, or backslash (other than
5419  backslash-backslash). YYSTR is taken from yytname. If YYRES is
5420  null, do not copy; instead, return the length of what the result
5421  would have been. */
5422 static YYSIZE_T
5423 yytnamerr (char *yyres, const char *yystr)
5424 {
5425  if (*yystr == '"')
5426  {
5427  YYSIZE_T yyn = 0;
5428  char const *yyp = yystr;
5429 
5430  for (;;)
5431  switch (*++yyp)
5432  {
5433  case '\'':
5434  case ',':
5435  goto do_not_strip_quotes;
5436 
5437  case '\\':
5438  if (*++yyp != '\\')
5439  goto do_not_strip_quotes;
5440  /* Fall through. */
5441  default:
5442  if (yyres)
5443  yyres[yyn] = *yyp;
5444  yyn++;
5445  break;
5446 
5447  case '"':
5448  if (yyres)
5449  yyres[yyn] = '\0';
5450  return yyn;
5451  }
5452  do_not_strip_quotes: ;
5453  }
5454 
5455  if (! yyres)
5456  return yystrlen (yystr);
5457 
5458  return yystpcpy (yyres, yystr) - yyres;
5459 }
5460 # endif
5461 
5462 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
5463  about the unexpected token YYTOKEN for the state stack whose top is
5464  YYSSP.
5465 
5466  Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
5467  not large enough to hold the message. In that case, also set
5468  *YYMSG_ALLOC to the required number of bytes. Return 2 if the
5469  required number of bytes is too large to store. */
5470 static int
5471 yysyntax_error (struct parser_params *p, YYSIZE_T *yymsg_alloc, char **yymsg,
5472  yytype_int16 *yyssp, int yytoken)
5473 {
5474  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
5475  YYSIZE_T yysize = yysize0;
5476  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
5477  /* Internationalized format string. */
5478  const char *yyformat = YY_NULLPTR;
5479  /* Arguments of yyformat. */
5480  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
5481  /* Number of reported tokens (one for the "unexpected", one per
5482  "expected"). */
5483  int yycount = 0;
5484 
5485  /* There are many possibilities here to consider:
5486  - If this state is a consistent state with a default action, then
5487  the only way this function was invoked is if the default action
5488  is an error action. In that case, don't check for expected
5489  tokens because there are none.
5490  - The only way there can be no lookahead present (in yychar) is if
5491  this state is a consistent state with a default action. Thus,
5492  detecting the absence of a lookahead is sufficient to determine
5493  that there is no unexpected or expected token to report. In that
5494  case, just report a simple "syntax error".
5495  - Don't assume there isn't a lookahead just because this state is a
5496  consistent state with a default action. There might have been a
5497  previous inconsistent state, consistent state with a non-default
5498  action, or user semantic action that manipulated yychar.
5499  - Of course, the expected token list depends on states to have
5500  correct lookahead information, and it depends on the parser not
5501  to perform extra reductions after fetching a lookahead from the
5502  scanner and before detecting a syntax error. Thus, state merging
5503  (from LALR or IELR) and default reductions corrupt the expected
5504  token list. However, the list is correct for canonical LR with
5505  one exception: it will still contain any token that will not be
5506  accepted due to an error action in a later state.
5507  */
5508  if (yytoken != YYEMPTY)
5509  {
5510  int yyn = yypact[*yyssp];
5511  yyarg[yycount++] = yytname[yytoken];
5512  if (!yypact_value_is_default (yyn))
5513  {
5514  /* Start YYX at -YYN if negative to avoid negative indexes in
5515  YYCHECK. In other words, skip the first -YYN actions for
5516  this state because they are default actions. */
5517  int yyxbegin = yyn < 0 ? -yyn : 0;
5518  /* Stay within bounds of both yycheck and yytname. */
5519  int yychecklim = YYLAST - yyn + 1;
5520  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
5521  int yyx;
5522 
5523  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
5524  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
5525  && !yytable_value_is_error (yytable[yyx + yyn]))
5526  {
5527  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
5528  {
5529  yycount = 1;
5530  yysize = yysize0;
5531  break;
5532  }
5533  yyarg[yycount++] = yytname[yyx];
5534  {
5535  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
5536  if (! (yysize <= yysize1
5537  && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
5538  return 2;
5539  yysize = yysize1;
5540  }
5541  }
5542  }
5543  }
5544 
5545  switch (yycount)
5546  {
5547 # define YYCASE_(N, S) \
5548  case N: \
5549  yyformat = S; \
5550  break
5551  YYCASE_(0, YY_("syntax error"));
5552  YYCASE_(1, YY_("syntax error, unexpected %s"));
5553  YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
5554  YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
5555  YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
5556  YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
5557 # undef YYCASE_
5558  }
5559 
5560  {
5561  YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
5562  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
5563  return 2;
5564  yysize = yysize1;
5565  }
5566 
5567  if (*yymsg_alloc < yysize)
5568  {
5569  *yymsg_alloc = 2 * yysize;
5570  if (! (yysize <= *yymsg_alloc
5571  && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
5572  *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
5573  return 1;
5574  }
5575 
5576  /* Avoid sprintf, as that infringes on the user's name space.
5577  Don't have undefined behavior even if the translation
5578  produced a string with the wrong number of "%s"s. */
5579  {
5580  char *yyp = *yymsg;
5581  int yyi = 0;
5582  while ((*yyp = *yyformat) != '\0')
5583  if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
5584  {
5585  yyp += yytnamerr (yyp, yyarg[yyi++]);
5586  yyformat += 2;
5587  }
5588  else
5589  {
5590  yyp++;
5591  yyformat++;
5592  }
5593  }
5594  return 0;
5595 }
5596 #endif /* YYERROR_VERBOSE */
5597 
5598 /*-----------------------------------------------.
5599 | Release the memory associated to this symbol. |
5600 `-----------------------------------------------*/
5601 
5602 static void
5603 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
5604 {
5605  YYUSE (yyvaluep);
5606  YYUSE (yylocationp);
5607  YYUSE (p);
5608  if (!yymsg)
5609  yymsg = "Deleting";
5610  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
5611 
5613  YYUSE (yytype);
5615 }
5616 
5617 
5618 
5619 
5620 /*----------.
5621 | yyparse. |
5622 `----------*/
5623 
5624 int
5626 {
5627 /* The lookahead symbol. */
5628 int yychar;
5629 
5630 
5631 /* The semantic value of the lookahead symbol. */
5632 /* Default value used for initialization, for pacifying older GCCs
5633  or non-GCC compilers. */
5634 YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
5635 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
5636 
5637 /* Location data for the lookahead symbol. */
5638 static YYLTYPE yyloc_default
5639 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
5640  = { 1, 1, 1, 1 }
5641 # endif
5642 ;
5643 YYLTYPE yylloc = yyloc_default;
5644 
5645  /* Number of syntax errors so far. */
5646  int yynerrs;
5647 
5648  int yystate;
5649  /* Number of tokens to shift before error messages enabled. */
5650  int yyerrstatus;
5651 
5652  /* The stacks and their tools:
5653  'yyss': related to states.
5654  'yyvs': related to semantic values.
5655  'yyls': related to locations.
5656 
5657  Refer to the stacks through separate pointers, to allow yyoverflow
5658  to reallocate them elsewhere. */
5659 
5660  /* The state stack. */
5661  yytype_int16 yyssa[YYINITDEPTH];
5662  yytype_int16 *yyss;
5663  yytype_int16 *yyssp;
5664 
5665  /* The semantic value stack. */
5666  YYSTYPE yyvsa[YYINITDEPTH];
5667  YYSTYPE *yyvs;
5668  YYSTYPE *yyvsp;
5669 
5670  /* The location stack. */
5671  YYLTYPE yylsa[YYINITDEPTH];
5672  YYLTYPE *yyls;
5673  YYLTYPE *yylsp;
5674 
5675  /* The locations where the error started and ended. */
5676  YYLTYPE yyerror_range[3];
5677 
5678  YYSIZE_T yystacksize;
5679 
5680  int yyn;
5681  int yyresult;
5682  /* Lookahead token as an internal (translated) token number. */
5683  int yytoken = 0;
5684  /* The variables used to return semantic value and location from the
5685  action routines. */
5686  YYSTYPE yyval;
5687  YYLTYPE yyloc;
5688 
5689 #if YYERROR_VERBOSE
5690  /* Buffer for error messages, and its allocated size. */
5691  char yymsgbuf[128];
5692  char *yymsg = yymsgbuf;
5693  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
5694 #endif
5695 
5696 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
5697 
5698  /* The number of symbols on the RHS of the reduced rule.
5699  Keep to zero when no symbol should be popped. */
5700  int yylen = 0;
5701 
5702  yyssp = yyss = yyssa;
5703  yyvsp = yyvs = yyvsa;
5704  yylsp = yyls = yylsa;
5705  yystacksize = YYINITDEPTH;
5706 
5707  YYDPRINTF ((p, "Starting parse\n"));
5708 
5709  yystate = 0;
5710  yyerrstatus = 0;
5711  yynerrs = 0;
5712  yychar = YYEMPTY; /* Cause a token to be read. */
5713 
5714 /* User initialization code. */
5715 #line 974 "parse.y" /* yacc.c:1429 */
5716 {
5717  RUBY_SET_YYLLOC_OF_NONE(yylloc);
5718 }
5719 
5720 #line 5716 "parse.c" /* yacc.c:1429 */
5721  yylsp[0] = yylloc;
5722  goto yysetstate;
5723 
5724 /*------------------------------------------------------------.
5725 | yynewstate -- Push a new state, which is found in yystate. |
5726 `------------------------------------------------------------*/
5727  yynewstate:
5728  /* In all cases, when you get here, the value and location stacks
5729  have just been pushed. So pushing a state here evens the stacks. */
5730  yyssp++;
5731 
5732  yysetstate:
5733  *yyssp = yystate;
5734 
5735  if (yyss + yystacksize - 1 <= yyssp)
5736  {
5737  /* Get the current used size of the three stacks, in elements. */
5738  YYSIZE_T yysize = yyssp - yyss + 1;
5739 
5740 #ifdef yyoverflow
5741  {
5742  /* Give user a chance to reallocate the stack. Use copies of
5743  these so that the &'s don't force the real ones into
5744  memory. */
5745  YYSTYPE *yyvs1 = yyvs;
5746  yytype_int16 *yyss1 = yyss;
5747  YYLTYPE *yyls1 = yyls;
5748 
5749  /* Each stack pointer address is followed by the size of the
5750  data in use in that stack, in bytes. This used to be a
5751  conditional around just the two extra args, but that might
5752  be undefined if yyoverflow is a macro. */
5753  yyoverflow (YY_("memory exhausted"),
5754  &yyss1, yysize * sizeof (*yyssp),
5755  &yyvs1, yysize * sizeof (*yyvsp),
5756  &yyls1, yysize * sizeof (*yylsp),
5757  &yystacksize);
5758 
5759  yyls = yyls1;
5760  yyss = yyss1;
5761  yyvs = yyvs1;
5762  }
5763 #else /* no yyoverflow */
5764 # ifndef YYSTACK_RELOCATE
5765  goto yyexhaustedlab;
5766 # else
5767  /* Extend the stack our own way. */
5768  if (YYMAXDEPTH <= yystacksize)
5769  goto yyexhaustedlab;
5770  yystacksize *= 2;
5771  if (YYMAXDEPTH < yystacksize)
5772  yystacksize = YYMAXDEPTH;
5773 
5774  {
5775  yytype_int16 *yyss1 = yyss;
5776  union yyalloc *yyptr =
5777  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
5778  if (! yyptr)
5779  goto yyexhaustedlab;
5780  YYSTACK_RELOCATE (yyss_alloc, yyss);
5781  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
5782  YYSTACK_RELOCATE (yyls_alloc, yyls);
5783 # undef YYSTACK_RELOCATE
5784  if (yyss1 != yyssa)
5785  YYSTACK_FREE (yyss1);
5786  }
5787 # endif
5788 #endif /* no yyoverflow */
5789 
5790  yyssp = yyss + yysize - 1;
5791  yyvsp = yyvs + yysize - 1;
5792  yylsp = yyls + yysize - 1;
5793 
5794  YYDPRINTF ((p, "Stack size increased to %lu\n",
5795  (unsigned long int) yystacksize));
5796 
5797  if (yyss + yystacksize - 1 <= yyssp)
5798  YYABORT;
5799  }
5800 
5801  YYDPRINTF ((p, "Entering state %d\n", yystate));
5802 
5803  if (yystate == YYFINAL)
5804  YYACCEPT;
5805 
5806  goto yybackup;
5807 
5808 /*-----------.
5809 | yybackup. |
5810 `-----------*/
5811 yybackup:
5812 
5813  /* Do appropriate processing given the current state. Read a
5814  lookahead token if we need one and don't already have one. */
5815 
5816  /* First try to decide what to do without reference to lookahead token. */
5817  yyn = yypact[yystate];
5818  if (yypact_value_is_default (yyn))
5819  goto yydefault;
5820 
5821  /* Not known => get a lookahead token if don't already have one. */
5822 
5823  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
5824  if (yychar == YYEMPTY)
5825  {
5826  YYDPRINTF ((p, "Reading a token: "));
5827  yychar = yylex (&yylval, &yylloc, p);
5828  }
5829 
5830  if (yychar <= YYEOF)
5831  {
5832  yychar = yytoken = YYEOF;
5833  YYDPRINTF ((p, "Now at end of input.\n"));
5834  }
5835  else
5836  {
5837  yytoken = YYTRANSLATE (yychar);
5838  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
5839  }
5840 
5841  /* If the proper action on seeing token YYTOKEN is to reduce or to
5842  detect an error, take that action. */
5843  yyn += yytoken;
5844  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
5845  goto yydefault;
5846  yyn = yytable[yyn];
5847  if (yyn <= 0)
5848  {
5849  if (yytable_value_is_error (yyn))
5850  goto yyerrlab;
5851  yyn = -yyn;
5852  goto yyreduce;
5853  }
5854 
5855  /* Count tokens shifted since error; after three, turn off error
5856  status. */
5857  if (yyerrstatus)
5858  yyerrstatus--;
5859 
5860  /* Shift the lookahead token. */
5861  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
5862 
5863  /* Discard the shifted token. */
5864  yychar = YYEMPTY;
5865 
5866  yystate = yyn;
5868  *++yyvsp = yylval;
5870  *++yylsp = yylloc;
5871  goto yynewstate;
5872 
5873 
5874 /*-----------------------------------------------------------.
5875 | yydefault -- do the default action for the current state. |
5876 `-----------------------------------------------------------*/
5877 yydefault:
5878  yyn = yydefact[yystate];
5879  if (yyn == 0)
5880  goto yyerrlab;
5881  goto yyreduce;
5882 
5883 
5884 /*-----------------------------.
5885 | yyreduce -- Do a reduction. |
5886 `-----------------------------*/
5887 yyreduce:
5888  /* yyn is the number of a rule to reduce with. */
5889  yylen = yyr2[yyn];
5890 
5891  /* If YYLEN is nonzero, implement the default value of the action:
5892  '$$ = $1'.
5893 
5894  Otherwise, the following line sets YYVAL to garbage.
5895  This behavior is undocumented and Bison
5896  users should not rely upon it. Assigning to YYVAL
5897  unconditionally makes the parser a bit smaller, and it avoids a
5898  GCC warning that YYVAL may be used uninitialized. */
5899  yyval = yyvsp[1-yylen];
5900 
5901  /* Default location. */
5902  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
5903  YY_REDUCE_PRINT (yyn);
5904  switch (yyn)
5905  {
5906  case 2:
5907 #line 1176 "parse.y" /* yacc.c:1646 */
5908  {
5909  SET_LEX_STATE(EXPR_BEG);
5910  local_push(p, ifndef_ripper(1)+0);
5911  }
5912 #line 5908 "parse.c" /* yacc.c:1646 */
5913  break;
5914 
5915  case 3:
5916 #line 1181 "parse.y" /* yacc.c:1646 */
5917  {
5918  /*%%%*/
5919  if ((yyvsp[0].node) && !compile_for_eval) {
5920  NODE *node = (yyvsp[0].node);
5921  /* last expression should not be void */
5922  if (nd_type(node) == NODE_BLOCK) {
5923  while (node->nd_next) {
5924  node = node->nd_next;
5925  }
5926  node = node->nd_head;
5927  }
5928  node = remove_begin(node);
5929  void_expr(p, node);
5930  }
5931  p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].node)), &(yyloc));
5932  /*% %*/
5933  /*% ripper[final]: program!($2) %*/
5934  local_pop(p);
5935  }
5936 #line 5932 "parse.c" /* yacc.c:1646 */
5937  break;
5938 
5939  case 4:
5940 #line 1203 "parse.y" /* yacc.c:1646 */
5941  {
5942  (yyval.node) = void_stmts(p, (yyvsp[-1].node));
5943  }
5944 #line 5940 "parse.c" /* yacc.c:1646 */
5945  break;
5946 
5947  case 5:
5948 #line 1209 "parse.y" /* yacc.c:1646 */
5949  {
5950  /*%%%*/
5951  (yyval.node) = NEW_BEGIN(0, &(yyloc));
5952  /*% %*/
5953  /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
5954  }
5955 #line 5951 "parse.c" /* yacc.c:1646 */
5956  break;
5957 
5958  case 6:
5959 #line 1216 "parse.y" /* yacc.c:1646 */
5960  {
5961  /*%%%*/
5962  (yyval.node) = newline_node((yyvsp[0].node));
5963  /*% %*/
5964  /*% ripper: stmts_add!(stmts_new!, $1) %*/
5965  }
5966 #line 5962 "parse.c" /* yacc.c:1646 */
5967  break;
5968 
5969  case 7:
5970 #line 1223 "parse.y" /* yacc.c:1646 */
5971  {
5972  /*%%%*/
5973  (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
5974  /*% %*/
5975  /*% ripper: stmts_add!($1, $3) %*/
5976  }
5977 #line 5973 "parse.c" /* yacc.c:1646 */
5978  break;
5979 
5980  case 8:
5981 #line 1230 "parse.y" /* yacc.c:1646 */
5982  {
5983  (yyval.node) = remove_begin((yyvsp[0].node));
5984  }
5985 #line 5981 "parse.c" /* yacc.c:1646 */
5986  break;
5987 
5988  case 10:
5989 #line 1237 "parse.y" /* yacc.c:1646 */
5990  {
5991  (yyval.node) = (yyvsp[0].node);
5992  }
5993 #line 5989 "parse.c" /* yacc.c:1646 */
5994  break;
5995 
5996  case 11:
5997 #line 1243 "parse.y" /* yacc.c:1646 */
5998  {
5999  /*%%%*/
6000  p->eval_tree_begin = block_append(p, p->eval_tree_begin,
6001  NEW_BEGIN((yyvsp[-1].node), &(yyloc)));
6002  (yyval.node) = NEW_BEGIN(0, &(yyloc));
6003  /*% %*/
6004  /*% ripper: BEGIN!($2) %*/
6005  }
6006 #line 6002 "parse.c" /* yacc.c:1646 */
6007  break;
6008 
6009  case 12:
6010 #line 1255 "parse.y" /* yacc.c:1646 */
6011  {if (!(yyvsp[-1].node)) {yyerror1(&(yylsp[0]), "else without rescue is useless");}}
6012 #line 6008 "parse.c" /* yacc.c:1646 */
6013  break;
6014 
6015  case 13:
6016 #line 1258 "parse.y" /* yacc.c:1646 */
6017  {
6018  /*%%%*/
6019  (yyval.node) = new_bodystmt(p, (yyvsp[-5].node), (yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
6020  /*% %*/
6021  /*% ripper: bodystmt!(escape_Qundef($1), escape_Qundef($2), escape_Qundef($5), escape_Qundef($6)) %*/
6022  }
6023 #line 6019 "parse.c" /* yacc.c:1646 */
6024  break;
6025 
6026  case 14:
6027 #line 1267 "parse.y" /* yacc.c:1646 */
6028  {
6029  /*%%%*/
6030  (yyval.node) = new_bodystmt(p, (yyvsp[-2].node), (yyvsp[-1].node), 0, (yyvsp[0].node), &(yyloc));
6031  /*% %*/
6032  /*% ripper: bodystmt!(escape_Qundef($1), escape_Qundef($2), Qnil, escape_Qundef($3)) %*/
6033  }
6034 #line 6030 "parse.c" /* yacc.c:1646 */
6035  break;
6036 
6037  case 15:
6038 #line 1276 "parse.y" /* yacc.c:1646 */
6039  {
6040  (yyval.node) = void_stmts(p, (yyvsp[-1].node));
6041  }
6042 #line 6038 "parse.c" /* yacc.c:1646 */
6043  break;
6044 
6045  case 16:
6046 #line 1282 "parse.y" /* yacc.c:1646 */
6047  {
6048  /*%%%*/
6049  (yyval.node) = NEW_BEGIN(0, &(yyloc));
6050  /*% %*/
6051  /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
6052  }
6053 #line 6049 "parse.c" /* yacc.c:1646 */
6054  break;
6055 
6056  case 17:
6057 #line 1289 "parse.y" /* yacc.c:1646 */
6058  {
6059  /*%%%*/
6060  (yyval.node) = newline_node((yyvsp[0].node));
6061  /*% %*/
6062  /*% ripper: stmts_add!(stmts_new!, $1) %*/
6063  }
6064 #line 6060 "parse.c" /* yacc.c:1646 */
6065  break;
6066 
6067  case 18:
6068 #line 1296 "parse.y" /* yacc.c:1646 */
6069  {
6070  /*%%%*/
6071  (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
6072  /*% %*/
6073  /*% ripper: stmts_add!($1, $3) %*/
6074  }
6075 #line 6071 "parse.c" /* yacc.c:1646 */
6076  break;
6077 
6078  case 19:
6079 #line 1303 "parse.y" /* yacc.c:1646 */
6080  {
6081  (yyval.node) = remove_begin((yyvsp[0].node));
6082  }
6083 #line 6079 "parse.c" /* yacc.c:1646 */
6084  break;
6085 
6086  case 20:
6087 #line 1309 "parse.y" /* yacc.c:1646 */
6088  {
6089  (yyval.node) = (yyvsp[0].node);
6090  }
6091 #line 6087 "parse.c" /* yacc.c:1646 */
6092  break;
6093 
6094  case 21:
6095 #line 1313 "parse.y" /* yacc.c:1646 */
6096  {
6097  yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
6098  }
6099 #line 6095 "parse.c" /* yacc.c:1646 */
6100  break;
6101 
6102  case 22:
6103 #line 1317 "parse.y" /* yacc.c:1646 */
6104  {
6105  (yyval.node) = (yyvsp[0].node);
6106  }
6107 #line 6103 "parse.c" /* yacc.c:1646 */
6108  break;
6109 
6110  case 23:
6111 #line 1322 "parse.y" /* yacc.c:1646 */
6112  {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
6113 #line 6109 "parse.c" /* yacc.c:1646 */
6114  break;
6115 
6116  case 24:
6117 #line 1323 "parse.y" /* yacc.c:1646 */
6118  {
6119  /*%%%*/
6120  (yyval.node) = NEW_ALIAS((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
6121  /*% %*/
6122  /*% ripper: alias!($2, $4) %*/
6123  }
6124 #line 6120 "parse.c" /* yacc.c:1646 */
6125  break;
6126 
6127  case 25:
6128 #line 1330 "parse.y" /* yacc.c:1646 */
6129  {
6130  /*%%%*/
6131  (yyval.node) = NEW_VALIAS((yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
6132  /*% %*/
6133  /*% ripper: var_alias!($2, $3) %*/
6134  }
6135 #line 6131 "parse.c" /* yacc.c:1646 */
6136  break;
6137 
6138  case 26:
6139 #line 1337 "parse.y" /* yacc.c:1646 */
6140  {
6141  /*%%%*/
6142  char buf[2];
6143  buf[0] = '$';
6144  buf[1] = (char)(yyvsp[0].node)->nd_nth;
6145  (yyval.node) = NEW_VALIAS((yyvsp[-1].id), rb_intern2(buf, 2), &(yyloc));
6146  /*% %*/
6147  /*% ripper: var_alias!($2, $3) %*/
6148  }
6149 #line 6145 "parse.c" /* yacc.c:1646 */
6150  break;
6151 
6152  case 27:
6153 #line 1347 "parse.y" /* yacc.c:1646 */
6154  {
6155  /*%%%*/
6156  yyerror1(&(yylsp[0]), "can't make alias for the number variables");
6157  (yyval.node) = NEW_BEGIN(0, &(yyloc));
6158  /*% %*/
6159  /*% ripper[error]: alias_error!(var_alias!($2, $3)) %*/
6160  }
6161 #line 6157 "parse.c" /* yacc.c:1646 */
6162  break;
6163 
6164  case 28:
6165 #line 1355 "parse.y" /* yacc.c:1646 */
6166  {
6167  /*%%%*/
6168  (yyval.node) = (yyvsp[0].node);
6169  /*% %*/
6170  /*% ripper: undef!($2) %*/
6171  }
6172 #line 6168 "parse.c" /* yacc.c:1646 */
6173  break;
6174 
6175  case 29:
6176 #line 1362 "parse.y" /* yacc.c:1646 */
6177  {
6178  /*%%%*/
6179  (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc));
6180  fixpos((yyval.node), (yyvsp[0].node));
6181  /*% %*/
6182  /*% ripper: if_mod!($3, $1) %*/
6183  }
6184 #line 6180 "parse.c" /* yacc.c:1646 */
6185  break;
6186 
6187  case 30:
6188 #line 1370 "parse.y" /* yacc.c:1646 */
6189  {
6190  /*%%%*/
6191  (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc));
6192  fixpos((yyval.node), (yyvsp[0].node));
6193  /*% %*/
6194  /*% ripper: unless_mod!($3, $1) %*/
6195  }
6196 #line 6192 "parse.c" /* yacc.c:1646 */
6197  break;
6198 
6199  case 31:
6200 #line 1378 "parse.y" /* yacc.c:1646 */
6201  {
6202  /*%%%*/
6203  if ((yyvsp[-2].node) && nd_type((yyvsp[-2].node)) == NODE_BEGIN) {
6204  (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node)->nd_body, 0, &(yyloc));
6205  }
6206  else {
6207  (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc));
6208  }
6209  /*% %*/
6210  /*% ripper: while_mod!($3, $1) %*/
6211  }
6212 #line 6208 "parse.c" /* yacc.c:1646 */
6213  break;
6214 
6215  case 32:
6216 #line 1390 "parse.y" /* yacc.c:1646 */
6217  {
6218  /*%%%*/
6219  if ((yyvsp[-2].node) && nd_type((yyvsp[-2].node)) == NODE_BEGIN) {
6220  (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node)->nd_body, 0, &(yyloc));
6221  }
6222  else {
6223  (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc));
6224  }
6225  /*% %*/
6226  /*% ripper: until_mod!($3, $1) %*/
6227  }
6228 #line 6224 "parse.c" /* yacc.c:1646 */
6229  break;
6230 
6231  case 33:
6232 #line 1402 "parse.y" /* yacc.c:1646 */
6233  {
6234  /*%%%*/
6235  NODE *resq;
6236  YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
6237  resq = NEW_RESBODY(0, remove_begin((yyvsp[0].node)), 0, &loc);
6238  (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[-2].node)), resq, 0, &(yyloc));
6239  /*% %*/
6240  /*% ripper: rescue_mod!($1, $3) %*/
6241  }
6242 #line 6238 "parse.c" /* yacc.c:1646 */
6243  break;
6244 
6245  case 34:
6246 #line 1412 "parse.y" /* yacc.c:1646 */
6247  {
6248  if (p->in_def) {
6249  rb_warn0("END in method; use at_exit");
6250  }
6251  /*%%%*/
6252  {
6253  NODE *scope = NEW_NODE(
6254  NODE_SCOPE, 0 /* tbl */, (yyvsp[-1].node) /* body */, 0 /* args */, &(yyloc));
6255  (yyval.node) = NEW_POSTEXE(scope, &(yyloc));
6256  }
6257  /*% %*/
6258  /*% ripper: END!($3) %*/
6259  }
6260 #line 6256 "parse.c" /* yacc.c:1646 */
6261  break;
6262 
6263  case 36:
6264 #line 1427 "parse.y" /* yacc.c:1646 */
6265  {
6266  /*%%%*/
6267  value_expr((yyvsp[0].node));
6268  (yyval.node) = node_assign(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
6269  /*% %*/
6270  /*% ripper: massign!($1, $3) %*/
6271  }
6272 #line 6268 "parse.c" /* yacc.c:1646 */
6273  break;
6274 
6275  case 37:
6276 #line 1435 "parse.y" /* yacc.c:1646 */
6277  {
6278  /*%%%*/
6279  value_expr((yyvsp[0].node));
6280  (yyval.node) = node_assign(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
6281  /*% %*/
6282  /*% ripper: assign!($1, $3) %*/
6283  }
6284 #line 6280 "parse.c" /* yacc.c:1646 */
6285  break;
6286 
6287  case 38:
6288 #line 1443 "parse.y" /* yacc.c:1646 */
6289  {
6290  /*%%%*/
6291  YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
6292  value_expr((yyvsp[-2].node));
6293  (yyval.node) = node_assign(p, (yyvsp[-4].node), NEW_RESCUE((yyvsp[-2].node), NEW_RESBODY(0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc)), &(yyloc));
6294  /*% %*/
6295  /*% ripper: massign!($1, rescue_mod!($3, $5)) %*/
6296  }
6297 #line 6293 "parse.c" /* yacc.c:1646 */
6298  break;
6299 
6300  case 39:
6301 #line 1452 "parse.y" /* yacc.c:1646 */
6302  {
6303  /*%%%*/
6304  (yyval.node) = node_assign(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
6305  /*% %*/
6306  /*% ripper: massign!($1, $3) %*/
6307  }
6308 #line 6304 "parse.c" /* yacc.c:1646 */
6309  break;
6310 
6311  case 41:
6312 #line 1462 "parse.y" /* yacc.c:1646 */
6313  {
6314  /*%%%*/
6315  (yyval.node) = node_assign(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
6316  /*% %*/
6317  /*% ripper: assign!($1, $3) %*/
6318  }
6319 #line 6315 "parse.c" /* yacc.c:1646 */
6320  break;
6321 
6322  case 42:
6323 #line 1469 "parse.y" /* yacc.c:1646 */
6324  {
6325  /*%%%*/
6326  (yyval.node) = new_op_assign(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
6327  /*% %*/
6328  /*% ripper: opassign!($1, $2, $3) %*/
6329  }
6330 #line 6326 "parse.c" /* yacc.c:1646 */
6331  break;
6332 
6333  case 43:
6334 #line 1476 "parse.y" /* yacc.c:1646 */
6335  {
6336  /*%%%*/
6337  (yyval.node) = new_ary_op_assign(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-3]), &(yyloc));
6338  /*% %*/
6339  /*% ripper: opassign!(aref_field!($1, escape_Qundef($3)), $5, $6) %*/
6340 
6341  }
6342 #line 6338 "parse.c" /* yacc.c:1646 */
6343  break;
6344 
6345  case 44:
6346 #line 1484 "parse.y" /* yacc.c:1646 */
6347  {
6348  /*%%%*/
6349  (yyval.node) = new_attr_op_assign(p, (yyvsp[-4].node), (yyvsp[-3].id), (yyvsp[-2].id), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
6350  /*% %*/
6351  /*% ripper: opassign!(field!($1, $2, $3), $4, $5) %*/
6352  }
6353 #line 6349 "parse.c" /* yacc.c:1646 */
6354  break;
6355 
6356  case 45:
6357 #line 1491 "parse.y" /* yacc.c:1646 */
6358  {
6359  /*%%%*/
6360  (yyval.node) = new_attr_op_assign(p, (yyvsp[-4].node), (yyvsp[-3].id), (yyvsp[-2].id), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
6361  /*% %*/
6362  /*% ripper: opassign!(field!($1, $2, $3), $4, $5) %*/
6363  }
6364 #line 6360 "parse.c" /* yacc.c:1646 */
6365  break;
6366 
6367  case 46:
6368 #line 1498 "parse.y" /* yacc.c:1646 */
6369  {
6370  /*%%%*/
6371  YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-2]));
6372  (yyval.node) = new_const_op_assign(p, NEW_COLON2((yyvsp[-4].node), (yyvsp[-2].id), &loc), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
6373  /*% %*/
6374  /*% ripper: opassign!(const_path_field!($1, $3), $4, $5) %*/
6375  }
6376 #line 6372 "parse.c" /* yacc.c:1646 */
6377  break;
6378 
6379  case 47:
6380 #line 1506 "parse.y" /* yacc.c:1646 */
6381  {
6382  /*%%%*/
6383  (yyval.node) = new_attr_op_assign(p, (yyvsp[-4].node), ID2VAL(idCOLON2), (yyvsp[-2].id), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
6384  /*% %*/
6385  /*% ripper: opassign!(field!($1, ID2VAL(idCOLON2), $3), $4, $5) %*/
6386  }
6387 #line 6383 "parse.c" /* yacc.c:1646 */
6388  break;
6389 
6390  case 48:
6391 #line 1513 "parse.y" /* yacc.c:1646 */
6392  {
6393  /*%%%*/
6394  rb_backref_error(p, (yyvsp[-2].node));
6395  (yyval.node) = NEW_BEGIN(0, &(yyloc));
6396  /*% %*/
6397  /*% ripper[error]: assign_error!(assign!(var_field(p, $1), $3)) %*/
6398  }
6399 #line 6395 "parse.c" /* yacc.c:1646 */
6400  break;
6401 
6402  case 49:
6403 #line 1523 "parse.y" /* yacc.c:1646 */
6404  {
6405  value_expr((yyvsp[0].node));
6406  (yyval.node) = (yyvsp[0].node);
6407  }
6408 #line 6404 "parse.c" /* yacc.c:1646 */
6409  break;
6410 
6411  case 50:
6412 #line 1528 "parse.y" /* yacc.c:1646 */
6413  {
6414  /*%%%*/
6415  YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
6416  value_expr((yyvsp[-2].node));
6417  (yyval.node) = NEW_RESCUE((yyvsp[-2].node), NEW_RESBODY(0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
6418  /*% %*/
6419  /*% ripper: rescue_mod!($1, $3) %*/
6420  }
6421 #line 6417 "parse.c" /* yacc.c:1646 */
6422  break;
6423 
6424  case 53:
6425 #line 1541 "parse.y" /* yacc.c:1646 */
6426  {
6427  (yyval.node) = logop(p, idAND, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
6428  }
6429 #line 6425 "parse.c" /* yacc.c:1646 */
6430  break;
6431 
6432  case 54:
6433 #line 1545 "parse.y" /* yacc.c:1646 */
6434  {
6435  (yyval.node) = logop(p, idOR, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
6436  }
6437 #line 6433 "parse.c" /* yacc.c:1646 */
6438  break;
6439 
6440  case 55:
6441 #line 1549 "parse.y" /* yacc.c:1646 */
6442  {
6443  (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
6444  }
6445 #line 6441 "parse.c" /* yacc.c:1646 */
6446  break;
6447 
6448  case 56:
6449 #line 1553 "parse.y" /* yacc.c:1646 */
6450  {
6451  (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
6452  }
6453 #line 6449 "parse.c" /* yacc.c:1646 */
6454  break;
6455 
6456  case 57:
6457 #line 1557 "parse.y" /* yacc.c:1646 */
6458  {
6459  value_expr((yyvsp[-1].node));
6460  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
6461  p->command_start = FALSE;
6462  (yyval.num) = p->in_kwarg;
6463  p->in_kwarg = 1;
6464  }
6465 #line 6461 "parse.c" /* yacc.c:1646 */
6466  break;
6467 
6468  case 58:
6469 #line 1564 "parse.y" /* yacc.c:1646 */
6470  {(yyval.tbl) = push_pvtbl(p);}
6471 #line 6467 "parse.c" /* yacc.c:1646 */
6472  break;
6473 
6474  case 59:
6475 #line 1566 "parse.y" /* yacc.c:1646 */
6476  {pop_pvtbl(p, (yyvsp[-1].tbl));}
6477 #line 6473 "parse.c" /* yacc.c:1646 */
6478  break;
6479 
6480  case 60:
6481 #line 1567 "parse.y" /* yacc.c:1646 */
6482  {
6483  p->in_kwarg = !!(yyvsp[-3].num);
6484  /*%%%*/
6485  (yyval.node) = new_case3(p, (yyvsp[-5].node), NEW_IN((yyvsp[-1].node), 0, 0, &(yylsp[-1])), &(yyloc));
6486  /*% %*/
6487  /*% ripper: case!($1, in!($5, Qnil, Qnil)) %*/
6488  }
6489 #line 6485 "parse.c" /* yacc.c:1646 */
6490  break;
6491 
6492  case 62:
6493 #line 1578 "parse.y" /* yacc.c:1646 */
6494  {
6495  value_expr((yyvsp[0].node));
6496  (yyval.node) = (yyvsp[0].node);
6497  }
6498 #line 6494 "parse.c" /* yacc.c:1646 */
6499  break;
6500 
6501  case 63:
6502 #line 1584 "parse.y" /* yacc.c:1646 */
6503  {COND_PUSH(1);}
6504 #line 6500 "parse.c" /* yacc.c:1646 */
6505  break;
6506 
6507  case 64:
6508 #line 1584 "parse.y" /* yacc.c:1646 */
6509  {COND_POP();}
6510 #line 6506 "parse.c" /* yacc.c:1646 */
6511  break;
6512 
6513  case 65:
6514 #line 1585 "parse.y" /* yacc.c:1646 */
6515  {
6516  (yyval.node) = (yyvsp[-2].node);
6517  }
6518 #line 6514 "parse.c" /* yacc.c:1646 */
6519  break;
6520 
6521  case 69:
6522 #line 1596 "parse.y" /* yacc.c:1646 */
6523  {
6524  /*%%%*/
6525  (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
6526  /*% %*/
6527  /*% ripper: method_add_arg!(call!($1, $2, $3), $4) %*/
6528  }
6529 #line 6525 "parse.c" /* yacc.c:1646 */
6530  break;
6531 
6532  case 70:
6533 #line 1605 "parse.y" /* yacc.c:1646 */
6534  {
6535  (yyval.node) = (yyvsp[-1].node);
6536  /*%%%*/
6537  (yyval.node)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
6538  nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
6539  /*% %*/
6540  }
6541 #line 6537 "parse.c" /* yacc.c:1646 */
6542  break;
6543 
6544  case 71:
6545 #line 1615 "parse.y" /* yacc.c:1646 */
6546  {
6547  /*%%%*/
6548  (yyval.node) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
6549  nd_set_line((yyval.node), p->tokline);
6550  /*% %*/
6551  /*% ripper: $1 %*/
6552  }
6553 #line 6549 "parse.c" /* yacc.c:1646 */
6554  break;
6555 
6556  case 72:
6557 #line 1625 "parse.y" /* yacc.c:1646 */
6558  {
6559  /*%%%*/
6560  (yyvsp[-1].node)->nd_args = (yyvsp[0].node);
6561  nd_set_last_loc((yyvsp[-1].node), (yylsp[0]).end_pos);
6562  (yyval.node) = (yyvsp[-1].node);
6563  /*% %*/
6564  /*% ripper: command!($1, $2) %*/
6565  }
6566 #line 6562 "parse.c" /* yacc.c:1646 */
6567  break;
6568 
6569  case 73:
6570 #line 1634 "parse.y" /* yacc.c:1646 */
6571  {
6572  /*%%%*/
6573  block_dup_check(p, (yyvsp[-1].node), (yyvsp[0].node));
6574  (yyvsp[-2].node)->nd_args = (yyvsp[-1].node);
6575  (yyval.node) = method_add_block(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
6576  fixpos((yyval.node), (yyvsp[-2].node));
6577  nd_set_last_loc((yyvsp[-2].node), (yylsp[-1]).end_pos);
6578  /*% %*/
6579  /*% ripper: method_add_block!(command!($1, $2), $3) %*/
6580  }
6581 #line 6577 "parse.c" /* yacc.c:1646 */
6582  break;
6583 
6584  case 74:
6585 #line 1645 "parse.y" /* yacc.c:1646 */
6586  {
6587  /*%%%*/
6588  (yyval.node) = new_command_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), Qnull, &(yylsp[-1]), &(yyloc));
6589  /*% %*/
6590  /*% ripper: command_call!($1, $2, $3, $4) %*/
6591  }
6592 #line 6588 "parse.c" /* yacc.c:1646 */
6593  break;
6594 
6595  case 75:
6596 #line 1652 "parse.y" /* yacc.c:1646 */
6597  {
6598  /*%%%*/
6599  (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
6600  /*% %*/
6601  /*% ripper: method_add_block!(command_call!($1, $2, $3, $4), $5) %*/
6602  }
6603 #line 6599 "parse.c" /* yacc.c:1646 */
6604  break;
6605 
6606  case 76:
6607 #line 1659 "parse.y" /* yacc.c:1646 */
6608  {
6609  /*%%%*/
6610  (yyval.node) = new_command_qcall(p, ID2VAL(idCOLON2), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), Qnull, &(yylsp[-1]), &(yyloc));
6611  /*% %*/
6612  /*% ripper: command_call!($1, ID2VAL(idCOLON2), $3, $4) %*/
6613  }
6614 #line 6610 "parse.c" /* yacc.c:1646 */
6615  break;
6616 
6617  case 77:
6618 #line 1666 "parse.y" /* yacc.c:1646 */
6619  {
6620  /*%%%*/
6621  (yyval.node) = new_command_qcall(p, ID2VAL(idCOLON2), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
6622  /*% %*/
6623  /*% ripper: method_add_block!(command_call!($1, ID2VAL(idCOLON2), $3, $4), $5) %*/
6624  }
6625 #line 6621 "parse.c" /* yacc.c:1646 */
6626  break;
6627 
6628  case 78:
6629 #line 1673 "parse.y" /* yacc.c:1646 */
6630  {
6631  /*%%%*/
6632  (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc));
6633  fixpos((yyval.node), (yyvsp[0].node));
6634  /*% %*/
6635  /*% ripper: super!($2) %*/
6636  }
6637 #line 6633 "parse.c" /* yacc.c:1646 */
6638  break;
6639 
6640  case 79:
6641 #line 1681 "parse.y" /* yacc.c:1646 */
6642  {
6643  /*%%%*/
6644  (yyval.node) = new_yield(p, (yyvsp[0].node), &(yyloc));
6645  fixpos((yyval.node), (yyvsp[0].node));
6646  /*% %*/
6647  /*% ripper: yield!($2) %*/
6648  }
6649 #line 6645 "parse.c" /* yacc.c:1646 */
6650  break;
6651 
6652  case 80:
6653 #line 1689 "parse.y" /* yacc.c:1646 */
6654  {
6655  /*%%%*/
6656  (yyval.node) = NEW_RETURN(ret_args(p, (yyvsp[0].node)), &(yyloc));
6657  /*% %*/
6658  /*% ripper: return!($2) %*/
6659  }
6660 #line 6656 "parse.c" /* yacc.c:1646 */
6661  break;
6662 
6663  case 81:
6664 #line 1696 "parse.y" /* yacc.c:1646 */
6665  {
6666  /*%%%*/
6667  (yyval.node) = NEW_BREAK(ret_args(p, (yyvsp[0].node)), &(yyloc));
6668  /*% %*/
6669  /*% ripper: break!($2) %*/
6670  }
6671 #line 6667 "parse.c" /* yacc.c:1646 */
6672  break;
6673 
6674  case 82:
6675 #line 1703 "parse.y" /* yacc.c:1646 */
6676  {
6677  /*%%%*/
6678  (yyval.node) = NEW_NEXT(ret_args(p, (yyvsp[0].node)), &(yyloc));
6679  /*% %*/
6680  /*% ripper: next!($2) %*/
6681  }
6682 #line 6678 "parse.c" /* yacc.c:1646 */
6683  break;
6684 
6685  case 84:
6686 #line 1713 "parse.y" /* yacc.c:1646 */
6687  {
6688  /*%%%*/
6689  (yyval.node) = (yyvsp[-1].node);
6690  /*% %*/
6691  /*% ripper: mlhs_paren!($2) %*/
6692  }
6693 #line 6689 "parse.c" /* yacc.c:1646 */
6694  break;
6695 
6696  case 86:
6697 #line 1723 "parse.y" /* yacc.c:1646 */
6698  {
6699  /*%%%*/
6700  (yyval.node) = NEW_MASGN(NEW_LIST((yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
6701  /*% %*/
6702  /*% ripper: mlhs_paren!($2) %*/
6703  }
6704 #line 6700 "parse.c" /* yacc.c:1646 */
6705  break;
6706 
6707  case 87:
6708 #line 1732 "parse.y" /* yacc.c:1646 */
6709  {
6710  /*%%%*/
6711  (yyval.node) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
6712  /*% %*/
6713  /*% ripper: $1 %*/
6714  }
6715 #line 6711 "parse.c" /* yacc.c:1646 */
6716  break;
6717 
6718  case 88:
6719 #line 1739 "parse.y" /* yacc.c:1646 */
6720  {
6721  /*%%%*/
6722  (yyval.node) = NEW_MASGN(list_append(p, (yyvsp[-1].node),(yyvsp[0].node)), 0, &(yyloc));
6723  /*% %*/
6724  /*% ripper: mlhs_add!($1, $2) %*/
6725  }
6726 #line 6722 "parse.c" /* yacc.c:1646 */
6727  break;
6728 
6729  case 89:
6730 #line 1746 "parse.y" /* yacc.c:1646 */
6731  {
6732  /*%%%*/
6733  (yyval.node) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
6734  /*% %*/
6735  /*% ripper: mlhs_add_star!($1, $3) %*/
6736  }
6737 #line 6733 "parse.c" /* yacc.c:1646 */
6738  break;
6739 
6740  case 90:
6741 #line 1753 "parse.y" /* yacc.c:1646 */
6742  {
6743  /*%%%*/
6744  (yyval.node) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
6745  /*% %*/
6746  /*% ripper: mlhs_add_post!(mlhs_add_star!($1, $3), $5) %*/
6747  }
6748 #line 6744 "parse.c" /* yacc.c:1646 */
6749  break;
6750 
6751  case 91:
6752 #line 1760 "parse.y" /* yacc.c:1646 */
6753  {
6754  /*%%%*/
6755  (yyval.node) = NEW_MASGN((yyvsp[-1].node), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
6756  /*% %*/
6757  /*% ripper: mlhs_add_star!($1, Qnil) %*/
6758  }
6759 #line 6755 "parse.c" /* yacc.c:1646 */
6760  break;
6761 
6762  case 92:
6763 #line 1767 "parse.y" /* yacc.c:1646 */
6764  {
6765  /*%%%*/
6766  (yyval.node) = NEW_MASGN((yyvsp[-3].node), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
6767  /*% %*/
6768  /*% ripper: mlhs_add_post!(mlhs_add_star!($1, Qnil), $4) %*/
6769  }
6770 #line 6766 "parse.c" /* yacc.c:1646 */
6771  break;
6772 
6773  case 93:
6774 #line 1774 "parse.y" /* yacc.c:1646 */
6775  {
6776  /*%%%*/
6777  (yyval.node) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
6778  /*% %*/
6779  /*% ripper: mlhs_add_star!(mlhs_new!, $2) %*/
6780  }
6781 #line 6777 "parse.c" /* yacc.c:1646 */
6782  break;
6783 
6784  case 94:
6785 #line 1781 "parse.y" /* yacc.c:1646 */
6786  {
6787  /*%%%*/
6788  (yyval.node) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
6789  /*% %*/
6790  /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $2), $4) %*/
6791  }
6792 #line 6788 "parse.c" /* yacc.c:1646 */
6793  break;
6794 
6795  case 95:
6796 #line 1788 "parse.y" /* yacc.c:1646 */
6797  {
6798  /*%%%*/
6799  (yyval.node) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
6800  /*% %*/
6801  /*% ripper: mlhs_add_star!(mlhs_new!, Qnil) %*/
6802  }
6803 #line 6799 "parse.c" /* yacc.c:1646 */
6804  break;
6805 
6806  case 96:
6807 #line 1795 "parse.y" /* yacc.c:1646 */
6808  {
6809  /*%%%*/
6810  (yyval.node) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
6811  /*% %*/
6812  /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, Qnil), $3) %*/
6813  }
6814 #line 6810 "parse.c" /* yacc.c:1646 */
6815  break;
6816 
6817  case 98:
6818 #line 1805 "parse.y" /* yacc.c:1646 */
6819  {
6820  /*%%%*/
6821  (yyval.node) = (yyvsp[-1].node);
6822  /*% %*/
6823  /*% ripper: mlhs_paren!($2) %*/
6824  }
6825 #line 6821 "parse.c" /* yacc.c:1646 */
6826  break;
6827 
6828  case 99:
6829 #line 1814 "parse.y" /* yacc.c:1646 */
6830  {
6831  /*%%%*/
6832  (yyval.node) = NEW_LIST((yyvsp[-1].node), &(yylsp[-1]));
6833  /*% %*/
6834  /*% ripper: mlhs_add!(mlhs_new!, $1) %*/
6835  }
6836 #line 6832 "parse.c" /* yacc.c:1646 */
6837  break;
6838 
6839  case 100:
6840 #line 1821 "parse.y" /* yacc.c:1646 */
6841  {
6842  /*%%%*/
6843  (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
6844  /*% %*/
6845  /*% ripper: mlhs_add!($1, $2) %*/
6846  }
6847 #line 6843 "parse.c" /* yacc.c:1646 */
6848  break;
6849 
6850  case 101:
6851 #line 1830 "parse.y" /* yacc.c:1646 */
6852  {
6853  /*%%%*/
6854  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
6855  /*% %*/
6856  /*% ripper: mlhs_add!(mlhs_new!, $1) %*/
6857  }
6858 #line 6854 "parse.c" /* yacc.c:1646 */
6859  break;
6860 
6861  case 102:
6862 #line 1837 "parse.y" /* yacc.c:1646 */
6863  {
6864  /*%%%*/
6865  (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
6866  /*% %*/
6867  /*% ripper: mlhs_add!($1, $3) %*/
6868  }
6869 #line 6865 "parse.c" /* yacc.c:1646 */
6870  break;
6871 
6872  case 103:
6873 #line 1846 "parse.y" /* yacc.c:1646 */
6874  {
6875  /*%%%*/
6876  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
6877  /*% %*/
6878  /*% ripper: assignable(p, var_field(p, $1)) %*/
6879  }
6880 #line 6876 "parse.c" /* yacc.c:1646 */
6881  break;
6882 
6883  case 104:
6884 #line 1853 "parse.y" /* yacc.c:1646 */
6885  {
6886  /*%%%*/
6887  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
6888  /*% %*/
6889  /*% ripper: assignable(p, var_field(p, $1)) %*/
6890  }
6891 #line 6887 "parse.c" /* yacc.c:1646 */
6892  break;
6893 
6894  case 105:
6895 #line 1860 "parse.y" /* yacc.c:1646 */
6896  {
6897  /*%%%*/
6898  (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
6899  /*% %*/
6900  /*% ripper: aref_field!($1, escape_Qundef($3)) %*/
6901  }
6902 #line 6898 "parse.c" /* yacc.c:1646 */
6903  break;
6904 
6905  case 106:
6906 #line 1867 "parse.y" /* yacc.c:1646 */
6907  {
6908  if ((yyvsp[-1].id) == tANDDOT) {
6909  yyerror1(&(yylsp[-1]), "&. inside multiple assignment destination");
6910  }
6911  /*%%%*/
6912  (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
6913  /*% %*/
6914  /*% ripper: field!($1, $2, $3) %*/
6915  }
6916 #line 6912 "parse.c" /* yacc.c:1646 */
6917  break;
6918 
6919  case 107:
6920 #line 1877 "parse.y" /* yacc.c:1646 */
6921  {
6922  /*%%%*/
6923  (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
6924  /*% %*/
6925  /*% ripper: const_path_field!($1, $3) %*/
6926  }
6927 #line 6923 "parse.c" /* yacc.c:1646 */
6928  break;
6929 
6930  case 108:
6931 #line 1884 "parse.y" /* yacc.c:1646 */
6932  {
6933  if ((yyvsp[-1].id) == tANDDOT) {
6934  yyerror1(&(yylsp[-1]), "&. inside multiple assignment destination");
6935  }
6936  /*%%%*/
6937  (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
6938  /*% %*/
6939  /*% ripper: field!($1, $2, $3) %*/
6940  }
6941 #line 6937 "parse.c" /* yacc.c:1646 */
6942  break;
6943 
6944  case 109:
6945 #line 1894 "parse.y" /* yacc.c:1646 */
6946  {
6947  /*%%%*/
6948  (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc)), &(yyloc));
6949  /*% %*/
6950  /*% ripper: const_decl(p, const_path_field!($1, $3)) %*/
6951  }
6952 #line 6948 "parse.c" /* yacc.c:1646 */
6953  break;
6954 
6955  case 110:
6956 #line 1901 "parse.y" /* yacc.c:1646 */
6957  {
6958  /*%%%*/
6959  (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc)), &(yyloc));
6960  /*% %*/
6961  /*% ripper: const_decl(p, top_const_field!($2)) %*/
6962  }
6963 #line 6959 "parse.c" /* yacc.c:1646 */
6964  break;
6965 
6966  case 111:
6967 #line 1908 "parse.y" /* yacc.c:1646 */
6968  {
6969  /*%%%*/
6970  rb_backref_error(p, (yyvsp[0].node));
6971  (yyval.node) = NEW_BEGIN(0, &(yyloc));
6972  /*% %*/
6973  /*% ripper[error]: assign_error!(var_field(p, $1)) %*/
6974  }
6975 #line 6971 "parse.c" /* yacc.c:1646 */
6976  break;
6977 
6978  case 112:
6979 #line 1918 "parse.y" /* yacc.c:1646 */
6980  {
6981  /*%%%*/
6982  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
6983  /*% %*/
6984  /*% ripper: assignable(p, var_field(p, $1)) %*/
6985  }
6986 #line 6982 "parse.c" /* yacc.c:1646 */
6987  break;
6988 
6989  case 113:
6990 #line 1925 "parse.y" /* yacc.c:1646 */
6991  {
6992  /*%%%*/
6993  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
6994  /*% %*/
6995  /*% ripper: assignable(p, var_field(p, $1)) %*/
6996  }
6997 #line 6993 "parse.c" /* yacc.c:1646 */
6998  break;
6999 
7000  case 114:
7001 #line 1932 "parse.y" /* yacc.c:1646 */
7002  {
7003  /*%%%*/
7004  (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
7005  /*% %*/
7006  /*% ripper: aref_field!($1, escape_Qundef($3)) %*/
7007  }
7008 #line 7004 "parse.c" /* yacc.c:1646 */
7009  break;
7010 
7011  case 115:
7012 #line 1939 "parse.y" /* yacc.c:1646 */
7013  {
7014  /*%%%*/
7015  (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
7016  /*% %*/
7017  /*% ripper: field!($1, $2, $3) %*/
7018  }
7019 #line 7015 "parse.c" /* yacc.c:1646 */
7020  break;
7021 
7022  case 116:
7023 #line 1946 "parse.y" /* yacc.c:1646 */
7024  {
7025  /*%%%*/
7026  (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
7027  /*% %*/
7028  /*% ripper: field!($1, ID2VAL(idCOLON2), $3) %*/
7029  }
7030 #line 7026 "parse.c" /* yacc.c:1646 */
7031  break;
7032 
7033  case 117:
7034 #line 1953 "parse.y" /* yacc.c:1646 */
7035  {
7036  /*%%%*/
7037  (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
7038  /*% %*/
7039  /*% ripper: field!($1, $2, $3) %*/
7040  }
7041 #line 7037 "parse.c" /* yacc.c:1646 */
7042  break;
7043 
7044  case 118:
7045 #line 1960 "parse.y" /* yacc.c:1646 */
7046  {
7047  /*%%%*/
7048  (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc)), &(yyloc));
7049  /*% %*/
7050  /*% ripper: const_decl(p, const_path_field!($1, $3)) %*/
7051  }
7052 #line 7048 "parse.c" /* yacc.c:1646 */
7053  break;
7054 
7055  case 119:
7056 #line 1967 "parse.y" /* yacc.c:1646 */
7057  {
7058  /*%%%*/
7059  (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc)), &(yyloc));
7060  /*% %*/
7061  /*% ripper: const_decl(p, top_const_field!($2)) %*/
7062  }
7063 #line 7059 "parse.c" /* yacc.c:1646 */
7064  break;
7065 
7066  case 120:
7067 #line 1974 "parse.y" /* yacc.c:1646 */
7068  {
7069  /*%%%*/
7070  rb_backref_error(p, (yyvsp[0].node));
7071  (yyval.node) = NEW_BEGIN(0, &(yyloc));
7072  /*% %*/
7073  /*% ripper[error]: assign_error!(var_field(p, $1)) %*/
7074  }
7075 #line 7071 "parse.c" /* yacc.c:1646 */
7076  break;
7077 
7078  case 121:
7079 #line 1984 "parse.y" /* yacc.c:1646 */
7080  {
7081  /*%%%*/
7082  yyerror1(&(yylsp[0]), "class/module name must be CONSTANT");
7083  /*% %*/
7084  /*% ripper[error]: class_name_error!($1) %*/
7085  }
7086 #line 7082 "parse.c" /* yacc.c:1646 */
7087  break;
7088 
7089  case 123:
7090 #line 1994 "parse.y" /* yacc.c:1646 */
7091  {
7092  /*%%%*/
7093  (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
7094  /*% %*/
7095  /*% ripper: top_const_ref!($2) %*/
7096  }
7097 #line 7093 "parse.c" /* yacc.c:1646 */
7098  break;
7099 
7100  case 124:
7101 #line 2001 "parse.y" /* yacc.c:1646 */
7102  {
7103  /*%%%*/
7104  (yyval.node) = NEW_COLON2(0, (yyval.node), &(yyloc));
7105  /*% %*/
7106  /*% ripper: const_ref!($1) %*/
7107  }
7108 #line 7104 "parse.c" /* yacc.c:1646 */
7109  break;
7110 
7111  case 125:
7112 #line 2008 "parse.y" /* yacc.c:1646 */
7113  {
7114  /*%%%*/
7115  (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
7116  /*% %*/
7117  /*% ripper: const_path_ref!($1, $3) %*/
7118  }
7119 #line 7115 "parse.c" /* yacc.c:1646 */
7120  break;
7121 
7122  case 129:
7123 #line 2020 "parse.y" /* yacc.c:1646 */
7124  {
7125  SET_LEX_STATE(EXPR_ENDFN);
7126  (yyval.id) = (yyvsp[0].id);
7127  }
7128 #line 7124 "parse.c" /* yacc.c:1646 */
7129  break;
7130 
7131  case 130:
7132 #line 2025 "parse.y" /* yacc.c:1646 */
7133  {
7134  SET_LEX_STATE(EXPR_ENDFN);
7135  (yyval.id) = (yyvsp[0].id);
7136  }
7137 #line 7133 "parse.c" /* yacc.c:1646 */
7138  break;
7139 
7140  case 131:
7141 #line 2032 "parse.y" /* yacc.c:1646 */
7142  {
7143  /*%%%*/
7144  (yyval.node) = NEW_LIT(ID2SYM((yyvsp[0].id)), &(yyloc));
7145  /*% %*/
7146  /*% ripper: symbol_literal!($1) %*/
7147  }
7148 #line 7144 "parse.c" /* yacc.c:1646 */
7149  break;
7150 
7151  case 133:
7152 #line 2042 "parse.y" /* yacc.c:1646 */
7153  {
7154  /*%%%*/
7155  (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
7156  /*% %*/
7157  /*% ripper: rb_ary_new3(1, get_value($1)) %*/
7158  }
7159 #line 7155 "parse.c" /* yacc.c:1646 */
7160  break;
7161 
7162  case 134:
7163 #line 2048 "parse.y" /* yacc.c:1646 */
7164  {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
7165 #line 7161 "parse.c" /* yacc.c:1646 */
7166  break;
7167 
7168  case 135:
7169 #line 2049 "parse.y" /* yacc.c:1646 */
7170  {
7171  /*%%%*/
7172  NODE *undef = NEW_UNDEF((yyvsp[0].node), &(yylsp[0]));
7173  (yyval.node) = block_append(p, (yyvsp[-3].node), undef);
7174  /*% %*/
7175  /*% ripper: rb_ary_push($1, get_value($4)) %*/
7176  }
7177 #line 7173 "parse.c" /* yacc.c:1646 */
7178  break;
7179 
7180  case 136:
7181 #line 2058 "parse.y" /* yacc.c:1646 */
7182  { ifndef_ripper((yyval.id) = '|'); }
7183 #line 7179 "parse.c" /* yacc.c:1646 */
7184  break;
7185 
7186  case 137:
7187 #line 2059 "parse.y" /* yacc.c:1646 */
7188  { ifndef_ripper((yyval.id) = '^'); }
7189 #line 7185 "parse.c" /* yacc.c:1646 */
7190  break;
7191 
7192  case 138:
7193 #line 2060 "parse.y" /* yacc.c:1646 */
7194  { ifndef_ripper((yyval.id) = '&'); }
7195 #line 7191 "parse.c" /* yacc.c:1646 */
7196  break;
7197 
7198  case 139:
7199 #line 2061 "parse.y" /* yacc.c:1646 */
7200  { ifndef_ripper((yyval.id) = tCMP); }
7201 #line 7197 "parse.c" /* yacc.c:1646 */
7202  break;
7203 
7204  case 140:
7205 #line 2062 "parse.y" /* yacc.c:1646 */
7206  { ifndef_ripper((yyval.id) = tEQ); }
7207 #line 7203 "parse.c" /* yacc.c:1646 */
7208  break;
7209 
7210  case 141:
7211 #line 2063 "parse.y" /* yacc.c:1646 */
7212  { ifndef_ripper((yyval.id) = tEQQ); }
7213 #line 7209 "parse.c" /* yacc.c:1646 */
7214  break;
7215 
7216  case 142:
7217 #line 2064 "parse.y" /* yacc.c:1646 */
7218  { ifndef_ripper((yyval.id) = tMATCH); }
7219 #line 7215 "parse.c" /* yacc.c:1646 */
7220  break;
7221 
7222  case 143:
7223 #line 2065 "parse.y" /* yacc.c:1646 */
7224  { ifndef_ripper((yyval.id) = tNMATCH); }
7225 #line 7221 "parse.c" /* yacc.c:1646 */
7226  break;
7227 
7228  case 144:
7229 #line 2066 "parse.y" /* yacc.c:1646 */
7230  { ifndef_ripper((yyval.id) = '>'); }
7231 #line 7227 "parse.c" /* yacc.c:1646 */
7232  break;
7233 
7234  case 145:
7235 #line 2067 "parse.y" /* yacc.c:1646 */
7236  { ifndef_ripper((yyval.id) = tGEQ); }
7237 #line 7233 "parse.c" /* yacc.c:1646 */
7238  break;
7239 
7240  case 146:
7241 #line 2068 "parse.y" /* yacc.c:1646 */
7242  { ifndef_ripper((yyval.id) = '<'); }
7243 #line 7239 "parse.c" /* yacc.c:1646 */
7244  break;
7245 
7246  case 147:
7247 #line 2069 "parse.y" /* yacc.c:1646 */
7248  { ifndef_ripper((yyval.id) = tLEQ); }
7249 #line 7245 "parse.c" /* yacc.c:1646 */
7250  break;
7251 
7252  case 148:
7253 #line 2070 "parse.y" /* yacc.c:1646 */
7254  { ifndef_ripper((yyval.id) = tNEQ); }
7255 #line 7251 "parse.c" /* yacc.c:1646 */
7256  break;
7257 
7258  case 149:
7259 #line 2071 "parse.y" /* yacc.c:1646 */
7260  { ifndef_ripper((yyval.id) = tLSHFT); }
7261 #line 7257 "parse.c" /* yacc.c:1646 */
7262  break;
7263 
7264  case 150:
7265 #line 2072 "parse.y" /* yacc.c:1646 */
7266  { ifndef_ripper((yyval.id) = tRSHFT); }
7267 #line 7263 "parse.c" /* yacc.c:1646 */
7268  break;
7269 
7270  case 151:
7271 #line 2073 "parse.y" /* yacc.c:1646 */
7272  { ifndef_ripper((yyval.id) = '+'); }
7273 #line 7269 "parse.c" /* yacc.c:1646 */
7274  break;
7275 
7276  case 152:
7277 #line 2074 "parse.y" /* yacc.c:1646 */
7278  { ifndef_ripper((yyval.id) = '-'); }
7279 #line 7275 "parse.c" /* yacc.c:1646 */
7280  break;
7281 
7282  case 153:
7283 #line 2075 "parse.y" /* yacc.c:1646 */
7284  { ifndef_ripper((yyval.id) = '*'); }
7285 #line 7281 "parse.c" /* yacc.c:1646 */
7286  break;
7287 
7288  case 154:
7289 #line 2076 "parse.y" /* yacc.c:1646 */
7290  { ifndef_ripper((yyval.id) = '*'); }
7291 #line 7287 "parse.c" /* yacc.c:1646 */
7292  break;
7293 
7294  case 155:
7295 #line 2077 "parse.y" /* yacc.c:1646 */
7296  { ifndef_ripper((yyval.id) = '/'); }
7297 #line 7293 "parse.c" /* yacc.c:1646 */
7298  break;
7299 
7300  case 156:
7301 #line 2078 "parse.y" /* yacc.c:1646 */
7302  { ifndef_ripper((yyval.id) = '%'); }
7303 #line 7299 "parse.c" /* yacc.c:1646 */
7304  break;
7305 
7306  case 157:
7307 #line 2079 "parse.y" /* yacc.c:1646 */
7308  { ifndef_ripper((yyval.id) = tPOW); }
7309 #line 7305 "parse.c" /* yacc.c:1646 */
7310  break;
7311 
7312  case 158:
7313 #line 2080 "parse.y" /* yacc.c:1646 */
7314  { ifndef_ripper((yyval.id) = tDSTAR); }
7315 #line 7311 "parse.c" /* yacc.c:1646 */
7316  break;
7317 
7318  case 159:
7319 #line 2081 "parse.y" /* yacc.c:1646 */
7320  { ifndef_ripper((yyval.id) = '!'); }
7321 #line 7317 "parse.c" /* yacc.c:1646 */
7322  break;
7323 
7324  case 160:
7325 #line 2082 "parse.y" /* yacc.c:1646 */
7326  { ifndef_ripper((yyval.id) = '~'); }
7327 #line 7323 "parse.c" /* yacc.c:1646 */
7328  break;
7329 
7330  case 161:
7331 #line 2083 "parse.y" /* yacc.c:1646 */
7332  { ifndef_ripper((yyval.id) = tUPLUS); }
7333 #line 7329 "parse.c" /* yacc.c:1646 */
7334  break;
7335 
7336  case 162:
7337 #line 2084 "parse.y" /* yacc.c:1646 */
7338  { ifndef_ripper((yyval.id) = tUMINUS); }
7339 #line 7335 "parse.c" /* yacc.c:1646 */
7340  break;
7341 
7342  case 163:
7343 #line 2085 "parse.y" /* yacc.c:1646 */
7344  { ifndef_ripper((yyval.id) = tAREF); }
7345 #line 7341 "parse.c" /* yacc.c:1646 */
7346  break;
7347 
7348  case 164:
7349 #line 2086 "parse.y" /* yacc.c:1646 */
7350  { ifndef_ripper((yyval.id) = tASET); }
7351 #line 7347 "parse.c" /* yacc.c:1646 */
7352  break;
7353 
7354  case 165:
7355 #line 2087 "parse.y" /* yacc.c:1646 */
7356  { ifndef_ripper((yyval.id) = '`'); }
7357 #line 7353 "parse.c" /* yacc.c:1646 */
7358  break;
7359 
7360  case 207:
7361 #line 2105 "parse.y" /* yacc.c:1646 */
7362  {
7363  /*%%%*/
7364  (yyval.node) = node_assign(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
7365  /*% %*/
7366  /*% ripper: assign!($1, $3) %*/
7367  }
7368 #line 7364 "parse.c" /* yacc.c:1646 */
7369  break;
7370 
7371  case 208:
7372 #line 2112 "parse.y" /* yacc.c:1646 */
7373  {
7374  /*%%%*/
7375  (yyval.node) = new_op_assign(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7376  /*% %*/
7377  /*% ripper: opassign!($1, $2, $3) %*/
7378  }
7379 #line 7375 "parse.c" /* yacc.c:1646 */
7380  break;
7381 
7382  case 209:
7383 #line 2119 "parse.y" /* yacc.c:1646 */
7384  {
7385  /*%%%*/
7386  value_expr((yyvsp[0].node));
7387  (yyval.node) = new_ary_op_assign(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-3]), &(yyloc));
7388  /*% %*/
7389  /*% ripper: opassign!(aref_field!($1, escape_Qundef($3)), $5, $6) %*/
7390  }
7391 #line 7387 "parse.c" /* yacc.c:1646 */
7392  break;
7393 
7394  case 210:
7395 #line 2127 "parse.y" /* yacc.c:1646 */
7396  {
7397  /*%%%*/
7398  value_expr((yyvsp[0].node));
7399  (yyval.node) = new_attr_op_assign(p, (yyvsp[-4].node), (yyvsp[-3].id), (yyvsp[-2].id), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7400  /*% %*/
7401  /*% ripper: opassign!(field!($1, $2, $3), $4, $5) %*/
7402  }
7403 #line 7399 "parse.c" /* yacc.c:1646 */
7404  break;
7405 
7406  case 211:
7407 #line 2135 "parse.y" /* yacc.c:1646 */
7408  {
7409  /*%%%*/
7410  value_expr((yyvsp[0].node));
7411  (yyval.node) = new_attr_op_assign(p, (yyvsp[-4].node), (yyvsp[-3].id), (yyvsp[-2].id), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7412  /*% %*/
7413  /*% ripper: opassign!(field!($1, $2, $3), $4, $5) %*/
7414  }
7415 #line 7411 "parse.c" /* yacc.c:1646 */
7416  break;
7417 
7418  case 212:
7419 #line 2143 "parse.y" /* yacc.c:1646 */
7420  {
7421  /*%%%*/
7422  value_expr((yyvsp[0].node));
7423  (yyval.node) = new_attr_op_assign(p, (yyvsp[-4].node), ID2VAL(idCOLON2), (yyvsp[-2].id), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7424  /*% %*/
7425  /*% ripper: opassign!(field!($1, ID2VAL(idCOLON2), $3), $4, $5) %*/
7426  }
7427 #line 7423 "parse.c" /* yacc.c:1646 */
7428  break;
7429 
7430  case 213:
7431 #line 2151 "parse.y" /* yacc.c:1646 */
7432  {
7433  /*%%%*/
7434  YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-2]));
7435  (yyval.node) = new_const_op_assign(p, NEW_COLON2((yyvsp[-4].node), (yyvsp[-2].id), &loc), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7436  /*% %*/
7437  /*% ripper: opassign!(const_path_field!($1, $3), $4, $5) %*/
7438  }
7439 #line 7435 "parse.c" /* yacc.c:1646 */
7440  break;
7441 
7442  case 214:
7443 #line 2159 "parse.y" /* yacc.c:1646 */
7444  {
7445  /*%%%*/
7446  (yyval.node) = new_const_op_assign(p, NEW_COLON3((yyvsp[-2].id), &(yyloc)), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7447  /*% %*/
7448  /*% ripper: opassign!(top_const_field!($2), $3, $4) %*/
7449  }
7450 #line 7446 "parse.c" /* yacc.c:1646 */
7451  break;
7452 
7453  case 215:
7454 #line 2166 "parse.y" /* yacc.c:1646 */
7455  {
7456  /*%%%*/
7457  rb_backref_error(p, (yyvsp[-2].node));
7458  (yyval.node) = NEW_BEGIN(0, &(yyloc));
7459  /*% %*/
7460  /*% ripper[error]: assign_error!(opassign!(var_field(p, $1), $2, $3)) %*/
7461  }
7462 #line 7458 "parse.c" /* yacc.c:1646 */
7463  break;
7464 
7465  case 216:
7466 #line 2174 "parse.y" /* yacc.c:1646 */
7467  {
7468  /*%%%*/
7469  value_expr((yyvsp[-2].node));
7470  value_expr((yyvsp[0].node));
7471  (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
7472  /*% %*/
7473  /*% ripper: dot2!($1, $3) %*/
7474  }
7475 #line 7471 "parse.c" /* yacc.c:1646 */
7476  break;
7477 
7478  case 217:
7479 #line 2183 "parse.y" /* yacc.c:1646 */
7480  {
7481  /*%%%*/
7482  value_expr((yyvsp[-2].node));
7483  value_expr((yyvsp[0].node));
7484  (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
7485  /*% %*/
7486  /*% ripper: dot3!($1, $3) %*/
7487  }
7488 #line 7484 "parse.c" /* yacc.c:1646 */
7489  break;
7490 
7491  case 218:
7492 #line 2192 "parse.y" /* yacc.c:1646 */
7493  {
7494  /*%%%*/
7495  YYLTYPE loc;
7496  loc.beg_pos = (yylsp[0]).end_pos;
7497  loc.end_pos = (yylsp[0]).end_pos;
7498 
7499  value_expr((yyvsp[-1].node));
7500  (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil(&loc), &(yyloc));
7501  /*% %*/
7502  /*% ripper: dot2!($1, Qnil) %*/
7503  }
7504 #line 7500 "parse.c" /* yacc.c:1646 */
7505  break;
7506 
7507  case 219:
7508 #line 2204 "parse.y" /* yacc.c:1646 */
7509  {
7510  /*%%%*/
7511  YYLTYPE loc;
7512  loc.beg_pos = (yylsp[0]).end_pos;
7513  loc.end_pos = (yylsp[0]).end_pos;
7514 
7515  value_expr((yyvsp[-1].node));
7516  (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil(&loc), &(yyloc));
7517  /*% %*/
7518  /*% ripper: dot3!($1, Qnil) %*/
7519  }
7520 #line 7516 "parse.c" /* yacc.c:1646 */
7521  break;
7522 
7523  case 220:
7524 #line 2216 "parse.y" /* yacc.c:1646 */
7525  {
7526  /*%%%*/
7527  YYLTYPE loc;
7528  loc.beg_pos = (yylsp[-1]).beg_pos;
7529  loc.end_pos = (yylsp[-1]).beg_pos;
7530 
7531  value_expr((yyvsp[0].node));
7532  (yyval.node) = NEW_DOT2(new_nil(&loc), (yyvsp[0].node), &(yyloc));
7533  /*% %*/
7534  /*% ripper: dot2!(Qnil, $2) %*/
7535  }
7536 #line 7532 "parse.c" /* yacc.c:1646 */
7537  break;
7538 
7539  case 221:
7540 #line 2228 "parse.y" /* yacc.c:1646 */
7541  {
7542  /*%%%*/
7543  YYLTYPE loc;
7544  loc.beg_pos = (yylsp[-1]).beg_pos;
7545  loc.end_pos = (yylsp[-1]).beg_pos;
7546 
7547  value_expr((yyvsp[0].node));
7548  (yyval.node) = NEW_DOT3(new_nil(&loc), (yyvsp[0].node), &(yyloc));
7549  /*% %*/
7550  /*% ripper: dot3!(Qnil, $2) %*/
7551  }
7552 #line 7548 "parse.c" /* yacc.c:1646 */
7553  break;
7554 
7555  case 222:
7556 #line 2240 "parse.y" /* yacc.c:1646 */
7557  {
7558  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7559  }
7560 #line 7556 "parse.c" /* yacc.c:1646 */
7561  break;
7562 
7563  case 223:
7564 #line 2244 "parse.y" /* yacc.c:1646 */
7565  {
7566  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7567  }
7568 #line 7564 "parse.c" /* yacc.c:1646 */
7569  break;
7570 
7571  case 224:
7572 #line 2248 "parse.y" /* yacc.c:1646 */
7573  {
7574  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7575  }
7576 #line 7572 "parse.c" /* yacc.c:1646 */
7577  break;
7578 
7579  case 225:
7580 #line 2252 "parse.y" /* yacc.c:1646 */
7581  {
7582  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7583  }
7584 #line 7580 "parse.c" /* yacc.c:1646 */
7585  break;
7586 
7587  case 226:
7588 #line 2256 "parse.y" /* yacc.c:1646 */
7589  {
7590  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7591  }
7592 #line 7588 "parse.c" /* yacc.c:1646 */
7593  break;
7594 
7595  case 227:
7596 #line 2260 "parse.y" /* yacc.c:1646 */
7597  {
7598  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7599  }
7600 #line 7596 "parse.c" /* yacc.c:1646 */
7601  break;
7602 
7603  case 228:
7604 #line 2264 "parse.y" /* yacc.c:1646 */
7605  {
7606  (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
7607  }
7608 #line 7604 "parse.c" /* yacc.c:1646 */
7609  break;
7610 
7611  case 229:
7612 #line 2268 "parse.y" /* yacc.c:1646 */
7613  {
7614  (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
7615  }
7616 #line 7612 "parse.c" /* yacc.c:1646 */
7617  break;
7618 
7619  case 230:
7620 #line 2272 "parse.y" /* yacc.c:1646 */
7621  {
7622  (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
7623  }
7624 #line 7620 "parse.c" /* yacc.c:1646 */
7625  break;
7626 
7627  case 231:
7628 #line 2276 "parse.y" /* yacc.c:1646 */
7629  {
7630  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7631  }
7632 #line 7628 "parse.c" /* yacc.c:1646 */
7633  break;
7634 
7635  case 232:
7636 #line 2280 "parse.y" /* yacc.c:1646 */
7637  {
7638  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7639  }
7640 #line 7636 "parse.c" /* yacc.c:1646 */
7641  break;
7642 
7643  case 233:
7644 #line 2284 "parse.y" /* yacc.c:1646 */
7645  {
7646  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7647  }
7648 #line 7644 "parse.c" /* yacc.c:1646 */
7649  break;
7650 
7651  case 234:
7652 #line 2288 "parse.y" /* yacc.c:1646 */
7653  {
7654  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7655  }
7656 #line 7652 "parse.c" /* yacc.c:1646 */
7657  break;
7658 
7659  case 236:
7660 #line 2293 "parse.y" /* yacc.c:1646 */
7661  {
7662  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7663  }
7664 #line 7660 "parse.c" /* yacc.c:1646 */
7665  break;
7666 
7667  case 237:
7668 #line 2297 "parse.y" /* yacc.c:1646 */
7669  {
7670  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7671  }
7672 #line 7668 "parse.c" /* yacc.c:1646 */
7673  break;
7674 
7675  case 238:
7676 #line 2301 "parse.y" /* yacc.c:1646 */
7677  {
7678  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7679  }
7680 #line 7676 "parse.c" /* yacc.c:1646 */
7681  break;
7682 
7683  case 239:
7684 #line 2305 "parse.y" /* yacc.c:1646 */
7685  {
7686  (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7687  }
7688 #line 7684 "parse.c" /* yacc.c:1646 */
7689  break;
7690 
7691  case 240:
7692 #line 2309 "parse.y" /* yacc.c:1646 */
7693  {
7694  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7695  }
7696 #line 7692 "parse.c" /* yacc.c:1646 */
7697  break;
7698 
7699  case 241:
7700 #line 2313 "parse.y" /* yacc.c:1646 */
7701  {
7702  (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
7703  }
7704 #line 7700 "parse.c" /* yacc.c:1646 */
7705  break;
7706 
7707  case 242:
7708 #line 2317 "parse.y" /* yacc.c:1646 */
7709  {
7710  (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
7711  }
7712 #line 7708 "parse.c" /* yacc.c:1646 */
7713  break;
7714 
7715  case 243:
7716 #line 2321 "parse.y" /* yacc.c:1646 */
7717  {
7718  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7719  }
7720 #line 7716 "parse.c" /* yacc.c:1646 */
7721  break;
7722 
7723  case 244:
7724 #line 2325 "parse.y" /* yacc.c:1646 */
7725  {
7726  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7727  }
7728 #line 7724 "parse.c" /* yacc.c:1646 */
7729  break;
7730 
7731  case 245:
7732 #line 2329 "parse.y" /* yacc.c:1646 */
7733  {
7734  (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7735  }
7736 #line 7732 "parse.c" /* yacc.c:1646 */
7737  break;
7738 
7739  case 246:
7740 #line 2333 "parse.y" /* yacc.c:1646 */
7741  {
7742  (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7743  }
7744 #line 7740 "parse.c" /* yacc.c:1646 */
7745  break;
7746 
7747  case 247:
7748 #line 2336 "parse.y" /* yacc.c:1646 */
7749  {p->in_defined = 1;}
7750 #line 7746 "parse.c" /* yacc.c:1646 */
7751  break;
7752 
7753  case 248:
7754 #line 2337 "parse.y" /* yacc.c:1646 */
7755  {
7756  p->in_defined = 0;
7757  (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc));
7758  }
7759 #line 7755 "parse.c" /* yacc.c:1646 */
7760  break;
7761 
7762  case 249:
7763 #line 2342 "parse.y" /* yacc.c:1646 */
7764  {
7765  /*%%%*/
7766  value_expr((yyvsp[-5].node));
7767  (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
7768  fixpos((yyval.node), (yyvsp[-5].node));
7769  /*% %*/
7770  /*% ripper: ifop!($1, $3, $6) %*/
7771  }
7772 #line 7768 "parse.c" /* yacc.c:1646 */
7773  break;
7774 
7775  case 250:
7776 #line 2351 "parse.y" /* yacc.c:1646 */
7777  {
7778  (yyval.node) = (yyvsp[0].node);
7779  }
7780 #line 7776 "parse.c" /* yacc.c:1646 */
7781  break;
7782 
7783  case 251:
7784 #line 2356 "parse.y" /* yacc.c:1646 */
7785  {(yyval.id) = '>';}
7786 #line 7782 "parse.c" /* yacc.c:1646 */
7787  break;
7788 
7789  case 252:
7790 #line 2357 "parse.y" /* yacc.c:1646 */
7791  {(yyval.id) = '<';}
7792 #line 7788 "parse.c" /* yacc.c:1646 */
7793  break;
7794 
7795  case 253:
7796 #line 2358 "parse.y" /* yacc.c:1646 */
7797  {(yyval.id) = idGE;}
7798 #line 7794 "parse.c" /* yacc.c:1646 */
7799  break;
7800 
7801  case 254:
7802 #line 2359 "parse.y" /* yacc.c:1646 */
7803  {(yyval.id) = idLE;}
7804 #line 7800 "parse.c" /* yacc.c:1646 */
7805  break;
7806 
7807  case 255:
7808 #line 2363 "parse.y" /* yacc.c:1646 */
7809  {
7810  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7811  }
7812 #line 7808 "parse.c" /* yacc.c:1646 */
7813  break;
7814 
7815  case 256:
7816 #line 2367 "parse.y" /* yacc.c:1646 */
7817  {
7818  rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
7819  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7820  }
7821 #line 7817 "parse.c" /* yacc.c:1646 */
7822  break;
7823 
7824  case 257:
7825 #line 2374 "parse.y" /* yacc.c:1646 */
7826  {
7827  value_expr((yyvsp[0].node));
7828  (yyval.node) = (yyvsp[0].node);
7829  }
7830 #line 7826 "parse.c" /* yacc.c:1646 */
7831  break;
7832 
7833  case 259:
7834 #line 2382 "parse.y" /* yacc.c:1646 */
7835  {
7836  (yyval.node) = (yyvsp[-1].node);
7837  }
7838 #line 7834 "parse.c" /* yacc.c:1646 */
7839  break;
7840 
7841  case 260:
7842 #line 2386 "parse.y" /* yacc.c:1646 */
7843  {
7844  /*%%%*/
7845  (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
7846  /*% %*/
7847  /*% ripper: args_add!($1, bare_assoc_hash!($3)) %*/
7848  }
7849 #line 7845 "parse.c" /* yacc.c:1646 */
7850  break;
7851 
7852  case 261:
7853 #line 2393 "parse.y" /* yacc.c:1646 */
7854  {
7855  /*%%%*/
7856  (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
7857  /*% %*/
7858  /*% ripper: args_add!(args_new!, bare_assoc_hash!($1)) %*/
7859  }
7860 #line 7856 "parse.c" /* yacc.c:1646 */
7861  break;
7862 
7863  case 262:
7864 #line 2402 "parse.y" /* yacc.c:1646 */
7865  {
7866  value_expr((yyvsp[0].node));
7867  (yyval.node) = (yyvsp[0].node);
7868  }
7869 #line 7865 "parse.c" /* yacc.c:1646 */
7870  break;
7871 
7872  case 263:
7873 #line 2407 "parse.y" /* yacc.c:1646 */
7874  {
7875  /*%%%*/
7876  YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
7877  value_expr((yyvsp[-2].node));
7878  (yyval.node) = NEW_RESCUE((yyvsp[-2].node), NEW_RESBODY(0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
7879  /*% %*/
7880  /*% ripper: rescue_mod!($1, $3) %*/
7881  }
7882 #line 7878 "parse.c" /* yacc.c:1646 */
7883  break;
7884 
7885  case 264:
7886 #line 2418 "parse.y" /* yacc.c:1646 */
7887  {
7888  /*%%%*/
7889  (yyval.node) = (yyvsp[-1].node);
7890  /*% %*/
7891  /*% ripper: arg_paren!(escape_Qundef($2)) %*/
7892  }
7893 #line 7889 "parse.c" /* yacc.c:1646 */
7894  break;
7895 
7896  case 265:
7897 #line 2425 "parse.y" /* yacc.c:1646 */
7898  {
7899  if (!local_id(p, idFWD_REST) ||
7900 #if idFWD_KWREST
7901  !local_id(p, idFWD_KWREST) ||
7902 #endif
7903  !local_id(p, idFWD_BLOCK)) {
7904  compile_error(p, "unexpected ...");
7905  (yyval.node) = Qnone;
7906  }
7907  else {
7908  /*%%%*/
7909  NODE *splat = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[-1])), &(yylsp[-1]));
7910 #if idFWD_KWREST
7911  NODE *kwrest = list_append(p, NEW_LIST(0, &(yylsp[-1])), NEW_LVAR(idFWD_KWREST, &(yylsp[-1])));
7912 #endif
7913  NODE *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[-1])), &(yylsp[-1]));
7914 #if idFWD_KWREST
7915  (yyval.node) = arg_append(p, splat, new_hash(p, kwrest, &(yylsp[-1])), &(yylsp[-1]));
7916 #else
7917  (yyval.node) = splat;
7918 #endif
7919  (yyval.node) = arg_blk_pass((yyval.node), block);
7920  /*% %*/
7921  /*% ripper: arg_paren!($2) %*/
7922  }
7923  }
7924 #line 7920 "parse.c" /* yacc.c:1646 */
7925  break;
7926 
7927  case 270:
7928 #line 2460 "parse.y" /* yacc.c:1646 */
7929  {
7930  (yyval.node) = (yyvsp[-1].node);
7931  }
7932 #line 7928 "parse.c" /* yacc.c:1646 */
7933  break;
7934 
7935  case 271:
7936 #line 2464 "parse.y" /* yacc.c:1646 */
7937  {
7938  /*%%%*/
7939  (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
7940  /*% %*/
7941  /*% ripper: args_add!($1, bare_assoc_hash!($3)) %*/
7942  }
7943 #line 7939 "parse.c" /* yacc.c:1646 */
7944  break;
7945 
7946  case 272:
7947 #line 2471 "parse.y" /* yacc.c:1646 */
7948  {
7949  /*%%%*/
7950  (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
7951  /*% %*/
7952  /*% ripper: args_add!(args_new!, bare_assoc_hash!($1)) %*/
7953  }
7954 #line 7950 "parse.c" /* yacc.c:1646 */
7955  break;
7956 
7957  case 273:
7958 #line 2480 "parse.y" /* yacc.c:1646 */
7959  {
7960  /*%%%*/
7961  value_expr((yyvsp[0].node));
7962  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
7963  /*% %*/
7964  /*% ripper: args_add!(args_new!, $1) %*/
7965  }
7966 #line 7962 "parse.c" /* yacc.c:1646 */
7967  break;
7968 
7969  case 274:
7970 #line 2488 "parse.y" /* yacc.c:1646 */
7971  {
7972  /*%%%*/
7973  (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node));
7974  /*% %*/
7975  /*% ripper: args_add_block!($1, $2) %*/
7976  }
7977 #line 7973 "parse.c" /* yacc.c:1646 */
7978  break;
7979 
7980  case 275:
7981 #line 2495 "parse.y" /* yacc.c:1646 */
7982  {
7983  /*%%%*/
7984  (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
7985  (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node));
7986  /*% %*/
7987  /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($1)), $2) %*/
7988  }
7989 #line 7985 "parse.c" /* yacc.c:1646 */
7990  break;
7991 
7992  case 276:
7993 #line 2503 "parse.y" /* yacc.c:1646 */
7994  {
7995  /*%%%*/
7996  (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
7997  (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node));
7998  /*% %*/
7999  /*% ripper: args_add_block!(args_add!($1, bare_assoc_hash!($3)), $4) %*/
8000  }
8001 #line 7997 "parse.c" /* yacc.c:1646 */
8002  break;
8003 
8004  case 278:
8005 #line 2514 "parse.y" /* yacc.c:1646 */
8006  {
8007  /* If call_args starts with a open paren '(' or '[',
8008  * look-ahead reading of the letters calls CMDARG_PUSH(0),
8009  * but the push must be done after CMDARG_PUSH(1).
8010  * So this code makes them consistent by first cancelling
8011  * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
8012  * and finally redoing CMDARG_PUSH(0).
8013  */
8014  int lookahead = 0;
8015  switch (yychar) {
8016  case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
8017  lookahead = 1;
8018  }
8019  if (lookahead) CMDARG_POP();
8020  CMDARG_PUSH(1);
8021  if (lookahead) CMDARG_PUSH(0);
8022  }
8023 #line 8019 "parse.c" /* yacc.c:1646 */
8024  break;
8025 
8026  case 279:
8027 #line 2532 "parse.y" /* yacc.c:1646 */
8028  {
8029  /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
8030  * but the push must be done after CMDARG_POP() in the parser.
8031  * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
8032  * CMDARG_POP() to pop 1 pushed by command_args,
8033  * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
8034  */
8035  int lookahead = 0;
8036  switch (yychar) {
8037  case tLBRACE_ARG:
8038  lookahead = 1;
8039  }
8040  if (lookahead) CMDARG_POP();
8041  CMDARG_POP();
8042  if (lookahead) CMDARG_PUSH(0);
8043  (yyval.node) = (yyvsp[0].node);
8044  }
8045 #line 8041 "parse.c" /* yacc.c:1646 */
8046  break;
8047 
8048  case 280:
8049 #line 2552 "parse.y" /* yacc.c:1646 */
8050  {
8051  /*%%%*/
8052  (yyval.node) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc));
8053  /*% %*/
8054  /*% ripper: $2 %*/
8055  }
8056 #line 8052 "parse.c" /* yacc.c:1646 */
8057  break;
8058 
8059  case 281:
8060 #line 2561 "parse.y" /* yacc.c:1646 */
8061  {
8062  (yyval.node) = (yyvsp[0].node);
8063  }
8064 #line 8060 "parse.c" /* yacc.c:1646 */
8065  break;
8066 
8067  case 282:
8068 #line 2565 "parse.y" /* yacc.c:1646 */
8069  {
8070  (yyval.node) = 0;
8071  }
8072 #line 8068 "parse.c" /* yacc.c:1646 */
8073  break;
8074 
8075  case 283:
8076 #line 2571 "parse.y" /* yacc.c:1646 */
8077  {
8078  /*%%%*/
8079  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
8080  /*% %*/
8081  /*% ripper: args_add!(args_new!, $1) %*/
8082  }
8083 #line 8079 "parse.c" /* yacc.c:1646 */
8084  break;
8085 
8086  case 284:
8087 #line 2578 "parse.y" /* yacc.c:1646 */
8088  {
8089  /*%%%*/
8090  (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc));
8091  /*% %*/
8092  /*% ripper: args_add_star!(args_new!, $2) %*/
8093  }
8094 #line 8090 "parse.c" /* yacc.c:1646 */
8095  break;
8096 
8097  case 285:
8098 #line 2585 "parse.y" /* yacc.c:1646 */
8099  {
8100  /*%%%*/
8101  (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
8102  /*% %*/
8103  /*% ripper: args_add!($1, $3) %*/
8104  }
8105 #line 8101 "parse.c" /* yacc.c:1646 */
8106  break;
8107 
8108  case 286:
8109 #line 2592 "parse.y" /* yacc.c:1646 */
8110  {
8111  /*%%%*/
8112  (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
8113  /*% %*/
8114  /*% ripper: args_add_star!($1, $4) %*/
8115  }
8116 #line 8112 "parse.c" /* yacc.c:1646 */
8117  break;
8118 
8119  case 289:
8120 #line 2605 "parse.y" /* yacc.c:1646 */
8121  {
8122  /*%%%*/
8123  (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
8124  /*% %*/
8125  /*% ripper: mrhs_add!(mrhs_new_from_args!($1), $3) %*/
8126  }
8127 #line 8123 "parse.c" /* yacc.c:1646 */
8128  break;
8129 
8130  case 290:
8131 #line 2612 "parse.y" /* yacc.c:1646 */
8132  {
8133  /*%%%*/
8134  (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
8135  /*% %*/
8136  /*% ripper: mrhs_add_star!(mrhs_new_from_args!($1), $4) %*/
8137  }
8138 #line 8134 "parse.c" /* yacc.c:1646 */
8139  break;
8140 
8141  case 291:
8142 #line 2619 "parse.y" /* yacc.c:1646 */
8143  {
8144  /*%%%*/
8145  (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc));
8146  /*% %*/
8147  /*% ripper: mrhs_add_star!(mrhs_new!, $2) %*/
8148  }
8149 #line 8145 "parse.c" /* yacc.c:1646 */
8150  break;
8151 
8152  case 302:
8153 #line 2638 "parse.y" /* yacc.c:1646 */
8154  {
8155  /*%%%*/
8156  (yyval.node) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
8157  /*% %*/
8158  /*% ripper: method_add_arg!(fcall!($1), args_new!) %*/
8159  }
8160 #line 8156 "parse.c" /* yacc.c:1646 */
8161  break;
8162 
8163  case 303:
8164 #line 2645 "parse.y" /* yacc.c:1646 */
8165  {
8166  CMDARG_PUSH(0);
8167  }
8168 #line 8164 "parse.c" /* yacc.c:1646 */
8169  break;
8170 
8171  case 304:
8172 #line 2650 "parse.y" /* yacc.c:1646 */
8173  {
8174  CMDARG_POP();
8175  /*%%%*/
8176  set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
8177  (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
8178  nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
8179  /*% %*/
8180  /*% ripper: begin!($3) %*/
8181  }
8182 #line 8178 "parse.c" /* yacc.c:1646 */
8183  break;
8184 
8185  case 305:
8186 #line 2659 "parse.y" /* yacc.c:1646 */
8187  {SET_LEX_STATE(EXPR_ENDARG);}
8188 #line 8184 "parse.c" /* yacc.c:1646 */
8189  break;
8190 
8191  case 306:
8192 #line 2660 "parse.y" /* yacc.c:1646 */
8193  {
8194  /*%%%*/
8195  (yyval.node) = NEW_BEGIN(0, &(yyloc));
8196  /*% %*/
8197  /*% ripper: paren!(0) %*/
8198  }
8199 #line 8195 "parse.c" /* yacc.c:1646 */
8200  break;
8201 
8202  case 307:
8203 #line 2666 "parse.y" /* yacc.c:1646 */
8204  {SET_LEX_STATE(EXPR_ENDARG);}
8205 #line 8201 "parse.c" /* yacc.c:1646 */
8206  break;
8207 
8208  case 308:
8209 #line 2667 "parse.y" /* yacc.c:1646 */
8210  {
8211  /*%%%*/
8212  if (nd_type((yyvsp[-2].node)) == NODE_SELF) (yyvsp[-2].node)->nd_state = 0;
8213  (yyval.node) = (yyvsp[-2].node);
8214  /*% %*/
8215  /*% ripper: paren!($2) %*/
8216  }
8217 #line 8213 "parse.c" /* yacc.c:1646 */
8218  break;
8219 
8220  case 309:
8221 #line 2675 "parse.y" /* yacc.c:1646 */
8222  {
8223  /*%%%*/
8224  if (nd_type((yyvsp[-1].node)) == NODE_SELF) (yyvsp[-1].node)->nd_state = 0;
8225  (yyval.node) = (yyvsp[-1].node);
8226  /*% %*/
8227  /*% ripper: paren!($2) %*/
8228  }
8229 #line 8225 "parse.c" /* yacc.c:1646 */
8230  break;
8231 
8232  case 310:
8233 #line 2683 "parse.y" /* yacc.c:1646 */
8234  {
8235  /*%%%*/
8236  (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
8237  /*% %*/
8238  /*% ripper: const_path_ref!($1, $3) %*/
8239  }
8240 #line 8236 "parse.c" /* yacc.c:1646 */
8241  break;
8242 
8243  case 311:
8244 #line 2690 "parse.y" /* yacc.c:1646 */
8245  {
8246  /*%%%*/
8247  (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
8248  /*% %*/
8249  /*% ripper: top_const_ref!($2) %*/
8250  }
8251 #line 8247 "parse.c" /* yacc.c:1646 */
8252  break;
8253 
8254  case 312:
8255 #line 2697 "parse.y" /* yacc.c:1646 */
8256  {
8257  /*%%%*/
8258  (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
8259  /*% %*/
8260  /*% ripper: array!(escape_Qundef($2)) %*/
8261  }
8262 #line 8258 "parse.c" /* yacc.c:1646 */
8263  break;
8264 
8265  case 313:
8266 #line 2704 "parse.y" /* yacc.c:1646 */
8267  {
8268  /*%%%*/
8269  (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
8270  (yyval.node)->nd_brace = TRUE;
8271  /*% %*/
8272  /*% ripper: hash!(escape_Qundef($2)) %*/
8273  }
8274 #line 8270 "parse.c" /* yacc.c:1646 */
8275  break;
8276 
8277  case 314:
8278 #line 2712 "parse.y" /* yacc.c:1646 */
8279  {
8280  /*%%%*/
8281  (yyval.node) = NEW_RETURN(0, &(yyloc));
8282  /*% %*/
8283  /*% ripper: return0! %*/
8284  }
8285 #line 8281 "parse.c" /* yacc.c:1646 */
8286  break;
8287 
8288  case 315:
8289 #line 2719 "parse.y" /* yacc.c:1646 */
8290  {
8291  /*%%%*/
8292  (yyval.node) = new_yield(p, (yyvsp[-1].node), &(yyloc));
8293  /*% %*/
8294  /*% ripper: yield!(paren!($3)) %*/
8295  }
8296 #line 8292 "parse.c" /* yacc.c:1646 */
8297  break;
8298 
8299  case 316:
8300 #line 2726 "parse.y" /* yacc.c:1646 */
8301  {
8302  /*%%%*/
8303  (yyval.node) = NEW_YIELD(0, &(yyloc));
8304  /*% %*/
8305  /*% ripper: yield!(paren!(args_new!)) %*/
8306  }
8307 #line 8303 "parse.c" /* yacc.c:1646 */
8308  break;
8309 
8310  case 317:
8311 #line 2733 "parse.y" /* yacc.c:1646 */
8312  {
8313  /*%%%*/
8314  (yyval.node) = NEW_YIELD(0, &(yyloc));
8315  /*% %*/
8316  /*% ripper: yield0! %*/
8317  }
8318 #line 8314 "parse.c" /* yacc.c:1646 */
8319  break;
8320 
8321  case 318:
8322 #line 2739 "parse.y" /* yacc.c:1646 */
8323  {p->in_defined = 1;}
8324 #line 8320 "parse.c" /* yacc.c:1646 */
8325  break;
8326 
8327  case 319:
8328 #line 2740 "parse.y" /* yacc.c:1646 */
8329  {
8330  p->in_defined = 0;
8331  (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc));
8332  }
8333 #line 8329 "parse.c" /* yacc.c:1646 */
8334  break;
8335 
8336  case 320:
8337 #line 2745 "parse.y" /* yacc.c:1646 */
8338  {
8339  (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
8340  }
8341 #line 8337 "parse.c" /* yacc.c:1646 */
8342  break;
8343 
8344  case 321:
8345 #line 2749 "parse.y" /* yacc.c:1646 */
8346  {
8347  (yyval.node) = call_uni_op(p, method_cond(p, new_nil(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
8348  }
8349 #line 8345 "parse.c" /* yacc.c:1646 */
8350  break;
8351 
8352  case 322:
8353 #line 2753 "parse.y" /* yacc.c:1646 */
8354  {
8355  /*%%%*/
8356  (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
8357  /*% %*/
8358  /*% ripper: method_add_block!(method_add_arg!(fcall!($1), args_new!), $2) %*/
8359  }
8360 #line 8356 "parse.c" /* yacc.c:1646 */
8361  break;
8362 
8363  case 324:
8364 #line 2761 "parse.y" /* yacc.c:1646 */
8365  {
8366  /*%%%*/
8367  block_dup_check(p, (yyvsp[-1].node)->nd_args, (yyvsp[0].node));
8368  (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
8369  /*% %*/
8370  /*% ripper: method_add_block!($1, $2) %*/
8371  }
8372 #line 8368 "parse.c" /* yacc.c:1646 */
8373  break;
8374 
8375  case 325:
8376 #line 2769 "parse.y" /* yacc.c:1646 */
8377  {
8378  token_info_push(p, "->", &(yylsp[0]));
8379  }
8380 #line 8376 "parse.c" /* yacc.c:1646 */
8381  break;
8382 
8383  case 326:
8384 #line 2773 "parse.y" /* yacc.c:1646 */
8385  {
8386  (yyval.node) = (yyvsp[0].node);
8387  /*%%%*/
8388  nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
8389  /*% %*/
8390  }
8391 #line 8387 "parse.c" /* yacc.c:1646 */
8392  break;
8393 
8394  case 327:
8395 #line 2783 "parse.y" /* yacc.c:1646 */
8396  {
8397  /*%%%*/
8398  (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc));
8399  fixpos((yyval.node), (yyvsp[-4].node));
8400  /*% %*/
8401  /*% ripper: if!($2, $4, escape_Qundef($5)) %*/
8402  }
8403 #line 8399 "parse.c" /* yacc.c:1646 */
8404  break;
8405 
8406  case 328:
8407 #line 2794 "parse.y" /* yacc.c:1646 */
8408  {
8409  /*%%%*/
8410  (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc));
8411  fixpos((yyval.node), (yyvsp[-4].node));
8412  /*% %*/
8413  /*% ripper: unless!($2, $4, escape_Qundef($5)) %*/
8414  }
8415 #line 8411 "parse.c" /* yacc.c:1646 */
8416  break;
8417 
8418  case 329:
8419 #line 2804 "parse.y" /* yacc.c:1646 */
8420  {
8421  /*%%%*/
8422  (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc));
8423  fixpos((yyval.node), (yyvsp[-2].node));
8424  /*% %*/
8425  /*% ripper: while!($2, $3) %*/
8426  }
8427 #line 8423 "parse.c" /* yacc.c:1646 */
8428  break;
8429 
8430  case 330:
8431 #line 2814 "parse.y" /* yacc.c:1646 */
8432  {
8433  /*%%%*/
8434  (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc));
8435  fixpos((yyval.node), (yyvsp[-2].node));
8436  /*% %*/
8437  /*% ripper: until!($2, $3) %*/
8438  }
8439 #line 8435 "parse.c" /* yacc.c:1646 */
8440  break;
8441 
8442  case 331:
8443 #line 2822 "parse.y" /* yacc.c:1646 */
8444  {
8445  (yyval.val) = p->case_labels;
8446  p->case_labels = Qnil;
8447  }
8448 #line 8444 "parse.c" /* yacc.c:1646 */
8449  break;
8450 
8451  case 332:
8452 #line 2828 "parse.y" /* yacc.c:1646 */
8453  {
8455  p->case_labels = (yyvsp[-2].val);
8456  /*%%%*/
8457  (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc));
8458  fixpos((yyval.node), (yyvsp[-4].node));
8459  /*% %*/
8460  /*% ripper: case!($2, $5) %*/
8461  }
8462 #line 8458 "parse.c" /* yacc.c:1646 */
8463  break;
8464 
8465  case 333:
8466 #line 2838 "parse.y" /* yacc.c:1646 */
8467  {
8468  (yyval.val) = p->case_labels;
8469  p->case_labels = 0;
8470  }
8471 #line 8467 "parse.c" /* yacc.c:1646 */
8472  break;
8473 
8474  case 334:
8475 #line 2844 "parse.y" /* yacc.c:1646 */
8476  {
8478  p->case_labels = (yyvsp[-2].val);
8479  /*%%%*/
8480  (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc));
8481  /*% %*/
8482  /*% ripper: case!(Qnil, $4) %*/
8483  }
8484 #line 8480 "parse.c" /* yacc.c:1646 */
8485  break;
8486 
8487  case 335:
8488 #line 2855 "parse.y" /* yacc.c:1646 */
8489  {
8490  /*%%%*/
8491  (yyval.node) = new_case3(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
8492  /*% %*/
8493  /*% ripper: case!($2, $4) %*/
8494  }
8495 #line 8491 "parse.c" /* yacc.c:1646 */
8496  break;
8497 
8498  case 336:
8499 #line 2864 "parse.y" /* yacc.c:1646 */
8500  {
8501  /*%%%*/
8502  /*
8503  * for a, b, c in e
8504  * #=>
8505  * e.each{|*x| a, b, c = x}
8506  *
8507  * for a in e
8508  * #=>
8509  * e.each{|x| a, = x}
8510  */
8511  ID id = internal_id(p);
8512  NODE *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
8513  NODE *args, *scope, *internal_var = NEW_DVAR(id, &(yylsp[-4]));
8515  ID *tbl = ALLOC_N(ID, 3);
8516  rb_imemo_tmpbuf_set_ptr(tmpbuf, tbl);
8517  tbl[0] = 1 /* length of local var table */; tbl[1] = id /* internal id */;
8518  tbl[2] = tmpbuf;
8519 
8520  switch (nd_type((yyvsp[-4].node))) {
8521  case NODE_LASGN:
8522  case NODE_DASGN:
8523  case NODE_DASGN_CURR: /* e.each {|internal_var| a = internal_var; ... } */
8524  (yyvsp[-4].node)->nd_value = internal_var;
8525  id = 0;
8526  m->nd_plen = 1;
8527  m->nd_next = (yyvsp[-4].node);
8528  break;
8529  case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
8530  m->nd_next = node_assign(p, (yyvsp[-4].node), NEW_FOR_MASGN(internal_var, &(yylsp[-4])), &(yylsp[-4]));
8531  break;
8532  default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
8533  m->nd_next = node_assign(p, NEW_MASGN(NEW_LIST((yyvsp[-4].node), &(yylsp[-4])), 0, &(yylsp[-4])), internal_var, &(yylsp[-4]));
8534  }
8535  /* {|*internal_id| <m> = internal_id; ... } */
8536  args = new_args(p, m, 0, id, 0, new_args_tail(p, 0, 0, 0, &(yylsp[-4])), &(yylsp[-4]));
8537  scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[-1].node), args, &(yyloc));
8538  RB_OBJ_WRITTEN(p->ast, Qnil, tmpbuf);
8539  (yyval.node) = NEW_FOR((yyvsp[-2].node), scope, &(yyloc));
8540  fixpos((yyval.node), (yyvsp[-4].node));
8541  /*% %*/
8542  /*% ripper: for!($2, $4, $5) %*/
8543  }
8544 #line 8540 "parse.c" /* yacc.c:1646 */
8545  break;
8546 
8547  case 337:
8548 #line 2909 "parse.y" /* yacc.c:1646 */
8549  {
8550  if (p->in_def) {
8551  YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[-1]));
8552  yyerror1(&loc, "class definition in method body");
8553  }
8554  (yyvsp[-2].num) = p->in_class;
8555  p->in_class = 1;
8556  local_push(p, 0);
8557  }
8558 #line 8554 "parse.c" /* yacc.c:1646 */
8559  break;
8560 
8561  case 338:
8562 #line 2920 "parse.y" /* yacc.c:1646 */
8563  {
8564  /*%%%*/
8565  (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc));
8566  nd_set_line((yyval.node)->nd_body, (yylsp[0]).end_pos.lineno);
8567  set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
8568  nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
8569  /*% %*/
8570  /*% ripper: class!($2, $3, $5) %*/
8571  local_pop(p);
8572  p->in_class = (yyvsp[-5].num) & 1;
8573  }
8574 #line 8570 "parse.c" /* yacc.c:1646 */
8575  break;
8576 
8577  case 339:
8578 #line 2932 "parse.y" /* yacc.c:1646 */
8579  {
8580  (yyval.num) = (p->in_class << 1) | p->in_def;
8581  p->in_def = 0;
8582  p->in_class = 0;
8583  local_push(p, 0);
8584  }
8585 #line 8581 "parse.c" /* yacc.c:1646 */
8586  break;
8587 
8588  case 340:
8589 #line 2941 "parse.y" /* yacc.c:1646 */
8590  {
8591  /*%%%*/
8592  (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc));
8593  nd_set_line((yyval.node)->nd_body, (yylsp[0]).end_pos.lineno);
8594  set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
8595  fixpos((yyval.node), (yyvsp[-4].node));
8596  /*% %*/
8597  /*% ripper: sclass!($3, $6) %*/
8598  local_pop(p);
8599  p->in_def = (yyvsp[-3].num) & 1;
8600  p->in_class = ((yyvsp[-3].num) >> 1) & 1;
8601  }
8602 #line 8598 "parse.c" /* yacc.c:1646 */
8603  break;
8604 
8605  case 341:
8606 #line 2954 "parse.y" /* yacc.c:1646 */
8607  {
8608  if (p->in_def) {
8609  YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
8610  yyerror1(&loc, "module definition in method body");
8611  }
8612  (yyvsp[-1].num) = p->in_class;
8613  p->in_class = 1;
8614  local_push(p, 0);
8615  }
8616 #line 8612 "parse.c" /* yacc.c:1646 */
8617  break;
8618 
8619  case 342:
8620 #line 2965 "parse.y" /* yacc.c:1646 */
8621  {
8622  /*%%%*/
8623  (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
8624  nd_set_line((yyval.node)->nd_body, (yylsp[0]).end_pos.lineno);
8625  set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
8626  nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
8627  /*% %*/
8628  /*% ripper: module!($2, $4) %*/
8629  local_pop(p);
8630  p->in_class = (yyvsp[-4].num) & 1;
8631  }
8632 #line 8628 "parse.c" /* yacc.c:1646 */
8633  break;
8634 
8635  case 343:
8636 #line 2977 "parse.y" /* yacc.c:1646 */
8637  {
8638  numparam_name(p, get_id((yyvsp[0].id)));
8639  local_push(p, 0);
8640  (yyval.id) = p->cur_arg;
8641  p->cur_arg = 0;
8642  }
8643 #line 8639 "parse.c" /* yacc.c:1646 */
8644  break;
8645 
8646  case 344:
8647 #line 2983 "parse.y" /* yacc.c:1646 */
8648  {
8649  (yyval.num) = p->in_def;
8650  p->in_def = 1;
8651  }
8652 #line 8648 "parse.c" /* yacc.c:1646 */
8653  break;
8654 
8655  case 345:
8656 #line 2990 "parse.y" /* yacc.c:1646 */
8657  {
8658  /*%%%*/
8659  NODE *body = remove_begin((yyvsp[-1].node));
8660  reduce_nodes(p, &body);
8661  (yyval.node) = NEW_DEFN((yyvsp[-5].id), (yyvsp[-2].node), body, &(yyloc));
8662  nd_set_line((yyval.node)->nd_defn, (yylsp[0]).end_pos.lineno);
8663  set_line_body(body, (yylsp[-6]).beg_pos.lineno);
8664  /*% %*/
8665  /*% ripper: def!($2, $5, $6) %*/
8666  local_pop(p);
8667  p->in_def = (yyvsp[-3].num) & 1;
8668  p->cur_arg = (yyvsp[-4].id);
8669  }
8670 #line 8666 "parse.c" /* yacc.c:1646 */
8671  break;
8672 
8673  case 346:
8674 #line 3003 "parse.y" /* yacc.c:1646 */
8675  {SET_LEX_STATE(EXPR_FNAME);}
8676 #line 8672 "parse.c" /* yacc.c:1646 */
8677  break;
8678 
8679  case 347:
8680 #line 3004 "parse.y" /* yacc.c:1646 */
8681  {
8682  numparam_name(p, get_id((yyvsp[0].id)));
8683  (yyvsp[-1].num) = p->in_def;
8684  p->in_def = 1;
8685  SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
8686  local_push(p, 0);
8687  (yyval.id) = p->cur_arg;
8688  p->cur_arg = 0;
8689  }
8690 #line 8686 "parse.c" /* yacc.c:1646 */
8691  break;
8692 
8693  case 348:
8694 #line 3016 "parse.y" /* yacc.c:1646 */
8695  {
8696  /*%%%*/
8697  NODE *body = remove_begin((yyvsp[-1].node));
8698  reduce_nodes(p, &body);
8699  (yyval.node) = NEW_DEFS((yyvsp[-7].node), (yyvsp[-4].id), (yyvsp[-2].node), body, &(yyloc));
8700  nd_set_line((yyval.node)->nd_defn, (yylsp[0]).end_pos.lineno);
8701  set_line_body(body, (yylsp[-8]).beg_pos.lineno);
8702  /*% %*/
8703  /*% ripper: defs!($2, $3, $5, $7, $8) %*/
8704  local_pop(p);
8705  p->in_def = (yyvsp[-5].num) & 1;
8706  p->cur_arg = (yyvsp[-3].id);
8707  }
8708 #line 8704 "parse.c" /* yacc.c:1646 */
8709  break;
8710 
8711  case 349:
8712 #line 3030 "parse.y" /* yacc.c:1646 */
8713  {
8714  /*%%%*/
8715  (yyval.node) = NEW_BREAK(0, &(yyloc));
8716  /*% %*/
8717  /*% ripper: break!(args_new!) %*/
8718  }
8719 #line 8715 "parse.c" /* yacc.c:1646 */
8720  break;
8721 
8722  case 350:
8723 #line 3037 "parse.y" /* yacc.c:1646 */
8724  {
8725  /*%%%*/
8726  (yyval.node) = NEW_NEXT(0, &(yyloc));
8727  /*% %*/
8728  /*% ripper: next!(args_new!) %*/
8729  }
8730 #line 8726 "parse.c" /* yacc.c:1646 */
8731  break;
8732 
8733  case 351:
8734 #line 3044 "parse.y" /* yacc.c:1646 */
8735  {
8736  /*%%%*/
8737  (yyval.node) = NEW_REDO(&(yyloc));
8738  /*% %*/
8739  /*% ripper: redo! %*/
8740  }
8741 #line 8737 "parse.c" /* yacc.c:1646 */
8742  break;
8743 
8744  case 352:
8745 #line 3051 "parse.y" /* yacc.c:1646 */
8746  {
8747  /*%%%*/
8748  (yyval.node) = NEW_RETRY(&(yyloc));
8749  /*% %*/
8750  /*% ripper: retry! %*/
8751  }
8752 #line 8748 "parse.c" /* yacc.c:1646 */
8753  break;
8754 
8755  case 353:
8756 #line 3060 "parse.y" /* yacc.c:1646 */
8757  {
8758  value_expr((yyvsp[0].node));
8759  (yyval.node) = (yyvsp[0].node);
8760  }
8761 #line 8757 "parse.c" /* yacc.c:1646 */
8762  break;
8763 
8764  case 354:
8765 #line 3067 "parse.y" /* yacc.c:1646 */
8766  {
8767  token_info_push(p, "begin", &(yyloc));
8768  }
8769 #line 8765 "parse.c" /* yacc.c:1646 */
8770  break;
8771 
8772  case 355:
8773 #line 3073 "parse.y" /* yacc.c:1646 */
8774  {
8775  WARN_EOL("if");
8776  token_info_push(p, "if", &(yyloc));
8777  if (p->token_info && p->token_info->nonspc &&
8778  p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
8779  const char *tok = p->lex.ptok;
8780  const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
8781  beg += rb_strlen_lit("else");
8782  while (beg < tok && ISSPACE(*beg)) beg++;
8783  if (beg == tok) {
8784  p->token_info->nonspc = 0;
8785  }
8786  }
8787  }
8788 #line 8784 "parse.c" /* yacc.c:1646 */
8789  break;
8790 
8791  case 356:
8792 #line 3090 "parse.y" /* yacc.c:1646 */
8793  {
8794  token_info_push(p, "unless", &(yyloc));
8795  }
8796 #line 8792 "parse.c" /* yacc.c:1646 */
8797  break;
8798 
8799  case 357:
8800 #line 3096 "parse.y" /* yacc.c:1646 */
8801  {
8802  token_info_push(p, "while", &(yyloc));
8803  }
8804 #line 8800 "parse.c" /* yacc.c:1646 */
8805  break;
8806 
8807  case 358:
8808 #line 3102 "parse.y" /* yacc.c:1646 */
8809  {
8810  token_info_push(p, "until", &(yyloc));
8811  }
8812 #line 8808 "parse.c" /* yacc.c:1646 */
8813  break;
8814 
8815  case 359:
8816 #line 3108 "parse.y" /* yacc.c:1646 */
8817  {
8818  token_info_push(p, "case", &(yyloc));
8819  }
8820 #line 8816 "parse.c" /* yacc.c:1646 */
8821  break;
8822 
8823  case 360:
8824 #line 3114 "parse.y" /* yacc.c:1646 */
8825  {
8826  token_info_push(p, "for", &(yyloc));
8827  }
8828 #line 8824 "parse.c" /* yacc.c:1646 */
8829  break;
8830 
8831  case 361:
8832 #line 3120 "parse.y" /* yacc.c:1646 */
8833  {
8834  token_info_push(p, "class", &(yyloc));
8835  }
8836 #line 8832 "parse.c" /* yacc.c:1646 */
8837  break;
8838 
8839  case 362:
8840 #line 3126 "parse.y" /* yacc.c:1646 */
8841  {
8842  token_info_push(p, "module", &(yyloc));
8843  }
8844 #line 8840 "parse.c" /* yacc.c:1646 */
8845  break;
8846 
8847  case 363:
8848 #line 3132 "parse.y" /* yacc.c:1646 */
8849  {
8850  token_info_push(p, "def", &(yyloc));
8851  }
8852 #line 8848 "parse.c" /* yacc.c:1646 */
8853  break;
8854 
8855  case 364:
8856 #line 3138 "parse.y" /* yacc.c:1646 */
8857  {
8858  token_info_push(p, "do", &(yyloc));
8859  }
8860 #line 8856 "parse.c" /* yacc.c:1646 */
8861  break;
8862 
8863  case 365:
8864 #line 3144 "parse.y" /* yacc.c:1646 */
8865  {
8866  token_info_push(p, "do", &(yyloc));
8867  }
8868 #line 8864 "parse.c" /* yacc.c:1646 */
8869  break;
8870 
8871  case 366:
8872 #line 3150 "parse.y" /* yacc.c:1646 */
8873  {
8874  token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
8875  }
8876 #line 8872 "parse.c" /* yacc.c:1646 */
8877  break;
8878 
8879  case 367:
8880 #line 3156 "parse.y" /* yacc.c:1646 */
8881  {
8882  token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
8883  }
8884 #line 8880 "parse.c" /* yacc.c:1646 */
8885  break;
8886 
8887  case 368:
8888 #line 3162 "parse.y" /* yacc.c:1646 */
8889  {
8890  token_info_warn(p, "when", p->token_info, 0, &(yyloc));
8891  }
8892 #line 8888 "parse.c" /* yacc.c:1646 */
8893  break;
8894 
8895  case 369:
8896 #line 3168 "parse.y" /* yacc.c:1646 */
8897  {
8898  token_info *ptinfo_beg = p->token_info;
8899  int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
8900  token_info_warn(p, "else", p->token_info, same, &(yyloc));
8901  if (same) {
8902  token_info e;
8903  e.next = ptinfo_beg->next;
8904  e.token = "else";
8905  token_info_setup(&e, p->lex.pbeg, &(yyloc));
8906  if (!e.nonspc) *ptinfo_beg = e;
8907  }
8908  }
8909 #line 8905 "parse.c" /* yacc.c:1646 */
8910  break;
8911 
8912  case 370:
8913 #line 3183 "parse.y" /* yacc.c:1646 */
8914  {
8915  WARN_EOL("elsif");
8916  token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
8917  }
8918 #line 8914 "parse.c" /* yacc.c:1646 */
8919  break;
8920 
8921  case 371:
8922 #line 3190 "parse.y" /* yacc.c:1646 */
8923  {
8924  token_info_pop(p, "end", &(yyloc));
8925  }
8926 #line 8922 "parse.c" /* yacc.c:1646 */
8927  break;
8928 
8929  case 372:
8930 #line 3196 "parse.y" /* yacc.c:1646 */
8931  {
8932  if (p->in_class && !p->in_def && !dyna_in_block(p))
8933  yyerror1(&(yylsp[0]), "Invalid return in class/module body");
8934  }
8935 #line 8931 "parse.c" /* yacc.c:1646 */
8936  break;
8937 
8938  case 379:
8939 #line 3215 "parse.y" /* yacc.c:1646 */
8940  {
8941  /*%%%*/
8942  (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
8943  fixpos((yyval.node), (yyvsp[-3].node));
8944  /*% %*/
8945  /*% ripper: elsif!($2, $4, escape_Qundef($5)) %*/
8946  }
8947 #line 8943 "parse.c" /* yacc.c:1646 */
8948  break;
8949 
8950  case 381:
8951 #line 3226 "parse.y" /* yacc.c:1646 */
8952  {
8953  /*%%%*/
8954  (yyval.node) = (yyvsp[0].node);
8955  /*% %*/
8956  /*% ripper: else!($2) %*/
8957  }
8958 #line 8954 "parse.c" /* yacc.c:1646 */
8959  break;
8960 
8961  case 384:
8962 #line 3239 "parse.y" /* yacc.c:1646 */
8963  {
8964  /*%%%*/
8965  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
8966  mark_lvar_used(p, (yyval.node));
8967  /*% %*/
8968  /*% ripper: assignable(p, $1) %*/
8969  }
8970 #line 8966 "parse.c" /* yacc.c:1646 */
8971  break;
8972 
8973  case 385:
8974 #line 3247 "parse.y" /* yacc.c:1646 */
8975  {
8976  /*%%%*/
8977  (yyval.node) = (yyvsp[-1].node);
8978  /*% %*/
8979  /*% ripper: mlhs_paren!($2) %*/
8980  }
8981 #line 8977 "parse.c" /* yacc.c:1646 */
8982  break;
8983 
8984  case 386:
8985 #line 3256 "parse.y" /* yacc.c:1646 */
8986  {
8987  /*%%%*/
8988  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
8989  /*% %*/
8990  /*% ripper: mlhs_add!(mlhs_new!, $1) %*/
8991  }
8992 #line 8988 "parse.c" /* yacc.c:1646 */
8993  break;
8994 
8995  case 387:
8996 #line 3263 "parse.y" /* yacc.c:1646 */
8997  {
8998  /*%%%*/
8999  (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
9000  /*% %*/
9001  /*% ripper: mlhs_add!($1, $3) %*/
9002  }
9003 #line 8999 "parse.c" /* yacc.c:1646 */
9004  break;
9005 
9006  case 388:
9007 #line 3272 "parse.y" /* yacc.c:1646 */
9008  {
9009  /*%%%*/
9010  (yyval.node) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
9011  /*% %*/
9012  /*% ripper: $1 %*/
9013  }
9014 #line 9010 "parse.c" /* yacc.c:1646 */
9015  break;
9016 
9017  case 389:
9018 #line 3279 "parse.y" /* yacc.c:1646 */
9019  {
9020  /*%%%*/
9021  (yyval.node) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
9022  /*% %*/
9023  /*% ripper: mlhs_add_star!($1, $3) %*/
9024  }
9025 #line 9021 "parse.c" /* yacc.c:1646 */
9026  break;
9027 
9028  case 390:
9029 #line 3286 "parse.y" /* yacc.c:1646 */
9030  {
9031  /*%%%*/
9032  (yyval.node) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
9033  /*% %*/
9034  /*% ripper: mlhs_add_post!(mlhs_add_star!($1, $3), $5) %*/
9035  }
9036 #line 9032 "parse.c" /* yacc.c:1646 */
9037  break;
9038 
9039  case 391:
9040 #line 3293 "parse.y" /* yacc.c:1646 */
9041  {
9042  /*%%%*/
9043  (yyval.node) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
9044  /*% %*/
9045  /*% ripper: mlhs_add_star!(mlhs_new!, $1) %*/
9046  }
9047 #line 9043 "parse.c" /* yacc.c:1646 */
9048  break;
9049 
9050  case 392:
9051 #line 3300 "parse.y" /* yacc.c:1646 */
9052  {
9053  /*%%%*/
9054  (yyval.node) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
9055  /*% %*/
9056  /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $1), $3) %*/
9057  }
9058 #line 9054 "parse.c" /* yacc.c:1646 */
9059  break;
9060 
9061  case 393:
9062 #line 3309 "parse.y" /* yacc.c:1646 */
9063  {
9064  /*%%%*/
9065  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
9066  mark_lvar_used(p, (yyval.node));
9067  /*% %*/
9068  /*% ripper: assignable(p, $2) %*/
9069  }
9070 #line 9066 "parse.c" /* yacc.c:1646 */
9071  break;
9072 
9073  case 394:
9074 #line 3317 "parse.y" /* yacc.c:1646 */
9075  {
9076  /*%%%*/
9077  (yyval.node) = NODE_SPECIAL_NO_NAME_REST;
9078  /*% %*/
9079  /*% ripper: Qnil %*/
9080  }
9081 #line 9077 "parse.c" /* yacc.c:1646 */
9082  break;
9083 
9084  case 395:
9085 #line 3326 "parse.y" /* yacc.c:1646 */
9086  {
9087  (yyval.node) = new_args_tail(p, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
9088  }
9089 #line 9085 "parse.c" /* yacc.c:1646 */
9090  break;
9091 
9092  case 396:
9093 #line 3330 "parse.y" /* yacc.c:1646 */
9094  {
9095  (yyval.node) = new_args_tail(p, (yyvsp[-1].node), Qnone, (yyvsp[0].id), &(yylsp[-1]));
9096  }
9097 #line 9093 "parse.c" /* yacc.c:1646 */
9098  break;
9099 
9100  case 397:
9101 #line 3334 "parse.y" /* yacc.c:1646 */
9102  {
9103  (yyval.node) = new_args_tail(p, Qnone, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
9104  }
9105 #line 9101 "parse.c" /* yacc.c:1646 */
9106  break;
9107 
9108  case 398:
9109 #line 3338 "parse.y" /* yacc.c:1646 */
9110  {
9111  (yyval.node) = new_args_tail(p, Qnone, ID2VAL(idNil), (yyvsp[0].id), &(yylsp[-1]));
9112  }
9113 #line 9109 "parse.c" /* yacc.c:1646 */
9114  break;
9115 
9116  case 399:
9117 #line 3342 "parse.y" /* yacc.c:1646 */
9118  {
9119  (yyval.node) = new_args_tail(p, Qnone, Qnone, (yyvsp[0].id), &(yylsp[0]));
9120  }
9121 #line 9117 "parse.c" /* yacc.c:1646 */
9122  break;
9123 
9124  case 400:
9125 #line 3348 "parse.y" /* yacc.c:1646 */
9126  {
9127  (yyval.node) = (yyvsp[0].node);
9128  }
9129 #line 9125 "parse.c" /* yacc.c:1646 */
9130  break;
9131 
9132  case 401:
9133 #line 3352 "parse.y" /* yacc.c:1646 */
9134  {
9135  (yyval.node) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
9136  }
9137 #line 9133 "parse.c" /* yacc.c:1646 */
9138  break;
9139 
9140  case 402:
9141 #line 3358 "parse.y" /* yacc.c:1646 */
9142  {
9143  (yyval.node) = new_args(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
9144  }
9145 #line 9141 "parse.c" /* yacc.c:1646 */
9146  break;
9147 
9148  case 403:
9149 #line 3362 "parse.y" /* yacc.c:1646 */
9150  {
9151  (yyval.node) = new_args(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9152  }
9153 #line 9149 "parse.c" /* yacc.c:1646 */
9154  break;
9155 
9156  case 404:
9157 #line 3366 "parse.y" /* yacc.c:1646 */
9158  {
9159  (yyval.node) = new_args(p, (yyvsp[-3].node), (yyvsp[-1].node), Qnone, Qnone, (yyvsp[0].node), &(yyloc));
9160  }
9161 #line 9157 "parse.c" /* yacc.c:1646 */
9162  break;
9163 
9164  case 405:
9165 #line 3370 "parse.y" /* yacc.c:1646 */
9166  {
9167  (yyval.node) = new_args(p, (yyvsp[-5].node), (yyvsp[-3].node), Qnone, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9168  }
9169 #line 9165 "parse.c" /* yacc.c:1646 */
9170  break;
9171 
9172  case 406:
9173 #line 3374 "parse.y" /* yacc.c:1646 */
9174  {
9175  (yyval.node) = new_args(p, (yyvsp[-3].node), Qnone, (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
9176  }
9177 #line 9173 "parse.c" /* yacc.c:1646 */
9178  break;
9179 
9180  case 407:
9181 #line 3378 "parse.y" /* yacc.c:1646 */
9182  {
9183  /*%%%*/
9184  /* magic number for rest_id in iseq_set_arguments() */
9185  (yyval.node) = new_args(p, (yyvsp[-1].node), Qnone, NODE_SPECIAL_EXCESSIVE_COMMA, Qnone, new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[-1])), &(yyloc));
9186  /*% %*/
9187  /*% ripper: new_args(p, $1, Qnone, excessed_comma!, Qnone, new_args_tail(p, Qnone, Qnone, Qnone, NULL), NULL) %*/
9188  }
9189 #line 9185 "parse.c" /* yacc.c:1646 */
9190  break;
9191 
9192  case 408:
9193 #line 3386 "parse.y" /* yacc.c:1646 */
9194  {
9195  (yyval.node) = new_args(p, (yyvsp[-5].node), Qnone, (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9196  }
9197 #line 9193 "parse.c" /* yacc.c:1646 */
9198  break;
9199 
9200  case 409:
9201 #line 3390 "parse.y" /* yacc.c:1646 */
9202  {
9203  (yyval.node) = new_args(p, (yyvsp[-1].node), Qnone, Qnone, Qnone, (yyvsp[0].node), &(yyloc));
9204  }
9205 #line 9201 "parse.c" /* yacc.c:1646 */
9206  break;
9207 
9208  case 410:
9209 #line 3394 "parse.y" /* yacc.c:1646 */
9210  {
9211  (yyval.node) = new_args(p, Qnone, (yyvsp[-3].node), (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
9212  }
9213 #line 9209 "parse.c" /* yacc.c:1646 */
9214  break;
9215 
9216  case 411:
9217 #line 3398 "parse.y" /* yacc.c:1646 */
9218  {
9219  (yyval.node) = new_args(p, Qnone, (yyvsp[-5].node), (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9220  }
9221 #line 9217 "parse.c" /* yacc.c:1646 */
9222  break;
9223 
9224  case 412:
9225 #line 3402 "parse.y" /* yacc.c:1646 */
9226  {
9227  (yyval.node) = new_args(p, Qnone, (yyvsp[-1].node), Qnone, Qnone, (yyvsp[0].node), &(yyloc));
9228  }
9229 #line 9225 "parse.c" /* yacc.c:1646 */
9230  break;
9231 
9232  case 413:
9233 #line 3406 "parse.y" /* yacc.c:1646 */
9234  {
9235  (yyval.node) = new_args(p, Qnone, (yyvsp[-3].node), Qnone, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9236  }
9237 #line 9233 "parse.c" /* yacc.c:1646 */
9238  break;
9239 
9240  case 414:
9241 #line 3410 "parse.y" /* yacc.c:1646 */
9242  {
9243  (yyval.node) = new_args(p, Qnone, Qnone, (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
9244  }
9245 #line 9241 "parse.c" /* yacc.c:1646 */
9246  break;
9247 
9248  case 415:
9249 #line 3414 "parse.y" /* yacc.c:1646 */
9250  {
9251  (yyval.node) = new_args(p, Qnone, Qnone, (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9252  }
9253 #line 9249 "parse.c" /* yacc.c:1646 */
9254  break;
9255 
9256  case 416:
9257 #line 3418 "parse.y" /* yacc.c:1646 */
9258  {
9259  (yyval.node) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyvsp[0].node), &(yyloc));
9260  }
9261 #line 9257 "parse.c" /* yacc.c:1646 */
9262  break;
9263 
9264  case 418:
9265 #line 3425 "parse.y" /* yacc.c:1646 */
9266  {
9267  p->command_start = TRUE;
9268  }
9269 #line 9265 "parse.c" /* yacc.c:1646 */
9270  break;
9271 
9272  case 419:
9273 #line 3431 "parse.y" /* yacc.c:1646 */
9274  {
9275  p->cur_arg = 0;
9277  /*%%%*/
9278  (yyval.node) = 0;
9279  /*% %*/
9280  /*% ripper: block_var!(params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil), escape_Qundef($2)) %*/
9281  }
9282 #line 9278 "parse.c" /* yacc.c:1646 */
9283  break;
9284 
9285  case 420:
9286 #line 3440 "parse.y" /* yacc.c:1646 */
9287  {
9288  p->cur_arg = 0;
9290  /*%%%*/
9291  (yyval.node) = (yyvsp[-2].node);
9292  /*% %*/
9293  /*% ripper: block_var!(escape_Qundef($2), escape_Qundef($3)) %*/
9294  }
9295 #line 9291 "parse.c" /* yacc.c:1646 */
9296  break;
9297 
9298  case 421:
9299 #line 3452 "parse.y" /* yacc.c:1646 */
9300  {
9301  (yyval.node) = 0;
9302  }
9303 #line 9299 "parse.c" /* yacc.c:1646 */
9304  break;
9305 
9306  case 422:
9307 #line 3456 "parse.y" /* yacc.c:1646 */
9308  {
9309  /*%%%*/
9310  (yyval.node) = 0;
9311  /*% %*/
9312  /*% ripper: $3 %*/
9313  }
9314 #line 9310 "parse.c" /* yacc.c:1646 */
9315  break;
9316 
9317  case 425:
9318 #line 3471 "parse.y" /* yacc.c:1646 */
9319  {
9320  new_bv(p, get_id((yyvsp[0].id)));
9321  /*% ripper: get_value($1) %*/
9322  }
9323 #line 9319 "parse.c" /* yacc.c:1646 */
9324  break;
9325 
9326  case 426:
9327 #line 3476 "parse.y" /* yacc.c:1646 */
9328  {
9329  (yyval.node) = 0;
9330  }
9331 #line 9327 "parse.c" /* yacc.c:1646 */
9332  break;
9333 
9334  case 427:
9335 #line 3481 "parse.y" /* yacc.c:1646 */
9336  {
9337  (yyval.vars) = dyna_push(p);
9338  }
9339 #line 9335 "parse.c" /* yacc.c:1646 */
9340  break;
9341 
9342  case 428:
9343 #line 3484 "parse.y" /* yacc.c:1646 */
9344  {
9345  (yyval.num) = p->lex.lpar_beg;
9346  p->lex.lpar_beg = p->lex.paren_nest;
9347  }
9348 #line 9344 "parse.c" /* yacc.c:1646 */
9349  break;
9350 
9351  case 429:
9352 #line 3488 "parse.y" /* yacc.c:1646 */
9353  {
9354  (yyval.num) = p->max_numparam;
9355  p->max_numparam = 0;
9356  }
9357 #line 9353 "parse.c" /* yacc.c:1646 */
9358  break;
9359 
9360  case 430:
9361 #line 3492 "parse.y" /* yacc.c:1646 */
9362  {
9363  (yyval.node) = numparam_push(p);
9364  }
9365 #line 9361 "parse.c" /* yacc.c:1646 */
9366  break;
9367 
9368  case 431:
9369 #line 3496 "parse.y" /* yacc.c:1646 */
9370  {
9371  CMDARG_PUSH(0);
9372  }
9373 #line 9369 "parse.c" /* yacc.c:1646 */
9374  break;
9375 
9376  case 432:
9377 #line 3500 "parse.y" /* yacc.c:1646 */
9378  {
9379  int max_numparam = p->max_numparam;
9380  p->lex.lpar_beg = (yyvsp[-5].num);
9381  p->max_numparam = (yyvsp[-4].num);
9382  CMDARG_POP();
9383  (yyvsp[-2].node) = args_with_numbered(p, (yyvsp[-2].node), max_numparam);
9384  /*%%%*/
9385  {
9386  YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
9387  (yyval.node) = NEW_LAMBDA((yyvsp[-2].node), (yyvsp[0].node), &loc);
9388  nd_set_line((yyval.node)->nd_body, (yylsp[0]).end_pos.lineno);
9389  nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
9390  }
9391  /*% %*/
9392  /*% ripper: lambda!($5, $7) %*/
9393  numparam_pop(p, (yyvsp[-3].node));
9394  dyna_pop(p, (yyvsp[-6].vars));
9395  }
9396 #line 9392 "parse.c" /* yacc.c:1646 */
9397  break;
9398 
9399  case 433:
9400 #line 3521 "parse.y" /* yacc.c:1646 */
9401  {
9402  /*%%%*/
9403  (yyval.node) = (yyvsp[-2].node);
9405  /*% %*/
9406  /*% ripper: paren!($2) %*/
9407  }
9408 #line 9404 "parse.c" /* yacc.c:1646 */
9409  break;
9410 
9411  case 434:
9412 #line 3529 "parse.y" /* yacc.c:1646 */
9413  {
9414  /*%%%*/
9415  if (!args_info_empty_p((yyvsp[0].node)->nd_ainfo))
9417  /*% %*/
9418  (yyval.node) = (yyvsp[0].node);
9419  }
9420 #line 9416 "parse.c" /* yacc.c:1646 */
9421  break;
9422 
9423  case 435:
9424 #line 3539 "parse.y" /* yacc.c:1646 */
9425  {
9426  token_info_pop(p, "}", &(yylsp[0]));
9427  (yyval.node) = (yyvsp[-1].node);
9428  }
9429 #line 9425 "parse.c" /* yacc.c:1646 */
9430  break;
9431 
9432  case 436:
9433 #line 3544 "parse.y" /* yacc.c:1646 */
9434  {
9435  (yyval.node) = (yyvsp[-1].node);
9436  }
9437 #line 9433 "parse.c" /* yacc.c:1646 */
9438  break;
9439 
9440  case 437:
9441 #line 3550 "parse.y" /* yacc.c:1646 */
9442  {
9443  (yyval.node) = (yyvsp[-1].node);
9444  /*%%%*/
9445  (yyval.node)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
9446  nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
9447  /*% %*/
9448  }
9449 #line 9445 "parse.c" /* yacc.c:1646 */
9450  break;
9451 
9452  case 438:
9453 #line 3560 "parse.y" /* yacc.c:1646 */
9454  {
9455  /*%%%*/
9456  if (nd_type((yyvsp[-1].node)) == NODE_YIELD) {
9457  compile_error(p, "block given to yield");
9458  }
9459  else {
9460  block_dup_check(p, (yyvsp[-1].node)->nd_args, (yyvsp[0].node));
9461  }
9462  (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9463  fixpos((yyval.node), (yyvsp[-1].node));
9464  /*% %*/
9465  /*% ripper: method_add_block!($1, $2) %*/
9466  }
9467 #line 9463 "parse.c" /* yacc.c:1646 */
9468  break;
9469 
9470  case 439:
9471 #line 3574 "parse.y" /* yacc.c:1646 */
9472  {
9473  /*%%%*/
9474  (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
9475  /*% %*/
9476  /*% ripper: opt_event(:method_add_arg!, call!($1, $2, $3), $4) %*/
9477  }
9478 #line 9474 "parse.c" /* yacc.c:1646 */
9479  break;
9480 
9481  case 440:
9482 #line 3581 "parse.y" /* yacc.c:1646 */
9483  {
9484  /*%%%*/
9485  (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
9486  /*% %*/
9487  /*% ripper: opt_event(:method_add_block!, command_call!($1, $2, $3, $4), $5) %*/
9488  }
9489 #line 9485 "parse.c" /* yacc.c:1646 */
9490  break;
9491 
9492  case 441:
9493 #line 3588 "parse.y" /* yacc.c:1646 */
9494  {
9495  /*%%%*/
9496  (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
9497  /*% %*/
9498  /*% ripper: method_add_block!(command_call!($1, $2, $3, $4), $5) %*/
9499  }
9500 #line 9496 "parse.c" /* yacc.c:1646 */
9501  break;
9502 
9503  case 442:
9504 #line 3597 "parse.y" /* yacc.c:1646 */
9505  {
9506  /*%%%*/
9507  (yyval.node) = (yyvsp[-1].node);
9508  (yyval.node)->nd_args = (yyvsp[0].node);
9509  nd_set_last_loc((yyvsp[-1].node), (yylsp[0]).end_pos);
9510  /*% %*/
9511  /*% ripper: method_add_arg!(fcall!($1), $2) %*/
9512  }
9513 #line 9509 "parse.c" /* yacc.c:1646 */
9514  break;
9515 
9516  case 443:
9517 #line 3606 "parse.y" /* yacc.c:1646 */
9518  {
9519  /*%%%*/
9520  (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
9521  nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
9522  /*% %*/
9523  /*% ripper: opt_event(:method_add_arg!, call!($1, $2, $3), $4) %*/
9524  }
9525 #line 9521 "parse.c" /* yacc.c:1646 */
9526  break;
9527 
9528  case 444:
9529 #line 3614 "parse.y" /* yacc.c:1646 */
9530  {
9531  /*%%%*/
9532  (yyval.node) = new_qcall(p, ID2VAL(idCOLON2), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
9533  nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
9534  /*% %*/
9535  /*% ripper: method_add_arg!(call!($1, ID2VAL(idCOLON2), $3), $4) %*/
9536  }
9537 #line 9533 "parse.c" /* yacc.c:1646 */
9538  break;
9539 
9540  case 445:
9541 #line 3622 "parse.y" /* yacc.c:1646 */
9542  {
9543  /*%%%*/
9544  (yyval.node) = new_qcall(p, ID2VAL(idCOLON2), (yyvsp[-2].node), (yyvsp[0].id), Qnull, &(yylsp[0]), &(yyloc));
9545  /*% %*/
9546  /*% ripper: call!($1, ID2VAL(idCOLON2), $3) %*/
9547  }
9548 #line 9544 "parse.c" /* yacc.c:1646 */
9549  break;
9550 
9551  case 446:
9552 #line 3629 "parse.y" /* yacc.c:1646 */
9553  {
9554  /*%%%*/
9555  (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), ID2VAL(idCall), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
9556  nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
9557  /*% %*/
9558  /*% ripper: method_add_arg!(call!($1, $2, ID2VAL(idCall)), $3) %*/
9559  }
9560 #line 9556 "parse.c" /* yacc.c:1646 */
9561  break;
9562 
9563  case 447:
9564 #line 3637 "parse.y" /* yacc.c:1646 */
9565  {
9566  /*%%%*/
9567  (yyval.node) = new_qcall(p, ID2VAL(idCOLON2), (yyvsp[-2].node), ID2VAL(idCall), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
9568  nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
9569  /*% %*/
9570  /*% ripper: method_add_arg!(call!($1, ID2VAL(idCOLON2), ID2VAL(idCall)), $3) %*/
9571  }
9572 #line 9568 "parse.c" /* yacc.c:1646 */
9573  break;
9574 
9575  case 448:
9576 #line 3645 "parse.y" /* yacc.c:1646 */
9577  {
9578  /*%%%*/
9579  (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc));
9580  /*% %*/
9581  /*% ripper: super!($2) %*/
9582  }
9583 #line 9579 "parse.c" /* yacc.c:1646 */
9584  break;
9585 
9586  case 449:
9587 #line 3652 "parse.y" /* yacc.c:1646 */
9588  {
9589  /*%%%*/
9590  (yyval.node) = NEW_ZSUPER(&(yyloc));
9591  /*% %*/
9592  /*% ripper: zsuper! %*/
9593  }
9594 #line 9590 "parse.c" /* yacc.c:1646 */
9595  break;
9596 
9597  case 450:
9598 #line 3659 "parse.y" /* yacc.c:1646 */
9599  {
9600  /*%%%*/
9601  if ((yyvsp[-3].node) && nd_type((yyvsp[-3].node)) == NODE_SELF)
9602  (yyval.node) = NEW_FCALL(tAREF, (yyvsp[-1].node), &(yyloc));
9603  else
9604  (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
9605  fixpos((yyval.node), (yyvsp[-3].node));
9606  /*% %*/
9607  /*% ripper: aref!($1, escape_Qundef($3)) %*/
9608  }
9609 #line 9605 "parse.c" /* yacc.c:1646 */
9610  break;
9611 
9612  case 451:
9613 #line 3672 "parse.y" /* yacc.c:1646 */
9614  {
9615  (yyval.node) = (yyvsp[-1].node);
9616  /*%%%*/
9617  (yyval.node)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
9618  nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
9619  /*% %*/
9620  }
9621 #line 9617 "parse.c" /* yacc.c:1646 */
9622  break;
9623 
9624  case 452:
9625 #line 3680 "parse.y" /* yacc.c:1646 */
9626  {
9627  (yyval.node) = (yyvsp[-1].node);
9628  /*%%%*/
9629  (yyval.node)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
9630  nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
9631  /*% %*/
9632  }
9633 #line 9629 "parse.c" /* yacc.c:1646 */
9634  break;
9635 
9636  case 453:
9637 #line 3689 "parse.y" /* yacc.c:1646 */
9638  {(yyval.vars) = dyna_push(p);}
9639 #line 9635 "parse.c" /* yacc.c:1646 */
9640  break;
9641 
9642  case 454:
9643 #line 3690 "parse.y" /* yacc.c:1646 */
9644  {
9645  (yyval.num) = p->max_numparam;
9646  p->max_numparam = 0;
9647  }
9648 #line 9644 "parse.c" /* yacc.c:1646 */
9649  break;
9650 
9651  case 455:
9652 #line 3694 "parse.y" /* yacc.c:1646 */
9653  {
9654  (yyval.node) = numparam_push(p);
9655  }
9656 #line 9652 "parse.c" /* yacc.c:1646 */
9657  break;
9658 
9659  case 456:
9660 #line 3698 "parse.y" /* yacc.c:1646 */
9661  {
9662  int max_numparam = p->max_numparam;
9663  p->max_numparam = (yyvsp[-3].num);
9664  (yyvsp[-1].node) = args_with_numbered(p, (yyvsp[-1].node), max_numparam);
9665  /*%%%*/
9666  (yyval.node) = NEW_ITER((yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9667  /*% %*/
9668  /*% ripper: brace_block!(escape_Qundef($4), $5) %*/
9669  numparam_pop(p, (yyvsp[-2].node));
9670  dyna_pop(p, (yyvsp[-4].vars));
9671  }
9672 #line 9668 "parse.c" /* yacc.c:1646 */
9673  break;
9674 
9675  case 457:
9676 #line 3711 "parse.y" /* yacc.c:1646 */
9677  {(yyval.vars) = dyna_push(p);}
9678 #line 9674 "parse.c" /* yacc.c:1646 */
9679  break;
9680 
9681  case 458:
9682 #line 3712 "parse.y" /* yacc.c:1646 */
9683  {
9684  (yyval.num) = p->max_numparam;
9685  p->max_numparam = 0;
9686  }
9687 #line 9683 "parse.c" /* yacc.c:1646 */
9688  break;
9689 
9690  case 459:
9691 #line 3716 "parse.y" /* yacc.c:1646 */
9692  {
9693  (yyval.node) = numparam_push(p);
9694  CMDARG_PUSH(0);
9695  }
9696 #line 9692 "parse.c" /* yacc.c:1646 */
9697  break;
9698 
9699  case 460:
9700 #line 3721 "parse.y" /* yacc.c:1646 */
9701  {
9702  int max_numparam = p->max_numparam;
9703  p->max_numparam = (yyvsp[-3].num);
9704  (yyvsp[-1].node) = args_with_numbered(p, (yyvsp[-1].node), max_numparam);
9705  /*%%%*/
9706  (yyval.node) = NEW_ITER((yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9707  /*% %*/
9708  /*% ripper: do_block!(escape_Qundef($4), $5) %*/
9709  CMDARG_POP();
9710  numparam_pop(p, (yyvsp[-2].node));
9711  dyna_pop(p, (yyvsp[-4].vars));
9712  }
9713 #line 9709 "parse.c" /* yacc.c:1646 */
9714  break;
9715 
9716  case 461:
9717 #line 3736 "parse.y" /* yacc.c:1646 */
9718  {
9719  /*%%%*/
9720  check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
9721  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
9722  /*% %*/
9723  /*% ripper: args_add!(args_new!, $1) %*/
9724  }
9725 #line 9721 "parse.c" /* yacc.c:1646 */
9726  break;
9727 
9728  case 462:
9729 #line 3744 "parse.y" /* yacc.c:1646 */
9730  {
9731  /*%%%*/
9732  (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc));
9733  /*% %*/
9734  /*% ripper: args_add_star!(args_new!, $2) %*/
9735  }
9736 #line 9732 "parse.c" /* yacc.c:1646 */
9737  break;
9738 
9739  case 463:
9740 #line 3751 "parse.y" /* yacc.c:1646 */
9741  {
9742  /*%%%*/
9743  check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
9744  (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
9745  /*% %*/
9746  /*% ripper: args_add!($1, $3) %*/
9747  }
9748 #line 9744 "parse.c" /* yacc.c:1646 */
9749  break;
9750 
9751  case 464:
9752 #line 3759 "parse.y" /* yacc.c:1646 */
9753  {
9754  /*%%%*/
9755  (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
9756  /*% %*/
9757  /*% ripper: args_add_star!($1, $4) %*/
9758  }
9759 #line 9755 "parse.c" /* yacc.c:1646 */
9760  break;
9761 
9762  case 465:
9763 #line 3770 "parse.y" /* yacc.c:1646 */
9764  {
9765  /*%%%*/
9766  (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9767  fixpos((yyval.node), (yyvsp[-3].node));
9768  /*% %*/
9769  /*% ripper: when!($2, $4, escape_Qundef($5)) %*/
9770  }
9771 #line 9767 "parse.c" /* yacc.c:1646 */
9772  break;
9773 
9774  case 468:
9775 #line 3784 "parse.y" /* yacc.c:1646 */
9776  {
9777  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
9778  p->command_start = FALSE;
9779  (yyval.num) = p->in_kwarg;
9780  p->in_kwarg = 1;
9781  }
9782 #line 9778 "parse.c" /* yacc.c:1646 */
9783  break;
9784 
9785  case 469:
9786 #line 3790 "parse.y" /* yacc.c:1646 */
9787  {(yyval.tbl) = push_pvtbl(p);}
9788 #line 9784 "parse.c" /* yacc.c:1646 */
9789  break;
9790 
9791  case 470:
9792 #line 3791 "parse.y" /* yacc.c:1646 */
9793  {(yyval.tbl) = push_pktbl(p);}
9794 #line 9790 "parse.c" /* yacc.c:1646 */
9795  break;
9796 
9797  case 471:
9798 #line 3793 "parse.y" /* yacc.c:1646 */
9799  {pop_pktbl(p, (yyvsp[-2].tbl));}
9800 #line 9796 "parse.c" /* yacc.c:1646 */
9801  break;
9802 
9803  case 472:
9804 #line 3794 "parse.y" /* yacc.c:1646 */
9805  {pop_pvtbl(p, (yyvsp[-4].tbl));}
9806 #line 9802 "parse.c" /* yacc.c:1646 */
9807  break;
9808 
9809  case 473:
9810 #line 3795 "parse.y" /* yacc.c:1646 */
9811  {
9812  p->in_kwarg = !!(yyvsp[-6].num);
9813  }
9814 #line 9810 "parse.c" /* yacc.c:1646 */
9815  break;
9816 
9817  case 474:
9818 #line 3800 "parse.y" /* yacc.c:1646 */
9819  {
9820  /*%%%*/
9821  (yyval.node) = NEW_IN((yyvsp[-6].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9822  /*% %*/
9823  /*% ripper: in!($5, $10, escape_Qundef($11)) %*/
9824  }
9825 #line 9821 "parse.c" /* yacc.c:1646 */
9826  break;
9827 
9828  case 478:
9829 #line 3814 "parse.y" /* yacc.c:1646 */
9830  {
9831  /*%%%*/
9832  (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc));
9833  fixpos((yyval.node), (yyvsp[0].node));
9834  /*% %*/
9835  /*% ripper: if_mod!($3, $1) %*/
9836  }
9837 #line 9833 "parse.c" /* yacc.c:1646 */
9838  break;
9839 
9840  case 479:
9841 #line 3822 "parse.y" /* yacc.c:1646 */
9842  {
9843  /*%%%*/
9844  (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc));
9845  fixpos((yyval.node), (yyvsp[0].node));
9846  /*% %*/
9847  /*% ripper: unless_mod!($3, $1) %*/
9848  }
9849 #line 9845 "parse.c" /* yacc.c:1646 */
9850  break;
9851 
9852  case 481:
9853 #line 3833 "parse.y" /* yacc.c:1646 */
9854  {
9855  (yyval.node) = new_array_pattern_tail(p, Qnone, 1, 0, Qnone, &(yyloc));
9856  (yyval.node) = new_array_pattern(p, Qnone, get_value((yyvsp[-1].node)), (yyval.node), &(yyloc));
9857  }
9858 #line 9854 "parse.c" /* yacc.c:1646 */
9859  break;
9860 
9861  case 482:
9862 #line 3838 "parse.y" /* yacc.c:1646 */
9863  {
9864  (yyval.node) = new_array_pattern(p, Qnone, get_value((yyvsp[-2].node)), (yyvsp[0].node), &(yyloc));
9865  /*%%%*/
9866  nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
9867  /*%
9868  %*/
9869  }
9870 #line 9866 "parse.c" /* yacc.c:1646 */
9871  break;
9872 
9873  case 483:
9874 #line 3846 "parse.y" /* yacc.c:1646 */
9875  {
9876  (yyval.node) = new_array_pattern(p, Qnone, Qnone, (yyvsp[0].node), &(yyloc));
9877  }
9878 #line 9874 "parse.c" /* yacc.c:1646 */
9879  break;
9880 
9881  case 484:
9882 #line 3850 "parse.y" /* yacc.c:1646 */
9883  {
9884  (yyval.node) = new_hash_pattern(p, Qnone, (yyvsp[0].node), &(yyloc));
9885  }
9886 #line 9882 "parse.c" /* yacc.c:1646 */
9887  break;
9888 
9889  case 486:
9890 #line 3859 "parse.y" /* yacc.c:1646 */
9891  {
9892  /*%%%*/
9893  NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
9894  n = list_append(p, n, (yyvsp[0].node));
9895  (yyval.node) = new_hash(p, n, &(yyloc));
9896  /*% %*/
9897  /*% ripper: binary!($1, STATIC_ID2SYM((id_assoc)), $3) %*/
9898  }
9899 #line 9895 "parse.c" /* yacc.c:1646 */
9900  break;
9901 
9902  case 488:
9903 #line 3871 "parse.y" /* yacc.c:1646 */
9904  {
9905  /*%%%*/
9906  (yyval.node) = NEW_NODE(NODE_OR, (yyvsp[-2].node), (yyvsp[0].node), 0, &(yyloc));
9907  /*% %*/
9908  /*% ripper: binary!($1, STATIC_ID2SYM(idOr), $3) %*/
9909  }
9910 #line 9906 "parse.c" /* yacc.c:1646 */
9911  break;
9912 
9913  case 490:
9914 #line 3880 "parse.y" /* yacc.c:1646 */
9915  {(yyval.tbl) = push_pktbl(p);}
9916 #line 9912 "parse.c" /* yacc.c:1646 */
9917  break;
9918 
9919  case 491:
9920 #line 3881 "parse.y" /* yacc.c:1646 */
9921  {(yyval.tbl) = push_pktbl(p);}
9922 #line 9918 "parse.c" /* yacc.c:1646 */
9923  break;
9924 
9925  case 493:
9926 #line 3885 "parse.y" /* yacc.c:1646 */
9927  {
9928  pop_pktbl(p, (yyvsp[-2].tbl));
9929  (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), Qnone, (yyvsp[-1].node), &(yyloc));
9930  /*%%%*/
9931  nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
9932  /*%
9933  %*/
9934  }
9935 #line 9931 "parse.c" /* yacc.c:1646 */
9936  break;
9937 
9938  case 494:
9939 #line 3894 "parse.y" /* yacc.c:1646 */
9940  {
9941  pop_pktbl(p, (yyvsp[-2].tbl));
9942  (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
9943  /*%%%*/
9944  nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
9945  /*%
9946  %*/
9947  }
9948 #line 9944 "parse.c" /* yacc.c:1646 */
9949  break;
9950 
9951  case 495:
9952 #line 3903 "parse.y" /* yacc.c:1646 */
9953  {
9954  (yyval.node) = new_array_pattern_tail(p, Qnone, 0, 0, Qnone, &(yyloc));
9955  (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), Qnone, (yyval.node), &(yyloc));
9956  }
9957 #line 9953 "parse.c" /* yacc.c:1646 */
9958  break;
9959 
9960  case 496:
9961 #line 3908 "parse.y" /* yacc.c:1646 */
9962  {
9963  pop_pktbl(p, (yyvsp[-2].tbl));
9964  (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), Qnone, (yyvsp[-1].node), &(yyloc));
9965  /*%%%*/
9966  nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
9967  /*%
9968  %*/
9969  }
9970 #line 9966 "parse.c" /* yacc.c:1646 */
9971  break;
9972 
9973  case 497:
9974 #line 3917 "parse.y" /* yacc.c:1646 */
9975  {
9976  pop_pktbl(p, (yyvsp[-2].tbl));
9977  (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
9978  /*%%%*/
9979  nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
9980  /*%
9981  %*/
9982  }
9983 #line 9979 "parse.c" /* yacc.c:1646 */
9984  break;
9985 
9986  case 498:
9987 #line 3926 "parse.y" /* yacc.c:1646 */
9988  {
9989  (yyval.node) = new_array_pattern_tail(p, Qnone, 0, 0, Qnone, &(yyloc));
9990  (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), Qnone, (yyval.node), &(yyloc));
9991  }
9992 #line 9988 "parse.c" /* yacc.c:1646 */
9993  break;
9994 
9995  case 499:
9996 #line 3930 "parse.y" /* yacc.c:1646 */
9997  {(yyval.tbl) = push_pktbl(p);}
9998 #line 9994 "parse.c" /* yacc.c:1646 */
9999  break;
10000 
10001  case 500:
10002 #line 3931 "parse.y" /* yacc.c:1646 */
10003  {
10004  pop_pktbl(p, (yyvsp[-2].tbl));
10005  (yyval.node) = new_array_pattern(p, Qnone, Qnone, (yyvsp[-1].node), &(yyloc));
10006  }
10007 #line 10003 "parse.c" /* yacc.c:1646 */
10008  break;
10009 
10010  case 501:
10011 #line 3936 "parse.y" /* yacc.c:1646 */
10012  {
10013  (yyval.node) = new_array_pattern_tail(p, Qnone, 0, 0, Qnone, &(yyloc));
10014  (yyval.node) = new_array_pattern(p, Qnone, Qnone, (yyval.node), &(yyloc));
10015  }
10016 #line 10012 "parse.c" /* yacc.c:1646 */
10017  break;
10018 
10019  case 502:
10020 #line 3941 "parse.y" /* yacc.c:1646 */
10021  {
10022  (yyval.tbl) = push_pktbl(p);
10023  (yyvsp[0].num) = p->in_kwarg;
10024  p->in_kwarg = 0;
10025  }
10026 #line 10022 "parse.c" /* yacc.c:1646 */
10027  break;
10028 
10029  case 503:
10030 #line 3947 "parse.y" /* yacc.c:1646 */
10031  {
10032  pop_pktbl(p, (yyvsp[-2].tbl));
10033  p->in_kwarg = (yyvsp[-3].num);
10034  (yyval.node) = new_hash_pattern(p, Qnone, (yyvsp[-1].node), &(yyloc));
10035  }
10036 #line 10032 "parse.c" /* yacc.c:1646 */
10037  break;
10038 
10039  case 504:
10040 #line 3953 "parse.y" /* yacc.c:1646 */
10041  {
10042  (yyval.node) = new_hash_pattern_tail(p, Qnone, 0, &(yyloc));
10043  (yyval.node) = new_hash_pattern(p, Qnone, (yyval.node), &(yyloc));
10044  }
10045 #line 10041 "parse.c" /* yacc.c:1646 */
10046  break;
10047 
10048  case 505:
10049 #line 3957 "parse.y" /* yacc.c:1646 */
10050  {(yyval.tbl) = push_pktbl(p);}
10051 #line 10047 "parse.c" /* yacc.c:1646 */
10052  break;
10053 
10054  case 506:
10055 #line 3958 "parse.y" /* yacc.c:1646 */
10056  {
10057  pop_pktbl(p, (yyvsp[-2].tbl));
10058  (yyval.node) = (yyvsp[-1].node);
10059  }
10060 #line 10056 "parse.c" /* yacc.c:1646 */
10061  break;
10062 
10063  case 507:
10064 #line 3965 "parse.y" /* yacc.c:1646 */
10065  {
10066  /*%%%*/
10067  NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
10068  (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, Qnone, &(yyloc));
10069  /*%
10070  $$ = new_array_pattern_tail(p, rb_ary_new_from_args(1, get_value($1)), 0, 0, Qnone, &@$);
10071  %*/
10072  }
10073 #line 10069 "parse.c" /* yacc.c:1646 */
10074  break;
10075 
10076  case 508:
10077 #line 3974 "parse.y" /* yacc.c:1646 */
10078  {
10079  (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, Qnone, &(yyloc));
10080  }
10081 #line 10077 "parse.c" /* yacc.c:1646 */
10082  break;
10083 
10084  case 509:
10085 #line 3978 "parse.y" /* yacc.c:1646 */
10086  {
10087  /*%%%*/
10088  (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, Qnone, &(yyloc));
10089  /*%
10090  VALUE pre_args = rb_ary_concat($1, get_value($2));
10091  $$ = new_array_pattern_tail(p, pre_args, 0, 0, Qnone, &@$);
10092  %*/
10093  }
10094 #line 10090 "parse.c" /* yacc.c:1646 */
10095  break;
10096 
10097  case 510:
10098 #line 3987 "parse.y" /* yacc.c:1646 */
10099  {
10100  (yyval.node) = new_array_pattern_tail(p, (yyvsp[-2].node), 1, (yyvsp[0].id), Qnone, &(yyloc));
10101  }
10102 #line 10098 "parse.c" /* yacc.c:1646 */
10103  break;
10104 
10105  case 511:
10106 #line 3991 "parse.y" /* yacc.c:1646 */
10107  {
10108  (yyval.node) = new_array_pattern_tail(p, (yyvsp[-4].node), 1, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc));
10109  }
10110 #line 10106 "parse.c" /* yacc.c:1646 */
10111  break;
10112 
10113  case 512:
10114 #line 3995 "parse.y" /* yacc.c:1646 */
10115  {
10116  (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, 0, Qnone, &(yyloc));
10117  }
10118 #line 10114 "parse.c" /* yacc.c:1646 */
10119  break;
10120 
10121  case 513:
10122 #line 3999 "parse.y" /* yacc.c:1646 */
10123  {
10124  (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, 0, (yyvsp[0].node), &(yyloc));
10125  }
10126 #line 10122 "parse.c" /* yacc.c:1646 */
10127  break;
10128 
10129  case 515:
10130 #line 4006 "parse.y" /* yacc.c:1646 */
10131  {
10132  (yyval.node) = (yyvsp[-1].node);
10133  }
10134 #line 10130 "parse.c" /* yacc.c:1646 */
10135  break;
10136 
10137  case 516:
10138 #line 4010 "parse.y" /* yacc.c:1646 */
10139  {
10140  /*%%%*/
10141  (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
10142  /*% %*/
10143  /*% ripper: rb_ary_concat($1, get_value($2)) %*/
10144  }
10145 #line 10141 "parse.c" /* yacc.c:1646 */
10146  break;
10147 
10148  case 517:
10149 #line 4019 "parse.y" /* yacc.c:1646 */
10150  {
10151  (yyval.node) = new_array_pattern_tail(p, Qnone, 1, (yyvsp[0].id), Qnone, &(yyloc));
10152  }
10153 #line 10149 "parse.c" /* yacc.c:1646 */
10154  break;
10155 
10156  case 518:
10157 #line 4023 "parse.y" /* yacc.c:1646 */
10158  {
10159  (yyval.node) = new_array_pattern_tail(p, Qnone, 1, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc));
10160  }
10161 #line 10157 "parse.c" /* yacc.c:1646 */
10162  break;
10163 
10164  case 519:
10165 #line 4027 "parse.y" /* yacc.c:1646 */
10166  {
10167  (yyval.node) = new_array_pattern_tail(p, Qnone, 1, 0, Qnone, &(yyloc));
10168  }
10169 #line 10165 "parse.c" /* yacc.c:1646 */
10170  break;
10171 
10172  case 520:
10173 #line 4031 "parse.y" /* yacc.c:1646 */
10174  {
10175  (yyval.node) = new_array_pattern_tail(p, Qnone, 1, 0, (yyvsp[0].node), &(yyloc));
10176  }
10177 #line 10173 "parse.c" /* yacc.c:1646 */
10178  break;
10179 
10180  case 522:
10181 #line 4038 "parse.y" /* yacc.c:1646 */
10182  {
10183  /*%%%*/
10184  (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
10185  /*% %*/
10186  /*% ripper: rb_ary_concat($1, get_value($3)) %*/
10187  }
10188 #line 10184 "parse.c" /* yacc.c:1646 */
10189  break;
10190 
10191  case 523:
10192 #line 4047 "parse.y" /* yacc.c:1646 */
10193  {
10194  /*%%%*/
10195  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
10196  /*% %*/
10197  /*% ripper: rb_ary_new_from_args(1, get_value($1)) %*/
10198  }
10199 #line 10195 "parse.c" /* yacc.c:1646 */
10200  break;
10201 
10202  case 524:
10203 #line 4056 "parse.y" /* yacc.c:1646 */
10204  {
10205  (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
10206  }
10207 #line 10203 "parse.c" /* yacc.c:1646 */
10208  break;
10209 
10210  case 525:
10211 #line 4060 "parse.y" /* yacc.c:1646 */
10212  {
10213  (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
10214  }
10215 #line 10211 "parse.c" /* yacc.c:1646 */
10216  break;
10217 
10218  case 526:
10219 #line 4064 "parse.y" /* yacc.c:1646 */
10220  {
10221  (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
10222  }
10223 #line 10219 "parse.c" /* yacc.c:1646 */
10224  break;
10225 
10226  case 527:
10227 #line 4068 "parse.y" /* yacc.c:1646 */
10228  {
10229  (yyval.node) = new_hash_pattern_tail(p, new_hash(p, Qnone, &(yyloc)), (yyvsp[0].id), &(yyloc));
10230  }
10231 #line 10227 "parse.c" /* yacc.c:1646 */
10232  break;
10233 
10234  case 528:
10235 #line 4072 "parse.y" /* yacc.c:1646 */
10236  {
10237  (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), ID2VAL(idNil), &(yyloc));
10238  }
10239 #line 10235 "parse.c" /* yacc.c:1646 */
10240  break;
10241 
10242  case 529:
10243 #line 4076 "parse.y" /* yacc.c:1646 */
10244  {
10245  (yyval.node) = new_hash_pattern_tail(p, new_hash(p, Qnone, &(yyloc)), ID2VAL(idNil), &(yyloc));
10246  }
10247 #line 10243 "parse.c" /* yacc.c:1646 */
10248  break;
10249 
10250  case 531:
10251 #line 4084 "parse.y" /* yacc.c:1646 */
10252  {
10253  /*%%%*/
10254  (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
10255  /*% %*/
10256  /*% ripper: rb_ary_push($1, $3) %*/
10257  }
10258 #line 10254 "parse.c" /* yacc.c:1646 */
10259  break;
10260 
10261  case 532:
10262 #line 4093 "parse.y" /* yacc.c:1646 */
10263  {
10264  error_duplicate_pattern_key(p, get_id((yyvsp[-1].id)), &(yylsp[-1]));
10265  /*%%%*/
10266  (yyval.node) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[-1].id)), &(yyloc)), &(yyloc)), (yyvsp[0].node));
10267  /*% %*/
10268  /*% ripper: rb_ary_new_from_args(2, get_value($1), get_value($2)) %*/
10269  }
10270 #line 10266 "parse.c" /* yacc.c:1646 */
10271  break;
10272 
10273  case 533:
10274 #line 4101 "parse.y" /* yacc.c:1646 */
10275  {
10276  error_duplicate_pattern_key(p, get_id((yyvsp[0].id)), &(yylsp[0]));
10277  if ((yyvsp[0].id) && !is_local_id(get_id((yyvsp[0].id)))) {
10278  yyerror1(&(yylsp[0]), "key must be valid as local variables");
10279  }
10280  error_duplicate_pattern_variable(p, get_id((yyvsp[0].id)), &(yylsp[0]));
10281  /*%%%*/
10282  (yyval.node) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
10283  /*% %*/
10284  /*% ripper: rb_ary_new_from_args(2, get_value($1), Qnil) %*/
10285  }
10286 #line 10282 "parse.c" /* yacc.c:1646 */
10287  break;
10288 
10289  case 535:
10290 #line 4116 "parse.y" /* yacc.c:1646 */
10291  {
10292  YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
10293  /*%%%*/
10294  if (!(yyvsp[-1].node) || nd_type((yyvsp[-1].node)) == NODE_STR) {
10295  NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
10296  (yyval.id) = SYM2ID(node->nd_lit);
10297  }
10298  /*%
10299  if (ripper_is_node_yylval($2) && RNODE($2)->nd_cval) {
10300  VALUE label = RNODE($2)->nd_cval;
10301  VALUE rval = RNODE($2)->nd_rval;
10302  $$ = ripper_new_yylval(p, rb_intern_str(label), rval, label);
10303  RNODE($$)->nd_loc = loc;
10304  }
10305  %*/
10306  else {
10307  yyerror1(&loc, "symbol literal with interpolation is not allowed");
10308  (yyval.id) = 0;
10309  }
10310  }
10311 #line 10307 "parse.c" /* yacc.c:1646 */
10312  break;
10313 
10314  case 536:
10315 #line 4139 "parse.y" /* yacc.c:1646 */
10316  {
10317  (yyval.id) = (yyvsp[0].id);
10318  }
10319 #line 10315 "parse.c" /* yacc.c:1646 */
10320  break;
10321 
10322  case 537:
10323 #line 4143 "parse.y" /* yacc.c:1646 */
10324  {
10325  (yyval.id) = 0;
10326  }
10327 #line 10323 "parse.c" /* yacc.c:1646 */
10328  break;
10329 
10330  case 538:
10331 #line 4149 "parse.y" /* yacc.c:1646 */
10332  {
10333  (yyval.id) = 0;
10334  }
10335 #line 10331 "parse.c" /* yacc.c:1646 */
10336  break;
10337 
10338  case 540:
10339 #line 4156 "parse.y" /* yacc.c:1646 */
10340  {
10341  /*%%%*/
10342  value_expr((yyvsp[-2].node));
10343  value_expr((yyvsp[0].node));
10344  (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
10345  /*% %*/
10346  /*% ripper: dot2!($1, $3) %*/
10347  }
10348 #line 10344 "parse.c" /* yacc.c:1646 */
10349  break;
10350 
10351  case 541:
10352 #line 4165 "parse.y" /* yacc.c:1646 */
10353  {
10354  /*%%%*/
10355  value_expr((yyvsp[-2].node));
10356  value_expr((yyvsp[0].node));
10357  (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
10358  /*% %*/
10359  /*% ripper: dot3!($1, $3) %*/
10360  }
10361 #line 10357 "parse.c" /* yacc.c:1646 */
10362  break;
10363 
10364  case 542:
10365 #line 4174 "parse.y" /* yacc.c:1646 */
10366  {
10367  /*%%%*/
10368  YYLTYPE loc;
10369  loc.beg_pos = (yylsp[0]).end_pos;
10370  loc.end_pos = (yylsp[0]).end_pos;
10371 
10372  value_expr((yyvsp[-1].node));
10373  (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil(&loc), &(yyloc));
10374  /*% %*/
10375  /*% ripper: dot2!($1, Qnil) %*/
10376  }
10377 #line 10373 "parse.c" /* yacc.c:1646 */
10378  break;
10379 
10380  case 543:
10381 #line 4186 "parse.y" /* yacc.c:1646 */
10382  {
10383  /*%%%*/
10384  YYLTYPE loc;
10385  loc.beg_pos = (yylsp[0]).end_pos;
10386  loc.end_pos = (yylsp[0]).end_pos;
10387 
10388  value_expr((yyvsp[-1].node));
10389  (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil(&loc), &(yyloc));
10390  /*% %*/
10391  /*% ripper: dot3!($1, Qnil) %*/
10392  }
10393 #line 10389 "parse.c" /* yacc.c:1646 */
10394  break;
10395 
10396  case 547:
10397 #line 4201 "parse.y" /* yacc.c:1646 */
10398  {
10399  /*%%%*/
10400  YYLTYPE loc;
10401  loc.beg_pos = (yylsp[-1]).beg_pos;
10402  loc.end_pos = (yylsp[-1]).beg_pos;
10403 
10404  value_expr((yyvsp[0].node));
10405  (yyval.node) = NEW_DOT2(new_nil(&loc), (yyvsp[0].node), &(yyloc));
10406  /*% %*/
10407  /*% ripper: dot2!(Qnil, $2) %*/
10408  }
10409 #line 10405 "parse.c" /* yacc.c:1646 */
10410  break;
10411 
10412  case 548:
10413 #line 4213 "parse.y" /* yacc.c:1646 */
10414  {
10415  /*%%%*/
10416  YYLTYPE loc;
10417  loc.beg_pos = (yylsp[-1]).beg_pos;
10418  loc.end_pos = (yylsp[-1]).beg_pos;
10419 
10420  value_expr((yyvsp[0].node));
10421  (yyval.node) = NEW_DOT3(new_nil(&loc), (yyvsp[0].node), &(yyloc));
10422  /*% %*/
10423  /*% ripper: dot3!(Qnil, $2) %*/
10424  }
10425 #line 10421 "parse.c" /* yacc.c:1646 */
10426  break;
10427 
10428  case 557:
10429 #line 4235 "parse.y" /* yacc.c:1646 */
10430  {
10431  /*%%%*/
10432  if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_BEGIN(0, &(yyloc));
10433  /*% %*/
10434  /*% ripper: var_ref!($1) %*/
10435  }
10436 #line 10432 "parse.c" /* yacc.c:1646 */
10437  break;
10438 
10439  case 558:
10440 #line 4242 "parse.y" /* yacc.c:1646 */
10441  {
10442  token_info_push(p, "->", &(yylsp[0]));
10443  }
10444 #line 10440 "parse.c" /* yacc.c:1646 */
10445  break;
10446 
10447  case 559:
10448 #line 4246 "parse.y" /* yacc.c:1646 */
10449  {
10450  (yyval.node) = (yyvsp[0].node);
10451  /*%%%*/
10452  nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
10453  /*% %*/
10454  }
10455 #line 10451 "parse.c" /* yacc.c:1646 */
10456  break;
10457 
10458  case 560:
10459 #line 4255 "parse.y" /* yacc.c:1646 */
10460  {
10461  /*%%%*/
10462  error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
10463  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
10464  /*% %*/
10465  /*% ripper: assignable(p, var_field(p, $1)) %*/
10466  }
10467 #line 10463 "parse.c" /* yacc.c:1646 */
10468  break;
10469 
10470  case 561:
10471 #line 4265 "parse.y" /* yacc.c:1646 */
10472  {
10473  /*%%%*/
10474  NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
10475  if (!(nd_type(n) == NODE_LVAR || nd_type(n) == NODE_DVAR)) {
10476  compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
10477  }
10478  (yyval.node) = n;
10479  /*% %*/
10480  /*% ripper: var_ref!($2) %*/
10481  }
10482 #line 10478 "parse.c" /* yacc.c:1646 */
10483  break;
10484 
10485  case 562:
10486 #line 4278 "parse.y" /* yacc.c:1646 */
10487  {
10488  /*%%%*/
10489  (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
10490  /*% %*/
10491  /*% ripper: top_const_ref!($2) %*/
10492  }
10493 #line 10489 "parse.c" /* yacc.c:1646 */
10494  break;
10495 
10496  case 563:
10497 #line 4285 "parse.y" /* yacc.c:1646 */
10498  {
10499  /*%%%*/
10500  (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
10501  /*% %*/
10502  /*% ripper: const_path_ref!($1, $3) %*/
10503  }
10504 #line 10500 "parse.c" /* yacc.c:1646 */
10505  break;
10506 
10507  case 564:
10508 #line 4292 "parse.y" /* yacc.c:1646 */
10509  {
10510  /*%%%*/
10511  (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
10512  /*% %*/
10513  /*% ripper: var_ref!($1) %*/
10514  }
10515 #line 10511 "parse.c" /* yacc.c:1646 */
10516  break;
10517 
10518  case 565:
10519 #line 4303 "parse.y" /* yacc.c:1646 */
10520  {
10521  /*%%%*/
10522  (yyval.node) = NEW_RESBODY((yyvsp[-4].node),
10523  (yyvsp[-3].node) ? block_append(p, node_assign(p, (yyvsp[-3].node), NEW_ERRINFO(&(yylsp[-3])), &(yylsp[-3])), (yyvsp[-1].node)) : (yyvsp[-1].node),
10524  (yyvsp[0].node), &(yyloc));
10525  fixpos((yyval.node), (yyvsp[-4].node)?(yyvsp[-4].node):(yyvsp[-1].node));
10526  /*% %*/
10527  /*% ripper: rescue!(escape_Qundef($2), escape_Qundef($3), escape_Qundef($5), escape_Qundef($6)) %*/
10528  }
10529 #line 10525 "parse.c" /* yacc.c:1646 */
10530  break;
10531 
10532  case 567:
10533 #line 4316 "parse.y" /* yacc.c:1646 */
10534  {
10535  /*%%%*/
10536  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
10537  /*% %*/
10538  /*% ripper: rb_ary_new3(1, get_value($1)) %*/
10539  }
10540 #line 10536 "parse.c" /* yacc.c:1646 */
10541  break;
10542 
10543  case 568:
10544 #line 4323 "parse.y" /* yacc.c:1646 */
10545  {
10546  /*%%%*/
10547  if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
10548  /*% %*/
10549  /*% ripper: $1 %*/
10550  }
10551 #line 10547 "parse.c" /* yacc.c:1646 */
10552  break;
10553 
10554  case 570:
10555 #line 4333 "parse.y" /* yacc.c:1646 */
10556  {
10557  (yyval.node) = (yyvsp[0].node);
10558  }
10559 #line 10555 "parse.c" /* yacc.c:1646 */
10560  break;
10561 
10562  case 572:
10563 #line 4340 "parse.y" /* yacc.c:1646 */
10564  {
10565  /*%%%*/
10566  (yyval.node) = (yyvsp[0].node);
10567  /*% %*/
10568  /*% ripper: ensure!($2) %*/
10569  }
10570 #line 10566 "parse.c" /* yacc.c:1646 */
10571  break;
10572 
10573  case 576:
10574 #line 4354 "parse.y" /* yacc.c:1646 */
10575  {
10576  /*%%%*/
10577  NODE *node = (yyvsp[0].node);
10578  if (!node) {
10579  node = NEW_STR(STR_NEW0(), &(yyloc));
10580  RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
10581  }
10582  else {
10583  node = evstr2dstr(p, node);
10584  }
10585  (yyval.node) = node;
10586  /*% %*/
10587  /*% ripper: $1 %*/
10588  }
10589 #line 10585 "parse.c" /* yacc.c:1646 */
10590  break;
10591 
10592  case 579:
10593 #line 4373 "parse.y" /* yacc.c:1646 */
10594  {
10595  /*%%%*/
10596  (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
10597  /*% %*/
10598  /*% ripper: string_concat!($1, $2) %*/
10599  }
10600 #line 10596 "parse.c" /* yacc.c:1646 */
10601  break;
10602 
10603  case 580:
10604 #line 4382 "parse.y" /* yacc.c:1646 */
10605  {
10606  /*%%%*/
10607  (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
10608  if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
10609  /*% %*/
10610  /*% ripper: string_literal!(heredoc_dedent(p, $2)) %*/
10611  }
10612 #line 10608 "parse.c" /* yacc.c:1646 */
10613  break;
10614 
10615  case 581:
10616 #line 4392 "parse.y" /* yacc.c:1646 */
10617  {
10618  /*%%%*/
10619  (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
10620  /*% %*/
10621  /*% ripper: xstring_literal!(heredoc_dedent(p, $2)) %*/
10622  }
10623 #line 10619 "parse.c" /* yacc.c:1646 */
10624  break;
10625 
10626  case 582:
10627 #line 4401 "parse.y" /* yacc.c:1646 */
10628  {
10629  (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc));
10630  }
10631 #line 10627 "parse.c" /* yacc.c:1646 */
10632  break;
10633 
10634  case 583:
10635 #line 4407 "parse.y" /* yacc.c:1646 */
10636  {
10637  /*%%%*/
10638  (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
10639  /*% %*/
10640  /*% ripper: array!($3) %*/
10641  }
10642 #line 10638 "parse.c" /* yacc.c:1646 */
10643  break;
10644 
10645  case 584:
10646 #line 4416 "parse.y" /* yacc.c:1646 */
10647  {
10648  /*%%%*/
10649  (yyval.node) = 0;
10650  /*% %*/
10651  /*% ripper: words_new! %*/
10652  }
10653 #line 10649 "parse.c" /* yacc.c:1646 */
10654  break;
10655 
10656  case 585:
10657 #line 4423 "parse.y" /* yacc.c:1646 */
10658  {
10659  /*%%%*/
10660  (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
10661  /*% %*/
10662  /*% ripper: words_add!($1, $2) %*/
10663  }
10664 #line 10660 "parse.c" /* yacc.c:1646 */
10665  break;
10666 
10667  case 587:
10668 #line 4434 "parse.y" /* yacc.c:1646 */
10669  {
10670  /*%%%*/
10671  (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
10672  /*% %*/
10673  /*% ripper: word_add!($1, $2) %*/
10674  }
10675 #line 10671 "parse.c" /* yacc.c:1646 */
10676  break;
10677 
10678  case 588:
10679 #line 4443 "parse.y" /* yacc.c:1646 */
10680  {
10681  /*%%%*/
10682  (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
10683  /*% %*/
10684  /*% ripper: array!($3) %*/
10685  }
10686 #line 10682 "parse.c" /* yacc.c:1646 */
10687  break;
10688 
10689  case 589:
10690 #line 4452 "parse.y" /* yacc.c:1646 */
10691  {
10692  /*%%%*/
10693  (yyval.node) = 0;
10694  /*% %*/
10695  /*% ripper: symbols_new! %*/
10696  }
10697 #line 10693 "parse.c" /* yacc.c:1646 */
10698  break;
10699 
10700  case 590:
10701 #line 4459 "parse.y" /* yacc.c:1646 */
10702  {
10703  /*%%%*/
10704  (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
10705  /*% %*/
10706  /*% ripper: symbols_add!($1, $2) %*/
10707  }
10708 #line 10704 "parse.c" /* yacc.c:1646 */
10709  break;
10710 
10711  case 591:
10712 #line 4468 "parse.y" /* yacc.c:1646 */
10713  {
10714  /*%%%*/
10715  (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
10716  /*% %*/
10717  /*% ripper: array!($3) %*/
10718  }
10719 #line 10715 "parse.c" /* yacc.c:1646 */
10720  break;
10721 
10722  case 592:
10723 #line 4477 "parse.y" /* yacc.c:1646 */
10724  {
10725  /*%%%*/
10726  (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
10727  /*% %*/
10728  /*% ripper: array!($3) %*/
10729  }
10730 #line 10726 "parse.c" /* yacc.c:1646 */
10731  break;
10732 
10733  case 593:
10734 #line 4486 "parse.y" /* yacc.c:1646 */
10735  {
10736  /*%%%*/
10737  (yyval.node) = 0;
10738  /*% %*/
10739  /*% ripper: qwords_new! %*/
10740  }
10741 #line 10737 "parse.c" /* yacc.c:1646 */
10742  break;
10743 
10744  case 594:
10745 #line 4493 "parse.y" /* yacc.c:1646 */
10746  {
10747  /*%%%*/
10748  (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
10749  /*% %*/
10750  /*% ripper: qwords_add!($1, $2) %*/
10751  }
10752 #line 10748 "parse.c" /* yacc.c:1646 */
10753  break;
10754 
10755  case 595:
10756 #line 4502 "parse.y" /* yacc.c:1646 */
10757  {
10758  /*%%%*/
10759  (yyval.node) = 0;
10760  /*% %*/
10761  /*% ripper: qsymbols_new! %*/
10762  }
10763 #line 10759 "parse.c" /* yacc.c:1646 */
10764  break;
10765 
10766  case 596:
10767 #line 4509 "parse.y" /* yacc.c:1646 */
10768  {
10769  /*%%%*/
10770  (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
10771  /*% %*/
10772  /*% ripper: qsymbols_add!($1, $2) %*/
10773  }
10774 #line 10770 "parse.c" /* yacc.c:1646 */
10775  break;
10776 
10777  case 597:
10778 #line 4518 "parse.y" /* yacc.c:1646 */
10779  {
10780  /*%%%*/
10781  (yyval.node) = 0;
10782  /*% %*/
10783  /*% ripper: string_content! %*/
10784  /*%%%*/
10785  /*%
10786  $$ = ripper_new_yylval(p, 0, $$, 0);
10787  %*/
10788  }
10789 #line 10785 "parse.c" /* yacc.c:1646 */
10790  break;
10791 
10792  case 598:
10793 #line 4529 "parse.y" /* yacc.c:1646 */
10794  {
10795  /*%%%*/
10796  (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
10797  /*% %*/
10798  /*% ripper: string_add!($1, $2) %*/
10799  /*%%%*/
10800  /*%
10801  if (ripper_is_node_yylval($1) && ripper_is_node_yylval($2) &&
10802  !RNODE($1)->nd_cval) {
10803  RNODE($1)->nd_cval = RNODE($2)->nd_cval;
10804  RNODE($1)->nd_rval = add_mark_object(p, $$);
10805  $$ = $1;
10806  }
10807  %*/
10808  }
10809 #line 10805 "parse.c" /* yacc.c:1646 */
10810  break;
10811 
10812  case 599:
10813 #line 4547 "parse.y" /* yacc.c:1646 */
10814  {
10815  /*%%%*/
10816  (yyval.node) = 0;
10817  /*% %*/
10818  /*% ripper: xstring_new! %*/
10819  }
10820 #line 10816 "parse.c" /* yacc.c:1646 */
10821  break;
10822 
10823  case 600:
10824 #line 4554 "parse.y" /* yacc.c:1646 */
10825  {
10826  /*%%%*/
10827  (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
10828  /*% %*/
10829  /*% ripper: xstring_add!($1, $2) %*/
10830  }
10831 #line 10827 "parse.c" /* yacc.c:1646 */
10832  break;
10833 
10834  case 601:
10835 #line 4563 "parse.y" /* yacc.c:1646 */
10836  {
10837  /*%%%*/
10838  (yyval.node) = 0;
10839  /*% %*/
10840  /*% ripper: regexp_new! %*/
10841  /*%%%*/
10842  /*%
10843  $$ = ripper_new_yylval(p, 0, $$, 0);
10844  %*/
10845  }
10846 #line 10842 "parse.c" /* yacc.c:1646 */
10847  break;
10848 
10849  case 602:
10850 #line 4574 "parse.y" /* yacc.c:1646 */
10851  {
10852  /*%%%*/
10853  NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
10854  if (!head) {
10855  (yyval.node) = tail;
10856  }
10857  else if (!tail) {
10858  (yyval.node) = head;
10859  }
10860  else {
10861  switch (nd_type(head)) {
10862  case NODE_STR:
10863  nd_set_type(head, NODE_DSTR);
10864  break;
10865  case NODE_DSTR:
10866  break;
10867  default:
10868  head = list_append(p, NEW_DSTR(Qnil, &(yyloc)), head);
10869  break;
10870  }
10871  (yyval.node) = list_append(p, head, tail);
10872  }
10873  /*%
10874  VALUE s1 = 1, s2 = 0, n1 = $1, n2 = $2;
10875  if (ripper_is_node_yylval(n1)) {
10876  s1 = RNODE(n1)->nd_cval;
10877  n1 = RNODE(n1)->nd_rval;
10878  }
10879  if (ripper_is_node_yylval(n2)) {
10880  s2 = RNODE(n2)->nd_cval;
10881  n2 = RNODE(n2)->nd_rval;
10882  }
10883  $$ = dispatch2(regexp_add, n1, n2);
10884  if (!s1 && s2) {
10885  $$ = ripper_new_yylval(p, 0, $$, s2);
10886  }
10887  %*/
10888  }
10889 #line 10885 "parse.c" /* yacc.c:1646 */
10890  break;
10891 
10892  case 604:
10893 #line 4617 "parse.y" /* yacc.c:1646 */
10894  {
10895  /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
10896  (yyval.strterm) = p->lex.strterm;
10897  p->lex.strterm = 0;
10898  SET_LEX_STATE(EXPR_BEG);
10899  }
10900 #line 10896 "parse.c" /* yacc.c:1646 */
10901  break;
10902 
10903  case 605:
10904 #line 4624 "parse.y" /* yacc.c:1646 */
10905  {
10906  p->lex.strterm = (yyvsp[-1].strterm);
10907  /*%%%*/
10908  (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc));
10909  nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
10910  /*% %*/
10911  /*% ripper: string_dvar!($3) %*/
10912  }
10913 #line 10909 "parse.c" /* yacc.c:1646 */
10914  break;
10915 
10916  case 606:
10917 #line 4633 "parse.y" /* yacc.c:1646 */
10918  {
10919  CMDARG_PUSH(0);
10920  COND_PUSH(0);
10921  }
10922 #line 10918 "parse.c" /* yacc.c:1646 */
10923  break;
10924 
10925  case 607:
10926 #line 4637 "parse.y" /* yacc.c:1646 */
10927  {
10928  /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
10929  (yyval.strterm) = p->lex.strterm;
10930  p->lex.strterm = 0;
10931  }
10932 #line 10928 "parse.c" /* yacc.c:1646 */
10933  break;
10934 
10935  case 608:
10936 #line 4642 "parse.y" /* yacc.c:1646 */
10937  {
10938  (yyval.num) = p->lex.state;
10939  SET_LEX_STATE(EXPR_BEG);
10940  }
10941 #line 10937 "parse.c" /* yacc.c:1646 */
10942  break;
10943 
10944  case 609:
10945 #line 4646 "parse.y" /* yacc.c:1646 */
10946  {
10947  (yyval.num) = p->lex.brace_nest;
10948  p->lex.brace_nest = 0;
10949  }
10950 #line 10946 "parse.c" /* yacc.c:1646 */
10951  break;
10952 
10953  case 610:
10954 #line 4650 "parse.y" /* yacc.c:1646 */
10955  {
10956  (yyval.num) = p->heredoc_indent;
10957  p->heredoc_indent = 0;
10958  }
10959 #line 10955 "parse.c" /* yacc.c:1646 */
10960  break;
10961 
10962  case 611:
10963 #line 4655 "parse.y" /* yacc.c:1646 */
10964  {
10965  COND_POP();
10966  CMDARG_POP();
10967  p->lex.strterm = (yyvsp[-5].strterm);
10968  SET_LEX_STATE((yyvsp[-4].num));
10969  p->lex.brace_nest = (yyvsp[-3].num);
10970  p->heredoc_indent = (yyvsp[-2].num);
10971  p->heredoc_line_indent = -1;
10972  /*%%%*/
10973  if ((yyvsp[-1].node)) (yyvsp[-1].node)->flags &= ~NODE_FL_NEWLINE;
10974  (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc));
10975  /*% %*/
10976  /*% ripper: string_embexpr!($7) %*/
10977  }
10978 #line 10974 "parse.c" /* yacc.c:1646 */
10979  break;
10980 
10981  case 612:
10982 #line 4672 "parse.y" /* yacc.c:1646 */
10983  {
10984  /*%%%*/
10985  (yyval.node) = NEW_GVAR((yyvsp[0].id), &(yyloc));
10986  /*% %*/
10987  /*% ripper: var_ref!($1) %*/
10988  }
10989 #line 10985 "parse.c" /* yacc.c:1646 */
10990  break;
10991 
10992  case 613:
10993 #line 4679 "parse.y" /* yacc.c:1646 */
10994  {
10995  /*%%%*/
10996  (yyval.node) = NEW_IVAR((yyvsp[0].id), &(yyloc));
10997  /*% %*/
10998  /*% ripper: var_ref!($1) %*/
10999  }
11000 #line 10996 "parse.c" /* yacc.c:1646 */
11001  break;
11002 
11003  case 614:
11004 #line 4686 "parse.y" /* yacc.c:1646 */
11005  {
11006  /*%%%*/
11007  (yyval.node) = NEW_CVAR((yyvsp[0].id), &(yyloc));
11008  /*% %*/
11009  /*% ripper: var_ref!($1) %*/
11010  }
11011 #line 11007 "parse.c" /* yacc.c:1646 */
11012  break;
11013 
11014  case 618:
11015 #line 4700 "parse.y" /* yacc.c:1646 */
11016  {
11017  SET_LEX_STATE(EXPR_END);
11018  /*%%%*/
11019  (yyval.node) = NEW_LIT(ID2SYM((yyvsp[0].id)), &(yyloc));
11020  /*% %*/
11021  /*% ripper: symbol_literal!(symbol!($2)) %*/
11022  }
11023 #line 11019 "parse.c" /* yacc.c:1646 */
11024  break;
11025 
11026  case 623:
11027 #line 4716 "parse.y" /* yacc.c:1646 */
11028  {
11029  SET_LEX_STATE(EXPR_END);
11030  /*%%%*/
11031  (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
11032  /*% %*/
11033  /*% ripper: dyna_symbol!($2) %*/
11034  }
11035 #line 11031 "parse.c" /* yacc.c:1646 */
11036  break;
11037 
11038  case 625:
11039 #line 4727 "parse.y" /* yacc.c:1646 */
11040  {
11041  /*%%%*/
11042  (yyval.node) = (yyvsp[0].node);
11043  RB_OBJ_WRITE(p->ast, &(yyval.node)->nd_lit, negate_lit(p, (yyval.node)->nd_lit));
11044  /*% %*/
11045  /*% ripper: unary!(ID2VAL(idUMinus), $2) %*/
11046  }
11047 #line 11043 "parse.c" /* yacc.c:1646 */
11048  break;
11049 
11050  case 635:
11051 #line 4749 "parse.y" /* yacc.c:1646 */
11052  {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
11053 #line 11049 "parse.c" /* yacc.c:1646 */
11054  break;
11055 
11056  case 636:
11057 #line 4750 "parse.y" /* yacc.c:1646 */
11058  {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
11059 #line 11055 "parse.c" /* yacc.c:1646 */
11060  break;
11061 
11062  case 637:
11063 #line 4751 "parse.y" /* yacc.c:1646 */
11064  {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
11065 #line 11061 "parse.c" /* yacc.c:1646 */
11066  break;
11067 
11068  case 638:
11069 #line 4752 "parse.y" /* yacc.c:1646 */
11070  {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
11071 #line 11067 "parse.c" /* yacc.c:1646 */
11072  break;
11073 
11074  case 639:
11075 #line 4753 "parse.y" /* yacc.c:1646 */
11076  {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
11077 #line 11073 "parse.c" /* yacc.c:1646 */
11078  break;
11079 
11080  case 640:
11081 #line 4754 "parse.y" /* yacc.c:1646 */
11082  {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
11083 #line 11079 "parse.c" /* yacc.c:1646 */
11084  break;
11085 
11086  case 641:
11087 #line 4755 "parse.y" /* yacc.c:1646 */
11088  {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
11089 #line 11085 "parse.c" /* yacc.c:1646 */
11090  break;
11091 
11092  case 642:
11093 #line 4759 "parse.y" /* yacc.c:1646 */
11094  {
11095  /*%%%*/
11096  if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_BEGIN(0, &(yyloc));
11097  /*%
11098  if (id_is_var(p, get_id($1))) {
11099  $$ = dispatch1(var_ref, $1);
11100  }
11101  else {
11102  $$ = dispatch1(vcall, $1);
11103  }
11104  %*/
11105  }
11106 #line 11102 "parse.c" /* yacc.c:1646 */
11107  break;
11108 
11109  case 643:
11110 #line 4772 "parse.y" /* yacc.c:1646 */
11111  {
11112  /*%%%*/
11113  if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_BEGIN(0, &(yyloc));
11114  /*% %*/
11115  /*% ripper: var_ref!($1) %*/
11116  }
11117 #line 11113 "parse.c" /* yacc.c:1646 */
11118  break;
11119 
11120  case 644:
11121 #line 4781 "parse.y" /* yacc.c:1646 */
11122  {
11123  /*%%%*/
11124  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
11125  /*% %*/
11126  /*% ripper: assignable(p, var_field(p, $1)) %*/
11127  }
11128 #line 11124 "parse.c" /* yacc.c:1646 */
11129  break;
11130 
11131  case 645:
11132 #line 4788 "parse.y" /* yacc.c:1646 */
11133  {
11134  /*%%%*/
11135  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
11136  /*% %*/
11137  /*% ripper: assignable(p, var_field(p, $1)) %*/
11138  }
11139 #line 11135 "parse.c" /* yacc.c:1646 */
11140  break;
11141 
11142  case 648:
11143 #line 4801 "parse.y" /* yacc.c:1646 */
11144  {
11145  SET_LEX_STATE(EXPR_BEG);
11146  p->command_start = TRUE;
11147  }
11148 #line 11144 "parse.c" /* yacc.c:1646 */
11149  break;
11150 
11151  case 649:
11152 #line 4806 "parse.y" /* yacc.c:1646 */
11153  {
11154  (yyval.node) = (yyvsp[-1].node);
11155  }
11156 #line 11152 "parse.c" /* yacc.c:1646 */
11157  break;
11158 
11159  case 650:
11160 #line 4810 "parse.y" /* yacc.c:1646 */
11161  {
11162  /*%%%*/
11163  (yyval.node) = 0;
11164  /*% %*/
11165  /*% ripper: Qnil %*/
11166  }
11167 #line 11163 "parse.c" /* yacc.c:1646 */
11168  break;
11169 
11170  case 651:
11171 #line 4819 "parse.y" /* yacc.c:1646 */
11172  {
11173  /*%%%*/
11174  (yyval.node) = (yyvsp[-1].node);
11175  /*% %*/
11176  /*% ripper: paren!($2) %*/
11177  SET_LEX_STATE(EXPR_BEG);
11178  p->command_start = TRUE;
11179  }
11180 #line 11176 "parse.c" /* yacc.c:1646 */
11181  break;
11182 
11183  case 652:
11184 #line 4828 "parse.y" /* yacc.c:1646 */
11185  {
11186  arg_var(p, idFWD_REST);
11187 #if idFWD_KWREST
11188  arg_var(p, idFWD_KWREST);
11189 #endif
11190  arg_var(p, idFWD_BLOCK);
11191  /*%%%*/
11192  (yyval.node) = new_args_tail(p, Qnone, idFWD_KWREST, idFWD_BLOCK, &(yylsp[-1]));
11193  (yyval.node) = new_args(p, Qnone, Qnone, idFWD_REST, Qnone, (yyval.node), &(yylsp[-1]));
11194  /*% %*/
11195  /*% ripper: paren!(params_new(Qnone, Qnone, $2, Qnone, Qnone, Qnone, Qnone)) %*/
11196  SET_LEX_STATE(EXPR_BEG);
11197  p->command_start = TRUE;
11198  }
11199 #line 11195 "parse.c" /* yacc.c:1646 */
11200  break;
11201 
11202  case 653:
11203 #line 4842 "parse.y" /* yacc.c:1646 */
11204  {
11205  (yyval.num) = p->in_kwarg;
11206  p->in_kwarg = 1;
11207  SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
11208  }
11209 #line 11205 "parse.c" /* yacc.c:1646 */
11210  break;
11211 
11212  case 654:
11213 #line 4848 "parse.y" /* yacc.c:1646 */
11214  {
11215  p->in_kwarg = !!(yyvsp[-2].num);
11216  (yyval.node) = (yyvsp[-1].node);
11217  SET_LEX_STATE(EXPR_BEG);
11218  p->command_start = TRUE;
11219  }
11220 #line 11216 "parse.c" /* yacc.c:1646 */
11221  break;
11222 
11223  case 655:
11224 #line 4857 "parse.y" /* yacc.c:1646 */
11225  {
11226  (yyval.node) = new_args_tail(p, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
11227  }
11228 #line 11224 "parse.c" /* yacc.c:1646 */
11229  break;
11230 
11231  case 656:
11232 #line 4861 "parse.y" /* yacc.c:1646 */
11233  {
11234  (yyval.node) = new_args_tail(p, (yyvsp[-1].node), Qnone, (yyvsp[0].id), &(yylsp[-1]));
11235  }
11236 #line 11232 "parse.c" /* yacc.c:1646 */
11237  break;
11238 
11239  case 657:
11240 #line 4865 "parse.y" /* yacc.c:1646 */
11241  {
11242  (yyval.node) = new_args_tail(p, Qnone, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
11243  }
11244 #line 11240 "parse.c" /* yacc.c:1646 */
11245  break;
11246 
11247  case 658:
11248 #line 4869 "parse.y" /* yacc.c:1646 */
11249  {
11250  (yyval.node) = new_args_tail(p, Qnone, ID2VAL(idNil), (yyvsp[0].id), &(yylsp[-1]));
11251  }
11252 #line 11248 "parse.c" /* yacc.c:1646 */
11253  break;
11254 
11255  case 659:
11256 #line 4873 "parse.y" /* yacc.c:1646 */
11257  {
11258  (yyval.node) = new_args_tail(p, Qnone, Qnone, (yyvsp[0].id), &(yylsp[0]));
11259  }
11260 #line 11256 "parse.c" /* yacc.c:1646 */
11261  break;
11262 
11263  case 660:
11264 #line 4879 "parse.y" /* yacc.c:1646 */
11265  {
11266  (yyval.node) = (yyvsp[0].node);
11267  }
11268 #line 11264 "parse.c" /* yacc.c:1646 */
11269  break;
11270 
11271  case 661:
11272 #line 4883 "parse.y" /* yacc.c:1646 */
11273  {
11274  (yyval.node) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
11275  }
11276 #line 11272 "parse.c" /* yacc.c:1646 */
11277  break;
11278 
11279  case 662:
11280 #line 4889 "parse.y" /* yacc.c:1646 */
11281  {
11282  (yyval.node) = new_args(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
11283  }
11284 #line 11280 "parse.c" /* yacc.c:1646 */
11285  break;
11286 
11287  case 663:
11288 #line 4893 "parse.y" /* yacc.c:1646 */
11289  {
11290  (yyval.node) = new_args(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11291  }
11292 #line 11288 "parse.c" /* yacc.c:1646 */
11293  break;
11294 
11295  case 664:
11296 #line 4897 "parse.y" /* yacc.c:1646 */
11297  {
11298  (yyval.node) = new_args(p, (yyvsp[-3].node), (yyvsp[-1].node), Qnone, Qnone, (yyvsp[0].node), &(yyloc));
11299  }
11300 #line 11296 "parse.c" /* yacc.c:1646 */
11301  break;
11302 
11303  case 665:
11304 #line 4901 "parse.y" /* yacc.c:1646 */
11305  {
11306  (yyval.node) = new_args(p, (yyvsp[-5].node), (yyvsp[-3].node), Qnone, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11307  }
11308 #line 11304 "parse.c" /* yacc.c:1646 */
11309  break;
11310 
11311  case 666:
11312 #line 4905 "parse.y" /* yacc.c:1646 */
11313  {
11314  (yyval.node) = new_args(p, (yyvsp[-3].node), Qnone, (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
11315  }
11316 #line 11312 "parse.c" /* yacc.c:1646 */
11317  break;
11318 
11319  case 667:
11320 #line 4909 "parse.y" /* yacc.c:1646 */
11321  {
11322  (yyval.node) = new_args(p, (yyvsp[-5].node), Qnone, (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11323  }
11324 #line 11320 "parse.c" /* yacc.c:1646 */
11325  break;
11326 
11327  case 668:
11328 #line 4913 "parse.y" /* yacc.c:1646 */
11329  {
11330  (yyval.node) = new_args(p, (yyvsp[-1].node), Qnone, Qnone, Qnone, (yyvsp[0].node), &(yyloc));
11331  }
11332 #line 11328 "parse.c" /* yacc.c:1646 */
11333  break;
11334 
11335  case 669:
11336 #line 4917 "parse.y" /* yacc.c:1646 */
11337  {
11338  (yyval.node) = new_args(p, Qnone, (yyvsp[-3].node), (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
11339  }
11340 #line 11336 "parse.c" /* yacc.c:1646 */
11341  break;
11342 
11343  case 670:
11344 #line 4921 "parse.y" /* yacc.c:1646 */
11345  {
11346  (yyval.node) = new_args(p, Qnone, (yyvsp[-5].node), (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11347  }
11348 #line 11344 "parse.c" /* yacc.c:1646 */
11349  break;
11350 
11351  case 671:
11352 #line 4925 "parse.y" /* yacc.c:1646 */
11353  {
11354  (yyval.node) = new_args(p, Qnone, (yyvsp[-1].node), Qnone, Qnone, (yyvsp[0].node), &(yyloc));
11355  }
11356 #line 11352 "parse.c" /* yacc.c:1646 */
11357  break;
11358 
11359  case 672:
11360 #line 4929 "parse.y" /* yacc.c:1646 */
11361  {
11362  (yyval.node) = new_args(p, Qnone, (yyvsp[-3].node), Qnone, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11363  }
11364 #line 11360 "parse.c" /* yacc.c:1646 */
11365  break;
11366 
11367  case 673:
11368 #line 4933 "parse.y" /* yacc.c:1646 */
11369  {
11370  (yyval.node) = new_args(p, Qnone, Qnone, (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
11371  }
11372 #line 11368 "parse.c" /* yacc.c:1646 */
11373  break;
11374 
11375  case 674:
11376 #line 4937 "parse.y" /* yacc.c:1646 */
11377  {
11378  (yyval.node) = new_args(p, Qnone, Qnone, (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11379  }
11380 #line 11376 "parse.c" /* yacc.c:1646 */
11381  break;
11382 
11383  case 675:
11384 #line 4941 "parse.y" /* yacc.c:1646 */
11385  {
11386  (yyval.node) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyvsp[0].node), &(yyloc));
11387  }
11388 #line 11384 "parse.c" /* yacc.c:1646 */
11389  break;
11390 
11391  case 676:
11392 #line 4945 "parse.y" /* yacc.c:1646 */
11393  {
11394  (yyval.node) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
11395  (yyval.node) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyval.node), &(yylsp[0]));
11396  }
11397 #line 11393 "parse.c" /* yacc.c:1646 */
11398  break;
11399 
11400  case 677:
11401 #line 4952 "parse.y" /* yacc.c:1646 */
11402  {
11403  /*%%%*/
11404  (yyval.id) = idDot3;
11405  /*% %*/
11406  /*% ripper: args_forward! %*/
11407  }
11408 #line 11404 "parse.c" /* yacc.c:1646 */
11409  break;
11410 
11411  case 678:
11412 #line 4961 "parse.y" /* yacc.c:1646 */
11413  {
11414  /*%%%*/
11415  yyerror1(&(yylsp[0]), "formal argument cannot be a constant");
11416  (yyval.id) = 0;
11417  /*% %*/
11418  /*% ripper[error]: param_error!($1) %*/
11419  }
11420 #line 11416 "parse.c" /* yacc.c:1646 */
11421  break;
11422 
11423  case 679:
11424 #line 4969 "parse.y" /* yacc.c:1646 */
11425  {
11426  /*%%%*/
11427  yyerror1(&(yylsp[0]), "formal argument cannot be an instance variable");
11428  (yyval.id) = 0;
11429  /*% %*/
11430  /*% ripper[error]: param_error!($1) %*/
11431  }
11432 #line 11428 "parse.c" /* yacc.c:1646 */
11433  break;
11434 
11435  case 680:
11436 #line 4977 "parse.y" /* yacc.c:1646 */
11437  {
11438  /*%%%*/
11439  yyerror1(&(yylsp[0]), "formal argument cannot be a global variable");
11440  (yyval.id) = 0;
11441  /*% %*/
11442  /*% ripper[error]: param_error!($1) %*/
11443  }
11444 #line 11440 "parse.c" /* yacc.c:1646 */
11445  break;
11446 
11447  case 681:
11448 #line 4985 "parse.y" /* yacc.c:1646 */
11449  {
11450  /*%%%*/
11451  yyerror1(&(yylsp[0]), "formal argument cannot be a class variable");
11452  (yyval.id) = 0;
11453  /*% %*/
11454  /*% ripper[error]: param_error!($1) %*/
11455  }
11456 #line 11452 "parse.c" /* yacc.c:1646 */
11457  break;
11458 
11459  case 683:
11460 #line 4996 "parse.y" /* yacc.c:1646 */
11461  {
11462  formal_argument(p, get_id((yyvsp[0].id)));
11464  (yyval.id) = (yyvsp[0].id);
11465  }
11466 #line 11462 "parse.c" /* yacc.c:1646 */
11467  break;
11468 
11469  case 684:
11470 #line 5004 "parse.y" /* yacc.c:1646 */
11471  {
11472  ID id = get_id((yyvsp[0].id));
11473  arg_var(p, id);
11474  p->cur_arg = id;
11475  (yyval.id) = (yyvsp[0].id);
11476  }
11477 #line 11473 "parse.c" /* yacc.c:1646 */
11478  break;
11479 
11480  case 685:
11481 #line 5013 "parse.y" /* yacc.c:1646 */
11482  {
11483  p->cur_arg = 0;
11484  /*%%%*/
11485  (yyval.node) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
11486  /*% %*/
11487  /*% ripper: get_value($1) %*/
11488  }
11489 #line 11485 "parse.c" /* yacc.c:1646 */
11490  break;
11491 
11492  case 686:
11493 #line 5021 "parse.y" /* yacc.c:1646 */
11494  {
11495  /*%%%*/
11496  ID tid = internal_id(p);
11497  YYLTYPE loc;
11498  loc.beg_pos = (yylsp[-1]).beg_pos;
11499  loc.end_pos = (yylsp[-1]).beg_pos;
11500  arg_var(p, tid);
11501  if (dyna_in_block(p)) {
11502  (yyvsp[-1].node)->nd_value = NEW_DVAR(tid, &loc);
11503  }
11504  else {
11505  (yyvsp[-1].node)->nd_value = NEW_LVAR(tid, &loc);
11506  }
11507  (yyval.node) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
11508  (yyval.node)->nd_next = (yyvsp[-1].node);
11509  /*% %*/
11510  /*% ripper: mlhs_paren!($2) %*/
11511  }
11512 #line 11508 "parse.c" /* yacc.c:1646 */
11513  break;
11514 
11515  case 688:
11516 #line 5044 "parse.y" /* yacc.c:1646 */
11517  {
11518  /*%%%*/
11519  (yyval.node) = (yyvsp[-2].node);
11520  (yyval.node)->nd_plen++;
11521  (yyval.node)->nd_next = block_append(p, (yyval.node)->nd_next, (yyvsp[0].node)->nd_next);
11522  rb_discard_node(p, (yyvsp[0].node));
11523  /*% %*/
11524  /*% ripper: rb_ary_push($1, get_value($3)) %*/
11525  }
11526 #line 11522 "parse.c" /* yacc.c:1646 */
11527  break;
11528 
11529  case 689:
11530 #line 5057 "parse.y" /* yacc.c:1646 */
11531  {
11532  ID id = get_id((yyvsp[0].id));
11533  arg_var(p, formal_argument(p, id));
11534  p->cur_arg = id;
11536  (yyval.id) = (yyvsp[0].id);
11537  }
11538 #line 11534 "parse.c" /* yacc.c:1646 */
11539  break;
11540 
11541  case 690:
11542 #line 5067 "parse.y" /* yacc.c:1646 */
11543  {
11544  p->cur_arg = 0;
11545  /*%%%*/
11546  (yyval.node) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
11547  /*% %*/
11548  /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), get_value($2)) %*/
11549  }
11550 #line 11546 "parse.c" /* yacc.c:1646 */
11551  break;
11552 
11553  case 691:
11554 #line 5075 "parse.y" /* yacc.c:1646 */
11555  {
11556  p->cur_arg = 0;
11557  /*%%%*/
11558  (yyval.node) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
11559  /*% %*/
11560  /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), 0) %*/
11561  }
11562 #line 11558 "parse.c" /* yacc.c:1646 */
11563  break;
11564 
11565  case 692:
11566 #line 5085 "parse.y" /* yacc.c:1646 */
11567  {
11568  /*%%%*/
11569  (yyval.node) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
11570  /*% %*/
11571  /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), get_value($2)) %*/
11572  }
11573 #line 11569 "parse.c" /* yacc.c:1646 */
11574  break;
11575 
11576  case 693:
11577 #line 5092 "parse.y" /* yacc.c:1646 */
11578  {
11579  /*%%%*/
11580  (yyval.node) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
11581  /*% %*/
11582  /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), 0) %*/
11583  }
11584 #line 11580 "parse.c" /* yacc.c:1646 */
11585  break;
11586 
11587  case 694:
11588 #line 5101 "parse.y" /* yacc.c:1646 */
11589  {
11590  /*%%%*/
11591  (yyval.node) = (yyvsp[0].node);
11592  /*% %*/
11593  /*% ripper: rb_ary_new3(1, get_value($1)) %*/
11594  }
11595 #line 11591 "parse.c" /* yacc.c:1646 */
11596  break;
11597 
11598  case 695:
11599 #line 5108 "parse.y" /* yacc.c:1646 */
11600  {
11601  /*%%%*/
11602  (yyval.node) = kwd_append((yyvsp[-2].node), (yyvsp[0].node));
11603  /*% %*/
11604  /*% ripper: rb_ary_push($1, get_value($3)) %*/
11605  }
11606 #line 11602 "parse.c" /* yacc.c:1646 */
11607  break;
11608 
11609  case 696:
11610 #line 5118 "parse.y" /* yacc.c:1646 */
11611  {
11612  /*%%%*/
11613  (yyval.node) = (yyvsp[0].node);
11614  /*% %*/
11615  /*% ripper: rb_ary_new3(1, get_value($1)) %*/
11616  }
11617 #line 11613 "parse.c" /* yacc.c:1646 */
11618  break;
11619 
11620  case 697:
11621 #line 5125 "parse.y" /* yacc.c:1646 */
11622  {
11623  /*%%%*/
11624  (yyval.node) = kwd_append((yyvsp[-2].node), (yyvsp[0].node));
11625  /*% %*/
11626  /*% ripper: rb_ary_push($1, get_value($3)) %*/
11627  }
11628 #line 11624 "parse.c" /* yacc.c:1646 */
11629  break;
11630 
11631  case 700:
11632 #line 5138 "parse.y" /* yacc.c:1646 */
11633  {
11634  /*%%%*/
11635  /*% %*/
11636  /*% ripper: nokw_param!(Qnil) %*/
11637  }
11638 #line 11634 "parse.c" /* yacc.c:1646 */
11639  break;
11640 
11641  case 701:
11642 #line 5146 "parse.y" /* yacc.c:1646 */
11643  {
11644  arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].id))));
11645  /*%%%*/
11646  (yyval.id) = (yyvsp[0].id);
11647  /*% %*/
11648  /*% ripper: kwrest_param!($2) %*/
11649  }
11650 #line 11646 "parse.c" /* yacc.c:1646 */
11651  break;
11652 
11653  case 702:
11654 #line 5154 "parse.y" /* yacc.c:1646 */
11655  {
11656  /*%%%*/
11657  (yyval.id) = internal_id(p);
11658  arg_var(p, (yyval.id));
11659  /*% %*/
11660  /*% ripper: kwrest_param!(Qnil) %*/
11661  }
11662 #line 11658 "parse.c" /* yacc.c:1646 */
11663  break;
11664 
11665  case 703:
11666 #line 5164 "parse.y" /* yacc.c:1646 */
11667  {
11668  p->cur_arg = 0;
11669  /*%%%*/
11670  (yyval.node) = NEW_OPT_ARG(0, assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
11671  /*% %*/
11672  /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), get_value($3)) %*/
11673  }
11674 #line 11670 "parse.c" /* yacc.c:1646 */
11675  break;
11676 
11677  case 704:
11678 #line 5174 "parse.y" /* yacc.c:1646 */
11679  {
11680  p->cur_arg = 0;
11681  /*%%%*/
11682  (yyval.node) = NEW_OPT_ARG(0, assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
11683  /*% %*/
11684  /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), get_value($3)) %*/
11685  }
11686 #line 11682 "parse.c" /* yacc.c:1646 */
11687  break;
11688 
11689  case 705:
11690 #line 5184 "parse.y" /* yacc.c:1646 */
11691  {
11692  /*%%%*/
11693  (yyval.node) = (yyvsp[0].node);
11694  /*% %*/
11695  /*% ripper: rb_ary_new3(1, get_value($1)) %*/
11696  }
11697 #line 11693 "parse.c" /* yacc.c:1646 */
11698  break;
11699 
11700  case 706:
11701 #line 5191 "parse.y" /* yacc.c:1646 */
11702  {
11703  /*%%%*/
11704  (yyval.node) = opt_arg_append((yyvsp[-2].node), (yyvsp[0].node));
11705  /*% %*/
11706  /*% ripper: rb_ary_push($1, get_value($3)) %*/
11707  }
11708 #line 11704 "parse.c" /* yacc.c:1646 */
11709  break;
11710 
11711  case 707:
11712 #line 5200 "parse.y" /* yacc.c:1646 */
11713  {
11714  /*%%%*/
11715  (yyval.node) = (yyvsp[0].node);
11716  /*% %*/
11717  /*% ripper: rb_ary_new3(1, get_value($1)) %*/
11718  }
11719 #line 11715 "parse.c" /* yacc.c:1646 */
11720  break;
11721 
11722  case 708:
11723 #line 5207 "parse.y" /* yacc.c:1646 */
11724  {
11725  /*%%%*/
11726  (yyval.node) = opt_arg_append((yyvsp[-2].node), (yyvsp[0].node));
11727  /*% %*/
11728  /*% ripper: rb_ary_push($1, get_value($3)) %*/
11729  }
11730 #line 11726 "parse.c" /* yacc.c:1646 */
11731  break;
11732 
11733  case 711:
11734 #line 5220 "parse.y" /* yacc.c:1646 */
11735  {
11736  arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].id))));
11737  /*%%%*/
11738  (yyval.id) = (yyvsp[0].id);
11739  /*% %*/
11740  /*% ripper: rest_param!($2) %*/
11741  }
11742 #line 11738 "parse.c" /* yacc.c:1646 */
11743  break;
11744 
11745  case 712:
11746 #line 5228 "parse.y" /* yacc.c:1646 */
11747  {
11748  /*%%%*/
11749  (yyval.id) = internal_id(p);
11750  arg_var(p, (yyval.id));
11751  /*% %*/
11752  /*% ripper: rest_param!(Qnil) %*/
11753  }
11754 #line 11750 "parse.c" /* yacc.c:1646 */
11755  break;
11756 
11757  case 715:
11758 #line 5242 "parse.y" /* yacc.c:1646 */
11759  {
11760  arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].id))));
11761  /*%%%*/
11762  (yyval.id) = (yyvsp[0].id);
11763  /*% %*/
11764  /*% ripper: blockarg!($2) %*/
11765  }
11766 #line 11762 "parse.c" /* yacc.c:1646 */
11767  break;
11768 
11769  case 716:
11770 #line 5252 "parse.y" /* yacc.c:1646 */
11771  {
11772  (yyval.id) = (yyvsp[0].id);
11773  }
11774 #line 11770 "parse.c" /* yacc.c:1646 */
11775  break;
11776 
11777  case 717:
11778 #line 5256 "parse.y" /* yacc.c:1646 */
11779  {
11780  (yyval.id) = Qnull;
11781  }
11782 #line 11778 "parse.c" /* yacc.c:1646 */
11783  break;
11784 
11785  case 718:
11786 #line 5262 "parse.y" /* yacc.c:1646 */
11787  {
11788  value_expr((yyvsp[0].node));
11789  (yyval.node) = (yyvsp[0].node);
11790  }
11791 #line 11787 "parse.c" /* yacc.c:1646 */
11792  break;
11793 
11794  case 719:
11795 #line 5266 "parse.y" /* yacc.c:1646 */
11796  {SET_LEX_STATE(EXPR_BEG);}
11797 #line 11793 "parse.c" /* yacc.c:1646 */
11798  break;
11799 
11800  case 720:
11801 #line 5267 "parse.y" /* yacc.c:1646 */
11802  {
11803  /*%%%*/
11804  switch (nd_type((yyvsp[-1].node))) {
11805  case NODE_STR:
11806  case NODE_DSTR:
11807  case NODE_XSTR:
11808  case NODE_DXSTR:
11809  case NODE_DREGX:
11810  case NODE_LIT:
11811  case NODE_LIST:
11812  case NODE_ZLIST:
11813  yyerror1(&(yylsp[-1]), "can't define singleton method for literals");
11814  break;
11815  default:
11816  value_expr((yyvsp[-1].node));
11817  break;
11818  }
11819  (yyval.node) = (yyvsp[-1].node);
11820  /*% %*/
11821  /*% ripper: paren!($3) %*/
11822  }
11823 #line 11819 "parse.c" /* yacc.c:1646 */
11824  break;
11825 
11826  case 722:
11827 #line 5292 "parse.y" /* yacc.c:1646 */
11828  {
11829  /*%%%*/
11830  (yyval.node) = (yyvsp[-1].node);
11831  /*% %*/
11832  /*% ripper: assoclist_from_args!($1) %*/
11833  }
11834 #line 11830 "parse.c" /* yacc.c:1646 */
11835  break;
11836 
11837  case 724:
11838 #line 5303 "parse.y" /* yacc.c:1646 */
11839  {
11840  /*%%%*/
11841  NODE *assocs = (yyvsp[-2].node);
11842  NODE *tail = (yyvsp[0].node);
11843  if (!assocs) {
11844  assocs = tail;
11845  }
11846  else if (tail) {
11847  if (assocs->nd_head &&
11848  !tail->nd_head && nd_type(tail->nd_next) == NODE_LIST &&
11849  nd_type(tail->nd_next->nd_head) == NODE_HASH) {
11850  /* DSTAR */
11851  tail = tail->nd_next->nd_head->nd_head;
11852  }
11853  assocs = list_concat(assocs, tail);
11854  }
11855  (yyval.node) = assocs;
11856  /*% %*/
11857  /*% ripper: rb_ary_push($1, get_value($3)) %*/
11858  }
11859 #line 11855 "parse.c" /* yacc.c:1646 */
11860  break;
11861 
11862  case 725:
11863 #line 5326 "parse.y" /* yacc.c:1646 */
11864  {
11865  /*%%%*/
11866  if (nd_type((yyvsp[-2].node)) == NODE_STR) {
11867  nd_set_type((yyvsp[-2].node), NODE_LIT);
11868  RB_OBJ_WRITE(p->ast, &(yyvsp[-2].node)->nd_lit, rb_fstring((yyvsp[-2].node)->nd_lit));
11869  }
11870  (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
11871  /*% %*/
11872  /*% ripper: assoc_new!($1, $3) %*/
11873  }
11874 #line 11870 "parse.c" /* yacc.c:1646 */
11875  break;
11876 
11877  case 726:
11878 #line 5337 "parse.y" /* yacc.c:1646 */
11879  {
11880  /*%%%*/
11881  (yyval.node) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
11882  /*% %*/
11883  /*% ripper: assoc_new!($1, $2) %*/
11884  }
11885 #line 11881 "parse.c" /* yacc.c:1646 */
11886  break;
11887 
11888  case 727:
11889 #line 5344 "parse.y" /* yacc.c:1646 */
11890  {
11891  /*%%%*/
11892  YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
11893  (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
11894  /*% %*/
11895  /*% ripper: assoc_new!(dyna_symbol!($2), $4) %*/
11896  }
11897 #line 11893 "parse.c" /* yacc.c:1646 */
11898  break;
11899 
11900  case 728:
11901 #line 5352 "parse.y" /* yacc.c:1646 */
11902  {
11903  /*%%%*/
11904  if (nd_type((yyvsp[0].node)) == NODE_HASH &&
11905  !((yyvsp[0].node)->nd_head && (yyvsp[0].node)->nd_head->nd_alen)) {
11906  static VALUE empty_hash;
11907  if (!empty_hash) {
11908  empty_hash = rb_obj_freeze(rb_hash_new());
11909  rb_gc_register_mark_object(empty_hash);
11910  }
11911  (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), NEW_LIT(empty_hash, &(yyloc)));
11912  }
11913  else
11914  (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
11915  /*% %*/
11916  /*% ripper: assoc_splat!($2) %*/
11917  }
11918 #line 11914 "parse.c" /* yacc.c:1646 */
11919  break;
11920 
11921  case 755:
11922 #line 5420 "parse.y" /* yacc.c:1646 */
11923  {yyerrok;token_flush(p);}
11924 #line 11920 "parse.c" /* yacc.c:1646 */
11925  break;
11926 
11927  case 756:
11928 #line 5421 "parse.y" /* yacc.c:1646 */
11929  {token_flush(p);}
11930 #line 11926 "parse.c" /* yacc.c:1646 */
11931  break;
11932 
11933  case 758:
11934 #line 5425 "parse.y" /* yacc.c:1646 */
11935  {yyerrok;}
11936 #line 11932 "parse.c" /* yacc.c:1646 */
11937  break;
11938 
11939  case 759:
11940 #line 5429 "parse.y" /* yacc.c:1646 */
11941  {
11942  (yyval.node) = Qnull;
11943  }
11944 #line 11940 "parse.c" /* yacc.c:1646 */
11945  break;
11946 
11947 
11948 #line 11944 "parse.c" /* yacc.c:1646 */
11949  default: break;
11950  }
11951  /* User semantic actions sometimes alter yychar, and that requires
11952  that yytoken be updated with the new translation. We take the
11953  approach of translating immediately before every use of yytoken.
11954  One alternative is translating here after every semantic action,
11955  but that translation would be missed if the semantic action invokes
11956  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
11957  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
11958  incorrect destructor might then be invoked immediately. In the
11959  case of YYERROR or YYBACKUP, subsequent parser actions might lead
11960  to an incorrect destructor call or verbose syntax error message
11961  before the lookahead is translated. */
11962  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
11963 
11964  YYPOPSTACK (yylen);
11965  yylen = 0;
11966  YY_STACK_PRINT (yyss, yyssp);
11967 
11968  *++yyvsp = yyval;
11969  *++yylsp = yyloc;
11970 
11971  /* Now 'shift' the result of the reduction. Determine what state
11972  that goes to, based on the state we popped back to and the rule
11973  number reduced by. */
11974 
11975  yyn = yyr1[yyn];
11976 
11977  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
11978  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
11979  yystate = yytable[yystate];
11980  else
11981  yystate = yydefgoto[yyn - YYNTOKENS];
11982 
11983  goto yynewstate;
11984 
11985 
11986 /*--------------------------------------.
11987 | yyerrlab -- here on detecting error. |
11988 `--------------------------------------*/
11989 yyerrlab:
11990  /* Make sure we have latest lookahead translation. See comments at
11991  user semantic actions for why this is necessary. */
11992  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
11993 
11994  /* If not already recovering from an error, report this error. */
11995  if (!yyerrstatus)
11996  {
11997  ++yynerrs;
11998 #if ! YYERROR_VERBOSE
11999  yyerror (&yylloc, p, YY_("syntax error"));
12000 #else
12001 # define YYSYNTAX_ERROR yysyntax_error (p, &yymsg_alloc, &yymsg, \
12002  yyssp, yytoken)
12003  {
12004  char const *yymsgp = YY_("syntax error");
12005  int yysyntax_error_status;
12006  yysyntax_error_status = YYSYNTAX_ERROR;
12007  if (yysyntax_error_status == 0)
12008  yymsgp = yymsg;
12009  else if (yysyntax_error_status == 1)
12010  {
12011  if (yymsg != yymsgbuf)
12012  YYSTACK_FREE (yymsg);
12013  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
12014  if (!yymsg)
12015  {
12016  yymsg = yymsgbuf;
12017  yymsg_alloc = sizeof yymsgbuf;
12018  yysyntax_error_status = 2;
12019  }
12020  else
12021  {
12022  yysyntax_error_status = YYSYNTAX_ERROR;
12023  yymsgp = yymsg;
12024  }
12025  }
12026  yyerror (&yylloc, p, yymsgp);
12027  if (yysyntax_error_status == 2)
12028  goto yyexhaustedlab;
12029  }
12030 # undef YYSYNTAX_ERROR
12031 #endif
12032  }
12033 
12034  yyerror_range[1] = yylloc;
12035 
12036  if (yyerrstatus == 3)
12037  {
12038  /* If just tried and failed to reuse lookahead token after an
12039  error, discard it. */
12040 
12041  if (yychar <= YYEOF)
12042  {
12043  /* Return failure if at end of input. */
12044  if (yychar == YYEOF)
12045  YYABORT;
12046  }
12047  else
12048  {
12049  yydestruct ("Error: discarding",
12050  yytoken, &yylval, &yylloc, p);
12051  yychar = YYEMPTY;
12052  }
12053  }
12054 
12055  /* Else will try to reuse lookahead token after shifting the error
12056  token. */
12057  goto yyerrlab1;
12058 
12059 
12060 /*---------------------------------------------------.
12061 | yyerrorlab -- error raised explicitly by YYERROR. |
12062 `---------------------------------------------------*/
12063 yyerrorlab:
12064 
12065  /* Pacify compilers like GCC when the user code never invokes
12066  YYERROR and the label yyerrorlab therefore never appears in user
12067  code. */
12068  if (/*CONSTCOND*/ 0)
12069  goto yyerrorlab;
12070 
12071  yyerror_range[1] = yylsp[1-yylen];
12072  /* Do not reclaim the symbols of the rule whose action triggered
12073  this YYERROR. */
12074  YYPOPSTACK (yylen);
12075  yylen = 0;
12076  YY_STACK_PRINT (yyss, yyssp);
12077  yystate = *yyssp;
12078  goto yyerrlab1;
12079 
12080 
12081 /*-------------------------------------------------------------.
12082 | yyerrlab1 -- common code for both syntax error and YYERROR. |
12083 `-------------------------------------------------------------*/
12084 yyerrlab1:
12085  yyerrstatus = 3; /* Each real token shifted decrements this. */
12086 
12087  for (;;)
12088  {
12089  yyn = yypact[yystate];
12090  if (!yypact_value_is_default (yyn))
12091  {
12092  yyn += YYTERROR;
12093  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
12094  {
12095  yyn = yytable[yyn];
12096  if (0 < yyn)
12097  break;
12098  }
12099  }
12100 
12101  /* Pop the current state because it cannot handle the error token. */
12102  if (yyssp == yyss)
12103  YYABORT;
12104 
12105  yyerror_range[1] = *yylsp;
12106  yydestruct ("Error: popping",
12107  yystos[yystate], yyvsp, yylsp, p);
12108  YYPOPSTACK (1);
12109  yystate = *yyssp;
12110  YY_STACK_PRINT (yyss, yyssp);
12111  }
12112 
12114  *++yyvsp = yylval;
12116 
12117  yyerror_range[2] = yylloc;
12118  /* Using YYLLOC is tempting, but would change the location of
12119  the lookahead. YYLOC is available though. */
12120  YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
12121  *++yylsp = yyloc;
12122 
12123  /* Shift the error token. */
12124  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
12125 
12126  yystate = yyn;
12127  goto yynewstate;
12128 
12129 
12130 /*-------------------------------------.
12131 | yyacceptlab -- YYACCEPT comes here. |
12132 `-------------------------------------*/
12133 yyacceptlab:
12134  yyresult = 0;
12135  goto yyreturn;
12136 
12137 /*-----------------------------------.
12138 | yyabortlab -- YYABORT comes here. |
12139 `-----------------------------------*/
12140 yyabortlab:
12141  yyresult = 1;
12142  goto yyreturn;
12143 
12144 #if !defined yyoverflow || YYERROR_VERBOSE
12145 /*-------------------------------------------------.
12146 | yyexhaustedlab -- memory exhaustion comes here. |
12147 `-------------------------------------------------*/
12148 yyexhaustedlab:
12149  yyerror (&yylloc, p, YY_("memory exhausted"));
12150  yyresult = 2;
12151  /* Fall through. */
12152 #endif
12153 
12154 yyreturn:
12155  if (yychar != YYEMPTY)
12156  {
12157  /* Make sure we have latest lookahead translation. See comments at
12158  user semantic actions for why this is necessary. */
12159  yytoken = YYTRANSLATE (yychar);
12160  yydestruct ("Cleanup: discarding lookahead",
12161  yytoken, &yylval, &yylloc, p);
12162  }
12163  /* Do not reclaim the symbols of the rule whose action triggered
12164  this YYABORT or YYACCEPT. */
12165  YYPOPSTACK (yylen);
12166  YY_STACK_PRINT (yyss, yyssp);
12167  while (yyssp != yyss)
12168  {
12169  yydestruct ("Cleanup: popping",
12170  yystos[*yyssp], yyvsp, yylsp, p);
12171  YYPOPSTACK (1);
12172  }
12173 #ifndef yyoverflow
12174  if (yyss != yyssa)
12175  YYSTACK_FREE (yyss);
12176 #endif
12177 #if YYERROR_VERBOSE
12178  if (yymsg != yymsgbuf)
12179  YYSTACK_FREE (yymsg);
12180 #endif
12181  return yyresult;
12182 }
12183 #line 5433 "parse.y" /* yacc.c:1906 */
12184 
12185 # undef p
12186 # undef yylex
12187 # undef yylval
12188 # define yylval (*p->lval)
12189 
12190 static int regx_options(struct parser_params*);
12191 static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
12192 static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
12193 static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
12194 static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
12195 
12196 #ifndef RIPPER
12197 # define set_yylval_node(x) { \
12198  YYLTYPE _cur_loc; \
12199  rb_parser_set_location(p, &_cur_loc); \
12200  yylval.node = (x); \
12201 }
12202 # define set_yylval_str(x) \
12203 do { \
12204  set_yylval_node(NEW_STR(x, &_cur_loc)); \
12205  RB_OBJ_WRITTEN(p->ast, Qnil, x); \
12206 } while(0)
12207 # define set_yylval_literal(x) \
12208 do { \
12209  set_yylval_node(NEW_LIT(x, &_cur_loc)); \
12210  RB_OBJ_WRITTEN(p->ast, Qnil, x); \
12211 } while(0)
12212 # define set_yylval_num(x) (yylval.num = (x))
12213 # define set_yylval_id(x) (yylval.id = (x))
12214 # define set_yylval_name(x) (yylval.id = (x))
12215 # define yylval_id() (yylval.id)
12216 #else
12217 static inline VALUE
12218 ripper_yylval_id(struct parser_params *p, ID x)
12219 {
12220  return ripper_new_yylval(p, x, ID2SYM(x), 0);
12221 }
12222 # define set_yylval_str(x) (yylval.val = add_mark_object(p, (x)))
12223 # define set_yylval_num(x) (yylval.val = ripper_new_yylval(p, (x), 0, 0))
12224 # define set_yylval_id(x) (void)(x)
12225 # define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(p, x))
12226 # define set_yylval_literal(x) add_mark_object(p, (x))
12227 # define set_yylval_node(x) (void)(x)
12228 # define yylval_id() yylval.id
12229 # define _cur_loc NULL_LOC /* dummy */
12230 #endif
12231 
12232 #define set_yylval_noname() set_yylval_id(keyword_nil)
12233 
12234 #ifndef RIPPER
12235 #define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
12236 #define dispatch_scan_event(p, t) ((void)0)
12237 #define dispatch_delayed_token(p, t) ((void)0)
12238 #define has_delayed_token(p) (0)
12239 #else
12240 #define literal_flush(p, ptr) ((void)(ptr))
12241 
12242 #define yylval_rval (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val))
12243 
12244 static inline VALUE
12245 intern_sym(const char *name)
12246 {
12247  ID id = rb_intern_const(name);
12248  return ID2SYM(id);
12249 }
12250 
12251 static int
12252 ripper_has_scan_event(struct parser_params *p)
12253 {
12254  if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
12255  return p->lex.pcur > p->lex.ptok;
12256 }
12257 
12258 static VALUE
12259 ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
12260 {
12261  VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
12262  VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
12263  token_flush(p);
12264  return rval;
12265 }
12266 
12267 static void
12268 ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
12269 {
12270  if (!ripper_has_scan_event(p)) return;
12271  add_mark_object(p, yylval_rval = ripper_scan_event_val(p, t));
12272 }
12273 #define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
12274 
12275 static void
12276 ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
12277 {
12278  int saved_line = p->ruby_sourceline;
12279  const char *saved_tokp = p->lex.ptok;
12280 
12281  if (NIL_P(p->delayed.token)) return;
12282  p->ruby_sourceline = p->delayed.line;
12283  p->lex.ptok = p->lex.pbeg + p->delayed.col;
12284  add_mark_object(p, yylval_rval = ripper_dispatch1(p, ripper_token2eventid(t), p->delayed.token));
12285  p->delayed.token = Qnil;
12286  p->ruby_sourceline = saved_line;
12287  p->lex.ptok = saved_tokp;
12288 }
12289 #define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
12290 #define has_delayed_token(p) (!NIL_P(p->delayed.token))
12291 #endif /* RIPPER */
12292 
12293 #include "ruby/regex.h"
12294 #include "ruby/util.h"
12295 
12296 static inline int
12297 is_identchar(const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
12298 {
12299  return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
12300 }
12301 
12302 static inline int
12303 parser_is_identchar(struct parser_params *p)
12304 {
12305  return !(p)->eofp && is_identchar(p->lex.pcur-1, p->lex.pend, p->enc);
12306 }
12307 
12308 static inline int
12309 parser_isascii(struct parser_params *p)
12310 {
12311  return ISASCII(*(p->lex.pcur-1));
12312 }
12313 
12314 static void
12315 token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
12316 {
12317  int column = 1, nonspc = 0, i;
12318  for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
12319  if (*ptr == '\t') {
12320  column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
12321  }
12322  column++;
12323  if (*ptr != ' ' && *ptr != '\t') {
12324  nonspc = 1;
12325  }
12326  }
12327 
12328  ptinfo->beg = loc->beg_pos;
12329  ptinfo->indent = column;
12330  ptinfo->nonspc = nonspc;
12331 }
12332 
12333 static void
12334 token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
12335 {
12336  token_info *ptinfo;
12337 
12338  if (!p->token_info_enabled) return;
12339  ptinfo = ALLOC(token_info);
12340  ptinfo->token = token;
12341  ptinfo->next = p->token_info;
12342  token_info_setup(ptinfo, p->lex.pbeg, loc);
12343 
12344  p->token_info = ptinfo;
12345 }
12346 
12347 static void
12348 token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
12349 {
12350  token_info *ptinfo_beg = p->token_info;
12351 
12352  if (!ptinfo_beg) return;
12353  p->token_info = ptinfo_beg->next;
12354 
12355  /* indentation check of matched keywords (begin..end, if..end, etc.) */
12356  token_info_warn(p, token, ptinfo_beg, 1, loc);
12357  ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
12358 }
12359 
12360 static void
12361 token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
12362 {
12363  token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
12364  if (!p->token_info_enabled) return;
12365  if (!ptinfo_beg) return;
12366  token_info_setup(ptinfo_end, p->lex.pbeg, loc);
12367  if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
12368  if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
12369  if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
12370  if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
12371  rb_warn3L(ptinfo_end->beg.lineno,
12372  "mismatched indentations at '%s' with '%s' at %d",
12373  WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
12374 }
12375 
12376 static int
12377 parser_precise_mbclen(struct parser_params *p, const char *ptr)
12378 {
12379  int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
12380  if (!MBCLEN_CHARFOUND_P(len)) {
12381  compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
12382  return -1;
12383  }
12384  return len;
12385 }
12386 
12387 #ifndef RIPPER
12388 static void ruby_show_error_line(VALUE errbuf, const YYLTYPE *yylloc, int lineno, VALUE str);
12389 
12390 static inline void
12391 parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
12392 {
12393  VALUE str;
12394  int lineno = p->ruby_sourceline;
12395  if (!yylloc) {
12396  return;
12397  }
12398  else if (yylloc->beg_pos.lineno == lineno) {
12399  str = p->lex.lastline;
12400  }
12401  else {
12402  return;
12403  }
12404  ruby_show_error_line(p->error_buffer, yylloc, lineno, str);
12405 }
12406 
12407 static int
12408 parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
12409 {
12410  YYLTYPE current;
12411 
12412  if (!yylloc) {
12413  yylloc = RUBY_SET_YYLLOC(current);
12414  }
12415  else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
12416  p->ruby_sourceline != yylloc->end_pos.lineno) ||
12417  (yylloc->beg_pos.lineno == yylloc->end_pos.lineno &&
12418  yylloc->beg_pos.column == yylloc->end_pos.column)) {
12419  yylloc = 0;
12420  }
12421  compile_error(p, "%s", msg);
12422  parser_show_error_line(p, yylloc);
12423  return 0;
12424 }
12425 
12426 static void
12427 ruby_show_error_line(VALUE errbuf, const YYLTYPE *yylloc, int lineno, VALUE str)
12428 {
12429  VALUE mesg;
12430  const int max_line_margin = 30;
12431  const char *ptr, *ptr_end, *pt, *pb;
12432  const char *pre = "", *post = "", *pend;
12433  const char *code = "", *caret = "";
12434  const char *lim;
12435  const char *const pbeg = RSTRING_PTR(str);
12436  char *buf;
12437  long len;
12438  int i;
12439 
12440  if (!yylloc) return;
12441  pend = RSTRING_END(str);
12442  if (pend > pbeg && pend[-1] == '\n') {
12443  if (--pend > pbeg && pend[-1] == '\r') --pend;
12444  }
12445 
12446  pt = pend;
12447  if (lineno == yylloc->end_pos.lineno &&
12448  (pend - pbeg) > yylloc->end_pos.column) {
12449  pt = pbeg + yylloc->end_pos.column;
12450  }
12451 
12452  ptr = ptr_end = pt;
12453  lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
12454  while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
12455 
12456  lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
12457  while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
12458 
12459  len = ptr_end - ptr;
12460  if (len > 4) {
12461  if (ptr > pbeg) {
12462  ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_enc_get(str));
12463  if (ptr > pbeg) pre = "...";
12464  }
12465  if (ptr_end < pend) {
12466  ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_enc_get(str));
12467  if (ptr_end < pend) post = "...";
12468  }
12469  }
12470  pb = pbeg;
12471  if (lineno == yylloc->beg_pos.lineno) {
12472  pb += yylloc->beg_pos.column;
12473  if (pb > pt) pb = pt;
12474  }
12475  if (pb < ptr) pb = ptr;
12476  if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
12477  return;
12478  }
12479  if (RTEST(errbuf)) {
12480  mesg = rb_attr_get(errbuf, idMesg);
12481  if (RSTRING_LEN(mesg) > 0 && *(RSTRING_END(mesg)-1) != '\n')
12482  rb_str_cat_cstr(mesg, "\n");
12483  }
12484  else {
12485  mesg = rb_enc_str_new(0, 0, rb_enc_get(str));
12486  }
12487  if (!errbuf && rb_stderr_tty_p()) {
12488 #define CSI_BEGIN "\033["
12489 #define CSI_SGR "m"
12490  rb_str_catf(mesg,
12491  CSI_BEGIN""CSI_SGR"%s" /* pre */
12492  CSI_BEGIN"1"CSI_SGR"%.*s"
12493  CSI_BEGIN"1;4"CSI_SGR"%.*s"
12494  CSI_BEGIN";1"CSI_SGR"%.*s"
12495  CSI_BEGIN""CSI_SGR"%s" /* post */
12496  "\n",
12497  pre,
12498  (int)(pb - ptr), ptr,
12499  (int)(pt - pb), pb,
12500  (int)(ptr_end - pt), pt,
12501  post);
12502  }
12503  else {
12504  char *p2;
12505 
12506  len = ptr_end - ptr;
12507  lim = pt < pend ? pt : pend;
12508  i = (int)(lim - ptr);
12509  buf = ALLOCA_N(char, i+2);
12510  code = ptr;
12511  caret = p2 = buf;
12512  if (ptr <= pb) {
12513  while (ptr < pb) {
12514  *p2++ = *ptr++ == '\t' ? '\t' : ' ';
12515  }
12516  *p2++ = '^';
12517  ptr++;
12518  }
12519  if (lim > ptr) {
12520  memset(p2, '~', (lim - ptr));
12521  p2 += (lim - ptr);
12522  }
12523  *p2 = '\0';
12524  rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
12525  pre, (int)len, code, post,
12526  pre, caret);
12527  }
12528  if (!errbuf) rb_write_error_str(mesg);
12529 }
12530 #else
12531 static int
12532 parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
12533 {
12534  const char *pcur = 0, *ptok = 0;
12535  if (yylloc &&
12536  p->ruby_sourceline == yylloc->beg_pos.lineno &&
12537  p->ruby_sourceline == yylloc->end_pos.lineno) {
12538  pcur = p->lex.pcur;
12539  ptok = p->lex.ptok;
12540  p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
12541  p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
12542  }
12543  dispatch1(parse_error, STR_NEW2(msg));
12544  ripper_error(p);
12545  if (pcur) {
12546  p->lex.ptok = ptok;
12547  p->lex.pcur = pcur;
12548  }
12549  return 0;
12550 }
12551 
12552 static inline void
12553 parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
12554 {
12555 }
12556 #endif /* !RIPPER */
12557 
12558 #ifndef RIPPER
12559 static int
12560 vtable_size(const struct vtable *tbl)
12561 {
12562  if (!DVARS_TERMINAL_P(tbl)) {
12563  return tbl->pos;
12564  }
12565  else {
12566  return 0;
12567  }
12568 }
12569 #endif
12570 
12571 static struct vtable *
12572 vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
12573 {
12574  struct vtable *tbl = ALLOC(struct vtable);
12575  tbl->pos = 0;
12576  tbl->capa = 8;
12577  tbl->tbl = ALLOC_N(ID, tbl->capa);
12578  tbl->prev = prev;
12579 #ifndef RIPPER
12580  if (p->debug) {
12581  rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
12582  }
12583 #endif
12584  return tbl;
12585 }
12586 #define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
12587 
12588 static void
12589 vtable_free_gen(struct parser_params *p, int line, const char *name,
12590  struct vtable *tbl)
12591 {
12592 #ifndef RIPPER
12593  if (p->debug) {
12594  rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
12595  }
12596 #endif
12597  if (!DVARS_TERMINAL_P(tbl)) {
12598  if (tbl->tbl) {
12599  ruby_sized_xfree(tbl->tbl, tbl->capa * sizeof(ID));
12600  }
12601  ruby_sized_xfree(tbl, sizeof(tbl));
12602  }
12603 }
12604 #define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
12605 
12606 static void
12607 vtable_add_gen(struct parser_params *p, int line, const char *name,
12608  struct vtable *tbl, ID id)
12609 {
12610 #ifndef RIPPER
12611  if (p->debug) {
12612  rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
12613  line, name, (void *)tbl, rb_id2name(id));
12614  }
12615 #endif
12616  if (DVARS_TERMINAL_P(tbl)) {
12617  rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
12618  return;
12619  }
12620  if (tbl->pos == tbl->capa) {
12621  tbl->capa = tbl->capa * 2;
12622  SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
12623  }
12624  tbl->tbl[tbl->pos++] = id;
12625 }
12626 #define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
12627 
12628 #ifndef RIPPER
12629 static void
12630 vtable_pop_gen(struct parser_params *p, int line, const char *name,
12631  struct vtable *tbl, int n)
12632 {
12633  if (p->debug) {
12634  rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
12635  line, name, (void *)tbl, n);
12636  }
12637  if (tbl->pos < n) {
12638  rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
12639  return;
12640  }
12641  tbl->pos -= n;
12642 }
12643 #define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
12644 #endif
12645 
12646 static int
12647 vtable_included(const struct vtable * tbl, ID id)
12648 {
12649  int i;
12650 
12651  if (!DVARS_TERMINAL_P(tbl)) {
12652  for (i = 0; i < tbl->pos; i++) {
12653  if (tbl->tbl[i] == id) {
12654  return i+1;
12655  }
12656  }
12657  }
12658  return 0;
12659 }
12660 
12661 static void parser_prepare(struct parser_params *p);
12662 
12663 #ifndef RIPPER
12664 static NODE *parser_append_options(struct parser_params *p, NODE *node);
12665 
12666 static VALUE
12667 debug_lines(VALUE fname)
12668 {
12669  ID script_lines;
12670  CONST_ID(script_lines, "SCRIPT_LINES__");
12671  if (rb_const_defined_at(rb_cObject, script_lines)) {
12672  VALUE hash = rb_const_get_at(rb_cObject, script_lines);
12673  if (RB_TYPE_P(hash, T_HASH)) {
12674  VALUE lines = rb_ary_new();
12675  rb_hash_aset(hash, fname, lines);
12676  return lines;
12677  }
12678  }
12679  return 0;
12680 }
12681 
12682 static int
12683 e_option_supplied(struct parser_params *p)
12684 {
12685  return strcmp(p->ruby_sourcefile, "-e") == 0;
12686 }
12687 
12688 static VALUE
12689 yycompile0(VALUE arg)
12690 {
12691  int n;
12692  NODE *tree;
12693  struct parser_params *p = (struct parser_params *)arg;
12694  VALUE cov = Qfalse;
12695 
12698  if (p->debug_lines && p->ruby_sourceline > 0) {
12699  VALUE str = STR_NEW0();
12700  n = p->ruby_sourceline;
12701  do {
12703  } while (--n);
12704  }
12705 
12706  if (!e_option_supplied(p)) {
12707  cov = Qtrue;
12708  }
12709  }
12710 
12711  parser_prepare(p);
12712 #define RUBY_DTRACE_PARSE_HOOK(name) \
12713  if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
12714  RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
12715  }
12716  RUBY_DTRACE_PARSE_HOOK(BEGIN);
12717  n = yyparse(p);
12719  p->debug_lines = 0;
12720 
12721  p->lex.strterm = 0;
12722  p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
12723  p->lex.prevline = p->lex.lastline = p->lex.nextline = 0;
12724  if (n || p->error_p) {
12725  VALUE mesg = p->error_buffer;
12726  if (!mesg) {
12727  mesg = rb_class_new_instance(0, 0, rb_eSyntaxError);
12728  }
12729  rb_set_errinfo(mesg);
12730  return FALSE;
12731  }
12732  tree = p->eval_tree;
12733  if (!tree) {
12734  tree = NEW_NIL(&NULL_LOC);
12735  }
12736  else {
12737  VALUE opt = p->compile_option;
12738  NODE *prelude;
12739  NODE *body = parser_append_options(p, tree->nd_body);
12740  if (!opt) opt = rb_obj_hide(rb_ident_hash_new());
12741  rb_hash_aset(opt, rb_sym_intern_ascii_cstr("coverage_enabled"), cov);
12742  prelude = block_append(p, p->eval_tree_begin, body);
12743  tree->nd_body = prelude;
12744  RB_OBJ_WRITE(p->ast, &p->ast->body.compile_option, opt);
12745  }
12746  p->ast->body.root = tree;
12747  p->ast->body.line_count = p->line_count;
12748  return TRUE;
12749 }
12750 
12751 static rb_ast_t *
12752 yycompile(VALUE vparser, struct parser_params *p, VALUE fname, int line)
12753 {
12754  rb_ast_t *ast;
12755  if (NIL_P(fname)) {
12757  p->ruby_sourcefile = "(none)";
12758  }
12759  else {
12760  p->ruby_sourcefile_string = rb_fstring(fname);
12761  p->ruby_sourcefile = StringValueCStr(fname);
12762  }
12763  p->ruby_sourceline = line - 1;
12764 
12765  p->ast = ast = rb_ast_new();
12766  rb_suppress_tracing(yycompile0, (VALUE)p);
12767  p->ast = 0;
12768  RB_GC_GUARD(vparser); /* prohibit tail call optimization */
12769 
12770  return ast;
12771 }
12772 #endif /* !RIPPER */
12773 
12774 static rb_encoding *
12775 must_be_ascii_compatible(VALUE s)
12776 {
12777  rb_encoding *enc = rb_enc_get(s);
12778  if (!rb_enc_asciicompat(enc)) {
12779  rb_raise(rb_eArgError, "invalid source encoding");
12780  }
12781  return enc;
12782 }
12783 
12784 static VALUE
12785 lex_get_str(struct parser_params *p, VALUE s)
12786 {
12787  char *beg, *end, *start;
12788  long len;
12789 
12790  beg = RSTRING_PTR(s);
12791  len = RSTRING_LEN(s);
12792  start = beg;
12793  if (p->lex.gets_.ptr) {
12794  if (len == p->lex.gets_.ptr) return Qnil;
12795  beg += p->lex.gets_.ptr;
12796  len -= p->lex.gets_.ptr;
12797  }
12798  end = memchr(beg, '\n', len);
12799  if (end) len = ++end - beg;
12800  p->lex.gets_.ptr += len;
12801  return rb_str_subseq(s, beg - start, len);
12802 }
12803 
12804 static VALUE
12805 lex_getline(struct parser_params *p)
12806 {
12807  VALUE line = (*p->lex.gets)(p, p->lex.input);
12808  if (NIL_P(line)) return line;
12809  must_be_ascii_compatible(line);
12810 #ifndef RIPPER
12811  if (p->debug_lines) {
12812  rb_enc_associate(line, p->enc);
12813  rb_ary_push(p->debug_lines, line);
12814  }
12815 #endif
12816  p->line_count++;
12817  return line;
12818 }
12819 
12820 static const rb_data_type_t parser_data_type;
12821 
12822 #ifndef RIPPER
12823 static rb_ast_t*
12824 parser_compile_string(VALUE vparser, VALUE fname, VALUE s, int line)
12825 {
12826  struct parser_params *p;
12827 
12828  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
12829 
12830  p->lex.gets = lex_get_str;
12831  p->lex.gets_.ptr = 0;
12832  p->lex.input = rb_str_new_frozen(s);
12833  p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
12834 
12835  return yycompile(vparser, p, fname, line);
12836 }
12837 
12838 rb_ast_t*
12839 rb_parser_compile_string(VALUE vparser, const char *f, VALUE s, int line)
12840 {
12841  return rb_parser_compile_string_path(vparser, rb_filesystem_str_new_cstr(f), s, line);
12842 }
12843 
12844 rb_ast_t*
12846 {
12847  must_be_ascii_compatible(s);
12848  return parser_compile_string(vparser, f, s, line);
12849 }
12850 
12852 
12853 static VALUE
12854 lex_io_gets(struct parser_params *p, VALUE io)
12855 {
12856  return rb_io_gets_internal(io);
12857 }
12858 
12859 rb_ast_t*
12860 rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE file, int start)
12861 {
12862  struct parser_params *p;
12863 
12864  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
12865 
12866  p->lex.gets = lex_io_gets;
12867  p->lex.input = file;
12868  p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
12869 
12870  return yycompile(vparser, p, fname, start);
12871 }
12872 
12873 static VALUE
12874 lex_generic_gets(struct parser_params *p, VALUE input)
12875 {
12876  return (*p->lex.gets_.call)(input, p->line_count);
12877 }
12878 
12879 rb_ast_t*
12880 rb_parser_compile_generic(VALUE vparser, VALUE (*lex_gets)(VALUE, int), VALUE fname, VALUE input, int start)
12881 {
12882  struct parser_params *p;
12883 
12884  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
12885 
12886  p->lex.gets = lex_generic_gets;
12887  p->lex.gets_.call = lex_gets;
12888  p->lex.input = input;
12889  p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
12890 
12891  return yycompile(vparser, p, fname, start);
12892 }
12893 #endif /* !RIPPER */
12894 
12895 #define STR_FUNC_ESCAPE 0x01
12896 #define STR_FUNC_EXPAND 0x02
12897 #define STR_FUNC_REGEXP 0x04
12898 #define STR_FUNC_QWORDS 0x08
12899 #define STR_FUNC_SYMBOL 0x10
12900 #define STR_FUNC_INDENT 0x20
12901 #define STR_FUNC_LABEL 0x40
12902 #define STR_FUNC_LIST 0x4000
12903 #define STR_FUNC_TERM 0x8000
12904 
12907  str_squote = (0),
12915 };
12916 
12917 static VALUE
12918 parser_str_new(const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
12919 {
12920  VALUE str;
12921 
12922  str = rb_enc_str_new(ptr, len, enc);
12923  if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
12925  }
12926  else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) {
12928  }
12929  }
12930 
12931  return str;
12932 }
12933 
12934 #define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
12935 #define lex_eol_p(p) ((p)->lex.pcur >= (p)->lex.pend)
12936 #define lex_eol_n_p(p,n) ((p)->lex.pcur+(n) >= (p)->lex.pend)
12937 #define peek(p,c) peek_n(p, (c), 0)
12938 #define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
12939 #define peekc(p) peekc_n(p, 0)
12940 #define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
12941 
12942 #ifdef RIPPER
12943 static void
12944 add_delayed_token(struct parser_params *p, const char *tok, const char *end)
12945 {
12946  if (tok < end) {
12947  if (!has_delayed_token(p)) {
12948  p->delayed.token = rb_str_buf_new(end - tok);
12949  rb_enc_associate(p->delayed.token, p->enc);
12950  p->delayed.line = p->ruby_sourceline;
12951  p->delayed.col = rb_long2int(tok - p->lex.pbeg);
12952  }
12953  rb_str_buf_cat(p->delayed.token, tok, end - tok);
12954  p->lex.ptok = end;
12955  }
12956 }
12957 #else
12958 #define add_delayed_token(p, tok, end) ((void)(tok), (void)(end))
12959 #endif
12960 
12961 static int
12962 nextline(struct parser_params *p)
12963 {
12964  VALUE v = p->lex.nextline;
12965  p->lex.nextline = 0;
12966  if (!v) {
12967  if (p->eofp)
12968  return -1;
12969 
12970  if (p->lex.pend > p->lex.pbeg && *(p->lex.pend-1) != '\n') {
12971  goto end_of_input;
12972  }
12973 
12974  if (!p->lex.input || NIL_P(v = lex_getline(p))) {
12975  end_of_input:
12976  p->eofp = 1;
12977  lex_goto_eol(p);
12978  return -1;
12979  }
12980  p->cr_seen = FALSE;
12981  }
12982  else if (NIL_P(v)) {
12983  /* after here-document without terminator */
12984  goto end_of_input;
12985  }
12986  add_delayed_token(p, p->lex.ptok, p->lex.pend);
12987  if (p->heredoc_end > 0) {
12988  p->ruby_sourceline = p->heredoc_end;
12989  p->heredoc_end = 0;
12990  }
12991  p->ruby_sourceline++;
12992  p->lex.pbeg = p->lex.pcur = RSTRING_PTR(v);
12993  p->lex.pend = p->lex.pcur + RSTRING_LEN(v);
12994  token_flush(p);
12995  p->lex.prevline = p->lex.lastline;
12996  p->lex.lastline = v;
12997  return 0;
12998 }
12999 
13000 static int
13001 parser_cr(struct parser_params *p, int c)
13002 {
13003  if (peek(p, '\n')) {
13004  p->lex.pcur++;
13005  c = '\n';
13006  }
13007  else if (!p->cr_seen) {
13008  p->cr_seen = TRUE;
13009  /* carried over with p->lex.nextline for nextc() */
13010  rb_warn0("encountered \\r in middle of line, treated as a mere space");
13011  }
13012  return c;
13013 }
13014 
13015 static inline int
13016 nextc(struct parser_params *p)
13017 {
13018  int c;
13019 
13020  if (UNLIKELY((p->lex.pcur == p->lex.pend) || p->eofp || RTEST(p->lex.nextline))) {
13021  if (nextline(p)) return -1;
13022  }
13023  c = (unsigned char)*p->lex.pcur++;
13024  if (UNLIKELY(c == '\r')) {
13025  c = parser_cr(p, c);
13026  }
13027 
13028  return c;
13029 }
13030 
13031 static void
13032 pushback(struct parser_params *p, int c)
13033 {
13034  if (c == -1) return;
13035  p->lex.pcur--;
13036  if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
13037  p->lex.pcur--;
13038  }
13039 }
13040 
13041 #define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
13042 
13043 #define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
13044 #define tok(p) (p)->tokenbuf
13045 #define toklen(p) (p)->tokidx
13046 
13047 static int
13048 looking_at_eol_p(struct parser_params *p)
13049 {
13050  const char *ptr = p->lex.pcur;
13051  while (ptr < p->lex.pend) {
13052  int c = (unsigned char)*ptr++;
13053  int eol = (c == '\n' || c == '#');
13054  if (eol || !ISSPACE(c)) {
13055  return eol;
13056  }
13057  }
13058  return TRUE;
13059 }
13060 
13061 static char*
13062 newtok(struct parser_params *p)
13063 {
13064  p->tokidx = 0;
13065  p->tokline = p->ruby_sourceline;
13066  if (!p->tokenbuf) {
13067  p->toksiz = 60;
13068  p->tokenbuf = ALLOC_N(char, 60);
13069  }
13070  if (p->toksiz > 4096) {
13071  p->toksiz = 60;
13072  REALLOC_N(p->tokenbuf, char, 60);
13073  }
13074  return p->tokenbuf;
13075 }
13076 
13077 static char *
13078 tokspace(struct parser_params *p, int n)
13079 {
13080  p->tokidx += n;
13081 
13082  if (p->tokidx >= p->toksiz) {
13083  do {p->toksiz *= 2;} while (p->toksiz < p->tokidx);
13084  REALLOC_N(p->tokenbuf, char, p->toksiz);
13085  }
13086  return &p->tokenbuf[p->tokidx-n];
13087 }
13088 
13089 static void
13090 tokadd(struct parser_params *p, int c)
13091 {
13092  p->tokenbuf[p->tokidx++] = (char)c;
13093  if (p->tokidx >= p->toksiz) {
13094  p->toksiz *= 2;
13095  REALLOC_N(p->tokenbuf, char, p->toksiz);
13096  }
13097 }
13098 
13099 static int
13100 tok_hex(struct parser_params *p, size_t *numlen)
13101 {
13102  int c;
13103 
13104  c = scan_hex(p->lex.pcur, 2, numlen);
13105  if (!*numlen) {
13106  yyerror0("invalid hex escape");
13107  token_flush(p);
13108  return 0;
13109  }
13110  p->lex.pcur += *numlen;
13111  return c;
13112 }
13113 
13114 #define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
13115 
13116 static int
13117 escaped_control_code(int c)
13118 {
13119  int c2 = 0;
13120  switch (c) {
13121  case ' ':
13122  c2 = 's';
13123  break;
13124  case '\n':
13125  c2 = 'n';
13126  break;
13127  case '\t':
13128  c2 = 't';
13129  break;
13130  case '\v':
13131  c2 = 'v';
13132  break;
13133  case '\r':
13134  c2 = 'r';
13135  break;
13136  case '\f':
13137  c2 = 'f';
13138  break;
13139  }
13140  return c2;
13141 }
13142 
13143 #define WARN_SPACE_CHAR(c, prefix) \
13144  rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c2))
13145 
13146 static int
13147 tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
13148  int regexp_literal, int wide)
13149 {
13150  size_t numlen;
13151  int codepoint = scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
13152  literal_flush(p, p->lex.pcur);
13153  p->lex.pcur += numlen;
13154  if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
13155  yyerror0("invalid Unicode escape");
13156  return wide && numlen > 0;
13157  }
13158  if (codepoint > 0x10ffff) {
13159  yyerror0("invalid Unicode codepoint (too large)");
13160  return wide;
13161  }
13162  if ((codepoint & 0xfffff800) == 0xd800) {
13163  yyerror0("invalid Unicode codepoint");
13164  return wide;
13165  }
13166  if (regexp_literal) {
13167  tokcopy(p, (int)numlen);
13168  }
13169  else if (codepoint >= 0x80) {
13170  rb_encoding *utf8 = rb_utf8_encoding();
13171  if (*encp && utf8 != *encp) {
13172  YYLTYPE loc = RUBY_INIT_YYLLOC();
13173  compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
13174  parser_show_error_line(p, &loc);
13175  return wide;
13176  }
13177  *encp = utf8;
13178  tokaddmbc(p, codepoint, *encp);
13179  }
13180  else {
13181  tokadd(p, codepoint);
13182  }
13183  return TRUE;
13184 }
13185 
13186 /* return value is for ?\u3042 */
13187 static void
13188 tokadd_utf8(struct parser_params *p, rb_encoding **encp,
13189  int term, int symbol_literal, int regexp_literal)
13190 {
13191  /*
13192  * If `term` is not -1, then we allow multiple codepoints in \u{}
13193  * upto `term` byte, otherwise we're parsing a character literal.
13194  * And then add the codepoints to the current token.
13195  */
13196  static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
13197 
13198  const int open_brace = '{', close_brace = '}';
13199 
13200  if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
13201 
13202  if (peek(p, open_brace)) { /* handle \u{...} form */
13203  const char *second = NULL;
13204  int c, last = nextc(p);
13205  if (p->lex.pcur >= p->lex.pend) goto unterminated;
13206  while (ISSPACE(c = *p->lex.pcur) && ++p->lex.pcur < p->lex.pend);
13207  while (c != close_brace) {
13208  if (c == term) goto unterminated;
13209  if (second == multiple_codepoints)
13210  second = p->lex.pcur;
13211  if (regexp_literal) tokadd(p, last);
13212  if (!tokadd_codepoint(p, encp, regexp_literal, TRUE)) {
13213  break;
13214  }
13215  while (ISSPACE(c = *p->lex.pcur)) {
13216  if (++p->lex.pcur >= p->lex.pend) goto unterminated;
13217  last = c;
13218  }
13219  if (term == -1 && !second)
13220  second = multiple_codepoints;
13221  }
13222 
13223  if (c != close_brace) {
13224  unterminated:
13225  token_flush(p);
13226  yyerror0("unterminated Unicode escape");
13227  return;
13228  }
13229  if (second && second != multiple_codepoints) {
13230  const char *pcur = p->lex.pcur;
13231  p->lex.pcur = second;
13233  token_flush(p);
13234  p->lex.pcur = pcur;
13235  yyerror0(multiple_codepoints);
13236  token_flush(p);
13237  }
13238 
13239  if (regexp_literal) tokadd(p, close_brace);
13240  nextc(p);
13241  }
13242  else { /* handle \uxxxx form */
13243  if (!tokadd_codepoint(p, encp, regexp_literal, FALSE)) {
13244  token_flush(p);
13245  return;
13246  }
13247  }
13248 }
13249 
13250 #define ESCAPE_CONTROL 1
13251 #define ESCAPE_META 2
13252 
13253 static int
13254 read_escape(struct parser_params *p, int flags, rb_encoding **encp)
13255 {
13256  int c;
13257  size_t numlen;
13258 
13259  switch (c = nextc(p)) {
13260  case '\\': /* Backslash */
13261  return c;
13262 
13263  case 'n': /* newline */
13264  return '\n';
13265 
13266  case 't': /* horizontal tab */
13267  return '\t';
13268 
13269  case 'r': /* carriage-return */
13270  return '\r';
13271 
13272  case 'f': /* form-feed */
13273  return '\f';
13274 
13275  case 'v': /* vertical tab */
13276  return '\13';
13277 
13278  case 'a': /* alarm(bell) */
13279  return '\007';
13280 
13281  case 'e': /* escape */
13282  return 033;
13283 
13284  case '0': case '1': case '2': case '3': /* octal constant */
13285  case '4': case '5': case '6': case '7':
13286  pushback(p, c);
13287  c = scan_oct(p->lex.pcur, 3, &numlen);
13288  p->lex.pcur += numlen;
13289  return c;
13290 
13291  case 'x': /* hex constant */
13292  c = tok_hex(p, &numlen);
13293  if (numlen == 0) return 0;
13294  return c;
13295 
13296  case 'b': /* backspace */
13297  return '\010';
13298 
13299  case 's': /* space */
13300  return ' ';
13301 
13302  case 'M':
13303  if (flags & ESCAPE_META) goto eof;
13304  if ((c = nextc(p)) != '-') {
13305  goto eof;
13306  }
13307  if ((c = nextc(p)) == '\\') {
13308  if (peek(p, 'u')) goto eof;
13309  return read_escape(p, flags|ESCAPE_META, encp) | 0x80;
13310  }
13311  else if (c == -1 || !ISASCII(c)) goto eof;
13312  else {
13313  int c2 = escaped_control_code(c);
13314  if (c2) {
13315  if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
13316  WARN_SPACE_CHAR(c2, "\\M-");
13317  }
13318  else {
13319  WARN_SPACE_CHAR(c2, "\\C-\\M-");
13320  }
13321  }
13322  else if (ISCNTRL(c)) goto eof;
13323  return ((c & 0xff) | 0x80);
13324  }
13325 
13326  case 'C':
13327  if ((c = nextc(p)) != '-') {
13328  goto eof;
13329  }
13330  case 'c':
13331  if (flags & ESCAPE_CONTROL) goto eof;
13332  if ((c = nextc(p))== '\\') {
13333  if (peek(p, 'u')) goto eof;
13334  c = read_escape(p, flags|ESCAPE_CONTROL, encp);
13335  }
13336  else if (c == '?')
13337  return 0177;
13338  else if (c == -1 || !ISASCII(c)) goto eof;
13339  else {
13340  int c2 = escaped_control_code(c);
13341  if (c2) {
13342  if (ISCNTRL(c)) {
13343  if (flags & ESCAPE_META) {
13344  WARN_SPACE_CHAR(c2, "\\M-");
13345  }
13346  else {
13347  WARN_SPACE_CHAR(c2, "");
13348  }
13349  }
13350  else {
13351  if (flags & ESCAPE_META) {
13352  WARN_SPACE_CHAR(c2, "\\M-\\C-");
13353  }
13354  else {
13355  WARN_SPACE_CHAR(c2, "\\C-");
13356  }
13357  }
13358  }
13359  else if (ISCNTRL(c)) goto eof;
13360  }
13361  return c & 0x9f;
13362 
13363  eof:
13364  case -1:
13365  yyerror0("Invalid escape character syntax");
13366  token_flush(p);
13367  return '\0';
13368 
13369  default:
13370  return c;
13371  }
13372 }
13373 
13374 static void
13375 tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
13376 {
13377  int len = rb_enc_codelen(c, enc);
13378  rb_enc_mbcput(c, tokspace(p, len), enc);
13379 }
13380 
13381 static int
13382 tokadd_escape(struct parser_params *p, rb_encoding **encp)
13383 {
13384  int c;
13385  int flags = 0;
13386  size_t numlen;
13387 
13388  first:
13389  switch (c = nextc(p)) {
13390  case '\n':
13391  return 0; /* just ignore */
13392 
13393  case '0': case '1': case '2': case '3': /* octal constant */
13394  case '4': case '5': case '6': case '7':
13395  {
13396  ruby_scan_oct(--p->lex.pcur, 3, &numlen);
13397  if (numlen == 0) goto eof;
13398  p->lex.pcur += numlen;
13399  tokcopy(p, (int)numlen + 1);
13400  }
13401  return 0;
13402 
13403  case 'x': /* hex constant */
13404  {
13405  tok_hex(p, &numlen);
13406  if (numlen == 0) return -1;
13407  tokcopy(p, (int)numlen + 2);
13408  }
13409  return 0;
13410 
13411  case 'M':
13412  if (flags & ESCAPE_META) goto eof;
13413  if ((c = nextc(p)) != '-') {
13414  pushback(p, c);
13415  goto eof;
13416  }
13417  tokcopy(p, 3);
13418  flags |= ESCAPE_META;
13419  goto escaped;
13420 
13421  case 'C':
13422  if (flags & ESCAPE_CONTROL) goto eof;
13423  if ((c = nextc(p)) != '-') {
13424  pushback(p, c);
13425  goto eof;
13426  }
13427  tokcopy(p, 3);
13428  goto escaped;
13429 
13430  case 'c':
13431  if (flags & ESCAPE_CONTROL) goto eof;
13432  tokcopy(p, 2);
13433  flags |= ESCAPE_CONTROL;
13434  escaped:
13435  if ((c = nextc(p)) == '\\') {
13436  goto first;
13437  }
13438  else if (c == -1) goto eof;
13439  tokadd(p, c);
13440  return 0;
13441 
13442  eof:
13443  case -1:
13444  yyerror0("Invalid escape character syntax");
13445  token_flush(p);
13446  return -1;
13447 
13448  default:
13449  tokadd(p, '\\');
13450  tokadd(p, c);
13451  }
13452  return 0;
13453 }
13454 
13455 static int
13456 regx_options(struct parser_params *p)
13457 {
13458  int kcode = 0;
13459  int kopt = 0;
13460  int options = 0;
13461  int c, opt, kc;
13462 
13463  newtok(p);
13464  while (c = nextc(p), ISALPHA(c)) {
13465  if (c == 'o') {
13466  options |= RE_OPTION_ONCE;
13467  }
13468  else if (rb_char_to_option_kcode(c, &opt, &kc)) {
13469  if (kc >= 0) {
13470  if (kc != rb_ascii8bit_encindex()) kcode = c;
13471  kopt = opt;
13472  }
13473  else {
13474  options |= opt;
13475  }
13476  }
13477  else {
13478  tokadd(p, c);
13479  }
13480  }
13481  options |= kopt;
13482  pushback(p, c);
13483  if (toklen(p)) {
13484  YYLTYPE loc = RUBY_INIT_YYLLOC();
13485  tokfix(p);
13486  compile_error(p, "unknown regexp option%s - %*s",
13487  toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
13488  parser_show_error_line(p, &loc);
13489  }
13490  return options | RE_OPTION_ENCODING(kcode);
13491 }
13492 
13493 static int
13494 tokadd_mbchar(struct parser_params *p, int c)
13495 {
13496  int len = parser_precise_mbclen(p, p->lex.pcur-1);
13497  if (len < 0) return -1;
13498  tokadd(p, c);
13499  p->lex.pcur += --len;
13500  if (len > 0) tokcopy(p, len);
13501  return c;
13502 }
13503 
13504 static inline int
13505 simple_re_meta(int c)
13506 {
13507  switch (c) {
13508  case '$': case '*': case '+': case '.':
13509  case '?': case '^': case '|':
13510  case ')': case ']': case '}': case '>':
13511  return TRUE;
13512  default:
13513  return FALSE;
13514  }
13515 }
13516 
13517 static int
13518 parser_update_heredoc_indent(struct parser_params *p, int c)
13519 {
13520  if (p->heredoc_line_indent == -1) {
13521  if (c == '\n') p->heredoc_line_indent = 0;
13522  }
13523  else {
13524  if (c == ' ') {
13525  p->heredoc_line_indent++;
13526  return TRUE;
13527  }
13528  else if (c == '\t') {
13529  int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
13530  p->heredoc_line_indent = w * TAB_WIDTH;
13531  return TRUE;
13532  }
13533  else if (c != '\n') {
13534  if (p->heredoc_indent > p->heredoc_line_indent) {
13536  }
13537  p->heredoc_line_indent = -1;
13538  }
13539  }
13540  return FALSE;
13541 }
13542 
13543 static void
13544 parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
13545 {
13546  YYLTYPE loc = RUBY_INIT_YYLLOC();
13547  const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
13548  compile_error(p, "%s mixed within %s source", n1, n2);
13549  parser_show_error_line(p, &loc);
13550 }
13551 
13552 static void
13553 parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
13554 {
13555  const char *pos = p->lex.pcur;
13556  p->lex.pcur = beg;
13557  parser_mixed_error(p, enc1, enc2);
13558  p->lex.pcur = pos;
13559 }
13560 
13561 static int
13562 tokadd_string(struct parser_params *p,
13563  int func, int term, int paren, long *nest,
13564  rb_encoding **encp, rb_encoding **enc)
13565 {
13566  int c;
13567  bool erred = false;
13568 
13569 #define mixed_error(enc1, enc2) \
13570  (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
13571 #define mixed_escape(beg, enc1, enc2) \
13572  (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
13573 
13574  while ((c = nextc(p)) != -1) {
13575  if (p->heredoc_indent > 0) {
13576  parser_update_heredoc_indent(p, c);
13577  }
13578 
13579  if (paren && c == paren) {
13580  ++*nest;
13581  }
13582  else if (c == term) {
13583  if (!nest || !*nest) {
13584  pushback(p, c);
13585  break;
13586  }
13587  --*nest;
13588  }
13589  else if ((func & STR_FUNC_EXPAND) && c == '#' && p->lex.pcur < p->lex.pend) {
13590  int c2 = *p->lex.pcur;
13591  if (c2 == '$' || c2 == '@' || c2 == '{') {
13592  pushback(p, c);
13593  break;
13594  }
13595  }
13596  else if (c == '\\') {
13597  literal_flush(p, p->lex.pcur - 1);
13598  c = nextc(p);
13599  switch (c) {
13600  case '\n':
13601  if (func & STR_FUNC_QWORDS) break;
13602  if (func & STR_FUNC_EXPAND) {
13603  if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
13604  continue;
13605  if (c == term) {
13606  c = '\\';
13607  goto terminate;
13608  }
13609  }
13610  tokadd(p, '\\');
13611  break;
13612 
13613  case '\\':
13614  if (func & STR_FUNC_ESCAPE) tokadd(p, c);
13615  break;
13616 
13617  case 'u':
13618  if ((func & STR_FUNC_EXPAND) == 0) {
13619  tokadd(p, '\\');
13620  break;
13621  }
13622  tokadd_utf8(p, enc, term,
13623  func & STR_FUNC_SYMBOL,
13624  func & STR_FUNC_REGEXP);
13625  continue;
13626 
13627  default:
13628  if (c == -1) return -1;
13629  if (!ISASCII(c)) {
13630  if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
13631  goto non_ascii;
13632  }
13633  if (func & STR_FUNC_REGEXP) {
13634  if (c == term && !simple_re_meta(c)) {
13635  tokadd(p, c);
13636  continue;
13637  }
13638  pushback(p, c);
13639  if ((c = tokadd_escape(p, enc)) < 0)
13640  return -1;
13641  if (*enc && *enc != *encp) {
13642  mixed_escape(p->lex.ptok+2, *enc, *encp);
13643  }
13644  continue;
13645  }
13646  else if (func & STR_FUNC_EXPAND) {
13647  pushback(p, c);
13648  if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
13649  c = read_escape(p, 0, enc);
13650  }
13651  else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
13652  /* ignore backslashed spaces in %w */
13653  }
13654  else if (c != term && !(paren && c == paren)) {
13655  tokadd(p, '\\');
13656  pushback(p, c);
13657  continue;
13658  }
13659  }
13660  }
13661  else if (!parser_isascii(p)) {
13662  non_ascii:
13663  if (!*enc) {
13664  *enc = *encp;
13665  }
13666  else if (*enc != *encp) {
13667  mixed_error(*enc, *encp);
13668  continue;
13669  }
13670  if (tokadd_mbchar(p, c) == -1) return -1;
13671  continue;
13672  }
13673  else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
13674  pushback(p, c);
13675  break;
13676  }
13677  if (c & 0x80) {
13678  if (!*enc) {
13679  *enc = *encp;
13680  }
13681  else if (*enc != *encp) {
13682  mixed_error(*enc, *encp);
13683  continue;
13684  }
13685  }
13686  tokadd(p, c);
13687  }
13688  terminate:
13689  if (*enc) *encp = *enc;
13690  return c;
13691 }
13692 
13693 static inline rb_strterm_t *
13694 new_strterm(VALUE v1, VALUE v2, VALUE v3, VALUE v0)
13695 {
13696  return (rb_strterm_t*)rb_imemo_new(imemo_parser_strterm, v1, v2, v3, v0);
13697 }
13698 
13699 /* imemo_parser_strterm for literal */
13700 #define NEW_STRTERM(func, term, paren) \
13701  new_strterm((VALUE)(func), (VALUE)(paren), (VALUE)(term), 0)
13702 
13703 #ifdef RIPPER
13704 static void
13706 {
13707  VALUE content = yylval.val;
13708  if (!ripper_is_node_yylval(content))
13709  content = ripper_new_yylval(p, 0, 0, content);
13710  if (has_delayed_token(p)) {
13711  ptrdiff_t len = p->lex.pcur - p->lex.ptok;
13712  if (len > 0) {
13713  rb_enc_str_buf_cat(p->delayed.token, p->lex.ptok, len, enc);
13714  }
13716  p->lex.ptok = p->lex.pcur;
13717  RNODE(content)->nd_rval = yylval.val;
13718  }
13720  if (yylval.val != content)
13721  RNODE(content)->nd_rval = yylval.val;
13722  yylval.val = content;
13723 }
13724 #else
13725 #define flush_string_content(p, enc) ((void)(enc))
13726 #endif
13727 
13728 RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32];
13729 /* this can be shared with ripper, since it's independent from struct
13730  * parser_params. */
13731 #ifndef RIPPER
13732 #define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
13733 #define SPECIAL_PUNCT(idx) ( \
13734  BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
13735  BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
13736  BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
13737  BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
13738  BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
13739  BIT('0', idx))
13740 const unsigned int ruby_global_name_punct_bits[] = {
13741  SPECIAL_PUNCT(0),
13742  SPECIAL_PUNCT(1),
13743  SPECIAL_PUNCT(2),
13744 };
13745 #undef BIT
13746 #undef SPECIAL_PUNCT
13747 #endif
13748 
13749 static enum yytokentype
13750 parser_peek_variable_name(struct parser_params *p)
13751 {
13752  int c;
13753  const char *ptr = p->lex.pcur;
13754 
13755  if (ptr + 1 >= p->lex.pend) return 0;
13756  c = *ptr++;
13757  switch (c) {
13758  case '$':
13759  if ((c = *ptr) == '-') {
13760  if (++ptr >= p->lex.pend) return 0;
13761  c = *ptr;
13762  }
13763  else if (is_global_name_punct(c) || ISDIGIT(c)) {
13764  return tSTRING_DVAR;
13765  }
13766  break;
13767  case '@':
13768  if ((c = *ptr) == '@') {
13769  if (++ptr >= p->lex.pend) return 0;
13770  c = *ptr;
13771  }
13772  break;
13773  case '{':
13774  p->lex.pcur = ptr;
13775  p->command_start = TRUE;
13776  return tSTRING_DBEG;
13777  default:
13778  return 0;
13779  }
13780  if (!ISASCII(c) || c == '_' || ISALPHA(c))
13781  return tSTRING_DVAR;
13782  return 0;
13783 }
13784 
13785 #define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
13786 #define IS_END() IS_lex_state(EXPR_END_ANY)
13787 #define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
13788 #define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
13789 #define IS_LABEL_POSSIBLE() (\
13790  (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
13791  IS_ARG())
13792 #define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
13793 #define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
13794 
13795 static inline enum yytokentype
13796 parser_string_term(struct parser_params *p, int func)
13797 {
13798  p->lex.strterm = 0;
13799  if (func & STR_FUNC_REGEXP) {
13800  set_yylval_num(regx_options(p));
13802  SET_LEX_STATE(EXPR_END);
13803  return tREGEXP_END;
13804  }
13805  if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
13806  nextc(p);
13807  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
13808  return tLABEL_END;
13809  }
13810  SET_LEX_STATE(EXPR_END);
13811  return tSTRING_END;
13812 }
13813 
13814 static enum yytokentype
13815 parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
13816 {
13817  int func = (int)quote->u1.func;
13818  int term = (int)quote->u3.term;
13819  int paren = (int)quote->u2.paren;
13820  int c, space = 0;
13821  rb_encoding *enc = p->enc;
13822  rb_encoding *base_enc = 0;
13823  VALUE lit;
13824 
13825  if (func & STR_FUNC_TERM) {
13826  if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
13827  SET_LEX_STATE(EXPR_END);
13828  p->lex.strterm = 0;
13829  return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
13830  }
13831  c = nextc(p);
13832  if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
13833  do {c = nextc(p);} while (ISSPACE(c));
13834  space = 1;
13835  }
13836  if (func & STR_FUNC_LIST) {
13837  quote->u1.func &= ~STR_FUNC_LIST;
13838  space = 1;
13839  }
13840  if (c == term && !quote->u0.nest) {
13841  if (func & STR_FUNC_QWORDS) {
13842  quote->u1.func |= STR_FUNC_TERM;
13843  pushback(p, c); /* dispatch the term at tSTRING_END */
13844  add_delayed_token(p, p->lex.ptok, p->lex.pcur);
13845  return ' ';
13846  }
13847  return parser_string_term(p, func);
13848  }
13849  if (space) {
13850  pushback(p, c);
13851  add_delayed_token(p, p->lex.ptok, p->lex.pcur);
13852  return ' ';
13853  }
13854  newtok(p);
13855  if ((func & STR_FUNC_EXPAND) && c == '#') {
13856  int t = parser_peek_variable_name(p);
13857  if (t) return t;
13858  tokadd(p, '#');
13859  c = nextc(p);
13860  }
13861  pushback(p, c);
13862  if (tokadd_string(p, func, term, paren, &quote->u0.nest,
13863  &enc, &base_enc) == -1) {
13864  if (p->eofp) {
13865 #ifndef RIPPER
13866 # define unterminated_literal(mesg) yyerror0(mesg)
13867 #else
13868 # define unterminated_literal(mesg) compile_error(p, mesg)
13869 #endif
13870  literal_flush(p, p->lex.pcur);
13871  if (func & STR_FUNC_QWORDS) {
13872  /* no content to add, bailing out here */
13873  unterminated_literal("unterminated list meets end of file");
13874  p->lex.strterm = 0;
13875  return tSTRING_END;
13876  }
13877  if (func & STR_FUNC_REGEXP) {
13878  unterminated_literal("unterminated regexp meets end of file");
13879  }
13880  else {
13881  unterminated_literal("unterminated string meets end of file");
13882  }
13883  quote->u1.func |= STR_FUNC_TERM;
13884  }
13885  }
13886 
13887  tokfix(p);
13888  lit = STR_NEW3(tok(p), toklen(p), enc, func);
13889  set_yylval_str(lit);
13891 
13892  return tSTRING_CONTENT;
13893 }
13894 
13895 static enum yytokentype
13896 heredoc_identifier(struct parser_params *p)
13897 {
13898  /*
13899  * term_len is length of `<<"END"` except `END`,
13900  * in this case term_len is 4 (<, <, " and ").
13901  */
13902  long len, offset = p->lex.pcur - p->lex.pbeg;
13903  int c = nextc(p), term, func = 0, quote = 0;
13904  enum yytokentype token = tSTRING_BEG;
13905  int indent = 0;
13906 
13907  if (c == '-') {
13908  c = nextc(p);
13909  func = STR_FUNC_INDENT;
13910  offset++;
13911  }
13912  else if (c == '~') {
13913  c = nextc(p);
13914  func = STR_FUNC_INDENT;
13915  offset++;
13916  indent = INT_MAX;
13917  }
13918  switch (c) {
13919  case '\'':
13920  func |= str_squote; goto quoted;
13921  case '"':
13922  func |= str_dquote; goto quoted;
13923  case '`':
13924  token = tXSTRING_BEG;
13925  func |= str_xquote; goto quoted;
13926 
13927  quoted:
13928  quote++;
13929  offset++;
13930  term = c;
13931  len = 0;
13932  while ((c = nextc(p)) != term) {
13933  if (c == -1 || c == '\r' || c == '\n') {
13934  yyerror(NULL, p, "unterminated here document identifier");
13935  return -1;
13936  }
13937  }
13938  break;
13939 
13940  default:
13941  if (!parser_is_identchar(p)) {
13942  pushback(p, c);
13943  if (func & STR_FUNC_INDENT) {
13944  pushback(p, indent > 0 ? '~' : '-');
13945  }
13946  return 0;
13947  }
13948  func |= str_dquote;
13949  do {
13950  int n = parser_precise_mbclen(p, p->lex.pcur-1);
13951  if (n < 0) return 0;
13952  p->lex.pcur += --n;
13953  } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
13954  pushback(p, c);
13955  break;
13956  }
13957 
13958  len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
13959  if ((unsigned long)len >= HERETERM_LENGTH_MAX)
13960  yyerror(NULL, p, "too long here document identifier");
13962  lex_goto_eol(p);
13963 
13964  p->lex.strterm = new_strterm(0, 0, 0, p->lex.lastline);
13966  rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
13967  here->offset = offset;
13968  here->sourceline = p->ruby_sourceline;
13969  here->length = (int)len;
13970  here->quote = quote;
13971  here->func = func;
13972 
13973  token_flush(p);
13974  p->heredoc_indent = indent;
13975  p->heredoc_line_indent = 0;
13976  return token;
13977 }
13978 
13979 static void
13980 heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
13981 {
13982  VALUE line;
13983 
13984  p->lex.strterm = 0;
13985  line = here->lastline;
13986  p->lex.lastline = line;
13987  p->lex.pbeg = RSTRING_PTR(line);
13988  p->lex.pend = p->lex.pbeg + RSTRING_LEN(line);
13989  p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
13990  p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
13991  p->heredoc_end = p->ruby_sourceline;
13992  p->ruby_sourceline = (int)here->sourceline;
13993  if (p->eofp) p->lex.nextline = Qnil;
13994  p->eofp = 0;
13995 }
13996 
13997 static int
13998 dedent_string(VALUE string, int width)
13999 {
14000  char *str;
14001  long len;
14002  int i, col = 0;
14003 
14004  RSTRING_GETMEM(string, str, len);
14005  for (i = 0; i < len && col < width; i++) {
14006  if (str[i] == ' ') {
14007  col++;
14008  }
14009  else if (str[i] == '\t') {
14010  int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
14011  if (n > width) break;
14012  col = n;
14013  }
14014  else {
14015  break;
14016  }
14017  }
14018  if (!i) return 0;
14019  rb_str_modify(string);
14020  str = RSTRING_PTR(string);
14021  if (RSTRING_LEN(string) != len)
14022  rb_fatal("literal string changed: %+"PRIsVALUE, string);
14023  MEMMOVE(str, str + i, char, len - i);
14024  rb_str_set_len(string, len - i);
14025  return i;
14026 }
14027 
14028 #ifndef RIPPER
14029 static NODE *
14030 heredoc_dedent(struct parser_params *p, NODE *root)
14031 {
14032  NODE *node, *str_node, *prev_node;
14033  int indent = p->heredoc_indent;
14034  VALUE prev_lit = 0;
14035 
14036  if (indent <= 0) return root;
14037  p->heredoc_indent = 0;
14038  if (!root) return root;
14039 
14040  prev_node = node = str_node = root;
14041  if (nd_type(root) == NODE_LIST) str_node = root->nd_head;
14042 
14043  while (str_node) {
14044  VALUE lit = str_node->nd_lit;
14045  if (str_node->flags & NODE_FL_NEWLINE) {
14046  dedent_string(lit, indent);
14047  }
14048  if (!prev_lit) {
14049  prev_lit = lit;
14050  }
14051  else if (!literal_concat0(p, prev_lit, lit)) {
14052  return 0;
14053  }
14054  else {
14055  NODE *end = node->nd_end;
14056  node = prev_node->nd_next = node->nd_next;
14057  if (!node) {
14058  if (nd_type(prev_node) == NODE_DSTR)
14059  nd_set_type(prev_node, NODE_STR);
14060  break;
14061  }
14062  node->nd_end = end;
14063  goto next_str;
14064  }
14065 
14066  str_node = 0;
14067  while ((node = (prev_node = node)->nd_next) != 0) {
14068  next_str:
14069  if (nd_type(node) != NODE_LIST) break;
14070  if ((str_node = node->nd_head) != 0) {
14071  enum node_type type = nd_type(str_node);
14072  if (type == NODE_STR || type == NODE_DSTR) break;
14073  prev_lit = 0;
14074  str_node = 0;
14075  }
14076  }
14077  }
14078  return root;
14079 }
14080 #else /* RIPPER */
14081 static VALUE
14082 heredoc_dedent(struct parser_params *p, VALUE array)
14083 {
14084  int indent = p->heredoc_indent;
14085 
14086  if (indent <= 0) return array;
14087  p->heredoc_indent = 0;
14088  dispatch2(heredoc_dedent, array, INT2NUM(indent));
14089  return array;
14090 }
14091 
14092 /*
14093  * call-seq:
14094  * Ripper.dedent_string(input, width) -> Integer
14095  *
14096  * USE OF RIPPER LIBRARY ONLY.
14097  *
14098  * Strips up to +width+ leading whitespaces from +input+,
14099  * and returns the stripped column width.
14100  */
14101 static VALUE
14102 parser_dedent_string(VALUE self, VALUE input, VALUE width)
14103 {
14104  int wid, col;
14105 
14106  StringValue(input);
14107  wid = NUM2UINT(width);
14108  col = dedent_string(input, wid);
14109  return INT2NUM(col);
14110 }
14111 #endif
14112 
14113 static int
14114 whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
14115 {
14116  const char *ptr = p->lex.pbeg;
14117  long n;
14118 
14119  if (indent) {
14120  while (*ptr && ISSPACE(*ptr)) ptr++;
14121  }
14122  n = p->lex.pend - (ptr + len);
14123  if (n < 0) return FALSE;
14124  if (n > 0 && ptr[len] != '\n') {
14125  if (ptr[len] != '\r') return FALSE;
14126  if (n <= 1 || ptr[len+1] != '\n') return FALSE;
14127  }
14128  return strncmp(eos, ptr, len) == 0;
14129 }
14130 
14131 static int
14132 word_match_p(struct parser_params *p, const char *word, long len)
14133 {
14134  if (strncmp(p->lex.pcur, word, len)) return 0;
14135  if (p->lex.pcur + len == p->lex.pend) return 1;
14136  int c = (unsigned char)p->lex.pcur[len];
14137  if (ISSPACE(c)) return 1;
14138  switch (c) {
14139  case '\0': case '\004': case '\032': return 1;
14140  }
14141  return 0;
14142 }
14143 
14144 #define NUM_SUFFIX_R (1<<0)
14145 #define NUM_SUFFIX_I (1<<1)
14146 #define NUM_SUFFIX_ALL 3
14147 
14148 static int
14149 number_literal_suffix(struct parser_params *p, int mask)
14150 {
14151  int c, result = 0;
14152  const char *lastp = p->lex.pcur;
14153 
14154  while ((c = nextc(p)) != -1) {
14155  if ((mask & NUM_SUFFIX_I) && c == 'i') {
14156  result |= (mask & NUM_SUFFIX_I);
14157  mask &= ~NUM_SUFFIX_I;
14158  /* r after i, rational of complex is disallowed */
14159  mask &= ~NUM_SUFFIX_R;
14160  continue;
14161  }
14162  if ((mask & NUM_SUFFIX_R) && c == 'r') {
14163  result |= (mask & NUM_SUFFIX_R);
14164  mask &= ~NUM_SUFFIX_R;
14165  continue;
14166  }
14167  if (!ISASCII(c) || ISALPHA(c) || c == '_') {
14168  p->lex.pcur = lastp;
14169  literal_flush(p, p->lex.pcur);
14170  return 0;
14171  }
14172  pushback(p, c);
14173  break;
14174  }
14175  return result;
14176 }
14177 
14178 static enum yytokentype
14179 set_number_literal(struct parser_params *p, VALUE v,
14180  enum yytokentype type, int suffix)
14181 {
14182  if (suffix & NUM_SUFFIX_I) {
14183  v = rb_complex_raw(INT2FIX(0), v);
14184  type = tIMAGINARY;
14185  }
14187  SET_LEX_STATE(EXPR_END);
14188  return type;
14189 }
14190 
14191 static enum yytokentype
14192 set_integer_literal(struct parser_params *p, VALUE v, int suffix)
14193 {
14194  enum yytokentype type = tINTEGER;
14195  if (suffix & NUM_SUFFIX_R) {
14196  v = rb_rational_raw1(v);
14197  type = tRATIONAL;
14198  }
14199  return set_number_literal(p, v, type, suffix);
14200 }
14201 
14202 #ifdef RIPPER
14203 static void
14205 {
14206  VALUE str;
14207  if (has_delayed_token(p))
14209  str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
14210  ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
14211  lex_goto_eol(p);
14212  token_flush(p);
14213 }
14214 
14215 #else
14216 #define dispatch_heredoc_end(p) ((void)0)
14217 #endif
14218 
14219 static enum yytokentype
14220 here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
14221 {
14222  int c, func, indent = 0;
14223  const char *eos, *ptr, *ptr_end;
14224  long len;
14225  VALUE str = 0;
14226  rb_encoding *enc = p->enc;
14227  rb_encoding *base_enc = 0;
14228  int bol;
14229 
14230  eos = RSTRING_PTR(here->lastline) + here->offset;
14231  len = here->length;
14232  indent = (func = here->func) & STR_FUNC_INDENT;
14233 
14234  if ((c = nextc(p)) == -1) {
14235  error:
14236 #ifdef RIPPER
14237  if (!has_delayed_token(p)) {
14239  }
14240  else {
14241  if ((len = p->lex.pcur - p->lex.ptok) > 0) {
14242  if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
14243  int cr = ENC_CODERANGE_UNKNOWN;
14245  if (cr != ENC_CODERANGE_7BIT &&
14246  p->enc == rb_usascii_encoding() &&
14247  enc != rb_utf8_encoding()) {
14249  }
14250  }
14251  rb_enc_str_buf_cat(p->delayed.token, p->lex.ptok, len, enc);
14252  }
14254  }
14255  lex_goto_eol(p);
14256 #endif
14257  heredoc_restore(p, &p->lex.strterm->u.heredoc);
14258  compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
14259  (int)len, eos);
14260  token_flush(p);
14261  p->lex.strterm = 0;
14262  SET_LEX_STATE(EXPR_END);
14263  return tSTRING_END;
14264  }
14265  bol = was_bol(p);
14266  if (!bol) {
14267  /* not beginning of line, cannot be the terminator */
14268  }
14269  else if (p->heredoc_line_indent == -1) {
14270  /* `heredoc_line_indent == -1` means
14271  * - "after an interpolation in the same line", or
14272  * - "in a continuing line"
14273  */
14274  p->heredoc_line_indent = 0;
14275  }
14276  else if (whole_match_p(p, eos, len, indent)) {
14278  restore:
14279  heredoc_restore(p, &p->lex.strterm->u.heredoc);
14280  token_flush(p);
14281  p->lex.strterm = 0;
14282  SET_LEX_STATE(EXPR_END);
14283  return tSTRING_END;
14284  }
14285 
14286  if (!(func & STR_FUNC_EXPAND)) {
14287  do {
14288  ptr = RSTRING_PTR(p->lex.lastline);
14289  ptr_end = p->lex.pend;
14290  if (ptr_end > ptr) {
14291  switch (ptr_end[-1]) {
14292  case '\n':
14293  if (--ptr_end == ptr || ptr_end[-1] != '\r') {
14294  ptr_end++;
14295  break;
14296  }
14297  case '\r':
14298  --ptr_end;
14299  }
14300  }
14301 
14302  if (p->heredoc_indent > 0) {
14303  long i = 0;
14304  while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
14305  i++;
14306  p->heredoc_line_indent = 0;
14307  }
14308 
14309  if (str)
14310  rb_str_cat(str, ptr, ptr_end - ptr);
14311  else
14312  str = STR_NEW(ptr, ptr_end - ptr);
14313  if (ptr_end < p->lex.pend) rb_str_cat(str, "\n", 1);
14314  lex_goto_eol(p);
14315  if (p->heredoc_indent > 0) {
14316  goto flush_str;
14317  }
14318  if (nextc(p) == -1) {
14319  if (str) {
14320  str = 0;
14321  }
14322  goto error;
14323  }
14324  } while (!whole_match_p(p, eos, len, indent));
14325  }
14326  else {
14327  /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
14328  newtok(p);
14329  if (c == '#') {
14330  int t = parser_peek_variable_name(p);
14331  if (p->heredoc_line_indent != -1) {
14332  if (p->heredoc_indent > p->heredoc_line_indent) {
14334  }
14335  p->heredoc_line_indent = -1;
14336  }
14337  if (t) return t;
14338  tokadd(p, '#');
14339  c = nextc(p);
14340  }
14341  do {
14342  pushback(p, c);
14343  enc = p->enc;
14344  if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
14345  if (p->eofp) goto error;
14346  goto restore;
14347  }
14348  if (c != '\n') {
14349  if (c == '\\') p->heredoc_line_indent = -1;
14350  flush:
14351  str = STR_NEW3(tok(p), toklen(p), enc, func);
14352  flush_str:
14354 #ifndef RIPPER
14355  if (bol) yylval.node->flags |= NODE_FL_NEWLINE;
14356 #endif
14358  return tSTRING_CONTENT;
14359  }
14360  tokadd(p, nextc(p));
14361  if (p->heredoc_indent > 0) {
14362  lex_goto_eol(p);
14363  goto flush;
14364  }
14365  /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
14366  if ((c = nextc(p)) == -1) goto error;
14367  } while (!whole_match_p(p, eos, len, indent));
14368  str = STR_NEW3(tok(p), toklen(p), enc, func);
14369  }
14371 #ifdef RIPPER
14372  str = ripper_new_yylval(p, ripper_token2eventid(tSTRING_CONTENT),
14373  yylval.val, str);
14374 #endif
14375  heredoc_restore(p, &p->lex.strterm->u.heredoc);
14376  token_flush(p);
14377  p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
14379 #ifndef RIPPER
14380  if (bol) yylval.node->flags |= NODE_FL_NEWLINE;
14381 #endif
14382  return tSTRING_CONTENT;
14383 }
14384 
14385 #include "lex.c"
14386 
14387 static int
14388 arg_ambiguous(struct parser_params *p, char c)
14389 {
14390 #ifndef RIPPER
14391  rb_warning1("ambiguous first argument; put parentheses or a space even after `%c' operator", WARN_I(c));
14392 #else
14393  dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
14394 #endif
14395  return TRUE;
14396 }
14397 
14398 static ID
14399 formal_argument(struct parser_params *p, ID lhs)
14400 {
14401  switch (id_type(lhs)) {
14402  case ID_LOCAL:
14403  break;
14404 #ifndef RIPPER
14405  case ID_CONST:
14406  yyerror0("formal argument cannot be a constant");
14407  return 0;
14408  case ID_INSTANCE:
14409  yyerror0("formal argument cannot be an instance variable");
14410  return 0;
14411  case ID_GLOBAL:
14412  yyerror0("formal argument cannot be a global variable");
14413  return 0;
14414  case ID_CLASS:
14415  yyerror0("formal argument cannot be a class variable");
14416  return 0;
14417  default:
14418  yyerror0("formal argument must be local variable");
14419  return 0;
14420 #else
14421  default:
14422  lhs = dispatch1(param_error, lhs);
14423  ripper_error(p);
14424  return 0;
14425 #endif
14426  }
14427  shadowing_lvar(p, lhs);
14428  return lhs;
14429 }
14430 
14431 static int
14432 lvar_defined(struct parser_params *p, ID id)
14433 {
14434  return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
14435 }
14436 
14437 /* emacsen -*- hack */
14438 static long
14439 parser_encode_length(struct parser_params *p, const char *name, long len)
14440 {
14441  long nlen;
14442 
14443  if (len > 5 && name[nlen = len - 5] == '-') {
14444  if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
14445  return nlen;
14446  }
14447  if (len > 4 && name[nlen = len - 4] == '-') {
14448  if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
14449  return nlen;
14450  if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
14451  !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
14452  /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
14453  return nlen;
14454  }
14455  return len;
14456 }
14457 
14458 static void
14459 parser_set_encode(struct parser_params *p, const char *name)
14460 {
14461  int idx = rb_enc_find_index(name);
14462  rb_encoding *enc;
14463  VALUE excargs[3];
14464 
14465  if (idx < 0) {
14466  excargs[1] = rb_sprintf("unknown encoding name: %s", name);
14467  error:
14468  excargs[0] = rb_eArgError;
14469  excargs[2] = rb_make_backtrace();
14471  rb_exc_raise(rb_make_exception(3, excargs));
14472  }
14473  enc = rb_enc_from_index(idx);
14474  if (!rb_enc_asciicompat(enc)) {
14475  excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
14476  goto error;
14477  }
14478  p->enc = enc;
14479 #ifndef RIPPER
14480  if (p->debug_lines) {
14481  VALUE lines = p->debug_lines;
14482  long i, n = RARRAY_LEN(lines);
14483  for (i = 0; i < n; ++i) {
14484  rb_enc_associate_index(RARRAY_AREF(lines, i), idx);
14485  }
14486  }
14487 #endif
14488 }
14489 
14490 static int
14491 comment_at_top(struct parser_params *p)
14492 {
14493  const char *ptr = p->lex.pbeg, *ptr_end = p->lex.pcur - 1;
14494  if (p->line_count != (p->has_shebang ? 2 : 1)) return 0;
14495  while (ptr < ptr_end) {
14496  if (!ISSPACE(*ptr)) return 0;
14497  ptr++;
14498  }
14499  return 1;
14500 }
14501 
14502 typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
14503 typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
14504 
14505 static void
14506 magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
14507 {
14508  if (!comment_at_top(p)) {
14509  return;
14510  }
14511  parser_set_encode(p, val);
14512 }
14513 
14514 static int
14515 parser_get_bool(struct parser_params *p, const char *name, const char *val)
14516 {
14517  switch (*val) {
14518  case 't': case 'T':
14519  if (strcasecmp(val, "true") == 0) {
14520  return TRUE;
14521  }
14522  break;
14523  case 'f': case 'F':
14524  if (strcasecmp(val, "false") == 0) {
14525  return FALSE;
14526  }
14527  break;
14528  }
14529  rb_compile_warning(p->ruby_sourcefile, p->ruby_sourceline, "invalid value for %s: %s", name, val);
14530  return -1;
14531 }
14532 
14533 static void
14534 parser_set_token_info(struct parser_params *p, const char *name, const char *val)
14535 {
14536  int b = parser_get_bool(p, name, val);
14537  if (b >= 0) p->token_info_enabled = b;
14538 }
14539 
14540 static void
14541 parser_set_compile_option_flag(struct parser_params *p, const char *name, const char *val)
14542 {
14543  int b;
14544 
14545  if (p->token_seen) {
14546  rb_warning1("`%s' is ignored after any tokens", WARN_S(name));
14547  return;
14548  }
14549 
14550  b = parser_get_bool(p, name, val);
14551  if (b < 0) return;
14552 
14553  if (!p->compile_option)
14556  (b ? Qtrue : Qfalse));
14557 }
14558 
14559 # if WARN_PAST_SCOPE
14560 static void
14561 parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
14562 {
14563  int b = parser_get_bool(p, name, val);
14564  if (b >= 0) p->past_scope_enabled = b;
14565 }
14566 # endif
14567 
14568 struct magic_comment {
14569  const char *name;
14572 };
14573 
14574 static const struct magic_comment magic_comments[] = {
14575  {"coding", magic_comment_encoding, parser_encode_length},
14576  {"encoding", magic_comment_encoding, parser_encode_length},
14577  {"frozen_string_literal", parser_set_compile_option_flag},
14578  {"warn_indent", parser_set_token_info},
14579 # if WARN_PAST_SCOPE
14580  {"warn_past_scope", parser_set_past_scope},
14581 # endif
14582 };
14583 
14584 static const char *
14585 magic_comment_marker(const char *str, long len)
14586 {
14587  long i = 2;
14588 
14589  while (i < len) {
14590  switch (str[i]) {
14591  case '-':
14592  if (str[i-1] == '*' && str[i-2] == '-') {
14593  return str + i + 1;
14594  }
14595  i += 2;
14596  break;
14597  case '*':
14598  if (i + 1 >= len) return 0;
14599  if (str[i+1] != '-') {
14600  i += 4;
14601  }
14602  else if (str[i-1] != '-') {
14603  i += 2;
14604  }
14605  else {
14606  return str + i + 2;
14607  }
14608  break;
14609  default:
14610  i += 3;
14611  break;
14612  }
14613  }
14614  return 0;
14615 }
14616 
14617 static int
14618 parser_magic_comment(struct parser_params *p, const char *str, long len)
14619 {
14620  int indicator = 0;
14621  VALUE name = 0, val = 0;
14622  const char *beg, *end, *vbeg, *vend;
14623 #define str_copy(_s, _p, _n) ((_s) \
14624  ? (void)(rb_str_resize((_s), (_n)), \
14625  MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
14626  : (void)((_s) = STR_NEW((_p), (_n))))
14627 
14628  if (len <= 7) return FALSE;
14629  if (!!(beg = magic_comment_marker(str, len))) {
14630  if (!(end = magic_comment_marker(beg, str + len - beg)))
14631  return FALSE;
14632  indicator = TRUE;
14633  str = beg;
14634  len = end - beg - 3;
14635  }
14636 
14637  /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
14638  while (len > 0) {
14639  const struct magic_comment *mc = magic_comments;
14640  char *s;
14641  int i;
14642  long n = 0;
14643 
14644  for (; len > 0 && *str; str++, --len) {
14645  switch (*str) {
14646  case '\'': case '"': case ':': case ';':
14647  continue;
14648  }
14649  if (!ISSPACE(*str)) break;
14650  }
14651  for (beg = str; len > 0; str++, --len) {
14652  switch (*str) {
14653  case '\'': case '"': case ':': case ';':
14654  break;
14655  default:
14656  if (ISSPACE(*str)) break;
14657  continue;
14658  }
14659  break;
14660  }
14661  for (end = str; len > 0 && ISSPACE(*str); str++, --len);
14662  if (!len) break;
14663  if (*str != ':') {
14664  if (!indicator) return FALSE;
14665  continue;
14666  }
14667 
14668  do str++; while (--len > 0 && ISSPACE(*str));
14669  if (!len) break;
14670  if (*str == '"') {
14671  for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
14672  if (*str == '\\') {
14673  --len;
14674  ++str;
14675  }
14676  }
14677  vend = str;
14678  if (len) {
14679  --len;
14680  ++str;
14681  }
14682  }
14683  else {
14684  for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
14685  vend = str;
14686  }
14687  if (indicator) {
14688  while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
14689  }
14690  else {
14691  while (len > 0 && (ISSPACE(*str))) --len, str++;
14692  if (len) return FALSE;
14693  }
14694 
14695  n = end - beg;
14696  str_copy(name, beg, n);
14697  s = RSTRING_PTR(name);
14698  for (i = 0; i < n; ++i) {
14699  if (s[i] == '-') s[i] = '_';
14700  }
14701  do {
14702  if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
14703  n = vend - vbeg;
14704  if (mc->length) {
14705  n = (*mc->length)(p, vbeg, n);
14706  }
14707  str_copy(val, vbeg, n);
14708  (*mc->func)(p, mc->name, RSTRING_PTR(val));
14709  break;
14710  }
14711  } while (++mc < magic_comments + numberof(magic_comments));
14712 #ifdef RIPPER
14713  str_copy(val, vbeg, vend - vbeg);
14714  dispatch2(magic_comment, name, val);
14715 #endif
14716  }
14717 
14718  return TRUE;
14719 }
14720 
14721 static void
14722 set_file_encoding(struct parser_params *p, const char *str, const char *send)
14723 {
14724  int sep = 0;
14725  const char *beg = str;
14726  VALUE s;
14727 
14728  for (;;) {
14729  if (send - str <= 6) return;
14730  switch (str[6]) {
14731  case 'C': case 'c': str += 6; continue;
14732  case 'O': case 'o': str += 5; continue;
14733  case 'D': case 'd': str += 4; continue;
14734  case 'I': case 'i': str += 3; continue;
14735  case 'N': case 'n': str += 2; continue;
14736  case 'G': case 'g': str += 1; continue;
14737  case '=': case ':':
14738  sep = 1;
14739  str += 6;
14740  break;
14741  default:
14742  str += 6;
14743  if (ISSPACE(*str)) break;
14744  continue;
14745  }
14746  if (STRNCASECMP(str-6, "coding", 6) == 0) break;
14747  }
14748  for (;;) {
14749  do {
14750  if (++str >= send) return;
14751  } while (ISSPACE(*str));
14752  if (sep) break;
14753  if (*str != '=' && *str != ':') return;
14754  sep = 1;
14755  str++;
14756  }
14757  beg = str;
14758  while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
14759  s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
14760  parser_set_encode(p, RSTRING_PTR(s));
14761  rb_str_resize(s, 0);
14762 }
14763 
14764 static void
14765 parser_prepare(struct parser_params *p)
14766 {
14767  int c = nextc(p);
14769  switch (c) {
14770  case '#':
14771  if (peek(p, '!')) p->has_shebang = 1;
14772  break;
14773  case 0xef: /* UTF-8 BOM marker */
14774  if (p->lex.pend - p->lex.pcur >= 2 &&
14775  (unsigned char)p->lex.pcur[0] == 0xbb &&
14776  (unsigned char)p->lex.pcur[1] == 0xbf) {
14777  p->enc = rb_utf8_encoding();
14778  p->lex.pcur += 2;
14779  p->lex.pbeg = p->lex.pcur;
14780  return;
14781  }
14782  break;
14783  case EOF:
14784  return;
14785  }
14786  pushback(p, c);
14787  p->enc = rb_enc_get(p->lex.lastline);
14788 }
14789 
14790 #ifndef RIPPER
14791 #define ambiguous_operator(tok, op, syn) ( \
14792  rb_warning0("`"op"' after local variable or literal is interpreted as binary operator"), \
14793  rb_warning0("even though it seems like "syn""))
14794 #else
14795 #define ambiguous_operator(tok, op, syn) \
14796  dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
14797 #endif
14798 #define warn_balanced(tok, op, syn) ((void) \
14799  (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
14800  space_seen && !ISSPACE(c) && \
14801  (ambiguous_operator(tok, op, syn), 0)), \
14802  (enum yytokentype)(tok))
14803 
14804 static VALUE
14805 parse_rational(struct parser_params *p, char *str, int len, int seen_point)
14806 {
14807  VALUE v;
14808  char *point = &str[seen_point];
14809  size_t fraclen = len-seen_point-1;
14810  memmove(point, point+1, fraclen+1);
14811  v = rb_cstr_to_inum(str, 10, FALSE);
14812  return rb_rational_new(v, rb_int_positive_pow(10, fraclen));
14813 }
14814 
14815 static enum yytokentype
14816 no_digits(struct parser_params *p)
14817 {
14818  yyerror0("numeric literal without digits");
14819  if (peek(p, '_')) nextc(p);
14820  /* dummy 0, for tUMINUS_NUM at numeric */
14821  return set_integer_literal(p, INT2FIX(0), 0);
14822 }
14823 
14824 static enum yytokentype
14825 parse_numeric(struct parser_params *p, int c)
14826 {
14827  int is_float, seen_point, seen_e, nondigit;
14828  int suffix;
14829 
14830  is_float = seen_point = seen_e = nondigit = 0;
14831  SET_LEX_STATE(EXPR_END);
14832  newtok(p);
14833  if (c == '-' || c == '+') {
14834  tokadd(p, c);
14835  c = nextc(p);
14836  }
14837  if (c == '0') {
14838  int start = toklen(p);
14839  c = nextc(p);
14840  if (c == 'x' || c == 'X') {
14841  /* hexadecimal */
14842  c = nextc(p);
14843  if (c != -1 && ISXDIGIT(c)) {
14844  do {
14845  if (c == '_') {
14846  if (nondigit) break;
14847  nondigit = c;
14848  continue;
14849  }
14850  if (!ISXDIGIT(c)) break;
14851  nondigit = 0;
14852  tokadd(p, c);
14853  } while ((c = nextc(p)) != -1);
14854  }
14855  pushback(p, c);
14856  tokfix(p);
14857  if (toklen(p) == start) {
14858  return no_digits(p);
14859  }
14860  else if (nondigit) goto trailing_uc;
14861  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
14862  return set_integer_literal(p, rb_cstr_to_inum(tok(p), 16, FALSE), suffix);
14863  }
14864  if (c == 'b' || c == 'B') {
14865  /* binary */
14866  c = nextc(p);
14867  if (c == '0' || c == '1') {
14868  do {
14869  if (c == '_') {
14870  if (nondigit) break;
14871  nondigit = c;
14872  continue;
14873  }
14874  if (c != '0' && c != '1') break;
14875  nondigit = 0;
14876  tokadd(p, c);
14877  } while ((c = nextc(p)) != -1);
14878  }
14879  pushback(p, c);
14880  tokfix(p);
14881  if (toklen(p) == start) {
14882  return no_digits(p);
14883  }
14884  else if (nondigit) goto trailing_uc;
14885  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
14886  return set_integer_literal(p, rb_cstr_to_inum(tok(p), 2, FALSE), suffix);
14887  }
14888  if (c == 'd' || c == 'D') {
14889  /* decimal */
14890  c = nextc(p);
14891  if (c != -1 && ISDIGIT(c)) {
14892  do {
14893  if (c == '_') {
14894  if (nondigit) break;
14895  nondigit = c;
14896  continue;
14897  }
14898  if (!ISDIGIT(c)) break;
14899  nondigit = 0;
14900  tokadd(p, c);
14901  } while ((c = nextc(p)) != -1);
14902  }
14903  pushback(p, c);
14904  tokfix(p);
14905  if (toklen(p) == start) {
14906  return no_digits(p);
14907  }
14908  else if (nondigit) goto trailing_uc;
14909  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
14910  return set_integer_literal(p, rb_cstr_to_inum(tok(p), 10, FALSE), suffix);
14911  }
14912  if (c == '_') {
14913  /* 0_0 */
14914  goto octal_number;
14915  }
14916  if (c == 'o' || c == 'O') {
14917  /* prefixed octal */
14918  c = nextc(p);
14919  if (c == -1 || c == '_' || !ISDIGIT(c)) {
14920  return no_digits(p);
14921  }
14922  }
14923  if (c >= '0' && c <= '7') {
14924  /* octal */
14925  octal_number:
14926  do {
14927  if (c == '_') {
14928  if (nondigit) break;
14929  nondigit = c;
14930  continue;
14931  }
14932  if (c < '0' || c > '9') break;
14933  if (c > '7') goto invalid_octal;
14934  nondigit = 0;
14935  tokadd(p, c);
14936  } while ((c = nextc(p)) != -1);
14937  if (toklen(p) > start) {
14938  pushback(p, c);
14939  tokfix(p);
14940  if (nondigit) goto trailing_uc;
14941  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
14942  return set_integer_literal(p, rb_cstr_to_inum(tok(p), 8, FALSE), suffix);
14943  }
14944  if (nondigit) {
14945  pushback(p, c);
14946  goto trailing_uc;
14947  }
14948  }
14949  if (c > '7' && c <= '9') {
14950  invalid_octal:
14951  yyerror0("Invalid octal digit");
14952  }
14953  else if (c == '.' || c == 'e' || c == 'E') {
14954  tokadd(p, '0');
14955  }
14956  else {
14957  pushback(p, c);
14958  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
14959  return set_integer_literal(p, INT2FIX(0), suffix);
14960  }
14961  }
14962 
14963  for (;;) {
14964  switch (c) {
14965  case '0': case '1': case '2': case '3': case '4':
14966  case '5': case '6': case '7': case '8': case '9':
14967  nondigit = 0;
14968  tokadd(p, c);
14969  break;
14970 
14971  case '.':
14972  if (nondigit) goto trailing_uc;
14973  if (seen_point || seen_e) {
14974  goto decode_num;
14975  }
14976  else {
14977  int c0 = nextc(p);
14978  if (c0 == -1 || !ISDIGIT(c0)) {
14979  pushback(p, c0);
14980  goto decode_num;
14981  }
14982  c = c0;
14983  }
14984  seen_point = toklen(p);
14985  tokadd(p, '.');
14986  tokadd(p, c);
14987  is_float++;
14988  nondigit = 0;
14989  break;
14990 
14991  case 'e':
14992  case 'E':
14993  if (nondigit) {
14994  pushback(p, c);
14995  c = nondigit;
14996  goto decode_num;
14997  }
14998  if (seen_e) {
14999  goto decode_num;
15000  }
15001  nondigit = c;
15002  c = nextc(p);
15003  if (c != '-' && c != '+' && !ISDIGIT(c)) {
15004  pushback(p, c);
15005  nondigit = 0;
15006  goto decode_num;
15007  }
15008  tokadd(p, nondigit);
15009  seen_e++;
15010  is_float++;
15011  tokadd(p, c);
15012  nondigit = (c == '-' || c == '+') ? c : 0;
15013  break;
15014 
15015  case '_': /* `_' in number just ignored */
15016  if (nondigit) goto decode_num;
15017  nondigit = c;
15018  break;
15019 
15020  default:
15021  goto decode_num;
15022  }
15023  c = nextc(p);
15024  }
15025 
15026  decode_num:
15027  pushback(p, c);
15028  if (nondigit) {
15029  trailing_uc:
15030  literal_flush(p, p->lex.pcur - 1);
15031  YYLTYPE loc = RUBY_INIT_YYLLOC();
15032  compile_error(p, "trailing `%c' in number", nondigit);
15033  parser_show_error_line(p, &loc);
15034  }
15035  tokfix(p);
15036  if (is_float) {
15037  enum yytokentype type = tFLOAT;
15038  VALUE v;
15039 
15040  suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
15041  if (suffix & NUM_SUFFIX_R) {
15042  type = tRATIONAL;
15043  v = parse_rational(p, tok(p), toklen(p), seen_point);
15044  }
15045  else {
15046  double d = strtod(tok(p), 0);
15047  if (errno == ERANGE) {
15048  rb_warning1("Float %s out of range", WARN_S(tok(p)));
15049  errno = 0;
15050  }
15051  v = DBL2NUM(d);
15052  }
15053  return set_number_literal(p, v, type, suffix);
15054  }
15055  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
15056  return set_integer_literal(p, rb_cstr_to_inum(tok(p), 10, FALSE), suffix);
15057 }
15058 
15059 static enum yytokentype
15060 parse_qmark(struct parser_params *p, int space_seen)
15061 {
15062  rb_encoding *enc;
15063  register int c;
15064  VALUE lit;
15065 
15066  if (IS_END()) {
15068  return '?';
15069  }
15070  c = nextc(p);
15071  if (c == -1) {
15072  compile_error(p, "incomplete character syntax");
15073  return 0;
15074  }
15075  if (rb_enc_isspace(c, p->enc)) {
15076  if (!IS_ARG()) {
15077  int c2 = escaped_control_code(c);
15078  if (c2) {
15079  WARN_SPACE_CHAR(c2, "?");
15080  }
15081  }
15082  ternary:
15083  pushback(p, c);
15085  return '?';
15086  }
15087  newtok(p);
15088  enc = p->enc;
15089  if (!parser_isascii(p)) {
15090  if (tokadd_mbchar(p, c) == -1) return 0;
15091  }
15092  else if ((rb_enc_isalnum(c, p->enc) || c == '_') &&
15093  p->lex.pcur < p->lex.pend && is_identchar(p->lex.pcur, p->lex.pend, p->enc)) {
15094  if (space_seen) {
15095  const char *start = p->lex.pcur - 1, *ptr = start;
15096  do {
15097  int n = parser_precise_mbclen(p, ptr);
15098  if (n < 0) return -1;
15099  ptr += n;
15100  } while (ptr < p->lex.pend && is_identchar(ptr, p->lex.pend, p->enc));
15101  rb_warn2("`?' just followed by `%.*s' is interpreted as" \
15102  " a conditional operator, put a space after `?'",
15103  WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
15104  }
15105  goto ternary;
15106  }
15107  else if (c == '\\') {
15108  if (peek(p, 'u')) {
15109  nextc(p);
15110  enc = rb_utf8_encoding();
15111  tokadd_utf8(p, &enc, -1, 0, 0);
15112  }
15113  else if (!lex_eol_p(p) && !(c = *p->lex.pcur, ISASCII(c))) {
15114  nextc(p);
15115  if (tokadd_mbchar(p, c) == -1) return 0;
15116  }
15117  else {
15118  c = read_escape(p, 0, &enc);
15119  tokadd(p, c);
15120  }
15121  }
15122  else {
15123  tokadd(p, c);
15124  }
15125  tokfix(p);
15126  lit = STR_NEW3(tok(p), toklen(p), enc, 0);
15127  set_yylval_str(lit);
15128  SET_LEX_STATE(EXPR_END);
15129  return tCHAR;
15130 }
15131 
15132 static enum yytokentype
15133 parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
15134 {
15135  register int c;
15136  const char *ptok = p->lex.pcur;
15137 
15138  if (IS_BEG()) {
15139  int term;
15140  int paren;
15141 
15142  c = nextc(p);
15143  quotation:
15144  if (c == -1 || !ISALNUM(c)) {
15145  term = c;
15146  c = 'Q';
15147  }
15148  else {
15149  term = nextc(p);
15150  if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
15151  yyerror0("unknown type of %string");
15152  return 0;
15153  }
15154  }
15155  if (c == -1 || term == -1) {
15156  compile_error(p, "unterminated quoted string meets end of file");
15157  return 0;
15158  }
15159  paren = term;
15160  if (term == '(') term = ')';
15161  else if (term == '[') term = ']';
15162  else if (term == '{') term = '}';
15163  else if (term == '<') term = '>';
15164  else paren = 0;
15165 
15166  p->lex.ptok = ptok-1;
15167  switch (c) {
15168  case 'Q':
15169  p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
15170  return tSTRING_BEG;
15171 
15172  case 'q':
15173  p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
15174  return tSTRING_BEG;
15175 
15176  case 'W':
15177  p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
15178  return tWORDS_BEG;
15179 
15180  case 'w':
15181  p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
15182  return tQWORDS_BEG;
15183 
15184  case 'I':
15185  p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
15186  return tSYMBOLS_BEG;
15187 
15188  case 'i':
15189  p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
15190  return tQSYMBOLS_BEG;
15191 
15192  case 'x':
15193  p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
15194  return tXSTRING_BEG;
15195 
15196  case 'r':
15197  p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
15198  return tREGEXP_BEG;
15199 
15200  case 's':
15201  p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
15202  SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
15203  return tSYMBEG;
15204 
15205  default:
15206  yyerror0("unknown type of %string");
15207  return 0;
15208  }
15209  }
15210  if ((c = nextc(p)) == '=') {
15211  set_yylval_id('%');
15212  SET_LEX_STATE(EXPR_BEG);
15213  return tOP_ASGN;
15214  }
15215  if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
15216  goto quotation;
15217  }
15218  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
15219  pushback(p, c);
15220  return warn_balanced('%', "%%", "string literal");
15221 }
15222 
15223 static int
15224 tokadd_ident(struct parser_params *p, int c)
15225 {
15226  do {
15227  if (tokadd_mbchar(p, c) == -1) return -1;
15228  c = nextc(p);
15229  } while (parser_is_identchar(p));
15230  pushback(p, c);
15231  return 0;
15232 }
15233 
15234 static ID
15235 tokenize_ident(struct parser_params *p, const enum lex_state_e last_state)
15236 {
15237  ID ident = TOK_INTERN();
15238 
15239  set_yylval_name(ident);
15240 
15241  return ident;
15242 }
15243 
15244 static int
15245 parse_numvar(struct parser_params *p)
15246 {
15247  size_t len;
15248  int overflow;
15249  unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
15250  const unsigned long nth_ref_max =
15251  ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
15252  /* NTH_REF is left-shifted to be ORed with back-ref flag and
15253  * turned into a Fixnum, in compile.c */
15254 
15255  if (overflow || n > nth_ref_max) {
15256  /* compile_error()? */
15257  rb_warn1("`%s' is too big for a number variable, always nil", WARN_S(tok(p)));
15258  return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
15259  }
15260  else {
15261  return (int)n;
15262  }
15263 }
15264 
15265 static enum yytokentype
15266 parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
15267 {
15268  const char *ptr = p->lex.pcur;
15269  register int c;
15270 
15271  SET_LEX_STATE(EXPR_END);
15272  p->lex.ptok = ptr - 1; /* from '$' */
15273  newtok(p);
15274  c = nextc(p);
15275  switch (c) {
15276  case '_': /* $_: last read line string */
15277  c = nextc(p);
15278  if (parser_is_identchar(p)) {
15279  tokadd(p, '$');
15280  tokadd(p, '_');
15281  break;
15282  }
15283  pushback(p, c);
15284  c = '_';
15285  /* fall through */
15286  case '~': /* $~: match-data */
15287  case '*': /* $*: argv */
15288  case '$': /* $$: pid */
15289  case '?': /* $?: last status */
15290  case '!': /* $!: error string */
15291  case '@': /* $@: error position */
15292  case '/': /* $/: input record separator */
15293  case '\\': /* $\: output record separator */
15294  case ';': /* $;: field separator */
15295  case ',': /* $,: output field separator */
15296  case '.': /* $.: last read line number */
15297  case '=': /* $=: ignorecase */
15298  case ':': /* $:: load path */
15299  case '<': /* $<: reading filename */
15300  case '>': /* $>: default output handle */
15301  case '\"': /* $": already loaded files */
15302  tokadd(p, '$');
15303  tokadd(p, c);
15304  goto gvar;
15305 
15306  case '-':
15307  tokadd(p, '$');
15308  tokadd(p, c);
15309  c = nextc(p);
15310  if (parser_is_identchar(p)) {
15311  if (tokadd_mbchar(p, c) == -1) return 0;
15312  }
15313  else {
15314  pushback(p, c);
15315  pushback(p, '-');
15316  return '$';
15317  }
15318  gvar:
15320  return tGVAR;
15321 
15322  case '&': /* $&: last match */
15323  case '`': /* $`: string before last match */
15324  case '\'': /* $': string after last match */
15325  case '+': /* $+: string matches last paren. */
15326  if (IS_lex_state_for(last_state, EXPR_FNAME)) {
15327  tokadd(p, '$');
15328  tokadd(p, c);
15329  goto gvar;
15330  }
15331  set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
15332  return tBACK_REF;
15333 
15334  case '1': case '2': case '3':
15335  case '4': case '5': case '6':
15336  case '7': case '8': case '9':
15337  tokadd(p, '$');
15338  do {
15339  tokadd(p, c);
15340  c = nextc(p);
15341  } while (c != -1 && ISDIGIT(c));
15342  pushback(p, c);
15343  if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
15344  tokfix(p);
15345  set_yylval_node(NEW_NTH_REF(parse_numvar(p), &_cur_loc));
15346  return tNTH_REF;
15347 
15348  default:
15349  if (!parser_is_identchar(p)) {
15350  YYLTYPE loc = RUBY_INIT_YYLLOC();
15351  if (c == -1 || ISSPACE(c)) {
15352  compile_error(p, "`$' without identifiers is not allowed as a global variable name");
15353  }
15354  else {
15355  pushback(p, c);
15356  compile_error(p, "`$%c' is not allowed as a global variable name", c);
15357  }
15358  parser_show_error_line(p, &loc);
15360  return tGVAR;
15361  }
15362  /* fall through */
15363  case '0':
15364  tokadd(p, '$');
15365  }
15366 
15367  if (tokadd_ident(p, c)) return 0;
15368  SET_LEX_STATE(EXPR_END);
15369  tokenize_ident(p, last_state);
15370  return tGVAR;
15371 }
15372 
15373 #ifndef RIPPER
15374 static bool
15375 parser_numbered_param(struct parser_params *p, int n)
15376 {
15377  if (n < 0) return false;
15378 
15380  return false;
15381  }
15382  if (p->max_numparam == ORDINAL_PARAM) {
15383  compile_error(p, "ordinary parameter is defined");
15384  return false;
15385  }
15386  struct vtable *args = p->lvtbl->args;
15387  if (p->max_numparam < n) {
15388  p->max_numparam = n;
15389  }
15390  while (n > args->pos) {
15391  vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
15392  }
15393  return true;
15394 }
15395 #endif
15396 
15397 static enum yytokentype
15398 parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
15399 {
15400  const char *ptr = p->lex.pcur;
15401  enum yytokentype result = tIVAR;
15402  register int c = nextc(p);
15403  YYLTYPE loc;
15404 
15405  p->lex.ptok = ptr - 1; /* from '@' */
15406  newtok(p);
15407  tokadd(p, '@');
15408  if (c == '@') {
15409  result = tCVAR;
15410  tokadd(p, '@');
15411  c = nextc(p);
15412  }
15413  SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
15414  if (c == -1 || !parser_is_identchar(p)) {
15415  pushback(p, c);
15416  RUBY_SET_YYLLOC(loc);
15417  if (result == tIVAR) {
15418  compile_error(p, "`@' without identifiers is not allowed as an instance variable name");
15419  }
15420  else {
15421  compile_error(p, "`@@' without identifiers is not allowed as a class variable name");
15422  }
15423  parser_show_error_line(p, &loc);
15425  SET_LEX_STATE(EXPR_END);
15426  return result;
15427  }
15428  else if (ISDIGIT(c)) {
15429  pushback(p, c);
15430  RUBY_SET_YYLLOC(loc);
15431  if (result == tIVAR) {
15432  compile_error(p, "`@%c' is not allowed as an instance variable name", c);
15433  }
15434  else {
15435  compile_error(p, "`@@%c' is not allowed as a class variable name", c);
15436  }
15437  parser_show_error_line(p, &loc);
15439  SET_LEX_STATE(EXPR_END);
15440  return result;
15441  }
15442 
15443  if (tokadd_ident(p, c)) return 0;
15444  tokenize_ident(p, last_state);
15445  return result;
15446 }
15447 
15448 static enum yytokentype
15449 parse_ident(struct parser_params *p, int c, int cmd_state)
15450 {
15451  enum yytokentype result;
15452  int mb = ENC_CODERANGE_7BIT;
15453  const enum lex_state_e last_state = p->lex.state;
15454  ID ident;
15455 
15456  do {
15457  if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN;
15458  if (tokadd_mbchar(p, c) == -1) return 0;
15459  c = nextc(p);
15460  } while (parser_is_identchar(p));
15461  if ((c == '!' || c == '?') && !peek(p, '=')) {
15462  result = tFID;
15463  tokadd(p, c);
15464  }
15465  else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
15466  (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
15467  result = tIDENTIFIER;
15468  tokadd(p, c);
15469  }
15470  else {
15471  result = tCONSTANT; /* assume provisionally */
15472  pushback(p, c);
15473  }
15474  tokfix(p);
15475 
15476  if (IS_LABEL_POSSIBLE()) {
15477  if (IS_LABEL_SUFFIX(0)) {
15478  SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
15479  nextc(p);
15481  return tLABEL;
15482  }
15483  }
15484  if (mb == ENC_CODERANGE_7BIT && !IS_lex_state(EXPR_DOT)) {
15485  const struct kwtable *kw;
15486 
15487  /* See if it is a reserved word. */
15488  kw = rb_reserved_word(tok(p), toklen(p));
15489  if (kw) {
15490  enum lex_state_e state = p->lex.state;
15491  SET_LEX_STATE(kw->state);
15492  if (IS_lex_state_for(state, EXPR_FNAME)) {
15494  return kw->id[0];
15495  }
15496  if (IS_lex_state(EXPR_BEG)) {
15497  p->command_start = TRUE;
15498  }
15499  if (kw->id[0] == keyword_do) {
15500  if (lambda_beginning_p()) {
15501  p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
15502  return keyword_do_LAMBDA;
15503  }
15504  if (COND_P()) return keyword_do_cond;
15505  if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
15506  return keyword_do_block;
15507  return keyword_do;
15508  }
15509  if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED)))
15510  return kw->id[0];
15511  else {
15512  if (kw->id[0] != kw->id[1])
15513  SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
15514  return kw->id[1];
15515  }
15516  }
15517  }
15518 
15519  if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
15520  if (cmd_state) {
15521  SET_LEX_STATE(EXPR_CMDARG);
15522  }
15523  else {
15524  SET_LEX_STATE(EXPR_ARG);
15525  }
15526  }
15527  else if (p->lex.state == EXPR_FNAME) {
15528  SET_LEX_STATE(EXPR_ENDFN);
15529  }
15530  else {
15531  SET_LEX_STATE(EXPR_END);
15532  }
15533 
15534  ident = tokenize_ident(p, last_state);
15535  if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
15536  if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
15537  (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
15538  lvar_defined(p, ident)) {
15539  SET_LEX_STATE(EXPR_END|EXPR_LABEL);
15540  }
15541  return result;
15542 }
15543 
15544 static enum yytokentype
15545 parser_yylex(struct parser_params *p)
15546 {
15547  register int c;
15548  int space_seen = 0;
15549  int cmd_state;
15550  int label;
15551  enum lex_state_e last_state;
15552  int fallthru = FALSE;
15553  int token_seen = p->token_seen;
15554 
15555  if (p->lex.strterm) {
15556  if (p->lex.strterm->flags & STRTERM_HEREDOC) {
15557  return here_document(p, &p->lex.strterm->u.heredoc);
15558  }
15559  else {
15560  token_flush(p);
15561  return parse_string(p, &p->lex.strterm->u.literal);
15562  }
15563  }
15564  cmd_state = p->command_start;
15565  p->command_start = FALSE;
15566  p->token_seen = TRUE;
15567  retry:
15568  last_state = p->lex.state;
15569 #ifndef RIPPER
15570  token_flush(p);
15571 #endif
15572  switch (c = nextc(p)) {
15573  case '\0': /* NUL */
15574  case '\004': /* ^D */
15575  case '\032': /* ^Z */
15576  case -1: /* end of script. */
15577  return 0;
15578 
15579  /* white spaces */
15580  case ' ': case '\t': case '\f': case '\r':
15581  case '\13': /* '\v' */
15582  space_seen = 1;
15583 #ifdef RIPPER
15584  while ((c = nextc(p))) {
15585  switch (c) {
15586  case ' ': case '\t': case '\f': case '\r':
15587  case '\13': /* '\v' */
15588  break;
15589  default:
15590  goto outofloop;
15591  }
15592  }
15593  outofloop:
15594  pushback(p, c);
15596 #endif
15597  goto retry;
15598 
15599  case '#': /* it's a comment */
15600  p->token_seen = token_seen;
15601  /* no magic_comment in shebang line */
15602  if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
15603  if (comment_at_top(p)) {
15604  set_file_encoding(p, p->lex.pcur, p->lex.pend);
15605  }
15606  }
15607  lex_goto_eol(p);
15609  fallthru = TRUE;
15610  /* fall through */
15611  case '\n':
15612  p->token_seen = token_seen;
15613  c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
15614  !IS_lex_state(EXPR_LABELED));
15615  if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
15616  if (!fallthru) {
15618  }
15619  fallthru = FALSE;
15620  if (!c && p->in_kwarg) {
15621  goto normal_newline;
15622  }
15623  goto retry;
15624  }
15625  while (1) {
15626  switch (c = nextc(p)) {
15627  case ' ': case '\t': case '\f': case '\r':
15628  case '\13': /* '\v' */
15629  space_seen = 1;
15630  break;
15631  case '#':
15632  pushback(p, c);
15633  if (space_seen) dispatch_scan_event(p, tSP);
15634  goto retry;
15635  case '&':
15636  case '.': {
15638  if (peek(p, '.') == (c == '&')) {
15639  pushback(p, c);
15641  goto retry;
15642  }
15643  }
15644  default:
15645  p->ruby_sourceline--;
15646  p->lex.nextline = p->lex.lastline;
15647  case -1: /* EOF no decrement*/
15648 #ifndef RIPPER
15649  if (p->lex.prevline && !p->eofp) p->lex.lastline = p->lex.prevline;
15650  p->lex.pbeg = RSTRING_PTR(p->lex.lastline);
15651  p->lex.pend = p->lex.pcur = p->lex.pbeg + RSTRING_LEN(p->lex.lastline);
15652  pushback(p, 1); /* always pushback */
15653  p->lex.ptok = p->lex.pcur;
15654 #else
15655  lex_goto_eol(p);
15656  if (c != -1) {
15657  p->lex.ptok = p->lex.pcur;
15658  }
15659 #endif
15660  goto normal_newline;
15661  }
15662  }
15663  normal_newline:
15664  p->command_start = TRUE;
15665  SET_LEX_STATE(EXPR_BEG);
15666  return '\n';
15667 
15668  case '*':
15669  if ((c = nextc(p)) == '*') {
15670  if ((c = nextc(p)) == '=') {
15672  SET_LEX_STATE(EXPR_BEG);
15673  return tOP_ASGN;
15674  }
15675  pushback(p, c);
15676  if (IS_SPCARG(c)) {
15677  rb_warning0("`**' interpreted as argument prefix");
15678  c = tDSTAR;
15679  }
15680  else if (IS_BEG()) {
15681  c = tDSTAR;
15682  }
15683  else {
15684  c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
15685  }
15686  }
15687  else {
15688  if (c == '=') {
15689  set_yylval_id('*');
15690  SET_LEX_STATE(EXPR_BEG);
15691  return tOP_ASGN;
15692  }
15693  pushback(p, c);
15694  if (IS_SPCARG(c)) {
15695  rb_warning0("`*' interpreted as argument prefix");
15696  c = tSTAR;
15697  }
15698  else if (IS_BEG()) {
15699  c = tSTAR;
15700  }
15701  else {
15702  c = warn_balanced('*', "*", "argument prefix");
15703  }
15704  }
15705  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
15706  return c;
15707 
15708  case '!':
15709  c = nextc(p);
15710  if (IS_AFTER_OPERATOR()) {
15711  SET_LEX_STATE(EXPR_ARG);
15712  if (c == '@') {
15713  return '!';
15714  }
15715  }
15716  else {
15717  SET_LEX_STATE(EXPR_BEG);
15718  }
15719  if (c == '=') {
15720  return tNEQ;
15721  }
15722  if (c == '~') {
15723  return tNMATCH;
15724  }
15725  pushback(p, c);
15726  return '!';
15727 
15728  case '=':
15729  if (was_bol(p)) {
15730  /* skip embedded rd document */
15731  if (word_match_p(p, "begin", 5)) {
15732  int first_p = TRUE;
15733 
15734  lex_goto_eol(p);
15736  for (;;) {
15737  lex_goto_eol(p);
15738  if (!first_p) {
15740  }
15741  first_p = FALSE;
15742  c = nextc(p);
15743  if (c == -1) {
15744  compile_error(p, "embedded document meets end of file");
15745  return 0;
15746  }
15747  if (c == '=' && word_match_p(p, "end", 3)) {
15748  break;
15749  }
15750  pushback(p, c);
15751  }
15752  lex_goto_eol(p);
15754  goto retry;
15755  }
15756  }
15757 
15758  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
15759  if ((c = nextc(p)) == '=') {
15760  if ((c = nextc(p)) == '=') {
15761  return tEQQ;
15762  }
15763  pushback(p, c);
15764  return tEQ;
15765  }
15766  if (c == '~') {
15767  return tMATCH;
15768  }
15769  else if (c == '>') {
15770  return tASSOC;
15771  }
15772  pushback(p, c);
15773  return '=';
15774 
15775  case '<':
15776  c = nextc(p);
15777  if (c == '<' &&
15778  !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
15779  !IS_END() &&
15780  (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
15781  int token = heredoc_identifier(p);
15782  if (token) return token < 0 ? 0 : token;
15783  }
15784  if (IS_AFTER_OPERATOR()) {
15785  SET_LEX_STATE(EXPR_ARG);
15786  }
15787  else {
15788  if (IS_lex_state(EXPR_CLASS))
15789  p->command_start = TRUE;
15790  SET_LEX_STATE(EXPR_BEG);
15791  }
15792  if (c == '=') {
15793  if ((c = nextc(p)) == '>') {
15794  return tCMP;
15795  }
15796  pushback(p, c);
15797  return tLEQ;
15798  }
15799  if (c == '<') {
15800  if ((c = nextc(p)) == '=') {
15802  SET_LEX_STATE(EXPR_BEG);
15803  return tOP_ASGN;
15804  }
15805  pushback(p, c);
15806  return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
15807  }
15808  pushback(p, c);
15809  return '<';
15810 
15811  case '>':
15812  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
15813  if ((c = nextc(p)) == '=') {
15814  return tGEQ;
15815  }
15816  if (c == '>') {
15817  if ((c = nextc(p)) == '=') {
15819  SET_LEX_STATE(EXPR_BEG);
15820  return tOP_ASGN;
15821  }
15822  pushback(p, c);
15823  return tRSHFT;
15824  }
15825  pushback(p, c);
15826  return '>';
15827 
15828  case '"':
15829  label = (IS_LABEL_POSSIBLE() ? str_label : 0);
15830  p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
15831  p->lex.ptok = p->lex.pcur-1;
15832  return tSTRING_BEG;
15833 
15834  case '`':
15835  if (IS_lex_state(EXPR_FNAME)) {
15836  SET_LEX_STATE(EXPR_ENDFN);
15837  return c;
15838  }
15839  if (IS_lex_state(EXPR_DOT)) {
15840  if (cmd_state)
15841  SET_LEX_STATE(EXPR_CMDARG);
15842  else
15843  SET_LEX_STATE(EXPR_ARG);
15844  return c;
15845  }
15846  p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
15847  return tXSTRING_BEG;
15848 
15849  case '\'':
15850  label = (IS_LABEL_POSSIBLE() ? str_label : 0);
15851  p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
15852  p->lex.ptok = p->lex.pcur-1;
15853  return tSTRING_BEG;
15854 
15855  case '?':
15856  return parse_qmark(p, space_seen);
15857 
15858  case '&':
15859  if ((c = nextc(p)) == '&') {
15860  SET_LEX_STATE(EXPR_BEG);
15861  if ((c = nextc(p)) == '=') {
15863  SET_LEX_STATE(EXPR_BEG);
15864  return tOP_ASGN;
15865  }
15866  pushback(p, c);
15867  return tANDOP;
15868  }
15869  else if (c == '=') {
15870  set_yylval_id('&');
15871  SET_LEX_STATE(EXPR_BEG);
15872  return tOP_ASGN;
15873  }
15874  else if (c == '.') {
15876  SET_LEX_STATE(EXPR_DOT);
15877  return tANDDOT;
15878  }
15879  pushback(p, c);
15880  if (IS_SPCARG(c)) {
15881  if ((c != ':') ||
15882  (c = peekc_n(p, 1)) == -1 ||
15883  !(c == '\'' || c == '"' ||
15884  is_identchar((p->lex.pcur+1), p->lex.pend, p->enc))) {
15885  rb_warning0("`&' interpreted as argument prefix");
15886  }
15887  c = tAMPER;
15888  }
15889  else if (IS_BEG()) {
15890  c = tAMPER;
15891  }
15892  else {
15893  c = warn_balanced('&', "&", "argument prefix");
15894  }
15895  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
15896  return c;
15897 
15898  case '|':
15899  if ((c = nextc(p)) == '|') {
15900  SET_LEX_STATE(EXPR_BEG);
15901  if ((c = nextc(p)) == '=') {
15903  SET_LEX_STATE(EXPR_BEG);
15904  return tOP_ASGN;
15905  }
15906  pushback(p, c);
15907  if (IS_lex_state_for(last_state, EXPR_BEG)) {
15908  c = '|';
15909  pushback(p, '|');
15910  return c;
15911  }
15912  return tOROP;
15913  }
15914  if (c == '=') {
15915  set_yylval_id('|');
15916  SET_LEX_STATE(EXPR_BEG);
15917  return tOP_ASGN;
15918  }
15919  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
15920  pushback(p, c);
15921  return '|';
15922 
15923  case '+':
15924  c = nextc(p);
15925  if (IS_AFTER_OPERATOR()) {
15926  SET_LEX_STATE(EXPR_ARG);
15927  if (c == '@') {
15928  return tUPLUS;
15929  }
15930  pushback(p, c);
15931  return '+';
15932  }
15933  if (c == '=') {
15934  set_yylval_id('+');
15935  SET_LEX_STATE(EXPR_BEG);
15936  return tOP_ASGN;
15937  }
15938  if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
15939  SET_LEX_STATE(EXPR_BEG);
15940  pushback(p, c);
15941  if (c != -1 && ISDIGIT(c)) {
15942  return parse_numeric(p, '+');
15943  }
15944  return tUPLUS;
15945  }
15946  SET_LEX_STATE(EXPR_BEG);
15947  pushback(p, c);
15948  return warn_balanced('+', "+", "unary operator");
15949 
15950  case '-':
15951  c = nextc(p);
15952  if (IS_AFTER_OPERATOR()) {
15953  SET_LEX_STATE(EXPR_ARG);
15954  if (c == '@') {
15955  return tUMINUS;
15956  }
15957  pushback(p, c);
15958  return '-';
15959  }
15960  if (c == '=') {
15961  set_yylval_id('-');
15962  SET_LEX_STATE(EXPR_BEG);
15963  return tOP_ASGN;
15964  }
15965  if (c == '>') {
15966  SET_LEX_STATE(EXPR_ENDFN);
15967  return tLAMBDA;
15968  }
15969  if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
15970  SET_LEX_STATE(EXPR_BEG);
15971  pushback(p, c);
15972  if (c != -1 && ISDIGIT(c)) {
15973  return tUMINUS_NUM;
15974  }
15975  return tUMINUS;
15976  }
15977  SET_LEX_STATE(EXPR_BEG);
15978  pushback(p, c);
15979  return warn_balanced('-', "-", "unary operator");
15980 
15981  case '.': {
15982  int is_beg = IS_BEG();
15983  SET_LEX_STATE(EXPR_BEG);
15984  if ((c = nextc(p)) == '.') {
15985  if ((c = nextc(p)) == '.') {
15986  if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
15987  rb_warn0("... at EOL, should be parenthesized?");
15988  }
15989  return is_beg ? tBDOT3 : tDOT3;
15990  }
15991  pushback(p, c);
15992  return is_beg ? tBDOT2 : tDOT2;
15993  }
15994  pushback(p, c);
15995  if (c != -1 && ISDIGIT(c)) {
15996  char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
15997  parse_numeric(p, '.');
15998  if (ISDIGIT(prev)) {
15999  yyerror0("unexpected fraction part after numeric literal");
16000  }
16001  else {
16002  yyerror0("no .<digit> floating literal anymore; put 0 before dot");
16003  }
16004  SET_LEX_STATE(EXPR_END);
16005  p->lex.ptok = p->lex.pcur;
16006  goto retry;
16007  }
16008  set_yylval_id('.');
16009  SET_LEX_STATE(EXPR_DOT);
16010  return '.';
16011  }
16012 
16013  case '0': case '1': case '2': case '3': case '4':
16014  case '5': case '6': case '7': case '8': case '9':
16015  return parse_numeric(p, c);
16016 
16017  case ')':
16018  COND_POP();
16019  CMDARG_POP();
16020  SET_LEX_STATE(EXPR_ENDFN);
16021  p->lex.paren_nest--;
16022  return c;
16023 
16024  case ']':
16025  COND_POP();
16026  CMDARG_POP();
16027  SET_LEX_STATE(EXPR_END);
16028  p->lex.paren_nest--;
16029  return c;
16030 
16031  case '}':
16032  /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
16033  if (!p->lex.brace_nest--) return tSTRING_DEND;
16034  COND_POP();
16035  CMDARG_POP();
16036  SET_LEX_STATE(EXPR_END);
16037  p->lex.paren_nest--;
16038  return c;
16039 
16040  case ':':
16041  c = nextc(p);
16042  if (c == ':') {
16043  if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
16044  SET_LEX_STATE(EXPR_BEG);
16045  return tCOLON3;
16046  }
16048  SET_LEX_STATE(EXPR_DOT);
16049  return tCOLON2;
16050  }
16051  if (IS_END() || ISSPACE(c) || c == '#') {
16052  pushback(p, c);
16053  c = warn_balanced(':', ":", "symbol literal");
16054  SET_LEX_STATE(EXPR_BEG);
16055  return c;
16056  }
16057  switch (c) {
16058  case '\'':
16059  p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
16060  break;
16061  case '"':
16062  p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
16063  break;
16064  default:
16065  pushback(p, c);
16066  break;
16067  }
16068  SET_LEX_STATE(EXPR_FNAME);
16069  return tSYMBEG;
16070 
16071  case '/':
16072  if (IS_BEG()) {
16073  p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
16074  return tREGEXP_BEG;
16075  }
16076  if ((c = nextc(p)) == '=') {
16077  set_yylval_id('/');
16078  SET_LEX_STATE(EXPR_BEG);
16079  return tOP_ASGN;
16080  }
16081  pushback(p, c);
16082  if (IS_SPCARG(c)) {
16083  arg_ambiguous(p, '/');
16084  p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
16085  return tREGEXP_BEG;
16086  }
16087  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
16088  return warn_balanced('/', "/", "regexp literal");
16089 
16090  case '^':
16091  if ((c = nextc(p)) == '=') {
16092  set_yylval_id('^');
16093  SET_LEX_STATE(EXPR_BEG);
16094  return tOP_ASGN;
16095  }
16096  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
16097  pushback(p, c);
16098  return '^';
16099 
16100  case ';':
16101  SET_LEX_STATE(EXPR_BEG);
16102  p->command_start = TRUE;
16103  return ';';
16104 
16105  case ',':
16106  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16107  return ',';
16108 
16109  case '~':
16110  if (IS_AFTER_OPERATOR()) {
16111  if ((c = nextc(p)) != '@') {
16112  pushback(p, c);
16113  }
16114  SET_LEX_STATE(EXPR_ARG);
16115  }
16116  else {
16117  SET_LEX_STATE(EXPR_BEG);
16118  }
16119  return '~';
16120 
16121  case '(':
16122  if (IS_BEG()) {
16123  c = tLPAREN;
16124  }
16125  else if (!space_seen) {
16126  /* foo( ... ) => method call, no ambiguity */
16127  }
16128  else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
16129  c = tLPAREN_ARG;
16130  }
16131  else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
16132  rb_warning0("parentheses after method name is interpreted as "
16133  "an argument list, not a decomposed argument");
16134  }
16135  p->lex.paren_nest++;
16136  COND_PUSH(0);
16137  CMDARG_PUSH(0);
16138  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16139  return c;
16140 
16141  case '[':
16142  p->lex.paren_nest++;
16143  if (IS_AFTER_OPERATOR()) {
16144  if ((c = nextc(p)) == ']') {
16145  SET_LEX_STATE(EXPR_ARG);
16146  if ((c = nextc(p)) == '=') {
16147  return tASET;
16148  }
16149  pushback(p, c);
16150  return tAREF;
16151  }
16152  pushback(p, c);
16153  SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
16154  return '[';
16155  }
16156  else if (IS_BEG()) {
16157  c = tLBRACK;
16158  }
16159  else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
16160  c = tLBRACK;
16161  }
16162  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16163  COND_PUSH(0);
16164  CMDARG_PUSH(0);
16165  return c;
16166 
16167  case '{':
16168  ++p->lex.brace_nest;
16169  if (lambda_beginning_p())
16170  c = tLAMBEG;
16171  else if (IS_lex_state(EXPR_LABELED))
16172  c = tLBRACE; /* hash */
16173  else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
16174  c = '{'; /* block (primary) */
16175  else if (IS_lex_state(EXPR_ENDARG))
16176  c = tLBRACE_ARG; /* block (expr) */
16177  else
16178  c = tLBRACE; /* hash */
16179  if (c != tLBRACE) {
16180  p->command_start = TRUE;
16181  SET_LEX_STATE(EXPR_BEG);
16182  }
16183  else {
16184  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16185  }
16186  ++p->lex.paren_nest; /* after lambda_beginning_p() */
16187  COND_PUSH(0);
16188  CMDARG_PUSH(0);
16189  return c;
16190 
16191  case '\\':
16192  c = nextc(p);
16193  if (c == '\n') {
16194  space_seen = 1;
16196  goto retry; /* skip \\n */
16197  }
16198  if (c == ' ') return tSP;
16199  if (ISSPACE(c)) return c;
16200  pushback(p, c);
16201  return '\\';
16202 
16203  case '%':
16204  return parse_percent(p, space_seen, last_state);
16205 
16206  case '$':
16207  return parse_gvar(p, last_state);
16208 
16209  case '@':
16210  return parse_atmark(p, last_state);
16211 
16212  case '_':
16213  if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
16214  p->ruby__end__seen = 1;
16215  p->eofp = 1;
16216 #ifndef RIPPER
16217  return -1;
16218 #else
16219  lex_goto_eol(p);
16221  return 0;
16222 #endif
16223  }
16224  newtok(p);
16225  break;
16226 
16227  default:
16228  if (!parser_is_identchar(p)) {
16229  compile_error(p, "Invalid char `\\x%02X' in expression", c);
16230  token_flush(p);
16231  goto retry;
16232  }
16233 
16234  newtok(p);
16235  break;
16236  }
16237 
16238  return parse_ident(p, c, cmd_state);
16239 }
16240 
16241 static enum yytokentype
16242 yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
16243 {
16244  enum yytokentype t;
16245 
16246  p->lval = lval;
16247  lval->val = Qundef;
16248  t = parser_yylex(p);
16249  if (has_delayed_token(p))
16250  dispatch_delayed_token(p, t);
16251  else if (t != 0)
16252  dispatch_scan_event(p, t);
16253 
16254  if (p->lex.strterm && (p->lex.strterm->flags & STRTERM_HEREDOC))
16256  else
16257  RUBY_SET_YYLLOC(*yylloc);
16258 
16259  return t;
16260 }
16261 
16262 #define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
16263 
16264 static NODE*
16265 node_newnode(struct parser_params *p, enum node_type type, VALUE a0, VALUE a1, VALUE a2, const rb_code_location_t *loc)
16266 {
16267  NODE *n = rb_ast_newnode(p->ast, type);
16268 
16269  rb_node_init(n, type, a0, a1, a2);
16270 
16271  nd_set_loc(n, loc);
16272  nd_set_node_id(n, parser_get_node_id(p));
16273  return n;
16274 }
16275 
16276 static NODE *
16277 nd_set_loc(NODE *nd, const YYLTYPE *loc)
16278 {
16279  nd->nd_loc = *loc;
16280  nd_set_line(nd, loc->beg_pos.lineno);
16281  return nd;
16282 }
16283 
16284 #ifndef RIPPER
16285 static enum node_type
16286 nodetype(NODE *node) /* for debug */
16287 {
16288  return (enum node_type)nd_type(node);
16289 }
16290 
16291 static int
16292 nodeline(NODE *node)
16293 {
16294  return nd_line(node);
16295 }
16296 
16297 static NODE*
16298 newline_node(NODE *node)
16299 {
16300  if (node) {
16301  node = remove_begin(node);
16302  node->flags |= NODE_FL_NEWLINE;
16303  }
16304  return node;
16305 }
16306 
16307 static void
16308 fixpos(NODE *node, NODE *orig)
16309 {
16310  if (!node) return;
16311  if (!orig) return;
16312  nd_set_line(node, nd_line(orig));
16313 }
16314 
16315 static void
16316 parser_warning(struct parser_params *p, NODE *node, const char *mesg)
16317 {
16318  rb_compile_warning(p->ruby_sourcefile, nd_line(node), "%s", mesg);
16319 }
16320 
16321 static void
16322 parser_warn(struct parser_params *p, NODE *node, const char *mesg)
16323 {
16324  rb_compile_warn(p->ruby_sourcefile, nd_line(node), "%s", mesg);
16325 }
16326 
16327 static NODE*
16328 block_append(struct parser_params *p, NODE *head, NODE *tail)
16329 {
16330  NODE *end, *h = head, *nd;
16331 
16332  if (tail == 0) return head;
16333 
16334  if (h == 0) return tail;
16335  switch (nd_type(h)) {
16336  case NODE_LIT:
16337  case NODE_STR:
16338  case NODE_SELF:
16339  case NODE_TRUE:
16340  case NODE_FALSE:
16341  case NODE_NIL:
16342  parser_warning(p, h, "unused literal ignored");
16343  return tail;
16344  default:
16345  h = end = NEW_BLOCK(head, &head->nd_loc);
16346  end->nd_end = end;
16347  head = end;
16348  break;
16349  case NODE_BLOCK:
16350  end = h->nd_end;
16351  break;
16352  }
16353 
16354  nd = end->nd_head;
16355  switch (nd_type(nd)) {
16356  case NODE_RETURN:
16357  case NODE_BREAK:
16358  case NODE_NEXT:
16359  case NODE_REDO:
16360  case NODE_RETRY:
16361  if (RTEST(ruby_verbose)) {
16362  parser_warning(p, tail, "statement not reached");
16363  }
16364  break;
16365 
16366  default:
16367  break;
16368  }
16369 
16370  if (nd_type(tail) != NODE_BLOCK) {
16371  tail = NEW_BLOCK(tail, &tail->nd_loc);
16372  tail->nd_end = tail;
16373  }
16374  end->nd_next = tail;
16375  h->nd_end = tail->nd_end;
16376  nd_set_last_loc(head, nd_last_loc(tail));
16377  return head;
16378 }
16379 
16380 /* append item to the list */
16381 static NODE*
16382 list_append(struct parser_params *p, NODE *list, NODE *item)
16383 {
16384  NODE *last;
16385 
16386  if (list == 0) return NEW_LIST(item, &item->nd_loc);
16387  if (list->nd_next) {
16388  last = list->nd_next->nd_end;
16389  }
16390  else {
16391  last = list;
16392  }
16393 
16394  list->nd_alen += 1;
16395  last->nd_next = NEW_LIST(item, &item->nd_loc);
16396  list->nd_next->nd_end = last->nd_next;
16397 
16399 
16400  return list;
16401 }
16402 
16403 /* concat two lists */
16404 static NODE*
16405 list_concat(NODE *head, NODE *tail)
16406 {
16407  NODE *last;
16408 
16409  if (head->nd_next) {
16410  last = head->nd_next->nd_end;
16411  }
16412  else {
16413  last = head;
16414  }
16415 
16416  head->nd_alen += tail->nd_alen;
16417  last->nd_next = tail;
16418  if (tail->nd_next) {
16419  head->nd_next->nd_end = tail->nd_next->nd_end;
16420  }
16421  else {
16422  head->nd_next->nd_end = tail;
16423  }
16424 
16425  nd_set_last_loc(head, nd_last_loc(tail));
16426 
16427  return head;
16428 }
16429 
16430 static int
16431 literal_concat0(struct parser_params *p, VALUE head, VALUE tail)
16432 {
16433  if (NIL_P(tail)) return 1;
16434  if (!rb_enc_compatible(head, tail)) {
16435  compile_error(p, "string literal encodings differ (%s / %s)",
16436  rb_enc_name(rb_enc_get(head)),
16437  rb_enc_name(rb_enc_get(tail)));
16438  rb_str_resize(head, 0);
16439  rb_str_resize(tail, 0);
16440  return 0;
16441  }
16442  rb_str_buf_append(head, tail);
16443  return 1;
16444 }
16445 
16446 /* concat two string literals */
16447 static NODE *
16448 literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
16449 {
16450  enum node_type htype;
16451  NODE *headlast;
16452  VALUE lit;
16453 
16454  if (!head) return tail;
16455  if (!tail) return head;
16456 
16457  htype = nd_type(head);
16458  if (htype == NODE_EVSTR) {
16459  NODE *node = NEW_DSTR(STR_NEW0(), loc);
16460  RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
16461  head = list_append(p, node, head);
16462  htype = NODE_DSTR;
16463  }
16464  if (p->heredoc_indent > 0) {
16465  switch (htype) {
16466  case NODE_STR:
16467  nd_set_type(head, NODE_DSTR);
16468  case NODE_DSTR:
16469  return list_append(p, head, tail);
16470  default:
16471  break;
16472  }
16473  }
16474  switch (nd_type(tail)) {
16475  case NODE_STR:
16476  if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) &&
16477  nd_type(headlast) == NODE_STR) {
16478  htype = NODE_STR;
16479  lit = headlast->nd_lit;
16480  }
16481  else {
16482  lit = head->nd_lit;
16483  }
16484  if (htype == NODE_STR) {
16485  if (!literal_concat0(p, lit, tail->nd_lit)) {
16486  error:
16487  rb_discard_node(p, head);
16488  rb_discard_node(p, tail);
16489  return 0;
16490  }
16491  rb_discard_node(p, tail);
16492  }
16493  else {
16494  list_append(p, head, tail);
16495  }
16496  break;
16497 
16498  case NODE_DSTR:
16499  if (htype == NODE_STR) {
16500  if (!literal_concat0(p, head->nd_lit, tail->nd_lit))
16501  goto error;
16502  tail->nd_lit = head->nd_lit;
16503  rb_discard_node(p, head);
16504  head = tail;
16505  }
16506  else if (NIL_P(tail->nd_lit)) {
16507  append:
16508  head->nd_alen += tail->nd_alen - 1;
16509  head->nd_next->nd_end->nd_next = tail->nd_next;
16510  head->nd_next->nd_end = tail->nd_next->nd_end;
16511  rb_discard_node(p, tail);
16512  }
16513  else if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) &&
16514  nd_type(headlast) == NODE_STR) {
16515  lit = headlast->nd_lit;
16516  if (!literal_concat0(p, lit, tail->nd_lit))
16517  goto error;
16518  tail->nd_lit = Qnil;
16519  goto append;
16520  }
16521  else {
16522  list_concat(head, NEW_NODE(NODE_LIST, NEW_STR(tail->nd_lit, loc), tail->nd_alen, tail->nd_next, loc));
16523  }
16524  break;
16525 
16526  case NODE_EVSTR:
16527  if (htype == NODE_STR) {
16528  nd_set_type(head, NODE_DSTR);
16529  head->nd_alen = 1;
16530  }
16531  list_append(p, head, tail);
16532  break;
16533  }
16534  return head;
16535 }
16536 
16537 static NODE *
16538 evstr2dstr(struct parser_params *p, NODE *node)
16539 {
16540  if (nd_type(node) == NODE_EVSTR) {
16541  NODE * dstr = NEW_DSTR(STR_NEW0(), &node->nd_loc);
16542  RB_OBJ_WRITTEN(p->ast, Qnil, dstr->nd_lit);
16543  node = list_append(p, dstr, node);
16544  }
16545  return node;
16546 }
16547 
16548 static NODE *
16549 new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
16550 {
16551  NODE *head = node;
16552 
16553  if (node) {
16554  switch (nd_type(node)) {
16555  case NODE_STR: case NODE_DSTR: case NODE_EVSTR:
16556  return node;
16557  }
16558  }
16559  return NEW_EVSTR(head, loc);
16560 }
16561 
16562 static NODE *
16563 call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
16564  const YYLTYPE *op_loc, const YYLTYPE *loc)
16565 {
16566  NODE *expr;
16567  value_expr(recv);
16568  value_expr(arg1);
16569  expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
16570  nd_set_line(expr, op_loc->beg_pos.lineno);
16571  return expr;
16572 }
16573 
16574 static NODE *
16575 call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
16576 {
16577  NODE *opcall;
16578  value_expr(recv);
16579  opcall = NEW_OPCALL(recv, id, 0, loc);
16580  nd_set_line(opcall, op_loc->beg_pos.lineno);
16581  return opcall;
16582 }
16583 
16584 static NODE *
16585 new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
16586 {
16587  NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
16588  nd_set_line(qcall, op_loc->beg_pos.lineno);
16589  return qcall;
16590 }
16591 
16592 static NODE*
16593 new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
16594 {
16595  NODE *ret;
16596  if (block) block_dup_check(p, args, block);
16597  ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
16598  if (block) ret = method_add_block(p, ret, block, loc);
16599  fixpos(ret, recv);
16600  return ret;
16601 }
16602 
16603 #define nd_once_body(node) (nd_type(node) == NODE_ONCE ? (node)->nd_body : node)
16604 static NODE*
16605 match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
16606 {
16607  NODE *n;
16608  int line = op_loc->beg_pos.lineno;
16609 
16610  value_expr(node1);
16611  value_expr(node2);
16612  if (node1 && (n = nd_once_body(node1)) != 0) {
16613  switch (nd_type(n)) {
16614  case NODE_DREGX:
16615  {
16616  NODE *match = NEW_MATCH2(node1, node2, loc);
16617  nd_set_line(match, line);
16618  return match;
16619  }
16620 
16621  case NODE_LIT:
16622  if (RB_TYPE_P(n->nd_lit, T_REGEXP)) {
16623  const VALUE lit = n->nd_lit;
16624  NODE *match = NEW_MATCH2(node1, node2, loc);
16625  match->nd_args = reg_named_capture_assign(p, lit, loc);
16626  nd_set_line(match, line);
16627  return match;
16628  }
16629  }
16630  }
16631 
16632  if (node2 && (n = nd_once_body(node2)) != 0) {
16633  NODE *match3;
16634 
16635  switch (nd_type(n)) {
16636  case NODE_LIT:
16637  if (!RB_TYPE_P(n->nd_lit, T_REGEXP)) break;
16638  /* fallthru */
16639  case NODE_DREGX:
16640  match3 = NEW_MATCH3(node2, node1, loc);
16641  return match3;
16642  }
16643  }
16644 
16645  n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
16646  nd_set_line(n, line);
16647  return n;
16648 }
16649 
16650 # if WARN_PAST_SCOPE
16651 static int
16652 past_dvar_p(struct parser_params *p, ID id)
16653 {
16654  struct vtable *past = p->lvtbl->past;
16655  while (past) {
16656  if (vtable_included(past, id)) return 1;
16657  past = past->prev;
16658  }
16659  return 0;
16660 }
16661 # endif
16662 
16663 /* As Ripper#warn does not have arguments for the location, so the
16664  * following messages cannot be separated */
16665 #define WARN_LOCATION(type) do { \
16666  if (p->warn_location) { \
16667  int line; \
16668  VALUE file = rb_source_location(&line); \
16669  rb_warn3(type" in eval may not return location in binding;" \
16670  " use Binding#source_location instead\n" \
16671  "%"PRIsWARN":%d: warning: in `%"PRIsWARN"'", \
16672  file, WARN_I(line), rb_id2str(rb_frame_this_func())); \
16673  } \
16674 } while (0)
16675 
16676 static int
16677 numparam_nested_p(struct parser_params *p)
16678 {
16679  struct local_vars *local = p->lvtbl;
16680  NODE *outer = local->numparam.outer;
16681  NODE *inner = local->numparam.inner;
16682  if (outer || inner) {
16683  NODE *used = outer ? outer : inner;
16684  compile_error(p, "numbered parameter is already used in\n"
16685  "%s:%d: %s block here",
16687  outer ? "outer" : "inner");
16688  parser_show_error_line(p, &used->nd_loc);
16689  return 1;
16690  }
16691  return 0;
16692 }
16693 
16694 static NODE*
16695 gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
16696 {
16697  ID *vidp = NULL;
16698  NODE *node;
16699  switch (id) {
16700  case keyword_self:
16701  return NEW_SELF(loc);
16702  case keyword_nil:
16703  return NEW_NIL(loc);
16704  case keyword_true:
16705  return NEW_TRUE(loc);
16706  case keyword_false:
16707  return NEW_FALSE(loc);
16708  case keyword__FILE__:
16709  WARN_LOCATION("__FILE__");
16710  {
16711  VALUE file = p->ruby_sourcefile_string;
16712  if (NIL_P(file))
16713  file = rb_str_new(0, 0);
16714  else
16715  file = rb_str_dup(file);
16716  node = NEW_STR(file, loc);
16717  RB_OBJ_WRITTEN(p->ast, Qnil, file);
16718  }
16719  return node;
16720  case keyword__LINE__:
16721  WARN_LOCATION("__LINE__");
16722  return NEW_LIT(INT2FIX(p->tokline), loc);
16723  case keyword__ENCODING__:
16724  node = NEW_LIT(rb_enc_from_encoding(p->enc), loc);
16725  RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
16726  return node;
16727 
16728  }
16729  switch (id_type(id)) {
16730  case ID_LOCAL:
16731  if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
16732  if (NUMPARAM_ID_P(id) && numparam_nested_p(p)) return 0;
16733  if (id == p->cur_arg) {
16734  compile_error(p, "circular argument reference - %"PRIsWARN, rb_id2str(id));
16735  return 0;
16736  }
16737  if (vidp) *vidp |= LVAR_USED;
16738  node = NEW_DVAR(id, loc);
16739  return node;
16740  }
16741  if (local_id_ref(p, id, &vidp)) {
16742  if (id == p->cur_arg) {
16743  compile_error(p, "circular argument reference - %"PRIsWARN, rb_id2str(id));
16744  return 0;
16745  }
16746  if (vidp) *vidp |= LVAR_USED;
16747  node = NEW_LVAR(id, loc);
16748  return node;
16749  }
16750  if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
16751  parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
16752  if (numparam_nested_p(p)) return 0;
16753  node = NEW_DVAR(id, loc);
16754  struct local_vars *local = p->lvtbl;
16755  if (!local->numparam.current) local->numparam.current = node;
16756  return node;
16757  }
16758 # if WARN_PAST_SCOPE
16759  if (!p->in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
16760  rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
16761  }
16762 # endif
16763  /* method call without arguments */
16764  return NEW_VCALL(id, loc);
16765  case ID_GLOBAL:
16766  return NEW_GVAR(id, loc);
16767  case ID_INSTANCE:
16768  return NEW_IVAR(id, loc);
16769  case ID_CONST:
16770  return NEW_CONST(id, loc);
16771  case ID_CLASS:
16772  return NEW_CVAR(id, loc);
16773  }
16774  compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
16775  return 0;
16776 }
16777 
16778 static NODE *
16779 opt_arg_append(NODE *opt_list, NODE *opt)
16780 {
16781  NODE *opts = opt_list;
16782  opts->nd_loc.end_pos = opt->nd_loc.end_pos;
16783 
16784  while (opts->nd_next) {
16785  opts = opts->nd_next;
16786  opts->nd_loc.end_pos = opt->nd_loc.end_pos;
16787  }
16788  opts->nd_next = opt;
16789 
16790  return opt_list;
16791 }
16792 
16793 static NODE *
16794 kwd_append(NODE *kwlist, NODE *kw)
16795 {
16796  if (kwlist) {
16797  NODE *kws = kwlist;
16798  kws->nd_loc.end_pos = kw->nd_loc.end_pos;
16799  while (kws->nd_next) {
16800  kws = kws->nd_next;
16801  kws->nd_loc.end_pos = kw->nd_loc.end_pos;
16802  }
16803  kws->nd_next = kw;
16804  }
16805  return kwlist;
16806 }
16807 
16808 static NODE *
16809 new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc)
16810 {
16811  return NEW_DEFINED(remove_begin_all(expr), loc);
16812 }
16813 
16814 static NODE*
16815 symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
16816 {
16817  if (nd_type(symbol) == NODE_DSTR) {
16818  nd_set_type(symbol, NODE_DSYM);
16819  }
16820  else {
16821  nd_set_type(symbol, NODE_LIT);
16822  RB_OBJ_WRITTEN(p->ast, Qnil, symbol->nd_lit = rb_str_intern(symbol->nd_lit));
16823  }
16824  return list_append(p, symbols, symbol);
16825 }
16826 
16827 static NODE *
16828 new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc)
16829 {
16830  NODE *list, *prev;
16831  VALUE lit;
16832 
16833  if (!node) {
16834  node = NEW_LIT(reg_compile(p, STR_NEW0(), options), loc);
16835  RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
16836  return node;
16837  }
16838  switch (nd_type(node)) {
16839  case NODE_STR:
16840  {
16841  VALUE src = node->nd_lit;
16842  nd_set_type(node, NODE_LIT);
16843  nd_set_loc(node, loc);
16844  RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit = reg_compile(p, src, options));
16845  }
16846  break;
16847  default:
16848  lit = STR_NEW0();
16849  node = NEW_NODE(NODE_DSTR, lit, 1, NEW_LIST(node, loc), loc);
16850  RB_OBJ_WRITTEN(p->ast, Qnil, lit);
16851  /* fall through */
16852  case NODE_DSTR:
16853  nd_set_type(node, NODE_DREGX);
16854  nd_set_loc(node, loc);
16855  node->nd_cflag = options & RE_OPTION_MASK;
16856  if (!NIL_P(node->nd_lit)) reg_fragment_check(p, node->nd_lit, options);
16857  for (list = (prev = node)->nd_next; list; list = list->nd_next) {
16858  if (nd_type(list->nd_head) == NODE_STR) {
16859  VALUE tail = list->nd_head->nd_lit;
16860  if (reg_fragment_check(p, tail, options) && prev && !NIL_P(prev->nd_lit)) {
16861  VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit;
16862  if (!literal_concat0(p, lit, tail)) {
16863  return NEW_NIL(loc); /* dummy node on error */
16864  }
16865  rb_str_resize(tail, 0);
16866  prev->nd_next = list->nd_next;
16867  rb_discard_node(p, list->nd_head);
16868  rb_discard_node(p, list);
16869  list = prev;
16870  }
16871  else {
16872  prev = list;
16873  }
16874  }
16875  else {
16876  prev = 0;
16877  }
16878  }
16879  if (!node->nd_next) {
16880  VALUE src = node->nd_lit;
16881  nd_set_type(node, NODE_LIT);
16882  RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit = reg_compile(p, src, options));
16883  }
16884  if (options & RE_OPTION_ONCE) {
16885  node = NEW_NODE(NODE_ONCE, 0, node, 0, loc);
16886  }
16887  break;
16888  }
16889  return node;
16890 }
16891 
16892 static NODE *
16893 new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
16894 {
16895  if (!k) return 0;
16896  return NEW_KW_ARG(0, (k), loc);
16897 }
16898 
16899 static NODE *
16900 new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
16901 {
16902  if (!node) {
16903  VALUE lit = STR_NEW0();
16904  NODE *xstr = NEW_XSTR(lit, loc);
16905  RB_OBJ_WRITTEN(p->ast, Qnil, lit);
16906  return xstr;
16907  }
16908  switch (nd_type(node)) {
16909  case NODE_STR:
16910  nd_set_type(node, NODE_XSTR);
16911  nd_set_loc(node, loc);
16912  break;
16913  case NODE_DSTR:
16914  nd_set_type(node, NODE_DXSTR);
16915  nd_set_loc(node, loc);
16916  break;
16917  default:
16918  node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node, loc), loc);
16919  break;
16920  }
16921  return node;
16922 }
16923 
16924 static void
16925 check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
16926 {
16927  VALUE lit;
16928 
16929  if (!arg || !p->case_labels) return;
16930 
16932  if (lit == Qundef) return;
16933  if (nd_type(arg) == NODE_STR) {
16934  RB_OBJ_WRITTEN(p->ast, Qnil, arg->nd_lit = lit);
16935  }
16936 
16937  if (NIL_P(p->case_labels)) {
16939  }
16940  else {
16941  VALUE line = rb_hash_lookup(p->case_labels, lit);
16942  if (!NIL_P(line)) {
16943  rb_warning1("duplicated `when' clause with line %d is ignored",
16944  WARN_IVAL(line));
16945  return;
16946  }
16947  }
16949 }
16950 
16951 #else /* !RIPPER */
16952 static int
16953 id_is_var(struct parser_params *p, ID id)
16954 {
16955  if (is_notop_id(id)) {
16956  switch (id & ID_SCOPE_MASK) {
16957  case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
16958  return 1;
16959  case ID_LOCAL:
16960  if (dyna_in_block(p)) {
16961  if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
16962  }
16963  if (local_id(p, id)) return 1;
16964  /* method call without arguments */
16965  return 0;
16966  }
16967  }
16968  compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
16969  return 0;
16970 }
16971 
16972 static VALUE
16973 new_regexp(struct parser_params *p, VALUE re, VALUE opt, const YYLTYPE *loc)
16974 {
16975  VALUE src = 0, err;
16976  int options = 0;
16977  if (ripper_is_node_yylval(re)) {
16978  src = RNODE(re)->nd_cval;
16979  re = RNODE(re)->nd_rval;
16980  }
16981  if (ripper_is_node_yylval(opt)) {
16982  options = (int)RNODE(opt)->nd_tag;
16983  opt = RNODE(opt)->nd_rval;
16984  }
16985  if (src && NIL_P(parser_reg_compile(p, src, options, &err))) {
16986  compile_error(p, "%"PRIsVALUE, err);
16987  }
16988  return dispatch2(regexp_literal, re, opt);
16989 }
16990 #endif /* !RIPPER */
16991 
16992 
16993 #ifndef RIPPER
16994 static const char rb_parser_lex_state_names[][8] = {
16995  "BEG", "END", "ENDARG", "ENDFN", "ARG",
16996  "CMDARG", "MID", "FNAME", "DOT", "CLASS",
16997  "LABEL", "LABELED","FITEM",
16998 };
16999 
17000 static VALUE
17001 append_lex_state_name(enum lex_state_e state, VALUE buf)
17002 {
17003  int i, sep = 0;
17004  unsigned int mask = 1;
17005  static const char none[] = "NONE";
17006 
17007  for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
17008  if ((unsigned)state & mask) {
17009  if (sep) {
17010  rb_str_cat(buf, "|", 1);
17011  }
17012  sep = 1;
17013  rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
17014  }
17015  }
17016  if (!sep) {
17017  rb_str_cat(buf, none, sizeof(none)-1);
17018  }
17019  return buf;
17020 }
17021 
17022 static void
17023 flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
17024 {
17025  VALUE mesg = p->debug_buffer;
17026 
17027  if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
17028  p->debug_buffer = Qnil;
17029  rb_io_puts(1, &mesg, out);
17030  }
17031  if (!NIL_P(str) && RSTRING_LEN(str)) {
17033  }
17034 }
17035 
17036 enum lex_state_e
17038  enum lex_state_e to, int line)
17039 {
17040  VALUE mesg;
17041  mesg = rb_str_new_cstr("lex_state: ");
17042  append_lex_state_name(from, mesg);
17043  rb_str_cat_cstr(mesg, " -> ");
17044  append_lex_state_name(to, mesg);
17045  rb_str_catf(mesg, " at line %d\n", line);
17046  flush_debug_buffer(p, p->debug_output, mesg);
17047  return to;
17048 }
17049 
17050 VALUE
17052 {
17053  return rb_fstring(append_lex_state_name(state, rb_str_new(0, 0)));
17054 }
17055 
17056 static void
17057 append_bitstack_value(stack_type stack, VALUE mesg)
17058 {
17059  if (stack == 0) {
17060  rb_str_cat_cstr(mesg, "0");
17061  }
17062  else {
17063  stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
17064  for (; mask && !(stack & mask); mask >>= 1) continue;
17065  for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
17066  }
17067 }
17068 
17069 void
17071  const char *name, int line)
17072 {
17073  VALUE mesg = rb_sprintf("%s: ", name);
17074  append_bitstack_value(stack, mesg);
17075  rb_str_catf(mesg, " at line %d\n", line);
17076  flush_debug_buffer(p, p->debug_output, mesg);
17077 }
17078 
17079 void
17080 rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
17081 {
17082  va_list ap;
17083  VALUE mesg = rb_str_new_cstr("internal parser error: ");
17084 
17085  va_start(ap, fmt);
17086  rb_str_vcatf(mesg, fmt, ap);
17087  va_end(ap);
17088  parser_yyerror(p, NULL, RSTRING_PTR(mesg));
17089  RB_GC_GUARD(mesg);
17090 
17091  mesg = rb_str_new(0, 0);
17092  append_lex_state_name(p->lex.state, mesg);
17093  compile_error(p, "lex.state: %"PRIsVALUE, mesg);
17094  rb_str_resize(mesg, 0);
17095  append_bitstack_value(p->cond_stack, mesg);
17096  compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
17097  rb_str_resize(mesg, 0);
17098  append_bitstack_value(p->cmdarg_stack, mesg);
17099  compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
17100  if (p->debug_output == rb_stdout)
17101  p->debug_output = rb_stderr;
17102  p->debug = TRUE;
17103 }
17104 
17105 YYLTYPE *
17107 {
17108  int sourceline = here->sourceline;
17109  int beg_pos = (int)here->offset - here->quote
17110  - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
17111  int end_pos = (int)here->offset + here->length + here->quote;
17112 
17113  yylloc->beg_pos.lineno = sourceline;
17114  yylloc->beg_pos.column = beg_pos;
17115  yylloc->end_pos.lineno = sourceline;
17116  yylloc->end_pos.column = end_pos;
17117  return yylloc;
17118 }
17119 
17120 YYLTYPE *
17122 {
17123  yylloc->beg_pos.lineno = p->ruby_sourceline;
17124  yylloc->beg_pos.column = (int)(p->lex.ptok - p->lex.pbeg);
17125  yylloc->end_pos.lineno = p->ruby_sourceline;
17126  yylloc->end_pos.column = (int)(p->lex.ptok - p->lex.pbeg);
17127  return yylloc;
17128 }
17129 
17130 YYLTYPE *
17132 {
17133  yylloc->beg_pos.lineno = p->ruby_sourceline;
17134  yylloc->beg_pos.column = (int)(p->lex.ptok - p->lex.pbeg);
17135  yylloc->end_pos.lineno = p->ruby_sourceline;
17136  yylloc->end_pos.column = (int)(p->lex.pcur - p->lex.pbeg);
17137  return yylloc;
17138 }
17139 #endif /* !RIPPER */
17140 
17141 static void
17142 parser_token_value_print(struct parser_params *p, enum yytokentype type, const YYSTYPE *valp)
17143 {
17144  VALUE v;
17145 
17146  switch (type) {
17147  case tIDENTIFIER: case tFID: case tGVAR: case tIVAR:
17148  case tCONSTANT: case tCVAR: case tLABEL: case tOP_ASGN:
17149 #ifndef RIPPER
17150  v = rb_id2str(valp->id);
17151 #else
17152  v = valp->node->nd_rval;
17153 #endif
17154  rb_parser_printf(p, "%"PRIsVALUE, v);
17155  break;
17156  case tINTEGER: case tFLOAT: case tRATIONAL: case tIMAGINARY:
17157  case tSTRING_CONTENT: case tCHAR:
17158 #ifndef RIPPER
17159  v = valp->node->nd_lit;
17160 #else
17161  v = valp->val;
17162 #endif
17163  rb_parser_printf(p, "%+"PRIsVALUE, v);
17164  break;
17165  case tNTH_REF:
17166 #ifndef RIPPER
17167  rb_parser_printf(p, "$%ld", valp->node->nd_nth);
17168 #else
17169  rb_parser_printf(p, "%"PRIsVALUE, valp->val);
17170 #endif
17171  break;
17172  case tBACK_REF:
17173 #ifndef RIPPER
17174  rb_parser_printf(p, "$%c", (int)valp->node->nd_nth);
17175 #else
17176  rb_parser_printf(p, "%"PRIsVALUE, valp->val);
17177 #endif
17178  break;
17179  default:
17180  break;
17181  }
17182 }
17183 
17184 static int
17185 assignable0(struct parser_params *p, ID id, const char **err)
17186 {
17187  if (!id) return -1;
17188  switch (id) {
17189  case keyword_self:
17190  *err = "Can't change the value of self";
17191  return -1;
17192  case keyword_nil:
17193  *err = "Can't assign to nil";
17194  return -1;
17195  case keyword_true:
17196  *err = "Can't assign to true";
17197  return -1;
17198  case keyword_false:
17199  *err = "Can't assign to false";
17200  return -1;
17201  case keyword__FILE__:
17202  *err = "Can't assign to __FILE__";
17203  return -1;
17204  case keyword__LINE__:
17205  *err = "Can't assign to __LINE__";
17206  return -1;
17207  case keyword__ENCODING__:
17208  *err = "Can't assign to __ENCODING__";
17209  return -1;
17210  }
17211  switch (id_type(id)) {
17212  case ID_LOCAL:
17213  if (dyna_in_block(p)) {
17214  if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
17215  compile_error(p, "Can't assign to numbered parameter _%d",
17216  NUMPARAM_ID_TO_IDX(id));
17217  return -1;
17218  }
17219  if (dvar_curr(p, id)) return NODE_DASGN_CURR;
17220  if (dvar_defined(p, id)) return NODE_DASGN;
17221  if (local_id(p, id)) return NODE_LASGN;
17222  dyna_var(p, id);
17223  return NODE_DASGN_CURR;
17224  }
17225  else {
17226  if (!local_id(p, id)) local_var(p, id);
17227  return NODE_LASGN;
17228  }
17229  break;
17230  case ID_GLOBAL: return NODE_GASGN;
17231  case ID_INSTANCE: return NODE_IASGN;
17232  case ID_CONST:
17233  if (!p->in_def) return NODE_CDECL;
17234  *err = "dynamic constant assignment";
17235  return -1;
17236  case ID_CLASS: return NODE_CVASGN;
17237  default:
17238  compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
17239  }
17240  return -1;
17241 }
17242 
17243 #ifndef RIPPER
17244 static NODE*
17245 assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
17246 {
17247  const char *err = 0;
17248  int node_type = assignable0(p, id, &err);
17249  switch (node_type) {
17250  case NODE_DASGN_CURR: return NEW_DASGN_CURR(id, val, loc);
17251  case NODE_DASGN: return NEW_DASGN(id, val, loc);
17252  case NODE_LASGN: return NEW_LASGN(id, val, loc);
17253  case NODE_GASGN: return NEW_GASGN(id, val, loc);
17254  case NODE_IASGN: return NEW_IASGN(id, val, loc);
17255  case NODE_CDECL: return NEW_CDECL(id, val, 0, loc);
17256  case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
17257  }
17258  if (err) yyerror1(loc, err);
17259  return NEW_BEGIN(0, loc);
17260 }
17261 #else
17262 static VALUE
17263 assignable(struct parser_params *p, VALUE lhs)
17264 {
17265  const char *err = 0;
17266  assignable0(p, get_id(lhs), &err);
17267  if (err) lhs = assign_error(p, lhs);
17268  return lhs;
17269 }
17270 #endif
17271 
17272 static int
17273 is_private_local_id(ID name)
17274 {
17275  VALUE s;
17276  if (name == idUScore) return 1;
17277  if (!is_local_id(name)) return 0;
17278  s = rb_id2str(name);
17279  if (!s) return 0;
17280  return RSTRING_PTR(s)[0] == '_';
17281 }
17282 
17283 static int
17284 shadowing_lvar_0(struct parser_params *p, ID name)
17285 {
17286  if (is_private_local_id(name)) return 1;
17287  if (dyna_in_block(p)) {
17288  if (dvar_curr(p, name)) {
17289  yyerror0("duplicated argument name");
17290  }
17291  else if (dvar_defined(p, name) || local_id(p, name)) {
17292  vtable_add(p->lvtbl->vars, name);
17293  if (p->lvtbl->used) {
17295  }
17296  return 0;
17297  }
17298  }
17299  else {
17300  if (local_id(p, name)) {
17301  yyerror0("duplicated argument name");
17302  }
17303  }
17304  return 1;
17305 }
17306 
17307 static ID
17308 shadowing_lvar(struct parser_params *p, ID name)
17309 {
17310  shadowing_lvar_0(p, name);
17311  return name;
17312 }
17313 
17314 static void
17315 new_bv(struct parser_params *p, ID name)
17316 {
17317  if (!name) return;
17318  if (!is_local_id(name)) {
17319  compile_error(p, "invalid local variable - %"PRIsVALUE,
17320  rb_id2str(name));
17321  return;
17322  }
17323  if (!shadowing_lvar_0(p, name)) return;
17324  dyna_var(p, name);
17325 }
17326 
17327 #ifndef RIPPER
17328 static NODE *
17329 aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
17330 {
17331  return NEW_ATTRASGN(recv, tASET, idx, loc);
17332 }
17333 
17334 static void
17335 block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
17336 {
17337  if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) {
17338  compile_error(p, "both block arg and actual block given");
17339  }
17340 }
17341 
17342 static NODE *
17343 attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
17344 {
17345  if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
17346  return NEW_ATTRASGN(recv, id, 0, loc);
17347 }
17348 
17349 static void
17350 rb_backref_error(struct parser_params *p, NODE *node)
17351 {
17352  switch (nd_type(node)) {
17353  case NODE_NTH_REF:
17354  compile_error(p, "Can't set variable $%ld", node->nd_nth);
17355  break;
17356  case NODE_BACK_REF:
17357  compile_error(p, "Can't set variable $%c", (int)node->nd_nth);
17358  break;
17359  }
17360 }
17361 
17362 static NODE *
17363 arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
17364 {
17365  if (!node1) return NEW_LIST(node2, &node2->nd_loc);
17366  switch (nd_type(node1)) {
17367  case NODE_LIST:
17368  return list_append(p, node1, node2);
17369  case NODE_BLOCK_PASS:
17370  node1->nd_head = arg_append(p, node1->nd_head, node2, loc);
17371  node1->nd_loc.end_pos = node1->nd_head->nd_loc.end_pos;
17372  return node1;
17373  case NODE_ARGSPUSH:
17374  node1->nd_body = list_append(p, NEW_LIST(node1->nd_body, &node1->nd_body->nd_loc), node2);
17375  node1->nd_loc.end_pos = node1->nd_body->nd_loc.end_pos;
17376  nd_set_type(node1, NODE_ARGSCAT);
17377  return node1;
17378  case NODE_ARGSCAT:
17379  if (nd_type(node1->nd_body) != NODE_LIST) break;
17380  node1->nd_body = list_append(p, node1->nd_body, node2);
17381  node1->nd_loc.end_pos = node1->nd_body->nd_loc.end_pos;
17382  return node1;
17383  }
17384  return NEW_ARGSPUSH(node1, node2, loc);
17385 }
17386 
17387 static NODE *
17388 arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
17389 {
17390  if (!node2) return node1;
17391  switch (nd_type(node1)) {
17392  case NODE_BLOCK_PASS:
17393  if (node1->nd_head)
17394  node1->nd_head = arg_concat(p, node1->nd_head, node2, loc);
17395  else
17396  node1->nd_head = NEW_LIST(node2, loc);
17397  return node1;
17398  case NODE_ARGSPUSH:
17399  if (nd_type(node2) != NODE_LIST) break;
17400  node1->nd_body = list_concat(NEW_LIST(node1->nd_body, loc), node2);
17401  nd_set_type(node1, NODE_ARGSCAT);
17402  return node1;
17403  case NODE_ARGSCAT:
17404  if (nd_type(node2) != NODE_LIST ||
17405  nd_type(node1->nd_body) != NODE_LIST) break;
17406  node1->nd_body = list_concat(node1->nd_body, node2);
17407  return node1;
17408  }
17409  return NEW_ARGSCAT(node1, node2, loc);
17410 }
17411 
17412 static NODE *
17413 last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
17414 {
17415  NODE *n1;
17416  if ((n1 = splat_array(args)) != 0) {
17417  return list_append(p, n1, last_arg);
17418  }
17419  return arg_append(p, args, last_arg, loc);
17420 }
17421 
17422 static NODE *
17423 rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
17424 {
17425  NODE *n1;
17426  if ((nd_type(rest_arg) == NODE_LIST) && (n1 = splat_array(args)) != 0) {
17427  return list_concat(n1, rest_arg);
17428  }
17429  return arg_concat(p, args, rest_arg, loc);
17430 }
17431 
17432 static NODE *
17433 splat_array(NODE* node)
17434 {
17435  if (nd_type(node) == NODE_SPLAT) node = node->nd_head;
17436  if (nd_type(node) == NODE_LIST) return node;
17437  return 0;
17438 }
17439 
17440 static void
17441 mark_lvar_used(struct parser_params *p, NODE *rhs)
17442 {
17443  ID *vidp = NULL;
17444  if (!rhs) return;
17445  switch (nd_type(rhs)) {
17446  case NODE_LASGN:
17447  if (local_id_ref(p, rhs->nd_vid, &vidp)) {
17448  if (vidp) *vidp |= LVAR_USED;
17449  }
17450  break;
17451  case NODE_DASGN:
17452  case NODE_DASGN_CURR:
17453  if (dvar_defined_ref(p, rhs->nd_vid, &vidp)) {
17454  if (vidp) *vidp |= LVAR_USED;
17455  }
17456  break;
17457 #if 0
17458  case NODE_MASGN:
17459  for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
17460  mark_lvar_used(p, rhs->nd_head);
17461  }
17462  break;
17463 #endif
17464  }
17465 }
17466 
17467 static NODE *
17468 node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, const YYLTYPE *loc)
17469 {
17470  if (!lhs) return 0;
17471 
17472  switch (nd_type(lhs)) {
17473  case NODE_GASGN:
17474  case NODE_IASGN:
17475  case NODE_LASGN:
17476  case NODE_DASGN:
17477  case NODE_DASGN_CURR:
17478  case NODE_MASGN:
17479  case NODE_CDECL:
17480  case NODE_CVASGN:
17481  lhs->nd_value = rhs;
17482  nd_set_loc(lhs, loc);
17483  break;
17484 
17485  case NODE_ATTRASGN:
17486  lhs->nd_args = arg_append(p, lhs->nd_args, rhs, loc);
17487  nd_set_loc(lhs, loc);
17488  break;
17489 
17490  default:
17491  /* should not happen */
17492  break;
17493  }
17494 
17495  return lhs;
17496 }
17497 
17498 static NODE *
17499 value_expr_check(struct parser_params *p, NODE *node)
17500 {
17501  NODE *void_node = 0, *vn;
17502 
17503  if (!node) {
17504  rb_warning0("empty expression");
17505  }
17506  while (node) {
17507  switch (nd_type(node)) {
17508  case NODE_RETURN:
17509  case NODE_BREAK:
17510  case NODE_NEXT:
17511  case NODE_REDO:
17512  case NODE_RETRY:
17513  return void_node ? void_node : node;
17514 
17515  case NODE_CASE3:
17516  if (!node->nd_body || nd_type(node->nd_body) != NODE_IN) {
17517  compile_error(p, "unexpected node");
17518  return NULL;
17519  }
17520  if (node->nd_body->nd_body) {
17521  return NULL;
17522  }
17523  /* single line pattern matching */
17524  return void_node ? void_node : node;
17525 
17526  case NODE_BLOCK:
17527  while (node->nd_next) {
17528  node = node->nd_next;
17529  }
17530  node = node->nd_head;
17531  break;
17532 
17533  case NODE_BEGIN:
17534  node = node->nd_body;
17535  break;
17536 
17537  case NODE_IF:
17538  case NODE_UNLESS:
17539  if (!node->nd_body) {
17540  return NULL;
17541  }
17542  else if (!node->nd_else) {
17543  return NULL;
17544  }
17545  vn = value_expr_check(p, node->nd_body);
17546  if (!vn) return NULL;
17547  if (!void_node) void_node = vn;
17548  node = node->nd_else;
17549  break;
17550 
17551  case NODE_AND:
17552  case NODE_OR:
17553  node = node->nd_1st;
17554  break;
17555 
17556  case NODE_LASGN:
17557  case NODE_DASGN:
17558  case NODE_DASGN_CURR:
17559  case NODE_MASGN:
17560  mark_lvar_used(p, node);
17561  return NULL;
17562 
17563  default:
17564  return NULL;
17565  }
17566  }
17567 
17568  return NULL;
17569 }
17570 
17571 static int
17572 value_expr_gen(struct parser_params *p, NODE *node)
17573 {
17574  NODE *void_node = value_expr_check(p, node);
17575  if (void_node) {
17576  yyerror1(&void_node->nd_loc, "void value expression");
17577  /* or "control never reach"? */
17578  return FALSE;
17579  }
17580  return TRUE;
17581 }
17582 static void
17583 void_expr(struct parser_params *p, NODE *node)
17584 {
17585  const char *useless = 0;
17586 
17587  if (!RTEST(ruby_verbose)) return;
17588 
17589  if (!node || !(node = nd_once_body(node))) return;
17590  switch (nd_type(node)) {
17591  case NODE_OPCALL:
17592  switch (node->nd_mid) {
17593  case '+':
17594  case '-':
17595  case '*':
17596  case '/':
17597  case '%':
17598  case tPOW:
17599  case tUPLUS:
17600  case tUMINUS:
17601  case '|':
17602  case '^':
17603  case '&':
17604  case tCMP:
17605  case '>':
17606  case tGEQ:
17607  case '<':
17608  case tLEQ:
17609  case tEQ:
17610  case tNEQ:
17611  useless = rb_id2name(node->nd_mid);
17612  break;
17613  }
17614  break;
17615 
17616  case NODE_LVAR:
17617  case NODE_DVAR:
17618  case NODE_GVAR:
17619  case NODE_IVAR:
17620  case NODE_CVAR:
17621  case NODE_NTH_REF:
17622  case NODE_BACK_REF:
17623  useless = "a variable";
17624  break;
17625  case NODE_CONST:
17626  useless = "a constant";
17627  break;
17628  case NODE_LIT:
17629  case NODE_STR:
17630  case NODE_DSTR:
17631  case NODE_DREGX:
17632  useless = "a literal";
17633  break;
17634  case NODE_COLON2:
17635  case NODE_COLON3:
17636  useless = "::";
17637  break;
17638  case NODE_DOT2:
17639  useless = "..";
17640  break;
17641  case NODE_DOT3:
17642  useless = "...";
17643  break;
17644  case NODE_SELF:
17645  useless = "self";
17646  break;
17647  case NODE_NIL:
17648  useless = "nil";
17649  break;
17650  case NODE_TRUE:
17651  useless = "true";
17652  break;
17653  case NODE_FALSE:
17654  useless = "false";
17655  break;
17656  case NODE_DEFINED:
17657  useless = "defined?";
17658  break;
17659  }
17660 
17661  if (useless) {
17662  rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
17663  }
17664 }
17665 
17666 static NODE *
17667 void_stmts(struct parser_params *p, NODE *node)
17668 {
17669  NODE *const n = node;
17670  if (!RTEST(ruby_verbose)) return n;
17671  if (!node) return n;
17672  if (nd_type(node) != NODE_BLOCK) return n;
17673 
17674  while (node->nd_next) {
17675  void_expr(p, node->nd_head);
17676  node = node->nd_next;
17677  }
17678  return n;
17679 }
17680 
17681 static NODE *
17682 remove_begin(NODE *node)
17683 {
17684  NODE **n = &node, *n1 = node;
17685  while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) {
17686  *n = n1 = n1->nd_body;
17687  }
17688  return node;
17689 }
17690 
17691 static NODE *
17692 remove_begin_all(NODE *node)
17693 {
17694  NODE **n = &node, *n1 = node;
17695  while (n1 && nd_type(n1) == NODE_BEGIN) {
17696  *n = n1 = n1->nd_body;
17697  }
17698  return node;
17699 }
17700 
17701 static void
17702 reduce_nodes(struct parser_params *p, NODE **body)
17703 {
17704  NODE *node = *body;
17705 
17706  if (!node) {
17707  *body = NEW_NIL(&NULL_LOC);
17708  return;
17709  }
17710 #define subnodes(n1, n2) \
17711  ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \
17712  (!node->n2) ? (body = &node->n1, 1) : \
17713  (reduce_nodes(p, &node->n1), body = &node->n2, 1))
17714 
17715  while (node) {
17716  int newline = (int)(node->flags & NODE_FL_NEWLINE);
17717  switch (nd_type(node)) {
17718  end:
17719  case NODE_NIL:
17720  *body = 0;
17721  return;
17722  case NODE_RETURN:
17723  *body = node = node->nd_stts;
17724  if (newline && node) node->flags |= NODE_FL_NEWLINE;
17725  continue;
17726  case NODE_BEGIN:
17727  *body = node = node->nd_body;
17728  if (newline && node) node->flags |= NODE_FL_NEWLINE;
17729  continue;
17730  case NODE_BLOCK:
17731  body = &node->nd_end->nd_head;
17732  break;
17733  case NODE_IF:
17734  case NODE_UNLESS:
17735  if (subnodes(nd_body, nd_else)) break;
17736  return;
17737  case NODE_CASE:
17738  body = &node->nd_body;
17739  break;
17740  case NODE_WHEN:
17741  if (!subnodes(nd_body, nd_next)) goto end;
17742  break;
17743  case NODE_ENSURE:
17744  if (!subnodes(nd_head, nd_resq)) goto end;
17745  break;
17746  case NODE_RESCUE:
17747  if (node->nd_else) {
17748  body = &node->nd_resq;
17749  break;
17750  }
17751  if (!subnodes(nd_head, nd_resq)) goto end;
17752  break;
17753  default:
17754  return;
17755  }
17756  node = *body;
17757  if (newline && node) node->flags |= NODE_FL_NEWLINE;
17758  }
17759 
17760 #undef subnodes
17761 }
17762 
17763 static int
17764 is_static_content(NODE *node)
17765 {
17766  if (!node) return 1;
17767  switch (nd_type(node)) {
17768  case NODE_HASH:
17769  if (!(node = node->nd_head)) break;
17770  case NODE_LIST:
17771  do {
17772  if (!is_static_content(node->nd_head)) return 0;
17773  } while ((node = node->nd_next) != 0);
17774  case NODE_LIT:
17775  case NODE_STR:
17776  case NODE_NIL:
17777  case NODE_TRUE:
17778  case NODE_FALSE:
17779  case NODE_ZLIST:
17780  break;
17781  default:
17782  return 0;
17783  }
17784  return 1;
17785 }
17786 
17787 static int
17788 assign_in_cond(struct parser_params *p, NODE *node)
17789 {
17790  switch (nd_type(node)) {
17791  case NODE_MASGN:
17792  case NODE_LASGN:
17793  case NODE_DASGN:
17794  case NODE_DASGN_CURR:
17795  case NODE_GASGN:
17796  case NODE_IASGN:
17797  break;
17798 
17799  default:
17800  return 0;
17801  }
17802 
17803  if (!node->nd_value) return 1;
17804  if (is_static_content(node->nd_value)) {
17805  /* reports always */
17806  parser_warn(p, node->nd_value, "found `= literal' in conditional, should be ==");
17807  }
17808  return 1;
17809 }
17810 
17815 };
17816 
17817 #define SWITCH_BY_COND_TYPE(t, w, arg) \
17818  switch (t) { \
17819  case COND_IN_OP: break; \
17820  case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
17821  case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
17822  }
17823 
17824 static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*);
17825 
17826 static NODE*
17827 range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
17828 {
17829  enum node_type type;
17830 
17831  if (node == 0) return 0;
17832 
17833  type = nd_type(node);
17834  value_expr(node);
17835  if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
17836  if (!e_option_supplied(p)) parser_warn(p, node, "integer literal in flip-flop");
17837  return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$."), loc), loc), loc);
17838  }
17839  return cond0(p, node, COND_IN_FF, loc);
17840 }
17841 
17842 static NODE*
17843 cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc)
17844 {
17845  if (node == 0) return 0;
17846  if (!(node = nd_once_body(node))) return 0;
17847  assign_in_cond(p, node);
17848 
17849  switch (nd_type(node)) {
17850  case NODE_DSTR:
17851  case NODE_EVSTR:
17852  case NODE_STR:
17853  SWITCH_BY_COND_TYPE(type, warn, "string ")
17854  break;
17855 
17856  case NODE_DREGX:
17857  if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ")
17858 
17859  return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
17860 
17861  case NODE_AND:
17862  case NODE_OR:
17863  node->nd_1st = cond0(p, node->nd_1st, COND_IN_COND, loc);
17864  node->nd_2nd = cond0(p, node->nd_2nd, COND_IN_COND, loc);
17865  break;
17866 
17867  case NODE_DOT2:
17868  case NODE_DOT3:
17869  node->nd_beg = range_op(p, node->nd_beg, loc);
17870  node->nd_end = range_op(p, node->nd_end, loc);
17871  if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
17872  else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
17873  break;
17874 
17875  case NODE_DSYM:
17876  SWITCH_BY_COND_TYPE(type, warning, "string ")
17877  break;
17878 
17879  case NODE_LIT:
17880  if (RB_TYPE_P(node->nd_lit, T_REGEXP)) {
17881  if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ")
17882  nd_set_type(node, NODE_MATCH);
17883  }
17884  else if (node->nd_lit == Qtrue ||
17885  node->nd_lit == Qfalse) {
17886  /* booleans are OK, e.g., while true */
17887  }
17888  else {
17889  SWITCH_BY_COND_TYPE(type, warning, "")
17890  }
17891  default:
17892  break;
17893  }
17894  return node;
17895 }
17896 
17897 static NODE*
17898 cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
17899 {
17900  if (node == 0) return 0;
17901  return cond0(p, node, COND_IN_COND, loc);
17902 }
17903 
17904 static NODE*
17905 method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
17906 {
17907  if (node == 0) return 0;
17908  return cond0(p, node, COND_IN_OP, loc);
17909 }
17910 
17911 static NODE*
17912 new_if(struct parser_params *p, NODE *cc, NODE *left, NODE *right, const YYLTYPE *loc)
17913 {
17914  if (!cc) return right;
17915  cc = cond0(p, cc, COND_IN_COND, loc);
17916  return newline_node(NEW_IF(cc, left, right, loc));
17917 }
17918 
17919 static NODE*
17920 new_unless(struct parser_params *p, NODE *cc, NODE *left, NODE *right, const YYLTYPE *loc)
17921 {
17922  if (!cc) return right;
17923  cc = cond0(p, cc, COND_IN_COND, loc);
17924  return newline_node(NEW_UNLESS(cc, left, right, loc));
17925 }
17926 
17927 static NODE*
17928 logop(struct parser_params *p, ID id, NODE *left, NODE *right,
17929  const YYLTYPE *op_loc, const YYLTYPE *loc)
17930 {
17931  enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
17932  NODE *op;
17933  value_expr(left);
17934  if (left && (enum node_type)nd_type(left) == type) {
17935  NODE *node = left, *second;
17936  while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) {
17937  node = second;
17938  }
17939  node->nd_2nd = NEW_NODE(type, second, right, 0, loc);
17940  nd_set_line(node->nd_2nd, op_loc->beg_pos.lineno);
17941  left->nd_loc.end_pos = loc->end_pos;
17942  return left;
17943  }
17944  op = NEW_NODE(type, left, right, 0, loc);
17945  nd_set_line(op, op_loc->beg_pos.lineno);
17946  return op;
17947 }
17948 
17949 static void
17950 no_blockarg(struct parser_params *p, NODE *node)
17951 {
17952  if (node && nd_type(node) == NODE_BLOCK_PASS) {
17953  compile_error(p, "block argument should not be given");
17954  }
17955 }
17956 
17957 static NODE *
17958 ret_args(struct parser_params *p, NODE *node)
17959 {
17960  if (node) {
17961  no_blockarg(p, node);
17962  if (nd_type(node) == NODE_LIST) {
17963  if (node->nd_next == 0) {
17964  node = node->nd_head;
17965  }
17966  else {
17967  nd_set_type(node, NODE_VALUES);
17968  }
17969  }
17970  }
17971  return node;
17972 }
17973 
17974 static NODE *
17975 new_yield(struct parser_params *p, NODE *node, const YYLTYPE *loc)
17976 {
17977  if (node) no_blockarg(p, node);
17978 
17979  return NEW_YIELD(node, loc);
17980 }
17981 
17982 static VALUE
17983 negate_lit(struct parser_params *p, VALUE lit)
17984 {
17985  if (FIXNUM_P(lit)) {
17986  return LONG2FIX(-FIX2LONG(lit));
17987  }
17988  if (SPECIAL_CONST_P(lit)) {
17989 #if USE_FLONUM
17990  if (FLONUM_P(lit)) {
17991  return DBL2NUM(-RFLOAT_VALUE(lit));
17992  }
17993 #endif
17994  goto unknown;
17995  }
17996  switch (BUILTIN_TYPE(lit)) {
17997  case T_BIGNUM:
17998  BIGNUM_NEGATE(lit);
17999  lit = rb_big_norm(lit);
18000  break;
18001  case T_RATIONAL:
18002  RRATIONAL_SET_NUM(lit, negate_lit(p, RRATIONAL(lit)->num));
18003  break;
18004  case T_COMPLEX:
18005  RCOMPLEX_SET_REAL(lit, negate_lit(p, RCOMPLEX(lit)->real));
18006  RCOMPLEX_SET_IMAG(lit, negate_lit(p, RCOMPLEX(lit)->imag));
18007  break;
18008  case T_FLOAT:
18009  RFLOAT(lit)->float_value = -RFLOAT_VALUE(lit);
18010  break;
18011  unknown:
18012  default:
18013  rb_parser_fatal(p, "unknown literal type (%s) passed to negate_lit",
18014  rb_builtin_class_name(lit));
18015  break;
18016  }
18017  return lit;
18018 }
18019 
18020 static NODE *
18021 arg_blk_pass(NODE *node1, NODE *node2)
18022 {
18023  if (node2) {
18024  if (!node1) return node2;
18025  node2->nd_head = node1;
18026  nd_set_first_lineno(node2, nd_first_lineno(node1));
18027  nd_set_first_column(node2, nd_first_column(node1));
18028  return node2;
18029  }
18030  return node1;
18031 }
18032 
18033 static bool
18034 args_info_empty_p(struct rb_args_info *args)
18035 {
18036  if (args->pre_args_num) return false;
18037  if (args->post_args_num) return false;
18038  if (args->rest_arg) return false;
18039  if (args->opt_args) return false;
18040  if (args->block_arg) return false;
18041  if (args->kw_args) return false;
18042  if (args->kw_rest_arg) return false;
18043  return true;
18044 }
18045 
18046 static NODE*
18047 new_args(struct parser_params *p, NODE *pre_args, NODE *opt_args, ID rest_arg, NODE *post_args, NODE *tail, const YYLTYPE *loc)
18048 {
18049  int saved_line = p->ruby_sourceline;
18050  struct rb_args_info *args = tail->nd_ainfo;
18051 
18052  args->pre_args_num = pre_args ? rb_long2int(pre_args->nd_plen) : 0;
18053  args->pre_init = pre_args ? pre_args->nd_next : 0;
18054 
18055  args->post_args_num = post_args ? rb_long2int(post_args->nd_plen) : 0;
18056  args->post_init = post_args ? post_args->nd_next : 0;
18057  args->first_post_arg = post_args ? post_args->nd_pid : 0;
18058 
18059  args->rest_arg = rest_arg;
18060 
18061  args->opt_args = opt_args;
18062 
18063  args->ruby2_keywords = rest_arg == idFWD_REST;
18064 
18065  p->ruby_sourceline = saved_line;
18066  nd_set_loc(tail, loc);
18067 
18068  return tail;
18069 }
18070 
18071 static NODE*
18072 new_args_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *loc)
18073 {
18074  int saved_line = p->ruby_sourceline;
18075  NODE *node;
18077  struct rb_args_info *args = ZALLOC(struct rb_args_info);
18078  rb_imemo_tmpbuf_set_ptr(tmpbuf, args);
18079  args->imemo = tmpbuf;
18080  node = NEW_NODE(NODE_ARGS, 0, 0, args, &NULL_LOC);
18081  RB_OBJ_WRITTEN(p->ast, Qnil, tmpbuf);
18082  if (p->error_p) return node;
18083 
18084  args->block_arg = block;
18085  args->kw_args = kw_args;
18086 
18087  if (kw_args) {
18088  /*
18089  * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
18090  * variable order: k1, kr1, k2, &b, internal_id, krest
18091  * #=> <reorder>
18092  * variable order: kr1, k1, k2, internal_id, krest, &b
18093  */
18094  ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
18095  struct vtable *vtargs = p->lvtbl->args;
18096  NODE *kwn = kw_args;
18097 
18098  vtable_pop(vtargs, !!block + !!kw_rest_arg);
18099  required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
18100  while (kwn) {
18101  if (!NODE_REQUIRED_KEYWORD_P(kwn->nd_body))
18102  --kw_vars;
18103  --required_kw_vars;
18104  kwn = kwn->nd_next;
18105  }
18106 
18107  for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
18108  ID vid = kwn->nd_body->nd_vid;
18109  if (NODE_REQUIRED_KEYWORD_P(kwn->nd_body)) {
18110  *required_kw_vars++ = vid;
18111  }
18112  else {
18113  *kw_vars++ = vid;
18114  }
18115  }
18116 
18117  arg_var(p, kw_bits);
18118  if (kw_rest_arg) arg_var(p, kw_rest_arg);
18119  if (block) arg_var(p, block);
18120 
18121  args->kw_rest_arg = NEW_DVAR(kw_rest_arg, loc);
18122  args->kw_rest_arg->nd_cflag = kw_bits;
18123  }
18124  else if (kw_rest_arg == idNil) {
18125  args->no_kwarg = 1;
18126  }
18127  else if (kw_rest_arg) {
18128  args->kw_rest_arg = NEW_DVAR(kw_rest_arg, loc);
18129  }
18130 
18131  p->ruby_sourceline = saved_line;
18132  return node;
18133 }
18134 
18135 static NODE *
18136 args_with_numbered(struct parser_params *p, NODE *args, int max_numparam)
18137 {
18138  if (max_numparam > NO_PARAM) {
18139  if (!args) {
18140  YYLTYPE loc = RUBY_INIT_YYLLOC();
18141  args = new_args_tail(p, 0, 0, 0, 0);
18142  nd_set_loc(args, &loc);
18143  }
18144  args->nd_ainfo->pre_args_num = max_numparam;
18145  }
18146  return args;
18147 }
18148 
18149 static NODE*
18150 new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
18151 {
18152  struct rb_ary_pattern_info *apinfo = aryptn->nd_apinfo;
18153 
18154  aryptn->nd_pconst = constant;
18155 
18156  if (pre_arg) {
18157  NODE *pre_args = NEW_LIST(pre_arg, loc);
18158  if (apinfo->pre_args) {
18159  apinfo->pre_args = list_concat(pre_args, apinfo->pre_args);
18160  }
18161  else {
18162  apinfo->pre_args = pre_args;
18163  }
18164  }
18165  return aryptn;
18166 }
18167 
18168 static NODE*
18169 new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, ID rest_arg, NODE *post_args, const YYLTYPE *loc)
18170 {
18171  int saved_line = p->ruby_sourceline;
18172  NODE *node;
18174  struct rb_ary_pattern_info *apinfo = ZALLOC(struct rb_ary_pattern_info);
18175  rb_imemo_tmpbuf_set_ptr(tmpbuf, apinfo);
18176  node = NEW_NODE(NODE_ARYPTN, 0, 0, apinfo, loc);
18177  apinfo->imemo = tmpbuf;
18178  RB_OBJ_WRITTEN(p->ast, Qnil, tmpbuf);
18179 
18180  apinfo->pre_args = pre_args;
18181 
18182  if (has_rest) {
18183  if (rest_arg) {
18184  apinfo->rest_arg = assignable(p, rest_arg, 0, loc);
18185  }
18186  else {
18188  }
18189  }
18190  else {
18191  apinfo->rest_arg = NULL;
18192  }
18193 
18194  apinfo->post_args = post_args;
18195 
18196  p->ruby_sourceline = saved_line;
18197  return node;
18198 }
18199 
18200 static NODE*
18201 new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
18202 {
18203  hshptn->nd_pconst = constant;
18204  return hshptn;
18205 }
18206 
18207 static NODE*
18208 new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
18209 {
18210  int saved_line = p->ruby_sourceline;
18211  NODE *node, *kw_rest_arg_node;
18212 
18213  if (kw_rest_arg == idNil) {
18214  kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
18215  }
18216  else if (kw_rest_arg) {
18217  kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
18218  }
18219  else {
18220  kw_rest_arg_node = NULL;
18221  }
18222 
18223  node = NEW_NODE(NODE_HSHPTN, 0, kw_args, kw_rest_arg_node, loc);
18224 
18225  p->ruby_sourceline = saved_line;
18226  return node;
18227 }
18228 
18229 static NODE *
18230 new_case3(struct parser_params *p, NODE *val, NODE *pat, const YYLTYPE *loc)
18231 {
18232  NODE *node = NEW_CASE3(val, pat, loc);
18233 
18235  rb_warn0L(nd_line(node), "Pattern matching is experimental, and the behavior may change in future versions of Ruby!");
18236  return node;
18237 }
18238 
18239 static NODE*
18240 dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
18241 {
18242  VALUE lit;
18243 
18244  if (!node) {
18245  return NEW_LIT(ID2SYM(idNULL), loc);
18246  }
18247 
18248  switch (nd_type(node)) {
18249  case NODE_DSTR:
18250  nd_set_type(node, NODE_DSYM);
18251  nd_set_loc(node, loc);
18252  break;
18253  case NODE_STR:
18254  lit = node->nd_lit;
18255  RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit = ID2SYM(rb_intern_str(lit)));
18256  nd_set_type(node, NODE_LIT);
18257  nd_set_loc(node, loc);
18258  break;
18259  default:
18260  node = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST(node, loc), loc);
18261  break;
18262  }
18263  return node;
18264 }
18265 
18266 static int
18267 append_literal_keys(st_data_t k, st_data_t v, st_data_t h)
18268 {
18269  NODE *node = (NODE *)v;
18270  NODE **result = (NODE **)h;
18271  node->nd_alen = 2;
18272  node->nd_next->nd_end = node->nd_next;
18273  node->nd_next->nd_next = 0;
18274  if (*result)
18275  list_concat(*result, node);
18276  else
18277  *result = node;
18278  return ST_CONTINUE;
18279 }
18280 
18281 static NODE *
18282 remove_duplicate_keys(struct parser_params *p, NODE *hash)
18283 {
18284  st_table *literal_keys = st_init_numtable_with_size(hash->nd_alen / 2);
18285  NODE *result = 0;
18286  rb_code_location_t loc = hash->nd_loc;
18287  while (hash && hash->nd_head && hash->nd_next) {
18288  NODE *head = hash->nd_head;
18289  NODE *value = hash->nd_next;
18290  NODE *next = value->nd_next;
18291  VALUE key = (VALUE)head;
18292  st_data_t data;
18293  if (nd_type(head) == NODE_LIT &&
18294  st_lookup(literal_keys, (key = head->nd_lit), &data)) {
18296  "key %+"PRIsVALUE" is duplicated and overwritten on line %d",
18297  head->nd_lit, nd_line(head));
18298  head = ((NODE *)data)->nd_next;
18299  head->nd_head = block_append(p, head->nd_head, value->nd_head);
18300  }
18301  else {
18302  st_insert(literal_keys, (st_data_t)key, (st_data_t)hash);
18303  }
18304  hash = next;
18305  }
18306  st_foreach(literal_keys, append_literal_keys, (st_data_t)&result);
18307  st_free_table(literal_keys);
18308  if (hash) {
18309  if (!result) result = hash;
18310  else list_concat(result, hash);
18311  }
18312  result->nd_loc = loc;
18313  return result;
18314 }
18315 
18316 static NODE *
18317 new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
18318 {
18319  if (hash) hash = remove_duplicate_keys(p, hash);
18320  return NEW_HASH(hash, loc);
18321 }
18322 #endif
18323 
18324 static void
18325 error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
18326 {
18327  if (is_private_local_id(id)) {
18328  return;
18329  }
18330  if (st_is_member(p->pvtbl, id)) {
18331  yyerror1(loc, "duplicated variable name");
18332  }
18333  else {
18334  st_insert(p->pvtbl, (st_data_t)id, 0);
18335  }
18336 }
18337 
18338 static void
18339 error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
18340 {
18341  if (!p->pktbl) {
18342  p->pktbl = st_init_numtable();
18343  }
18344  else if (st_is_member(p->pktbl, key)) {
18345  yyerror1(loc, "duplicated key name");
18346  return;
18347  }
18348  st_insert(p->pktbl, (st_data_t)key, 0);
18349 }
18350 
18351 #ifndef RIPPER
18352 static NODE *
18353 new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
18354 {
18355  return NEW_HASH(hash, loc);
18356 }
18357 #endif /* !RIPPER */
18358 
18359 #ifndef RIPPER
18360 static NODE *
18361 new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc)
18362 {
18363  NODE *asgn;
18364 
18365  if (lhs) {
18366  ID vid = lhs->nd_vid;
18367  YYLTYPE lhs_loc = lhs->nd_loc;
18368  if (op == tOROP) {
18369  lhs->nd_value = rhs;
18370  nd_set_loc(lhs, loc);
18371  asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
18372  if (is_notop_id(vid)) {
18373  switch (id_type(vid)) {
18374  case ID_GLOBAL:
18375  case ID_INSTANCE:
18376  case ID_CLASS:
18377  asgn->nd_aid = vid;
18378  }
18379  }
18380  }
18381  else if (op == tANDOP) {
18382  lhs->nd_value = rhs;
18383  nd_set_loc(lhs, loc);
18384  asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
18385  }
18386  else {
18387  asgn = lhs;
18388  asgn->nd_value = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
18389  nd_set_loc(asgn, loc);
18390  }
18391  }
18392  else {
18393  asgn = NEW_BEGIN(0, loc);
18394  }
18395  return asgn;
18396 }
18397 
18398 static NODE *
18399 new_ary_op_assign(struct parser_params *p, NODE *ary,
18400  NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc)
18401 {
18402  NODE *asgn;
18403 
18404  args = make_list(args, args_loc);
18405  if (nd_type(args) == NODE_BLOCK_PASS) {
18406  args = NEW_ARGSCAT(args, rhs, loc);
18407  }
18408  else {
18409  args = arg_concat(p, args, rhs, loc);
18410  }
18411  asgn = NEW_OP_ASGN1(ary, op, args, loc);
18412  fixpos(asgn, ary);
18413  return asgn;
18414 }
18415 
18416 static NODE *
18417 new_attr_op_assign(struct parser_params *p, NODE *lhs,
18418  ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc)
18419 {
18420  NODE *asgn;
18421 
18422  asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc);
18423  fixpos(asgn, lhs);
18424  return asgn;
18425 }
18426 
18427 static NODE *
18428 new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc)
18429 {
18430  NODE *asgn;
18431 
18432  if (lhs) {
18433  asgn = NEW_OP_CDECL(lhs, op, rhs, loc);
18434  }
18435  else {
18436  asgn = NEW_BEGIN(0, loc);
18437  }
18438  fixpos(asgn, lhs);
18439  return asgn;
18440 }
18441 
18442 static NODE *
18443 const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
18444 {
18445  if (p->in_def) {
18446  yyerror1(loc, "dynamic constant assignment");
18447  }
18448  return NEW_CDECL(0, 0, (path), loc);
18449 }
18450 #else
18451 static VALUE
18452 const_decl(struct parser_params *p, VALUE path)
18453 {
18454  if (p->in_def) {
18455  path = dispatch1(assign_error, path);
18456  ripper_error(p);
18457  }
18458  return path;
18459 }
18460 
18461 static VALUE
18462 assign_error(struct parser_params *p, VALUE a)
18463 {
18464  a = dispatch1(assign_error, a);
18465  ripper_error(p);
18466  return a;
18467 }
18468 
18469 static VALUE
18470 var_field(struct parser_params *p, VALUE a)
18471 {
18472  return ripper_new_yylval(p, get_id(a), dispatch1(var_field, a), 0);
18473 }
18474 #endif
18475 
18476 #ifndef RIPPER
18477 static NODE *
18478 new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
18479 {
18480  NODE *result = head;
18481  if (rescue) {
18482  NODE *tmp = rescue_else ? rescue_else : rescue;
18483  YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
18484 
18485  result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
18486  nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
18487  }
18488  else if (rescue_else) {
18489  result = block_append(p, result, rescue_else);
18490  }
18491  if (ensure) {
18492  result = NEW_ENSURE(result, ensure, loc);
18493  }
18494  fixpos(result, head);
18495  return result;
18496 }
18497 #endif
18498 
18499 static void
18500 warn_unused_var(struct parser_params *p, struct local_vars *local)
18501 {
18502  int cnt;
18503 
18504  if (!local->used) return;
18505  cnt = local->used->pos;
18506  if (cnt != local->vars->pos) {
18507  rb_parser_fatal(p, "local->used->pos != local->vars->pos");
18508  }
18509 #ifndef RIPPER
18510  ID *v = local->vars->tbl;
18511  ID *u = local->used->tbl;
18512  for (int i = 0; i < cnt; ++i) {
18513  if (!v[i] || (u[i] & LVAR_USED)) continue;
18514  if (is_private_local_id(v[i])) continue;
18515  rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
18516  }
18517 #endif
18518 }
18519 
18520 static void
18521 local_push(struct parser_params *p, int toplevel_scope)
18522 {
18523  struct local_vars *local;
18524  int inherits_dvars = toplevel_scope && compile_for_eval;
18525  int warn_unused_vars = RTEST(ruby_verbose);
18526 
18527  local = ALLOC(struct local_vars);
18528  local->prev = p->lvtbl;
18529  local->args = vtable_alloc(0);
18530  local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
18531 #ifndef RIPPER
18532  if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
18533  if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
18534  local->numparam.outer = 0;
18535  local->numparam.inner = 0;
18536  local->numparam.current = 0;
18537 #endif
18538  local->used = warn_unused_vars ? vtable_alloc(0) : 0;
18539 
18540 # if WARN_PAST_SCOPE
18541  local->past = 0;
18542 # endif
18543  CMDARG_PUSH(0);
18544  COND_PUSH(0);
18545  p->lvtbl = local;
18546 }
18547 
18548 static void
18549 local_pop(struct parser_params *p)
18550 {
18551  struct local_vars *local = p->lvtbl->prev;
18552  if (p->lvtbl->used) {
18553  warn_unused_var(p, p->lvtbl);
18554  vtable_free(p->lvtbl->used);
18555  }
18556 # if WARN_PAST_SCOPE
18557  while (p->lvtbl->past) {
18558  struct vtable *past = p->lvtbl->past;
18559  p->lvtbl->past = past->prev;
18560  vtable_free(past);
18561  }
18562 # endif
18563  vtable_free(p->lvtbl->args);
18564  vtable_free(p->lvtbl->vars);
18565  CMDARG_POP();
18566  COND_POP();
18567  ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
18568  p->lvtbl = local;
18569 }
18570 
18571 #ifndef RIPPER
18572 static ID*
18573 local_tbl(struct parser_params *p)
18574 {
18575  int cnt_args = vtable_size(p->lvtbl->args);
18576  int cnt_vars = vtable_size(p->lvtbl->vars);
18577  int cnt = cnt_args + cnt_vars;
18578  int i, j;
18579  ID *buf;
18580  VALUE tbl = 0;
18581 
18582  if (cnt <= 0) return 0;
18584  buf = ALLOC_N(ID, cnt + 2);
18585  rb_imemo_tmpbuf_set_ptr(tbl, buf);
18586  MEMCPY(buf+1, p->lvtbl->args->tbl, ID, cnt_args);
18587  /* remove IDs duplicated to warn shadowing */
18588  for (i = 0, j = cnt_args+1; i < cnt_vars; ++i) {
18589  ID id = p->lvtbl->vars->tbl[i];
18590  if (!vtable_included(p->lvtbl->args, id)) {
18591  buf[j++] = id;
18592  }
18593  }
18594  if (--j < cnt) {
18595  REALLOC_N(buf, ID, (cnt = j) + 2);
18596  rb_imemo_tmpbuf_set_ptr(tbl, buf);
18597  }
18598  buf[0] = cnt;
18599  buf[cnt + 1] = (ID)tbl;
18600  RB_OBJ_WRITTEN(p->ast, Qnil, tbl);
18601 
18602  return buf;
18603 }
18604 
18605 static NODE*
18606 node_newnode_with_locals(struct parser_params *p, enum node_type type, VALUE a1, VALUE a2, const rb_code_location_t *loc)
18607 {
18608  ID *a0;
18609  NODE *n;
18610 
18611  a0 = local_tbl(p);
18612  n = NEW_NODE(type, a0, a1, a2, loc);
18613  return n;
18614 }
18615 
18616 #endif
18617 
18618 static void
18619 numparam_name(struct parser_params *p, ID id)
18620 {
18621  if (!NUMPARAM_ID_P(id)) return;
18622  rb_warn1("`_%d' is reserved for numbered parameter; consider another name",
18623  WARN_I(NUMPARAM_ID_TO_IDX(id)));
18624 }
18625 
18626 static void
18627 arg_var(struct parser_params *p, ID id)
18628 {
18629  numparam_name(p, id);
18630  vtable_add(p->lvtbl->args, id);
18631 }
18632 
18633 static void
18634 local_var(struct parser_params *p, ID id)
18635 {
18636  numparam_name(p, id);
18637  vtable_add(p->lvtbl->vars, id);
18638  if (p->lvtbl->used) {
18640  }
18641 }
18642 
18643 static int
18644 local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
18645 {
18646  struct vtable *vars, *args, *used;
18647 
18648  vars = p->lvtbl->vars;
18649  args = p->lvtbl->args;
18650  used = p->lvtbl->used;
18651 
18652  while (vars && !DVARS_TERMINAL_P(vars->prev)) {
18653  vars = vars->prev;
18654  args = args->prev;
18655  if (used) used = used->prev;
18656  }
18657 
18658  if (vars && vars->prev == DVARS_INHERIT) {
18659  return rb_local_defined(id, p->parent_iseq);
18660  }
18661  else if (vtable_included(args, id)) {
18662  return 1;
18663  }
18664  else {
18665  int i = vtable_included(vars, id);
18666  if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
18667  return i != 0;
18668  }
18669 }
18670 
18671 static int
18672 local_id(struct parser_params *p, ID id)
18673 {
18674  return local_id_ref(p, id, NULL);
18675 }
18676 
18677 static NODE *
18678 numparam_push(struct parser_params *p)
18679 {
18680 #ifndef RIPPER
18681  struct local_vars *local = p->lvtbl;
18682  NODE *inner = local->numparam.inner;
18683  if (!local->numparam.outer) {
18684  local->numparam.outer = local->numparam.current;
18685  }
18686  local->numparam.inner = 0;
18687  local->numparam.current = 0;
18688  return inner;
18689 #else
18690  return 0;
18691 #endif
18692 }
18693 
18694 static void
18695 numparam_pop(struct parser_params *p, NODE *prev_inner)
18696 {
18697 #ifndef RIPPER
18698  struct local_vars *local = p->lvtbl;
18699  if (prev_inner) {
18700  /* prefer first one */
18701  local->numparam.inner = prev_inner;
18702  }
18703  else if (local->numparam.current) {
18704  /* current and inner are exclusive */
18705  local->numparam.inner = local->numparam.current;
18706  }
18707  if (p->max_numparam > NO_PARAM) {
18708  /* current and outer are exclusive */
18709  local->numparam.current = local->numparam.outer;
18710  local->numparam.outer = 0;
18711  }
18712  else {
18713  /* no numbered parameter */
18714  local->numparam.current = 0;
18715  }
18716 #endif
18717 }
18718 
18719 static const struct vtable *
18720 dyna_push(struct parser_params *p)
18721 {
18722  p->lvtbl->args = vtable_alloc(p->lvtbl->args);
18723  p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
18724  if (p->lvtbl->used) {
18725  p->lvtbl->used = vtable_alloc(p->lvtbl->used);
18726  }
18727  return p->lvtbl->args;
18728 }
18729 
18730 static void
18731 dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
18732 {
18733  struct vtable *tmp = *vtblp;
18734  *vtblp = tmp->prev;
18735 # if WARN_PAST_SCOPE
18736  if (p->past_scope_enabled) {
18737  tmp->prev = p->lvtbl->past;
18738  p->lvtbl->past = tmp;
18739  return;
18740  }
18741 # endif
18742  vtable_free(tmp);
18743 }
18744 
18745 static void
18746 dyna_pop_1(struct parser_params *p)
18747 {
18748  struct vtable *tmp;
18749 
18750  if ((tmp = p->lvtbl->used) != 0) {
18751  warn_unused_var(p, p->lvtbl);
18752  p->lvtbl->used = p->lvtbl->used->prev;
18753  vtable_free(tmp);
18754  }
18755  dyna_pop_vtable(p, &p->lvtbl->args);
18756  dyna_pop_vtable(p, &p->lvtbl->vars);
18757 }
18758 
18759 static void
18760 dyna_pop(struct parser_params *p, const struct vtable *lvargs)
18761 {
18762  while (p->lvtbl->args != lvargs) {
18763  dyna_pop_1(p);
18764  if (!p->lvtbl->args) {
18765  struct local_vars *local = p->lvtbl->prev;
18766  ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
18767  p->lvtbl = local;
18768  }
18769  }
18770  dyna_pop_1(p);
18771 }
18772 
18773 static int
18774 dyna_in_block(struct parser_params *p)
18775 {
18776  return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
18777 }
18778 
18779 static int
18780 dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
18781 {
18782  struct vtable *vars, *args, *used;
18783  int i;
18784 
18785  args = p->lvtbl->args;
18786  vars = p->lvtbl->vars;
18787  used = p->lvtbl->used;
18788 
18789  while (!DVARS_TERMINAL_P(vars)) {
18790  if (vtable_included(args, id)) {
18791  return 1;
18792  }
18793  if ((i = vtable_included(vars, id)) != 0) {
18794  if (used && vidrefp) *vidrefp = &used->tbl[i-1];
18795  return 1;
18796  }
18797  args = args->prev;
18798  vars = vars->prev;
18799  if (!vidrefp) used = 0;
18800  if (used) used = used->prev;
18801  }
18802 
18803  if (vars == DVARS_INHERIT) {
18804  return rb_dvar_defined(id, p->parent_iseq);
18805  }
18806 
18807  return 0;
18808 }
18809 
18810 static int
18811 dvar_defined(struct parser_params *p, ID id)
18812 {
18813  return dvar_defined_ref(p, id, NULL);
18814 }
18815 
18816 static int
18817 dvar_curr(struct parser_params *p, ID id)
18818 {
18819  return (vtable_included(p->lvtbl->args, id) ||
18820  vtable_included(p->lvtbl->vars, id));
18821 }
18822 
18823 static void
18824 reg_fragment_enc_error(struct parser_params* p, VALUE str, int c)
18825 {
18826  compile_error(p,
18827  "regexp encoding option '%c' differs from source encoding '%s'",
18828  c, rb_enc_name(rb_enc_get(str)));
18829 }
18830 
18831 #ifndef RIPPER
18832 int
18834 {
18835  int c = RE_OPTION_ENCODING_IDX(options);
18836 
18837  if (c) {
18838  int opt, idx;
18839  rb_char_to_option_kcode(c, &opt, &idx);
18840  if (idx != ENCODING_GET(str) &&
18842  goto error;
18843  }
18844  ENCODING_SET(str, idx);
18845  }
18846  else if (RE_OPTION_ENCODING_NONE(options)) {
18847  if (!ENCODING_IS_ASCII8BIT(str) &&
18849  c = 'n';
18850  goto error;
18851  }
18853  }
18854  else if (p->enc == rb_usascii_encoding()) {
18856  /* raise in re.c */
18858  }
18859  else {
18861  }
18862  }
18863  return 0;
18864 
18865  error:
18866  return c;
18867 }
18868 
18869 static void
18870 reg_fragment_setenc(struct parser_params* p, VALUE str, int options)
18871 {
18872  int c = rb_reg_fragment_setenc(p, str, options);
18873  if (c) reg_fragment_enc_error(p, str, c);
18874 }
18875 
18876 static int
18877 reg_fragment_check(struct parser_params* p, VALUE str, int options)
18878 {
18879  VALUE err;
18880  reg_fragment_setenc(p, str, options);
18882  if (err != Qnil) {
18884  compile_error(p, "%"PRIsVALUE, err);
18885  return 0;
18886  }
18887  return 1;
18888 }
18889 
18890 typedef struct {
18891  struct parser_params* parser;
18892  rb_encoding *enc;
18893  NODE *succ_block;
18894  const YYLTYPE *loc;
18896 
18897 static int
18898 reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
18899  int back_num, int *back_refs, OnigRegex regex, void *arg0)
18900 {
18902  struct parser_params* p = arg->parser;
18903  rb_encoding *enc = arg->enc;
18904  long len = name_end - name;
18905  const char *s = (const char *)name;
18906  ID var;
18907  NODE *node, *succ;
18908 
18909  if (!len) return ST_CONTINUE;
18910  if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len))
18911  return ST_CONTINUE;
18912  if (rb_enc_symname_type(s, len, enc, (1U<<ID_LOCAL)) != ID_LOCAL)
18913  return ST_CONTINUE;
18914 
18915  var = intern_cstr(s, len, enc);
18916  node = node_assign(p, assignable(p, var, 0, arg->loc), NEW_LIT(ID2SYM(var), arg->loc), arg->loc);
18917  succ = arg->succ_block;
18918  if (!succ) succ = NEW_BEGIN(0, arg->loc);
18919  succ = block_append(p, succ, node);
18920  arg->succ_block = succ;
18921  return ST_CONTINUE;
18922 }
18923 
18924 static NODE *
18925 reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc)
18926 {
18928 
18929  arg.parser = p;
18930  arg.enc = rb_enc_get(regexp);
18931  arg.succ_block = 0;
18932  arg.loc = loc;
18933  onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
18934 
18935  if (!arg.succ_block) return 0;
18936  return arg.succ_block->nd_next;
18937 }
18938 
18939 static VALUE
18940 parser_reg_compile(struct parser_params* p, VALUE str, int options)
18941 {
18942  reg_fragment_setenc(p, str, options);
18943  return rb_parser_reg_compile(p, str, options);
18944 }
18945 
18946 VALUE
18948 {
18950 }
18951 
18952 static VALUE
18953 reg_compile(struct parser_params* p, VALUE str, int options)
18954 {
18955  VALUE re;
18956  VALUE err;
18957 
18958  err = rb_errinfo();
18959  re = parser_reg_compile(p, str, options);
18960  if (NIL_P(re)) {
18963  compile_error(p, "%"PRIsVALUE, m);
18964  return Qnil;
18965  }
18966  return re;
18967 }
18968 #else
18969 static VALUE
18970 parser_reg_compile(struct parser_params* p, VALUE str, int options, VALUE *errmsg)
18971 {
18972  VALUE err = rb_errinfo();
18973  VALUE re;
18974  str = ripper_is_node_yylval(str) ? RNODE(str)->nd_cval : str;
18975  int c = rb_reg_fragment_setenc(p, str, options);
18976  if (c) reg_fragment_enc_error(p, str, c);
18977  re = rb_parser_reg_compile(p, str, options);
18978  if (NIL_P(re)) {
18979  *errmsg = rb_attr_get(rb_errinfo(), idMesg);
18981  }
18982  return re;
18983 }
18984 #endif
18985 
18986 #ifndef RIPPER
18987 void
18988 rb_parser_set_options(VALUE vparser, int print, int loop, int chomp, int split)
18989 {
18990  struct parser_params *p;
18991  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
18992  p->do_print = print;
18993  p->do_loop = loop;
18994  p->do_chomp = chomp;
18995  p->do_split = split;
18996 }
18997 
18998 void
18999 rb_parser_warn_location(VALUE vparser, int warn)
19000 {
19001  struct parser_params *p;
19002  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19003  p->warn_location = warn;
19004 }
19005 
19006 static NODE *
19007 parser_append_options(struct parser_params *p, NODE *node)
19008 {
19009  static const YYLTYPE default_location = {{1, 0}, {1, 0}};
19010  const YYLTYPE *const LOC = &default_location;
19011 
19012  if (p->do_print) {
19013  NODE *print = NEW_FCALL(rb_intern("print"),
19014  NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
19015  LOC);
19016  node = block_append(p, node, print);
19017  }
19018 
19019  if (p->do_loop) {
19020  if (p->do_split) {
19021  NODE *args = NEW_LIST(NEW_GVAR(rb_intern("$;"), LOC), LOC);
19022  NODE *split = NEW_GASGN(rb_intern("$F"),
19024  rb_intern("split"), args, LOC),
19025  LOC);
19026  node = block_append(p, split, node);
19027  }
19028  if (p->do_chomp) {
19029  NODE *chomp = NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
19030  rb_intern("chomp!"), 0, LOC);
19031  node = block_append(p, chomp, node);
19032  }
19033 
19034  node = NEW_WHILE(NEW_VCALL(idGets, LOC), node, 1, LOC);
19035  }
19036 
19037  return node;
19038 }
19039 
19040 void
19042 {
19043  /* just to suppress unused-function warnings */
19044  (void)nodetype;
19045  (void)nodeline;
19046 }
19047 
19048 static ID
19049 internal_id(struct parser_params *p)
19050 {
19051  const ID max_id = RB_ID_SERIAL_MAX & ~0xffff;
19052  ID id = (ID)vtable_size(p->lvtbl->args) + (ID)vtable_size(p->lvtbl->vars);
19053  id = max_id - id;
19054  return ID_STATIC_SYM | ID_INTERNAL | (id << ID_SCOPE_SHIFT);
19055 }
19056 #endif /* !RIPPER */
19057 
19058 static void
19059 parser_initialize(struct parser_params *p)
19060 {
19061  /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
19062  p->command_start = TRUE;
19064  p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
19065  p->node_id = 0;
19066 #ifdef RIPPER
19067  p->delayed.token = Qnil;
19068  p->result = Qnil;
19069  p->parsing_thread = Qnil;
19070 #else
19071  p->error_buffer = Qfalse;
19072 #endif
19073  p->debug_buffer = Qnil;
19074  p->debug_output = rb_stdout;
19075  p->enc = rb_utf8_encoding();
19076 }
19077 
19078 #ifdef RIPPER
19079 #define parser_mark ripper_parser_mark
19080 #define parser_free ripper_parser_free
19081 #endif
19082 
19083 static void
19084 parser_mark(void *ptr)
19085 {
19086  struct parser_params *p = (struct parser_params*)ptr;
19087 
19088  rb_gc_mark(p->lex.input);
19089  rb_gc_mark(p->lex.prevline);
19090  rb_gc_mark(p->lex.lastline);
19091  rb_gc_mark(p->lex.nextline);
19093  rb_gc_mark((VALUE)p->lex.strterm);
19094  rb_gc_mark((VALUE)p->ast);
19095  rb_gc_mark(p->case_labels);
19096 #ifndef RIPPER
19097  rb_gc_mark(p->debug_lines);
19100 #else
19101  rb_gc_mark(p->delayed.token);
19102  rb_gc_mark(p->value);
19103  rb_gc_mark(p->result);
19104  rb_gc_mark(p->parsing_thread);
19105 #endif
19108 #ifdef YYMALLOC
19109  rb_gc_mark((VALUE)p->heap);
19110 #endif
19111 }
19112 
19113 static void
19114 parser_free(void *ptr)
19115 {
19116  struct parser_params *p = (struct parser_params*)ptr;
19117  struct local_vars *local, *prev;
19118 
19119  if (p->tokenbuf) {
19121  }
19122  for (local = p->lvtbl; local; local = prev) {
19123  if (local->vars) xfree(local->vars);
19124  prev = local->prev;
19125  xfree(local);
19126  }
19127  {
19128  token_info *ptinfo;
19129  while ((ptinfo = p->token_info) != 0) {
19130  p->token_info = ptinfo->next;
19131  xfree(ptinfo);
19132  }
19133  }
19134  xfree(ptr);
19135 }
19136 
19137 static size_t
19138 parser_memsize(const void *ptr)
19139 {
19140  struct parser_params *p = (struct parser_params*)ptr;
19141  struct local_vars *local;
19142  size_t size = sizeof(*p);
19143 
19144  size += p->toksiz;
19145  for (local = p->lvtbl; local; local = local->prev) {
19146  size += sizeof(*local);
19147  if (local->vars) size += local->vars->capa * sizeof(ID);
19148  }
19149  return size;
19150 }
19151 
19152 static const rb_data_type_t parser_data_type = {
19153 #ifndef RIPPER
19154  "parser",
19155 #else
19156  "ripper",
19157 #endif
19158  {
19159  parser_mark,
19160  parser_free,
19161  parser_memsize,
19162  },
19164 };
19165 
19166 #ifndef RIPPER
19167 #undef rb_reserved_word
19168 
19169 const struct kwtable *
19170 rb_reserved_word(const char *str, unsigned int len)
19171 {
19172  return reserved_word(str, len);
19173 }
19174 
19175 VALUE
19177 {
19178  struct parser_params *p;
19179  VALUE parser = TypedData_Make_Struct(0, struct parser_params,
19180  &parser_data_type, p);
19181  parser_initialize(p);
19182  return parser;
19183 }
19184 
19185 VALUE
19186 rb_parser_set_context(VALUE vparser, const struct rb_iseq_struct *base, int main)
19187 {
19188  struct parser_params *p;
19189 
19190  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19191  p->error_buffer = main ? Qfalse : Qnil;
19192  p->parent_iseq = base;
19193  return vparser;
19194 }
19195 #endif
19196 
19197 #ifdef RIPPER
19198 #define rb_parser_end_seen_p ripper_parser_end_seen_p
19199 #define rb_parser_encoding ripper_parser_encoding
19200 #define rb_parser_get_yydebug ripper_parser_get_yydebug
19201 #define rb_parser_set_yydebug ripper_parser_set_yydebug
19202 #define rb_parser_get_debug_output ripper_parser_get_debug_output
19203 #define rb_parser_set_debug_output ripper_parser_set_debug_output
19204 static VALUE ripper_parser_end_seen_p(VALUE vparser);
19205 static VALUE ripper_parser_encoding(VALUE vparser);
19206 static VALUE ripper_parser_get_yydebug(VALUE self);
19207 static VALUE ripper_parser_set_yydebug(VALUE self, VALUE flag);
19208 static VALUE ripper_parser_get_debug_output(VALUE self);
19209 static VALUE ripper_parser_set_debug_output(VALUE self, VALUE output);
19210 
19211 /*
19212  * call-seq:
19213  * ripper.error? -> Boolean
19214  *
19215  * Return true if parsed source has errors.
19216  */
19217 static VALUE
19218 ripper_error_p(VALUE vparser)
19219 {
19220  struct parser_params *p;
19221 
19222  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19223  return p->error_p ? Qtrue : Qfalse;
19224 }
19225 #endif
19226 
19227 /*
19228  * call-seq:
19229  * ripper.end_seen? -> Boolean
19230  *
19231  * Return true if parsed source ended by +\_\_END\_\_+.
19232  */
19233 VALUE
19235 {
19236  struct parser_params *p;
19237 
19238  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19239  return p->ruby__end__seen ? Qtrue : Qfalse;
19240 }
19241 
19242 /*
19243  * call-seq:
19244  * ripper.encoding -> encoding
19245  *
19246  * Return encoding of the source.
19247  */
19248 VALUE
19250 {
19251  struct parser_params *p;
19252 
19253  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19254  return rb_enc_from_encoding(p->enc);
19255 }
19256 
19257 #ifdef RIPPER
19258 /*
19259  * call-seq:
19260  * ripper.yydebug -> true or false
19261  *
19262  * Get yydebug.
19263  */
19264 VALUE
19265 rb_parser_get_yydebug(VALUE self)
19266 {
19267  struct parser_params *p;
19268 
19269  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19270  return p->debug ? Qtrue : Qfalse;
19271 }
19272 #endif
19273 
19274 /*
19275  * call-seq:
19276  * ripper.yydebug = flag
19277  *
19278  * Set yydebug.
19279  */
19280 VALUE
19282 {
19283  struct parser_params *p;
19284 
19285  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19286  p->debug = RTEST(flag);
19287  return flag;
19288 }
19289 
19290 /*
19291  * call-seq:
19292  * ripper.debug_output -> obj
19293  *
19294  * Get debug output.
19295  */
19296 VALUE
19298 {
19299  struct parser_params *p;
19300 
19301  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19302  return p->debug_output;
19303 }
19304 
19305 /*
19306  * call-seq:
19307  * ripper.debug_output = obj
19308  *
19309  * Set debug output.
19310  */
19311 VALUE
19313 {
19314  struct parser_params *p;
19315 
19316  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19317  return p->debug_output = output;
19318 }
19319 
19320 #ifndef RIPPER
19321 #ifdef YYMALLOC
19322 #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE))
19323 /* Keep the order; NEWHEAP then xmalloc and ADD2HEAP to get rid of
19324  * potential memory leak */
19325 #define NEWHEAP() rb_imemo_tmpbuf_parser_heap(0, p->heap, 0)
19326 #define ADD2HEAP(new, cnt, ptr) ((p->heap = (new))->ptr = (ptr), \
19327  (new)->cnt = (cnt), (ptr))
19328 
19329 void *
19331 {
19332  size_t cnt = HEAPCNT(1, size);
19334  void *ptr = xmalloc(size);
19335 
19336  return ADD2HEAP(n, cnt, ptr);
19337 }
19338 
19339 void *
19340 rb_parser_calloc(struct parser_params *p, size_t nelem, size_t size)
19341 {
19342  size_t cnt = HEAPCNT(nelem, size);
19344  void *ptr = xcalloc(nelem, size);
19345 
19346  return ADD2HEAP(n, cnt, ptr);
19347 }
19348 
19349 void *
19350 rb_parser_realloc(struct parser_params *p, void *ptr, size_t size)
19351 {
19353  size_t cnt = HEAPCNT(1, size);
19354 
19355  if (ptr && (n = p->heap) != NULL) {
19356  do {
19357  if (n->ptr == ptr) {
19358  n->ptr = ptr = xrealloc(ptr, size);
19359  if (n->cnt) n->cnt = cnt;
19360  return ptr;
19361  }
19362  } while ((n = n->next) != NULL);
19363  }
19364  n = NEWHEAP();
19365  ptr = xrealloc(ptr, size);
19366  return ADD2HEAP(n, cnt, ptr);
19367 }
19368 
19369 void
19371 {
19372  rb_imemo_tmpbuf_t **prev = &p->heap, *n;
19373 
19374  while ((n = *prev) != NULL) {
19375  if (n->ptr == ptr) {
19376  *prev = n->next;
19378  break;
19379  }
19380  prev = &n->next;
19381  }
19382  xfree(ptr);
19383 }
19384 #endif
19385 
19386 void
19387 rb_parser_printf(struct parser_params *p, const char *fmt, ...)
19388 {
19389  va_list ap;
19390  VALUE mesg = p->debug_buffer;
19391 
19392  if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
19393  va_start(ap, fmt);
19394  rb_str_vcatf(mesg, fmt, ap);
19395  va_end(ap);
19396  if (RSTRING_END(mesg)[-1] == '\n') {
19397  rb_io_write(p->debug_output, mesg);
19398  p->debug_buffer = Qnil;
19399  }
19400 }
19401 
19402 static void
19403 parser_compile_error(struct parser_params *p, const char *fmt, ...)
19404 {
19405  va_list ap;
19406 
19408  p->error_p = 1;
19409  va_start(ap, fmt);
19410  p->error_buffer =
19413  p->ruby_sourceline,
19414  rb_long2int(p->lex.pcur - p->lex.pbeg),
19415  p->enc, fmt, ap);
19416  va_end(ap);
19417 }
19418 
19419 static size_t
19420 count_char(const char *str, int c)
19421 {
19422  int n = 0;
19423  while (str[n] == c) ++n;
19424  return n;
19425 }
19426 
19427 /*
19428  * strip enclosing double-quotes, same as the default yytnamerr except
19429  * for that single-quotes matching back-quotes do not stop stripping.
19430  *
19431  * "\"`class' keyword\"" => "`class' keyword"
19432  */
19433 RUBY_FUNC_EXPORTED size_t
19434 rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
19435 {
19436  YYUSE(p);
19437  if (*yystr == '"') {
19438  size_t yyn = 0, bquote = 0;
19439  const char *yyp = yystr;
19440 
19441  while (*++yyp) {
19442  switch (*yyp) {
19443  case '`':
19444  if (!bquote) {
19445  bquote = count_char(yyp+1, '`') + 1;
19446  if (yyres) memcpy(&yyres[yyn], yyp, bquote);
19447  yyn += bquote;
19448  yyp += bquote - 1;
19449  break;
19450  }
19451  goto default_char;
19452 
19453  case '\'':
19454  if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
19455  if (yyres) memcpy(yyres + yyn, yyp, bquote);
19456  yyn += bquote;
19457  yyp += bquote - 1;
19458  bquote = 0;
19459  break;
19460  }
19461  if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
19462  if (yyres) memcpy(yyres + yyn, yyp, 3);
19463  yyn += 3;
19464  yyp += 2;
19465  break;
19466  }
19467  goto do_not_strip_quotes;
19468 
19469  case ',':
19470  goto do_not_strip_quotes;
19471 
19472  case '\\':
19473  if (*++yyp != '\\')
19474  goto do_not_strip_quotes;
19475  /* Fall through. */
19476  default_char:
19477  default:
19478  if (yyres)
19479  yyres[yyn] = *yyp;
19480  yyn++;
19481  break;
19482 
19483  case '"':
19484  case '\0':
19485  if (yyres)
19486  yyres[yyn] = '\0';
19487  return yyn;
19488  }
19489  }
19490  do_not_strip_quotes: ;
19491  }
19492 
19493  if (!yyres) return strlen(yystr);
19494 
19495  return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
19496 }
19497 #endif
19498 
19499 #ifdef RIPPER
19500 #ifdef RIPPER_DEBUG
19501 /* :nodoc: */
19502 static VALUE
19503 ripper_validate_object(VALUE self, VALUE x)
19504 {
19505  if (x == Qfalse) return x;
19506  if (x == Qtrue) return x;
19507  if (x == Qnil) return x;
19508  if (x == Qundef)
19509  rb_raise(rb_eArgError, "Qundef given");
19510  if (FIXNUM_P(x)) return x;
19511  if (SYMBOL_P(x)) return x;
19512  switch (BUILTIN_TYPE(x)) {
19513  case T_STRING:
19514  case T_OBJECT:
19515  case T_ARRAY:
19516  case T_BIGNUM:
19517  case T_FLOAT:
19518  case T_COMPLEX:
19519  case T_RATIONAL:
19520  break;
19521  case T_NODE:
19522  if (nd_type((NODE *)x) != NODE_RIPPER) {
19523  rb_raise(rb_eArgError, "NODE given: %p", (void *)x);
19524  }
19525  x = ((NODE *)x)->nd_rval;
19526  break;
19527  default:
19528  rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)",
19529  (void *)x, rb_obj_classname(x));
19530  }
19531  if (!RBASIC_CLASS(x)) {
19532  rb_raise(rb_eArgError, "hidden ruby object: %p (%s)",
19533  (void *)x, rb_builtin_type_name(TYPE(x)));
19534  }
19535  return x;
19536 }
19537 #endif
19538 
19539 #define validate(x) ((x) = get_value(x))
19540 
19541 static VALUE
19542 ripper_dispatch0(struct parser_params *p, ID mid)
19543 {
19544  return rb_funcall(p->value, mid, 0);
19545 }
19546 
19547 static VALUE
19548 ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
19549 {
19550  validate(a);
19551  return rb_funcall(p->value, mid, 1, a);
19552 }
19553 
19554 static VALUE
19555 ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
19556 {
19557  validate(a);
19558  validate(b);
19559  return rb_funcall(p->value, mid, 2, a, b);
19560 }
19561 
19562 static VALUE
19563 ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
19564 {
19565  validate(a);
19566  validate(b);
19567  validate(c);
19568  return rb_funcall(p->value, mid, 3, a, b, c);
19569 }
19570 
19571 static VALUE
19572 ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
19573 {
19574  validate(a);
19575  validate(b);
19576  validate(c);
19577  validate(d);
19578  return rb_funcall(p->value, mid, 4, a, b, c, d);
19579 }
19580 
19581 static VALUE
19582 ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
19583 {
19584  validate(a);
19585  validate(b);
19586  validate(c);
19587  validate(d);
19588  validate(e);
19589  return rb_funcall(p->value, mid, 5, a, b, c, d, e);
19590 }
19591 
19592 static VALUE
19593 ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
19594 {
19595  validate(a);
19596  validate(b);
19597  validate(c);
19598  validate(d);
19599  validate(e);
19600  validate(f);
19601  validate(g);
19602  return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
19603 }
19604 
19605 static ID
19606 ripper_get_id(VALUE v)
19607 {
19608  NODE *nd;
19609  if (!RB_TYPE_P(v, T_NODE)) return 0;
19610  nd = (NODE *)v;
19611  if (nd_type(nd) != NODE_RIPPER) return 0;
19612  return nd->nd_vid;
19613 }
19614 
19615 static VALUE
19616 ripper_get_value(VALUE v)
19617 {
19618  NODE *nd;
19619  if (v == Qundef) return Qnil;
19620  if (!RB_TYPE_P(v, T_NODE)) return v;
19621  nd = (NODE *)v;
19622  if (nd_type(nd) != NODE_RIPPER) return Qnil;
19623  return nd->nd_rval;
19624 }
19625 
19626 static void
19627 ripper_error(struct parser_params *p)
19628 {
19629  p->error_p = TRUE;
19630 }
19631 
19632 static void
19633 ripper_compile_error(struct parser_params *p, const char *fmt, ...)
19634 {
19635  VALUE str;
19636  va_list args;
19637 
19638  va_start(args, fmt);
19639  str = rb_vsprintf(fmt, args);
19640  va_end(args);
19641  rb_funcall(p->value, rb_intern("compile_error"), 1, str);
19642  ripper_error(p);
19643 }
19644 
19645 static VALUE
19646 ripper_lex_get_generic(struct parser_params *p, VALUE src)
19647 {
19648  VALUE line = rb_funcallv_public(src, id_gets, 0, 0);
19649  if (!NIL_P(line) && !RB_TYPE_P(line, T_STRING)) {
19651  "gets returned %"PRIsVALUE" (expected String or nil)",
19652  rb_obj_class(line));
19653  }
19654  return line;
19655 }
19656 
19657 static VALUE
19658 ripper_lex_io_get(struct parser_params *p, VALUE src)
19659 {
19660  return rb_io_gets(src);
19661 }
19662 
19663 static VALUE
19664 ripper_s_allocate(VALUE klass)
19665 {
19666  struct parser_params *p;
19668  &parser_data_type, p);
19669  p->value = self;
19670  return self;
19671 }
19672 
19673 #define ripper_initialized_p(r) ((r)->lex.input != 0)
19674 
19675 /*
19676  * call-seq:
19677  * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper
19678  *
19679  * Create a new Ripper object.
19680  * _src_ must be a String, an IO, or an Object which has #gets method.
19681  *
19682  * This method does not starts parsing.
19683  * See also Ripper#parse and Ripper.parse.
19684  */
19685 static VALUE
19686 ripper_initialize(int argc, VALUE *argv, VALUE self)
19687 {
19688  struct parser_params *p;
19689  VALUE src, fname, lineno;
19690 
19691  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19692  rb_scan_args(argc, argv, "12", &src, &fname, &lineno);
19693  if (RB_TYPE_P(src, T_FILE)) {
19694  p->lex.gets = ripper_lex_io_get;
19695  }
19696  else if (rb_respond_to(src, id_gets)) {
19697  p->lex.gets = ripper_lex_get_generic;
19698  }
19699  else {
19700  StringValue(src);
19701  p->lex.gets = lex_get_str;
19702  }
19703  p->lex.input = src;
19704  p->eofp = 0;
19705  if (NIL_P(fname)) {
19706  fname = STR_NEW2("(ripper)");
19707  OBJ_FREEZE(fname);
19708  }
19709  else {
19710  StringValueCStr(fname);
19711  fname = rb_str_new_frozen(fname);
19712  }
19713  parser_initialize(p);
19714 
19715  p->ruby_sourcefile_string = fname;
19716  p->ruby_sourcefile = RSTRING_PTR(fname);
19717  p->ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1;
19718 
19719  return Qnil;
19720 }
19721 
19722 static VALUE
19723 ripper_parse0(VALUE parser_v)
19724 {
19725  struct parser_params *p;
19726 
19727  TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, p);
19728  parser_prepare(p);
19729  p->ast = rb_ast_new();
19730  ripper_yyparse((void*)p);
19731  rb_ast_dispose(p->ast);
19732  p->ast = 0;
19733  return p->result;
19734 }
19735 
19736 static VALUE
19737 ripper_ensure(VALUE parser_v)
19738 {
19739  struct parser_params *p;
19740 
19741  TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, p);
19742  p->parsing_thread = Qnil;
19743  return Qnil;
19744 }
19745 
19746 /*
19747  * call-seq:
19748  * ripper.parse
19749  *
19750  * Start parsing and returns the value of the root action.
19751  */
19752 static VALUE
19753 ripper_parse(VALUE self)
19754 {
19755  struct parser_params *p;
19756 
19757  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19758  if (!ripper_initialized_p(p)) {
19759  rb_raise(rb_eArgError, "method called for uninitialized object");
19760  }
19761  if (!NIL_P(p->parsing_thread)) {
19762  if (p->parsing_thread == rb_thread_current())
19763  rb_raise(rb_eArgError, "Ripper#parse is not reentrant");
19764  else
19765  rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe");
19766  }
19767  p->parsing_thread = rb_thread_current();
19768  rb_ensure(ripper_parse0, self, ripper_ensure, self);
19769 
19770  return p->result;
19771 }
19772 
19773 /*
19774  * call-seq:
19775  * ripper.column -> Integer
19776  *
19777  * Return column number of current parsing line.
19778  * This number starts from 0.
19779  */
19780 static VALUE
19781 ripper_column(VALUE self)
19782 {
19783  struct parser_params *p;
19784  long col;
19785 
19786  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19787  if (!ripper_initialized_p(p)) {
19788  rb_raise(rb_eArgError, "method called for uninitialized object");
19789  }
19790  if (NIL_P(p->parsing_thread)) return Qnil;
19791  col = p->lex.ptok - p->lex.pbeg;
19792  return LONG2NUM(col);
19793 }
19794 
19795 /*
19796  * call-seq:
19797  * ripper.filename -> String
19798  *
19799  * Return current parsing filename.
19800  */
19801 static VALUE
19802 ripper_filename(VALUE self)
19803 {
19804  struct parser_params *p;
19805 
19806  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19807  if (!ripper_initialized_p(p)) {
19808  rb_raise(rb_eArgError, "method called for uninitialized object");
19809  }
19810  return p->ruby_sourcefile_string;
19811 }
19812 
19813 /*
19814  * call-seq:
19815  * ripper.lineno -> Integer
19816  *
19817  * Return line number of current parsing line.
19818  * This number starts from 1.
19819  */
19820 static VALUE
19821 ripper_lineno(VALUE self)
19822 {
19823  struct parser_params *p;
19824 
19825  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19826  if (!ripper_initialized_p(p)) {
19827  rb_raise(rb_eArgError, "method called for uninitialized object");
19828  }
19829  if (NIL_P(p->parsing_thread)) return Qnil;
19830  return INT2NUM(p->ruby_sourceline);
19831 }
19832 
19833 /*
19834  * call-seq:
19835  * ripper.state -> Integer
19836  *
19837  * Return scanner state of current token.
19838  */
19839 static VALUE
19840 ripper_state(VALUE self)
19841 {
19842  struct parser_params *p;
19843 
19844  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19845  if (!ripper_initialized_p(p)) {
19846  rb_raise(rb_eArgError, "method called for uninitialized object");
19847  }
19848  if (NIL_P(p->parsing_thread)) return Qnil;
19849  return INT2NUM(p->lex.state);
19850 }
19851 
19852 /*
19853  * call-seq:
19854  * ripper.token -> String
19855  *
19856  * Return the current token string.
19857  */
19858 static VALUE
19859 ripper_token(VALUE self)
19860 {
19861  struct parser_params *p;
19862  long pos, len;
19863 
19864  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19865  if (!ripper_initialized_p(p)) {
19866  rb_raise(rb_eArgError, "method called for uninitialized object");
19867  }
19868  if (NIL_P(p->parsing_thread)) return Qnil;
19869  pos = p->lex.ptok - p->lex.pbeg;
19870  len = p->lex.pcur - p->lex.ptok;
19871  return rb_str_subseq(p->lex.lastline, pos, len);
19872 }
19873 
19874 #ifdef RIPPER_DEBUG
19875 /* :nodoc: */
19876 static VALUE
19877 ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg)
19878 {
19879  StringValue(msg);
19880  if (obj == Qundef) {
19881  rb_raise(rb_eArgError, "%"PRIsVALUE, msg);
19882  }
19883  return Qnil;
19884 }
19885 
19886 /* :nodoc: */
19887 static VALUE
19888 ripper_value(VALUE self, VALUE obj)
19889 {
19890  return ULONG2NUM(obj);
19891 }
19892 #endif
19893 
19894 /*
19895  * call-seq:
19896  * Ripper.lex_state_name(integer) -> string
19897  *
19898  * Returns a string representation of lex_state.
19899  */
19900 static VALUE
19901 ripper_lex_state_name(VALUE self, VALUE state)
19902 {
19904 }
19905 
19906 void
19907 Init_ripper(void)
19908 {
19909  ripper_init_eventids1();
19910  ripper_init_eventids2();
19911  id_warn = rb_intern_const("warn");
19912  id_warning = rb_intern_const("warning");
19913  id_gets = rb_intern_const("gets");
19914  id_assoc = rb_intern_const("=>");
19915 
19916  (void)yystpcpy; /* may not used in newer bison */
19917 
19918  InitVM(ripper);
19919 }
19920 
19921 void
19922 InitVM_ripper(void)
19923 {
19924  VALUE Ripper;
19925 
19926  Ripper = rb_define_class("Ripper", rb_cObject);
19927  /* version of Ripper */
19928  rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION));
19929  rb_define_alloc_func(Ripper, ripper_s_allocate);
19930  rb_define_method(Ripper, "initialize", ripper_initialize, -1);
19931  rb_define_method(Ripper, "parse", ripper_parse, 0);
19932  rb_define_method(Ripper, "column", ripper_column, 0);
19933  rb_define_method(Ripper, "filename", ripper_filename, 0);
19934  rb_define_method(Ripper, "lineno", ripper_lineno, 0);
19935  rb_define_method(Ripper, "state", ripper_state, 0);
19936  rb_define_method(Ripper, "token", ripper_token, 0);
19937  rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0);
19938  rb_define_method(Ripper, "encoding", rb_parser_encoding, 0);
19939  rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0);
19940  rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1);
19941  rb_define_method(Ripper, "debug_output", rb_parser_get_debug_output, 0);
19942  rb_define_method(Ripper, "debug_output=", rb_parser_set_debug_output, 1);
19943  rb_define_method(Ripper, "error?", ripper_error_p, 0);
19944 #ifdef RIPPER_DEBUG
19945  rb_define_method(Ripper, "assert_Qundef", ripper_assert_Qundef, 2);
19946  rb_define_method(Ripper, "rawVALUE", ripper_value, 1);
19947  rb_define_method(Ripper, "validate_object", ripper_validate_object, 1);
19948 #endif
19949 
19950  rb_define_singleton_method(Ripper, "dedent_string", parser_dedent_string, 2);
19951  rb_define_private_method(Ripper, "dedent_string", parser_dedent_string, 2);
19952 
19953  rb_define_singleton_method(Ripper, "lex_state_name", ripper_lex_state_name, 1);
19954 
19955 <% @exprs.each do |expr, desc| -%>
19956  /* <%=desc%> */
19957  rb_define_const(Ripper, "<%=expr%>", INT2NUM(<%=expr%>));
19958 <% end %>
19959  ripper_init_eventids1_table(Ripper);
19960  ripper_init_eventids2_table(Ripper);
19961 
19962 # if 0
19963  /* Hack to let RDoc document SCRIPT_LINES__ */
19964 
19965  /*
19966  * When a Hash is assigned to +SCRIPT_LINES__+ the contents of files loaded
19967  * after the assignment will be added as an Array of lines with the file
19968  * name as the key.
19969  */
19970  rb_define_global_const("SCRIPT_LINES__", Qnil);
19971 #endif
19972 
19973 }
19974 #endif /* RIPPER */
19975 
19976 /*
19977  * Local variables:
19978  * mode: c
19979  * c-file-style: "ruby"
19980  * End:
19981  */
idNULL
@ idNULL
Definition: id.h:113
token_info::indent
int indent
Definition: ripper.c:254
NODE_NEXT
@ NODE_NEXT
Definition: node.h:47
parser_params::has_shebang
unsigned int has_shebang
Definition: ripper.c:333
strcmp
int strcmp(const char *, const char *)
kwtable
Definition: lex.c:34
rb_io_gets
VALUE rb_io_gets(VALUE)
Definition: io.c:3573
FLONUM_P
#define FLONUM_P(x)
Definition: ruby.h:430
tCOMMENT
@ tCOMMENT
Definition: eventids2.c:3
kwtable::state
short state
Definition: lex.c:34
rb_strterm_struct::flags
VALUE flags
Definition: ripper.c:756
local_vars::outer
NODE * outer
Definition: ripper.c:224
rb_io_puts
VALUE rb_io_puts(int, const VALUE *, VALUE)
Definition: io.c:7747
NEW_CDECL
#define NEW_CDECL(v, val, path, loc)
Definition: node.h:321
NODE_COLON3
@ NODE_COLON3
Definition: node.h:119
parser_params::input
VALUE input
Definition: ripper.c:278
tUPLUS
@ tUPLUS
Definition: parse.h:115
NODE_FL_NEWLINE
#define NODE_FL_NEWLINE
Definition: node.h:183
i
uint32_t i
Definition: rb_mjit_min_header-2.7.1.h:5464
UNLIKELY
#define UNLIKELY(x)
Definition: ffi_common.h:126
parser_params::do_print
unsigned int do_print
Definition: ripper.c:349
NODE_NIL
@ NODE_NIL
Definition: node.h:125
ISASCII
#define ISASCII(c)
Definition: ruby.h:2304
ID
unsigned long ID
Definition: ruby.h:103
rb_str_cat_cstr
#define rb_str_cat_cstr(str, ptr)
Definition: rb_mjit_min_header-2.7.1.h:6126
RUBY_SYMBOL_EXPORT_END
#define RUBY_SYMBOL_EXPORT_END
Definition: missing.h:49
NEW_FOR_MASGN
#define NEW_FOR_MASGN(v, loc)
Definition: node.h:299
rb_define_class
VALUE rb_define_class(const char *name, VALUE super)
Defines a top-level class.
Definition: class.c:649
str_ssym
@ str_ssym
Definition: parse.c:12913
keyword_defined
@ keyword_defined
Definition: parse.h:92
parser_params::call
VALUE(* call)(VALUE, int)
Definition: ripper.c:288
obj
const VALUE VALUE obj
Definition: rb_mjit_min_header-2.7.1.h:5742
rb_id2name
const char * rb_id2name(ID)
Definition: symbol.c:801
add_delayed_token
#define add_delayed_token(p, tok, end)
Definition: parse.c:12958
NEW_RESBODY
#define NEW_RESBODY(a, ex, n, loc)
Definition: node.h:308
rb_fstring
VALUE rb_fstring(VALUE)
Definition: string.c:312
RNode::value
VALUE value
Definition: node.h:154
tSTRING_CONTENT
@ tSTRING_CONTENT
Definition: parse.h:112
vtable::tbl
ID * tbl
Definition: ripper.c:208
TypedData_Make_Struct
#define TypedData_Make_Struct(klass, type, data_type, sval)
Definition: ruby.h:1244
idEq
@ idEq
Definition: id.h:96
STR_NEW2
#define STR_NEW2(ptr)
Definition: parse.c:379
yyparse
#define yyparse
Definition: parse.c:483
magic_comment::name
const char * name
Definition: ripper.c:14614
rb_warn0L
#define rb_warn0L(l, fmt)
Definition: parse.c:960
rb_warn2
#define rb_warn2(fmt, a, b)
Definition: parse.c:952
TRUE
#define TRUE
Definition: nkf.h:175
rb_str_vcatf
VALUE rb_str_vcatf(VALUE, const char *, va_list)
Definition: sprintf.c:1210
EXPR_FITEM_bit
@ EXPR_FITEM_bit
Definition: parse.c:147
tEQ
@ tEQ
Definition: parse.h:119
NODE_ATTRASGN
@ NODE_ATTRASGN
Definition: node.h:132
nd_set_first_loc
#define nd_set_first_loc(n, v)
Definition: node.h:203
tCONSTANT
@ tCONSTANT
Definition: parse.h:102
WARN_I
#define WARN_I(i)
Definition: parse.c:997
RSTRING_GETMEM
#define RSTRING_GETMEM(str, ptrvar, lenvar)
Definition: ruby.h:1018
STR_FUNC_INDENT
#define STR_FUNC_INDENT
Definition: parse.c:12900
long
#define long
Definition: rb_mjit_min_header-2.7.1.h:2880
NEW_OP_ASGN2
#define NEW_OP_ASGN2(r, t, i, o, val, loc)
Definition: node.h:324
keyword_class
@ keyword_class
Definition: parse.h:49
T_FLOAT
#define T_FLOAT
Definition: ruby.h:527
IS_lex_state_all
#define IS_lex_state_all(ls)
Definition: parse.c:175
local_vars::vars
struct vtable * vars
Definition: ripper.c:216
xcalloc
#define xcalloc
Definition: defines.h:213
idANDOP
@ idANDOP
Definition: id.h:108
IS_LABEL_SUFFIX
#define IS_LABEL_SUFFIX(n)
Definition: parse.c:13792
YYSTYPE::tbl
st_table * tbl
Definition: parse.h:181
rb_enc_str_buf_cat
VALUE rb_enc_str_buf_cat(VALUE str, const char *ptr, long len, rb_encoding *enc)
Definition: string.c:2919
rb_suppress_tracing
VALUE rb_suppress_tracing(VALUE(*func)(VALUE), VALUE arg)
Definition: vm_trace.c:415
NODE_DSYM
@ NODE_DSYM
Definition: node.h:131
tNMATCH
@ tNMATCH
Definition: parse.h:127
rb_ast_newnode
NODE * rb_ast_newnode(rb_ast_t *ast, enum node_type type)
Definition: node.c:1189
strtod
#define strtod(s, e)
Definition: util.h:76
STR_NEW
#define STR_NEW(ptr, len)
Definition: parse.c:377
local_vars::inner
NODE * inner
Definition: ripper.c:224
rb_obj_hide
VALUE rb_obj_hide(VALUE obj)
Make the object invisible from Ruby code.
Definition: object.c:78
ruby_method_ids
ruby_method_ids
Definition: id.h:78
NODE_HSHPTN
@ NODE_HSHPTN
Definition: node.h:135
parser_params::nextline
VALUE nextline
Definition: ripper.c:281
rb_enc_name
#define rb_enc_name(enc)
Definition: encoding.h:177
IS_BEG
#define IS_BEG()
Definition: parse.c:13787
keyword_self
@ keyword_self
Definition: parse.h:79
NEW_MATCH3
#define NEW_MATCH3(r, n2, loc)
Definition: node.h:339
rb_strterm_struct::literal
rb_strterm_literal_t literal
Definition: ripper.c:758
NODE_RESCUE
@ NODE_RESCUE
Definition: node.h:51
klass
VALUE klass
Definition: rb_mjit_min_header-2.7.1.h:13259
str_dquote
@ str_dquote
Definition: parse.c:12908
rb_ast_struct::body
rb_ast_body_t body
Definition: node.h:402
local_vars
Definition: ripper.c:214
st_data_t
unsigned long st_data_t
Definition: rb_mjit_min_header-2.7.1.h:5363
EXPR_LABEL_bit
@ EXPR_LABEL_bit
Definition: parse.c:145
nd_state
#define nd_state
Definition: node.h:263
id
const int id
Definition: nkf.c:209
ID_INTERNAL
#define ID_INTERNAL
Definition: id.h:40
NEW_NODE
#define NEW_NODE(t, a0, a1, a2, loc)
Definition: node.h:282
yytype_uint8
unsigned char yytype_uint8
Definition: ripper.c:1233
toklen
#define toklen(p)
Definition: parse.c:13045
rb_ary_pattern_info::pre_args
NODE * pre_args
Definition: node.h:454
rb_iseq_struct
Definition: vm_core.h:456
parser_params::in_kwarg
unsigned int in_kwarg
Definition: ripper.c:335
tLAMBDA
@ tLAMBDA
Definition: parse.h:150
nd_head
#define nd_head
Definition: node.h:214
yytype_uint8
unsigned char yytype_uint8
Definition: parse.c:1236
rb_ident_hash_new
VALUE rb_ident_hash_new(void)
Definition: hash.c:4272
yyerror0
#define yyerror0(msg)
Definition: parse.c:414
rb_hash_new
VALUE rb_hash_new(void)
Definition: hash.c:1523
set_yylval_id
#define set_yylval_id(x)
Definition: parse.c:12213
tSTRING_BEG
@ tSTRING_BEG
Definition: parse.h:152
ID_LOCAL
#define ID_LOCAL
Definition: id.h:33
rb_gc_register_mark_object
void rb_gc_register_mark_object(VALUE obj)
Definition: gc.c:7065
tLAMBEG
@ tLAMBEG
Definition: parse.h:163
eventids1.c
HEAPCNT
#define HEAPCNT(n, size)
Definition: parse.c:19322
NODE_TRUE
@ NODE_TRUE
Definition: node.h:126
string_type
string_type
Definition: ripper.c:12950
rb_enc_mbcput
#define rb_enc_mbcput(c, buf, enc)
Definition: encoding.h:217
keyword_next
@ keyword_next
Definition: parse.h:68
keyword_if
@ keyword_if
Definition: parse.h:57
rb_str_buf_new
VALUE rb_str_buf_new(long)
Definition: string.c:1315
parser_params::in_defined
unsigned int in_defined
Definition: ripper.c:334
rb_node_newnode
#define rb_node_newnode(type, a1, a2, a3, loc)
Definition: parse.c:459
rb_local_defined
int rb_local_defined(ID id, const rb_iseq_t *iseq)
Definition: compile.c:9381
NODE_NTH_REF
@ NODE_NTH_REF
Definition: node.h:88
yydebug
#define yydebug
Definition: parse.c:96
rb_stderr
RUBY_EXTERN VALUE rb_stderr
Definition: ruby.h:2090
peekc_n
#define peekc_n(p, n)
Definition: parse.c:12940
tEMBDOC
@ tEMBDOC
Definition: eventids2.c:5
NODE_ZLIST
@ NODE_ZLIST
Definition: node.h:77
ID_GLOBAL
#define ID_GLOBAL
Definition: id.h:35
NODE_SPECIAL_EXCESSIVE_COMMA
#define NODE_SPECIAL_EXCESSIVE_COMMA
Definition: node.h:385
NODE_DREGX
@ NODE_DREGX
Definition: node.h:99
rb_warn1
#define rb_warn1(fmt, a)
Definition: parse.c:951
ISDIGIT
#define ISDIGIT(c)
Definition: ruby.h:2312
NEW_ZSUPER
#define NEW_ZSUPER(loc)
Definition: node.h:352
parser_params::debug
unsigned int debug
Definition: ripper.c:332
tLBRACK
@ tLBRACK
Definition: parse.h:144
keyword_do_cond
@ keyword_do_cond
Definition: parse.h:73
rb_warning0
#define rb_warning0(fmt)
Definition: parse.c:955
NEW_SCOPE
#define NEW_SCOPE(a, b, loc)
Definition: node.h:287
IS_AFTER_OPERATOR
#define IS_AFTER_OPERATOR()
Definition: parse.c:13793
NODE_OR
@ NODE_OR
Definition: node.h:55
NODE_ARYPTN
@ NODE_ARYPTN
Definition: node.h:134
regenc.h
IS_END
#define IS_END()
Definition: parse.c:13786
tLAST_TOKEN
@ tLAST_TOKEN
Definition: parse.h:167
KWD2EID
#define KWD2EID(t, v)
Definition: parse.c:937
MAX_WORD_LENGTH
#define MAX_WORD_LENGTH
Definition: zonetab.h:45
rb_ast_dispose
void rb_ast_dispose(rb_ast_t *ast)
Definition: node.c:1389
token_info
Definition: ripper.c:251
rb_sym_intern_ascii_cstr
#define rb_sym_intern_ascii_cstr(ptr)
Definition: rb_mjit_min_header-2.7.1.h:7763
rb_parser_set_options
void rb_parser_set_options(VALUE vparser, int print, int loop, int chomp, int split)
Definition: parse.c:18988
keyword_module
@ keyword_module
Definition: parse.h:50
parser_params::eofp
unsigned int eofp
Definition: ripper.c:330
parser_params::heredoc_line_indent
int heredoc_line_indent
Definition: ripper.c:305
NEW_OPT_ARG
#define NEW_OPT_ARG(i, v, loc)
Definition: node.h:354
STR_NEW3
#define STR_NEW3(ptr, len, e, func)
Definition: parse.c:380
idEqq
@ idEqq
Definition: id.h:97
YYSTACK_ALLOC
#define YYSTACK_ALLOC
Definition: parse.c:1377
rb_funcall
#define rb_funcall(recv, mid, argc,...)
Definition: rb_mjit_min_header-2.7.1.h:6585
rb_gc_force_recycle
void rb_gc_force_recycle(VALUE obj)
Definition: gc.c:7013
tLPAREN
@ tLPAREN
Definition: parse.h:141
INT2FIX
#define INT2FIX(i)
Definition: ruby.h:263
n
const char size_t n
Definition: rb_mjit_min_header-2.7.1.h:5456
rb_hash_clear
VALUE rb_hash_clear(VALUE hash)
Definition: hash.c:2764
EXPR_VALUE
@ EXPR_VALUE
Definition: parse.c:166
NEW_BEGIN
#define NEW_BEGIN(b, loc)
Definition: node.h:306
local_vars::numparam
struct local_vars::@63 numparam
st_is_member
#define st_is_member(table, key)
Definition: st.h:97
NEW_RESCUE
#define NEW_RESCUE(b, res, e, loc)
Definition: node.h:307
NUMPARAM_ID_TO_IDX
#define NUMPARAM_ID_TO_IDX(id)
Definition: parse.c:236
rb_char_to_option_kcode
int rb_char_to_option_kcode(int c, int *option, int *kcode)
Definition: re.c:319
TAB_WIDTH
#define TAB_WIDTH
Definition: parse.c:94
idFWD_BLOCK
#define idFWD_BLOCK
Definition: parse.c:699
NODE_HASH
@ NODE_HASH
Definition: node.h:79
WARN_LOCATION
#define WARN_LOCATION(type)
Definition: parse.c:16665
rb_strterm_heredoc_struct::func
unsigned func
Definition: ripper.c:745
NEWHEAP
#define NEWHEAP()
Definition: parse.c:19325
rb_parser_set_debug_output
VALUE rb_parser_set_debug_output(VALUE self, VALUE output)
Definition: parse.c:19312
NEW_ITER
#define NEW_ITER(a, b, loc)
Definition: node.h:300
vtable::capa
int capa
Definition: ripper.c:210
NODE_CONST
@ NODE_CONST
Definition: node.h:86
keyword_false
@ keyword_false
Definition: parse.h:82
NEW_IVAR
#define NEW_IVAR(v, loc)
Definition: node.h:332
YY_REDUCE_PRINT
#define YY_REDUCE_PRINT(Rule)
Definition: parse.c:5340
rb_warning_category_enabled_p
MJIT_FUNC_EXPORTED bool rb_warning_category_enabled_p(rb_warning_category_t category)
Definition: error.c:164
RSTRING_PTR
#define RSTRING_PTR(str)
Definition: ruby.h:1009
parser_params::gets
VALUE(* gets)(struct parser_params *, VALUE)
Definition: ripper.c:277
NODE_LASGN
@ NODE_LASGN
Definition: node.h:57
EXPR_END_bit
@ EXPR_END_bit
Definition: parse.c:136
idUMinus
@ idUMinus
Definition: id.h:82
parser_params::do_chomp
unsigned int do_chomp
Definition: ripper.c:351
rb_parser_malloc
void * rb_parser_malloc(struct parser_params *p, size_t size)
Definition: parse.c:19330
rb_attr_get
VALUE rb_attr_get(VALUE, ID)
Definition: variable.c:1084
parser_params::pend
const char * pend
Definition: ripper.c:284
keyword_not
@ keyword_not
Definition: parse.h:85
parser_params::debug_buffer
VALUE debug_buffer
Definition: ripper.c:319
rb_str_new_cstr
#define rb_str_new_cstr(str)
Definition: rb_mjit_min_header-2.7.1.h:6117
keyword_alias
@ keyword_alias
Definition: parse.h:91
YYDPRINTF
#define YYDPRINTF(Args)
Definition: parse.c:5191
parser_params::debug_lines
VALUE debug_lines
Definition: ripper.c:358
parser_params::heredoc_indent
int heredoc_indent
Definition: ripper.c:304
NEW_POSTEXE
#define NEW_POSTEXE(b, loc)
Definition: node.h:378
NEW_OP_CDECL
#define NEW_OP_CDECL(v, op, val, loc)
Definition: node.h:328
ENCODING_IS_ASCII8BIT
#define ENCODING_IS_ASCII8BIT(obj)
Definition: encoding.h:63
st_init_numtable
st_table * st_init_numtable(void)
Definition: st.c:653
str_squote
@ str_squote
Definition: parse.c:12907
tNTH_REF
@ tNTH_REF
Definition: parse.h:110
parser_params::parent_iseq
const struct rb_iseq_struct * parent_iseq
Definition: ripper.c:359
NODE_FLIP2
@ NODE_FLIP2
Definition: node.h:122
NODE_ARGSPUSH
@ NODE_ARGSPUSH
Definition: node.h:107
rb_ary_unshift
VALUE rb_ary_unshift(VALUE ary, VALUE item)
Definition: array.c:1494
tANDDOT
@ tANDDOT
Definition: parse.h:136
rb_int_positive_pow
RUBY_EXTERN VALUE rb_int_positive_pow(long x, unsigned long y)
Definition: numeric.c:4033
EXPR_CLASS_bit
@ EXPR_CLASS_bit
Definition: parse.c:144
idNil
@ idNil
Definition: rb_mjit_min_header-2.7.1.h:8744
token_info::next
struct token_info * next
Definition: ripper.c:256
NEW_ERRINFO
#define NEW_ERRINFO(loc)
Definition: node.h:375
VALUE
unsigned long VALUE
Definition: ruby.h:102
NODE_CASE
@ NODE_CASE
Definition: node.h:36
idFWD_KWREST
#define idFWD_KWREST
Definition: parse.c:697
rb_id_attrset
ID rb_id_attrset(ID)
Definition: symbol.c:98
rb_strterm_literal_struct::paren
long paren
Definition: ripper.c:721
rb_funcallv_public
VALUE rb_funcallv_public(VALUE, ID, int, const VALUE *)
Calls a method.
Definition: vm_eval.c:980
rb_obj_as_string
VALUE rb_obj_as_string(VALUE)
Definition: string.c:1440
rb_eArgError
VALUE rb_eArgError
Definition: error.c:923
encoding.h
NEW_REDO
#define NEW_REDO(loc)
Definition: node.h:304
ruby_verbose
#define ruby_verbose
Definition: ruby.h:1925
ZALLOC
#define ZALLOC(type)
Definition: ruby.h:1666
rb_intern
#define rb_intern(str)
EXPR_ENDFN_bit
@ EXPR_ENDFN_bit
Definition: parse.c:138
NODE_ARGSCAT
@ NODE_ARGSCAT
Definition: node.h:106
rb_eSyntaxError
VALUE rb_eSyntaxError
Definition: error.c:938
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: parse.c:1330
RB_TYPE_P
#define RB_TYPE_P(obj, type)
Definition: ruby.h:560
rb_enc_isalnum
#define rb_enc_isalnum(c, enc)
Definition: encoding.h:235
rb_intern_const
#define rb_intern_const(str)
Definition: ruby.h:1879
parser_params::max_numparam
int max_numparam
Definition: ripper.c:327
fmt
const VALUE int int int int int int VALUE char * fmt
Definition: rb_mjit_min_header-2.7.1.h:6462
rb_warn3L
#define rb_warn3L(l, fmt, a, b, c)
Definition: parse.c:963
IS_LABEL_POSSIBLE
#define IS_LABEL_POSSIBLE()
Definition: parse.c:13789
TYPE
#define TYPE(x)
Definition: ruby.h:554
rb_thread_current
VALUE rb_thread_current(void)
Definition: thread.c:2676
rb_enc_get
rb_encoding * rb_enc_get(VALUE obj)
Definition: encoding.c:872
NEW_UNLESS
#define NEW_UNLESS(c, t, e, loc)
Definition: node.h:290
COND_PUSH
#define COND_PUSH(n)
Definition: parse.c:195
parser_params::cur_arg
ID cur_arg
Definition: ripper.c:322
rb_enc_asciicompat
#define rb_enc_asciicompat(enc)
Definition: encoding.h:245
tAMPER
@ tAMPER
Definition: parse.h:149
rb_args_info::pre_args_num
int pre_args_num
Definition: node.h:435
NEW_CLASS
#define NEW_CLASS(n, b, s, loc)
Definition: node.h:364
local_vars::current
NODE * current
Definition: ripper.c:224
NODE_DOT2
@ NODE_DOT2
Definition: node.h:120
rb_warn0
#define rb_warn0(fmt)
Definition: parse.c:950
NODE_EVSTR
@ NODE_EVSTR
Definition: node.h:98
ID_STATIC_SYM
#define ID_STATIC_SYM
Definition: id.h:30
NUM_SUFFIX_I
#define NUM_SUFFIX_I
Definition: parse.c:14145
WARN_EOL
#define WARN_EOL(tok)
Definition: parse.c:1016
rb_code_position_struct
Definition: node.h:130
rb_enc_precise_mbclen
int rb_enc_precise_mbclen(const char *p, const char *e, rb_encoding *enc)
Definition: encoding.c:1032
tSTRING_END
@ tSTRING_END
Definition: parse.h:159
NUM_SUFFIX_R
#define NUM_SUFFIX_R
Definition: parse.c:14144
NEW_LAMBDA
#define NEW_LAMBDA(a, b, loc)
Definition: node.h:301
magic_comment::length
rb_magic_comment_length_t length
Definition: ripper.c:14616
tEMBDOC_END
@ tEMBDOC_END
Definition: eventids2.c:6
rb_args_info::kw_rest_arg
NODE * kw_rest_arg
Definition: node.h:444
modifier_rescue
@ modifier_rescue
Definition: parse.h:90
rb_const_get_at
VALUE rb_const_get_at(VALUE, ID)
Definition: variable.c:2393
tLABEL_END
@ tLABEL_END
Definition: parse.h:164
tASSOC
@ tASSOC
Definition: parse.h:140
keyword_begin
@ keyword_begin
Definition: parse.h:53
eventids2.c
ID_SCOPE_MASK
#define ID_SCOPE_MASK
Definition: id.h:32
dispatch_scan_event
#define dispatch_scan_event(p, t)
Definition: parse.c:12236
NEW_CALL
#define NEW_CALL(r, m, a, loc)
Definition: node.h:347
nd_set_line
#define nd_set_line(n, l)
Definition: node.h:195
rb_rational_raw1
#define rb_rational_raw1(x)
Definition: intern.h:176
rb_args_info::post_init
NODE * post_init
Definition: node.h:433
parser_params::ruby_sourceline
int ruby_sourceline
Definition: ripper.c:311
NEW_RETRY
#define NEW_RETRY(loc)
Definition: node.h:305
NODE_CVASGN
@ NODE_CVASGN
Definition: node.h:63
NODE_AND
@ NODE_AND
Definition: node.h:54
NEW_TRUE
#define NEW_TRUE(loc)
Definition: node.h:373
scan_oct
#define scan_oct(s, l, e)
Definition: util.h:53
tCOLON2
@ tCOLON2
Definition: parse.h:137
rb_code_position_struct::lineno
int lineno
Definition: node.h:131
NODE_LIT
@ NODE_LIT
Definition: node.h:93
YYSTYPE::vars
const struct vtable * vars
Definition: parse.h:182
WARN_S_L
#define WARN_S_L(s, l)
Definition: parse.c:995
idCall
@ idCall
Definition: rb_mjit_min_header-2.7.1.h:8732
tIVAR
@ tIVAR
Definition: parse.h:101
tASET
@ tASET
Definition: parse.h:133
arg
VALUE arg
Definition: rb_mjit_min_header-2.7.1.h:5601
str_label
@ str_label
Definition: parse.c:12906
parser_params::command_start
unsigned int command_start
Definition: ripper.c:329
NEW_STR
#define NEW_STR(s, loc)
Definition: node.h:341
rb_str_dup
VALUE rb_str_dup(VALUE)
Definition: string.c:1516
YY_NULLPTR
#define YY_NULLPTR
Definition: parse.c:1028
NODE_MASGN
@ NODE_MASGN
Definition: node.h:56
RRATIONAL
#define RRATIONAL(obj)
Definition: internal.h:794
ISALPHA
#define ISALPHA(c)
Definition: ruby.h:2311
rb_reg_fragment_setenc
int rb_reg_fragment_setenc(struct parser_params *, VALUE, int)
Definition: parse.c:18833
NEW_MATCH2
#define NEW_MATCH2(n1, n2, loc)
Definition: node.h:338
NEW_DEFINED
#define NEW_DEFINED(e, loc)
Definition: node.h:376
NEW_BLOCK
#define NEW_BLOCK(a, loc)
Definition: node.h:288
NEW_SUPER
#define NEW_SUPER(a, loc)
Definition: node.h:351
yytokentype
yytokentype
Definition: parse.h:46
Qundef
#define Qundef
Definition: ruby.h:470
rb_strterm_literal_struct
Definition: ripper.c:710
parser_params::ptok
const char * ptok
Definition: ripper.c:285
rb_define_singleton_method
void rb_define_singleton_method(VALUE obj, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a singleton method for obj.
Definition: class.c:1755
T_RATIONAL
#define T_RATIONAL
Definition: ruby.h:541
parser_params::error_buffer
VALUE error_buffer
Definition: ripper.c:357
NODE_DXSTR
@ NODE_DXSTR
Definition: node.h:97
YY_STACK_PRINT
#define YY_STACK_PRINT(Bottom, Top)
Definition: parse.c:5309
NEW_MASGN
#define NEW_MASGN(l, r, loc)
Definition: node.h:315
CHAR_BIT
#define CHAR_BIT
Definition: ruby.h:227
rb_str_modify
void rb_str_modify(VALUE)
Definition: string.c:2114
rb_make_exception
VALUE rb_make_exception(int argc, const VALUE *argv)
Make an Exception object from the list of arguments in a manner similar to Kernel#raise.
Definition: eval.c:851
NEW_LVAR
#define NEW_LVAR(v, loc)
Definition: node.h:330
keyword_do_block
@ keyword_do_block
Definition: parse.h:74
NEW_KW_ARG
#define NEW_KW_ARG(i, v, loc)
Definition: node.h:355
NODE_OPCALL
@ NODE_OPCALL
Definition: node.h:70
NODE_SPECIAL_REQUIRED_KEYWORD
#define NODE_SPECIAL_REQUIRED_KEYWORD
Definition: node.h:381
idUScore
@ idUScore
Definition: rb_mjit_min_header-2.7.1.h:8745
rb_define_method
void rb_define_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
Definition: class.c:1551
NEW_LIST
#define NEW_LIST(a, loc)
Definition: node.h:312
ID_INSTANCE
#define ID_INSTANCE
Definition: id.h:34
rb_long2int
#define rb_long2int(n)
Definition: ruby.h:350
INT2NUM
#define INT2NUM(x)
Definition: ruby.h:1609
rb_cstr_to_inum
VALUE rb_cstr_to_inum(const char *str, int base, int badcheck)
Definition: bignum.c:4012
idLE
@ idLE
Definition: id.h:93
ptr
struct RIMemo * ptr
Definition: debug.c:74
idUPlus
@ idUPlus
Definition: id.h:81
CMDARG_P
#define CMDARG_P()
Definition: parse.c:204
rb_str_new
#define rb_str_new(str, len)
Definition: rb_mjit_min_header-2.7.1.h:6116
NEW_LIT
#define NEW_LIT(l, loc)
Definition: node.h:340
ruby_scan_oct
unsigned long ruby_scan_oct(const char *, size_t, size_t *)
Definition: util.c:34
NODE_SPECIAL_NO_REST_KEYWORD
#define NODE_SPECIAL_NO_REST_KEYWORD
Definition: node.h:386
YYACCEPT
#define YYACCEPT
Definition: parse.c:5127
CMDARG_PUSH
#define CMDARG_PUSH(n)
Definition: parse.c:202
Qfalse
#define Qfalse
Definition: ruby.h:467
NEW_UNDEF
#define NEW_UNDEF(i, loc)
Definition: node.h:363
modifier_while
@ modifier_while
Definition: parse.h:88
YYTERROR
#define YYTERROR
Definition: parse.c:5152
str_dsym
@ str_dsym
Definition: parse.c:12914
str_sword
@ str_sword
Definition: parse.c:12911
rb_stdout
RUBY_EXTERN VALUE rb_stdout
Definition: ruby.h:2090
DBL2NUM
#define DBL2NUM(dbl)
Definition: ruby.h:967
RNode::flags
VALUE flags
Definition: node.h:150
rb_ast_new
rb_ast_t * rb_ast_new(void)
Definition: node.c:1219
tGEQ
@ tGEQ
Definition: parse.h:122
RUBY_INIT_YYLLOC
#define RUBY_INIT_YYLLOC()
Definition: parse.c:128
dispatch_delayed_token
#define dispatch_delayed_token(p, t)
Definition: parse.c:12237
make_list
#define make_list(list, loc)
Definition: parse.c:567
keyword_when
@ keyword_when
Definition: parse.h:63
tSYMBOLS_BEG
@ tSYMBOLS_BEG
Definition: parse.h:157
tSYMBEG
@ tSYMBEG
Definition: parse.h:151
rb_id2str
#define rb_id2str(id)
Definition: vm_backtrace.c:30
strcasecmp
int strcasecmp(const char *, const char *) __attribute__((__pure__))
T_NODE
#define T_NODE
Definition: ruby.h:545
parser_params::do_loop
unsigned int do_loop
Definition: ripper.c:350
tXSTRING_BEG
@ tXSTRING_BEG
Definition: parse.h:153
EXPR_LABELED_bit
@ EXPR_LABELED_bit
Definition: parse.c:146
NODE_DASGN
@ NODE_DASGN
Definition: node.h:58
rb_stderr_tty_p
int rb_stderr_tty_p(void)
Definition: io.c:7958
YYFPRINTF
#define YYFPRINTF
Definition: parse.c:102
SPECIAL_CONST_P
#define SPECIAL_CONST_P(x)
Definition: ruby.h:1313
BIGNUM_NEGATE
#define BIGNUM_NEGATE(b)
Definition: internal.h:767
NODE_BLOCK
@ NODE_BLOCK
Definition: node.h:33
mixed_error
#define mixed_error(enc1, enc2)
st.h
rb_strterm_literal_struct::u1
union rb_strterm_literal_struct::@67 u1
NULL
#define NULL
Definition: _sdbm.c:101
T_COMPLEX
#define T_COMPLEX
Definition: ruby.h:542
ADD2HEAP
#define ADD2HEAP(new, cnt, ptr)
Definition: parse.c:19326
DVARS_TOPSCOPE
#define DVARS_TOPSCOPE
Definition: parse.c:248
NEW_ARGSPUSH
#define NEW_ARGSPUSH(a, b, loc)
Definition: node.h:358
rb_filesystem_str_new_cstr
VALUE rb_filesystem_str_new_cstr(const char *)
Definition: string.c:1117
char
#define char
Definition: rb_mjit_min_header-2.7.1.h:2876
ruby_scan_digits
RUBY_EXTERN unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow)
Definition: util.c:97
NEW_GVAR
#define NEW_GVAR(v, loc)
Definition: node.h:329
parser_params::tokenbuf
char * tokenbuf
Definition: ripper.c:306
rb_args_info::first_post_arg
ID first_post_arg
Definition: node.h:438
rb_strterm_literal_struct::dummy
VALUE dummy
Definition: ripper.c:712
NEW_IN
#define NEW_IN(c, t, e, loc)
Definition: node.h:295
tRSHFT
@ tRSHFT
Definition: parse.h:135
RNode::u2
union RNode::@123 u2
tLEQ
@ tLEQ
Definition: parse.h:123
PRIsVALUE
#define PRIsVALUE
Definition: ruby.h:166
parser_params::pcur
const char * pcur
Definition: ripper.c:283
LVAR_USED
#define LVAR_USED
Definition: parse.c:16262
token_info::beg
rb_code_position_t beg
Definition: ripper.c:253
tOROP
@ tOROP
Definition: parse.h:125
tWORDS_BEG
@ tWORDS_BEG
Definition: parse.h:155
nd_set_node_id
#define nd_set_node_id(n, id)
Definition: node.h:212
rb_enc_from_encoding
VALUE rb_enc_from_encoding(rb_encoding *encoding)
Definition: encoding.c:116
last
unsigned int last
Definition: nkf.c:4324
NUMPARAM_IDX_TO_ID
#define NUMPARAM_IDX_TO_ID(idx)
Definition: parse.c:237
NODE_DSTR
@ NODE_DSTR
Definition: node.h:95
rb_fatal
void rb_fatal(const char *fmt,...)
Definition: error.c:2720
yypact_value_is_default
#define yypact_value_is_default(Yystate)
Definition: parse.c:1728
get_value
#define get_value(val)
Definition: parse.c:588
rb_magic_comment_length_t
long(* rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len)
Definition: parse.c:14502
st_insert
int st_insert(st_table *tab, st_data_t key, st_data_t value)
Definition: st.c:1171
OnigUChar
unsigned char OnigUChar
Definition: onigmo.h:79
FIX2LONG
#define FIX2LONG(x)
Definition: ruby.h:394
ID2SYM
#define ID2SYM(x)
Definition: ruby.h:414
ruby.h
rb_warning1
#define rb_warning1(fmt, a)
Definition: parse.c:956
strlen
size_t strlen(const char *)
tBDOT2
@ tBDOT2
Definition: parse.h:130
OBJ_FREEZE
#define OBJ_FREEZE(x)
Definition: ruby.h:1377
T_OBJECT
#define T_OBJECT
Definition: ruby.h:523
idMesg
@ idMesg
Definition: rb_mjit_min_header-2.7.1.h:8733
yyalloc::yyss_alloc
yytype_int16 yyss_alloc
Definition: ripper.c:1411
YYSTACK_RELOCATE
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
Definition: parse.c:1435
NODE_SPLAT
@ NODE_SPLAT
Definition: node.h:108
RB_WARN_CATEGORY_EXPERIMENTAL
@ RB_WARN_CATEGORY_EXPERIMENTAL
Definition: internal.h:1563
DEF_EXPR
#define DEF_EXPR(n)
Definition: parse.c:152
rb_ascii8bit_encindex
int rb_ascii8bit_encindex(void)
Definition: encoding.c:1322
NODE_CDECL
@ NODE_CDECL
Definition: node.h:62
rb_args_info::kw_args
NODE * kw_args
Definition: node.h:443
yyerror
#define yyerror(yylloc, p, msg)
Definition: parse.c:416
YY_INITIAL_VALUE
#define YY_INITIAL_VALUE(Value)
Definition: parse.c:1327
yytable_value_is_error
#define yytable_value_is_error(Yytable_value)
Definition: parse.c:1733
rb_respond_to
int rb_respond_to(VALUE, ID)
Definition: vm_method.c:2190
NODE_CVAR
@ NODE_CVAR
Definition: node.h:87
rb_imemo_new
VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0)
Definition: gc.c:2308
set_yylval_literal
#define set_yylval_literal(x)
Definition: parse.c:12207
EXPR_CMDARG_bit
@ EXPR_CMDARG_bit
Definition: parse.c:140
tCMP
@ tCMP
Definition: parse.h:118
RUBY_FUNC_EXPORTED
#define RUBY_FUNC_EXPORTED
Definition: defines.h:391
NEW_ATTRASGN
#define NEW_ATTRASGN(r, m, a, loc)
Definition: node.h:379
RNODE
#define RNODE(obj)
Definition: node.h:176
set_yylval_num
#define set_yylval_num(x)
Definition: parse.c:12212
keyword_do_LAMBDA
@ keyword_do_LAMBDA
Definition: parse.h:75
yytype_int16
short int yytype_int16
Definition: ripper.c:1251
InitVM
#define InitVM(ext)
Definition: ruby.h:2329
parser_params::token_info
token_info * token_info
Definition: ripper.c:315
parse.h
rb_args_info::pre_init
NODE * pre_init
Definition: node.h:432
keyword_def
@ keyword_def
Definition: parse.h:51
ALLOC_N
#define ALLOC_N(type, n)
Definition: ruby.h:1663
rb_str_resize
VALUE rb_str_resize(VALUE, long)
Definition: string.c:2709
parser_params::ast
rb_ast_t * ast
Definition: ripper.c:324
YYSTYPE
Definition: parse.h:174
IS_SPCARG
#define IS_SPCARG(c)
Definition: parse.c:13788
rb_ast_delete_node
void rb_ast_delete_node(rb_ast_t *ast, NODE *n)
Definition: node.c:1211
STR_FUNC_QWORDS
#define STR_FUNC_QWORDS
Definition: parse.c:12898
NODE_IN
@ NODE_IN
Definition: node.h:40
keyword_ensure
@ keyword_ensure
Definition: parse.h:55
rb_ast_body_struct::compile_option
VALUE compile_option
Definition: node.h:396
yytype_uint16
unsigned short int yytype_uint16
Definition: ripper.c:1245
idANDDOT
@ idANDDOT
Definition: id.h:110
peek
#define peek(p, c)
Definition: parse.c:12937
keyword_rescue
@ keyword_rescue
Definition: parse.h:54
rb_vsprintf
VALUE rb_vsprintf(const char *, va_list)
Definition: sprintf.c:1191
YYUSE
#define YYUSE(E)
Definition: parse.c:1313
keyword_redo
@ keyword_redo
Definition: parse.h:69
WARN_ID
#define WARN_ID(i)
Definition: parse.c:998
lex.c
rb_raise
void rb_raise(VALUE exc, const char *fmt,...)
Definition: error.c:2669
rb_reg_compile
VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline)
Definition: re.c:2953
token_flush
#define token_flush(ptr)
Definition: parse.c:417
rb_ary_entry
VALUE rb_ary_entry(VALUE ary, long offset)
Definition: array.c:1512
YYLLOC_DEFAULT
#define YYLLOC_DEFAULT(Current, Rhs, N)
Definition: parse.c:108
rb_usascii_str_new
#define rb_usascii_str_new(str, len)
Definition: rb_mjit_min_header-2.7.1.h:6118
onig_foreach_name
ONIG_EXTERN int onig_foreach_name(OnigRegex reg, int(*func)(const OnigUChar *, const OnigUChar *, int, int *, OnigRegex, void *), void *arg)
T_FILE
#define T_FILE
Definition: ruby.h:534
tGVAR
@ tGVAR
Definition: parse.h:100
yyerrok
#define yyerrok
Definition: parse.c:5122
tCOLON3
@ tCOLON3
Definition: parse.h:138
NEW_IF
#define NEW_IF(c, t, e, loc)
Definition: node.h:289
YYSTYPE::val
VALUE val
Definition: parse.h:177
NUM2UINT
#define NUM2UINT(x)
Definition: ruby.h:716
keyword__LINE__
@ keyword__LINE__
Definition: parse.h:95
rb_parser_get_debug_output
VALUE rb_parser_get_debug_output(VALUE self)
Definition: parse.c:19297
imemo_parser_strterm
@ imemo_parser_strterm
Definition: internal.h:1143
if
if((ID)(DISPID) nameid !=nameid)
Definition: win32ole.c:357
keyword_unless
@ keyword_unless
Definition: parse.h:58
LONG2NUM
#define LONG2NUM(x)
Definition: ruby.h:1644
NEW_ENSURE
#define NEW_ENSURE(b, en, loc)
Definition: node.h:309
tEMBDOC_BEG
@ tEMBDOC_BEG
Definition: eventids2.c:4
rb_strterm_literal_t
struct rb_strterm_literal_struct rb_strterm_literal_t
NODE_UNLESS
@ NODE_UNLESS
Definition: node.h:35
void
void
Definition: rb_mjit_min_header-2.7.1.h:13278
rb_obj_class
VALUE rb_obj_class(VALUE)
Equivalent to Object#class in Ruby.
Definition: object.c:217
tFID
@ tFID
Definition: parse.h:99
rb_magic_comment_setter_t
void(* rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val)
Definition: parse.c:14503
parser_params::warn_location
unsigned int warn_location
Definition: ripper.c:353
nd_args
#define nd_args
Definition: node.h:253
lex_state_bits
lex_state_bits
Definition: ripper.c:134
probes.h
YYNTOKENS
#define YYNTOKENS
Definition: parse.c:1474
rb_io_flush
VALUE rb_io_flush(VALUE)
Definition: io.c:1903
SIZEOF_VALUE
#define SIZEOF_VALUE
Definition: ruby.h:105
parser_params::pbeg
const char * pbeg
Definition: ripper.c:282
YYSTACK_BYTES
#define YYSTACK_BYTES(N)
Definition: parse.c:1424
NEW_GASGN
#define NEW_GASGN(v, val, loc)
Definition: node.h:316
YYSTYPE::strterm
struct rb_strterm_struct * strterm
Definition: parse.h:183
yytype_uint16
unsigned short int yytype_uint16
Definition: parse.c:1248
idOR
@ idOR
Definition: rb_mjit_min_header-2.7.1.h:8738
NEW_CASE
#define NEW_CASE(h, b, loc)
Definition: node.h:291
ULONG2NUM
#define ULONG2NUM(x)
Definition: ruby.h:1645
RRATIONAL_SET_NUM
#define RRATIONAL_SET_NUM(rat, n)
Definition: internal.h:795
ORDINAL_PARAM
@ ORDINAL_PARAM
Definition: parse.c:230
NEW_OPCALL
#define NEW_OPCALL(r, m, a, loc)
Definition: node.h:348
tIGNORED_NL
@ tIGNORED_NL
Definition: eventids2.c:2
NEW_ALIAS
#define NEW_ALIAS(n, o, loc)
Definition: node.h:361
tLABEL
@ tLABEL
Definition: parse.h:104
rb_ast_struct
Definition: node.h:399
rb_parser_warn_location
void rb_parser_warn_location(VALUE vparser, int warn)
Definition: parse.c:18999
str_dword
@ str_dword
Definition: parse.c:12912
rb_args_info::opt_args
NODE * opt_args
Definition: node.h:446
BEG
#define BEG(no)
Definition: re.c:25
tFLOAT
@ tFLOAT
Definition: parse.h:106
rb_node_init
void rb_node_init(NODE *n, enum node_type type, VALUE a0, VALUE a1, VALUE a2)
Definition: node.c:1095
rb_ascii8bit_encoding
rb_encoding * rb_ascii8bit_encoding(void)
Definition: encoding.c:1316
va_start
#define va_start(v, l)
Definition: rb_mjit_min_header-2.7.1.h:3978
keyword_true
@ keyword_true
Definition: parse.h:81
set_yylval_str
#define set_yylval_str(x)
Definition: parse.c:12202
NEW_CONST
#define NEW_CONST(v, loc)
Definition: node.h:333
tokfix
#define tokfix(p)
Definition: parse.c:13043
nd_ainfo
#define nd_ainfo
Definition: node.h:254
rb_args_info
Definition: node.h:431
kwtable::id
short id[2]
Definition: lex.c:34
vtable_pop
#define vtable_pop(tbl, n)
Definition: parse.c:12643
YYSYNTAX_ERROR
#define YYSYNTAX_ERROR
rb_ary_pattern_info::post_args
NODE * post_args
Definition: node.h:456
NEW_NIL
#define NEW_NIL(loc)
Definition: node.h:372
rb_encoding
const typedef OnigEncodingType rb_encoding
Definition: encoding.h:115
parser_params::pvtbl
st_table * pvtbl
Definition: ripper.c:308
NEW_DSTR
#define NEW_DSTR(s, loc)
Definition: node.h:342
WARN_S
#define WARN_S(s)
Definition: parse.c:996
idLTLT
@ idLTLT
Definition: id.h:90
rb_str_intern
VALUE rb_str_intern(VALUE)
Definition: symbol.c:710
rb_warn1L
#define rb_warn1L(l, fmt, a)
Definition: parse.c:961
tHEREDOC_BEG
@ tHEREDOC_BEG
Definition: eventids2.c:7
YYCASE_
#define YYCASE_(N, S)
tREGEXP_BEG
@ tREGEXP_BEG
Definition: parse.h:154
rb_strterm_mark
void rb_strterm_mark(VALUE obj)
Definition: parse.c:765
token
unsigned short token
Definition: id.c:36
rb_ary_pattern_info::rest_arg
NODE * rest_arg
Definition: node.h:455
HERETERM_LENGTH_MAX
#define HERETERM_LENGTH_MAX
tQSYMBOLS_BEG
@ tQSYMBOLS_BEG
Definition: parse.h:158
tIMAGINARY
@ tIMAGINARY
Definition: parse.h:108
RE_OPTION_ENCODING
#define RE_OPTION_ENCODING(e)
Definition: parse.c:703
rb_strterm_literal_struct::u3
union rb_strterm_literal_struct::@69 u3
st_init_numtable_with_size
st_table * st_init_numtable_with_size(st_index_t size)
Definition: st.c:660
nd_set_first_lineno
#define nd_set_first_lineno(n, v)
Definition: node.h:201
idNeq
@ idNeq
Definition: id.h:98
NEW_CVAR
#define NEW_CVAR(v, loc)
Definition: node.h:334
node.h
rb_args_info::imemo
VALUE imemo
Definition: node.h:450
NEW_NTH_REF
#define NEW_NTH_REF(n, loc)
Definition: node.h:335
rb_enc_from_index
rb_encoding * rb_enc_from_index(int index)
Definition: encoding.c:609
ESCAPE_META
#define ESCAPE_META
Definition: parse.c:13251
NEW_SELF
#define NEW_SELF(loc)
Definition: node.h:371
keyword_END
@ keyword_END
Definition: parse.h:94
rb_args_info::ruby2_keywords
unsigned int ruby2_keywords
Definition: node.h:448
parser_params::do_split
unsigned int do_split
Definition: ripper.c:352
RUBY_DTRACE_PARSE_HOOK
#define RUBY_DTRACE_PARSE_HOOK(name)
tREGEXP_END
@ tREGEXP_END
Definition: parse.h:113
NEW_DASGN
#define NEW_DASGN(v, val, loc)
Definition: node.h:318
rb_ary_new_from_args
#define rb_ary_new_from_args(n,...)
Definition: rb_mjit_min_header-2.7.1.h:7214
nd_value
#define nd_value
Definition: node.h:241
subnodes
#define subnodes(n1, n2)
h
size_t st_index_t h
Definition: rb_mjit_min_header-2.7.1.h:5462
is_local_id
#define is_local_id(id)
Definition: symbol.h:36
has_delayed_token
#define has_delayed_token(p)
Definition: parse.c:12238
RB_OBJ_WRITTEN
#define RB_OBJ_WRITTEN(a, oldv, b)
Definition: ruby.h:1509
ruby_global_name_punct_bits
const RUBY_FUNC_EXPORTED unsigned int ruby_global_name_punct_bits[(0x7e - 0x20+31)/32]
Definition: parse.c:13728
tSTRING_DEND
@ tSTRING_DEND
Definition: parse.h:160
NODE_IF
@ NODE_IF
Definition: node.h:34
YYEOF
#define YYEOF
Definition: parse.c:5125
tLBRACE_ARG
@ tLBRACE_ARG
Definition: parse.h:146
NODE_ENSURE
@ NODE_ENSURE
Definition: node.h:53
keyword_else
@ keyword_else
Definition: parse.h:61
vtable
Definition: ripper.c:207
EXPR_BEG_ANY
@ EXPR_BEG_ANY
Definition: parse.c:167
STR_FUNC_LABEL
#define STR_FUNC_LABEL
Definition: parse.c:12901
rb_compile_warning
void rb_compile_warning(const char *file, int line, const char *fmt,...)
Definition: error.c:285
rb_builtin_type_name
const char * rb_builtin_type_name(int t)
Definition: error.c:761
keyword_retry
@ keyword_retry
Definition: parse.h:70
mask
enum @11::@13::@14 mask
yytype_int16
short int yytype_int16
Definition: parse.c:1254
lex_state_e
lex_state_e
Definition: ripper.c:151
keyword__FILE__
@ keyword__FILE__
Definition: parse.h:96
TOK_INTERN
#define TOK_INTERN()
Definition: parse.c:381
RCOMPLEX_SET_IMAG
#define RCOMPLEX_SET_IMAG(cmp, i)
Definition: internal.h:815
rb_node_case_when_optimizable_literal
VALUE rb_node_case_when_optimizable_literal(const NODE *const node)
Definition: compile.c:4288
T_REGEXP
#define T_REGEXP
Definition: ruby.h:529
YYMAXDEPTH
#define YYMAXDEPTH
Definition: parse.c:5372
nd_set_type
#define nd_set_type(n, t)
Definition: node.h:189
ptrdiff_t
long int ptrdiff_t
Definition: rb_mjit_min_header-2.7.1.h:802
parser_params::ruby_sourcefile
const char * ruby_sourcefile
Definition: ripper.c:312
NEW_NEXT
#define NEW_NEXT(s, loc)
Definition: node.h:303
rb_memcicmp
int rb_memcicmp(const void *, const void *, long)
Definition: re.c:80
tCHAR
@ tCHAR
Definition: parse.h:109
rb_parser_compile_file_path
rb_ast_t * rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE file, int start)
Definition: parse.c:12860
ISALNUM
#define ISALNUM(c)
Definition: ruby.h:2310
parser_params::case_labels
VALUE case_labels
Definition: ripper.c:316
COND_P
#define COND_P()
Definition: parse.c:197
rb_hash_lookup
VALUE rb_hash_lookup(VALUE hash, VALUE key)
Definition: hash.c:2058
rb_errinfo
VALUE rb_errinfo(void)
The current exception in the current thread.
Definition: eval.c:1882
parser_params::cr_seen
unsigned int cr_seen
Definition: ripper.c:344
rb_ary_push
VALUE rb_ary_push(VALUE ary, VALUE item)
Definition: array.c:1195
rb_code_position_struct::column
int column
Definition: node.h:132
was_bol
#define was_bol(p)
Definition: parse.c:13041
rb_parser_calloc
void * rb_parser_calloc(struct parser_params *p, size_t nelem, size_t size)
Definition: parse.c:19340
NEW_YIELD
#define NEW_YIELD(a, loc)
Definition: node.h:311
NEW_DEFS
#define NEW_DEFS(r, i, a, d, loc)
Definition: node.h:286
vars
const VALUE int int int int int int VALUE * vars[]
Definition: rb_mjit_min_header-2.7.1.h:6462
nd_body
#define nd_body
Definition: node.h:219
tPOW
@ tPOW
Definition: parse.h:117
NODE_CASE3
@ NODE_CASE3
Definition: node.h:38
nd_end
#define nd_end
Definition: node.h:262
tANDOP
@ tANDOP
Definition: parse.h:124
cnt
rb_atomic_t cnt[RUBY_NSIG]
Definition: signal.c:503
idGE
@ idGE
Definition: id.h:95
idPow
@ idPow
Definition: id.h:83
rb_obj_freeze
VALUE rb_obj_freeze(VALUE)
Make the object unmodifiable.
Definition: object.c:1080
YYLTYPE
Definition: parse.h:195
keyword_then
@ keyword_then
Definition: parse.h:59
va_list
__gnuc_va_list va_list
Definition: rb_mjit_min_header-2.7.1.h:836
rb_strterm_literal_struct::nest
long nest
Definition: ripper.c:713
term
const char term
Definition: id.c:37
NUMPARAM_MAX
@ NUMPARAM_MAX
Definition: parse.c:232
malloc
void * malloc(size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(1)))
tLSHFT
@ tLSHFT
Definition: parse.h:134
magic_comment
Definition: ripper.c:14613
STR_FUNC_ESCAPE
#define STR_FUNC_ESCAPE
Definition: parse.c:12895
NODE_DASGN_CURR
@ NODE_DASGN_CURR
Definition: node.h:59
YYEMPTY
#define YYEMPTY
Definition: parse.c:5124
rb_eTypeError
VALUE rb_eTypeError
Definition: error.c:922
tok
#define tok(p)
Definition: parse.c:13044
rb_parser_set_location_of_none
YYLTYPE * rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
Definition: parse.c:17121
STR_FUNC_SYMBOL
#define STR_FUNC_SYMBOL
Definition: parse.c:12899
RBASIC_CLASS
#define RBASIC_CLASS(obj)
Definition: ruby.h:906
SIZED_REALLOC_N
#define SIZED_REALLOC_N(var, type, n, old_n)
Definition: internal.h:1662
NODE_COLON2
@ NODE_COLON2
Definition: node.h:118
NODE_DOT3
@ NODE_DOT3
Definition: node.h:121
NEW_DOT2
#define NEW_DOT2(b, e, loc)
Definition: node.h:369
node_type
node_type
Definition: node.h:22
rb_io_gets_internal
VALUE rb_io_gets_internal(VALUE io)
Definition: io.c:3579
ALLOC
#define ALLOC(type)
Definition: ruby.h:1664
reg_named_capture_assign_t
Definition: ripper.c:18935
lex_eol_p
#define lex_eol_p(p)
Definition: parse.c:12935
NEW_MODULE
#define NEW_MODULE(n, b, loc)
Definition: node.h:366
tOP_ASGN
@ tOP_ASGN
Definition: parse.h:139
NODE_BREAK
@ NODE_BREAK
Definition: node.h:46
END_OF_INPUT
@ END_OF_INPUT
Definition: parse.h:48
CALL_Q_P
#define CALL_Q_P(q)
Definition: parse.c:427
COND_IN_FF
@ COND_IN_FF
Definition: parse.c:17814
WARN_SPACE_CHAR
#define WARN_SPACE_CHAR(c, prefix)
Definition: parse.c:13143
rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:920
parser_params::in_def
unsigned int in_def
Definition: ripper.c:336
input
unsigned int input
Definition: nkf.c:4325
set_yylval_node
#define set_yylval_node(x)
Definition: parse.c:12197
YYSTYPE::num
int num
Definition: parse.h:180
NODE_GVAR
@ NODE_GVAR
Definition: node.h:84
NEW_DEFN
#define NEW_DEFN(i, a, d, loc)
Definition: node.h:285
ALLOCA_N
#define ALLOCA_N(type, n)
Definition: ruby.h:1684
parser_params::strterm
rb_strterm_t * strterm
Definition: ripper.c:276
RARRAY_AREF
#define RARRAY_AREF(a, i)
Definition: ruby.h:1101
vtable::pos
int pos
Definition: ripper.c:209
compile_for_eval
#define compile_for_eval
Definition: parse.c:422
rb_ast_add_mark_object
void rb_ast_add_mark_object(rb_ast_t *ast, VALUE obj)
Definition: node.c:1395
EXPR_FNAME_bit
@ EXPR_FNAME_bit
Definition: parse.c:142
NODE_XSTR
@ NODE_XSTR
Definition: node.h:96
keyword_end
@ keyword_end
Definition: parse.h:56
STRNCASECMP
#define STRNCASECMP(s1, s2, n)
Definition: ruby.h:2324
Qnull
#define Qnull
Definition: parse.c:942
idFWD_REST
#define idFWD_REST
Definition: parse.c:693
parser_params::heredoc_end
int heredoc_end
Definition: ripper.c:303
idGTGT
@ idGTGT
Definition: id.h:91
PRIsWARN
#define PRIsWARN
Definition: parse.c:1000
NEW_LASGN
#define NEW_LASGN(v, val, loc)
Definition: node.h:317
str_xquote
@ str_xquote
Definition: parse.c:12909
rb_parser_lex_state_name
VALUE rb_parser_lex_state_name(enum lex_state_e state)
Definition: parse.c:17051
symbol.h
size
int size
Definition: encoding.c:58
rb_enc_compatible
rb_encoding * rb_enc_compatible(VALUE str1, VALUE str2)
Definition: encoding.c:974
rb_str_set_len
void rb_str_set_len(VALUE, long)
Definition: string.c:2692
uint8_t
unsigned char uint8_t
Definition: sha2.h:100
FALSE
#define FALSE
Definition: nkf.h:174
rb_ast_body_struct::line_count
int line_count
Definition: node.h:397
FIXNUM_P
#define FIXNUM_P(f)
Definition: ruby.h:396
NODE_ARGS
@ NODE_ARGS
Definition: node.h:101
NEW_COLON3
#define NEW_COLON3(i, loc)
Definition: node.h:368
NEW_XSTR
#define NEW_XSTR(s, loc)
Definition: node.h:343
STR_FUNC_LIST
#define STR_FUNC_LIST
Definition: parse.c:12902
tRATIONAL
@ tRATIONAL
Definition: parse.h:107
nd_first_column
#define nd_first_column(n)
Definition: node.h:198
NEW_HASH
#define NEW_HASH(a, loc)
Definition: node.h:314
parser_params::heap
rb_imemo_tmpbuf_t * heap
Definition: ripper.c:271
vtable_free
#define vtable_free(tbl)
Definition: parse.c:12604
NODE_DVAR
@ NODE_DVAR
Definition: node.h:83
rb_parser_printf
void rb_parser_printf(struct parser_params *p, const char *fmt,...)
Definition: parse.c:19387
YYLTYPE::last_column
int last_column
Definition: parse.h:200
regex.h
list
struct rb_encoding_entry * list
Definition: encoding.c:56
yyalloc::yyvs_alloc
YYSTYPE yyvs_alloc
Definition: ripper.c:1412
ISSPACE
#define ISSPACE(c)
Definition: ruby.h:2307
YYPRINT
#define YYPRINT(out, tok, val)
Definition: parse.c:103
rb_str_new_frozen
VALUE rb_str_new_frozen(VALUE)
Definition: string.c:1203
str_copy
#define str_copy(_s, _p, _n)
NEW_BLOCK_PASS
#define NEW_BLOCK_PASS(b, loc)
Definition: node.h:360
YYLTYPE::last_line
int last_line
Definition: parse.h:199
rb_parser_end_seen_p
VALUE rb_parser_end_seen_p(VALUE vparser)
Definition: parse.c:19234
NEW_OP_ASGN_OR
#define NEW_OP_ASGN_OR(i, val, loc)
Definition: node.h:326
rb_syntax_error_append
VALUE rb_syntax_error_append(VALUE exc, VALUE file, int line, int column, rb_encoding *enc, const char *fmt, va_list args)
Definition: error.c:104
RB_OBJ_WRITE
#define RB_OBJ_WRITE(a, slot, b)
Definition: ruby.h:1508
modifier_unless
@ modifier_unless
Definition: parse.h:87
rb_args_info::post_args_num
int post_args_num
Definition: node.h:436
keyword_while
@ keyword_while
Definition: parse.h:64
tLPAREN_ARG
@ tLPAREN_ARG
Definition: parse.h:142
CONST_ID
#define CONST_ID(var, str)
Definition: ruby.h:1841
yyerror1
#define yyerror1(loc, msg)
Definition: parse.c:415
IS_lex_state
#define IS_lex_state(ls)
Definition: parse.c:174
StringValueCStr
#define StringValueCStr(v)
Definition: ruby.h:604
tDSTAR
@ tDSTAR
Definition: parse.h:148
CSI_SGR
#define CSI_SGR
rb_yytnamerr
size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
Definition: parse.c:19434
rb_parser_set_location_from_strterm_heredoc
YYLTYPE * rb_parser_set_location_from_strterm_heredoc(struct parser_params *p, rb_strterm_heredoc_t *here, YYLTYPE *yylloc)
Definition: parse.c:17106
ID_SCOPE_SHIFT
#define ID_SCOPE_SHIFT
Definition: id.h:31
key
key
Definition: openssl_missing.h:181
T_HASH
#define T_HASH
Definition: ruby.h:531
rb_strterm_heredoc_struct::offset
long offset
Definition: ripper.c:733
path
VALUE path
Definition: rb_mjit_min_header-2.7.1.h:7353
NODE_SELF
@ NODE_SELF
Definition: node.h:124
local_vars::prev
struct local_vars * prev
Definition: ripper.c:221
parser_params::lval
YYSTYPE * lval
Definition: ripper.c:273
STR_FUNC_REGEXP
#define STR_FUNC_REGEXP
Definition: parse.c:12897
EOF
#define EOF
Definition: vsnprintf.c:203
rb_args_info::no_kwarg
unsigned int no_kwarg
Definition: node.h:447
PRINTF_ARGS
PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt,...), 2, 3)
NODE_LVAR
@ NODE_LVAR
Definition: node.h:82
memchr
void * memchr(const void *, int, size_t)
nd_last_loc
#define nd_last_loc(n)
Definition: node.h:209
parser_params::token_seen
unsigned int token_seen
Definition: ripper.c:338
STR_FUNC_EXPAND
#define STR_FUNC_EXPAND
Definition: parse.c:12896
NODE_STR
@ NODE_STR
Definition: node.h:94
rb_parser_compile_string
rb_ast_t * rb_parser_compile_string(VALUE vparser, const char *f, VALUE s, int line)
Definition: parse.c:12839
rb_str_buf_append
VALUE rb_str_buf_append(VALUE, VALUE)
Definition: string.c:2950
rb_strterm_literal_struct::u0
union rb_strterm_literal_struct::@66 u0
keyword_super
@ keyword_super
Definition: parse.h:78
U
Definition: dtoa.c:290
set_yylval_name
#define set_yylval_name(x)
Definition: parse.c:12214
ISCNTRL
#define ISCNTRL(c)
Definition: ruby.h:2315
RCOMPLEX
#define RCOMPLEX(obj)
Definition: internal.h:811
keyword_BEGIN
@ keyword_BEGIN
Definition: parse.h:93
parser_params::ptr
long ptr
Definition: ripper.c:287
NEW_SCLASS
#define NEW_SCLASS(r, b, loc)
Definition: node.h:365
MBCLEN_CHARFOUND_P
#define MBCLEN_CHARFOUND_P(ret)
Definition: encoding.h:191
tSTRING_DBEG
@ tSTRING_DBEG
Definition: parse.h:161
RARRAY_LEN
#define RARRAY_LEN(a)
Definition: ruby.h:1070
st_foreach
int st_foreach(st_table *tab, st_foreach_callback_func *func, st_data_t arg)
Definition: st.c:1718
END
#define END(name)
Definition: asm.h:115
rb_rational_new
VALUE rb_rational_new(VALUE, VALUE)
Definition: rational.c:1945
RE_OPTION_ENCODING_NONE
#define RE_OPTION_ENCODING_NONE(o)
Definition: parse.c:705
iseq_label_data
Definition: compile.c:62
rb_scan_args
#define rb_scan_args(argc, argvp, fmt,...)
Definition: rb_mjit_min_header-2.7.1.h:6372
YY_ATTRIBUTE_UNUSED
#define YY_ATTRIBUTE_UNUSED
Definition: parse.c:1299
NODE_IVAR
@ NODE_IVAR
Definition: node.h:85
NEW_OP_ASGN1
#define NEW_OP_ASGN1(p, id, a, loc)
Definition: node.h:323
k__END__
@ k__END__
Definition: eventids2.c:9
parser_params::lvtbl
struct local_vars * lvtbl
Definition: ripper.c:307
parser_params::lastline
VALUE lastline
Definition: ripper.c:280
rb_cObject
RUBY_EXTERN VALUE rb_cObject
Definition: ruby.h:2010
nd_beg
#define nd_beg
Definition: node.h:261
parser_params::gets_
union parser_params::@64::@65 gets_
parser_params::toksiz
int toksiz
Definition: ripper.c:301
buf
unsigned char buf[MIME_BUF_SIZE]
Definition: nkf.c:4322
rb_exc_raise
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
Definition: eval.c:668
re_pattern_buffer
Definition: onigmo.h:755
T_BIGNUM
#define T_BIGNUM
Definition: ruby.h:533
NODE_BEGIN
@ NODE_BEGIN
Definition: node.h:50
TypedData_Get_Struct
#define TypedData_Get_Struct(obj, type, data_type, sval)
Definition: ruby.h:1252
RCOMPLEX_SET_REAL
#define RCOMPLEX_SET_REAL(cmp, r)
Definition: internal.h:814
value_expr
#define value_expr(node)
Definition: parse.c:499
rb_intern2
ID rb_intern2(const char *, long)
Definition: symbol.c:653
rb_enc_str_coderange
int rb_enc_str_coderange(VALUE)
Definition: string.c:657
NEW_ARGSCAT
#define NEW_ARGSCAT(a, b, loc)
Definition: node.h:357
StringValue
use StringValue() instead")))
NODE_RETURN
@ NODE_RETURN
Definition: node.h:80
scan_hex
#define scan_hex(s, l, e)
Definition: util.h:55
keyword_and
@ keyword_and
Definition: parse.h:83
SWITCH_BY_COND_TYPE
#define SWITCH_BY_COND_TYPE(t, w, arg)
Definition: parse.c:17817
NEW_FOR
#define NEW_FOR(i, b, loc)
Definition: node.h:298
internal.h
yytnamerr
#define yytnamerr(yyres, yystr)
Definition: parse.c:775
error
const rb_iseq_t const char * error
Definition: rb_mjit_min_header-2.7.1.h:13511
NODE_FALSE
@ NODE_FALSE
Definition: node.h:127
T_ARRAY
#define T_ARRAY
Definition: ruby.h:530
idCOLON2
@ idCOLON2
Definition: id.h:107
rb_strterm_literal_struct::term
long term
Definition: ripper.c:725
argv
char ** argv
Definition: ruby.c:223
STATIC_ASSERT
STATIC_ASSERT(rb_strterm_heredoc_t, sizeof(rb_strterm_heredoc_t)<=4 *SIZEOF_VALUE)
NODE_ONCE
@ NODE_ONCE
Definition: node.h:100
ID2VAL
#define ID2VAL(id)
Definition: parse.c:935
f
#define f
rb_set_errinfo
void rb_set_errinfo(VALUE err)
Sets the current exception ($!) to the given value.
Definition: eval.c:1896
RNode::nd_loc
rb_code_location_t nd_loc
Definition: node.h:172
lex_goto_eol
#define lex_goto_eol(p)
Definition: parse.c:12934
idOROP
@ idOROP
Definition: id.h:109
rb_strterm_heredoc_struct::length
unsigned length
Definition: ripper.c:742
parser_params::debug_output
VALUE debug_output
Definition: ripper.c:320
keyword_return
@ keyword_return
Definition: parse.h:76
rb_write_error_str
RUBY_EXTERN void rb_write_error_str(VALUE mesg)
Definition: io.c:7936
YYSTACK_FREE
#define YYSTACK_FREE
Definition: parse.c:1378
rb_define_global_const
void rb_define_global_const(const char *, VALUE)
Definition: variable.c:2892
nd_once_body
#define nd_once_body(node)
Definition: parse.c:16603
YYABORT
#define YYABORT
Definition: parse.c:5128
ST_CONTINUE
@ ST_CONTINUE
Definition: st.h:99
rb_make_backtrace
VALUE rb_make_backtrace(void)
Definition: vm_backtrace.c:872
NODE_IASGN
@ NODE_IASGN
Definition: node.h:61
RUBY_SYMBOL_EXPORT_BEGIN
#define RUBY_SYMBOL_EXPORT_BEGIN
Definition: missing.h:48
xmalloc
#define xmalloc
Definition: defines.h:211
xrealloc
#define xrealloc
Definition: defines.h:214
unterminated_literal
#define unterminated_literal(mesg)
nd_set_first_column
#define nd_set_first_column(n, v)
Definition: node.h:199
NEW_VCALL
#define NEW_VCALL(m, loc)
Definition: node.h:350
ENCODING_GET
#define ENCODING_GET(obj)
Definition: encoding.h:62
tSP
@ tSP
Definition: parse.h:114
YYINITDEPTH
#define YYINITDEPTH
Definition: parse.c:5361
dispatch_heredoc_end
#define dispatch_heredoc_end(p)
Definition: parse.c:14216
rb_sprintf
VALUE rb_sprintf(const char *format,...)
Definition: sprintf.c:1197
keyword_do
@ keyword_do
Definition: parse.h:72
rb_parser_set_context
VALUE rb_parser_set_context(VALUE vparser, const struct rb_iseq_struct *base, int main)
Definition: parse.c:19186
NODE_ARGS_AUX
@ NODE_ARGS_AUX
Definition: node.h:102
nd_lit
#define nd_lit
Definition: node.h:244
NEW_CASE3
#define NEW_CASE3(h, b, loc)
Definition: node.h:293
rb_complex_raw
VALUE rb_complex_raw(VALUE x, VALUE y)
Definition: complex.c:1521
rb_str_subseq
VALUE rb_str_subseq(VALUE, long, long)
Definition: string.c:2474
idDot3
@ idDot3
Definition: id.h:80
tEQQ
@ tEQQ
Definition: parse.h:120
rb_utf8_encoding
rb_encoding * rb_utf8_encoding(void)
Definition: encoding.c:1328
rb_strterm_heredoc_struct::quote
unsigned quote
Definition: ripper.c:744
NEW_ARGS_AUX
#define NEW_ARGS_AUX(r, b, loc)
Definition: node.h:353
parser_params::line_count
int line_count
Definition: ripper.c:310
str
char str[HTML_ESCAPE_MAX_LEN+1]
Definition: escape.c:18
mixed_escape
#define mixed_escape(beg, enc1, enc2)
NEW_BACK_REF
#define NEW_BACK_REF(n, loc)
Definition: node.h:336
NEW_IASGN
#define NEW_IASGN(v, val, loc)
Definition: node.h:320
nd_first_lineno
#define nd_first_lineno(n)
Definition: node.h:200
cc
const struct rb_call_cache * cc
Definition: rb_mjit_min_header-2.7.1.h:13233
keyword_undef
@ keyword_undef
Definition: parse.h:52
parser_params::lex
struct parser_params::@64 lex
nd_set_last_loc
#define nd_set_last_loc(n, v)
Definition: node.h:210
rb_enc_find_index
int rb_enc_find_index(const char *name)
Definition: encoding.c:693
yyalloc::yyls_alloc
YYLTYPE yyls_alloc
Definition: ripper.c:1413
EXPR_END_ANY
@ EXPR_END_ANY
Definition: parse.c:169
COND_IN_OP
@ COND_IN_OP
Definition: parse.c:17812
YYTRANSLATE
#define YYTRANSLATE(YYX)
Definition: parse.c:1487
YY_SYMBOL_PRINT
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: parse.c:5242
RFLOAT
#define RFLOAT(obj)
Definition: internal.h:803
NODE_WHEN
@ NODE_WHEN
Definition: node.h:39
NODE_BLOCK_PASS
@ NODE_BLOCK_PASS
Definition: node.h:109
EXPR_ENDARG_bit
@ EXPR_ENDARG_bit
Definition: parse.c:137
parser_params::prevline
VALUE prevline
Definition: ripper.c:279
vtable_add
#define vtable_add(tbl, id)
Definition: parse.c:12626
DVARS_INHERIT
#define DVARS_INHERIT
Definition: parse.c:247
NODE_MATCH
@ NODE_MATCH
Definition: node.h:90
RUBY_TYPED_FREE_IMMEDIATELY
#define RUBY_TYPED_FREE_IMMEDIATELY
Definition: ruby.h:1207
ERANGE
#define ERANGE
Definition: rb_mjit_min_header-2.7.1.h:10976
dyna_var
#define dyna_var(p, id)
Definition: parse.c:677
memset
void * memset(void *, int, size_t)
nd_1st
#define nd_1st
Definition: node.h:225
ENC_CODERANGE_7BIT
#define ENC_CODERANGE_7BIT
Definition: encoding.h:104
tokcopy
#define tokcopy(p, n)
Definition: parse.c:13114
MEMCPY
#define MEMCPY(p1, p2, type, n)
Definition: ruby.h:1753
literal_flush
#define literal_flush(p, ptr)
Definition: parse.c:12235
keyword_until
@ keyword_until
Definition: parse.h:65
NEW_OP_ASGN_AND
#define NEW_OP_ASGN_AND(i, val, loc)
Definition: node.h:327
parser_params::tokidx
int tokidx
Definition: ripper.c:300
keyword_for
@ keyword_for
Definition: parse.h:66
rb_parser_compile_string_path
rb_ast_t * rb_parser_compile_string_path(VALUE vparser, VALUE f, VALUE s, int line)
Definition: parse.c:12845
rb_hash_aset
VALUE rb_hash_aset(VALUE hash, VALUE key, VALUE val)
Definition: hash.c:2847
int
__inline__ int
Definition: rb_mjit_min_header-2.7.1.h:2839
rb_reserved_word
const struct kwtable * rb_reserved_word(const char *str, unsigned int len)
Definition: parse.c:19170
keyword_or
@ keyword_or
Definition: parse.h:84
parser_params::error_p
unsigned int error_p
Definition: ripper.c:343
NIL_P
#define NIL_P(v)
Definition: ruby.h:482
rb_strterm_heredoc_struct::sourceline
int sourceline
Definition: ripper.c:734
STR_FUNC_TERM
#define STR_FUNC_TERM
Definition: parse.c:12903
SET_LEX_STATE
#define SET_LEX_STATE(ls)
Definition: parse.c:177
memcpy
void * memcpy(void *__restrict, const void *__restrict, size_t)
NEW_FALSE
#define NEW_FALSE(loc)
Definition: node.h:374
COND_IN_COND
@ COND_IN_COND
Definition: parse.c:17813
nd_else
#define nd_else
Definition: node.h:220
parser_params::compile_option
VALUE compile_option
Definition: ripper.c:317
NEW_QCALL
#define NEW_QCALL(q, r, m, a, loc)
Definition: parse.c:429
NEW_WHEN
#define NEW_WHEN(c, t, e, loc)
Definition: node.h:294
argc
int argc
Definition: ruby.c:222
vtable::prev
struct vtable * prev
Definition: ripper.c:211
RE_OPTION_ONCE
#define RE_OPTION_ONCE
Definition: parse.c:701
parser_params::ruby__end__seen
unsigned int ruby__end__seen
Definition: ripper.c:331
NEW_BREAK
#define NEW_BREAK(s, loc)
Definition: node.h:302
rb_obj_classname
const char * rb_obj_classname(VALUE)
Definition: variable.c:289
rb_strterm_struct
Definition: ripper.c:755
STR_NEW0
#define STR_NEW0()
Definition: parse.c:378
rb_parser_reg_compile
RUBY_SYMBOL_EXPORT_BEGIN VALUE rb_parser_reg_compile(struct parser_params *p, VALUE str, int options)
Definition: parse.c:18947
keyword_in
@ keyword_in
Definition: parse.h:71
REALLOC_N
#define REALLOC_N(var, type, n)
Definition: ruby.h:1667
rb_code_location_struct::beg_pos
rb_code_position_t beg_pos
Definition: node.h:136
new_nil
#define new_nil(loc)
Definition: parse.c:487
rb_define_const
void rb_define_const(VALUE, const char *, VALUE)
Definition: variable.c:2880
RNode::u1
union RNode::@122 u1
tBACK_REF
@ tBACK_REF
Definition: parse.h:111
HERETERM_LENGTH_BITS
#define HERETERM_LENGTH_BITS
Definition: parse.c:729
NEW_EVSTR
#define NEW_EVSTR(n, loc)
Definition: node.h:346
free
#define free(x)
Definition: dln.c:52
tSTRING_DVAR
@ tSTRING_DVAR
Definition: parse.h:162
YYSTYPE::id
ID id
Definition: parse.h:179
token_info
struct token_info token_info
NEW_WHILE
#define NEW_WHILE(c, b, n, loc)
Definition: node.h:296
err
int err
Definition: win32.c:135
parser_params::pktbl
st_table * pktbl
Definition: ripper.c:309
token_info::nonspc
int nonspc
Definition: ripper.c:255
CMDARG_POP
#define CMDARG_POP()
Definition: parse.c:203
rb_strterm_struct::u
union rb_strterm_struct::@70 u
tUMINUS_NUM
@ tUMINUS_NUM
Definition: parse.h:166
NEW_DOT3
#define NEW_DOT3(b, e, loc)
Definition: node.h:370
tNEQ
@ tNEQ
Definition: parse.h:121
rb_io_write
VALUE rb_io_write(VALUE, VALUE)
Definition: io.c:1804
tDOT2
@ tDOT2
Definition: parse.h:128
lambda_beginning_p
#define lambda_beginning_p()
Definition: parse.c:431
METHOD_NOT
#define METHOD_NOT
Definition: parse.c:690
EXPR_ARG_bit
@ EXPR_ARG_bit
Definition: parse.c:139
memmove
#define memmove(dst, src, len)
Definition: rb_mjit_min_header-2.7.1.h:2848
rb_data_type_struct
Definition: ruby.h:1148
BUILTIN_TYPE
#define BUILTIN_TYPE(x)
Definition: ruby.h:551
rb_big_norm
VALUE rb_big_norm(VALUE x)
Definition: bignum.c:3152
RFLOAT_VALUE
#define RFLOAT_VALUE(v)
Definition: ruby.h:966
parser_params::cond_stack
stack_type cond_stack
Definition: ripper.c:298
yyalloc
Definition: ripper.c:1409
YYLTYPE::first_column
int first_column
Definition: parse.h:198
NEW_POSTARG
#define NEW_POSTARG(i, v, loc)
Definition: node.h:356
xfree
#define xfree
Definition: defines.h:216
stack_type
VALUE stack_type
Definition: ripper.c:183
IS_ARG
#define IS_ARG()
Definition: parse.c:13785
v
int VALUE v
Definition: rb_mjit_min_header-2.7.1.h:12337
warn_balanced
#define warn_balanced(tok, op, syn)
Definition: parse.c:14798
RBASIC
#define RBASIC(obj)
Definition: ruby.h:1267
NEW_STRTERM
#define NEW_STRTERM(func, term, paren)
Definition: parse.c:13700
rb_parser_set_yydebug
VALUE rb_parser_set_yydebug(VALUE self, VALUE flag)
Definition: parse.c:19281
SPECIAL_PUNCT
#define SPECIAL_PUNCT(idx)
Definition: parse.c:13733
rb_ary_pattern_info::imemo
VALUE imemo
Definition: node.h:457
YY_
#define YY_(Msgid)
Definition: parse.c:1280
rb_parser_encoding
VALUE rb_parser_encoding(VALUE vparser)
Definition: parse.c:19249
YYSTACK_ALLOC_MAXIMUM
#define YYSTACK_ALLOC_MAXIMUM
Definition: parse.c:1380
parser_params::token_info_enabled
unsigned int token_info_enabled
Definition: ripper.c:339
rb_gc_mark
void rb_gc_mark(VALUE ptr)
Definition: gc.c:5214
ruby_sized_xfree
#define ruby_sized_xfree(ptr, size)
Definition: rb_mjit_min_header-2.7.1.h:7372
local_vars::args
struct vtable * args
Definition: ripper.c:215
ENCODING_SET
#define ENCODING_SET(obj, i)
Definition: encoding.h:60
tDOT3
@ tDOT3
Definition: parse.h:129
RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC
#define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current)
Definition: parse.c:122
rb_strterm_heredoc_struct
Definition: ripper.c:731
rb_compile_warn
void rb_compile_warn(const char *file, int line, const char *fmt,...)
Definition: error.c:270
parser_params::cmdarg_stack
stack_type cmdarg_stack
Definition: ripper.c:299
vtable_alloc
#define vtable_alloc(prev)
Definition: parse.c:12586
ifndef_ripper
#define ifndef_ripper(x)
Definition: parse.c:943
rb_imemo_tmpbuf_auto_free_pointer
#define rb_imemo_tmpbuf_auto_free_pointer()
Definition: internal.h:1239
NODE_YIELD
@ NODE_YIELD
Definition: node.h:81
NEW_DASGN_CURR
#define NEW_DASGN_CURR(v, val, loc)
Definition: node.h:319
Qtrue
#define Qtrue
Definition: ruby.h:468
errno
int errno
rb_str_catf
VALUE rb_str_catf(VALUE str, const char *format,...)
Definition: sprintf.c:1237
parser_params::paren_nest
int paren_nest
Definition: ripper.c:292
is_notop_id
#define is_notop_id(id)
Definition: symbol.h:35
rb_parser_trace_lex_state
enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int)
Definition: parse.c:17037
len
uint8_t len
Definition: escape.c:17
ID_CLASS
#define ID_CLASS
Definition: id.h:38
idCmp
@ idCmp
Definition: id.h:84
SYMBOL_P
#define SYMBOL_P(x)
Definition: ruby.h:413
NEW_CVASGN
#define NEW_CVASGN(v, val, loc)
Definition: node.h:322
RUBY_SET_YYLLOC_OF_NONE
#define RUBY_SET_YYLLOC_OF_NONE(Current)
Definition: parse.c:124
NEW_RETURN
#define NEW_RETURN(s, loc)
Definition: node.h:310
rb_enc_prev_char
#define rb_enc_prev_char(s, p, e, enc)
Definition: encoding.h:220
RNode::u3
union RNode::@124 u3
rb_usascii_str_new2
#define rb_usascii_str_new2
Definition: intern.h:909
tLBRACE
@ tLBRACE
Definition: parse.h:145
YYLTYPE::first_line
int first_line
Definition: parse.h:197
modifier_until
@ modifier_until
Definition: parse.h:89
cond_type
cond_type
Definition: ripper.c:17856
DVARS_TERMINAL_P
#define DVARS_TERMINAL_P(tbl)
Definition: parse.c:249
YY_IGNORE_MAYBE_UNINITIALIZED_END
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: parse.c:1331
nd_next
#define nd_next
Definition: node.h:216
rb_class_new_instance
VALUE rb_class_new_instance(int, const VALUE *, VALUE)
Allocates and initializes an instance of klass.
Definition: object.c:1955
tBDOT3
@ tBDOT3
Definition: parse.h:131
yylval
#define yylval
Definition: parse.c:12188
MEMMOVE
#define MEMMOVE(p1, p2, type, n)
Definition: ruby.h:1754
RUBY_SET_YYLLOC
#define RUBY_SET_YYLLOC(Current)
Definition: parse.c:126
tCVAR
@ tCVAR
Definition: parse.h:103
RE_OPTION_MASK
#define RE_OPTION_MASK
Definition: parse.c:706
rb_parser_free
void rb_parser_free(struct parser_params *p, void *ptr)
Definition: parse.c:19370
YY_LOCATION_PRINT
#define YY_LOCATION_PRINT(File, loc)
Definition: parse.c:104
magic_comment::func
rb_magic_comment_setter_t func
Definition: ripper.c:14615
NODE_SPECIAL_NO_NAME_REST
#define NODE_SPECIAL_NO_NAME_REST
Definition: node.h:383
YYSIZE_T
#define YYSIZE_T
Definition: parse.c:1264
rb_parser_new
VALUE rb_parser_new(void)
Definition: parse.c:19176
LONG2FIX
#define LONG2FIX(i)
Definition: ruby.h:265
peek_n
#define peek_n(p, c, n)
Definition: parse.c:12938
rb_enc_codelen
int rb_enc_codelen(int c, rb_encoding *enc)
Definition: encoding.c:1089
NODE_BACK_REF
@ NODE_BACK_REF
Definition: node.h:89
nd_line
#define nd_line(n)
Definition: node.h:194
flush_string_content
#define flush_string_content(p, enc)
Definition: parse.c:13725
NO_PARAM
@ NO_PARAM
Definition: parse.c:231
rb_intern_str
#define rb_intern_str(string)
Definition: generator.h:16
T_STRING
#define T_STRING
Definition: ruby.h:528
rb_enc_symname_type
int rb_enc_symname_type(const char *name, long len, rb_encoding *enc, unsigned int allowed_attrset)
Definition: symbol.c:233
EXPR_MID_bit
@ EXPR_MID_bit
Definition: parse.c:141
NODE_DEFINED
@ NODE_DEFINED
Definition: node.h:129
else
else
Definition: rb_mjit_min_header-2.7.1.h:13251
MAYBE_UNUSED
#define MAYBE_UNUSED
Definition: ffi_common.h:32
RE_OPTION_ENCODING_IDX
#define RE_OPTION_ENCODING_IDX(o)
Definition: parse.c:704
parser_params
Definition: ripper.c:270
parser_params::eval_tree
NODE * eval_tree
Definition: ripper.c:356
Qnone
#define Qnone
Definition: parse.c:941
WARN_IVAL
#define WARN_IVAL(i)
Definition: parse.c:999
idLASTLINE
@ idLASTLINE
Definition: rb_mjit_min_header-2.7.1.h:8757
strncmp
int strncmp(const char *, const char *, size_t)
tSTAR
@ tSTAR
Definition: parse.h:147
rb_args_info::block_arg
ID block_arg
Definition: node.h:441
keyword_case
@ keyword_case
Definition: parse.h:62
NODE_REQUIRED_KEYWORD_P
#define NODE_REQUIRED_KEYWORD_P(node)
Definition: node.h:382
rb_const_defined_at
int rb_const_defined_at(VALUE, ID)
Definition: variable.c:2688
stderr
#define stderr
Definition: rb_mjit_min_header-2.7.1.h:1485
EXPR_BEG_bit
@ EXPR_BEG_bit
Definition: parse.c:135
yytype_int8
signed char yytype_int8
Definition: parse.c:1242
rb_strterm_literal_struct::u2
union rb_strterm_literal_struct::@68 u2
rb_parser_realloc
void * rb_parser_realloc(struct parser_params *p, void *ptr, size_t size)
Definition: parse.c:19350
parser_params::enc
rb_encoding * enc
Definition: ripper.c:314
YYSTYPE::node
NODE * node
Definition: parse.h:178
rb_ensure
VALUE rb_ensure(VALUE(*b_proc)(VALUE), VALUE data1, VALUE(*e_proc)(VALUE), VALUE data2)
An equivalent to ensure clause.
Definition: eval.c:1115
NODE_VALUES
@ NODE_VALUES
Definition: node.h:78
keyword_break
@ keyword_break
Definition: parse.h:67
parser_params::eval_tree_begin
NODE * eval_tree_begin
Definition: ripper.c:355
NODE_FLIP3
@ NODE_FLIP3
Definition: node.h:123
nd_type
#define nd_type(n)
Definition: node.h:188
parser_params::state
enum lex_state_e state
Definition: ripper.c:290
STRTERM_HEREDOC
#define STRTERM_HEREDOC
Definition: parse.c:753
rb_builtin_class_name
const char * rb_builtin_class_name(VALUE x)
Definition: error.c:797
idAND
@ idAND
Definition: rb_mjit_min_header-2.7.1.h:8737
tQWORDS_BEG
@ tQWORDS_BEG
Definition: parse.h:156
is_identchar
#define is_identchar(p, e, enc)
Definition: symbol.c:35
rb_ary_new
VALUE rb_ary_new(void)
Definition: array.c:723
rb_parser_compile_generic
rb_ast_t * rb_parser_compile_generic(VALUE vparser, VALUE(*lex_gets)(VALUE, int), VALUE fname, VALUE input, int start)
Definition: parse.c:12880
rb_code_location_struct::end_pos
rb_code_position_t end_pos
Definition: node.h:137
rb_code_location_struct
Definition: node.h:135
nd_resq
#define nd_resq
Definition: node.h:222
EXPR_MAX_STATE
@ EXPR_MAX_STATE
Definition: parse.c:148
EXPR_DOT_bit
@ EXPR_DOT_bit
Definition: parse.c:143
ESCAPE_CONTROL
#define ESCAPE_CONTROL
Definition: parse.c:13250
rb_imemo_tmpbuf_struct
Definition: internal.h:1231
rb_ast_body_struct::root
const NODE * root
Definition: node.h:395
NUM2INT
#define NUM2INT(x)
Definition: ruby.h:715
keyword__ENCODING__
@ keyword__ENCODING__
Definition: parse.h:97
Qnil
#define Qnil
Definition: ruby.h:469
parser_params::brace_nest
int brace_nest
Definition: ripper.c:296
nd_plen
#define nd_plen
Definition: node.h:249
keyword_yield
@ keyword_yield
Definition: parse.h:77
keyword_nil
@ keyword_nil
Definition: parse.h:80
intern_cstr
#define intern_cstr(n, l, en)
Definition: parse.c:375
rb_str_buf_cat
#define rb_str_buf_cat
Definition: intern.h:910
ISXDIGIT
#define ISXDIGIT(c)
Definition: ruby.h:2313
tMATCH
@ tMATCH
Definition: parse.h:126
token_info::token
const char * token
Definition: ripper.c:252
parser_params::ruby_sourcefile_string
VALUE ruby_sourcefile_string
Definition: ripper.c:313
COND_POP
#define COND_POP()
Definition: parse.c:196
NODE_REDO
@ NODE_REDO
Definition: node.h:48
nd_brace
#define nd_brace
Definition: node.h:274
compile_error
#define compile_error
Definition: parse.c:1008
YYLAST
#define YYLAST
Definition: parse.c:1471
st_lookup
int st_lookup(st_table *tab, st_data_t key, st_data_t *value)
Definition: st.c:1101
tIDENTIFIER
@ tIDENTIFIER
Definition: parse.h:98
rb_init_parse
void rb_init_parse(void)
Definition: parse.c:19041
NEW_COLON2
#define NEW_COLON2(c, i, loc)
Definition: node.h:367
util.h
rb_strterm_heredoc_struct::lastline
VALUE lastline
Definition: ripper.c:732
NUMPARAM_ID_P
#define NUMPARAM_ID_P(id)
Definition: parse.c:235
rb_ary_pattern_info
Definition: node.h:453
str_regexp
@ str_regexp
Definition: parse.c:12910
rb_parser_set_location
YYLTYPE * rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
Definition: parse.c:17131
NEW_UNTIL
#define NEW_UNTIL(c, b, n, loc)
Definition: node.h:297
EXPR_ARG_ANY
@ EXPR_ARG_ANY
Definition: parse.c:168
RB_GC_GUARD
#define RB_GC_GUARD(v)
Definition: ruby.h:585
numberof
#define numberof(array)
Definition: etc.c:618
rb_str_coderange_scan_restartable
long rb_str_coderange_scan_restartable(const char *, const char *, rb_encoding *, int *)
Definition: string.c:567
rb_strlen_lit
#define rb_strlen_lit(str)
Definition: intern.h:913
CSI_BEGIN
#define CSI_BEGIN
tAREF
@ tAREF
Definition: parse.h:132
modifier_if
@ modifier_if
Definition: parse.h:86
parser_params::lpar_beg
int lpar_beg
Definition: ripper.c:294
rb_parser_fatal
void rb_parser_fatal(struct parser_params *p, const char *fmt,...)
Definition: parse.c:17080
tHEREDOC_END
@ tHEREDOC_END
Definition: eventids2.c:8
RSTRING_LEN
#define RSTRING_LEN(str)
Definition: ruby.h:1005
st_free_table
void st_free_table(st_table *tab)
Definition: st.c:709
NEW_SPLAT
#define NEW_SPLAT(a, loc)
Definition: node.h:359
st_table
Definition: st.h:79
rb_strterm_struct::heredoc
rb_strterm_heredoc_t heredoc
Definition: ripper.c:759
rb_strterm_literal_struct::func
long func
Definition: ripper.c:717
nd_2nd
#define nd_2nd
Definition: node.h:226
rb_args_info::rest_arg
ID rest_arg
Definition: node.h:440
set_yylval_noname
#define set_yylval_noname()
Definition: parse.c:12232
INT_MAX
#define INT_MAX
Definition: rb_mjit_min_header-2.7.1.h:4052
tRPAREN
@ tRPAREN
Definition: parse.h:143
ID_CONST
#define ID_CONST
Definition: id.h:37
rb_define_private_method
void rb_define_private_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
Definition: class.c:1569
parser_params::tokline
int tokline
Definition: ripper.c:302
parser_params::node_id
int node_id
Definition: ripper.c:325
NEW_CASE2
#define NEW_CASE2(b, loc)
Definition: node.h:292
rb_enc_isspace
#define rb_enc_isspace(c, enc)
Definition: encoding.h:237
NEW_VALIAS
#define NEW_VALIAS(n, o, loc)
Definition: node.h:362
local_vars::used
struct vtable * used
Definition: ripper.c:217
NODE_SCOPE
@ NODE_SCOPE
Definition: node.h:32
idNeqTilde
@ idNeqTilde
Definition: id.h:104
NEW_DVAR
#define NEW_DVAR(v, loc)
Definition: node.h:331
NODE_RETRY
@ NODE_RETRY
Definition: node.h:49
rb_enc_str_new
VALUE rb_enc_str_new(const char *, long, rb_encoding *)
Definition: string.c:796
NODE_LIST
@ NODE_LIST
Definition: node.h:76
rb_str_cat
VALUE rb_str_cat(VALUE, const char *, long)
Definition: string.c:2812
rb_enc_associate
VALUE rb_enc_associate(VALUE obj, rb_encoding *enc)
Definition: encoding.c:866
tINTEGER
@ tINTEGER
Definition: parse.h:105
RREGEXP_PTR
#define RREGEXP_PTR(r)
Definition: ruby.h:1118
rb_reg_check_preprocess
VALUE rb_reg_check_preprocess(VALUE)
Definition: re.c:2707
ENC_CODERANGE_UNKNOWN
#define ENC_CODERANGE_UNKNOWN
Definition: encoding.h:103
rb_define_alloc_func
void rb_define_alloc_func(VALUE, rb_alloc_func_t)
keyword_elsif
@ keyword_elsif
Definition: parse.h:60
parser_params::in_class
unsigned int in_class
Definition: ripper.c:337
RTEST
#define RTEST(v)
Definition: ruby.h:481
ruby::backward::cxxanyargs::type
VALUE type(ANYARGS)
ANYARGS-ed function type.
Definition: cxxanyargs.hpp:39
IS_lex_state_for
#define IS_lex_state_for(x, ls)
Definition: parse.c:172
stack_type
VALUE stack_type
Definition: parse.c:183
SYM2ID
#define SYM2ID(x)
Definition: ruby.h:415
NUM_SUFFIX_ALL
#define NUM_SUFFIX_ALL
Definition: parse.c:14146
main
int main(void)
Definition: closure_fn0.c:49
get_id
#define get_id(id)
Definition: parse.c:587
RNode
Definition: node.h:149
__sFILE
Definition: vsnprintf.c:169
va_end
#define va_end(v)
Definition: rb_mjit_min_header-2.7.1.h:3979
YYFINAL
#define YYFINAL
Definition: parse.c:1469
tUMINUS
@ tUMINUS
Definition: parse.h:116
EXPR_NONE
@ EXPR_NONE
Definition: parse.c:170
rb_parser_show_bitstack
void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int)
Definition: parse.c:17070
rb_enc_associate_index
VALUE rb_enc_associate_index(VALUE obj, int idx)
Definition: encoding.c:838
NEW_FCALL
#define NEW_FCALL(m, a, loc)
Definition: node.h:349
rb_usascii_encoding
rb_encoding * rb_usascii_encoding(void)
Definition: encoding.c:1340
rb_dvar_defined
int rb_dvar_defined(ID id, const rb_iseq_t *iseq)
Definition: compile.c:9356
RSTRING_END
#define RSTRING_END(str)
Definition: ruby.h:1013
YYPOPSTACK
#define YYPOPSTACK(N)
src
__inline__ const void *__restrict src
Definition: rb_mjit_min_header-2.7.1.h:2836
tLOWEST
@ tLOWEST
Definition: parse.h:165
idGets
@ idGets
Definition: rb_mjit_min_header-2.7.1.h:8706
name
const char * name
Definition: nkf.c:208
NODE_GASGN
@ NODE_GASGN
Definition: node.h:60