Ruby  2.7.2p137(2020-10-01revision5445e0435260b449decf2ac16f9d09bae3cafe72)
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),
170  EXPR_NONE = 0
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;
258 
259 typedef struct rb_strterm_struct rb_strterm_t;
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 1
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 979 "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, 1177, 1177, 1177, 1203, 1209, 1216, 1223, 1230, 1236,
1537  1237, 1243, 1256, 1254, 1265, 1276, 1282, 1289, 1296, 1303,
1538  1309, 1314, 1313, 1323, 1323, 1330, 1337, 1347, 1355, 1362,
1539  1370, 1378, 1390, 1402, 1412, 1426, 1427, 1435, 1443, 1452,
1540  1459, 1462, 1469, 1476, 1484, 1491, 1498, 1506, 1513, 1523,
1541  1528, 1537, 1540, 1541, 1545, 1549, 1553, 1558, 1565, 1567,
1542  1557, 1575, 1578, 1585, 1585, 1585, 1591, 1592, 1595, 1596,
1543  1605, 1615, 1625, 1634, 1645, 1652, 1659, 1666, 1673, 1681,
1544  1689, 1696, 1703, 1712, 1713, 1722, 1723, 1732, 1739, 1746,
1545  1753, 1760, 1767, 1774, 1781, 1788, 1795, 1804, 1805, 1814,
1546  1821, 1830, 1837, 1846, 1853, 1860, 1867, 1877, 1884, 1894,
1547  1901, 1908, 1918, 1925, 1932, 1939, 1946, 1953, 1960, 1967,
1548  1974, 1984, 1991, 1994, 2001, 2008, 2017, 2018, 2019, 2020,
1549  2025, 2028, 2035, 2038, 2045, 2045, 2055, 2056, 2057, 2058,
1550  2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068,
1551  2069, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078,
1552  2079, 2080, 2081, 2082, 2083, 2084, 2087, 2087, 2087, 2088,
1553  2088, 2089, 2089, 2089, 2090, 2090, 2090, 2090, 2091, 2091,
1554  2091, 2091, 2092, 2092, 2092, 2093, 2093, 2093, 2093, 2094,
1555  2094, 2094, 2094, 2095, 2095, 2095, 2095, 2096, 2096, 2096,
1556  2096, 2097, 2097, 2097, 2097, 2098, 2098, 2101, 2108, 2115,
1557  2123, 2131, 2139, 2147, 2155, 2162, 2170, 2179, 2188, 2200,
1558  2212, 2224, 2236, 2240, 2244, 2248, 2252, 2256, 2260, 2264,
1559  2268, 2272, 2276, 2280, 2284, 2288, 2289, 2293, 2297, 2301,
1560  2305, 2309, 2313, 2317, 2321, 2325, 2329, 2333, 2333, 2338,
1561  2347, 2353, 2354, 2355, 2356, 2359, 2363, 2370, 2377, 2378,
1562  2382, 2389, 2398, 2403, 2414, 2421, 2450, 2451, 2454, 2455,
1563  2456, 2460, 2467, 2476, 2484, 2491, 2499, 2507, 2511, 2511,
1564  2548, 2557, 2561, 2567, 2574, 2581, 2588, 2597, 2598, 2601,
1565  2608, 2615, 2624, 2625, 2626, 2627, 2628, 2629, 2630, 2631,
1566  2632, 2633, 2634, 2642, 2641, 2656, 2656, 2663, 2663, 2671,
1567  2679, 2686, 2693, 2700, 2708, 2715, 2722, 2729, 2736, 2736,
1568  2741, 2745, 2749, 2756, 2757, 2766, 2765, 2776, 2787, 2798,
1569  2808, 2819, 2818, 2835, 2834, 2849, 2858, 2903, 2902, 2926,
1570  2925, 2948, 2947, 2971, 2977, 2970, 2997, 2998, 2997, 3023,
1571  3030, 3037, 3044, 3053, 3060, 3066, 3083, 3089, 3095, 3101,
1572  3107, 3113, 3119, 3125, 3131, 3137, 3143, 3149, 3155, 3161,
1573  3176, 3183, 3189, 3196, 3197, 3198, 3201, 3202, 3205, 3206,
1574  3218, 3219, 3228, 3229, 3232, 3240, 3249, 3256, 3265, 3272,
1575  3279, 3286, 3293, 3302, 3310, 3319, 3323, 3327, 3331, 3335,
1576  3341, 3346, 3351, 3355, 3359, 3363, 3367, 3371, 3379, 3383,
1577  3387, 3391, 3395, 3399, 3403, 3407, 3411, 3417, 3418, 3424,
1578  3433, 3445, 3449, 3458, 3460, 3464, 3469, 3475, 3478, 3482,
1579  3486, 3490, 3475, 3514, 3522, 3532, 3537, 3543, 3553, 3567,
1580  3574, 3581, 3590, 3599, 3607, 3615, 3622, 3630, 3638, 3645,
1581  3652, 3665, 3673, 3683, 3684, 3688, 3683, 3705, 3706, 3710,
1582  3705, 3729, 3737, 3744, 3752, 3761, 3773, 3774, 3778, 3784,
1583  3785, 3787, 3788, 3789, 3777, 3802, 3803, 3806, 3807, 3815,
1584  3825, 3826, 3831, 3839, 3843, 3849, 3852, 3861, 3864, 3871,
1585  3874, 3875, 3877, 3878, 3887, 3896, 3901, 3910, 3919, 3924,
1586  3924, 3929, 3935, 3934, 3946, 3951, 3951, 3958, 3967, 3971,
1587  3980, 3984, 3988, 3992, 3996, 3999, 4003, 4012, 4016, 4020,
1588  4024, 4030, 4031, 4040, 4049, 4053, 4057, 4061, 4065, 4069,
1589  4075, 4077, 4086, 4094, 4108, 4109, 4132, 4136, 4142, 4148,
1590  4149, 4158, 4167, 4179, 4191, 4192, 4193, 4194, 4206, 4220,
1591  4221, 4222, 4223, 4224, 4225, 4226, 4227, 4228, 4236, 4235,
1592  4248, 4258, 4271, 4278, 4285, 4294, 4306, 4309, 4316, 4323,
1593  4326, 4330, 4333, 4340, 4343, 4344, 4347, 4364, 4365, 4366,
1594  4375, 4385, 4394, 4400, 4410, 4416, 4425, 4427, 4436, 4446,
1595  4452, 4461, 4470, 4480, 4486, 4496, 4502, 4512, 4522, 4541,
1596  4547, 4557, 4567, 4608, 4611, 4610, 4627, 4631, 4636, 4640,
1597  4644, 4626, 4665, 4672, 4679, 4686, 4689, 4690, 4693, 4703,
1598  4704, 4705, 4706, 4709, 4719, 4720, 4730, 4731, 4732, 4733,
1599  4736, 4737, 4738, 4739, 4740, 4743, 4744, 4745, 4746, 4747,
1600  4748, 4749, 4752, 4765, 4774, 4781, 4790, 4791, 4795, 4794,
1601  4804, 4812, 4821, 4836, 4836, 4850, 4854, 4858, 4862, 4866,
1602  4872, 4877, 4882, 4886, 4890, 4894, 4898, 4902, 4906, 4910,
1603  4914, 4918, 4922, 4926, 4930, 4934, 4939, 4945, 4954, 4962,
1604  4970, 4978, 4988, 4989, 4997, 5006, 5014, 5035, 5037, 5050,
1605  5060, 5068, 5078, 5085, 5094, 5101, 5111, 5118, 5127, 5128,
1606  5131, 5139, 5147, 5157, 5167, 5177, 5184, 5193, 5200, 5209,
1607  5210, 5213, 5221, 5231, 5232, 5235, 5245, 5249, 5255, 5260,
1608  5260, 5284, 5285, 5294, 5296, 5319, 5330, 5337, 5345, 5364,
1609  5365, 5366, 5369, 5370, 5371, 5372, 5375, 5376, 5377, 5380,
1610  5381, 5384, 5385, 5388, 5389, 5392, 5393, 5396, 5397, 5400,
1611  5403, 5406, 5409, 5410, 5411, 5414, 5415, 5418, 5419, 5423
1612 };
1613 #endif
1614 
1615 #if YYDEBUG || YYERROR_VERBOSE || 1
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 975 "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 1177 "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 1182 "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 1204 "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 1210 "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 1217 "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 1224 "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 1231 "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 1238 "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 1244 "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 1256 "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 1259 "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 1268 "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 1277 "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 1283 "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 1290 "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 1297 "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 1304 "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 1310 "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 1314 "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 1318 "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 1323 "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 1324 "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 1331 "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 1338 "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 1348 "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 1356 "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 1363 "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 1371 "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 1379 "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 1391 "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 1403 "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 1413 "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 1428 "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 1436 "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 1444 "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 1453 "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 1463 "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 1470 "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 1477 "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 1485 "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 1492 "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 1499 "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 1507 "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 1514 "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 1524 "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 1529 "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 1542 "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 1546 "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 1550 "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 1554 "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 1558 "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 1565 "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 1567 "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 1568 "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 1579 "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 1585 "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 1585 "parse.y" /* yacc.c:1646 */
6509  {COND_POP();}
6510 #line 6506 "parse.c" /* yacc.c:1646 */
6511  break;
6512 
6513  case 65:
6514 #line 1586 "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 1597 "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 1606 "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 1616 "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 1626 "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 1635 "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 1646 "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 1653 "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 1660 "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 1667 "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 1674 "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 1682 "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 1690 "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 1697 "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 1704 "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 1714 "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 1724 "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 1733 "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 1740 "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 1747 "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 1754 "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 1761 "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 1768 "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 1775 "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 1782 "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 1789 "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 1796 "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 1806 "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 1815 "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 1822 "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 1831 "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 1838 "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 1847 "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 1854 "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 1861 "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 1868 "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 1878 "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 1885 "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 1895 "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 1902 "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 1909 "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 1919 "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 1926 "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 1933 "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 1940 "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 1947 "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 1954 "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 1961 "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 1968 "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 1975 "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 1985 "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 1995 "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 2002 "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 2009 "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 2021 "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 131:
7132 #line 2029 "parse.y" /* yacc.c:1646 */
7133  {
7134  /*%%%*/
7135  (yyval.node) = NEW_LIT(ID2SYM((yyvsp[0].id)), &(yyloc));
7136  /*% %*/
7137  /*% ripper: symbol_literal!($1) %*/
7138  }
7139 #line 7135 "parse.c" /* yacc.c:1646 */
7140  break;
7141 
7142  case 133:
7143 #line 2039 "parse.y" /* yacc.c:1646 */
7144  {
7145  /*%%%*/
7146  (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
7147  /*% %*/
7148  /*% ripper: rb_ary_new3(1, get_value($1)) %*/
7149  }
7150 #line 7146 "parse.c" /* yacc.c:1646 */
7151  break;
7152 
7153  case 134:
7154 #line 2045 "parse.y" /* yacc.c:1646 */
7155  {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
7156 #line 7152 "parse.c" /* yacc.c:1646 */
7157  break;
7158 
7159  case 135:
7160 #line 2046 "parse.y" /* yacc.c:1646 */
7161  {
7162  /*%%%*/
7163  NODE *undef = NEW_UNDEF((yyvsp[0].node), &(yylsp[0]));
7164  (yyval.node) = block_append(p, (yyvsp[-3].node), undef);
7165  /*% %*/
7166  /*% ripper: rb_ary_push($1, get_value($4)) %*/
7167  }
7168 #line 7164 "parse.c" /* yacc.c:1646 */
7169  break;
7170 
7171  case 136:
7172 #line 2055 "parse.y" /* yacc.c:1646 */
7173  { ifndef_ripper((yyval.id) = '|'); }
7174 #line 7170 "parse.c" /* yacc.c:1646 */
7175  break;
7176 
7177  case 137:
7178 #line 2056 "parse.y" /* yacc.c:1646 */
7179  { ifndef_ripper((yyval.id) = '^'); }
7180 #line 7176 "parse.c" /* yacc.c:1646 */
7181  break;
7182 
7183  case 138:
7184 #line 2057 "parse.y" /* yacc.c:1646 */
7185  { ifndef_ripper((yyval.id) = '&'); }
7186 #line 7182 "parse.c" /* yacc.c:1646 */
7187  break;
7188 
7189  case 139:
7190 #line 2058 "parse.y" /* yacc.c:1646 */
7191  { ifndef_ripper((yyval.id) = tCMP); }
7192 #line 7188 "parse.c" /* yacc.c:1646 */
7193  break;
7194 
7195  case 140:
7196 #line 2059 "parse.y" /* yacc.c:1646 */
7197  { ifndef_ripper((yyval.id) = tEQ); }
7198 #line 7194 "parse.c" /* yacc.c:1646 */
7199  break;
7200 
7201  case 141:
7202 #line 2060 "parse.y" /* yacc.c:1646 */
7203  { ifndef_ripper((yyval.id) = tEQQ); }
7204 #line 7200 "parse.c" /* yacc.c:1646 */
7205  break;
7206 
7207  case 142:
7208 #line 2061 "parse.y" /* yacc.c:1646 */
7209  { ifndef_ripper((yyval.id) = tMATCH); }
7210 #line 7206 "parse.c" /* yacc.c:1646 */
7211  break;
7212 
7213  case 143:
7214 #line 2062 "parse.y" /* yacc.c:1646 */
7215  { ifndef_ripper((yyval.id) = tNMATCH); }
7216 #line 7212 "parse.c" /* yacc.c:1646 */
7217  break;
7218 
7219  case 144:
7220 #line 2063 "parse.y" /* yacc.c:1646 */
7221  { ifndef_ripper((yyval.id) = '>'); }
7222 #line 7218 "parse.c" /* yacc.c:1646 */
7223  break;
7224 
7225  case 145:
7226 #line 2064 "parse.y" /* yacc.c:1646 */
7227  { ifndef_ripper((yyval.id) = tGEQ); }
7228 #line 7224 "parse.c" /* yacc.c:1646 */
7229  break;
7230 
7231  case 146:
7232 #line 2065 "parse.y" /* yacc.c:1646 */
7233  { ifndef_ripper((yyval.id) = '<'); }
7234 #line 7230 "parse.c" /* yacc.c:1646 */
7235  break;
7236 
7237  case 147:
7238 #line 2066 "parse.y" /* yacc.c:1646 */
7239  { ifndef_ripper((yyval.id) = tLEQ); }
7240 #line 7236 "parse.c" /* yacc.c:1646 */
7241  break;
7242 
7243  case 148:
7244 #line 2067 "parse.y" /* yacc.c:1646 */
7245  { ifndef_ripper((yyval.id) = tNEQ); }
7246 #line 7242 "parse.c" /* yacc.c:1646 */
7247  break;
7248 
7249  case 149:
7250 #line 2068 "parse.y" /* yacc.c:1646 */
7251  { ifndef_ripper((yyval.id) = tLSHFT); }
7252 #line 7248 "parse.c" /* yacc.c:1646 */
7253  break;
7254 
7255  case 150:
7256 #line 2069 "parse.y" /* yacc.c:1646 */
7257  { ifndef_ripper((yyval.id) = tRSHFT); }
7258 #line 7254 "parse.c" /* yacc.c:1646 */
7259  break;
7260 
7261  case 151:
7262 #line 2070 "parse.y" /* yacc.c:1646 */
7263  { ifndef_ripper((yyval.id) = '+'); }
7264 #line 7260 "parse.c" /* yacc.c:1646 */
7265  break;
7266 
7267  case 152:
7268 #line 2071 "parse.y" /* yacc.c:1646 */
7269  { ifndef_ripper((yyval.id) = '-'); }
7270 #line 7266 "parse.c" /* yacc.c:1646 */
7271  break;
7272 
7273  case 153:
7274 #line 2072 "parse.y" /* yacc.c:1646 */
7275  { ifndef_ripper((yyval.id) = '*'); }
7276 #line 7272 "parse.c" /* yacc.c:1646 */
7277  break;
7278 
7279  case 154:
7280 #line 2073 "parse.y" /* yacc.c:1646 */
7281  { ifndef_ripper((yyval.id) = '*'); }
7282 #line 7278 "parse.c" /* yacc.c:1646 */
7283  break;
7284 
7285  case 155:
7286 #line 2074 "parse.y" /* yacc.c:1646 */
7287  { ifndef_ripper((yyval.id) = '/'); }
7288 #line 7284 "parse.c" /* yacc.c:1646 */
7289  break;
7290 
7291  case 156:
7292 #line 2075 "parse.y" /* yacc.c:1646 */
7293  { ifndef_ripper((yyval.id) = '%'); }
7294 #line 7290 "parse.c" /* yacc.c:1646 */
7295  break;
7296 
7297  case 157:
7298 #line 2076 "parse.y" /* yacc.c:1646 */
7299  { ifndef_ripper((yyval.id) = tPOW); }
7300 #line 7296 "parse.c" /* yacc.c:1646 */
7301  break;
7302 
7303  case 158:
7304 #line 2077 "parse.y" /* yacc.c:1646 */
7305  { ifndef_ripper((yyval.id) = tDSTAR); }
7306 #line 7302 "parse.c" /* yacc.c:1646 */
7307  break;
7308 
7309  case 159:
7310 #line 2078 "parse.y" /* yacc.c:1646 */
7311  { ifndef_ripper((yyval.id) = '!'); }
7312 #line 7308 "parse.c" /* yacc.c:1646 */
7313  break;
7314 
7315  case 160:
7316 #line 2079 "parse.y" /* yacc.c:1646 */
7317  { ifndef_ripper((yyval.id) = '~'); }
7318 #line 7314 "parse.c" /* yacc.c:1646 */
7319  break;
7320 
7321  case 161:
7322 #line 2080 "parse.y" /* yacc.c:1646 */
7323  { ifndef_ripper((yyval.id) = tUPLUS); }
7324 #line 7320 "parse.c" /* yacc.c:1646 */
7325  break;
7326 
7327  case 162:
7328 #line 2081 "parse.y" /* yacc.c:1646 */
7329  { ifndef_ripper((yyval.id) = tUMINUS); }
7330 #line 7326 "parse.c" /* yacc.c:1646 */
7331  break;
7332 
7333  case 163:
7334 #line 2082 "parse.y" /* yacc.c:1646 */
7335  { ifndef_ripper((yyval.id) = tAREF); }
7336 #line 7332 "parse.c" /* yacc.c:1646 */
7337  break;
7338 
7339  case 164:
7340 #line 2083 "parse.y" /* yacc.c:1646 */
7341  { ifndef_ripper((yyval.id) = tASET); }
7342 #line 7338 "parse.c" /* yacc.c:1646 */
7343  break;
7344 
7345  case 165:
7346 #line 2084 "parse.y" /* yacc.c:1646 */
7347  { ifndef_ripper((yyval.id) = '`'); }
7348 #line 7344 "parse.c" /* yacc.c:1646 */
7349  break;
7350 
7351  case 207:
7352 #line 2102 "parse.y" /* yacc.c:1646 */
7353  {
7354  /*%%%*/
7355  (yyval.node) = node_assign(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
7356  /*% %*/
7357  /*% ripper: assign!($1, $3) %*/
7358  }
7359 #line 7355 "parse.c" /* yacc.c:1646 */
7360  break;
7361 
7362  case 208:
7363 #line 2109 "parse.y" /* yacc.c:1646 */
7364  {
7365  /*%%%*/
7366  (yyval.node) = new_op_assign(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7367  /*% %*/
7368  /*% ripper: opassign!($1, $2, $3) %*/
7369  }
7370 #line 7366 "parse.c" /* yacc.c:1646 */
7371  break;
7372 
7373  case 209:
7374 #line 2116 "parse.y" /* yacc.c:1646 */
7375  {
7376  /*%%%*/
7377  value_expr((yyvsp[0].node));
7378  (yyval.node) = new_ary_op_assign(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-3]), &(yyloc));
7379  /*% %*/
7380  /*% ripper: opassign!(aref_field!($1, escape_Qundef($3)), $5, $6) %*/
7381  }
7382 #line 7378 "parse.c" /* yacc.c:1646 */
7383  break;
7384 
7385  case 210:
7386 #line 2124 "parse.y" /* yacc.c:1646 */
7387  {
7388  /*%%%*/
7389  value_expr((yyvsp[0].node));
7390  (yyval.node) = new_attr_op_assign(p, (yyvsp[-4].node), (yyvsp[-3].id), (yyvsp[-2].id), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7391  /*% %*/
7392  /*% ripper: opassign!(field!($1, $2, $3), $4, $5) %*/
7393  }
7394 #line 7390 "parse.c" /* yacc.c:1646 */
7395  break;
7396 
7397  case 211:
7398 #line 2132 "parse.y" /* yacc.c:1646 */
7399  {
7400  /*%%%*/
7401  value_expr((yyvsp[0].node));
7402  (yyval.node) = new_attr_op_assign(p, (yyvsp[-4].node), (yyvsp[-3].id), (yyvsp[-2].id), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7403  /*% %*/
7404  /*% ripper: opassign!(field!($1, $2, $3), $4, $5) %*/
7405  }
7406 #line 7402 "parse.c" /* yacc.c:1646 */
7407  break;
7408 
7409  case 212:
7410 #line 2140 "parse.y" /* yacc.c:1646 */
7411  {
7412  /*%%%*/
7413  value_expr((yyvsp[0].node));
7414  (yyval.node) = new_attr_op_assign(p, (yyvsp[-4].node), ID2VAL(idCOLON2), (yyvsp[-2].id), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7415  /*% %*/
7416  /*% ripper: opassign!(field!($1, ID2VAL(idCOLON2), $3), $4, $5) %*/
7417  }
7418 #line 7414 "parse.c" /* yacc.c:1646 */
7419  break;
7420 
7421  case 213:
7422 #line 2148 "parse.y" /* yacc.c:1646 */
7423  {
7424  /*%%%*/
7425  YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-2]));
7426  (yyval.node) = new_const_op_assign(p, NEW_COLON2((yyvsp[-4].node), (yyvsp[-2].id), &loc), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7427  /*% %*/
7428  /*% ripper: opassign!(const_path_field!($1, $3), $4, $5) %*/
7429  }
7430 #line 7426 "parse.c" /* yacc.c:1646 */
7431  break;
7432 
7433  case 214:
7434 #line 2156 "parse.y" /* yacc.c:1646 */
7435  {
7436  /*%%%*/
7437  (yyval.node) = new_const_op_assign(p, NEW_COLON3((yyvsp[-2].id), &(yyloc)), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7438  /*% %*/
7439  /*% ripper: opassign!(top_const_field!($2), $3, $4) %*/
7440  }
7441 #line 7437 "parse.c" /* yacc.c:1646 */
7442  break;
7443 
7444  case 215:
7445 #line 2163 "parse.y" /* yacc.c:1646 */
7446  {
7447  /*%%%*/
7448  rb_backref_error(p, (yyvsp[-2].node));
7449  (yyval.node) = NEW_BEGIN(0, &(yyloc));
7450  /*% %*/
7451  /*% ripper[error]: assign_error!(opassign!(var_field(p, $1), $2, $3)) %*/
7452  }
7453 #line 7449 "parse.c" /* yacc.c:1646 */
7454  break;
7455 
7456  case 216:
7457 #line 2171 "parse.y" /* yacc.c:1646 */
7458  {
7459  /*%%%*/
7460  value_expr((yyvsp[-2].node));
7461  value_expr((yyvsp[0].node));
7462  (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
7463  /*% %*/
7464  /*% ripper: dot2!($1, $3) %*/
7465  }
7466 #line 7462 "parse.c" /* yacc.c:1646 */
7467  break;
7468 
7469  case 217:
7470 #line 2180 "parse.y" /* yacc.c:1646 */
7471  {
7472  /*%%%*/
7473  value_expr((yyvsp[-2].node));
7474  value_expr((yyvsp[0].node));
7475  (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
7476  /*% %*/
7477  /*% ripper: dot3!($1, $3) %*/
7478  }
7479 #line 7475 "parse.c" /* yacc.c:1646 */
7480  break;
7481 
7482  case 218:
7483 #line 2189 "parse.y" /* yacc.c:1646 */
7484  {
7485  /*%%%*/
7486  YYLTYPE loc;
7487  loc.beg_pos = (yylsp[0]).end_pos;
7488  loc.end_pos = (yylsp[0]).end_pos;
7489 
7490  value_expr((yyvsp[-1].node));
7491  (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil(&loc), &(yyloc));
7492  /*% %*/
7493  /*% ripper: dot2!($1, Qnil) %*/
7494  }
7495 #line 7491 "parse.c" /* yacc.c:1646 */
7496  break;
7497 
7498  case 219:
7499 #line 2201 "parse.y" /* yacc.c:1646 */
7500  {
7501  /*%%%*/
7502  YYLTYPE loc;
7503  loc.beg_pos = (yylsp[0]).end_pos;
7504  loc.end_pos = (yylsp[0]).end_pos;
7505 
7506  value_expr((yyvsp[-1].node));
7507  (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil(&loc), &(yyloc));
7508  /*% %*/
7509  /*% ripper: dot3!($1, Qnil) %*/
7510  }
7511 #line 7507 "parse.c" /* yacc.c:1646 */
7512  break;
7513 
7514  case 220:
7515 #line 2213 "parse.y" /* yacc.c:1646 */
7516  {
7517  /*%%%*/
7518  YYLTYPE loc;
7519  loc.beg_pos = (yylsp[-1]).beg_pos;
7520  loc.end_pos = (yylsp[-1]).beg_pos;
7521 
7522  value_expr((yyvsp[0].node));
7523  (yyval.node) = NEW_DOT2(new_nil(&loc), (yyvsp[0].node), &(yyloc));
7524  /*% %*/
7525  /*% ripper: dot2!(Qnil, $2) %*/
7526  }
7527 #line 7523 "parse.c" /* yacc.c:1646 */
7528  break;
7529 
7530  case 221:
7531 #line 2225 "parse.y" /* yacc.c:1646 */
7532  {
7533  /*%%%*/
7534  YYLTYPE loc;
7535  loc.beg_pos = (yylsp[-1]).beg_pos;
7536  loc.end_pos = (yylsp[-1]).beg_pos;
7537 
7538  value_expr((yyvsp[0].node));
7539  (yyval.node) = NEW_DOT3(new_nil(&loc), (yyvsp[0].node), &(yyloc));
7540  /*% %*/
7541  /*% ripper: dot3!(Qnil, $2) %*/
7542  }
7543 #line 7539 "parse.c" /* yacc.c:1646 */
7544  break;
7545 
7546  case 222:
7547 #line 2237 "parse.y" /* yacc.c:1646 */
7548  {
7549  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7550  }
7551 #line 7547 "parse.c" /* yacc.c:1646 */
7552  break;
7553 
7554  case 223:
7555 #line 2241 "parse.y" /* yacc.c:1646 */
7556  {
7557  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7558  }
7559 #line 7555 "parse.c" /* yacc.c:1646 */
7560  break;
7561 
7562  case 224:
7563 #line 2245 "parse.y" /* yacc.c:1646 */
7564  {
7565  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7566  }
7567 #line 7563 "parse.c" /* yacc.c:1646 */
7568  break;
7569 
7570  case 225:
7571 #line 2249 "parse.y" /* yacc.c:1646 */
7572  {
7573  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7574  }
7575 #line 7571 "parse.c" /* yacc.c:1646 */
7576  break;
7577 
7578  case 226:
7579 #line 2253 "parse.y" /* yacc.c:1646 */
7580  {
7581  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7582  }
7583 #line 7579 "parse.c" /* yacc.c:1646 */
7584  break;
7585 
7586  case 227:
7587 #line 2257 "parse.y" /* yacc.c:1646 */
7588  {
7589  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7590  }
7591 #line 7587 "parse.c" /* yacc.c:1646 */
7592  break;
7593 
7594  case 228:
7595 #line 2261 "parse.y" /* yacc.c:1646 */
7596  {
7597  (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
7598  }
7599 #line 7595 "parse.c" /* yacc.c:1646 */
7600  break;
7601 
7602  case 229:
7603 #line 2265 "parse.y" /* yacc.c:1646 */
7604  {
7605  (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
7606  }
7607 #line 7603 "parse.c" /* yacc.c:1646 */
7608  break;
7609 
7610  case 230:
7611 #line 2269 "parse.y" /* yacc.c:1646 */
7612  {
7613  (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
7614  }
7615 #line 7611 "parse.c" /* yacc.c:1646 */
7616  break;
7617 
7618  case 231:
7619 #line 2273 "parse.y" /* yacc.c:1646 */
7620  {
7621  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7622  }
7623 #line 7619 "parse.c" /* yacc.c:1646 */
7624  break;
7625 
7626  case 232:
7627 #line 2277 "parse.y" /* yacc.c:1646 */
7628  {
7629  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7630  }
7631 #line 7627 "parse.c" /* yacc.c:1646 */
7632  break;
7633 
7634  case 233:
7635 #line 2281 "parse.y" /* yacc.c:1646 */
7636  {
7637  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7638  }
7639 #line 7635 "parse.c" /* yacc.c:1646 */
7640  break;
7641 
7642  case 234:
7643 #line 2285 "parse.y" /* yacc.c:1646 */
7644  {
7645  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7646  }
7647 #line 7643 "parse.c" /* yacc.c:1646 */
7648  break;
7649 
7650  case 236:
7651 #line 2290 "parse.y" /* yacc.c:1646 */
7652  {
7653  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7654  }
7655 #line 7651 "parse.c" /* yacc.c:1646 */
7656  break;
7657 
7658  case 237:
7659 #line 2294 "parse.y" /* yacc.c:1646 */
7660  {
7661  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7662  }
7663 #line 7659 "parse.c" /* yacc.c:1646 */
7664  break;
7665 
7666  case 238:
7667 #line 2298 "parse.y" /* yacc.c:1646 */
7668  {
7669  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7670  }
7671 #line 7667 "parse.c" /* yacc.c:1646 */
7672  break;
7673 
7674  case 239:
7675 #line 2302 "parse.y" /* yacc.c:1646 */
7676  {
7677  (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7678  }
7679 #line 7675 "parse.c" /* yacc.c:1646 */
7680  break;
7681 
7682  case 240:
7683 #line 2306 "parse.y" /* yacc.c:1646 */
7684  {
7685  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7686  }
7687 #line 7683 "parse.c" /* yacc.c:1646 */
7688  break;
7689 
7690  case 241:
7691 #line 2310 "parse.y" /* yacc.c:1646 */
7692  {
7693  (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
7694  }
7695 #line 7691 "parse.c" /* yacc.c:1646 */
7696  break;
7697 
7698  case 242:
7699 #line 2314 "parse.y" /* yacc.c:1646 */
7700  {
7701  (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
7702  }
7703 #line 7699 "parse.c" /* yacc.c:1646 */
7704  break;
7705 
7706  case 243:
7707 #line 2318 "parse.y" /* yacc.c:1646 */
7708  {
7709  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7710  }
7711 #line 7707 "parse.c" /* yacc.c:1646 */
7712  break;
7713 
7714  case 244:
7715 #line 2322 "parse.y" /* yacc.c:1646 */
7716  {
7717  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7718  }
7719 #line 7715 "parse.c" /* yacc.c:1646 */
7720  break;
7721 
7722  case 245:
7723 #line 2326 "parse.y" /* yacc.c:1646 */
7724  {
7725  (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7726  }
7727 #line 7723 "parse.c" /* yacc.c:1646 */
7728  break;
7729 
7730  case 246:
7731 #line 2330 "parse.y" /* yacc.c:1646 */
7732  {
7733  (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7734  }
7735 #line 7731 "parse.c" /* yacc.c:1646 */
7736  break;
7737 
7738  case 247:
7739 #line 2333 "parse.y" /* yacc.c:1646 */
7740  {p->in_defined = 1;}
7741 #line 7737 "parse.c" /* yacc.c:1646 */
7742  break;
7743 
7744  case 248:
7745 #line 2334 "parse.y" /* yacc.c:1646 */
7746  {
7747  p->in_defined = 0;
7748  (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc));
7749  }
7750 #line 7746 "parse.c" /* yacc.c:1646 */
7751  break;
7752 
7753  case 249:
7754 #line 2339 "parse.y" /* yacc.c:1646 */
7755  {
7756  /*%%%*/
7757  value_expr((yyvsp[-5].node));
7758  (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
7759  fixpos((yyval.node), (yyvsp[-5].node));
7760  /*% %*/
7761  /*% ripper: ifop!($1, $3, $6) %*/
7762  }
7763 #line 7759 "parse.c" /* yacc.c:1646 */
7764  break;
7765 
7766  case 250:
7767 #line 2348 "parse.y" /* yacc.c:1646 */
7768  {
7769  (yyval.node) = (yyvsp[0].node);
7770  }
7771 #line 7767 "parse.c" /* yacc.c:1646 */
7772  break;
7773 
7774  case 251:
7775 #line 2353 "parse.y" /* yacc.c:1646 */
7776  {(yyval.id) = '>';}
7777 #line 7773 "parse.c" /* yacc.c:1646 */
7778  break;
7779 
7780  case 252:
7781 #line 2354 "parse.y" /* yacc.c:1646 */
7782  {(yyval.id) = '<';}
7783 #line 7779 "parse.c" /* yacc.c:1646 */
7784  break;
7785 
7786  case 253:
7787 #line 2355 "parse.y" /* yacc.c:1646 */
7788  {(yyval.id) = idGE;}
7789 #line 7785 "parse.c" /* yacc.c:1646 */
7790  break;
7791 
7792  case 254:
7793 #line 2356 "parse.y" /* yacc.c:1646 */
7794  {(yyval.id) = idLE;}
7795 #line 7791 "parse.c" /* yacc.c:1646 */
7796  break;
7797 
7798  case 255:
7799 #line 2360 "parse.y" /* yacc.c:1646 */
7800  {
7801  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7802  }
7803 #line 7799 "parse.c" /* yacc.c:1646 */
7804  break;
7805 
7806  case 256:
7807 #line 2364 "parse.y" /* yacc.c:1646 */
7808  {
7809  rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
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 257:
7816 #line 2371 "parse.y" /* yacc.c:1646 */
7817  {
7818  value_expr((yyvsp[0].node));
7819  (yyval.node) = (yyvsp[0].node);
7820  }
7821 #line 7817 "parse.c" /* yacc.c:1646 */
7822  break;
7823 
7824  case 259:
7825 #line 2379 "parse.y" /* yacc.c:1646 */
7826  {
7827  (yyval.node) = (yyvsp[-1].node);
7828  }
7829 #line 7825 "parse.c" /* yacc.c:1646 */
7830  break;
7831 
7832  case 260:
7833 #line 2383 "parse.y" /* yacc.c:1646 */
7834  {
7835  /*%%%*/
7836  (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
7837  /*% %*/
7838  /*% ripper: args_add!($1, bare_assoc_hash!($3)) %*/
7839  }
7840 #line 7836 "parse.c" /* yacc.c:1646 */
7841  break;
7842 
7843  case 261:
7844 #line 2390 "parse.y" /* yacc.c:1646 */
7845  {
7846  /*%%%*/
7847  (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
7848  /*% %*/
7849  /*% ripper: args_add!(args_new!, bare_assoc_hash!($1)) %*/
7850  }
7851 #line 7847 "parse.c" /* yacc.c:1646 */
7852  break;
7853 
7854  case 262:
7855 #line 2399 "parse.y" /* yacc.c:1646 */
7856  {
7857  value_expr((yyvsp[0].node));
7858  (yyval.node) = (yyvsp[0].node);
7859  }
7860 #line 7856 "parse.c" /* yacc.c:1646 */
7861  break;
7862 
7863  case 263:
7864 #line 2404 "parse.y" /* yacc.c:1646 */
7865  {
7866  /*%%%*/
7867  YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
7868  value_expr((yyvsp[-2].node));
7869  (yyval.node) = NEW_RESCUE((yyvsp[-2].node), NEW_RESBODY(0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
7870  /*% %*/
7871  /*% ripper: rescue_mod!($1, $3) %*/
7872  }
7873 #line 7869 "parse.c" /* yacc.c:1646 */
7874  break;
7875 
7876  case 264:
7877 #line 2415 "parse.y" /* yacc.c:1646 */
7878  {
7879  /*%%%*/
7880  (yyval.node) = (yyvsp[-1].node);
7881  /*% %*/
7882  /*% ripper: arg_paren!(escape_Qundef($2)) %*/
7883  }
7884 #line 7880 "parse.c" /* yacc.c:1646 */
7885  break;
7886 
7887  case 265:
7888 #line 2422 "parse.y" /* yacc.c:1646 */
7889  {
7890  if (!local_id(p, idFWD_REST) ||
7891 #if idFWD_KWREST
7892  !local_id(p, idFWD_KWREST) ||
7893 #endif
7894  !local_id(p, idFWD_BLOCK)) {
7895  compile_error(p, "unexpected ...");
7896  (yyval.node) = Qnone;
7897  }
7898  else {
7899  /*%%%*/
7900  NODE *splat = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[-1])), &(yylsp[-1]));
7901 #if idFWD_KWREST
7902  NODE *kwrest = list_append(p, NEW_LIST(0, &(yylsp[-1])), NEW_LVAR(idFWD_KWREST, &(yylsp[-1])));
7903 #endif
7904  NODE *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[-1])), &(yylsp[-1]));
7905 #if idFWD_KWREST
7906  (yyval.node) = arg_append(p, splat, new_hash(p, kwrest, &(yylsp[-1])), &(yylsp[-1]));
7907 #else
7908  (yyval.node) = splat;
7909 #endif
7910  (yyval.node) = arg_blk_pass((yyval.node), block);
7911  /*% %*/
7912  /*% ripper: arg_paren!($2) %*/
7913  }
7914  }
7915 #line 7911 "parse.c" /* yacc.c:1646 */
7916  break;
7917 
7918  case 270:
7919 #line 2457 "parse.y" /* yacc.c:1646 */
7920  {
7921  (yyval.node) = (yyvsp[-1].node);
7922  }
7923 #line 7919 "parse.c" /* yacc.c:1646 */
7924  break;
7925 
7926  case 271:
7927 #line 2461 "parse.y" /* yacc.c:1646 */
7928  {
7929  /*%%%*/
7930  (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
7931  /*% %*/
7932  /*% ripper: args_add!($1, bare_assoc_hash!($3)) %*/
7933  }
7934 #line 7930 "parse.c" /* yacc.c:1646 */
7935  break;
7936 
7937  case 272:
7938 #line 2468 "parse.y" /* yacc.c:1646 */
7939  {
7940  /*%%%*/
7941  (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
7942  /*% %*/
7943  /*% ripper: args_add!(args_new!, bare_assoc_hash!($1)) %*/
7944  }
7945 #line 7941 "parse.c" /* yacc.c:1646 */
7946  break;
7947 
7948  case 273:
7949 #line 2477 "parse.y" /* yacc.c:1646 */
7950  {
7951  /*%%%*/
7952  value_expr((yyvsp[0].node));
7953  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
7954  /*% %*/
7955  /*% ripper: args_add!(args_new!, $1) %*/
7956  }
7957 #line 7953 "parse.c" /* yacc.c:1646 */
7958  break;
7959 
7960  case 274:
7961 #line 2485 "parse.y" /* yacc.c:1646 */
7962  {
7963  /*%%%*/
7964  (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node));
7965  /*% %*/
7966  /*% ripper: args_add_block!($1, $2) %*/
7967  }
7968 #line 7964 "parse.c" /* yacc.c:1646 */
7969  break;
7970 
7971  case 275:
7972 #line 2492 "parse.y" /* yacc.c:1646 */
7973  {
7974  /*%%%*/
7975  (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
7976  (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node));
7977  /*% %*/
7978  /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($1)), $2) %*/
7979  }
7980 #line 7976 "parse.c" /* yacc.c:1646 */
7981  break;
7982 
7983  case 276:
7984 #line 2500 "parse.y" /* yacc.c:1646 */
7985  {
7986  /*%%%*/
7987  (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
7988  (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node));
7989  /*% %*/
7990  /*% ripper: args_add_block!(args_add!($1, bare_assoc_hash!($3)), $4) %*/
7991  }
7992 #line 7988 "parse.c" /* yacc.c:1646 */
7993  break;
7994 
7995  case 278:
7996 #line 2511 "parse.y" /* yacc.c:1646 */
7997  {
7998  /* If call_args starts with a open paren '(' or '[',
7999  * look-ahead reading of the letters calls CMDARG_PUSH(0),
8000  * but the push must be done after CMDARG_PUSH(1).
8001  * So this code makes them consistent by first cancelling
8002  * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
8003  * and finally redoing CMDARG_PUSH(0).
8004  */
8005  int lookahead = 0;
8006  switch (yychar) {
8007  case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
8008  lookahead = 1;
8009  }
8010  if (lookahead) CMDARG_POP();
8011  CMDARG_PUSH(1);
8012  if (lookahead) CMDARG_PUSH(0);
8013  }
8014 #line 8010 "parse.c" /* yacc.c:1646 */
8015  break;
8016 
8017  case 279:
8018 #line 2529 "parse.y" /* yacc.c:1646 */
8019  {
8020  /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
8021  * but the push must be done after CMDARG_POP() in the parser.
8022  * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
8023  * CMDARG_POP() to pop 1 pushed by command_args,
8024  * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
8025  */
8026  int lookahead = 0;
8027  switch (yychar) {
8028  case tLBRACE_ARG:
8029  lookahead = 1;
8030  }
8031  if (lookahead) CMDARG_POP();
8032  CMDARG_POP();
8033  if (lookahead) CMDARG_PUSH(0);
8034  (yyval.node) = (yyvsp[0].node);
8035  }
8036 #line 8032 "parse.c" /* yacc.c:1646 */
8037  break;
8038 
8039  case 280:
8040 #line 2549 "parse.y" /* yacc.c:1646 */
8041  {
8042  /*%%%*/
8043  (yyval.node) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc));
8044  /*% %*/
8045  /*% ripper: $2 %*/
8046  }
8047 #line 8043 "parse.c" /* yacc.c:1646 */
8048  break;
8049 
8050  case 281:
8051 #line 2558 "parse.y" /* yacc.c:1646 */
8052  {
8053  (yyval.node) = (yyvsp[0].node);
8054  }
8055 #line 8051 "parse.c" /* yacc.c:1646 */
8056  break;
8057 
8058  case 282:
8059 #line 2562 "parse.y" /* yacc.c:1646 */
8060  {
8061  (yyval.node) = 0;
8062  }
8063 #line 8059 "parse.c" /* yacc.c:1646 */
8064  break;
8065 
8066  case 283:
8067 #line 2568 "parse.y" /* yacc.c:1646 */
8068  {
8069  /*%%%*/
8070  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
8071  /*% %*/
8072  /*% ripper: args_add!(args_new!, $1) %*/
8073  }
8074 #line 8070 "parse.c" /* yacc.c:1646 */
8075  break;
8076 
8077  case 284:
8078 #line 2575 "parse.y" /* yacc.c:1646 */
8079  {
8080  /*%%%*/
8081  (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc));
8082  /*% %*/
8083  /*% ripper: args_add_star!(args_new!, $2) %*/
8084  }
8085 #line 8081 "parse.c" /* yacc.c:1646 */
8086  break;
8087 
8088  case 285:
8089 #line 2582 "parse.y" /* yacc.c:1646 */
8090  {
8091  /*%%%*/
8092  (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
8093  /*% %*/
8094  /*% ripper: args_add!($1, $3) %*/
8095  }
8096 #line 8092 "parse.c" /* yacc.c:1646 */
8097  break;
8098 
8099  case 286:
8100 #line 2589 "parse.y" /* yacc.c:1646 */
8101  {
8102  /*%%%*/
8103  (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
8104  /*% %*/
8105  /*% ripper: args_add_star!($1, $4) %*/
8106  }
8107 #line 8103 "parse.c" /* yacc.c:1646 */
8108  break;
8109 
8110  case 289:
8111 #line 2602 "parse.y" /* yacc.c:1646 */
8112  {
8113  /*%%%*/
8114  (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
8115  /*% %*/
8116  /*% ripper: mrhs_add!(mrhs_new_from_args!($1), $3) %*/
8117  }
8118 #line 8114 "parse.c" /* yacc.c:1646 */
8119  break;
8120 
8121  case 290:
8122 #line 2609 "parse.y" /* yacc.c:1646 */
8123  {
8124  /*%%%*/
8125  (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
8126  /*% %*/
8127  /*% ripper: mrhs_add_star!(mrhs_new_from_args!($1), $4) %*/
8128  }
8129 #line 8125 "parse.c" /* yacc.c:1646 */
8130  break;
8131 
8132  case 291:
8133 #line 2616 "parse.y" /* yacc.c:1646 */
8134  {
8135  /*%%%*/
8136  (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc));
8137  /*% %*/
8138  /*% ripper: mrhs_add_star!(mrhs_new!, $2) %*/
8139  }
8140 #line 8136 "parse.c" /* yacc.c:1646 */
8141  break;
8142 
8143  case 302:
8144 #line 2635 "parse.y" /* yacc.c:1646 */
8145  {
8146  /*%%%*/
8147  (yyval.node) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
8148  /*% %*/
8149  /*% ripper: method_add_arg!(fcall!($1), args_new!) %*/
8150  }
8151 #line 8147 "parse.c" /* yacc.c:1646 */
8152  break;
8153 
8154  case 303:
8155 #line 2642 "parse.y" /* yacc.c:1646 */
8156  {
8157  CMDARG_PUSH(0);
8158  }
8159 #line 8155 "parse.c" /* yacc.c:1646 */
8160  break;
8161 
8162  case 304:
8163 #line 2647 "parse.y" /* yacc.c:1646 */
8164  {
8165  CMDARG_POP();
8166  /*%%%*/
8167  set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
8168  (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
8169  nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
8170  /*% %*/
8171  /*% ripper: begin!($3) %*/
8172  }
8173 #line 8169 "parse.c" /* yacc.c:1646 */
8174  break;
8175 
8176  case 305:
8177 #line 2656 "parse.y" /* yacc.c:1646 */
8178  {SET_LEX_STATE(EXPR_ENDARG);}
8179 #line 8175 "parse.c" /* yacc.c:1646 */
8180  break;
8181 
8182  case 306:
8183 #line 2657 "parse.y" /* yacc.c:1646 */
8184  {
8185  /*%%%*/
8186  (yyval.node) = NEW_BEGIN(0, &(yyloc));
8187  /*% %*/
8188  /*% ripper: paren!(0) %*/
8189  }
8190 #line 8186 "parse.c" /* yacc.c:1646 */
8191  break;
8192 
8193  case 307:
8194 #line 2663 "parse.y" /* yacc.c:1646 */
8195  {SET_LEX_STATE(EXPR_ENDARG);}
8196 #line 8192 "parse.c" /* yacc.c:1646 */
8197  break;
8198 
8199  case 308:
8200 #line 2664 "parse.y" /* yacc.c:1646 */
8201  {
8202  /*%%%*/
8203  if (nd_type((yyvsp[-2].node)) == NODE_SELF) (yyvsp[-2].node)->nd_state = 0;
8204  (yyval.node) = (yyvsp[-2].node);
8205  /*% %*/
8206  /*% ripper: paren!($2) %*/
8207  }
8208 #line 8204 "parse.c" /* yacc.c:1646 */
8209  break;
8210 
8211  case 309:
8212 #line 2672 "parse.y" /* yacc.c:1646 */
8213  {
8214  /*%%%*/
8215  if (nd_type((yyvsp[-1].node)) == NODE_SELF) (yyvsp[-1].node)->nd_state = 0;
8216  (yyval.node) = (yyvsp[-1].node);
8217  /*% %*/
8218  /*% ripper: paren!($2) %*/
8219  }
8220 #line 8216 "parse.c" /* yacc.c:1646 */
8221  break;
8222 
8223  case 310:
8224 #line 2680 "parse.y" /* yacc.c:1646 */
8225  {
8226  /*%%%*/
8227  (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
8228  /*% %*/
8229  /*% ripper: const_path_ref!($1, $3) %*/
8230  }
8231 #line 8227 "parse.c" /* yacc.c:1646 */
8232  break;
8233 
8234  case 311:
8235 #line 2687 "parse.y" /* yacc.c:1646 */
8236  {
8237  /*%%%*/
8238  (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
8239  /*% %*/
8240  /*% ripper: top_const_ref!($2) %*/
8241  }
8242 #line 8238 "parse.c" /* yacc.c:1646 */
8243  break;
8244 
8245  case 312:
8246 #line 2694 "parse.y" /* yacc.c:1646 */
8247  {
8248  /*%%%*/
8249  (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
8250  /*% %*/
8251  /*% ripper: array!(escape_Qundef($2)) %*/
8252  }
8253 #line 8249 "parse.c" /* yacc.c:1646 */
8254  break;
8255 
8256  case 313:
8257 #line 2701 "parse.y" /* yacc.c:1646 */
8258  {
8259  /*%%%*/
8260  (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
8261  (yyval.node)->nd_brace = TRUE;
8262  /*% %*/
8263  /*% ripper: hash!(escape_Qundef($2)) %*/
8264  }
8265 #line 8261 "parse.c" /* yacc.c:1646 */
8266  break;
8267 
8268  case 314:
8269 #line 2709 "parse.y" /* yacc.c:1646 */
8270  {
8271  /*%%%*/
8272  (yyval.node) = NEW_RETURN(0, &(yyloc));
8273  /*% %*/
8274  /*% ripper: return0! %*/
8275  }
8276 #line 8272 "parse.c" /* yacc.c:1646 */
8277  break;
8278 
8279  case 315:
8280 #line 2716 "parse.y" /* yacc.c:1646 */
8281  {
8282  /*%%%*/
8283  (yyval.node) = new_yield(p, (yyvsp[-1].node), &(yyloc));
8284  /*% %*/
8285  /*% ripper: yield!(paren!($3)) %*/
8286  }
8287 #line 8283 "parse.c" /* yacc.c:1646 */
8288  break;
8289 
8290  case 316:
8291 #line 2723 "parse.y" /* yacc.c:1646 */
8292  {
8293  /*%%%*/
8294  (yyval.node) = NEW_YIELD(0, &(yyloc));
8295  /*% %*/
8296  /*% ripper: yield!(paren!(args_new!)) %*/
8297  }
8298 #line 8294 "parse.c" /* yacc.c:1646 */
8299  break;
8300 
8301  case 317:
8302 #line 2730 "parse.y" /* yacc.c:1646 */
8303  {
8304  /*%%%*/
8305  (yyval.node) = NEW_YIELD(0, &(yyloc));
8306  /*% %*/
8307  /*% ripper: yield0! %*/
8308  }
8309 #line 8305 "parse.c" /* yacc.c:1646 */
8310  break;
8311 
8312  case 318:
8313 #line 2736 "parse.y" /* yacc.c:1646 */
8314  {p->in_defined = 1;}
8315 #line 8311 "parse.c" /* yacc.c:1646 */
8316  break;
8317 
8318  case 319:
8319 #line 2737 "parse.y" /* yacc.c:1646 */
8320  {
8321  p->in_defined = 0;
8322  (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc));
8323  }
8324 #line 8320 "parse.c" /* yacc.c:1646 */
8325  break;
8326 
8327  case 320:
8328 #line 2742 "parse.y" /* yacc.c:1646 */
8329  {
8330  (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
8331  }
8332 #line 8328 "parse.c" /* yacc.c:1646 */
8333  break;
8334 
8335  case 321:
8336 #line 2746 "parse.y" /* yacc.c:1646 */
8337  {
8338  (yyval.node) = call_uni_op(p, method_cond(p, new_nil(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
8339  }
8340 #line 8336 "parse.c" /* yacc.c:1646 */
8341  break;
8342 
8343  case 322:
8344 #line 2750 "parse.y" /* yacc.c:1646 */
8345  {
8346  /*%%%*/
8347  (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
8348  /*% %*/
8349  /*% ripper: method_add_block!(method_add_arg!(fcall!($1), args_new!), $2) %*/
8350  }
8351 #line 8347 "parse.c" /* yacc.c:1646 */
8352  break;
8353 
8354  case 324:
8355 #line 2758 "parse.y" /* yacc.c:1646 */
8356  {
8357  /*%%%*/
8358  block_dup_check(p, (yyvsp[-1].node)->nd_args, (yyvsp[0].node));
8359  (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
8360  /*% %*/
8361  /*% ripper: method_add_block!($1, $2) %*/
8362  }
8363 #line 8359 "parse.c" /* yacc.c:1646 */
8364  break;
8365 
8366  case 325:
8367 #line 2766 "parse.y" /* yacc.c:1646 */
8368  {
8369  token_info_push(p, "->", &(yylsp[0]));
8370  }
8371 #line 8367 "parse.c" /* yacc.c:1646 */
8372  break;
8373 
8374  case 326:
8375 #line 2770 "parse.y" /* yacc.c:1646 */
8376  {
8377  (yyval.node) = (yyvsp[0].node);
8378  /*%%%*/
8379  nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
8380  /*% %*/
8381  }
8382 #line 8378 "parse.c" /* yacc.c:1646 */
8383  break;
8384 
8385  case 327:
8386 #line 2780 "parse.y" /* yacc.c:1646 */
8387  {
8388  /*%%%*/
8389  (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc));
8390  fixpos((yyval.node), (yyvsp[-4].node));
8391  /*% %*/
8392  /*% ripper: if!($2, $4, escape_Qundef($5)) %*/
8393  }
8394 #line 8390 "parse.c" /* yacc.c:1646 */
8395  break;
8396 
8397  case 328:
8398 #line 2791 "parse.y" /* yacc.c:1646 */
8399  {
8400  /*%%%*/
8401  (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc));
8402  fixpos((yyval.node), (yyvsp[-4].node));
8403  /*% %*/
8404  /*% ripper: unless!($2, $4, escape_Qundef($5)) %*/
8405  }
8406 #line 8402 "parse.c" /* yacc.c:1646 */
8407  break;
8408 
8409  case 329:
8410 #line 2801 "parse.y" /* yacc.c:1646 */
8411  {
8412  /*%%%*/
8413  (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc));
8414  fixpos((yyval.node), (yyvsp[-2].node));
8415  /*% %*/
8416  /*% ripper: while!($2, $3) %*/
8417  }
8418 #line 8414 "parse.c" /* yacc.c:1646 */
8419  break;
8420 
8421  case 330:
8422 #line 2811 "parse.y" /* yacc.c:1646 */
8423  {
8424  /*%%%*/
8425  (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc));
8426  fixpos((yyval.node), (yyvsp[-2].node));
8427  /*% %*/
8428  /*% ripper: until!($2, $3) %*/
8429  }
8430 #line 8426 "parse.c" /* yacc.c:1646 */
8431  break;
8432 
8433  case 331:
8434 #line 2819 "parse.y" /* yacc.c:1646 */
8435  {
8436  (yyval.val) = p->case_labels;
8437  p->case_labels = Qnil;
8438  }
8439 #line 8435 "parse.c" /* yacc.c:1646 */
8440  break;
8441 
8442  case 332:
8443 #line 2825 "parse.y" /* yacc.c:1646 */
8444  {
8446  p->case_labels = (yyvsp[-2].val);
8447  /*%%%*/
8448  (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc));
8449  fixpos((yyval.node), (yyvsp[-4].node));
8450  /*% %*/
8451  /*% ripper: case!($2, $5) %*/
8452  }
8453 #line 8449 "parse.c" /* yacc.c:1646 */
8454  break;
8455 
8456  case 333:
8457 #line 2835 "parse.y" /* yacc.c:1646 */
8458  {
8459  (yyval.val) = p->case_labels;
8460  p->case_labels = 0;
8461  }
8462 #line 8458 "parse.c" /* yacc.c:1646 */
8463  break;
8464 
8465  case 334:
8466 #line 2841 "parse.y" /* yacc.c:1646 */
8467  {
8469  p->case_labels = (yyvsp[-2].val);
8470  /*%%%*/
8471  (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc));
8472  /*% %*/
8473  /*% ripper: case!(Qnil, $4) %*/
8474  }
8475 #line 8471 "parse.c" /* yacc.c:1646 */
8476  break;
8477 
8478  case 335:
8479 #line 2852 "parse.y" /* yacc.c:1646 */
8480  {
8481  /*%%%*/
8482  (yyval.node) = new_case3(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
8483  /*% %*/
8484  /*% ripper: case!($2, $4) %*/
8485  }
8486 #line 8482 "parse.c" /* yacc.c:1646 */
8487  break;
8488 
8489  case 336:
8490 #line 2861 "parse.y" /* yacc.c:1646 */
8491  {
8492  /*%%%*/
8493  /*
8494  * for a, b, c in e
8495  * #=>
8496  * e.each{|*x| a, b, c = x}
8497  *
8498  * for a in e
8499  * #=>
8500  * e.each{|x| a, = x}
8501  */
8502  ID id = internal_id(p);
8503  NODE *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
8504  NODE *args, *scope, *internal_var = NEW_DVAR(id, &(yylsp[-4]));
8505  ID *tbl = ALLOC_N(ID, 3);
8506  tbl[0] = 1 /* length of local var table */; tbl[1] = id /* internal id */;
8507  rb_ast_add_local_table(p->ast, tbl);
8508 
8509  switch (nd_type((yyvsp[-4].node))) {
8510  case NODE_LASGN:
8511  case NODE_DASGN:
8512  case NODE_DASGN_CURR: /* e.each {|internal_var| a = internal_var; ... } */
8513  (yyvsp[-4].node)->nd_value = internal_var;
8514  id = 0;
8515  m->nd_plen = 1;
8516  m->nd_next = (yyvsp[-4].node);
8517  break;
8518  case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
8519  m->nd_next = node_assign(p, (yyvsp[-4].node), NEW_FOR_MASGN(internal_var, &(yylsp[-4])), &(yylsp[-4]));
8520  break;
8521  default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
8522  m->nd_next = node_assign(p, NEW_MASGN(NEW_LIST((yyvsp[-4].node), &(yylsp[-4])), 0, &(yylsp[-4])), internal_var, &(yylsp[-4]));
8523  }
8524  /* {|*internal_id| <m> = internal_id; ... } */
8525  args = new_args(p, m, 0, id, 0, new_args_tail(p, 0, 0, 0, &(yylsp[-4])), &(yylsp[-4]));
8526  scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[-1].node), args, &(yyloc));
8527  (yyval.node) = NEW_FOR((yyvsp[-2].node), scope, &(yyloc));
8528  fixpos((yyval.node), (yyvsp[-4].node));
8529  /*% %*/
8530  /*% ripper: for!($2, $4, $5) %*/
8531  }
8532 #line 8528 "parse.c" /* yacc.c:1646 */
8533  break;
8534 
8535  case 337:
8536 #line 2903 "parse.y" /* yacc.c:1646 */
8537  {
8538  if (p->in_def) {
8539  YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[-1]));
8540  yyerror1(&loc, "class definition in method body");
8541  }
8542  (yyvsp[-2].num) = p->in_class;
8543  p->in_class = 1;
8544  local_push(p, 0);
8545  }
8546 #line 8542 "parse.c" /* yacc.c:1646 */
8547  break;
8548 
8549  case 338:
8550 #line 2914 "parse.y" /* yacc.c:1646 */
8551  {
8552  /*%%%*/
8553  (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc));
8554  nd_set_line((yyval.node)->nd_body, (yylsp[0]).end_pos.lineno);
8555  set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
8556  nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
8557  /*% %*/
8558  /*% ripper: class!($2, $3, $5) %*/
8559  local_pop(p);
8560  p->in_class = (yyvsp[-5].num) & 1;
8561  }
8562 #line 8558 "parse.c" /* yacc.c:1646 */
8563  break;
8564 
8565  case 339:
8566 #line 2926 "parse.y" /* yacc.c:1646 */
8567  {
8568  (yyval.num) = (p->in_class << 1) | p->in_def;
8569  p->in_def = 0;
8570  p->in_class = 0;
8571  local_push(p, 0);
8572  }
8573 #line 8569 "parse.c" /* yacc.c:1646 */
8574  break;
8575 
8576  case 340:
8577 #line 2935 "parse.y" /* yacc.c:1646 */
8578  {
8579  /*%%%*/
8580  (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc));
8581  nd_set_line((yyval.node)->nd_body, (yylsp[0]).end_pos.lineno);
8582  set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
8583  fixpos((yyval.node), (yyvsp[-4].node));
8584  /*% %*/
8585  /*% ripper: sclass!($3, $6) %*/
8586  local_pop(p);
8587  p->in_def = (yyvsp[-3].num) & 1;
8588  p->in_class = ((yyvsp[-3].num) >> 1) & 1;
8589  }
8590 #line 8586 "parse.c" /* yacc.c:1646 */
8591  break;
8592 
8593  case 341:
8594 #line 2948 "parse.y" /* yacc.c:1646 */
8595  {
8596  if (p->in_def) {
8597  YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
8598  yyerror1(&loc, "module definition in method body");
8599  }
8600  (yyvsp[-1].num) = p->in_class;
8601  p->in_class = 1;
8602  local_push(p, 0);
8603  }
8604 #line 8600 "parse.c" /* yacc.c:1646 */
8605  break;
8606 
8607  case 342:
8608 #line 2959 "parse.y" /* yacc.c:1646 */
8609  {
8610  /*%%%*/
8611  (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
8612  nd_set_line((yyval.node)->nd_body, (yylsp[0]).end_pos.lineno);
8613  set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
8614  nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
8615  /*% %*/
8616  /*% ripper: module!($2, $4) %*/
8617  local_pop(p);
8618  p->in_class = (yyvsp[-4].num) & 1;
8619  }
8620 #line 8616 "parse.c" /* yacc.c:1646 */
8621  break;
8622 
8623  case 343:
8624 #line 2971 "parse.y" /* yacc.c:1646 */
8625  {
8626  numparam_name(p, get_id((yyvsp[0].id)));
8627  local_push(p, 0);
8628  (yyval.id) = p->cur_arg;
8629  p->cur_arg = 0;
8630  }
8631 #line 8627 "parse.c" /* yacc.c:1646 */
8632  break;
8633 
8634  case 344:
8635 #line 2977 "parse.y" /* yacc.c:1646 */
8636  {
8637  (yyval.num) = p->in_def;
8638  p->in_def = 1;
8639  }
8640 #line 8636 "parse.c" /* yacc.c:1646 */
8641  break;
8642 
8643  case 345:
8644 #line 2984 "parse.y" /* yacc.c:1646 */
8645  {
8646  /*%%%*/
8647  NODE *body = remove_begin((yyvsp[-1].node));
8648  reduce_nodes(p, &body);
8649  (yyval.node) = NEW_DEFN((yyvsp[-5].id), (yyvsp[-2].node), body, &(yyloc));
8650  nd_set_line((yyval.node)->nd_defn, (yylsp[0]).end_pos.lineno);
8651  set_line_body(body, (yylsp[-6]).beg_pos.lineno);
8652  /*% %*/
8653  /*% ripper: def!($2, $5, $6) %*/
8654  local_pop(p);
8655  p->in_def = (yyvsp[-3].num) & 1;
8656  p->cur_arg = (yyvsp[-4].id);
8657  }
8658 #line 8654 "parse.c" /* yacc.c:1646 */
8659  break;
8660 
8661  case 346:
8662 #line 2997 "parse.y" /* yacc.c:1646 */
8663  {SET_LEX_STATE(EXPR_FNAME);}
8664 #line 8660 "parse.c" /* yacc.c:1646 */
8665  break;
8666 
8667  case 347:
8668 #line 2998 "parse.y" /* yacc.c:1646 */
8669  {
8670  numparam_name(p, get_id((yyvsp[0].id)));
8671  (yyvsp[-1].num) = p->in_def;
8672  p->in_def = 1;
8673  SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
8674  local_push(p, 0);
8675  (yyval.id) = p->cur_arg;
8676  p->cur_arg = 0;
8677  }
8678 #line 8674 "parse.c" /* yacc.c:1646 */
8679  break;
8680 
8681  case 348:
8682 #line 3010 "parse.y" /* yacc.c:1646 */
8683  {
8684  /*%%%*/
8685  NODE *body = remove_begin((yyvsp[-1].node));
8686  reduce_nodes(p, &body);
8687  (yyval.node) = NEW_DEFS((yyvsp[-7].node), (yyvsp[-4].id), (yyvsp[-2].node), body, &(yyloc));
8688  nd_set_line((yyval.node)->nd_defn, (yylsp[0]).end_pos.lineno);
8689  set_line_body(body, (yylsp[-8]).beg_pos.lineno);
8690  /*% %*/
8691  /*% ripper: defs!($2, $3, $5, $7, $8) %*/
8692  local_pop(p);
8693  p->in_def = (yyvsp[-5].num) & 1;
8694  p->cur_arg = (yyvsp[-3].id);
8695  }
8696 #line 8692 "parse.c" /* yacc.c:1646 */
8697  break;
8698 
8699  case 349:
8700 #line 3024 "parse.y" /* yacc.c:1646 */
8701  {
8702  /*%%%*/
8703  (yyval.node) = NEW_BREAK(0, &(yyloc));
8704  /*% %*/
8705  /*% ripper: break!(args_new!) %*/
8706  }
8707 #line 8703 "parse.c" /* yacc.c:1646 */
8708  break;
8709 
8710  case 350:
8711 #line 3031 "parse.y" /* yacc.c:1646 */
8712  {
8713  /*%%%*/
8714  (yyval.node) = NEW_NEXT(0, &(yyloc));
8715  /*% %*/
8716  /*% ripper: next!(args_new!) %*/
8717  }
8718 #line 8714 "parse.c" /* yacc.c:1646 */
8719  break;
8720 
8721  case 351:
8722 #line 3038 "parse.y" /* yacc.c:1646 */
8723  {
8724  /*%%%*/
8725  (yyval.node) = NEW_REDO(&(yyloc));
8726  /*% %*/
8727  /*% ripper: redo! %*/
8728  }
8729 #line 8725 "parse.c" /* yacc.c:1646 */
8730  break;
8731 
8732  case 352:
8733 #line 3045 "parse.y" /* yacc.c:1646 */
8734  {
8735  /*%%%*/
8736  (yyval.node) = NEW_RETRY(&(yyloc));
8737  /*% %*/
8738  /*% ripper: retry! %*/
8739  }
8740 #line 8736 "parse.c" /* yacc.c:1646 */
8741  break;
8742 
8743  case 353:
8744 #line 3054 "parse.y" /* yacc.c:1646 */
8745  {
8746  value_expr((yyvsp[0].node));
8747  (yyval.node) = (yyvsp[0].node);
8748  }
8749 #line 8745 "parse.c" /* yacc.c:1646 */
8750  break;
8751 
8752  case 354:
8753 #line 3061 "parse.y" /* yacc.c:1646 */
8754  {
8755  token_info_push(p, "begin", &(yyloc));
8756  }
8757 #line 8753 "parse.c" /* yacc.c:1646 */
8758  break;
8759 
8760  case 355:
8761 #line 3067 "parse.y" /* yacc.c:1646 */
8762  {
8763  WARN_EOL("if");
8764  token_info_push(p, "if", &(yyloc));
8765  if (p->token_info && p->token_info->nonspc &&
8766  p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
8767  const char *tok = p->lex.ptok;
8768  const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
8769  beg += rb_strlen_lit("else");
8770  while (beg < tok && ISSPACE(*beg)) beg++;
8771  if (beg == tok) {
8772  p->token_info->nonspc = 0;
8773  }
8774  }
8775  }
8776 #line 8772 "parse.c" /* yacc.c:1646 */
8777  break;
8778 
8779  case 356:
8780 #line 3084 "parse.y" /* yacc.c:1646 */
8781  {
8782  token_info_push(p, "unless", &(yyloc));
8783  }
8784 #line 8780 "parse.c" /* yacc.c:1646 */
8785  break;
8786 
8787  case 357:
8788 #line 3090 "parse.y" /* yacc.c:1646 */
8789  {
8790  token_info_push(p, "while", &(yyloc));
8791  }
8792 #line 8788 "parse.c" /* yacc.c:1646 */
8793  break;
8794 
8795  case 358:
8796 #line 3096 "parse.y" /* yacc.c:1646 */
8797  {
8798  token_info_push(p, "until", &(yyloc));
8799  }
8800 #line 8796 "parse.c" /* yacc.c:1646 */
8801  break;
8802 
8803  case 359:
8804 #line 3102 "parse.y" /* yacc.c:1646 */
8805  {
8806  token_info_push(p, "case", &(yyloc));
8807  }
8808 #line 8804 "parse.c" /* yacc.c:1646 */
8809  break;
8810 
8811  case 360:
8812 #line 3108 "parse.y" /* yacc.c:1646 */
8813  {
8814  token_info_push(p, "for", &(yyloc));
8815  }
8816 #line 8812 "parse.c" /* yacc.c:1646 */
8817  break;
8818 
8819  case 361:
8820 #line 3114 "parse.y" /* yacc.c:1646 */
8821  {
8822  token_info_push(p, "class", &(yyloc));
8823  }
8824 #line 8820 "parse.c" /* yacc.c:1646 */
8825  break;
8826 
8827  case 362:
8828 #line 3120 "parse.y" /* yacc.c:1646 */
8829  {
8830  token_info_push(p, "module", &(yyloc));
8831  }
8832 #line 8828 "parse.c" /* yacc.c:1646 */
8833  break;
8834 
8835  case 363:
8836 #line 3126 "parse.y" /* yacc.c:1646 */
8837  {
8838  token_info_push(p, "def", &(yyloc));
8839  }
8840 #line 8836 "parse.c" /* yacc.c:1646 */
8841  break;
8842 
8843  case 364:
8844 #line 3132 "parse.y" /* yacc.c:1646 */
8845  {
8846  token_info_push(p, "do", &(yyloc));
8847  }
8848 #line 8844 "parse.c" /* yacc.c:1646 */
8849  break;
8850 
8851  case 365:
8852 #line 3138 "parse.y" /* yacc.c:1646 */
8853  {
8854  token_info_push(p, "do", &(yyloc));
8855  }
8856 #line 8852 "parse.c" /* yacc.c:1646 */
8857  break;
8858 
8859  case 366:
8860 #line 3144 "parse.y" /* yacc.c:1646 */
8861  {
8862  token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
8863  }
8864 #line 8860 "parse.c" /* yacc.c:1646 */
8865  break;
8866 
8867  case 367:
8868 #line 3150 "parse.y" /* yacc.c:1646 */
8869  {
8870  token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
8871  }
8872 #line 8868 "parse.c" /* yacc.c:1646 */
8873  break;
8874 
8875  case 368:
8876 #line 3156 "parse.y" /* yacc.c:1646 */
8877  {
8878  token_info_warn(p, "when", p->token_info, 0, &(yyloc));
8879  }
8880 #line 8876 "parse.c" /* yacc.c:1646 */
8881  break;
8882 
8883  case 369:
8884 #line 3162 "parse.y" /* yacc.c:1646 */
8885  {
8886  token_info *ptinfo_beg = p->token_info;
8887  int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
8888  token_info_warn(p, "else", p->token_info, same, &(yyloc));
8889  if (same) {
8890  token_info e;
8891  e.next = ptinfo_beg->next;
8892  e.token = "else";
8893  token_info_setup(&e, p->lex.pbeg, &(yyloc));
8894  if (!e.nonspc) *ptinfo_beg = e;
8895  }
8896  }
8897 #line 8893 "parse.c" /* yacc.c:1646 */
8898  break;
8899 
8900  case 370:
8901 #line 3177 "parse.y" /* yacc.c:1646 */
8902  {
8903  WARN_EOL("elsif");
8904  token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
8905  }
8906 #line 8902 "parse.c" /* yacc.c:1646 */
8907  break;
8908 
8909  case 371:
8910 #line 3184 "parse.y" /* yacc.c:1646 */
8911  {
8912  token_info_pop(p, "end", &(yyloc));
8913  }
8914 #line 8910 "parse.c" /* yacc.c:1646 */
8915  break;
8916 
8917  case 372:
8918 #line 3190 "parse.y" /* yacc.c:1646 */
8919  {
8920  if (p->in_class && !p->in_def && !dyna_in_block(p))
8921  yyerror1(&(yylsp[0]), "Invalid return in class/module body");
8922  }
8923 #line 8919 "parse.c" /* yacc.c:1646 */
8924  break;
8925 
8926  case 379:
8927 #line 3209 "parse.y" /* yacc.c:1646 */
8928  {
8929  /*%%%*/
8930  (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
8931  fixpos((yyval.node), (yyvsp[-3].node));
8932  /*% %*/
8933  /*% ripper: elsif!($2, $4, escape_Qundef($5)) %*/
8934  }
8935 #line 8931 "parse.c" /* yacc.c:1646 */
8936  break;
8937 
8938  case 381:
8939 #line 3220 "parse.y" /* yacc.c:1646 */
8940  {
8941  /*%%%*/
8942  (yyval.node) = (yyvsp[0].node);
8943  /*% %*/
8944  /*% ripper: else!($2) %*/
8945  }
8946 #line 8942 "parse.c" /* yacc.c:1646 */
8947  break;
8948 
8949  case 384:
8950 #line 3233 "parse.y" /* yacc.c:1646 */
8951  {
8952  /*%%%*/
8953  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
8954  mark_lvar_used(p, (yyval.node));
8955  /*% %*/
8956  /*% ripper: assignable(p, $1) %*/
8957  }
8958 #line 8954 "parse.c" /* yacc.c:1646 */
8959  break;
8960 
8961  case 385:
8962 #line 3241 "parse.y" /* yacc.c:1646 */
8963  {
8964  /*%%%*/
8965  (yyval.node) = (yyvsp[-1].node);
8966  /*% %*/
8967  /*% ripper: mlhs_paren!($2) %*/
8968  }
8969 #line 8965 "parse.c" /* yacc.c:1646 */
8970  break;
8971 
8972  case 386:
8973 #line 3250 "parse.y" /* yacc.c:1646 */
8974  {
8975  /*%%%*/
8976  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
8977  /*% %*/
8978  /*% ripper: mlhs_add!(mlhs_new!, $1) %*/
8979  }
8980 #line 8976 "parse.c" /* yacc.c:1646 */
8981  break;
8982 
8983  case 387:
8984 #line 3257 "parse.y" /* yacc.c:1646 */
8985  {
8986  /*%%%*/
8987  (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
8988  /*% %*/
8989  /*% ripper: mlhs_add!($1, $3) %*/
8990  }
8991 #line 8987 "parse.c" /* yacc.c:1646 */
8992  break;
8993 
8994  case 388:
8995 #line 3266 "parse.y" /* yacc.c:1646 */
8996  {
8997  /*%%%*/
8998  (yyval.node) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
8999  /*% %*/
9000  /*% ripper: $1 %*/
9001  }
9002 #line 8998 "parse.c" /* yacc.c:1646 */
9003  break;
9004 
9005  case 389:
9006 #line 3273 "parse.y" /* yacc.c:1646 */
9007  {
9008  /*%%%*/
9009  (yyval.node) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
9010  /*% %*/
9011  /*% ripper: mlhs_add_star!($1, $3) %*/
9012  }
9013 #line 9009 "parse.c" /* yacc.c:1646 */
9014  break;
9015 
9016  case 390:
9017 #line 3280 "parse.y" /* yacc.c:1646 */
9018  {
9019  /*%%%*/
9020  (yyval.node) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
9021  /*% %*/
9022  /*% ripper: mlhs_add_post!(mlhs_add_star!($1, $3), $5) %*/
9023  }
9024 #line 9020 "parse.c" /* yacc.c:1646 */
9025  break;
9026 
9027  case 391:
9028 #line 3287 "parse.y" /* yacc.c:1646 */
9029  {
9030  /*%%%*/
9031  (yyval.node) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
9032  /*% %*/
9033  /*% ripper: mlhs_add_star!(mlhs_new!, $1) %*/
9034  }
9035 #line 9031 "parse.c" /* yacc.c:1646 */
9036  break;
9037 
9038  case 392:
9039 #line 3294 "parse.y" /* yacc.c:1646 */
9040  {
9041  /*%%%*/
9042  (yyval.node) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
9043  /*% %*/
9044  /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $1), $3) %*/
9045  }
9046 #line 9042 "parse.c" /* yacc.c:1646 */
9047  break;
9048 
9049  case 393:
9050 #line 3303 "parse.y" /* yacc.c:1646 */
9051  {
9052  /*%%%*/
9053  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
9054  mark_lvar_used(p, (yyval.node));
9055  /*% %*/
9056  /*% ripper: assignable(p, $2) %*/
9057  }
9058 #line 9054 "parse.c" /* yacc.c:1646 */
9059  break;
9060 
9061  case 394:
9062 #line 3311 "parse.y" /* yacc.c:1646 */
9063  {
9064  /*%%%*/
9065  (yyval.node) = NODE_SPECIAL_NO_NAME_REST;
9066  /*% %*/
9067  /*% ripper: Qnil %*/
9068  }
9069 #line 9065 "parse.c" /* yacc.c:1646 */
9070  break;
9071 
9072  case 395:
9073 #line 3320 "parse.y" /* yacc.c:1646 */
9074  {
9075  (yyval.node) = new_args_tail(p, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
9076  }
9077 #line 9073 "parse.c" /* yacc.c:1646 */
9078  break;
9079 
9080  case 396:
9081 #line 3324 "parse.y" /* yacc.c:1646 */
9082  {
9083  (yyval.node) = new_args_tail(p, (yyvsp[-1].node), Qnone, (yyvsp[0].id), &(yylsp[-1]));
9084  }
9085 #line 9081 "parse.c" /* yacc.c:1646 */
9086  break;
9087 
9088  case 397:
9089 #line 3328 "parse.y" /* yacc.c:1646 */
9090  {
9091  (yyval.node) = new_args_tail(p, Qnone, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
9092  }
9093 #line 9089 "parse.c" /* yacc.c:1646 */
9094  break;
9095 
9096  case 398:
9097 #line 3332 "parse.y" /* yacc.c:1646 */
9098  {
9099  (yyval.node) = new_args_tail(p, Qnone, ID2VAL(idNil), (yyvsp[0].id), &(yylsp[-1]));
9100  }
9101 #line 9097 "parse.c" /* yacc.c:1646 */
9102  break;
9103 
9104  case 399:
9105 #line 3336 "parse.y" /* yacc.c:1646 */
9106  {
9107  (yyval.node) = new_args_tail(p, Qnone, Qnone, (yyvsp[0].id), &(yylsp[0]));
9108  }
9109 #line 9105 "parse.c" /* yacc.c:1646 */
9110  break;
9111 
9112  case 400:
9113 #line 3342 "parse.y" /* yacc.c:1646 */
9114  {
9115  (yyval.node) = (yyvsp[0].node);
9116  }
9117 #line 9113 "parse.c" /* yacc.c:1646 */
9118  break;
9119 
9120  case 401:
9121 #line 3346 "parse.y" /* yacc.c:1646 */
9122  {
9123  (yyval.node) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
9124  }
9125 #line 9121 "parse.c" /* yacc.c:1646 */
9126  break;
9127 
9128  case 402:
9129 #line 3352 "parse.y" /* yacc.c:1646 */
9130  {
9131  (yyval.node) = new_args(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
9132  }
9133 #line 9129 "parse.c" /* yacc.c:1646 */
9134  break;
9135 
9136  case 403:
9137 #line 3356 "parse.y" /* yacc.c:1646 */
9138  {
9139  (yyval.node) = new_args(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9140  }
9141 #line 9137 "parse.c" /* yacc.c:1646 */
9142  break;
9143 
9144  case 404:
9145 #line 3360 "parse.y" /* yacc.c:1646 */
9146  {
9147  (yyval.node) = new_args(p, (yyvsp[-3].node), (yyvsp[-1].node), Qnone, Qnone, (yyvsp[0].node), &(yyloc));
9148  }
9149 #line 9145 "parse.c" /* yacc.c:1646 */
9150  break;
9151 
9152  case 405:
9153 #line 3364 "parse.y" /* yacc.c:1646 */
9154  {
9155  (yyval.node) = new_args(p, (yyvsp[-5].node), (yyvsp[-3].node), Qnone, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9156  }
9157 #line 9153 "parse.c" /* yacc.c:1646 */
9158  break;
9159 
9160  case 406:
9161 #line 3368 "parse.y" /* yacc.c:1646 */
9162  {
9163  (yyval.node) = new_args(p, (yyvsp[-3].node), Qnone, (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
9164  }
9165 #line 9161 "parse.c" /* yacc.c:1646 */
9166  break;
9167 
9168  case 407:
9169 #line 3372 "parse.y" /* yacc.c:1646 */
9170  {
9171  /*%%%*/
9172  /* magic number for rest_id in iseq_set_arguments() */
9173  (yyval.node) = new_args(p, (yyvsp[-1].node), Qnone, NODE_SPECIAL_EXCESSIVE_COMMA, Qnone, new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[-1])), &(yyloc));
9174  /*% %*/
9175  /*% ripper: new_args(p, $1, Qnone, excessed_comma!, Qnone, new_args_tail(p, Qnone, Qnone, Qnone, NULL), NULL) %*/
9176  }
9177 #line 9173 "parse.c" /* yacc.c:1646 */
9178  break;
9179 
9180  case 408:
9181 #line 3380 "parse.y" /* yacc.c:1646 */
9182  {
9183  (yyval.node) = new_args(p, (yyvsp[-5].node), Qnone, (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9184  }
9185 #line 9181 "parse.c" /* yacc.c:1646 */
9186  break;
9187 
9188  case 409:
9189 #line 3384 "parse.y" /* yacc.c:1646 */
9190  {
9191  (yyval.node) = new_args(p, (yyvsp[-1].node), Qnone, Qnone, Qnone, (yyvsp[0].node), &(yyloc));
9192  }
9193 #line 9189 "parse.c" /* yacc.c:1646 */
9194  break;
9195 
9196  case 410:
9197 #line 3388 "parse.y" /* yacc.c:1646 */
9198  {
9199  (yyval.node) = new_args(p, Qnone, (yyvsp[-3].node), (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
9200  }
9201 #line 9197 "parse.c" /* yacc.c:1646 */
9202  break;
9203 
9204  case 411:
9205 #line 3392 "parse.y" /* yacc.c:1646 */
9206  {
9207  (yyval.node) = new_args(p, Qnone, (yyvsp[-5].node), (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9208  }
9209 #line 9205 "parse.c" /* yacc.c:1646 */
9210  break;
9211 
9212  case 412:
9213 #line 3396 "parse.y" /* yacc.c:1646 */
9214  {
9215  (yyval.node) = new_args(p, Qnone, (yyvsp[-1].node), Qnone, Qnone, (yyvsp[0].node), &(yyloc));
9216  }
9217 #line 9213 "parse.c" /* yacc.c:1646 */
9218  break;
9219 
9220  case 413:
9221 #line 3400 "parse.y" /* yacc.c:1646 */
9222  {
9223  (yyval.node) = new_args(p, Qnone, (yyvsp[-3].node), Qnone, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9224  }
9225 #line 9221 "parse.c" /* yacc.c:1646 */
9226  break;
9227 
9228  case 414:
9229 #line 3404 "parse.y" /* yacc.c:1646 */
9230  {
9231  (yyval.node) = new_args(p, Qnone, Qnone, (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
9232  }
9233 #line 9229 "parse.c" /* yacc.c:1646 */
9234  break;
9235 
9236  case 415:
9237 #line 3408 "parse.y" /* yacc.c:1646 */
9238  {
9239  (yyval.node) = new_args(p, Qnone, Qnone, (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9240  }
9241 #line 9237 "parse.c" /* yacc.c:1646 */
9242  break;
9243 
9244  case 416:
9245 #line 3412 "parse.y" /* yacc.c:1646 */
9246  {
9247  (yyval.node) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyvsp[0].node), &(yyloc));
9248  }
9249 #line 9245 "parse.c" /* yacc.c:1646 */
9250  break;
9251 
9252  case 418:
9253 #line 3419 "parse.y" /* yacc.c:1646 */
9254  {
9255  p->command_start = TRUE;
9256  }
9257 #line 9253 "parse.c" /* yacc.c:1646 */
9258  break;
9259 
9260  case 419:
9261 #line 3425 "parse.y" /* yacc.c:1646 */
9262  {
9263  p->cur_arg = 0;
9265  /*%%%*/
9266  (yyval.node) = 0;
9267  /*% %*/
9268  /*% ripper: block_var!(params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil), escape_Qundef($2)) %*/
9269  }
9270 #line 9266 "parse.c" /* yacc.c:1646 */
9271  break;
9272 
9273  case 420:
9274 #line 3434 "parse.y" /* yacc.c:1646 */
9275  {
9276  p->cur_arg = 0;
9278  /*%%%*/
9279  (yyval.node) = (yyvsp[-2].node);
9280  /*% %*/
9281  /*% ripper: block_var!(escape_Qundef($2), escape_Qundef($3)) %*/
9282  }
9283 #line 9279 "parse.c" /* yacc.c:1646 */
9284  break;
9285 
9286  case 421:
9287 #line 3446 "parse.y" /* yacc.c:1646 */
9288  {
9289  (yyval.node) = 0;
9290  }
9291 #line 9287 "parse.c" /* yacc.c:1646 */
9292  break;
9293 
9294  case 422:
9295 #line 3450 "parse.y" /* yacc.c:1646 */
9296  {
9297  /*%%%*/
9298  (yyval.node) = 0;
9299  /*% %*/
9300  /*% ripper: $3 %*/
9301  }
9302 #line 9298 "parse.c" /* yacc.c:1646 */
9303  break;
9304 
9305  case 425:
9306 #line 3465 "parse.y" /* yacc.c:1646 */
9307  {
9308  new_bv(p, get_id((yyvsp[0].id)));
9309  /*% ripper: get_value($1) %*/
9310  }
9311 #line 9307 "parse.c" /* yacc.c:1646 */
9312  break;
9313 
9314  case 426:
9315 #line 3470 "parse.y" /* yacc.c:1646 */
9316  {
9317  (yyval.node) = 0;
9318  }
9319 #line 9315 "parse.c" /* yacc.c:1646 */
9320  break;
9321 
9322  case 427:
9323 #line 3475 "parse.y" /* yacc.c:1646 */
9324  {
9325  (yyval.vars) = dyna_push(p);
9326  }
9327 #line 9323 "parse.c" /* yacc.c:1646 */
9328  break;
9329 
9330  case 428:
9331 #line 3478 "parse.y" /* yacc.c:1646 */
9332  {
9333  (yyval.num) = p->lex.lpar_beg;
9334  p->lex.lpar_beg = p->lex.paren_nest;
9335  }
9336 #line 9332 "parse.c" /* yacc.c:1646 */
9337  break;
9338 
9339  case 429:
9340 #line 3482 "parse.y" /* yacc.c:1646 */
9341  {
9342  (yyval.num) = p->max_numparam;
9343  p->max_numparam = 0;
9344  }
9345 #line 9341 "parse.c" /* yacc.c:1646 */
9346  break;
9347 
9348  case 430:
9349 #line 3486 "parse.y" /* yacc.c:1646 */
9350  {
9351  (yyval.node) = numparam_push(p);
9352  }
9353 #line 9349 "parse.c" /* yacc.c:1646 */
9354  break;
9355 
9356  case 431:
9357 #line 3490 "parse.y" /* yacc.c:1646 */
9358  {
9359  CMDARG_PUSH(0);
9360  }
9361 #line 9357 "parse.c" /* yacc.c:1646 */
9362  break;
9363 
9364  case 432:
9365 #line 3494 "parse.y" /* yacc.c:1646 */
9366  {
9367  int max_numparam = p->max_numparam;
9368  p->lex.lpar_beg = (yyvsp[-5].num);
9369  p->max_numparam = (yyvsp[-4].num);
9370  CMDARG_POP();
9371  (yyvsp[-2].node) = args_with_numbered(p, (yyvsp[-2].node), max_numparam);
9372  /*%%%*/
9373  {
9374  YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
9375  (yyval.node) = NEW_LAMBDA((yyvsp[-2].node), (yyvsp[0].node), &loc);
9376  nd_set_line((yyval.node)->nd_body, (yylsp[0]).end_pos.lineno);
9377  nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
9378  }
9379  /*% %*/
9380  /*% ripper: lambda!($5, $7) %*/
9381  numparam_pop(p, (yyvsp[-3].node));
9382  dyna_pop(p, (yyvsp[-6].vars));
9383  }
9384 #line 9380 "parse.c" /* yacc.c:1646 */
9385  break;
9386 
9387  case 433:
9388 #line 3515 "parse.y" /* yacc.c:1646 */
9389  {
9390  /*%%%*/
9391  (yyval.node) = (yyvsp[-2].node);
9393  /*% %*/
9394  /*% ripper: paren!($2) %*/
9395  }
9396 #line 9392 "parse.c" /* yacc.c:1646 */
9397  break;
9398 
9399  case 434:
9400 #line 3523 "parse.y" /* yacc.c:1646 */
9401  {
9402  /*%%%*/
9403  if (!args_info_empty_p((yyvsp[0].node)->nd_ainfo))
9405  /*% %*/
9406  (yyval.node) = (yyvsp[0].node);
9407  }
9408 #line 9404 "parse.c" /* yacc.c:1646 */
9409  break;
9410 
9411  case 435:
9412 #line 3533 "parse.y" /* yacc.c:1646 */
9413  {
9414  token_info_pop(p, "}", &(yylsp[0]));
9415  (yyval.node) = (yyvsp[-1].node);
9416  }
9417 #line 9413 "parse.c" /* yacc.c:1646 */
9418  break;
9419 
9420  case 436:
9421 #line 3538 "parse.y" /* yacc.c:1646 */
9422  {
9423  (yyval.node) = (yyvsp[-1].node);
9424  }
9425 #line 9421 "parse.c" /* yacc.c:1646 */
9426  break;
9427 
9428  case 437:
9429 #line 3544 "parse.y" /* yacc.c:1646 */
9430  {
9431  (yyval.node) = (yyvsp[-1].node);
9432  /*%%%*/
9433  (yyval.node)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
9434  nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
9435  /*% %*/
9436  }
9437 #line 9433 "parse.c" /* yacc.c:1646 */
9438  break;
9439 
9440  case 438:
9441 #line 3554 "parse.y" /* yacc.c:1646 */
9442  {
9443  /*%%%*/
9444  if (nd_type((yyvsp[-1].node)) == NODE_YIELD) {
9445  compile_error(p, "block given to yield");
9446  }
9447  else {
9448  block_dup_check(p, (yyvsp[-1].node)->nd_args, (yyvsp[0].node));
9449  }
9450  (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9451  fixpos((yyval.node), (yyvsp[-1].node));
9452  /*% %*/
9453  /*% ripper: method_add_block!($1, $2) %*/
9454  }
9455 #line 9451 "parse.c" /* yacc.c:1646 */
9456  break;
9457 
9458  case 439:
9459 #line 3568 "parse.y" /* yacc.c:1646 */
9460  {
9461  /*%%%*/
9462  (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
9463  /*% %*/
9464  /*% ripper: opt_event(:method_add_arg!, call!($1, $2, $3), $4) %*/
9465  }
9466 #line 9462 "parse.c" /* yacc.c:1646 */
9467  break;
9468 
9469  case 440:
9470 #line 3575 "parse.y" /* yacc.c:1646 */
9471  {
9472  /*%%%*/
9473  (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
9474  /*% %*/
9475  /*% ripper: opt_event(:method_add_block!, command_call!($1, $2, $3, $4), $5) %*/
9476  }
9477 #line 9473 "parse.c" /* yacc.c:1646 */
9478  break;
9479 
9480  case 441:
9481 #line 3582 "parse.y" /* yacc.c:1646 */
9482  {
9483  /*%%%*/
9484  (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
9485  /*% %*/
9486  /*% ripper: method_add_block!(command_call!($1, $2, $3, $4), $5) %*/
9487  }
9488 #line 9484 "parse.c" /* yacc.c:1646 */
9489  break;
9490 
9491  case 442:
9492 #line 3591 "parse.y" /* yacc.c:1646 */
9493  {
9494  /*%%%*/
9495  (yyval.node) = (yyvsp[-1].node);
9496  (yyval.node)->nd_args = (yyvsp[0].node);
9497  nd_set_last_loc((yyvsp[-1].node), (yylsp[0]).end_pos);
9498  /*% %*/
9499  /*% ripper: method_add_arg!(fcall!($1), $2) %*/
9500  }
9501 #line 9497 "parse.c" /* yacc.c:1646 */
9502  break;
9503 
9504  case 443:
9505 #line 3600 "parse.y" /* yacc.c:1646 */
9506  {
9507  /*%%%*/
9508  (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
9509  nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
9510  /*% %*/
9511  /*% ripper: opt_event(:method_add_arg!, call!($1, $2, $3), $4) %*/
9512  }
9513 #line 9509 "parse.c" /* yacc.c:1646 */
9514  break;
9515 
9516  case 444:
9517 #line 3608 "parse.y" /* yacc.c:1646 */
9518  {
9519  /*%%%*/
9520  (yyval.node) = new_qcall(p, ID2VAL(idCOLON2), (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: method_add_arg!(call!($1, ID2VAL(idCOLON2), $3), $4) %*/
9524  }
9525 #line 9521 "parse.c" /* yacc.c:1646 */
9526  break;
9527 
9528  case 445:
9529 #line 3616 "parse.y" /* yacc.c:1646 */
9530  {
9531  /*%%%*/
9532  (yyval.node) = new_qcall(p, ID2VAL(idCOLON2), (yyvsp[-2].node), (yyvsp[0].id), Qnull, &(yylsp[0]), &(yyloc));
9533  /*% %*/
9534  /*% ripper: call!($1, ID2VAL(idCOLON2), $3) %*/
9535  }
9536 #line 9532 "parse.c" /* yacc.c:1646 */
9537  break;
9538 
9539  case 446:
9540 #line 3623 "parse.y" /* yacc.c:1646 */
9541  {
9542  /*%%%*/
9543  (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), ID2VAL(idCall), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
9544  nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
9545  /*% %*/
9546  /*% ripper: method_add_arg!(call!($1, $2, ID2VAL(idCall)), $3) %*/
9547  }
9548 #line 9544 "parse.c" /* yacc.c:1646 */
9549  break;
9550 
9551  case 447:
9552 #line 3631 "parse.y" /* yacc.c:1646 */
9553  {
9554  /*%%%*/
9555  (yyval.node) = new_qcall(p, ID2VAL(idCOLON2), (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, ID2VAL(idCOLON2), ID2VAL(idCall)), $3) %*/
9559  }
9560 #line 9556 "parse.c" /* yacc.c:1646 */
9561  break;
9562 
9563  case 448:
9564 #line 3639 "parse.y" /* yacc.c:1646 */
9565  {
9566  /*%%%*/
9567  (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc));
9568  /*% %*/
9569  /*% ripper: super!($2) %*/
9570  }
9571 #line 9567 "parse.c" /* yacc.c:1646 */
9572  break;
9573 
9574  case 449:
9575 #line 3646 "parse.y" /* yacc.c:1646 */
9576  {
9577  /*%%%*/
9578  (yyval.node) = NEW_ZSUPER(&(yyloc));
9579  /*% %*/
9580  /*% ripper: zsuper! %*/
9581  }
9582 #line 9578 "parse.c" /* yacc.c:1646 */
9583  break;
9584 
9585  case 450:
9586 #line 3653 "parse.y" /* yacc.c:1646 */
9587  {
9588  /*%%%*/
9589  if ((yyvsp[-3].node) && nd_type((yyvsp[-3].node)) == NODE_SELF)
9590  (yyval.node) = NEW_FCALL(tAREF, (yyvsp[-1].node), &(yyloc));
9591  else
9592  (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
9593  fixpos((yyval.node), (yyvsp[-3].node));
9594  /*% %*/
9595  /*% ripper: aref!($1, escape_Qundef($3)) %*/
9596  }
9597 #line 9593 "parse.c" /* yacc.c:1646 */
9598  break;
9599 
9600  case 451:
9601 #line 3666 "parse.y" /* yacc.c:1646 */
9602  {
9603  (yyval.node) = (yyvsp[-1].node);
9604  /*%%%*/
9605  (yyval.node)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
9606  nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
9607  /*% %*/
9608  }
9609 #line 9605 "parse.c" /* yacc.c:1646 */
9610  break;
9611 
9612  case 452:
9613 #line 3674 "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 453:
9625 #line 3683 "parse.y" /* yacc.c:1646 */
9626  {(yyval.vars) = dyna_push(p);}
9627 #line 9623 "parse.c" /* yacc.c:1646 */
9628  break;
9629 
9630  case 454:
9631 #line 3684 "parse.y" /* yacc.c:1646 */
9632  {
9633  (yyval.num) = p->max_numparam;
9634  p->max_numparam = 0;
9635  }
9636 #line 9632 "parse.c" /* yacc.c:1646 */
9637  break;
9638 
9639  case 455:
9640 #line 3688 "parse.y" /* yacc.c:1646 */
9641  {
9642  (yyval.node) = numparam_push(p);
9643  }
9644 #line 9640 "parse.c" /* yacc.c:1646 */
9645  break;
9646 
9647  case 456:
9648 #line 3692 "parse.y" /* yacc.c:1646 */
9649  {
9650  int max_numparam = p->max_numparam;
9651  p->max_numparam = (yyvsp[-3].num);
9652  (yyvsp[-1].node) = args_with_numbered(p, (yyvsp[-1].node), max_numparam);
9653  /*%%%*/
9654  (yyval.node) = NEW_ITER((yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9655  /*% %*/
9656  /*% ripper: brace_block!(escape_Qundef($4), $5) %*/
9657  numparam_pop(p, (yyvsp[-2].node));
9658  dyna_pop(p, (yyvsp[-4].vars));
9659  }
9660 #line 9656 "parse.c" /* yacc.c:1646 */
9661  break;
9662 
9663  case 457:
9664 #line 3705 "parse.y" /* yacc.c:1646 */
9665  {(yyval.vars) = dyna_push(p);}
9666 #line 9662 "parse.c" /* yacc.c:1646 */
9667  break;
9668 
9669  case 458:
9670 #line 3706 "parse.y" /* yacc.c:1646 */
9671  {
9672  (yyval.num) = p->max_numparam;
9673  p->max_numparam = 0;
9674  }
9675 #line 9671 "parse.c" /* yacc.c:1646 */
9676  break;
9677 
9678  case 459:
9679 #line 3710 "parse.y" /* yacc.c:1646 */
9680  {
9681  (yyval.node) = numparam_push(p);
9682  CMDARG_PUSH(0);
9683  }
9684 #line 9680 "parse.c" /* yacc.c:1646 */
9685  break;
9686 
9687  case 460:
9688 #line 3715 "parse.y" /* yacc.c:1646 */
9689  {
9690  int max_numparam = p->max_numparam;
9691  p->max_numparam = (yyvsp[-3].num);
9692  (yyvsp[-1].node) = args_with_numbered(p, (yyvsp[-1].node), max_numparam);
9693  /*%%%*/
9694  (yyval.node) = NEW_ITER((yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9695  /*% %*/
9696  /*% ripper: do_block!(escape_Qundef($4), $5) %*/
9697  CMDARG_POP();
9698  numparam_pop(p, (yyvsp[-2].node));
9699  dyna_pop(p, (yyvsp[-4].vars));
9700  }
9701 #line 9697 "parse.c" /* yacc.c:1646 */
9702  break;
9703 
9704  case 461:
9705 #line 3730 "parse.y" /* yacc.c:1646 */
9706  {
9707  /*%%%*/
9708  check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
9709  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
9710  /*% %*/
9711  /*% ripper: args_add!(args_new!, $1) %*/
9712  }
9713 #line 9709 "parse.c" /* yacc.c:1646 */
9714  break;
9715 
9716  case 462:
9717 #line 3738 "parse.y" /* yacc.c:1646 */
9718  {
9719  /*%%%*/
9720  (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc));
9721  /*% %*/
9722  /*% ripper: args_add_star!(args_new!, $2) %*/
9723  }
9724 #line 9720 "parse.c" /* yacc.c:1646 */
9725  break;
9726 
9727  case 463:
9728 #line 3745 "parse.y" /* yacc.c:1646 */
9729  {
9730  /*%%%*/
9731  check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
9732  (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
9733  /*% %*/
9734  /*% ripper: args_add!($1, $3) %*/
9735  }
9736 #line 9732 "parse.c" /* yacc.c:1646 */
9737  break;
9738 
9739  case 464:
9740 #line 3753 "parse.y" /* yacc.c:1646 */
9741  {
9742  /*%%%*/
9743  (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
9744  /*% %*/
9745  /*% ripper: args_add_star!($1, $4) %*/
9746  }
9747 #line 9743 "parse.c" /* yacc.c:1646 */
9748  break;
9749 
9750  case 465:
9751 #line 3764 "parse.y" /* yacc.c:1646 */
9752  {
9753  /*%%%*/
9754  (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9755  fixpos((yyval.node), (yyvsp[-3].node));
9756  /*% %*/
9757  /*% ripper: when!($2, $4, escape_Qundef($5)) %*/
9758  }
9759 #line 9755 "parse.c" /* yacc.c:1646 */
9760  break;
9761 
9762  case 468:
9763 #line 3778 "parse.y" /* yacc.c:1646 */
9764  {
9765  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
9766  p->command_start = FALSE;
9767  (yyval.num) = p->in_kwarg;
9768  p->in_kwarg = 1;
9769  }
9770 #line 9766 "parse.c" /* yacc.c:1646 */
9771  break;
9772 
9773  case 469:
9774 #line 3784 "parse.y" /* yacc.c:1646 */
9775  {(yyval.tbl) = push_pvtbl(p);}
9776 #line 9772 "parse.c" /* yacc.c:1646 */
9777  break;
9778 
9779  case 470:
9780 #line 3785 "parse.y" /* yacc.c:1646 */
9781  {(yyval.tbl) = push_pktbl(p);}
9782 #line 9778 "parse.c" /* yacc.c:1646 */
9783  break;
9784 
9785  case 471:
9786 #line 3787 "parse.y" /* yacc.c:1646 */
9787  {pop_pktbl(p, (yyvsp[-2].tbl));}
9788 #line 9784 "parse.c" /* yacc.c:1646 */
9789  break;
9790 
9791  case 472:
9792 #line 3788 "parse.y" /* yacc.c:1646 */
9793  {pop_pvtbl(p, (yyvsp[-4].tbl));}
9794 #line 9790 "parse.c" /* yacc.c:1646 */
9795  break;
9796 
9797  case 473:
9798 #line 3789 "parse.y" /* yacc.c:1646 */
9799  {
9800  p->in_kwarg = !!(yyvsp[-6].num);
9801  }
9802 #line 9798 "parse.c" /* yacc.c:1646 */
9803  break;
9804 
9805  case 474:
9806 #line 3794 "parse.y" /* yacc.c:1646 */
9807  {
9808  /*%%%*/
9809  (yyval.node) = NEW_IN((yyvsp[-6].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9810  /*% %*/
9811  /*% ripper: in!($5, $10, escape_Qundef($11)) %*/
9812  }
9813 #line 9809 "parse.c" /* yacc.c:1646 */
9814  break;
9815 
9816  case 478:
9817 #line 3808 "parse.y" /* yacc.c:1646 */
9818  {
9819  /*%%%*/
9820  (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc));
9821  fixpos((yyval.node), (yyvsp[0].node));
9822  /*% %*/
9823  /*% ripper: if_mod!($3, $1) %*/
9824  }
9825 #line 9821 "parse.c" /* yacc.c:1646 */
9826  break;
9827 
9828  case 479:
9829 #line 3816 "parse.y" /* yacc.c:1646 */
9830  {
9831  /*%%%*/
9832  (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc));
9833  fixpos((yyval.node), (yyvsp[0].node));
9834  /*% %*/
9835  /*% ripper: unless_mod!($3, $1) %*/
9836  }
9837 #line 9833 "parse.c" /* yacc.c:1646 */
9838  break;
9839 
9840  case 481:
9841 #line 3827 "parse.y" /* yacc.c:1646 */
9842  {
9843  (yyval.node) = new_array_pattern_tail(p, Qnone, 1, 0, Qnone, &(yyloc));
9844  (yyval.node) = new_array_pattern(p, Qnone, get_value((yyvsp[-1].node)), (yyval.node), &(yyloc));
9845  }
9846 #line 9842 "parse.c" /* yacc.c:1646 */
9847  break;
9848 
9849  case 482:
9850 #line 3832 "parse.y" /* yacc.c:1646 */
9851  {
9852  (yyval.node) = new_array_pattern(p, Qnone, get_value((yyvsp[-2].node)), (yyvsp[0].node), &(yyloc));
9853  /*%%%*/
9854  nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
9855  /*%
9856  %*/
9857  }
9858 #line 9854 "parse.c" /* yacc.c:1646 */
9859  break;
9860 
9861  case 483:
9862 #line 3840 "parse.y" /* yacc.c:1646 */
9863  {
9864  (yyval.node) = new_array_pattern(p, Qnone, Qnone, (yyvsp[0].node), &(yyloc));
9865  }
9866 #line 9862 "parse.c" /* yacc.c:1646 */
9867  break;
9868 
9869  case 484:
9870 #line 3844 "parse.y" /* yacc.c:1646 */
9871  {
9872  (yyval.node) = new_hash_pattern(p, Qnone, (yyvsp[0].node), &(yyloc));
9873  }
9874 #line 9870 "parse.c" /* yacc.c:1646 */
9875  break;
9876 
9877  case 486:
9878 #line 3853 "parse.y" /* yacc.c:1646 */
9879  {
9880  /*%%%*/
9881  NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
9882  n = list_append(p, n, (yyvsp[0].node));
9883  (yyval.node) = new_hash(p, n, &(yyloc));
9884  /*% %*/
9885  /*% ripper: binary!($1, STATIC_ID2SYM((id_assoc)), $3) %*/
9886  }
9887 #line 9883 "parse.c" /* yacc.c:1646 */
9888  break;
9889 
9890  case 488:
9891 #line 3865 "parse.y" /* yacc.c:1646 */
9892  {
9893  /*%%%*/
9894  (yyval.node) = NEW_NODE(NODE_OR, (yyvsp[-2].node), (yyvsp[0].node), 0, &(yyloc));
9895  /*% %*/
9896  /*% ripper: binary!($1, STATIC_ID2SYM(idOr), $3) %*/
9897  }
9898 #line 9894 "parse.c" /* yacc.c:1646 */
9899  break;
9900 
9901  case 490:
9902 #line 3874 "parse.y" /* yacc.c:1646 */
9903  {(yyval.tbl) = push_pktbl(p);}
9904 #line 9900 "parse.c" /* yacc.c:1646 */
9905  break;
9906 
9907  case 491:
9908 #line 3875 "parse.y" /* yacc.c:1646 */
9909  {(yyval.tbl) = push_pktbl(p);}
9910 #line 9906 "parse.c" /* yacc.c:1646 */
9911  break;
9912 
9913  case 493:
9914 #line 3879 "parse.y" /* yacc.c:1646 */
9915  {
9916  pop_pktbl(p, (yyvsp[-2].tbl));
9917  (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), Qnone, (yyvsp[-1].node), &(yyloc));
9918  /*%%%*/
9919  nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
9920  /*%
9921  %*/
9922  }
9923 #line 9919 "parse.c" /* yacc.c:1646 */
9924  break;
9925 
9926  case 494:
9927 #line 3888 "parse.y" /* yacc.c:1646 */
9928  {
9929  pop_pktbl(p, (yyvsp[-2].tbl));
9930  (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
9931  /*%%%*/
9932  nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
9933  /*%
9934  %*/
9935  }
9936 #line 9932 "parse.c" /* yacc.c:1646 */
9937  break;
9938 
9939  case 495:
9940 #line 3897 "parse.y" /* yacc.c:1646 */
9941  {
9942  (yyval.node) = new_array_pattern_tail(p, Qnone, 0, 0, Qnone, &(yyloc));
9943  (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), Qnone, (yyval.node), &(yyloc));
9944  }
9945 #line 9941 "parse.c" /* yacc.c:1646 */
9946  break;
9947 
9948  case 496:
9949 #line 3902 "parse.y" /* yacc.c:1646 */
9950  {
9951  pop_pktbl(p, (yyvsp[-2].tbl));
9952  (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), Qnone, (yyvsp[-1].node), &(yyloc));
9953  /*%%%*/
9954  nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
9955  /*%
9956  %*/
9957  }
9958 #line 9954 "parse.c" /* yacc.c:1646 */
9959  break;
9960 
9961  case 497:
9962 #line 3911 "parse.y" /* yacc.c:1646 */
9963  {
9964  pop_pktbl(p, (yyvsp[-2].tbl));
9965  (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
9966  /*%%%*/
9967  nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
9968  /*%
9969  %*/
9970  }
9971 #line 9967 "parse.c" /* yacc.c:1646 */
9972  break;
9973 
9974  case 498:
9975 #line 3920 "parse.y" /* yacc.c:1646 */
9976  {
9977  (yyval.node) = new_array_pattern_tail(p, Qnone, 0, 0, Qnone, &(yyloc));
9978  (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), Qnone, (yyval.node), &(yyloc));
9979  }
9980 #line 9976 "parse.c" /* yacc.c:1646 */
9981  break;
9982 
9983  case 499:
9984 #line 3924 "parse.y" /* yacc.c:1646 */
9985  {(yyval.tbl) = push_pktbl(p);}
9986 #line 9982 "parse.c" /* yacc.c:1646 */
9987  break;
9988 
9989  case 500:
9990 #line 3925 "parse.y" /* yacc.c:1646 */
9991  {
9992  pop_pktbl(p, (yyvsp[-2].tbl));
9993  (yyval.node) = new_array_pattern(p, Qnone, Qnone, (yyvsp[-1].node), &(yyloc));
9994  }
9995 #line 9991 "parse.c" /* yacc.c:1646 */
9996  break;
9997 
9998  case 501:
9999 #line 3930 "parse.y" /* yacc.c:1646 */
10000  {
10001  (yyval.node) = new_array_pattern_tail(p, Qnone, 0, 0, Qnone, &(yyloc));
10002  (yyval.node) = new_array_pattern(p, Qnone, Qnone, (yyval.node), &(yyloc));
10003  }
10004 #line 10000 "parse.c" /* yacc.c:1646 */
10005  break;
10006 
10007  case 502:
10008 #line 3935 "parse.y" /* yacc.c:1646 */
10009  {
10010  (yyval.tbl) = push_pktbl(p);
10011  (yyvsp[0].num) = p->in_kwarg;
10012  p->in_kwarg = 0;
10013  }
10014 #line 10010 "parse.c" /* yacc.c:1646 */
10015  break;
10016 
10017  case 503:
10018 #line 3941 "parse.y" /* yacc.c:1646 */
10019  {
10020  pop_pktbl(p, (yyvsp[-2].tbl));
10021  p->in_kwarg = (yyvsp[-3].num);
10022  (yyval.node) = new_hash_pattern(p, Qnone, (yyvsp[-1].node), &(yyloc));
10023  }
10024 #line 10020 "parse.c" /* yacc.c:1646 */
10025  break;
10026 
10027  case 504:
10028 #line 3947 "parse.y" /* yacc.c:1646 */
10029  {
10030  (yyval.node) = new_hash_pattern_tail(p, Qnone, 0, &(yyloc));
10031  (yyval.node) = new_hash_pattern(p, Qnone, (yyval.node), &(yyloc));
10032  }
10033 #line 10029 "parse.c" /* yacc.c:1646 */
10034  break;
10035 
10036  case 505:
10037 #line 3951 "parse.y" /* yacc.c:1646 */
10038  {(yyval.tbl) = push_pktbl(p);}
10039 #line 10035 "parse.c" /* yacc.c:1646 */
10040  break;
10041 
10042  case 506:
10043 #line 3952 "parse.y" /* yacc.c:1646 */
10044  {
10045  pop_pktbl(p, (yyvsp[-2].tbl));
10046  (yyval.node) = (yyvsp[-1].node);
10047  }
10048 #line 10044 "parse.c" /* yacc.c:1646 */
10049  break;
10050 
10051  case 507:
10052 #line 3959 "parse.y" /* yacc.c:1646 */
10053  {
10054  /*%%%*/
10055  NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
10056  (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, Qnone, &(yyloc));
10057  /*%
10058  $$ = new_array_pattern_tail(p, rb_ary_new_from_args(1, get_value($1)), 0, 0, Qnone, &@$);
10059  %*/
10060  }
10061 #line 10057 "parse.c" /* yacc.c:1646 */
10062  break;
10063 
10064  case 508:
10065 #line 3968 "parse.y" /* yacc.c:1646 */
10066  {
10067  (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, Qnone, &(yyloc));
10068  }
10069 #line 10065 "parse.c" /* yacc.c:1646 */
10070  break;
10071 
10072  case 509:
10073 #line 3972 "parse.y" /* yacc.c:1646 */
10074  {
10075  /*%%%*/
10076  (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, Qnone, &(yyloc));
10077  /*%
10078  VALUE pre_args = rb_ary_concat($1, get_value($2));
10079  $$ = new_array_pattern_tail(p, pre_args, 0, 0, Qnone, &@$);
10080  %*/
10081  }
10082 #line 10078 "parse.c" /* yacc.c:1646 */
10083  break;
10084 
10085  case 510:
10086 #line 3981 "parse.y" /* yacc.c:1646 */
10087  {
10088  (yyval.node) = new_array_pattern_tail(p, (yyvsp[-2].node), 1, (yyvsp[0].id), Qnone, &(yyloc));
10089  }
10090 #line 10086 "parse.c" /* yacc.c:1646 */
10091  break;
10092 
10093  case 511:
10094 #line 3985 "parse.y" /* yacc.c:1646 */
10095  {
10096  (yyval.node) = new_array_pattern_tail(p, (yyvsp[-4].node), 1, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc));
10097  }
10098 #line 10094 "parse.c" /* yacc.c:1646 */
10099  break;
10100 
10101  case 512:
10102 #line 3989 "parse.y" /* yacc.c:1646 */
10103  {
10104  (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, 0, Qnone, &(yyloc));
10105  }
10106 #line 10102 "parse.c" /* yacc.c:1646 */
10107  break;
10108 
10109  case 513:
10110 #line 3993 "parse.y" /* yacc.c:1646 */
10111  {
10112  (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, 0, (yyvsp[0].node), &(yyloc));
10113  }
10114 #line 10110 "parse.c" /* yacc.c:1646 */
10115  break;
10116 
10117  case 515:
10118 #line 4000 "parse.y" /* yacc.c:1646 */
10119  {
10120  (yyval.node) = (yyvsp[-1].node);
10121  }
10122 #line 10118 "parse.c" /* yacc.c:1646 */
10123  break;
10124 
10125  case 516:
10126 #line 4004 "parse.y" /* yacc.c:1646 */
10127  {
10128  /*%%%*/
10129  (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
10130  /*% %*/
10131  /*% ripper: rb_ary_concat($1, get_value($2)) %*/
10132  }
10133 #line 10129 "parse.c" /* yacc.c:1646 */
10134  break;
10135 
10136  case 517:
10137 #line 4013 "parse.y" /* yacc.c:1646 */
10138  {
10139  (yyval.node) = new_array_pattern_tail(p, Qnone, 1, (yyvsp[0].id), Qnone, &(yyloc));
10140  }
10141 #line 10137 "parse.c" /* yacc.c:1646 */
10142  break;
10143 
10144  case 518:
10145 #line 4017 "parse.y" /* yacc.c:1646 */
10146  {
10147  (yyval.node) = new_array_pattern_tail(p, Qnone, 1, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc));
10148  }
10149 #line 10145 "parse.c" /* yacc.c:1646 */
10150  break;
10151 
10152  case 519:
10153 #line 4021 "parse.y" /* yacc.c:1646 */
10154  {
10155  (yyval.node) = new_array_pattern_tail(p, Qnone, 1, 0, Qnone, &(yyloc));
10156  }
10157 #line 10153 "parse.c" /* yacc.c:1646 */
10158  break;
10159 
10160  case 520:
10161 #line 4025 "parse.y" /* yacc.c:1646 */
10162  {
10163  (yyval.node) = new_array_pattern_tail(p, Qnone, 1, 0, (yyvsp[0].node), &(yyloc));
10164  }
10165 #line 10161 "parse.c" /* yacc.c:1646 */
10166  break;
10167 
10168  case 522:
10169 #line 4032 "parse.y" /* yacc.c:1646 */
10170  {
10171  /*%%%*/
10172  (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
10173  /*% %*/
10174  /*% ripper: rb_ary_concat($1, get_value($3)) %*/
10175  }
10176 #line 10172 "parse.c" /* yacc.c:1646 */
10177  break;
10178 
10179  case 523:
10180 #line 4041 "parse.y" /* yacc.c:1646 */
10181  {
10182  /*%%%*/
10183  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
10184  /*% %*/
10185  /*% ripper: rb_ary_new_from_args(1, get_value($1)) %*/
10186  }
10187 #line 10183 "parse.c" /* yacc.c:1646 */
10188  break;
10189 
10190  case 524:
10191 #line 4050 "parse.y" /* yacc.c:1646 */
10192  {
10193  (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
10194  }
10195 #line 10191 "parse.c" /* yacc.c:1646 */
10196  break;
10197 
10198  case 525:
10199 #line 4054 "parse.y" /* yacc.c:1646 */
10200  {
10201  (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
10202  }
10203 #line 10199 "parse.c" /* yacc.c:1646 */
10204  break;
10205 
10206  case 526:
10207 #line 4058 "parse.y" /* yacc.c:1646 */
10208  {
10209  (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
10210  }
10211 #line 10207 "parse.c" /* yacc.c:1646 */
10212  break;
10213 
10214  case 527:
10215 #line 4062 "parse.y" /* yacc.c:1646 */
10216  {
10217  (yyval.node) = new_hash_pattern_tail(p, new_hash(p, Qnone, &(yyloc)), (yyvsp[0].id), &(yyloc));
10218  }
10219 #line 10215 "parse.c" /* yacc.c:1646 */
10220  break;
10221 
10222  case 528:
10223 #line 4066 "parse.y" /* yacc.c:1646 */
10224  {
10225  (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), ID2VAL(idNil), &(yyloc));
10226  }
10227 #line 10223 "parse.c" /* yacc.c:1646 */
10228  break;
10229 
10230  case 529:
10231 #line 4070 "parse.y" /* yacc.c:1646 */
10232  {
10233  (yyval.node) = new_hash_pattern_tail(p, new_hash(p, Qnone, &(yyloc)), ID2VAL(idNil), &(yyloc));
10234  }
10235 #line 10231 "parse.c" /* yacc.c:1646 */
10236  break;
10237 
10238  case 531:
10239 #line 4078 "parse.y" /* yacc.c:1646 */
10240  {
10241  /*%%%*/
10242  (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
10243  /*% %*/
10244  /*% ripper: rb_ary_push($1, $3) %*/
10245  }
10246 #line 10242 "parse.c" /* yacc.c:1646 */
10247  break;
10248 
10249  case 532:
10250 #line 4087 "parse.y" /* yacc.c:1646 */
10251  {
10252  error_duplicate_pattern_key(p, get_id((yyvsp[-1].id)), &(yylsp[-1]));
10253  /*%%%*/
10254  (yyval.node) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[-1].id)), &(yyloc)), &(yyloc)), (yyvsp[0].node));
10255  /*% %*/
10256  /*% ripper: rb_ary_new_from_args(2, get_value($1), get_value($2)) %*/
10257  }
10258 #line 10254 "parse.c" /* yacc.c:1646 */
10259  break;
10260 
10261  case 533:
10262 #line 4095 "parse.y" /* yacc.c:1646 */
10263  {
10264  error_duplicate_pattern_key(p, get_id((yyvsp[0].id)), &(yylsp[0]));
10265  if ((yyvsp[0].id) && !is_local_id(get_id((yyvsp[0].id)))) {
10266  yyerror1(&(yylsp[0]), "key must be valid as local variables");
10267  }
10268  error_duplicate_pattern_variable(p, get_id((yyvsp[0].id)), &(yylsp[0]));
10269  /*%%%*/
10270  (yyval.node) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
10271  /*% %*/
10272  /*% ripper: rb_ary_new_from_args(2, get_value($1), Qnil) %*/
10273  }
10274 #line 10270 "parse.c" /* yacc.c:1646 */
10275  break;
10276 
10277  case 535:
10278 #line 4110 "parse.y" /* yacc.c:1646 */
10279  {
10280  YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
10281  /*%%%*/
10282  if (!(yyvsp[-1].node) || nd_type((yyvsp[-1].node)) == NODE_STR) {
10283  NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
10284  (yyval.id) = SYM2ID(node->nd_lit);
10285  }
10286  /*%
10287  if (ripper_is_node_yylval($2) && RNODE($2)->nd_cval) {
10288  VALUE label = RNODE($2)->nd_cval;
10289  VALUE rval = RNODE($2)->nd_rval;
10290  $$ = ripper_new_yylval(p, rb_intern_str(label), rval, label);
10291  RNODE($$)->nd_loc = loc;
10292  }
10293  %*/
10294  else {
10295  yyerror1(&loc, "symbol literal with interpolation is not allowed");
10296  (yyval.id) = 0;
10297  }
10298  }
10299 #line 10295 "parse.c" /* yacc.c:1646 */
10300  break;
10301 
10302  case 536:
10303 #line 4133 "parse.y" /* yacc.c:1646 */
10304  {
10305  (yyval.id) = (yyvsp[0].id);
10306  }
10307 #line 10303 "parse.c" /* yacc.c:1646 */
10308  break;
10309 
10310  case 537:
10311 #line 4137 "parse.y" /* yacc.c:1646 */
10312  {
10313  (yyval.id) = 0;
10314  }
10315 #line 10311 "parse.c" /* yacc.c:1646 */
10316  break;
10317 
10318  case 538:
10319 #line 4143 "parse.y" /* yacc.c:1646 */
10320  {
10321  (yyval.id) = 0;
10322  }
10323 #line 10319 "parse.c" /* yacc.c:1646 */
10324  break;
10325 
10326  case 540:
10327 #line 4150 "parse.y" /* yacc.c:1646 */
10328  {
10329  /*%%%*/
10330  value_expr((yyvsp[-2].node));
10331  value_expr((yyvsp[0].node));
10332  (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
10333  /*% %*/
10334  /*% ripper: dot2!($1, $3) %*/
10335  }
10336 #line 10332 "parse.c" /* yacc.c:1646 */
10337  break;
10338 
10339  case 541:
10340 #line 4159 "parse.y" /* yacc.c:1646 */
10341  {
10342  /*%%%*/
10343  value_expr((yyvsp[-2].node));
10344  value_expr((yyvsp[0].node));
10345  (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
10346  /*% %*/
10347  /*% ripper: dot3!($1, $3) %*/
10348  }
10349 #line 10345 "parse.c" /* yacc.c:1646 */
10350  break;
10351 
10352  case 542:
10353 #line 4168 "parse.y" /* yacc.c:1646 */
10354  {
10355  /*%%%*/
10356  YYLTYPE loc;
10357  loc.beg_pos = (yylsp[0]).end_pos;
10358  loc.end_pos = (yylsp[0]).end_pos;
10359 
10360  value_expr((yyvsp[-1].node));
10361  (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil(&loc), &(yyloc));
10362  /*% %*/
10363  /*% ripper: dot2!($1, Qnil) %*/
10364  }
10365 #line 10361 "parse.c" /* yacc.c:1646 */
10366  break;
10367 
10368  case 543:
10369 #line 4180 "parse.y" /* yacc.c:1646 */
10370  {
10371  /*%%%*/
10372  YYLTYPE loc;
10373  loc.beg_pos = (yylsp[0]).end_pos;
10374  loc.end_pos = (yylsp[0]).end_pos;
10375 
10376  value_expr((yyvsp[-1].node));
10377  (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil(&loc), &(yyloc));
10378  /*% %*/
10379  /*% ripper: dot3!($1, Qnil) %*/
10380  }
10381 #line 10377 "parse.c" /* yacc.c:1646 */
10382  break;
10383 
10384  case 547:
10385 #line 4195 "parse.y" /* yacc.c:1646 */
10386  {
10387  /*%%%*/
10388  YYLTYPE loc;
10389  loc.beg_pos = (yylsp[-1]).beg_pos;
10390  loc.end_pos = (yylsp[-1]).beg_pos;
10391 
10392  value_expr((yyvsp[0].node));
10393  (yyval.node) = NEW_DOT2(new_nil(&loc), (yyvsp[0].node), &(yyloc));
10394  /*% %*/
10395  /*% ripper: dot2!(Qnil, $2) %*/
10396  }
10397 #line 10393 "parse.c" /* yacc.c:1646 */
10398  break;
10399 
10400  case 548:
10401 #line 4207 "parse.y" /* yacc.c:1646 */
10402  {
10403  /*%%%*/
10404  YYLTYPE loc;
10405  loc.beg_pos = (yylsp[-1]).beg_pos;
10406  loc.end_pos = (yylsp[-1]).beg_pos;
10407 
10408  value_expr((yyvsp[0].node));
10409  (yyval.node) = NEW_DOT3(new_nil(&loc), (yyvsp[0].node), &(yyloc));
10410  /*% %*/
10411  /*% ripper: dot3!(Qnil, $2) %*/
10412  }
10413 #line 10409 "parse.c" /* yacc.c:1646 */
10414  break;
10415 
10416  case 557:
10417 #line 4229 "parse.y" /* yacc.c:1646 */
10418  {
10419  /*%%%*/
10420  if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_BEGIN(0, &(yyloc));
10421  /*% %*/
10422  /*% ripper: var_ref!($1) %*/
10423  }
10424 #line 10420 "parse.c" /* yacc.c:1646 */
10425  break;
10426 
10427  case 558:
10428 #line 4236 "parse.y" /* yacc.c:1646 */
10429  {
10430  token_info_push(p, "->", &(yylsp[0]));
10431  }
10432 #line 10428 "parse.c" /* yacc.c:1646 */
10433  break;
10434 
10435  case 559:
10436 #line 4240 "parse.y" /* yacc.c:1646 */
10437  {
10438  (yyval.node) = (yyvsp[0].node);
10439  /*%%%*/
10440  nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
10441  /*% %*/
10442  }
10443 #line 10439 "parse.c" /* yacc.c:1646 */
10444  break;
10445 
10446  case 560:
10447 #line 4249 "parse.y" /* yacc.c:1646 */
10448  {
10449  /*%%%*/
10450  error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
10451  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
10452  /*% %*/
10453  /*% ripper: assignable(p, var_field(p, $1)) %*/
10454  }
10455 #line 10451 "parse.c" /* yacc.c:1646 */
10456  break;
10457 
10458  case 561:
10459 #line 4259 "parse.y" /* yacc.c:1646 */
10460  {
10461  /*%%%*/
10462  NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
10463  if (!(nd_type(n) == NODE_LVAR || nd_type(n) == NODE_DVAR)) {
10464  compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
10465  }
10466  (yyval.node) = n;
10467  /*% %*/
10468  /*% ripper: var_ref!($2) %*/
10469  }
10470 #line 10466 "parse.c" /* yacc.c:1646 */
10471  break;
10472 
10473  case 562:
10474 #line 4272 "parse.y" /* yacc.c:1646 */
10475  {
10476  /*%%%*/
10477  (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
10478  /*% %*/
10479  /*% ripper: top_const_ref!($2) %*/
10480  }
10481 #line 10477 "parse.c" /* yacc.c:1646 */
10482  break;
10483 
10484  case 563:
10485 #line 4279 "parse.y" /* yacc.c:1646 */
10486  {
10487  /*%%%*/
10488  (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
10489  /*% %*/
10490  /*% ripper: const_path_ref!($1, $3) %*/
10491  }
10492 #line 10488 "parse.c" /* yacc.c:1646 */
10493  break;
10494 
10495  case 564:
10496 #line 4286 "parse.y" /* yacc.c:1646 */
10497  {
10498  /*%%%*/
10499  (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
10500  /*% %*/
10501  /*% ripper: var_ref!($1) %*/
10502  }
10503 #line 10499 "parse.c" /* yacc.c:1646 */
10504  break;
10505 
10506  case 565:
10507 #line 4297 "parse.y" /* yacc.c:1646 */
10508  {
10509  /*%%%*/
10510  (yyval.node) = NEW_RESBODY((yyvsp[-4].node),
10511  (yyvsp[-3].node) ? block_append(p, node_assign(p, (yyvsp[-3].node), NEW_ERRINFO(&(yylsp[-3])), &(yylsp[-3])), (yyvsp[-1].node)) : (yyvsp[-1].node),
10512  (yyvsp[0].node), &(yyloc));
10513  fixpos((yyval.node), (yyvsp[-4].node)?(yyvsp[-4].node):(yyvsp[-1].node));
10514  /*% %*/
10515  /*% ripper: rescue!(escape_Qundef($2), escape_Qundef($3), escape_Qundef($5), escape_Qundef($6)) %*/
10516  }
10517 #line 10513 "parse.c" /* yacc.c:1646 */
10518  break;
10519 
10520  case 567:
10521 #line 4310 "parse.y" /* yacc.c:1646 */
10522  {
10523  /*%%%*/
10524  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
10525  /*% %*/
10526  /*% ripper: rb_ary_new3(1, get_value($1)) %*/
10527  }
10528 #line 10524 "parse.c" /* yacc.c:1646 */
10529  break;
10530 
10531  case 568:
10532 #line 4317 "parse.y" /* yacc.c:1646 */
10533  {
10534  /*%%%*/
10535  if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
10536  /*% %*/
10537  /*% ripper: $1 %*/
10538  }
10539 #line 10535 "parse.c" /* yacc.c:1646 */
10540  break;
10541 
10542  case 570:
10543 #line 4327 "parse.y" /* yacc.c:1646 */
10544  {
10545  (yyval.node) = (yyvsp[0].node);
10546  }
10547 #line 10543 "parse.c" /* yacc.c:1646 */
10548  break;
10549 
10550  case 572:
10551 #line 4334 "parse.y" /* yacc.c:1646 */
10552  {
10553  /*%%%*/
10554  (yyval.node) = (yyvsp[0].node);
10555  /*% %*/
10556  /*% ripper: ensure!($2) %*/
10557  }
10558 #line 10554 "parse.c" /* yacc.c:1646 */
10559  break;
10560 
10561  case 576:
10562 #line 4348 "parse.y" /* yacc.c:1646 */
10563  {
10564  /*%%%*/
10565  NODE *node = (yyvsp[0].node);
10566  if (!node) {
10567  node = NEW_STR(STR_NEW0(), &(yyloc));
10568  RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
10569  }
10570  else {
10571  node = evstr2dstr(p, node);
10572  }
10573  (yyval.node) = node;
10574  /*% %*/
10575  /*% ripper: $1 %*/
10576  }
10577 #line 10573 "parse.c" /* yacc.c:1646 */
10578  break;
10579 
10580  case 579:
10581 #line 4367 "parse.y" /* yacc.c:1646 */
10582  {
10583  /*%%%*/
10584  (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
10585  /*% %*/
10586  /*% ripper: string_concat!($1, $2) %*/
10587  }
10588 #line 10584 "parse.c" /* yacc.c:1646 */
10589  break;
10590 
10591  case 580:
10592 #line 4376 "parse.y" /* yacc.c:1646 */
10593  {
10594  /*%%%*/
10595  (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
10596  if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
10597  /*% %*/
10598  /*% ripper: string_literal!(heredoc_dedent(p, $2)) %*/
10599  }
10600 #line 10596 "parse.c" /* yacc.c:1646 */
10601  break;
10602 
10603  case 581:
10604 #line 4386 "parse.y" /* yacc.c:1646 */
10605  {
10606  /*%%%*/
10607  (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
10608  /*% %*/
10609  /*% ripper: xstring_literal!(heredoc_dedent(p, $2)) %*/
10610  }
10611 #line 10607 "parse.c" /* yacc.c:1646 */
10612  break;
10613 
10614  case 582:
10615 #line 4395 "parse.y" /* yacc.c:1646 */
10616  {
10617  (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc));
10618  }
10619 #line 10615 "parse.c" /* yacc.c:1646 */
10620  break;
10621 
10622  case 583:
10623 #line 4401 "parse.y" /* yacc.c:1646 */
10624  {
10625  /*%%%*/
10626  (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
10627  /*% %*/
10628  /*% ripper: array!($3) %*/
10629  }
10630 #line 10626 "parse.c" /* yacc.c:1646 */
10631  break;
10632 
10633  case 584:
10634 #line 4410 "parse.y" /* yacc.c:1646 */
10635  {
10636  /*%%%*/
10637  (yyval.node) = 0;
10638  /*% %*/
10639  /*% ripper: words_new! %*/
10640  }
10641 #line 10637 "parse.c" /* yacc.c:1646 */
10642  break;
10643 
10644  case 585:
10645 #line 4417 "parse.y" /* yacc.c:1646 */
10646  {
10647  /*%%%*/
10648  (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
10649  /*% %*/
10650  /*% ripper: words_add!($1, $2) %*/
10651  }
10652 #line 10648 "parse.c" /* yacc.c:1646 */
10653  break;
10654 
10655  case 587:
10656 #line 4428 "parse.y" /* yacc.c:1646 */
10657  {
10658  /*%%%*/
10659  (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
10660  /*% %*/
10661  /*% ripper: word_add!($1, $2) %*/
10662  }
10663 #line 10659 "parse.c" /* yacc.c:1646 */
10664  break;
10665 
10666  case 588:
10667 #line 4437 "parse.y" /* yacc.c:1646 */
10668  {
10669  /*%%%*/
10670  (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
10671  /*% %*/
10672  /*% ripper: array!($3) %*/
10673  }
10674 #line 10670 "parse.c" /* yacc.c:1646 */
10675  break;
10676 
10677  case 589:
10678 #line 4446 "parse.y" /* yacc.c:1646 */
10679  {
10680  /*%%%*/
10681  (yyval.node) = 0;
10682  /*% %*/
10683  /*% ripper: symbols_new! %*/
10684  }
10685 #line 10681 "parse.c" /* yacc.c:1646 */
10686  break;
10687 
10688  case 590:
10689 #line 4453 "parse.y" /* yacc.c:1646 */
10690  {
10691  /*%%%*/
10692  (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
10693  /*% %*/
10694  /*% ripper: symbols_add!($1, $2) %*/
10695  }
10696 #line 10692 "parse.c" /* yacc.c:1646 */
10697  break;
10698 
10699  case 591:
10700 #line 4462 "parse.y" /* yacc.c:1646 */
10701  {
10702  /*%%%*/
10703  (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
10704  /*% %*/
10705  /*% ripper: array!($3) %*/
10706  }
10707 #line 10703 "parse.c" /* yacc.c:1646 */
10708  break;
10709 
10710  case 592:
10711 #line 4471 "parse.y" /* yacc.c:1646 */
10712  {
10713  /*%%%*/
10714  (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
10715  /*% %*/
10716  /*% ripper: array!($3) %*/
10717  }
10718 #line 10714 "parse.c" /* yacc.c:1646 */
10719  break;
10720 
10721  case 593:
10722 #line 4480 "parse.y" /* yacc.c:1646 */
10723  {
10724  /*%%%*/
10725  (yyval.node) = 0;
10726  /*% %*/
10727  /*% ripper: qwords_new! %*/
10728  }
10729 #line 10725 "parse.c" /* yacc.c:1646 */
10730  break;
10731 
10732  case 594:
10733 #line 4487 "parse.y" /* yacc.c:1646 */
10734  {
10735  /*%%%*/
10736  (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
10737  /*% %*/
10738  /*% ripper: qwords_add!($1, $2) %*/
10739  }
10740 #line 10736 "parse.c" /* yacc.c:1646 */
10741  break;
10742 
10743  case 595:
10744 #line 4496 "parse.y" /* yacc.c:1646 */
10745  {
10746  /*%%%*/
10747  (yyval.node) = 0;
10748  /*% %*/
10749  /*% ripper: qsymbols_new! %*/
10750  }
10751 #line 10747 "parse.c" /* yacc.c:1646 */
10752  break;
10753 
10754  case 596:
10755 #line 4503 "parse.y" /* yacc.c:1646 */
10756  {
10757  /*%%%*/
10758  (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
10759  /*% %*/
10760  /*% ripper: qsymbols_add!($1, $2) %*/
10761  }
10762 #line 10758 "parse.c" /* yacc.c:1646 */
10763  break;
10764 
10765  case 597:
10766 #line 4512 "parse.y" /* yacc.c:1646 */
10767  {
10768  /*%%%*/
10769  (yyval.node) = 0;
10770  /*% %*/
10771  /*% ripper: string_content! %*/
10772  /*%%%*/
10773  /*%
10774  $$ = ripper_new_yylval(p, 0, $$, 0);
10775  %*/
10776  }
10777 #line 10773 "parse.c" /* yacc.c:1646 */
10778  break;
10779 
10780  case 598:
10781 #line 4523 "parse.y" /* yacc.c:1646 */
10782  {
10783  /*%%%*/
10784  (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
10785  /*% %*/
10786  /*% ripper: string_add!($1, $2) %*/
10787  /*%%%*/
10788  /*%
10789  if (ripper_is_node_yylval($1) && ripper_is_node_yylval($2) &&
10790  !RNODE($1)->nd_cval) {
10791  RNODE($1)->nd_cval = RNODE($2)->nd_cval;
10792  RNODE($1)->nd_rval = add_mark_object(p, $$);
10793  $$ = $1;
10794  }
10795  %*/
10796  }
10797 #line 10793 "parse.c" /* yacc.c:1646 */
10798  break;
10799 
10800  case 599:
10801 #line 4541 "parse.y" /* yacc.c:1646 */
10802  {
10803  /*%%%*/
10804  (yyval.node) = 0;
10805  /*% %*/
10806  /*% ripper: xstring_new! %*/
10807  }
10808 #line 10804 "parse.c" /* yacc.c:1646 */
10809  break;
10810 
10811  case 600:
10812 #line 4548 "parse.y" /* yacc.c:1646 */
10813  {
10814  /*%%%*/
10815  (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
10816  /*% %*/
10817  /*% ripper: xstring_add!($1, $2) %*/
10818  }
10819 #line 10815 "parse.c" /* yacc.c:1646 */
10820  break;
10821 
10822  case 601:
10823 #line 4557 "parse.y" /* yacc.c:1646 */
10824  {
10825  /*%%%*/
10826  (yyval.node) = 0;
10827  /*% %*/
10828  /*% ripper: regexp_new! %*/
10829  /*%%%*/
10830  /*%
10831  $$ = ripper_new_yylval(p, 0, $$, 0);
10832  %*/
10833  }
10834 #line 10830 "parse.c" /* yacc.c:1646 */
10835  break;
10836 
10837  case 602:
10838 #line 4568 "parse.y" /* yacc.c:1646 */
10839  {
10840  /*%%%*/
10841  NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
10842  if (!head) {
10843  (yyval.node) = tail;
10844  }
10845  else if (!tail) {
10846  (yyval.node) = head;
10847  }
10848  else {
10849  switch (nd_type(head)) {
10850  case NODE_STR:
10851  nd_set_type(head, NODE_DSTR);
10852  break;
10853  case NODE_DSTR:
10854  break;
10855  default:
10856  head = list_append(p, NEW_DSTR(Qnil, &(yyloc)), head);
10857  break;
10858  }
10859  (yyval.node) = list_append(p, head, tail);
10860  }
10861  /*%
10862  VALUE s1 = 1, s2 = 0, n1 = $1, n2 = $2;
10863  if (ripper_is_node_yylval(n1)) {
10864  s1 = RNODE(n1)->nd_cval;
10865  n1 = RNODE(n1)->nd_rval;
10866  }
10867  if (ripper_is_node_yylval(n2)) {
10868  s2 = RNODE(n2)->nd_cval;
10869  n2 = RNODE(n2)->nd_rval;
10870  }
10871  $$ = dispatch2(regexp_add, n1, n2);
10872  if (!s1 && s2) {
10873  $$ = ripper_new_yylval(p, 0, $$, s2);
10874  }
10875  %*/
10876  }
10877 #line 10873 "parse.c" /* yacc.c:1646 */
10878  break;
10879 
10880  case 604:
10881 #line 4611 "parse.y" /* yacc.c:1646 */
10882  {
10883  /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
10884  (yyval.strterm) = p->lex.strterm;
10885  p->lex.strterm = 0;
10886  SET_LEX_STATE(EXPR_BEG);
10887  }
10888 #line 10884 "parse.c" /* yacc.c:1646 */
10889  break;
10890 
10891  case 605:
10892 #line 4618 "parse.y" /* yacc.c:1646 */
10893  {
10894  p->lex.strterm = (yyvsp[-1].strterm);
10895  /*%%%*/
10896  (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc));
10897  nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
10898  /*% %*/
10899  /*% ripper: string_dvar!($3) %*/
10900  }
10901 #line 10897 "parse.c" /* yacc.c:1646 */
10902  break;
10903 
10904  case 606:
10905 #line 4627 "parse.y" /* yacc.c:1646 */
10906  {
10907  CMDARG_PUSH(0);
10908  COND_PUSH(0);
10909  }
10910 #line 10906 "parse.c" /* yacc.c:1646 */
10911  break;
10912 
10913  case 607:
10914 #line 4631 "parse.y" /* yacc.c:1646 */
10915  {
10916  /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
10917  (yyval.strterm) = p->lex.strterm;
10918  p->lex.strterm = 0;
10919  }
10920 #line 10916 "parse.c" /* yacc.c:1646 */
10921  break;
10922 
10923  case 608:
10924 #line 4636 "parse.y" /* yacc.c:1646 */
10925  {
10926  (yyval.num) = p->lex.state;
10927  SET_LEX_STATE(EXPR_BEG);
10928  }
10929 #line 10925 "parse.c" /* yacc.c:1646 */
10930  break;
10931 
10932  case 609:
10933 #line 4640 "parse.y" /* yacc.c:1646 */
10934  {
10935  (yyval.num) = p->lex.brace_nest;
10936  p->lex.brace_nest = 0;
10937  }
10938 #line 10934 "parse.c" /* yacc.c:1646 */
10939  break;
10940 
10941  case 610:
10942 #line 4644 "parse.y" /* yacc.c:1646 */
10943  {
10944  (yyval.num) = p->heredoc_indent;
10945  p->heredoc_indent = 0;
10946  }
10947 #line 10943 "parse.c" /* yacc.c:1646 */
10948  break;
10949 
10950  case 611:
10951 #line 4649 "parse.y" /* yacc.c:1646 */
10952  {
10953  COND_POP();
10954  CMDARG_POP();
10955  p->lex.strterm = (yyvsp[-5].strterm);
10956  SET_LEX_STATE((yyvsp[-4].num));
10957  p->lex.brace_nest = (yyvsp[-3].num);
10958  p->heredoc_indent = (yyvsp[-2].num);
10959  p->heredoc_line_indent = -1;
10960  /*%%%*/
10961  if ((yyvsp[-1].node)) (yyvsp[-1].node)->flags &= ~NODE_FL_NEWLINE;
10962  (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc));
10963  /*% %*/
10964  /*% ripper: string_embexpr!($7) %*/
10965  }
10966 #line 10962 "parse.c" /* yacc.c:1646 */
10967  break;
10968 
10969  case 612:
10970 #line 4666 "parse.y" /* yacc.c:1646 */
10971  {
10972  /*%%%*/
10973  (yyval.node) = NEW_GVAR((yyvsp[0].id), &(yyloc));
10974  /*% %*/
10975  /*% ripper: var_ref!($1) %*/
10976  }
10977 #line 10973 "parse.c" /* yacc.c:1646 */
10978  break;
10979 
10980  case 613:
10981 #line 4673 "parse.y" /* yacc.c:1646 */
10982  {
10983  /*%%%*/
10984  (yyval.node) = NEW_IVAR((yyvsp[0].id), &(yyloc));
10985  /*% %*/
10986  /*% ripper: var_ref!($1) %*/
10987  }
10988 #line 10984 "parse.c" /* yacc.c:1646 */
10989  break;
10990 
10991  case 614:
10992 #line 4680 "parse.y" /* yacc.c:1646 */
10993  {
10994  /*%%%*/
10995  (yyval.node) = NEW_CVAR((yyvsp[0].id), &(yyloc));
10996  /*% %*/
10997  /*% ripper: var_ref!($1) %*/
10998  }
10999 #line 10995 "parse.c" /* yacc.c:1646 */
11000  break;
11001 
11002  case 618:
11003 #line 4694 "parse.y" /* yacc.c:1646 */
11004  {
11005  SET_LEX_STATE(EXPR_END);
11006  /*%%%*/
11007  (yyval.node) = NEW_LIT(ID2SYM((yyvsp[0].id)), &(yyloc));
11008  /*% %*/
11009  /*% ripper: symbol_literal!(symbol!($2)) %*/
11010  }
11011 #line 11007 "parse.c" /* yacc.c:1646 */
11012  break;
11013 
11014  case 623:
11015 #line 4710 "parse.y" /* yacc.c:1646 */
11016  {
11017  SET_LEX_STATE(EXPR_END);
11018  /*%%%*/
11019  (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
11020  /*% %*/
11021  /*% ripper: dyna_symbol!($2) %*/
11022  }
11023 #line 11019 "parse.c" /* yacc.c:1646 */
11024  break;
11025 
11026  case 625:
11027 #line 4721 "parse.y" /* yacc.c:1646 */
11028  {
11029  /*%%%*/
11030  (yyval.node) = (yyvsp[0].node);
11031  RB_OBJ_WRITE(p->ast, &(yyval.node)->nd_lit, negate_lit(p, (yyval.node)->nd_lit));
11032  /*% %*/
11033  /*% ripper: unary!(ID2VAL(idUMinus), $2) %*/
11034  }
11035 #line 11031 "parse.c" /* yacc.c:1646 */
11036  break;
11037 
11038  case 635:
11039 #line 4743 "parse.y" /* yacc.c:1646 */
11040  {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
11041 #line 11037 "parse.c" /* yacc.c:1646 */
11042  break;
11043 
11044  case 636:
11045 #line 4744 "parse.y" /* yacc.c:1646 */
11046  {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
11047 #line 11043 "parse.c" /* yacc.c:1646 */
11048  break;
11049 
11050  case 637:
11051 #line 4745 "parse.y" /* yacc.c:1646 */
11052  {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
11053 #line 11049 "parse.c" /* yacc.c:1646 */
11054  break;
11055 
11056  case 638:
11057 #line 4746 "parse.y" /* yacc.c:1646 */
11058  {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
11059 #line 11055 "parse.c" /* yacc.c:1646 */
11060  break;
11061 
11062  case 639:
11063 #line 4747 "parse.y" /* yacc.c:1646 */
11064  {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
11065 #line 11061 "parse.c" /* yacc.c:1646 */
11066  break;
11067 
11068  case 640:
11069 #line 4748 "parse.y" /* yacc.c:1646 */
11070  {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
11071 #line 11067 "parse.c" /* yacc.c:1646 */
11072  break;
11073 
11074  case 641:
11075 #line 4749 "parse.y" /* yacc.c:1646 */
11076  {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
11077 #line 11073 "parse.c" /* yacc.c:1646 */
11078  break;
11079 
11080  case 642:
11081 #line 4753 "parse.y" /* yacc.c:1646 */
11082  {
11083  /*%%%*/
11084  if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_BEGIN(0, &(yyloc));
11085  /*%
11086  if (id_is_var(p, get_id($1))) {
11087  $$ = dispatch1(var_ref, $1);
11088  }
11089  else {
11090  $$ = dispatch1(vcall, $1);
11091  }
11092  %*/
11093  }
11094 #line 11090 "parse.c" /* yacc.c:1646 */
11095  break;
11096 
11097  case 643:
11098 #line 4766 "parse.y" /* yacc.c:1646 */
11099  {
11100  /*%%%*/
11101  if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_BEGIN(0, &(yyloc));
11102  /*% %*/
11103  /*% ripper: var_ref!($1) %*/
11104  }
11105 #line 11101 "parse.c" /* yacc.c:1646 */
11106  break;
11107 
11108  case 644:
11109 #line 4775 "parse.y" /* yacc.c:1646 */
11110  {
11111  /*%%%*/
11112  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
11113  /*% %*/
11114  /*% ripper: assignable(p, var_field(p, $1)) %*/
11115  }
11116 #line 11112 "parse.c" /* yacc.c:1646 */
11117  break;
11118 
11119  case 645:
11120 #line 4782 "parse.y" /* yacc.c:1646 */
11121  {
11122  /*%%%*/
11123  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
11124  /*% %*/
11125  /*% ripper: assignable(p, var_field(p, $1)) %*/
11126  }
11127 #line 11123 "parse.c" /* yacc.c:1646 */
11128  break;
11129 
11130  case 648:
11131 #line 4795 "parse.y" /* yacc.c:1646 */
11132  {
11133  SET_LEX_STATE(EXPR_BEG);
11134  p->command_start = TRUE;
11135  }
11136 #line 11132 "parse.c" /* yacc.c:1646 */
11137  break;
11138 
11139  case 649:
11140 #line 4800 "parse.y" /* yacc.c:1646 */
11141  {
11142  (yyval.node) = (yyvsp[-1].node);
11143  }
11144 #line 11140 "parse.c" /* yacc.c:1646 */
11145  break;
11146 
11147  case 650:
11148 #line 4804 "parse.y" /* yacc.c:1646 */
11149  {
11150  /*%%%*/
11151  (yyval.node) = 0;
11152  /*% %*/
11153  /*% ripper: Qnil %*/
11154  }
11155 #line 11151 "parse.c" /* yacc.c:1646 */
11156  break;
11157 
11158  case 651:
11159 #line 4813 "parse.y" /* yacc.c:1646 */
11160  {
11161  /*%%%*/
11162  (yyval.node) = (yyvsp[-1].node);
11163  /*% %*/
11164  /*% ripper: paren!($2) %*/
11165  SET_LEX_STATE(EXPR_BEG);
11166  p->command_start = TRUE;
11167  }
11168 #line 11164 "parse.c" /* yacc.c:1646 */
11169  break;
11170 
11171  case 652:
11172 #line 4822 "parse.y" /* yacc.c:1646 */
11173  {
11174  arg_var(p, idFWD_REST);
11175 #if idFWD_KWREST
11176  arg_var(p, idFWD_KWREST);
11177 #endif
11178  arg_var(p, idFWD_BLOCK);
11179  /*%%%*/
11180  (yyval.node) = new_args_tail(p, Qnone, idFWD_KWREST, idFWD_BLOCK, &(yylsp[-1]));
11181  (yyval.node) = new_args(p, Qnone, Qnone, idFWD_REST, Qnone, (yyval.node), &(yylsp[-1]));
11182  /*% %*/
11183  /*% ripper: paren!(params_new(Qnone, Qnone, $2, Qnone, Qnone, Qnone, Qnone)) %*/
11184  SET_LEX_STATE(EXPR_BEG);
11185  p->command_start = TRUE;
11186  }
11187 #line 11183 "parse.c" /* yacc.c:1646 */
11188  break;
11189 
11190  case 653:
11191 #line 4836 "parse.y" /* yacc.c:1646 */
11192  {
11193  (yyval.num) = p->in_kwarg;
11194  p->in_kwarg = 1;
11195  SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
11196  }
11197 #line 11193 "parse.c" /* yacc.c:1646 */
11198  break;
11199 
11200  case 654:
11201 #line 4842 "parse.y" /* yacc.c:1646 */
11202  {
11203  p->in_kwarg = !!(yyvsp[-2].num);
11204  (yyval.node) = (yyvsp[-1].node);
11205  SET_LEX_STATE(EXPR_BEG);
11206  p->command_start = TRUE;
11207  }
11208 #line 11204 "parse.c" /* yacc.c:1646 */
11209  break;
11210 
11211  case 655:
11212 #line 4851 "parse.y" /* yacc.c:1646 */
11213  {
11214  (yyval.node) = new_args_tail(p, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
11215  }
11216 #line 11212 "parse.c" /* yacc.c:1646 */
11217  break;
11218 
11219  case 656:
11220 #line 4855 "parse.y" /* yacc.c:1646 */
11221  {
11222  (yyval.node) = new_args_tail(p, (yyvsp[-1].node), Qnone, (yyvsp[0].id), &(yylsp[-1]));
11223  }
11224 #line 11220 "parse.c" /* yacc.c:1646 */
11225  break;
11226 
11227  case 657:
11228 #line 4859 "parse.y" /* yacc.c:1646 */
11229  {
11230  (yyval.node) = new_args_tail(p, Qnone, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
11231  }
11232 #line 11228 "parse.c" /* yacc.c:1646 */
11233  break;
11234 
11235  case 658:
11236 #line 4863 "parse.y" /* yacc.c:1646 */
11237  {
11238  (yyval.node) = new_args_tail(p, Qnone, ID2VAL(idNil), (yyvsp[0].id), &(yylsp[-1]));
11239  }
11240 #line 11236 "parse.c" /* yacc.c:1646 */
11241  break;
11242 
11243  case 659:
11244 #line 4867 "parse.y" /* yacc.c:1646 */
11245  {
11246  (yyval.node) = new_args_tail(p, Qnone, Qnone, (yyvsp[0].id), &(yylsp[0]));
11247  }
11248 #line 11244 "parse.c" /* yacc.c:1646 */
11249  break;
11250 
11251  case 660:
11252 #line 4873 "parse.y" /* yacc.c:1646 */
11253  {
11254  (yyval.node) = (yyvsp[0].node);
11255  }
11256 #line 11252 "parse.c" /* yacc.c:1646 */
11257  break;
11258 
11259  case 661:
11260 #line 4877 "parse.y" /* yacc.c:1646 */
11261  {
11262  (yyval.node) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
11263  }
11264 #line 11260 "parse.c" /* yacc.c:1646 */
11265  break;
11266 
11267  case 662:
11268 #line 4883 "parse.y" /* yacc.c:1646 */
11269  {
11270  (yyval.node) = new_args(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
11271  }
11272 #line 11268 "parse.c" /* yacc.c:1646 */
11273  break;
11274 
11275  case 663:
11276 #line 4887 "parse.y" /* yacc.c:1646 */
11277  {
11278  (yyval.node) = new_args(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11279  }
11280 #line 11276 "parse.c" /* yacc.c:1646 */
11281  break;
11282 
11283  case 664:
11284 #line 4891 "parse.y" /* yacc.c:1646 */
11285  {
11286  (yyval.node) = new_args(p, (yyvsp[-3].node), (yyvsp[-1].node), Qnone, Qnone, (yyvsp[0].node), &(yyloc));
11287  }
11288 #line 11284 "parse.c" /* yacc.c:1646 */
11289  break;
11290 
11291  case 665:
11292 #line 4895 "parse.y" /* yacc.c:1646 */
11293  {
11294  (yyval.node) = new_args(p, (yyvsp[-5].node), (yyvsp[-3].node), Qnone, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11295  }
11296 #line 11292 "parse.c" /* yacc.c:1646 */
11297  break;
11298 
11299  case 666:
11300 #line 4899 "parse.y" /* yacc.c:1646 */
11301  {
11302  (yyval.node) = new_args(p, (yyvsp[-3].node), Qnone, (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
11303  }
11304 #line 11300 "parse.c" /* yacc.c:1646 */
11305  break;
11306 
11307  case 667:
11308 #line 4903 "parse.y" /* yacc.c:1646 */
11309  {
11310  (yyval.node) = new_args(p, (yyvsp[-5].node), Qnone, (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11311  }
11312 #line 11308 "parse.c" /* yacc.c:1646 */
11313  break;
11314 
11315  case 668:
11316 #line 4907 "parse.y" /* yacc.c:1646 */
11317  {
11318  (yyval.node) = new_args(p, (yyvsp[-1].node), Qnone, Qnone, Qnone, (yyvsp[0].node), &(yyloc));
11319  }
11320 #line 11316 "parse.c" /* yacc.c:1646 */
11321  break;
11322 
11323  case 669:
11324 #line 4911 "parse.y" /* yacc.c:1646 */
11325  {
11326  (yyval.node) = new_args(p, Qnone, (yyvsp[-3].node), (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
11327  }
11328 #line 11324 "parse.c" /* yacc.c:1646 */
11329  break;
11330 
11331  case 670:
11332 #line 4915 "parse.y" /* yacc.c:1646 */
11333  {
11334  (yyval.node) = new_args(p, Qnone, (yyvsp[-5].node), (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11335  }
11336 #line 11332 "parse.c" /* yacc.c:1646 */
11337  break;
11338 
11339  case 671:
11340 #line 4919 "parse.y" /* yacc.c:1646 */
11341  {
11342  (yyval.node) = new_args(p, Qnone, (yyvsp[-1].node), Qnone, Qnone, (yyvsp[0].node), &(yyloc));
11343  }
11344 #line 11340 "parse.c" /* yacc.c:1646 */
11345  break;
11346 
11347  case 672:
11348 #line 4923 "parse.y" /* yacc.c:1646 */
11349  {
11350  (yyval.node) = new_args(p, Qnone, (yyvsp[-3].node), Qnone, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11351  }
11352 #line 11348 "parse.c" /* yacc.c:1646 */
11353  break;
11354 
11355  case 673:
11356 #line 4927 "parse.y" /* yacc.c:1646 */
11357  {
11358  (yyval.node) = new_args(p, Qnone, Qnone, (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
11359  }
11360 #line 11356 "parse.c" /* yacc.c:1646 */
11361  break;
11362 
11363  case 674:
11364 #line 4931 "parse.y" /* yacc.c:1646 */
11365  {
11366  (yyval.node) = new_args(p, Qnone, Qnone, (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11367  }
11368 #line 11364 "parse.c" /* yacc.c:1646 */
11369  break;
11370 
11371  case 675:
11372 #line 4935 "parse.y" /* yacc.c:1646 */
11373  {
11374  (yyval.node) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyvsp[0].node), &(yyloc));
11375  }
11376 #line 11372 "parse.c" /* yacc.c:1646 */
11377  break;
11378 
11379  case 676:
11380 #line 4939 "parse.y" /* yacc.c:1646 */
11381  {
11382  (yyval.node) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
11383  (yyval.node) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyval.node), &(yylsp[0]));
11384  }
11385 #line 11381 "parse.c" /* yacc.c:1646 */
11386  break;
11387 
11388  case 677:
11389 #line 4946 "parse.y" /* yacc.c:1646 */
11390  {
11391  /*%%%*/
11392  (yyval.id) = idDot3;
11393  /*% %*/
11394  /*% ripper: args_forward! %*/
11395  }
11396 #line 11392 "parse.c" /* yacc.c:1646 */
11397  break;
11398 
11399  case 678:
11400 #line 4955 "parse.y" /* yacc.c:1646 */
11401  {
11402  /*%%%*/
11403  yyerror1(&(yylsp[0]), "formal argument cannot be a constant");
11404  (yyval.id) = 0;
11405  /*% %*/
11406  /*% ripper[error]: param_error!($1) %*/
11407  }
11408 #line 11404 "parse.c" /* yacc.c:1646 */
11409  break;
11410 
11411  case 679:
11412 #line 4963 "parse.y" /* yacc.c:1646 */
11413  {
11414  /*%%%*/
11415  yyerror1(&(yylsp[0]), "formal argument cannot be an instance variable");
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 680:
11424 #line 4971 "parse.y" /* yacc.c:1646 */
11425  {
11426  /*%%%*/
11427  yyerror1(&(yylsp[0]), "formal argument cannot be a global 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 681:
11436 #line 4979 "parse.y" /* yacc.c:1646 */
11437  {
11438  /*%%%*/
11439  yyerror1(&(yylsp[0]), "formal argument cannot be a class 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 683:
11448 #line 4990 "parse.y" /* yacc.c:1646 */
11449  {
11450  formal_argument(p, get_id((yyvsp[0].id)));
11452  (yyval.id) = (yyvsp[0].id);
11453  }
11454 #line 11450 "parse.c" /* yacc.c:1646 */
11455  break;
11456 
11457  case 684:
11458 #line 4998 "parse.y" /* yacc.c:1646 */
11459  {
11460  ID id = get_id((yyvsp[0].id));
11461  arg_var(p, id);
11462  p->cur_arg = id;
11463  (yyval.id) = (yyvsp[0].id);
11464  }
11465 #line 11461 "parse.c" /* yacc.c:1646 */
11466  break;
11467 
11468  case 685:
11469 #line 5007 "parse.y" /* yacc.c:1646 */
11470  {
11471  p->cur_arg = 0;
11472  /*%%%*/
11473  (yyval.node) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
11474  /*% %*/
11475  /*% ripper: get_value($1) %*/
11476  }
11477 #line 11473 "parse.c" /* yacc.c:1646 */
11478  break;
11479 
11480  case 686:
11481 #line 5015 "parse.y" /* yacc.c:1646 */
11482  {
11483  /*%%%*/
11484  ID tid = internal_id(p);
11485  YYLTYPE loc;
11486  loc.beg_pos = (yylsp[-1]).beg_pos;
11487  loc.end_pos = (yylsp[-1]).beg_pos;
11488  arg_var(p, tid);
11489  if (dyna_in_block(p)) {
11490  (yyvsp[-1].node)->nd_value = NEW_DVAR(tid, &loc);
11491  }
11492  else {
11493  (yyvsp[-1].node)->nd_value = NEW_LVAR(tid, &loc);
11494  }
11495  (yyval.node) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
11496  (yyval.node)->nd_next = (yyvsp[-1].node);
11497  /*% %*/
11498  /*% ripper: mlhs_paren!($2) %*/
11499  }
11500 #line 11496 "parse.c" /* yacc.c:1646 */
11501  break;
11502 
11503  case 688:
11504 #line 5038 "parse.y" /* yacc.c:1646 */
11505  {
11506  /*%%%*/
11507  (yyval.node) = (yyvsp[-2].node);
11508  (yyval.node)->nd_plen++;
11509  (yyval.node)->nd_next = block_append(p, (yyval.node)->nd_next, (yyvsp[0].node)->nd_next);
11510  rb_discard_node(p, (yyvsp[0].node));
11511  /*% %*/
11512  /*% ripper: rb_ary_push($1, get_value($3)) %*/
11513  }
11514 #line 11510 "parse.c" /* yacc.c:1646 */
11515  break;
11516 
11517  case 689:
11518 #line 5051 "parse.y" /* yacc.c:1646 */
11519  {
11520  ID id = get_id((yyvsp[0].id));
11521  arg_var(p, formal_argument(p, id));
11522  p->cur_arg = id;
11524  (yyval.id) = (yyvsp[0].id);
11525  }
11526 #line 11522 "parse.c" /* yacc.c:1646 */
11527  break;
11528 
11529  case 690:
11530 #line 5061 "parse.y" /* yacc.c:1646 */
11531  {
11532  p->cur_arg = 0;
11533  /*%%%*/
11534  (yyval.node) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
11535  /*% %*/
11536  /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), get_value($2)) %*/
11537  }
11538 #line 11534 "parse.c" /* yacc.c:1646 */
11539  break;
11540 
11541  case 691:
11542 #line 5069 "parse.y" /* yacc.c:1646 */
11543  {
11544  p->cur_arg = 0;
11545  /*%%%*/
11546  (yyval.node) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
11547  /*% %*/
11548  /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), 0) %*/
11549  }
11550 #line 11546 "parse.c" /* yacc.c:1646 */
11551  break;
11552 
11553  case 692:
11554 #line 5079 "parse.y" /* yacc.c:1646 */
11555  {
11556  /*%%%*/
11557  (yyval.node) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
11558  /*% %*/
11559  /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), get_value($2)) %*/
11560  }
11561 #line 11557 "parse.c" /* yacc.c:1646 */
11562  break;
11563 
11564  case 693:
11565 #line 5086 "parse.y" /* yacc.c:1646 */
11566  {
11567  /*%%%*/
11568  (yyval.node) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
11569  /*% %*/
11570  /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), 0) %*/
11571  }
11572 #line 11568 "parse.c" /* yacc.c:1646 */
11573  break;
11574 
11575  case 694:
11576 #line 5095 "parse.y" /* yacc.c:1646 */
11577  {
11578  /*%%%*/
11579  (yyval.node) = (yyvsp[0].node);
11580  /*% %*/
11581  /*% ripper: rb_ary_new3(1, get_value($1)) %*/
11582  }
11583 #line 11579 "parse.c" /* yacc.c:1646 */
11584  break;
11585 
11586  case 695:
11587 #line 5102 "parse.y" /* yacc.c:1646 */
11588  {
11589  /*%%%*/
11590  (yyval.node) = kwd_append((yyvsp[-2].node), (yyvsp[0].node));
11591  /*% %*/
11592  /*% ripper: rb_ary_push($1, get_value($3)) %*/
11593  }
11594 #line 11590 "parse.c" /* yacc.c:1646 */
11595  break;
11596 
11597  case 696:
11598 #line 5112 "parse.y" /* yacc.c:1646 */
11599  {
11600  /*%%%*/
11601  (yyval.node) = (yyvsp[0].node);
11602  /*% %*/
11603  /*% ripper: rb_ary_new3(1, get_value($1)) %*/
11604  }
11605 #line 11601 "parse.c" /* yacc.c:1646 */
11606  break;
11607 
11608  case 697:
11609 #line 5119 "parse.y" /* yacc.c:1646 */
11610  {
11611  /*%%%*/
11612  (yyval.node) = kwd_append((yyvsp[-2].node), (yyvsp[0].node));
11613  /*% %*/
11614  /*% ripper: rb_ary_push($1, get_value($3)) %*/
11615  }
11616 #line 11612 "parse.c" /* yacc.c:1646 */
11617  break;
11618 
11619  case 700:
11620 #line 5132 "parse.y" /* yacc.c:1646 */
11621  {
11622  /*%%%*/
11623  /*% %*/
11624  /*% ripper: nokw_param!(Qnil) %*/
11625  }
11626 #line 11622 "parse.c" /* yacc.c:1646 */
11627  break;
11628 
11629  case 701:
11630 #line 5140 "parse.y" /* yacc.c:1646 */
11631  {
11632  arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].id))));
11633  /*%%%*/
11634  (yyval.id) = (yyvsp[0].id);
11635  /*% %*/
11636  /*% ripper: kwrest_param!($2) %*/
11637  }
11638 #line 11634 "parse.c" /* yacc.c:1646 */
11639  break;
11640 
11641  case 702:
11642 #line 5148 "parse.y" /* yacc.c:1646 */
11643  {
11644  /*%%%*/
11645  (yyval.id) = internal_id(p);
11646  arg_var(p, (yyval.id));
11647  /*% %*/
11648  /*% ripper: kwrest_param!(Qnil) %*/
11649  }
11650 #line 11646 "parse.c" /* yacc.c:1646 */
11651  break;
11652 
11653  case 703:
11654 #line 5158 "parse.y" /* yacc.c:1646 */
11655  {
11656  p->cur_arg = 0;
11657  /*%%%*/
11658  (yyval.node) = NEW_OPT_ARG(0, assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
11659  /*% %*/
11660  /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), get_value($3)) %*/
11661  }
11662 #line 11658 "parse.c" /* yacc.c:1646 */
11663  break;
11664 
11665  case 704:
11666 #line 5168 "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 705:
11678 #line 5178 "parse.y" /* yacc.c:1646 */
11679  {
11680  /*%%%*/
11681  (yyval.node) = (yyvsp[0].node);
11682  /*% %*/
11683  /*% ripper: rb_ary_new3(1, get_value($1)) %*/
11684  }
11685 #line 11681 "parse.c" /* yacc.c:1646 */
11686  break;
11687 
11688  case 706:
11689 #line 5185 "parse.y" /* yacc.c:1646 */
11690  {
11691  /*%%%*/
11692  (yyval.node) = opt_arg_append((yyvsp[-2].node), (yyvsp[0].node));
11693  /*% %*/
11694  /*% ripper: rb_ary_push($1, get_value($3)) %*/
11695  }
11696 #line 11692 "parse.c" /* yacc.c:1646 */
11697  break;
11698 
11699  case 707:
11700 #line 5194 "parse.y" /* yacc.c:1646 */
11701  {
11702  /*%%%*/
11703  (yyval.node) = (yyvsp[0].node);
11704  /*% %*/
11705  /*% ripper: rb_ary_new3(1, get_value($1)) %*/
11706  }
11707 #line 11703 "parse.c" /* yacc.c:1646 */
11708  break;
11709 
11710  case 708:
11711 #line 5201 "parse.y" /* yacc.c:1646 */
11712  {
11713  /*%%%*/
11714  (yyval.node) = opt_arg_append((yyvsp[-2].node), (yyvsp[0].node));
11715  /*% %*/
11716  /*% ripper: rb_ary_push($1, get_value($3)) %*/
11717  }
11718 #line 11714 "parse.c" /* yacc.c:1646 */
11719  break;
11720 
11721  case 711:
11722 #line 5214 "parse.y" /* yacc.c:1646 */
11723  {
11724  arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].id))));
11725  /*%%%*/
11726  (yyval.id) = (yyvsp[0].id);
11727  /*% %*/
11728  /*% ripper: rest_param!($2) %*/
11729  }
11730 #line 11726 "parse.c" /* yacc.c:1646 */
11731  break;
11732 
11733  case 712:
11734 #line 5222 "parse.y" /* yacc.c:1646 */
11735  {
11736  /*%%%*/
11737  (yyval.id) = internal_id(p);
11738  arg_var(p, (yyval.id));
11739  /*% %*/
11740  /*% ripper: rest_param!(Qnil) %*/
11741  }
11742 #line 11738 "parse.c" /* yacc.c:1646 */
11743  break;
11744 
11745  case 715:
11746 #line 5236 "parse.y" /* yacc.c:1646 */
11747  {
11748  arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].id))));
11749  /*%%%*/
11750  (yyval.id) = (yyvsp[0].id);
11751  /*% %*/
11752  /*% ripper: blockarg!($2) %*/
11753  }
11754 #line 11750 "parse.c" /* yacc.c:1646 */
11755  break;
11756 
11757  case 716:
11758 #line 5246 "parse.y" /* yacc.c:1646 */
11759  {
11760  (yyval.id) = (yyvsp[0].id);
11761  }
11762 #line 11758 "parse.c" /* yacc.c:1646 */
11763  break;
11764 
11765  case 717:
11766 #line 5250 "parse.y" /* yacc.c:1646 */
11767  {
11768  (yyval.id) = Qnull;
11769  }
11770 #line 11766 "parse.c" /* yacc.c:1646 */
11771  break;
11772 
11773  case 718:
11774 #line 5256 "parse.y" /* yacc.c:1646 */
11775  {
11776  value_expr((yyvsp[0].node));
11777  (yyval.node) = (yyvsp[0].node);
11778  }
11779 #line 11775 "parse.c" /* yacc.c:1646 */
11780  break;
11781 
11782  case 719:
11783 #line 5260 "parse.y" /* yacc.c:1646 */
11784  {SET_LEX_STATE(EXPR_BEG);}
11785 #line 11781 "parse.c" /* yacc.c:1646 */
11786  break;
11787 
11788  case 720:
11789 #line 5261 "parse.y" /* yacc.c:1646 */
11790  {
11791  /*%%%*/
11792  switch (nd_type((yyvsp[-1].node))) {
11793  case NODE_STR:
11794  case NODE_DSTR:
11795  case NODE_XSTR:
11796  case NODE_DXSTR:
11797  case NODE_DREGX:
11798  case NODE_LIT:
11799  case NODE_LIST:
11800  case NODE_ZLIST:
11801  yyerror1(&(yylsp[-1]), "can't define singleton method for literals");
11802  break;
11803  default:
11804  value_expr((yyvsp[-1].node));
11805  break;
11806  }
11807  (yyval.node) = (yyvsp[-1].node);
11808  /*% %*/
11809  /*% ripper: paren!($3) %*/
11810  }
11811 #line 11807 "parse.c" /* yacc.c:1646 */
11812  break;
11813 
11814  case 722:
11815 #line 5286 "parse.y" /* yacc.c:1646 */
11816  {
11817  /*%%%*/
11818  (yyval.node) = (yyvsp[-1].node);
11819  /*% %*/
11820  /*% ripper: assoclist_from_args!($1) %*/
11821  }
11822 #line 11818 "parse.c" /* yacc.c:1646 */
11823  break;
11824 
11825  case 724:
11826 #line 5297 "parse.y" /* yacc.c:1646 */
11827  {
11828  /*%%%*/
11829  NODE *assocs = (yyvsp[-2].node);
11830  NODE *tail = (yyvsp[0].node);
11831  if (!assocs) {
11832  assocs = tail;
11833  }
11834  else if (tail) {
11835  if (assocs->nd_head &&
11836  !tail->nd_head && nd_type(tail->nd_next) == NODE_LIST &&
11837  nd_type(tail->nd_next->nd_head) == NODE_HASH) {
11838  /* DSTAR */
11839  tail = tail->nd_next->nd_head->nd_head;
11840  }
11841  assocs = list_concat(assocs, tail);
11842  }
11843  (yyval.node) = assocs;
11844  /*% %*/
11845  /*% ripper: rb_ary_push($1, get_value($3)) %*/
11846  }
11847 #line 11843 "parse.c" /* yacc.c:1646 */
11848  break;
11849 
11850  case 725:
11851 #line 5320 "parse.y" /* yacc.c:1646 */
11852  {
11853  /*%%%*/
11854  if (nd_type((yyvsp[-2].node)) == NODE_STR) {
11855  nd_set_type((yyvsp[-2].node), NODE_LIT);
11856  RB_OBJ_WRITE(p->ast, &(yyvsp[-2].node)->nd_lit, rb_fstring((yyvsp[-2].node)->nd_lit));
11857  }
11858  (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
11859  /*% %*/
11860  /*% ripper: assoc_new!($1, $3) %*/
11861  }
11862 #line 11858 "parse.c" /* yacc.c:1646 */
11863  break;
11864 
11865  case 726:
11866 #line 5331 "parse.y" /* yacc.c:1646 */
11867  {
11868  /*%%%*/
11869  (yyval.node) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
11870  /*% %*/
11871  /*% ripper: assoc_new!($1, $2) %*/
11872  }
11873 #line 11869 "parse.c" /* yacc.c:1646 */
11874  break;
11875 
11876  case 727:
11877 #line 5338 "parse.y" /* yacc.c:1646 */
11878  {
11879  /*%%%*/
11880  YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
11881  (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
11882  /*% %*/
11883  /*% ripper: assoc_new!(dyna_symbol!($2), $4) %*/
11884  }
11885 #line 11881 "parse.c" /* yacc.c:1646 */
11886  break;
11887 
11888  case 728:
11889 #line 5346 "parse.y" /* yacc.c:1646 */
11890  {
11891  /*%%%*/
11892  if (nd_type((yyvsp[0].node)) == NODE_HASH &&
11893  !((yyvsp[0].node)->nd_head && (yyvsp[0].node)->nd_head->nd_alen)) {
11894  static VALUE empty_hash;
11895  if (!empty_hash) {
11896  empty_hash = rb_obj_freeze(rb_hash_new());
11897  rb_gc_register_mark_object(empty_hash);
11898  }
11899  (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), NEW_LIT(empty_hash, &(yyloc)));
11900  }
11901  else
11902  (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
11903  /*% %*/
11904  /*% ripper: assoc_splat!($2) %*/
11905  }
11906 #line 11902 "parse.c" /* yacc.c:1646 */
11907  break;
11908 
11909  case 755:
11910 #line 5414 "parse.y" /* yacc.c:1646 */
11911  {yyerrok;token_flush(p);}
11912 #line 11908 "parse.c" /* yacc.c:1646 */
11913  break;
11914 
11915  case 756:
11916 #line 5415 "parse.y" /* yacc.c:1646 */
11917  {token_flush(p);}
11918 #line 11914 "parse.c" /* yacc.c:1646 */
11919  break;
11920 
11921  case 758:
11922 #line 5419 "parse.y" /* yacc.c:1646 */
11923  {yyerrok;}
11924 #line 11920 "parse.c" /* yacc.c:1646 */
11925  break;
11926 
11927  case 759:
11928 #line 5423 "parse.y" /* yacc.c:1646 */
11929  {
11930  (yyval.node) = Qnull;
11931  }
11932 #line 11928 "parse.c" /* yacc.c:1646 */
11933  break;
11934 
11935 
11936 #line 11932 "parse.c" /* yacc.c:1646 */
11937  default: break;
11938  }
11939  /* User semantic actions sometimes alter yychar, and that requires
11940  that yytoken be updated with the new translation. We take the
11941  approach of translating immediately before every use of yytoken.
11942  One alternative is translating here after every semantic action,
11943  but that translation would be missed if the semantic action invokes
11944  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
11945  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
11946  incorrect destructor might then be invoked immediately. In the
11947  case of YYERROR or YYBACKUP, subsequent parser actions might lead
11948  to an incorrect destructor call or verbose syntax error message
11949  before the lookahead is translated. */
11950  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
11951 
11952  YYPOPSTACK (yylen);
11953  yylen = 0;
11954  YY_STACK_PRINT (yyss, yyssp);
11955 
11956  *++yyvsp = yyval;
11957  *++yylsp = yyloc;
11958 
11959  /* Now 'shift' the result of the reduction. Determine what state
11960  that goes to, based on the state we popped back to and the rule
11961  number reduced by. */
11962 
11963  yyn = yyr1[yyn];
11964 
11965  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
11966  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
11967  yystate = yytable[yystate];
11968  else
11969  yystate = yydefgoto[yyn - YYNTOKENS];
11970 
11971  goto yynewstate;
11972 
11973 
11974 /*--------------------------------------.
11975 | yyerrlab -- here on detecting error. |
11976 `--------------------------------------*/
11977 yyerrlab:
11978  /* Make sure we have latest lookahead translation. See comments at
11979  user semantic actions for why this is necessary. */
11980  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
11981 
11982  /* If not already recovering from an error, report this error. */
11983  if (!yyerrstatus)
11984  {
11985  ++yynerrs;
11986 #if ! YYERROR_VERBOSE
11987  yyerror (&yylloc, p, YY_("syntax error"));
11988 #else
11989 # define YYSYNTAX_ERROR yysyntax_error (p, &yymsg_alloc, &yymsg, \
11990  yyssp, yytoken)
11991  {
11992  char const *yymsgp = YY_("syntax error");
11993  int yysyntax_error_status;
11994  yysyntax_error_status = YYSYNTAX_ERROR;
11995  if (yysyntax_error_status == 0)
11996  yymsgp = yymsg;
11997  else if (yysyntax_error_status == 1)
11998  {
11999  if (yymsg != yymsgbuf)
12000  YYSTACK_FREE (yymsg);
12001  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
12002  if (!yymsg)
12003  {
12004  yymsg = yymsgbuf;
12005  yymsg_alloc = sizeof yymsgbuf;
12006  yysyntax_error_status = 2;
12007  }
12008  else
12009  {
12010  yysyntax_error_status = YYSYNTAX_ERROR;
12011  yymsgp = yymsg;
12012  }
12013  }
12014  yyerror (&yylloc, p, yymsgp);
12015  if (yysyntax_error_status == 2)
12016  goto yyexhaustedlab;
12017  }
12018 # undef YYSYNTAX_ERROR
12019 #endif
12020  }
12021 
12022  yyerror_range[1] = yylloc;
12023 
12024  if (yyerrstatus == 3)
12025  {
12026  /* If just tried and failed to reuse lookahead token after an
12027  error, discard it. */
12028 
12029  if (yychar <= YYEOF)
12030  {
12031  /* Return failure if at end of input. */
12032  if (yychar == YYEOF)
12033  YYABORT;
12034  }
12035  else
12036  {
12037  yydestruct ("Error: discarding",
12038  yytoken, &yylval, &yylloc, p);
12039  yychar = YYEMPTY;
12040  }
12041  }
12042 
12043  /* Else will try to reuse lookahead token after shifting the error
12044  token. */
12045  goto yyerrlab1;
12046 
12047 
12048 /*---------------------------------------------------.
12049 | yyerrorlab -- error raised explicitly by YYERROR. |
12050 `---------------------------------------------------*/
12051 yyerrorlab:
12052 
12053  /* Pacify compilers like GCC when the user code never invokes
12054  YYERROR and the label yyerrorlab therefore never appears in user
12055  code. */
12056  if (/*CONSTCOND*/ 0)
12057  goto yyerrorlab;
12058 
12059  yyerror_range[1] = yylsp[1-yylen];
12060  /* Do not reclaim the symbols of the rule whose action triggered
12061  this YYERROR. */
12062  YYPOPSTACK (yylen);
12063  yylen = 0;
12064  YY_STACK_PRINT (yyss, yyssp);
12065  yystate = *yyssp;
12066  goto yyerrlab1;
12067 
12068 
12069 /*-------------------------------------------------------------.
12070 | yyerrlab1 -- common code for both syntax error and YYERROR. |
12071 `-------------------------------------------------------------*/
12072 yyerrlab1:
12073  yyerrstatus = 3; /* Each real token shifted decrements this. */
12074 
12075  for (;;)
12076  {
12077  yyn = yypact[yystate];
12078  if (!yypact_value_is_default (yyn))
12079  {
12080  yyn += YYTERROR;
12081  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
12082  {
12083  yyn = yytable[yyn];
12084  if (0 < yyn)
12085  break;
12086  }
12087  }
12088 
12089  /* Pop the current state because it cannot handle the error token. */
12090  if (yyssp == yyss)
12091  YYABORT;
12092 
12093  yyerror_range[1] = *yylsp;
12094  yydestruct ("Error: popping",
12095  yystos[yystate], yyvsp, yylsp, p);
12096  YYPOPSTACK (1);
12097  yystate = *yyssp;
12098  YY_STACK_PRINT (yyss, yyssp);
12099  }
12100 
12102  *++yyvsp = yylval;
12104 
12105  yyerror_range[2] = yylloc;
12106  /* Using YYLLOC is tempting, but would change the location of
12107  the lookahead. YYLOC is available though. */
12108  YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
12109  *++yylsp = yyloc;
12110 
12111  /* Shift the error token. */
12112  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
12113 
12114  yystate = yyn;
12115  goto yynewstate;
12116 
12117 
12118 /*-------------------------------------.
12119 | yyacceptlab -- YYACCEPT comes here. |
12120 `-------------------------------------*/
12121 yyacceptlab:
12122  yyresult = 0;
12123  goto yyreturn;
12124 
12125 /*-----------------------------------.
12126 | yyabortlab -- YYABORT comes here. |
12127 `-----------------------------------*/
12128 yyabortlab:
12129  yyresult = 1;
12130  goto yyreturn;
12131 
12132 #if !defined yyoverflow || YYERROR_VERBOSE
12133 /*-------------------------------------------------.
12134 | yyexhaustedlab -- memory exhaustion comes here. |
12135 `-------------------------------------------------*/
12136 yyexhaustedlab:
12137  yyerror (&yylloc, p, YY_("memory exhausted"));
12138  yyresult = 2;
12139  /* Fall through. */
12140 #endif
12141 
12142 yyreturn:
12143  if (yychar != YYEMPTY)
12144  {
12145  /* Make sure we have latest lookahead translation. See comments at
12146  user semantic actions for why this is necessary. */
12147  yytoken = YYTRANSLATE (yychar);
12148  yydestruct ("Cleanup: discarding lookahead",
12149  yytoken, &yylval, &yylloc, p);
12150  }
12151  /* Do not reclaim the symbols of the rule whose action triggered
12152  this YYABORT or YYACCEPT. */
12153  YYPOPSTACK (yylen);
12154  YY_STACK_PRINT (yyss, yyssp);
12155  while (yyssp != yyss)
12156  {
12157  yydestruct ("Cleanup: popping",
12158  yystos[*yyssp], yyvsp, yylsp, p);
12159  YYPOPSTACK (1);
12160  }
12161 #ifndef yyoverflow
12162  if (yyss != yyssa)
12163  YYSTACK_FREE (yyss);
12164 #endif
12165 #if YYERROR_VERBOSE
12166  if (yymsg != yymsgbuf)
12167  YYSTACK_FREE (yymsg);
12168 #endif
12169  return yyresult;
12170 }
12171 #line 5427 "parse.y" /* yacc.c:1906 */
12172 
12173 # undef p
12174 # undef yylex
12175 # undef yylval
12176 # define yylval (*p->lval)
12177 
12178 static int regx_options(struct parser_params*);
12179 static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
12180 static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
12181 static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
12182 static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
12183 
12184 #ifndef RIPPER
12185 # define set_yylval_node(x) { \
12186  YYLTYPE _cur_loc; \
12187  rb_parser_set_location(p, &_cur_loc); \
12188  yylval.node = (x); \
12189 }
12190 # define set_yylval_str(x) \
12191 do { \
12192  set_yylval_node(NEW_STR(x, &_cur_loc)); \
12193  RB_OBJ_WRITTEN(p->ast, Qnil, x); \
12194 } while(0)
12195 # define set_yylval_literal(x) \
12196 do { \
12197  set_yylval_node(NEW_LIT(x, &_cur_loc)); \
12198  RB_OBJ_WRITTEN(p->ast, Qnil, x); \
12199 } while(0)
12200 # define set_yylval_num(x) (yylval.num = (x))
12201 # define set_yylval_id(x) (yylval.id = (x))
12202 # define set_yylval_name(x) (yylval.id = (x))
12203 # define yylval_id() (yylval.id)
12204 #else
12205 static inline VALUE
12206 ripper_yylval_id(struct parser_params *p, ID x)
12207 {
12208  return ripper_new_yylval(p, x, ID2SYM(x), 0);
12209 }
12210 # define set_yylval_str(x) (yylval.val = add_mark_object(p, (x)))
12211 # define set_yylval_num(x) (yylval.val = ripper_new_yylval(p, (x), 0, 0))
12212 # define set_yylval_id(x) (void)(x)
12213 # define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(p, x))
12214 # define set_yylval_literal(x) add_mark_object(p, (x))
12215 # define set_yylval_node(x) (void)(x)
12216 # define yylval_id() yylval.id
12217 # define _cur_loc NULL_LOC /* dummy */
12218 #endif
12219 
12220 #define set_yylval_noname() set_yylval_id(keyword_nil)
12221 
12222 #ifndef RIPPER
12223 #define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
12224 #define dispatch_scan_event(p, t) ((void)0)
12225 #define dispatch_delayed_token(p, t) ((void)0)
12226 #define has_delayed_token(p) (0)
12227 #else
12228 #define literal_flush(p, ptr) ((void)(ptr))
12229 
12230 #define yylval_rval (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val))
12231 
12232 static inline VALUE
12233 intern_sym(const char *name)
12234 {
12235  ID id = rb_intern_const(name);
12236  return ID2SYM(id);
12237 }
12238 
12239 static int
12240 ripper_has_scan_event(struct parser_params *p)
12241 {
12242  if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
12243  return p->lex.pcur > p->lex.ptok;
12244 }
12245 
12246 static VALUE
12247 ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
12248 {
12249  VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
12250  VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
12251  token_flush(p);
12252  return rval;
12253 }
12254 
12255 static void
12256 ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
12257 {
12258  if (!ripper_has_scan_event(p)) return;
12259  add_mark_object(p, yylval_rval = ripper_scan_event_val(p, t));
12260 }
12261 #define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
12262 
12263 static void
12264 ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
12265 {
12266  int saved_line = p->ruby_sourceline;
12267  const char *saved_tokp = p->lex.ptok;
12268 
12269  if (NIL_P(p->delayed.token)) return;
12270  p->ruby_sourceline = p->delayed.line;
12271  p->lex.ptok = p->lex.pbeg + p->delayed.col;
12272  add_mark_object(p, yylval_rval = ripper_dispatch1(p, ripper_token2eventid(t), p->delayed.token));
12273  p->delayed.token = Qnil;
12274  p->ruby_sourceline = saved_line;
12275  p->lex.ptok = saved_tokp;
12276 }
12277 #define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
12278 #define has_delayed_token(p) (!NIL_P(p->delayed.token))
12279 #endif /* RIPPER */
12280 
12281 #include "ruby/regex.h"
12282 #include "ruby/util.h"
12283 
12284 static inline int
12285 is_identchar(const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
12286 {
12287  return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
12288 }
12289 
12290 static inline int
12291 parser_is_identchar(struct parser_params *p)
12292 {
12293  return !(p)->eofp && is_identchar(p->lex.pcur-1, p->lex.pend, p->enc);
12294 }
12295 
12296 static inline int
12297 parser_isascii(struct parser_params *p)
12298 {
12299  return ISASCII(*(p->lex.pcur-1));
12300 }
12301 
12302 static void
12303 token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
12304 {
12305  int column = 1, nonspc = 0, i;
12306  for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
12307  if (*ptr == '\t') {
12308  column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
12309  }
12310  column++;
12311  if (*ptr != ' ' && *ptr != '\t') {
12312  nonspc = 1;
12313  }
12314  }
12315 
12316  ptinfo->beg = loc->beg_pos;
12317  ptinfo->indent = column;
12318  ptinfo->nonspc = nonspc;
12319 }
12320 
12321 static void
12322 token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
12323 {
12324  token_info *ptinfo;
12325 
12326  if (!p->token_info_enabled) return;
12327  ptinfo = ALLOC(token_info);
12328  ptinfo->token = token;
12329  ptinfo->next = p->token_info;
12330  token_info_setup(ptinfo, p->lex.pbeg, loc);
12331 
12332  p->token_info = ptinfo;
12333 }
12334 
12335 static void
12336 token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
12337 {
12338  token_info *ptinfo_beg = p->token_info;
12339 
12340  if (!ptinfo_beg) return;
12341  p->token_info = ptinfo_beg->next;
12342 
12343  /* indentation check of matched keywords (begin..end, if..end, etc.) */
12344  token_info_warn(p, token, ptinfo_beg, 1, loc);
12345  ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
12346 }
12347 
12348 static void
12349 token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
12350 {
12351  token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
12352  if (!p->token_info_enabled) return;
12353  if (!ptinfo_beg) return;
12354  token_info_setup(ptinfo_end, p->lex.pbeg, loc);
12355  if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
12356  if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
12357  if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
12358  if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
12359  rb_warn3L(ptinfo_end->beg.lineno,
12360  "mismatched indentations at '%s' with '%s' at %d",
12361  WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
12362 }
12363 
12364 static int
12365 parser_precise_mbclen(struct parser_params *p, const char *ptr)
12366 {
12367  int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
12368  if (!MBCLEN_CHARFOUND_P(len)) {
12369  compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
12370  return -1;
12371  }
12372  return len;
12373 }
12374 
12375 #ifndef RIPPER
12376 static void ruby_show_error_line(VALUE errbuf, const YYLTYPE *yylloc, int lineno, VALUE str);
12377 
12378 static inline void
12379 parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
12380 {
12381  VALUE str;
12382  int lineno = p->ruby_sourceline;
12383  if (!yylloc) {
12384  return;
12385  }
12386  else if (yylloc->beg_pos.lineno == lineno) {
12387  str = p->lex.lastline;
12388  }
12389  else {
12390  return;
12391  }
12392  ruby_show_error_line(p->error_buffer, yylloc, lineno, str);
12393 }
12394 
12395 static int
12396 parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
12397 {
12398  YYLTYPE current;
12399 
12400  if (!yylloc) {
12401  yylloc = RUBY_SET_YYLLOC(current);
12402  }
12403  else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
12404  p->ruby_sourceline != yylloc->end_pos.lineno) ||
12405  (yylloc->beg_pos.lineno == yylloc->end_pos.lineno &&
12406  yylloc->beg_pos.column == yylloc->end_pos.column)) {
12407  yylloc = 0;
12408  }
12409  compile_error(p, "%s", msg);
12410  parser_show_error_line(p, yylloc);
12411  return 0;
12412 }
12413 
12414 static void
12415 ruby_show_error_line(VALUE errbuf, const YYLTYPE *yylloc, int lineno, VALUE str)
12416 {
12417  VALUE mesg;
12418  const int max_line_margin = 30;
12419  const char *ptr, *ptr_end, *pt, *pb;
12420  const char *pre = "", *post = "", *pend;
12421  const char *code = "", *caret = "";
12422  const char *lim;
12423  const char *const pbeg = RSTRING_PTR(str);
12424  char *buf;
12425  long len;
12426  int i;
12427 
12428  if (!yylloc) return;
12429  pend = RSTRING_END(str);
12430  if (pend > pbeg && pend[-1] == '\n') {
12431  if (--pend > pbeg && pend[-1] == '\r') --pend;
12432  }
12433 
12434  pt = pend;
12435  if (lineno == yylloc->end_pos.lineno &&
12436  (pend - pbeg) > yylloc->end_pos.column) {
12437  pt = pbeg + yylloc->end_pos.column;
12438  }
12439 
12440  ptr = ptr_end = pt;
12441  lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
12442  while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
12443 
12444  lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
12445  while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
12446 
12447  len = ptr_end - ptr;
12448  if (len > 4) {
12449  if (ptr > pbeg) {
12450  ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_enc_get(str));
12451  if (ptr > pbeg) pre = "...";
12452  }
12453  if (ptr_end < pend) {
12454  ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_enc_get(str));
12455  if (ptr_end < pend) post = "...";
12456  }
12457  }
12458  pb = pbeg;
12459  if (lineno == yylloc->beg_pos.lineno) {
12460  pb += yylloc->beg_pos.column;
12461  if (pb > pt) pb = pt;
12462  }
12463  if (pb < ptr) pb = ptr;
12464  if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
12465  return;
12466  }
12467  if (RTEST(errbuf)) {
12468  mesg = rb_attr_get(errbuf, idMesg);
12469  if (RSTRING_LEN(mesg) > 0 && *(RSTRING_END(mesg)-1) != '\n')
12470  rb_str_cat_cstr(mesg, "\n");
12471  }
12472  else {
12473  mesg = rb_enc_str_new(0, 0, rb_enc_get(str));
12474  }
12475  if (!errbuf && rb_stderr_tty_p()) {
12476 #define CSI_BEGIN "\033["
12477 #define CSI_SGR "m"
12478  rb_str_catf(mesg,
12479  CSI_BEGIN""CSI_SGR"%s" /* pre */
12480  CSI_BEGIN"1"CSI_SGR"%.*s"
12481  CSI_BEGIN"1;4"CSI_SGR"%.*s"
12482  CSI_BEGIN";1"CSI_SGR"%.*s"
12483  CSI_BEGIN""CSI_SGR"%s" /* post */
12484  "\n",
12485  pre,
12486  (int)(pb - ptr), ptr,
12487  (int)(pt - pb), pb,
12488  (int)(ptr_end - pt), pt,
12489  post);
12490  }
12491  else {
12492  char *p2;
12493 
12494  len = ptr_end - ptr;
12495  lim = pt < pend ? pt : pend;
12496  i = (int)(lim - ptr);
12497  buf = ALLOCA_N(char, i+2);
12498  code = ptr;
12499  caret = p2 = buf;
12500  if (ptr <= pb) {
12501  while (ptr < pb) {
12502  *p2++ = *ptr++ == '\t' ? '\t' : ' ';
12503  }
12504  *p2++ = '^';
12505  ptr++;
12506  }
12507  if (lim > ptr) {
12508  memset(p2, '~', (lim - ptr));
12509  p2 += (lim - ptr);
12510  }
12511  *p2 = '\0';
12512  rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
12513  pre, (int)len, code, post,
12514  pre, caret);
12515  }
12516  if (!errbuf) rb_write_error_str(mesg);
12517 }
12518 #else
12519 static int
12520 parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
12521 {
12522  const char *pcur = 0, *ptok = 0;
12523  if (yylloc &&
12524  p->ruby_sourceline == yylloc->beg_pos.lineno &&
12525  p->ruby_sourceline == yylloc->end_pos.lineno) {
12526  pcur = p->lex.pcur;
12527  ptok = p->lex.ptok;
12528  p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
12529  p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
12530  }
12531  dispatch1(parse_error, STR_NEW2(msg));
12532  ripper_error(p);
12533  if (pcur) {
12534  p->lex.ptok = ptok;
12535  p->lex.pcur = pcur;
12536  }
12537  return 0;
12538 }
12539 
12540 static inline void
12541 parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
12542 {
12543 }
12544 #endif /* !RIPPER */
12545 
12546 #ifndef RIPPER
12547 static int
12548 vtable_size(const struct vtable *tbl)
12549 {
12550  if (!DVARS_TERMINAL_P(tbl)) {
12551  return tbl->pos;
12552  }
12553  else {
12554  return 0;
12555  }
12556 }
12557 #endif
12558 
12559 static struct vtable *
12560 vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
12561 {
12562  struct vtable *tbl = ALLOC(struct vtable);
12563  tbl->pos = 0;
12564  tbl->capa = 8;
12565  tbl->tbl = ALLOC_N(ID, tbl->capa);
12566  tbl->prev = prev;
12567 #ifndef RIPPER
12568  if (p->debug) {
12569  rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
12570  }
12571 #endif
12572  return tbl;
12573 }
12574 #define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
12575 
12576 static void
12577 vtable_free_gen(struct parser_params *p, int line, const char *name,
12578  struct vtable *tbl)
12579 {
12580 #ifndef RIPPER
12581  if (p->debug) {
12582  rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
12583  }
12584 #endif
12585  if (!DVARS_TERMINAL_P(tbl)) {
12586  if (tbl->tbl) {
12587  ruby_sized_xfree(tbl->tbl, tbl->capa * sizeof(ID));
12588  }
12589  ruby_sized_xfree(tbl, sizeof(tbl));
12590  }
12591 }
12592 #define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
12593 
12594 static void
12595 vtable_add_gen(struct parser_params *p, int line, const char *name,
12596  struct vtable *tbl, ID id)
12597 {
12598 #ifndef RIPPER
12599  if (p->debug) {
12600  rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
12601  line, name, (void *)tbl, rb_id2name(id));
12602  }
12603 #endif
12604  if (DVARS_TERMINAL_P(tbl)) {
12605  rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
12606  return;
12607  }
12608  if (tbl->pos == tbl->capa) {
12609  tbl->capa = tbl->capa * 2;
12610  SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
12611  }
12612  tbl->tbl[tbl->pos++] = id;
12613 }
12614 #define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
12615 
12616 #ifndef RIPPER
12617 static void
12618 vtable_pop_gen(struct parser_params *p, int line, const char *name,
12619  struct vtable *tbl, int n)
12620 {
12621  if (p->debug) {
12622  rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
12623  line, name, (void *)tbl, n);
12624  }
12625  if (tbl->pos < n) {
12626  rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
12627  return;
12628  }
12629  tbl->pos -= n;
12630 }
12631 #define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
12632 #endif
12633 
12634 static int
12635 vtable_included(const struct vtable * tbl, ID id)
12636 {
12637  int i;
12638 
12639  if (!DVARS_TERMINAL_P(tbl)) {
12640  for (i = 0; i < tbl->pos; i++) {
12641  if (tbl->tbl[i] == id) {
12642  return i+1;
12643  }
12644  }
12645  }
12646  return 0;
12647 }
12648 
12649 static void parser_prepare(struct parser_params *p);
12650 
12651 #ifndef RIPPER
12652 static NODE *parser_append_options(struct parser_params *p, NODE *node);
12653 
12654 static VALUE
12655 debug_lines(VALUE fname)
12656 {
12657  ID script_lines;
12658  CONST_ID(script_lines, "SCRIPT_LINES__");
12659  if (rb_const_defined_at(rb_cObject, script_lines)) {
12660  VALUE hash = rb_const_get_at(rb_cObject, script_lines);
12661  if (RB_TYPE_P(hash, T_HASH)) {
12662  VALUE lines = rb_ary_new();
12663  rb_hash_aset(hash, fname, lines);
12664  return lines;
12665  }
12666  }
12667  return 0;
12668 }
12669 
12670 static int
12671 e_option_supplied(struct parser_params *p)
12672 {
12673  return strcmp(p->ruby_sourcefile, "-e") == 0;
12674 }
12675 
12676 static VALUE
12677 yycompile0(VALUE arg)
12678 {
12679  int n;
12680  NODE *tree;
12681  struct parser_params *p = (struct parser_params *)arg;
12682  VALUE cov = Qfalse;
12683 
12686  if (p->debug_lines && p->ruby_sourceline > 0) {
12687  VALUE str = STR_NEW0();
12688  n = p->ruby_sourceline;
12689  do {
12691  } while (--n);
12692  }
12693 
12694  if (!e_option_supplied(p)) {
12695  cov = Qtrue;
12696  }
12697  }
12698 
12699  parser_prepare(p);
12700 #define RUBY_DTRACE_PARSE_HOOK(name) \
12701  if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
12702  RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
12703  }
12704  RUBY_DTRACE_PARSE_HOOK(BEGIN);
12705  n = yyparse(p);
12707  p->debug_lines = 0;
12708 
12709  p->lex.strterm = 0;
12710  p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
12711  p->lex.prevline = p->lex.lastline = p->lex.nextline = 0;
12712  if (n || p->error_p) {
12713  VALUE mesg = p->error_buffer;
12714  if (!mesg) {
12715  mesg = rb_class_new_instance(0, 0, rb_eSyntaxError);
12716  }
12717  rb_set_errinfo(mesg);
12718  return FALSE;
12719  }
12720  tree = p->eval_tree;
12721  if (!tree) {
12722  tree = NEW_NIL(&NULL_LOC);
12723  }
12724  else {
12725  VALUE opt = p->compile_option;
12726  NODE *prelude;
12727  NODE *body = parser_append_options(p, tree->nd_body);
12728  if (!opt) opt = rb_obj_hide(rb_ident_hash_new());
12729  rb_hash_aset(opt, rb_sym_intern_ascii_cstr("coverage_enabled"), cov);
12730  prelude = block_append(p, p->eval_tree_begin, body);
12731  tree->nd_body = prelude;
12732  RB_OBJ_WRITE(p->ast, &p->ast->body.compile_option, opt);
12733  }
12734  p->ast->body.root = tree;
12735  p->ast->body.line_count = p->line_count;
12736  return TRUE;
12737 }
12738 
12739 static rb_ast_t *
12740 yycompile(VALUE vparser, struct parser_params *p, VALUE fname, int line)
12741 {
12742  rb_ast_t *ast;
12743  if (NIL_P(fname)) {
12745  p->ruby_sourcefile = "(none)";
12746  }
12747  else {
12748  p->ruby_sourcefile_string = rb_fstring(fname);
12749  p->ruby_sourcefile = StringValueCStr(fname);
12750  }
12751  p->ruby_sourceline = line - 1;
12752 
12753  p->ast = ast = rb_ast_new();
12754  rb_suppress_tracing(yycompile0, (VALUE)p);
12755  p->ast = 0;
12756  RB_GC_GUARD(vparser); /* prohibit tail call optimization */
12757 
12758  return ast;
12759 }
12760 #endif /* !RIPPER */
12761 
12762 static rb_encoding *
12763 must_be_ascii_compatible(VALUE s)
12764 {
12765  rb_encoding *enc = rb_enc_get(s);
12766  if (!rb_enc_asciicompat(enc)) {
12767  rb_raise(rb_eArgError, "invalid source encoding");
12768  }
12769  return enc;
12770 }
12771 
12772 static VALUE
12773 lex_get_str(struct parser_params *p, VALUE s)
12774 {
12775  char *beg, *end, *start;
12776  long len;
12777 
12778  beg = RSTRING_PTR(s);
12779  len = RSTRING_LEN(s);
12780  start = beg;
12781  if (p->lex.gets_.ptr) {
12782  if (len == p->lex.gets_.ptr) return Qnil;
12783  beg += p->lex.gets_.ptr;
12784  len -= p->lex.gets_.ptr;
12785  }
12786  end = memchr(beg, '\n', len);
12787  if (end) len = ++end - beg;
12788  p->lex.gets_.ptr += len;
12789  return rb_str_subseq(s, beg - start, len);
12790 }
12791 
12792 static VALUE
12793 lex_getline(struct parser_params *p)
12794 {
12795  VALUE line = (*p->lex.gets)(p, p->lex.input);
12796  if (NIL_P(line)) return line;
12797  must_be_ascii_compatible(line);
12798 #ifndef RIPPER
12799  if (p->debug_lines) {
12800  rb_enc_associate(line, p->enc);
12801  rb_ary_push(p->debug_lines, line);
12802  }
12803 #endif
12804  p->line_count++;
12805  return line;
12806 }
12807 
12808 static const rb_data_type_t parser_data_type;
12809 
12810 #ifndef RIPPER
12811 static rb_ast_t*
12812 parser_compile_string(VALUE vparser, VALUE fname, VALUE s, int line)
12813 {
12814  struct parser_params *p;
12815 
12816  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
12817 
12818  p->lex.gets = lex_get_str;
12819  p->lex.gets_.ptr = 0;
12820  p->lex.input = rb_str_new_frozen(s);
12821  p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
12822 
12823  return yycompile(vparser, p, fname, line);
12824 }
12825 
12826 rb_ast_t*
12827 rb_parser_compile_string(VALUE vparser, const char *f, VALUE s, int line)
12828 {
12829  return rb_parser_compile_string_path(vparser, rb_filesystem_str_new_cstr(f), s, line);
12830 }
12831 
12832 rb_ast_t*
12834 {
12835  must_be_ascii_compatible(s);
12836  return parser_compile_string(vparser, f, s, line);
12837 }
12838 
12840 
12841 static VALUE
12842 lex_io_gets(struct parser_params *p, VALUE io)
12843 {
12844  return rb_io_gets_internal(io);
12845 }
12846 
12847 rb_ast_t*
12848 rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE file, int start)
12849 {
12850  struct parser_params *p;
12851 
12852  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
12853 
12854  p->lex.gets = lex_io_gets;
12855  p->lex.input = file;
12856  p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
12857 
12858  return yycompile(vparser, p, fname, start);
12859 }
12860 
12861 static VALUE
12862 lex_generic_gets(struct parser_params *p, VALUE input)
12863 {
12864  return (*p->lex.gets_.call)(input, p->line_count);
12865 }
12866 
12867 rb_ast_t*
12868 rb_parser_compile_generic(VALUE vparser, VALUE (*lex_gets)(VALUE, int), VALUE fname, VALUE input, int start)
12869 {
12870  struct parser_params *p;
12871 
12872  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
12873 
12874  p->lex.gets = lex_generic_gets;
12875  p->lex.gets_.call = lex_gets;
12876  p->lex.input = input;
12877  p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
12878 
12879  return yycompile(vparser, p, fname, start);
12880 }
12881 #endif /* !RIPPER */
12882 
12883 #define STR_FUNC_ESCAPE 0x01
12884 #define STR_FUNC_EXPAND 0x02
12885 #define STR_FUNC_REGEXP 0x04
12886 #define STR_FUNC_QWORDS 0x08
12887 #define STR_FUNC_SYMBOL 0x10
12888 #define STR_FUNC_INDENT 0x20
12889 #define STR_FUNC_LABEL 0x40
12890 #define STR_FUNC_LIST 0x4000
12891 #define STR_FUNC_TERM 0x8000
12892 
12895  str_squote = (0),
12903 };
12904 
12905 static VALUE
12906 parser_str_new(const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
12907 {
12908  VALUE str;
12909 
12910  str = rb_enc_str_new(ptr, len, enc);
12911  if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
12913  }
12914  else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) {
12916  }
12917  }
12918 
12919  return str;
12920 }
12921 
12922 #define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
12923 #define lex_eol_p(p) ((p)->lex.pcur >= (p)->lex.pend)
12924 #define lex_eol_n_p(p,n) ((p)->lex.pcur+(n) >= (p)->lex.pend)
12925 #define peek(p,c) peek_n(p, (c), 0)
12926 #define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
12927 #define peekc(p) peekc_n(p, 0)
12928 #define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
12929 
12930 #ifdef RIPPER
12931 static void
12932 add_delayed_token(struct parser_params *p, const char *tok, const char *end)
12933 {
12934  if (tok < end) {
12935  if (!has_delayed_token(p)) {
12936  p->delayed.token = rb_str_buf_new(end - tok);
12937  rb_enc_associate(p->delayed.token, p->enc);
12938  p->delayed.line = p->ruby_sourceline;
12939  p->delayed.col = rb_long2int(tok - p->lex.pbeg);
12940  }
12941  rb_str_buf_cat(p->delayed.token, tok, end - tok);
12942  p->lex.ptok = end;
12943  }
12944 }
12945 #else
12946 #define add_delayed_token(p, tok, end) ((void)(tok), (void)(end))
12947 #endif
12948 
12949 static int
12950 nextline(struct parser_params *p)
12951 {
12952  VALUE v = p->lex.nextline;
12953  p->lex.nextline = 0;
12954  if (!v) {
12955  if (p->eofp)
12956  return -1;
12957 
12958  if (p->lex.pend > p->lex.pbeg && *(p->lex.pend-1) != '\n') {
12959  goto end_of_input;
12960  }
12961 
12962  if (!p->lex.input || NIL_P(v = lex_getline(p))) {
12963  end_of_input:
12964  p->eofp = 1;
12965  lex_goto_eol(p);
12966  return -1;
12967  }
12968  p->cr_seen = FALSE;
12969  }
12970  else if (NIL_P(v)) {
12971  /* after here-document without terminator */
12972  goto end_of_input;
12973  }
12974  add_delayed_token(p, p->lex.ptok, p->lex.pend);
12975  if (p->heredoc_end > 0) {
12976  p->ruby_sourceline = p->heredoc_end;
12977  p->heredoc_end = 0;
12978  }
12979  p->ruby_sourceline++;
12980  p->lex.pbeg = p->lex.pcur = RSTRING_PTR(v);
12981  p->lex.pend = p->lex.pcur + RSTRING_LEN(v);
12982  token_flush(p);
12983  p->lex.prevline = p->lex.lastline;
12984  p->lex.lastline = v;
12985  return 0;
12986 }
12987 
12988 static int
12989 parser_cr(struct parser_params *p, int c)
12990 {
12991  if (peek(p, '\n')) {
12992  p->lex.pcur++;
12993  c = '\n';
12994  }
12995  else if (!p->cr_seen) {
12996  p->cr_seen = TRUE;
12997  /* carried over with p->lex.nextline for nextc() */
12998  rb_warn0("encountered \\r in middle of line, treated as a mere space");
12999  }
13000  return c;
13001 }
13002 
13003 static inline int
13004 nextc(struct parser_params *p)
13005 {
13006  int c;
13007 
13008  if (UNLIKELY((p->lex.pcur == p->lex.pend) || p->eofp || RTEST(p->lex.nextline))) {
13009  if (nextline(p)) return -1;
13010  }
13011  c = (unsigned char)*p->lex.pcur++;
13012  if (UNLIKELY(c == '\r')) {
13013  c = parser_cr(p, c);
13014  }
13015 
13016  return c;
13017 }
13018 
13019 static void
13020 pushback(struct parser_params *p, int c)
13021 {
13022  if (c == -1) return;
13023  p->lex.pcur--;
13024  if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
13025  p->lex.pcur--;
13026  }
13027 }
13028 
13029 #define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
13030 
13031 #define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
13032 #define tok(p) (p)->tokenbuf
13033 #define toklen(p) (p)->tokidx
13034 
13035 static int
13036 looking_at_eol_p(struct parser_params *p)
13037 {
13038  const char *ptr = p->lex.pcur;
13039  while (ptr < p->lex.pend) {
13040  int c = (unsigned char)*ptr++;
13041  int eol = (c == '\n' || c == '#');
13042  if (eol || !ISSPACE(c)) {
13043  return eol;
13044  }
13045  }
13046  return TRUE;
13047 }
13048 
13049 static char*
13050 newtok(struct parser_params *p)
13051 {
13052  p->tokidx = 0;
13053  p->tokline = p->ruby_sourceline;
13054  if (!p->tokenbuf) {
13055  p->toksiz = 60;
13056  p->tokenbuf = ALLOC_N(char, 60);
13057  }
13058  if (p->toksiz > 4096) {
13059  p->toksiz = 60;
13060  REALLOC_N(p->tokenbuf, char, 60);
13061  }
13062  return p->tokenbuf;
13063 }
13064 
13065 static char *
13066 tokspace(struct parser_params *p, int n)
13067 {
13068  p->tokidx += n;
13069 
13070  if (p->tokidx >= p->toksiz) {
13071  do {p->toksiz *= 2;} while (p->toksiz < p->tokidx);
13072  REALLOC_N(p->tokenbuf, char, p->toksiz);
13073  }
13074  return &p->tokenbuf[p->tokidx-n];
13075 }
13076 
13077 static void
13078 tokadd(struct parser_params *p, int c)
13079 {
13080  p->tokenbuf[p->tokidx++] = (char)c;
13081  if (p->tokidx >= p->toksiz) {
13082  p->toksiz *= 2;
13083  REALLOC_N(p->tokenbuf, char, p->toksiz);
13084  }
13085 }
13086 
13087 static int
13088 tok_hex(struct parser_params *p, size_t *numlen)
13089 {
13090  int c;
13091 
13092  c = scan_hex(p->lex.pcur, 2, numlen);
13093  if (!*numlen) {
13094  yyerror0("invalid hex escape");
13095  token_flush(p);
13096  return 0;
13097  }
13098  p->lex.pcur += *numlen;
13099  return c;
13100 }
13101 
13102 #define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
13103 
13104 static int
13105 escaped_control_code(int c)
13106 {
13107  int c2 = 0;
13108  switch (c) {
13109  case ' ':
13110  c2 = 's';
13111  break;
13112  case '\n':
13113  c2 = 'n';
13114  break;
13115  case '\t':
13116  c2 = 't';
13117  break;
13118  case '\v':
13119  c2 = 'v';
13120  break;
13121  case '\r':
13122  c2 = 'r';
13123  break;
13124  case '\f':
13125  c2 = 'f';
13126  break;
13127  }
13128  return c2;
13129 }
13130 
13131 #define WARN_SPACE_CHAR(c, prefix) \
13132  rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c2))
13133 
13134 static int
13135 tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
13136  int regexp_literal, int wide)
13137 {
13138  size_t numlen;
13139  int codepoint = scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
13140  literal_flush(p, p->lex.pcur);
13141  p->lex.pcur += numlen;
13142  if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
13143  yyerror0("invalid Unicode escape");
13144  return wide && numlen > 0;
13145  }
13146  if (codepoint > 0x10ffff) {
13147  yyerror0("invalid Unicode codepoint (too large)");
13148  return wide;
13149  }
13150  if ((codepoint & 0xfffff800) == 0xd800) {
13151  yyerror0("invalid Unicode codepoint");
13152  return wide;
13153  }
13154  if (regexp_literal) {
13155  tokcopy(p, (int)numlen);
13156  }
13157  else if (codepoint >= 0x80) {
13158  rb_encoding *utf8 = rb_utf8_encoding();
13159  if (*encp && utf8 != *encp) {
13160  YYLTYPE loc = RUBY_INIT_YYLLOC();
13161  compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
13162  parser_show_error_line(p, &loc);
13163  return wide;
13164  }
13165  *encp = utf8;
13166  tokaddmbc(p, codepoint, *encp);
13167  }
13168  else {
13169  tokadd(p, codepoint);
13170  }
13171  return TRUE;
13172 }
13173 
13174 /* return value is for ?\u3042 */
13175 static void
13176 tokadd_utf8(struct parser_params *p, rb_encoding **encp,
13177  int term, int symbol_literal, int regexp_literal)
13178 {
13179  /*
13180  * If `term` is not -1, then we allow multiple codepoints in \u{}
13181  * upto `term` byte, otherwise we're parsing a character literal.
13182  * And then add the codepoints to the current token.
13183  */
13184  static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
13185 
13186  const int open_brace = '{', close_brace = '}';
13187 
13188  if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
13189 
13190  if (peek(p, open_brace)) { /* handle \u{...} form */
13191  const char *second = NULL;
13192  int c, last = nextc(p);
13193  if (p->lex.pcur >= p->lex.pend) goto unterminated;
13194  while (ISSPACE(c = *p->lex.pcur) && ++p->lex.pcur < p->lex.pend);
13195  while (c != close_brace) {
13196  if (c == term) goto unterminated;
13197  if (second == multiple_codepoints)
13198  second = p->lex.pcur;
13199  if (regexp_literal) tokadd(p, last);
13200  if (!tokadd_codepoint(p, encp, regexp_literal, TRUE)) {
13201  break;
13202  }
13203  while (ISSPACE(c = *p->lex.pcur)) {
13204  if (++p->lex.pcur >= p->lex.pend) goto unterminated;
13205  last = c;
13206  }
13207  if (term == -1 && !second)
13208  second = multiple_codepoints;
13209  }
13210 
13211  if (c != close_brace) {
13212  unterminated:
13213  token_flush(p);
13214  yyerror0("unterminated Unicode escape");
13215  return;
13216  }
13217  if (second && second != multiple_codepoints) {
13218  const char *pcur = p->lex.pcur;
13219  p->lex.pcur = second;
13221  token_flush(p);
13222  p->lex.pcur = pcur;
13223  yyerror0(multiple_codepoints);
13224  token_flush(p);
13225  }
13226 
13227  if (regexp_literal) tokadd(p, close_brace);
13228  nextc(p);
13229  }
13230  else { /* handle \uxxxx form */
13231  if (!tokadd_codepoint(p, encp, regexp_literal, FALSE)) {
13232  token_flush(p);
13233  return;
13234  }
13235  }
13236 }
13237 
13238 #define ESCAPE_CONTROL 1
13239 #define ESCAPE_META 2
13240 
13241 static int
13242 read_escape(struct parser_params *p, int flags, rb_encoding **encp)
13243 {
13244  int c;
13245  size_t numlen;
13246 
13247  switch (c = nextc(p)) {
13248  case '\\': /* Backslash */
13249  return c;
13250 
13251  case 'n': /* newline */
13252  return '\n';
13253 
13254  case 't': /* horizontal tab */
13255  return '\t';
13256 
13257  case 'r': /* carriage-return */
13258  return '\r';
13259 
13260  case 'f': /* form-feed */
13261  return '\f';
13262 
13263  case 'v': /* vertical tab */
13264  return '\13';
13265 
13266  case 'a': /* alarm(bell) */
13267  return '\007';
13268 
13269  case 'e': /* escape */
13270  return 033;
13271 
13272  case '0': case '1': case '2': case '3': /* octal constant */
13273  case '4': case '5': case '6': case '7':
13274  pushback(p, c);
13275  c = scan_oct(p->lex.pcur, 3, &numlen);
13276  p->lex.pcur += numlen;
13277  return c;
13278 
13279  case 'x': /* hex constant */
13280  c = tok_hex(p, &numlen);
13281  if (numlen == 0) return 0;
13282  return c;
13283 
13284  case 'b': /* backspace */
13285  return '\010';
13286 
13287  case 's': /* space */
13288  return ' ';
13289 
13290  case 'M':
13291  if (flags & ESCAPE_META) goto eof;
13292  if ((c = nextc(p)) != '-') {
13293  goto eof;
13294  }
13295  if ((c = nextc(p)) == '\\') {
13296  if (peek(p, 'u')) goto eof;
13297  return read_escape(p, flags|ESCAPE_META, encp) | 0x80;
13298  }
13299  else if (c == -1 || !ISASCII(c)) goto eof;
13300  else {
13301  int c2 = escaped_control_code(c);
13302  if (c2) {
13303  if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
13304  WARN_SPACE_CHAR(c2, "\\M-");
13305  }
13306  else {
13307  WARN_SPACE_CHAR(c2, "\\C-\\M-");
13308  }
13309  }
13310  else if (ISCNTRL(c)) goto eof;
13311  return ((c & 0xff) | 0x80);
13312  }
13313 
13314  case 'C':
13315  if ((c = nextc(p)) != '-') {
13316  goto eof;
13317  }
13318  case 'c':
13319  if (flags & ESCAPE_CONTROL) goto eof;
13320  if ((c = nextc(p))== '\\') {
13321  if (peek(p, 'u')) goto eof;
13322  c = read_escape(p, flags|ESCAPE_CONTROL, encp);
13323  }
13324  else if (c == '?')
13325  return 0177;
13326  else if (c == -1 || !ISASCII(c)) goto eof;
13327  else {
13328  int c2 = escaped_control_code(c);
13329  if (c2) {
13330  if (ISCNTRL(c)) {
13331  if (flags & ESCAPE_META) {
13332  WARN_SPACE_CHAR(c2, "\\M-");
13333  }
13334  else {
13335  WARN_SPACE_CHAR(c2, "");
13336  }
13337  }
13338  else {
13339  if (flags & ESCAPE_META) {
13340  WARN_SPACE_CHAR(c2, "\\M-\\C-");
13341  }
13342  else {
13343  WARN_SPACE_CHAR(c2, "\\C-");
13344  }
13345  }
13346  }
13347  else if (ISCNTRL(c)) goto eof;
13348  }
13349  return c & 0x9f;
13350 
13351  eof:
13352  case -1:
13353  yyerror0("Invalid escape character syntax");
13354  token_flush(p);
13355  return '\0';
13356 
13357  default:
13358  return c;
13359  }
13360 }
13361 
13362 static void
13363 tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
13364 {
13365  int len = rb_enc_codelen(c, enc);
13366  rb_enc_mbcput(c, tokspace(p, len), enc);
13367 }
13368 
13369 static int
13370 tokadd_escape(struct parser_params *p, rb_encoding **encp)
13371 {
13372  int c;
13373  int flags = 0;
13374  size_t numlen;
13375 
13376  first:
13377  switch (c = nextc(p)) {
13378  case '\n':
13379  return 0; /* just ignore */
13380 
13381  case '0': case '1': case '2': case '3': /* octal constant */
13382  case '4': case '5': case '6': case '7':
13383  {
13384  ruby_scan_oct(--p->lex.pcur, 3, &numlen);
13385  if (numlen == 0) goto eof;
13386  p->lex.pcur += numlen;
13387  tokcopy(p, (int)numlen + 1);
13388  }
13389  return 0;
13390 
13391  case 'x': /* hex constant */
13392  {
13393  tok_hex(p, &numlen);
13394  if (numlen == 0) return -1;
13395  tokcopy(p, (int)numlen + 2);
13396  }
13397  return 0;
13398 
13399  case 'M':
13400  if (flags & ESCAPE_META) goto eof;
13401  if ((c = nextc(p)) != '-') {
13402  pushback(p, c);
13403  goto eof;
13404  }
13405  tokcopy(p, 3);
13406  flags |= ESCAPE_META;
13407  goto escaped;
13408 
13409  case 'C':
13410  if (flags & ESCAPE_CONTROL) goto eof;
13411  if ((c = nextc(p)) != '-') {
13412  pushback(p, c);
13413  goto eof;
13414  }
13415  tokcopy(p, 3);
13416  goto escaped;
13417 
13418  case 'c':
13419  if (flags & ESCAPE_CONTROL) goto eof;
13420  tokcopy(p, 2);
13421  flags |= ESCAPE_CONTROL;
13422  escaped:
13423  if ((c = nextc(p)) == '\\') {
13424  goto first;
13425  }
13426  else if (c == -1) goto eof;
13427  tokadd(p, c);
13428  return 0;
13429 
13430  eof:
13431  case -1:
13432  yyerror0("Invalid escape character syntax");
13433  token_flush(p);
13434  return -1;
13435 
13436  default:
13437  tokadd(p, '\\');
13438  tokadd(p, c);
13439  }
13440  return 0;
13441 }
13442 
13443 static int
13444 regx_options(struct parser_params *p)
13445 {
13446  int kcode = 0;
13447  int kopt = 0;
13448  int options = 0;
13449  int c, opt, kc;
13450 
13451  newtok(p);
13452  while (c = nextc(p), ISALPHA(c)) {
13453  if (c == 'o') {
13454  options |= RE_OPTION_ONCE;
13455  }
13456  else if (rb_char_to_option_kcode(c, &opt, &kc)) {
13457  if (kc >= 0) {
13458  if (kc != rb_ascii8bit_encindex()) kcode = c;
13459  kopt = opt;
13460  }
13461  else {
13462  options |= opt;
13463  }
13464  }
13465  else {
13466  tokadd(p, c);
13467  }
13468  }
13469  options |= kopt;
13470  pushback(p, c);
13471  if (toklen(p)) {
13472  YYLTYPE loc = RUBY_INIT_YYLLOC();
13473  tokfix(p);
13474  compile_error(p, "unknown regexp option%s - %*s",
13475  toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
13476  parser_show_error_line(p, &loc);
13477  }
13478  return options | RE_OPTION_ENCODING(kcode);
13479 }
13480 
13481 static int
13482 tokadd_mbchar(struct parser_params *p, int c)
13483 {
13484  int len = parser_precise_mbclen(p, p->lex.pcur-1);
13485  if (len < 0) return -1;
13486  tokadd(p, c);
13487  p->lex.pcur += --len;
13488  if (len > 0) tokcopy(p, len);
13489  return c;
13490 }
13491 
13492 static inline int
13493 simple_re_meta(int c)
13494 {
13495  switch (c) {
13496  case '$': case '*': case '+': case '.':
13497  case '?': case '^': case '|':
13498  case ')': case ']': case '}': case '>':
13499  return TRUE;
13500  default:
13501  return FALSE;
13502  }
13503 }
13504 
13505 static int
13506 parser_update_heredoc_indent(struct parser_params *p, int c)
13507 {
13508  if (p->heredoc_line_indent == -1) {
13509  if (c == '\n') p->heredoc_line_indent = 0;
13510  }
13511  else {
13512  if (c == ' ') {
13513  p->heredoc_line_indent++;
13514  return TRUE;
13515  }
13516  else if (c == '\t') {
13517  int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
13518  p->heredoc_line_indent = w * TAB_WIDTH;
13519  return TRUE;
13520  }
13521  else if (c != '\n') {
13522  if (p->heredoc_indent > p->heredoc_line_indent) {
13524  }
13525  p->heredoc_line_indent = -1;
13526  }
13527  }
13528  return FALSE;
13529 }
13530 
13531 static void
13532 parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
13533 {
13534  YYLTYPE loc = RUBY_INIT_YYLLOC();
13535  const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
13536  compile_error(p, "%s mixed within %s source", n1, n2);
13537  parser_show_error_line(p, &loc);
13538 }
13539 
13540 static void
13541 parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
13542 {
13543  const char *pos = p->lex.pcur;
13544  p->lex.pcur = beg;
13545  parser_mixed_error(p, enc1, enc2);
13546  p->lex.pcur = pos;
13547 }
13548 
13549 static int
13550 tokadd_string(struct parser_params *p,
13551  int func, int term, int paren, long *nest,
13552  rb_encoding **encp, rb_encoding **enc)
13553 {
13554  int c;
13555  bool erred = false;
13556 
13557 #define mixed_error(enc1, enc2) \
13558  (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
13559 #define mixed_escape(beg, enc1, enc2) \
13560  (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
13561 
13562  while ((c = nextc(p)) != -1) {
13563  if (p->heredoc_indent > 0) {
13564  parser_update_heredoc_indent(p, c);
13565  }
13566 
13567  if (paren && c == paren) {
13568  ++*nest;
13569  }
13570  else if (c == term) {
13571  if (!nest || !*nest) {
13572  pushback(p, c);
13573  break;
13574  }
13575  --*nest;
13576  }
13577  else if ((func & STR_FUNC_EXPAND) && c == '#' && p->lex.pcur < p->lex.pend) {
13578  int c2 = *p->lex.pcur;
13579  if (c2 == '$' || c2 == '@' || c2 == '{') {
13580  pushback(p, c);
13581  break;
13582  }
13583  }
13584  else if (c == '\\') {
13585  literal_flush(p, p->lex.pcur - 1);
13586  c = nextc(p);
13587  switch (c) {
13588  case '\n':
13589  if (func & STR_FUNC_QWORDS) break;
13590  if (func & STR_FUNC_EXPAND) {
13591  if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
13592  continue;
13593  if (c == term) {
13594  c = '\\';
13595  goto terminate;
13596  }
13597  }
13598  tokadd(p, '\\');
13599  break;
13600 
13601  case '\\':
13602  if (func & STR_FUNC_ESCAPE) tokadd(p, c);
13603  break;
13604 
13605  case 'u':
13606  if ((func & STR_FUNC_EXPAND) == 0) {
13607  tokadd(p, '\\');
13608  break;
13609  }
13610  tokadd_utf8(p, enc, term,
13611  func & STR_FUNC_SYMBOL,
13612  func & STR_FUNC_REGEXP);
13613  continue;
13614 
13615  default:
13616  if (c == -1) return -1;
13617  if (!ISASCII(c)) {
13618  if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
13619  goto non_ascii;
13620  }
13621  if (func & STR_FUNC_REGEXP) {
13622  if (c == term && !simple_re_meta(c)) {
13623  tokadd(p, c);
13624  continue;
13625  }
13626  pushback(p, c);
13627  if ((c = tokadd_escape(p, enc)) < 0)
13628  return -1;
13629  if (*enc && *enc != *encp) {
13630  mixed_escape(p->lex.ptok+2, *enc, *encp);
13631  }
13632  continue;
13633  }
13634  else if (func & STR_FUNC_EXPAND) {
13635  pushback(p, c);
13636  if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
13637  c = read_escape(p, 0, enc);
13638  }
13639  else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
13640  /* ignore backslashed spaces in %w */
13641  }
13642  else if (c != term && !(paren && c == paren)) {
13643  tokadd(p, '\\');
13644  pushback(p, c);
13645  continue;
13646  }
13647  }
13648  }
13649  else if (!parser_isascii(p)) {
13650  non_ascii:
13651  if (!*enc) {
13652  *enc = *encp;
13653  }
13654  else if (*enc != *encp) {
13655  mixed_error(*enc, *encp);
13656  continue;
13657  }
13658  if (tokadd_mbchar(p, c) == -1) return -1;
13659  continue;
13660  }
13661  else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
13662  pushback(p, c);
13663  break;
13664  }
13665  if (c & 0x80) {
13666  if (!*enc) {
13667  *enc = *encp;
13668  }
13669  else if (*enc != *encp) {
13670  mixed_error(*enc, *encp);
13671  continue;
13672  }
13673  }
13674  tokadd(p, c);
13675  }
13676  terminate:
13677  if (*enc) *encp = *enc;
13678  return c;
13679 }
13680 
13681 static inline rb_strterm_t *
13682 new_strterm(VALUE v1, VALUE v2, VALUE v3, VALUE v0)
13683 {
13684  return (rb_strterm_t*)rb_imemo_new(imemo_parser_strterm, v1, v2, v3, v0);
13685 }
13686 
13687 /* imemo_parser_strterm for literal */
13688 #define NEW_STRTERM(func, term, paren) \
13689  new_strterm((VALUE)(func), (VALUE)(paren), (VALUE)(term), 0)
13690 
13691 #ifdef RIPPER
13692 static void
13694 {
13695  VALUE content = yylval.val;
13696  if (!ripper_is_node_yylval(content))
13697  content = ripper_new_yylval(p, 0, 0, content);
13698  if (has_delayed_token(p)) {
13699  ptrdiff_t len = p->lex.pcur - p->lex.ptok;
13700  if (len > 0) {
13701  rb_enc_str_buf_cat(p->delayed.token, p->lex.ptok, len, enc);
13702  }
13704  p->lex.ptok = p->lex.pcur;
13705  RNODE(content)->nd_rval = yylval.val;
13706  }
13708  if (yylval.val != content)
13709  RNODE(content)->nd_rval = yylval.val;
13710  yylval.val = content;
13711 }
13712 #else
13713 #define flush_string_content(p, enc) ((void)(enc))
13714 #endif
13715 
13716 RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32];
13717 /* this can be shared with ripper, since it's independent from struct
13718  * parser_params. */
13719 #ifndef RIPPER
13720 #define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
13721 #define SPECIAL_PUNCT(idx) ( \
13722  BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
13723  BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
13724  BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
13725  BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
13726  BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
13727  BIT('0', idx))
13728 const unsigned int ruby_global_name_punct_bits[] = {
13729  SPECIAL_PUNCT(0),
13730  SPECIAL_PUNCT(1),
13731  SPECIAL_PUNCT(2),
13732 };
13733 #undef BIT
13734 #undef SPECIAL_PUNCT
13735 #endif
13736 
13737 static enum yytokentype
13738 parser_peek_variable_name(struct parser_params *p)
13739 {
13740  int c;
13741  const char *ptr = p->lex.pcur;
13742 
13743  if (ptr + 1 >= p->lex.pend) return 0;
13744  c = *ptr++;
13745  switch (c) {
13746  case '$':
13747  if ((c = *ptr) == '-') {
13748  if (++ptr >= p->lex.pend) return 0;
13749  c = *ptr;
13750  }
13751  else if (is_global_name_punct(c) || ISDIGIT(c)) {
13752  return tSTRING_DVAR;
13753  }
13754  break;
13755  case '@':
13756  if ((c = *ptr) == '@') {
13757  if (++ptr >= p->lex.pend) return 0;
13758  c = *ptr;
13759  }
13760  break;
13761  case '{':
13762  p->lex.pcur = ptr;
13763  p->command_start = TRUE;
13764  return tSTRING_DBEG;
13765  default:
13766  return 0;
13767  }
13768  if (!ISASCII(c) || c == '_' || ISALPHA(c))
13769  return tSTRING_DVAR;
13770  return 0;
13771 }
13772 
13773 #define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
13774 #define IS_END() IS_lex_state(EXPR_END_ANY)
13775 #define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
13776 #define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
13777 #define IS_LABEL_POSSIBLE() (\
13778  (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
13779  IS_ARG())
13780 #define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
13781 #define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
13782 
13783 static inline enum yytokentype
13784 parser_string_term(struct parser_params *p, int func)
13785 {
13786  p->lex.strterm = 0;
13787  if (func & STR_FUNC_REGEXP) {
13788  set_yylval_num(regx_options(p));
13790  SET_LEX_STATE(EXPR_END);
13791  return tREGEXP_END;
13792  }
13793  if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
13794  nextc(p);
13795  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
13796  return tLABEL_END;
13797  }
13798  SET_LEX_STATE(EXPR_END);
13799  return tSTRING_END;
13800 }
13801 
13802 static enum yytokentype
13803 parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
13804 {
13805  int func = (int)quote->u1.func;
13806  int term = (int)quote->u3.term;
13807  int paren = (int)quote->u2.paren;
13808  int c, space = 0;
13809  rb_encoding *enc = p->enc;
13810  rb_encoding *base_enc = 0;
13811  VALUE lit;
13812 
13813  if (func & STR_FUNC_TERM) {
13814  if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
13815  SET_LEX_STATE(EXPR_END);
13816  p->lex.strterm = 0;
13817  return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
13818  }
13819  c = nextc(p);
13820  if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
13821  do {c = nextc(p);} while (ISSPACE(c));
13822  space = 1;
13823  }
13824  if (func & STR_FUNC_LIST) {
13825  quote->u1.func &= ~STR_FUNC_LIST;
13826  space = 1;
13827  }
13828  if (c == term && !quote->u0.nest) {
13829  if (func & STR_FUNC_QWORDS) {
13830  quote->u1.func |= STR_FUNC_TERM;
13831  pushback(p, c); /* dispatch the term at tSTRING_END */
13832  add_delayed_token(p, p->lex.ptok, p->lex.pcur);
13833  return ' ';
13834  }
13835  return parser_string_term(p, func);
13836  }
13837  if (space) {
13838  pushback(p, c);
13839  add_delayed_token(p, p->lex.ptok, p->lex.pcur);
13840  return ' ';
13841  }
13842  newtok(p);
13843  if ((func & STR_FUNC_EXPAND) && c == '#') {
13844  int t = parser_peek_variable_name(p);
13845  if (t) return t;
13846  tokadd(p, '#');
13847  c = nextc(p);
13848  }
13849  pushback(p, c);
13850  if (tokadd_string(p, func, term, paren, &quote->u0.nest,
13851  &enc, &base_enc) == -1) {
13852  if (p->eofp) {
13853 #ifndef RIPPER
13854 # define unterminated_literal(mesg) yyerror0(mesg)
13855 #else
13856 # define unterminated_literal(mesg) compile_error(p, mesg)
13857 #endif
13858  literal_flush(p, p->lex.pcur);
13859  if (func & STR_FUNC_QWORDS) {
13860  /* no content to add, bailing out here */
13861  unterminated_literal("unterminated list meets end of file");
13862  p->lex.strterm = 0;
13863  return tSTRING_END;
13864  }
13865  if (func & STR_FUNC_REGEXP) {
13866  unterminated_literal("unterminated regexp meets end of file");
13867  }
13868  else {
13869  unterminated_literal("unterminated string meets end of file");
13870  }
13871  quote->u1.func |= STR_FUNC_TERM;
13872  }
13873  }
13874 
13875  tokfix(p);
13876  lit = STR_NEW3(tok(p), toklen(p), enc, func);
13877  set_yylval_str(lit);
13879 
13880  return tSTRING_CONTENT;
13881 }
13882 
13883 static enum yytokentype
13884 heredoc_identifier(struct parser_params *p)
13885 {
13886  /*
13887  * term_len is length of `<<"END"` except `END`,
13888  * in this case term_len is 4 (<, <, " and ").
13889  */
13890  long len, offset = p->lex.pcur - p->lex.pbeg;
13891  int c = nextc(p), term, func = 0, quote = 0;
13892  enum yytokentype token = tSTRING_BEG;
13893  int indent = 0;
13894 
13895  if (c == '-') {
13896  c = nextc(p);
13897  func = STR_FUNC_INDENT;
13898  offset++;
13899  }
13900  else if (c == '~') {
13901  c = nextc(p);
13902  func = STR_FUNC_INDENT;
13903  offset++;
13904  indent = INT_MAX;
13905  }
13906  switch (c) {
13907  case '\'':
13908  func |= str_squote; goto quoted;
13909  case '"':
13910  func |= str_dquote; goto quoted;
13911  case '`':
13912  token = tXSTRING_BEG;
13913  func |= str_xquote; goto quoted;
13914 
13915  quoted:
13916  quote++;
13917  offset++;
13918  term = c;
13919  len = 0;
13920  while ((c = nextc(p)) != term) {
13921  if (c == -1 || c == '\r' || c == '\n') {
13922  yyerror(NULL, p, "unterminated here document identifier");
13923  return -1;
13924  }
13925  }
13926  break;
13927 
13928  default:
13929  if (!parser_is_identchar(p)) {
13930  pushback(p, c);
13931  if (func & STR_FUNC_INDENT) {
13932  pushback(p, indent > 0 ? '~' : '-');
13933  }
13934  return 0;
13935  }
13936  func |= str_dquote;
13937  do {
13938  int n = parser_precise_mbclen(p, p->lex.pcur-1);
13939  if (n < 0) return 0;
13940  p->lex.pcur += --n;
13941  } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
13942  pushback(p, c);
13943  break;
13944  }
13945 
13946  len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
13947  if ((unsigned long)len >= HERETERM_LENGTH_MAX)
13948  yyerror(NULL, p, "too long here document identifier");
13950  lex_goto_eol(p);
13951 
13952  p->lex.strterm = new_strterm(0, 0, 0, p->lex.lastline);
13954  rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
13955  here->offset = offset;
13956  here->sourceline = p->ruby_sourceline;
13957  here->length = (int)len;
13958  here->quote = quote;
13959  here->func = func;
13960 
13961  token_flush(p);
13962  p->heredoc_indent = indent;
13963  p->heredoc_line_indent = 0;
13964  return token;
13965 }
13966 
13967 static void
13968 heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
13969 {
13970  VALUE line;
13971 
13972  p->lex.strterm = 0;
13973  line = here->lastline;
13974  p->lex.lastline = line;
13975  p->lex.pbeg = RSTRING_PTR(line);
13976  p->lex.pend = p->lex.pbeg + RSTRING_LEN(line);
13977  p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
13978  p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
13979  p->heredoc_end = p->ruby_sourceline;
13980  p->ruby_sourceline = (int)here->sourceline;
13981  if (p->eofp) p->lex.nextline = Qnil;
13982  p->eofp = 0;
13983 }
13984 
13985 static int
13986 dedent_string(VALUE string, int width)
13987 {
13988  char *str;
13989  long len;
13990  int i, col = 0;
13991 
13992  RSTRING_GETMEM(string, str, len);
13993  for (i = 0; i < len && col < width; i++) {
13994  if (str[i] == ' ') {
13995  col++;
13996  }
13997  else if (str[i] == '\t') {
13998  int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
13999  if (n > width) break;
14000  col = n;
14001  }
14002  else {
14003  break;
14004  }
14005  }
14006  if (!i) return 0;
14007  rb_str_modify(string);
14008  str = RSTRING_PTR(string);
14009  if (RSTRING_LEN(string) != len)
14010  rb_fatal("literal string changed: %+"PRIsVALUE, string);
14011  MEMMOVE(str, str + i, char, len - i);
14012  rb_str_set_len(string, len - i);
14013  return i;
14014 }
14015 
14016 #ifndef RIPPER
14017 static NODE *
14018 heredoc_dedent(struct parser_params *p, NODE *root)
14019 {
14020  NODE *node, *str_node, *prev_node;
14021  int indent = p->heredoc_indent;
14022  VALUE prev_lit = 0;
14023 
14024  if (indent <= 0) return root;
14025  p->heredoc_indent = 0;
14026  if (!root) return root;
14027 
14028  prev_node = node = str_node = root;
14029  if (nd_type(root) == NODE_LIST) str_node = root->nd_head;
14030 
14031  while (str_node) {
14032  VALUE lit = str_node->nd_lit;
14033  if (str_node->flags & NODE_FL_NEWLINE) {
14034  dedent_string(lit, indent);
14035  }
14036  if (!prev_lit) {
14037  prev_lit = lit;
14038  }
14039  else if (!literal_concat0(p, prev_lit, lit)) {
14040  return 0;
14041  }
14042  else {
14043  NODE *end = node->nd_end;
14044  node = prev_node->nd_next = node->nd_next;
14045  if (!node) {
14046  if (nd_type(prev_node) == NODE_DSTR)
14047  nd_set_type(prev_node, NODE_STR);
14048  break;
14049  }
14050  node->nd_end = end;
14051  goto next_str;
14052  }
14053 
14054  str_node = 0;
14055  while ((node = (prev_node = node)->nd_next) != 0) {
14056  next_str:
14057  if (nd_type(node) != NODE_LIST) break;
14058  if ((str_node = node->nd_head) != 0) {
14059  enum node_type type = nd_type(str_node);
14060  if (type == NODE_STR || type == NODE_DSTR) break;
14061  prev_lit = 0;
14062  str_node = 0;
14063  }
14064  }
14065  }
14066  return root;
14067 }
14068 #else /* RIPPER */
14069 static VALUE
14070 heredoc_dedent(struct parser_params *p, VALUE array)
14071 {
14072  int indent = p->heredoc_indent;
14073 
14074  if (indent <= 0) return array;
14075  p->heredoc_indent = 0;
14076  dispatch2(heredoc_dedent, array, INT2NUM(indent));
14077  return array;
14078 }
14079 
14080 /*
14081  * call-seq:
14082  * Ripper.dedent_string(input, width) -> Integer
14083  *
14084  * USE OF RIPPER LIBRARY ONLY.
14085  *
14086  * Strips up to +width+ leading whitespaces from +input+,
14087  * and returns the stripped column width.
14088  */
14089 static VALUE
14090 parser_dedent_string(VALUE self, VALUE input, VALUE width)
14091 {
14092  int wid, col;
14093 
14094  StringValue(input);
14095  wid = NUM2UINT(width);
14096  col = dedent_string(input, wid);
14097  return INT2NUM(col);
14098 }
14099 #endif
14100 
14101 static int
14102 whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
14103 {
14104  const char *ptr = p->lex.pbeg;
14105  long n;
14106 
14107  if (indent) {
14108  while (*ptr && ISSPACE(*ptr)) ptr++;
14109  }
14110  n = p->lex.pend - (ptr + len);
14111  if (n < 0) return FALSE;
14112  if (n > 0 && ptr[len] != '\n') {
14113  if (ptr[len] != '\r') return FALSE;
14114  if (n <= 1 || ptr[len+1] != '\n') return FALSE;
14115  }
14116  return strncmp(eos, ptr, len) == 0;
14117 }
14118 
14119 static int
14120 word_match_p(struct parser_params *p, const char *word, long len)
14121 {
14122  if (strncmp(p->lex.pcur, word, len)) return 0;
14123  if (p->lex.pcur + len == p->lex.pend) return 1;
14124  int c = (unsigned char)p->lex.pcur[len];
14125  if (ISSPACE(c)) return 1;
14126  switch (c) {
14127  case '\0': case '\004': case '\032': return 1;
14128  }
14129  return 0;
14130 }
14131 
14132 #define NUM_SUFFIX_R (1<<0)
14133 #define NUM_SUFFIX_I (1<<1)
14134 #define NUM_SUFFIX_ALL 3
14135 
14136 static int
14137 number_literal_suffix(struct parser_params *p, int mask)
14138 {
14139  int c, result = 0;
14140  const char *lastp = p->lex.pcur;
14141 
14142  while ((c = nextc(p)) != -1) {
14143  if ((mask & NUM_SUFFIX_I) && c == 'i') {
14144  result |= (mask & NUM_SUFFIX_I);
14145  mask &= ~NUM_SUFFIX_I;
14146  /* r after i, rational of complex is disallowed */
14147  mask &= ~NUM_SUFFIX_R;
14148  continue;
14149  }
14150  if ((mask & NUM_SUFFIX_R) && c == 'r') {
14151  result |= (mask & NUM_SUFFIX_R);
14152  mask &= ~NUM_SUFFIX_R;
14153  continue;
14154  }
14155  if (!ISASCII(c) || ISALPHA(c) || c == '_') {
14156  p->lex.pcur = lastp;
14157  literal_flush(p, p->lex.pcur);
14158  return 0;
14159  }
14160  pushback(p, c);
14161  break;
14162  }
14163  return result;
14164 }
14165 
14166 static enum yytokentype
14167 set_number_literal(struct parser_params *p, VALUE v,
14168  enum yytokentype type, int suffix)
14169 {
14170  if (suffix & NUM_SUFFIX_I) {
14171  v = rb_complex_raw(INT2FIX(0), v);
14172  type = tIMAGINARY;
14173  }
14175  SET_LEX_STATE(EXPR_END);
14176  return type;
14177 }
14178 
14179 static enum yytokentype
14180 set_integer_literal(struct parser_params *p, VALUE v, int suffix)
14181 {
14182  enum yytokentype type = tINTEGER;
14183  if (suffix & NUM_SUFFIX_R) {
14184  v = rb_rational_raw1(v);
14185  type = tRATIONAL;
14186  }
14187  return set_number_literal(p, v, type, suffix);
14188 }
14189 
14190 #ifdef RIPPER
14191 static void
14193 {
14194  VALUE str;
14195  if (has_delayed_token(p))
14197  str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
14198  ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
14199  lex_goto_eol(p);
14200  token_flush(p);
14201 }
14202 
14203 #else
14204 #define dispatch_heredoc_end(p) ((void)0)
14205 #endif
14206 
14207 static enum yytokentype
14208 here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
14209 {
14210  int c, func, indent = 0;
14211  const char *eos, *ptr, *ptr_end;
14212  long len;
14213  VALUE str = 0;
14214  rb_encoding *enc = p->enc;
14215  rb_encoding *base_enc = 0;
14216  int bol;
14217 
14218  eos = RSTRING_PTR(here->lastline) + here->offset;
14219  len = here->length;
14220  indent = (func = here->func) & STR_FUNC_INDENT;
14221 
14222  if ((c = nextc(p)) == -1) {
14223  error:
14224 #ifdef RIPPER
14225  if (!has_delayed_token(p)) {
14227  }
14228  else {
14229  if ((len = p->lex.pcur - p->lex.ptok) > 0) {
14230  if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
14231  int cr = ENC_CODERANGE_UNKNOWN;
14233  if (cr != ENC_CODERANGE_7BIT &&
14234  p->enc == rb_usascii_encoding() &&
14235  enc != rb_utf8_encoding()) {
14237  }
14238  }
14239  rb_enc_str_buf_cat(p->delayed.token, p->lex.ptok, len, enc);
14240  }
14242  }
14243  lex_goto_eol(p);
14244 #endif
14245  heredoc_restore(p, &p->lex.strterm->u.heredoc);
14246  compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
14247  (int)len, eos);
14248  token_flush(p);
14249  p->lex.strterm = 0;
14250  SET_LEX_STATE(EXPR_END);
14251  return tSTRING_END;
14252  }
14253  bol = was_bol(p);
14254  if (!bol) {
14255  /* not beginning of line, cannot be the terminator */
14256  }
14257  else if (p->heredoc_line_indent == -1) {
14258  /* `heredoc_line_indent == -1` means
14259  * - "after an interpolation in the same line", or
14260  * - "in a continuing line"
14261  */
14262  p->heredoc_line_indent = 0;
14263  }
14264  else if (whole_match_p(p, eos, len, indent)) {
14266  restore:
14267  heredoc_restore(p, &p->lex.strterm->u.heredoc);
14268  token_flush(p);
14269  p->lex.strterm = 0;
14270  SET_LEX_STATE(EXPR_END);
14271  return tSTRING_END;
14272  }
14273 
14274  if (!(func & STR_FUNC_EXPAND)) {
14275  do {
14276  ptr = RSTRING_PTR(p->lex.lastline);
14277  ptr_end = p->lex.pend;
14278  if (ptr_end > ptr) {
14279  switch (ptr_end[-1]) {
14280  case '\n':
14281  if (--ptr_end == ptr || ptr_end[-1] != '\r') {
14282  ptr_end++;
14283  break;
14284  }
14285  case '\r':
14286  --ptr_end;
14287  }
14288  }
14289 
14290  if (p->heredoc_indent > 0) {
14291  long i = 0;
14292  while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
14293  i++;
14294  p->heredoc_line_indent = 0;
14295  }
14296 
14297  if (str)
14298  rb_str_cat(str, ptr, ptr_end - ptr);
14299  else
14300  str = STR_NEW(ptr, ptr_end - ptr);
14301  if (ptr_end < p->lex.pend) rb_str_cat(str, "\n", 1);
14302  lex_goto_eol(p);
14303  if (p->heredoc_indent > 0) {
14304  goto flush_str;
14305  }
14306  if (nextc(p) == -1) {
14307  if (str) {
14308  str = 0;
14309  }
14310  goto error;
14311  }
14312  } while (!whole_match_p(p, eos, len, indent));
14313  }
14314  else {
14315  /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
14316  newtok(p);
14317  if (c == '#') {
14318  int t = parser_peek_variable_name(p);
14319  if (p->heredoc_line_indent != -1) {
14320  if (p->heredoc_indent > p->heredoc_line_indent) {
14322  }
14323  p->heredoc_line_indent = -1;
14324  }
14325  if (t) return t;
14326  tokadd(p, '#');
14327  c = nextc(p);
14328  }
14329  do {
14330  pushback(p, c);
14331  enc = p->enc;
14332  if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
14333  if (p->eofp) goto error;
14334  goto restore;
14335  }
14336  if (c != '\n') {
14337  if (c == '\\') p->heredoc_line_indent = -1;
14338  flush:
14339  str = STR_NEW3(tok(p), toklen(p), enc, func);
14340  flush_str:
14342 #ifndef RIPPER
14343  if (bol) yylval.node->flags |= NODE_FL_NEWLINE;
14344 #endif
14346  return tSTRING_CONTENT;
14347  }
14348  tokadd(p, nextc(p));
14349  if (p->heredoc_indent > 0) {
14350  lex_goto_eol(p);
14351  goto flush;
14352  }
14353  /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
14354  if ((c = nextc(p)) == -1) goto error;
14355  } while (!whole_match_p(p, eos, len, indent));
14356  str = STR_NEW3(tok(p), toklen(p), enc, func);
14357  }
14359 #ifdef RIPPER
14360  str = ripper_new_yylval(p, ripper_token2eventid(tSTRING_CONTENT),
14361  yylval.val, str);
14362 #endif
14363  heredoc_restore(p, &p->lex.strterm->u.heredoc);
14364  token_flush(p);
14365  p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
14367 #ifndef RIPPER
14368  if (bol) yylval.node->flags |= NODE_FL_NEWLINE;
14369 #endif
14370  return tSTRING_CONTENT;
14371 }
14372 
14373 #include "lex.c"
14374 
14375 static int
14376 arg_ambiguous(struct parser_params *p, char c)
14377 {
14378 #ifndef RIPPER
14379  rb_warning1("ambiguous first argument; put parentheses or a space even after `%c' operator", WARN_I(c));
14380 #else
14381  dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
14382 #endif
14383  return TRUE;
14384 }
14385 
14386 static ID
14387 formal_argument(struct parser_params *p, ID lhs)
14388 {
14389  switch (id_type(lhs)) {
14390  case ID_LOCAL:
14391  break;
14392 #ifndef RIPPER
14393  case ID_CONST:
14394  yyerror0("formal argument cannot be a constant");
14395  return 0;
14396  case ID_INSTANCE:
14397  yyerror0("formal argument cannot be an instance variable");
14398  return 0;
14399  case ID_GLOBAL:
14400  yyerror0("formal argument cannot be a global variable");
14401  return 0;
14402  case ID_CLASS:
14403  yyerror0("formal argument cannot be a class variable");
14404  return 0;
14405  default:
14406  yyerror0("formal argument must be local variable");
14407  return 0;
14408 #else
14409  default:
14410  lhs = dispatch1(param_error, lhs);
14411  ripper_error(p);
14412  return 0;
14413 #endif
14414  }
14415  shadowing_lvar(p, lhs);
14416  return lhs;
14417 }
14418 
14419 static int
14420 lvar_defined(struct parser_params *p, ID id)
14421 {
14422  return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
14423 }
14424 
14425 /* emacsen -*- hack */
14426 static long
14427 parser_encode_length(struct parser_params *p, const char *name, long len)
14428 {
14429  long nlen;
14430 
14431  if (len > 5 && name[nlen = len - 5] == '-') {
14432  if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
14433  return nlen;
14434  }
14435  if (len > 4 && name[nlen = len - 4] == '-') {
14436  if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
14437  return nlen;
14438  if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
14439  !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
14440  /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
14441  return nlen;
14442  }
14443  return len;
14444 }
14445 
14446 static void
14447 parser_set_encode(struct parser_params *p, const char *name)
14448 {
14449  int idx = rb_enc_find_index(name);
14450  rb_encoding *enc;
14451  VALUE excargs[3];
14452 
14453  if (idx < 0) {
14454  excargs[1] = rb_sprintf("unknown encoding name: %s", name);
14455  error:
14456  excargs[0] = rb_eArgError;
14457  excargs[2] = rb_make_backtrace();
14459  rb_exc_raise(rb_make_exception(3, excargs));
14460  }
14461  enc = rb_enc_from_index(idx);
14462  if (!rb_enc_asciicompat(enc)) {
14463  excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
14464  goto error;
14465  }
14466  p->enc = enc;
14467 #ifndef RIPPER
14468  if (p->debug_lines) {
14469  VALUE lines = p->debug_lines;
14470  long i, n = RARRAY_LEN(lines);
14471  for (i = 0; i < n; ++i) {
14472  rb_enc_associate_index(RARRAY_AREF(lines, i), idx);
14473  }
14474  }
14475 #endif
14476 }
14477 
14478 static int
14479 comment_at_top(struct parser_params *p)
14480 {
14481  const char *ptr = p->lex.pbeg, *ptr_end = p->lex.pcur - 1;
14482  if (p->line_count != (p->has_shebang ? 2 : 1)) return 0;
14483  while (ptr < ptr_end) {
14484  if (!ISSPACE(*ptr)) return 0;
14485  ptr++;
14486  }
14487  return 1;
14488 }
14489 
14490 typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
14491 typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
14492 
14493 static void
14494 magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
14495 {
14496  if (!comment_at_top(p)) {
14497  return;
14498  }
14499  parser_set_encode(p, val);
14500 }
14501 
14502 static int
14503 parser_get_bool(struct parser_params *p, const char *name, const char *val)
14504 {
14505  switch (*val) {
14506  case 't': case 'T':
14507  if (strcasecmp(val, "true") == 0) {
14508  return TRUE;
14509  }
14510  break;
14511  case 'f': case 'F':
14512  if (strcasecmp(val, "false") == 0) {
14513  return FALSE;
14514  }
14515  break;
14516  }
14517  rb_compile_warning(p->ruby_sourcefile, p->ruby_sourceline, "invalid value for %s: %s", name, val);
14518  return -1;
14519 }
14520 
14521 static void
14522 parser_set_token_info(struct parser_params *p, const char *name, const char *val)
14523 {
14524  int b = parser_get_bool(p, name, val);
14525  if (b >= 0) p->token_info_enabled = b;
14526 }
14527 
14528 static void
14529 parser_set_compile_option_flag(struct parser_params *p, const char *name, const char *val)
14530 {
14531  int b;
14532 
14533  if (p->token_seen) {
14534  rb_warning1("`%s' is ignored after any tokens", WARN_S(name));
14535  return;
14536  }
14537 
14538  b = parser_get_bool(p, name, val);
14539  if (b < 0) return;
14540 
14541  if (!p->compile_option)
14544  (b ? Qtrue : Qfalse));
14545 }
14546 
14547 # if WARN_PAST_SCOPE
14548 static void
14549 parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
14550 {
14551  int b = parser_get_bool(p, name, val);
14552  if (b >= 0) p->past_scope_enabled = b;
14553 }
14554 # endif
14555 
14556 struct magic_comment {
14557  const char *name;
14560 };
14561 
14562 static const struct magic_comment magic_comments[] = {
14563  {"coding", magic_comment_encoding, parser_encode_length},
14564  {"encoding", magic_comment_encoding, parser_encode_length},
14565  {"frozen_string_literal", parser_set_compile_option_flag},
14566  {"warn_indent", parser_set_token_info},
14567 # if WARN_PAST_SCOPE
14568  {"warn_past_scope", parser_set_past_scope},
14569 # endif
14570 };
14571 
14572 static const char *
14573 magic_comment_marker(const char *str, long len)
14574 {
14575  long i = 2;
14576 
14577  while (i < len) {
14578  switch (str[i]) {
14579  case '-':
14580  if (str[i-1] == '*' && str[i-2] == '-') {
14581  return str + i + 1;
14582  }
14583  i += 2;
14584  break;
14585  case '*':
14586  if (i + 1 >= len) return 0;
14587  if (str[i+1] != '-') {
14588  i += 4;
14589  }
14590  else if (str[i-1] != '-') {
14591  i += 2;
14592  }
14593  else {
14594  return str + i + 2;
14595  }
14596  break;
14597  default:
14598  i += 3;
14599  break;
14600  }
14601  }
14602  return 0;
14603 }
14604 
14605 static int
14606 parser_magic_comment(struct parser_params *p, const char *str, long len)
14607 {
14608  int indicator = 0;
14609  VALUE name = 0, val = 0;
14610  const char *beg, *end, *vbeg, *vend;
14611 #define str_copy(_s, _p, _n) ((_s) \
14612  ? (void)(rb_str_resize((_s), (_n)), \
14613  MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
14614  : (void)((_s) = STR_NEW((_p), (_n))))
14615 
14616  if (len <= 7) return FALSE;
14617  if (!!(beg = magic_comment_marker(str, len))) {
14618  if (!(end = magic_comment_marker(beg, str + len - beg)))
14619  return FALSE;
14620  indicator = TRUE;
14621  str = beg;
14622  len = end - beg - 3;
14623  }
14624 
14625  /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
14626  while (len > 0) {
14627  const struct magic_comment *mc = magic_comments;
14628  char *s;
14629  int i;
14630  long n = 0;
14631 
14632  for (; len > 0 && *str; str++, --len) {
14633  switch (*str) {
14634  case '\'': case '"': case ':': case ';':
14635  continue;
14636  }
14637  if (!ISSPACE(*str)) break;
14638  }
14639  for (beg = str; len > 0; str++, --len) {
14640  switch (*str) {
14641  case '\'': case '"': case ':': case ';':
14642  break;
14643  default:
14644  if (ISSPACE(*str)) break;
14645  continue;
14646  }
14647  break;
14648  }
14649  for (end = str; len > 0 && ISSPACE(*str); str++, --len);
14650  if (!len) break;
14651  if (*str != ':') {
14652  if (!indicator) return FALSE;
14653  continue;
14654  }
14655 
14656  do str++; while (--len > 0 && ISSPACE(*str));
14657  if (!len) break;
14658  if (*str == '"') {
14659  for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
14660  if (*str == '\\') {
14661  --len;
14662  ++str;
14663  }
14664  }
14665  vend = str;
14666  if (len) {
14667  --len;
14668  ++str;
14669  }
14670  }
14671  else {
14672  for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
14673  vend = str;
14674  }
14675  if (indicator) {
14676  while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
14677  }
14678  else {
14679  while (len > 0 && (ISSPACE(*str))) --len, str++;
14680  if (len) return FALSE;
14681  }
14682 
14683  n = end - beg;
14684  str_copy(name, beg, n);
14685  s = RSTRING_PTR(name);
14686  for (i = 0; i < n; ++i) {
14687  if (s[i] == '-') s[i] = '_';
14688  }
14689  do {
14690  if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
14691  n = vend - vbeg;
14692  if (mc->length) {
14693  n = (*mc->length)(p, vbeg, n);
14694  }
14695  str_copy(val, vbeg, n);
14696  (*mc->func)(p, mc->name, RSTRING_PTR(val));
14697  break;
14698  }
14699  } while (++mc < magic_comments + numberof(magic_comments));
14700 #ifdef RIPPER
14701  str_copy(val, vbeg, vend - vbeg);
14702  dispatch2(magic_comment, name, val);
14703 #endif
14704  }
14705 
14706  return TRUE;
14707 }
14708 
14709 static void
14710 set_file_encoding(struct parser_params *p, const char *str, const char *send)
14711 {
14712  int sep = 0;
14713  const char *beg = str;
14714  VALUE s;
14715 
14716  for (;;) {
14717  if (send - str <= 6) return;
14718  switch (str[6]) {
14719  case 'C': case 'c': str += 6; continue;
14720  case 'O': case 'o': str += 5; continue;
14721  case 'D': case 'd': str += 4; continue;
14722  case 'I': case 'i': str += 3; continue;
14723  case 'N': case 'n': str += 2; continue;
14724  case 'G': case 'g': str += 1; continue;
14725  case '=': case ':':
14726  sep = 1;
14727  str += 6;
14728  break;
14729  default:
14730  str += 6;
14731  if (ISSPACE(*str)) break;
14732  continue;
14733  }
14734  if (STRNCASECMP(str-6, "coding", 6) == 0) break;
14735  }
14736  for (;;) {
14737  do {
14738  if (++str >= send) return;
14739  } while (ISSPACE(*str));
14740  if (sep) break;
14741  if (*str != '=' && *str != ':') return;
14742  sep = 1;
14743  str++;
14744  }
14745  beg = str;
14746  while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
14747  s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
14748  parser_set_encode(p, RSTRING_PTR(s));
14749  rb_str_resize(s, 0);
14750 }
14751 
14752 static void
14753 parser_prepare(struct parser_params *p)
14754 {
14755  int c = nextc(p);
14757  switch (c) {
14758  case '#':
14759  if (peek(p, '!')) p->has_shebang = 1;
14760  break;
14761  case 0xef: /* UTF-8 BOM marker */
14762  if (p->lex.pend - p->lex.pcur >= 2 &&
14763  (unsigned char)p->lex.pcur[0] == 0xbb &&
14764  (unsigned char)p->lex.pcur[1] == 0xbf) {
14765  p->enc = rb_utf8_encoding();
14766  p->lex.pcur += 2;
14767  p->lex.pbeg = p->lex.pcur;
14768  return;
14769  }
14770  break;
14771  case EOF:
14772  return;
14773  }
14774  pushback(p, c);
14775  p->enc = rb_enc_get(p->lex.lastline);
14776 }
14777 
14778 #ifndef RIPPER
14779 #define ambiguous_operator(tok, op, syn) ( \
14780  rb_warning0("`"op"' after local variable or literal is interpreted as binary operator"), \
14781  rb_warning0("even though it seems like "syn""))
14782 #else
14783 #define ambiguous_operator(tok, op, syn) \
14784  dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
14785 #endif
14786 #define warn_balanced(tok, op, syn) ((void) \
14787  (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
14788  space_seen && !ISSPACE(c) && \
14789  (ambiguous_operator(tok, op, syn), 0)), \
14790  (enum yytokentype)(tok))
14791 
14792 static VALUE
14793 parse_rational(struct parser_params *p, char *str, int len, int seen_point)
14794 {
14795  VALUE v;
14796  char *point = &str[seen_point];
14797  size_t fraclen = len-seen_point-1;
14798  memmove(point, point+1, fraclen+1);
14799  v = rb_cstr_to_inum(str, 10, FALSE);
14800  return rb_rational_new(v, rb_int_positive_pow(10, fraclen));
14801 }
14802 
14803 static enum yytokentype
14804 no_digits(struct parser_params *p)
14805 {
14806  yyerror0("numeric literal without digits");
14807  if (peek(p, '_')) nextc(p);
14808  /* dummy 0, for tUMINUS_NUM at numeric */
14809  return set_integer_literal(p, INT2FIX(0), 0);
14810 }
14811 
14812 static enum yytokentype
14813 parse_numeric(struct parser_params *p, int c)
14814 {
14815  int is_float, seen_point, seen_e, nondigit;
14816  int suffix;
14817 
14818  is_float = seen_point = seen_e = nondigit = 0;
14819  SET_LEX_STATE(EXPR_END);
14820  newtok(p);
14821  if (c == '-' || c == '+') {
14822  tokadd(p, c);
14823  c = nextc(p);
14824  }
14825  if (c == '0') {
14826  int start = toklen(p);
14827  c = nextc(p);
14828  if (c == 'x' || c == 'X') {
14829  /* hexadecimal */
14830  c = nextc(p);
14831  if (c != -1 && ISXDIGIT(c)) {
14832  do {
14833  if (c == '_') {
14834  if (nondigit) break;
14835  nondigit = c;
14836  continue;
14837  }
14838  if (!ISXDIGIT(c)) break;
14839  nondigit = 0;
14840  tokadd(p, c);
14841  } while ((c = nextc(p)) != -1);
14842  }
14843  pushback(p, c);
14844  tokfix(p);
14845  if (toklen(p) == start) {
14846  return no_digits(p);
14847  }
14848  else if (nondigit) goto trailing_uc;
14849  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
14850  return set_integer_literal(p, rb_cstr_to_inum(tok(p), 16, FALSE), suffix);
14851  }
14852  if (c == 'b' || c == 'B') {
14853  /* binary */
14854  c = nextc(p);
14855  if (c == '0' || c == '1') {
14856  do {
14857  if (c == '_') {
14858  if (nondigit) break;
14859  nondigit = c;
14860  continue;
14861  }
14862  if (c != '0' && c != '1') break;
14863  nondigit = 0;
14864  tokadd(p, c);
14865  } while ((c = nextc(p)) != -1);
14866  }
14867  pushback(p, c);
14868  tokfix(p);
14869  if (toklen(p) == start) {
14870  return no_digits(p);
14871  }
14872  else if (nondigit) goto trailing_uc;
14873  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
14874  return set_integer_literal(p, rb_cstr_to_inum(tok(p), 2, FALSE), suffix);
14875  }
14876  if (c == 'd' || c == 'D') {
14877  /* decimal */
14878  c = nextc(p);
14879  if (c != -1 && ISDIGIT(c)) {
14880  do {
14881  if (c == '_') {
14882  if (nondigit) break;
14883  nondigit = c;
14884  continue;
14885  }
14886  if (!ISDIGIT(c)) break;
14887  nondigit = 0;
14888  tokadd(p, c);
14889  } while ((c = nextc(p)) != -1);
14890  }
14891  pushback(p, c);
14892  tokfix(p);
14893  if (toklen(p) == start) {
14894  return no_digits(p);
14895  }
14896  else if (nondigit) goto trailing_uc;
14897  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
14898  return set_integer_literal(p, rb_cstr_to_inum(tok(p), 10, FALSE), suffix);
14899  }
14900  if (c == '_') {
14901  /* 0_0 */
14902  goto octal_number;
14903  }
14904  if (c == 'o' || c == 'O') {
14905  /* prefixed octal */
14906  c = nextc(p);
14907  if (c == -1 || c == '_' || !ISDIGIT(c)) {
14908  return no_digits(p);
14909  }
14910  }
14911  if (c >= '0' && c <= '7') {
14912  /* octal */
14913  octal_number:
14914  do {
14915  if (c == '_') {
14916  if (nondigit) break;
14917  nondigit = c;
14918  continue;
14919  }
14920  if (c < '0' || c > '9') break;
14921  if (c > '7') goto invalid_octal;
14922  nondigit = 0;
14923  tokadd(p, c);
14924  } while ((c = nextc(p)) != -1);
14925  if (toklen(p) > start) {
14926  pushback(p, c);
14927  tokfix(p);
14928  if (nondigit) goto trailing_uc;
14929  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
14930  return set_integer_literal(p, rb_cstr_to_inum(tok(p), 8, FALSE), suffix);
14931  }
14932  if (nondigit) {
14933  pushback(p, c);
14934  goto trailing_uc;
14935  }
14936  }
14937  if (c > '7' && c <= '9') {
14938  invalid_octal:
14939  yyerror0("Invalid octal digit");
14940  }
14941  else if (c == '.' || c == 'e' || c == 'E') {
14942  tokadd(p, '0');
14943  }
14944  else {
14945  pushback(p, c);
14946  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
14947  return set_integer_literal(p, INT2FIX(0), suffix);
14948  }
14949  }
14950 
14951  for (;;) {
14952  switch (c) {
14953  case '0': case '1': case '2': case '3': case '4':
14954  case '5': case '6': case '7': case '8': case '9':
14955  nondigit = 0;
14956  tokadd(p, c);
14957  break;
14958 
14959  case '.':
14960  if (nondigit) goto trailing_uc;
14961  if (seen_point || seen_e) {
14962  goto decode_num;
14963  }
14964  else {
14965  int c0 = nextc(p);
14966  if (c0 == -1 || !ISDIGIT(c0)) {
14967  pushback(p, c0);
14968  goto decode_num;
14969  }
14970  c = c0;
14971  }
14972  seen_point = toklen(p);
14973  tokadd(p, '.');
14974  tokadd(p, c);
14975  is_float++;
14976  nondigit = 0;
14977  break;
14978 
14979  case 'e':
14980  case 'E':
14981  if (nondigit) {
14982  pushback(p, c);
14983  c = nondigit;
14984  goto decode_num;
14985  }
14986  if (seen_e) {
14987  goto decode_num;
14988  }
14989  nondigit = c;
14990  c = nextc(p);
14991  if (c != '-' && c != '+' && !ISDIGIT(c)) {
14992  pushback(p, c);
14993  nondigit = 0;
14994  goto decode_num;
14995  }
14996  tokadd(p, nondigit);
14997  seen_e++;
14998  is_float++;
14999  tokadd(p, c);
15000  nondigit = (c == '-' || c == '+') ? c : 0;
15001  break;
15002 
15003  case '_': /* `_' in number just ignored */
15004  if (nondigit) goto decode_num;
15005  nondigit = c;
15006  break;
15007 
15008  default:
15009  goto decode_num;
15010  }
15011  c = nextc(p);
15012  }
15013 
15014  decode_num:
15015  pushback(p, c);
15016  if (nondigit) {
15017  trailing_uc:
15018  literal_flush(p, p->lex.pcur - 1);
15019  YYLTYPE loc = RUBY_INIT_YYLLOC();
15020  compile_error(p, "trailing `%c' in number", nondigit);
15021  parser_show_error_line(p, &loc);
15022  }
15023  tokfix(p);
15024  if (is_float) {
15025  enum yytokentype type = tFLOAT;
15026  VALUE v;
15027 
15028  suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
15029  if (suffix & NUM_SUFFIX_R) {
15030  type = tRATIONAL;
15031  v = parse_rational(p, tok(p), toklen(p), seen_point);
15032  }
15033  else {
15034  double d = strtod(tok(p), 0);
15035  if (errno == ERANGE) {
15036  rb_warning1("Float %s out of range", WARN_S(tok(p)));
15037  errno = 0;
15038  }
15039  v = DBL2NUM(d);
15040  }
15041  return set_number_literal(p, v, type, suffix);
15042  }
15043  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
15044  return set_integer_literal(p, rb_cstr_to_inum(tok(p), 10, FALSE), suffix);
15045 }
15046 
15047 static enum yytokentype
15048 parse_qmark(struct parser_params *p, int space_seen)
15049 {
15050  rb_encoding *enc;
15051  register int c;
15052  VALUE lit;
15053 
15054  if (IS_END()) {
15056  return '?';
15057  }
15058  c = nextc(p);
15059  if (c == -1) {
15060  compile_error(p, "incomplete character syntax");
15061  return 0;
15062  }
15063  if (rb_enc_isspace(c, p->enc)) {
15064  if (!IS_ARG()) {
15065  int c2 = escaped_control_code(c);
15066  if (c2) {
15067  WARN_SPACE_CHAR(c2, "?");
15068  }
15069  }
15070  ternary:
15071  pushback(p, c);
15073  return '?';
15074  }
15075  newtok(p);
15076  enc = p->enc;
15077  if (!parser_isascii(p)) {
15078  if (tokadd_mbchar(p, c) == -1) return 0;
15079  }
15080  else if ((rb_enc_isalnum(c, p->enc) || c == '_') &&
15081  p->lex.pcur < p->lex.pend && is_identchar(p->lex.pcur, p->lex.pend, p->enc)) {
15082  if (space_seen) {
15083  const char *start = p->lex.pcur - 1, *ptr = start;
15084  do {
15085  int n = parser_precise_mbclen(p, ptr);
15086  if (n < 0) return -1;
15087  ptr += n;
15088  } while (ptr < p->lex.pend && is_identchar(ptr, p->lex.pend, p->enc));
15089  rb_warn2("`?' just followed by `%.*s' is interpreted as" \
15090  " a conditional operator, put a space after `?'",
15091  WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
15092  }
15093  goto ternary;
15094  }
15095  else if (c == '\\') {
15096  if (peek(p, 'u')) {
15097  nextc(p);
15098  enc = rb_utf8_encoding();
15099  tokadd_utf8(p, &enc, -1, 0, 0);
15100  }
15101  else if (!lex_eol_p(p) && !(c = *p->lex.pcur, ISASCII(c))) {
15102  nextc(p);
15103  if (tokadd_mbchar(p, c) == -1) return 0;
15104  }
15105  else {
15106  c = read_escape(p, 0, &enc);
15107  tokadd(p, c);
15108  }
15109  }
15110  else {
15111  tokadd(p, c);
15112  }
15113  tokfix(p);
15114  lit = STR_NEW3(tok(p), toklen(p), enc, 0);
15115  set_yylval_str(lit);
15116  SET_LEX_STATE(EXPR_END);
15117  return tCHAR;
15118 }
15119 
15120 static enum yytokentype
15121 parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
15122 {
15123  register int c;
15124  const char *ptok = p->lex.pcur;
15125 
15126  if (IS_BEG()) {
15127  int term;
15128  int paren;
15129 
15130  c = nextc(p);
15131  quotation:
15132  if (c == -1 || !ISALNUM(c)) {
15133  term = c;
15134  c = 'Q';
15135  }
15136  else {
15137  term = nextc(p);
15138  if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
15139  yyerror0("unknown type of %string");
15140  return 0;
15141  }
15142  }
15143  if (c == -1 || term == -1) {
15144  compile_error(p, "unterminated quoted string meets end of file");
15145  return 0;
15146  }
15147  paren = term;
15148  if (term == '(') term = ')';
15149  else if (term == '[') term = ']';
15150  else if (term == '{') term = '}';
15151  else if (term == '<') term = '>';
15152  else paren = 0;
15153 
15154  p->lex.ptok = ptok-1;
15155  switch (c) {
15156  case 'Q':
15157  p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
15158  return tSTRING_BEG;
15159 
15160  case 'q':
15161  p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
15162  return tSTRING_BEG;
15163 
15164  case 'W':
15165  p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
15166  return tWORDS_BEG;
15167 
15168  case 'w':
15169  p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
15170  return tQWORDS_BEG;
15171 
15172  case 'I':
15173  p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
15174  return tSYMBOLS_BEG;
15175 
15176  case 'i':
15177  p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
15178  return tQSYMBOLS_BEG;
15179 
15180  case 'x':
15181  p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
15182  return tXSTRING_BEG;
15183 
15184  case 'r':
15185  p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
15186  return tREGEXP_BEG;
15187 
15188  case 's':
15189  p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
15190  SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
15191  return tSYMBEG;
15192 
15193  default:
15194  yyerror0("unknown type of %string");
15195  return 0;
15196  }
15197  }
15198  if ((c = nextc(p)) == '=') {
15199  set_yylval_id('%');
15200  SET_LEX_STATE(EXPR_BEG);
15201  return tOP_ASGN;
15202  }
15203  if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
15204  goto quotation;
15205  }
15206  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
15207  pushback(p, c);
15208  return warn_balanced('%', "%%", "string literal");
15209 }
15210 
15211 static int
15212 tokadd_ident(struct parser_params *p, int c)
15213 {
15214  do {
15215  if (tokadd_mbchar(p, c) == -1) return -1;
15216  c = nextc(p);
15217  } while (parser_is_identchar(p));
15218  pushback(p, c);
15219  return 0;
15220 }
15221 
15222 static ID
15223 tokenize_ident(struct parser_params *p, const enum lex_state_e last_state)
15224 {
15225  ID ident = TOK_INTERN();
15226 
15227  set_yylval_name(ident);
15228 
15229  return ident;
15230 }
15231 
15232 static int
15233 parse_numvar(struct parser_params *p)
15234 {
15235  size_t len;
15236  int overflow;
15237  unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
15238  const unsigned long nth_ref_max =
15239  ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
15240  /* NTH_REF is left-shifted to be ORed with back-ref flag and
15241  * turned into a Fixnum, in compile.c */
15242 
15243  if (overflow || n > nth_ref_max) {
15244  /* compile_error()? */
15245  rb_warn1("`%s' is too big for a number variable, always nil", WARN_S(tok(p)));
15246  return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
15247  }
15248  else {
15249  return (int)n;
15250  }
15251 }
15252 
15253 static enum yytokentype
15254 parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
15255 {
15256  const char *ptr = p->lex.pcur;
15257  register int c;
15258 
15259  SET_LEX_STATE(EXPR_END);
15260  p->lex.ptok = ptr - 1; /* from '$' */
15261  newtok(p);
15262  c = nextc(p);
15263  switch (c) {
15264  case '_': /* $_: last read line string */
15265  c = nextc(p);
15266  if (parser_is_identchar(p)) {
15267  tokadd(p, '$');
15268  tokadd(p, '_');
15269  break;
15270  }
15271  pushback(p, c);
15272  c = '_';
15273  /* fall through */
15274  case '~': /* $~: match-data */
15275  case '*': /* $*: argv */
15276  case '$': /* $$: pid */
15277  case '?': /* $?: last status */
15278  case '!': /* $!: error string */
15279  case '@': /* $@: error position */
15280  case '/': /* $/: input record separator */
15281  case '\\': /* $\: output record separator */
15282  case ';': /* $;: field separator */
15283  case ',': /* $,: output field separator */
15284  case '.': /* $.: last read line number */
15285  case '=': /* $=: ignorecase */
15286  case ':': /* $:: load path */
15287  case '<': /* $<: reading filename */
15288  case '>': /* $>: default output handle */
15289  case '\"': /* $": already loaded files */
15290  tokadd(p, '$');
15291  tokadd(p, c);
15292  goto gvar;
15293 
15294  case '-':
15295  tokadd(p, '$');
15296  tokadd(p, c);
15297  c = nextc(p);
15298  if (parser_is_identchar(p)) {
15299  if (tokadd_mbchar(p, c) == -1) return 0;
15300  }
15301  else {
15302  pushback(p, c);
15303  pushback(p, '-');
15304  return '$';
15305  }
15306  gvar:
15308  return tGVAR;
15309 
15310  case '&': /* $&: last match */
15311  case '`': /* $`: string before last match */
15312  case '\'': /* $': string after last match */
15313  case '+': /* $+: string matches last paren. */
15314  if (IS_lex_state_for(last_state, EXPR_FNAME)) {
15315  tokadd(p, '$');
15316  tokadd(p, c);
15317  goto gvar;
15318  }
15319  set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
15320  return tBACK_REF;
15321 
15322  case '1': case '2': case '3':
15323  case '4': case '5': case '6':
15324  case '7': case '8': case '9':
15325  tokadd(p, '$');
15326  do {
15327  tokadd(p, c);
15328  c = nextc(p);
15329  } while (c != -1 && ISDIGIT(c));
15330  pushback(p, c);
15331  if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
15332  tokfix(p);
15333  set_yylval_node(NEW_NTH_REF(parse_numvar(p), &_cur_loc));
15334  return tNTH_REF;
15335 
15336  default:
15337  if (!parser_is_identchar(p)) {
15338  YYLTYPE loc = RUBY_INIT_YYLLOC();
15339  if (c == -1 || ISSPACE(c)) {
15340  compile_error(p, "`$' without identifiers is not allowed as a global variable name");
15341  }
15342  else {
15343  pushback(p, c);
15344  compile_error(p, "`$%c' is not allowed as a global variable name", c);
15345  }
15346  parser_show_error_line(p, &loc);
15348  return tGVAR;
15349  }
15350  /* fall through */
15351  case '0':
15352  tokadd(p, '$');
15353  }
15354 
15355  if (tokadd_ident(p, c)) return 0;
15356  SET_LEX_STATE(EXPR_END);
15357  tokenize_ident(p, last_state);
15358  return tGVAR;
15359 }
15360 
15361 #ifndef RIPPER
15362 static bool
15363 parser_numbered_param(struct parser_params *p, int n)
15364 {
15365  if (n < 0) return false;
15366 
15368  return false;
15369  }
15370  if (p->max_numparam == ORDINAL_PARAM) {
15371  compile_error(p, "ordinary parameter is defined");
15372  return false;
15373  }
15374  struct vtable *args = p->lvtbl->args;
15375  if (p->max_numparam < n) {
15376  p->max_numparam = n;
15377  }
15378  while (n > args->pos) {
15379  vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
15380  }
15381  return true;
15382 }
15383 #endif
15384 
15385 static enum yytokentype
15386 parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
15387 {
15388  const char *ptr = p->lex.pcur;
15389  enum yytokentype result = tIVAR;
15390  register int c = nextc(p);
15391  YYLTYPE loc;
15392 
15393  p->lex.ptok = ptr - 1; /* from '@' */
15394  newtok(p);
15395  tokadd(p, '@');
15396  if (c == '@') {
15397  result = tCVAR;
15398  tokadd(p, '@');
15399  c = nextc(p);
15400  }
15401  SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
15402  if (c == -1 || !parser_is_identchar(p)) {
15403  pushback(p, c);
15404  RUBY_SET_YYLLOC(loc);
15405  if (result == tIVAR) {
15406  compile_error(p, "`@' without identifiers is not allowed as an instance variable name");
15407  }
15408  else {
15409  compile_error(p, "`@@' without identifiers is not allowed as a class variable name");
15410  }
15411  parser_show_error_line(p, &loc);
15413  SET_LEX_STATE(EXPR_END);
15414  return result;
15415  }
15416  else if (ISDIGIT(c)) {
15417  pushback(p, c);
15418  RUBY_SET_YYLLOC(loc);
15419  if (result == tIVAR) {
15420  compile_error(p, "`@%c' is not allowed as an instance variable name", c);
15421  }
15422  else {
15423  compile_error(p, "`@@%c' is not allowed as a class variable name", c);
15424  }
15425  parser_show_error_line(p, &loc);
15427  SET_LEX_STATE(EXPR_END);
15428  return result;
15429  }
15430 
15431  if (tokadd_ident(p, c)) return 0;
15432  tokenize_ident(p, last_state);
15433  return result;
15434 }
15435 
15436 static enum yytokentype
15437 parse_ident(struct parser_params *p, int c, int cmd_state)
15438 {
15439  enum yytokentype result;
15440  int mb = ENC_CODERANGE_7BIT;
15441  const enum lex_state_e last_state = p->lex.state;
15442  ID ident;
15443 
15444  do {
15445  if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN;
15446  if (tokadd_mbchar(p, c) == -1) return 0;
15447  c = nextc(p);
15448  } while (parser_is_identchar(p));
15449  if ((c == '!' || c == '?') && !peek(p, '=')) {
15450  result = tFID;
15451  tokadd(p, c);
15452  }
15453  else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
15454  (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
15455  result = tIDENTIFIER;
15456  tokadd(p, c);
15457  }
15458  else {
15459  result = tCONSTANT; /* assume provisionally */
15460  pushback(p, c);
15461  }
15462  tokfix(p);
15463 
15464  if (IS_LABEL_POSSIBLE()) {
15465  if (IS_LABEL_SUFFIX(0)) {
15466  SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
15467  nextc(p);
15469  return tLABEL;
15470  }
15471  }
15472  if (mb == ENC_CODERANGE_7BIT && !IS_lex_state(EXPR_DOT)) {
15473  const struct kwtable *kw;
15474 
15475  /* See if it is a reserved word. */
15476  kw = rb_reserved_word(tok(p), toklen(p));
15477  if (kw) {
15478  enum lex_state_e state = p->lex.state;
15479  if (IS_lex_state_for(state, EXPR_FNAME)) {
15480  SET_LEX_STATE(EXPR_ENDFN);
15482  return kw->id[0];
15483  }
15484  SET_LEX_STATE(kw->state);
15485  if (IS_lex_state(EXPR_BEG)) {
15486  p->command_start = TRUE;
15487  }
15488  if (kw->id[0] == keyword_do) {
15489  if (lambda_beginning_p()) {
15490  p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
15491  return keyword_do_LAMBDA;
15492  }
15493  if (COND_P()) return keyword_do_cond;
15494  if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
15495  return keyword_do_block;
15496  return keyword_do;
15497  }
15498  if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED)))
15499  return kw->id[0];
15500  else {
15501  if (kw->id[0] != kw->id[1])
15502  SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
15503  return kw->id[1];
15504  }
15505  }
15506  }
15507 
15508  if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
15509  if (cmd_state) {
15510  SET_LEX_STATE(EXPR_CMDARG);
15511  }
15512  else {
15513  SET_LEX_STATE(EXPR_ARG);
15514  }
15515  }
15516  else if (p->lex.state == EXPR_FNAME) {
15517  SET_LEX_STATE(EXPR_ENDFN);
15518  }
15519  else {
15520  SET_LEX_STATE(EXPR_END);
15521  }
15522 
15523  ident = tokenize_ident(p, last_state);
15524  if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
15525  if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
15526  (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
15527  lvar_defined(p, ident)) {
15528  SET_LEX_STATE(EXPR_END|EXPR_LABEL);
15529  }
15530  return result;
15531 }
15532 
15533 static enum yytokentype
15534 parser_yylex(struct parser_params *p)
15535 {
15536  register int c;
15537  int space_seen = 0;
15538  int cmd_state;
15539  int label;
15540  enum lex_state_e last_state;
15541  int fallthru = FALSE;
15542  int token_seen = p->token_seen;
15543 
15544  if (p->lex.strterm) {
15545  if (p->lex.strterm->flags & STRTERM_HEREDOC) {
15546  return here_document(p, &p->lex.strterm->u.heredoc);
15547  }
15548  else {
15549  token_flush(p);
15550  return parse_string(p, &p->lex.strterm->u.literal);
15551  }
15552  }
15553  cmd_state = p->command_start;
15554  p->command_start = FALSE;
15555  p->token_seen = TRUE;
15556  retry:
15557  last_state = p->lex.state;
15558 #ifndef RIPPER
15559  token_flush(p);
15560 #endif
15561  switch (c = nextc(p)) {
15562  case '\0': /* NUL */
15563  case '\004': /* ^D */
15564  case '\032': /* ^Z */
15565  case -1: /* end of script. */
15566  return 0;
15567 
15568  /* white spaces */
15569  case ' ': case '\t': case '\f': case '\r':
15570  case '\13': /* '\v' */
15571  space_seen = 1;
15572 #ifdef RIPPER
15573  while ((c = nextc(p))) {
15574  switch (c) {
15575  case ' ': case '\t': case '\f': case '\r':
15576  case '\13': /* '\v' */
15577  break;
15578  default:
15579  goto outofloop;
15580  }
15581  }
15582  outofloop:
15583  pushback(p, c);
15585 #endif
15586  goto retry;
15587 
15588  case '#': /* it's a comment */
15589  p->token_seen = token_seen;
15590  /* no magic_comment in shebang line */
15591  if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
15592  if (comment_at_top(p)) {
15593  set_file_encoding(p, p->lex.pcur, p->lex.pend);
15594  }
15595  }
15596  lex_goto_eol(p);
15598  fallthru = TRUE;
15599  /* fall through */
15600  case '\n':
15601  p->token_seen = token_seen;
15602  c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
15603  !IS_lex_state(EXPR_LABELED));
15604  if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
15605  if (!fallthru) {
15607  }
15608  fallthru = FALSE;
15609  if (!c && p->in_kwarg) {
15610  goto normal_newline;
15611  }
15612  goto retry;
15613  }
15614  while (1) {
15615  switch (c = nextc(p)) {
15616  case ' ': case '\t': case '\f': case '\r':
15617  case '\13': /* '\v' */
15618  space_seen = 1;
15619  break;
15620  case '#':
15621  pushback(p, c);
15622  if (space_seen) dispatch_scan_event(p, tSP);
15623  goto retry;
15624  case '&':
15625  case '.': {
15627  if (peek(p, '.') == (c == '&')) {
15628  pushback(p, c);
15630  goto retry;
15631  }
15632  }
15633  default:
15634  p->ruby_sourceline--;
15635  p->lex.nextline = p->lex.lastline;
15636  case -1: /* EOF no decrement*/
15637 #ifndef RIPPER
15638  if (p->lex.prevline && !p->eofp) p->lex.lastline = p->lex.prevline;
15639  p->lex.pbeg = RSTRING_PTR(p->lex.lastline);
15640  p->lex.pend = p->lex.pcur = p->lex.pbeg + RSTRING_LEN(p->lex.lastline);
15641  pushback(p, 1); /* always pushback */
15642  p->lex.ptok = p->lex.pcur;
15643 #else
15644  lex_goto_eol(p);
15645  if (c != -1) {
15646  p->lex.ptok = p->lex.pcur;
15647  }
15648 #endif
15649  goto normal_newline;
15650  }
15651  }
15652  normal_newline:
15653  p->command_start = TRUE;
15654  SET_LEX_STATE(EXPR_BEG);
15655  return '\n';
15656 
15657  case '*':
15658  if ((c = nextc(p)) == '*') {
15659  if ((c = nextc(p)) == '=') {
15661  SET_LEX_STATE(EXPR_BEG);
15662  return tOP_ASGN;
15663  }
15664  pushback(p, c);
15665  if (IS_SPCARG(c)) {
15666  rb_warning0("`**' interpreted as argument prefix");
15667  c = tDSTAR;
15668  }
15669  else if (IS_BEG()) {
15670  c = tDSTAR;
15671  }
15672  else {
15673  c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
15674  }
15675  }
15676  else {
15677  if (c == '=') {
15678  set_yylval_id('*');
15679  SET_LEX_STATE(EXPR_BEG);
15680  return tOP_ASGN;
15681  }
15682  pushback(p, c);
15683  if (IS_SPCARG(c)) {
15684  rb_warning0("`*' interpreted as argument prefix");
15685  c = tSTAR;
15686  }
15687  else if (IS_BEG()) {
15688  c = tSTAR;
15689  }
15690  else {
15691  c = warn_balanced('*', "*", "argument prefix");
15692  }
15693  }
15694  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
15695  return c;
15696 
15697  case '!':
15698  c = nextc(p);
15699  if (IS_AFTER_OPERATOR()) {
15700  SET_LEX_STATE(EXPR_ARG);
15701  if (c == '@') {
15702  return '!';
15703  }
15704  }
15705  else {
15706  SET_LEX_STATE(EXPR_BEG);
15707  }
15708  if (c == '=') {
15709  return tNEQ;
15710  }
15711  if (c == '~') {
15712  return tNMATCH;
15713  }
15714  pushback(p, c);
15715  return '!';
15716 
15717  case '=':
15718  if (was_bol(p)) {
15719  /* skip embedded rd document */
15720  if (word_match_p(p, "begin", 5)) {
15721  int first_p = TRUE;
15722 
15723  lex_goto_eol(p);
15725  for (;;) {
15726  lex_goto_eol(p);
15727  if (!first_p) {
15729  }
15730  first_p = FALSE;
15731  c = nextc(p);
15732  if (c == -1) {
15733  compile_error(p, "embedded document meets end of file");
15734  return 0;
15735  }
15736  if (c == '=' && word_match_p(p, "end", 3)) {
15737  break;
15738  }
15739  pushback(p, c);
15740  }
15741  lex_goto_eol(p);
15743  goto retry;
15744  }
15745  }
15746 
15747  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
15748  if ((c = nextc(p)) == '=') {
15749  if ((c = nextc(p)) == '=') {
15750  return tEQQ;
15751  }
15752  pushback(p, c);
15753  return tEQ;
15754  }
15755  if (c == '~') {
15756  return tMATCH;
15757  }
15758  else if (c == '>') {
15759  return tASSOC;
15760  }
15761  pushback(p, c);
15762  return '=';
15763 
15764  case '<':
15765  c = nextc(p);
15766  if (c == '<' &&
15767  !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
15768  !IS_END() &&
15769  (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
15770  int token = heredoc_identifier(p);
15771  if (token) return token < 0 ? 0 : token;
15772  }
15773  if (IS_AFTER_OPERATOR()) {
15774  SET_LEX_STATE(EXPR_ARG);
15775  }
15776  else {
15777  if (IS_lex_state(EXPR_CLASS))
15778  p->command_start = TRUE;
15779  SET_LEX_STATE(EXPR_BEG);
15780  }
15781  if (c == '=') {
15782  if ((c = nextc(p)) == '>') {
15783  return tCMP;
15784  }
15785  pushback(p, c);
15786  return tLEQ;
15787  }
15788  if (c == '<') {
15789  if ((c = nextc(p)) == '=') {
15791  SET_LEX_STATE(EXPR_BEG);
15792  return tOP_ASGN;
15793  }
15794  pushback(p, c);
15795  return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
15796  }
15797  pushback(p, c);
15798  return '<';
15799 
15800  case '>':
15801  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
15802  if ((c = nextc(p)) == '=') {
15803  return tGEQ;
15804  }
15805  if (c == '>') {
15806  if ((c = nextc(p)) == '=') {
15808  SET_LEX_STATE(EXPR_BEG);
15809  return tOP_ASGN;
15810  }
15811  pushback(p, c);
15812  return tRSHFT;
15813  }
15814  pushback(p, c);
15815  return '>';
15816 
15817  case '"':
15818  label = (IS_LABEL_POSSIBLE() ? str_label : 0);
15819  p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
15820  p->lex.ptok = p->lex.pcur-1;
15821  return tSTRING_BEG;
15822 
15823  case '`':
15824  if (IS_lex_state(EXPR_FNAME)) {
15825  SET_LEX_STATE(EXPR_ENDFN);
15826  return c;
15827  }
15828  if (IS_lex_state(EXPR_DOT)) {
15829  if (cmd_state)
15830  SET_LEX_STATE(EXPR_CMDARG);
15831  else
15832  SET_LEX_STATE(EXPR_ARG);
15833  return c;
15834  }
15835  p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
15836  return tXSTRING_BEG;
15837 
15838  case '\'':
15839  label = (IS_LABEL_POSSIBLE() ? str_label : 0);
15840  p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
15841  p->lex.ptok = p->lex.pcur-1;
15842  return tSTRING_BEG;
15843 
15844  case '?':
15845  return parse_qmark(p, space_seen);
15846 
15847  case '&':
15848  if ((c = nextc(p)) == '&') {
15849  SET_LEX_STATE(EXPR_BEG);
15850  if ((c = nextc(p)) == '=') {
15852  SET_LEX_STATE(EXPR_BEG);
15853  return tOP_ASGN;
15854  }
15855  pushback(p, c);
15856  return tANDOP;
15857  }
15858  else if (c == '=') {
15859  set_yylval_id('&');
15860  SET_LEX_STATE(EXPR_BEG);
15861  return tOP_ASGN;
15862  }
15863  else if (c == '.') {
15865  SET_LEX_STATE(EXPR_DOT);
15866  return tANDDOT;
15867  }
15868  pushback(p, c);
15869  if (IS_SPCARG(c)) {
15870  if ((c != ':') ||
15871  (c = peekc_n(p, 1)) == -1 ||
15872  !(c == '\'' || c == '"' ||
15873  is_identchar((p->lex.pcur+1), p->lex.pend, p->enc))) {
15874  rb_warning0("`&' interpreted as argument prefix");
15875  }
15876  c = tAMPER;
15877  }
15878  else if (IS_BEG()) {
15879  c = tAMPER;
15880  }
15881  else {
15882  c = warn_balanced('&', "&", "argument prefix");
15883  }
15884  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
15885  return c;
15886 
15887  case '|':
15888  if ((c = nextc(p)) == '|') {
15889  SET_LEX_STATE(EXPR_BEG);
15890  if ((c = nextc(p)) == '=') {
15892  SET_LEX_STATE(EXPR_BEG);
15893  return tOP_ASGN;
15894  }
15895  pushback(p, c);
15896  if (IS_lex_state_for(last_state, EXPR_BEG)) {
15897  c = '|';
15898  pushback(p, '|');
15899  return c;
15900  }
15901  return tOROP;
15902  }
15903  if (c == '=') {
15904  set_yylval_id('|');
15905  SET_LEX_STATE(EXPR_BEG);
15906  return tOP_ASGN;
15907  }
15908  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
15909  pushback(p, c);
15910  return '|';
15911 
15912  case '+':
15913  c = nextc(p);
15914  if (IS_AFTER_OPERATOR()) {
15915  SET_LEX_STATE(EXPR_ARG);
15916  if (c == '@') {
15917  return tUPLUS;
15918  }
15919  pushback(p, c);
15920  return '+';
15921  }
15922  if (c == '=') {
15923  set_yylval_id('+');
15924  SET_LEX_STATE(EXPR_BEG);
15925  return tOP_ASGN;
15926  }
15927  if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
15928  SET_LEX_STATE(EXPR_BEG);
15929  pushback(p, c);
15930  if (c != -1 && ISDIGIT(c)) {
15931  return parse_numeric(p, '+');
15932  }
15933  return tUPLUS;
15934  }
15935  SET_LEX_STATE(EXPR_BEG);
15936  pushback(p, c);
15937  return warn_balanced('+', "+", "unary operator");
15938 
15939  case '-':
15940  c = nextc(p);
15941  if (IS_AFTER_OPERATOR()) {
15942  SET_LEX_STATE(EXPR_ARG);
15943  if (c == '@') {
15944  return tUMINUS;
15945  }
15946  pushback(p, c);
15947  return '-';
15948  }
15949  if (c == '=') {
15950  set_yylval_id('-');
15951  SET_LEX_STATE(EXPR_BEG);
15952  return tOP_ASGN;
15953  }
15954  if (c == '>') {
15955  SET_LEX_STATE(EXPR_ENDFN);
15956  return tLAMBDA;
15957  }
15958  if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
15959  SET_LEX_STATE(EXPR_BEG);
15960  pushback(p, c);
15961  if (c != -1 && ISDIGIT(c)) {
15962  return tUMINUS_NUM;
15963  }
15964  return tUMINUS;
15965  }
15966  SET_LEX_STATE(EXPR_BEG);
15967  pushback(p, c);
15968  return warn_balanced('-', "-", "unary operator");
15969 
15970  case '.': {
15971  int is_beg = IS_BEG();
15972  SET_LEX_STATE(EXPR_BEG);
15973  if ((c = nextc(p)) == '.') {
15974  if ((c = nextc(p)) == '.') {
15975  if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
15976  rb_warn0("... at EOL, should be parenthesized?");
15977  }
15978  return is_beg ? tBDOT3 : tDOT3;
15979  }
15980  pushback(p, c);
15981  return is_beg ? tBDOT2 : tDOT2;
15982  }
15983  pushback(p, c);
15984  if (c != -1 && ISDIGIT(c)) {
15985  char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
15986  parse_numeric(p, '.');
15987  if (ISDIGIT(prev)) {
15988  yyerror0("unexpected fraction part after numeric literal");
15989  }
15990  else {
15991  yyerror0("no .<digit> floating literal anymore; put 0 before dot");
15992  }
15993  SET_LEX_STATE(EXPR_END);
15994  p->lex.ptok = p->lex.pcur;
15995  goto retry;
15996  }
15997  set_yylval_id('.');
15998  SET_LEX_STATE(EXPR_DOT);
15999  return '.';
16000  }
16001 
16002  case '0': case '1': case '2': case '3': case '4':
16003  case '5': case '6': case '7': case '8': case '9':
16004  return parse_numeric(p, c);
16005 
16006  case ')':
16007  COND_POP();
16008  CMDARG_POP();
16009  SET_LEX_STATE(EXPR_ENDFN);
16010  p->lex.paren_nest--;
16011  return c;
16012 
16013  case ']':
16014  COND_POP();
16015  CMDARG_POP();
16016  SET_LEX_STATE(EXPR_END);
16017  p->lex.paren_nest--;
16018  return c;
16019 
16020  case '}':
16021  /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
16022  if (!p->lex.brace_nest--) return tSTRING_DEND;
16023  COND_POP();
16024  CMDARG_POP();
16025  SET_LEX_STATE(EXPR_END);
16026  p->lex.paren_nest--;
16027  return c;
16028 
16029  case ':':
16030  c = nextc(p);
16031  if (c == ':') {
16032  if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
16033  SET_LEX_STATE(EXPR_BEG);
16034  return tCOLON3;
16035  }
16037  SET_LEX_STATE(EXPR_DOT);
16038  return tCOLON2;
16039  }
16040  if (IS_END() || ISSPACE(c) || c == '#') {
16041  pushback(p, c);
16042  c = warn_balanced(':', ":", "symbol literal");
16043  SET_LEX_STATE(EXPR_BEG);
16044  return c;
16045  }
16046  switch (c) {
16047  case '\'':
16048  p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
16049  break;
16050  case '"':
16051  p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
16052  break;
16053  default:
16054  pushback(p, c);
16055  break;
16056  }
16057  SET_LEX_STATE(EXPR_FNAME);
16058  return tSYMBEG;
16059 
16060  case '/':
16061  if (IS_BEG()) {
16062  p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
16063  return tREGEXP_BEG;
16064  }
16065  if ((c = nextc(p)) == '=') {
16066  set_yylval_id('/');
16067  SET_LEX_STATE(EXPR_BEG);
16068  return tOP_ASGN;
16069  }
16070  pushback(p, c);
16071  if (IS_SPCARG(c)) {
16072  arg_ambiguous(p, '/');
16073  p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
16074  return tREGEXP_BEG;
16075  }
16076  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
16077  return warn_balanced('/', "/", "regexp literal");
16078 
16079  case '^':
16080  if ((c = nextc(p)) == '=') {
16081  set_yylval_id('^');
16082  SET_LEX_STATE(EXPR_BEG);
16083  return tOP_ASGN;
16084  }
16085  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
16086  pushback(p, c);
16087  return '^';
16088 
16089  case ';':
16090  SET_LEX_STATE(EXPR_BEG);
16091  p->command_start = TRUE;
16092  return ';';
16093 
16094  case ',':
16095  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16096  return ',';
16097 
16098  case '~':
16099  if (IS_AFTER_OPERATOR()) {
16100  if ((c = nextc(p)) != '@') {
16101  pushback(p, c);
16102  }
16103  SET_LEX_STATE(EXPR_ARG);
16104  }
16105  else {
16106  SET_LEX_STATE(EXPR_BEG);
16107  }
16108  return '~';
16109 
16110  case '(':
16111  if (IS_BEG()) {
16112  c = tLPAREN;
16113  }
16114  else if (!space_seen) {
16115  /* foo( ... ) => method call, no ambiguity */
16116  }
16117  else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
16118  c = tLPAREN_ARG;
16119  }
16120  else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
16121  rb_warning0("parentheses after method name is interpreted as "
16122  "an argument list, not a decomposed argument");
16123  }
16124  p->lex.paren_nest++;
16125  COND_PUSH(0);
16126  CMDARG_PUSH(0);
16127  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16128  return c;
16129 
16130  case '[':
16131  p->lex.paren_nest++;
16132  if (IS_AFTER_OPERATOR()) {
16133  if ((c = nextc(p)) == ']') {
16134  SET_LEX_STATE(EXPR_ARG);
16135  if ((c = nextc(p)) == '=') {
16136  return tASET;
16137  }
16138  pushback(p, c);
16139  return tAREF;
16140  }
16141  pushback(p, c);
16142  SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
16143  return '[';
16144  }
16145  else if (IS_BEG()) {
16146  c = tLBRACK;
16147  }
16148  else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
16149  c = tLBRACK;
16150  }
16151  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16152  COND_PUSH(0);
16153  CMDARG_PUSH(0);
16154  return c;
16155 
16156  case '{':
16157  ++p->lex.brace_nest;
16158  if (lambda_beginning_p())
16159  c = tLAMBEG;
16160  else if (IS_lex_state(EXPR_LABELED))
16161  c = tLBRACE; /* hash */
16162  else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
16163  c = '{'; /* block (primary) */
16164  else if (IS_lex_state(EXPR_ENDARG))
16165  c = tLBRACE_ARG; /* block (expr) */
16166  else
16167  c = tLBRACE; /* hash */
16168  if (c != tLBRACE) {
16169  p->command_start = TRUE;
16170  SET_LEX_STATE(EXPR_BEG);
16171  }
16172  else {
16173  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16174  }
16175  ++p->lex.paren_nest; /* after lambda_beginning_p() */
16176  COND_PUSH(0);
16177  CMDARG_PUSH(0);
16178  return c;
16179 
16180  case '\\':
16181  c = nextc(p);
16182  if (c == '\n') {
16183  space_seen = 1;
16185  goto retry; /* skip \\n */
16186  }
16187  if (c == ' ') return tSP;
16188  if (ISSPACE(c)) return c;
16189  pushback(p, c);
16190  return '\\';
16191 
16192  case '%':
16193  return parse_percent(p, space_seen, last_state);
16194 
16195  case '$':
16196  return parse_gvar(p, last_state);
16197 
16198  case '@':
16199  return parse_atmark(p, last_state);
16200 
16201  case '_':
16202  if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
16203  p->ruby__end__seen = 1;
16204  p->eofp = 1;
16205 #ifndef RIPPER
16206  return -1;
16207 #else
16208  lex_goto_eol(p);
16210  return 0;
16211 #endif
16212  }
16213  newtok(p);
16214  break;
16215 
16216  default:
16217  if (!parser_is_identchar(p)) {
16218  compile_error(p, "Invalid char `\\x%02X' in expression", c);
16219  token_flush(p);
16220  goto retry;
16221  }
16222 
16223  newtok(p);
16224  break;
16225  }
16226 
16227  return parse_ident(p, c, cmd_state);
16228 }
16229 
16230 static enum yytokentype
16231 yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
16232 {
16233  enum yytokentype t;
16234 
16235  p->lval = lval;
16236  lval->val = Qundef;
16237  t = parser_yylex(p);
16238 
16239  if (p->lex.strterm && (p->lex.strterm->flags & STRTERM_HEREDOC))
16241  else
16242  RUBY_SET_YYLLOC(*yylloc);
16243 
16244  if (has_delayed_token(p))
16245  dispatch_delayed_token(p, t);
16246  else if (t != 0)
16247  dispatch_scan_event(p, t);
16248 
16249  return t;
16250 }
16251 
16252 #define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
16253 
16254 static NODE*
16255 node_newnode(struct parser_params *p, enum node_type type, VALUE a0, VALUE a1, VALUE a2, const rb_code_location_t *loc)
16256 {
16257  NODE *n = rb_ast_newnode(p->ast, type);
16258 
16259  rb_node_init(n, type, a0, a1, a2);
16260 
16261  nd_set_loc(n, loc);
16262  nd_set_node_id(n, parser_get_node_id(p));
16263  return n;
16264 }
16265 
16266 static NODE *
16267 nd_set_loc(NODE *nd, const YYLTYPE *loc)
16268 {
16269  nd->nd_loc = *loc;
16270  nd_set_line(nd, loc->beg_pos.lineno);
16271  return nd;
16272 }
16273 
16274 #ifndef RIPPER
16275 static enum node_type
16276 nodetype(NODE *node) /* for debug */
16277 {
16278  return (enum node_type)nd_type(node);
16279 }
16280 
16281 static int
16282 nodeline(NODE *node)
16283 {
16284  return nd_line(node);
16285 }
16286 
16287 static NODE*
16288 newline_node(NODE *node)
16289 {
16290  if (node) {
16291  node = remove_begin(node);
16292  node->flags |= NODE_FL_NEWLINE;
16293  }
16294  return node;
16295 }
16296 
16297 static void
16298 fixpos(NODE *node, NODE *orig)
16299 {
16300  if (!node) return;
16301  if (!orig) return;
16302  nd_set_line(node, nd_line(orig));
16303 }
16304 
16305 static void
16306 parser_warning(struct parser_params *p, NODE *node, const char *mesg)
16307 {
16308  rb_compile_warning(p->ruby_sourcefile, nd_line(node), "%s", mesg);
16309 }
16310 
16311 static void
16312 parser_warn(struct parser_params *p, NODE *node, const char *mesg)
16313 {
16314  rb_compile_warn(p->ruby_sourcefile, nd_line(node), "%s", mesg);
16315 }
16316 
16317 static NODE*
16318 block_append(struct parser_params *p, NODE *head, NODE *tail)
16319 {
16320  NODE *end, *h = head, *nd;
16321 
16322  if (tail == 0) return head;
16323 
16324  if (h == 0) return tail;
16325  switch (nd_type(h)) {
16326  case NODE_LIT:
16327  case NODE_STR:
16328  case NODE_SELF:
16329  case NODE_TRUE:
16330  case NODE_FALSE:
16331  case NODE_NIL:
16332  parser_warning(p, h, "unused literal ignored");
16333  return tail;
16334  default:
16335  h = end = NEW_BLOCK(head, &head->nd_loc);
16336  end->nd_end = end;
16337  head = end;
16338  break;
16339  case NODE_BLOCK:
16340  end = h->nd_end;
16341  break;
16342  }
16343 
16344  nd = end->nd_head;
16345  switch (nd_type(nd)) {
16346  case NODE_RETURN:
16347  case NODE_BREAK:
16348  case NODE_NEXT:
16349  case NODE_REDO:
16350  case NODE_RETRY:
16351  if (RTEST(ruby_verbose)) {
16352  parser_warning(p, tail, "statement not reached");
16353  }
16354  break;
16355 
16356  default:
16357  break;
16358  }
16359 
16360  if (nd_type(tail) != NODE_BLOCK) {
16361  tail = NEW_BLOCK(tail, &tail->nd_loc);
16362  tail->nd_end = tail;
16363  }
16364  end->nd_next = tail;
16365  h->nd_end = tail->nd_end;
16366  nd_set_last_loc(head, nd_last_loc(tail));
16367  return head;
16368 }
16369 
16370 /* append item to the list */
16371 static NODE*
16372 list_append(struct parser_params *p, NODE *list, NODE *item)
16373 {
16374  NODE *last;
16375 
16376  if (list == 0) return NEW_LIST(item, &item->nd_loc);
16377  if (list->nd_next) {
16378  last = list->nd_next->nd_end;
16379  }
16380  else {
16381  last = list;
16382  }
16383 
16384  list->nd_alen += 1;
16385  last->nd_next = NEW_LIST(item, &item->nd_loc);
16386  list->nd_next->nd_end = last->nd_next;
16387 
16389 
16390  return list;
16391 }
16392 
16393 /* concat two lists */
16394 static NODE*
16395 list_concat(NODE *head, NODE *tail)
16396 {
16397  NODE *last;
16398 
16399  if (head->nd_next) {
16400  last = head->nd_next->nd_end;
16401  }
16402  else {
16403  last = head;
16404  }
16405 
16406  head->nd_alen += tail->nd_alen;
16407  last->nd_next = tail;
16408  if (tail->nd_next) {
16409  head->nd_next->nd_end = tail->nd_next->nd_end;
16410  }
16411  else {
16412  head->nd_next->nd_end = tail;
16413  }
16414 
16415  nd_set_last_loc(head, nd_last_loc(tail));
16416 
16417  return head;
16418 }
16419 
16420 static int
16421 literal_concat0(struct parser_params *p, VALUE head, VALUE tail)
16422 {
16423  if (NIL_P(tail)) return 1;
16424  if (!rb_enc_compatible(head, tail)) {
16425  compile_error(p, "string literal encodings differ (%s / %s)",
16426  rb_enc_name(rb_enc_get(head)),
16427  rb_enc_name(rb_enc_get(tail)));
16428  rb_str_resize(head, 0);
16429  rb_str_resize(tail, 0);
16430  return 0;
16431  }
16432  rb_str_buf_append(head, tail);
16433  return 1;
16434 }
16435 
16436 /* concat two string literals */
16437 static NODE *
16438 literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
16439 {
16440  enum node_type htype;
16441  NODE *headlast;
16442  VALUE lit;
16443 
16444  if (!head) return tail;
16445  if (!tail) return head;
16446 
16447  htype = nd_type(head);
16448  if (htype == NODE_EVSTR) {
16449  NODE *node = NEW_DSTR(STR_NEW0(), loc);
16450  RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
16451  head = list_append(p, node, head);
16452  htype = NODE_DSTR;
16453  }
16454  if (p->heredoc_indent > 0) {
16455  switch (htype) {
16456  case NODE_STR:
16457  nd_set_type(head, NODE_DSTR);
16458  case NODE_DSTR:
16459  return list_append(p, head, tail);
16460  default:
16461  break;
16462  }
16463  }
16464  switch (nd_type(tail)) {
16465  case NODE_STR:
16466  if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) &&
16467  nd_type(headlast) == NODE_STR) {
16468  htype = NODE_STR;
16469  lit = headlast->nd_lit;
16470  }
16471  else {
16472  lit = head->nd_lit;
16473  }
16474  if (htype == NODE_STR) {
16475  if (!literal_concat0(p, lit, tail->nd_lit)) {
16476  error:
16477  rb_discard_node(p, head);
16478  rb_discard_node(p, tail);
16479  return 0;
16480  }
16481  rb_discard_node(p, tail);
16482  }
16483  else {
16484  list_append(p, head, tail);
16485  }
16486  break;
16487 
16488  case NODE_DSTR:
16489  if (htype == NODE_STR) {
16490  if (!literal_concat0(p, head->nd_lit, tail->nd_lit))
16491  goto error;
16492  tail->nd_lit = head->nd_lit;
16493  rb_discard_node(p, head);
16494  head = tail;
16495  }
16496  else if (NIL_P(tail->nd_lit)) {
16497  append:
16498  head->nd_alen += tail->nd_alen - 1;
16499  head->nd_next->nd_end->nd_next = tail->nd_next;
16500  head->nd_next->nd_end = tail->nd_next->nd_end;
16501  rb_discard_node(p, tail);
16502  }
16503  else if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) &&
16504  nd_type(headlast) == NODE_STR) {
16505  lit = headlast->nd_lit;
16506  if (!literal_concat0(p, lit, tail->nd_lit))
16507  goto error;
16508  tail->nd_lit = Qnil;
16509  goto append;
16510  }
16511  else {
16512  list_concat(head, NEW_NODE(NODE_LIST, NEW_STR(tail->nd_lit, loc), tail->nd_alen, tail->nd_next, loc));
16513  }
16514  break;
16515 
16516  case NODE_EVSTR:
16517  if (htype == NODE_STR) {
16518  nd_set_type(head, NODE_DSTR);
16519  head->nd_alen = 1;
16520  }
16521  list_append(p, head, tail);
16522  break;
16523  }
16524  return head;
16525 }
16526 
16527 static NODE *
16528 evstr2dstr(struct parser_params *p, NODE *node)
16529 {
16530  if (nd_type(node) == NODE_EVSTR) {
16531  NODE * dstr = NEW_DSTR(STR_NEW0(), &node->nd_loc);
16532  RB_OBJ_WRITTEN(p->ast, Qnil, dstr->nd_lit);
16533  node = list_append(p, dstr, node);
16534  }
16535  return node;
16536 }
16537 
16538 static NODE *
16539 new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
16540 {
16541  NODE *head = node;
16542 
16543  if (node) {
16544  switch (nd_type(node)) {
16545  case NODE_STR: case NODE_DSTR: case NODE_EVSTR:
16546  return node;
16547  }
16548  }
16549  return NEW_EVSTR(head, loc);
16550 }
16551 
16552 static NODE *
16553 call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
16554  const YYLTYPE *op_loc, const YYLTYPE *loc)
16555 {
16556  NODE *expr;
16557  value_expr(recv);
16558  value_expr(arg1);
16559  expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
16560  nd_set_line(expr, op_loc->beg_pos.lineno);
16561  return expr;
16562 }
16563 
16564 static NODE *
16565 call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
16566 {
16567  NODE *opcall;
16568  value_expr(recv);
16569  opcall = NEW_OPCALL(recv, id, 0, loc);
16570  nd_set_line(opcall, op_loc->beg_pos.lineno);
16571  return opcall;
16572 }
16573 
16574 static NODE *
16575 new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
16576 {
16577  NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
16578  nd_set_line(qcall, op_loc->beg_pos.lineno);
16579  return qcall;
16580 }
16581 
16582 static NODE*
16583 new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
16584 {
16585  NODE *ret;
16586  if (block) block_dup_check(p, args, block);
16587  ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
16588  if (block) ret = method_add_block(p, ret, block, loc);
16589  fixpos(ret, recv);
16590  return ret;
16591 }
16592 
16593 #define nd_once_body(node) (nd_type(node) == NODE_ONCE ? (node)->nd_body : node)
16594 static NODE*
16595 match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
16596 {
16597  NODE *n;
16598  int line = op_loc->beg_pos.lineno;
16599 
16600  value_expr(node1);
16601  value_expr(node2);
16602  if (node1 && (n = nd_once_body(node1)) != 0) {
16603  switch (nd_type(n)) {
16604  case NODE_DREGX:
16605  {
16606  NODE *match = NEW_MATCH2(node1, node2, loc);
16607  nd_set_line(match, line);
16608  return match;
16609  }
16610 
16611  case NODE_LIT:
16612  if (RB_TYPE_P(n->nd_lit, T_REGEXP)) {
16613  const VALUE lit = n->nd_lit;
16614  NODE *match = NEW_MATCH2(node1, node2, loc);
16615  match->nd_args = reg_named_capture_assign(p, lit, loc);
16616  nd_set_line(match, line);
16617  return match;
16618  }
16619  }
16620  }
16621 
16622  if (node2 && (n = nd_once_body(node2)) != 0) {
16623  NODE *match3;
16624 
16625  switch (nd_type(n)) {
16626  case NODE_LIT:
16627  if (!RB_TYPE_P(n->nd_lit, T_REGEXP)) break;
16628  /* fallthru */
16629  case NODE_DREGX:
16630  match3 = NEW_MATCH3(node2, node1, loc);
16631  return match3;
16632  }
16633  }
16634 
16635  n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
16636  nd_set_line(n, line);
16637  return n;
16638 }
16639 
16640 # if WARN_PAST_SCOPE
16641 static int
16642 past_dvar_p(struct parser_params *p, ID id)
16643 {
16644  struct vtable *past = p->lvtbl->past;
16645  while (past) {
16646  if (vtable_included(past, id)) return 1;
16647  past = past->prev;
16648  }
16649  return 0;
16650 }
16651 # endif
16652 
16653 /* As Ripper#warn does not have arguments for the location, so the
16654  * following messages cannot be separated */
16655 #define WARN_LOCATION(type) do { \
16656  if (p->warn_location) { \
16657  int line; \
16658  VALUE file = rb_source_location(&line); \
16659  rb_warn3(type" in eval may not return location in binding;" \
16660  " use Binding#source_location instead\n" \
16661  "%"PRIsWARN":%d: warning: in `%"PRIsWARN"'", \
16662  file, WARN_I(line), rb_id2str(rb_frame_this_func())); \
16663  } \
16664 } while (0)
16665 
16666 static int
16667 numparam_nested_p(struct parser_params *p)
16668 {
16669  struct local_vars *local = p->lvtbl;
16670  NODE *outer = local->numparam.outer;
16671  NODE *inner = local->numparam.inner;
16672  if (outer || inner) {
16673  NODE *used = outer ? outer : inner;
16674  compile_error(p, "numbered parameter is already used in\n"
16675  "%s:%d: %s block here",
16677  outer ? "outer" : "inner");
16678  parser_show_error_line(p, &used->nd_loc);
16679  return 1;
16680  }
16681  return 0;
16682 }
16683 
16684 static NODE*
16685 gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
16686 {
16687  ID *vidp = NULL;
16688  NODE *node;
16689  switch (id) {
16690  case keyword_self:
16691  return NEW_SELF(loc);
16692  case keyword_nil:
16693  return NEW_NIL(loc);
16694  case keyword_true:
16695  return NEW_TRUE(loc);
16696  case keyword_false:
16697  return NEW_FALSE(loc);
16698  case keyword__FILE__:
16699  WARN_LOCATION("__FILE__");
16700  {
16701  VALUE file = p->ruby_sourcefile_string;
16702  if (NIL_P(file))
16703  file = rb_str_new(0, 0);
16704  else
16705  file = rb_str_dup(file);
16706  node = NEW_STR(file, loc);
16707  RB_OBJ_WRITTEN(p->ast, Qnil, file);
16708  }
16709  return node;
16710  case keyword__LINE__:
16711  WARN_LOCATION("__LINE__");
16712  return NEW_LIT(INT2FIX(p->tokline), loc);
16713  case keyword__ENCODING__:
16714  node = NEW_LIT(rb_enc_from_encoding(p->enc), loc);
16715  RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
16716  return node;
16717 
16718  }
16719  switch (id_type(id)) {
16720  case ID_LOCAL:
16721  if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
16722  if (NUMPARAM_ID_P(id) && numparam_nested_p(p)) return 0;
16723  if (id == p->cur_arg) {
16724  compile_error(p, "circular argument reference - %"PRIsWARN, rb_id2str(id));
16725  return 0;
16726  }
16727  if (vidp) *vidp |= LVAR_USED;
16728  node = NEW_DVAR(id, loc);
16729  return node;
16730  }
16731  if (local_id_ref(p, id, &vidp)) {
16732  if (id == p->cur_arg) {
16733  compile_error(p, "circular argument reference - %"PRIsWARN, rb_id2str(id));
16734  return 0;
16735  }
16736  if (vidp) *vidp |= LVAR_USED;
16737  node = NEW_LVAR(id, loc);
16738  return node;
16739  }
16740  if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
16741  parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
16742  if (numparam_nested_p(p)) return 0;
16743  node = NEW_DVAR(id, loc);
16744  struct local_vars *local = p->lvtbl;
16745  if (!local->numparam.current) local->numparam.current = node;
16746  return node;
16747  }
16748 # if WARN_PAST_SCOPE
16749  if (!p->in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
16750  rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
16751  }
16752 # endif
16753  /* method call without arguments */
16754  return NEW_VCALL(id, loc);
16755  case ID_GLOBAL:
16756  return NEW_GVAR(id, loc);
16757  case ID_INSTANCE:
16758  return NEW_IVAR(id, loc);
16759  case ID_CONST:
16760  return NEW_CONST(id, loc);
16761  case ID_CLASS:
16762  return NEW_CVAR(id, loc);
16763  }
16764  compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
16765  return 0;
16766 }
16767 
16768 static NODE *
16769 opt_arg_append(NODE *opt_list, NODE *opt)
16770 {
16771  NODE *opts = opt_list;
16772  opts->nd_loc.end_pos = opt->nd_loc.end_pos;
16773 
16774  while (opts->nd_next) {
16775  opts = opts->nd_next;
16776  opts->nd_loc.end_pos = opt->nd_loc.end_pos;
16777  }
16778  opts->nd_next = opt;
16779 
16780  return opt_list;
16781 }
16782 
16783 static NODE *
16784 kwd_append(NODE *kwlist, NODE *kw)
16785 {
16786  if (kwlist) {
16787  NODE *kws = kwlist;
16788  kws->nd_loc.end_pos = kw->nd_loc.end_pos;
16789  while (kws->nd_next) {
16790  kws = kws->nd_next;
16791  kws->nd_loc.end_pos = kw->nd_loc.end_pos;
16792  }
16793  kws->nd_next = kw;
16794  }
16795  return kwlist;
16796 }
16797 
16798 static NODE *
16799 new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc)
16800 {
16801  return NEW_DEFINED(remove_begin_all(expr), loc);
16802 }
16803 
16804 static NODE*
16805 symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
16806 {
16807  if (nd_type(symbol) == NODE_DSTR) {
16808  nd_set_type(symbol, NODE_DSYM);
16809  }
16810  else {
16811  nd_set_type(symbol, NODE_LIT);
16812  RB_OBJ_WRITTEN(p->ast, Qnil, symbol->nd_lit = rb_str_intern(symbol->nd_lit));
16813  }
16814  return list_append(p, symbols, symbol);
16815 }
16816 
16817 static NODE *
16818 new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc)
16819 {
16820  NODE *list, *prev;
16821  VALUE lit;
16822 
16823  if (!node) {
16824  node = NEW_LIT(reg_compile(p, STR_NEW0(), options), loc);
16825  RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
16826  return node;
16827  }
16828  switch (nd_type(node)) {
16829  case NODE_STR:
16830  {
16831  VALUE src = node->nd_lit;
16832  nd_set_type(node, NODE_LIT);
16833  nd_set_loc(node, loc);
16834  RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit = reg_compile(p, src, options));
16835  }
16836  break;
16837  default:
16838  lit = STR_NEW0();
16839  node = NEW_NODE(NODE_DSTR, lit, 1, NEW_LIST(node, loc), loc);
16840  RB_OBJ_WRITTEN(p->ast, Qnil, lit);
16841  /* fall through */
16842  case NODE_DSTR:
16843  nd_set_type(node, NODE_DREGX);
16844  nd_set_loc(node, loc);
16845  node->nd_cflag = options & RE_OPTION_MASK;
16846  if (!NIL_P(node->nd_lit)) reg_fragment_check(p, node->nd_lit, options);
16847  for (list = (prev = node)->nd_next; list; list = list->nd_next) {
16848  if (nd_type(list->nd_head) == NODE_STR) {
16849  VALUE tail = list->nd_head->nd_lit;
16850  if (reg_fragment_check(p, tail, options) && prev && !NIL_P(prev->nd_lit)) {
16851  VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit;
16852  if (!literal_concat0(p, lit, tail)) {
16853  return NEW_NIL(loc); /* dummy node on error */
16854  }
16855  rb_str_resize(tail, 0);
16856  prev->nd_next = list->nd_next;
16857  rb_discard_node(p, list->nd_head);
16858  rb_discard_node(p, list);
16859  list = prev;
16860  }
16861  else {
16862  prev = list;
16863  }
16864  }
16865  else {
16866  prev = 0;
16867  }
16868  }
16869  if (!node->nd_next) {
16870  VALUE src = node->nd_lit;
16871  nd_set_type(node, NODE_LIT);
16872  RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit = reg_compile(p, src, options));
16873  }
16874  if (options & RE_OPTION_ONCE) {
16875  node = NEW_NODE(NODE_ONCE, 0, node, 0, loc);
16876  }
16877  break;
16878  }
16879  return node;
16880 }
16881 
16882 static NODE *
16883 new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
16884 {
16885  if (!k) return 0;
16886  return NEW_KW_ARG(0, (k), loc);
16887 }
16888 
16889 static NODE *
16890 new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
16891 {
16892  if (!node) {
16893  VALUE lit = STR_NEW0();
16894  NODE *xstr = NEW_XSTR(lit, loc);
16895  RB_OBJ_WRITTEN(p->ast, Qnil, lit);
16896  return xstr;
16897  }
16898  switch (nd_type(node)) {
16899  case NODE_STR:
16900  nd_set_type(node, NODE_XSTR);
16901  nd_set_loc(node, loc);
16902  break;
16903  case NODE_DSTR:
16904  nd_set_type(node, NODE_DXSTR);
16905  nd_set_loc(node, loc);
16906  break;
16907  default:
16908  node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node, loc), loc);
16909  break;
16910  }
16911  return node;
16912 }
16913 
16914 static void
16915 check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
16916 {
16917  VALUE lit;
16918 
16919  if (!arg || !p->case_labels) return;
16920 
16922  if (lit == Qundef) return;
16923  if (nd_type(arg) == NODE_STR) {
16924  RB_OBJ_WRITTEN(p->ast, Qnil, arg->nd_lit = lit);
16925  }
16926 
16927  if (NIL_P(p->case_labels)) {
16929  }
16930  else {
16931  VALUE line = rb_hash_lookup(p->case_labels, lit);
16932  if (!NIL_P(line)) {
16933  rb_warning1("duplicated `when' clause with line %d is ignored",
16934  WARN_IVAL(line));
16935  return;
16936  }
16937  }
16939 }
16940 
16941 #else /* !RIPPER */
16942 static int
16943 id_is_var(struct parser_params *p, ID id)
16944 {
16945  if (is_notop_id(id)) {
16946  switch (id & ID_SCOPE_MASK) {
16947  case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
16948  return 1;
16949  case ID_LOCAL:
16950  if (dyna_in_block(p)) {
16951  if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
16952  }
16953  if (local_id(p, id)) return 1;
16954  /* method call without arguments */
16955  return 0;
16956  }
16957  }
16958  compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
16959  return 0;
16960 }
16961 
16962 static VALUE
16963 new_regexp(struct parser_params *p, VALUE re, VALUE opt, const YYLTYPE *loc)
16964 {
16965  VALUE src = 0, err;
16966  int options = 0;
16967  if (ripper_is_node_yylval(re)) {
16968  src = RNODE(re)->nd_cval;
16969  re = RNODE(re)->nd_rval;
16970  }
16971  if (ripper_is_node_yylval(opt)) {
16972  options = (int)RNODE(opt)->nd_tag;
16973  opt = RNODE(opt)->nd_rval;
16974  }
16975  if (src && NIL_P(parser_reg_compile(p, src, options, &err))) {
16976  compile_error(p, "%"PRIsVALUE, err);
16977  }
16978  return dispatch2(regexp_literal, re, opt);
16979 }
16980 #endif /* !RIPPER */
16981 
16982 
16983 #ifndef RIPPER
16984 static const char rb_parser_lex_state_names[][8] = {
16985  "BEG", "END", "ENDARG", "ENDFN", "ARG",
16986  "CMDARG", "MID", "FNAME", "DOT", "CLASS",
16987  "LABEL", "LABELED","FITEM",
16988 };
16989 
16990 static VALUE
16991 append_lex_state_name(enum lex_state_e state, VALUE buf)
16992 {
16993  int i, sep = 0;
16994  unsigned int mask = 1;
16995  static const char none[] = "NONE";
16996 
16997  for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
16998  if ((unsigned)state & mask) {
16999  if (sep) {
17000  rb_str_cat(buf, "|", 1);
17001  }
17002  sep = 1;
17003  rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
17004  }
17005  }
17006  if (!sep) {
17007  rb_str_cat(buf, none, sizeof(none)-1);
17008  }
17009  return buf;
17010 }
17011 
17012 static void
17013 flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
17014 {
17015  VALUE mesg = p->debug_buffer;
17016 
17017  if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
17018  p->debug_buffer = Qnil;
17019  rb_io_puts(1, &mesg, out);
17020  }
17021  if (!NIL_P(str) && RSTRING_LEN(str)) {
17023  }
17024 }
17025 
17026 enum lex_state_e
17028  enum lex_state_e to, int line)
17029 {
17030  VALUE mesg;
17031  mesg = rb_str_new_cstr("lex_state: ");
17032  append_lex_state_name(from, mesg);
17033  rb_str_cat_cstr(mesg, " -> ");
17034  append_lex_state_name(to, mesg);
17035  rb_str_catf(mesg, " at line %d\n", line);
17036  flush_debug_buffer(p, p->debug_output, mesg);
17037  return to;
17038 }
17039 
17040 VALUE
17042 {
17043  return rb_fstring(append_lex_state_name(state, rb_str_new(0, 0)));
17044 }
17045 
17046 static void
17047 append_bitstack_value(stack_type stack, VALUE mesg)
17048 {
17049  if (stack == 0) {
17050  rb_str_cat_cstr(mesg, "0");
17051  }
17052  else {
17053  stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
17054  for (; mask && !(stack & mask); mask >>= 1) continue;
17055  for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
17056  }
17057 }
17058 
17059 void
17061  const char *name, int line)
17062 {
17063  VALUE mesg = rb_sprintf("%s: ", name);
17064  append_bitstack_value(stack, mesg);
17065  rb_str_catf(mesg, " at line %d\n", line);
17066  flush_debug_buffer(p, p->debug_output, mesg);
17067 }
17068 
17069 void
17070 rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
17071 {
17072  va_list ap;
17073  VALUE mesg = rb_str_new_cstr("internal parser error: ");
17074 
17075  va_start(ap, fmt);
17076  rb_str_vcatf(mesg, fmt, ap);
17077  va_end(ap);
17078  parser_yyerror(p, NULL, RSTRING_PTR(mesg));
17079  RB_GC_GUARD(mesg);
17080 
17081  mesg = rb_str_new(0, 0);
17082  append_lex_state_name(p->lex.state, mesg);
17083  compile_error(p, "lex.state: %"PRIsVALUE, mesg);
17084  rb_str_resize(mesg, 0);
17085  append_bitstack_value(p->cond_stack, mesg);
17086  compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
17087  rb_str_resize(mesg, 0);
17088  append_bitstack_value(p->cmdarg_stack, mesg);
17089  compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
17090  if (p->debug_output == rb_stdout)
17091  p->debug_output = rb_stderr;
17092  p->debug = TRUE;
17093 }
17094 
17095 YYLTYPE *
17097 {
17098  int sourceline = here->sourceline;
17099  int beg_pos = (int)here->offset - here->quote
17100  - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
17101  int end_pos = (int)here->offset + here->length + here->quote;
17102 
17103  yylloc->beg_pos.lineno = sourceline;
17104  yylloc->beg_pos.column = beg_pos;
17105  yylloc->end_pos.lineno = sourceline;
17106  yylloc->end_pos.column = end_pos;
17107  return yylloc;
17108 }
17109 
17110 YYLTYPE *
17112 {
17113  yylloc->beg_pos.lineno = p->ruby_sourceline;
17114  yylloc->beg_pos.column = (int)(p->lex.ptok - p->lex.pbeg);
17115  yylloc->end_pos.lineno = p->ruby_sourceline;
17116  yylloc->end_pos.column = (int)(p->lex.ptok - p->lex.pbeg);
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.pcur - p->lex.pbeg);
17127  return yylloc;
17128 }
17129 #endif /* !RIPPER */
17130 
17131 static void
17132 parser_token_value_print(struct parser_params *p, enum yytokentype type, const YYSTYPE *valp)
17133 {
17134  VALUE v;
17135 
17136  switch (type) {
17137  case tIDENTIFIER: case tFID: case tGVAR: case tIVAR:
17138  case tCONSTANT: case tCVAR: case tLABEL: case tOP_ASGN:
17139 #ifndef RIPPER
17140  v = rb_id2str(valp->id);
17141 #else
17142  v = valp->node->nd_rval;
17143 #endif
17144  rb_parser_printf(p, "%"PRIsVALUE, v);
17145  break;
17146  case tINTEGER: case tFLOAT: case tRATIONAL: case tIMAGINARY:
17147  case tSTRING_CONTENT: case tCHAR:
17148 #ifndef RIPPER
17149  v = valp->node->nd_lit;
17150 #else
17151  v = valp->val;
17152 #endif
17153  rb_parser_printf(p, "%+"PRIsVALUE, v);
17154  break;
17155  case tNTH_REF:
17156 #ifndef RIPPER
17157  rb_parser_printf(p, "$%ld", valp->node->nd_nth);
17158 #else
17159  rb_parser_printf(p, "%"PRIsVALUE, valp->val);
17160 #endif
17161  break;
17162  case tBACK_REF:
17163 #ifndef RIPPER
17164  rb_parser_printf(p, "$%c", (int)valp->node->nd_nth);
17165 #else
17166  rb_parser_printf(p, "%"PRIsVALUE, valp->val);
17167 #endif
17168  break;
17169  default:
17170  break;
17171  }
17172 }
17173 
17174 static int
17175 assignable0(struct parser_params *p, ID id, const char **err)
17176 {
17177  if (!id) return -1;
17178  switch (id) {
17179  case keyword_self:
17180  *err = "Can't change the value of self";
17181  return -1;
17182  case keyword_nil:
17183  *err = "Can't assign to nil";
17184  return -1;
17185  case keyword_true:
17186  *err = "Can't assign to true";
17187  return -1;
17188  case keyword_false:
17189  *err = "Can't assign to false";
17190  return -1;
17191  case keyword__FILE__:
17192  *err = "Can't assign to __FILE__";
17193  return -1;
17194  case keyword__LINE__:
17195  *err = "Can't assign to __LINE__";
17196  return -1;
17197  case keyword__ENCODING__:
17198  *err = "Can't assign to __ENCODING__";
17199  return -1;
17200  }
17201  switch (id_type(id)) {
17202  case ID_LOCAL:
17203  if (dyna_in_block(p)) {
17204  if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
17205  compile_error(p, "Can't assign to numbered parameter _%d",
17206  NUMPARAM_ID_TO_IDX(id));
17207  return -1;
17208  }
17209  if (dvar_curr(p, id)) return NODE_DASGN_CURR;
17210  if (dvar_defined(p, id)) return NODE_DASGN;
17211  if (local_id(p, id)) return NODE_LASGN;
17212  dyna_var(p, id);
17213  return NODE_DASGN_CURR;
17214  }
17215  else {
17216  if (!local_id(p, id)) local_var(p, id);
17217  return NODE_LASGN;
17218  }
17219  break;
17220  case ID_GLOBAL: return NODE_GASGN;
17221  case ID_INSTANCE: return NODE_IASGN;
17222  case ID_CONST:
17223  if (!p->in_def) return NODE_CDECL;
17224  *err = "dynamic constant assignment";
17225  return -1;
17226  case ID_CLASS: return NODE_CVASGN;
17227  default:
17228  compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
17229  }
17230  return -1;
17231 }
17232 
17233 #ifndef RIPPER
17234 static NODE*
17235 assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
17236 {
17237  const char *err = 0;
17238  int node_type = assignable0(p, id, &err);
17239  switch (node_type) {
17240  case NODE_DASGN_CURR: return NEW_DASGN_CURR(id, val, loc);
17241  case NODE_DASGN: return NEW_DASGN(id, val, loc);
17242  case NODE_LASGN: return NEW_LASGN(id, val, loc);
17243  case NODE_GASGN: return NEW_GASGN(id, val, loc);
17244  case NODE_IASGN: return NEW_IASGN(id, val, loc);
17245  case NODE_CDECL: return NEW_CDECL(id, val, 0, loc);
17246  case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
17247  }
17248  if (err) yyerror1(loc, err);
17249  return NEW_BEGIN(0, loc);
17250 }
17251 #else
17252 static VALUE
17253 assignable(struct parser_params *p, VALUE lhs)
17254 {
17255  const char *err = 0;
17256  assignable0(p, get_id(lhs), &err);
17257  if (err) lhs = assign_error(p, lhs);
17258  return lhs;
17259 }
17260 #endif
17261 
17262 static int
17263 is_private_local_id(ID name)
17264 {
17265  VALUE s;
17266  if (name == idUScore) return 1;
17267  if (!is_local_id(name)) return 0;
17268  s = rb_id2str(name);
17269  if (!s) return 0;
17270  return RSTRING_PTR(s)[0] == '_';
17271 }
17272 
17273 static int
17274 shadowing_lvar_0(struct parser_params *p, ID name)
17275 {
17276  if (is_private_local_id(name)) return 1;
17277  if (dyna_in_block(p)) {
17278  if (dvar_curr(p, name)) {
17279  yyerror0("duplicated argument name");
17280  }
17281  else if (dvar_defined(p, name) || local_id(p, name)) {
17282  vtable_add(p->lvtbl->vars, name);
17283  if (p->lvtbl->used) {
17285  }
17286  return 0;
17287  }
17288  }
17289  else {
17290  if (local_id(p, name)) {
17291  yyerror0("duplicated argument name");
17292  }
17293  }
17294  return 1;
17295 }
17296 
17297 static ID
17298 shadowing_lvar(struct parser_params *p, ID name)
17299 {
17300  shadowing_lvar_0(p, name);
17301  return name;
17302 }
17303 
17304 static void
17305 new_bv(struct parser_params *p, ID name)
17306 {
17307  if (!name) return;
17308  if (!is_local_id(name)) {
17309  compile_error(p, "invalid local variable - %"PRIsVALUE,
17310  rb_id2str(name));
17311  return;
17312  }
17313  if (!shadowing_lvar_0(p, name)) return;
17314  dyna_var(p, name);
17315 }
17316 
17317 #ifndef RIPPER
17318 static NODE *
17319 aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
17320 {
17321  return NEW_ATTRASGN(recv, tASET, idx, loc);
17322 }
17323 
17324 static void
17325 block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
17326 {
17327  if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) {
17328  compile_error(p, "both block arg and actual block given");
17329  }
17330 }
17331 
17332 static NODE *
17333 attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
17334 {
17335  if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
17336  return NEW_ATTRASGN(recv, id, 0, loc);
17337 }
17338 
17339 static void
17340 rb_backref_error(struct parser_params *p, NODE *node)
17341 {
17342  switch (nd_type(node)) {
17343  case NODE_NTH_REF:
17344  compile_error(p, "Can't set variable $%ld", node->nd_nth);
17345  break;
17346  case NODE_BACK_REF:
17347  compile_error(p, "Can't set variable $%c", (int)node->nd_nth);
17348  break;
17349  }
17350 }
17351 
17352 static NODE *
17353 arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
17354 {
17355  if (!node1) return NEW_LIST(node2, &node2->nd_loc);
17356  switch (nd_type(node1)) {
17357  case NODE_LIST:
17358  return list_append(p, node1, node2);
17359  case NODE_BLOCK_PASS:
17360  node1->nd_head = arg_append(p, node1->nd_head, node2, loc);
17361  node1->nd_loc.end_pos = node1->nd_head->nd_loc.end_pos;
17362  return node1;
17363  case NODE_ARGSPUSH:
17364  node1->nd_body = list_append(p, NEW_LIST(node1->nd_body, &node1->nd_body->nd_loc), node2);
17365  node1->nd_loc.end_pos = node1->nd_body->nd_loc.end_pos;
17366  nd_set_type(node1, NODE_ARGSCAT);
17367  return node1;
17368  case NODE_ARGSCAT:
17369  if (nd_type(node1->nd_body) != NODE_LIST) break;
17370  node1->nd_body = list_append(p, node1->nd_body, node2);
17371  node1->nd_loc.end_pos = node1->nd_body->nd_loc.end_pos;
17372  return node1;
17373  }
17374  return NEW_ARGSPUSH(node1, node2, loc);
17375 }
17376 
17377 static NODE *
17378 arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
17379 {
17380  if (!node2) return node1;
17381  switch (nd_type(node1)) {
17382  case NODE_BLOCK_PASS:
17383  if (node1->nd_head)
17384  node1->nd_head = arg_concat(p, node1->nd_head, node2, loc);
17385  else
17386  node1->nd_head = NEW_LIST(node2, loc);
17387  return node1;
17388  case NODE_ARGSPUSH:
17389  if (nd_type(node2) != NODE_LIST) break;
17390  node1->nd_body = list_concat(NEW_LIST(node1->nd_body, loc), node2);
17391  nd_set_type(node1, NODE_ARGSCAT);
17392  return node1;
17393  case NODE_ARGSCAT:
17394  if (nd_type(node2) != NODE_LIST ||
17395  nd_type(node1->nd_body) != NODE_LIST) break;
17396  node1->nd_body = list_concat(node1->nd_body, node2);
17397  return node1;
17398  }
17399  return NEW_ARGSCAT(node1, node2, loc);
17400 }
17401 
17402 static NODE *
17403 last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
17404 {
17405  NODE *n1;
17406  if ((n1 = splat_array(args)) != 0) {
17407  return list_append(p, n1, last_arg);
17408  }
17409  return arg_append(p, args, last_arg, loc);
17410 }
17411 
17412 static NODE *
17413 rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
17414 {
17415  NODE *n1;
17416  if ((nd_type(rest_arg) == NODE_LIST) && (n1 = splat_array(args)) != 0) {
17417  return list_concat(n1, rest_arg);
17418  }
17419  return arg_concat(p, args, rest_arg, loc);
17420 }
17421 
17422 static NODE *
17423 splat_array(NODE* node)
17424 {
17425  if (nd_type(node) == NODE_SPLAT) node = node->nd_head;
17426  if (nd_type(node) == NODE_LIST) return node;
17427  return 0;
17428 }
17429 
17430 static void
17431 mark_lvar_used(struct parser_params *p, NODE *rhs)
17432 {
17433  ID *vidp = NULL;
17434  if (!rhs) return;
17435  switch (nd_type(rhs)) {
17436  case NODE_LASGN:
17437  if (local_id_ref(p, rhs->nd_vid, &vidp)) {
17438  if (vidp) *vidp |= LVAR_USED;
17439  }
17440  break;
17441  case NODE_DASGN:
17442  case NODE_DASGN_CURR:
17443  if (dvar_defined_ref(p, rhs->nd_vid, &vidp)) {
17444  if (vidp) *vidp |= LVAR_USED;
17445  }
17446  break;
17447 #if 0
17448  case NODE_MASGN:
17449  for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
17450  mark_lvar_used(p, rhs->nd_head);
17451  }
17452  break;
17453 #endif
17454  }
17455 }
17456 
17457 static NODE *
17458 node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, const YYLTYPE *loc)
17459 {
17460  if (!lhs) return 0;
17461 
17462  switch (nd_type(lhs)) {
17463  case NODE_GASGN:
17464  case NODE_IASGN:
17465  case NODE_LASGN:
17466  case NODE_DASGN:
17467  case NODE_DASGN_CURR:
17468  case NODE_MASGN:
17469  case NODE_CDECL:
17470  case NODE_CVASGN:
17471  lhs->nd_value = rhs;
17472  nd_set_loc(lhs, loc);
17473  break;
17474 
17475  case NODE_ATTRASGN:
17476  lhs->nd_args = arg_append(p, lhs->nd_args, rhs, loc);
17477  nd_set_loc(lhs, loc);
17478  break;
17479 
17480  default:
17481  /* should not happen */
17482  break;
17483  }
17484 
17485  return lhs;
17486 }
17487 
17488 static NODE *
17489 value_expr_check(struct parser_params *p, NODE *node)
17490 {
17491  NODE *void_node = 0, *vn;
17492 
17493  if (!node) {
17494  rb_warning0("empty expression");
17495  }
17496  while (node) {
17497  switch (nd_type(node)) {
17498  case NODE_RETURN:
17499  case NODE_BREAK:
17500  case NODE_NEXT:
17501  case NODE_REDO:
17502  case NODE_RETRY:
17503  return void_node ? void_node : node;
17504 
17505  case NODE_CASE3:
17506  if (!node->nd_body || nd_type(node->nd_body) != NODE_IN) {
17507  compile_error(p, "unexpected node");
17508  return NULL;
17509  }
17510  if (node->nd_body->nd_body) {
17511  return NULL;
17512  }
17513  /* single line pattern matching */
17514  return void_node ? void_node : node;
17515 
17516  case NODE_BLOCK:
17517  while (node->nd_next) {
17518  node = node->nd_next;
17519  }
17520  node = node->nd_head;
17521  break;
17522 
17523  case NODE_BEGIN:
17524  node = node->nd_body;
17525  break;
17526 
17527  case NODE_IF:
17528  case NODE_UNLESS:
17529  if (!node->nd_body) {
17530  return NULL;
17531  }
17532  else if (!node->nd_else) {
17533  return NULL;
17534  }
17535  vn = value_expr_check(p, node->nd_body);
17536  if (!vn) return NULL;
17537  if (!void_node) void_node = vn;
17538  node = node->nd_else;
17539  break;
17540 
17541  case NODE_AND:
17542  case NODE_OR:
17543  node = node->nd_1st;
17544  break;
17545 
17546  case NODE_LASGN:
17547  case NODE_DASGN:
17548  case NODE_DASGN_CURR:
17549  case NODE_MASGN:
17550  mark_lvar_used(p, node);
17551  return NULL;
17552 
17553  default:
17554  return NULL;
17555  }
17556  }
17557 
17558  return NULL;
17559 }
17560 
17561 static int
17562 value_expr_gen(struct parser_params *p, NODE *node)
17563 {
17564  NODE *void_node = value_expr_check(p, node);
17565  if (void_node) {
17566  yyerror1(&void_node->nd_loc, "void value expression");
17567  /* or "control never reach"? */
17568  return FALSE;
17569  }
17570  return TRUE;
17571 }
17572 static void
17573 void_expr(struct parser_params *p, NODE *node)
17574 {
17575  const char *useless = 0;
17576 
17577  if (!RTEST(ruby_verbose)) return;
17578 
17579  if (!node || !(node = nd_once_body(node))) return;
17580  switch (nd_type(node)) {
17581  case NODE_OPCALL:
17582  switch (node->nd_mid) {
17583  case '+':
17584  case '-':
17585  case '*':
17586  case '/':
17587  case '%':
17588  case tPOW:
17589  case tUPLUS:
17590  case tUMINUS:
17591  case '|':
17592  case '^':
17593  case '&':
17594  case tCMP:
17595  case '>':
17596  case tGEQ:
17597  case '<':
17598  case tLEQ:
17599  case tEQ:
17600  case tNEQ:
17601  useless = rb_id2name(node->nd_mid);
17602  break;
17603  }
17604  break;
17605 
17606  case NODE_LVAR:
17607  case NODE_DVAR:
17608  case NODE_GVAR:
17609  case NODE_IVAR:
17610  case NODE_CVAR:
17611  case NODE_NTH_REF:
17612  case NODE_BACK_REF:
17613  useless = "a variable";
17614  break;
17615  case NODE_CONST:
17616  useless = "a constant";
17617  break;
17618  case NODE_LIT:
17619  case NODE_STR:
17620  case NODE_DSTR:
17621  case NODE_DREGX:
17622  useless = "a literal";
17623  break;
17624  case NODE_COLON2:
17625  case NODE_COLON3:
17626  useless = "::";
17627  break;
17628  case NODE_DOT2:
17629  useless = "..";
17630  break;
17631  case NODE_DOT3:
17632  useless = "...";
17633  break;
17634  case NODE_SELF:
17635  useless = "self";
17636  break;
17637  case NODE_NIL:
17638  useless = "nil";
17639  break;
17640  case NODE_TRUE:
17641  useless = "true";
17642  break;
17643  case NODE_FALSE:
17644  useless = "false";
17645  break;
17646  case NODE_DEFINED:
17647  useless = "defined?";
17648  break;
17649  }
17650 
17651  if (useless) {
17652  rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
17653  }
17654 }
17655 
17656 static NODE *
17657 void_stmts(struct parser_params *p, NODE *node)
17658 {
17659  NODE *const n = node;
17660  if (!RTEST(ruby_verbose)) return n;
17661  if (!node) return n;
17662  if (nd_type(node) != NODE_BLOCK) return n;
17663 
17664  while (node->nd_next) {
17665  void_expr(p, node->nd_head);
17666  node = node->nd_next;
17667  }
17668  return n;
17669 }
17670 
17671 static NODE *
17672 remove_begin(NODE *node)
17673 {
17674  NODE **n = &node, *n1 = node;
17675  while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) {
17676  *n = n1 = n1->nd_body;
17677  }
17678  return node;
17679 }
17680 
17681 static NODE *
17682 remove_begin_all(NODE *node)
17683 {
17684  NODE **n = &node, *n1 = node;
17685  while (n1 && nd_type(n1) == NODE_BEGIN) {
17686  *n = n1 = n1->nd_body;
17687  }
17688  return node;
17689 }
17690 
17691 static void
17692 reduce_nodes(struct parser_params *p, NODE **body)
17693 {
17694  NODE *node = *body;
17695 
17696  if (!node) {
17697  *body = NEW_NIL(&NULL_LOC);
17698  return;
17699  }
17700 #define subnodes(n1, n2) \
17701  ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \
17702  (!node->n2) ? (body = &node->n1, 1) : \
17703  (reduce_nodes(p, &node->n1), body = &node->n2, 1))
17704 
17705  while (node) {
17706  int newline = (int)(node->flags & NODE_FL_NEWLINE);
17707  switch (nd_type(node)) {
17708  end:
17709  case NODE_NIL:
17710  *body = 0;
17711  return;
17712  case NODE_RETURN:
17713  *body = node = node->nd_stts;
17714  if (newline && node) node->flags |= NODE_FL_NEWLINE;
17715  continue;
17716  case NODE_BEGIN:
17717  *body = node = node->nd_body;
17718  if (newline && node) node->flags |= NODE_FL_NEWLINE;
17719  continue;
17720  case NODE_BLOCK:
17721  body = &node->nd_end->nd_head;
17722  break;
17723  case NODE_IF:
17724  case NODE_UNLESS:
17725  if (subnodes(nd_body, nd_else)) break;
17726  return;
17727  case NODE_CASE:
17728  body = &node->nd_body;
17729  break;
17730  case NODE_WHEN:
17731  if (!subnodes(nd_body, nd_next)) goto end;
17732  break;
17733  case NODE_ENSURE:
17734  if (!subnodes(nd_head, nd_resq)) goto end;
17735  break;
17736  case NODE_RESCUE:
17737  if (node->nd_else) {
17738  body = &node->nd_resq;
17739  break;
17740  }
17741  if (!subnodes(nd_head, nd_resq)) goto end;
17742  break;
17743  default:
17744  return;
17745  }
17746  node = *body;
17747  if (newline && node) node->flags |= NODE_FL_NEWLINE;
17748  }
17749 
17750 #undef subnodes
17751 }
17752 
17753 static int
17754 is_static_content(NODE *node)
17755 {
17756  if (!node) return 1;
17757  switch (nd_type(node)) {
17758  case NODE_HASH:
17759  if (!(node = node->nd_head)) break;
17760  case NODE_LIST:
17761  do {
17762  if (!is_static_content(node->nd_head)) return 0;
17763  } while ((node = node->nd_next) != 0);
17764  case NODE_LIT:
17765  case NODE_STR:
17766  case NODE_NIL:
17767  case NODE_TRUE:
17768  case NODE_FALSE:
17769  case NODE_ZLIST:
17770  break;
17771  default:
17772  return 0;
17773  }
17774  return 1;
17775 }
17776 
17777 static int
17778 assign_in_cond(struct parser_params *p, NODE *node)
17779 {
17780  switch (nd_type(node)) {
17781  case NODE_MASGN:
17782  case NODE_LASGN:
17783  case NODE_DASGN:
17784  case NODE_DASGN_CURR:
17785  case NODE_GASGN:
17786  case NODE_IASGN:
17787  break;
17788 
17789  default:
17790  return 0;
17791  }
17792 
17793  if (!node->nd_value) return 1;
17794  if (is_static_content(node->nd_value)) {
17795  /* reports always */
17796  parser_warn(p, node->nd_value, "found `= literal' in conditional, should be ==");
17797  }
17798  return 1;
17799 }
17800 
17804  COND_IN_FF
17805 };
17806 
17807 #define SWITCH_BY_COND_TYPE(t, w, arg) \
17808  switch (t) { \
17809  case COND_IN_OP: break; \
17810  case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
17811  case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
17812  }
17813 
17814 static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*);
17815 
17816 static NODE*
17817 range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
17818 {
17819  enum node_type type;
17820 
17821  if (node == 0) return 0;
17822 
17823  type = nd_type(node);
17824  value_expr(node);
17825  if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
17826  if (!e_option_supplied(p)) parser_warn(p, node, "integer literal in flip-flop");
17827  return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$."), loc), loc), loc);
17828  }
17829  return cond0(p, node, COND_IN_FF, loc);
17830 }
17831 
17832 static NODE*
17833 cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc)
17834 {
17835  if (node == 0) return 0;
17836  if (!(node = nd_once_body(node))) return 0;
17837  assign_in_cond(p, node);
17838 
17839  switch (nd_type(node)) {
17840  case NODE_DSTR:
17841  case NODE_EVSTR:
17842  case NODE_STR:
17843  SWITCH_BY_COND_TYPE(type, warn, "string ")
17844  break;
17845 
17846  case NODE_DREGX:
17847  if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ")
17848 
17849  return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
17850 
17851  case NODE_AND:
17852  case NODE_OR:
17853  node->nd_1st = cond0(p, node->nd_1st, COND_IN_COND, loc);
17854  node->nd_2nd = cond0(p, node->nd_2nd, COND_IN_COND, loc);
17855  break;
17856 
17857  case NODE_DOT2:
17858  case NODE_DOT3:
17859  node->nd_beg = range_op(p, node->nd_beg, loc);
17860  node->nd_end = range_op(p, node->nd_end, loc);
17861  if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
17862  else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
17863  break;
17864 
17865  case NODE_DSYM:
17866  SWITCH_BY_COND_TYPE(type, warning, "string ")
17867  break;
17868 
17869  case NODE_LIT:
17870  if (RB_TYPE_P(node->nd_lit, T_REGEXP)) {
17871  if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ")
17872  nd_set_type(node, NODE_MATCH);
17873  }
17874  else if (node->nd_lit == Qtrue ||
17875  node->nd_lit == Qfalse) {
17876  /* booleans are OK, e.g., while true */
17877  }
17878  else {
17879  SWITCH_BY_COND_TYPE(type, warning, "")
17880  }
17881  default:
17882  break;
17883  }
17884  return node;
17885 }
17886 
17887 static NODE*
17888 cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
17889 {
17890  if (node == 0) return 0;
17891  return cond0(p, node, COND_IN_COND, loc);
17892 }
17893 
17894 static NODE*
17895 method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
17896 {
17897  if (node == 0) return 0;
17898  return cond0(p, node, COND_IN_OP, loc);
17899 }
17900 
17901 static NODE*
17902 new_if(struct parser_params *p, NODE *cc, NODE *left, NODE *right, const YYLTYPE *loc)
17903 {
17904  if (!cc) return right;
17905  cc = cond0(p, cc, COND_IN_COND, loc);
17906  return newline_node(NEW_IF(cc, left, right, loc));
17907 }
17908 
17909 static NODE*
17910 new_unless(struct parser_params *p, NODE *cc, NODE *left, NODE *right, const YYLTYPE *loc)
17911 {
17912  if (!cc) return right;
17913  cc = cond0(p, cc, COND_IN_COND, loc);
17914  return newline_node(NEW_UNLESS(cc, left, right, loc));
17915 }
17916 
17917 static NODE*
17918 logop(struct parser_params *p, ID id, NODE *left, NODE *right,
17919  const YYLTYPE *op_loc, const YYLTYPE *loc)
17920 {
17921  enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
17922  NODE *op;
17923  value_expr(left);
17924  if (left && (enum node_type)nd_type(left) == type) {
17925  NODE *node = left, *second;
17926  while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) {
17927  node = second;
17928  }
17929  node->nd_2nd = NEW_NODE(type, second, right, 0, loc);
17930  nd_set_line(node->nd_2nd, op_loc->beg_pos.lineno);
17931  left->nd_loc.end_pos = loc->end_pos;
17932  return left;
17933  }
17934  op = NEW_NODE(type, left, right, 0, loc);
17935  nd_set_line(op, op_loc->beg_pos.lineno);
17936  return op;
17937 }
17938 
17939 static void
17940 no_blockarg(struct parser_params *p, NODE *node)
17941 {
17942  if (node && nd_type(node) == NODE_BLOCK_PASS) {
17943  compile_error(p, "block argument should not be given");
17944  }
17945 }
17946 
17947 static NODE *
17948 ret_args(struct parser_params *p, NODE *node)
17949 {
17950  if (node) {
17951  no_blockarg(p, node);
17952  if (nd_type(node) == NODE_LIST) {
17953  if (node->nd_next == 0) {
17954  node = node->nd_head;
17955  }
17956  else {
17957  nd_set_type(node, NODE_VALUES);
17958  }
17959  }
17960  }
17961  return node;
17962 }
17963 
17964 static NODE *
17965 new_yield(struct parser_params *p, NODE *node, const YYLTYPE *loc)
17966 {
17967  if (node) no_blockarg(p, node);
17968 
17969  return NEW_YIELD(node, loc);
17970 }
17971 
17972 static VALUE
17973 negate_lit(struct parser_params *p, VALUE lit)
17974 {
17975  if (FIXNUM_P(lit)) {
17976  return LONG2FIX(-FIX2LONG(lit));
17977  }
17978  if (SPECIAL_CONST_P(lit)) {
17979 #if USE_FLONUM
17980  if (FLONUM_P(lit)) {
17981  return DBL2NUM(-RFLOAT_VALUE(lit));
17982  }
17983 #endif
17984  goto unknown;
17985  }
17986  switch (BUILTIN_TYPE(lit)) {
17987  case T_BIGNUM:
17988  BIGNUM_NEGATE(lit);
17989  lit = rb_big_norm(lit);
17990  break;
17991  case T_RATIONAL:
17992  RRATIONAL_SET_NUM(lit, negate_lit(p, RRATIONAL(lit)->num));
17993  break;
17994  case T_COMPLEX:
17995  RCOMPLEX_SET_REAL(lit, negate_lit(p, RCOMPLEX(lit)->real));
17996  RCOMPLEX_SET_IMAG(lit, negate_lit(p, RCOMPLEX(lit)->imag));
17997  break;
17998  case T_FLOAT:
17999  RFLOAT(lit)->float_value = -RFLOAT_VALUE(lit);
18000  break;
18001  unknown:
18002  default:
18003  rb_parser_fatal(p, "unknown literal type (%s) passed to negate_lit",
18004  rb_builtin_class_name(lit));
18005  break;
18006  }
18007  return lit;
18008 }
18009 
18010 static NODE *
18011 arg_blk_pass(NODE *node1, NODE *node2)
18012 {
18013  if (node2) {
18014  if (!node1) return node2;
18015  node2->nd_head = node1;
18016  nd_set_first_lineno(node2, nd_first_lineno(node1));
18017  nd_set_first_column(node2, nd_first_column(node1));
18018  return node2;
18019  }
18020  return node1;
18021 }
18022 
18023 static bool
18024 args_info_empty_p(struct rb_args_info *args)
18025 {
18026  if (args->pre_args_num) return false;
18027  if (args->post_args_num) return false;
18028  if (args->rest_arg) return false;
18029  if (args->opt_args) return false;
18030  if (args->block_arg) return false;
18031  if (args->kw_args) return false;
18032  if (args->kw_rest_arg) return false;
18033  return true;
18034 }
18035 
18036 static NODE*
18037 new_args(struct parser_params *p, NODE *pre_args, NODE *opt_args, ID rest_arg, NODE *post_args, NODE *tail, const YYLTYPE *loc)
18038 {
18039  int saved_line = p->ruby_sourceline;
18040  struct rb_args_info *args = tail->nd_ainfo;
18041 
18042  args->pre_args_num = pre_args ? rb_long2int(pre_args->nd_plen) : 0;
18043  args->pre_init = pre_args ? pre_args->nd_next : 0;
18044 
18045  args->post_args_num = post_args ? rb_long2int(post_args->nd_plen) : 0;
18046  args->post_init = post_args ? post_args->nd_next : 0;
18047  args->first_post_arg = post_args ? post_args->nd_pid : 0;
18048 
18049  args->rest_arg = rest_arg;
18050 
18051  args->opt_args = opt_args;
18052 
18053  args->ruby2_keywords = rest_arg == idFWD_REST;
18054 
18055  p->ruby_sourceline = saved_line;
18056  nd_set_loc(tail, loc);
18057 
18058  return tail;
18059 }
18060 
18061 static NODE*
18062 new_args_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *loc)
18063 {
18064  int saved_line = p->ruby_sourceline;
18065  NODE *node;
18067  struct rb_args_info *args = ZALLOC(struct rb_args_info);
18068  rb_imemo_tmpbuf_set_ptr(tmpbuf, args);
18069  args->imemo = tmpbuf;
18070  node = NEW_NODE(NODE_ARGS, 0, 0, args, &NULL_LOC);
18071  RB_OBJ_WRITTEN(p->ast, Qnil, tmpbuf);
18072  if (p->error_p) return node;
18073 
18074  args->block_arg = block;
18075  args->kw_args = kw_args;
18076 
18077  if (kw_args) {
18078  /*
18079  * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
18080  * variable order: k1, kr1, k2, &b, internal_id, krest
18081  * #=> <reorder>
18082  * variable order: kr1, k1, k2, internal_id, krest, &b
18083  */
18084  ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
18085  struct vtable *vtargs = p->lvtbl->args;
18086  NODE *kwn = kw_args;
18087 
18088  vtable_pop(vtargs, !!block + !!kw_rest_arg);
18089  required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
18090  while (kwn) {
18091  if (!NODE_REQUIRED_KEYWORD_P(kwn->nd_body))
18092  --kw_vars;
18093  --required_kw_vars;
18094  kwn = kwn->nd_next;
18095  }
18096 
18097  for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
18098  ID vid = kwn->nd_body->nd_vid;
18099  if (NODE_REQUIRED_KEYWORD_P(kwn->nd_body)) {
18100  *required_kw_vars++ = vid;
18101  }
18102  else {
18103  *kw_vars++ = vid;
18104  }
18105  }
18106 
18107  arg_var(p, kw_bits);
18108  if (kw_rest_arg) arg_var(p, kw_rest_arg);
18109  if (block) arg_var(p, block);
18110 
18111  args->kw_rest_arg = NEW_DVAR(kw_rest_arg, loc);
18112  args->kw_rest_arg->nd_cflag = kw_bits;
18113  }
18114  else if (kw_rest_arg == idNil) {
18115  args->no_kwarg = 1;
18116  }
18117  else if (kw_rest_arg) {
18118  args->kw_rest_arg = NEW_DVAR(kw_rest_arg, loc);
18119  }
18120 
18121  p->ruby_sourceline = saved_line;
18122  return node;
18123 }
18124 
18125 static NODE *
18126 args_with_numbered(struct parser_params *p, NODE *args, int max_numparam)
18127 {
18128  if (max_numparam > NO_PARAM) {
18129  if (!args) {
18130  YYLTYPE loc = RUBY_INIT_YYLLOC();
18131  args = new_args_tail(p, 0, 0, 0, 0);
18132  nd_set_loc(args, &loc);
18133  }
18134  args->nd_ainfo->pre_args_num = max_numparam;
18135  }
18136  return args;
18137 }
18138 
18139 static NODE*
18140 new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
18141 {
18142  struct rb_ary_pattern_info *apinfo = aryptn->nd_apinfo;
18143 
18144  aryptn->nd_pconst = constant;
18145 
18146  if (pre_arg) {
18147  NODE *pre_args = NEW_LIST(pre_arg, loc);
18148  if (apinfo->pre_args) {
18149  apinfo->pre_args = list_concat(pre_args, apinfo->pre_args);
18150  }
18151  else {
18152  apinfo->pre_args = pre_args;
18153  }
18154  }
18155  return aryptn;
18156 }
18157 
18158 static NODE*
18159 new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, ID rest_arg, NODE *post_args, const YYLTYPE *loc)
18160 {
18161  int saved_line = p->ruby_sourceline;
18162  NODE *node;
18164  struct rb_ary_pattern_info *apinfo = ZALLOC(struct rb_ary_pattern_info);
18165  rb_imemo_tmpbuf_set_ptr(tmpbuf, apinfo);
18166  node = NEW_NODE(NODE_ARYPTN, 0, 0, apinfo, loc);
18167  apinfo->imemo = tmpbuf;
18168  RB_OBJ_WRITTEN(p->ast, Qnil, tmpbuf);
18169 
18170  apinfo->pre_args = pre_args;
18171 
18172  if (has_rest) {
18173  if (rest_arg) {
18174  apinfo->rest_arg = assignable(p, rest_arg, 0, loc);
18175  }
18176  else {
18178  }
18179  }
18180  else {
18181  apinfo->rest_arg = NULL;
18182  }
18183 
18184  apinfo->post_args = post_args;
18185 
18186  p->ruby_sourceline = saved_line;
18187  return node;
18188 }
18189 
18190 static NODE*
18191 new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
18192 {
18193  hshptn->nd_pconst = constant;
18194  return hshptn;
18195 }
18196 
18197 static NODE*
18198 new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
18199 {
18200  int saved_line = p->ruby_sourceline;
18201  NODE *node, *kw_rest_arg_node;
18202 
18203  if (kw_rest_arg == idNil) {
18204  kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
18205  }
18206  else if (kw_rest_arg) {
18207  kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
18208  }
18209  else {
18210  kw_rest_arg_node = NULL;
18211  }
18212 
18213  node = NEW_NODE(NODE_HSHPTN, 0, kw_args, kw_rest_arg_node, loc);
18214 
18215  p->ruby_sourceline = saved_line;
18216  return node;
18217 }
18218 
18219 static NODE *
18220 new_case3(struct parser_params *p, NODE *val, NODE *pat, const YYLTYPE *loc)
18221 {
18222  NODE *node = NEW_CASE3(val, pat, loc);
18223 
18225  rb_warn0L(nd_line(node), "Pattern matching is experimental, and the behavior may change in future versions of Ruby!");
18226  return node;
18227 }
18228 
18229 static NODE*
18230 dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
18231 {
18232  VALUE lit;
18233 
18234  if (!node) {
18235  return NEW_LIT(ID2SYM(idNULL), loc);
18236  }
18237 
18238  switch (nd_type(node)) {
18239  case NODE_DSTR:
18240  nd_set_type(node, NODE_DSYM);
18241  nd_set_loc(node, loc);
18242  break;
18243  case NODE_STR:
18244  lit = node->nd_lit;
18245  RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit = ID2SYM(rb_intern_str(lit)));
18246  nd_set_type(node, NODE_LIT);
18247  nd_set_loc(node, loc);
18248  break;
18249  default:
18250  node = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST(node, loc), loc);
18251  break;
18252  }
18253  return node;
18254 }
18255 
18256 static int
18257 append_literal_keys(st_data_t k, st_data_t v, st_data_t h)
18258 {
18259  NODE *node = (NODE *)v;
18260  NODE **result = (NODE **)h;
18261  node->nd_alen = 2;
18262  node->nd_next->nd_end = node->nd_next;
18263  node->nd_next->nd_next = 0;
18264  if (*result)
18265  list_concat(*result, node);
18266  else
18267  *result = node;
18268  return ST_CONTINUE;
18269 }
18270 
18271 static NODE *
18272 remove_duplicate_keys(struct parser_params *p, NODE *hash)
18273 {
18274  st_table *literal_keys = st_init_numtable_with_size(hash->nd_alen / 2);
18275  NODE *result = 0;
18276  rb_code_location_t loc = hash->nd_loc;
18277  while (hash && hash->nd_head && hash->nd_next) {
18278  NODE *head = hash->nd_head;
18279  NODE *value = hash->nd_next;
18280  NODE *next = value->nd_next;
18281  VALUE key = (VALUE)head;
18282  st_data_t data;
18283  if (nd_type(head) == NODE_LIT &&
18284  st_lookup(literal_keys, (key = head->nd_lit), &data)) {
18286  "key %+"PRIsVALUE" is duplicated and overwritten on line %d",
18287  head->nd_lit, nd_line(head));
18288  head = ((NODE *)data)->nd_next;
18289  head->nd_head = block_append(p, head->nd_head, value->nd_head);
18290  }
18291  else {
18292  st_insert(literal_keys, (st_data_t)key, (st_data_t)hash);
18293  }
18294  hash = next;
18295  }
18296  st_foreach(literal_keys, append_literal_keys, (st_data_t)&result);
18297  st_free_table(literal_keys);
18298  if (hash) {
18299  if (!result) result = hash;
18300  else list_concat(result, hash);
18301  }
18302  result->nd_loc = loc;
18303  return result;
18304 }
18305 
18306 static NODE *
18307 new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
18308 {
18309  if (hash) hash = remove_duplicate_keys(p, hash);
18310  return NEW_HASH(hash, loc);
18311 }
18312 #endif
18313 
18314 static void
18315 error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
18316 {
18317  if (is_private_local_id(id)) {
18318  return;
18319  }
18320  if (st_is_member(p->pvtbl, id)) {
18321  yyerror1(loc, "duplicated variable name");
18322  }
18323  else {
18324  st_insert(p->pvtbl, (st_data_t)id, 0);
18325  }
18326 }
18327 
18328 static void
18329 error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
18330 {
18331  if (!p->pktbl) {
18332  p->pktbl = st_init_numtable();
18333  }
18334  else if (st_is_member(p->pktbl, key)) {
18335  yyerror1(loc, "duplicated key name");
18336  return;
18337  }
18338  st_insert(p->pktbl, (st_data_t)key, 0);
18339 }
18340 
18341 #ifndef RIPPER
18342 static NODE *
18343 new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
18344 {
18345  return NEW_HASH(hash, loc);
18346 }
18347 #endif /* !RIPPER */
18348 
18349 #ifndef RIPPER
18350 static NODE *
18351 new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc)
18352 {
18353  NODE *asgn;
18354 
18355  if (lhs) {
18356  ID vid = lhs->nd_vid;
18357  YYLTYPE lhs_loc = lhs->nd_loc;
18358  if (op == tOROP) {
18359  lhs->nd_value = rhs;
18360  nd_set_loc(lhs, loc);
18361  asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
18362  if (is_notop_id(vid)) {
18363  switch (id_type(vid)) {
18364  case ID_GLOBAL:
18365  case ID_INSTANCE:
18366  case ID_CLASS:
18367  asgn->nd_aid = vid;
18368  }
18369  }
18370  }
18371  else if (op == tANDOP) {
18372  lhs->nd_value = rhs;
18373  nd_set_loc(lhs, loc);
18374  asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
18375  }
18376  else {
18377  asgn = lhs;
18378  asgn->nd_value = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
18379  nd_set_loc(asgn, loc);
18380  }
18381  }
18382  else {
18383  asgn = NEW_BEGIN(0, loc);
18384  }
18385  return asgn;
18386 }
18387 
18388 static NODE *
18389 new_ary_op_assign(struct parser_params *p, NODE *ary,
18390  NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc)
18391 {
18392  NODE *asgn;
18393 
18394  args = make_list(args, args_loc);
18395  if (nd_type(args) == NODE_BLOCK_PASS) {
18396  args = NEW_ARGSCAT(args, rhs, loc);
18397  }
18398  else {
18399  args = arg_concat(p, args, rhs, loc);
18400  }
18401  asgn = NEW_OP_ASGN1(ary, op, args, loc);
18402  fixpos(asgn, ary);
18403  return asgn;
18404 }
18405 
18406 static NODE *
18407 new_attr_op_assign(struct parser_params *p, NODE *lhs,
18408  ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc)
18409 {
18410  NODE *asgn;
18411 
18412  asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc);
18413  fixpos(asgn, lhs);
18414  return asgn;
18415 }
18416 
18417 static NODE *
18418 new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc)
18419 {
18420  NODE *asgn;
18421 
18422  if (lhs) {
18423  asgn = NEW_OP_CDECL(lhs, op, rhs, loc);
18424  }
18425  else {
18426  asgn = NEW_BEGIN(0, loc);
18427  }
18428  fixpos(asgn, lhs);
18429  return asgn;
18430 }
18431 
18432 static NODE *
18433 const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
18434 {
18435  if (p->in_def) {
18436  yyerror1(loc, "dynamic constant assignment");
18437  }
18438  return NEW_CDECL(0, 0, (path), loc);
18439 }
18440 #else
18441 static VALUE
18442 const_decl(struct parser_params *p, VALUE path)
18443 {
18444  if (p->in_def) {
18445  path = dispatch1(assign_error, path);
18446  ripper_error(p);
18447  }
18448  return path;
18449 }
18450 
18451 static VALUE
18452 assign_error(struct parser_params *p, VALUE a)
18453 {
18454  a = dispatch1(assign_error, a);
18455  ripper_error(p);
18456  return a;
18457 }
18458 
18459 static VALUE
18460 var_field(struct parser_params *p, VALUE a)
18461 {
18462  return ripper_new_yylval(p, get_id(a), dispatch1(var_field, a), 0);
18463 }
18464 #endif
18465 
18466 #ifndef RIPPER
18467 static NODE *
18468 new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
18469 {
18470  NODE *result = head;
18471  if (rescue) {
18472  NODE *tmp = rescue_else ? rescue_else : rescue;
18473  YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
18474 
18475  result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
18476  nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
18477  }
18478  else if (rescue_else) {
18479  result = block_append(p, result, rescue_else);
18480  }
18481  if (ensure) {
18482  result = NEW_ENSURE(result, ensure, loc);
18483  }
18484  fixpos(result, head);
18485  return result;
18486 }
18487 #endif
18488 
18489 static void
18490 warn_unused_var(struct parser_params *p, struct local_vars *local)
18491 {
18492  int cnt;
18493 
18494  if (!local->used) return;
18495  cnt = local->used->pos;
18496  if (cnt != local->vars->pos) {
18497  rb_parser_fatal(p, "local->used->pos != local->vars->pos");
18498  }
18499 #ifndef RIPPER
18500  ID *v = local->vars->tbl;
18501  ID *u = local->used->tbl;
18502  for (int i = 0; i < cnt; ++i) {
18503  if (!v[i] || (u[i] & LVAR_USED)) continue;
18504  if (is_private_local_id(v[i])) continue;
18505  rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
18506  }
18507 #endif
18508 }
18509 
18510 static void
18511 local_push(struct parser_params *p, int toplevel_scope)
18512 {
18513  struct local_vars *local;
18514  int inherits_dvars = toplevel_scope && compile_for_eval;
18515  int warn_unused_vars = RTEST(ruby_verbose);
18516 
18517  local = ALLOC(struct local_vars);
18518  local->prev = p->lvtbl;
18519  local->args = vtable_alloc(0);
18520  local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
18521 #ifndef RIPPER
18522  if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
18523  if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
18524  local->numparam.outer = 0;
18525  local->numparam.inner = 0;
18526  local->numparam.current = 0;
18527 #endif
18528  local->used = warn_unused_vars ? vtable_alloc(0) : 0;
18529 
18530 # if WARN_PAST_SCOPE
18531  local->past = 0;
18532 # endif
18533  CMDARG_PUSH(0);
18534  COND_PUSH(0);
18535  p->lvtbl = local;
18536 }
18537 
18538 static void
18539 local_pop(struct parser_params *p)
18540 {
18541  struct local_vars *local = p->lvtbl->prev;
18542  if (p->lvtbl->used) {
18543  warn_unused_var(p, p->lvtbl);
18544  vtable_free(p->lvtbl->used);
18545  }
18546 # if WARN_PAST_SCOPE
18547  while (p->lvtbl->past) {
18548  struct vtable *past = p->lvtbl->past;
18549  p->lvtbl->past = past->prev;
18550  vtable_free(past);
18551  }
18552 # endif
18553  vtable_free(p->lvtbl->args);
18554  vtable_free(p->lvtbl->vars);
18555  CMDARG_POP();
18556  COND_POP();
18557  ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
18558  p->lvtbl = local;
18559 }
18560 
18561 #ifndef RIPPER
18562 static ID*
18563 local_tbl(struct parser_params *p)
18564 {
18565  int cnt_args = vtable_size(p->lvtbl->args);
18566  int cnt_vars = vtable_size(p->lvtbl->vars);
18567  int cnt = cnt_args + cnt_vars;
18568  int i, j;
18569  ID *buf;
18570 
18571  if (cnt <= 0) return 0;
18572  buf = ALLOC_N(ID, cnt + 2);
18573  MEMCPY(buf+1, p->lvtbl->args->tbl, ID, cnt_args);
18574  /* remove IDs duplicated to warn shadowing */
18575  for (i = 0, j = cnt_args+1; i < cnt_vars; ++i) {
18576  ID id = p->lvtbl->vars->tbl[i];
18577  if (!vtable_included(p->lvtbl->args, id)) {
18578  buf[j++] = id;
18579  }
18580  }
18581  if (--j < cnt) {
18582  REALLOC_N(buf, ID, (cnt = j) + 2);
18583  }
18584  buf[0] = cnt;
18586 
18587  return buf;
18588 }
18589 
18590 static NODE*
18591 node_newnode_with_locals(struct parser_params *p, enum node_type type, VALUE a1, VALUE a2, const rb_code_location_t *loc)
18592 {
18593  ID *a0;
18594  NODE *n;
18595 
18596  a0 = local_tbl(p);
18597  n = NEW_NODE(type, a0, a1, a2, loc);
18598  return n;
18599 }
18600 
18601 #endif
18602 
18603 static void
18604 numparam_name(struct parser_params *p, ID id)
18605 {
18606  if (!NUMPARAM_ID_P(id)) return;
18607  rb_warn1("`_%d' is reserved for numbered parameter; consider another name",
18608  WARN_I(NUMPARAM_ID_TO_IDX(id)));
18609 }
18610 
18611 static void
18612 arg_var(struct parser_params *p, ID id)
18613 {
18614  numparam_name(p, id);
18615  vtable_add(p->lvtbl->args, id);
18616 }
18617 
18618 static void
18619 local_var(struct parser_params *p, ID id)
18620 {
18621  numparam_name(p, id);
18622  vtable_add(p->lvtbl->vars, id);
18623  if (p->lvtbl->used) {
18625  }
18626 }
18627 
18628 static int
18629 local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
18630 {
18631  struct vtable *vars, *args, *used;
18632 
18633  vars = p->lvtbl->vars;
18634  args = p->lvtbl->args;
18635  used = p->lvtbl->used;
18636 
18637  while (vars && !DVARS_TERMINAL_P(vars->prev)) {
18638  vars = vars->prev;
18639  args = args->prev;
18640  if (used) used = used->prev;
18641  }
18642 
18643  if (vars && vars->prev == DVARS_INHERIT) {
18644  return rb_local_defined(id, p->parent_iseq);
18645  }
18646  else if (vtable_included(args, id)) {
18647  return 1;
18648  }
18649  else {
18650  int i = vtable_included(vars, id);
18651  if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
18652  return i != 0;
18653  }
18654 }
18655 
18656 static int
18657 local_id(struct parser_params *p, ID id)
18658 {
18659  return local_id_ref(p, id, NULL);
18660 }
18661 
18662 static NODE *
18663 numparam_push(struct parser_params *p)
18664 {
18665 #ifndef RIPPER
18666  struct local_vars *local = p->lvtbl;
18667  NODE *inner = local->numparam.inner;
18668  if (!local->numparam.outer) {
18669  local->numparam.outer = local->numparam.current;
18670  }
18671  local->numparam.inner = 0;
18672  local->numparam.current = 0;
18673  return inner;
18674 #else
18675  return 0;
18676 #endif
18677 }
18678 
18679 static void
18680 numparam_pop(struct parser_params *p, NODE *prev_inner)
18681 {
18682 #ifndef RIPPER
18683  struct local_vars *local = p->lvtbl;
18684  if (prev_inner) {
18685  /* prefer first one */
18686  local->numparam.inner = prev_inner;
18687  }
18688  else if (local->numparam.current) {
18689  /* current and inner are exclusive */
18690  local->numparam.inner = local->numparam.current;
18691  }
18692  if (p->max_numparam > NO_PARAM) {
18693  /* current and outer are exclusive */
18694  local->numparam.current = local->numparam.outer;
18695  local->numparam.outer = 0;
18696  }
18697  else {
18698  /* no numbered parameter */
18699  local->numparam.current = 0;
18700  }
18701 #endif
18702 }
18703 
18704 static const struct vtable *
18705 dyna_push(struct parser_params *p)
18706 {
18707  p->lvtbl->args = vtable_alloc(p->lvtbl->args);
18708  p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
18709  if (p->lvtbl->used) {
18710  p->lvtbl->used = vtable_alloc(p->lvtbl->used);
18711  }
18712  return p->lvtbl->args;
18713 }
18714 
18715 static void
18716 dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
18717 {
18718  struct vtable *tmp = *vtblp;
18719  *vtblp = tmp->prev;
18720 # if WARN_PAST_SCOPE
18721  if (p->past_scope_enabled) {
18722  tmp->prev = p->lvtbl->past;
18723  p->lvtbl->past = tmp;
18724  return;
18725  }
18726 # endif
18727  vtable_free(tmp);
18728 }
18729 
18730 static void
18731 dyna_pop_1(struct parser_params *p)
18732 {
18733  struct vtable *tmp;
18734 
18735  if ((tmp = p->lvtbl->used) != 0) {
18736  warn_unused_var(p, p->lvtbl);
18737  p->lvtbl->used = p->lvtbl->used->prev;
18738  vtable_free(tmp);
18739  }
18740  dyna_pop_vtable(p, &p->lvtbl->args);
18741  dyna_pop_vtable(p, &p->lvtbl->vars);
18742 }
18743 
18744 static void
18745 dyna_pop(struct parser_params *p, const struct vtable *lvargs)
18746 {
18747  while (p->lvtbl->args != lvargs) {
18748  dyna_pop_1(p);
18749  if (!p->lvtbl->args) {
18750  struct local_vars *local = p->lvtbl->prev;
18751  ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
18752  p->lvtbl = local;
18753  }
18754  }
18755  dyna_pop_1(p);
18756 }
18757 
18758 static int
18759 dyna_in_block(struct parser_params *p)
18760 {
18761  return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
18762 }
18763 
18764 static int
18765 dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
18766 {
18767  struct vtable *vars, *args, *used;
18768  int i;
18769 
18770  args = p->lvtbl->args;
18771  vars = p->lvtbl->vars;
18772  used = p->lvtbl->used;
18773 
18774  while (!DVARS_TERMINAL_P(vars)) {
18775  if (vtable_included(args, id)) {
18776  return 1;
18777  }
18778  if ((i = vtable_included(vars, id)) != 0) {
18779  if (used && vidrefp) *vidrefp = &used->tbl[i-1];
18780  return 1;
18781  }
18782  args = args->prev;
18783  vars = vars->prev;
18784  if (!vidrefp) used = 0;
18785  if (used) used = used->prev;
18786  }
18787 
18788  if (vars == DVARS_INHERIT) {
18789  return rb_dvar_defined(id, p->parent_iseq);
18790  }
18791 
18792  return 0;
18793 }
18794 
18795 static int
18796 dvar_defined(struct parser_params *p, ID id)
18797 {
18798  return dvar_defined_ref(p, id, NULL);
18799 }
18800 
18801 static int
18802 dvar_curr(struct parser_params *p, ID id)
18803 {
18804  return (vtable_included(p->lvtbl->args, id) ||
18805  vtable_included(p->lvtbl->vars, id));
18806 }
18807 
18808 static void
18809 reg_fragment_enc_error(struct parser_params* p, VALUE str, int c)
18810 {
18811  compile_error(p,
18812  "regexp encoding option '%c' differs from source encoding '%s'",
18813  c, rb_enc_name(rb_enc_get(str)));
18814 }
18815 
18816 #ifndef RIPPER
18817 int
18819 {
18820  int c = RE_OPTION_ENCODING_IDX(options);
18821 
18822  if (c) {
18823  int opt, idx;
18824  rb_char_to_option_kcode(c, &opt, &idx);
18825  if (idx != ENCODING_GET(str) &&
18827  goto error;
18828  }
18829  ENCODING_SET(str, idx);
18830  }
18831  else if (RE_OPTION_ENCODING_NONE(options)) {
18832  if (!ENCODING_IS_ASCII8BIT(str) &&
18834  c = 'n';
18835  goto error;
18836  }
18838  }
18839  else if (p->enc == rb_usascii_encoding()) {
18841  /* raise in re.c */
18843  }
18844  else {
18846  }
18847  }
18848  return 0;
18849 
18850  error:
18851  return c;
18852 }
18853 
18854 static void
18855 reg_fragment_setenc(struct parser_params* p, VALUE str, int options)
18856 {
18857  int c = rb_reg_fragment_setenc(p, str, options);
18858  if (c) reg_fragment_enc_error(p, str, c);
18859 }
18860 
18861 static int
18862 reg_fragment_check(struct parser_params* p, VALUE str, int options)
18863 {
18864  VALUE err;
18865  reg_fragment_setenc(p, str, options);
18867  if (err != Qnil) {
18869  compile_error(p, "%"PRIsVALUE, err);
18870  return 0;
18871  }
18872  return 1;
18873 }
18874 
18875 typedef struct {
18876  struct parser_params* parser;
18877  rb_encoding *enc;
18878  NODE *succ_block;
18879  const YYLTYPE *loc;
18881 
18882 static int
18883 reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
18884  int back_num, int *back_refs, OnigRegex regex, void *arg0)
18885 {
18887  struct parser_params* p = arg->parser;
18888  rb_encoding *enc = arg->enc;
18889  long len = name_end - name;
18890  const char *s = (const char *)name;
18891  ID var;
18892  NODE *node, *succ;
18893 
18894  if (!len) return ST_CONTINUE;
18895  if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len))
18896  return ST_CONTINUE;
18897  if (rb_enc_symname_type(s, len, enc, (1U<<ID_LOCAL)) != ID_LOCAL)
18898  return ST_CONTINUE;
18899 
18900  var = intern_cstr(s, len, enc);
18901  node = node_assign(p, assignable(p, var, 0, arg->loc), NEW_LIT(ID2SYM(var), arg->loc), arg->loc);
18902  succ = arg->succ_block;
18903  if (!succ) succ = NEW_BEGIN(0, arg->loc);
18904  succ = block_append(p, succ, node);
18905  arg->succ_block = succ;
18906  return ST_CONTINUE;
18907 }
18908 
18909 static NODE *
18910 reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc)
18911 {
18913 
18914  arg.parser = p;
18915  arg.enc = rb_enc_get(regexp);
18916  arg.succ_block = 0;
18917  arg.loc = loc;
18918  onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
18919 
18920  if (!arg.succ_block) return 0;
18921  return arg.succ_block->nd_next;
18922 }
18923 
18924 static VALUE
18925 parser_reg_compile(struct parser_params* p, VALUE str, int options)
18926 {
18927  reg_fragment_setenc(p, str, options);
18928  return rb_parser_reg_compile(p, str, options);
18929 }
18930 
18931 VALUE
18933 {
18935 }
18936 
18937 static VALUE
18938 reg_compile(struct parser_params* p, VALUE str, int options)
18939 {
18940  VALUE re;
18941  VALUE err;
18942 
18943  err = rb_errinfo();
18944  re = parser_reg_compile(p, str, options);
18945  if (NIL_P(re)) {
18948  compile_error(p, "%"PRIsVALUE, m);
18949  return Qnil;
18950  }
18951  return re;
18952 }
18953 #else
18954 static VALUE
18955 parser_reg_compile(struct parser_params* p, VALUE str, int options, VALUE *errmsg)
18956 {
18957  VALUE err = rb_errinfo();
18958  VALUE re;
18959  str = ripper_is_node_yylval(str) ? RNODE(str)->nd_cval : str;
18960  int c = rb_reg_fragment_setenc(p, str, options);
18961  if (c) reg_fragment_enc_error(p, str, c);
18962  re = rb_parser_reg_compile(p, str, options);
18963  if (NIL_P(re)) {
18964  *errmsg = rb_attr_get(rb_errinfo(), idMesg);
18966  }
18967  return re;
18968 }
18969 #endif
18970 
18971 #ifndef RIPPER
18972 void
18973 rb_parser_set_options(VALUE vparser, int print, int loop, int chomp, int split)
18974 {
18975  struct parser_params *p;
18976  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
18977  p->do_print = print;
18978  p->do_loop = loop;
18979  p->do_chomp = chomp;
18980  p->do_split = split;
18981 }
18982 
18983 void
18984 rb_parser_warn_location(VALUE vparser, int warn)
18985 {
18986  struct parser_params *p;
18987  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
18988  p->warn_location = warn;
18989 }
18990 
18991 static NODE *
18992 parser_append_options(struct parser_params *p, NODE *node)
18993 {
18994  static const YYLTYPE default_location = {{1, 0}, {1, 0}};
18995  const YYLTYPE *const LOC = &default_location;
18996 
18997  if (p->do_print) {
18998  NODE *print = NEW_FCALL(rb_intern("print"),
18999  NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
19000  LOC);
19001  node = block_append(p, node, print);
19002  }
19003 
19004  if (p->do_loop) {
19005  if (p->do_split) {
19006  NODE *args = NEW_LIST(NEW_GVAR(rb_intern("$;"), LOC), LOC);
19007  NODE *split = NEW_GASGN(rb_intern("$F"),
19009  rb_intern("split"), args, LOC),
19010  LOC);
19011  node = block_append(p, split, node);
19012  }
19013  if (p->do_chomp) {
19014  NODE *chomp = NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
19015  rb_intern("chomp!"), 0, LOC);
19016  node = block_append(p, chomp, node);
19017  }
19018 
19019  node = NEW_WHILE(NEW_VCALL(idGets, LOC), node, 1, LOC);
19020  }
19021 
19022  return node;
19023 }
19024 
19025 void
19027 {
19028  /* just to suppress unused-function warnings */
19029  (void)nodetype;
19030  (void)nodeline;
19031 }
19032 
19033 static ID
19034 internal_id(struct parser_params *p)
19035 {
19036  const ID max_id = RB_ID_SERIAL_MAX & ~0xffff;
19037  ID id = (ID)vtable_size(p->lvtbl->args) + (ID)vtable_size(p->lvtbl->vars);
19038  id = max_id - id;
19039  return ID_STATIC_SYM | ID_INTERNAL | (id << ID_SCOPE_SHIFT);
19040 }
19041 #endif /* !RIPPER */
19042 
19043 static void
19044 parser_initialize(struct parser_params *p)
19045 {
19046  /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
19047  p->command_start = TRUE;
19049  p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
19050  p->node_id = 0;
19051 #ifdef RIPPER
19052  p->delayed.token = Qnil;
19053  p->result = Qnil;
19054  p->parsing_thread = Qnil;
19055 #else
19056  p->error_buffer = Qfalse;
19057 #endif
19058  p->debug_buffer = Qnil;
19059  p->debug_output = rb_stdout;
19060  p->enc = rb_utf8_encoding();
19061 }
19062 
19063 #ifdef RIPPER
19064 #define parser_mark ripper_parser_mark
19065 #define parser_free ripper_parser_free
19066 #endif
19067 
19068 static void
19069 parser_mark(void *ptr)
19070 {
19071  struct parser_params *p = (struct parser_params*)ptr;
19072 
19073  rb_gc_mark(p->lex.input);
19074  rb_gc_mark(p->lex.prevline);
19075  rb_gc_mark(p->lex.lastline);
19076  rb_gc_mark(p->lex.nextline);
19078  rb_gc_mark((VALUE)p->lex.strterm);
19079  rb_gc_mark((VALUE)p->ast);
19080  rb_gc_mark(p->case_labels);
19081 #ifndef RIPPER
19082  rb_gc_mark(p->debug_lines);
19085 #else
19086  rb_gc_mark(p->delayed.token);
19087  rb_gc_mark(p->value);
19088  rb_gc_mark(p->result);
19089  rb_gc_mark(p->parsing_thread);
19090 #endif
19093 #ifdef YYMALLOC
19094  rb_gc_mark((VALUE)p->heap);
19095 #endif
19096 }
19097 
19098 static void
19099 parser_free(void *ptr)
19100 {
19101  struct parser_params *p = (struct parser_params*)ptr;
19102  struct local_vars *local, *prev;
19103 
19104  if (p->tokenbuf) {
19106  }
19107  for (local = p->lvtbl; local; local = prev) {
19108  if (local->vars) xfree(local->vars);
19109  prev = local->prev;
19110  xfree(local);
19111  }
19112  {
19113  token_info *ptinfo;
19114  while ((ptinfo = p->token_info) != 0) {
19115  p->token_info = ptinfo->next;
19116  xfree(ptinfo);
19117  }
19118  }
19119  xfree(ptr);
19120 }
19121 
19122 static size_t
19123 parser_memsize(const void *ptr)
19124 {
19125  struct parser_params *p = (struct parser_params*)ptr;
19126  struct local_vars *local;
19127  size_t size = sizeof(*p);
19128 
19129  size += p->toksiz;
19130  for (local = p->lvtbl; local; local = local->prev) {
19131  size += sizeof(*local);
19132  if (local->vars) size += local->vars->capa * sizeof(ID);
19133  }
19134  return size;
19135 }
19136 
19137 static const rb_data_type_t parser_data_type = {
19138 #ifndef RIPPER
19139  "parser",
19140 #else
19141  "ripper",
19142 #endif
19143  {
19144  parser_mark,
19145  parser_free,
19146  parser_memsize,
19147  },
19149 };
19150 
19151 #ifndef RIPPER
19152 #undef rb_reserved_word
19153 
19154 const struct kwtable *
19155 rb_reserved_word(const char *str, unsigned int len)
19156 {
19157  return reserved_word(str, len);
19158 }
19159 
19160 VALUE
19162 {
19163  struct parser_params *p;
19164  VALUE parser = TypedData_Make_Struct(0, struct parser_params,
19165  &parser_data_type, p);
19166  parser_initialize(p);
19167  return parser;
19168 }
19169 
19170 VALUE
19171 rb_parser_set_context(VALUE vparser, const struct rb_iseq_struct *base, int main)
19172 {
19173  struct parser_params *p;
19174 
19175  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19176  p->error_buffer = main ? Qfalse : Qnil;
19177  p->parent_iseq = base;
19178  return vparser;
19179 }
19180 #endif
19181 
19182 #ifdef RIPPER
19183 #define rb_parser_end_seen_p ripper_parser_end_seen_p
19184 #define rb_parser_encoding ripper_parser_encoding
19185 #define rb_parser_get_yydebug ripper_parser_get_yydebug
19186 #define rb_parser_set_yydebug ripper_parser_set_yydebug
19187 #define rb_parser_get_debug_output ripper_parser_get_debug_output
19188 #define rb_parser_set_debug_output ripper_parser_set_debug_output
19189 static VALUE ripper_parser_end_seen_p(VALUE vparser);
19190 static VALUE ripper_parser_encoding(VALUE vparser);
19191 static VALUE ripper_parser_get_yydebug(VALUE self);
19192 static VALUE ripper_parser_set_yydebug(VALUE self, VALUE flag);
19193 static VALUE ripper_parser_get_debug_output(VALUE self);
19194 static VALUE ripper_parser_set_debug_output(VALUE self, VALUE output);
19195 
19196 /*
19197  * call-seq:
19198  * ripper.error? -> Boolean
19199  *
19200  * Return true if parsed source has errors.
19201  */
19202 static VALUE
19203 ripper_error_p(VALUE vparser)
19204 {
19205  struct parser_params *p;
19206 
19207  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19208  return p->error_p ? Qtrue : Qfalse;
19209 }
19210 #endif
19211 
19212 /*
19213  * call-seq:
19214  * ripper.end_seen? -> Boolean
19215  *
19216  * Return true if parsed source ended by +\_\_END\_\_+.
19217  */
19218 VALUE
19220 {
19221  struct parser_params *p;
19222 
19223  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19224  return p->ruby__end__seen ? Qtrue : Qfalse;
19225 }
19226 
19227 /*
19228  * call-seq:
19229  * ripper.encoding -> encoding
19230  *
19231  * Return encoding of the source.
19232  */
19233 VALUE
19235 {
19236  struct parser_params *p;
19237 
19238  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19239  return rb_enc_from_encoding(p->enc);
19240 }
19241 
19242 #ifdef RIPPER
19243 /*
19244  * call-seq:
19245  * ripper.yydebug -> true or false
19246  *
19247  * Get yydebug.
19248  */
19249 VALUE
19250 rb_parser_get_yydebug(VALUE self)
19251 {
19252  struct parser_params *p;
19253 
19254  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19255  return p->debug ? Qtrue : Qfalse;
19256 }
19257 #endif
19258 
19259 /*
19260  * call-seq:
19261  * ripper.yydebug = flag
19262  *
19263  * Set yydebug.
19264  */
19265 VALUE
19267 {
19268  struct parser_params *p;
19269 
19270  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19271  p->debug = RTEST(flag);
19272  return flag;
19273 }
19274 
19275 /*
19276  * call-seq:
19277  * ripper.debug_output -> obj
19278  *
19279  * Get debug output.
19280  */
19281 VALUE
19283 {
19284  struct parser_params *p;
19285 
19286  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19287  return p->debug_output;
19288 }
19289 
19290 /*
19291  * call-seq:
19292  * ripper.debug_output = obj
19293  *
19294  * Set 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 = output;
19303 }
19304 
19305 #ifndef RIPPER
19306 #ifdef YYMALLOC
19307 #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE))
19308 /* Keep the order; NEWHEAP then xmalloc and ADD2HEAP to get rid of
19309  * potential memory leak */
19310 #define NEWHEAP() rb_imemo_tmpbuf_parser_heap(0, p->heap, 0)
19311 #define ADD2HEAP(new, cnt, ptr) ((p->heap = (new))->ptr = (ptr), \
19312  (new)->cnt = (cnt), (ptr))
19313 
19314 void *
19316 {
19317  size_t cnt = HEAPCNT(1, size);
19319  void *ptr = xmalloc(size);
19320 
19321  return ADD2HEAP(n, cnt, ptr);
19322 }
19323 
19324 void *
19325 rb_parser_calloc(struct parser_params *p, size_t nelem, size_t size)
19326 {
19327  size_t cnt = HEAPCNT(nelem, size);
19329  void *ptr = xcalloc(nelem, size);
19330 
19331  return ADD2HEAP(n, cnt, ptr);
19332 }
19333 
19334 void *
19335 rb_parser_realloc(struct parser_params *p, void *ptr, size_t size)
19336 {
19338  size_t cnt = HEAPCNT(1, size);
19339 
19340  if (ptr && (n = p->heap) != NULL) {
19341  do {
19342  if (n->ptr == ptr) {
19343  n->ptr = ptr = xrealloc(ptr, size);
19344  if (n->cnt) n->cnt = cnt;
19345  return ptr;
19346  }
19347  } while ((n = n->next) != NULL);
19348  }
19349  n = NEWHEAP();
19350  ptr = xrealloc(ptr, size);
19351  return ADD2HEAP(n, cnt, ptr);
19352 }
19353 
19354 void
19356 {
19357  rb_imemo_tmpbuf_t **prev = &p->heap, *n;
19358 
19359  while ((n = *prev) != NULL) {
19360  if (n->ptr == ptr) {
19361  *prev = n->next;
19363  break;
19364  }
19365  prev = &n->next;
19366  }
19367  xfree(ptr);
19368 }
19369 #endif
19370 
19371 void
19372 rb_parser_printf(struct parser_params *p, const char *fmt, ...)
19373 {
19374  va_list ap;
19375  VALUE mesg = p->debug_buffer;
19376 
19377  if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
19378  va_start(ap, fmt);
19379  rb_str_vcatf(mesg, fmt, ap);
19380  va_end(ap);
19381  if (RSTRING_END(mesg)[-1] == '\n') {
19382  rb_io_write(p->debug_output, mesg);
19383  p->debug_buffer = Qnil;
19384  }
19385 }
19386 
19387 static void
19388 parser_compile_error(struct parser_params *p, const char *fmt, ...)
19389 {
19390  va_list ap;
19391 
19393  p->error_p = 1;
19394  va_start(ap, fmt);
19395  p->error_buffer =
19398  p->ruby_sourceline,
19399  rb_long2int(p->lex.pcur - p->lex.pbeg),
19400  p->enc, fmt, ap);
19401  va_end(ap);
19402 }
19403 
19404 static size_t
19405 count_char(const char *str, int c)
19406 {
19407  int n = 0;
19408  while (str[n] == c) ++n;
19409  return n;
19410 }
19411 
19412 /*
19413  * strip enclosing double-quotes, same as the default yytnamerr except
19414  * for that single-quotes matching back-quotes do not stop stripping.
19415  *
19416  * "\"`class' keyword\"" => "`class' keyword"
19417  */
19418 RUBY_FUNC_EXPORTED size_t
19419 rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
19420 {
19421  YYUSE(p);
19422  if (*yystr == '"') {
19423  size_t yyn = 0, bquote = 0;
19424  const char *yyp = yystr;
19425 
19426  while (*++yyp) {
19427  switch (*yyp) {
19428  case '`':
19429  if (!bquote) {
19430  bquote = count_char(yyp+1, '`') + 1;
19431  if (yyres) memcpy(&yyres[yyn], yyp, bquote);
19432  yyn += bquote;
19433  yyp += bquote - 1;
19434  break;
19435  }
19436  goto default_char;
19437 
19438  case '\'':
19439  if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
19440  if (yyres) memcpy(yyres + yyn, yyp, bquote);
19441  yyn += bquote;
19442  yyp += bquote - 1;
19443  bquote = 0;
19444  break;
19445  }
19446  if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
19447  if (yyres) memcpy(yyres + yyn, yyp, 3);
19448  yyn += 3;
19449  yyp += 2;
19450  break;
19451  }
19452  goto do_not_strip_quotes;
19453 
19454  case ',':
19455  goto do_not_strip_quotes;
19456 
19457  case '\\':
19458  if (*++yyp != '\\')
19459  goto do_not_strip_quotes;
19460  /* Fall through. */
19461  default_char:
19462  default:
19463  if (yyres)
19464  yyres[yyn] = *yyp;
19465  yyn++;
19466  break;
19467 
19468  case '"':
19469  case '\0':
19470  if (yyres)
19471  yyres[yyn] = '\0';
19472  return yyn;
19473  }
19474  }
19475  do_not_strip_quotes: ;
19476  }
19477 
19478  if (!yyres) return strlen(yystr);
19479 
19480  return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
19481 }
19482 #endif
19483 
19484 #ifdef RIPPER
19485 #ifdef RIPPER_DEBUG
19486 /* :nodoc: */
19487 static VALUE
19488 ripper_validate_object(VALUE self, VALUE x)
19489 {
19490  if (x == Qfalse) return x;
19491  if (x == Qtrue) return x;
19492  if (x == Qnil) return x;
19493  if (x == Qundef)
19494  rb_raise(rb_eArgError, "Qundef given");
19495  if (FIXNUM_P(x)) return x;
19496  if (SYMBOL_P(x)) return x;
19497  switch (BUILTIN_TYPE(x)) {
19498  case T_STRING:
19499  case T_OBJECT:
19500  case T_ARRAY:
19501  case T_BIGNUM:
19502  case T_FLOAT:
19503  case T_COMPLEX:
19504  case T_RATIONAL:
19505  break;
19506  case T_NODE:
19507  if (nd_type((NODE *)x) != NODE_RIPPER) {
19508  rb_raise(rb_eArgError, "NODE given: %p", (void *)x);
19509  }
19510  x = ((NODE *)x)->nd_rval;
19511  break;
19512  default:
19513  rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)",
19514  (void *)x, rb_obj_classname(x));
19515  }
19516  if (!RBASIC_CLASS(x)) {
19517  rb_raise(rb_eArgError, "hidden ruby object: %p (%s)",
19518  (void *)x, rb_builtin_type_name(TYPE(x)));
19519  }
19520  return x;
19521 }
19522 #endif
19523 
19524 #define validate(x) ((x) = get_value(x))
19525 
19526 static VALUE
19527 ripper_dispatch0(struct parser_params *p, ID mid)
19528 {
19529  return rb_funcall(p->value, mid, 0);
19530 }
19531 
19532 static VALUE
19533 ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
19534 {
19535  validate(a);
19536  return rb_funcall(p->value, mid, 1, a);
19537 }
19538 
19539 static VALUE
19540 ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
19541 {
19542  validate(a);
19543  validate(b);
19544  return rb_funcall(p->value, mid, 2, a, b);
19545 }
19546 
19547 static VALUE
19548 ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
19549 {
19550  validate(a);
19551  validate(b);
19552  validate(c);
19553  return rb_funcall(p->value, mid, 3, a, b, c);
19554 }
19555 
19556 static VALUE
19557 ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
19558 {
19559  validate(a);
19560  validate(b);
19561  validate(c);
19562  validate(d);
19563  return rb_funcall(p->value, mid, 4, a, b, c, d);
19564 }
19565 
19566 static VALUE
19567 ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
19568 {
19569  validate(a);
19570  validate(b);
19571  validate(c);
19572  validate(d);
19573  validate(e);
19574  return rb_funcall(p->value, mid, 5, a, b, c, d, e);
19575 }
19576 
19577 static VALUE
19578 ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
19579 {
19580  validate(a);
19581  validate(b);
19582  validate(c);
19583  validate(d);
19584  validate(e);
19585  validate(f);
19586  validate(g);
19587  return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
19588 }
19589 
19590 static ID
19591 ripper_get_id(VALUE v)
19592 {
19593  NODE *nd;
19594  if (!RB_TYPE_P(v, T_NODE)) return 0;
19595  nd = (NODE *)v;
19596  if (nd_type(nd) != NODE_RIPPER) return 0;
19597  return nd->nd_vid;
19598 }
19599 
19600 static VALUE
19601 ripper_get_value(VALUE v)
19602 {
19603  NODE *nd;
19604  if (v == Qundef) return Qnil;
19605  if (!RB_TYPE_P(v, T_NODE)) return v;
19606  nd = (NODE *)v;
19607  if (nd_type(nd) != NODE_RIPPER) return Qnil;
19608  return nd->nd_rval;
19609 }
19610 
19611 static void
19612 ripper_error(struct parser_params *p)
19613 {
19614  p->error_p = TRUE;
19615 }
19616 
19617 static void
19618 ripper_compile_error(struct parser_params *p, const char *fmt, ...)
19619 {
19620  VALUE str;
19621  va_list args;
19622 
19623  va_start(args, fmt);
19624  str = rb_vsprintf(fmt, args);
19625  va_end(args);
19626  rb_funcall(p->value, rb_intern("compile_error"), 1, str);
19627  ripper_error(p);
19628 }
19629 
19630 static VALUE
19631 ripper_lex_get_generic(struct parser_params *p, VALUE src)
19632 {
19633  VALUE line = rb_funcallv_public(src, id_gets, 0, 0);
19634  if (!NIL_P(line) && !RB_TYPE_P(line, T_STRING)) {
19636  "gets returned %"PRIsVALUE" (expected String or nil)",
19637  rb_obj_class(line));
19638  }
19639  return line;
19640 }
19641 
19642 static VALUE
19643 ripper_lex_io_get(struct parser_params *p, VALUE src)
19644 {
19645  return rb_io_gets(src);
19646 }
19647 
19648 static VALUE
19649 ripper_s_allocate(VALUE klass)
19650 {
19651  struct parser_params *p;
19653  &parser_data_type, p);
19654  p->value = self;
19655  return self;
19656 }
19657 
19658 #define ripper_initialized_p(r) ((r)->lex.input != 0)
19659 
19660 /*
19661  * call-seq:
19662  * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper
19663  *
19664  * Create a new Ripper object.
19665  * _src_ must be a String, an IO, or an Object which has #gets method.
19666  *
19667  * This method does not starts parsing.
19668  * See also Ripper#parse and Ripper.parse.
19669  */
19670 static VALUE
19671 ripper_initialize(int argc, VALUE *argv, VALUE self)
19672 {
19673  struct parser_params *p;
19674  VALUE src, fname, lineno;
19675 
19676  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19677  rb_scan_args(argc, argv, "12", &src, &fname, &lineno);
19678  if (RB_TYPE_P(src, T_FILE)) {
19679  p->lex.gets = ripper_lex_io_get;
19680  }
19681  else if (rb_respond_to(src, id_gets)) {
19682  p->lex.gets = ripper_lex_get_generic;
19683  }
19684  else {
19685  StringValue(src);
19686  p->lex.gets = lex_get_str;
19687  }
19688  p->lex.input = src;
19689  p->eofp = 0;
19690  if (NIL_P(fname)) {
19691  fname = STR_NEW2("(ripper)");
19692  OBJ_FREEZE(fname);
19693  }
19694  else {
19695  StringValueCStr(fname);
19696  fname = rb_str_new_frozen(fname);
19697  }
19698  parser_initialize(p);
19699 
19700  p->ruby_sourcefile_string = fname;
19701  p->ruby_sourcefile = RSTRING_PTR(fname);
19702  p->ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1;
19703 
19704  return Qnil;
19705 }
19706 
19707 static VALUE
19708 ripper_parse0(VALUE parser_v)
19709 {
19710  struct parser_params *p;
19711 
19712  TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, p);
19713  parser_prepare(p);
19714  p->ast = rb_ast_new();
19715  ripper_yyparse((void*)p);
19716  rb_ast_dispose(p->ast);
19717  p->ast = 0;
19718  return p->result;
19719 }
19720 
19721 static VALUE
19722 ripper_ensure(VALUE parser_v)
19723 {
19724  struct parser_params *p;
19725 
19726  TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, p);
19727  p->parsing_thread = Qnil;
19728  return Qnil;
19729 }
19730 
19731 /*
19732  * call-seq:
19733  * ripper.parse
19734  *
19735  * Start parsing and returns the value of the root action.
19736  */
19737 static VALUE
19738 ripper_parse(VALUE self)
19739 {
19740  struct parser_params *p;
19741 
19742  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19743  if (!ripper_initialized_p(p)) {
19744  rb_raise(rb_eArgError, "method called for uninitialized object");
19745  }
19746  if (!NIL_P(p->parsing_thread)) {
19747  if (p->parsing_thread == rb_thread_current())
19748  rb_raise(rb_eArgError, "Ripper#parse is not reentrant");
19749  else
19750  rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe");
19751  }
19752  p->parsing_thread = rb_thread_current();
19753  rb_ensure(ripper_parse0, self, ripper_ensure, self);
19754 
19755  return p->result;
19756 }
19757 
19758 /*
19759  * call-seq:
19760  * ripper.column -> Integer
19761  *
19762  * Return column number of current parsing line.
19763  * This number starts from 0.
19764  */
19765 static VALUE
19766 ripper_column(VALUE self)
19767 {
19768  struct parser_params *p;
19769  long col;
19770 
19771  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19772  if (!ripper_initialized_p(p)) {
19773  rb_raise(rb_eArgError, "method called for uninitialized object");
19774  }
19775  if (NIL_P(p->parsing_thread)) return Qnil;
19776  col = p->lex.ptok - p->lex.pbeg;
19777  return LONG2NUM(col);
19778 }
19779 
19780 /*
19781  * call-seq:
19782  * ripper.filename -> String
19783  *
19784  * Return current parsing filename.
19785  */
19786 static VALUE
19787 ripper_filename(VALUE self)
19788 {
19789  struct parser_params *p;
19790 
19791  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19792  if (!ripper_initialized_p(p)) {
19793  rb_raise(rb_eArgError, "method called for uninitialized object");
19794  }
19795  return p->ruby_sourcefile_string;
19796 }
19797 
19798 /*
19799  * call-seq:
19800  * ripper.lineno -> Integer
19801  *
19802  * Return line number of current parsing line.
19803  * This number starts from 1.
19804  */
19805 static VALUE
19806 ripper_lineno(VALUE self)
19807 {
19808  struct parser_params *p;
19809 
19810  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19811  if (!ripper_initialized_p(p)) {
19812  rb_raise(rb_eArgError, "method called for uninitialized object");
19813  }
19814  if (NIL_P(p->parsing_thread)) return Qnil;
19815  return INT2NUM(p->ruby_sourceline);
19816 }
19817 
19818 /*
19819  * call-seq:
19820  * ripper.state -> Integer
19821  *
19822  * Return scanner state of current token.
19823  */
19824 static VALUE
19825 ripper_state(VALUE self)
19826 {
19827  struct parser_params *p;
19828 
19829  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19830  if (!ripper_initialized_p(p)) {
19831  rb_raise(rb_eArgError, "method called for uninitialized object");
19832  }
19833  if (NIL_P(p->parsing_thread)) return Qnil;
19834  return INT2NUM(p->lex.state);
19835 }
19836 
19837 /*
19838  * call-seq:
19839  * ripper.token -> String
19840  *
19841  * Return the current token string.
19842  */
19843 static VALUE
19844 ripper_token(VALUE self)
19845 {
19846  struct parser_params *p;
19847  long pos, len;
19848 
19849  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19850  if (!ripper_initialized_p(p)) {
19851  rb_raise(rb_eArgError, "method called for uninitialized object");
19852  }
19853  if (NIL_P(p->parsing_thread)) return Qnil;
19854  pos = p->lex.ptok - p->lex.pbeg;
19855  len = p->lex.pcur - p->lex.ptok;
19856  return rb_str_subseq(p->lex.lastline, pos, len);
19857 }
19858 
19859 #ifdef RIPPER_DEBUG
19860 /* :nodoc: */
19861 static VALUE
19862 ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg)
19863 {
19864  StringValue(msg);
19865  if (obj == Qundef) {
19866  rb_raise(rb_eArgError, "%"PRIsVALUE, msg);
19867  }
19868  return Qnil;
19869 }
19870 
19871 /* :nodoc: */
19872 static VALUE
19873 ripper_value(VALUE self, VALUE obj)
19874 {
19875  return ULONG2NUM(obj);
19876 }
19877 #endif
19878 
19879 /*
19880  * call-seq:
19881  * Ripper.lex_state_name(integer) -> string
19882  *
19883  * Returns a string representation of lex_state.
19884  */
19885 static VALUE
19886 ripper_lex_state_name(VALUE self, VALUE state)
19887 {
19889 }
19890 
19891 void
19892 Init_ripper(void)
19893 {
19894  ripper_init_eventids1();
19895  ripper_init_eventids2();
19896  id_warn = rb_intern_const("warn");
19897  id_warning = rb_intern_const("warning");
19898  id_gets = rb_intern_const("gets");
19899  id_assoc = rb_intern_const("=>");
19900 
19901  (void)yystpcpy; /* may not used in newer bison */
19902 
19903  InitVM(ripper);
19904 }
19905 
19906 void
19907 InitVM_ripper(void)
19908 {
19909  VALUE Ripper;
19910 
19911  Ripper = rb_define_class("Ripper", rb_cObject);
19912  /* version of Ripper */
19913  rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION));
19914  rb_define_alloc_func(Ripper, ripper_s_allocate);
19915  rb_define_method(Ripper, "initialize", ripper_initialize, -1);
19916  rb_define_method(Ripper, "parse", ripper_parse, 0);
19917  rb_define_method(Ripper, "column", ripper_column, 0);
19918  rb_define_method(Ripper, "filename", ripper_filename, 0);
19919  rb_define_method(Ripper, "lineno", ripper_lineno, 0);
19920  rb_define_method(Ripper, "state", ripper_state, 0);
19921  rb_define_method(Ripper, "token", ripper_token, 0);
19922  rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0);
19923  rb_define_method(Ripper, "encoding", rb_parser_encoding, 0);
19924  rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0);
19925  rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1);
19926  rb_define_method(Ripper, "debug_output", rb_parser_get_debug_output, 0);
19927  rb_define_method(Ripper, "debug_output=", rb_parser_set_debug_output, 1);
19928  rb_define_method(Ripper, "error?", ripper_error_p, 0);
19929 #ifdef RIPPER_DEBUG
19930  rb_define_method(Ripper, "assert_Qundef", ripper_assert_Qundef, 2);
19931  rb_define_method(Ripper, "rawVALUE", ripper_value, 1);
19932  rb_define_method(Ripper, "validate_object", ripper_validate_object, 1);
19933 #endif
19934 
19935  rb_define_singleton_method(Ripper, "dedent_string", parser_dedent_string, 2);
19936  rb_define_private_method(Ripper, "dedent_string", parser_dedent_string, 2);
19937 
19938  rb_define_singleton_method(Ripper, "lex_state_name", ripper_lex_state_name, 1);
19939 
19940 <% @exprs.each do |expr, desc| -%>
19941  /* <%=desc%> */
19942  rb_define_const(Ripper, "<%=expr%>", INT2NUM(<%=expr%>));
19943 <% end %>
19944  ripper_init_eventids1_table(Ripper);
19945  ripper_init_eventids2_table(Ripper);
19946 
19947 # if 0
19948  /* Hack to let RDoc document SCRIPT_LINES__ */
19949 
19950  /*
19951  * When a Hash is assigned to +SCRIPT_LINES__+ the contents of files loaded
19952  * after the assignment will be added as an Array of lines with the file
19953  * name as the key.
19954  */
19955  rb_define_global_const("SCRIPT_LINES__", Qnil);
19956 #endif
19957 
19958 }
19959 #endif /* RIPPER */
19960 
19961 /*
19962  * Local variables:
19963  * mode: c
19964  * c-file-style: "ruby"
19965  * End:
19966  */
memset
void * memset(void *, int, size_t)
idNULL
@ idNULL
Definition: id.h:113
token_info::indent
int indent
Definition: ripper.c:254
NODE_NEXT
@ NODE_NEXT
Definition: node.h:38
parser_params::has_shebang
unsigned int has_shebang
Definition: ripper.c:333
kwtable
Definition: lex.c:34
rb_io_gets
VALUE rb_io_gets(VALUE)
Definition: io.c:3573
strncmp
int strncmp(const char *, const char *, size_t)
FLONUM_P
#define FLONUM_P(x)
Definition: ruby.h:430
va_end
#define va_end(v)
Definition: rb_mjit_min_header-2.7.2.h:3982
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:110
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
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:116
ISASCII
#define ISASCII(c)
Definition: ruby.h:2304
ID
unsigned long ID
Definition: ruby.h:103
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:12901
keyword_defined
@ keyword_defined
Definition: parse.h:92
parser_params::call
VALUE(* call)(VALUE, int)
Definition: ripper.c:288
rb_id2name
const char * rb_id2name(ID)
Definition: symbol.c:801
add_delayed_token
#define add_delayed_token(p, tok, end)
Definition: parse.c:12946
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:14602
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:123
error
const rb_iseq_t const char * error
Definition: rb_mjit_min_header-2.7.2.h:13471
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:12888
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:13780
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:122
tNMATCH
@ tNMATCH
Definition: parse.h:127
rb_ast_newnode
NODE * rb_ast_newnode(rb_ast_t *ast, enum node_type type)
Definition: node.c:1198
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:126
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:13775
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:42
str_dquote
@ str_dquote
Definition: parse.c:12896
rb_ast_struct::body
rb_ast_body_t body
Definition: node.h:402
local_vars
Definition: ripper.c:214
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:13033
rb_ary_pattern_info::pre_args
NODE * pre_args
Definition: node.h:455
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:4278
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:12201
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:7066
tLAMBEG
@ tLAMBEG
Definition: parse.h:163
eventids1.c
HEAPCNT
#define HEAPCNT(n, size)
Definition: parse.c:19307
NODE_TRUE
@ NODE_TRUE
Definition: node.h:117
string_type
string_type
Definition: ripper.c:12938
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:9382
NODE_NTH_REF
@ NODE_NTH_REF
Definition: node.h:79
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:12928
NODE_ZLIST
@ NODE_ZLIST
Definition: node.h:68
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:90
rb_warn1
#define rb_warn1(fmt, a)
Definition: parse.c:951
k__END__
@ k__END__
Definition: eventids2.c:9
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
idMesg
@ idMesg
Definition: rb_mjit_min_header-2.7.2.h:8692
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:13781
NODE_OR
@ NODE_OR
Definition: node.h:46
int
__inline__ int
Definition: rb_mjit_min_header-2.7.2.h:2845
NODE_ARYPTN
@ NODE_ARYPTN
Definition: node.h:125
regenc.h
IS_END
#define IS_END()
Definition: parse.c:13774
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:1387
token_info
Definition: ripper.c:251
rb_parser_set_options
void rb_parser_set_options(VALUE vparser, int print, int loop, int chomp, int split)
Definition: parse.c:18973
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
idNil
@ idNil
Definition: rb_mjit_min_header-2.7.2.h:8703
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_gc_force_recycle
void rb_gc_force_recycle(VALUE obj)
Definition: gc.c:7014
tLPAREN
@ tLPAREN
Definition: parse.h:141
INT2FIX
#define INT2FIX(i)
Definition: ruby.h:263
rb_hash_clear
VALUE rb_hash_clear(VALUE hash)
Definition: hash.c:2769
EXPR_VALUE
@ EXPR_VALUE
Definition: parse.c:166
NEW_BEGIN
#define NEW_BEGIN(b, loc)
Definition: node.h:306
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:70
WARN_LOCATION
#define WARN_LOCATION(type)
Definition: parse.c:16655
rb_strterm_heredoc_struct::func
unsigned func
Definition: ripper.c:745
NEWHEAP
#define NEWHEAP()
Definition: parse.c:19310
rb_parser_set_debug_output
VALUE rb_parser_set_debug_output(VALUE self, VALUE output)
Definition: parse.c:19297
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:77
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:166
RSTRING_PTR
#define RSTRING_PTR(str)
Definition: ruby.h:1009
parser_params::gets
VALUE(* gets)(struct parser_params *, VALUE)
Definition: ripper.c:277
i
uint32_t i
Definition: rb_mjit_min_header-2.7.2.h:5460
NODE_LASGN
@ NODE_LASGN
Definition: node.h:48
EXPR_END_bit
@ EXPR_END_bit
Definition: parse.c:136
idUMinus
@ idUMinus
Definition: id.h:82
rb_str_cat_cstr
#define rb_str_cat_cstr(str, ptr)
Definition: rb_mjit_min_header-2.7.2.h:6122
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:19315
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
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:12895
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:113
NODE_ARGSPUSH
@ NODE_ARGSPUSH
Definition: node.h:98
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
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:27
idFWD_KWREST
#define idFWD_KWREST
Definition: parse.c:697
long
#define long
Definition: rb_mjit_min_header-2.7.2.h:2889
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:925
va_list
__gnuc_va_list va_list
Definition: rb_mjit_min_header-2.7.2.h:834
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:97
rb_eSyntaxError
VALUE rb_eSyntaxError
Definition: error.c:940
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
rb_warn3L
#define rb_warn3L(l, fmt, a, b, c)
Definition: parse.c:963
IS_LABEL_POSSIBLE
#define IS_LABEL_POSSIBLE()
Definition: parse.c:13777
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:436
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:111
rb_warn0
#define rb_warn0(fmt)
Definition: parse.c:950
NODE_EVSTR
@ NODE_EVSTR
Definition: node.h:89
ID_STATIC_SYM
#define ID_STATIC_SYM
Definition: id.h:30
NUM_SUFFIX_I
#define NUM_SUFFIX_I
Definition: parse.c:14133
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
rb_strterm_struct::u
union rb_strterm_struct::@8 u
NUM_SUFFIX_R
#define NUM_SUFFIX_R
Definition: parse.c:14132
NEW_LAMBDA
#define NEW_LAMBDA(a, b, loc)
Definition: node.h:301
magic_comment::length
rb_magic_comment_length_t length
Definition: ripper.c:14604
rb_args_info::kw_rest_arg
NODE * kw_rest_arg
Definition: node.h:445
rb_strterm_literal_struct::u2
union rb_strterm_literal_struct::@6 u2
modifier_rescue
@ modifier_rescue
Definition: parse.h:90
rb_const_get_at
VALUE rb_const_get_at(VALUE, ID)
Definition: variable.c:2397
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:12224
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:434
parser_params::ruby_sourceline
int ruby_sourceline
Definition: ripper.c:311
NEW_RETRY
#define NEW_RETRY(loc)
Definition: node.h:305
idGets
@ idGets
Definition: rb_mjit_min_header-2.7.2.h:8665
NODE_CVASGN
@ NODE_CVASGN
Definition: node.h:54
NODE_AND
@ NODE_AND
Definition: node.h:45
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:84
YYSTYPE::vars
const struct vtable * vars
Definition: parse.h:182
WARN_S_L
#define WARN_S_L(s, l)
Definition: parse.c:995
tIVAR
@ tIVAR
Definition: parse.h:101
tASET
@ tASET
Definition: parse.h:133
str_label
@ str_label
Definition: parse.c:12894
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:47
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:18818
parser_params::gets_
union parser_params::@2::@3 gets_
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:47
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:88
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_usascii_str_new
#define rb_usascii_str_new(str, len)
Definition: rb_mjit_min_header-2.7.2.h:6114
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:61
NODE_SPECIAL_REQUIRED_KEYWORD
#define NODE_SPECIAL_REQUIRED_KEYWORD
Definition: node.h:381
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:65
idUPlus
@ idUPlus
Definition: id.h:81
CMDARG_P
#define CMDARG_P()
Definition: parse.c:204
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:12902
str_sword
@ str_sword
Definition: parse.c:12899
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:1235
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:12225
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
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:49
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:24
mixed_error
#define mixed_error(enc1, enc2)
st.h
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:19311
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
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:439
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
tLEQ
@ tLEQ
Definition: parse.h:123
fmt
const VALUE int int int int int int VALUE char * fmt
Definition: rb_mjit_min_header-2.7.2.h:6458
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:16252
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:86
rb_fatal
void rb_fatal(const char *fmt,...)
Definition: error.c:2722
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:14490
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
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:99
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:53
rb_args_info::kw_args
NODE * kw_args
Definition: node.h:444
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:78
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:12195
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:12200
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:433
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:175
IS_SPCARG
#define IS_SPCARG(c)
Definition: parse.c:13776
rb_ast_delete_node
void rb_ast_delete_node(rb_ast_t *ast, NODE *n)
Definition: node.c:1227
tCOMMENT
@ tCOMMENT
Definition: eventids2.c:3
STR_FUNC_QWORDS
#define STR_FUNC_QWORDS
Definition: parse.c:12886
NODE_IN
@ NODE_IN
Definition: node.h:31
void
void
Definition: rb_mjit_min_header-2.7.2.h:13241
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:12925
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:2671
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_sym_intern_ascii_cstr
#define rb_sym_intern_ascii_cstr(ptr)
Definition: rb_mjit_min_header-2.7.2.h:7721
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
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
idLASTLINE
@ idLASTLINE
Definition: rb_mjit_min_header-2.7.2.h:8716
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:19282
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
rb_strterm_literal_t
struct rb_strterm_literal_struct rb_strterm_literal_t
NODE_UNLESS
@ NODE_UNLESS
Definition: node.h:26
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:14491
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
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
NEW_OPCALL
#define NEW_OPCALL(r, m, a, loc)
Definition: node.h:348
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:18984
tEMBDOC
@ tEMBDOC
Definition: eventids2.c:5
str_dword
@ str_dword
Definition: parse.c:12900
rb_args_info::opt_args
NODE * opt_args
Definition: node.h:447
tEMBDOC_END
@ tEMBDOC_END
Definition: eventids2.c:6
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
keyword_true
@ keyword_true
Definition: parse.h:81
set_yylval_str
#define set_yylval_str(x)
Definition: parse.c:12190
NEW_CONST
#define NEW_CONST(v, loc)
Definition: node.h:333
tokfix
#define tokfix(p)
Definition: parse.c:13031
nd_ainfo
#define nd_ainfo
Definition: node.h:254
klass
VALUE klass
Definition: rb_mjit_min_header-2.7.2.h:13222
rb_args_info
Definition: node.h:432
kwtable::id
short id[2]
Definition: lex.c:34
vtable_pop
#define vtable_pop(tbl, n)
Definition: parse.c:12631
YYSYNTAX_ERROR
#define YYSYNTAX_ERROR
rb_ary_pattern_info::post_args
NODE * post_args
Definition: node.h:457
NEW_NIL
#define NEW_NIL(loc)
Definition: node.h:372
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
local_vars::numparam
struct local_vars::@1 numparam
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
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
h
size_t st_index_t h
Definition: rb_mjit_min_header-2.7.2.h:5458
token
unsigned short token
Definition: id.c:36
rb_ary_pattern_info::rest_arg
NODE * rest_arg
Definition: node.h:456
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
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
rb_strterm_literal_struct::u3
union rb_strterm_literal_struct::@7 u3
NEW_CVAR
#define NEW_CVAR(v, loc)
Definition: node.h:334
node.h
rb_args_info::imemo
VALUE imemo
Definition: node.h:451
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:13239
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:449
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
nd_value
#define nd_value
Definition: node.h:241
subnodes
#define subnodes(n1, n2)
is_local_id
#define is_local_id(id)
Definition: symbol.h:36
has_delayed_token
#define has_delayed_token(p)
Definition: parse.c:12226
RB_OBJ_WRITTEN
#define RB_OBJ_WRITTEN(a, oldv, b)
Definition: ruby.h:1509
ruby_global_name_punct_bits
RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20+31)/32]
Definition: parse.c:13716
tSTRING_DEND
@ tSTRING_DEND
Definition: parse.h:160
NODE_IF
@ NODE_IF
Definition: node.h:25
YYEOF
#define YYEOF
Definition: parse.c:5125
tLBRACE_ARG
@ tLBRACE_ARG
Definition: parse.h:146
NODE_ENSURE
@ NODE_ENSURE
Definition: node.h:44
keyword_else
@ keyword_else
Definition: parse.h:61
OnigEncodingTypeST
Definition: onigmo.h:160
idUScore
@ idUScore
Definition: rb_mjit_min_header-2.7.2.h:8704
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:12889
rb_compile_warning
void rb_compile_warning(const char *file, int line, const char *fmt,...)
Definition: error.c:287
rb_builtin_type_name
const char * rb_builtin_type_name(int t)
Definition: error.c:763
keyword_retry
@ keyword_retry
Definition: parse.h:70
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:4289
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
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:12848
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:2063
rb_errinfo
VALUE rb_errinfo(void)
The current exception in the current thread.
Definition: eval.c:1882
memchr
void * memchr(const void *, int, size_t)
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:13029
rb_parser_calloc
void * rb_parser_calloc(struct parser_params *p, size_t nelem, size_t size)
Definition: parse.c:19325
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
nd_body
#define nd_body
Definition: node.h:219
tPOW
@ tPOW
Definition: parse.h:117
NODE_CASE3
@ NODE_CASE3
Definition: node.h:29
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:196
keyword_then
@ keyword_then
Definition: parse.h:59
RARRAY_AREF
#define RARRAY_AREF(a, i)
Definition: psych_emitter.c:7
rb_strterm_literal_struct::u0
union rb_strterm_literal_struct::@4 u0
rb_strterm_literal_struct::nest
long nest
Definition: ripper.c:713
tHEREDOC_END
@ tHEREDOC_END
Definition: eventids2.c:8
term
const char term
Definition: id.c:37
tLSHFT
@ tLSHFT
Definition: parse.h:134
magic_comment
Definition: ripper.c:14601
STR_FUNC_ESCAPE
#define STR_FUNC_ESCAPE
Definition: parse.c:12883
NODE_DASGN_CURR
@ NODE_DASGN_CURR
Definition: node.h:50
YYEMPTY
#define YYEMPTY
Definition: parse.c:5124
rb_eTypeError
VALUE rb_eTypeError
Definition: error.c:924
tok
#define tok(p)
Definition: parse.c:13032
rb_parser_set_location_of_none
YYLTYPE * rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
Definition: parse.c:17111
STR_FUNC_SYMBOL
#define STR_FUNC_SYMBOL
Definition: parse.c:12887
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:1663
NODE_COLON2
@ NODE_COLON2
Definition: node.h:109
NODE_DOT3
@ NODE_DOT3
Definition: node.h:112
NEW_DOT2
#define NEW_DOT2(b, e, loc)
Definition: node.h:369
rb_ast_add_local_table
void rb_ast_add_local_table(rb_ast_t *ast, ID *buf)
Definition: node.c:1219
node_type
node_type
Definition: node.h:22
vars
const VALUE int int int int int int VALUE * vars[]
Definition: rb_mjit_min_header-2.7.2.h:6458
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:18920
lex_eol_p
#define lex_eol_p(p)
Definition: parse.c:12923
NEW_MODULE
#define NEW_MODULE(n, b, loc)
Definition: node.h:366
tOP_ASGN
@ tOP_ASGN
Definition: parse.h:139
idCall
@ idCall
Definition: rb_mjit_min_header-2.7.2.h:8691
NODE_BREAK
@ NODE_BREAK
Definition: node.h:37
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:17804
WARN_SPACE_CHAR
#define WARN_SPACE_CHAR(c, prefix)
Definition: parse.c:13131
rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:922
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:12185
YYSTYPE::num
int num
Definition: parse.h:180
NODE_GVAR
@ NODE_GVAR
Definition: node.h:75
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
vtable::pos
int pos
Definition: ripper.c:209
ruby_sized_xfree
#define ruby_sized_xfree(ptr, size)
Definition: rb_mjit_min_header-2.7.2.h:7355
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:1393
EXPR_FNAME_bit
@ EXPR_FNAME_bit
Definition: parse.c:142
NODE_XSTR
@ NODE_XSTR
Definition: node.h:87
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
rb_strterm_literal_struct::u1
union rb_strterm_literal_struct::@5 u1
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:12897
rb_parser_lex_state_name
VALUE rb_parser_lex_state_name(enum lex_state_e state)
Definition: parse.c:17041
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
idAND
@ idAND
Definition: rb_mjit_min_header-2.7.2.h:8696
NODE_ARGS
@ NODE_ARGS
Definition: node.h:92
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:12890
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
arg
VALUE arg
Definition: rb_mjit_min_header-2.7.2.h:5597
parser_params::heap
rb_imemo_tmpbuf_t * heap
Definition: ripper.c:271
vtable_free
#define vtable_free(tbl)
Definition: parse.c:12592
NODE_DVAR
@ NODE_DVAR
Definition: node.h:74
rb_parser_printf
void rb_parser_printf(struct parser_params *p, const char *fmt,...)
Definition: parse.c:19372
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:19219
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:437
keyword_while
@ keyword_while
Definition: parse.h:64
mask
enum @0::@2::@3 mask
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:19419
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:17096
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
NODE_SELF
@ NODE_SELF
Definition: node.h:115
local_vars::prev
struct local_vars * prev
Definition: ripper.c:221
idOR
@ idOR
Definition: rb_mjit_min_header-2.7.2.h:8697
parser_params::lval
YYSTYPE * lval
Definition: ripper.c:273
rb_scan_args
#define rb_scan_args(argc, argvp, fmt,...)
Definition: rb_mjit_min_header-2.7.2.h:6368
STR_FUNC_REGEXP
#define STR_FUNC_REGEXP
Definition: parse.c:12885
EOF
#define EOF
Definition: vsnprintf.c:203
rb_args_info::no_kwarg
unsigned int no_kwarg
Definition: node.h:448
tEMBDOC_BEG
@ tEMBDOC_BEG
Definition: eventids2.c:4
PRINTF_ARGS
PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt,...), 2, 3)
NODE_LVAR
@ NODE_LVAR
Definition: node.h:73
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:12884
NODE_STR
@ NODE_STR
Definition: node.h:85
rb_parser_compile_string
rb_ast_t * rb_parser_compile_string(VALUE vparser, const char *f, VALUE s, int line)
Definition: parse.c:12827
rb_str_buf_append
VALUE rb_str_buf_append(VALUE, VALUE)
Definition: string.c:2950
keyword_super
@ keyword_super
Definition: parse.h:78
U
Definition: dtoa.c:290
set_yylval_name
#define set_yylval_name(x)
Definition: parse.c:12202
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
YY_ATTRIBUTE_UNUSED
#define YY_ATTRIBUTE_UNUSED
Definition: parse.c:1299
NODE_IVAR
@ NODE_IVAR
Definition: node.h:76
tHEREDOC_BEG
@ tHEREDOC_BEG
Definition: eventids2.c:7
NEW_OP_ASGN1
#define NEW_OP_ASGN1(p, id, a, loc)
Definition: node.h:323
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::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
obj
const VALUE VALUE obj
Definition: rb_mjit_min_header-2.7.2.h:5738
re_pattern_buffer
Definition: onigmo.h:755
T_BIGNUM
#define T_BIGNUM
Definition: ruby.h:533
NODE_BEGIN
@ NODE_BEGIN
Definition: node.h:41
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
NODE_RETURN
@ NODE_RETURN
Definition: node.h:71
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:17807
NEW_FOR
#define NEW_FOR(i, b, loc)
Definition: node.h:298
internal.h
yytnamerr
#define yytnamerr(yyres, yystr)
Definition: parse.c:775
NODE_FALSE
@ NODE_FALSE
Definition: node.h:118
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:91
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:12922
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:2903
nd_once_body
#define nd_once_body(node)
Definition: parse.c:16593
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:52
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:14204
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:19171
StringValue
use StringValue() instead")))
NODE_ARGS_AUX
@ NODE_ARGS_AUX
Definition: node.h:93
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
NUMPARAM_MAX
@ NUMPARAM_MAX
Definition: parse.c:232
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
keyword_undef
@ keyword_undef
Definition: parse.h:52
parser_params::lex
struct parser_params::@2 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:17802
YYTRANSLATE
#define YYTRANSLATE(YYX)
Definition: parse.c:1487
YY_SYMBOL_PRINT
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: parse.c:5242
src
__inline__ const void *__restrict src
Definition: rb_mjit_min_header-2.7.2.h:2842
RFLOAT
#define RFLOAT(obj)
Definition: internal.h:803
NODE_WHEN
@ NODE_WHEN
Definition: node.h:30
NODE_BLOCK_PASS
@ NODE_BLOCK_PASS
Definition: node.h:100
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:12614
DVARS_INHERIT
#define DVARS_INHERIT
Definition: parse.c:247
NODE_MATCH
@ NODE_MATCH
Definition: node.h:81
memcpy
void * memcpy(void *__restrict, const void *__restrict, size_t)
RUBY_TYPED_FREE_IMMEDIATELY
#define RUBY_TYPED_FREE_IMMEDIATELY
Definition: ruby.h:1207
dyna_var
#define dyna_var(p, id)
Definition: parse.c:677
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:13102
MEMCPY
#define MEMCPY(p1, p2, type, n)
Definition: ruby.h:1753
literal_flush
#define literal_flush(p, ptr)
Definition: parse.c:12223
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
path
VALUE path
Definition: rb_mjit_min_header-2.7.2.h:7336
rb_parser_compile_string_path
rb_ast_t * rb_parser_compile_string_path(VALUE vparser, VALUE f, VALUE s, int line)
Definition: parse.c:12833
rb_hash_aset
VALUE rb_hash_aset(VALUE hash, VALUE key, VALUE val)
Definition: hash.c:2852
rb_reserved_word
const struct kwtable * rb_reserved_word(const char *str, unsigned int len)
Definition: parse.c:19155
NO_PARAM
@ NO_PARAM
Definition: parse.c:231
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:12891
SET_LEX_STATE
#define SET_LEX_STATE(ls)
Definition: parse.c:177
rb_funcall
#define rb_funcall(recv, mid, argc,...)
Definition: rb_mjit_min_header-2.7.2.h:6581
NEW_FALSE
#define NEW_FALSE(loc)
Definition: node.h:374
COND_IN_COND
@ COND_IN_COND
Definition: parse.c:17803
nd_else
#define nd_else
Definition: node.h:220
va_start
#define va_start(v, l)
Definition: rb_mjit_min_header-2.7.2.h:3981
parser_params::compile_option
VALUE compile_option
Definition: ripper.c:317
memmove
#define memmove(dst, src, len)
Definition: rb_mjit_min_header-2.7.2.h:2854
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:18932
ptrdiff_t
int ptrdiff_t
Definition: rb_mjit_min_header-2.7.2.h:799
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:2891
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
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
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:1410
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
st_data_t
unsigned long st_data_t
Definition: rb_mjit_min_header-2.7.2.h:5359
IS_ARG
#define IS_ARG()
Definition: parse.c:13773
warn_balanced
#define warn_balanced(tok, op, syn)
Definition: parse.c:14786
RBASIC
#define RBASIC(obj)
Definition: ruby.h:1267
NEW_STRTERM
#define NEW_STRTERM(func, term, paren)
Definition: parse.c:13688
rb_parser_set_yydebug
VALUE rb_parser_set_yydebug(VALUE self, VALUE flag)
Definition: parse.c:19266
RNode::u2
union RNode::@1 u2
SPECIAL_PUNCT
#define SPECIAL_PUNCT(idx)
Definition: parse.c:13721
rb_ary_pattern_info::imemo
VALUE imemo
Definition: node.h:458
YY_
#define YY_(Msgid)
Definition: parse.c:1280
rb_parser_encoding
VALUE rb_parser_encoding(VALUE vparser)
Definition: parse.c:19234
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:5215
rb_ary_new_from_args
#define rb_ary_new_from_args(n,...)
Definition: rb_mjit_min_header-2.7.2.h:7196
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
INT_MAX
#define INT_MAX
Definition: rb_mjit_min_header-2.7.2.h:4055
rb_compile_warn
void rb_compile_warn(const char *file, int line, const char *fmt,...)
Definition: error.c:272
parser_params::cmdarg_stack
stack_type cmdarg_stack
Definition: ripper.c:299
vtable_alloc
#define vtable_alloc(prev)
Definition: parse.c:12574
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:72
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
ORDINAL_PARAM
@ ORDINAL_PARAM
Definition: parse.c:230
v
int VALUE v
Definition: rb_mjit_min_header-2.7.2.h:12300
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:17027
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
rb_usascii_str_new2
#define rb_usascii_str_new2
Definition: intern.h:909
tLBRACE
@ tLBRACE
Definition: parse.h:145
cc
const struct rb_call_cache * cc
Definition: rb_mjit_min_header-2.7.2.h:13196
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:17846
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
stderr
#define stderr
Definition: rb_mjit_min_header-2.7.2.h:1516
tBDOT3
@ tBDOT3
Definition: parse.h:131
yylval
#define yylval
Definition: parse.c:12176
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:19355
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:14603
NODE_SPECIAL_NO_NAME_REST
#define NODE_SPECIAL_NO_NAME_REST
Definition: node.h:383
ERANGE
#define ERANGE
Definition: rb_mjit_min_header-2.7.2.h:10939
YYSIZE_T
#define YYSIZE_T
Definition: parse.c:1264
rb_parser_new
VALUE rb_parser_new(void)
Definition: parse.c:19161
LONG2FIX
#define LONG2FIX(i)
Definition: ruby.h:265
peek_n
#define peek_n(p, c, n)
Definition: parse.c:12926
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:80
nd_line
#define nd_line(n)
Definition: node.h:194
flush_string_content
#define flush_string_content(p, enc)
Definition: parse.c:13713
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:120
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
tSTAR
@ tSTAR
Definition: parse.h:147
rb_args_info::block_arg
ID block_arg
Definition: node.h:442
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:2692
EXPR_BEG_bit
@ EXPR_BEG_bit
Definition: parse.c:135
malloc
void * malloc(size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(1)))
yytype_int8
signed char yytype_int8
Definition: parse.c:1242
rb_str_new_cstr
#define rb_str_new_cstr(str)
Definition: rb_mjit_min_header-2.7.2.h:6113
rb_parser_realloc
void * rb_parser_realloc(struct parser_params *p, void *ptr, size_t size)
Definition: parse.c:19335
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:69
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:114
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
else
else
Definition: rb_mjit_min_header-2.7.2.h:13214
rb_builtin_class_name
const char * rb_builtin_class_name(VALUE x)
Definition: error.c:799
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:12868
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:13238
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
rb_str_new
#define rb_str_new(str, len)
Definition: rb_mjit_min_header-2.7.2.h:6112
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:39
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:19026
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:454
str_regexp
@ str_regexp
Definition: parse.c:12898
rb_parser_set_location
YYLTYPE * rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
Definition: parse.c:17121
NEW_UNTIL
#define NEW_UNTIL(c, b, n, loc)
Definition: node.h:297
strcasecmp
int strcasecmp(const char *, const char *) __attribute__((__pure__))
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
RNode::u1
union RNode::@0 u1
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:17070
RSTRING_LEN
#define RSTRING_LEN(str)
Definition: ruby.h:1005
char
#define char
Definition: rb_mjit_min_header-2.7.2.h:2884
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
tIGNORED_NL
@ tIGNORED_NL
Definition: eventids2.c:2
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:441
set_yylval_noname
#define set_yylval_noname()
Definition: parse.c:12220
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:23
idNeqTilde
@ idNeqTilde
Definition: id.h:104
NEW_DVAR
#define NEW_DVAR(v, loc)
Definition: node.h:331
NODE_RETRY
@ NODE_RETRY
Definition: node.h:40
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:67
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:14134
main
int main(void)
Definition: closure_fn0.c:49
get_id
#define get_id(id)
Definition: parse.c:587
strcmp
int strcmp(const char *, const char *)
RNode
Definition: node.h:149
__sFILE
Definition: vsnprintf.c:169
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:17060
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:9357
RSTRING_END
#define RSTRING_END(str)
Definition: ruby.h:1013
YYPOPSTACK
#define YYPOPSTACK(N)
tLOWEST
@ tLOWEST
Definition: parse.h:165
name
const char * name
Definition: nkf.c:208
NODE_GASGN
@ NODE_GASGN
Definition: node.h:51
RNode::u3
union RNode::@2 u3
n
const char size_t n
Definition: rb_mjit_min_header-2.7.2.h:5452