Ruby  2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)
parse.c
Go to the documentation of this file.
1 /* A Bison parser, made by GNU Bison 3.0.4. */
2 
3 /* Bison implementation for Yacc-like parsers in C
4 
5  Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
6 
7  This program is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 
20 /* As a special exception, you may create a larger work that contains
21  part or all of the Bison parser skeleton and distribute that work
22  under terms of your choice, so long as that work isn't itself a
23  parser generator using the skeleton or a modified version thereof
24  as a parser skeleton. Alternatively, if you modify or redistribute
25  the parser skeleton itself, you may (at your option) remove this
26  special exception, which will cause the skeleton and the resulting
27  Bison output files to be licensed under the GNU General Public
28  License without this special exception.
29 
30  This special exception was added by the Free Software Foundation in
31  version 2.2 of Bison. */
32 
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34  simplifying the original so-called "semantic" parser. */
35 
36 /* All symbols defined below should begin with yy or YY, to avoid
37  infringing on user name space. This should be done even for local
38  variables, as they might otherwise be expanded by user macros.
39  There are some unavoidable exceptions within include files to
40  define necessary library symbols; they are noted "INFRINGES ON
41  USER NAME SPACE" below. */
42 
43 /* Identify Bison output. */
44 #define YYBISON 1
45 
46 /* Bison version. */
47 #define YYBISON_VERSION "3.0.4"
48 
49 /* Skeleton name. */
50 #define YYSKELETON_NAME "yacc.c"
51 
52 /* Pure parsers. */
53 #define YYPURE 1
54 
55 /* Push parsers. */
56 #define YYPUSH 0
57 
58 /* Pull parsers. */
59 #define YYPULL 1
60 
61 
62 
63 
64 /* Copy the first part of user declarations. */
65 #line 12 "parse.y" /* yacc.c:339 */
66 
67 
68 #if !YYPURE
69 # error needs pure parser
70 #endif
71 #define YYDEBUG 1
72 #define YYERROR_VERBOSE 1
73 #define YYSTACK_USE_ALLOCA 0
74 #define YYLTYPE rb_code_location_t
75 #define YYLTYPE_IS_DECLARED 1
76 
77 #include "ruby/ruby.h"
78 #include "ruby/st.h"
79 #include "ruby/encoding.h"
80 #include "internal.h"
81 #include "node.h"
82 #include "parse.h"
83 #include "symbol.h"
84 #include "regenc.h"
85 #include <stdio.h>
86 #include <errno.h>
87 #include <ctype.h>
88 #include "probes.h"
89 
90 #ifndef WARN_PAST_SCOPE
91 # define WARN_PAST_SCOPE 0
92 #endif
93 
94 #define TAB_WIDTH 8
95 
96 #define yydebug (p->debug) /* disable the global variable definition */
97 
98 #define YYMALLOC(size) rb_parser_malloc(p, (size))
99 #define YYREALLOC(ptr, size) rb_parser_realloc(p, (ptr), (size))
100 #define YYCALLOC(nelem, size) rb_parser_calloc(p, (nelem), (size))
101 #define YYFREE(ptr) rb_parser_free(p, (ptr))
102 #define YYFPRINTF rb_parser_printf
103 #define YYPRINT(out, tok, val) parser_token_value_print(p, (tok), &(val))
104 #define YY_LOCATION_PRINT(File, loc) \
105  rb_parser_printf(p, "%d.%d-%d.%d", \
106  (loc).beg_pos.lineno, (loc).beg_pos.column,\
107  (loc).end_pos.lineno, (loc).end_pos.column)
108 #define YYLLOC_DEFAULT(Current, Rhs, N) \
109  do \
110  if (N) \
111  { \
112  (Current).beg_pos = YYRHSLOC(Rhs, 1).beg_pos; \
113  (Current).end_pos = YYRHSLOC(Rhs, N).end_pos; \
114  } \
115  else \
116  { \
117  (Current).beg_pos = YYRHSLOC(Rhs, 0).end_pos; \
118  (Current).end_pos = YYRHSLOC(Rhs, 0).end_pos; \
119  } \
120  while (0)
121 
122 #define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current) \
123  rb_parser_set_location_from_strterm_heredoc(p, &p->lex.strterm->u.heredoc, &(Current))
124 #define RUBY_SET_YYLLOC_OF_NONE(Current) \
125  rb_parser_set_location_of_none(p, &(Current))
126 #define RUBY_SET_YYLLOC(Current) \
127  rb_parser_set_location(p, &(Current))
128 #define RUBY_INIT_YYLLOC() \
129  { \
130  {p->ruby_sourceline, (int)(p->lex.ptok - p->lex.pbeg)}, \
131  {p->ruby_sourceline, (int)(p->lex.pcur - p->lex.pbeg)}, \
132  }
133 
135  EXPR_BEG_bit, /* ignore newline, +/- is a sign. */
136  EXPR_END_bit, /* newline significant, +/- is an operator. */
137  EXPR_ENDARG_bit, /* ditto, and unbound braces. */
138  EXPR_ENDFN_bit, /* ditto, and unbound braces. */
139  EXPR_ARG_bit, /* newline significant, +/- is an operator. */
140  EXPR_CMDARG_bit, /* newline significant, +/- is an operator. */
141  EXPR_MID_bit, /* newline significant, +/- is an operator. */
142  EXPR_FNAME_bit, /* ignore newline, no reserved words. */
143  EXPR_DOT_bit, /* right after `.' or `::', no reserved words. */
144  EXPR_CLASS_bit, /* immediate after `class', no here document. */
145  EXPR_LABEL_bit, /* flag bit, label is allowed. */
146  EXPR_LABELED_bit, /* flag bit, just after a label. */
147  EXPR_FITEM_bit, /* symbol literal as FNAME. */
149 };
150 /* examine combinations */
152 #define DEF_EXPR(n) EXPR_##n = (1 << EXPR_##n##_bit)
154  DEF_EXPR(END),
155  DEF_EXPR(ENDARG),
156  DEF_EXPR(ENDFN),
157  DEF_EXPR(ARG),
158  DEF_EXPR(CMDARG),
159  DEF_EXPR(MID),
160  DEF_EXPR(FNAME),
161  DEF_EXPR(DOT),
162  DEF_EXPR(CLASS),
163  DEF_EXPR(LABEL),
164  DEF_EXPR(LABELED),
165  DEF_EXPR(FITEM),
166  EXPR_VALUE = EXPR_BEG,
167  EXPR_BEG_ANY = (EXPR_BEG | EXPR_MID | EXPR_CLASS),
168  EXPR_ARG_ANY = (EXPR_ARG | EXPR_CMDARG),
169  EXPR_END_ANY = (EXPR_END | EXPR_ENDARG | EXPR_ENDFN),
171 };
172 #define IS_lex_state_for(x, ls) ((x) & (ls))
173 #define IS_lex_state_all_for(x, ls) (((x) & (ls)) == (ls))
174 #define IS_lex_state(ls) IS_lex_state_for(p->lex.state, (ls))
175 #define IS_lex_state_all(ls) IS_lex_state_all_for(p->lex.state, (ls))
176 
177 # define SET_LEX_STATE(ls) \
178  (p->lex.state = \
179  (p->debug ? \
180  rb_parser_trace_lex_state(p, p->lex.state, (ls), __LINE__) : \
181  (enum lex_state_e)(ls)))
182 
184 
185 static const rb_code_location_t NULL_LOC = { {0, -1}, {0, -1} };
186 
187 # define SHOW_BITSTACK(stack, name) (p->debug ? rb_parser_show_bitstack(p, stack, name, __LINE__) : (void)0)
188 # define BITSTACK_PUSH(stack, n) (((p->stack) = ((p->stack)<<1)|((n)&1)), SHOW_BITSTACK(p->stack, #stack"(push)"))
189 # define BITSTACK_POP(stack) (((p->stack) = (p->stack) >> 1), SHOW_BITSTACK(p->stack, #stack"(pop)"))
190 # define BITSTACK_SET_P(stack) (SHOW_BITSTACK(p->stack, #stack), (p->stack)&1)
191 # define BITSTACK_SET(stack, n) ((p->stack)=(n), SHOW_BITSTACK(p->stack, #stack"(set)"))
192 
193 /* A flag to identify keyword_do_cond, "do" keyword after condition expression.
194  Examples: `while ... do`, `until ... do`, and `for ... in ... do` */
195 #define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
196 #define COND_POP() BITSTACK_POP(cond_stack)
197 #define COND_P() BITSTACK_SET_P(cond_stack)
198 #define COND_SET(n) BITSTACK_SET(cond_stack, (n))
199 
200 /* A flag to identify keyword_do_block; "do" keyword after command_call.
201  Example: `foo 1, 2 do`. */
202 #define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n))
203 #define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
204 #define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
205 #define CMDARG_SET(n) BITSTACK_SET(cmdarg_stack, (n))
206 
207 struct vtable {
208  ID *tbl;
209  int pos;
210  int capa;
211  struct vtable *prev;
212 };
213 
214 struct local_vars {
215  struct vtable *args;
216  struct vtable *vars;
217  struct vtable *used;
218 # if WARN_PAST_SCOPE
219  struct vtable *past;
220 # endif
221  struct local_vars *prev;
222 # ifndef RIPPER
223  struct {
224  NODE *outer, *inner, *current;
225  } numparam;
226 # endif
227 };
228 
229 enum {
231  NO_PARAM = 0,
233 };
234 
235 #define NUMPARAM_ID_P(id) numparam_id_p(id)
236 #define NUMPARAM_ID_TO_IDX(id) (unsigned int)(((id) >> ID_SCOPE_SHIFT) - tNUMPARAM_1 + 1)
237 #define NUMPARAM_IDX_TO_ID(idx) TOKEN2LOCALID((tNUMPARAM_1 + (idx) - 1))
238 static int
239 numparam_id_p(ID id)
240 {
241  if (!is_local_id(id)) return 0;
242  unsigned int idx = NUMPARAM_ID_TO_IDX(id);
243  return idx > 0 && idx <= NUMPARAM_MAX;
244 }
245 static void numparam_name(struct parser_params *p, ID id);
246 
247 #define DVARS_INHERIT ((void*)1)
248 #define DVARS_TOPSCOPE NULL
249 #define DVARS_TERMINAL_P(tbl) ((tbl) == DVARS_INHERIT || (tbl) == DVARS_TOPSCOPE)
250 
251 typedef struct token_info {
252  const char *token;
254  int indent;
255  int nonspc;
256  struct token_info *next;
257 } token_info;
258 
260 
261 /*
262  Structure of Lexer Buffer:
263 
264  lex.pbeg lex.ptok lex.pcur lex.pend
265  | | | |
266  |------------+------------+------------|
267  |<---------->|
268  token
269 */
270 struct parser_params {
272 
273  YYSTYPE *lval;
274 
275  struct {
277  VALUE (*gets)(struct parser_params*,VALUE);
278  VALUE input;
279  VALUE prevline;
280  VALUE lastline;
281  VALUE nextline;
282  const char *pbeg;
283  const char *pcur;
284  const char *pend;
285  const char *ptok;
286  union {
287  long ptr;
288  VALUE (*call)(VALUE, int);
289  } gets_;
290  enum lex_state_e state;
291  /* track the nest level of any parens "()[]{}" */
292  int paren_nest;
293  /* keep p->lex.paren_nest at the beginning of lambda "->" to detect tLAMBEG and keyword_do_LAMBDA */
294  int lpar_beg;
295  /* track the nest level of only braces "{}" */
296  int brace_nest;
297  } lex;
300  int tokidx;
301  int toksiz;
302  int tokline;
303  int heredoc_end;
304  int heredoc_indent;
306  char *tokenbuf;
307  struct local_vars *lvtbl;
308  st_table *pvtbl;
309  st_table *pktbl;
310  int line_count;
311  int ruby_sourceline; /* current line no. */
312  const char *ruby_sourcefile; /* current source file */
314  rb_encoding *enc;
318 
321 
322  ID cur_arg;
323 
324  rb_ast_t *ast;
325  int node_id;
326 
327  int max_numparam;
328 
329  unsigned int command_start:1;
330  unsigned int eofp: 1;
331  unsigned int ruby__end__seen: 1;
332  unsigned int debug: 1;
333  unsigned int has_shebang: 1;
334  unsigned int in_defined: 1;
335  unsigned int in_kwarg: 1;
336  unsigned int in_def: 1;
337  unsigned int in_class: 1;
338  unsigned int token_seen: 1;
339  unsigned int token_info_enabled: 1;
340 # if WARN_PAST_SCOPE
341  unsigned int past_scope_enabled: 1;
342 # endif
343  unsigned int error_p: 1;
344  unsigned int cr_seen: 1;
345 
346 #ifndef RIPPER
347  /* Ruby core only */
348 
349  unsigned int do_print: 1;
350  unsigned int do_loop: 1;
351  unsigned int do_chomp: 1;
352  unsigned int do_split: 1;
353  unsigned int warn_location: 1;
354 
356  NODE *eval_tree;
359  const struct rb_iseq_struct *parent_iseq;
360 #else
361  /* Ripper only */
362 
363  struct {
364  VALUE token;
365  int line;
366  int col;
367  } delayed;
368 
369  VALUE value;
370  VALUE result;
371  VALUE parsing_thread;
372 #endif
373 };
374 
375 #define intern_cstr(n,l,en) rb_intern3(n,l,en)
376 
377 #define STR_NEW(ptr,len) rb_enc_str_new((ptr),(len),p->enc)
378 #define STR_NEW0() rb_enc_str_new(0,0,p->enc)
379 #define STR_NEW2(ptr) rb_enc_str_new((ptr),strlen(ptr),p->enc)
380 #define STR_NEW3(ptr,len,e,func) parser_str_new((ptr),(len),(e),(func),p->enc)
381 #define TOK_INTERN() intern_cstr(tok(p), toklen(p), p->enc)
382 
383 static st_table *
384 push_pvtbl(struct parser_params *p)
385 {
386  st_table *tbl = p->pvtbl;
387  p->pvtbl = st_init_numtable();
388  return tbl;
389 }
390 
391 static void
392 pop_pvtbl(struct parser_params *p, st_table *tbl)
393 {
394  st_free_table(p->pvtbl);
395  p->pvtbl = tbl;
396 }
397 
398 static st_table *
399 push_pktbl(struct parser_params *p)
400 {
401  st_table *tbl = p->pktbl;
402  p->pktbl = 0;
403  return tbl;
404 }
405 
406 static void
407 pop_pktbl(struct parser_params *p, st_table *tbl)
408 {
409  if (p->pktbl) st_free_table(p->pktbl);
410  p->pktbl = tbl;
411 }
412 
413 static int parser_yyerror(struct parser_params*, const YYLTYPE *yylloc, const char*);
414 #define yyerror0(msg) parser_yyerror(p, NULL, (msg))
415 #define yyerror1(loc, msg) parser_yyerror(p, (loc), (msg))
416 #define yyerror(yylloc, p, msg) parser_yyerror(p, yylloc, msg)
417 #define token_flush(ptr) ((ptr)->lex.ptok = (ptr)->lex.pcur)
418 
419 #ifdef RIPPER
420 #define compile_for_eval (0)
421 #else
422 #define compile_for_eval (p->parent_iseq != 0)
423 #endif
424 
425 #define token_column ((int)(p->lex.ptok - p->lex.pbeg))
426 
427 #define CALL_Q_P(q) ((q) == TOKEN2VAL(tANDDOT))
428 #define NODE_CALL_Q(q) (CALL_Q_P(q) ? NODE_QCALL : NODE_CALL)
429 #define NEW_QCALL(q,r,m,a,loc) NEW_NODE(NODE_CALL_Q(q),r,m,a,loc)
430 
431 #define lambda_beginning_p() (p->lex.lpar_beg == p->lex.paren_nest)
432 
433 static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
434 
435 #ifndef RIPPER
436 static inline void
437 rb_discard_node(struct parser_params *p, NODE *n)
438 {
439  rb_ast_delete_node(p->ast, n);
440 }
441 #endif
442 
443 #ifdef RIPPER
444 static inline VALUE
445 add_mark_object(struct parser_params *p, VALUE obj)
446 {
447  if (!SPECIAL_CONST_P(obj)
448  && !RB_TYPE_P(obj, T_NODE) /* Ripper jumbles NODE objects and other objects... */
449  ) {
451  }
452  return obj;
453 }
454 #else
455 static NODE* node_newnode_with_locals(struct parser_params *, enum node_type, VALUE, VALUE, const rb_code_location_t*);
456 #endif
457 
458 static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE, const rb_code_location_t*);
459 #define rb_node_newnode(type, a1, a2, a3, loc) node_newnode(p, (type), (a1), (a2), (a3), (loc))
460 
461 static NODE *nd_set_loc(NODE *nd, const YYLTYPE *loc);
462 
463 static int
464 parser_get_node_id(struct parser_params *p)
465 {
466  int node_id = p->node_id;
467  p->node_id++;
468  return node_id;
469 }
470 
471 #ifndef RIPPER
472 static inline void
473 set_line_body(NODE *body, int line)
474 {
475  if (!body) return;
476  switch (nd_type(body)) {
477  case NODE_RESCUE:
478  case NODE_ENSURE:
479  nd_set_line(body, line);
480  }
481 }
482 
483 #define yyparse ruby_yyparse
484 
485 static NODE* cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
486 static NODE* method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc);
487 #define new_nil(loc) NEW_NIL(loc)
488 static NODE *new_if(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*);
489 static NODE *new_unless(struct parser_params*,NODE*,NODE*,NODE*,const YYLTYPE*);
490 static NODE *logop(struct parser_params*,ID,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
491 
492 static NODE *newline_node(NODE*);
493 static void fixpos(NODE*,NODE*);
494 
495 static int value_expr_gen(struct parser_params*,NODE*);
496 static void void_expr(struct parser_params*,NODE*);
497 static NODE *remove_begin(NODE*);
498 static NODE *remove_begin_all(NODE*);
499 #define value_expr(node) value_expr_gen(p, (node) = remove_begin(node))
500 static NODE *void_stmts(struct parser_params*,NODE*);
501 static void reduce_nodes(struct parser_params*,NODE**);
502 static void block_dup_check(struct parser_params*,NODE*,NODE*);
503 
504 static NODE *block_append(struct parser_params*,NODE*,NODE*);
505 static NODE *list_append(struct parser_params*,NODE*,NODE*);
506 static NODE *list_concat(NODE*,NODE*);
507 static NODE *arg_append(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
508 static NODE *last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc);
509 static NODE *rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc);
510 static NODE *literal_concat(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
511 static NODE *new_evstr(struct parser_params*,NODE*,const YYLTYPE*);
512 static NODE *evstr2dstr(struct parser_params*,NODE*);
513 static NODE *splat_array(NODE*);
514 static void mark_lvar_used(struct parser_params *p, NODE *rhs);
515 
516 static NODE *call_bin_op(struct parser_params*,NODE*,ID,NODE*,const YYLTYPE*,const YYLTYPE*);
517 static NODE *call_uni_op(struct parser_params*,NODE*,ID,const YYLTYPE*,const YYLTYPE*);
518 static NODE *new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc);
519 static NODE *new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc);
520 static NODE *method_add_block(struct parser_params*p, NODE *m, NODE *b, const YYLTYPE *loc) {b->nd_iter = m; b->nd_loc = *loc; return b;}
521 
522 static bool args_info_empty_p(struct rb_args_info *args);
523 static NODE *new_args(struct parser_params*,NODE*,NODE*,ID,NODE*,NODE*,const YYLTYPE*);
524 static NODE *new_args_tail(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
525 static NODE *new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc);
526 static NODE *new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, ID rest_arg, NODE *post_args, const YYLTYPE *loc);
527 static NODE *new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc);
528 static NODE *new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc);
529 static NODE *new_case3(struct parser_params *p, NODE *val, NODE *pat, const YYLTYPE *loc);
530 
531 static NODE *new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc);
532 static NODE *args_with_numbered(struct parser_params*,NODE*,int);
533 
534 static VALUE negate_lit(struct parser_params*, VALUE);
535 static NODE *ret_args(struct parser_params*,NODE*);
536 static NODE *arg_blk_pass(NODE*,NODE*);
537 static NODE *new_yield(struct parser_params*,NODE*,const YYLTYPE*);
538 static NODE *dsym_node(struct parser_params*,NODE*,const YYLTYPE*);
539 
540 static NODE *gettable(struct parser_params*,ID,const YYLTYPE*);
541 static NODE *assignable(struct parser_params*,ID,NODE*,const YYLTYPE*);
542 
543 static NODE *aryset(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
544 static NODE *attrset(struct parser_params*,NODE*,ID,ID,const YYLTYPE*);
545 
546 static void rb_backref_error(struct parser_params*,NODE*);
547 static NODE *node_assign(struct parser_params*,NODE*,NODE*,const YYLTYPE*);
548 
549 static NODE *new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc);
550 static NODE *new_ary_op_assign(struct parser_params *p, NODE *ary, NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc);
551 static NODE *new_attr_op_assign(struct parser_params *p, NODE *lhs, ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc);
552 static NODE *new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc);
553 static NODE *new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc);
554 
555 static NODE *const_decl(struct parser_params *p, NODE* path, const YYLTYPE *loc);
556 
557 static NODE *opt_arg_append(NODE*, NODE*);
558 static NODE *kwd_append(NODE*, NODE*);
559 
560 static NODE *new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
561 static NODE *new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc);
562 
563 static NODE *new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc);
564 
565 static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *);
566 
567 #define make_list(list, loc) ((list) ? (nd_set_loc(list, loc), list) : NEW_ZLIST(loc))
568 
569 static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
570 
571 static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
572 
573 static NODE *match_op(struct parser_params*,NODE*,NODE*,const YYLTYPE*,const YYLTYPE*);
574 
575 static ID *local_tbl(struct parser_params*);
576 
577 static VALUE reg_compile(struct parser_params*, VALUE, int);
578 static void reg_fragment_setenc(struct parser_params*, VALUE, int);
579 static int reg_fragment_check(struct parser_params*, VALUE, int);
580 static NODE *reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc);
581 
582 static int literal_concat0(struct parser_params *p, VALUE head, VALUE tail);
583 static NODE *heredoc_dedent(struct parser_params*,NODE*);
584 
585 static void check_literal_when(struct parser_params *p, NODE *args, const YYLTYPE *loc);
586 
587 #define get_id(id) (id)
588 #define get_value(val) (val)
589 #define get_num(num) (num)
590 #else /* RIPPER */
591 #define NODE_RIPPER NODE_CDECL
592 
593 static inline int ripper_is_node_yylval(VALUE n);
594 
595 static inline VALUE
596 ripper_new_yylval(struct parser_params *p, ID a, VALUE b, VALUE c)
597 {
598  if (ripper_is_node_yylval(c)) c = RNODE(c)->nd_cval;
599  add_mark_object(p, b);
600  add_mark_object(p, c);
601  return (VALUE)NEW_CDECL(a, b, c, &NULL_LOC);
602 }
603 
604 static inline int
605 ripper_is_node_yylval(VALUE n)
606 {
607  return RB_TYPE_P(n, T_NODE) && nd_type(RNODE(n)) == NODE_RIPPER;
608 }
609 
610 #define value_expr(node) ((void)(node))
611 #define remove_begin(node) (node)
612 #define void_stmts(p,x) (x)
613 #define rb_dvar_defined(id, base) 0
614 #define rb_local_defined(id, base) 0
615 static ID ripper_get_id(VALUE);
616 #define get_id(id) ripper_get_id(id)
617 static VALUE ripper_get_value(VALUE);
618 #define get_value(val) ripper_get_value(val)
619 #define get_num(num) (int)get_id(num)
620 static VALUE assignable(struct parser_params*,VALUE);
621 static int id_is_var(struct parser_params *p, ID id);
622 
623 #define method_cond(p,node,loc) (node)
624 #define call_bin_op(p, recv,id,arg1,op_loc,loc) dispatch3(binary, (recv), STATIC_ID2SYM(id), (arg1))
625 #define match_op(p,node1,node2,op_loc,loc) call_bin_op(0, (node1), idEqTilde, (node2), op_loc, loc)
626 #define call_uni_op(p, recv,id,op_loc,loc) dispatch2(unary, STATIC_ID2SYM(id), (recv))
627 #define logop(p,id,node1,node2,op_loc,loc) call_bin_op(0, (node1), (id), (node2), op_loc, loc)
628 
629 #define new_nil(loc) Qnil
630 
631 static VALUE new_regexp(struct parser_params *, VALUE, VALUE, const YYLTYPE *);
632 
633 static VALUE const_decl(struct parser_params *p, VALUE path);
634 
635 static VALUE var_field(struct parser_params *p, VALUE a);
636 static VALUE assign_error(struct parser_params *p, VALUE a);
637 
638 static VALUE parser_reg_compile(struct parser_params*, VALUE, int, VALUE *);
639 
640 #endif /* !RIPPER */
641 
642 /* forward declaration */
644 
646 VALUE rb_parser_reg_compile(struct parser_params* p, VALUE str, int options);
647 int rb_reg_fragment_setenc(struct parser_params*, VALUE, int);
650 void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
651 PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt, ...), 2, 3);
656 
657 static void error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc);
658 static void error_duplicate_pattern_key(struct parser_params *p, ID id, const YYLTYPE *loc);
659 static void parser_token_value_print(struct parser_params *p, enum yytokentype type, const YYSTYPE *valp);
660 static ID formal_argument(struct parser_params*, ID);
661 static ID shadowing_lvar(struct parser_params*,ID);
662 static void new_bv(struct parser_params*,ID);
663 
664 static void local_push(struct parser_params*,int);
665 static void local_pop(struct parser_params*);
666 static void local_var(struct parser_params*, ID);
667 static void arg_var(struct parser_params*, ID);
668 static int local_id(struct parser_params *p, ID id);
669 static int local_id_ref(struct parser_params*, ID, ID **);
670 #ifndef RIPPER
671 static ID internal_id(struct parser_params*);
672 #endif
673 
674 static const struct vtable *dyna_push(struct parser_params *);
675 static void dyna_pop(struct parser_params*, const struct vtable *);
676 static int dyna_in_block(struct parser_params*);
677 #define dyna_var(p, id) local_var(p, id)
678 static int dvar_defined(struct parser_params*, ID);
679 static int dvar_defined_ref(struct parser_params*, ID, ID**);
680 static int dvar_curr(struct parser_params*,ID);
681 
682 static int lvar_defined(struct parser_params*, ID);
683 
684 static NODE *numparam_push(struct parser_params *p);
685 static void numparam_pop(struct parser_params *p, NODE *prev_inner);
686 
687 #ifdef RIPPER
688 # define METHOD_NOT idNOT
689 #else
690 # define METHOD_NOT '!'
691 #endif
692 
693 #define idFWD_REST '*'
694 #ifdef RUBY3_KEYWORDS
695 #define idFWD_KWREST idPow /* Use simple "**", as tDSTAR is "**arg" */
696 #else
697 #define idFWD_KWREST 0
698 #endif
699 #define idFWD_BLOCK '&'
700 
701 #define RE_OPTION_ONCE (1<<16)
702 #define RE_OPTION_ENCODING_SHIFT 8
703 #define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
704 #define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
705 #define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
706 #define RE_OPTION_MASK 0xff
707 #define RE_OPTION_ARG_ENCODING_NONE 32
708 
709 /* structs for managing terminator of string literal and heredocment */
710 typedef struct rb_strterm_literal_struct {
711  union {
712  VALUE dummy;
713  long nest;
714  } u0;
715  union {
716  VALUE dummy;
717  long func; /* STR_FUNC_* (e.g., STR_FUNC_ESCAPE and STR_FUNC_EXPAND) */
718  } u1;
719  union {
720  VALUE dummy;
721  long paren; /* '(' of `%q(...)` */
722  } u2;
723  union {
724  VALUE dummy;
725  long term; /* ')' of `%q(...)` */
726  } u3;
728 
729 #define HERETERM_LENGTH_BITS ((SIZEOF_VALUE - 1) * CHAR_BIT - 1)
730 
732  VALUE lastline; /* the string of line that contains `<<"END"` */
733  long offset; /* the column of END in `<<"END"` */
734  int sourceline; /* lineno of the line that contains `<<"END"` */
735  unsigned length /* the length of END in `<<"END"` */
736 #if HERETERM_LENGTH_BITS < SIZEOF_INT * CHAR_BIT
738 # define HERETERM_LENGTH_MAX ((1U << HERETERM_LENGTH_BITS) - 1)
739 #else
740 # define HERETERM_LENGTH_MAX UINT_MAX
741 #endif
742  ;
743 #if HERETERM_LENGTH_BITS < SIZEOF_INT * CHAR_BIT
744  unsigned quote: 1;
745  unsigned func: 8;
746 #else
747  uint8_t quote;
748  uint8_t func;
749 #endif
750 };
752 
753 #define STRTERM_HEREDOC IMEMO_FL_USER0
754 
755 struct rb_strterm_struct {
756  VALUE flags;
757  union {
760  } u;
761 };
762 
763 #ifndef RIPPER
764 void
766 {
767  rb_strterm_t *strterm = (rb_strterm_t*)obj;
768  if (RBASIC(obj)->flags & STRTERM_HEREDOC) {
769  rb_strterm_heredoc_t *heredoc = &strterm->u.heredoc;
770  rb_gc_mark(heredoc->lastline);
771  }
772 }
773 #endif
774 
775 #define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(p, yyres, yystr)
776 size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr);
777 
778 #define TOKEN2ID(tok) ( \
779  tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
780  tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
781  tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
782  tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
783  tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
784  tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
785  ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
786 
787 /****** Ripper *******/
788 
789 #ifdef RIPPER
790 #define RIPPER_VERSION "0.1.0"
791 
792 static inline VALUE intern_sym(const char *name);
793 
794 #include "eventids1.c"
795 #include "eventids2.c"
796 
797 static VALUE ripper_dispatch0(struct parser_params*,ID);
798 static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
799 static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
800 static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
801 static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
802 static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
803 static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
804 static void ripper_error(struct parser_params *p);
805 
806 #define dispatch0(n) ripper_dispatch0(p, TOKEN_PASTE(ripper_id_, n))
807 #define dispatch1(n,a) ripper_dispatch1(p, TOKEN_PASTE(ripper_id_, n), (a))
808 #define dispatch2(n,a,b) ripper_dispatch2(p, TOKEN_PASTE(ripper_id_, n), (a), (b))
809 #define dispatch3(n,a,b,c) ripper_dispatch3(p, TOKEN_PASTE(ripper_id_, n), (a), (b), (c))
810 #define dispatch4(n,a,b,c,d) ripper_dispatch4(p, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d))
811 #define dispatch5(n,a,b,c,d,e) ripper_dispatch5(p, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e))
812 #define dispatch7(n,a,b,c,d,e,f,g) ripper_dispatch7(p, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e), (f), (g))
813 
814 #define yyparse ripper_yyparse
815 
816 #define ID2VAL(id) STATIC_ID2SYM(id)
817 #define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
818 #define KWD2EID(t, v) ripper_new_yylval(p, keyword_##t, get_value(v), 0)
819 
820 #define params_new(pars, opts, rest, pars2, kws, kwrest, blk) \
821  dispatch7(params, (pars), (opts), (rest), (pars2), (kws), (kwrest), (blk))
822 
823 #define escape_Qundef(x) ((x)==Qundef ? Qnil : (x))
824 
825 static inline VALUE
826 new_args(struct parser_params *p, VALUE pre_args, VALUE opt_args, VALUE rest_arg, VALUE post_args, VALUE tail, YYLTYPE *loc)
827 {
828  NODE *t = (NODE *)tail;
829  VALUE kw_args = t->u1.value, kw_rest_arg = t->u2.value, block = t->u3.value;
830  return params_new(pre_args, opt_args, rest_arg, post_args, kw_args, kw_rest_arg, escape_Qundef(block));
831 }
832 
833 static inline VALUE
834 new_args_tail(struct parser_params *p, VALUE kw_args, VALUE kw_rest_arg, VALUE block, YYLTYPE *loc)
835 {
836  NODE *t = rb_node_newnode(NODE_ARGS_AUX, kw_args, kw_rest_arg, block, &NULL_LOC);
837  add_mark_object(p, kw_args);
838  add_mark_object(p, kw_rest_arg);
839  add_mark_object(p, block);
840  return (VALUE)t;
841 }
842 
843 static inline VALUE
844 args_with_numbered(struct parser_params *p, VALUE args, int max_numparam)
845 {
846  return args;
847 }
848 
849 static VALUE
850 new_array_pattern(struct parser_params *p, VALUE constant, VALUE pre_arg, VALUE aryptn, const YYLTYPE *loc)
851 {
852  NODE *t = (NODE *)aryptn;
853  struct rb_ary_pattern_info *apinfo = t->nd_apinfo;
855 
856  if (apinfo) {
857  pre_args = rb_ary_entry(apinfo->imemo, 0);
858  rest_arg = rb_ary_entry(apinfo->imemo, 1);
859  post_args = rb_ary_entry(apinfo->imemo, 2);
860  }
861 
862  if (!NIL_P(pre_arg)) {
863  if (!NIL_P(pre_args)) {
864  rb_ary_unshift(pre_args, pre_arg);
865  }
866  else {
867  pre_args = rb_ary_new_from_args(1, pre_arg);
868  }
869  }
870  return dispatch4(aryptn, constant, pre_args, rest_arg, post_args);
871 }
872 
873 static VALUE
874 new_array_pattern_tail(struct parser_params *p, VALUE pre_args, VALUE has_rest, VALUE rest_arg, VALUE post_args, const YYLTYPE *loc)
875 {
876  NODE *t;
877  struct rb_ary_pattern_info *apinfo;
878 
879  if (has_rest) {
880  rest_arg = dispatch1(var_field, rest_arg ? rest_arg : Qnil);
881  }
882  else {
883  rest_arg = Qnil;
884  }
885 
887  apinfo = ZALLOC(struct rb_ary_pattern_info);
888  rb_imemo_tmpbuf_set_ptr(tmpbuf, apinfo);
889  apinfo->imemo = rb_ary_new_from_args(4, pre_args, rest_arg, post_args, tmpbuf);
890 
891  t = rb_node_newnode(NODE_ARYPTN, Qnil, Qnil, (VALUE)apinfo, &NULL_LOC);
892  RB_OBJ_WRITTEN(p->ast, Qnil, apinfo->imemo);
893 
894  return (VALUE)t;
895 }
896 
897 #define new_hash(p,h,l) rb_ary_new_from_args(0)
898 
899 static VALUE
900 new_unique_key_hash(struct parser_params *p, VALUE ary, const YYLTYPE *loc)
901 {
902  return ary;
903 }
904 
905 static VALUE
906 new_hash_pattern(struct parser_params *p, VALUE constant, VALUE hshptn, const YYLTYPE *loc)
907 {
908  NODE *t = (NODE *)hshptn;
909  VALUE kw_args = t->u1.value, kw_rest_arg = t->u2.value;
910  return dispatch3(hshptn, constant, kw_args, kw_rest_arg);
911 }
912 
913 static VALUE
914 new_hash_pattern_tail(struct parser_params *p, VALUE kw_args, VALUE kw_rest_arg, const YYLTYPE *loc)
915 {
916  NODE *t;
917  if (kw_rest_arg) {
918  kw_rest_arg = dispatch1(var_field, kw_rest_arg);
919  }
920  else {
921  kw_rest_arg = Qnil;
922  }
923  t = rb_node_newnode(NODE_HSHPTN, kw_args, kw_rest_arg, 0, &NULL_LOC);
924 
925  add_mark_object(p, kw_args);
926  add_mark_object(p, kw_rest_arg);
927  return (VALUE)t;
928 }
929 
930 #define new_defined(p,expr,loc) dispatch1(defined, (expr))
931 
932 static VALUE heredoc_dedent(struct parser_params*,VALUE);
933 
934 #else
935 #define ID2VAL(id) (id)
936 #define TOKEN2VAL(t) ID2VAL(t)
937 #define KWD2EID(t, v) keyword_##t
938 #endif /* RIPPER */
939 
940 #ifndef RIPPER
941 # define Qnone 0
942 # define Qnull 0
943 # define ifndef_ripper(x) (x)
944 #else
945 # define Qnone Qnil
946 # define Qnull Qundef
947 # define ifndef_ripper(x)
948 #endif
949 
950 # define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
951 # define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
952 # define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
953 # define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
954 # define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
955 # define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
956 # define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
957 # define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
958 # define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
959 # define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
960 # define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
961 # define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
962 # define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
963 # define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
964 # define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
965 # define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
966 # define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
967 # define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
968 # define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
969 # define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
970 #ifdef RIPPER
971 static ID id_warn, id_warning, id_gets, id_assoc;
972 # define WARN_S_L(s,l) STR_NEW(s,l)
973 # define WARN_S(s) STR_NEW2(s)
974 # define WARN_I(i) INT2NUM(i)
975 # define WARN_ID(i) rb_id2str(i)
976 # define WARN_IVAL(i) i
977 # define PRIsWARN "s"
978 # define WARN_ARGS(fmt,n) p->value, id_warn, n, rb_usascii_str_new_lit(fmt)
979 # define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
980 # ifdef HAVE_VA_ARGS_MACRO
981 # define WARN_CALL(...) rb_funcall(__VA_ARGS__)
982 # else
983 # define WARN_CALL rb_funcall
984 # endif
985 # define WARNING_ARGS(fmt,n) p->value, id_warning, n, rb_usascii_str_new_lit(fmt)
986 # define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
987 # ifdef HAVE_VA_ARGS_MACRO
988 # define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
989 # else
990 # define WARNING_CALL rb_funcall
991 # endif
992 PRINTF_ARGS(static void ripper_compile_error(struct parser_params*, const char *fmt, ...), 2, 3);
993 # define compile_error ripper_compile_error
994 #else
995 # define WARN_S_L(s,l) s
996 # define WARN_S(s) s
997 # define WARN_I(i) i
998 # define WARN_ID(i) rb_id2name(i)
999 # define WARN_IVAL(i) NUM2INT(i)
1000 # define PRIsWARN PRIsVALUE
1001 # define WARN_ARGS(fmt,n) WARN_ARGS_L(p->ruby_sourceline,fmt,n)
1002 # define WARN_ARGS_L(l,fmt,n) p->ruby_sourcefile, (l), (fmt)
1003 # define WARN_CALL rb_compile_warn
1004 # define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1005 # define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1006 # define WARNING_CALL rb_compile_warning
1007 PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const char *fmt, ...), 2, 3);
1008 # define compile_error parser_compile_error
1009 #endif
1010 
1011 static void token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc);
1012 static void token_info_push(struct parser_params*, const char *token, const rb_code_location_t *loc);
1013 static void token_info_pop(struct parser_params*, const char *token, const rb_code_location_t *loc);
1014 static void token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc);
1015 
1016 #define WARN_EOL(tok) \
1017  (looking_at_eol_p(p) ? \
1018  (void)rb_warning0("`" tok "' at the end of line without an expression") : \
1019  (void)0)
1020 static int looking_at_eol_p(struct parser_params *p);
1021 
1022 #line 1023 "parse.c" /* yacc.c:339 */
1023 
1024 # ifndef YY_NULLPTR
1025 # if defined __cplusplus && 201103L <= __cplusplus
1026 # define YY_NULLPTR nullptr
1027 # else
1028 # define YY_NULLPTR 0
1029 # endif
1030 # endif
1031 
1032 /* Enabling verbose error messages. */
1033 #ifdef YYERROR_VERBOSE
1034 # undef YYERROR_VERBOSE
1035 # define YYERROR_VERBOSE 1
1036 #else
1037 # define YYERROR_VERBOSE 0
1038 #endif
1039 
1040 /* In a future release of Bison, this section will be replaced
1041  by #include "y.tab.h". */
1042 #ifndef YY_YY_Y_TAB_H_INCLUDED
1043 # define YY_YY_Y_TAB_H_INCLUDED
1044 /* Debug traces. */
1045 #ifndef YYDEBUG
1046 # define YYDEBUG 0
1047 #endif
1048 #if YYDEBUG
1049 #ifndef yydebug
1050 extern int yydebug;
1051 #endif
1052 #endif
1053 
1054 /* Token type. */
1055 #ifndef YYTOKENTYPE
1056 # define YYTOKENTYPE
1057  enum yytokentype
1058  {
1059  END_OF_INPUT = 0,
1060  keyword_class = 258,
1061  keyword_module = 259,
1062  keyword_def = 260,
1063  keyword_undef = 261,
1064  keyword_begin = 262,
1065  keyword_rescue = 263,
1066  keyword_ensure = 264,
1067  keyword_end = 265,
1068  keyword_if = 266,
1069  keyword_unless = 267,
1070  keyword_then = 268,
1071  keyword_elsif = 269,
1072  keyword_else = 270,
1073  keyword_case = 271,
1074  keyword_when = 272,
1075  keyword_while = 273,
1076  keyword_until = 274,
1077  keyword_for = 275,
1078  keyword_break = 276,
1079  keyword_next = 277,
1080  keyword_redo = 278,
1081  keyword_retry = 279,
1082  keyword_in = 280,
1083  keyword_do = 281,
1084  keyword_do_cond = 282,
1085  keyword_do_block = 283,
1086  keyword_do_LAMBDA = 284,
1087  keyword_return = 285,
1088  keyword_yield = 286,
1089  keyword_super = 287,
1090  keyword_self = 288,
1091  keyword_nil = 289,
1092  keyword_true = 290,
1093  keyword_false = 291,
1094  keyword_and = 292,
1095  keyword_or = 293,
1096  keyword_not = 294,
1097  modifier_if = 295,
1098  modifier_unless = 296,
1099  modifier_while = 297,
1100  modifier_until = 298,
1101  modifier_rescue = 299,
1102  keyword_alias = 300,
1103  keyword_defined = 301,
1104  keyword_BEGIN = 302,
1105  keyword_END = 303,
1106  keyword__LINE__ = 304,
1107  keyword__FILE__ = 305,
1108  keyword__ENCODING__ = 306,
1109  tIDENTIFIER = 307,
1110  tFID = 308,
1111  tGVAR = 309,
1112  tIVAR = 310,
1113  tCONSTANT = 311,
1114  tCVAR = 312,
1115  tLABEL = 313,
1116  tINTEGER = 314,
1117  tFLOAT = 315,
1118  tRATIONAL = 316,
1119  tIMAGINARY = 317,
1120  tCHAR = 318,
1121  tNTH_REF = 319,
1122  tBACK_REF = 320,
1123  tSTRING_CONTENT = 321,
1124  tREGEXP_END = 322,
1125  tSP = 323,
1126  tUPLUS = 132,
1127  tUMINUS = 133,
1128  tPOW = 134,
1129  tCMP = 135,
1130  tEQ = 140,
1131  tEQQ = 141,
1132  tNEQ = 142,
1133  tGEQ = 139,
1134  tLEQ = 138,
1135  tANDOP = 148,
1136  tOROP = 149,
1137  tMATCH = 143,
1138  tNMATCH = 144,
1139  tDOT2 = 128,
1140  tDOT3 = 129,
1141  tBDOT2 = 130,
1142  tBDOT3 = 131,
1143  tAREF = 145,
1144  tASET = 146,
1145  tLSHFT = 136,
1146  tRSHFT = 137,
1147  tANDDOT = 150,
1148  tCOLON2 = 147,
1149  tCOLON3 = 324,
1150  tOP_ASGN = 325,
1151  tASSOC = 326,
1152  tLPAREN = 327,
1153  tLPAREN_ARG = 328,
1154  tRPAREN = 329,
1155  tLBRACK = 330,
1156  tLBRACE = 331,
1157  tLBRACE_ARG = 332,
1158  tSTAR = 333,
1159  tDSTAR = 334,
1160  tAMPER = 335,
1161  tLAMBDA = 336,
1162  tSYMBEG = 337,
1163  tSTRING_BEG = 338,
1164  tXSTRING_BEG = 339,
1165  tREGEXP_BEG = 340,
1166  tWORDS_BEG = 341,
1167  tQWORDS_BEG = 342,
1168  tSYMBOLS_BEG = 343,
1169  tQSYMBOLS_BEG = 344,
1170  tSTRING_END = 345,
1171  tSTRING_DEND = 346,
1172  tSTRING_DBEG = 347,
1173  tSTRING_DVAR = 348,
1174  tLAMBEG = 349,
1175  tLABEL_END = 350,
1176  tLOWEST = 351,
1177  tUMINUS_NUM = 352,
1178  tLAST_TOKEN = 353
1179  };
1180 #endif
1181 
1182 /* Value type. */
1183 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
1184 
1185 union YYSTYPE
1186 {
1187 #line 978 "parse.y" /* yacc.c:355 */
1188 
1189  VALUE val;
1190  NODE *node;
1191  ID id;
1192  int num;
1193  st_table *tbl;
1194  const struct vtable *vars;
1195  struct rb_strterm_struct *strterm;
1196 
1197 #line 1196 "parse.c" /* yacc.c:355 */
1198 };
1199 
1200 typedef union YYSTYPE YYSTYPE;
1201 # define YYSTYPE_IS_TRIVIAL 1
1202 # define YYSTYPE_IS_DECLARED 1
1203 #endif
1204 
1205 /* Location type. */
1206 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
1207 typedef struct YYLTYPE YYLTYPE;
1208 struct YYLTYPE
1209 {
1210  int first_line;
1211  int first_column;
1212  int last_line;
1213  int last_column;
1214 };
1215 # define YYLTYPE_IS_DECLARED 1
1216 # define YYLTYPE_IS_TRIVIAL 1
1217 #endif
1218 
1219 
1220 
1221 int yyparse (struct parser_params *p);
1222 
1223 #endif /* !YY_YY_Y_TAB_H_INCLUDED */
1224 
1225 /* Copy the second part of user declarations. */
1226 
1227 #line 1226 "parse.c" /* yacc.c:358 */
1228 
1229 #ifdef short
1230 # undef short
1231 #endif
1232 
1233 #ifdef YYTYPE_UINT8
1234 typedef YYTYPE_UINT8 yytype_uint8;
1235 #else
1236 typedef unsigned char yytype_uint8;
1237 #endif
1238 
1239 #ifdef YYTYPE_INT8
1240 typedef YYTYPE_INT8 yytype_int8;
1241 #else
1242 typedef signed char yytype_int8;
1243 #endif
1244 
1245 #ifdef YYTYPE_UINT16
1246 typedef YYTYPE_UINT16 yytype_uint16;
1247 #else
1248 typedef unsigned short int yytype_uint16;
1249 #endif
1250 
1251 #ifdef YYTYPE_INT16
1252 typedef YYTYPE_INT16 yytype_int16;
1253 #else
1254 typedef short int yytype_int16;
1255 #endif
1256 
1257 #ifndef YYSIZE_T
1258 # ifdef __SIZE_TYPE__
1259 # define YYSIZE_T __SIZE_TYPE__
1260 # elif defined size_t
1261 # define YYSIZE_T size_t
1262 # elif ! defined YYSIZE_T
1263 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1264 # define YYSIZE_T size_t
1265 # else
1266 # define YYSIZE_T unsigned int
1267 # endif
1268 #endif
1269 
1270 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1271 
1272 #ifndef YY_
1273 # if defined YYENABLE_NLS && YYENABLE_NLS
1274 # if ENABLE_NLS
1275 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1276 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
1277 # endif
1278 # endif
1279 # ifndef YY_
1280 # define YY_(Msgid) Msgid
1281 # endif
1282 #endif
1283 
1284 #ifndef YY_ATTRIBUTE
1285 # if (defined __GNUC__ \
1286  && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
1287  || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
1288 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
1289 # else
1290 # define YY_ATTRIBUTE(Spec) /* empty */
1291 # endif
1292 #endif
1293 
1294 #ifndef YY_ATTRIBUTE_PURE
1295 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
1296 #endif
1297 
1298 #ifndef YY_ATTRIBUTE_UNUSED
1299 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
1300 #endif
1301 
1302 #if !defined _Noreturn \
1303  && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
1304 # if defined _MSC_VER && 1200 <= _MSC_VER
1305 # define _Noreturn __declspec (noreturn)
1306 # else
1307 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
1308 # endif
1309 #endif
1310 
1311 /* Suppress unused-variable warnings by "using" E. */
1312 #if ! defined lint || defined __GNUC__
1313 # define YYUSE(E) ((void) (E))
1314 #else
1315 # define YYUSE(E) /* empty */
1316 #endif
1317 
1318 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
1319 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
1320 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
1321  _Pragma ("GCC diagnostic push") \
1322  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
1323  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
1324 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
1325  _Pragma ("GCC diagnostic pop")
1326 #else
1327 # define YY_INITIAL_VALUE(Value) Value
1328 #endif
1329 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1330 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1331 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
1332 #endif
1333 #ifndef YY_INITIAL_VALUE
1334 # define YY_INITIAL_VALUE(Value) /* Nothing. */
1335 #endif
1336 
1337 
1338 #if ! defined yyoverflow || YYERROR_VERBOSE
1339 
1340 /* The parser invokes alloca or malloc; define the necessary symbols. */
1341 
1342 # ifdef YYSTACK_USE_ALLOCA
1343 # if YYSTACK_USE_ALLOCA
1344 # ifdef __GNUC__
1345 # define YYSTACK_ALLOC __builtin_alloca
1346 # elif defined __BUILTIN_VA_ARG_INCR
1347 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
1348 # elif defined _AIX
1349 # define YYSTACK_ALLOC __alloca
1350 # elif defined _MSC_VER
1351 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
1352 # define alloca _alloca
1353 # else
1354 # define YYSTACK_ALLOC alloca
1355 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
1356 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1357  /* Use EXIT_SUCCESS as a witness for stdlib.h. */
1358 # ifndef EXIT_SUCCESS
1359 # define EXIT_SUCCESS 0
1360 # endif
1361 # endif
1362 # endif
1363 # endif
1364 # endif
1365 
1366 # ifdef YYSTACK_ALLOC
1367  /* Pacify GCC's 'empty if-body' warning. */
1368 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
1369 # ifndef YYSTACK_ALLOC_MAXIMUM
1370  /* The OS might guarantee only one guard page at the bottom of the stack,
1371  and a page size can be as small as 4096 bytes. So we cannot safely
1372  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
1373  to allow for a few compiler-allocated temporary stack slots. */
1374 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
1375 # endif
1376 # else
1377 # define YYSTACK_ALLOC YYMALLOC
1378 # define YYSTACK_FREE YYFREE
1379 # ifndef YYSTACK_ALLOC_MAXIMUM
1380 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
1381 # endif
1382 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
1383  && ! ((defined YYMALLOC || defined malloc) \
1384  && (defined YYFREE || defined free)))
1385 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1386 # ifndef EXIT_SUCCESS
1387 # define EXIT_SUCCESS 0
1388 # endif
1389 # endif
1390 # ifndef YYMALLOC
1391 # define YYMALLOC malloc
1392 # if ! defined malloc && ! defined EXIT_SUCCESS
1393 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1394 # endif
1395 # endif
1396 # ifndef YYFREE
1397 # define YYFREE free
1398 # if ! defined free && ! defined EXIT_SUCCESS
1399 void free (void *); /* INFRINGES ON USER NAME SPACE */
1400 # endif
1401 # endif
1402 # endif
1403 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1404 
1405 
1406 #if (! defined yyoverflow \
1407  && (! defined __cplusplus \
1408  || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
1409  && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1410 
1411 /* A type that is properly aligned for any stack member. */
1412 union yyalloc
1413 {
1417 };
1418 
1419 /* The size of the maximum gap between one aligned stack and the next. */
1420 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1421 
1422 /* The size of an array large to enough to hold all stacks, each with
1423  N elements. */
1424 # define YYSTACK_BYTES(N) \
1425  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
1426  + 2 * YYSTACK_GAP_MAXIMUM)
1427 
1428 # define YYCOPY_NEEDED 1
1429 
1430 /* Relocate STACK from its old location to the new one. The
1431  local variables YYSIZE and YYSTACKSIZE give the old and new number of
1432  elements in the stack, and YYPTR gives the new location of the
1433  stack. Advance YYPTR to a properly aligned location for the next
1434  stack. */
1435 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1436  do \
1437  { \
1438  YYSIZE_T yynewbytes; \
1439  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1440  Stack = &yyptr->Stack_alloc; \
1441  yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1442  yyptr += yynewbytes / sizeof (*yyptr); \
1443  } \
1444  while (0)
1445 
1446 #endif
1447 
1448 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
1449 /* Copy COUNT objects from SRC to DST. The source and destination do
1450  not overlap. */
1451 # ifndef YYCOPY
1452 # if defined __GNUC__ && 1 < __GNUC__
1453 # define YYCOPY(Dst, Src, Count) \
1454  __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
1455 # else
1456 # define YYCOPY(Dst, Src, Count) \
1457  do \
1458  { \
1459  YYSIZE_T yyi; \
1460  for (yyi = 0; yyi < (Count); yyi++) \
1461  (Dst)[yyi] = (Src)[yyi]; \
1462  } \
1463  while (0)
1464 # endif
1465 # endif
1466 #endif /* !YYCOPY_NEEDED */
1467 
1468 /* YYFINAL -- State number of the termination state. */
1469 #define YYFINAL 3
1470 /* YYLAST -- Last index in YYTABLE. */
1471 #define YYLAST 13832
1472 
1473 /* YYNTOKENS -- Number of terminals. */
1474 #define YYNTOKENS 154
1475 /* YYNNTS -- Number of nonterminals. */
1476 #define YYNNTS 265
1477 /* YYNRULES -- Number of rules. */
1478 #define YYNRULES 757
1479 /* YYNSTATES -- Number of states. */
1480 #define YYNSTATES 1241
1481 
1482 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
1483  by yylex, with out-of-bounds checking. */
1484 #define YYUNDEFTOK 2
1485 #define YYMAXUTOK 353
1486 
1487 #define YYTRANSLATE(YYX) \
1488  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1489 
1490 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
1491  as returned by yylex, without out-of-bounds checking. */
1492 static const yytype_uint8 yytranslate[] =
1493 {
1494  0, 2, 2, 2, 2, 2, 2, 2, 2, 71,
1495  153, 74, 72, 73, 2, 2, 2, 2, 2, 2,
1496  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1497  2, 2, 152, 140, 2, 2, 2, 138, 133, 2,
1498  148, 149, 136, 134, 146, 135, 68, 137, 2, 2,
1499  2, 2, 2, 2, 2, 2, 2, 2, 128, 151,
1500  130, 126, 129, 127, 2, 2, 2, 2, 2, 2,
1501  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1502  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1503  2, 145, 69, 150, 132, 2, 147, 2, 2, 2,
1504  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1505  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1506  2, 2, 2, 143, 131, 144, 141, 2, 88, 89,
1507  90, 91, 75, 76, 77, 78, 94, 95, 83, 82,
1508  79, 80, 81, 86, 87, 92, 93, 97, 84, 85,
1509  96, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1510  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1511  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1512  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1513  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1514  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1515  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1516  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1517  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1518  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1519  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1520  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1521  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1522  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1523  35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1524  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1525  55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1526  65, 66, 67, 70, 98, 99, 100, 101, 102, 103,
1527  104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
1528  114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
1529  124, 125, 139, 142
1530 };
1531 
1532 #if YYDEBUG
1533  /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
1534 static const yytype_uint16 yyrline[] =
1535 {
1536  0, 1176, 1176, 1176, 1202, 1208, 1215, 1222, 1229, 1235,
1537  1236, 1242, 1255, 1253, 1264, 1275, 1281, 1288, 1295, 1302,
1538  1308, 1313, 1312, 1322, 1322, 1329, 1336, 1346, 1354, 1361,
1539  1369, 1377, 1389, 1401, 1411, 1425, 1426, 1434, 1442, 1451,
1540  1458, 1461, 1469, 1477, 1486, 1494, 1502, 1510, 1518, 1528,
1541  1533, 1542, 1545, 1546, 1550, 1554, 1558, 1563, 1570, 1572,
1542  1562, 1580, 1583, 1590, 1590, 1590, 1596, 1597, 1600, 1601,
1543  1610, 1620, 1630, 1639, 1650, 1657, 1664, 1671, 1678, 1686,
1544  1694, 1701, 1708, 1717, 1718, 1727, 1728, 1737, 1744, 1751,
1545  1758, 1765, 1772, 1779, 1786, 1793, 1800, 1809, 1810, 1819,
1546  1826, 1835, 1842, 1851, 1858, 1865, 1872, 1882, 1889, 1899,
1547  1906, 1913, 1923, 1930, 1937, 1944, 1951, 1958, 1965, 1972,
1548  1979, 1989, 1996, 1999, 2006, 2013, 2022, 2023, 2024, 2025,
1549  2030, 2037, 2044, 2047, 2054, 2054, 2064, 2065, 2066, 2067,
1550  2068, 2069, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077,
1551  2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087,
1552  2088, 2089, 2090, 2091, 2092, 2093, 2096, 2096, 2096, 2097,
1553  2097, 2098, 2098, 2098, 2099, 2099, 2099, 2099, 2100, 2100,
1554  2100, 2100, 2101, 2101, 2101, 2102, 2102, 2102, 2102, 2103,
1555  2103, 2103, 2103, 2104, 2104, 2104, 2104, 2105, 2105, 2105,
1556  2105, 2106, 2106, 2106, 2106, 2107, 2107, 2110, 2117, 2124,
1557  2132, 2140, 2148, 2156, 2164, 2171, 2179, 2188, 2197, 2209,
1558  2221, 2233, 2245, 2249, 2253, 2257, 2261, 2265, 2269, 2273,
1559  2277, 2281, 2285, 2289, 2293, 2297, 2298, 2302, 2306, 2310,
1560  2314, 2318, 2322, 2326, 2330, 2334, 2338, 2342, 2342, 2347,
1561  2356, 2362, 2363, 2364, 2365, 2368, 2372, 2379, 2386, 2387,
1562  2391, 2398, 2407, 2412, 2423, 2430, 2459, 2460, 2463, 2464,
1563  2465, 2469, 2476, 2485, 2493, 2500, 2508, 2516, 2520, 2520,
1564  2557, 2566, 2570, 2576, 2583, 2590, 2597, 2606, 2607, 2610,
1565  2617, 2624, 2633, 2634, 2635, 2636, 2637, 2638, 2639, 2640,
1566  2641, 2642, 2643, 2651, 2650, 2665, 2665, 2672, 2672, 2680,
1567  2688, 2695, 2702, 2709, 2717, 2724, 2731, 2738, 2745, 2745,
1568  2750, 2754, 2758, 2765, 2766, 2775, 2774, 2785, 2796, 2807,
1569  2817, 2828, 2827, 2844, 2843, 2858, 2867, 2915, 2914, 2938,
1570  2937, 2960, 2959, 2983, 2989, 2982, 3009, 3010, 3009, 3035,
1571  3042, 3049, 3056, 3065, 3072, 3078, 3095, 3101, 3107, 3113,
1572  3119, 3125, 3131, 3137, 3143, 3149, 3155, 3161, 3167, 3173,
1573  3188, 3195, 3201, 3208, 3209, 3210, 3213, 3214, 3217, 3218,
1574  3230, 3231, 3240, 3241, 3244, 3252, 3261, 3268, 3277, 3284,
1575  3291, 3298, 3305, 3314, 3322, 3331, 3335, 3339, 3343, 3347,
1576  3353, 3358, 3363, 3367, 3371, 3375, 3379, 3383, 3391, 3395,
1577  3399, 3403, 3407, 3411, 3415, 3419, 3423, 3429, 3430, 3436,
1578  3445, 3457, 3461, 3470, 3472, 3476, 3481, 3487, 3490, 3494,
1579  3498, 3502, 3487, 3526, 3534, 3544, 3549, 3555, 3565, 3579,
1580  3586, 3593, 3602, 3611, 3619, 3627, 3634, 3642, 3650, 3657,
1581  3664, 3677, 3685, 3695, 3696, 3700, 3695, 3717, 3718, 3722,
1582  3717, 3741, 3749, 3756, 3764, 3773, 3785, 3786, 3790, 3796,
1583  3797, 3799, 3800, 3801, 3789, 3814, 3815, 3818, 3819, 3827,
1584  3837, 3838, 3843, 3851, 3855, 3861, 3864, 3873, 3876, 3883,
1585  3886, 3887, 3889, 3890, 3899, 3908, 3913, 3922, 3931, 3936,
1586  3936, 3941, 3946, 3946, 3951, 3956, 3956, 3963, 3972, 3976,
1587  3985, 3989, 3993, 3997, 4001, 4004, 4008, 4017, 4021, 4025,
1588  4029, 4035, 4036, 4045, 4054, 4058, 4062, 4066, 4070, 4076,
1589  4078, 4087, 4095, 4109, 4110, 4133, 4137, 4143, 4149, 4150,
1590  4159, 4168, 4180, 4192, 4193, 4194, 4195, 4207, 4221, 4222,
1591  4223, 4224, 4225, 4226, 4227, 4228, 4229, 4237, 4236, 4249,
1592  4259, 4272, 4279, 4286, 4295, 4307, 4310, 4317, 4324, 4327,
1593  4331, 4334, 4341, 4344, 4345, 4348, 4365, 4366, 4367, 4376,
1594  4386, 4395, 4401, 4411, 4417, 4426, 4428, 4437, 4447, 4453,
1595  4462, 4471, 4481, 4487, 4497, 4503, 4513, 4523, 4542, 4548,
1596  4558, 4568, 4609, 4612, 4611, 4628, 4632, 4637, 4641, 4645,
1597  4627, 4666, 4673, 4680, 4687, 4690, 4691, 4694, 4704, 4705,
1598  4706, 4707, 4710, 4720, 4721, 4731, 4732, 4733, 4734, 4737,
1599  4738, 4739, 4740, 4741, 4744, 4745, 4746, 4747, 4748, 4749,
1600  4750, 4753, 4766, 4775, 4782, 4791, 4792, 4796, 4795, 4805,
1601  4813, 4822, 4837, 4837, 4851, 4855, 4859, 4863, 4867, 4873,
1602  4878, 4883, 4887, 4891, 4895, 4899, 4903, 4907, 4911, 4915,
1603  4919, 4923, 4927, 4931, 4935, 4940, 4946, 4955, 4963, 4971,
1604  4979, 4989, 4990, 4998, 5007, 5015, 5036, 5038, 5051, 5061,
1605  5069, 5079, 5086, 5095, 5102, 5112, 5119, 5128, 5129, 5132,
1606  5140, 5148, 5158, 5168, 5178, 5185, 5194, 5201, 5210, 5211,
1607  5214, 5222, 5232, 5233, 5236, 5246, 5250, 5256, 5261, 5261,
1608  5285, 5286, 5295, 5297, 5320, 5331, 5338, 5346, 5365, 5366,
1609  5367, 5370, 5371, 5372, 5373, 5376, 5377, 5378, 5381, 5382,
1610  5385, 5386, 5389, 5390, 5393, 5394, 5397, 5398, 5401, 5404,
1611  5407, 5408, 5409, 5412, 5413, 5416, 5417, 5421
1612 };
1613 #endif
1614 
1615 #if YYDEBUG || YYERROR_VERBOSE || 0
1616 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1617  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1618 static const char *const yytname[] =
1619 {
1620  "\"end-of-input\"", "error", "$undefined", "\"`class'\"",
1621  "\"`module'\"", "\"`def'\"", "\"`undef'\"", "\"`begin'\"",
1622  "\"`rescue'\"", "\"`ensure'\"", "\"`end'\"", "\"`if'\"", "\"`unless'\"",
1623  "\"`then'\"", "\"`elsif'\"", "\"`else'\"", "\"`case'\"", "\"`when'\"",
1624  "\"`while'\"", "\"`until'\"", "\"`for'\"", "\"`break'\"", "\"`next'\"",
1625  "\"`redo'\"", "\"`retry'\"", "\"`in'\"", "\"`do'\"",
1626  "\"`do' for condition\"", "\"`do' for block\"", "\"`do' for lambda\"",
1627  "\"`return'\"", "\"`yield'\"", "\"`super'\"", "\"`self'\"", "\"`nil'\"",
1628  "\"`true'\"", "\"`false'\"", "\"`and'\"", "\"`or'\"", "\"`not'\"",
1629  "\"`if' modifier\"", "\"`unless' modifier\"", "\"`while' modifier\"",
1630  "\"`until' modifier\"", "\"`rescue' modifier\"", "\"`alias'\"",
1631  "\"`defined?'\"", "\"`BEGIN'\"", "\"`END'\"", "\"`__LINE__'\"",
1632  "\"`__FILE__'\"", "\"`__ENCODING__'\"", "\"local variable or method\"",
1633  "\"method\"", "\"global variable\"", "\"instance variable\"",
1634  "\"constant\"", "\"class variable\"", "tLABEL", "\"integer literal\"",
1635  "\"float literal\"", "\"rational literal\"", "\"imaginary literal\"",
1636  "\"char literal\"", "\"numbered reference\"", "\"back reference\"",
1637  "\"literal content\"", "tREGEXP_END", "'.'", "\"backslash\"",
1638  "\"escaped space\"", "\"escaped horizontal tab\"",
1639  "\"escaped form feed\"", "\"escaped carriage return\"",
1640  "\"escaped vertical tab\"", "\"unary+\"", "\"unary-\"", "\"**\"",
1641  "\"<=>\"", "\"==\"", "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"",
1642  "\"||\"", "\"=~\"", "\"!~\"", "\"..\"", "\"...\"", "\"(..\"", "\"(...\"",
1643  "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"", "\"&.\"", "\"::\"",
1644  "\":: at EXPR_BEG\"", "\"operator-assignment\"", "\"=>\"", "\"(\"",
1645  "\"( arg\"", "\")\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"",
1646  "\"**arg\"", "\"&\"", "\"->\"", "\"symbol literal\"",
1647  "\"string literal\"", "\"backtick literal\"", "\"regexp literal\"",
1648  "\"word list\"", "\"verbatim word list\"", "\"symbol list\"",
1649  "\"verbatim symbol list\"", "\"terminator\"", "\"'}'\"", "tSTRING_DBEG",
1650  "tSTRING_DVAR", "tLAMBEG", "tLABEL_END", "tLOWEST", "'='", "'?'", "':'",
1651  "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'", "'*'", "'/'", "'%'",
1652  "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'", "'}'", "'['", "','",
1653  "'`'", "'('", "')'", "']'", "';'", "' '", "'\\n'", "$accept", "program",
1654  "$@1", "top_compstmt", "top_stmts", "top_stmt", "begin_block",
1655  "bodystmt", "$@2", "compstmt", "stmts", "stmt_or_begin", "$@3", "stmt",
1656  "$@4", "command_asgn", "command_rhs", "expr", "@5", "@6", "$@7",
1657  "expr_value", "expr_value_do", "$@8", "$@9", "command_call",
1658  "block_command", "cmd_brace_block", "fcall", "command", "mlhs",
1659  "mlhs_inner", "mlhs_basic", "mlhs_item", "mlhs_head", "mlhs_post",
1660  "mlhs_node", "lhs", "cname", "cpath", "fname", "fitem", "undef_list",
1661  "$@10", "op", "reswords", "arg", "$@11", "relop", "rel_expr",
1662  "arg_value", "aref_args", "arg_rhs", "paren_args", "opt_paren_args",
1663  "opt_call_args", "call_args", "command_args", "$@12", "block_arg",
1664  "opt_block_arg", "args", "mrhs_arg", "mrhs", "primary", "$@13", "$@14",
1665  "$@15", "$@16", "$@17", "@18", "@19", "$@20", "@21", "$@22", "@23",
1666  "@24", "@25", "@26", "primary_value", "k_begin", "k_if", "k_unless",
1667  "k_while", "k_until", "k_case", "k_for", "k_class", "k_module", "k_def",
1668  "k_do", "k_do_block", "k_rescue", "k_ensure", "k_when", "k_else",
1669  "k_elsif", "k_end", "k_return", "then", "do", "if_tail", "opt_else",
1670  "for_var", "f_marg", "f_marg_list", "f_margs", "f_rest_marg",
1671  "block_args_tail", "opt_block_args_tail", "block_param",
1672  "opt_block_param", "block_param_def", "opt_bv_decl", "bv_decls", "bvar",
1673  "lambda", "@27", "@28", "@29", "@30", "$@31", "f_larglist",
1674  "lambda_body", "do_block", "block_call", "method_call", "brace_block",
1675  "brace_body", "@32", "@33", "@34", "do_body", "@35", "@36", "@37",
1676  "case_args", "case_body", "cases", "p_case_body", "@38", "@39", "@40",
1677  "$@41", "$@42", "$@43", "p_cases", "p_top_expr", "p_top_expr_body",
1678  "p_expr", "p_as", "p_alt", "p_lparen", "p_lbracket", "p_expr_basic",
1679  "@44", "@45", "@46", "p_args", "p_args_head", "p_args_tail",
1680  "p_args_post", "p_arg", "p_kwargs", "p_kwarg", "p_kw", "p_kw_label",
1681  "p_kwrest", "p_kwnorest", "p_value", "p_primitive", "$@47", "p_variable",
1682  "p_var_ref", "p_const", "opt_rescue", "exc_list", "exc_var",
1683  "opt_ensure", "literal", "strings", "string", "string1", "xstring",
1684  "regexp", "words", "word_list", "word", "symbols", "symbol_list",
1685  "qwords", "qsymbols", "qword_list", "qsym_list", "string_contents",
1686  "xstring_contents", "regexp_contents", "string_content", "@48", "$@49",
1687  "@50", "@51", "@52", "@53", "string_dvar", "symbol", "ssym", "sym",
1688  "dsym", "numeric", "simple_numeric", "user_variable", "keyword_variable",
1689  "var_ref", "var_lhs", "backref", "superclass", "$@54", "f_arglist",
1690  "@55", "args_tail", "opt_args_tail", "f_args", "args_forward",
1691  "f_bad_arg", "f_norm_arg", "f_arg_asgn", "f_arg_item", "f_arg",
1692  "f_label", "f_kw", "f_block_kw", "f_block_kwarg", "f_kwarg",
1693  "kwrest_mark", "f_no_kwarg", "f_kwrest", "f_opt", "f_block_opt",
1694  "f_block_optarg", "f_optarg", "restarg_mark", "f_rest_arg",
1695  "blkarg_mark", "f_block_arg", "opt_f_block_arg", "singleton", "$@56",
1696  "assoc_list", "assocs", "assoc", "operation", "operation2", "operation3",
1697  "dot_or_colon", "call_op", "call_op2", "opt_terms", "opt_nl", "rparen",
1698  "rbracket", "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 -1056
1727 
1728 #define yypact_value_is_default(Yystate) \
1729  (!!((Yystate) == (-1056)))
1730 
1731 #define YYTABLE_NINF -758
1732 
1733 #define yytable_value_is_error(Yytable_value) \
1734  (!!((Yytable_value) == (-758)))
1735 
1736  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1737  STATE-NUM. */
1738 static const yytype_int16 yypact[] =
1739 {
1740  -1056, 97, 3943, -1056, 9202, -1056, -1056, -1056, 8660, -1056,
1741  -1056, -1056, -1056, -1056, -1056, -1056, 9328, 9328, -1056, -1056,
1742  -1056, 5267, 4826, -1056, -1056, -1056, -1056, -41, 8515, 18,
1743  -33, 124, -1056, -1056, -1056, 3778, 4973, -1056, -1056, 4238,
1744  -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, 10966, 10966,
1745  10966, 10966, 90, 6715, 9454, 9832, 10210, 8944, -1056, 8370,
1746  -1056, -1056, -1056, 72, 143, 146, 197, 1315, 11092, 10966,
1747  -1056, 6, -1056, 1265, -1056, 411, -1056, -1056, 249, 152,
1748  253, -1056, 239, 11344, -1056, 279, 1752, 377, 542, 624,
1749  -1056, 11218, 11218, -1056, -1056, 7697, 11466, 11588, 11710, 8224,
1750  9328, 48, 21, -1056, -1056, 281, -1056, -1056, -1056, -1056,
1751  -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, 394, 461,
1752  -1056, 355, 498, -1056, -1056, -1056, -1056, -1056, -1056, -1056,
1753  -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056,
1754  -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056,
1755  -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056,
1756  -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056,
1757  -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056,
1758  -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056,
1759  -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056,
1760  -1056, -1056, 343, -1056, -1056, -1056, 346, 10966, 453, 6866,
1761  10966, 10966, 10966, -1056, 10966, -1056, 399, 4510, 448, -1056,
1762  -1056, 357, 723, 9, 300, 438, 547, 423, -1056, -1056,
1763  7571, -1056, 9328, 9580, -1056, -1056, 7823, -1056, 11218, 336,
1764  -1056, 430, 7017, -1056, 7168, -1056, -1056, 464, 483, 249,
1765  -1056, 740, -1056, 565, 3504, 3504, 581, 9454, -1056, 6715,
1766  549, 6, -1056, 1265, 18, 586, -1056, 1265, 18, 568,
1767  588, 640, -1056, 448, 578, 640, -1056, 18, 690, 1315,
1768  11832, 617, -1056, 790, 858, 885, 923, -1056, -1056, -1056,
1769  -1056, -1056, 362, -1056, 446, 562, 683, -1056, -1056, -1056,
1770  -1056, 694, -1056, -1056, -1056, -1056, -1056, -1056, -1056, 7949,
1771  11218, 11218, 11218, 11218, 9454, 11218, 11218, -1056, -1056, -1056,
1772  668, -1056, -1056, -1056, -1056, -1056, 10336, -1056, 6715, 9073,
1773  663, 10336, -1056, 10966, 10966, 10966, 10966, 10966, -1056, -1056,
1774  10966, 10966, 10966, 10966, 10966, 10966, 10966, 10966, 10966, -1056,
1775  -1056, 10966, 10966, 10966, 10966, 10966, 10966, 10966, 10966, 10966,
1776  10966, -1056, -1056, 12335, 9328, 12425, 5859, 411, 108, 108,
1777  7319, 11218, 7319, 6, -1056, 674, 758, -1056, -1056, 936,
1778  819, 53, 77, 126, 732, 827, 11218, 274, -1056, 727,
1779  940, -1056, -1056, -1056, -1056, 403, 437, 475, 517, 533,
1780  540, 543, 554, 558, -1056, -1056, -1056, 566, -1056, -1056,
1781  -1056, 13685, -1056, -1056, 11092, 11092, -1056, -1056, 629, -1056,
1782  -1056, -1056, 407, 10966, 10966, 9706, -1056, -1056, 12515, 9328,
1783  12605, 10966, 10966, 9958, -1056, 18, 718, -1056, -1056, 10966,
1784  18, -1056, 750, 18, 752, -1056, 96, -1056, -1056, -1056,
1785  -1056, -1056, 8660, -1056, 10966, 729, 757, 12515, 12605, 10966,
1786  1265, -33, 18, -1056, -1056, 8075, 754, 18, -1056, -1056,
1787  10084, -1056, -1056, 10210, -1056, -1056, -1056, 430, 963, -1056,
1788  -1056, 771, 11832, 12695, 9328, 12785, -1056, -1056, -1056, -1056,
1789  -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, 824, 101,
1790  992, 141, 10966, -1056, -1056, -1056, -1056, -1056, -1056, -1056,
1791  -1056, -1056, 759, -1056, -1056, -1056, 866, -1056, 866, 10966,
1792  -1056, 773, 779, 860, -1056, 18, 11832, 781, -1056, -1056,
1793  -1056, 884, 806, 4216, -1056, -1056, -1056, 1006, 644, -1056,
1794  565, 2696, 2696, 2696, 2696, 4071, 2908, 2696, 2696, 3504,
1795  3504, 814, 814, 3389, 1310, 1310, 1335, 24, 24, 565,
1796  565, 565, 1921, 1921, 3606, 4385, 5561, 4532, -1056, 483,
1797  -1056, 18, 832, -1056, 870, -1056, -1056, 5120, 866, 922,
1798  -1056, 6010, 921, 6463, 866, 37, 866, 935, 947, 153,
1799  12875, 9328, 12965, -1056, 411, -1056, 963, -1056, -1056, -1056,
1800  13055, 9328, 13145, 5859, 11218, -1056, -1056, -1056, -1056, -1056,
1801  -1056, 3199, -1056, 4363, -1056, -1056, -1056, 8660, 10966, -1056,
1802  10966, 448, -1056, 423, 4091, 4679, 18, 655, 707, -1056,
1803  -1056, -1056, -1056, 9706, -1056, 9958, -1056, -1056, 11218, 4510,
1804  -1056, -1056, 483, 483, -1056, -1056, -6, -1056, -1056, 640,
1805  11832, 771, 57, 749, 18, 447, 519, -1056, -1056, 1173,
1806  -1056, 538, -1056, 831, -1056, -1056, 553, 843, -1056, 565,
1807  -1056, -1056, 822, -1056, -1056, -1056, -1056, 830, 10462, 9454,
1808  -1056, 771, 11832, 9454, 11092, 10966, 13235, 9328, 13325, 12268,
1809  856, 11092, 11092, -1056, 668, 848, 875, 11092, 11092, -1056,
1810  -1056, 668, -1056, -1056, -1056, 10588, 167, -1056, 817, -1056,
1811  991, -1056, -1056, -1056, -1056, -1056, -1056, 947, 866, -1056,
1812  10714, 866, 81, 177, 18, 288, 307, 7319, 6, 11218,
1813  5859, 1030, 749, -1056, 18, 866, 96, 862, 8805, 21,
1814  152, -1056, -1056, -1056, -1056, 10966, 10966, 714, 10966, 10966,
1815  868, 96, -1056, -1056, 607, -1056, -1056, -1056, -1056, -1056,
1816  -1056, -1056, -1056, -1056, -1056, -1056, -1056, 887, -1056, 887,
1817  10966, 876, -1056, 771, -1056, 4510, 5414, 5708, 18, 744,
1818  748, -1056, -1056, 2641, 2641, 534, -1056, 400, 881, -1056,
1819  975, 934, -1056, 904, -1056, -1056, 804, -1056, -1056, 267,
1820  -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, 10966,
1821  -1056, -1056, -1056, -1056, -1056, -1056, 11092, -1056, -1056, -1056,
1822  -1056, -1056, 773, -1056, 938, -1056, -1056, -1056, 7319, -1056,
1823  -1056, -1056, -1056, 7319, 11218, 866, -1056, -1056, 866, -1056,
1824  -1056, 866, -1056, 10966, -1056, 63, -1056, 330, 866, 5859,
1825  6, 866, -1056, -1056, -1056, 1233, 5859, 1709, -1056, -1056,
1826  -1056, 10966, 9958, -1056, 1648, -1056, 1383, 7168, -1056, -1056,
1827  5859, 895, 756, -1056, -1056, -1056, -1056, 12268, 2069, -1056,
1828  -1056, 687, -1056, -1056, 1000, -1056, 12268, 2641, 2641, 534,
1829  400, 501, 12149, 12149, 4510, -1056, -1056, 11954, 108, -1056,
1830  -1056, 6589, -1056, 108, -1056, -1056, -1056, -1056, -1056, 10840,
1831  6161, -1056, 866, -1056, -1056, -1056, -1056, -1056, -1056, -1056,
1832  -1056, -1056, -1056, 1218, -1056, -1056, -1056, -1056, -1056, -1056,
1833  18, 18, -1056, -1056, 917, -1056, 907, 10966, -1056, 911,
1834  595, 916, 916, -1056, 919, 1015, 924, 1020, -1056, 866,
1835  6, 862, 1709, -1056, -1056, -1056, -1056, 18, 942, 949,
1836  932, 12076, -1056, 933, 916, 916, -1056, 943, 945, -1056,
1837  931, -1056, -1056, 206, 38, 117, 18, 12235, -1056, 948,
1838  -1056, -1056, 952, 954, -1056, 12268, -1056, -1056, 679, -1056,
1839  -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, 18, 18,
1840  18, 18, 1060, -1056, 1049, 183, 292, 324, 5859, 1110,
1841  6010, 12149, 10966, -1056, 649, -1056, 1218, 1276, -1056, 974,
1842  18, 976, -1056, -1056, -1056, 10966, 1709, -1056, -1056, 1099,
1843  -1056, -1056, -1056, -1056, 359, -1056, -1056, 1709, -1056, -1056,
1844  1860, -1056, -1056, -1056, -1056, 5859, 18, 123, 7445, 994,
1845  -1056, 12076, 1709, -1056, 1074, 1070, 1099, -1056, -1056, -1056,
1846  1709, -1056, 1860, -1056, 1293, -1056, 988, 12268, -1056, 163,
1847  934, 990, -1056, 717, -1056, 687, 934, -1056, -1056, 730,
1848  -1056, -1056, -1056, -1056, 360, 13415, 9328, 13505, 922, -1056,
1849  817, 108, 838, 295, -1056, -1056, -1056, -1056, -1056, -1056,
1850  18, -1056, 1218, -1056, 855, -1056, -1056, -1056, 993, 996,
1851  -1056, 1091, 916, -1056, 998, -1056, 1001, -1056, 998, 866,
1852  999, 5859, 7168, -1056, 1032, -1056, 1070, -1056, 1009, 1014,
1853  -1056, 13595, -1056, 916, 1017, -1056, 1019, 1017, -1056, 710,
1854  -1056, -1056, 12268, 1023, -1056, 1026, 12268, -1056, -1056, -1056,
1855  -1056, -1056, 105, 187, 18, 371, 396, -1056, -1056, -1056,
1856  11218, 11218, 2069, -1056, -1056, 1037, 1038, 1709, -1056, 1860,
1857  -1056, -1056, 1860, -1056, 1860, -1056, -1056, -1056, -1056, 866,
1858  1042, -1056, 1709, -1056, 1860, -1056, 1013, 1040, -1056, 1860,
1859  -1056, 1860, -1056, -1056, 1293, -1056, 1023, 12268, 12268, 1023,
1860  406, -1056, -1056, -1056, -1056, 855, 855, 998, 1052, 998,
1861  998, -1056, -1056, 1017, 1053, 1017, 1017, -1056, -1056, 1023,
1862  -1056, 1038, -1056, 1860, -1056, -1056, -1056, -1056, 1860, -1056,
1863  -1056, -1056, 6312, 998, 1017, 80, -1056, -1056, -1056, -1056,
1864  -1056
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, 635, 634, 636, 637, 746, 0, 746,
1875  0, 0, 639, 638, 640, 728, 730, 631, 630, 729,
1876  633, 625, 626, 627, 628, 576, 645, 646, 0, 0,
1877  0, 0, 0, 0, 305, 757, 757, 95, 325, 596,
1878  596, 598, 600, 0, 0, 0, 0, 0, 0, 0,
1879  3, 744, 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, 744, 0, 0, 0, 0,
1882  314, 68, 323, 292, 293, 575, 577, 294, 295, 296,
1883  298, 297, 299, 574, 615, 616, 573, 623, 641, 642,
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, 596, 0, 273, 0, 257, 283, 81,
1894  277, 757, 0, 641, 642, 0, 301, 757, 722, 82,
1895  746, 79, 0, 757, 448, 78, 746, 747, 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, 744, 17, 20, 746, 85, 16, 307, 746, 0,
1899  750, 750, 258, 0, 0, 750, 720, 746, 0, 0,
1900  0, 93, 353, 0, 103, 104, 111, 427, 620, 619,
1901  621, 618, 0, 617, 0, 0, 0, 583, 592, 588,
1902  594, 624, 56, 241, 242, 753, 754, 4, 755, 745,
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, 740, 741, 0, 757, 0, 0, 62, 0, 0,
1909  0, 0, 0, 744, 333, 745, 0, 383, 382, 0,
1910  0, 641, 642, 301, 121, 122, 0, 0, 124, 649,
1911  0, 641, 642, 301, 341, 196, 189, 199, 184, 166,
1912  167, 168, 126, 127, 718, 343, 717, 0, 80, 743,
1913  742, 0, 324, 578, 0, 0, 134, 725, 311, 284,
1914  727, 280, 0, 0, 0, 0, 274, 282, 0, 757,
1915  0, 0, 0, 0, 275, 746, 0, 316, 279, 676,
1916  746, 269, 757, 746, 757, 268, 746, 321, 55, 25,
1917  27, 26, 0, 318, 0, 0, 0, 0, 0, 0,
1918  19, 0, 746, 309, 15, 745, 84, 746, 306, 312,
1919  752, 751, 259, 752, 261, 313, 721, 0, 110, 624,
1920  101, 96, 0, 0, 757, 0, 326, 428, 602, 622,
1921  605, 603, 597, 579, 580, 599, 581, 601, 0, 0,
1922  0, 0, 0, 756, 7, 29, 30, 31, 32, 33,
1923  53, 54, 0, 454, 453, 73, 0, 458, 0, 0,
1924  36, 288, 0, 39, 287, 746, 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, 746, 231, 232, 233, 222, 223, 224,
1928  225, 226, 255, 256, 731, 733, 732, 734, 447, 278,
1929  445, 746, 731, 733, 732, 734, 446, 278, 0, 757,
1930  374, 0, 373, 0, 0, 0, 0, 331, 0, 311,
1931  0, 757, 0, 63, 339, 121, 122, 123, 647, 337,
1932  0, 757, 0, 0, 0, 344, 738, 739, 346, 731,
1933  732, 278, 42, 262, 208, 48, 215, 0, 0, 724,
1934  0, 285, 281, 757, 731, 732, 746, 731, 732, 723,
1935  315, 748, 264, 270, 265, 272, 320, 24, 0, 248,
1936  11, 34, 0, 757, 214, 22, 86, 18, 308, 750,
1937  0, 94, 735, 109, 746, 731, 732, 429, 606, 0,
1938  582, 0, 585, 0, 590, 587, 0, 0, 591, 228,
1939  451, 455, 0, 371, 452, 459, 437, 291, 0, 0,
1940  98, 92, 0, 0, 0, 0, 0, 757, 0, 0,
1941  0, 0, 0, 444, 76, 0, 450, 0, 0, 267,
1942  443, 74, 266, 304, 366, 757, 757, 565, 757, 375,
1943  757, 329, 377, 64, 376, 330, 468, 0, 0, 368,
1944  0, 0, 735, 310, 746, 731, 732, 0, 0, 0,
1945  0, 121, 122, 125, 746, 0, 746, 652, 0, 439,
1946  69, 135, 726, 286, 276, 0, 0, 450, 0, 0,
1947  757, 746, 260, 102, 450, 430, 607, 611, 612, 613,
1948  604, 614, 584, 586, 593, 589, 595, 757, 70, 757,
1949  0, 289, 38, 90, 50, 263, 731, 732, 746, 731,
1950  732, 559, 563, 0, 0, 0, 505, 499, 502, 557,
1951  0, 59, 485, 487, 489, 492, 538, 543, 544, 545,
1952  548, 549, 550, 551, 552, 554, 553, 555, 556, 0,
1953  47, 212, 46, 213, 77, 749, 0, 44, 210, 45,
1954  211, 75, 566, 567, 757, 568, 367, 369, 0, 12,
1955  14, 572, 370, 0, 0, 0, 378, 380, 0, 65,
1956  469, 0, 335, 0, 461, 0, 334, 450, 0, 0,
1957  0, 0, 450, 342, 719, 675, 0, 675, 347, 440,
1958  441, 0, 271, 319, 675, 608, 746, 0, 418, 417,
1959  0, 290, 450, 546, 547, 122, 561, 0, 0, 501,
1960  504, 0, 427, 560, 0, 60, 0, 541, 542, 0,
1961  491, 490, 0, 0, 249, 43, 209, 0, 0, 570,
1962  571, 0, 381, 0, 327, 328, 470, 332, 462, 0,
1963  0, 336, 0, 648, 338, 682, 679, 678, 677, 680,
1964  688, 697, 676, 0, 709, 698, 713, 712, 708, 674,
1965  746, 746, 681, 683, 684, 686, 660, 690, 695, 757,
1966  701, 757, 757, 706, 660, 711, 660, 0, 658, 0,
1967  0, 652, 675, 431, 434, 609, 416, 746, 0, 684,
1968  401, 692, 693, 757, 757, 757, 704, 401, 401, 399,
1969  421, 456, 460, 746, 519, 507, 746, 508, 514, 0,
1970  533, 596, 0, 525, 529, 532, 526, 528, 536, 558,
1971  486, 488, 539, 540, 562, 498, 495, 596, 746, 746,
1972  746, 746, 0, 569, 0, 641, 642, 301, 0, 757,
1973  0, 0, 0, 463, 757, 340, 0, 394, 386, 388,
1974  746, 391, 384, 650, 651, 0, 0, 667, 689, 0,
1975  655, 716, 699, 700, 0, 657, 656, 0, 670, 710,
1976  0, 672, 714, 345, 653, 0, 746, 0, 0, 0,
1977  419, 0, 407, 409, 0, 691, 0, 396, 398, 397,
1978  0, 412, 0, 414, 0, 506, 517, 0, 500, 512,
1979  523, 509, 515, 0, 503, 0, 531, 537, 535, 0,
1980  493, 494, 496, 497, 311, 0, 757, 0, 757, 13,
1981  757, 0, 477, 480, 483, 484, 464, 466, 467, 465,
1982  746, 393, 0, 685, 0, 702, 659, 687, 660, 660,
1983  696, 701, 757, 715, 660, 707, 660, 684, 660, 0,
1984  0, 0, 0, 432, 0, 420, 703, 400, 401, 401,
1985  311, 0, 694, 757, 401, 705, 401, 401, 425, 746,
1986  423, 426, 0, 520, 521, 510, 0, 516, 534, 530,
1987  524, 527, 735, 310, 746, 731, 732, 564, 379, 471,
1988  0, 0, 481, 385, 387, 389, 392, 0, 663, 0,
1989  665, 654, 0, 671, 0, 668, 673, 348, 433, 0,
1990  0, 610, 0, 404, 0, 406, 735, 310, 395, 0,
1991  413, 0, 410, 415, 0, 422, 518, 0, 0, 513,
1992  450, 472, 478, 479, 482, 0, 0, 660, 660, 660,
1993  660, 436, 435, 401, 401, 401, 401, 424, 522, 511,
1994  473, 390, 664, 0, 661, 666, 669, 405, 0, 402,
1995  408, 411, 0, 660, 401, 757, 662, 403, 475, 476,
1996  474
1997 };
1998 
1999  /* YYPGOTO[NTERM-NUM]. */
2000 static const yytype_int16 yypgoto[] =
2001 {
2002  -1056, -1056, -1056, 953, -1056, 22, 743, -541, -1056, -51,
2003  -1056, 736, -1056, 115, -1056, -228, -321, -68, -1056, -1056,
2004  -1056, -32, -72, -1056, -1056, 2, -1056, -5, 735, 4,
2005  1113, -175, 26, -76, -1056, -452, -19, 2254, -362, 1108,
2006  -43, -14, -1056, -1056, 0, -1056, 3078, -1056, 1123, -1056,
2007  778, -1056, 709, 133, 601, -307, 121, -13, -1056, -283,
2008  -209, -4, -1056, -314, -25, -1056, -1056, -1056, -1056, -1056,
2009  -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, 32,
2010  -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056,
2011  -1056, -1056, -1056, -1056, -1056, 507, -1056, -296, 1267, -365,
2012  -1056, 127, -700, -1056, -1027, -1024, 200, 119, 363, 165,
2013  -1056, 454, -1056, -874, -1056, 40, 349, -1056, -1056, -1056,
2014  -1056, -1056, -1056, -1056, 495, -1056, -1056, -96, 722, -1056,
2015  -1056, -1056, 915, -1056, -1056, -1056, -1056, -698, -1056, 5,
2016  -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, -1056, -591,
2017  -1056, -1056, -1056, -1056, 361, -1056, -1056, -1056, -851, -1056,
2018  230, -1055, -711, -779, -1056, 168, -1056, 170, 171, -1056,
2019  -409, -1056, 366, -1056, -1056, 166, -1056, -1056, 246, 28,
2020  375, -1056, 1151, 666, 777, 842, -1056, 760, 1516, -1056,
2021  2119, 2191, -1056, -1056, -59, -1056, -1056, -229, -1056, -1056,
2022  -1056, -1056, -1056, -1056, -1056, 3, -1056, -1056, -1056, -1056,
2023  -27, 2015, 1563, 1159, 2490, 1953, -1056, -1056, 314, -1056,
2024  -390, 71, -701, 421, -1019, -433, 145, -971, 75, -404,
2025  248, 226, -1056, -1056, -214, -674, -320, -969, -991, 234,
2026  266, -1056, -616, -1056, 162, -816, -1056, -1056, -1056, 157,
2027  -396, -1056, -319, -1056, -1056, -86, -1056, -7, 23, 56,
2028  -593, -236, -66, -28, -2
2029 };
2030 
2031  /* YYDEFGOTO[NTERM-NUM]. */
2032 static const yytype_int16 yydefgoto[] =
2033 {
2034  -1, 1, 2, 70, 71, 72, 243, 578, 901, 579,
2035  261, 262, 461, 263, 452, 74, 530, 75, 539, 689,
2036  885, 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, 951, 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, 1018, 1019, 1020, 1021, 1127, 1053,
2045  957, 867, 868, 958, 1139, 1140, 486, 487, 657, 755,
2046  864, 1047, 953, 1123, 325, 101, 102, 322, 512, 513,
2047  671, 767, 516, 517, 675, 769, 845, 721, 1099, 718,
2048  840, 906, 1011, 1201, 1220, 1232, 1240, 1091, 1092, 1070,
2049  792, 793, 892, 893, 794, 878, 881, 877, 976, 977,
2050  978, 1143, 979, 982, 983, 984, 985, 986, 987, 795,
2051  796, 882, 797, 798, 799, 706, 824, 898, 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, 955, 1048, 760, 113, 114, 293, 115, 116,
2055  117, 223, 224, 120, 225, 226, 599, 729, 856, 857,
2056  1106, 1027, 930, 443, 932, 933, 1117, 935, 936, 937,
2057  938, 962, 963, 939, 940, 941, 942, 943, 966, 967,
2058  944, 945, 946, 947, 948, 1030, 407, 604, 274, 444,
2059  228, 123, 642, 570, 608, 602, 411, 307, 436, 437,
2060  696, 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, 294, 260, 365, 583, 308, 412, 330, 203, 235,
2069  838, 205, 221, 221, 240, 410, 291, 536, 434, 841,
2070  215, 215, 372, 367, 367, 597, 125, 367, 203, 308,
2071  651, 205, 282, 747, 89, 474, 89, 629, 281, 476,
2072  301, 998, 1000, 309, 569, 1141, 577, 317, 222, 222,
2073  238, 270, 241, 272, 276, 1107, 405, 571, 282, 203,
2074  369, 754, 735, 373, 712, 320, 495, 497, 1115, 1135,
2075  302, 282, 282, 282, 681, 1164, 580, 629, -112, 265,
2076  1166, 1107, -107, 1049, 462, 89, 89, 1196, 374, 283,
2077  1066, 1199, 611, 612, 615, 827, 221, 3, 791, 203,
2078  222, 333, -113, 529, 215, 716, -116, 236, -643, 569,
2079  242, 577, 237, 999, 1001, 283, 361, 73, -116, 73,
2080  -84, 580, 626, 222, 222, 1035, 1036, 222, 379, 390,
2081  390, 847, 222, 315, 316, -112, 430, 219, 229, 643,
2082  -98, 852, 622, 1219, 362, 409, 256, 1057, 1058, 1059,
2083  622, -120, 1121, 525, 422, 234, 950, 305, 260, 306,
2084  356, 357, 358, 954, 318, 458, 643, 663, 446, 267,
2085  448, 237, 1120, 227, 227, 1141, 826, 654, -119, 1164,
2086  323, 1221, 827, -107, 1067, 872, 529, 529, 305, 851,
2087  306, 1135, 964, 456, 879, 308, -112, 485, 1115, -103,
2088  -118, 1107, -118, -107, 480, -731, -107, 667, 260, 909,
2089  -107, 319, 271, 275, 305, 1145, 306, 884, 1107, 427,
2090  664, 408, 676, -104, 297, 427, 221, -107, 221, -731,
2091  773, 445, 1095, 465, 215, 434, 215, 215, 733, 629,
2092  124, 89, 367, 367, 367, 367, 1122, 510, 511, 237,
2093  968, 1046, 479, -731, 464, 282, -116, 227, -116, 305,
2094  668, 306, 222, -523, 222, 222, 1071, 244, 222, 662,
2095  222, 662, -111, 643, 89, 317, 89, 260, 505, 506,
2096  507, 508, 703, 643, 724, 265, 973, 975, 711, 89,
2097  715, 89, 447, 592, 734, 298, 1171, 995, 299, -110,
2098  477, 975, 975, 367, 282, -113, 884, 308, 912, 1146,
2099  527, 1204, 283, -115, 1097, 949, 1098, 1188, 594, 584,
2100  466, 586, 522, -109, 468, -732, 595, 522, 520, 972,
2101  596, 504, -117, 531, -112, -732, -112, -120, -118, 585,
2102  -118, 89, 222, 222, 222, 222, 89, 222, 222, 300,
2103  622, 435, 622, 438, 265, -114, 1144, 73, 222, 237,
2104  89, 283, 445, 537, 889, 575, 587, 569, 215, 577,
2105  810, 812, 460, -119, 873, 874, 817, 819, 964, 326,
2106  778, 234, 319, 1068, -115, 327, 964, 227, 964, 227,
2107  449, 823, 318, 60, 1076, 884, 222, 233, 89, -644,
2108  450, 451, 89, 222, 89, 331, 480, 1082, 1083, -117,
2109  1109, 575, 890, 752, 744, 891, 531, 531, 222, -114,
2110  1093, 1116, 842, 876, 73, 846, -113, 445, 488, 509,
2111  575, 1144, 763, 215, -106, 1144, 1129, 763, 637, 853,
2112  427, 1162, 427, -113, 1136, -113, 537, 537, 315, 316,
2113  480, 688, 203, -108, 414, 205, 529, 282, 575, 338,
2114  339, 222, 961, 529, 529, 929, 629, 929, 926, 529,
2115  529, -635, -106, 488, 929, -120, -105, -120, 992, 993,
2116  910, 489, 445, 490, 491, 575, 1218, 1144, 215, 416,
2117  1022, 630, 927, -643, 236, 895, 632, 89, 576, 634,
2118  -635, 282, 636, 425, 1119, -634, 349, 350, 964, 418,
2119  964, -119, 488, -119, 283, 964, 222, 964, 646, 714,
2120  -112, 727, -115, 648, -115, 423, 493, 994, 490, 491,
2121  708, 618, 710, 1008, -634, 1238, 736, 431, 1010, 904,
2122  -103, 744, 905, -636, -108, 907, 965, -117, 424, -117,
2123  -746, 1208, 911, 237, 964, 914, 694, -114, 283, -114,
2124  -644, 1200, 929, 576, 701, 493, 1214, 490, 491, 433,
2125  751, 975, -636, -106, 753, 702, 690, 707, 453, 622,
2126  1179, 680, 623, 1022, 1101, -637, 595, -113, 529, 445,
2127  875, 576, 575, -106, 695, 215, -106, 415, 740, 445,
2128  -106, -639, 575, 741, 488, 215, 480, -104, -638, 702,
2129  -353, -640, 230, 89, -637, 89, 1015, 203, 576, 488,
2130  205, 427, -629, 222, -120, 282, -632, 649, 488, 1032,
2131  -639, 233, -105, 222, 606, 89, 222, -638, -353, -353,
2132  -640, 702, 333, 859, -111, -108, 432, 1033, 961, 695,
2133  -746, -629, 961, 1043, 237, -632, 961, 282, 961, 490,
2134  491, 367, 849, 607, 827, -108, 719, 988, -108, 1022,
2135  222, 1022, -108, -120, 490, 491, 848, 695, 988, 988,
2136  459, 494, 283, 490, 491, 445, 531, -353, 575, 814,
2137  762, 215, 361, 531, 531, 858, 821, 850, 463, 531,
2138  531, 522, 693, 825, 831, 765, 837, -119, 837, 1112,
2139  699, 89, -83, 1077, 283, 89, 537, 800, 469, 222,
2140  362, 363, 475, 537, 537, 576, 1159, -110, 459, 537,
2141  537, 1078, 965, -105, 470, 576, 1133, 78, 203, 78,
2142  965, 471, 965, 415, 699, 980, 478, 695, 427, 488,
2143  496, 78, 78, -105, 748, -119, -105, 695, -728, 89,
2144  -105, 222, 89, 482, 921, 869, 367, 869, 643, 364,
2145  -120, 502, 1022, 1022, 514, 693, 699, 900, 961, 1154,
2146  961, -115, 902, 488, 913, 961, 473, 961, 78, 78,
2147  750, 361, 854, 471, 772, 925, 488, 988, 774, 981,
2148  -629, 695, 903, 78, 490, 491, 749, 863, 361, 528,
2149  695, 800, 800, 861, 589, 1111, 971, -310, 531, 362,
2150  428, 576, 899, 1177, 961, 503, 78, 78, -629, -629,
2151  78, 832, 827, -117, 273, 78, 362, 457, 490, 491,
2152  -114, 1148, 1111, 697, 593, -310, -310, 698, 537, 493,
2153  1009, 490, 491, -729, 1148, 816, 1194, 598, 361, 1014,
2154  89, 988, 965, 237, 965, 89, 222, 631, 429, 965,
2155  -115, 965, 282, 640, -117, -728, 673, -629, 1160, 1161,
2156  -728, 89, -114, 1211, 1044, 429, 362, 483, 89, 970,
2157  488, 333, 887, 888, -310, -632, 633, -732, 635, 89,
2158  -98, 641, 89, 670, 679, 800, 800, 915, 965, 916,
2159  917, 918, 919, 695, 800, 800, 800, 650, 1087, -283,
2160  800, 800, 1073, -632, -632, 678, -641, 682, 683, 1004,
2161  704, 697, 684, 89, 709, 484, 282, 1031, 1079, 1031,
2162  1031, 960, 89, 660, 78, 490, 491, 996, 354, 355,
2163  356, 357, 358, -642, -641, -641, 1016, 1088, -115, 1090,
2164  716, 1031, 1031, 1031, 719, 78, 768, 78, 78, 698,
2165  -729, 78, -632, 78, 816, -729, -284, 78, -106, 78,
2166  970, -642, -642, 764, 809, 417, 1023, 1024, 419, 420,
2167  421, -301, 78, 1055, 78, 766, -117, 1124, 815, 695,
2168  934, -114, 934, -641, 361, 800, 827, 831, 361, 934,
2169  855, 959, 837, 800, 862, 1038, -108, 1041, 866, -301,
2170  -301, -105, -285, 695, 695, 880, 282, 883, 969, 1065,
2171  -642, -311, 362, 590, 884, 886, 362, 600, 897, 800,
2172  89, -286, 89, 1025, 78, 78, 78, 78, 78, 78,
2173  78, 78, 781, 1026, 1080, 1081, -735, 1029, 488, -311,
2174  -311, 78, 1034, 78, 801, 1037, 78, 1039, -301, 970,
2175  1040, 1180, 1042, 1050, 361, 1051, 1103, 89, 1052, 1056,
2176  89, 591, 1064, 1126, 445, 601, 707, 575, 837, 1060,
2177  215, 1062, 367, 367, 1072, 800, 1074, 934, -735, 78,
2178  1075, 78, 362, 686, 521, 78, 78, 78, -311, 534,
2179  1031, 665, 1114, 490, 491, 1118, 1084, 361, 222, 826,
2180  1102, 78, 1104, 614, 616, 1125, -735, -735, 1202, 1203,
2181  1130, 1031, 1061, 1063, 1142, 1134, 1147, 1137, 361, 1167,
2182  614, 616, 1169, 1033, 1172, 362, 1085, 1174, 1178, 78,
2183  78, 687, 1181, 89, 89, 1182, 1163, 920, 801, 801,
2184  1184, -731, 1195, 1189, 78, 1191, 362, 1131, 644, 1197,
2185  800, 934, 1198, -735, 800, -735, 921, 695, -731, 1168,
2186  1170, 1235, 934, 1205, 1206, 1173, 1212, 1175, -732, 1176,
2187  800, 1113, 222, 222, 1086, 455, 1113, 959, 1223, 1228,
2188  78, 647, 619, 621, 645, 959, 394, 925, 926, 377,
2189  360, 273, 739, 829, 969, 601, 1100, 1158, 1113, 78,
2190  576, 1165, 969, 870, 969, 800, 800, 757, 758, 956,
2191  759, 989, 927, 837, 1217, 860, 672, 46, 47, 518,
2192  1239, 1094, 1207, 1149, 1209, 1150, 1151, 991, 621, 1210,
2193  990, 273, 801, 801, 1157, 1089, 413, 1213, 406, 1215,
2194  666, 801, 801, 801, 89, 1045, 1216, 801, 801, 100,
2195  915, 100, 916, 917, 918, 919, 931, 1110, 1222, 1224,
2196  1225, 1226, 1132, 100, 100, 915, 1128, 916, 917, 918,
2197  919, 920, 1108, 1183, 1185, 0, 0, 677, 1233, 1190,
2198  0, 1192, 1193, 1234, 1236, 310, 311, 312, 313, 314,
2199  921, 0, 934, 0, 0, 0, 78, 0, 78, 1016,
2200  100, 100, 0, 0, 922, 1017, 78, 959, 915, 0,
2201  916, 917, 918, 919, 923, 100, 78, 0, 78, 78,
2202  924, 925, 926, 0, 969, 1138, 969, 916, 917, 918,
2203  919, 969, 801, 969, 0, 802, 0, 0, 100, 100,
2204  801, 0, 100, 0, 0, 0, 927, 100, 0, 928,
2205  0, 0, 0, 78, 41, 42, 43, 44, 1227, 1229,
2206  1230, 1231, 0, 0, 0, 0, 801, 333, 0, 0,
2207  969, 0, 0, 0, 0, 0, 742, 0, 743, 1237,
2208  811, 813, 0, 0, 346, 347, 818, 820, 0, 0,
2209  0, 621, 333, 273, 78, 0, 0, 0, 78, 78,
2210  0, 0, 78, 0, 0, 0, 78, 78, 0, 346,
2211  347, 0, 78, 78, 0, 915, 0, 916, 917, 918,
2212  919, 920, 801, 353, 354, 355, 356, 357, 358, 802,
2213  802, 0, 0, 0, 811, 813, 771, 818, 820, 0,
2214  921, 0, 78, 0, 78, 78, 803, 0, 0, 354,
2215  355, 356, 357, 358, 0, 0, 100, 0, 0, 0,
2216  0, 0, 0, 822, 923, 0, 0, 0, 0, 0,
2217  924, 925, 926, 0, 0, 0, 0, 100, 844, 100,
2218  100, 0, 0, 100, 0, 100, 0, 0, 0, 100,
2219  0, 100, 0, 0, 0, 0, 927, 801, 0, 928,
2220  0, 801, 0, 0, 100, 896, 100, 0, 0, 0,
2221  0, 804, 0, 0, 0, 0, 237, 801, 0, 0,
2222  0, 0, 0, 802, 802, 0, 0, 0, 871, 0,
2223  0, 78, 802, 802, 802, 0, 0, 0, 802, 802,
2224  803, 803, 0, 78, 0, 119, 0, 119, 78, 78,
2225  896, 0, 801, 801, 0, 0, 100, 100, 100, 100,
2226  100, 100, 100, 100, 78, 0, 0, 0, 0, 0,
2227  0, 78, 0, 100, 0, 100, 0, 0, 100, 0,
2228  0, 0, 78, 0, 0, 78, 0, 0, 0, 0,
2229  0, 0, 0, 0, 0, 0, 119, 119, 0, 0,
2230  285, 908, 0, 0, 0, 804, 804, 0, 0, 0,
2231  0, 100, 0, 100, 0, 0, 78, 100, 100, 100,
2232  273, 0, 0, 802, 0, 78, 285, 0, 0, 0,
2233  0, 802, 0, 100, 803, 803, 0, 0, 0, 382,
2234  392, 392, 392, 803, 803, 803, 0, 0, 0, 803,
2235  803, 0, 0, 0, 0, 0, 0, 802, 0, 0,
2236  0, 100, 100, 0, 0, 0, 0, 1013, 0, 0,
2237  0, 0, 0, 0, 0, 0, 100, 0, 0, 0,
2238  915, 0, 916, 917, 918, 919, 920, 0, 0, 0,
2239  0, 0, 0, 0, 0, 1028, 0, 0, 0, 804,
2240  804, 0, 0, 0, 0, 921, 0, 0, 804, 804,
2241  804, 0, 100, 802, 804, 804, 0, 0, 0, 0,
2242  0, 0, 0, 78, 0, 78, 0, 0, 0, 923,
2243  0, 100, 0, 0, 803, 924, 925, 926, 0, 0,
2244  0, 915, 803, 916, 917, 918, 919, 920, 0, 0,
2245  0, 0, 119, 0, 0, 0, 0, 332, 0, 0,
2246  78, 927, 0, 78, 928, 0, 921, 0, 803, 0,
2247  1096, 0, 0, 0, 0, 0, 952, 0, 0, 0,
2248  0, 0, 0, 1105, 0, 119, 0, 119, 802, 0,
2249  923, 0, 802, 0, 0, 0, 924, 925, 926, 804,
2250  119, 78, 119, 0, 0, 0, 0, 804, 802, 333,
2251  334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
2252  344, 345, 927, 285, 803, 928, 346, 347, 100, 0,
2253  100, 0, 0, 804, 0, 0, 78, 78, 100, 0,
2254  0, 0, 0, 802, 802, 0, 0, 0, 100, 0,
2255  100, 100, 119, 0, 0, 0, 0, 119, 0, 348,
2256  0, 349, 350, 351, 352, 353, 354, 355, 356, 357,
2257  358, 119, 285, 0, 0, 78, 78, 0, 0, 0,
2258  0, 0, 0, 0, 0, 100, 0, 0, 0, 804,
2259  0, 0, 915, 0, 916, 917, 918, 919, 920, 803,
2260  0, 0, 0, 803, 0, 0, 0, 0, 0, 119,
2261  0, 0, 0, 119, 0, 119, 0, 921, 0, 803,
2262  0, 0, 0, 0, 0, 0, 100, 0, 0, 0,
2263  100, 100, 0, 0, 100, 122, 0, 122, 100, 100,
2264  0, 923, 0, 0, 100, 100, 0, 78, 925, 926,
2265  0, 0, 0, 0, 803, 803, 0, 0, 0, 0,
2266  0, 0, 0, 0, 804, 0, 0, 0, 804, 0,
2267  0, 0, 0, 927, 100, 0, 100, 100, 333, 0,
2268  0, 0, 0, 0, 804, 0, 122, 122, 0, 0,
2269  286, 0, 0, 0, 0, 346, 347, 118, 0, 118,
2270  0, 0, 0, 0, 0, 0, 0, 0, 119, 0,
2271  0, 0, 0, 0, 0, 0, 286, 0, 0, 804,
2272  804, 0, 0, 0, 0, 285, 0, 0, 0, 383,
2273  393, 393, 351, 352, 353, 354, 355, 356, 357, 358,
2274  0, 0, 0, 0, 0, 0, 0, 0, 118, 118,
2275  0, 0, 284, 0, 0, 0, 0, 0, 0, 0,
2276  0, 0, 0, 100, 0, 0, 0, 0, 0, 285,
2277  0, 0, 0, 0, 0, 100, 0, 0, 284, 0,
2278  100, 100, 23, 24, 25, 26, 0, 0, 0, 0,
2279  0, 381, 391, 391, 391, 0, 100, 0, 32, 33,
2280  34, 781, 0, 100, 0, 782, 0, 0, 41, 42,
2281  43, 44, 45, 0, 100, 0, 0, 100, 0, 0,
2282  0, 0, 0, 0, 119, 0, 119, 0, 0, 0,
2283  0, 0, 0, 0, 0, 0, 0, 0, 0, 783,
2284  784, 0, 122, 0, 0, 0, 119, 785, 100, 0,
2285  786, 0, 0, 787, 788, 0, 974, 100, 0, 789,
2286  59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
2287  0, 0, 0, 0, 0, 122, 0, 122, 0, 0,
2288  0, 790, 0, 0, 0, 805, 0, 0, 279, 0,
2289  122, 0, 122, 285, 0, 0, 0, 0, 0, 0,
2290  0, 0, 0, 0, 118, 0, 0, 0, 0, 0,
2291  0, 0, 0, 286, 0, 0, 0, 0, 0, 0,
2292  0, 0, 119, 0, 0, 285, 119, 0, 0, 0,
2293  0, 0, 808, 0, 0, 0, 85, 118, 85, 118,
2294  0, 0, 122, 0, 0, 0, 0, 122, 0, 0,
2295  0, 0, 118, 0, 118, 100, 0, 100, 0, 0,
2296  0, 122, 286, 0, 538, 0, 0, 0, 0, 0,
2297  119, 0, 0, 119, 0, 284, 0, 0, 0, 805,
2298  805, 0, 0, 0, 0, 0, 0, 85, 85, 0,
2299  0, 0, 100, 0, 0, 100, 0, 0, 0, 122,
2300  0, 0, 0, 122, 118, 122, 0, 0, 0, 118,
2301  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2302  0, 0, 0, 118, 284, 0, 808, 808, 0, 0,
2303  378, 0, 0, 100, 0, 0, 0, 0, 0, 0,
2304  0, 0, 0, 0, 0, 0, 0, 538, 538, 0,
2305  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2306  0, 118, 0, 0, 0, 118, 0, 118, 100, 100,
2307  0, 119, 0, 805, 805, 0, 119, 0, 0, 0,
2308  0, 0, 805, 805, 805, 0, 0, 0, 805, 805,
2309  0, 0, 119, 0, 0, 0, 0, 0, 122, 119,
2310  0, 0, 0, 0, 0, 0, 0, 100, 100, 0,
2311  119, 0, 0, 119, 0, 286, 0, 0, 0, 0,
2312  808, 808, 0, 0, 0, 0, 0, 0, 0, 808,
2313  808, 808, 0, 0, 0, 808, 808, 0, 0, 0,
2314  1006, 0, 0, 85, 119, 0, 0, 0, 0, 0,
2315  0, 0, 0, 119, 0, 0, 0, 0, 0, 286,
2316  118, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2317  0, 0, 121, 805, 121, 0, 85, 284, 85, 100,
2318  0, 805, 0, 0, 0, 0, 0, 0, 0, 0,
2319  0, 85, 0, 85, 0, 0, 0, 0, 0, 0,
2320  0, 0, 0, 0, 392, 0, 0, 805, 0, 0,
2321  0, 0, 0, 0, 122, 0, 122, 0, 0, 0,
2322  808, 284, 0, 121, 121, 0, 0, 0, 808, 0,
2323  0, 0, 0, 0, 0, 0, 122, 0, 0, 0,
2324  0, 0, 0, 85, 0, 0, 0, 0, 85, 0,
2325  0, 119, 0, 119, 808, 0, 0, 0, 0, 0,
2326  0, 0, 85, 805, 0, 532, 0, 0, 0, 0,
2327  0, 0, 0, 0, 0, 0, 118, 0, 118, 0,
2328  0, 0, 0, 286, 0, 0, 0, 0, 119, 0,
2329  0, 119, 761, 0, 392, 0, 0, 0, 118, 0,
2330  85, 0, 0, 0, 85, 0, 85, 0, 0, 0,
2331  808, 0, 122, 0, 0, 286, 122, 538, 0, 0,
2332  0, 0, 0, 0, 538, 538, 0, 0, 0, 0,
2333  538, 538, 0, 0, 0, 0, 0, 0, 805, 0,
2334  0, 0, 805, 0, 0, 284, 0, 0, 532, 532,
2335  0, 0, 0, 0, 23, 24, 25, 26, 805, 0,
2336  122, 0, 0, 122, 119, 119, 0, 0, 0, 0,
2337  32, 33, 34, 0, 118, 0, 0, 284, 118, 121,
2338  41, 42, 43, 44, 45, 808, 0, 0, 0, 808,
2339  0, 0, 0, 805, 805, 0, 0, 0, 0, 85,
2340  0, 0, 0, 0, 0, 808, 0, 0, 0, 0,
2341  0, 0, 121, 0, 121, 0, 0, 0, 0, 0,
2342  0, 0, 118, 0, 0, 118, 0, 121, 0, 121,
2343  0, 789, 59, 60, 61, 62, 63, 64, 65, 66,
2344  808, 808, 0, 0, 0, 0, 0, 0, 0, 538,
2345  0, 0, 0, 333, -758, -758, -758, -758, 338, 339,
2346  279, 122, -758, -758, 0, 0, 122, 0, 0, 0,
2347  346, 347, 0, 0, 0, 119, 0, 0, 0, 121,
2348  0, 0, 122, 0, 121, 0, 0, 0, 806, 122,
2349  0, 0, 0, 0, 0, 0, 0, 0, 121, 0,
2350  122, 121, 0, 122, 0, 349, 350, 351, 352, 353,
2351  354, 355, 356, 357, 358, 85, 0, 85, 0, 0,
2352  0, 0, 0, 118, 0, 0, 0, 0, 118, 0,
2353  1007, 0, 0, 0, 122, 0, 121, 85, 0, 0,
2354  121, 0, 121, 122, 118, 0, 0, 0, 0, 0,
2355  0, 118, 0, 0, 0, 0, 0, 0, 0, 0,
2356  807, 0, 118, 0, 0, 118, 0, 0, 0, 0,
2357  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2358  0, 0, 806, 806, 121, 121, 0, 0, 0, 0,
2359  0, 0, 1005, 0, 393, 0, 118, 0, 0, 0,
2360  0, 0, 0, 0, 0, 118, 0, 0, 0, 0,
2361  0, 0, 0, 85, 0, 0, 0, 85, 532, 0,
2362  0, 0, 0, 0, 0, 532, 532, 0, 0, 0,
2363  0, 532, 532, 0, 0, 121, 0, 0, 0, 0,
2364  0, 122, 0, 122, 0, 0, 0, 0, 0, 0,
2365  0, 0, 0, 0, 807, 807, 391, 0, 0, 0,
2366  0, 85, 0, 0, 85, 333, 334, 335, 336, 337,
2367  338, 339, 340, 0, 342, 343, 806, 806, 122, 0,
2368  0, 122, 346, 347, 393, 806, 806, 806, 0, 0,
2369  0, 806, 806, 0, 0, 0, 0, 0, 0, 0,
2370  0, 0, 0, 118, 0, 118, 0, 0, 0, 0,
2371  0, 0, 0, 0, 0, 0, 0, 349, 350, 351,
2372  352, 353, 354, 355, 356, 357, 358, 0, 0, 0,
2373  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2374  118, 0, 0, 118, 0, 0, 391, 0, 807, 807,
2375  532, 121, 0, 121, 122, 122, 0, 807, 807, 807,
2376  0, 0, 85, 807, 807, 0, 0, 85, 0, 0,
2377  0, 0, 0, 121, 217, 217, 806, 0, 0, 0,
2378  0, 0, 0, 85, 806, 0, 0, 0, 0, 0,
2379  85, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2380  0, 85, 0, 0, 85, 0, 250, 253, 254, 255,
2381  806, 0, 0, 217, 217, 0, 118, 118, 0, 0,
2382  0, 0, 0, 0, 0, 0, 303, 304, 0, 0,
2383  0, 1003, 0, 0, 0, 85, 0, 0, 0, 0,
2384  0, 0, 0, 0, 85, 0, 0, 0, 807, 121,
2385  0, 0, 0, 121, 121, 0, 807, 0, 217, 0,
2386  0, 121, 121, 0, 0, 122, 806, 121, 121, 0,
2387  0, 0, 0, 0, 0, 0, 0, 0, 0, -757,
2388  0, 0, 807, 0, 0, 0, 0, -757, -757, -757,
2389  0, 0, -757, -757, -757, 0, -757, 121, 0, 0,
2390  121, 0, 0, 0, -757, -757, -757, 0, 0, 0,
2391  0, 0, 0, 0, 0, 0, -757, -757, 0, -757,
2392  -757, -757, -757, -757, 0, 0, 0, 118, 0, 0,
2393  0, 0, 0, 0, 0, 0, 0, 0, 807, 0,
2394  0, 806, 85, 0, 85, 806, 0, -757, 0, 0,
2395  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2396  0, 806, 0, 0, 0, 217, 0, 0, 217, 217,
2397  217, 0, 303, 0, 0, -757, -757, 0, 0, 85,
2398  0, 0, 85, 0, 0, 0, 121, 0, 217, 0,
2399  217, 217, 0, 0, 0, 0, 806, 806, 121, -757,
2400  0, 0, 0, 121, 0, 0, 0, 0, 0, 0,
2401  0, 0, 0, 807, 0, 0, 0, 807, 0, 121,
2402  0, 0, -757, -757, 0, 0, 121, 233, -757, 0,
2403  -757, 0, -757, 807, 0, 0, 0, 121, 0, 0,
2404  121, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2405  0, 0, 0, 0, 0, 85, 85, 0, 0, 0,
2406  0, 0, 0, 0, 0, 0, 0, 0, 807, 807,
2407  0, 121, 0, 0, 0, 0, 0, 0, 0, 0,
2408  121, 0, 0, 0, 217, 0, 0, 0, 0, 533,
2409  0, 540, 541, 542, 543, 544, 0, 0, 545, 546,
2410  547, 548, 549, 550, 551, 552, 553, 0, 0, 554,
2411  555, 556, 557, 558, 559, 560, 561, 562, 563, 0,
2412  0, 0, 217, 0, 0, 0, 0, 0, 0, 0,
2413  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2414  0, 0, 0, 0, 0, 0, 333, 334, 335, 336,
2415  337, 338, 339, 340, 341, 342, 343, 344, 345, 0,
2416  0, 0, 0, 346, 347, 0, 85, 0, 0, 0,
2417  0, 0, 613, 613, 0, 0, 0, 0, 121, 0,
2418  121, 613, 217, 217, 0, 0, 0, 217, 0, 613,
2419  613, 217, 0, 0, 0, 0, 348, 255, 349, 350,
2420  351, 352, 353, 354, 355, 356, 357, 358, 0, 0,
2421  0, 0, 639, 0, 0, 121, 0, 613, 121, 0,
2422  0, 0, 237, 0, 0, 0, 0, 0, 217, 0,
2423  0, 217, 0, 0, 0, 0, 0, 0, 0, 0,
2424  0, 0, 217, 0, 0, 0, 0, 0, 0, 0,
2425  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2426  669, 333, 334, 335, 336, 337, 338, 339, 340, 341,
2427  342, 343, -758, -758, 0, 0, 0, 217, 346, 347,
2428  0, 0, 0, 0, 0, 0, -735, 0, 0, 0,
2429  0, 121, 121, 0, -735, -735, -735, 0, 0, 0,
2430  -735, -735, 0, -735, 0, 0, 0, 0, 0, 0,
2431  0, -735, -735, 349, 350, 351, 352, 353, 354, 355,
2432  356, 357, 358, -735, -735, 0, -735, -735, -735, -735,
2433  -735, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2434  0, 0, 0, 0, 0, 0, 0, 0, 0, 217,
2435  0, 0, 0, 0, -735, 0, 0, 0, 0, 217,
2436  0, 0, 0, -735, -735, -735, -735, -735, -735, -735,
2437  -735, -735, -735, -735, -735, -735, 217, 0, 217, 0,
2438  -735, -735, -735, -735, 0, 691, 0, 0, 0, 0,
2439  0, 217, 0, 217, 0, 0, 0, 0, 0, 0,
2440  0, 0, 121, 0, 0, 0, -735, 0, 0, 0,
2441  0, 0, -116, -735, 0, -735, -735, -735, -735, -735,
2442  -735, -735, -735, -735, -735, 0, 0, 0, 0, -735,
2443  -735, -735, -107, 0, 0, -735, 217, -735, 0, -735,
2444  0, 0, 613, 775, 0, 217, 0, 0, 0, 613,
2445  613, 0, 0, 0, 0, 613, 613, 0, -629, 0,
2446  0, 0, 0, 217, 0, 0, -629, -629, -629, 0,
2447  0, -629, -629, -629, 0, -629, 0, 0, 217, 0,
2448  0, 0, 0, -629, 0, -629, -629, -629, 0, 0,
2449  0, 0, 0, 0, 0, -629, -629, 0, -629, -629,
2450  -629, -629, -629, 613, 613, 0, 613, 613, 0, 0,
2451  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2452  0, 0, 0, 0, 0, 0, -629, 0, 217, 0,
2453  0, 0, 0, 0, 0, -629, -629, -629, -629, -629,
2454  -629, -629, -629, -629, -629, -629, -629, -629, 0, 0,
2455  0, 0, -629, -629, -629, -629, 0, -629, -629, 0,
2456  0, 0, 0, 0, -629, 0, 0, 894, 0, 0,
2457  0, 0, 0, 0, 613, 0, 0, 0, -629, 0,
2458  0, -629, 0, 0, -629, -629, -629, -629, -629, -629,
2459  -629, -629, -629, -629, -629, -629, -629, 0, 0, 0,
2460  0, 217, -629, -629, -629, 0, 0, -629, -629, -629,
2461  0, -629, 0, 0, 0, 0, 0, 0, 0, 613,
2462  217, 0, 0, -757, 4, 0, 5, 6, 7, 8,
2463  9, 0, 0, 0, 10, 11, 0, 0, 0, 12,
2464  0, 13, 14, 15, 16, 17, 18, 19, 0, 0,
2465  0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
2466  0, 0, 27, 0, 0, 0, 0, 217, 28, 29,
2467  30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
2468  40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
2469  0, 0, 0, 0, 0, 217, 0, 0, 48, 49,
2470  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2471  0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
2472  0, 52, 0, 0, 53, 54, 0, 55, 56, 0,
2473  57, 0, 0, 58, 59, 60, 61, 62, 63, 64,
2474  65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
2475  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2476  0, 0, 67, 68, 69, 0, 0, 0, 0, 0,
2477  217, -735, 0, 0, -757, 0, -757, 0, 0, -735,
2478  -735, -735, 0, 217, -735, -735, -735, 0, -735, 0,
2479  0, 0, 0, 0, 0, 0, -735, -735, -735, -735,
2480  -735, 0, 0, 0, 0, 0, 0, 0, -735, -735,
2481  0, -735, -735, -735, -735, -735, 0, 0, 0, 0,
2482  0, 0, 0, 0, 0, 0, 0, 0, 333, 334,
2483  335, 336, 337, 338, 339, 0, 0, 342, 343, -735,
2484  0, 0, 0, 0, 217, 346, 347, 0, -735, -735,
2485  -735, -735, -735, -735, -735, -735, -735, -735, -735, -735,
2486  -735, 0, 0, 0, 0, -735, -735, -735, -735, 0,
2487  745, -735, 0, 0, 0, 0, 0, -735, 0, 0,
2488  349, 350, 351, 352, 353, 354, 355, 356, 357, 358,
2489  0, -735, 0, 0, -735, 0, 0, -116, -735, -735,
2490  -735, -735, -735, -735, -735, -735, -735, -735, -735, -735,
2491  0, 0, 0, 0, -735, -735, -735, -735, -632, 0,
2492  -735, -735, -735, 0, -735, 0, -632, -632, -632, 0,
2493  0, -632, -632, -632, 0, -632, 0, 0, 0, 0,
2494  685, 0, 0, -632, 0, -632, -632, -632, 0, 0,
2495  0, 0, 0, 0, 0, -632, -632, 0, -632, -632,
2496  -632, -632, -632, 0, 0, 0, 0, 0, 0, 0,
2497  0, 0, 0, 333, 334, 335, 336, 337, 338, 339,
2498  340, 341, 342, 343, 344, 345, -632, 0, 0, 0,
2499  346, 347, 0, 0, 0, -632, -632, -632, -632, -632,
2500  -632, -632, -632, -632, -632, -632, -632, -632, 0, 0,
2501  0, 0, -632, -632, -632, -632, 0, -632, -632, 0,
2502  0, 0, 0, 348, -632, 349, 350, 351, 352, 353,
2503  354, 355, 356, 357, 358, 0, 0, 0, -632, 0,
2504  0, -632, -257, 0, -632, -632, -632, -632, -632, -632,
2505  -632, -632, -632, -632, -632, -632, -632, 0, 0, 0,
2506  0, 0, -632, -632, -632, -736, 0, -632, -632, -632,
2507  0, -632, 0, -736, -736, -736, 0, 0, -736, -736,
2508  -736, 0, -736, 0, 0, 0, 0, 685, 0, 0,
2509  -736, -736, -736, -736, -736, 0, 0, 0, 0, 0,
2510  0, 0, -736, -736, 0, -736, -736, -736, -736, -736,
2511  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2512  333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
2513  343, 344, 345, -736, 0, 0, 0, 346, 347, 0,
2514  0, 0, -736, -736, -736, -736, -736, -736, -736, -736,
2515  -736, -736, -736, -736, -736, 0, 0, 0, 0, -736,
2516  -736, -736, -736, 0, 0, -736, 0, 0, 0, 0,
2517  348, -736, 349, 350, 351, 352, 353, 354, 355, 356,
2518  357, 358, 0, 0, 0, -736, 0, 0, -736, 0,
2519  0, 0, -736, -736, -736, -736, -736, -736, -736, -736,
2520  -736, -736, -736, -736, 0, 0, 0, 0, -736, -736,
2521  -736, -736, -737, 0, -736, -736, -736, 0, -736, 0,
2522  -737, -737, -737, 0, 0, -737, -737, -737, 0, -737,
2523  0, 0, 0, 0, 0, 0, 0, -737, -737, -737,
2524  -737, -737, 0, 0, 0, 0, 0, 0, 0, -737,
2525  -737, 0, -737, -737, -737, -737, -737, 0, 0, 0,
2526  0, 0, 0, 0, 0, 0, 0, 333, 334, 335,
2527  336, 337, 338, 339, 340, 341, 342, 343, 344, 345,
2528  -737, 0, 0, 0, 346, 347, 0, 0, 0, -737,
2529  -737, -737, -737, -737, -737, -737, -737, -737, -737, -737,
2530  -737, -737, 0, 0, 0, 0, -737, -737, -737, -737,
2531  0, 0, -737, 0, 0, 0, 0, 348, -737, 349,
2532  350, 351, 352, 353, 354, 355, 356, 357, 358, 0,
2533  0, 0, -737, 0, 0, -737, 0, 0, 0, -737,
2534  -737, -737, -737, -737, -737, -737, -737, -737, -737, -737,
2535  -737, 0, 0, 0, 0, -737, -737, -737, -737, -310,
2536  0, -737, -737, -737, 0, -737, 0, -310, -310, -310,
2537  0, 0, -310, -310, -310, 0, -310, 0, 0, 0,
2538  0, 0, 0, 0, -310, 0, -310, -310, -310, 0,
2539  0, 0, 0, 0, 0, 0, -310, -310, 0, -310,
2540  -310, -310, -310, -310, 0, 0, 0, 0, 0, 0,
2541  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2542  0, 0, 0, 0, 0, 0, 0, -310, 0, 0,
2543  0, 0, 0, 0, 0, 0, -310, -310, -310, -310,
2544  -310, -310, -310, -310, -310, -310, -310, -310, -310, 0,
2545  0, 0, 0, -310, -310, -310, -310, 0, 746, -310,
2546  0, 0, 0, 0, 0, -310, 0, 0, 0, 0,
2547  0, 0, 0, 0, 0, 0, 0, 0, 0, -310,
2548  0, 0, -310, 0, 0, -118, -310, -310, -310, -310,
2549  -310, -310, -310, -310, -310, -310, -310, -310, 0, 0,
2550  0, 0, 0, -310, -310, -310, -449, 0, -310, -310,
2551  -310, 0, -310, 0, -449, -449, -449, 0, 0, -449,
2552  -449, -449, 0, -449, 0, 0, 0, 0, 0, 0,
2553  0, -449, -449, -449, -449, 0, 0, 0, 0, 0,
2554  0, 0, 0, -449, -449, 0, -449, -449, -449, -449,
2555  -449, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2556  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2557  0, 0, 0, 0, -449, 0, 0, 0, 0, 0,
2558  0, 0, 0, -449, -449, -449, -449, -449, -449, -449,
2559  -449, -449, -449, -449, -449, -449, 0, 0, 0, 0,
2560  -449, -449, -449, -449, 0, 0, -449, 0, 0, 0,
2561  0, 0, -449, 0, 0, 0, 0, 0, 0, 0,
2562  0, 0, 0, 0, 0, 0, -449, 0, 0, 0,
2563  0, 0, 0, -449, 0, -449, -449, -449, -449, -449,
2564  -449, -449, -449, -449, -449, 0, 0, 0, 0, -449,
2565  -449, -449, -449, -302, 233, -449, -449, -449, 0, -449,
2566  0, -302, -302, -302, 0, 0, -302, -302, -302, 0,
2567  -302, 0, 0, 0, 0, 0, 0, 0, -302, 0,
2568  -302, -302, -302, 0, 0, 0, 0, 0, 0, 0,
2569  -302, -302, 0, -302, -302, -302, -302, -302, 0, 0,
2570  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2571  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2572  0, -302, 0, 0, 0, 0, 0, 0, 0, 0,
2573  -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
2574  -302, -302, -302, 0, 0, 0, 0, -302, -302, -302,
2575  -302, 0, 0, -302, 0, 0, 0, 0, 0, -302,
2576  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2577  0, 0, 0, -302, 0, 0, -302, 0, 0, 0,
2578  -302, -302, -302, -302, -302, -302, -302, -302, -302, -302,
2579  -302, -302, 0, 0, 0, 0, 0, -302, -302, -302,
2580  -757, 0, -302, -302, -302, 0, -302, 0, -757, -757,
2581  -757, 0, 0, -757, -757, -757, 0, -757, 0, 0,
2582  0, 0, 0, 0, 0, -757, -757, -757, -757, 0,
2583  0, 0, 0, 0, 0, 0, 0, -757, -757, 0,
2584  -757, -757, -757, -757, -757, 0, 0, 0, 0, 0,
2585  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2586  0, 0, 0, 0, 0, 0, 0, 0, -757, 0,
2587  0, 0, 0, 0, 0, 0, 0, -757, -757, -757,
2588  -757, -757, -757, -757, -757, -757, -757, -757, -757, -757,
2589  0, 0, 0, 0, -757, -757, -757, -757, 0, 0,
2590  -757, 0, 0, 0, 0, 0, -757, 0, 0, 0,
2591  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2592  -757, 0, 0, 0, 0, 0, 0, -757, 0, -757,
2593  -757, -757, -757, -757, -757, -757, -757, -757, -757, 0,
2594  0, 0, 0, -757, -757, -757, -757, -317, 233, -757,
2595  -757, -757, 0, -757, 0, -317, -317, -317, 0, 0,
2596  -317, -317, -317, 0, -317, 0, 0, 0, 0, 0,
2597  0, 0, -317, 0, -317, -317, 0, 0, 0, 0,
2598  0, 0, 0, 0, -317, -317, 0, -317, -317, -317,
2599  -317, -317, 0, 0, 0, 0, 0, 0, 0, 0,
2600  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2601  0, 0, 0, 0, 0, -317, 0, 0, 0, 0,
2602  0, 0, 0, 0, -317, -317, -317, -317, -317, -317,
2603  -317, -317, -317, -317, -317, -317, -317, 0, 0, 0,
2604  0, -317, -317, -317, -317, 0, 0, -317, 0, 0,
2605  0, 0, 0, -317, 0, 0, 0, 0, 0, 0,
2606  0, 0, 0, 0, 0, 0, 0, -317, 0, 0,
2607  0, 0, 0, 0, -317, 0, -317, -317, -317, -317,
2608  -317, -317, -317, -317, -317, -317, 0, 0, 0, 0,
2609  0, -317, -317, -317, -735, 230, -317, -317, -317, 0,
2610  -317, 0, -735, -735, -735, 0, 0, 0, -735, -735,
2611  0, -735, 0, 0, 0, 0, 0, 0, 0, -735,
2612  -735, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2613  0, -735, -735, 0, -735, -735, -735, -735, -735, 0,
2614  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2615  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2616  0, 0, -735, 0, 0, 0, 0, 0, 0, 0,
2617  0, -735, -735, -735, -735, -735, -735, -735, -735, -735,
2618  -735, -735, -735, -735, 0, 0, 0, 0, -735, -735,
2619  -735, -735, 0, 691, 0, 0, 0, 0, 0, 0,
2620  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2621  0, 0, 0, 0, -735, 0, 0, 0, 0, 0,
2622  -116, -735, 0, -735, -735, -735, -735, -735, -735, -735,
2623  -735, -735, -735, 0, 0, 0, 0, -735, -735, -735,
2624  -735, -310, 0, -735, 0, -735, 0, -735, 0, -310,
2625  -310, -310, 0, 0, 0, -310, -310, 0, -310, 0,
2626  0, 0, 0, 0, 0, 0, -310, 0, 0, 0,
2627  0, 0, 0, 0, 0, 0, 0, 0, -310, -310,
2628  0, -310, -310, -310, -310, -310, 0, 0, 0, 0,
2629  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2630  0, 0, 0, 0, 0, 0, 0, 0, 0, -310,
2631  0, 0, 0, 0, 0, 0, 0, 0, -310, -310,
2632  -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
2633  -310, 0, 0, 0, 0, -310, -310, -310, -310, 0,
2634  692, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2635  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2636  0, -310, 0, 0, 0, 0, 0, -118, -310, 0,
2637  -310, -310, -310, -310, -310, -310, -310, -310, -310, -310,
2638  0, 0, 0, 0, 0, -310, -310, -109, -310, 0,
2639  -310, 0, -310, 0, -310, 0, -310, -310, -310, 0,
2640  0, 0, -310, -310, 0, -310, 0, 0, 0, 0,
2641  0, 0, 0, -310, 0, 0, 0, 0, 0, 0,
2642  0, 0, 0, 0, 0, -310, -310, 0, -310, -310,
2643  -310, -310, -310, 0, 0, 0, 0, 0, 0, 0,
2644  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2645  0, 0, 0, 0, 0, 0, -310, 0, 0, 0,
2646  0, 0, 0, 0, 0, -310, -310, -310, -310, -310,
2647  -310, -310, -310, -310, -310, -310, -310, -310, 0, 0,
2648  0, 0, -310, -310, -310, -310, 0, 692, 0, 0,
2649  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2650  0, 0, 0, 0, 0, 0, 0, 0, -310, 0,
2651  0, 0, 0, 0, -118, -310, 0, -310, -310, -310,
2652  -310, -310, -310, -310, -310, -310, -310, 0, 0, 0,
2653  0, 0, -310, -310, -310, 0, 0, -310, 0, -310,
2654  257, -310, 5, 6, 7, 8, 9, -757, -757, -757,
2655  10, 11, 0, 0, -757, 12, 0, 13, 14, 15,
2656  16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
2657  21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
2658  0, 0, 0, 0, 28, 29, 258, 31, 32, 33,
2659  34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
2660  43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
2661  0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
2662  0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
2663  51, 0, 0, 0, 0, 0, 0, 52, 0, 0,
2664  53, 54, 0, 55, 56, 0, 57, 0, 0, 58,
2665  59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
2666  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2667  0, 0, 0, 0, 0, 0, 0, 0, 67, 68,
2668  69, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2669  -757, 257, -757, 5, 6, 7, 8, 9, 0, 0,
2670  -757, 10, 11, 0, -757, -757, 12, 0, 13, 14,
2671  15, 16, 17, 18, 19, 0, 0, 0, 0, 0,
2672  20, 21, 22, 23, 24, 25, 26, 0, 0, 27,
2673  0, 0, 0, 0, 0, 28, 29, 258, 31, 32,
2674  33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
2675  42, 43, 44, 45, 46, 47, 0, 0, 0, 0,
2676  0, 0, 0, 0, 0, 48, 49, 0, 0, 0,
2677  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2678  50, 51, 0, 0, 0, 0, 0, 0, 52, 0,
2679  0, 53, 54, 0, 55, 56, 0, 57, 0, 0,
2680  58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
2681  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2682  0, 0, 0, 0, 0, 0, 0, 0, 0, 67,
2683  68, 69, 0, 0, 0, 0, 0, 0, 0, 0,
2684  0, -757, 257, -757, 5, 6, 7, 8, 9, 0,
2685  0, -757, 10, 11, 0, 0, -757, 12, -757, 13,
2686  14, 15, 16, 17, 18, 19, 0, 0, 0, 0,
2687  0, 20, 21, 22, 23, 24, 25, 26, 0, 0,
2688  27, 0, 0, 0, 0, 0, 28, 29, 258, 31,
2689  32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
2690  41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
2691  0, 0, 0, 0, 0, 0, 48, 49, 0, 0,
2692  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2693  0, 50, 51, 0, 0, 0, 0, 0, 0, 52,
2694  0, 0, 53, 54, 0, 55, 56, 0, 57, 0,
2695  0, 58, 59, 60, 61, 62, 63, 64, 65, 66,
2696  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2697  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2698  67, 68, 69, 0, 0, 0, 0, 0, 0, 0,
2699  0, 0, -757, 257, -757, 5, 6, 7, 8, 9,
2700  0, 0, -757, 10, 11, 0, 0, -757, 12, 0,
2701  13, 14, 15, 16, 17, 18, 19, -757, 0, 0,
2702  0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
2703  0, 27, 0, 0, 0, 0, 0, 28, 29, 258,
2704  31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2705  0, 41, 42, 43, 44, 45, 46, 47, 0, 0,
2706  0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
2707  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2708  0, 0, 50, 51, 0, 0, 0, 0, 0, 0,
2709  52, 0, 0, 53, 54, 0, 55, 56, 0, 57,
2710  0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
2711  66, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2712  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2713  0, 67, 68, 69, 0, 0, 0, 0, 0, 0,
2714  0, 0, 0, -757, 257, -757, 5, 6, 7, 8,
2715  9, 0, 0, -757, 10, 11, 0, 0, -757, 12,
2716  0, 13, 14, 15, 16, 17, 18, 19, 0, 0,
2717  0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
2718  0, 0, 27, 0, 0, 0, 0, 0, 28, 29,
2719  258, 31, 32, 33, 34, 35, 36, 37, 38, 39,
2720  40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
2721  0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
2722  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2723  0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
2724  0, 52, 0, 0, 53, 54, 0, 55, 56, 0,
2725  57, 0, 0, 58, 59, 60, 61, 62, 63, 64,
2726  65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
2727  257, 0, 5, 6, 7, 8, 9, 0, -757, -757,
2728  10, 11, 67, 68, 69, 12, 0, 13, 14, 15,
2729  16, 17, 18, 19, -757, 0, -757, 0, 0, 20,
2730  21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
2731  0, 0, 0, 0, 28, 29, 258, 31, 32, 33,
2732  34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
2733  43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
2734  0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
2735  0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
2736  51, 0, 0, 0, 0, 0, 0, 52, 0, 0,
2737  53, 54, 0, 55, 56, 0, 57, 0, 0, 58,
2738  59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
2739  0, 0, 0, 0, 0, 0, 257, 0, 5, 6,
2740  7, 8, 9, 0, 0, 0, 10, 11, 67, 68,
2741  69, 12, 0, 13, 14, 15, 16, 17, 18, 19,
2742  -757, 0, -757, 0, 0, 20, 21, 22, 23, 24,
2743  25, 26, 0, 0, 27, 0, 0, 0, 0, 0,
2744  28, 29, 258, 31, 32, 33, 34, 35, 36, 37,
2745  38, 39, 40, 0, 41, 42, 43, 44, 45, 46,
2746  47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2747  48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
2748  0, 0, 0, 0, 0, 50, 51, 0, 0, 0,
2749  0, 0, 0, 52, 0, 0, 259, 54, 0, 55,
2750  56, 0, 57, 0, 0, 58, 59, 60, 61, 62,
2751  63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
2752  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2753  0, 0, 0, 0, 67, 68, 69, 0, 0, 0,
2754  0, 0, 0, 0, -757, 0, -757, 257, -757, 5,
2755  6, 7, 8, 9, 0, 0, 0, 10, 11, 0,
2756  0, 0, 12, 0, 13, 14, 15, 16, 17, 18,
2757  19, 0, 0, 0, 0, 0, 20, 21, 22, 23,
2758  24, 25, 26, 0, 0, 27, 0, 0, 0, 0,
2759  0, 28, 29, 258, 31, 32, 33, 34, 35, 36,
2760  37, 38, 39, 40, 0, 41, 42, 43, 44, 45,
2761  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
2762  0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
2763  0, 0, 0, 0, 0, 0, 50, 51, 0, 0,
2764  0, 0, 0, 0, 52, 0, 0, 53, 54, 0,
2765  55, 56, 0, 57, 0, 0, 58, 59, 60, 61,
2766  62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
2767  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2768  0, 0, 0, 0, 0, 67, 68, 69, 0, 0,
2769  0, 0, 0, 0, 0, -757, 0, -757, 4, -757,
2770  5, 6, 7, 8, 9, 0, 0, 0, 10, 11,
2771  0, 0, 0, 12, 0, 13, 14, 15, 16, 17,
2772  18, 19, 0, 0, 0, 0, 0, 20, 21, 22,
2773  23, 24, 25, 26, 0, 0, 27, 0, 0, 0,
2774  0, 0, 28, 29, 30, 31, 32, 33, 34, 35,
2775  36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
2776  45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
2777  0, 0, 48, 49, 0, 0, 0, 0, 0, 0,
2778  0, 0, 0, 0, 0, 0, 0, 50, 51, 0,
2779  0, 0, 0, 0, 0, 52, 0, 0, 53, 54,
2780  0, 55, 56, 0, 57, 0, 0, 58, 59, 60,
2781  61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
2782  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2783  0, 0, 0, 0, 0, 0, 67, 68, 69, 0,
2784  0, -757, 0, 0, 0, 0, 0, 0, -757, 257,
2785  -757, 5, 6, 7, 8, 9, 0, 0, 0, 10,
2786  11, 0, 0, 0, 12, 0, 13, 14, 15, 16,
2787  17, 18, 19, 0, 0, 0, 0, 0, 20, 21,
2788  22, 23, 24, 25, 26, 0, 0, 27, 0, 0,
2789  0, 0, 0, 28, 29, 258, 31, 32, 33, 34,
2790  35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
2791  44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
2792  0, 0, 0, 48, 49, 0, 0, 0, 0, 0,
2793  0, 0, 0, 0, 0, 0, 0, 0, 50, 51,
2794  0, 0, 0, 0, 0, 0, 52, 0, 0, 53,
2795  54, 0, 55, 56, 0, 57, 0, 0, 58, 59,
2796  60, 61, 62, 63, 64, 65, 66, 0, 0, 0,
2797  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2798  0, 0, 0, 0, 0, 0, 0, 67, 68, 69,
2799  0, 0, -757, 0, 0, 0, 0, 0, 0, -757,
2800  257, -757, 5, 6, 7, 8, 9, 0, 0, -757,
2801  10, 11, 0, 0, 0, 12, 0, 13, 14, 15,
2802  16, 17, 18, 19, 0, 0, 0, 0, 0, 20,
2803  21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
2804  0, 0, 0, 0, 28, 29, 258, 31, 32, 33,
2805  34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
2806  43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
2807  0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
2808  0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
2809  51, 0, 0, 0, 0, 0, 0, 52, 0, 0,
2810  53, 54, 0, 55, 56, 0, 57, 0, 0, 58,
2811  59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
2812  0, 0, 0, 0, 0, 0, 257, 0, 5, 6,
2813  7, 8, 9, 0, 0, 0, 10, 11, 67, 68,
2814  69, 12, 0, 13, 14, 15, 16, 17, 18, 19,
2815  -757, 0, -757, 0, 0, 20, 21, 22, 23, 24,
2816  25, 26, 0, 0, 27, 0, 0, 0, 0, 0,
2817  28, 29, 258, 31, 32, 33, 34, 35, 36, 37,
2818  38, 39, 40, 0, 41, 42, 43, 44, 45, 46,
2819  47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2820  48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
2821  0, 0, 0, 0, 0, 50, 51, 0, 0, 0,
2822  0, 0, 0, 52, 0, 0, 53, 54, 0, 55,
2823  56, 0, 57, 0, 0, 58, 59, 60, 61, 62,
2824  63, 64, 65, 66, 0, -757, 0, 0, 0, 0,
2825  0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
2826  0, 0, 10, 11, 67, 68, 69, 12, 0, 13,
2827  14, 15, 16, 17, 18, 19, -757, 0, -757, 0,
2828  0, 20, 21, 22, 23, 24, 25, 26, 0, 0,
2829  206, 0, 0, 0, 0, 0, 0, 29, 0, 0,
2830  32, 33, 34, 35, 36, 37, 38, 39, 40, 207,
2831  41, 42, 43, 44, 45, 46, 47, 0, 0, 0,
2832  0, 0, 0, 0, 0, 0, 48, 49, 0, 0,
2833  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2834  0, 50, 51, 0, 0, 0, 0, 0, 0, 208,
2835  0, 0, 209, 54, 0, 55, 56, 0, 210, 211,
2836  212, 58, 59, 213, 61, 62, 63, 64, 65, 66,
2837  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2838  5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
2839  67, 214, 69, 12, 0, 13, 14, 15, 16, 17,
2840  18, 19, 0, 0, 237, 0, 0, 20, 21, 22,
2841  23, 24, 25, 26, 0, 0, 27, 0, 0, 0,
2842  0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
2843  36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
2844  45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
2845  0, 0, 48, 49, 0, 0, 0, 0, 0, 0,
2846  0, 0, 0, 0, 0, 0, 0, 50, 51, 0,
2847  0, 0, 0, 0, 0, 208, 0, 0, 209, 54,
2848  0, 55, 56, 0, 0, 0, 0, 58, 59, 60,
2849  61, 62, 63, 64, 65, 66, 0, 0, 0, 0,
2850  0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
2851  9, 0, 0, 0, 10, 11, 67, 68, 69, 12,
2852  0, 13, 14, 15, 16, 17, 18, 19, 305, 0,
2853  306, 0, 0, 20, 21, 22, 23, 24, 25, 26,
2854  0, 0, 27, 0, 0, 0, 0, 0, 0, 29,
2855  0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
2856  40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
2857  0, 0, 0, 0, 0, 0, 0, 0, 48, 49,
2858  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2859  0, 0, 0, 50, 51, 0, 0, 0, 0, 0,
2860  0, 208, 0, 0, 209, 54, 0, 55, 56, 0,
2861  0, 0, 0, 58, 59, 60, 61, 62, 63, 64,
2862  65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
2863  0, 0, 5, 6, 7, 8, 9, 0, 0, 0,
2864  10, 11, 67, 68, 69, 12, 0, 13, 14, 15,
2865  16, 17, 18, 19, 0, 0, 237, 0, 0, 20,
2866  21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
2867  0, 0, 0, 0, 28, 29, 30, 31, 32, 33,
2868  34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
2869  43, 44, 45, 46, 47, 0, 0, 0, 0, 0,
2870  0, 0, 0, 0, 48, 49, 0, 0, 0, 0,
2871  0, 0, 0, 0, 0, 0, 0, 0, 0, 50,
2872  51, 0, 0, 0, 0, 0, 0, 52, 0, 0,
2873  53, 54, 0, 55, 56, 0, 57, 0, 0, 58,
2874  59, 60, 61, 62, 63, 64, 65, 66, 0, 0,
2875  0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
2876  7, 8, 9, 0, 0, 0, 10, 11, 67, 68,
2877  69, 12, 0, 13, 14, 15, 16, 17, 18, 19,
2878  503, 0, 0, 0, 0, 20, 21, 22, 23, 24,
2879  25, 26, 0, 0, 27, 0, 0, 0, 0, 0,
2880  28, 29, 258, 31, 32, 33, 34, 35, 36, 37,
2881  38, 39, 40, 0, 41, 42, 43, 44, 45, 46,
2882  47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2883  48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
2884  0, 0, 0, 0, 0, 50, 51, 0, 0, 0,
2885  0, 0, 0, 52, 0, 0, 53, 54, 0, 55,
2886  56, 0, 57, 0, 0, 58, 59, 60, 61, 62,
2887  63, 64, 65, 66, 0, 0, 0, 0, 0, 0,
2888  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2889  0, 0, 0, 0, 67, 68, 69, 0, 0, 0,
2890  0, 0, 0, 0, 0, 0, 503, 126, 127, 128,
2891  129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
2892  139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
2893  149, 0, 0, 0, 150, 151, 152, 395, 396, 397,
2894  398, 157, 158, 159, 0, 0, 0, 0, 0, 160,
2895  161, 162, 163, 399, 400, 401, 402, 168, 37, 38,
2896  403, 40, 0, 0, 0, 0, 0, 0, 0, 0,
2897  0, 0, 0, 0, 0, 0, 0, 0, 0, 170,
2898  171, 172, 173, 174, 175, 176, 177, 178, 0, 0,
2899  179, 180, 0, 0, 0, 0, 181, 182, 183, 184,
2900  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2901  0, 185, 186, 0, 0, 0, 0, 0, 0, 0,
2902  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2903  0, 0, 0, 187, 188, 189, 190, 191, 192, 193,
2904  194, 195, 196, 0, 197, 198, 0, 0, 0, 0,
2905  0, 199, 404, 126, 127, 128, 129, 130, 131, 132,
2906  133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
2907  143, 144, 145, 146, 147, 148, 149, 0, 0, 0,
2908  150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
2909  0, 0, 0, 0, 0, 160, 161, 162, 163, 164,
2910  165, 166, 167, 168, 288, 289, 169, 290, 0, 0,
2911  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2912  0, 0, 0, 0, 0, 170, 171, 172, 173, 174,
2913  175, 176, 177, 178, 0, 0, 179, 180, 0, 0,
2914  0, 0, 181, 182, 183, 184, 0, 0, 0, 0,
2915  0, 0, 0, 0, 0, 0, 0, 185, 186, 0,
2916  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2917  0, 0, 0, 0, 0, 0, 0, 0, 0, 187,
2918  188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
2919  197, 198, 0, 0, 0, 0, 0, 199, 126, 127,
2920  128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
2921  138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
2922  148, 149, 0, 0, 0, 150, 151, 152, 153, 154,
2923  155, 156, 157, 158, 159, 0, 0, 0, 0, 0,
2924  160, 161, 162, 163, 164, 165, 166, 167, 168, 239,
2925  0, 169, 0, 0, 0, 0, 0, 0, 0, 0,
2926  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2927  170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
2928  0, 179, 180, 0, 0, 0, 0, 181, 182, 183,
2929  184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2930  0, 0, 185, 186, 0, 0, 59, 0, 0, 0,
2931  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2932  0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
2933  193, 194, 195, 196, 0, 197, 198, 0, 0, 0,
2934  0, 0, 199, 126, 127, 128, 129, 130, 131, 132,
2935  133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
2936  143, 144, 145, 146, 147, 148, 149, 0, 0, 0,
2937  150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
2938  0, 0, 0, 0, 0, 160, 161, 162, 163, 164,
2939  165, 166, 167, 168, 0, 0, 169, 0, 0, 0,
2940  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2941  0, 0, 0, 0, 0, 170, 171, 172, 173, 174,
2942  175, 176, 177, 178, 0, 0, 179, 180, 0, 0,
2943  0, 0, 181, 182, 183, 184, 0, 0, 0, 0,
2944  0, 0, 0, 0, 0, 0, 0, 185, 186, 0,
2945  0, 59, 0, 0, 0, 0, 0, 0, 0, 0,
2946  0, 0, 0, 0, 0, 0, 0, 0, 0, 187,
2947  188, 189, 190, 191, 192, 193, 194, 195, 196, 0,
2948  197, 198, 0, 0, 0, 0, 0, 199, 126, 127,
2949  128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
2950  138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
2951  148, 149, 0, 0, 0, 150, 151, 152, 153, 154,
2952  155, 156, 157, 158, 159, 0, 0, 0, 0, 0,
2953  160, 161, 162, 163, 164, 165, 166, 167, 168, 0,
2954  0, 169, 0, 0, 0, 0, 0, 0, 0, 0,
2955  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2956  170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
2957  0, 179, 180, 0, 0, 0, 0, 181, 182, 183,
2958  184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2959  0, 0, 185, 186, 0, 0, 0, 0, 0, 0,
2960  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2961  0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
2962  193, 194, 195, 196, 0, 197, 198, 5, 6, 7,
2963  0, 9, 199, 0, 0, 10, 11, 0, 0, 0,
2964  12, 0, 13, 14, 15, 245, 246, 18, 19, 0,
2965  0, 0, 0, 0, 20, 247, 248, 23, 24, 25,
2966  26, 0, 0, 206, 0, 0, 0, 0, 0, 0,
2967  277, 0, 0, 32, 33, 34, 35, 36, 37, 38,
2968  39, 40, 0, 41, 42, 43, 44, 45, 46, 47,
2969  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2970  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2971  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2972  0, 0, 278, 0, 0, 209, 54, 0, 55, 56,
2973  0, 0, 0, 0, 58, 59, 60, 61, 62, 63,
2974  64, 65, 66, 0, 0, 0, 0, 0, 0, 0,
2975  0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
2976  9, 0, 0, 279, 10, 11, 0, 0, 0, 12,
2977  280, 13, 14, 15, 245, 246, 18, 19, 0, 0,
2978  0, 0, 0, 20, 247, 248, 23, 24, 25, 26,
2979  0, 0, 206, 0, 0, 0, 0, 0, 0, 277,
2980  0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
2981  40, 0, 41, 42, 43, 44, 45, 46, 47, 0,
2982  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2983  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2984  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2985  0, 278, 0, 0, 209, 54, 0, 55, 56, 0,
2986  0, 0, 0, 58, 59, 60, 61, 62, 63, 64,
2987  65, 66, 0, 0, 0, 0, 0, 0, 0, 0,
2988  0, 0, 0, 0, 0, 5, 6, 7, 8, 9,
2989  0, 0, 279, 10, 11, 0, 0, 0, 12, 526,
2990  13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
2991  0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
2992  0, 27, 0, 0, 0, 0, 0, 28, 29, 30,
2993  31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
2994  0, 41, 42, 43, 44, 45, 46, 47, 0, 0,
2995  0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
2996  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2997  0, 0, 50, 51, 0, 0, 0, 0, 0, 0,
2998  52, 0, 0, 53, 54, 0, 55, 56, 0, 57,
2999  0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
3000  66, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3001  0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
3002  11, 67, 68, 69, 12, 0, 13, 14, 15, 16,
3003  17, 18, 19, 0, 0, 0, 0, 0, 20, 21,
3004  22, 23, 24, 25, 26, 0, 0, 206, 0, 0,
3005  0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
3006  35, 36, 37, 38, 39, 40, 207, 41, 42, 43,
3007  44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
3008  0, 0, 0, 48, 49, 0, 0, 0, 0, 0,
3009  0, 0, 0, 0, 0, 0, 0, 0, 50, 51,
3010  0, 0, 0, 0, 0, 0, 208, 0, 0, 209,
3011  54, 0, 55, 56, 0, 210, 211, 212, 58, 59,
3012  213, 61, 62, 63, 64, 65, 66, 0, 0, 0,
3013  0, 0, 0, 0, 0, 0, 0, 5, 6, 7,
3014  8, 9, 0, 0, 0, 10, 11, 67, 214, 69,
3015  12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
3016  0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
3017  26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
3018  29, 0, 31, 32, 33, 34, 35, 36, 37, 38,
3019  39, 40, 0, 41, 42, 43, 44, 45, 46, 47,
3020  0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
3021  49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3022  0, 0, 0, 0, 50, 51, 0, 0, 0, 0,
3023  0, 0, 52, 0, 0, 53, 54, 0, 55, 56,
3024  0, 57, 0, 0, 58, 59, 60, 61, 62, 63,
3025  64, 65, 66, 0, 0, 0, 0, 0, 0, 0,
3026  0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
3027  0, 10, 11, 67, 68, 69, 12, 0, 13, 14,
3028  15, 16, 17, 18, 19, 0, 0, 0, 0, 0,
3029  20, 21, 22, 23, 24, 25, 26, 0, 0, 206,
3030  0, 0, 0, 0, 0, 0, 29, 0, 0, 32,
3031  33, 34, 35, 36, 37, 38, 39, 40, 207, 41,
3032  42, 43, 44, 45, 46, 47, 0, 0, 0, 0,
3033  0, 0, 0, 0, 0, 48, 49, 0, 0, 0,
3034  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3035  50, 439, 0, 0, 0, 0, 0, 0, 208, 0,
3036  0, 209, 54, 0, 55, 56, 0, 210, 211, 212,
3037  58, 59, 213, 61, 62, 63, 64, 65, 66, 0,
3038  0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
3039  6, 7, 0, 9, 0, 0, 0, 10, 11, 67,
3040  214, 69, 12, 0, 13, 14, 15, 245, 246, 18,
3041  19, 0, 0, 0, 0, 0, 20, 247, 248, 23,
3042  24, 25, 26, 0, 0, 206, 0, 0, 0, 0,
3043  0, 0, 29, 0, 0, 32, 33, 34, 35, 36,
3044  37, 38, 39, 40, 207, 41, 42, 43, 44, 45,
3045  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
3046  0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
3047  0, 0, 0, 0, 0, 0, 50, 51, 0, 0,
3048  0, 0, 0, 0, 208, 0, 0, 209, 54, 0,
3049  55, 56, 0, 620, 211, 212, 58, 59, 213, 61,
3050  62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
3051  0, 0, 0, 0, 0, 5, 6, 7, 0, 9,
3052  0, 0, 0, 10, 11, 67, 214, 69, 12, 0,
3053  13, 14, 15, 245, 246, 18, 19, 0, 0, 0,
3054  0, 0, 20, 247, 248, 23, 24, 25, 26, 0,
3055  0, 206, 0, 0, 0, 0, 0, 0, 29, 0,
3056  0, 32, 33, 34, 35, 36, 37, 38, 39, 40,
3057  207, 41, 42, 43, 44, 45, 46, 47, 0, 0,
3058  0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
3059  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3060  0, 0, 50, 51, 0, 0, 0, 0, 0, 0,
3061  208, 0, 0, 209, 54, 0, 55, 56, 0, 210,
3062  211, 0, 58, 59, 213, 61, 62, 63, 64, 65,
3063  66, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3064  0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
3065  11, 67, 214, 69, 12, 0, 13, 14, 15, 245,
3066  246, 18, 19, 0, 0, 0, 0, 0, 20, 247,
3067  248, 23, 24, 25, 26, 0, 0, 206, 0, 0,
3068  0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
3069  35, 36, 37, 38, 39, 40, 207, 41, 42, 43,
3070  44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
3071  0, 0, 0, 48, 49, 0, 0, 0, 0, 0,
3072  0, 0, 0, 0, 0, 0, 0, 0, 50, 51,
3073  0, 0, 0, 0, 0, 0, 208, 0, 0, 209,
3074  54, 0, 55, 56, 0, 0, 211, 212, 58, 59,
3075  213, 61, 62, 63, 64, 65, 66, 0, 0, 0,
3076  0, 0, 0, 0, 0, 0, 0, 5, 6, 7,
3077  0, 9, 0, 0, 0, 10, 11, 67, 214, 69,
3078  12, 0, 13, 14, 15, 245, 246, 18, 19, 0,
3079  0, 0, 0, 0, 20, 247, 248, 23, 24, 25,
3080  26, 0, 0, 206, 0, 0, 0, 0, 0, 0,
3081  29, 0, 0, 32, 33, 34, 35, 36, 37, 38,
3082  39, 40, 207, 41, 42, 43, 44, 45, 46, 47,
3083  0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
3084  49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3085  0, 0, 0, 0, 50, 51, 0, 0, 0, 0,
3086  0, 0, 208, 0, 0, 209, 54, 0, 55, 56,
3087  0, 620, 211, 0, 58, 59, 213, 61, 62, 63,
3088  64, 65, 66, 0, 0, 0, 0, 0, 0, 0,
3089  0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
3090  0, 10, 11, 67, 214, 69, 12, 0, 13, 14,
3091  15, 245, 246, 18, 19, 0, 0, 0, 0, 0,
3092  20, 247, 248, 23, 24, 25, 26, 0, 0, 206,
3093  0, 0, 0, 0, 0, 0, 29, 0, 0, 32,
3094  33, 34, 35, 36, 37, 38, 39, 40, 207, 41,
3095  42, 43, 44, 45, 46, 47, 0, 0, 0, 0,
3096  0, 0, 0, 0, 0, 48, 49, 0, 0, 0,
3097  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3098  50, 51, 0, 0, 0, 0, 0, 0, 208, 0,
3099  0, 209, 54, 0, 55, 56, 0, 0, 211, 0,
3100  58, 59, 213, 61, 62, 63, 64, 65, 66, 0,
3101  0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
3102  6, 7, 0, 9, 0, 0, 0, 10, 11, 67,
3103  214, 69, 12, 0, 13, 14, 15, 16, 17, 18,
3104  19, 0, 0, 0, 0, 0, 20, 21, 22, 23,
3105  24, 25, 26, 0, 0, 206, 0, 0, 0, 0,
3106  0, 0, 29, 0, 0, 32, 33, 34, 35, 36,
3107  37, 38, 39, 40, 0, 41, 42, 43, 44, 45,
3108  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
3109  0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
3110  0, 0, 0, 0, 0, 0, 50, 51, 0, 0,
3111  0, 0, 0, 0, 208, 0, 0, 209, 54, 0,
3112  55, 56, 0, 519, 0, 0, 58, 59, 60, 61,
3113  62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
3114  0, 0, 0, 0, 0, 5, 6, 7, 0, 9,
3115  0, 0, 0, 10, 11, 67, 214, 69, 12, 0,
3116  13, 14, 15, 245, 246, 18, 19, 0, 0, 0,
3117  0, 0, 20, 247, 248, 23, 24, 25, 26, 0,
3118  0, 206, 0, 0, 0, 0, 0, 0, 29, 0,
3119  0, 32, 33, 34, 35, 36, 37, 38, 39, 40,
3120  0, 41, 42, 43, 44, 45, 46, 47, 0, 0,
3121  0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
3122  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3123  0, 0, 50, 51, 0, 0, 0, 0, 0, 0,
3124  208, 0, 0, 209, 54, 0, 55, 56, 0, 770,
3125  0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
3126  66, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3127  0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
3128  11, 67, 214, 69, 12, 0, 13, 14, 15, 245,
3129  246, 18, 19, 0, 0, 0, 0, 0, 20, 247,
3130  248, 23, 24, 25, 26, 0, 0, 206, 0, 0,
3131  0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
3132  35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
3133  44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
3134  0, 0, 0, 48, 49, 0, 0, 0, 0, 0,
3135  0, 0, 0, 0, 0, 0, 0, 0, 50, 51,
3136  0, 0, 0, 0, 0, 0, 208, 0, 0, 209,
3137  54, 0, 55, 56, 0, 519, 0, 0, 58, 59,
3138  60, 61, 62, 63, 64, 65, 66, 0, 0, 0,
3139  0, 0, 0, 0, 0, 0, 0, 5, 6, 7,
3140  0, 9, 0, 0, 0, 10, 11, 67, 214, 69,
3141  12, 0, 13, 14, 15, 245, 246, 18, 19, 0,
3142  0, 0, 0, 0, 20, 247, 248, 23, 24, 25,
3143  26, 0, 0, 206, 0, 0, 0, 0, 0, 0,
3144  29, 0, 0, 32, 33, 34, 35, 36, 37, 38,
3145  39, 40, 0, 41, 42, 43, 44, 45, 46, 47,
3146  0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
3147  49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3148  0, 0, 0, 0, 50, 51, 0, 0, 0, 0,
3149  0, 0, 208, 0, 0, 209, 54, 0, 55, 56,
3150  0, 843, 0, 0, 58, 59, 60, 61, 62, 63,
3151  64, 65, 66, 0, 0, 0, 0, 0, 0, 0,
3152  0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
3153  0, 10, 11, 67, 214, 69, 12, 0, 13, 14,
3154  15, 245, 246, 18, 19, 0, 0, 0, 0, 0,
3155  20, 247, 248, 23, 24, 25, 26, 0, 0, 206,
3156  0, 0, 0, 0, 0, 0, 29, 0, 0, 32,
3157  33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
3158  42, 43, 44, 45, 46, 47, 0, 0, 0, 0,
3159  0, 0, 0, 0, 0, 48, 49, 0, 0, 0,
3160  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3161  50, 51, 0, 0, 0, 0, 0, 0, 208, 0,
3162  0, 209, 54, 0, 55, 56, 0, 1012, 0, 0,
3163  58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
3164  0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
3165  6, 7, 0, 9, 0, 0, 0, 10, 11, 67,
3166  214, 69, 12, 0, 13, 14, 15, 245, 246, 18,
3167  19, 0, 0, 0, 0, 0, 20, 247, 248, 23,
3168  24, 25, 26, 0, 0, 206, 0, 0, 0, 0,
3169  0, 0, 29, 0, 0, 32, 33, 34, 35, 36,
3170  37, 38, 39, 40, 0, 41, 42, 43, 44, 45,
3171  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
3172  0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
3173  0, 0, 0, 0, 0, 0, 50, 51, 0, 0,
3174  0, 0, 0, 0, 208, 0, 0, 209, 54, 0,
3175  55, 56, 0, 0, 0, 0, 58, 59, 60, 61,
3176  62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
3177  0, 0, 0, 0, 0, 5, 6, 7, 0, 9,
3178  0, 0, 0, 10, 11, 67, 214, 69, 12, 0,
3179  13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
3180  0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
3181  0, 206, 0, 0, 0, 0, 0, 0, 29, 0,
3182  0, 32, 33, 34, 35, 36, 37, 38, 39, 40,
3183  0, 41, 42, 43, 44, 45, 46, 47, 0, 0,
3184  0, 0, 0, 0, 0, 0, 0, 48, 49, 0,
3185  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3186  0, 0, 50, 51, 0, 0, 0, 0, 0, 0,
3187  208, 0, 0, 209, 54, 0, 55, 56, 0, 0,
3188  0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
3189  66, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3190  0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
3191  11, 67, 214, 69, 12, 0, 13, 14, 15, 16,
3192  17, 18, 19, 0, 0, 0, 0, 0, 20, 21,
3193  22, 23, 24, 25, 26, 0, 0, 27, 0, 0,
3194  0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
3195  35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
3196  44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
3197  0, 0, 0, 48, 49, 0, 0, 0, 0, 0,
3198  0, 0, 0, 0, 0, 0, 0, 0, 50, 51,
3199  0, 0, 0, 0, 0, 0, 208, 0, 0, 209,
3200  54, 0, 55, 56, 0, 0, 0, 0, 58, 59,
3201  60, 61, 62, 63, 64, 65, 66, 0, 0, 0,
3202  0, 0, 0, 0, 0, 0, 0, 5, 6, 7,
3203  0, 9, 0, 0, 0, 10, 11, 67, 68, 69,
3204  12, 0, 13, 14, 15, 245, 246, 18, 19, 0,
3205  0, 0, 0, 0, 20, 247, 248, 23, 24, 25,
3206  26, 0, 0, 206, 0, 0, 0, 0, 0, 0,
3207  277, 0, 0, 32, 33, 34, 35, 36, 37, 38,
3208  39, 40, 0, 41, 42, 43, 44, 45, 46, 47,
3209  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3210  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3211  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3212  0, 0, 278, 0, 0, 328, 54, 0, 55, 56,
3213  0, 329, 0, 0, 58, 59, 60, 61, 62, 63,
3214  64, 65, 66, 0, 0, 0, 0, 0, 0, 5,
3215  6, 7, 0, 9, 0, 0, 0, 10, 11, 0,
3216  0, 0, 12, 279, 13, 14, 15, 245, 246, 18,
3217  19, 0, 0, 0, 0, 0, 20, 247, 248, 23,
3218  24, 25, 26, 0, 0, 206, 0, 0, 0, 0,
3219  0, 0, 277, 0, 0, 32, 33, 34, 35, 36,
3220  37, 38, 39, 40, 0, 41, 42, 43, 44, 45,
3221  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
3222  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3223  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3224  0, 0, 0, 0, 376, 0, 0, 53, 54, 0,
3225  55, 56, 0, 57, 0, 0, 58, 59, 60, 61,
3226  62, 63, 64, 65, 66, 0, 0, 0, 0, 0,
3227  0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
3228  11, 0, 0, 0, 12, 279, 13, 14, 15, 245,
3229  246, 18, 19, 0, 0, 0, 0, 0, 20, 247,
3230  248, 23, 24, 25, 26, 0, 0, 206, 0, 0,
3231  0, 0, 0, 0, 277, 0, 0, 32, 33, 34,
3232  384, 36, 37, 38, 385, 40, 0, 41, 42, 43,
3233  44, 45, 46, 47, 0, 0, 0, 0, 0, 0,
3234  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3235  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3236  0, 0, 386, 0, 0, 0, 387, 0, 0, 209,
3237  54, 0, 55, 56, 0, 0, 0, 0, 58, 59,
3238  60, 61, 62, 63, 64, 65, 66, 0, 0, 0,
3239  0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
3240  0, 10, 11, 0, 0, 0, 12, 279, 13, 14,
3241  15, 245, 246, 18, 19, 0, 0, 0, 0, 0,
3242  20, 247, 248, 23, 24, 25, 26, 0, 0, 206,
3243  0, 0, 0, 0, 0, 0, 277, 0, 0, 32,
3244  33, 34, 384, 36, 37, 38, 385, 40, 0, 41,
3245  42, 43, 44, 45, 46, 47, 0, 0, 0, 0,
3246  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3247  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3248  0, 0, 0, 0, 0, 0, 0, 0, 387, 0,
3249  0, 209, 54, 0, 55, 56, 0, 0, 0, 0,
3250  58, 59, 60, 61, 62, 63, 64, 65, 66, 0,
3251  0, 0, 0, 0, 0, 5, 6, 7, 0, 9,
3252  0, 0, 0, 10, 11, 0, 0, 0, 12, 279,
3253  13, 14, 15, 245, 246, 18, 19, 0, 0, 0,
3254  0, 0, 20, 247, 248, 23, 24, 25, 26, 0,
3255  0, 206, 0, 0, 0, 0, 0, 0, 277, 0,
3256  0, 32, 33, 34, 35, 36, 37, 38, 39, 40,
3257  0, 41, 42, 43, 44, 45, 46, 47, 0, 0,
3258  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3259  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3260  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3261  278, 0, 0, 328, 54, 0, 55, 56, 0, 0,
3262  0, 0, 58, 59, 60, 61, 62, 63, 64, 65,
3263  66, 0, 0, 0, 0, 0, 0, 5, 6, 7,
3264  0, 9, 0, 0, 0, 10, 11, 0, 0, 0,
3265  12, 279, 13, 14, 15, 245, 246, 18, 19, 0,
3266  0, 0, 0, 0, 20, 247, 248, 23, 24, 25,
3267  26, 0, 0, 206, 0, 0, 0, 0, 0, 0,
3268  277, 0, 0, 32, 33, 34, 35, 36, 37, 38,
3269  39, 40, 0, 41, 42, 43, 44, 45, 46, 47,
3270  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3271  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3272  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3273  0, 0, 1002, 0, 0, 209, 54, 0, 55, 56,
3274  0, 0, 0, 0, 58, 59, 60, 61, 62, 63,
3275  64, 65, 66, 0, 0, 0, 0, 0, 0, 5,
3276  6, 7, 0, 9, 0, 0, 0, 10, 11, 0,
3277  0, 0, 12, 279, 13, 14, 15, 245, 246, 18,
3278  19, 0, 0, 0, 0, 0, 20, 247, 248, 23,
3279  24, 25, 26, 0, 0, 206, 0, 0, 0, 0,
3280  0, 0, 277, 0, 0, 32, 33, 34, 35, 36,
3281  37, 38, 39, 40, 0, 41, 42, 43, 44, 45,
3282  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
3283  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3284  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3285  0, 0, 0, 0, 1054, 0, 0, 209, 54, 0,
3286  55, 56, 23, 24, 25, 26, 58, 59, 60, 61,
3287  62, 63, 64, 65, 66, 0, 0, 0, 32, 33,
3288  34, 781, 0, 0, 0, 782, 0, 980, 41, 42,
3289  43, 44, 45, 0, 0, 279, 0, 0, 0, 0,
3290  0, 0, 0, 0, 0, 0, 921, 0, 0, 0,
3291  0, 0, 0, 0, 0, 0, 0, 0, 0, 783,
3292  784, 0, 0, 0, 0, 0, 0, 785, 0, 0,
3293  786, 0, 0, 787, 788, 0, 974, 925, 0, 789,
3294  59, 997, 61, 62, 63, 64, 65, 66, 23, 24,
3295  25, 26, 0, 0, 0, 0, 0, 0, 0, 0,
3296  0, 790, 0, 0, 32, 33, 34, 781, 279, 0,
3297  0, 782, 0, 0, 41, 42, 43, 44, 45, 0,
3298  0, 23, 24, 25, 26, 0, 0, 0, 0, 0,
3299  0, 0, 0, 0, 0, 0, 0, 32, 33, 34,
3300  781, 0, 0, 0, 782, 783, 784, 41, 42, 43,
3301  44, 45, 0, 785, 0, 0, 786, 0, 0, 787,
3302  788, 0, 1069, 0, 0, 789, 59, 60, 61, 62,
3303  63, 64, 65, 66, 0, 0, 0, 0, 783, 784,
3304  0, 0, 0, 0, 0, 0, 785, 790, 0, 786,
3305  0, 0, 787, 788, 279, 0, 0, 0, 789, 59,
3306  60, 61, 62, 63, 64, 65, 66, 564, 565, 0,
3307  0, 566, 0, 0, 0, 0, 0, 0, 0, 0,
3308  790, 0, 0, 0, 0, 0, 0, 279, 0, 0,
3309  170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
3310  0, 179, 180, 0, 0, 0, 0, 181, 182, 183,
3311  184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3312  0, 0, 185, 186, 0, 0, 0, 0, 0, 0,
3313  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3314  0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
3315  193, 194, 195, 196, 0, 197, 198, 572, 573, 0,
3316  0, 574, 199, 233, 0, 0, 0, 0, 0, 0,
3317  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3318  170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
3319  0, 179, 180, 0, 0, 0, 0, 181, 182, 183,
3320  184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3321  0, 0, 185, 186, 0, 0, 0, 0, 0, 0,
3322  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3323  0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
3324  193, 194, 195, 196, 0, 197, 198, 624, 565, 0,
3325  0, 625, 199, 233, 0, 0, 0, 0, 0, 0,
3326  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3327  170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
3328  0, 179, 180, 0, 0, 0, 0, 181, 182, 183,
3329  184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3330  0, 0, 185, 186, 0, 0, 0, 0, 0, 0,
3331  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3332  0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
3333  193, 194, 195, 196, 0, 197, 198, 627, 573, 0,
3334  0, 628, 199, 233, 0, 0, 0, 0, 0, 0,
3335  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3336  170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
3337  0, 179, 180, 0, 0, 0, 0, 181, 182, 183,
3338  184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3339  0, 0, 185, 186, 0, 0, 0, 0, 0, 0,
3340  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3341  0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
3342  193, 194, 195, 196, 0, 197, 198, 652, 565, 0,
3343  0, 653, 199, 233, 0, 0, 0, 0, 0, 0,
3344  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3345  170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
3346  0, 179, 180, 0, 0, 0, 0, 181, 182, 183,
3347  184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3348  0, 0, 185, 186, 0, 0, 0, 0, 0, 0,
3349  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3350  0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
3351  193, 194, 195, 196, 0, 197, 198, 655, 573, 0,
3352  0, 656, 199, 233, 0, 0, 0, 0, 0, 0,
3353  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3354  170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
3355  0, 179, 180, 0, 0, 0, 0, 181, 182, 183,
3356  184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3357  0, 0, 185, 186, 0, 0, 0, 0, 0, 0,
3358  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3359  0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
3360  193, 194, 195, 196, 0, 197, 198, 722, 565, 0,
3361  0, 723, 199, 233, 0, 0, 0, 0, 0, 0,
3362  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3363  170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
3364  0, 179, 180, 0, 0, 0, 0, 181, 182, 183,
3365  184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3366  0, 0, 185, 186, 0, 0, 0, 0, 0, 0,
3367  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3368  0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
3369  193, 194, 195, 196, 0, 197, 198, 725, 573, 0,
3370  0, 726, 199, 233, 0, 0, 0, 0, 0, 0,
3371  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3372  170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
3373  0, 179, 180, 0, 0, 0, 0, 181, 182, 183,
3374  184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3375  0, 0, 185, 186, 0, 0, 0, 0, 0, 0,
3376  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3377  0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
3378  193, 194, 195, 196, 0, 197, 198, 731, 565, 0,
3379  0, 732, 199, 233, 0, 0, 0, 0, 0, 0,
3380  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3381  170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
3382  0, 179, 180, 0, 0, 0, 0, 181, 182, 183,
3383  184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3384  0, 0, 185, 186, 0, 0, 0, 0, 0, 0,
3385  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3386  0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
3387  193, 194, 195, 196, 0, 197, 198, 609, 573, 0,
3388  0, 610, 199, 233, 0, 0, 0, 0, 0, 0,
3389  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3390  170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
3391  0, 179, 180, 0, 0, 0, 0, 181, 182, 183,
3392  184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3393  0, 0, 185, 186, 0, 0, 0, 0, 0, 0,
3394  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3395  0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
3396  193, 194, 195, 196, 0, 197, 198, 776, 565, 0,
3397  0, 777, 199, 233, 0, 0, 0, 0, 0, 0,
3398  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3399  170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
3400  0, 179, 180, 0, 0, 0, 0, 181, 182, 183,
3401  184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3402  0, 0, 185, 186, 0, 0, 0, 0, 0, 0,
3403  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3404  0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
3405  193, 194, 195, 196, 0, 197, 198, 779, 573, 0,
3406  0, 780, 199, 233, 0, 0, 0, 0, 0, 0,
3407  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3408  170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
3409  0, 179, 180, 0, 0, 0, 0, 181, 182, 183,
3410  184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3411  0, 0, 185, 186, 0, 0, 0, 0, 0, 0,
3412  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3413  0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
3414  193, 194, 195, 196, 0, 197, 198, 1152, 565, 0,
3415  0, 1153, 199, 233, 0, 0, 0, 0, 0, 0,
3416  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3417  170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
3418  0, 179, 180, 0, 0, 0, 0, 181, 182, 183,
3419  184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3420  0, 0, 185, 186, 0, 0, 0, 0, 0, 0,
3421  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3422  0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
3423  193, 194, 195, 196, 0, 197, 198, 1155, 573, 0,
3424  0, 1156, 199, 233, 0, 0, 0, 0, 0, 0,
3425  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3426  170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
3427  0, 179, 180, 0, 0, 0, 0, 181, 182, 183,
3428  184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3429  0, 0, 185, 186, 0, 0, 0, 0, 0, 0,
3430  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3431  0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
3432  193, 194, 195, 196, 0, 197, 198, 1186, 565, 0,
3433  0, 1187, 199, 233, 0, 0, 0, 0, 0, 0,
3434  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3435  170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
3436  0, 179, 180, 0, 0, 0, 0, 181, 182, 183,
3437  184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3438  0, 0, 185, 186, 0, 0, 0, 0, 0, 0,
3439  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3440  0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
3441  193, 194, 195, 196, 0, 197, 198, 609, 573, 0,
3442  0, 610, 199, 233, 0, 0, 0, 0, 0, 0,
3443  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3444  170, 171, 172, 173, 174, 175, 176, 177, 178, 0,
3445  0, 179, 180, 0, 0, 0, 0, 181, 182, 183,
3446  184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3447  0, 0, 185, 186, 0, 0, 0, 0, 0, 0,
3448  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3449  0, 0, 0, 0, 187, 188, 189, 190, 191, 192,
3450  193, 194, 195, 196, 0, 197, 198, 0, 0, 0,
3451  0, 0, 199
3452 };
3453 
3454 static const yytype_int16 yycheck[] =
3455 {
3456  2, 60, 53, 89, 369, 71, 102, 83, 8, 22,
3457  710, 8, 16, 17, 28, 101, 59, 331, 227, 717,
3458  16, 17, 94, 91, 92, 387, 4, 95, 28, 95,
3459  482, 28, 57, 626, 2, 271, 4, 433, 57, 275,
3460  67, 892, 893, 71, 363, 1064, 365, 26, 16, 17,
3461  27, 55, 29, 55, 56, 1026, 99, 364, 83, 59,
3462  92, 654, 603, 95, 27, 78, 295, 296, 1037, 1060,
3463  68, 96, 97, 98, 526, 1102, 13, 473, 25, 53,
3464  1104, 1052, 25, 957, 259, 53, 54, 1142, 95, 57,
3465  52, 1146, 411, 414, 415, 15, 100, 0, 689, 99,
3466  68, 77, 25, 331, 100, 25, 25, 148, 99, 428,
3467  143, 430, 153, 892, 893, 83, 68, 2, 13, 4,
3468  126, 13, 429, 91, 92, 941, 942, 95, 96, 97,
3469  98, 724, 100, 37, 38, 126, 222, 16, 17, 458,
3470  146, 734, 425, 1198, 96, 97, 56, 963, 964, 965,
3471  433, 25, 29, 328, 213, 22, 857, 151, 209, 153,
3472  136, 137, 138, 864, 143, 251, 485, 66, 236, 54,
3473  238, 153, 1046, 16, 17, 1194, 9, 484, 25, 1206,
3474  28, 1205, 15, 126, 146, 778, 414, 415, 151, 730,
3475  153, 1182, 866, 244, 787, 261, 13, 283, 1167, 146,
3476  13, 1172, 25, 146, 280, 148, 149, 66, 259, 146,
3477  153, 78, 55, 56, 151, 52, 153, 100, 1189, 221,
3478  119, 100, 518, 146, 152, 227, 230, 146, 232, 148,
3479  682, 233, 1011, 261, 230, 444, 232, 233, 600, 635,
3480  242, 209, 310, 311, 312, 313, 123, 315, 316, 153,
3481  866, 952, 279, 148, 261, 280, 151, 100, 153, 151,
3482  119, 153, 230, 146, 232, 233, 977, 143, 236, 498,
3483  238, 500, 146, 592, 242, 26, 244, 328, 310, 311,
3484  312, 313, 578, 602, 591, 259, 877, 878, 584, 257,
3485  586, 259, 236, 379, 601, 152, 1112, 890, 152, 146,
3486  277, 892, 893, 371, 329, 13, 100, 373, 849, 146,
3487  329, 1162, 280, 25, 1014, 856, 1014, 1133, 386, 370,
3488  264, 372, 326, 146, 268, 148, 52, 331, 326, 870,
3489  56, 309, 25, 331, 151, 148, 153, 13, 151, 371,
3490  153, 309, 310, 311, 312, 313, 314, 315, 316, 152,
3491  633, 230, 635, 232, 328, 25, 1067, 242, 326, 153,
3492  328, 329, 364, 331, 97, 365, 373, 686, 364, 688,
3493  691, 692, 257, 13, 783, 784, 697, 698, 1052, 126,
3494  687, 248, 249, 976, 13, 146, 1060, 230, 1062, 232,
3495  54, 705, 143, 112, 985, 100, 364, 148, 366, 99,
3496  64, 65, 370, 371, 372, 126, 482, 1000, 1001, 13,
3497  1026, 411, 145, 649, 623, 148, 414, 415, 386, 13,
3498  1011, 1037, 718, 785, 309, 721, 126, 429, 66, 314,
3499  430, 1142, 661, 429, 146, 1146, 1052, 666, 452, 735,
3500  442, 146, 444, 151, 1060, 153, 414, 415, 37, 38,
3501  526, 537, 452, 146, 99, 452, 684, 482, 458, 82,
3502  83, 429, 866, 691, 692, 855, 862, 857, 109, 697,
3503  698, 68, 25, 66, 864, 151, 146, 153, 887, 888,
3504  845, 119, 484, 121, 122, 485, 1197, 1198, 484, 146,
3505  923, 435, 133, 99, 148, 816, 440, 465, 365, 443,
3506  97, 526, 446, 146, 1045, 68, 129, 130, 1182, 56,
3507  1184, 151, 66, 153, 482, 1189, 484, 1191, 462, 585,
3508  126, 593, 151, 467, 153, 126, 119, 889, 121, 122,
3509  581, 124, 583, 898, 97, 1235, 604, 99, 903, 835,
3510  146, 750, 838, 68, 25, 841, 866, 151, 100, 153,
3511  150, 1167, 848, 153, 1228, 851, 569, 151, 526, 153,
3512  99, 1154, 952, 430, 577, 119, 1182, 121, 122, 146,
3513  638, 1162, 97, 126, 650, 577, 553, 579, 148, 862,
3514  1121, 525, 425, 1016, 1017, 68, 52, 126, 816, 591,
3515  56, 458, 592, 146, 571, 591, 149, 99, 611, 601,
3516  153, 68, 602, 617, 66, 601, 682, 146, 68, 611,
3517  68, 68, 148, 581, 97, 583, 912, 617, 485, 66,
3518  617, 623, 68, 591, 126, 650, 68, 470, 66, 34,
3519  97, 148, 25, 601, 68, 603, 604, 97, 96, 97,
3520  97, 643, 77, 739, 146, 126, 99, 52, 1052, 626,
3521  149, 97, 1056, 949, 153, 97, 1060, 682, 1062, 121,
3522  122, 729, 728, 97, 15, 146, 17, 881, 149, 1102,
3523  638, 1104, 153, 126, 121, 122, 727, 654, 892, 893,
3524  99, 119, 650, 121, 122, 687, 684, 145, 688, 694,
3525  152, 687, 68, 691, 692, 738, 701, 729, 149, 697,
3526  698, 705, 569, 705, 706, 152, 708, 126, 710, 1029,
3527  577, 679, 126, 34, 682, 683, 684, 689, 150, 687,
3528  96, 97, 144, 691, 692, 592, 1091, 146, 99, 697,
3529  698, 52, 1052, 126, 146, 602, 1056, 2, 738, 4,
3530  1060, 153, 1062, 99, 611, 58, 56, 724, 750, 66,
3531  67, 16, 17, 146, 99, 126, 149, 734, 26, 727,
3532  153, 729, 730, 146, 77, 767, 834, 769, 1087, 145,
3533  126, 77, 1205, 1206, 106, 642, 643, 828, 1182, 1086,
3534  1184, 126, 833, 66, 850, 1189, 146, 1191, 53, 54,
3535  633, 68, 736, 153, 679, 108, 66, 1011, 683, 112,
3536  68, 778, 834, 68, 121, 122, 99, 751, 68, 146,
3537  787, 783, 784, 99, 56, 1029, 867, 68, 816, 96,
3538  97, 688, 824, 1119, 1228, 151, 91, 92, 96, 97,
3539  95, 14, 15, 126, 56, 100, 96, 97, 121, 122,
3540  126, 124, 1056, 99, 25, 96, 97, 99, 816, 119,
3541  901, 121, 122, 26, 124, 99, 146, 130, 68, 910,
3542  828, 1075, 1182, 153, 1184, 833, 834, 149, 145, 1189,
3543  126, 1191, 897, 144, 126, 143, 10, 145, 40, 41,
3544  148, 849, 126, 1179, 950, 145, 96, 97, 856, 866,
3545  66, 77, 88, 89, 145, 68, 146, 148, 146, 867,
3546  146, 144, 870, 144, 44, 877, 878, 52, 1228, 54,
3547  55, 56, 57, 890, 886, 887, 888, 146, 1004, 146,
3548  892, 893, 981, 96, 97, 146, 68, 146, 44, 897,
3549  8, 99, 126, 901, 13, 145, 961, 939, 997, 941,
3550  942, 866, 910, 119, 209, 121, 122, 891, 134, 135,
3551  136, 137, 138, 68, 96, 97, 101, 1008, 126, 1010,
3552  25, 963, 964, 965, 17, 230, 144, 232, 233, 99,
3553  143, 236, 145, 238, 99, 148, 146, 242, 146, 244,
3554  957, 96, 97, 152, 128, 207, 930, 931, 210, 211,
3555  212, 68, 257, 961, 259, 152, 126, 1048, 150, 976,
3556  855, 126, 857, 145, 68, 977, 15, 1009, 68, 864,
3557  148, 866, 1014, 985, 146, 944, 146, 946, 131, 96,
3558  97, 146, 146, 1000, 1001, 144, 1051, 52, 866, 973,
3559  145, 68, 96, 97, 100, 131, 96, 97, 100, 1011,
3560  1008, 146, 1010, 126, 309, 310, 311, 312, 313, 314,
3561  315, 316, 52, 146, 998, 999, 26, 146, 66, 96,
3562  97, 326, 146, 328, 689, 146, 331, 52, 145, 1046,
3563  146, 1122, 52, 131, 68, 126, 1020, 1045, 146, 146,
3564  1048, 145, 151, 1051, 1086, 145, 1088, 1087, 1090, 146,
3565  1086, 146, 1160, 1161, 146, 1067, 144, 952, 68, 364,
3566  146, 366, 96, 97, 326, 370, 371, 372, 145, 331,
3567  1112, 119, 1037, 121, 122, 1040, 56, 68, 1086, 9,
3568  146, 386, 146, 414, 415, 131, 96, 97, 1160, 1161,
3569  56, 1133, 967, 968, 146, 1060, 146, 1062, 68, 146,
3570  431, 432, 146, 52, 146, 96, 97, 146, 149, 414,
3571  415, 145, 120, 1121, 1122, 146, 1100, 58, 783, 784,
3572  146, 148, 1139, 146, 429, 146, 96, 97, 459, 146,
3573  1142, 1026, 146, 143, 1146, 145, 77, 1154, 148, 1108,
3574  1109, 1232, 1037, 146, 146, 1114, 144, 1116, 148, 1118,
3575  1162, 1029, 1160, 1161, 145, 242, 1034, 1052, 146, 146,
3576  465, 465, 424, 425, 461, 1060, 98, 108, 109, 96,
3577  87, 433, 611, 706, 1052, 145, 1016, 1090, 1056, 484,
3578  1087, 1102, 1060, 769, 1062, 1197, 1198, 54, 55, 866,
3579  57, 882, 133, 1235, 1194, 740, 514, 64, 65, 324,
3580  1235, 1011, 1167, 1075, 1169, 1075, 1075, 886, 470, 1174,
3581  884, 473, 877, 878, 1088, 1009, 105, 1182, 99, 1184,
3582  500, 886, 887, 888, 1232, 951, 1191, 892, 893, 2,
3583  52, 4, 54, 55, 56, 57, 855, 1029, 1207, 1208,
3584  1209, 1210, 1056, 16, 17, 52, 1052, 54, 55, 56,
3585  57, 58, 1026, 1128, 1129, -1, -1, 519, 1223, 1134,
3586  -1, 1136, 1137, 1228, 1233, 40, 41, 42, 43, 44,
3587  77, -1, 1167, -1, -1, -1, 581, -1, 583, 101,
3588  53, 54, -1, -1, 91, 107, 591, 1182, 52, -1,
3589  54, 55, 56, 57, 101, 68, 601, -1, 603, 604,
3590  107, 108, 109, -1, 1182, 52, 1184, 54, 55, 56,
3591  57, 1189, 977, 1191, -1, 689, -1, -1, 91, 92,
3592  985, -1, 95, -1, -1, -1, 133, 100, -1, 136,
3593  -1, -1, -1, 638, 59, 60, 61, 62, 1213, 1214,
3594  1215, 1216, -1, -1, -1, -1, 1011, 77, -1, -1,
3595  1228, -1, -1, -1, -1, -1, 618, -1, 620, 1234,
3596  691, 692, -1, -1, 94, 95, 697, 698, -1, -1,
3597  -1, 633, 77, 635, 679, -1, -1, -1, 683, 684,
3598  -1, -1, 687, -1, -1, -1, 691, 692, -1, 94,
3599  95, -1, 697, 698, -1, 52, -1, 54, 55, 56,
3600  57, 58, 1067, 133, 134, 135, 136, 137, 138, 783,
3601  784, -1, -1, -1, 745, 746, 678, 748, 749, -1,
3602  77, -1, 727, -1, 729, 730, 689, -1, -1, 134,
3603  135, 136, 137, 138, -1, -1, 209, -1, -1, -1,
3604  -1, -1, -1, 705, 101, -1, -1, -1, -1, -1,
3605  107, 108, 109, -1, -1, -1, -1, 230, 720, 232,
3606  233, -1, -1, 236, -1, 238, -1, -1, -1, 242,
3607  -1, 244, -1, -1, -1, -1, 133, 1142, -1, 136,
3608  -1, 1146, -1, -1, 257, 816, 259, -1, -1, -1,
3609  -1, 689, -1, -1, -1, -1, 153, 1162, -1, -1,
3610  -1, -1, -1, 877, 878, -1, -1, -1, 770, -1,
3611  -1, 816, 886, 887, 888, -1, -1, -1, 892, 893,
3612  783, 784, -1, 828, -1, 2, -1, 4, 833, 834,
3613  861, -1, 1197, 1198, -1, -1, 309, 310, 311, 312,
3614  313, 314, 315, 316, 849, -1, -1, -1, -1, -1,
3615  -1, 856, -1, 326, -1, 328, -1, -1, 331, -1,
3616  -1, -1, 867, -1, -1, 870, -1, -1, -1, -1,
3617  -1, -1, -1, -1, -1, -1, 53, 54, -1, -1,
3618  57, 843, -1, -1, -1, 783, 784, -1, -1, -1,
3619  -1, 364, -1, 366, -1, -1, 901, 370, 371, 372,
3620  862, -1, -1, 977, -1, 910, 83, -1, -1, -1,
3621  -1, 985, -1, 386, 877, 878, -1, -1, -1, 96,
3622  97, 98, 99, 886, 887, 888, -1, -1, -1, 892,
3623  893, -1, -1, -1, -1, -1, -1, 1011, -1, -1,
3624  -1, 414, 415, -1, -1, -1, -1, 909, -1, -1,
3625  -1, -1, -1, -1, -1, -1, 429, -1, -1, -1,
3626  52, -1, 54, 55, 56, 57, 58, -1, -1, -1,
3627  -1, -1, -1, -1, -1, 937, -1, -1, -1, 877,
3628  878, -1, -1, -1, -1, 77, -1, -1, 886, 887,
3629  888, -1, 465, 1067, 892, 893, -1, -1, -1, -1,
3630  -1, -1, -1, 1008, -1, 1010, -1, -1, -1, 101,
3631  -1, 484, -1, -1, 977, 107, 108, 109, -1, -1,
3632  -1, 52, 985, 54, 55, 56, 57, 58, -1, -1,
3633  -1, -1, 209, -1, -1, -1, -1, 25, -1, -1,
3634  1045, 133, -1, 1048, 136, -1, 77, -1, 1011, -1,
3635  1012, -1, -1, -1, -1, -1, 148, -1, -1, -1,
3636  -1, -1, -1, 1025, -1, 242, -1, 244, 1142, -1,
3637  101, -1, 1146, -1, -1, -1, 107, 108, 109, 977,
3638  257, 1086, 259, -1, -1, -1, -1, 985, 1162, 77,
3639  78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3640  88, 89, 133, 280, 1067, 136, 94, 95, 581, -1,
3641  583, -1, -1, 1011, -1, -1, 1121, 1122, 591, -1,
3642  -1, -1, -1, 1197, 1198, -1, -1, -1, 601, -1,
3643  603, 604, 309, -1, -1, -1, -1, 314, -1, 127,
3644  -1, 129, 130, 131, 132, 133, 134, 135, 136, 137,
3645  138, 328, 329, -1, -1, 1160, 1161, -1, -1, -1,
3646  -1, -1, -1, -1, -1, 638, -1, -1, -1, 1067,
3647  -1, -1, 52, -1, 54, 55, 56, 57, 58, 1142,
3648  -1, -1, -1, 1146, -1, -1, -1, -1, -1, 366,
3649  -1, -1, -1, 370, -1, 372, -1, 77, -1, 1162,
3650  -1, -1, -1, -1, -1, -1, 679, -1, -1, -1,
3651  683, 684, -1, -1, 687, 2, -1, 4, 691, 692,
3652  -1, 101, -1, -1, 697, 698, -1, 1232, 108, 109,
3653  -1, -1, -1, -1, 1197, 1198, -1, -1, -1, -1,
3654  -1, -1, -1, -1, 1142, -1, -1, -1, 1146, -1,
3655  -1, -1, -1, 133, 727, -1, 729, 730, 77, -1,
3656  -1, -1, -1, -1, 1162, -1, 53, 54, -1, -1,
3657  57, -1, -1, -1, -1, 94, 95, 2, -1, 4,
3658  -1, -1, -1, -1, -1, -1, -1, -1, 465, -1,
3659  -1, -1, -1, -1, -1, -1, 83, -1, -1, 1197,
3660  1198, -1, -1, -1, -1, 482, -1, -1, -1, 96,
3661  97, 98, 131, 132, 133, 134, 135, 136, 137, 138,
3662  -1, -1, -1, -1, -1, -1, -1, -1, 53, 54,
3663  -1, -1, 57, -1, -1, -1, -1, -1, -1, -1,
3664  -1, -1, -1, 816, -1, -1, -1, -1, -1, 526,
3665  -1, -1, -1, -1, -1, 828, -1, -1, 83, -1,
3666  833, 834, 33, 34, 35, 36, -1, -1, -1, -1,
3667  -1, 96, 97, 98, 99, -1, 849, -1, 49, 50,
3668  51, 52, -1, 856, -1, 56, -1, -1, 59, 60,
3669  61, 62, 63, -1, 867, -1, -1, 870, -1, -1,
3670  -1, -1, -1, -1, 581, -1, 583, -1, -1, -1,
3671  -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
3672  91, -1, 209, -1, -1, -1, 603, 98, 901, -1,
3673  101, -1, -1, 104, 105, -1, 107, 910, -1, 110,
3674  111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
3675  -1, -1, -1, -1, -1, 242, -1, 244, -1, -1,
3676  -1, 132, -1, -1, -1, 689, -1, -1, 139, -1,
3677  257, -1, 259, 650, -1, -1, -1, -1, -1, -1,
3678  -1, -1, -1, -1, 209, -1, -1, -1, -1, -1,
3679  -1, -1, -1, 280, -1, -1, -1, -1, -1, -1,
3680  -1, -1, 679, -1, -1, 682, 683, -1, -1, -1,
3681  -1, -1, 689, -1, -1, -1, 2, 242, 4, 244,
3682  -1, -1, 309, -1, -1, -1, -1, 314, -1, -1,
3683  -1, -1, 257, -1, 259, 1008, -1, 1010, -1, -1,
3684  -1, 328, 329, -1, 331, -1, -1, -1, -1, -1,
3685  727, -1, -1, 730, -1, 280, -1, -1, -1, 783,
3686  784, -1, -1, -1, -1, -1, -1, 53, 54, -1,
3687  -1, -1, 1045, -1, -1, 1048, -1, -1, -1, 366,
3688  -1, -1, -1, 370, 309, 372, -1, -1, -1, 314,
3689  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3690  -1, -1, -1, 328, 329, -1, 783, 784, -1, -1,
3691  96, -1, -1, 1086, -1, -1, -1, -1, -1, -1,
3692  -1, -1, -1, -1, -1, -1, -1, 414, 415, -1,
3693  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3694  -1, 366, -1, -1, -1, 370, -1, 372, 1121, 1122,
3695  -1, 828, -1, 877, 878, -1, 833, -1, -1, -1,
3696  -1, -1, 886, 887, 888, -1, -1, -1, 892, 893,
3697  -1, -1, 849, -1, -1, -1, -1, -1, 465, 856,
3698  -1, -1, -1, -1, -1, -1, -1, 1160, 1161, -1,
3699  867, -1, -1, 870, -1, 482, -1, -1, -1, -1,
3700  877, 878, -1, -1, -1, -1, -1, -1, -1, 886,
3701  887, 888, -1, -1, -1, 892, 893, -1, -1, -1,
3702  897, -1, -1, 209, 901, -1, -1, -1, -1, -1,
3703  -1, -1, -1, 910, -1, -1, -1, -1, -1, 526,
3704  465, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3705  -1, -1, 2, 977, 4, -1, 242, 482, 244, 1232,
3706  -1, 985, -1, -1, -1, -1, -1, -1, -1, -1,
3707  -1, 257, -1, 259, -1, -1, -1, -1, -1, -1,
3708  -1, -1, -1, -1, 961, -1, -1, 1011, -1, -1,
3709  -1, -1, -1, -1, 581, -1, 583, -1, -1, -1,
3710  977, 526, -1, 53, 54, -1, -1, -1, 985, -1,
3711  -1, -1, -1, -1, -1, -1, 603, -1, -1, -1,
3712  -1, -1, -1, 309, -1, -1, -1, -1, 314, -1,
3713  -1, 1008, -1, 1010, 1011, -1, -1, -1, -1, -1,
3714  -1, -1, 328, 1067, -1, 331, -1, -1, -1, -1,
3715  -1, -1, -1, -1, -1, -1, 581, -1, 583, -1,
3716  -1, -1, -1, 650, -1, -1, -1, -1, 1045, -1,
3717  -1, 1048, 659, -1, 1051, -1, -1, -1, 603, -1,
3718  366, -1, -1, -1, 370, -1, 372, -1, -1, -1,
3719  1067, -1, 679, -1, -1, 682, 683, 684, -1, -1,
3720  -1, -1, -1, -1, 691, 692, -1, -1, -1, -1,
3721  697, 698, -1, -1, -1, -1, -1, -1, 1142, -1,
3722  -1, -1, 1146, -1, -1, 650, -1, -1, 414, 415,
3723  -1, -1, -1, -1, 33, 34, 35, 36, 1162, -1,
3724  727, -1, -1, 730, 1121, 1122, -1, -1, -1, -1,
3725  49, 50, 51, -1, 679, -1, -1, 682, 683, 209,
3726  59, 60, 61, 62, 63, 1142, -1, -1, -1, 1146,
3727  -1, -1, -1, 1197, 1198, -1, -1, -1, -1, 465,
3728  -1, -1, -1, -1, -1, 1162, -1, -1, -1, -1,
3729  -1, -1, 242, -1, 244, -1, -1, -1, -1, -1,
3730  -1, -1, 727, -1, -1, 730, -1, 257, -1, 259,
3731  -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
3732  1197, 1198, -1, -1, -1, -1, -1, -1, -1, 816,
3733  -1, -1, -1, 77, 78, 79, 80, 81, 82, 83,
3734  139, 828, 86, 87, -1, -1, 833, -1, -1, -1,
3735  94, 95, -1, -1, -1, 1232, -1, -1, -1, 309,
3736  -1, -1, 849, -1, 314, -1, -1, -1, 689, 856,
3737  -1, -1, -1, -1, -1, -1, -1, -1, 328, -1,
3738  867, 331, -1, 870, -1, 129, 130, 131, 132, 133,
3739  134, 135, 136, 137, 138, 581, -1, 583, -1, -1,
3740  -1, -1, -1, 828, -1, -1, -1, -1, 833, -1,
3741  897, -1, -1, -1, 901, -1, 366, 603, -1, -1,
3742  370, -1, 372, 910, 849, -1, -1, -1, -1, -1,
3743  -1, 856, -1, -1, -1, -1, -1, -1, -1, -1,
3744  689, -1, 867, -1, -1, 870, -1, -1, -1, -1,
3745  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3746  -1, -1, 783, 784, 414, 415, -1, -1, -1, -1,
3747  -1, -1, 897, -1, 961, -1, 901, -1, -1, -1,
3748  -1, -1, -1, -1, -1, 910, -1, -1, -1, -1,
3749  -1, -1, -1, 679, -1, -1, -1, 683, 684, -1,
3750  -1, -1, -1, -1, -1, 691, 692, -1, -1, -1,
3751  -1, 697, 698, -1, -1, 465, -1, -1, -1, -1,
3752  -1, 1008, -1, 1010, -1, -1, -1, -1, -1, -1,
3753  -1, -1, -1, -1, 783, 784, 961, -1, -1, -1,
3754  -1, 727, -1, -1, 730, 77, 78, 79, 80, 81,
3755  82, 83, 84, -1, 86, 87, 877, 878, 1045, -1,
3756  -1, 1048, 94, 95, 1051, 886, 887, 888, -1, -1,
3757  -1, 892, 893, -1, -1, -1, -1, -1, -1, -1,
3758  -1, -1, -1, 1008, -1, 1010, -1, -1, -1, -1,
3759  -1, -1, -1, -1, -1, -1, -1, 129, 130, 131,
3760  132, 133, 134, 135, 136, 137, 138, -1, -1, -1,
3761  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3762  1045, -1, -1, 1048, -1, -1, 1051, -1, 877, 878,
3763  816, 581, -1, 583, 1121, 1122, -1, 886, 887, 888,
3764  -1, -1, 828, 892, 893, -1, -1, 833, -1, -1,
3765  -1, -1, -1, 603, 16, 17, 977, -1, -1, -1,
3766  -1, -1, -1, 849, 985, -1, -1, -1, -1, -1,
3767  856, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3768  -1, 867, -1, -1, 870, -1, 48, 49, 50, 51,
3769  1011, -1, -1, 55, 56, -1, 1121, 1122, -1, -1,
3770  -1, -1, -1, -1, -1, -1, 68, 69, -1, -1,
3771  -1, 897, -1, -1, -1, 901, -1, -1, -1, -1,
3772  -1, -1, -1, -1, 910, -1, -1, -1, 977, 679,
3773  -1, -1, -1, 683, 684, -1, 985, -1, 100, -1,
3774  -1, 691, 692, -1, -1, 1232, 1067, 697, 698, -1,
3775  -1, -1, -1, -1, -1, -1, -1, -1, -1, 0,
3776  -1, -1, 1011, -1, -1, -1, -1, 8, 9, 10,
3777  -1, -1, 13, 14, 15, -1, 17, 727, -1, -1,
3778  730, -1, -1, -1, 25, 26, 27, -1, -1, -1,
3779  -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
3780  41, 42, 43, 44, -1, -1, -1, 1232, -1, -1,
3781  -1, -1, -1, -1, -1, -1, -1, -1, 1067, -1,
3782  -1, 1142, 1008, -1, 1010, 1146, -1, 68, -1, -1,
3783  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3784  -1, 1162, -1, -1, -1, 207, -1, -1, 210, 211,
3785  212, -1, 214, -1, -1, 96, 97, -1, -1, 1045,
3786  -1, -1, 1048, -1, -1, -1, 816, -1, 230, -1,
3787  232, 233, -1, -1, -1, -1, 1197, 1198, 828, 120,
3788  -1, -1, -1, 833, -1, -1, -1, -1, -1, -1,
3789  -1, -1, -1, 1142, -1, -1, -1, 1146, -1, 849,
3790  -1, -1, 143, 144, -1, -1, 856, 148, 149, -1,
3791  151, -1, 153, 1162, -1, -1, -1, 867, -1, -1,
3792  870, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3793  -1, -1, -1, -1, -1, 1121, 1122, -1, -1, -1,
3794  -1, -1, -1, -1, -1, -1, -1, -1, 1197, 1198,
3795  -1, 901, -1, -1, -1, -1, -1, -1, -1, -1,
3796  910, -1, -1, -1, 326, -1, -1, -1, -1, 331,
3797  -1, 333, 334, 335, 336, 337, -1, -1, 340, 341,
3798  342, 343, 344, 345, 346, 347, 348, -1, -1, 351,
3799  352, 353, 354, 355, 356, 357, 358, 359, 360, -1,
3800  -1, -1, 364, -1, -1, -1, -1, -1, -1, -1,
3801  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3802  -1, -1, -1, -1, -1, -1, 77, 78, 79, 80,
3803  81, 82, 83, 84, 85, 86, 87, 88, 89, -1,
3804  -1, -1, -1, 94, 95, -1, 1232, -1, -1, -1,
3805  -1, -1, 414, 415, -1, -1, -1, -1, 1008, -1,
3806  1010, 423, 424, 425, -1, -1, -1, 429, -1, 431,
3807  432, 433, -1, -1, -1, -1, 127, 439, 129, 130,
3808  131, 132, 133, 134, 135, 136, 137, 138, -1, -1,
3809  -1, -1, 454, -1, -1, 1045, -1, 459, 1048, -1,
3810  -1, -1, 153, -1, -1, -1, -1, -1, 470, -1,
3811  -1, 473, -1, -1, -1, -1, -1, -1, -1, -1,
3812  -1, -1, 484, -1, -1, -1, -1, -1, -1, -1,
3813  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3814  502, 77, 78, 79, 80, 81, 82, 83, 84, 85,
3815  86, 87, 88, 89, -1, -1, -1, 519, 94, 95,
3816  -1, -1, -1, -1, -1, -1, 0, -1, -1, -1,
3817  -1, 1121, 1122, -1, 8, 9, 10, -1, -1, -1,
3818  14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
3819  -1, 25, 26, 129, 130, 131, 132, 133, 134, 135,
3820  136, 137, 138, 37, 38, -1, 40, 41, 42, 43,
3821  44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3822  -1, -1, -1, -1, -1, -1, -1, -1, -1, 591,
3823  -1, -1, -1, -1, 68, -1, -1, -1, -1, 601,
3824  -1, -1, -1, 77, 78, 79, 80, 81, 82, 83,
3825  84, 85, 86, 87, 88, 89, 618, -1, 620, -1,
3826  94, 95, 96, 97, -1, 99, -1, -1, -1, -1,
3827  -1, 633, -1, 635, -1, -1, -1, -1, -1, -1,
3828  -1, -1, 1232, -1, -1, -1, 120, -1, -1, -1,
3829  -1, -1, 126, 127, -1, 129, 130, 131, 132, 133,
3830  134, 135, 136, 137, 138, -1, -1, -1, -1, 143,
3831  144, 145, 146, -1, -1, 149, 678, 151, -1, 153,
3832  -1, -1, 684, 685, -1, 687, -1, -1, -1, 691,
3833  692, -1, -1, -1, -1, 697, 698, -1, 0, -1,
3834  -1, -1, -1, 705, -1, -1, 8, 9, 10, -1,
3835  -1, 13, 14, 15, -1, 17, -1, -1, 720, -1,
3836  -1, -1, -1, 25, -1, 27, 28, 29, -1, -1,
3837  -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
3838  42, 43, 44, 745, 746, -1, 748, 749, -1, -1,
3839  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3840  -1, -1, -1, -1, -1, -1, 68, -1, 770, -1,
3841  -1, -1, -1, -1, -1, 77, 78, 79, 80, 81,
3842  82, 83, 84, 85, 86, 87, 88, 89, -1, -1,
3843  -1, -1, 94, 95, 96, 97, -1, 99, 100, -1,
3844  -1, -1, -1, -1, 106, -1, -1, 809, -1, -1,
3845  -1, -1, -1, -1, 816, -1, -1, -1, 120, -1,
3846  -1, 123, -1, -1, 126, 127, 128, 129, 130, 131,
3847  132, 133, 134, 135, 136, 137, 138, -1, -1, -1,
3848  -1, 843, 144, 145, 146, -1, -1, 149, 150, 151,
3849  -1, 153, -1, -1, -1, -1, -1, -1, -1, 861,
3850  862, -1, -1, 0, 1, -1, 3, 4, 5, 6,
3851  7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
3852  -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
3853  -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
3854  -1, -1, 39, -1, -1, -1, -1, 909, 45, 46,
3855  47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
3856  57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
3857  -1, -1, -1, -1, -1, 937, -1, -1, 75, 76,
3858  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3859  -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
3860  -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
3861  107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
3862  117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
3863  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3864  -1, -1, 139, 140, 141, -1, -1, -1, -1, -1,
3865  1012, 0, -1, -1, 151, -1, 153, -1, -1, 8,
3866  9, 10, -1, 1025, 13, 14, 15, -1, 17, -1,
3867  -1, -1, -1, -1, -1, -1, 25, 26, 27, 28,
3868  29, -1, -1, -1, -1, -1, -1, -1, 37, 38,
3869  -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
3870  -1, -1, -1, -1, -1, -1, -1, -1, 77, 78,
3871  79, 80, 81, 82, 83, -1, -1, 86, 87, 68,
3872  -1, -1, -1, -1, 1086, 94, 95, -1, 77, 78,
3873  79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
3874  89, -1, -1, -1, -1, 94, 95, 96, 97, -1,
3875  99, 100, -1, -1, -1, -1, -1, 106, -1, -1,
3876  129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
3877  -1, 120, -1, -1, 123, -1, -1, 126, 127, 128,
3878  129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
3879  -1, -1, -1, -1, 143, 144, 145, 146, 0, -1,
3880  149, 150, 151, -1, 153, -1, 8, 9, 10, -1,
3881  -1, 13, 14, 15, -1, 17, -1, -1, -1, -1,
3882  44, -1, -1, 25, -1, 27, 28, 29, -1, -1,
3883  -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
3884  42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
3885  -1, -1, -1, 77, 78, 79, 80, 81, 82, 83,
3886  84, 85, 86, 87, 88, 89, 68, -1, -1, -1,
3887  94, 95, -1, -1, -1, 77, 78, 79, 80, 81,
3888  82, 83, 84, 85, 86, 87, 88, 89, -1, -1,
3889  -1, -1, 94, 95, 96, 97, -1, 99, 100, -1,
3890  -1, -1, -1, 127, 106, 129, 130, 131, 132, 133,
3891  134, 135, 136, 137, 138, -1, -1, -1, 120, -1,
3892  -1, 123, 146, -1, 126, 127, 128, 129, 130, 131,
3893  132, 133, 134, 135, 136, 137, 138, -1, -1, -1,
3894  -1, -1, 144, 145, 146, 0, -1, 149, 150, 151,
3895  -1, 153, -1, 8, 9, 10, -1, -1, 13, 14,
3896  15, -1, 17, -1, -1, -1, -1, 44, -1, -1,
3897  25, 26, 27, 28, 29, -1, -1, -1, -1, -1,
3898  -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
3899  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3900  77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3901  87, 88, 89, 68, -1, -1, -1, 94, 95, -1,
3902  -1, -1, 77, 78, 79, 80, 81, 82, 83, 84,
3903  85, 86, 87, 88, 89, -1, -1, -1, -1, 94,
3904  95, 96, 97, -1, -1, 100, -1, -1, -1, -1,
3905  127, 106, 129, 130, 131, 132, 133, 134, 135, 136,
3906  137, 138, -1, -1, -1, 120, -1, -1, 123, -1,
3907  -1, -1, 127, 128, 129, 130, 131, 132, 133, 134,
3908  135, 136, 137, 138, -1, -1, -1, -1, 143, 144,
3909  145, 146, 0, -1, 149, 150, 151, -1, 153, -1,
3910  8, 9, 10, -1, -1, 13, 14, 15, -1, 17,
3911  -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
3912  28, 29, -1, -1, -1, -1, -1, -1, -1, 37,
3913  38, -1, 40, 41, 42, 43, 44, -1, -1, -1,
3914  -1, -1, -1, -1, -1, -1, -1, 77, 78, 79,
3915  80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
3916  68, -1, -1, -1, 94, 95, -1, -1, -1, 77,
3917  78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
3918  88, 89, -1, -1, -1, -1, 94, 95, 96, 97,
3919  -1, -1, 100, -1, -1, -1, -1, 127, 106, 129,
3920  130, 131, 132, 133, 134, 135, 136, 137, 138, -1,
3921  -1, -1, 120, -1, -1, 123, -1, -1, -1, 127,
3922  128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
3923  138, -1, -1, -1, -1, 143, 144, 145, 146, 0,
3924  -1, 149, 150, 151, -1, 153, -1, 8, 9, 10,
3925  -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
3926  -1, -1, -1, -1, 25, -1, 27, 28, 29, -1,
3927  -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
3928  41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
3929  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3930  -1, -1, -1, -1, -1, -1, -1, 68, -1, -1,
3931  -1, -1, -1, -1, -1, -1, 77, 78, 79, 80,
3932  81, 82, 83, 84, 85, 86, 87, 88, 89, -1,
3933  -1, -1, -1, 94, 95, 96, 97, -1, 99, 100,
3934  -1, -1, -1, -1, -1, 106, -1, -1, -1, -1,
3935  -1, -1, -1, -1, -1, -1, -1, -1, -1, 120,
3936  -1, -1, 123, -1, -1, 126, 127, 128, 129, 130,
3937  131, 132, 133, 134, 135, 136, 137, 138, -1, -1,
3938  -1, -1, -1, 144, 145, 146, 0, -1, 149, 150,
3939  151, -1, 153, -1, 8, 9, 10, -1, -1, 13,
3940  14, 15, -1, 17, -1, -1, -1, -1, -1, -1,
3941  -1, 25, 26, 27, 28, -1, -1, -1, -1, -1,
3942  -1, -1, -1, 37, 38, -1, 40, 41, 42, 43,
3943  44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3944  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3945  -1, -1, -1, -1, 68, -1, -1, -1, -1, -1,
3946  -1, -1, -1, 77, 78, 79, 80, 81, 82, 83,
3947  84, 85, 86, 87, 88, 89, -1, -1, -1, -1,
3948  94, 95, 96, 97, -1, -1, 100, -1, -1, -1,
3949  -1, -1, 106, -1, -1, -1, -1, -1, -1, -1,
3950  -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
3951  -1, -1, -1, 127, -1, 129, 130, 131, 132, 133,
3952  134, 135, 136, 137, 138, -1, -1, -1, -1, 143,
3953  144, 145, 146, 0, 148, 149, 150, 151, -1, 153,
3954  -1, 8, 9, 10, -1, -1, 13, 14, 15, -1,
3955  17, -1, -1, -1, -1, -1, -1, -1, 25, -1,
3956  27, 28, 29, -1, -1, -1, -1, -1, -1, -1,
3957  37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
3958  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3959  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3960  -1, 68, -1, -1, -1, -1, -1, -1, -1, -1,
3961  77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
3962  87, 88, 89, -1, -1, -1, -1, 94, 95, 96,
3963  97, -1, -1, 100, -1, -1, -1, -1, -1, 106,
3964  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3965  -1, -1, -1, 120, -1, -1, 123, -1, -1, -1,
3966  127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
3967  137, 138, -1, -1, -1, -1, -1, 144, 145, 146,
3968  0, -1, 149, 150, 151, -1, 153, -1, 8, 9,
3969  10, -1, -1, 13, 14, 15, -1, 17, -1, -1,
3970  -1, -1, -1, -1, -1, 25, 26, 27, 28, -1,
3971  -1, -1, -1, -1, -1, -1, -1, 37, 38, -1,
3972  40, 41, 42, 43, 44, -1, -1, -1, -1, -1,
3973  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3974  -1, -1, -1, -1, -1, -1, -1, -1, 68, -1,
3975  -1, -1, -1, -1, -1, -1, -1, 77, 78, 79,
3976  80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
3977  -1, -1, -1, -1, 94, 95, 96, 97, -1, -1,
3978  100, -1, -1, -1, -1, -1, 106, -1, -1, -1,
3979  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3980  120, -1, -1, -1, -1, -1, -1, 127, -1, 129,
3981  130, 131, 132, 133, 134, 135, 136, 137, 138, -1,
3982  -1, -1, -1, 143, 144, 145, 146, 0, 148, 149,
3983  150, 151, -1, 153, -1, 8, 9, 10, -1, -1,
3984  13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
3985  -1, -1, 25, -1, 27, 28, -1, -1, -1, -1,
3986  -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
3987  43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
3988  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3989  -1, -1, -1, -1, -1, 68, -1, -1, -1, -1,
3990  -1, -1, -1, -1, 77, 78, 79, 80, 81, 82,
3991  83, 84, 85, 86, 87, 88, 89, -1, -1, -1,
3992  -1, 94, 95, 96, 97, -1, -1, 100, -1, -1,
3993  -1, -1, -1, 106, -1, -1, -1, -1, -1, -1,
3994  -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
3995  -1, -1, -1, -1, 127, -1, 129, 130, 131, 132,
3996  133, 134, 135, 136, 137, 138, -1, -1, -1, -1,
3997  -1, 144, 145, 146, 0, 148, 149, 150, 151, -1,
3998  153, -1, 8, 9, 10, -1, -1, -1, 14, 15,
3999  -1, 17, -1, -1, -1, -1, -1, -1, -1, 25,
4000  26, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4001  -1, 37, 38, -1, 40, 41, 42, 43, 44, -1,
4002  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4003  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4004  -1, -1, 68, -1, -1, -1, -1, -1, -1, -1,
4005  -1, 77, 78, 79, 80, 81, 82, 83, 84, 85,
4006  86, 87, 88, 89, -1, -1, -1, -1, 94, 95,
4007  96, 97, -1, 99, -1, -1, -1, -1, -1, -1,
4008  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4009  -1, -1, -1, -1, 120, -1, -1, -1, -1, -1,
4010  126, 127, -1, 129, 130, 131, 132, 133, 134, 135,
4011  136, 137, 138, -1, -1, -1, -1, 143, 144, 145,
4012  146, 0, -1, 149, -1, 151, -1, 153, -1, 8,
4013  9, 10, -1, -1, -1, 14, 15, -1, 17, -1,
4014  -1, -1, -1, -1, -1, -1, 25, -1, -1, -1,
4015  -1, -1, -1, -1, -1, -1, -1, -1, 37, 38,
4016  -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
4017  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4018  -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
4019  -1, -1, -1, -1, -1, -1, -1, -1, 77, 78,
4020  79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
4021  89, -1, -1, -1, -1, 94, 95, 96, 97, -1,
4022  99, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4023  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4024  -1, 120, -1, -1, -1, -1, -1, 126, 127, -1,
4025  129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
4026  -1, -1, -1, -1, -1, 144, 145, 146, 0, -1,
4027  149, -1, 151, -1, 153, -1, 8, 9, 10, -1,
4028  -1, -1, 14, 15, -1, 17, -1, -1, -1, -1,
4029  -1, -1, -1, 25, -1, -1, -1, -1, -1, -1,
4030  -1, -1, -1, -1, -1, 37, 38, -1, 40, 41,
4031  42, 43, 44, -1, -1, -1, -1, -1, -1, -1,
4032  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4033  -1, -1, -1, -1, -1, -1, 68, -1, -1, -1,
4034  -1, -1, -1, -1, -1, 77, 78, 79, 80, 81,
4035  82, 83, 84, 85, 86, 87, 88, 89, -1, -1,
4036  -1, -1, 94, 95, 96, 97, -1, 99, -1, -1,
4037  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4038  -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
4039  -1, -1, -1, -1, 126, 127, -1, 129, 130, 131,
4040  132, 133, 134, 135, 136, 137, 138, -1, -1, -1,
4041  -1, -1, 144, 145, 146, -1, -1, 149, -1, 151,
4042  1, 153, 3, 4, 5, 6, 7, 8, 9, 10,
4043  11, 12, -1, -1, 15, 16, -1, 18, 19, 20,
4044  21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
4045  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4046  -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
4047  51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
4048  61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
4049  -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
4050  -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
4051  91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
4052  101, 102, -1, 104, 105, -1, 107, -1, -1, 110,
4053  111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
4054  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4055  -1, -1, -1, -1, -1, -1, -1, -1, 139, 140,
4056  141, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4057  151, 1, 153, 3, 4, 5, 6, 7, -1, -1,
4058  10, 11, 12, -1, 14, 15, 16, -1, 18, 19,
4059  20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
4060  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
4061  -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
4062  50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
4063  60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
4064  -1, -1, -1, -1, -1, 75, 76, -1, -1, -1,
4065  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4066  90, 91, -1, -1, -1, -1, -1, -1, 98, -1,
4067  -1, 101, 102, -1, 104, 105, -1, 107, -1, -1,
4068  110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
4069  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4070  -1, -1, -1, -1, -1, -1, -1, -1, -1, 139,
4071  140, 141, -1, -1, -1, -1, -1, -1, -1, -1,
4072  -1, 151, 1, 153, 3, 4, 5, 6, 7, -1,
4073  -1, 10, 11, 12, -1, -1, 15, 16, 17, 18,
4074  19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
4075  -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
4076  39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
4077  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
4078  59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
4079  -1, -1, -1, -1, -1, -1, 75, 76, -1, -1,
4080  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4081  -1, 90, 91, -1, -1, -1, -1, -1, -1, 98,
4082  -1, -1, 101, 102, -1, 104, 105, -1, 107, -1,
4083  -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
4084  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4085  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4086  139, 140, 141, -1, -1, -1, -1, -1, -1, -1,
4087  -1, -1, 151, 1, 153, 3, 4, 5, 6, 7,
4088  -1, -1, 10, 11, 12, -1, -1, 15, 16, -1,
4089  18, 19, 20, 21, 22, 23, 24, 25, -1, -1,
4090  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4091  -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
4092  48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4093  -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
4094  -1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
4095  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4096  -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
4097  98, -1, -1, 101, 102, -1, 104, 105, -1, 107,
4098  -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
4099  118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4100  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4101  -1, 139, 140, 141, -1, -1, -1, -1, -1, -1,
4102  -1, -1, -1, 151, 1, 153, 3, 4, 5, 6,
4103  7, -1, -1, 10, 11, 12, -1, -1, 15, 16,
4104  -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4105  -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4106  -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
4107  47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
4108  57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
4109  -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
4110  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4111  -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
4112  -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
4113  107, -1, -1, 110, 111, 112, 113, 114, 115, 116,
4114  117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
4115  1, -1, 3, 4, 5, 6, 7, -1, 9, 10,
4116  11, 12, 139, 140, 141, 16, -1, 18, 19, 20,
4117  21, 22, 23, 24, 151, -1, 153, -1, -1, 30,
4118  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4119  -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
4120  51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
4121  61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
4122  -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
4123  -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
4124  91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
4125  101, 102, -1, 104, 105, -1, 107, -1, -1, 110,
4126  111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
4127  -1, -1, -1, -1, -1, -1, 1, -1, 3, 4,
4128  5, 6, 7, -1, -1, -1, 11, 12, 139, 140,
4129  141, 16, -1, 18, 19, 20, 21, 22, 23, 24,
4130  151, -1, 153, -1, -1, 30, 31, 32, 33, 34,
4131  35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4132  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
4133  55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
4134  65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4135  75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
4136  -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
4137  -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
4138  105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
4139  115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
4140  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4141  -1, -1, -1, -1, 139, 140, 141, -1, -1, -1,
4142  -1, -1, -1, -1, 149, -1, 151, 1, 153, 3,
4143  4, 5, 6, 7, -1, -1, -1, 11, 12, -1,
4144  -1, -1, 16, -1, 18, 19, 20, 21, 22, 23,
4145  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
4146  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4147  -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
4148  54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
4149  64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
4150  -1, 75, 76, -1, -1, -1, -1, -1, -1, -1,
4151  -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
4152  -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
4153  104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
4154  114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
4155  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4156  -1, -1, -1, -1, -1, 139, 140, 141, -1, -1,
4157  -1, -1, -1, -1, -1, 149, -1, 151, 1, 153,
4158  3, 4, 5, 6, 7, -1, -1, -1, 11, 12,
4159  -1, -1, -1, 16, -1, 18, 19, 20, 21, 22,
4160  23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
4161  33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
4162  -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
4163  53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
4164  63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
4165  -1, -1, 75, 76, -1, -1, -1, -1, -1, -1,
4166  -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
4167  -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
4168  -1, 104, 105, -1, 107, -1, -1, 110, 111, 112,
4169  113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
4170  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4171  -1, -1, -1, -1, -1, -1, 139, 140, 141, -1,
4172  -1, 144, -1, -1, -1, -1, -1, -1, 151, 1,
4173  153, 3, 4, 5, 6, 7, -1, -1, -1, 11,
4174  12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
4175  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4176  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4177  -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
4178  52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4179  62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
4180  -1, -1, -1, 75, 76, -1, -1, -1, -1, -1,
4181  -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
4182  -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
4183  102, -1, 104, 105, -1, 107, -1, -1, 110, 111,
4184  112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
4185  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4186  -1, -1, -1, -1, -1, -1, -1, 139, 140, 141,
4187  -1, -1, 144, -1, -1, -1, -1, -1, -1, 151,
4188  1, 153, 3, 4, 5, 6, 7, -1, -1, 10,
4189  11, 12, -1, -1, -1, 16, -1, 18, 19, 20,
4190  21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
4191  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4192  -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
4193  51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
4194  61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
4195  -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
4196  -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
4197  91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
4198  101, 102, -1, 104, 105, -1, 107, -1, -1, 110,
4199  111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
4200  -1, -1, -1, -1, -1, -1, 1, -1, 3, 4,
4201  5, 6, 7, -1, -1, -1, 11, 12, 139, 140,
4202  141, 16, -1, 18, 19, 20, 21, 22, 23, 24,
4203  151, -1, 153, -1, -1, 30, 31, 32, 33, 34,
4204  35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4205  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
4206  55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
4207  65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4208  75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
4209  -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
4210  -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
4211  105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
4212  115, 116, 117, 118, -1, 120, -1, -1, -1, -1,
4213  -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
4214  -1, -1, 11, 12, 139, 140, 141, 16, -1, 18,
4215  19, 20, 21, 22, 23, 24, 151, -1, 153, -1,
4216  -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
4217  39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
4218  49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
4219  59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
4220  -1, -1, -1, -1, -1, -1, 75, 76, -1, -1,
4221  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4222  -1, 90, 91, -1, -1, -1, -1, -1, -1, 98,
4223  -1, -1, 101, 102, -1, 104, 105, -1, 107, 108,
4224  109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
4225  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4226  3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
4227  139, 140, 141, 16, -1, 18, 19, 20, 21, 22,
4228  23, 24, -1, -1, 153, -1, -1, 30, 31, 32,
4229  33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
4230  -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
4231  53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
4232  63, 64, 65, -1, -1, -1, -1, -1, -1, -1,
4233  -1, -1, 75, 76, -1, -1, -1, -1, -1, -1,
4234  -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
4235  -1, -1, -1, -1, -1, 98, -1, -1, 101, 102,
4236  -1, 104, 105, -1, -1, -1, -1, 110, 111, 112,
4237  113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
4238  -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
4239  7, -1, -1, -1, 11, 12, 139, 140, 141, 16,
4240  -1, 18, 19, 20, 21, 22, 23, 24, 151, -1,
4241  153, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4242  -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
4243  -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
4244  57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
4245  -1, -1, -1, -1, -1, -1, -1, -1, 75, 76,
4246  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4247  -1, -1, -1, 90, 91, -1, -1, -1, -1, -1,
4248  -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
4249  -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
4250  117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
4251  -1, -1, 3, 4, 5, 6, 7, -1, -1, -1,
4252  11, 12, 139, 140, 141, 16, -1, 18, 19, 20,
4253  21, 22, 23, 24, -1, -1, 153, -1, -1, 30,
4254  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4255  -1, -1, -1, -1, 45, 46, 47, 48, 49, 50,
4256  51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
4257  61, 62, 63, 64, 65, -1, -1, -1, -1, -1,
4258  -1, -1, -1, -1, 75, 76, -1, -1, -1, -1,
4259  -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
4260  91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
4261  101, 102, -1, 104, 105, -1, 107, -1, -1, 110,
4262  111, 112, 113, 114, 115, 116, 117, 118, -1, -1,
4263  -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
4264  5, 6, 7, -1, -1, -1, 11, 12, 139, 140,
4265  141, 16, -1, 18, 19, 20, 21, 22, 23, 24,
4266  151, -1, -1, -1, -1, 30, 31, 32, 33, 34,
4267  35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4268  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
4269  55, 56, 57, -1, 59, 60, 61, 62, 63, 64,
4270  65, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4271  75, 76, -1, -1, -1, -1, -1, -1, -1, -1,
4272  -1, -1, -1, -1, -1, 90, 91, -1, -1, -1,
4273  -1, -1, -1, 98, -1, -1, 101, 102, -1, 104,
4274  105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
4275  115, 116, 117, 118, -1, -1, -1, -1, -1, -1,
4276  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4277  -1, -1, -1, -1, 139, 140, 141, -1, -1, -1,
4278  -1, -1, -1, -1, -1, -1, 151, 3, 4, 5,
4279  6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
4280  16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
4281  26, -1, -1, -1, 30, 31, 32, 33, 34, 35,
4282  36, 37, 38, 39, -1, -1, -1, -1, -1, 45,
4283  46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
4284  56, 57, -1, -1, -1, -1, -1, -1, -1, -1,
4285  -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
4286  76, 77, 78, 79, 80, 81, 82, 83, -1, -1,
4287  86, 87, -1, -1, -1, -1, 92, 93, 94, 95,
4288  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4289  -1, 107, 108, -1, -1, -1, -1, -1, -1, -1,
4290  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4291  -1, -1, -1, 129, 130, 131, 132, 133, 134, 135,
4292  136, 137, 138, -1, 140, 141, -1, -1, -1, -1,
4293  -1, 147, 148, 3, 4, 5, 6, 7, 8, 9,
4294  10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
4295  20, 21, 22, 23, 24, 25, 26, -1, -1, -1,
4296  30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
4297  -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
4298  50, 51, 52, 53, 54, 55, 56, 57, -1, -1,
4299  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4300  -1, -1, -1, -1, -1, 75, 76, 77, 78, 79,
4301  80, 81, 82, 83, -1, -1, 86, 87, -1, -1,
4302  -1, -1, 92, 93, 94, 95, -1, -1, -1, -1,
4303  -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
4304  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4305  -1, -1, -1, -1, -1, -1, -1, -1, -1, 129,
4306  130, 131, 132, 133, 134, 135, 136, 137, 138, -1,
4307  140, 141, -1, -1, -1, -1, -1, 147, 3, 4,
4308  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
4309  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
4310  25, 26, -1, -1, -1, 30, 31, 32, 33, 34,
4311  35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
4312  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
4313  -1, 56, -1, -1, -1, -1, -1, -1, -1, -1,
4314  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4315  75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
4316  -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
4317  95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4318  -1, -1, 107, 108, -1, -1, 111, -1, -1, -1,
4319  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4320  -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
4321  135, 136, 137, 138, -1, 140, 141, -1, -1, -1,
4322  -1, -1, 147, 3, 4, 5, 6, 7, 8, 9,
4323  10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
4324  20, 21, 22, 23, 24, 25, 26, -1, -1, -1,
4325  30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
4326  -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
4327  50, 51, 52, 53, -1, -1, 56, -1, -1, -1,
4328  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4329  -1, -1, -1, -1, -1, 75, 76, 77, 78, 79,
4330  80, 81, 82, 83, -1, -1, 86, 87, -1, -1,
4331  -1, -1, 92, 93, 94, 95, -1, -1, -1, -1,
4332  -1, -1, -1, -1, -1, -1, -1, 107, 108, -1,
4333  -1, 111, -1, -1, -1, -1, -1, -1, -1, -1,
4334  -1, -1, -1, -1, -1, -1, -1, -1, -1, 129,
4335  130, 131, 132, 133, 134, 135, 136, 137, 138, -1,
4336  140, 141, -1, -1, -1, -1, -1, 147, 3, 4,
4337  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
4338  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
4339  25, 26, -1, -1, -1, 30, 31, 32, 33, 34,
4340  35, 36, 37, 38, 39, -1, -1, -1, -1, -1,
4341  45, 46, 47, 48, 49, 50, 51, 52, 53, -1,
4342  -1, 56, -1, -1, -1, -1, -1, -1, -1, -1,
4343  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4344  75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
4345  -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
4346  95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4347  -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
4348  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4349  -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
4350  135, 136, 137, 138, -1, 140, 141, 3, 4, 5,
4351  -1, 7, 147, -1, -1, 11, 12, -1, -1, -1,
4352  16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
4353  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
4354  36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
4355  46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
4356  56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
4357  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4358  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4359  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4360  -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
4361  -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
4362  116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
4363  -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
4364  7, -1, -1, 139, 11, 12, -1, -1, -1, 16,
4365  146, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4366  -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4367  -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
4368  -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
4369  57, -1, 59, 60, 61, 62, 63, 64, 65, -1,
4370  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4371  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4372  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4373  -1, 98, -1, -1, 101, 102, -1, 104, 105, -1,
4374  -1, -1, -1, 110, 111, 112, 113, 114, 115, 116,
4375  117, 118, -1, -1, -1, -1, -1, -1, -1, -1,
4376  -1, -1, -1, -1, -1, 3, 4, 5, 6, 7,
4377  -1, -1, 139, 11, 12, -1, -1, -1, 16, 146,
4378  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
4379  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4380  -1, 39, -1, -1, -1, -1, -1, 45, 46, 47,
4381  48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4382  -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
4383  -1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
4384  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4385  -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
4386  98, -1, -1, 101, 102, -1, 104, 105, -1, 107,
4387  -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
4388  118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4389  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
4390  12, 139, 140, 141, 16, -1, 18, 19, 20, 21,
4391  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4392  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4393  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
4394  52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
4395  62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
4396  -1, -1, -1, 75, 76, -1, -1, -1, -1, -1,
4397  -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
4398  -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
4399  102, -1, 104, 105, -1, 107, 108, 109, 110, 111,
4400  112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
4401  -1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
4402  6, 7, -1, -1, -1, 11, 12, 139, 140, 141,
4403  16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
4404  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
4405  36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
4406  46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
4407  56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
4408  -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
4409  76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4410  -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
4411  -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
4412  -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
4413  116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
4414  -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
4415  -1, 11, 12, 139, 140, 141, 16, -1, 18, 19,
4416  20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
4417  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
4418  -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
4419  50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
4420  60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
4421  -1, -1, -1, -1, -1, 75, 76, -1, -1, -1,
4422  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4423  90, 91, -1, -1, -1, -1, -1, -1, 98, -1,
4424  -1, 101, 102, -1, 104, 105, -1, 107, 108, 109,
4425  110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
4426  -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
4427  4, 5, -1, 7, -1, -1, -1, 11, 12, 139,
4428  140, 141, 16, -1, 18, 19, 20, 21, 22, 23,
4429  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
4430  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4431  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
4432  54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
4433  64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
4434  -1, 75, 76, -1, -1, -1, -1, -1, -1, -1,
4435  -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
4436  -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
4437  104, 105, -1, 107, 108, 109, 110, 111, 112, 113,
4438  114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
4439  -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
4440  -1, -1, -1, 11, 12, 139, 140, 141, 16, -1,
4441  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
4442  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4443  -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
4444  -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4445  58, 59, 60, 61, 62, 63, 64, 65, -1, -1,
4446  -1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
4447  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4448  -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
4449  98, -1, -1, 101, 102, -1, 104, 105, -1, 107,
4450  108, -1, 110, 111, 112, 113, 114, 115, 116, 117,
4451  118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4452  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
4453  12, 139, 140, 141, 16, -1, 18, 19, 20, 21,
4454  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4455  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4456  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
4457  52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
4458  62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
4459  -1, -1, -1, 75, 76, -1, -1, -1, -1, -1,
4460  -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
4461  -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
4462  102, -1, 104, 105, -1, -1, 108, 109, 110, 111,
4463  112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
4464  -1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
4465  -1, 7, -1, -1, -1, 11, 12, 139, 140, 141,
4466  16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
4467  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
4468  36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
4469  46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
4470  56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
4471  -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
4472  76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4473  -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
4474  -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
4475  -1, 107, 108, -1, 110, 111, 112, 113, 114, 115,
4476  116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
4477  -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
4478  -1, 11, 12, 139, 140, 141, 16, -1, 18, 19,
4479  20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
4480  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
4481  -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
4482  50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
4483  60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
4484  -1, -1, -1, -1, -1, 75, 76, -1, -1, -1,
4485  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4486  90, 91, -1, -1, -1, -1, -1, -1, 98, -1,
4487  -1, 101, 102, -1, 104, 105, -1, -1, 108, -1,
4488  110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
4489  -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
4490  4, 5, -1, 7, -1, -1, -1, 11, 12, 139,
4491  140, 141, 16, -1, 18, 19, 20, 21, 22, 23,
4492  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
4493  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4494  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
4495  54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
4496  64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
4497  -1, 75, 76, -1, -1, -1, -1, -1, -1, -1,
4498  -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
4499  -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
4500  104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
4501  114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
4502  -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
4503  -1, -1, -1, 11, 12, 139, 140, 141, 16, -1,
4504  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
4505  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4506  -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
4507  -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4508  -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
4509  -1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
4510  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4511  -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
4512  98, -1, -1, 101, 102, -1, 104, 105, -1, 107,
4513  -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
4514  118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4515  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
4516  12, 139, 140, 141, 16, -1, 18, 19, 20, 21,
4517  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4518  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4519  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
4520  52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4521  62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
4522  -1, -1, -1, 75, 76, -1, -1, -1, -1, -1,
4523  -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
4524  -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
4525  102, -1, 104, 105, -1, 107, -1, -1, 110, 111,
4526  112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
4527  -1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
4528  -1, 7, -1, -1, -1, 11, 12, 139, 140, 141,
4529  16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
4530  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
4531  36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
4532  46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
4533  56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
4534  -1, -1, -1, -1, -1, -1, -1, -1, -1, 75,
4535  76, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4536  -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
4537  -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
4538  -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
4539  116, 117, 118, -1, -1, -1, -1, -1, -1, -1,
4540  -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
4541  -1, 11, 12, 139, 140, 141, 16, -1, 18, 19,
4542  20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
4543  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
4544  -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
4545  50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
4546  60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
4547  -1, -1, -1, -1, -1, 75, 76, -1, -1, -1,
4548  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4549  90, 91, -1, -1, -1, -1, -1, -1, 98, -1,
4550  -1, 101, 102, -1, 104, 105, -1, 107, -1, -1,
4551  110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
4552  -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
4553  4, 5, -1, 7, -1, -1, -1, 11, 12, 139,
4554  140, 141, 16, -1, 18, 19, 20, 21, 22, 23,
4555  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
4556  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4557  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
4558  54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
4559  64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
4560  -1, 75, 76, -1, -1, -1, -1, -1, -1, -1,
4561  -1, -1, -1, -1, -1, -1, 90, 91, -1, -1,
4562  -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
4563  104, 105, -1, -1, -1, -1, 110, 111, 112, 113,
4564  114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
4565  -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
4566  -1, -1, -1, 11, 12, 139, 140, 141, 16, -1,
4567  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
4568  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4569  -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
4570  -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4571  -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
4572  -1, -1, -1, -1, -1, -1, -1, 75, 76, -1,
4573  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4574  -1, -1, 90, 91, -1, -1, -1, -1, -1, -1,
4575  98, -1, -1, 101, 102, -1, 104, 105, -1, -1,
4576  -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
4577  118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4578  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
4579  12, 139, 140, 141, 16, -1, 18, 19, 20, 21,
4580  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4581  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4582  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
4583  52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4584  62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
4585  -1, -1, -1, 75, 76, -1, -1, -1, -1, -1,
4586  -1, -1, -1, -1, -1, -1, -1, -1, 90, 91,
4587  -1, -1, -1, -1, -1, -1, 98, -1, -1, 101,
4588  102, -1, 104, 105, -1, -1, -1, -1, 110, 111,
4589  112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
4590  -1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
4591  -1, 7, -1, -1, -1, 11, 12, 139, 140, 141,
4592  16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
4593  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
4594  36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
4595  46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
4596  56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
4597  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4598  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4599  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4600  -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
4601  -1, 107, -1, -1, 110, 111, 112, 113, 114, 115,
4602  116, 117, 118, -1, -1, -1, -1, -1, -1, 3,
4603  4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
4604  -1, -1, 16, 139, 18, 19, 20, 21, 22, 23,
4605  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
4606  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4607  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
4608  54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
4609  64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
4610  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4611  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4612  -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
4613  104, 105, -1, 107, -1, -1, 110, 111, 112, 113,
4614  114, 115, 116, 117, 118, -1, -1, -1, -1, -1,
4615  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
4616  12, -1, -1, -1, 16, 139, 18, 19, 20, 21,
4617  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4618  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4619  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
4620  52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4621  62, 63, 64, 65, -1, -1, -1, -1, -1, -1,
4622  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4623  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4624  -1, -1, 94, -1, -1, -1, 98, -1, -1, 101,
4625  102, -1, 104, 105, -1, -1, -1, -1, 110, 111,
4626  112, 113, 114, 115, 116, 117, 118, -1, -1, -1,
4627  -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
4628  -1, 11, 12, -1, -1, -1, 16, 139, 18, 19,
4629  20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
4630  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
4631  -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
4632  50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
4633  60, 61, 62, 63, 64, 65, -1, -1, -1, -1,
4634  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4635  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4636  -1, -1, -1, -1, -1, -1, -1, -1, 98, -1,
4637  -1, 101, 102, -1, 104, 105, -1, -1, -1, -1,
4638  110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
4639  -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
4640  -1, -1, -1, 11, 12, -1, -1, -1, 16, 139,
4641  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
4642  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4643  -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
4644  -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4645  -1, 59, 60, 61, 62, 63, 64, 65, -1, -1,
4646  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4647  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4648  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4649  98, -1, -1, 101, 102, -1, 104, 105, -1, -1,
4650  -1, -1, 110, 111, 112, 113, 114, 115, 116, 117,
4651  118, -1, -1, -1, -1, -1, -1, 3, 4, 5,
4652  -1, 7, -1, -1, -1, 11, 12, -1, -1, -1,
4653  16, 139, 18, 19, 20, 21, 22, 23, 24, -1,
4654  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
4655  36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
4656  46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
4657  56, 57, -1, 59, 60, 61, 62, 63, 64, 65,
4658  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4659  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4660  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4661  -1, -1, 98, -1, -1, 101, 102, -1, 104, 105,
4662  -1, -1, -1, -1, 110, 111, 112, 113, 114, 115,
4663  116, 117, 118, -1, -1, -1, -1, -1, -1, 3,
4664  4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
4665  -1, -1, 16, 139, 18, 19, 20, 21, 22, 23,
4666  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
4667  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4668  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
4669  54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
4670  64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
4671  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4672  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4673  -1, -1, -1, -1, 98, -1, -1, 101, 102, -1,
4674  104, 105, 33, 34, 35, 36, 110, 111, 112, 113,
4675  114, 115, 116, 117, 118, -1, -1, -1, 49, 50,
4676  51, 52, -1, -1, -1, 56, -1, 58, 59, 60,
4677  61, 62, 63, -1, -1, 139, -1, -1, -1, -1,
4678  -1, -1, -1, -1, -1, -1, 77, -1, -1, -1,
4679  -1, -1, -1, -1, -1, -1, -1, -1, -1, 90,
4680  91, -1, -1, -1, -1, -1, -1, 98, -1, -1,
4681  101, -1, -1, 104, 105, -1, 107, 108, -1, 110,
4682  111, 112, 113, 114, 115, 116, 117, 118, 33, 34,
4683  35, 36, -1, -1, -1, -1, -1, -1, -1, -1,
4684  -1, 132, -1, -1, 49, 50, 51, 52, 139, -1,
4685  -1, 56, -1, -1, 59, 60, 61, 62, 63, -1,
4686  -1, 33, 34, 35, 36, -1, -1, -1, -1, -1,
4687  -1, -1, -1, -1, -1, -1, -1, 49, 50, 51,
4688  52, -1, -1, -1, 56, 90, 91, 59, 60, 61,
4689  62, 63, -1, 98, -1, -1, 101, -1, -1, 104,
4690  105, -1, 107, -1, -1, 110, 111, 112, 113, 114,
4691  115, 116, 117, 118, -1, -1, -1, -1, 90, 91,
4692  -1, -1, -1, -1, -1, -1, 98, 132, -1, 101,
4693  -1, -1, 104, 105, 139, -1, -1, -1, 110, 111,
4694  112, 113, 114, 115, 116, 117, 118, 52, 53, -1,
4695  -1, 56, -1, -1, -1, -1, -1, -1, -1, -1,
4696  132, -1, -1, -1, -1, -1, -1, 139, -1, -1,
4697  75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
4698  -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
4699  95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4700  -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
4701  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4702  -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
4703  135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
4704  -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
4705  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4706  75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
4707  -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
4708  95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4709  -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
4710  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4711  -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
4712  135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
4713  -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
4714  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4715  75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
4716  -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
4717  95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4718  -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
4719  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4720  -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
4721  135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
4722  -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
4723  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4724  75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
4725  -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
4726  95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4727  -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
4728  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4729  -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
4730  135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
4731  -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
4732  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4733  75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
4734  -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
4735  95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4736  -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
4737  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4738  -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
4739  135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
4740  -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
4741  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4742  75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
4743  -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
4744  95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4745  -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
4746  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4747  -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
4748  135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
4749  -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
4750  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4751  75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
4752  -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
4753  95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4754  -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
4755  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4756  -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
4757  135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
4758  -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
4759  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4760  75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
4761  -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
4762  95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4763  -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
4764  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4765  -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
4766  135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
4767  -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
4768  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4769  75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
4770  -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
4771  95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4772  -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
4773  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4774  -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
4775  135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
4776  -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
4777  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4778  75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
4779  -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
4780  95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4781  -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
4782  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4783  -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
4784  135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
4785  -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
4786  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4787  75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
4788  -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
4789  95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4790  -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
4791  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4792  -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
4793  135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
4794  -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
4795  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4796  75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
4797  -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
4798  95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4799  -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
4800  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4801  -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
4802  135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
4803  -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
4804  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4805  75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
4806  -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
4807  95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4808  -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
4809  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4810  -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
4811  135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
4812  -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
4813  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4814  75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
4815  -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
4816  95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4817  -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
4818  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4819  -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
4820  135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
4821  -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
4822  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4823  75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
4824  -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
4825  95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4826  -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
4827  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4828  -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
4829  135, 136, 137, 138, -1, 140, 141, 52, 53, -1,
4830  -1, 56, 147, 148, -1, -1, -1, -1, -1, -1,
4831  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4832  75, 76, 77, 78, 79, 80, 81, 82, 83, -1,
4833  -1, 86, 87, -1, -1, -1, -1, 92, 93, 94,
4834  95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4835  -1, -1, 107, 108, -1, -1, -1, -1, -1, -1,
4836  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4837  -1, -1, -1, -1, 129, 130, 131, 132, 133, 134,
4838  135, 136, 137, 138, -1, 140, 141, -1, -1, -1,
4839  -1, -1, 147
4840 };
4841 
4842  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
4843  symbol of state STATE-NUM. */
4844 static const yytype_uint16 yystos[] =
4845 {
4846  0, 155, 156, 0, 1, 3, 4, 5, 6, 7,
4847  11, 12, 16, 18, 19, 20, 21, 22, 23, 24,
4848  30, 31, 32, 33, 34, 35, 36, 39, 45, 46,
4849  47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
4850  57, 59, 60, 61, 62, 63, 64, 65, 75, 76,
4851  90, 91, 98, 101, 102, 104, 105, 107, 110, 111,
4852  112, 113, 114, 115, 116, 117, 118, 139, 140, 141,
4853  157, 158, 159, 167, 169, 171, 179, 180, 182, 183,
4854  184, 186, 187, 188, 190, 191, 200, 203, 218, 233,
4855  234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
4856  252, 279, 280, 333, 334, 335, 336, 337, 338, 339,
4857  342, 344, 345, 359, 360, 362, 363, 364, 365, 366,
4858  367, 368, 369, 405, 418, 159, 3, 4, 5, 6,
4859  7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
4860  17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
4861  30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
4862  45, 46, 47, 48, 49, 50, 51, 52, 53, 56,
4863  75, 76, 77, 78, 79, 80, 81, 82, 83, 86,
4864  87, 92, 93, 94, 95, 107, 108, 129, 130, 131,
4865  132, 133, 134, 135, 136, 137, 138, 140, 141, 147,
4866  194, 195, 196, 198, 199, 359, 39, 58, 98, 101,
4867  107, 108, 109, 112, 140, 183, 191, 200, 204, 210,
4868  213, 215, 233, 365, 366, 368, 369, 403, 404, 210,
4869  148, 211, 212, 148, 207, 211, 148, 153, 412, 54,
4870  195, 412, 143, 160, 143, 21, 22, 31, 32, 182,
4871  200, 233, 252, 200, 200, 200, 56, 1, 47, 101,
4872  163, 164, 165, 167, 185, 186, 418, 167, 220, 205,
4873  215, 403, 418, 204, 402, 403, 418, 46, 98, 139,
4874  146, 190, 218, 233, 365, 366, 369, 223, 54, 55,
4875  57, 194, 348, 361, 348, 349, 350, 152, 152, 152,
4876  152, 364, 179, 200, 200, 151, 153, 411, 416, 417,
4877  40, 41, 42, 43, 44, 37, 38, 26, 143, 207,
4878  211, 244, 281, 28, 245, 278, 126, 146, 101, 107,
4879  187, 126, 25, 77, 78, 79, 80, 81, 82, 83,
4880  84, 85, 86, 87, 88, 89, 94, 95, 127, 129,
4881  130, 131, 132, 133, 134, 135, 136, 137, 138, 202,
4882  202, 68, 96, 97, 145, 409, 219, 171, 175, 175,
4883  176, 177, 176, 175, 411, 417, 98, 184, 191, 233,
4884  257, 365, 366, 369, 52, 56, 94, 98, 192, 193,
4885  233, 365, 366, 369, 193, 33, 34, 35, 36, 49,
4886  50, 51, 52, 56, 148, 194, 367, 400, 210, 97,
4887  409, 410, 281, 336, 99, 99, 146, 204, 56, 204,
4888  204, 204, 348, 126, 100, 146, 214, 418, 97, 145,
4889  409, 99, 99, 146, 214, 210, 412, 413, 210, 91,
4890  209, 210, 215, 377, 403, 418, 171, 413, 171, 54,
4891  64, 65, 168, 148, 201, 157, 163, 97, 409, 99,
4892  167, 166, 185, 149, 411, 417, 413, 221, 413, 150,
4893  146, 153, 415, 146, 415, 144, 415, 412, 56, 364,
4894  187, 189, 146, 97, 145, 409, 270, 271, 66, 119,
4895  121, 122, 351, 119, 119, 351, 67, 351, 340, 346,
4896  343, 347, 77, 151, 159, 175, 175, 175, 175, 167,
4897  171, 171, 282, 283, 106, 181, 286, 287, 286, 107,
4898  179, 204, 215, 216, 217, 185, 146, 190, 146, 169,
4899  170, 179, 191, 200, 204, 206, 217, 233, 369, 172,
4900  200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
4901  200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
4902  200, 200, 200, 200, 52, 53, 56, 198, 207, 406,
4903  407, 209, 52, 53, 56, 198, 207, 406, 161, 163,
4904  13, 253, 416, 253, 163, 175, 163, 411, 225, 56,
4905  97, 145, 409, 25, 171, 52, 56, 192, 130, 370,
4906  97, 145, 409, 228, 401, 229, 68, 97, 408, 52,
4907  56, 406, 170, 200, 206, 170, 206, 197, 124, 204,
4908  107, 204, 213, 403, 52, 56, 209, 52, 56, 404,
4909  413, 149, 413, 146, 413, 146, 413, 195, 222, 200,
4910  144, 144, 406, 406, 206, 160, 413, 165, 413, 403,
4911  146, 189, 52, 56, 209, 52, 56, 272, 353, 352,
4912  119, 341, 351, 66, 119, 119, 341, 66, 119, 200,
4913  144, 284, 282, 10, 251, 288, 251, 204, 146, 44,
4914  413, 189, 146, 44, 126, 44, 97, 145, 409, 173,
4915  412, 99, 99, 207, 211, 412, 414, 99, 99, 207,
4916  208, 211, 418, 251, 8, 246, 329, 418, 163, 13,
4917  163, 251, 27, 254, 416, 251, 25, 224, 293, 17,
4918  248, 291, 52, 56, 209, 52, 56, 176, 227, 371,
4919  226, 52, 56, 192, 209, 161, 171, 230, 231, 208,
4920  211, 195, 204, 204, 214, 99, 99, 414, 99, 99,
4921  403, 171, 415, 187, 414, 273, 354, 54, 55, 57,
4922  358, 369, 152, 351, 152, 152, 152, 285, 144, 289,
4923  107, 204, 167, 189, 167, 200, 52, 56, 209, 52,
4924  56, 52, 56, 90, 91, 98, 101, 104, 105, 110,
4925  132, 303, 304, 305, 308, 323, 324, 326, 327, 328,
4926  333, 334, 337, 338, 339, 342, 344, 345, 366, 128,
4927  170, 206, 170, 206, 181, 150, 99, 170, 206, 170,
4928  206, 181, 204, 217, 330, 418, 9, 15, 247, 249,
4929  332, 418, 14, 249, 250, 255, 256, 418, 256, 178,
4930  294, 291, 251, 107, 204, 290, 251, 414, 163, 416,
4931  175, 161, 414, 251, 413, 148, 372, 373, 194, 281,
4932  278, 99, 146, 413, 274, 355, 131, 265, 266, 418,
4933  265, 204, 414, 324, 324, 56, 192, 311, 309, 414,
4934  144, 310, 325, 52, 100, 174, 131, 88, 89, 97,
4935  145, 148, 306, 307, 200, 170, 206, 100, 331, 418,
4936  163, 162, 163, 175, 251, 251, 295, 251, 204, 146,
4937  253, 251, 161, 416, 251, 52, 54, 55, 56, 57,
4938  58, 77, 91, 101, 107, 108, 109, 133, 136, 374,
4939  376, 377, 378, 379, 380, 381, 382, 383, 384, 387,
4940  388, 389, 390, 391, 394, 395, 396, 397, 398, 161,
4941  376, 232, 148, 276, 376, 356, 262, 264, 267, 380,
4942  382, 383, 385, 386, 389, 390, 392, 393, 396, 398,
4943  412, 163, 161, 303, 107, 303, 312, 313, 314, 316,
4944  58, 112, 317, 318, 319, 320, 321, 322, 388, 270,
4945  326, 308, 324, 324, 192, 414, 413, 112, 312, 317,
4946  312, 317, 98, 191, 233, 365, 366, 369, 253, 163,
4947  253, 296, 107, 204, 163, 251, 101, 107, 258, 259,
4948  260, 261, 379, 413, 413, 126, 146, 375, 204, 146,
4949  399, 418, 34, 52, 146, 399, 399, 146, 375, 52,
4950  146, 375, 52, 251, 416, 372, 376, 275, 357, 267,
4951  131, 126, 146, 263, 98, 233, 146, 399, 399, 399,
4952  146, 263, 146, 263, 151, 413, 52, 146, 414, 107,
4953  303, 316, 146, 348, 144, 146, 303, 34, 52, 348,
4954  413, 413, 414, 414, 56, 97, 145, 409, 163, 332,
4955  163, 301, 302, 303, 314, 317, 204, 256, 291, 292,
4956  260, 379, 146, 413, 146, 204, 374, 381, 394, 396,
4957  384, 388, 390, 398, 382, 391, 396, 380, 382, 161,
4958  267, 29, 123, 277, 163, 131, 233, 262, 393, 396,
4959  56, 97, 385, 390, 382, 392, 396, 382, 52, 268,
4960  269, 378, 146, 315, 316, 52, 146, 146, 124, 319,
4961  321, 322, 52, 56, 209, 52, 56, 329, 255, 253,
4962  40, 41, 146, 413, 258, 261, 259, 146, 375, 146,
4963  375, 399, 146, 375, 146, 375, 375, 251, 149, 161,
4964  163, 120, 146, 263, 146, 263, 52, 56, 399, 146,
4965  263, 146, 263, 263, 146, 412, 315, 146, 146, 315,
4966  414, 297, 175, 175, 312, 146, 146, 382, 396, 382,
4967  382, 251, 144, 382, 396, 382, 382, 269, 316, 315,
4968  298, 259, 375, 146, 375, 375, 375, 263, 146, 263,
4969  263, 263, 299, 382, 382, 163, 375, 263, 256, 293,
4970  300
4971 };
4972 
4973  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
4974 static const yytype_uint16 yyr1[] =
4975 {
4976  0, 154, 156, 155, 157, 158, 158, 158, 158, 159,
4977  159, 160, 162, 161, 161, 163, 164, 164, 164, 164,
4978  165, 166, 165, 168, 167, 167, 167, 167, 167, 167,
4979  167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
4980  167, 169, 169, 169, 169, 169, 169, 169, 169, 170,
4981  170, 170, 171, 171, 171, 171, 171, 172, 173, 174,
4982  171, 171, 175, 177, 178, 176, 179, 179, 180, 180,
4983  181, 182, 183, 183, 183, 183, 183, 183, 183, 183,
4984  183, 183, 183, 184, 184, 185, 185, 186, 186, 186,
4985  186, 186, 186, 186, 186, 186, 186, 187, 187, 188,
4986  188, 189, 189, 190, 190, 190, 190, 190, 190, 190,
4987  190, 190, 191, 191, 191, 191, 191, 191, 191, 191,
4988  191, 192, 192, 193, 193, 193, 194, 194, 194, 194,
4989  194, 195, 195, 196, 197, 196, 198, 198, 198, 198,
4990  198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
4991  198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
4992  198, 198, 198, 198, 198, 198, 199, 199, 199, 199,
4993  199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
4994  199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
4995  199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
4996  199, 199, 199, 199, 199, 199, 199, 200, 200, 200,
4997  200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
4998  200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
4999  200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
5000  200, 200, 200, 200, 200, 200, 200, 201, 200, 200,
5001  200, 202, 202, 202, 202, 203, 203, 204, 205, 205,
5002  205, 205, 206, 206, 207, 207, 208, 208, 209, 209,
5003  209, 209, 209, 210, 210, 210, 210, 210, 212, 211,
5004  213, 214, 214, 215, 215, 215, 215, 216, 216, 217,
5005  217, 217, 218, 218, 218, 218, 218, 218, 218, 218,
5006  218, 218, 218, 219, 218, 220, 218, 221, 218, 218,
5007  218, 218, 218, 218, 218, 218, 218, 218, 222, 218,
5008  218, 218, 218, 218, 218, 223, 218, 218, 218, 218,
5009  218, 224, 218, 225, 218, 218, 218, 226, 218, 227,
5010  218, 228, 218, 229, 230, 218, 231, 232, 218, 218,
5011  218, 218, 218, 233, 234, 235, 236, 237, 238, 239,
5012  240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
5013  250, 251, 252, 253, 253, 253, 254, 254, 255, 255,
5014  256, 256, 257, 257, 258, 258, 259, 259, 260, 260,
5015  260, 260, 260, 261, 261, 262, 262, 262, 262, 262,
5016  263, 263, 264, 264, 264, 264, 264, 264, 264, 264,
5017  264, 264, 264, 264, 264, 264, 264, 265, 265, 266,
5018  266, 267, 267, 268, 268, 269, 269, 271, 272, 273,
5019  274, 275, 270, 276, 276, 277, 277, 278, 279, 279,
5020  279, 279, 280, 280, 280, 280, 280, 280, 280, 280,
5021  280, 281, 281, 283, 284, 285, 282, 287, 288, 289,
5022  286, 290, 290, 290, 290, 291, 292, 292, 294, 295,
5023  296, 297, 298, 299, 293, 300, 300, 301, 301, 301,
5024  302, 302, 302, 302, 302, 303, 304, 304, 305, 305,
5025  306, 307, 308, 308, 308, 308, 308, 308, 308, 309,
5026  308, 308, 310, 308, 308, 311, 308, 312, 312, 312,
5027  312, 312, 312, 312, 312, 313, 313, 314, 314, 314,
5028  314, 315, 315, 316, 317, 317, 317, 317, 317, 318,
5029  318, 319, 319, 320, 320, 321, 321, 322, 323, 323,
5030  323, 323, 323, 323, 323, 323, 323, 323, 324, 324,
5031  324, 324, 324, 324, 324, 324, 324, 325, 324, 326,
5032  327, 328, 328, 328, 329, 329, 330, 330, 330, 331,
5033  331, 332, 332, 333, 333, 334, 335, 335, 335, 336,
5034  337, 338, 339, 340, 340, 341, 341, 342, 343, 343,
5035  344, 345, 346, 346, 347, 347, 348, 348, 349, 349,
5036  350, 350, 351, 352, 351, 353, 354, 355, 356, 357,
5037  351, 358, 358, 358, 358, 359, 359, 360, 361, 361,
5038  361, 361, 362, 363, 363, 364, 364, 364, 364, 365,
5039  365, 365, 365, 365, 366, 366, 366, 366, 366, 366,
5040  366, 367, 367, 368, 368, 369, 369, 371, 370, 370,
5041  372, 372, 373, 372, 374, 374, 374, 374, 374, 375,
5042  375, 376, 376, 376, 376, 376, 376, 376, 376, 376,
5043  376, 376, 376, 376, 376, 376, 377, 378, 378, 378,
5044  378, 379, 379, 380, 381, 381, 382, 382, 383, 384,
5045  384, 385, 385, 386, 386, 387, 387, 388, 388, 389,
5046  390, 390, 391, 392, 393, 393, 394, 394, 395, 395,
5047  396, 396, 397, 397, 398, 399, 399, 400, 401, 400,
5048  402, 402, 403, 403, 404, 404, 404, 404, 405, 405,
5049  405, 406, 406, 406, 406, 407, 407, 407, 408, 408,
5050  409, 409, 410, 410, 411, 411, 412, 412, 413, 414,
5051  415, 415, 415, 416, 416, 417, 417, 418
5052 };
5053 
5054  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
5055 static const yytype_uint8 yyr2[] =
5056 {
5057  0, 2, 0, 2, 2, 1, 1, 3, 2, 1,
5058  2, 3, 0, 6, 3, 2, 1, 1, 3, 2,
5059  1, 0, 3, 0, 4, 3, 3, 3, 2, 3,
5060  3, 3, 3, 3, 4, 1, 3, 3, 5, 3,
5061  1, 3, 3, 6, 5, 5, 5, 5, 3, 1,
5062  3, 1, 1, 3, 3, 3, 2, 0, 0, 0,
5063  6, 1, 1, 0, 0, 4, 1, 1, 1, 4,
5064  3, 1, 2, 3, 4, 5, 4, 5, 2, 2,
5065  2, 2, 2, 1, 3, 1, 3, 1, 2, 3,
5066  5, 2, 4, 2, 4, 1, 3, 1, 3, 2,
5067  3, 1, 3, 1, 1, 4, 3, 3, 3, 3,
5068  2, 1, 1, 1, 4, 3, 3, 3, 3, 2,
5069  1, 1, 1, 2, 1, 3, 1, 1, 1, 1,
5070  1, 1, 1, 1, 0, 4, 1, 1, 1, 1,
5071  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5072  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5073  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5074  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5075  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5076  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5077  1, 1, 1, 1, 1, 1, 1, 3, 3, 6,
5078  5, 5, 5, 5, 4, 3, 3, 3, 2, 2,
5079  2, 2, 3, 3, 3, 3, 3, 3, 4, 2,
5080  2, 3, 3, 3, 3, 1, 3, 3, 3, 3,
5081  3, 2, 2, 3, 3, 3, 3, 0, 4, 6,
5082  1, 1, 1, 1, 1, 3, 3, 1, 1, 2,
5083  4, 2, 1, 3, 3, 3, 1, 1, 1, 1,
5084  2, 4, 2, 1, 2, 2, 4, 1, 0, 2,
5085  2, 2, 1, 1, 2, 3, 4, 1, 1, 3,
5086  4, 2, 1, 1, 1, 1, 1, 1, 1, 1,
5087  1, 1, 1, 0, 4, 0, 3, 0, 4, 3,
5088  3, 2, 3, 3, 1, 4, 3, 1, 0, 6,
5089  4, 3, 2, 1, 2, 0, 3, 6, 6, 4,
5090  4, 0, 6, 0, 5, 5, 6, 0, 6, 0,
5091  7, 0, 5, 0, 0, 7, 0, 0, 9, 1,
5092  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5093  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5094  1, 1, 1, 1, 1, 2, 1, 1, 1, 5,
5095  1, 2, 1, 1, 1, 3, 1, 3, 1, 3,
5096  5, 1, 3, 2, 1, 4, 2, 2, 2, 1,
5097  2, 0, 6, 8, 4, 6, 4, 2, 6, 2,
5098  4, 6, 2, 4, 2, 4, 1, 1, 1, 3,
5099  4, 1, 4, 1, 3, 1, 1, 0, 0, 0,
5100  0, 0, 7, 4, 1, 3, 3, 3, 2, 4,
5101  5, 5, 2, 4, 4, 3, 3, 3, 2, 1,
5102  4, 3, 3, 0, 0, 0, 5, 0, 0, 0,
5103  5, 1, 2, 3, 4, 5, 1, 1, 0, 0,
5104  0, 0, 0, 0, 11, 1, 1, 1, 3, 3,
5105  1, 2, 3, 1, 1, 1, 3, 1, 3, 1,
5106  1, 1, 1, 4, 4, 3, 4, 4, 3, 0,
5107  4, 2, 0, 4, 2, 0, 4, 1, 1, 2,
5108  3, 5, 2, 4, 1, 2, 3, 2, 4, 1,
5109  3, 1, 3, 1, 3, 1, 1, 3, 1, 1,
5110  3, 2, 1, 1, 3, 2, 1, 2, 1, 3,
5111  3, 2, 2, 1, 1, 1, 2, 2, 1, 1,
5112  1, 1, 1, 1, 1, 1, 1, 0, 3, 1,
5113  2, 2, 3, 1, 6, 1, 1, 1, 1, 2,
5114  1, 2, 1, 1, 1, 1, 1, 1, 2, 3,
5115  3, 3, 4, 0, 3, 1, 2, 4, 0, 3,
5116  4, 4, 0, 3, 0, 3, 0, 2, 0, 2,
5117  0, 2, 1, 0, 3, 0, 0, 0, 0, 0,
5118  8, 1, 1, 1, 1, 1, 1, 2, 1, 1,
5119  1, 1, 3, 1, 2, 1, 1, 1, 1, 1,
5120  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5121  1, 1, 1, 1, 1, 1, 1, 0, 4, 0,
5122  3, 3, 0, 3, 4, 2, 2, 2, 1, 2,
5123  0, 6, 8, 4, 6, 4, 6, 2, 4, 6,
5124  2, 4, 2, 4, 1, 0, 1, 1, 1, 1,
5125  1, 1, 1, 1, 1, 3, 1, 3, 1, 2,
5126  1, 2, 1, 1, 3, 1, 3, 1, 1, 2,
5127  2, 1, 3, 3, 1, 3, 1, 3, 1, 1,
5128  2, 1, 1, 1, 2, 2, 1, 1, 0, 4,
5129  1, 2, 1, 3, 3, 2, 4, 2, 1, 1,
5130  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
5131  1, 1, 1, 1, 0, 1, 0, 1, 2, 2,
5132  0, 1, 1, 1, 1, 1, 2, 0
5133 };
5134 
5135 
5136 #define yyerrok (yyerrstatus = 0)
5137 #define yyclearin (yychar = YYEMPTY)
5138 #define YYEMPTY (-2)
5139 #define YYEOF 0
5140 
5141 #define YYACCEPT goto yyacceptlab
5142 #define YYABORT goto yyabortlab
5143 #define YYERROR goto yyerrorlab
5144 
5145 
5146 #define YYRECOVERING() (!!yyerrstatus)
5147 
5148 #define YYBACKUP(Token, Value) \
5149 do \
5150  if (yychar == YYEMPTY) \
5151  { \
5152  yychar = (Token); \
5153  yylval = (Value); \
5154  YYPOPSTACK (yylen); \
5155  yystate = *yyssp; \
5156  goto yybackup; \
5157  } \
5158  else \
5159  { \
5160  yyerror (&yylloc, p, YY_("syntax error: cannot back up")); \
5161  YYERROR; \
5162  } \
5163 while (0)
5164 
5165 /* Error token number */
5166 #define YYTERROR 1
5167 #define YYERRCODE 256
5168 
5169 
5170 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
5171  If N is 0, then set CURRENT to the empty location which ends
5172  the previous symbol: RHS[0] (always defined). */
5173 
5174 #ifndef YYLLOC_DEFAULT
5175 # define YYLLOC_DEFAULT(Current, Rhs, N) \
5176  do \
5177  if (N) \
5178  { \
5179  (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
5180  (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
5181  (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
5182  (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
5183  } \
5184  else \
5185  { \
5186  (Current).first_line = (Current).last_line = \
5187  YYRHSLOC (Rhs, 0).last_line; \
5188  (Current).first_column = (Current).last_column = \
5189  YYRHSLOC (Rhs, 0).last_column; \
5190  } \
5191  while (0)
5192 #endif
5193 
5194 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
5195 
5196 
5197 /* Enable debugging if requested. */
5198 #if YYDEBUG
5199 
5200 # ifndef YYFPRINTF
5201 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
5202 # define YYFPRINTF fprintf
5203 # endif
5204 
5205 # define YYDPRINTF(Args) \
5206 do { \
5207  if (yydebug) \
5208  YYFPRINTF Args; \
5209 } while (0)
5210 
5211 
5212 /* YY_LOCATION_PRINT -- Print the location on the stream.
5213  This macro was not mandated originally: define only if we know
5214  we won't break user code: when these are the locations we know. */
5215 
5216 #ifndef YY_LOCATION_PRINT
5217 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
5218 
5219 /* Print *YYLOCP on YYO. Private, do not rely on its existence. */
5220 
5222 static unsigned
5223 yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
5224 {
5225  unsigned res = 0;
5226  int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
5227  if (0 <= yylocp->first_line)
5228  {
5229  res += YYFPRINTF (p, "%d", yylocp->first_line);
5230  if (0 <= yylocp->first_column)
5231  res += YYFPRINTF (p, ".%d", yylocp->first_column);
5232  }
5233  if (0 <= yylocp->last_line)
5234  {
5235  if (yylocp->first_line < yylocp->last_line)
5236  {
5237  res += YYFPRINTF (p, "-%d", yylocp->last_line);
5238  if (0 <= end_col)
5239  res += YYFPRINTF (p, ".%d", end_col);
5240  }
5241  else if (0 <= end_col && yylocp->first_column < end_col)
5242  res += YYFPRINTF (p, "-%d", end_col);
5243  }
5244  return res;
5245  }
5246 
5247 # define YY_LOCATION_PRINT(File, Loc) \
5248  yy_location_print_ (File, &(Loc))
5249 
5250 # else
5251 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
5252 # endif
5253 #endif
5254 
5255 
5256 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
5257 do { \
5258  if (yydebug) \
5259  { \
5260  YYFPRINTF (p, "%s ", Title); \
5261  yy_symbol_print (stderr, \
5262  Type, Value, Location, p); \
5263  YYFPRINTF (p, "\n"); \
5264  } \
5265 } while (0)
5266 
5267 
5268 /*----------------------------------------.
5269 | Print this symbol's value on YYOUTPUT. |
5270 `----------------------------------------*/
5271 
5272 static void
5273 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
5274 {
5275  FILE *yyo = yyoutput;
5276  YYUSE (yyo);
5277  YYUSE (yylocationp);
5278  YYUSE (p);
5279  if (!yyvaluep)
5280  return;
5281 # ifdef YYPRINT
5282  if (yytype < YYNTOKENS)
5283  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
5284 # endif
5285  YYUSE (yytype);
5286 }
5287 
5288 
5289 /*--------------------------------.
5290 | Print this symbol on YYOUTPUT. |
5291 `--------------------------------*/
5292 
5293 static void
5294 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *p)
5295 {
5296  YYFPRINTF (p, "%s %s (",
5297  yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
5298 
5299  YY_LOCATION_PRINT (yyoutput, *yylocationp);
5300  YYFPRINTF (p, ": ");
5301  yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, p);
5302  YYFPRINTF (p, ")");
5303 }
5304 
5305 /*------------------------------------------------------------------.
5306 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
5307 | TOP (included). |
5308 `------------------------------------------------------------------*/
5309 
5310 static void
5311 ruby_parser_yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop, struct parser_params *p)
5312 #define yy_stack_print(b, t) ruby_parser_yy_stack_print(b, t, p)
5313 {
5314  YYFPRINTF (p, "Stack now");
5315  for (; yybottom <= yytop; yybottom++)
5316  {
5317  int yybot = *yybottom;
5318  YYFPRINTF (p, " %d", yybot);
5319  }
5320  YYFPRINTF (p, "\n");
5321 }
5322 
5323 # define YY_STACK_PRINT(Bottom, Top) \
5324 do { \
5325  if (yydebug) \
5326  yy_stack_print ((Bottom), (Top)); \
5327 } while (0)
5328 
5329 
5330 /*------------------------------------------------.
5331 | Report that the YYRULE is going to be reduced. |
5332 `------------------------------------------------*/
5333 
5334 static void
5335 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, struct parser_params *p)
5336 {
5337  unsigned long int yylno = yyrline[yyrule];
5338  int yynrhs = yyr2[yyrule];
5339  int yyi;
5340  YYFPRINTF (p, "Reducing stack by rule %d (line %lu):\n",
5341  yyrule - 1, yylno);
5342  /* The symbols being reduced. */
5343  for (yyi = 0; yyi < yynrhs; yyi++)
5344  {
5345  YYFPRINTF (p, " $%d = ", yyi + 1);
5346  yy_symbol_print (stderr,
5347  yystos[yyssp[yyi + 1 - yynrhs]],
5348  &(yyvsp[(yyi + 1) - (yynrhs)])
5349  , &(yylsp[(yyi + 1) - (yynrhs)]) , p);
5350  YYFPRINTF (p, "\n");
5351  }
5352 }
5353 
5354 # define YY_REDUCE_PRINT(Rule) \
5355 do { \
5356  if (yydebug) \
5357  yy_reduce_print (yyssp, yyvsp, yylsp, Rule, p); \
5358 } while (0)
5359 
5360 /* Nonzero means print parse trace. It is left uninitialized so that
5361  multiple parsers can coexist. */
5362 #ifndef yydebug
5363 int yydebug;
5364 #endif
5365 #else /* !YYDEBUG */
5366 # define YYDPRINTF(Args)
5367 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
5368 # define YY_STACK_PRINT(Bottom, Top)
5369 # define YY_REDUCE_PRINT(Rule)
5370 #endif /* !YYDEBUG */
5371 
5372 
5373 /* YYINITDEPTH -- initial size of the parser's stacks. */
5374 #ifndef YYINITDEPTH
5375 # define YYINITDEPTH 200
5376 #endif
5377 
5378 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
5379  if the built-in stack extension method is used).
5380 
5381  Do not make this value too large; the results are undefined if
5382  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
5383  evaluated with infinite-precision integer arithmetic. */
5384 
5385 #ifndef YYMAXDEPTH
5386 # define YYMAXDEPTH 10000
5387 #endif
5388 
5389 
5390 #if YYERROR_VERBOSE
5391 
5392 # ifndef yystrlen
5393 # if defined __GLIBC__ && defined _STRING_H
5394 # define yystrlen strlen
5395 # else
5396 /* Return the length of YYSTR. */
5397 static YYSIZE_T
5398 yystrlen (const char *yystr)
5399 {
5400  YYSIZE_T yylen;
5401  for (yylen = 0; yystr[yylen]; yylen++)
5402  continue;
5403  return yylen;
5404 }
5405 # endif
5406 # endif
5407 
5408 # ifndef yystpcpy
5409 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
5410 # define yystpcpy stpcpy
5411 # else
5412 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
5413  YYDEST. */
5414 static char *
5415 yystpcpy (char *yydest, const char *yysrc)
5416 {
5417  char *yyd = yydest;
5418  const char *yys = yysrc;
5419 
5420  while ((*yyd++ = *yys++) != '\0')
5421  continue;
5422 
5423  return yyd - 1;
5424 }
5425 # endif
5426 # endif
5427 
5428 # ifndef yytnamerr
5429 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
5430  quotes and backslashes, so that it's suitable for yyerror. The
5431  heuristic is that double-quoting is unnecessary unless the string
5432  contains an apostrophe, a comma, or backslash (other than
5433  backslash-backslash). YYSTR is taken from yytname. If YYRES is
5434  null, do not copy; instead, return the length of what the result
5435  would have been. */
5436 static YYSIZE_T
5437 yytnamerr (char *yyres, const char *yystr)
5438 {
5439  if (*yystr == '"')
5440  {
5441  YYSIZE_T yyn = 0;
5442  char const *yyp = yystr;
5443 
5444  for (;;)
5445  switch (*++yyp)
5446  {
5447  case '\'':
5448  case ',':
5449  goto do_not_strip_quotes;
5450 
5451  case '\\':
5452  if (*++yyp != '\\')
5453  goto do_not_strip_quotes;
5454  /* Fall through. */
5455  default:
5456  if (yyres)
5457  yyres[yyn] = *yyp;
5458  yyn++;
5459  break;
5460 
5461  case '"':
5462  if (yyres)
5463  yyres[yyn] = '\0';
5464  return yyn;
5465  }
5466  do_not_strip_quotes: ;
5467  }
5468 
5469  if (! yyres)
5470  return yystrlen (yystr);
5471 
5472  return yystpcpy (yyres, yystr) - yyres;
5473 }
5474 # endif
5475 
5476 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
5477  about the unexpected token YYTOKEN for the state stack whose top is
5478  YYSSP.
5479 
5480  Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
5481  not large enough to hold the message. In that case, also set
5482  *YYMSG_ALLOC to the required number of bytes. Return 2 if the
5483  required number of bytes is too large to store. */
5484 static int
5485 yysyntax_error (struct parser_params *p, YYSIZE_T *yymsg_alloc, char **yymsg,
5486  yytype_int16 *yyssp, int yytoken)
5487 {
5488  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
5489  YYSIZE_T yysize = yysize0;
5490  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
5491  /* Internationalized format string. */
5492  const char *yyformat = YY_NULLPTR;
5493  /* Arguments of yyformat. */
5494  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
5495  /* Number of reported tokens (one for the "unexpected", one per
5496  "expected"). */
5497  int yycount = 0;
5498 
5499  /* There are many possibilities here to consider:
5500  - If this state is a consistent state with a default action, then
5501  the only way this function was invoked is if the default action
5502  is an error action. In that case, don't check for expected
5503  tokens because there are none.
5504  - The only way there can be no lookahead present (in yychar) is if
5505  this state is a consistent state with a default action. Thus,
5506  detecting the absence of a lookahead is sufficient to determine
5507  that there is no unexpected or expected token to report. In that
5508  case, just report a simple "syntax error".
5509  - Don't assume there isn't a lookahead just because this state is a
5510  consistent state with a default action. There might have been a
5511  previous inconsistent state, consistent state with a non-default
5512  action, or user semantic action that manipulated yychar.
5513  - Of course, the expected token list depends on states to have
5514  correct lookahead information, and it depends on the parser not
5515  to perform extra reductions after fetching a lookahead from the
5516  scanner and before detecting a syntax error. Thus, state merging
5517  (from LALR or IELR) and default reductions corrupt the expected
5518  token list. However, the list is correct for canonical LR with
5519  one exception: it will still contain any token that will not be
5520  accepted due to an error action in a later state.
5521  */
5522  if (yytoken != YYEMPTY)
5523  {
5524  int yyn = yypact[*yyssp];
5525  yyarg[yycount++] = yytname[yytoken];
5526  if (!yypact_value_is_default (yyn))
5527  {
5528  /* Start YYX at -YYN if negative to avoid negative indexes in
5529  YYCHECK. In other words, skip the first -YYN actions for
5530  this state because they are default actions. */
5531  int yyxbegin = yyn < 0 ? -yyn : 0;
5532  /* Stay within bounds of both yycheck and yytname. */
5533  int yychecklim = YYLAST - yyn + 1;
5534  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
5535  int yyx;
5536 
5537  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
5538  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
5539  && !yytable_value_is_error (yytable[yyx + yyn]))
5540  {
5541  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
5542  {
5543  yycount = 1;
5544  yysize = yysize0;
5545  break;
5546  }
5547  yyarg[yycount++] = yytname[yyx];
5548  {
5549  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
5550  if (! (yysize <= yysize1
5551  && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
5552  return 2;
5553  yysize = yysize1;
5554  }
5555  }
5556  }
5557  }
5558 
5559  switch (yycount)
5560  {
5561 # define YYCASE_(N, S) \
5562  case N: \
5563  yyformat = S; \
5564  break
5565  YYCASE_(0, YY_("syntax error"));
5566  YYCASE_(1, YY_("syntax error, unexpected %s"));
5567  YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
5568  YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
5569  YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
5570  YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
5571 # undef YYCASE_
5572  }
5573 
5574  {
5575  YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
5576  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
5577  return 2;
5578  yysize = yysize1;
5579  }
5580 
5581  if (*yymsg_alloc < yysize)
5582  {
5583  *yymsg_alloc = 2 * yysize;
5584  if (! (yysize <= *yymsg_alloc
5585  && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
5586  *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
5587  return 1;
5588  }
5589 
5590  /* Avoid sprintf, as that infringes on the user's name space.
5591  Don't have undefined behavior even if the translation
5592  produced a string with the wrong number of "%s"s. */
5593  {
5594  char *yyp = *yymsg;
5595  int yyi = 0;
5596  while ((*yyp = *yyformat) != '\0')
5597  if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
5598  {
5599  yyp += yytnamerr (yyp, yyarg[yyi++]);
5600  yyformat += 2;
5601  }
5602  else
5603  {
5604  yyp++;
5605  yyformat++;
5606  }
5607  }
5608  return 0;
5609 }
5610 #endif /* YYERROR_VERBOSE */
5611 
5612 /*-----------------------------------------------.
5613 | Release the memory associated to this symbol. |
5614 `-----------------------------------------------*/
5615 
5616 static void
5617 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *p)
5618 {
5619  YYUSE (yyvaluep);
5620  YYUSE (yylocationp);
5621  YYUSE (p);
5622  if (!yymsg)
5623  yymsg = "Deleting";
5624  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
5625 
5627  YYUSE (yytype);
5629 }
5630 
5631 
5632 
5633 
5634 /*----------.
5635 | yyparse. |
5636 `----------*/
5637 
5638 int
5640 {
5641 /* The lookahead symbol. */
5642 int yychar;
5643 
5644 
5645 /* The semantic value of the lookahead symbol. */
5646 /* Default value used for initialization, for pacifying older GCCs
5647  or non-GCC compilers. */
5648 YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
5649 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
5650 
5651 /* Location data for the lookahead symbol. */
5652 static YYLTYPE yyloc_default
5653 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
5654  = { 1, 1, 1, 1 }
5655 # endif
5656 ;
5657 YYLTYPE yylloc = yyloc_default;
5658 
5659  /* Number of syntax errors so far. */
5660  int yynerrs;
5661 
5662  int yystate;
5663  /* Number of tokens to shift before error messages enabled. */
5664  int yyerrstatus;
5665 
5666  /* The stacks and their tools:
5667  'yyss': related to states.
5668  'yyvs': related to semantic values.
5669  'yyls': related to locations.
5670 
5671  Refer to the stacks through separate pointers, to allow yyoverflow
5672  to reallocate them elsewhere. */
5673 
5674  /* The state stack. */
5675  yytype_int16 yyssa[YYINITDEPTH];
5676  yytype_int16 *yyss;
5677  yytype_int16 *yyssp;
5678 
5679  /* The semantic value stack. */
5680  YYSTYPE yyvsa[YYINITDEPTH];
5681  YYSTYPE *yyvs;
5682  YYSTYPE *yyvsp;
5683 
5684  /* The location stack. */
5685  YYLTYPE yylsa[YYINITDEPTH];
5686  YYLTYPE *yyls;
5687  YYLTYPE *yylsp;
5688 
5689  /* The locations where the error started and ended. */
5690  YYLTYPE yyerror_range[3];
5691 
5692  YYSIZE_T yystacksize;
5693 
5694  int yyn;
5695  int yyresult;
5696  /* Lookahead token as an internal (translated) token number. */
5697  int yytoken = 0;
5698  /* The variables used to return semantic value and location from the
5699  action routines. */
5700  YYSTYPE yyval;
5701  YYLTYPE yyloc;
5702 
5703 #if YYERROR_VERBOSE
5704  /* Buffer for error messages, and its allocated size. */
5705  char yymsgbuf[128];
5706  char *yymsg = yymsgbuf;
5707  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
5708 #endif
5709 
5710 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
5711 
5712  /* The number of symbols on the RHS of the reduced rule.
5713  Keep to zero when no symbol should be popped. */
5714  int yylen = 0;
5715 
5716  yyssp = yyss = yyssa;
5717  yyvsp = yyvs = yyvsa;
5718  yylsp = yyls = yylsa;
5719  yystacksize = YYINITDEPTH;
5720 
5721  YYDPRINTF ((p, "Starting parse\n"));
5722 
5723  yystate = 0;
5724  yyerrstatus = 0;
5725  yynerrs = 0;
5726  yychar = YYEMPTY; /* Cause a token to be read. */
5727 
5728 /* User initialization code. */
5729 #line 974 "parse.y" /* yacc.c:1429 */
5730 {
5731  RUBY_SET_YYLLOC_OF_NONE(yylloc);
5732 }
5733 
5734 #line 5730 "parse.c" /* yacc.c:1429 */
5735  yylsp[0] = yylloc;
5736  goto yysetstate;
5737 
5738 /*------------------------------------------------------------.
5739 | yynewstate -- Push a new state, which is found in yystate. |
5740 `------------------------------------------------------------*/
5741  yynewstate:
5742  /* In all cases, when you get here, the value and location stacks
5743  have just been pushed. So pushing a state here evens the stacks. */
5744  yyssp++;
5745 
5746  yysetstate:
5747  *yyssp = yystate;
5748 
5749  if (yyss + yystacksize - 1 <= yyssp)
5750  {
5751  /* Get the current used size of the three stacks, in elements. */
5752  YYSIZE_T yysize = yyssp - yyss + 1;
5753 
5754 #ifdef yyoverflow
5755  {
5756  /* Give user a chance to reallocate the stack. Use copies of
5757  these so that the &'s don't force the real ones into
5758  memory. */
5759  YYSTYPE *yyvs1 = yyvs;
5760  yytype_int16 *yyss1 = yyss;
5761  YYLTYPE *yyls1 = yyls;
5762 
5763  /* Each stack pointer address is followed by the size of the
5764  data in use in that stack, in bytes. This used to be a
5765  conditional around just the two extra args, but that might
5766  be undefined if yyoverflow is a macro. */
5767  yyoverflow (YY_("memory exhausted"),
5768  &yyss1, yysize * sizeof (*yyssp),
5769  &yyvs1, yysize * sizeof (*yyvsp),
5770  &yyls1, yysize * sizeof (*yylsp),
5771  &yystacksize);
5772 
5773  yyls = yyls1;
5774  yyss = yyss1;
5775  yyvs = yyvs1;
5776  }
5777 #else /* no yyoverflow */
5778 # ifndef YYSTACK_RELOCATE
5779  goto yyexhaustedlab;
5780 # else
5781  /* Extend the stack our own way. */
5782  if (YYMAXDEPTH <= yystacksize)
5783  goto yyexhaustedlab;
5784  yystacksize *= 2;
5785  if (YYMAXDEPTH < yystacksize)
5786  yystacksize = YYMAXDEPTH;
5787 
5788  {
5789  yytype_int16 *yyss1 = yyss;
5790  union yyalloc *yyptr =
5791  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
5792  if (! yyptr)
5793  goto yyexhaustedlab;
5794  YYSTACK_RELOCATE (yyss_alloc, yyss);
5795  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
5796  YYSTACK_RELOCATE (yyls_alloc, yyls);
5797 # undef YYSTACK_RELOCATE
5798  if (yyss1 != yyssa)
5799  YYSTACK_FREE (yyss1);
5800  }
5801 # endif
5802 #endif /* no yyoverflow */
5803 
5804  yyssp = yyss + yysize - 1;
5805  yyvsp = yyvs + yysize - 1;
5806  yylsp = yyls + yysize - 1;
5807 
5808  YYDPRINTF ((p, "Stack size increased to %lu\n",
5809  (unsigned long int) yystacksize));
5810 
5811  if (yyss + yystacksize - 1 <= yyssp)
5812  YYABORT;
5813  }
5814 
5815  YYDPRINTF ((p, "Entering state %d\n", yystate));
5816 
5817  if (yystate == YYFINAL)
5818  YYACCEPT;
5819 
5820  goto yybackup;
5821 
5822 /*-----------.
5823 | yybackup. |
5824 `-----------*/
5825 yybackup:
5826 
5827  /* Do appropriate processing given the current state. Read a
5828  lookahead token if we need one and don't already have one. */
5829 
5830  /* First try to decide what to do without reference to lookahead token. */
5831  yyn = yypact[yystate];
5832  if (yypact_value_is_default (yyn))
5833  goto yydefault;
5834 
5835  /* Not known => get a lookahead token if don't already have one. */
5836 
5837  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
5838  if (yychar == YYEMPTY)
5839  {
5840  YYDPRINTF ((p, "Reading a token: "));
5841  yychar = yylex (&yylval, &yylloc, p);
5842  }
5843 
5844  if (yychar <= YYEOF)
5845  {
5846  yychar = yytoken = YYEOF;
5847  YYDPRINTF ((p, "Now at end of input.\n"));
5848  }
5849  else
5850  {
5851  yytoken = YYTRANSLATE (yychar);
5852  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
5853  }
5854 
5855  /* If the proper action on seeing token YYTOKEN is to reduce or to
5856  detect an error, take that action. */
5857  yyn += yytoken;
5858  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
5859  goto yydefault;
5860  yyn = yytable[yyn];
5861  if (yyn <= 0)
5862  {
5863  if (yytable_value_is_error (yyn))
5864  goto yyerrlab;
5865  yyn = -yyn;
5866  goto yyreduce;
5867  }
5868 
5869  /* Count tokens shifted since error; after three, turn off error
5870  status. */
5871  if (yyerrstatus)
5872  yyerrstatus--;
5873 
5874  /* Shift the lookahead token. */
5875  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
5876 
5877  /* Discard the shifted token. */
5878  yychar = YYEMPTY;
5879 
5880  yystate = yyn;
5882  *++yyvsp = yylval;
5884  *++yylsp = yylloc;
5885  goto yynewstate;
5886 
5887 
5888 /*-----------------------------------------------------------.
5889 | yydefault -- do the default action for the current state. |
5890 `-----------------------------------------------------------*/
5891 yydefault:
5892  yyn = yydefact[yystate];
5893  if (yyn == 0)
5894  goto yyerrlab;
5895  goto yyreduce;
5896 
5897 
5898 /*-----------------------------.
5899 | yyreduce -- Do a reduction. |
5900 `-----------------------------*/
5901 yyreduce:
5902  /* yyn is the number of a rule to reduce with. */
5903  yylen = yyr2[yyn];
5904 
5905  /* If YYLEN is nonzero, implement the default value of the action:
5906  '$$ = $1'.
5907 
5908  Otherwise, the following line sets YYVAL to garbage.
5909  This behavior is undocumented and Bison
5910  users should not rely upon it. Assigning to YYVAL
5911  unconditionally makes the parser a bit smaller, and it avoids a
5912  GCC warning that YYVAL may be used uninitialized. */
5913  yyval = yyvsp[1-yylen];
5914 
5915  /* Default location. */
5916  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
5917  YY_REDUCE_PRINT (yyn);
5918  switch (yyn)
5919  {
5920  case 2:
5921 #line 1176 "parse.y" /* yacc.c:1646 */
5922  {
5923  SET_LEX_STATE(EXPR_BEG);
5924  local_push(p, ifndef_ripper(1)+0);
5925  }
5926 #line 5922 "parse.c" /* yacc.c:1646 */
5927  break;
5928 
5929  case 3:
5930 #line 1181 "parse.y" /* yacc.c:1646 */
5931  {
5932  /*%%%*/
5933  if ((yyvsp[0].node) && !compile_for_eval) {
5934  NODE *node = (yyvsp[0].node);
5935  /* last expression should not be void */
5936  if (nd_type(node) == NODE_BLOCK) {
5937  while (node->nd_next) {
5938  node = node->nd_next;
5939  }
5940  node = node->nd_head;
5941  }
5942  node = remove_begin(node);
5943  void_expr(p, node);
5944  }
5945  p->eval_tree = NEW_SCOPE(0, block_append(p, p->eval_tree, (yyvsp[0].node)), &(yyloc));
5946  /*% %*/
5947  /*% ripper[final]: program!($2) %*/
5948  local_pop(p);
5949  }
5950 #line 5946 "parse.c" /* yacc.c:1646 */
5951  break;
5952 
5953  case 4:
5954 #line 1203 "parse.y" /* yacc.c:1646 */
5955  {
5956  (yyval.node) = void_stmts(p, (yyvsp[-1].node));
5957  }
5958 #line 5954 "parse.c" /* yacc.c:1646 */
5959  break;
5960 
5961  case 5:
5962 #line 1209 "parse.y" /* yacc.c:1646 */
5963  {
5964  /*%%%*/
5965  (yyval.node) = NEW_BEGIN(0, &(yyloc));
5966  /*% %*/
5967  /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
5968  }
5969 #line 5965 "parse.c" /* yacc.c:1646 */
5970  break;
5971 
5972  case 6:
5973 #line 1216 "parse.y" /* yacc.c:1646 */
5974  {
5975  /*%%%*/
5976  (yyval.node) = newline_node((yyvsp[0].node));
5977  /*% %*/
5978  /*% ripper: stmts_add!(stmts_new!, $1) %*/
5979  }
5980 #line 5976 "parse.c" /* yacc.c:1646 */
5981  break;
5982 
5983  case 7:
5984 #line 1223 "parse.y" /* yacc.c:1646 */
5985  {
5986  /*%%%*/
5987  (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
5988  /*% %*/
5989  /*% ripper: stmts_add!($1, $3) %*/
5990  }
5991 #line 5987 "parse.c" /* yacc.c:1646 */
5992  break;
5993 
5994  case 8:
5995 #line 1230 "parse.y" /* yacc.c:1646 */
5996  {
5997  (yyval.node) = remove_begin((yyvsp[0].node));
5998  }
5999 #line 5995 "parse.c" /* yacc.c:1646 */
6000  break;
6001 
6002  case 10:
6003 #line 1237 "parse.y" /* yacc.c:1646 */
6004  {
6005  (yyval.node) = (yyvsp[0].node);
6006  }
6007 #line 6003 "parse.c" /* yacc.c:1646 */
6008  break;
6009 
6010  case 11:
6011 #line 1243 "parse.y" /* yacc.c:1646 */
6012  {
6013  /*%%%*/
6014  p->eval_tree_begin = block_append(p, p->eval_tree_begin,
6015  NEW_BEGIN((yyvsp[-1].node), &(yyloc)));
6016  (yyval.node) = NEW_BEGIN(0, &(yyloc));
6017  /*% %*/
6018  /*% ripper: BEGIN!($2) %*/
6019  }
6020 #line 6016 "parse.c" /* yacc.c:1646 */
6021  break;
6022 
6023  case 12:
6024 #line 1255 "parse.y" /* yacc.c:1646 */
6025  {if (!(yyvsp[-1].node)) {yyerror1(&(yylsp[0]), "else without rescue is useless");}}
6026 #line 6022 "parse.c" /* yacc.c:1646 */
6027  break;
6028 
6029  case 13:
6030 #line 1258 "parse.y" /* yacc.c:1646 */
6031  {
6032  /*%%%*/
6033  (yyval.node) = new_bodystmt(p, (yyvsp[-5].node), (yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
6034  /*% %*/
6035  /*% ripper: bodystmt!(escape_Qundef($1), escape_Qundef($2), escape_Qundef($5), escape_Qundef($6)) %*/
6036  }
6037 #line 6033 "parse.c" /* yacc.c:1646 */
6038  break;
6039 
6040  case 14:
6041 #line 1267 "parse.y" /* yacc.c:1646 */
6042  {
6043  /*%%%*/
6044  (yyval.node) = new_bodystmt(p, (yyvsp[-2].node), (yyvsp[-1].node), 0, (yyvsp[0].node), &(yyloc));
6045  /*% %*/
6046  /*% ripper: bodystmt!(escape_Qundef($1), escape_Qundef($2), Qnil, escape_Qundef($3)) %*/
6047  }
6048 #line 6044 "parse.c" /* yacc.c:1646 */
6049  break;
6050 
6051  case 15:
6052 #line 1276 "parse.y" /* yacc.c:1646 */
6053  {
6054  (yyval.node) = void_stmts(p, (yyvsp[-1].node));
6055  }
6056 #line 6052 "parse.c" /* yacc.c:1646 */
6057  break;
6058 
6059  case 16:
6060 #line 1282 "parse.y" /* yacc.c:1646 */
6061  {
6062  /*%%%*/
6063  (yyval.node) = NEW_BEGIN(0, &(yyloc));
6064  /*% %*/
6065  /*% ripper: stmts_add!(stmts_new!, void_stmt!) %*/
6066  }
6067 #line 6063 "parse.c" /* yacc.c:1646 */
6068  break;
6069 
6070  case 17:
6071 #line 1289 "parse.y" /* yacc.c:1646 */
6072  {
6073  /*%%%*/
6074  (yyval.node) = newline_node((yyvsp[0].node));
6075  /*% %*/
6076  /*% ripper: stmts_add!(stmts_new!, $1) %*/
6077  }
6078 #line 6074 "parse.c" /* yacc.c:1646 */
6079  break;
6080 
6081  case 18:
6082 #line 1296 "parse.y" /* yacc.c:1646 */
6083  {
6084  /*%%%*/
6085  (yyval.node) = block_append(p, (yyvsp[-2].node), newline_node((yyvsp[0].node)));
6086  /*% %*/
6087  /*% ripper: stmts_add!($1, $3) %*/
6088  }
6089 #line 6085 "parse.c" /* yacc.c:1646 */
6090  break;
6091 
6092  case 19:
6093 #line 1303 "parse.y" /* yacc.c:1646 */
6094  {
6095  (yyval.node) = remove_begin((yyvsp[0].node));
6096  }
6097 #line 6093 "parse.c" /* yacc.c:1646 */
6098  break;
6099 
6100  case 20:
6101 #line 1309 "parse.y" /* yacc.c:1646 */
6102  {
6103  (yyval.node) = (yyvsp[0].node);
6104  }
6105 #line 6101 "parse.c" /* yacc.c:1646 */
6106  break;
6107 
6108  case 21:
6109 #line 1313 "parse.y" /* yacc.c:1646 */
6110  {
6111  yyerror1(&(yylsp[0]), "BEGIN is permitted only at toplevel");
6112  }
6113 #line 6109 "parse.c" /* yacc.c:1646 */
6114  break;
6115 
6116  case 22:
6117 #line 1317 "parse.y" /* yacc.c:1646 */
6118  {
6119  (yyval.node) = (yyvsp[0].node);
6120  }
6121 #line 6117 "parse.c" /* yacc.c:1646 */
6122  break;
6123 
6124  case 23:
6125 #line 1322 "parse.y" /* yacc.c:1646 */
6126  {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
6127 #line 6123 "parse.c" /* yacc.c:1646 */
6128  break;
6129 
6130  case 24:
6131 #line 1323 "parse.y" /* yacc.c:1646 */
6132  {
6133  /*%%%*/
6134  (yyval.node) = NEW_ALIAS((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
6135  /*% %*/
6136  /*% ripper: alias!($2, $4) %*/
6137  }
6138 #line 6134 "parse.c" /* yacc.c:1646 */
6139  break;
6140 
6141  case 25:
6142 #line 1330 "parse.y" /* yacc.c:1646 */
6143  {
6144  /*%%%*/
6145  (yyval.node) = NEW_VALIAS((yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
6146  /*% %*/
6147  /*% ripper: var_alias!($2, $3) %*/
6148  }
6149 #line 6145 "parse.c" /* yacc.c:1646 */
6150  break;
6151 
6152  case 26:
6153 #line 1337 "parse.y" /* yacc.c:1646 */
6154  {
6155  /*%%%*/
6156  char buf[2];
6157  buf[0] = '$';
6158  buf[1] = (char)(yyvsp[0].node)->nd_nth;
6159  (yyval.node) = NEW_VALIAS((yyvsp[-1].id), rb_intern2(buf, 2), &(yyloc));
6160  /*% %*/
6161  /*% ripper: var_alias!($2, $3) %*/
6162  }
6163 #line 6159 "parse.c" /* yacc.c:1646 */
6164  break;
6165 
6166  case 27:
6167 #line 1347 "parse.y" /* yacc.c:1646 */
6168  {
6169  /*%%%*/
6170  yyerror1(&(yylsp[0]), "can't make alias for the number variables");
6171  (yyval.node) = NEW_BEGIN(0, &(yyloc));
6172  /*% %*/
6173  /*% ripper[error]: alias_error!(var_alias!($2, $3)) %*/
6174  }
6175 #line 6171 "parse.c" /* yacc.c:1646 */
6176  break;
6177 
6178  case 28:
6179 #line 1355 "parse.y" /* yacc.c:1646 */
6180  {
6181  /*%%%*/
6182  (yyval.node) = (yyvsp[0].node);
6183  /*% %*/
6184  /*% ripper: undef!($2) %*/
6185  }
6186 #line 6182 "parse.c" /* yacc.c:1646 */
6187  break;
6188 
6189  case 29:
6190 #line 1362 "parse.y" /* yacc.c:1646 */
6191  {
6192  /*%%%*/
6193  (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc));
6194  fixpos((yyval.node), (yyvsp[0].node));
6195  /*% %*/
6196  /*% ripper: if_mod!($3, $1) %*/
6197  }
6198 #line 6194 "parse.c" /* yacc.c:1646 */
6199  break;
6200 
6201  case 30:
6202 #line 1370 "parse.y" /* yacc.c:1646 */
6203  {
6204  /*%%%*/
6205  (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc));
6206  fixpos((yyval.node), (yyvsp[0].node));
6207  /*% %*/
6208  /*% ripper: unless_mod!($3, $1) %*/
6209  }
6210 #line 6206 "parse.c" /* yacc.c:1646 */
6211  break;
6212 
6213  case 31:
6214 #line 1378 "parse.y" /* yacc.c:1646 */
6215  {
6216  /*%%%*/
6217  if ((yyvsp[-2].node) && nd_type((yyvsp[-2].node)) == NODE_BEGIN) {
6218  (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node)->nd_body, 0, &(yyloc));
6219  }
6220  else {
6221  (yyval.node) = NEW_WHILE(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc));
6222  }
6223  /*% %*/
6224  /*% ripper: while_mod!($3, $1) %*/
6225  }
6226 #line 6222 "parse.c" /* yacc.c:1646 */
6227  break;
6228 
6229  case 32:
6230 #line 1390 "parse.y" /* yacc.c:1646 */
6231  {
6232  /*%%%*/
6233  if ((yyvsp[-2].node) && nd_type((yyvsp[-2].node)) == NODE_BEGIN) {
6234  (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node)->nd_body, 0, &(yyloc));
6235  }
6236  else {
6237  (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[0].node), &(yylsp[0])), (yyvsp[-2].node), 1, &(yyloc));
6238  }
6239  /*% %*/
6240  /*% ripper: until_mod!($3, $1) %*/
6241  }
6242 #line 6238 "parse.c" /* yacc.c:1646 */
6243  break;
6244 
6245  case 33:
6246 #line 1402 "parse.y" /* yacc.c:1646 */
6247  {
6248  /*%%%*/
6249  NODE *resq;
6250  YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
6251  resq = NEW_RESBODY(0, remove_begin((yyvsp[0].node)), 0, &loc);
6252  (yyval.node) = NEW_RESCUE(remove_begin((yyvsp[-2].node)), resq, 0, &(yyloc));
6253  /*% %*/
6254  /*% ripper: rescue_mod!($1, $3) %*/
6255  }
6256 #line 6252 "parse.c" /* yacc.c:1646 */
6257  break;
6258 
6259  case 34:
6260 #line 1412 "parse.y" /* yacc.c:1646 */
6261  {
6262  if (p->in_def) {
6263  rb_warn0("END in method; use at_exit");
6264  }
6265  /*%%%*/
6266  {
6267  NODE *scope = NEW_NODE(
6268  NODE_SCOPE, 0 /* tbl */, (yyvsp[-1].node) /* body */, 0 /* args */, &(yyloc));
6269  (yyval.node) = NEW_POSTEXE(scope, &(yyloc));
6270  }
6271  /*% %*/
6272  /*% ripper: END!($3) %*/
6273  }
6274 #line 6270 "parse.c" /* yacc.c:1646 */
6275  break;
6276 
6277  case 36:
6278 #line 1427 "parse.y" /* yacc.c:1646 */
6279  {
6280  /*%%%*/
6281  value_expr((yyvsp[0].node));
6282  (yyval.node) = node_assign(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
6283  /*% %*/
6284  /*% ripper: massign!($1, $3) %*/
6285  }
6286 #line 6282 "parse.c" /* yacc.c:1646 */
6287  break;
6288 
6289  case 37:
6290 #line 1435 "parse.y" /* yacc.c:1646 */
6291  {
6292  /*%%%*/
6293  value_expr((yyvsp[0].node));
6294  (yyval.node) = node_assign(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
6295  /*% %*/
6296  /*% ripper: assign!($1, $3) %*/
6297  }
6298 #line 6294 "parse.c" /* yacc.c:1646 */
6299  break;
6300 
6301  case 38:
6302 #line 1443 "parse.y" /* yacc.c:1646 */
6303  {
6304  /*%%%*/
6305  YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
6306  value_expr((yyvsp[-2].node));
6307  (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));
6308  /*% %*/
6309  /*% ripper: massign!($1, rescue_mod!($3, $5)) %*/
6310  }
6311 #line 6307 "parse.c" /* yacc.c:1646 */
6312  break;
6313 
6314  case 39:
6315 #line 1452 "parse.y" /* yacc.c:1646 */
6316  {
6317  /*%%%*/
6318  (yyval.node) = node_assign(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
6319  /*% %*/
6320  /*% ripper: massign!($1, $3) %*/
6321  }
6322 #line 6318 "parse.c" /* yacc.c:1646 */
6323  break;
6324 
6325  case 41:
6326 #line 1462 "parse.y" /* yacc.c:1646 */
6327  {
6328  /*%%%*/
6329  value_expr((yyvsp[0].node));
6330  (yyval.node) = node_assign(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
6331  /*% %*/
6332  /*% ripper: assign!($1, $3) %*/
6333  }
6334 #line 6330 "parse.c" /* yacc.c:1646 */
6335  break;
6336 
6337  case 42:
6338 #line 1470 "parse.y" /* yacc.c:1646 */
6339  {
6340  /*%%%*/
6341  value_expr((yyvsp[0].node));
6342  (yyval.node) = new_op_assign(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
6343  /*% %*/
6344  /*% ripper: opassign!($1, $2, $3) %*/
6345  }
6346 #line 6342 "parse.c" /* yacc.c:1646 */
6347  break;
6348 
6349  case 43:
6350 #line 1478 "parse.y" /* yacc.c:1646 */
6351  {
6352  /*%%%*/
6353  value_expr((yyvsp[0].node));
6354  (yyval.node) = new_ary_op_assign(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-3]), &(yyloc));
6355  /*% %*/
6356  /*% ripper: opassign!(aref_field!($1, escape_Qundef($3)), $5, $6) %*/
6357 
6358  }
6359 #line 6355 "parse.c" /* yacc.c:1646 */
6360  break;
6361 
6362  case 44:
6363 #line 1487 "parse.y" /* yacc.c:1646 */
6364  {
6365  /*%%%*/
6366  value_expr((yyvsp[0].node));
6367  (yyval.node) = new_attr_op_assign(p, (yyvsp[-4].node), (yyvsp[-3].id), (yyvsp[-2].id), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
6368  /*% %*/
6369  /*% ripper: opassign!(field!($1, $2, $3), $4, $5) %*/
6370  }
6371 #line 6367 "parse.c" /* yacc.c:1646 */
6372  break;
6373 
6374  case 45:
6375 #line 1495 "parse.y" /* yacc.c:1646 */
6376  {
6377  /*%%%*/
6378  value_expr((yyvsp[0].node));
6379  (yyval.node) = new_attr_op_assign(p, (yyvsp[-4].node), (yyvsp[-3].id), (yyvsp[-2].id), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
6380  /*% %*/
6381  /*% ripper: opassign!(field!($1, $2, $3), $4, $5) %*/
6382  }
6383 #line 6379 "parse.c" /* yacc.c:1646 */
6384  break;
6385 
6386  case 46:
6387 #line 1503 "parse.y" /* yacc.c:1646 */
6388  {
6389  /*%%%*/
6390  YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-2]));
6391  (yyval.node) = new_const_op_assign(p, NEW_COLON2((yyvsp[-4].node), (yyvsp[-2].id), &loc), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
6392  /*% %*/
6393  /*% ripper: opassign!(const_path_field!($1, $3), $4, $5) %*/
6394  }
6395 #line 6391 "parse.c" /* yacc.c:1646 */
6396  break;
6397 
6398  case 47:
6399 #line 1511 "parse.y" /* yacc.c:1646 */
6400  {
6401  /*%%%*/
6402  value_expr((yyvsp[0].node));
6403  (yyval.node) = new_attr_op_assign(p, (yyvsp[-4].node), ID2VAL(idCOLON2), (yyvsp[-2].id), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
6404  /*% %*/
6405  /*% ripper: opassign!(field!($1, ID2VAL(idCOLON2), $3), $4, $5) %*/
6406  }
6407 #line 6403 "parse.c" /* yacc.c:1646 */
6408  break;
6409 
6410  case 48:
6411 #line 1519 "parse.y" /* yacc.c:1646 */
6412  {
6413  /*%%%*/
6414  rb_backref_error(p, (yyvsp[-2].node));
6415  (yyval.node) = NEW_BEGIN(0, &(yyloc));
6416  /*% %*/
6417  /*% ripper[error]: assign_error!(assign!(var_field(p, $1), $3)) %*/
6418  }
6419 #line 6415 "parse.c" /* yacc.c:1646 */
6420  break;
6421 
6422  case 49:
6423 #line 1529 "parse.y" /* yacc.c:1646 */
6424  {
6425  value_expr((yyvsp[0].node));
6426  (yyval.node) = (yyvsp[0].node);
6427  }
6428 #line 6424 "parse.c" /* yacc.c:1646 */
6429  break;
6430 
6431  case 50:
6432 #line 1534 "parse.y" /* yacc.c:1646 */
6433  {
6434  /*%%%*/
6435  YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
6436  value_expr((yyvsp[-2].node));
6437  (yyval.node) = NEW_RESCUE((yyvsp[-2].node), NEW_RESBODY(0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
6438  /*% %*/
6439  /*% ripper: rescue_mod!($1, $3) %*/
6440  }
6441 #line 6437 "parse.c" /* yacc.c:1646 */
6442  break;
6443 
6444  case 53:
6445 #line 1547 "parse.y" /* yacc.c:1646 */
6446  {
6447  (yyval.node) = logop(p, idAND, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
6448  }
6449 #line 6445 "parse.c" /* yacc.c:1646 */
6450  break;
6451 
6452  case 54:
6453 #line 1551 "parse.y" /* yacc.c:1646 */
6454  {
6455  (yyval.node) = logop(p, idOR, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
6456  }
6457 #line 6453 "parse.c" /* yacc.c:1646 */
6458  break;
6459 
6460  case 55:
6461 #line 1555 "parse.y" /* yacc.c:1646 */
6462  {
6463  (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
6464  }
6465 #line 6461 "parse.c" /* yacc.c:1646 */
6466  break;
6467 
6468  case 56:
6469 #line 1559 "parse.y" /* yacc.c:1646 */
6470  {
6471  (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
6472  }
6473 #line 6469 "parse.c" /* yacc.c:1646 */
6474  break;
6475 
6476  case 57:
6477 #line 1563 "parse.y" /* yacc.c:1646 */
6478  {
6479  value_expr((yyvsp[-1].node));
6480  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
6481  p->command_start = FALSE;
6482  (yyval.num) = p->in_kwarg;
6483  p->in_kwarg = 1;
6484  }
6485 #line 6481 "parse.c" /* yacc.c:1646 */
6486  break;
6487 
6488  case 58:
6489 #line 1570 "parse.y" /* yacc.c:1646 */
6490  {(yyval.tbl) = push_pvtbl(p);}
6491 #line 6487 "parse.c" /* yacc.c:1646 */
6492  break;
6493 
6494  case 59:
6495 #line 1572 "parse.y" /* yacc.c:1646 */
6496  {pop_pvtbl(p, (yyvsp[-1].tbl));}
6497 #line 6493 "parse.c" /* yacc.c:1646 */
6498  break;
6499 
6500  case 60:
6501 #line 1573 "parse.y" /* yacc.c:1646 */
6502  {
6503  p->in_kwarg = !!(yyvsp[-3].num);
6504  /*%%%*/
6505  (yyval.node) = new_case3(p, (yyvsp[-5].node), NEW_IN((yyvsp[-1].node), 0, 0, &(yylsp[-1])), &(yyloc));
6506  /*% %*/
6507  /*% ripper: case!($1, in!($5, Qnil, Qnil)) %*/
6508  }
6509 #line 6505 "parse.c" /* yacc.c:1646 */
6510  break;
6511 
6512  case 62:
6513 #line 1584 "parse.y" /* yacc.c:1646 */
6514  {
6515  value_expr((yyvsp[0].node));
6516  (yyval.node) = (yyvsp[0].node);
6517  }
6518 #line 6514 "parse.c" /* yacc.c:1646 */
6519  break;
6520 
6521  case 63:
6522 #line 1590 "parse.y" /* yacc.c:1646 */
6523  {COND_PUSH(1);}
6524 #line 6520 "parse.c" /* yacc.c:1646 */
6525  break;
6526 
6527  case 64:
6528 #line 1590 "parse.y" /* yacc.c:1646 */
6529  {COND_POP();}
6530 #line 6526 "parse.c" /* yacc.c:1646 */
6531  break;
6532 
6533  case 65:
6534 #line 1591 "parse.y" /* yacc.c:1646 */
6535  {
6536  (yyval.node) = (yyvsp[-2].node);
6537  }
6538 #line 6534 "parse.c" /* yacc.c:1646 */
6539  break;
6540 
6541  case 69:
6542 #line 1602 "parse.y" /* yacc.c:1646 */
6543  {
6544  /*%%%*/
6545  (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
6546  /*% %*/
6547  /*% ripper: method_add_arg!(call!($1, $2, $3), $4) %*/
6548  }
6549 #line 6545 "parse.c" /* yacc.c:1646 */
6550  break;
6551 
6552  case 70:
6553 #line 1611 "parse.y" /* yacc.c:1646 */
6554  {
6555  (yyval.node) = (yyvsp[-1].node);
6556  /*%%%*/
6557  (yyval.node)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
6558  nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
6559  /*% %*/
6560  }
6561 #line 6557 "parse.c" /* yacc.c:1646 */
6562  break;
6563 
6564  case 71:
6565 #line 1621 "parse.y" /* yacc.c:1646 */
6566  {
6567  /*%%%*/
6568  (yyval.node) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
6569  nd_set_line((yyval.node), p->tokline);
6570  /*% %*/
6571  /*% ripper: $1 %*/
6572  }
6573 #line 6569 "parse.c" /* yacc.c:1646 */
6574  break;
6575 
6576  case 72:
6577 #line 1631 "parse.y" /* yacc.c:1646 */
6578  {
6579  /*%%%*/
6580  (yyvsp[-1].node)->nd_args = (yyvsp[0].node);
6581  nd_set_last_loc((yyvsp[-1].node), (yylsp[0]).end_pos);
6582  (yyval.node) = (yyvsp[-1].node);
6583  /*% %*/
6584  /*% ripper: command!($1, $2) %*/
6585  }
6586 #line 6582 "parse.c" /* yacc.c:1646 */
6587  break;
6588 
6589  case 73:
6590 #line 1640 "parse.y" /* yacc.c:1646 */
6591  {
6592  /*%%%*/
6593  block_dup_check(p, (yyvsp[-1].node), (yyvsp[0].node));
6594  (yyvsp[-2].node)->nd_args = (yyvsp[-1].node);
6595  (yyval.node) = method_add_block(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
6596  fixpos((yyval.node), (yyvsp[-2].node));
6597  nd_set_last_loc((yyvsp[-2].node), (yylsp[-1]).end_pos);
6598  /*% %*/
6599  /*% ripper: method_add_block!(command!($1, $2), $3) %*/
6600  }
6601 #line 6597 "parse.c" /* yacc.c:1646 */
6602  break;
6603 
6604  case 74:
6605 #line 1651 "parse.y" /* yacc.c:1646 */
6606  {
6607  /*%%%*/
6608  (yyval.node) = new_command_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), Qnull, &(yylsp[-1]), &(yyloc));
6609  /*% %*/
6610  /*% ripper: command_call!($1, $2, $3, $4) %*/
6611  }
6612 #line 6608 "parse.c" /* yacc.c:1646 */
6613  break;
6614 
6615  case 75:
6616 #line 1658 "parse.y" /* yacc.c:1646 */
6617  {
6618  /*%%%*/
6619  (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
6620  /*% %*/
6621  /*% ripper: method_add_block!(command_call!($1, $2, $3, $4), $5) %*/
6622  }
6623 #line 6619 "parse.c" /* yacc.c:1646 */
6624  break;
6625 
6626  case 76:
6627 #line 1665 "parse.y" /* yacc.c:1646 */
6628  {
6629  /*%%%*/
6630  (yyval.node) = new_command_qcall(p, ID2VAL(idCOLON2), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), Qnull, &(yylsp[-1]), &(yyloc));
6631  /*% %*/
6632  /*% ripper: command_call!($1, ID2VAL(idCOLON2), $3, $4) %*/
6633  }
6634 #line 6630 "parse.c" /* yacc.c:1646 */
6635  break;
6636 
6637  case 77:
6638 #line 1672 "parse.y" /* yacc.c:1646 */
6639  {
6640  /*%%%*/
6641  (yyval.node) = new_command_qcall(p, ID2VAL(idCOLON2), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
6642  /*% %*/
6643  /*% ripper: method_add_block!(command_call!($1, ID2VAL(idCOLON2), $3, $4), $5) %*/
6644  }
6645 #line 6641 "parse.c" /* yacc.c:1646 */
6646  break;
6647 
6648  case 78:
6649 #line 1679 "parse.y" /* yacc.c:1646 */
6650  {
6651  /*%%%*/
6652  (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc));
6653  fixpos((yyval.node), (yyvsp[0].node));
6654  /*% %*/
6655  /*% ripper: super!($2) %*/
6656  }
6657 #line 6653 "parse.c" /* yacc.c:1646 */
6658  break;
6659 
6660  case 79:
6661 #line 1687 "parse.y" /* yacc.c:1646 */
6662  {
6663  /*%%%*/
6664  (yyval.node) = new_yield(p, (yyvsp[0].node), &(yyloc));
6665  fixpos((yyval.node), (yyvsp[0].node));
6666  /*% %*/
6667  /*% ripper: yield!($2) %*/
6668  }
6669 #line 6665 "parse.c" /* yacc.c:1646 */
6670  break;
6671 
6672  case 80:
6673 #line 1695 "parse.y" /* yacc.c:1646 */
6674  {
6675  /*%%%*/
6676  (yyval.node) = NEW_RETURN(ret_args(p, (yyvsp[0].node)), &(yyloc));
6677  /*% %*/
6678  /*% ripper: return!($2) %*/
6679  }
6680 #line 6676 "parse.c" /* yacc.c:1646 */
6681  break;
6682 
6683  case 81:
6684 #line 1702 "parse.y" /* yacc.c:1646 */
6685  {
6686  /*%%%*/
6687  (yyval.node) = NEW_BREAK(ret_args(p, (yyvsp[0].node)), &(yyloc));
6688  /*% %*/
6689  /*% ripper: break!($2) %*/
6690  }
6691 #line 6687 "parse.c" /* yacc.c:1646 */
6692  break;
6693 
6694  case 82:
6695 #line 1709 "parse.y" /* yacc.c:1646 */
6696  {
6697  /*%%%*/
6698  (yyval.node) = NEW_NEXT(ret_args(p, (yyvsp[0].node)), &(yyloc));
6699  /*% %*/
6700  /*% ripper: next!($2) %*/
6701  }
6702 #line 6698 "parse.c" /* yacc.c:1646 */
6703  break;
6704 
6705  case 84:
6706 #line 1719 "parse.y" /* yacc.c:1646 */
6707  {
6708  /*%%%*/
6709  (yyval.node) = (yyvsp[-1].node);
6710  /*% %*/
6711  /*% ripper: mlhs_paren!($2) %*/
6712  }
6713 #line 6709 "parse.c" /* yacc.c:1646 */
6714  break;
6715 
6716  case 86:
6717 #line 1729 "parse.y" /* yacc.c:1646 */
6718  {
6719  /*%%%*/
6720  (yyval.node) = NEW_MASGN(NEW_LIST((yyvsp[-1].node), &(yyloc)), 0, &(yyloc));
6721  /*% %*/
6722  /*% ripper: mlhs_paren!($2) %*/
6723  }
6724 #line 6720 "parse.c" /* yacc.c:1646 */
6725  break;
6726 
6727  case 87:
6728 #line 1738 "parse.y" /* yacc.c:1646 */
6729  {
6730  /*%%%*/
6731  (yyval.node) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
6732  /*% %*/
6733  /*% ripper: $1 %*/
6734  }
6735 #line 6731 "parse.c" /* yacc.c:1646 */
6736  break;
6737 
6738  case 88:
6739 #line 1745 "parse.y" /* yacc.c:1646 */
6740  {
6741  /*%%%*/
6742  (yyval.node) = NEW_MASGN(list_append(p, (yyvsp[-1].node),(yyvsp[0].node)), 0, &(yyloc));
6743  /*% %*/
6744  /*% ripper: mlhs_add!($1, $2) %*/
6745  }
6746 #line 6742 "parse.c" /* yacc.c:1646 */
6747  break;
6748 
6749  case 89:
6750 #line 1752 "parse.y" /* yacc.c:1646 */
6751  {
6752  /*%%%*/
6753  (yyval.node) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
6754  /*% %*/
6755  /*% ripper: mlhs_add_star!($1, $3) %*/
6756  }
6757 #line 6753 "parse.c" /* yacc.c:1646 */
6758  break;
6759 
6760  case 90:
6761 #line 1759 "parse.y" /* yacc.c:1646 */
6762  {
6763  /*%%%*/
6764  (yyval.node) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
6765  /*% %*/
6766  /*% ripper: mlhs_add_post!(mlhs_add_star!($1, $3), $5) %*/
6767  }
6768 #line 6764 "parse.c" /* yacc.c:1646 */
6769  break;
6770 
6771  case 91:
6772 #line 1766 "parse.y" /* yacc.c:1646 */
6773  {
6774  /*%%%*/
6775  (yyval.node) = NEW_MASGN((yyvsp[-1].node), NODE_SPECIAL_NO_NAME_REST, &(yyloc));
6776  /*% %*/
6777  /*% ripper: mlhs_add_star!($1, Qnil) %*/
6778  }
6779 #line 6775 "parse.c" /* yacc.c:1646 */
6780  break;
6781 
6782  case 92:
6783 #line 1773 "parse.y" /* yacc.c:1646 */
6784  {
6785  /*%%%*/
6786  (yyval.node) = NEW_MASGN((yyvsp[-3].node), NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
6787  /*% %*/
6788  /*% ripper: mlhs_add_post!(mlhs_add_star!($1, Qnil), $4) %*/
6789  }
6790 #line 6786 "parse.c" /* yacc.c:1646 */
6791  break;
6792 
6793  case 93:
6794 #line 1780 "parse.y" /* yacc.c:1646 */
6795  {
6796  /*%%%*/
6797  (yyval.node) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
6798  /*% %*/
6799  /*% ripper: mlhs_add_star!(mlhs_new!, $2) %*/
6800  }
6801 #line 6797 "parse.c" /* yacc.c:1646 */
6802  break;
6803 
6804  case 94:
6805 #line 1787 "parse.y" /* yacc.c:1646 */
6806  {
6807  /*%%%*/
6808  (yyval.node) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node),(yyvsp[0].node),&(yyloc)), &(yyloc));
6809  /*% %*/
6810  /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $2), $4) %*/
6811  }
6812 #line 6808 "parse.c" /* yacc.c:1646 */
6813  break;
6814 
6815  case 95:
6816 #line 1794 "parse.y" /* yacc.c:1646 */
6817  {
6818  /*%%%*/
6819  (yyval.node) = NEW_MASGN(0, NODE_SPECIAL_NO_NAME_REST, &(yyloc));
6820  /*% %*/
6821  /*% ripper: mlhs_add_star!(mlhs_new!, Qnil) %*/
6822  }
6823 #line 6819 "parse.c" /* yacc.c:1646 */
6824  break;
6825 
6826  case 96:
6827 #line 1801 "parse.y" /* yacc.c:1646 */
6828  {
6829  /*%%%*/
6830  (yyval.node) = NEW_MASGN(0, NEW_POSTARG(NODE_SPECIAL_NO_NAME_REST, (yyvsp[0].node), &(yyloc)), &(yyloc));
6831  /*% %*/
6832  /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, Qnil), $3) %*/
6833  }
6834 #line 6830 "parse.c" /* yacc.c:1646 */
6835  break;
6836 
6837  case 98:
6838 #line 1811 "parse.y" /* yacc.c:1646 */
6839  {
6840  /*%%%*/
6841  (yyval.node) = (yyvsp[-1].node);
6842  /*% %*/
6843  /*% ripper: mlhs_paren!($2) %*/
6844  }
6845 #line 6841 "parse.c" /* yacc.c:1646 */
6846  break;
6847 
6848  case 99:
6849 #line 1820 "parse.y" /* yacc.c:1646 */
6850  {
6851  /*%%%*/
6852  (yyval.node) = NEW_LIST((yyvsp[-1].node), &(yylsp[-1]));
6853  /*% %*/
6854  /*% ripper: mlhs_add!(mlhs_new!, $1) %*/
6855  }
6856 #line 6852 "parse.c" /* yacc.c:1646 */
6857  break;
6858 
6859  case 100:
6860 #line 1827 "parse.y" /* yacc.c:1646 */
6861  {
6862  /*%%%*/
6863  (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
6864  /*% %*/
6865  /*% ripper: mlhs_add!($1, $2) %*/
6866  }
6867 #line 6863 "parse.c" /* yacc.c:1646 */
6868  break;
6869 
6870  case 101:
6871 #line 1836 "parse.y" /* yacc.c:1646 */
6872  {
6873  /*%%%*/
6874  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
6875  /*% %*/
6876  /*% ripper: mlhs_add!(mlhs_new!, $1) %*/
6877  }
6878 #line 6874 "parse.c" /* yacc.c:1646 */
6879  break;
6880 
6881  case 102:
6882 #line 1843 "parse.y" /* yacc.c:1646 */
6883  {
6884  /*%%%*/
6885  (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
6886  /*% %*/
6887  /*% ripper: mlhs_add!($1, $3) %*/
6888  }
6889 #line 6885 "parse.c" /* yacc.c:1646 */
6890  break;
6891 
6892  case 103:
6893 #line 1852 "parse.y" /* yacc.c:1646 */
6894  {
6895  /*%%%*/
6896  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
6897  /*% %*/
6898  /*% ripper: assignable(p, var_field(p, $1)) %*/
6899  }
6900 #line 6896 "parse.c" /* yacc.c:1646 */
6901  break;
6902 
6903  case 104:
6904 #line 1859 "parse.y" /* yacc.c:1646 */
6905  {
6906  /*%%%*/
6907  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
6908  /*% %*/
6909  /*% ripper: assignable(p, var_field(p, $1)) %*/
6910  }
6911 #line 6907 "parse.c" /* yacc.c:1646 */
6912  break;
6913 
6914  case 105:
6915 #line 1866 "parse.y" /* yacc.c:1646 */
6916  {
6917  /*%%%*/
6918  (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
6919  /*% %*/
6920  /*% ripper: aref_field!($1, escape_Qundef($3)) %*/
6921  }
6922 #line 6918 "parse.c" /* yacc.c:1646 */
6923  break;
6924 
6925  case 106:
6926 #line 1873 "parse.y" /* yacc.c:1646 */
6927  {
6928  if ((yyvsp[-1].id) == tANDDOT) {
6929  yyerror1(&(yylsp[-1]), "&. inside multiple assignment destination");
6930  }
6931  /*%%%*/
6932  (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
6933  /*% %*/
6934  /*% ripper: field!($1, $2, $3) %*/
6935  }
6936 #line 6932 "parse.c" /* yacc.c:1646 */
6937  break;
6938 
6939  case 107:
6940 #line 1883 "parse.y" /* yacc.c:1646 */
6941  {
6942  /*%%%*/
6943  (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
6944  /*% %*/
6945  /*% ripper: const_path_field!($1, $3) %*/
6946  }
6947 #line 6943 "parse.c" /* yacc.c:1646 */
6948  break;
6949 
6950  case 108:
6951 #line 1890 "parse.y" /* yacc.c:1646 */
6952  {
6953  if ((yyvsp[-1].id) == tANDDOT) {
6954  yyerror1(&(yylsp[-1]), "&. inside multiple assignment destination");
6955  }
6956  /*%%%*/
6957  (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
6958  /*% %*/
6959  /*% ripper: field!($1, $2, $3) %*/
6960  }
6961 #line 6957 "parse.c" /* yacc.c:1646 */
6962  break;
6963 
6964  case 109:
6965 #line 1900 "parse.y" /* yacc.c:1646 */
6966  {
6967  /*%%%*/
6968  (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc)), &(yyloc));
6969  /*% %*/
6970  /*% ripper: const_decl(p, const_path_field!($1, $3)) %*/
6971  }
6972 #line 6968 "parse.c" /* yacc.c:1646 */
6973  break;
6974 
6975  case 110:
6976 #line 1907 "parse.y" /* yacc.c:1646 */
6977  {
6978  /*%%%*/
6979  (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc)), &(yyloc));
6980  /*% %*/
6981  /*% ripper: const_decl(p, top_const_field!($2)) %*/
6982  }
6983 #line 6979 "parse.c" /* yacc.c:1646 */
6984  break;
6985 
6986  case 111:
6987 #line 1914 "parse.y" /* yacc.c:1646 */
6988  {
6989  /*%%%*/
6990  rb_backref_error(p, (yyvsp[0].node));
6991  (yyval.node) = NEW_BEGIN(0, &(yyloc));
6992  /*% %*/
6993  /*% ripper[error]: assign_error!(var_field(p, $1)) %*/
6994  }
6995 #line 6991 "parse.c" /* yacc.c:1646 */
6996  break;
6997 
6998  case 112:
6999 #line 1924 "parse.y" /* yacc.c:1646 */
7000  {
7001  /*%%%*/
7002  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
7003  /*% %*/
7004  /*% ripper: assignable(p, var_field(p, $1)) %*/
7005  }
7006 #line 7002 "parse.c" /* yacc.c:1646 */
7007  break;
7008 
7009  case 113:
7010 #line 1931 "parse.y" /* yacc.c:1646 */
7011  {
7012  /*%%%*/
7013  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
7014  /*% %*/
7015  /*% ripper: assignable(p, var_field(p, $1)) %*/
7016  }
7017 #line 7013 "parse.c" /* yacc.c:1646 */
7018  break;
7019 
7020  case 114:
7021 #line 1938 "parse.y" /* yacc.c:1646 */
7022  {
7023  /*%%%*/
7024  (yyval.node) = aryset(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
7025  /*% %*/
7026  /*% ripper: aref_field!($1, escape_Qundef($3)) %*/
7027  }
7028 #line 7024 "parse.c" /* yacc.c:1646 */
7029  break;
7030 
7031  case 115:
7032 #line 1945 "parse.y" /* yacc.c:1646 */
7033  {
7034  /*%%%*/
7035  (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
7036  /*% %*/
7037  /*% ripper: field!($1, $2, $3) %*/
7038  }
7039 #line 7035 "parse.c" /* yacc.c:1646 */
7040  break;
7041 
7042  case 116:
7043 #line 1952 "parse.y" /* yacc.c:1646 */
7044  {
7045  /*%%%*/
7046  (yyval.node) = attrset(p, (yyvsp[-2].node), idCOLON2, (yyvsp[0].id), &(yyloc));
7047  /*% %*/
7048  /*% ripper: field!($1, ID2VAL(idCOLON2), $3) %*/
7049  }
7050 #line 7046 "parse.c" /* yacc.c:1646 */
7051  break;
7052 
7053  case 117:
7054 #line 1959 "parse.y" /* yacc.c:1646 */
7055  {
7056  /*%%%*/
7057  (yyval.node) = attrset(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].id), &(yyloc));
7058  /*% %*/
7059  /*% ripper: field!($1, $2, $3) %*/
7060  }
7061 #line 7057 "parse.c" /* yacc.c:1646 */
7062  break;
7063 
7064  case 118:
7065 #line 1966 "parse.y" /* yacc.c:1646 */
7066  {
7067  /*%%%*/
7068  (yyval.node) = const_decl(p, NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc)), &(yyloc));
7069  /*% %*/
7070  /*% ripper: const_decl(p, const_path_field!($1, $3)) %*/
7071  }
7072 #line 7068 "parse.c" /* yacc.c:1646 */
7073  break;
7074 
7075  case 119:
7076 #line 1973 "parse.y" /* yacc.c:1646 */
7077  {
7078  /*%%%*/
7079  (yyval.node) = const_decl(p, NEW_COLON3((yyvsp[0].id), &(yyloc)), &(yyloc));
7080  /*% %*/
7081  /*% ripper: const_decl(p, top_const_field!($2)) %*/
7082  }
7083 #line 7079 "parse.c" /* yacc.c:1646 */
7084  break;
7085 
7086  case 120:
7087 #line 1980 "parse.y" /* yacc.c:1646 */
7088  {
7089  /*%%%*/
7090  rb_backref_error(p, (yyvsp[0].node));
7091  (yyval.node) = NEW_BEGIN(0, &(yyloc));
7092  /*% %*/
7093  /*% ripper[error]: assign_error!(var_field(p, $1)) %*/
7094  }
7095 #line 7091 "parse.c" /* yacc.c:1646 */
7096  break;
7097 
7098  case 121:
7099 #line 1990 "parse.y" /* yacc.c:1646 */
7100  {
7101  /*%%%*/
7102  yyerror1(&(yylsp[0]), "class/module name must be CONSTANT");
7103  /*% %*/
7104  /*% ripper[error]: class_name_error!($1) %*/
7105  }
7106 #line 7102 "parse.c" /* yacc.c:1646 */
7107  break;
7108 
7109  case 123:
7110 #line 2000 "parse.y" /* yacc.c:1646 */
7111  {
7112  /*%%%*/
7113  (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
7114  /*% %*/
7115  /*% ripper: top_const_ref!($2) %*/
7116  }
7117 #line 7113 "parse.c" /* yacc.c:1646 */
7118  break;
7119 
7120  case 124:
7121 #line 2007 "parse.y" /* yacc.c:1646 */
7122  {
7123  /*%%%*/
7124  (yyval.node) = NEW_COLON2(0, (yyval.node), &(yyloc));
7125  /*% %*/
7126  /*% ripper: const_ref!($1) %*/
7127  }
7128 #line 7124 "parse.c" /* yacc.c:1646 */
7129  break;
7130 
7131  case 125:
7132 #line 2014 "parse.y" /* yacc.c:1646 */
7133  {
7134  /*%%%*/
7135  (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
7136  /*% %*/
7137  /*% ripper: const_path_ref!($1, $3) %*/
7138  }
7139 #line 7135 "parse.c" /* yacc.c:1646 */
7140  break;
7141 
7142  case 129:
7143 #line 2026 "parse.y" /* yacc.c:1646 */
7144  {
7145  SET_LEX_STATE(EXPR_ENDFN);
7146  (yyval.id) = (yyvsp[0].id);
7147  }
7148 #line 7144 "parse.c" /* yacc.c:1646 */
7149  break;
7150 
7151  case 130:
7152 #line 2031 "parse.y" /* yacc.c:1646 */
7153  {
7154  SET_LEX_STATE(EXPR_ENDFN);
7155  (yyval.id) = (yyvsp[0].id);
7156  }
7157 #line 7153 "parse.c" /* yacc.c:1646 */
7158  break;
7159 
7160  case 131:
7161 #line 2038 "parse.y" /* yacc.c:1646 */
7162  {
7163  /*%%%*/
7164  (yyval.node) = NEW_LIT(ID2SYM((yyvsp[0].id)), &(yyloc));
7165  /*% %*/
7166  /*% ripper: symbol_literal!($1) %*/
7167  }
7168 #line 7164 "parse.c" /* yacc.c:1646 */
7169  break;
7170 
7171  case 133:
7172 #line 2048 "parse.y" /* yacc.c:1646 */
7173  {
7174  /*%%%*/
7175  (yyval.node) = NEW_UNDEF((yyvsp[0].node), &(yyloc));
7176  /*% %*/
7177  /*% ripper: rb_ary_new3(1, get_value($1)) %*/
7178  }
7179 #line 7175 "parse.c" /* yacc.c:1646 */
7180  break;
7181 
7182  case 134:
7183 #line 2054 "parse.y" /* yacc.c:1646 */
7184  {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);}
7185 #line 7181 "parse.c" /* yacc.c:1646 */
7186  break;
7187 
7188  case 135:
7189 #line 2055 "parse.y" /* yacc.c:1646 */
7190  {
7191  /*%%%*/
7192  NODE *undef = NEW_UNDEF((yyvsp[0].node), &(yylsp[0]));
7193  (yyval.node) = block_append(p, (yyvsp[-3].node), undef);
7194  /*% %*/
7195  /*% ripper: rb_ary_push($1, get_value($4)) %*/
7196  }
7197 #line 7193 "parse.c" /* yacc.c:1646 */
7198  break;
7199 
7200  case 136:
7201 #line 2064 "parse.y" /* yacc.c:1646 */
7202  { ifndef_ripper((yyval.id) = '|'); }
7203 #line 7199 "parse.c" /* yacc.c:1646 */
7204  break;
7205 
7206  case 137:
7207 #line 2065 "parse.y" /* yacc.c:1646 */
7208  { ifndef_ripper((yyval.id) = '^'); }
7209 #line 7205 "parse.c" /* yacc.c:1646 */
7210  break;
7211 
7212  case 138:
7213 #line 2066 "parse.y" /* yacc.c:1646 */
7214  { ifndef_ripper((yyval.id) = '&'); }
7215 #line 7211 "parse.c" /* yacc.c:1646 */
7216  break;
7217 
7218  case 139:
7219 #line 2067 "parse.y" /* yacc.c:1646 */
7220  { ifndef_ripper((yyval.id) = tCMP); }
7221 #line 7217 "parse.c" /* yacc.c:1646 */
7222  break;
7223 
7224  case 140:
7225 #line 2068 "parse.y" /* yacc.c:1646 */
7226  { ifndef_ripper((yyval.id) = tEQ); }
7227 #line 7223 "parse.c" /* yacc.c:1646 */
7228  break;
7229 
7230  case 141:
7231 #line 2069 "parse.y" /* yacc.c:1646 */
7232  { ifndef_ripper((yyval.id) = tEQQ); }
7233 #line 7229 "parse.c" /* yacc.c:1646 */
7234  break;
7235 
7236  case 142:
7237 #line 2070 "parse.y" /* yacc.c:1646 */
7238  { ifndef_ripper((yyval.id) = tMATCH); }
7239 #line 7235 "parse.c" /* yacc.c:1646 */
7240  break;
7241 
7242  case 143:
7243 #line 2071 "parse.y" /* yacc.c:1646 */
7244  { ifndef_ripper((yyval.id) = tNMATCH); }
7245 #line 7241 "parse.c" /* yacc.c:1646 */
7246  break;
7247 
7248  case 144:
7249 #line 2072 "parse.y" /* yacc.c:1646 */
7250  { ifndef_ripper((yyval.id) = '>'); }
7251 #line 7247 "parse.c" /* yacc.c:1646 */
7252  break;
7253 
7254  case 145:
7255 #line 2073 "parse.y" /* yacc.c:1646 */
7256  { ifndef_ripper((yyval.id) = tGEQ); }
7257 #line 7253 "parse.c" /* yacc.c:1646 */
7258  break;
7259 
7260  case 146:
7261 #line 2074 "parse.y" /* yacc.c:1646 */
7262  { ifndef_ripper((yyval.id) = '<'); }
7263 #line 7259 "parse.c" /* yacc.c:1646 */
7264  break;
7265 
7266  case 147:
7267 #line 2075 "parse.y" /* yacc.c:1646 */
7268  { ifndef_ripper((yyval.id) = tLEQ); }
7269 #line 7265 "parse.c" /* yacc.c:1646 */
7270  break;
7271 
7272  case 148:
7273 #line 2076 "parse.y" /* yacc.c:1646 */
7274  { ifndef_ripper((yyval.id) = tNEQ); }
7275 #line 7271 "parse.c" /* yacc.c:1646 */
7276  break;
7277 
7278  case 149:
7279 #line 2077 "parse.y" /* yacc.c:1646 */
7280  { ifndef_ripper((yyval.id) = tLSHFT); }
7281 #line 7277 "parse.c" /* yacc.c:1646 */
7282  break;
7283 
7284  case 150:
7285 #line 2078 "parse.y" /* yacc.c:1646 */
7286  { ifndef_ripper((yyval.id) = tRSHFT); }
7287 #line 7283 "parse.c" /* yacc.c:1646 */
7288  break;
7289 
7290  case 151:
7291 #line 2079 "parse.y" /* yacc.c:1646 */
7292  { ifndef_ripper((yyval.id) = '+'); }
7293 #line 7289 "parse.c" /* yacc.c:1646 */
7294  break;
7295 
7296  case 152:
7297 #line 2080 "parse.y" /* yacc.c:1646 */
7298  { ifndef_ripper((yyval.id) = '-'); }
7299 #line 7295 "parse.c" /* yacc.c:1646 */
7300  break;
7301 
7302  case 153:
7303 #line 2081 "parse.y" /* yacc.c:1646 */
7304  { ifndef_ripper((yyval.id) = '*'); }
7305 #line 7301 "parse.c" /* yacc.c:1646 */
7306  break;
7307 
7308  case 154:
7309 #line 2082 "parse.y" /* yacc.c:1646 */
7310  { ifndef_ripper((yyval.id) = '*'); }
7311 #line 7307 "parse.c" /* yacc.c:1646 */
7312  break;
7313 
7314  case 155:
7315 #line 2083 "parse.y" /* yacc.c:1646 */
7316  { ifndef_ripper((yyval.id) = '/'); }
7317 #line 7313 "parse.c" /* yacc.c:1646 */
7318  break;
7319 
7320  case 156:
7321 #line 2084 "parse.y" /* yacc.c:1646 */
7322  { ifndef_ripper((yyval.id) = '%'); }
7323 #line 7319 "parse.c" /* yacc.c:1646 */
7324  break;
7325 
7326  case 157:
7327 #line 2085 "parse.y" /* yacc.c:1646 */
7328  { ifndef_ripper((yyval.id) = tPOW); }
7329 #line 7325 "parse.c" /* yacc.c:1646 */
7330  break;
7331 
7332  case 158:
7333 #line 2086 "parse.y" /* yacc.c:1646 */
7334  { ifndef_ripper((yyval.id) = tDSTAR); }
7335 #line 7331 "parse.c" /* yacc.c:1646 */
7336  break;
7337 
7338  case 159:
7339 #line 2087 "parse.y" /* yacc.c:1646 */
7340  { ifndef_ripper((yyval.id) = '!'); }
7341 #line 7337 "parse.c" /* yacc.c:1646 */
7342  break;
7343 
7344  case 160:
7345 #line 2088 "parse.y" /* yacc.c:1646 */
7346  { ifndef_ripper((yyval.id) = '~'); }
7347 #line 7343 "parse.c" /* yacc.c:1646 */
7348  break;
7349 
7350  case 161:
7351 #line 2089 "parse.y" /* yacc.c:1646 */
7352  { ifndef_ripper((yyval.id) = tUPLUS); }
7353 #line 7349 "parse.c" /* yacc.c:1646 */
7354  break;
7355 
7356  case 162:
7357 #line 2090 "parse.y" /* yacc.c:1646 */
7358  { ifndef_ripper((yyval.id) = tUMINUS); }
7359 #line 7355 "parse.c" /* yacc.c:1646 */
7360  break;
7361 
7362  case 163:
7363 #line 2091 "parse.y" /* yacc.c:1646 */
7364  { ifndef_ripper((yyval.id) = tAREF); }
7365 #line 7361 "parse.c" /* yacc.c:1646 */
7366  break;
7367 
7368  case 164:
7369 #line 2092 "parse.y" /* yacc.c:1646 */
7370  { ifndef_ripper((yyval.id) = tASET); }
7371 #line 7367 "parse.c" /* yacc.c:1646 */
7372  break;
7373 
7374  case 165:
7375 #line 2093 "parse.y" /* yacc.c:1646 */
7376  { ifndef_ripper((yyval.id) = '`'); }
7377 #line 7373 "parse.c" /* yacc.c:1646 */
7378  break;
7379 
7380  case 207:
7381 #line 2111 "parse.y" /* yacc.c:1646 */
7382  {
7383  /*%%%*/
7384  (yyval.node) = node_assign(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
7385  /*% %*/
7386  /*% ripper: assign!($1, $3) %*/
7387  }
7388 #line 7384 "parse.c" /* yacc.c:1646 */
7389  break;
7390 
7391  case 208:
7392 #line 2118 "parse.y" /* yacc.c:1646 */
7393  {
7394  /*%%%*/
7395  (yyval.node) = new_op_assign(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7396  /*% %*/
7397  /*% ripper: opassign!($1, $2, $3) %*/
7398  }
7399 #line 7395 "parse.c" /* yacc.c:1646 */
7400  break;
7401 
7402  case 209:
7403 #line 2125 "parse.y" /* yacc.c:1646 */
7404  {
7405  /*%%%*/
7406  value_expr((yyvsp[0].node));
7407  (yyval.node) = new_ary_op_assign(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-3]), &(yyloc));
7408  /*% %*/
7409  /*% ripper: opassign!(aref_field!($1, escape_Qundef($3)), $5, $6) %*/
7410  }
7411 #line 7407 "parse.c" /* yacc.c:1646 */
7412  break;
7413 
7414  case 210:
7415 #line 2133 "parse.y" /* yacc.c:1646 */
7416  {
7417  /*%%%*/
7418  value_expr((yyvsp[0].node));
7419  (yyval.node) = new_attr_op_assign(p, (yyvsp[-4].node), (yyvsp[-3].id), (yyvsp[-2].id), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7420  /*% %*/
7421  /*% ripper: opassign!(field!($1, $2, $3), $4, $5) %*/
7422  }
7423 #line 7419 "parse.c" /* yacc.c:1646 */
7424  break;
7425 
7426  case 211:
7427 #line 2141 "parse.y" /* yacc.c:1646 */
7428  {
7429  /*%%%*/
7430  value_expr((yyvsp[0].node));
7431  (yyval.node) = new_attr_op_assign(p, (yyvsp[-4].node), (yyvsp[-3].id), (yyvsp[-2].id), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7432  /*% %*/
7433  /*% ripper: opassign!(field!($1, $2, $3), $4, $5) %*/
7434  }
7435 #line 7431 "parse.c" /* yacc.c:1646 */
7436  break;
7437 
7438  case 212:
7439 #line 2149 "parse.y" /* yacc.c:1646 */
7440  {
7441  /*%%%*/
7442  value_expr((yyvsp[0].node));
7443  (yyval.node) = new_attr_op_assign(p, (yyvsp[-4].node), ID2VAL(idCOLON2), (yyvsp[-2].id), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7444  /*% %*/
7445  /*% ripper: opassign!(field!($1, ID2VAL(idCOLON2), $3), $4, $5) %*/
7446  }
7447 #line 7443 "parse.c" /* yacc.c:1646 */
7448  break;
7449 
7450  case 213:
7451 #line 2157 "parse.y" /* yacc.c:1646 */
7452  {
7453  /*%%%*/
7454  YYLTYPE loc = code_loc_gen(&(yylsp[-4]), &(yylsp[-2]));
7455  (yyval.node) = new_const_op_assign(p, NEW_COLON2((yyvsp[-4].node), (yyvsp[-2].id), &loc), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7456  /*% %*/
7457  /*% ripper: opassign!(const_path_field!($1, $3), $4, $5) %*/
7458  }
7459 #line 7455 "parse.c" /* yacc.c:1646 */
7460  break;
7461 
7462  case 214:
7463 #line 2165 "parse.y" /* yacc.c:1646 */
7464  {
7465  /*%%%*/
7466  (yyval.node) = new_const_op_assign(p, NEW_COLON3((yyvsp[-2].id), &(yyloc)), (yyvsp[-1].id), (yyvsp[0].node), &(yyloc));
7467  /*% %*/
7468  /*% ripper: opassign!(top_const_field!($2), $3, $4) %*/
7469  }
7470 #line 7466 "parse.c" /* yacc.c:1646 */
7471  break;
7472 
7473  case 215:
7474 #line 2172 "parse.y" /* yacc.c:1646 */
7475  {
7476  /*%%%*/
7477  rb_backref_error(p, (yyvsp[-2].node));
7478  (yyval.node) = NEW_BEGIN(0, &(yyloc));
7479  /*% %*/
7480  /*% ripper[error]: assign_error!(opassign!(var_field(p, $1), $2, $3)) %*/
7481  }
7482 #line 7478 "parse.c" /* yacc.c:1646 */
7483  break;
7484 
7485  case 216:
7486 #line 2180 "parse.y" /* yacc.c:1646 */
7487  {
7488  /*%%%*/
7489  value_expr((yyvsp[-2].node));
7490  value_expr((yyvsp[0].node));
7491  (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
7492  /*% %*/
7493  /*% ripper: dot2!($1, $3) %*/
7494  }
7495 #line 7491 "parse.c" /* yacc.c:1646 */
7496  break;
7497 
7498  case 217:
7499 #line 2189 "parse.y" /* yacc.c:1646 */
7500  {
7501  /*%%%*/
7502  value_expr((yyvsp[-2].node));
7503  value_expr((yyvsp[0].node));
7504  (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
7505  /*% %*/
7506  /*% ripper: dot3!($1, $3) %*/
7507  }
7508 #line 7504 "parse.c" /* yacc.c:1646 */
7509  break;
7510 
7511  case 218:
7512 #line 2198 "parse.y" /* yacc.c:1646 */
7513  {
7514  /*%%%*/
7515  YYLTYPE loc;
7516  loc.beg_pos = (yylsp[0]).end_pos;
7517  loc.end_pos = (yylsp[0]).end_pos;
7518 
7519  value_expr((yyvsp[-1].node));
7520  (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil(&loc), &(yyloc));
7521  /*% %*/
7522  /*% ripper: dot2!($1, Qnil) %*/
7523  }
7524 #line 7520 "parse.c" /* yacc.c:1646 */
7525  break;
7526 
7527  case 219:
7528 #line 2210 "parse.y" /* yacc.c:1646 */
7529  {
7530  /*%%%*/
7531  YYLTYPE loc;
7532  loc.beg_pos = (yylsp[0]).end_pos;
7533  loc.end_pos = (yylsp[0]).end_pos;
7534 
7535  value_expr((yyvsp[-1].node));
7536  (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil(&loc), &(yyloc));
7537  /*% %*/
7538  /*% ripper: dot3!($1, Qnil) %*/
7539  }
7540 #line 7536 "parse.c" /* yacc.c:1646 */
7541  break;
7542 
7543  case 220:
7544 #line 2222 "parse.y" /* yacc.c:1646 */
7545  {
7546  /*%%%*/
7547  YYLTYPE loc;
7548  loc.beg_pos = (yylsp[-1]).beg_pos;
7549  loc.end_pos = (yylsp[-1]).beg_pos;
7550 
7551  value_expr((yyvsp[0].node));
7552  (yyval.node) = NEW_DOT2(new_nil(&loc), (yyvsp[0].node), &(yyloc));
7553  /*% %*/
7554  /*% ripper: dot2!(Qnil, $2) %*/
7555  }
7556 #line 7552 "parse.c" /* yacc.c:1646 */
7557  break;
7558 
7559  case 221:
7560 #line 2234 "parse.y" /* yacc.c:1646 */
7561  {
7562  /*%%%*/
7563  YYLTYPE loc;
7564  loc.beg_pos = (yylsp[-1]).beg_pos;
7565  loc.end_pos = (yylsp[-1]).beg_pos;
7566 
7567  value_expr((yyvsp[0].node));
7568  (yyval.node) = NEW_DOT3(new_nil(&loc), (yyvsp[0].node), &(yyloc));
7569  /*% %*/
7570  /*% ripper: dot3!(Qnil, $2) %*/
7571  }
7572 #line 7568 "parse.c" /* yacc.c:1646 */
7573  break;
7574 
7575  case 222:
7576 #line 2246 "parse.y" /* yacc.c:1646 */
7577  {
7578  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '+', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7579  }
7580 #line 7576 "parse.c" /* yacc.c:1646 */
7581  break;
7582 
7583  case 223:
7584 #line 2250 "parse.y" /* yacc.c:1646 */
7585  {
7586  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '-', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7587  }
7588 #line 7584 "parse.c" /* yacc.c:1646 */
7589  break;
7590 
7591  case 224:
7592 #line 2254 "parse.y" /* yacc.c:1646 */
7593  {
7594  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '*', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7595  }
7596 #line 7592 "parse.c" /* yacc.c:1646 */
7597  break;
7598 
7599  case 225:
7600 #line 2258 "parse.y" /* yacc.c:1646 */
7601  {
7602  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '/', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7603  }
7604 #line 7600 "parse.c" /* yacc.c:1646 */
7605  break;
7606 
7607  case 226:
7608 #line 2262 "parse.y" /* yacc.c:1646 */
7609  {
7610  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '%', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7611  }
7612 #line 7608 "parse.c" /* yacc.c:1646 */
7613  break;
7614 
7615  case 227:
7616 #line 2266 "parse.y" /* yacc.c:1646 */
7617  {
7618  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7619  }
7620 #line 7616 "parse.c" /* yacc.c:1646 */
7621  break;
7622 
7623  case 228:
7624 #line 2270 "parse.y" /* yacc.c:1646 */
7625  {
7626  (yyval.node) = call_uni_op(p, call_bin_op(p, (yyvsp[-2].node), idPow, (yyvsp[0].node), &(yylsp[-2]), &(yyloc)), idUMinus, &(yylsp[-3]), &(yyloc));
7627  }
7628 #line 7624 "parse.c" /* yacc.c:1646 */
7629  break;
7630 
7631  case 229:
7632 #line 2274 "parse.y" /* yacc.c:1646 */
7633  {
7634  (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUPlus, &(yylsp[-1]), &(yyloc));
7635  }
7636 #line 7632 "parse.c" /* yacc.c:1646 */
7637  break;
7638 
7639  case 230:
7640 #line 2278 "parse.y" /* yacc.c:1646 */
7641  {
7642  (yyval.node) = call_uni_op(p, (yyvsp[0].node), idUMinus, &(yylsp[-1]), &(yyloc));
7643  }
7644 #line 7640 "parse.c" /* yacc.c:1646 */
7645  break;
7646 
7647  case 231:
7648 #line 2282 "parse.y" /* yacc.c:1646 */
7649  {
7650  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '|', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7651  }
7652 #line 7648 "parse.c" /* yacc.c:1646 */
7653  break;
7654 
7655  case 232:
7656 #line 2286 "parse.y" /* yacc.c:1646 */
7657  {
7658  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '^', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7659  }
7660 #line 7656 "parse.c" /* yacc.c:1646 */
7661  break;
7662 
7663  case 233:
7664 #line 2290 "parse.y" /* yacc.c:1646 */
7665  {
7666  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), '&', (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7667  }
7668 #line 7664 "parse.c" /* yacc.c:1646 */
7669  break;
7670 
7671  case 234:
7672 #line 2294 "parse.y" /* yacc.c:1646 */
7673  {
7674  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idCmp, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7675  }
7676 #line 7672 "parse.c" /* yacc.c:1646 */
7677  break;
7678 
7679  case 236:
7680 #line 2299 "parse.y" /* yacc.c:1646 */
7681  {
7682  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7683  }
7684 #line 7680 "parse.c" /* yacc.c:1646 */
7685  break;
7686 
7687  case 237:
7688 #line 2303 "parse.y" /* yacc.c:1646 */
7689  {
7690  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idEqq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7691  }
7692 #line 7688 "parse.c" /* yacc.c:1646 */
7693  break;
7694 
7695  case 238:
7696 #line 2307 "parse.y" /* yacc.c:1646 */
7697  {
7698  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeq, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7699  }
7700 #line 7696 "parse.c" /* yacc.c:1646 */
7701  break;
7702 
7703  case 239:
7704 #line 2311 "parse.y" /* yacc.c:1646 */
7705  {
7706  (yyval.node) = match_op(p, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7707  }
7708 #line 7704 "parse.c" /* yacc.c:1646 */
7709  break;
7710 
7711  case 240:
7712 #line 2315 "parse.y" /* yacc.c:1646 */
7713  {
7714  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idNeqTilde, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7715  }
7716 #line 7712 "parse.c" /* yacc.c:1646 */
7717  break;
7718 
7719  case 241:
7720 #line 2319 "parse.y" /* yacc.c:1646 */
7721  {
7722  (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[0].node), &(yylsp[0])), '!', &(yylsp[-1]), &(yyloc));
7723  }
7724 #line 7720 "parse.c" /* yacc.c:1646 */
7725  break;
7726 
7727  case 242:
7728 #line 2323 "parse.y" /* yacc.c:1646 */
7729  {
7730  (yyval.node) = call_uni_op(p, (yyvsp[0].node), '~', &(yylsp[-1]), &(yyloc));
7731  }
7732 #line 7728 "parse.c" /* yacc.c:1646 */
7733  break;
7734 
7735  case 243:
7736 #line 2327 "parse.y" /* yacc.c:1646 */
7737  {
7738  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idLTLT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7739  }
7740 #line 7736 "parse.c" /* yacc.c:1646 */
7741  break;
7742 
7743  case 244:
7744 #line 2331 "parse.y" /* yacc.c:1646 */
7745  {
7746  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), idGTGT, (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7747  }
7748 #line 7744 "parse.c" /* yacc.c:1646 */
7749  break;
7750 
7751  case 245:
7752 #line 2335 "parse.y" /* yacc.c:1646 */
7753  {
7754  (yyval.node) = logop(p, idANDOP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7755  }
7756 #line 7752 "parse.c" /* yacc.c:1646 */
7757  break;
7758 
7759  case 246:
7760 #line 2339 "parse.y" /* yacc.c:1646 */
7761  {
7762  (yyval.node) = logop(p, idOROP, (yyvsp[-2].node), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7763  }
7764 #line 7760 "parse.c" /* yacc.c:1646 */
7765  break;
7766 
7767  case 247:
7768 #line 2342 "parse.y" /* yacc.c:1646 */
7769  {p->in_defined = 1;}
7770 #line 7766 "parse.c" /* yacc.c:1646 */
7771  break;
7772 
7773  case 248:
7774 #line 2343 "parse.y" /* yacc.c:1646 */
7775  {
7776  p->in_defined = 0;
7777  (yyval.node) = new_defined(p, (yyvsp[0].node), &(yyloc));
7778  }
7779 #line 7775 "parse.c" /* yacc.c:1646 */
7780  break;
7781 
7782  case 249:
7783 #line 2348 "parse.y" /* yacc.c:1646 */
7784  {
7785  /*%%%*/
7786  value_expr((yyvsp[-5].node));
7787  (yyval.node) = new_if(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
7788  fixpos((yyval.node), (yyvsp[-5].node));
7789  /*% %*/
7790  /*% ripper: ifop!($1, $3, $6) %*/
7791  }
7792 #line 7788 "parse.c" /* yacc.c:1646 */
7793  break;
7794 
7795  case 250:
7796 #line 2357 "parse.y" /* yacc.c:1646 */
7797  {
7798  (yyval.node) = (yyvsp[0].node);
7799  }
7800 #line 7796 "parse.c" /* yacc.c:1646 */
7801  break;
7802 
7803  case 251:
7804 #line 2362 "parse.y" /* yacc.c:1646 */
7805  {(yyval.id) = '>';}
7806 #line 7802 "parse.c" /* yacc.c:1646 */
7807  break;
7808 
7809  case 252:
7810 #line 2363 "parse.y" /* yacc.c:1646 */
7811  {(yyval.id) = '<';}
7812 #line 7808 "parse.c" /* yacc.c:1646 */
7813  break;
7814 
7815  case 253:
7816 #line 2364 "parse.y" /* yacc.c:1646 */
7817  {(yyval.id) = idGE;}
7818 #line 7814 "parse.c" /* yacc.c:1646 */
7819  break;
7820 
7821  case 254:
7822 #line 2365 "parse.y" /* yacc.c:1646 */
7823  {(yyval.id) = idLE;}
7824 #line 7820 "parse.c" /* yacc.c:1646 */
7825  break;
7826 
7827  case 255:
7828 #line 2369 "parse.y" /* yacc.c:1646 */
7829  {
7830  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7831  }
7832 #line 7828 "parse.c" /* yacc.c:1646 */
7833  break;
7834 
7835  case 256:
7836 #line 2373 "parse.y" /* yacc.c:1646 */
7837  {
7838  rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[-1].id)));
7839  (yyval.node) = call_bin_op(p, (yyvsp[-2].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
7840  }
7841 #line 7837 "parse.c" /* yacc.c:1646 */
7842  break;
7843 
7844  case 257:
7845 #line 2380 "parse.y" /* yacc.c:1646 */
7846  {
7847  value_expr((yyvsp[0].node));
7848  (yyval.node) = (yyvsp[0].node);
7849  }
7850 #line 7846 "parse.c" /* yacc.c:1646 */
7851  break;
7852 
7853  case 259:
7854 #line 2388 "parse.y" /* yacc.c:1646 */
7855  {
7856  (yyval.node) = (yyvsp[-1].node);
7857  }
7858 #line 7854 "parse.c" /* yacc.c:1646 */
7859  break;
7860 
7861  case 260:
7862 #line 2392 "parse.y" /* yacc.c:1646 */
7863  {
7864  /*%%%*/
7865  (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
7866  /*% %*/
7867  /*% ripper: args_add!($1, bare_assoc_hash!($3)) %*/
7868  }
7869 #line 7865 "parse.c" /* yacc.c:1646 */
7870  break;
7871 
7872  case 261:
7873 #line 2399 "parse.y" /* yacc.c:1646 */
7874  {
7875  /*%%%*/
7876  (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : 0;
7877  /*% %*/
7878  /*% ripper: args_add!(args_new!, bare_assoc_hash!($1)) %*/
7879  }
7880 #line 7876 "parse.c" /* yacc.c:1646 */
7881  break;
7882 
7883  case 262:
7884 #line 2408 "parse.y" /* yacc.c:1646 */
7885  {
7886  value_expr((yyvsp[0].node));
7887  (yyval.node) = (yyvsp[0].node);
7888  }
7889 #line 7885 "parse.c" /* yacc.c:1646 */
7890  break;
7891 
7892  case 263:
7893 #line 2413 "parse.y" /* yacc.c:1646 */
7894  {
7895  /*%%%*/
7896  YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
7897  value_expr((yyvsp[-2].node));
7898  (yyval.node) = NEW_RESCUE((yyvsp[-2].node), NEW_RESBODY(0, remove_begin((yyvsp[0].node)), 0, &loc), 0, &(yyloc));
7899  /*% %*/
7900  /*% ripper: rescue_mod!($1, $3) %*/
7901  }
7902 #line 7898 "parse.c" /* yacc.c:1646 */
7903  break;
7904 
7905  case 264:
7906 #line 2424 "parse.y" /* yacc.c:1646 */
7907  {
7908  /*%%%*/
7909  (yyval.node) = (yyvsp[-1].node);
7910  /*% %*/
7911  /*% ripper: arg_paren!(escape_Qundef($2)) %*/
7912  }
7913 #line 7909 "parse.c" /* yacc.c:1646 */
7914  break;
7915 
7916  case 265:
7917 #line 2431 "parse.y" /* yacc.c:1646 */
7918  {
7919  if (!local_id(p, idFWD_REST) ||
7920 #if idFWD_KWREST
7921  !local_id(p, idFWD_KWREST) ||
7922 #endif
7923  !local_id(p, idFWD_BLOCK)) {
7924  compile_error(p, "unexpected ...");
7925  (yyval.node) = Qnone;
7926  }
7927  else {
7928  /*%%%*/
7929  NODE *splat = NEW_SPLAT(NEW_LVAR(idFWD_REST, &(yylsp[-1])), &(yylsp[-1]));
7930 #if idFWD_KWREST
7931  NODE *kwrest = list_append(p, NEW_LIST(0, &(yylsp[-1])), NEW_LVAR(idFWD_KWREST, &(yylsp[-1])));
7932 #endif
7933  NODE *block = NEW_BLOCK_PASS(NEW_LVAR(idFWD_BLOCK, &(yylsp[-1])), &(yylsp[-1]));
7934 #if idFWD_KWREST
7935  (yyval.node) = arg_append(p, splat, new_hash(p, kwrest, &(yylsp[-1])), &(yylsp[-1]));
7936 #else
7937  (yyval.node) = splat;
7938 #endif
7939  (yyval.node) = arg_blk_pass((yyval.node), block);
7940  /*% %*/
7941  /*% ripper: arg_paren!($2) %*/
7942  }
7943  }
7944 #line 7940 "parse.c" /* yacc.c:1646 */
7945  break;
7946 
7947  case 270:
7948 #line 2466 "parse.y" /* yacc.c:1646 */
7949  {
7950  (yyval.node) = (yyvsp[-1].node);
7951  }
7952 #line 7948 "parse.c" /* yacc.c:1646 */
7953  break;
7954 
7955  case 271:
7956 #line 2470 "parse.y" /* yacc.c:1646 */
7957  {
7958  /*%%%*/
7959  (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
7960  /*% %*/
7961  /*% ripper: args_add!($1, bare_assoc_hash!($3)) %*/
7962  }
7963 #line 7959 "parse.c" /* yacc.c:1646 */
7964  break;
7965 
7966  case 272:
7967 #line 2477 "parse.y" /* yacc.c:1646 */
7968  {
7969  /*%%%*/
7970  (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
7971  /*% %*/
7972  /*% ripper: args_add!(args_new!, bare_assoc_hash!($1)) %*/
7973  }
7974 #line 7970 "parse.c" /* yacc.c:1646 */
7975  break;
7976 
7977  case 273:
7978 #line 2486 "parse.y" /* yacc.c:1646 */
7979  {
7980  /*%%%*/
7981  value_expr((yyvsp[0].node));
7982  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
7983  /*% %*/
7984  /*% ripper: args_add!(args_new!, $1) %*/
7985  }
7986 #line 7982 "parse.c" /* yacc.c:1646 */
7987  break;
7988 
7989  case 274:
7990 #line 2494 "parse.y" /* yacc.c:1646 */
7991  {
7992  /*%%%*/
7993  (yyval.node) = arg_blk_pass((yyvsp[-1].node), (yyvsp[0].node));
7994  /*% %*/
7995  /*% ripper: args_add_block!($1, $2) %*/
7996  }
7997 #line 7993 "parse.c" /* yacc.c:1646 */
7998  break;
7999 
8000  case 275:
8001 #line 2501 "parse.y" /* yacc.c:1646 */
8002  {
8003  /*%%%*/
8004  (yyval.node) = (yyvsp[-1].node) ? NEW_LIST(new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yylsp[-1])) : 0;
8005  (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node));
8006  /*% %*/
8007  /*% ripper: args_add_block!(args_add!(args_new!, bare_assoc_hash!($1)), $2) %*/
8008  }
8009 #line 8005 "parse.c" /* yacc.c:1646 */
8010  break;
8011 
8012  case 276:
8013 #line 2509 "parse.y" /* yacc.c:1646 */
8014  {
8015  /*%%%*/
8016  (yyval.node) = (yyvsp[-1].node) ? arg_append(p, (yyvsp[-3].node), new_hash(p, (yyvsp[-1].node), &(yylsp[-1])), &(yyloc)) : (yyvsp[-3].node);
8017  (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[0].node));
8018  /*% %*/
8019  /*% ripper: args_add_block!(args_add!($1, bare_assoc_hash!($3)), $4) %*/
8020  }
8021 #line 8017 "parse.c" /* yacc.c:1646 */
8022  break;
8023 
8024  case 278:
8025 #line 2520 "parse.y" /* yacc.c:1646 */
8026  {
8027  /* If call_args starts with a open paren '(' or '[',
8028  * look-ahead reading of the letters calls CMDARG_PUSH(0),
8029  * but the push must be done after CMDARG_PUSH(1).
8030  * So this code makes them consistent by first cancelling
8031  * the premature CMDARG_PUSH(0), doing CMDARG_PUSH(1),
8032  * and finally redoing CMDARG_PUSH(0).
8033  */
8034  int lookahead = 0;
8035  switch (yychar) {
8036  case '(': case tLPAREN: case tLPAREN_ARG: case '[': case tLBRACK:
8037  lookahead = 1;
8038  }
8039  if (lookahead) CMDARG_POP();
8040  CMDARG_PUSH(1);
8041  if (lookahead) CMDARG_PUSH(0);
8042  }
8043 #line 8039 "parse.c" /* yacc.c:1646 */
8044  break;
8045 
8046  case 279:
8047 #line 2538 "parse.y" /* yacc.c:1646 */
8048  {
8049  /* call_args can be followed by tLBRACE_ARG (that does CMDARG_PUSH(0) in the lexer)
8050  * but the push must be done after CMDARG_POP() in the parser.
8051  * So this code does CMDARG_POP() to pop 0 pushed by tLBRACE_ARG,
8052  * CMDARG_POP() to pop 1 pushed by command_args,
8053  * and CMDARG_PUSH(0) to restore back the flag set by tLBRACE_ARG.
8054  */
8055  int lookahead = 0;
8056  switch (yychar) {
8057  case tLBRACE_ARG:
8058  lookahead = 1;
8059  }
8060  if (lookahead) CMDARG_POP();
8061  CMDARG_POP();
8062  if (lookahead) CMDARG_PUSH(0);
8063  (yyval.node) = (yyvsp[0].node);
8064  }
8065 #line 8061 "parse.c" /* yacc.c:1646 */
8066  break;
8067 
8068  case 280:
8069 #line 2558 "parse.y" /* yacc.c:1646 */
8070  {
8071  /*%%%*/
8072  (yyval.node) = NEW_BLOCK_PASS((yyvsp[0].node), &(yyloc));
8073  /*% %*/
8074  /*% ripper: $2 %*/
8075  }
8076 #line 8072 "parse.c" /* yacc.c:1646 */
8077  break;
8078 
8079  case 281:
8080 #line 2567 "parse.y" /* yacc.c:1646 */
8081  {
8082  (yyval.node) = (yyvsp[0].node);
8083  }
8084 #line 8080 "parse.c" /* yacc.c:1646 */
8085  break;
8086 
8087  case 282:
8088 #line 2571 "parse.y" /* yacc.c:1646 */
8089  {
8090  (yyval.node) = 0;
8091  }
8092 #line 8088 "parse.c" /* yacc.c:1646 */
8093  break;
8094 
8095  case 283:
8096 #line 2577 "parse.y" /* yacc.c:1646 */
8097  {
8098  /*%%%*/
8099  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
8100  /*% %*/
8101  /*% ripper: args_add!(args_new!, $1) %*/
8102  }
8103 #line 8099 "parse.c" /* yacc.c:1646 */
8104  break;
8105 
8106  case 284:
8107 #line 2584 "parse.y" /* yacc.c:1646 */
8108  {
8109  /*%%%*/
8110  (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc));
8111  /*% %*/
8112  /*% ripper: args_add_star!(args_new!, $2) %*/
8113  }
8114 #line 8110 "parse.c" /* yacc.c:1646 */
8115  break;
8116 
8117  case 285:
8118 #line 2591 "parse.y" /* yacc.c:1646 */
8119  {
8120  /*%%%*/
8121  (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
8122  /*% %*/
8123  /*% ripper: args_add!($1, $3) %*/
8124  }
8125 #line 8121 "parse.c" /* yacc.c:1646 */
8126  break;
8127 
8128  case 286:
8129 #line 2598 "parse.y" /* yacc.c:1646 */
8130  {
8131  /*%%%*/
8132  (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
8133  /*% %*/
8134  /*% ripper: args_add_star!($1, $4) %*/
8135  }
8136 #line 8132 "parse.c" /* yacc.c:1646 */
8137  break;
8138 
8139  case 289:
8140 #line 2611 "parse.y" /* yacc.c:1646 */
8141  {
8142  /*%%%*/
8143  (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
8144  /*% %*/
8145  /*% ripper: mrhs_add!(mrhs_new_from_args!($1), $3) %*/
8146  }
8147 #line 8143 "parse.c" /* yacc.c:1646 */
8148  break;
8149 
8150  case 290:
8151 #line 2618 "parse.y" /* yacc.c:1646 */
8152  {
8153  /*%%%*/
8154  (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
8155  /*% %*/
8156  /*% ripper: mrhs_add_star!(mrhs_new_from_args!($1), $4) %*/
8157  }
8158 #line 8154 "parse.c" /* yacc.c:1646 */
8159  break;
8160 
8161  case 291:
8162 #line 2625 "parse.y" /* yacc.c:1646 */
8163  {
8164  /*%%%*/
8165  (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc));
8166  /*% %*/
8167  /*% ripper: mrhs_add_star!(mrhs_new!, $2) %*/
8168  }
8169 #line 8165 "parse.c" /* yacc.c:1646 */
8170  break;
8171 
8172  case 302:
8173 #line 2644 "parse.y" /* yacc.c:1646 */
8174  {
8175  /*%%%*/
8176  (yyval.node) = NEW_FCALL((yyvsp[0].id), 0, &(yyloc));
8177  /*% %*/
8178  /*% ripper: method_add_arg!(fcall!($1), args_new!) %*/
8179  }
8180 #line 8176 "parse.c" /* yacc.c:1646 */
8181  break;
8182 
8183  case 303:
8184 #line 2651 "parse.y" /* yacc.c:1646 */
8185  {
8186  CMDARG_PUSH(0);
8187  }
8188 #line 8184 "parse.c" /* yacc.c:1646 */
8189  break;
8190 
8191  case 304:
8192 #line 2656 "parse.y" /* yacc.c:1646 */
8193  {
8194  CMDARG_POP();
8195  /*%%%*/
8196  set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
8197  (yyval.node) = NEW_BEGIN((yyvsp[-1].node), &(yyloc));
8198  nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
8199  /*% %*/
8200  /*% ripper: begin!($3) %*/
8201  }
8202 #line 8198 "parse.c" /* yacc.c:1646 */
8203  break;
8204 
8205  case 305:
8206 #line 2665 "parse.y" /* yacc.c:1646 */
8207  {SET_LEX_STATE(EXPR_ENDARG);}
8208 #line 8204 "parse.c" /* yacc.c:1646 */
8209  break;
8210 
8211  case 306:
8212 #line 2666 "parse.y" /* yacc.c:1646 */
8213  {
8214  /*%%%*/
8215  (yyval.node) = NEW_BEGIN(0, &(yyloc));
8216  /*% %*/
8217  /*% ripper: paren!(0) %*/
8218  }
8219 #line 8215 "parse.c" /* yacc.c:1646 */
8220  break;
8221 
8222  case 307:
8223 #line 2672 "parse.y" /* yacc.c:1646 */
8224  {SET_LEX_STATE(EXPR_ENDARG);}
8225 #line 8221 "parse.c" /* yacc.c:1646 */
8226  break;
8227 
8228  case 308:
8229 #line 2673 "parse.y" /* yacc.c:1646 */
8230  {
8231  /*%%%*/
8232  if (nd_type((yyvsp[-2].node)) == NODE_SELF) (yyvsp[-2].node)->nd_state = 0;
8233  (yyval.node) = (yyvsp[-2].node);
8234  /*% %*/
8235  /*% ripper: paren!($2) %*/
8236  }
8237 #line 8233 "parse.c" /* yacc.c:1646 */
8238  break;
8239 
8240  case 309:
8241 #line 2681 "parse.y" /* yacc.c:1646 */
8242  {
8243  /*%%%*/
8244  if (nd_type((yyvsp[-1].node)) == NODE_SELF) (yyvsp[-1].node)->nd_state = 0;
8245  (yyval.node) = (yyvsp[-1].node);
8246  /*% %*/
8247  /*% ripper: paren!($2) %*/
8248  }
8249 #line 8245 "parse.c" /* yacc.c:1646 */
8250  break;
8251 
8252  case 310:
8253 #line 2689 "parse.y" /* yacc.c:1646 */
8254  {
8255  /*%%%*/
8256  (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
8257  /*% %*/
8258  /*% ripper: const_path_ref!($1, $3) %*/
8259  }
8260 #line 8256 "parse.c" /* yacc.c:1646 */
8261  break;
8262 
8263  case 311:
8264 #line 2696 "parse.y" /* yacc.c:1646 */
8265  {
8266  /*%%%*/
8267  (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
8268  /*% %*/
8269  /*% ripper: top_const_ref!($2) %*/
8270  }
8271 #line 8267 "parse.c" /* yacc.c:1646 */
8272  break;
8273 
8274  case 312:
8275 #line 2703 "parse.y" /* yacc.c:1646 */
8276  {
8277  /*%%%*/
8278  (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
8279  /*% %*/
8280  /*% ripper: array!(escape_Qundef($2)) %*/
8281  }
8282 #line 8278 "parse.c" /* yacc.c:1646 */
8283  break;
8284 
8285  case 313:
8286 #line 2710 "parse.y" /* yacc.c:1646 */
8287  {
8288  /*%%%*/
8289  (yyval.node) = new_hash(p, (yyvsp[-1].node), &(yyloc));
8290  (yyval.node)->nd_brace = TRUE;
8291  /*% %*/
8292  /*% ripper: hash!(escape_Qundef($2)) %*/
8293  }
8294 #line 8290 "parse.c" /* yacc.c:1646 */
8295  break;
8296 
8297  case 314:
8298 #line 2718 "parse.y" /* yacc.c:1646 */
8299  {
8300  /*%%%*/
8301  (yyval.node) = NEW_RETURN(0, &(yyloc));
8302  /*% %*/
8303  /*% ripper: return0! %*/
8304  }
8305 #line 8301 "parse.c" /* yacc.c:1646 */
8306  break;
8307 
8308  case 315:
8309 #line 2725 "parse.y" /* yacc.c:1646 */
8310  {
8311  /*%%%*/
8312  (yyval.node) = new_yield(p, (yyvsp[-1].node), &(yyloc));
8313  /*% %*/
8314  /*% ripper: yield!(paren!($3)) %*/
8315  }
8316 #line 8312 "parse.c" /* yacc.c:1646 */
8317  break;
8318 
8319  case 316:
8320 #line 2732 "parse.y" /* yacc.c:1646 */
8321  {
8322  /*%%%*/
8323  (yyval.node) = NEW_YIELD(0, &(yyloc));
8324  /*% %*/
8325  /*% ripper: yield!(paren!(args_new!)) %*/
8326  }
8327 #line 8323 "parse.c" /* yacc.c:1646 */
8328  break;
8329 
8330  case 317:
8331 #line 2739 "parse.y" /* yacc.c:1646 */
8332  {
8333  /*%%%*/
8334  (yyval.node) = NEW_YIELD(0, &(yyloc));
8335  /*% %*/
8336  /*% ripper: yield0! %*/
8337  }
8338 #line 8334 "parse.c" /* yacc.c:1646 */
8339  break;
8340 
8341  case 318:
8342 #line 2745 "parse.y" /* yacc.c:1646 */
8343  {p->in_defined = 1;}
8344 #line 8340 "parse.c" /* yacc.c:1646 */
8345  break;
8346 
8347  case 319:
8348 #line 2746 "parse.y" /* yacc.c:1646 */
8349  {
8350  p->in_defined = 0;
8351  (yyval.node) = new_defined(p, (yyvsp[-1].node), &(yyloc));
8352  }
8353 #line 8349 "parse.c" /* yacc.c:1646 */
8354  break;
8355 
8356  case 320:
8357 #line 2751 "parse.y" /* yacc.c:1646 */
8358  {
8359  (yyval.node) = call_uni_op(p, method_cond(p, (yyvsp[-1].node), &(yylsp[-1])), METHOD_NOT, &(yylsp[-3]), &(yyloc));
8360  }
8361 #line 8357 "parse.c" /* yacc.c:1646 */
8362  break;
8363 
8364  case 321:
8365 #line 2755 "parse.y" /* yacc.c:1646 */
8366  {
8367  (yyval.node) = call_uni_op(p, method_cond(p, new_nil(&(yylsp[-1])), &(yylsp[-1])), METHOD_NOT, &(yylsp[-2]), &(yyloc));
8368  }
8369 #line 8365 "parse.c" /* yacc.c:1646 */
8370  break;
8371 
8372  case 322:
8373 #line 2759 "parse.y" /* yacc.c:1646 */
8374  {
8375  /*%%%*/
8376  (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
8377  /*% %*/
8378  /*% ripper: method_add_block!(method_add_arg!(fcall!($1), args_new!), $2) %*/
8379  }
8380 #line 8376 "parse.c" /* yacc.c:1646 */
8381  break;
8382 
8383  case 324:
8384 #line 2767 "parse.y" /* yacc.c:1646 */
8385  {
8386  /*%%%*/
8387  block_dup_check(p, (yyvsp[-1].node)->nd_args, (yyvsp[0].node));
8388  (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
8389  /*% %*/
8390  /*% ripper: method_add_block!($1, $2) %*/
8391  }
8392 #line 8388 "parse.c" /* yacc.c:1646 */
8393  break;
8394 
8395  case 325:
8396 #line 2775 "parse.y" /* yacc.c:1646 */
8397  {
8398  token_info_push(p, "->", &(yylsp[0]));
8399  }
8400 #line 8396 "parse.c" /* yacc.c:1646 */
8401  break;
8402 
8403  case 326:
8404 #line 2779 "parse.y" /* yacc.c:1646 */
8405  {
8406  (yyval.node) = (yyvsp[0].node);
8407  /*%%%*/
8408  nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
8409  /*% %*/
8410  }
8411 #line 8407 "parse.c" /* yacc.c:1646 */
8412  break;
8413 
8414  case 327:
8415 #line 2789 "parse.y" /* yacc.c:1646 */
8416  {
8417  /*%%%*/
8418  (yyval.node) = new_if(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc));
8419  fixpos((yyval.node), (yyvsp[-4].node));
8420  /*% %*/
8421  /*% ripper: if!($2, $4, escape_Qundef($5)) %*/
8422  }
8423 #line 8419 "parse.c" /* yacc.c:1646 */
8424  break;
8425 
8426  case 328:
8427 #line 2800 "parse.y" /* yacc.c:1646 */
8428  {
8429  /*%%%*/
8430  (yyval.node) = new_unless(p, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[-1].node), &(yyloc));
8431  fixpos((yyval.node), (yyvsp[-4].node));
8432  /*% %*/
8433  /*% ripper: unless!($2, $4, escape_Qundef($5)) %*/
8434  }
8435 #line 8431 "parse.c" /* yacc.c:1646 */
8436  break;
8437 
8438  case 329:
8439 #line 2810 "parse.y" /* yacc.c:1646 */
8440  {
8441  /*%%%*/
8442  (yyval.node) = NEW_WHILE(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc));
8443  fixpos((yyval.node), (yyvsp[-2].node));
8444  /*% %*/
8445  /*% ripper: while!($2, $3) %*/
8446  }
8447 #line 8443 "parse.c" /* yacc.c:1646 */
8448  break;
8449 
8450  case 330:
8451 #line 2820 "parse.y" /* yacc.c:1646 */
8452  {
8453  /*%%%*/
8454  (yyval.node) = NEW_UNTIL(cond(p, (yyvsp[-2].node), &(yylsp[-2])), (yyvsp[-1].node), 1, &(yyloc));
8455  fixpos((yyval.node), (yyvsp[-2].node));
8456  /*% %*/
8457  /*% ripper: until!($2, $3) %*/
8458  }
8459 #line 8455 "parse.c" /* yacc.c:1646 */
8460  break;
8461 
8462  case 331:
8463 #line 2828 "parse.y" /* yacc.c:1646 */
8464  {
8465  (yyval.val) = p->case_labels;
8466  p->case_labels = Qnil;
8467  }
8468 #line 8464 "parse.c" /* yacc.c:1646 */
8469  break;
8470 
8471  case 332:
8472 #line 2834 "parse.y" /* yacc.c:1646 */
8473  {
8475  p->case_labels = (yyvsp[-2].val);
8476  /*%%%*/
8477  (yyval.node) = NEW_CASE((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc));
8478  fixpos((yyval.node), (yyvsp[-4].node));
8479  /*% %*/
8480  /*% ripper: case!($2, $5) %*/
8481  }
8482 #line 8478 "parse.c" /* yacc.c:1646 */
8483  break;
8484 
8485  case 333:
8486 #line 2844 "parse.y" /* yacc.c:1646 */
8487  {
8488  (yyval.val) = p->case_labels;
8489  p->case_labels = 0;
8490  }
8491 #line 8487 "parse.c" /* yacc.c:1646 */
8492  break;
8493 
8494  case 334:
8495 #line 2850 "parse.y" /* yacc.c:1646 */
8496  {
8498  p->case_labels = (yyvsp[-2].val);
8499  /*%%%*/
8500  (yyval.node) = NEW_CASE2((yyvsp[-1].node), &(yyloc));
8501  /*% %*/
8502  /*% ripper: case!(Qnil, $4) %*/
8503  }
8504 #line 8500 "parse.c" /* yacc.c:1646 */
8505  break;
8506 
8507  case 335:
8508 #line 2861 "parse.y" /* yacc.c:1646 */
8509  {
8510  /*%%%*/
8511  (yyval.node) = new_case3(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
8512  /*% %*/
8513  /*% ripper: case!($2, $4) %*/
8514  }
8515 #line 8511 "parse.c" /* yacc.c:1646 */
8516  break;
8517 
8518  case 336:
8519 #line 2870 "parse.y" /* yacc.c:1646 */
8520  {
8521  /*%%%*/
8522  /*
8523  * for a, b, c in e
8524  * #=>
8525  * e.each{|*x| a, b, c = x}
8526  *
8527  * for a in e
8528  * #=>
8529  * e.each{|x| a, = x}
8530  */
8531  ID id = internal_id(p);
8532  NODE *m = NEW_ARGS_AUX(0, 0, &NULL_LOC);
8533  NODE *args, *scope, *internal_var = NEW_DVAR(id, &(yylsp[-4]));
8535  ID *tbl = ALLOC_N(ID, 3);
8536  rb_imemo_tmpbuf_set_ptr(tmpbuf, tbl);
8537  tbl[0] = 1 /* length of local var table */; tbl[1] = id /* internal id */;
8538  tbl[2] = tmpbuf;
8539 
8540  switch (nd_type((yyvsp[-4].node))) {
8541  case NODE_LASGN:
8542  case NODE_DASGN:
8543  case NODE_DASGN_CURR: /* e.each {|internal_var| a = internal_var; ... } */
8544  (yyvsp[-4].node)->nd_value = internal_var;
8545  id = 0;
8546  m->nd_plen = 1;
8547  m->nd_next = (yyvsp[-4].node);
8548  break;
8549  case NODE_MASGN: /* e.each {|*internal_var| a, b, c = (internal_var.length == 1 && Array === (tmp = internal_var[0]) ? tmp : internal_var); ... } */
8550  m->nd_next = node_assign(p, (yyvsp[-4].node), NEW_FOR_MASGN(internal_var, &(yylsp[-4])), &(yylsp[-4]));
8551  break;
8552  default: /* e.each {|*internal_var| @a, B, c[1], d.attr = internal_val; ... } */
8553  m->nd_next = node_assign(p, NEW_MASGN(NEW_LIST((yyvsp[-4].node), &(yylsp[-4])), 0, &(yylsp[-4])), internal_var, &(yylsp[-4]));
8554  }
8555  /* {|*internal_id| <m> = internal_id; ... } */
8556  args = new_args(p, m, 0, id, 0, new_args_tail(p, 0, 0, 0, &(yylsp[-4])), &(yylsp[-4]));
8557  scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[-1].node), args, &(yyloc));
8558  RB_OBJ_WRITTEN(p->ast, Qnil, tmpbuf);
8559  (yyval.node) = NEW_FOR((yyvsp[-2].node), scope, &(yyloc));
8560  fixpos((yyval.node), (yyvsp[-4].node));
8561  /*% %*/
8562  /*% ripper: for!($2, $4, $5) %*/
8563  }
8564 #line 8560 "parse.c" /* yacc.c:1646 */
8565  break;
8566 
8567  case 337:
8568 #line 2915 "parse.y" /* yacc.c:1646 */
8569  {
8570  if (p->in_def) {
8571  YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[-1]));
8572  yyerror1(&loc, "class definition in method body");
8573  }
8574  (yyvsp[-2].num) = p->in_class;
8575  p->in_class = 1;
8576  local_push(p, 0);
8577  }
8578 #line 8574 "parse.c" /* yacc.c:1646 */
8579  break;
8580 
8581  case 338:
8582 #line 2926 "parse.y" /* yacc.c:1646 */
8583  {
8584  /*%%%*/
8585  (yyval.node) = NEW_CLASS((yyvsp[-4].node), (yyvsp[-1].node), (yyvsp[-3].node), &(yyloc));
8586  nd_set_line((yyval.node)->nd_body, (yylsp[0]).end_pos.lineno);
8587  set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
8588  nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
8589  /*% %*/
8590  /*% ripper: class!($2, $3, $5) %*/
8591  local_pop(p);
8592  p->in_class = (yyvsp[-5].num) & 1;
8593  }
8594 #line 8590 "parse.c" /* yacc.c:1646 */
8595  break;
8596 
8597  case 339:
8598 #line 2938 "parse.y" /* yacc.c:1646 */
8599  {
8600  (yyval.num) = (p->in_class << 1) | p->in_def;
8601  p->in_def = 0;
8602  p->in_class = 0;
8603  local_push(p, 0);
8604  }
8605 #line 8601 "parse.c" /* yacc.c:1646 */
8606  break;
8607 
8608  case 340:
8609 #line 2947 "parse.y" /* yacc.c:1646 */
8610  {
8611  /*%%%*/
8612  (yyval.node) = NEW_SCLASS((yyvsp[-4].node), (yyvsp[-1].node), &(yyloc));
8613  nd_set_line((yyval.node)->nd_body, (yylsp[0]).end_pos.lineno);
8614  set_line_body((yyvsp[-1].node), nd_line((yyvsp[-4].node)));
8615  fixpos((yyval.node), (yyvsp[-4].node));
8616  /*% %*/
8617  /*% ripper: sclass!($3, $6) %*/
8618  local_pop(p);
8619  p->in_def = (yyvsp[-3].num) & 1;
8620  p->in_class = ((yyvsp[-3].num) >> 1) & 1;
8621  }
8622 #line 8618 "parse.c" /* yacc.c:1646 */
8623  break;
8624 
8625  case 341:
8626 #line 2960 "parse.y" /* yacc.c:1646 */
8627  {
8628  if (p->in_def) {
8629  YYLTYPE loc = code_loc_gen(&(yylsp[-1]), &(yylsp[0]));
8630  yyerror1(&loc, "module definition in method body");
8631  }
8632  (yyvsp[-1].num) = p->in_class;
8633  p->in_class = 1;
8634  local_push(p, 0);
8635  }
8636 #line 8632 "parse.c" /* yacc.c:1646 */
8637  break;
8638 
8639  case 342:
8640 #line 2971 "parse.y" /* yacc.c:1646 */
8641  {
8642  /*%%%*/
8643  (yyval.node) = NEW_MODULE((yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
8644  nd_set_line((yyval.node)->nd_body, (yylsp[0]).end_pos.lineno);
8645  set_line_body((yyvsp[-1].node), (yylsp[-3]).end_pos.lineno);
8646  nd_set_line((yyval.node), (yylsp[-3]).end_pos.lineno);
8647  /*% %*/
8648  /*% ripper: module!($2, $4) %*/
8649  local_pop(p);
8650  p->in_class = (yyvsp[-4].num) & 1;
8651  }
8652 #line 8648 "parse.c" /* yacc.c:1646 */
8653  break;
8654 
8655  case 343:
8656 #line 2983 "parse.y" /* yacc.c:1646 */
8657  {
8658  numparam_name(p, get_id((yyvsp[0].id)));
8659  local_push(p, 0);
8660  (yyval.id) = p->cur_arg;
8661  p->cur_arg = 0;
8662  }
8663 #line 8659 "parse.c" /* yacc.c:1646 */
8664  break;
8665 
8666  case 344:
8667 #line 2989 "parse.y" /* yacc.c:1646 */
8668  {
8669  (yyval.num) = p->in_def;
8670  p->in_def = 1;
8671  }
8672 #line 8668 "parse.c" /* yacc.c:1646 */
8673  break;
8674 
8675  case 345:
8676 #line 2996 "parse.y" /* yacc.c:1646 */
8677  {
8678  /*%%%*/
8679  NODE *body = remove_begin((yyvsp[-1].node));
8680  reduce_nodes(p, &body);
8681  (yyval.node) = NEW_DEFN((yyvsp[-5].id), (yyvsp[-2].node), body, &(yyloc));
8682  nd_set_line((yyval.node)->nd_defn, (yylsp[0]).end_pos.lineno);
8683  set_line_body(body, (yylsp[-6]).beg_pos.lineno);
8684  /*% %*/
8685  /*% ripper: def!($2, $5, $6) %*/
8686  local_pop(p);
8687  p->in_def = (yyvsp[-3].num) & 1;
8688  p->cur_arg = (yyvsp[-4].id);
8689  }
8690 #line 8686 "parse.c" /* yacc.c:1646 */
8691  break;
8692 
8693  case 346:
8694 #line 3009 "parse.y" /* yacc.c:1646 */
8695  {SET_LEX_STATE(EXPR_FNAME);}
8696 #line 8692 "parse.c" /* yacc.c:1646 */
8697  break;
8698 
8699  case 347:
8700 #line 3010 "parse.y" /* yacc.c:1646 */
8701  {
8702  numparam_name(p, get_id((yyvsp[0].id)));
8703  (yyvsp[-1].num) = p->in_def;
8704  p->in_def = 1;
8705  SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
8706  local_push(p, 0);
8707  (yyval.id) = p->cur_arg;
8708  p->cur_arg = 0;
8709  }
8710 #line 8706 "parse.c" /* yacc.c:1646 */
8711  break;
8712 
8713  case 348:
8714 #line 3022 "parse.y" /* yacc.c:1646 */
8715  {
8716  /*%%%*/
8717  NODE *body = remove_begin((yyvsp[-1].node));
8718  reduce_nodes(p, &body);
8719  (yyval.node) = NEW_DEFS((yyvsp[-7].node), (yyvsp[-4].id), (yyvsp[-2].node), body, &(yyloc));
8720  nd_set_line((yyval.node)->nd_defn, (yylsp[0]).end_pos.lineno);
8721  set_line_body(body, (yylsp[-8]).beg_pos.lineno);
8722  /*% %*/
8723  /*% ripper: defs!($2, $3, $5, $7, $8) %*/
8724  local_pop(p);
8725  p->in_def = (yyvsp[-5].num) & 1;
8726  p->cur_arg = (yyvsp[-3].id);
8727  }
8728 #line 8724 "parse.c" /* yacc.c:1646 */
8729  break;
8730 
8731  case 349:
8732 #line 3036 "parse.y" /* yacc.c:1646 */
8733  {
8734  /*%%%*/
8735  (yyval.node) = NEW_BREAK(0, &(yyloc));
8736  /*% %*/
8737  /*% ripper: break!(args_new!) %*/
8738  }
8739 #line 8735 "parse.c" /* yacc.c:1646 */
8740  break;
8741 
8742  case 350:
8743 #line 3043 "parse.y" /* yacc.c:1646 */
8744  {
8745  /*%%%*/
8746  (yyval.node) = NEW_NEXT(0, &(yyloc));
8747  /*% %*/
8748  /*% ripper: next!(args_new!) %*/
8749  }
8750 #line 8746 "parse.c" /* yacc.c:1646 */
8751  break;
8752 
8753  case 351:
8754 #line 3050 "parse.y" /* yacc.c:1646 */
8755  {
8756  /*%%%*/
8757  (yyval.node) = NEW_REDO(&(yyloc));
8758  /*% %*/
8759  /*% ripper: redo! %*/
8760  }
8761 #line 8757 "parse.c" /* yacc.c:1646 */
8762  break;
8763 
8764  case 352:
8765 #line 3057 "parse.y" /* yacc.c:1646 */
8766  {
8767  /*%%%*/
8768  (yyval.node) = NEW_RETRY(&(yyloc));
8769  /*% %*/
8770  /*% ripper: retry! %*/
8771  }
8772 #line 8768 "parse.c" /* yacc.c:1646 */
8773  break;
8774 
8775  case 353:
8776 #line 3066 "parse.y" /* yacc.c:1646 */
8777  {
8778  value_expr((yyvsp[0].node));
8779  (yyval.node) = (yyvsp[0].node);
8780  }
8781 #line 8777 "parse.c" /* yacc.c:1646 */
8782  break;
8783 
8784  case 354:
8785 #line 3073 "parse.y" /* yacc.c:1646 */
8786  {
8787  token_info_push(p, "begin", &(yyloc));
8788  }
8789 #line 8785 "parse.c" /* yacc.c:1646 */
8790  break;
8791 
8792  case 355:
8793 #line 3079 "parse.y" /* yacc.c:1646 */
8794  {
8795  WARN_EOL("if");
8796  token_info_push(p, "if", &(yyloc));
8797  if (p->token_info && p->token_info->nonspc &&
8798  p->token_info->next && !strcmp(p->token_info->next->token, "else")) {
8799  const char *tok = p->lex.ptok;
8800  const char *beg = p->lex.pbeg + p->token_info->next->beg.column;
8801  beg += rb_strlen_lit("else");
8802  while (beg < tok && ISSPACE(*beg)) beg++;
8803  if (beg == tok) {
8804  p->token_info->nonspc = 0;
8805  }
8806  }
8807  }
8808 #line 8804 "parse.c" /* yacc.c:1646 */
8809  break;
8810 
8811  case 356:
8812 #line 3096 "parse.y" /* yacc.c:1646 */
8813  {
8814  token_info_push(p, "unless", &(yyloc));
8815  }
8816 #line 8812 "parse.c" /* yacc.c:1646 */
8817  break;
8818 
8819  case 357:
8820 #line 3102 "parse.y" /* yacc.c:1646 */
8821  {
8822  token_info_push(p, "while", &(yyloc));
8823  }
8824 #line 8820 "parse.c" /* yacc.c:1646 */
8825  break;
8826 
8827  case 358:
8828 #line 3108 "parse.y" /* yacc.c:1646 */
8829  {
8830  token_info_push(p, "until", &(yyloc));
8831  }
8832 #line 8828 "parse.c" /* yacc.c:1646 */
8833  break;
8834 
8835  case 359:
8836 #line 3114 "parse.y" /* yacc.c:1646 */
8837  {
8838  token_info_push(p, "case", &(yyloc));
8839  }
8840 #line 8836 "parse.c" /* yacc.c:1646 */
8841  break;
8842 
8843  case 360:
8844 #line 3120 "parse.y" /* yacc.c:1646 */
8845  {
8846  token_info_push(p, "for", &(yyloc));
8847  }
8848 #line 8844 "parse.c" /* yacc.c:1646 */
8849  break;
8850 
8851  case 361:
8852 #line 3126 "parse.y" /* yacc.c:1646 */
8853  {
8854  token_info_push(p, "class", &(yyloc));
8855  }
8856 #line 8852 "parse.c" /* yacc.c:1646 */
8857  break;
8858 
8859  case 362:
8860 #line 3132 "parse.y" /* yacc.c:1646 */
8861  {
8862  token_info_push(p, "module", &(yyloc));
8863  }
8864 #line 8860 "parse.c" /* yacc.c:1646 */
8865  break;
8866 
8867  case 363:
8868 #line 3138 "parse.y" /* yacc.c:1646 */
8869  {
8870  token_info_push(p, "def", &(yyloc));
8871  }
8872 #line 8868 "parse.c" /* yacc.c:1646 */
8873  break;
8874 
8875  case 364:
8876 #line 3144 "parse.y" /* yacc.c:1646 */
8877  {
8878  token_info_push(p, "do", &(yyloc));
8879  }
8880 #line 8876 "parse.c" /* yacc.c:1646 */
8881  break;
8882 
8883  case 365:
8884 #line 3150 "parse.y" /* yacc.c:1646 */
8885  {
8886  token_info_push(p, "do", &(yyloc));
8887  }
8888 #line 8884 "parse.c" /* yacc.c:1646 */
8889  break;
8890 
8891  case 366:
8892 #line 3156 "parse.y" /* yacc.c:1646 */
8893  {
8894  token_info_warn(p, "rescue", p->token_info, 1, &(yyloc));
8895  }
8896 #line 8892 "parse.c" /* yacc.c:1646 */
8897  break;
8898 
8899  case 367:
8900 #line 3162 "parse.y" /* yacc.c:1646 */
8901  {
8902  token_info_warn(p, "ensure", p->token_info, 1, &(yyloc));
8903  }
8904 #line 8900 "parse.c" /* yacc.c:1646 */
8905  break;
8906 
8907  case 368:
8908 #line 3168 "parse.y" /* yacc.c:1646 */
8909  {
8910  token_info_warn(p, "when", p->token_info, 0, &(yyloc));
8911  }
8912 #line 8908 "parse.c" /* yacc.c:1646 */
8913  break;
8914 
8915  case 369:
8916 #line 3174 "parse.y" /* yacc.c:1646 */
8917  {
8918  token_info *ptinfo_beg = p->token_info;
8919  int same = ptinfo_beg && strcmp(ptinfo_beg->token, "case") != 0;
8920  token_info_warn(p, "else", p->token_info, same, &(yyloc));
8921  if (same) {
8922  token_info e;
8923  e.next = ptinfo_beg->next;
8924  e.token = "else";
8925  token_info_setup(&e, p->lex.pbeg, &(yyloc));
8926  if (!e.nonspc) *ptinfo_beg = e;
8927  }
8928  }
8929 #line 8925 "parse.c" /* yacc.c:1646 */
8930  break;
8931 
8932  case 370:
8933 #line 3189 "parse.y" /* yacc.c:1646 */
8934  {
8935  WARN_EOL("elsif");
8936  token_info_warn(p, "elsif", p->token_info, 1, &(yyloc));
8937  }
8938 #line 8934 "parse.c" /* yacc.c:1646 */
8939  break;
8940 
8941  case 371:
8942 #line 3196 "parse.y" /* yacc.c:1646 */
8943  {
8944  token_info_pop(p, "end", &(yyloc));
8945  }
8946 #line 8942 "parse.c" /* yacc.c:1646 */
8947  break;
8948 
8949  case 372:
8950 #line 3202 "parse.y" /* yacc.c:1646 */
8951  {
8952  if (p->in_class && !p->in_def && !dyna_in_block(p))
8953  yyerror1(&(yylsp[0]), "Invalid return in class/module body");
8954  }
8955 #line 8951 "parse.c" /* yacc.c:1646 */
8956  break;
8957 
8958  case 379:
8959 #line 3221 "parse.y" /* yacc.c:1646 */
8960  {
8961  /*%%%*/
8962  (yyval.node) = new_if(p, (yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
8963  fixpos((yyval.node), (yyvsp[-3].node));
8964  /*% %*/
8965  /*% ripper: elsif!($2, $4, escape_Qundef($5)) %*/
8966  }
8967 #line 8963 "parse.c" /* yacc.c:1646 */
8968  break;
8969 
8970  case 381:
8971 #line 3232 "parse.y" /* yacc.c:1646 */
8972  {
8973  /*%%%*/
8974  (yyval.node) = (yyvsp[0].node);
8975  /*% %*/
8976  /*% ripper: else!($2) %*/
8977  }
8978 #line 8974 "parse.c" /* yacc.c:1646 */
8979  break;
8980 
8981  case 384:
8982 #line 3245 "parse.y" /* yacc.c:1646 */
8983  {
8984  /*%%%*/
8985  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
8986  mark_lvar_used(p, (yyval.node));
8987  /*% %*/
8988  /*% ripper: assignable(p, $1) %*/
8989  }
8990 #line 8986 "parse.c" /* yacc.c:1646 */
8991  break;
8992 
8993  case 385:
8994 #line 3253 "parse.y" /* yacc.c:1646 */
8995  {
8996  /*%%%*/
8997  (yyval.node) = (yyvsp[-1].node);
8998  /*% %*/
8999  /*% ripper: mlhs_paren!($2) %*/
9000  }
9001 #line 8997 "parse.c" /* yacc.c:1646 */
9002  break;
9003 
9004  case 386:
9005 #line 3262 "parse.y" /* yacc.c:1646 */
9006  {
9007  /*%%%*/
9008  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
9009  /*% %*/
9010  /*% ripper: mlhs_add!(mlhs_new!, $1) %*/
9011  }
9012 #line 9008 "parse.c" /* yacc.c:1646 */
9013  break;
9014 
9015  case 387:
9016 #line 3269 "parse.y" /* yacc.c:1646 */
9017  {
9018  /*%%%*/
9019  (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[0].node));
9020  /*% %*/
9021  /*% ripper: mlhs_add!($1, $3) %*/
9022  }
9023 #line 9019 "parse.c" /* yacc.c:1646 */
9024  break;
9025 
9026  case 388:
9027 #line 3278 "parse.y" /* yacc.c:1646 */
9028  {
9029  /*%%%*/
9030  (yyval.node) = NEW_MASGN((yyvsp[0].node), 0, &(yyloc));
9031  /*% %*/
9032  /*% ripper: $1 %*/
9033  }
9034 #line 9030 "parse.c" /* yacc.c:1646 */
9035  break;
9036 
9037  case 389:
9038 #line 3285 "parse.y" /* yacc.c:1646 */
9039  {
9040  /*%%%*/
9041  (yyval.node) = NEW_MASGN((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
9042  /*% %*/
9043  /*% ripper: mlhs_add_star!($1, $3) %*/
9044  }
9045 #line 9041 "parse.c" /* yacc.c:1646 */
9046  break;
9047 
9048  case 390:
9049 #line 3292 "parse.y" /* yacc.c:1646 */
9050  {
9051  /*%%%*/
9052  (yyval.node) = NEW_MASGN((yyvsp[-4].node), NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
9053  /*% %*/
9054  /*% ripper: mlhs_add_post!(mlhs_add_star!($1, $3), $5) %*/
9055  }
9056 #line 9052 "parse.c" /* yacc.c:1646 */
9057  break;
9058 
9059  case 391:
9060 #line 3299 "parse.y" /* yacc.c:1646 */
9061  {
9062  /*%%%*/
9063  (yyval.node) = NEW_MASGN(0, (yyvsp[0].node), &(yyloc));
9064  /*% %*/
9065  /*% ripper: mlhs_add_star!(mlhs_new!, $1) %*/
9066  }
9067 #line 9063 "parse.c" /* yacc.c:1646 */
9068  break;
9069 
9070  case 392:
9071 #line 3306 "parse.y" /* yacc.c:1646 */
9072  {
9073  /*%%%*/
9074  (yyval.node) = NEW_MASGN(0, NEW_POSTARG((yyvsp[-2].node), (yyvsp[0].node), &(yyloc)), &(yyloc));
9075  /*% %*/
9076  /*% ripper: mlhs_add_post!(mlhs_add_star!(mlhs_new!, $1), $3) %*/
9077  }
9078 #line 9074 "parse.c" /* yacc.c:1646 */
9079  break;
9080 
9081  case 393:
9082 #line 3315 "parse.y" /* yacc.c:1646 */
9083  {
9084  /*%%%*/
9085  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
9086  mark_lvar_used(p, (yyval.node));
9087  /*% %*/
9088  /*% ripper: assignable(p, $2) %*/
9089  }
9090 #line 9086 "parse.c" /* yacc.c:1646 */
9091  break;
9092 
9093  case 394:
9094 #line 3323 "parse.y" /* yacc.c:1646 */
9095  {
9096  /*%%%*/
9097  (yyval.node) = NODE_SPECIAL_NO_NAME_REST;
9098  /*% %*/
9099  /*% ripper: Qnil %*/
9100  }
9101 #line 9097 "parse.c" /* yacc.c:1646 */
9102  break;
9103 
9104  case 395:
9105 #line 3332 "parse.y" /* yacc.c:1646 */
9106  {
9107  (yyval.node) = new_args_tail(p, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
9108  }
9109 #line 9105 "parse.c" /* yacc.c:1646 */
9110  break;
9111 
9112  case 396:
9113 #line 3336 "parse.y" /* yacc.c:1646 */
9114  {
9115  (yyval.node) = new_args_tail(p, (yyvsp[-1].node), Qnone, (yyvsp[0].id), &(yylsp[-1]));
9116  }
9117 #line 9113 "parse.c" /* yacc.c:1646 */
9118  break;
9119 
9120  case 397:
9121 #line 3340 "parse.y" /* yacc.c:1646 */
9122  {
9123  (yyval.node) = new_args_tail(p, Qnone, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
9124  }
9125 #line 9121 "parse.c" /* yacc.c:1646 */
9126  break;
9127 
9128  case 398:
9129 #line 3344 "parse.y" /* yacc.c:1646 */
9130  {
9131  (yyval.node) = new_args_tail(p, Qnone, ID2VAL(idNil), (yyvsp[0].id), &(yylsp[-1]));
9132  }
9133 #line 9129 "parse.c" /* yacc.c:1646 */
9134  break;
9135 
9136  case 399:
9137 #line 3348 "parse.y" /* yacc.c:1646 */
9138  {
9139  (yyval.node) = new_args_tail(p, Qnone, Qnone, (yyvsp[0].id), &(yylsp[0]));
9140  }
9141 #line 9137 "parse.c" /* yacc.c:1646 */
9142  break;
9143 
9144  case 400:
9145 #line 3354 "parse.y" /* yacc.c:1646 */
9146  {
9147  (yyval.node) = (yyvsp[0].node);
9148  }
9149 #line 9145 "parse.c" /* yacc.c:1646 */
9150  break;
9151 
9152  case 401:
9153 #line 3358 "parse.y" /* yacc.c:1646 */
9154  {
9155  (yyval.node) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
9156  }
9157 #line 9153 "parse.c" /* yacc.c:1646 */
9158  break;
9159 
9160  case 402:
9161 #line 3364 "parse.y" /* yacc.c:1646 */
9162  {
9163  (yyval.node) = new_args(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
9164  }
9165 #line 9161 "parse.c" /* yacc.c:1646 */
9166  break;
9167 
9168  case 403:
9169 #line 3368 "parse.y" /* yacc.c:1646 */
9170  {
9171  (yyval.node) = new_args(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9172  }
9173 #line 9169 "parse.c" /* yacc.c:1646 */
9174  break;
9175 
9176  case 404:
9177 #line 3372 "parse.y" /* yacc.c:1646 */
9178  {
9179  (yyval.node) = new_args(p, (yyvsp[-3].node), (yyvsp[-1].node), Qnone, Qnone, (yyvsp[0].node), &(yyloc));
9180  }
9181 #line 9177 "parse.c" /* yacc.c:1646 */
9182  break;
9183 
9184  case 405:
9185 #line 3376 "parse.y" /* yacc.c:1646 */
9186  {
9187  (yyval.node) = new_args(p, (yyvsp[-5].node), (yyvsp[-3].node), Qnone, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9188  }
9189 #line 9185 "parse.c" /* yacc.c:1646 */
9190  break;
9191 
9192  case 406:
9193 #line 3380 "parse.y" /* yacc.c:1646 */
9194  {
9195  (yyval.node) = new_args(p, (yyvsp[-3].node), Qnone, (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
9196  }
9197 #line 9193 "parse.c" /* yacc.c:1646 */
9198  break;
9199 
9200  case 407:
9201 #line 3384 "parse.y" /* yacc.c:1646 */
9202  {
9203  /*%%%*/
9204  /* magic number for rest_id in iseq_set_arguments() */
9205  (yyval.node) = new_args(p, (yyvsp[-1].node), Qnone, NODE_SPECIAL_EXCESSIVE_COMMA, Qnone, new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[-1])), &(yyloc));
9206  /*% %*/
9207  /*% ripper: new_args(p, $1, Qnone, excessed_comma!, Qnone, new_args_tail(p, Qnone, Qnone, Qnone, NULL), NULL) %*/
9208  }
9209 #line 9205 "parse.c" /* yacc.c:1646 */
9210  break;
9211 
9212  case 408:
9213 #line 3392 "parse.y" /* yacc.c:1646 */
9214  {
9215  (yyval.node) = new_args(p, (yyvsp[-5].node), Qnone, (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9216  }
9217 #line 9213 "parse.c" /* yacc.c:1646 */
9218  break;
9219 
9220  case 409:
9221 #line 3396 "parse.y" /* yacc.c:1646 */
9222  {
9223  (yyval.node) = new_args(p, (yyvsp[-1].node), Qnone, Qnone, Qnone, (yyvsp[0].node), &(yyloc));
9224  }
9225 #line 9221 "parse.c" /* yacc.c:1646 */
9226  break;
9227 
9228  case 410:
9229 #line 3400 "parse.y" /* yacc.c:1646 */
9230  {
9231  (yyval.node) = new_args(p, Qnone, (yyvsp[-3].node), (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
9232  }
9233 #line 9229 "parse.c" /* yacc.c:1646 */
9234  break;
9235 
9236  case 411:
9237 #line 3404 "parse.y" /* yacc.c:1646 */
9238  {
9239  (yyval.node) = new_args(p, Qnone, (yyvsp[-5].node), (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9240  }
9241 #line 9237 "parse.c" /* yacc.c:1646 */
9242  break;
9243 
9244  case 412:
9245 #line 3408 "parse.y" /* yacc.c:1646 */
9246  {
9247  (yyval.node) = new_args(p, Qnone, (yyvsp[-1].node), Qnone, Qnone, (yyvsp[0].node), &(yyloc));
9248  }
9249 #line 9245 "parse.c" /* yacc.c:1646 */
9250  break;
9251 
9252  case 413:
9253 #line 3412 "parse.y" /* yacc.c:1646 */
9254  {
9255  (yyval.node) = new_args(p, Qnone, (yyvsp[-3].node), Qnone, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9256  }
9257 #line 9253 "parse.c" /* yacc.c:1646 */
9258  break;
9259 
9260  case 414:
9261 #line 3416 "parse.y" /* yacc.c:1646 */
9262  {
9263  (yyval.node) = new_args(p, Qnone, Qnone, (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
9264  }
9265 #line 9261 "parse.c" /* yacc.c:1646 */
9266  break;
9267 
9268  case 415:
9269 #line 3420 "parse.y" /* yacc.c:1646 */
9270  {
9271  (yyval.node) = new_args(p, Qnone, Qnone, (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9272  }
9273 #line 9269 "parse.c" /* yacc.c:1646 */
9274  break;
9275 
9276  case 416:
9277 #line 3424 "parse.y" /* yacc.c:1646 */
9278  {
9279  (yyval.node) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyvsp[0].node), &(yyloc));
9280  }
9281 #line 9277 "parse.c" /* yacc.c:1646 */
9282  break;
9283 
9284  case 418:
9285 #line 3431 "parse.y" /* yacc.c:1646 */
9286  {
9287  p->command_start = TRUE;
9288  }
9289 #line 9285 "parse.c" /* yacc.c:1646 */
9290  break;
9291 
9292  case 419:
9293 #line 3437 "parse.y" /* yacc.c:1646 */
9294  {
9295  p->cur_arg = 0;
9297  /*%%%*/
9298  (yyval.node) = 0;
9299  /*% %*/
9300  /*% ripper: block_var!(params!(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil), escape_Qundef($2)) %*/
9301  }
9302 #line 9298 "parse.c" /* yacc.c:1646 */
9303  break;
9304 
9305  case 420:
9306 #line 3446 "parse.y" /* yacc.c:1646 */
9307  {
9308  p->cur_arg = 0;
9310  /*%%%*/
9311  (yyval.node) = (yyvsp[-2].node);
9312  /*% %*/
9313  /*% ripper: block_var!(escape_Qundef($2), escape_Qundef($3)) %*/
9314  }
9315 #line 9311 "parse.c" /* yacc.c:1646 */
9316  break;
9317 
9318  case 421:
9319 #line 3458 "parse.y" /* yacc.c:1646 */
9320  {
9321  (yyval.node) = 0;
9322  }
9323 #line 9319 "parse.c" /* yacc.c:1646 */
9324  break;
9325 
9326  case 422:
9327 #line 3462 "parse.y" /* yacc.c:1646 */
9328  {
9329  /*%%%*/
9330  (yyval.node) = 0;
9331  /*% %*/
9332  /*% ripper: $3 %*/
9333  }
9334 #line 9330 "parse.c" /* yacc.c:1646 */
9335  break;
9336 
9337  case 425:
9338 #line 3477 "parse.y" /* yacc.c:1646 */
9339  {
9340  new_bv(p, get_id((yyvsp[0].id)));
9341  /*% ripper: get_value($1) %*/
9342  }
9343 #line 9339 "parse.c" /* yacc.c:1646 */
9344  break;
9345 
9346  case 426:
9347 #line 3482 "parse.y" /* yacc.c:1646 */
9348  {
9349  (yyval.node) = 0;
9350  }
9351 #line 9347 "parse.c" /* yacc.c:1646 */
9352  break;
9353 
9354  case 427:
9355 #line 3487 "parse.y" /* yacc.c:1646 */
9356  {
9357  (yyval.vars) = dyna_push(p);
9358  }
9359 #line 9355 "parse.c" /* yacc.c:1646 */
9360  break;
9361 
9362  case 428:
9363 #line 3490 "parse.y" /* yacc.c:1646 */
9364  {
9365  (yyval.num) = p->lex.lpar_beg;
9366  p->lex.lpar_beg = p->lex.paren_nest;
9367  }
9368 #line 9364 "parse.c" /* yacc.c:1646 */
9369  break;
9370 
9371  case 429:
9372 #line 3494 "parse.y" /* yacc.c:1646 */
9373  {
9374  (yyval.num) = p->max_numparam;
9375  p->max_numparam = 0;
9376  }
9377 #line 9373 "parse.c" /* yacc.c:1646 */
9378  break;
9379 
9380  case 430:
9381 #line 3498 "parse.y" /* yacc.c:1646 */
9382  {
9383  (yyval.node) = numparam_push(p);
9384  }
9385 #line 9381 "parse.c" /* yacc.c:1646 */
9386  break;
9387 
9388  case 431:
9389 #line 3502 "parse.y" /* yacc.c:1646 */
9390  {
9391  CMDARG_PUSH(0);
9392  }
9393 #line 9389 "parse.c" /* yacc.c:1646 */
9394  break;
9395 
9396  case 432:
9397 #line 3506 "parse.y" /* yacc.c:1646 */
9398  {
9399  int max_numparam = p->max_numparam;
9400  p->lex.lpar_beg = (yyvsp[-5].num);
9401  p->max_numparam = (yyvsp[-4].num);
9402  CMDARG_POP();
9403  (yyvsp[-2].node) = args_with_numbered(p, (yyvsp[-2].node), max_numparam);
9404  /*%%%*/
9405  {
9406  YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
9407  (yyval.node) = NEW_LAMBDA((yyvsp[-2].node), (yyvsp[0].node), &loc);
9408  nd_set_line((yyval.node)->nd_body, (yylsp[0]).end_pos.lineno);
9409  nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
9410  }
9411  /*% %*/
9412  /*% ripper: lambda!($5, $7) %*/
9413  numparam_pop(p, (yyvsp[-3].node));
9414  dyna_pop(p, (yyvsp[-6].vars));
9415  }
9416 #line 9412 "parse.c" /* yacc.c:1646 */
9417  break;
9418 
9419  case 433:
9420 #line 3527 "parse.y" /* yacc.c:1646 */
9421  {
9422  /*%%%*/
9423  (yyval.node) = (yyvsp[-2].node);
9425  /*% %*/
9426  /*% ripper: paren!($2) %*/
9427  }
9428 #line 9424 "parse.c" /* yacc.c:1646 */
9429  break;
9430 
9431  case 434:
9432 #line 3535 "parse.y" /* yacc.c:1646 */
9433  {
9434  /*%%%*/
9435  if (!args_info_empty_p((yyvsp[0].node)->nd_ainfo))
9437  /*% %*/
9438  (yyval.node) = (yyvsp[0].node);
9439  }
9440 #line 9436 "parse.c" /* yacc.c:1646 */
9441  break;
9442 
9443  case 435:
9444 #line 3545 "parse.y" /* yacc.c:1646 */
9445  {
9446  token_info_pop(p, "}", &(yylsp[0]));
9447  (yyval.node) = (yyvsp[-1].node);
9448  }
9449 #line 9445 "parse.c" /* yacc.c:1646 */
9450  break;
9451 
9452  case 436:
9453 #line 3550 "parse.y" /* yacc.c:1646 */
9454  {
9455  (yyval.node) = (yyvsp[-1].node);
9456  }
9457 #line 9453 "parse.c" /* yacc.c:1646 */
9458  break;
9459 
9460  case 437:
9461 #line 3556 "parse.y" /* yacc.c:1646 */
9462  {
9463  (yyval.node) = (yyvsp[-1].node);
9464  /*%%%*/
9465  (yyval.node)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
9466  nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
9467  /*% %*/
9468  }
9469 #line 9465 "parse.c" /* yacc.c:1646 */
9470  break;
9471 
9472  case 438:
9473 #line 3566 "parse.y" /* yacc.c:1646 */
9474  {
9475  /*%%%*/
9476  if (nd_type((yyvsp[-1].node)) == NODE_YIELD) {
9477  compile_error(p, "block given to yield");
9478  }
9479  else {
9480  block_dup_check(p, (yyvsp[-1].node)->nd_args, (yyvsp[0].node));
9481  }
9482  (yyval.node) = method_add_block(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9483  fixpos((yyval.node), (yyvsp[-1].node));
9484  /*% %*/
9485  /*% ripper: method_add_block!($1, $2) %*/
9486  }
9487 #line 9483 "parse.c" /* yacc.c:1646 */
9488  break;
9489 
9490  case 439:
9491 #line 3580 "parse.y" /* yacc.c:1646 */
9492  {
9493  /*%%%*/
9494  (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
9495  /*% %*/
9496  /*% ripper: opt_event(:method_add_arg!, call!($1, $2, $3), $4) %*/
9497  }
9498 #line 9494 "parse.c" /* yacc.c:1646 */
9499  break;
9500 
9501  case 440:
9502 #line 3587 "parse.y" /* yacc.c:1646 */
9503  {
9504  /*%%%*/
9505  (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
9506  /*% %*/
9507  /*% ripper: opt_event(:method_add_block!, command_call!($1, $2, $3, $4), $5) %*/
9508  }
9509 #line 9505 "parse.c" /* yacc.c:1646 */
9510  break;
9511 
9512  case 441:
9513 #line 3594 "parse.y" /* yacc.c:1646 */
9514  {
9515  /*%%%*/
9516  (yyval.node) = new_command_qcall(p, (yyvsp[-3].id), (yyvsp[-4].node), (yyvsp[-2].id), (yyvsp[-1].node), (yyvsp[0].node), &(yylsp[-2]), &(yyloc));
9517  /*% %*/
9518  /*% ripper: method_add_block!(command_call!($1, $2, $3, $4), $5) %*/
9519  }
9520 #line 9516 "parse.c" /* yacc.c:1646 */
9521  break;
9522 
9523  case 442:
9524 #line 3603 "parse.y" /* yacc.c:1646 */
9525  {
9526  /*%%%*/
9527  (yyval.node) = (yyvsp[-1].node);
9528  (yyval.node)->nd_args = (yyvsp[0].node);
9529  nd_set_last_loc((yyvsp[-1].node), (yylsp[0]).end_pos);
9530  /*% %*/
9531  /*% ripper: method_add_arg!(fcall!($1), $2) %*/
9532  }
9533 #line 9529 "parse.c" /* yacc.c:1646 */
9534  break;
9535 
9536  case 443:
9537 #line 3612 "parse.y" /* yacc.c:1646 */
9538  {
9539  /*%%%*/
9540  (yyval.node) = new_qcall(p, (yyvsp[-2].id), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
9541  nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
9542  /*% %*/
9543  /*% ripper: opt_event(:method_add_arg!, call!($1, $2, $3), $4) %*/
9544  }
9545 #line 9541 "parse.c" /* yacc.c:1646 */
9546  break;
9547 
9548  case 444:
9549 #line 3620 "parse.y" /* yacc.c:1646 */
9550  {
9551  /*%%%*/
9552  (yyval.node) = new_qcall(p, ID2VAL(idCOLON2), (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
9553  nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
9554  /*% %*/
9555  /*% ripper: method_add_arg!(call!($1, ID2VAL(idCOLON2), $3), $4) %*/
9556  }
9557 #line 9553 "parse.c" /* yacc.c:1646 */
9558  break;
9559 
9560  case 445:
9561 #line 3628 "parse.y" /* yacc.c:1646 */
9562  {
9563  /*%%%*/
9564  (yyval.node) = new_qcall(p, ID2VAL(idCOLON2), (yyvsp[-2].node), (yyvsp[0].id), Qnull, &(yylsp[0]), &(yyloc));
9565  /*% %*/
9566  /*% ripper: call!($1, ID2VAL(idCOLON2), $3) %*/
9567  }
9568 #line 9564 "parse.c" /* yacc.c:1646 */
9569  break;
9570 
9571  case 446:
9572 #line 3635 "parse.y" /* yacc.c:1646 */
9573  {
9574  /*%%%*/
9575  (yyval.node) = new_qcall(p, (yyvsp[-1].id), (yyvsp[-2].node), ID2VAL(idCall), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
9576  nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
9577  /*% %*/
9578  /*% ripper: method_add_arg!(call!($1, $2, ID2VAL(idCall)), $3) %*/
9579  }
9580 #line 9576 "parse.c" /* yacc.c:1646 */
9581  break;
9582 
9583  case 447:
9584 #line 3643 "parse.y" /* yacc.c:1646 */
9585  {
9586  /*%%%*/
9587  (yyval.node) = new_qcall(p, ID2VAL(idCOLON2), (yyvsp[-2].node), ID2VAL(idCall), (yyvsp[0].node), &(yylsp[-1]), &(yyloc));
9588  nd_set_line((yyval.node), (yylsp[-1]).end_pos.lineno);
9589  /*% %*/
9590  /*% ripper: method_add_arg!(call!($1, ID2VAL(idCOLON2), ID2VAL(idCall)), $3) %*/
9591  }
9592 #line 9588 "parse.c" /* yacc.c:1646 */
9593  break;
9594 
9595  case 448:
9596 #line 3651 "parse.y" /* yacc.c:1646 */
9597  {
9598  /*%%%*/
9599  (yyval.node) = NEW_SUPER((yyvsp[0].node), &(yyloc));
9600  /*% %*/
9601  /*% ripper: super!($2) %*/
9602  }
9603 #line 9599 "parse.c" /* yacc.c:1646 */
9604  break;
9605 
9606  case 449:
9607 #line 3658 "parse.y" /* yacc.c:1646 */
9608  {
9609  /*%%%*/
9610  (yyval.node) = NEW_ZSUPER(&(yyloc));
9611  /*% %*/
9612  /*% ripper: zsuper! %*/
9613  }
9614 #line 9610 "parse.c" /* yacc.c:1646 */
9615  break;
9616 
9617  case 450:
9618 #line 3665 "parse.y" /* yacc.c:1646 */
9619  {
9620  /*%%%*/
9621  if ((yyvsp[-3].node) && nd_type((yyvsp[-3].node)) == NODE_SELF)
9622  (yyval.node) = NEW_FCALL(tAREF, (yyvsp[-1].node), &(yyloc));
9623  else
9624  (yyval.node) = NEW_CALL((yyvsp[-3].node), tAREF, (yyvsp[-1].node), &(yyloc));
9625  fixpos((yyval.node), (yyvsp[-3].node));
9626  /*% %*/
9627  /*% ripper: aref!($1, escape_Qundef($3)) %*/
9628  }
9629 #line 9625 "parse.c" /* yacc.c:1646 */
9630  break;
9631 
9632  case 451:
9633 #line 3678 "parse.y" /* yacc.c:1646 */
9634  {
9635  (yyval.node) = (yyvsp[-1].node);
9636  /*%%%*/
9637  (yyval.node)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
9638  nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
9639  /*% %*/
9640  }
9641 #line 9637 "parse.c" /* yacc.c:1646 */
9642  break;
9643 
9644  case 452:
9645 #line 3686 "parse.y" /* yacc.c:1646 */
9646  {
9647  (yyval.node) = (yyvsp[-1].node);
9648  /*%%%*/
9649  (yyval.node)->nd_body->nd_loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
9650  nd_set_line((yyval.node), (yylsp[-2]).end_pos.lineno);
9651  /*% %*/
9652  }
9653 #line 9649 "parse.c" /* yacc.c:1646 */
9654  break;
9655 
9656  case 453:
9657 #line 3695 "parse.y" /* yacc.c:1646 */
9658  {(yyval.vars) = dyna_push(p);}
9659 #line 9655 "parse.c" /* yacc.c:1646 */
9660  break;
9661 
9662  case 454:
9663 #line 3696 "parse.y" /* yacc.c:1646 */
9664  {
9665  (yyval.num) = p->max_numparam;
9666  p->max_numparam = 0;
9667  }
9668 #line 9664 "parse.c" /* yacc.c:1646 */
9669  break;
9670 
9671  case 455:
9672 #line 3700 "parse.y" /* yacc.c:1646 */
9673  {
9674  (yyval.node) = numparam_push(p);
9675  }
9676 #line 9672 "parse.c" /* yacc.c:1646 */
9677  break;
9678 
9679  case 456:
9680 #line 3704 "parse.y" /* yacc.c:1646 */
9681  {
9682  int max_numparam = p->max_numparam;
9683  p->max_numparam = (yyvsp[-3].num);
9684  (yyvsp[-1].node) = args_with_numbered(p, (yyvsp[-1].node), max_numparam);
9685  /*%%%*/
9686  (yyval.node) = NEW_ITER((yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9687  /*% %*/
9688  /*% ripper: brace_block!(escape_Qundef($4), $5) %*/
9689  numparam_pop(p, (yyvsp[-2].node));
9690  dyna_pop(p, (yyvsp[-4].vars));
9691  }
9692 #line 9688 "parse.c" /* yacc.c:1646 */
9693  break;
9694 
9695  case 457:
9696 #line 3717 "parse.y" /* yacc.c:1646 */
9697  {(yyval.vars) = dyna_push(p);}
9698 #line 9694 "parse.c" /* yacc.c:1646 */
9699  break;
9700 
9701  case 458:
9702 #line 3718 "parse.y" /* yacc.c:1646 */
9703  {
9704  (yyval.num) = p->max_numparam;
9705  p->max_numparam = 0;
9706  }
9707 #line 9703 "parse.c" /* yacc.c:1646 */
9708  break;
9709 
9710  case 459:
9711 #line 3722 "parse.y" /* yacc.c:1646 */
9712  {
9713  (yyval.node) = numparam_push(p);
9714  CMDARG_PUSH(0);
9715  }
9716 #line 9712 "parse.c" /* yacc.c:1646 */
9717  break;
9718 
9719  case 460:
9720 #line 3727 "parse.y" /* yacc.c:1646 */
9721  {
9722  int max_numparam = p->max_numparam;
9723  p->max_numparam = (yyvsp[-3].num);
9724  (yyvsp[-1].node) = args_with_numbered(p, (yyvsp[-1].node), max_numparam);
9725  /*%%%*/
9726  (yyval.node) = NEW_ITER((yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9727  /*% %*/
9728  /*% ripper: do_block!(escape_Qundef($4), $5) %*/
9729  CMDARG_POP();
9730  numparam_pop(p, (yyvsp[-2].node));
9731  dyna_pop(p, (yyvsp[-4].vars));
9732  }
9733 #line 9729 "parse.c" /* yacc.c:1646 */
9734  break;
9735 
9736  case 461:
9737 #line 3742 "parse.y" /* yacc.c:1646 */
9738  {
9739  /*%%%*/
9740  check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
9741  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
9742  /*% %*/
9743  /*% ripper: args_add!(args_new!, $1) %*/
9744  }
9745 #line 9741 "parse.c" /* yacc.c:1646 */
9746  break;
9747 
9748  case 462:
9749 #line 3750 "parse.y" /* yacc.c:1646 */
9750  {
9751  /*%%%*/
9752  (yyval.node) = NEW_SPLAT((yyvsp[0].node), &(yyloc));
9753  /*% %*/
9754  /*% ripper: args_add_star!(args_new!, $2) %*/
9755  }
9756 #line 9752 "parse.c" /* yacc.c:1646 */
9757  break;
9758 
9759  case 463:
9760 #line 3757 "parse.y" /* yacc.c:1646 */
9761  {
9762  /*%%%*/
9763  check_literal_when(p, (yyvsp[0].node), &(yylsp[0]));
9764  (yyval.node) = last_arg_append(p, (yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
9765  /*% %*/
9766  /*% ripper: args_add!($1, $3) %*/
9767  }
9768 #line 9764 "parse.c" /* yacc.c:1646 */
9769  break;
9770 
9771  case 464:
9772 #line 3765 "parse.y" /* yacc.c:1646 */
9773  {
9774  /*%%%*/
9775  (yyval.node) = rest_arg_append(p, (yyvsp[-3].node), (yyvsp[0].node), &(yyloc));
9776  /*% %*/
9777  /*% ripper: args_add_star!($1, $4) %*/
9778  }
9779 #line 9775 "parse.c" /* yacc.c:1646 */
9780  break;
9781 
9782  case 465:
9783 #line 3776 "parse.y" /* yacc.c:1646 */
9784  {
9785  /*%%%*/
9786  (yyval.node) = NEW_WHEN((yyvsp[-3].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9787  fixpos((yyval.node), (yyvsp[-3].node));
9788  /*% %*/
9789  /*% ripper: when!($2, $4, escape_Qundef($5)) %*/
9790  }
9791 #line 9787 "parse.c" /* yacc.c:1646 */
9792  break;
9793 
9794  case 468:
9795 #line 3790 "parse.y" /* yacc.c:1646 */
9796  {
9797  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
9798  p->command_start = FALSE;
9799  (yyval.num) = p->in_kwarg;
9800  p->in_kwarg = 1;
9801  }
9802 #line 9798 "parse.c" /* yacc.c:1646 */
9803  break;
9804 
9805  case 469:
9806 #line 3796 "parse.y" /* yacc.c:1646 */
9807  {(yyval.tbl) = push_pvtbl(p);}
9808 #line 9804 "parse.c" /* yacc.c:1646 */
9809  break;
9810 
9811  case 470:
9812 #line 3797 "parse.y" /* yacc.c:1646 */
9813  {(yyval.tbl) = push_pktbl(p);}
9814 #line 9810 "parse.c" /* yacc.c:1646 */
9815  break;
9816 
9817  case 471:
9818 #line 3799 "parse.y" /* yacc.c:1646 */
9819  {pop_pktbl(p, (yyvsp[-2].tbl));}
9820 #line 9816 "parse.c" /* yacc.c:1646 */
9821  break;
9822 
9823  case 472:
9824 #line 3800 "parse.y" /* yacc.c:1646 */
9825  {pop_pvtbl(p, (yyvsp[-4].tbl));}
9826 #line 9822 "parse.c" /* yacc.c:1646 */
9827  break;
9828 
9829  case 473:
9830 #line 3801 "parse.y" /* yacc.c:1646 */
9831  {
9832  p->in_kwarg = !!(yyvsp[-6].num);
9833  }
9834 #line 9830 "parse.c" /* yacc.c:1646 */
9835  break;
9836 
9837  case 474:
9838 #line 3806 "parse.y" /* yacc.c:1646 */
9839  {
9840  /*%%%*/
9841  (yyval.node) = NEW_IN((yyvsp[-6].node), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
9842  /*% %*/
9843  /*% ripper: in!($5, $10, escape_Qundef($11)) %*/
9844  }
9845 #line 9841 "parse.c" /* yacc.c:1646 */
9846  break;
9847 
9848  case 478:
9849 #line 3820 "parse.y" /* yacc.c:1646 */
9850  {
9851  /*%%%*/
9852  (yyval.node) = new_if(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc));
9853  fixpos((yyval.node), (yyvsp[0].node));
9854  /*% %*/
9855  /*% ripper: if_mod!($3, $1) %*/
9856  }
9857 #line 9853 "parse.c" /* yacc.c:1646 */
9858  break;
9859 
9860  case 479:
9861 #line 3828 "parse.y" /* yacc.c:1646 */
9862  {
9863  /*%%%*/
9864  (yyval.node) = new_unless(p, (yyvsp[0].node), remove_begin((yyvsp[-2].node)), 0, &(yyloc));
9865  fixpos((yyval.node), (yyvsp[0].node));
9866  /*% %*/
9867  /*% ripper: unless_mod!($3, $1) %*/
9868  }
9869 #line 9865 "parse.c" /* yacc.c:1646 */
9870  break;
9871 
9872  case 481:
9873 #line 3839 "parse.y" /* yacc.c:1646 */
9874  {
9875  (yyval.node) = new_array_pattern_tail(p, Qnone, 1, 0, Qnone, &(yyloc));
9876  (yyval.node) = new_array_pattern(p, Qnone, get_value((yyvsp[-1].node)), (yyval.node), &(yyloc));
9877  }
9878 #line 9874 "parse.c" /* yacc.c:1646 */
9879  break;
9880 
9881  case 482:
9882 #line 3844 "parse.y" /* yacc.c:1646 */
9883  {
9884  (yyval.node) = new_array_pattern(p, Qnone, get_value((yyvsp[-2].node)), (yyvsp[0].node), &(yyloc));
9885  /*%%%*/
9886  nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
9887  /*%
9888  %*/
9889  }
9890 #line 9886 "parse.c" /* yacc.c:1646 */
9891  break;
9892 
9893  case 483:
9894 #line 3852 "parse.y" /* yacc.c:1646 */
9895  {
9896  (yyval.node) = new_array_pattern(p, Qnone, Qnone, (yyvsp[0].node), &(yyloc));
9897  }
9898 #line 9894 "parse.c" /* yacc.c:1646 */
9899  break;
9900 
9901  case 484:
9902 #line 3856 "parse.y" /* yacc.c:1646 */
9903  {
9904  (yyval.node) = new_hash_pattern(p, Qnone, (yyvsp[0].node), &(yyloc));
9905  }
9906 #line 9902 "parse.c" /* yacc.c:1646 */
9907  break;
9908 
9909  case 486:
9910 #line 3865 "parse.y" /* yacc.c:1646 */
9911  {
9912  /*%%%*/
9913  NODE *n = NEW_LIST((yyvsp[-2].node), &(yyloc));
9914  n = list_append(p, n, (yyvsp[0].node));
9915  (yyval.node) = new_hash(p, n, &(yyloc));
9916  /*% %*/
9917  /*% ripper: binary!($1, STATIC_ID2SYM((id_assoc)), $3) %*/
9918  }
9919 #line 9915 "parse.c" /* yacc.c:1646 */
9920  break;
9921 
9922  case 488:
9923 #line 3877 "parse.y" /* yacc.c:1646 */
9924  {
9925  /*%%%*/
9926  (yyval.node) = NEW_NODE(NODE_OR, (yyvsp[-2].node), (yyvsp[0].node), 0, &(yyloc));
9927  /*% %*/
9928  /*% ripper: binary!($1, STATIC_ID2SYM(idOr), $3) %*/
9929  }
9930 #line 9926 "parse.c" /* yacc.c:1646 */
9931  break;
9932 
9933  case 490:
9934 #line 3886 "parse.y" /* yacc.c:1646 */
9935  {(yyval.tbl) = push_pktbl(p);}
9936 #line 9932 "parse.c" /* yacc.c:1646 */
9937  break;
9938 
9939  case 491:
9940 #line 3887 "parse.y" /* yacc.c:1646 */
9941  {(yyval.tbl) = push_pktbl(p);}
9942 #line 9938 "parse.c" /* yacc.c:1646 */
9943  break;
9944 
9945  case 493:
9946 #line 3891 "parse.y" /* yacc.c:1646 */
9947  {
9948  pop_pktbl(p, (yyvsp[-2].tbl));
9949  (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), Qnone, (yyvsp[-1].node), &(yyloc));
9950  /*%%%*/
9951  nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
9952  /*%
9953  %*/
9954  }
9955 #line 9951 "parse.c" /* yacc.c:1646 */
9956  break;
9957 
9958  case 494:
9959 #line 3900 "parse.y" /* yacc.c:1646 */
9960  {
9961  pop_pktbl(p, (yyvsp[-2].tbl));
9962  (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
9963  /*%%%*/
9964  nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
9965  /*%
9966  %*/
9967  }
9968 #line 9964 "parse.c" /* yacc.c:1646 */
9969  break;
9970 
9971  case 495:
9972 #line 3909 "parse.y" /* yacc.c:1646 */
9973  {
9974  (yyval.node) = new_array_pattern_tail(p, Qnone, 0, 0, Qnone, &(yyloc));
9975  (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), Qnone, (yyval.node), &(yyloc));
9976  }
9977 #line 9973 "parse.c" /* yacc.c:1646 */
9978  break;
9979 
9980  case 496:
9981 #line 3914 "parse.y" /* yacc.c:1646 */
9982  {
9983  pop_pktbl(p, (yyvsp[-2].tbl));
9984  (yyval.node) = new_array_pattern(p, (yyvsp[-3].node), Qnone, (yyvsp[-1].node), &(yyloc));
9985  /*%%%*/
9986  nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
9987  /*%
9988  %*/
9989  }
9990 #line 9986 "parse.c" /* yacc.c:1646 */
9991  break;
9992 
9993  case 497:
9994 #line 3923 "parse.y" /* yacc.c:1646 */
9995  {
9996  pop_pktbl(p, (yyvsp[-2].tbl));
9997  (yyval.node) = new_hash_pattern(p, (yyvsp[-3].node), (yyvsp[-1].node), &(yyloc));
9998  /*%%%*/
9999  nd_set_first_loc((yyval.node), (yylsp[-3]).beg_pos);
10000  /*%
10001  %*/
10002  }
10003 #line 9999 "parse.c" /* yacc.c:1646 */
10004  break;
10005 
10006  case 498:
10007 #line 3932 "parse.y" /* yacc.c:1646 */
10008  {
10009  (yyval.node) = new_array_pattern_tail(p, Qnone, 0, 0, Qnone, &(yyloc));
10010  (yyval.node) = new_array_pattern(p, (yyvsp[-2].node), Qnone, (yyval.node), &(yyloc));
10011  }
10012 #line 10008 "parse.c" /* yacc.c:1646 */
10013  break;
10014 
10015  case 499:
10016 #line 3936 "parse.y" /* yacc.c:1646 */
10017  {(yyval.tbl) = push_pktbl(p);}
10018 #line 10014 "parse.c" /* yacc.c:1646 */
10019  break;
10020 
10021  case 500:
10022 #line 3937 "parse.y" /* yacc.c:1646 */
10023  {
10024  pop_pktbl(p, (yyvsp[-2].tbl));
10025  (yyval.node) = new_array_pattern(p, Qnone, Qnone, (yyvsp[-1].node), &(yyloc));
10026  }
10027 #line 10023 "parse.c" /* yacc.c:1646 */
10028  break;
10029 
10030  case 501:
10031 #line 3942 "parse.y" /* yacc.c:1646 */
10032  {
10033  (yyval.node) = new_array_pattern_tail(p, Qnone, 0, 0, Qnone, &(yyloc));
10034  (yyval.node) = new_array_pattern(p, Qnone, Qnone, (yyval.node), &(yyloc));
10035  }
10036 #line 10032 "parse.c" /* yacc.c:1646 */
10037  break;
10038 
10039  case 502:
10040 #line 3946 "parse.y" /* yacc.c:1646 */
10041  {(yyval.tbl) = push_pktbl(p);}
10042 #line 10038 "parse.c" /* yacc.c:1646 */
10043  break;
10044 
10045  case 503:
10046 #line 3947 "parse.y" /* yacc.c:1646 */
10047  {
10048  pop_pktbl(p, (yyvsp[-2].tbl));
10049  (yyval.node) = new_hash_pattern(p, Qnone, (yyvsp[-1].node), &(yyloc));
10050  }
10051 #line 10047 "parse.c" /* yacc.c:1646 */
10052  break;
10053 
10054  case 504:
10055 #line 3952 "parse.y" /* yacc.c:1646 */
10056  {
10057  (yyval.node) = new_hash_pattern_tail(p, Qnone, 0, &(yyloc));
10058  (yyval.node) = new_hash_pattern(p, Qnone, (yyval.node), &(yyloc));
10059  }
10060 #line 10056 "parse.c" /* yacc.c:1646 */
10061  break;
10062 
10063  case 505:
10064 #line 3956 "parse.y" /* yacc.c:1646 */
10065  {(yyval.tbl) = push_pktbl(p);}
10066 #line 10062 "parse.c" /* yacc.c:1646 */
10067  break;
10068 
10069  case 506:
10070 #line 3957 "parse.y" /* yacc.c:1646 */
10071  {
10072  pop_pktbl(p, (yyvsp[-2].tbl));
10073  (yyval.node) = (yyvsp[-1].node);
10074  }
10075 #line 10071 "parse.c" /* yacc.c:1646 */
10076  break;
10077 
10078  case 507:
10079 #line 3964 "parse.y" /* yacc.c:1646 */
10080  {
10081  /*%%%*/
10082  NODE *pre_args = NEW_LIST((yyvsp[0].node), &(yyloc));
10083  (yyval.node) = new_array_pattern_tail(p, pre_args, 0, 0, Qnone, &(yyloc));
10084  /*%
10085  $$ = new_array_pattern_tail(p, rb_ary_new_from_args(1, get_value($1)), 0, 0, Qnone, &@$);
10086  %*/
10087  }
10088 #line 10084 "parse.c" /* yacc.c:1646 */
10089  break;
10090 
10091  case 508:
10092 #line 3973 "parse.y" /* yacc.c:1646 */
10093  {
10094  (yyval.node) = new_array_pattern_tail(p, (yyvsp[0].node), 1, 0, Qnone, &(yyloc));
10095  }
10096 #line 10092 "parse.c" /* yacc.c:1646 */
10097  break;
10098 
10099  case 509:
10100 #line 3977 "parse.y" /* yacc.c:1646 */
10101  {
10102  /*%%%*/
10103  (yyval.node) = new_array_pattern_tail(p, list_concat((yyvsp[-1].node), (yyvsp[0].node)), 0, 0, Qnone, &(yyloc));
10104  /*%
10105  VALUE pre_args = rb_ary_concat($1, get_value($2));
10106  $$ = new_array_pattern_tail(p, pre_args, 0, 0, Qnone, &@$);
10107  %*/
10108  }
10109 #line 10105 "parse.c" /* yacc.c:1646 */
10110  break;
10111 
10112  case 510:
10113 #line 3986 "parse.y" /* yacc.c:1646 */
10114  {
10115  (yyval.node) = new_array_pattern_tail(p, (yyvsp[-2].node), 1, (yyvsp[0].id), Qnone, &(yyloc));
10116  }
10117 #line 10113 "parse.c" /* yacc.c:1646 */
10118  break;
10119 
10120  case 511:
10121 #line 3990 "parse.y" /* yacc.c:1646 */
10122  {
10123  (yyval.node) = new_array_pattern_tail(p, (yyvsp[-4].node), 1, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc));
10124  }
10125 #line 10121 "parse.c" /* yacc.c:1646 */
10126  break;
10127 
10128  case 512:
10129 #line 3994 "parse.y" /* yacc.c:1646 */
10130  {
10131  (yyval.node) = new_array_pattern_tail(p, (yyvsp[-1].node), 1, 0, Qnone, &(yyloc));
10132  }
10133 #line 10129 "parse.c" /* yacc.c:1646 */
10134  break;
10135 
10136  case 513:
10137 #line 3998 "parse.y" /* yacc.c:1646 */
10138  {
10139  (yyval.node) = new_array_pattern_tail(p, (yyvsp[-3].node), 1, 0, (yyvsp[0].node), &(yyloc));
10140  }
10141 #line 10137 "parse.c" /* yacc.c:1646 */
10142  break;
10143 
10144  case 515:
10145 #line 4005 "parse.y" /* yacc.c:1646 */
10146  {
10147  (yyval.node) = (yyvsp[-1].node);
10148  }
10149 #line 10145 "parse.c" /* yacc.c:1646 */
10150  break;
10151 
10152  case 516:
10153 #line 4009 "parse.y" /* yacc.c:1646 */
10154  {
10155  /*%%%*/
10156  (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[-1].node));
10157  /*% %*/
10158  /*% ripper: rb_ary_concat($1, get_value($2)) %*/
10159  }
10160 #line 10156 "parse.c" /* yacc.c:1646 */
10161  break;
10162 
10163  case 517:
10164 #line 4018 "parse.y" /* yacc.c:1646 */
10165  {
10166  (yyval.node) = new_array_pattern_tail(p, Qnone, 1, (yyvsp[0].id), Qnone, &(yyloc));
10167  }
10168 #line 10164 "parse.c" /* yacc.c:1646 */
10169  break;
10170 
10171  case 518:
10172 #line 4022 "parse.y" /* yacc.c:1646 */
10173  {
10174  (yyval.node) = new_array_pattern_tail(p, Qnone, 1, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc));
10175  }
10176 #line 10172 "parse.c" /* yacc.c:1646 */
10177  break;
10178 
10179  case 519:
10180 #line 4026 "parse.y" /* yacc.c:1646 */
10181  {
10182  (yyval.node) = new_array_pattern_tail(p, Qnone, 1, 0, Qnone, &(yyloc));
10183  }
10184 #line 10180 "parse.c" /* yacc.c:1646 */
10185  break;
10186 
10187  case 520:
10188 #line 4030 "parse.y" /* yacc.c:1646 */
10189  {
10190  (yyval.node) = new_array_pattern_tail(p, Qnone, 1, 0, (yyvsp[0].node), &(yyloc));
10191  }
10192 #line 10188 "parse.c" /* yacc.c:1646 */
10193  break;
10194 
10195  case 522:
10196 #line 4037 "parse.y" /* yacc.c:1646 */
10197  {
10198  /*%%%*/
10199  (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
10200  /*% %*/
10201  /*% ripper: rb_ary_concat($1, get_value($3)) %*/
10202  }
10203 #line 10199 "parse.c" /* yacc.c:1646 */
10204  break;
10205 
10206  case 523:
10207 #line 4046 "parse.y" /* yacc.c:1646 */
10208  {
10209  /*%%%*/
10210  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
10211  /*% %*/
10212  /*% ripper: rb_ary_new_from_args(1, get_value($1)) %*/
10213  }
10214 #line 10210 "parse.c" /* yacc.c:1646 */
10215  break;
10216 
10217  case 524:
10218 #line 4055 "parse.y" /* yacc.c:1646 */
10219  {
10220  (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), (yyvsp[0].id), &(yyloc));
10221  }
10222 #line 10218 "parse.c" /* yacc.c:1646 */
10223  break;
10224 
10225  case 525:
10226 #line 4059 "parse.y" /* yacc.c:1646 */
10227  {
10228  (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[0].node), &(yyloc)), 0, &(yyloc));
10229  }
10230 #line 10226 "parse.c" /* yacc.c:1646 */
10231  break;
10232 
10233  case 526:
10234 #line 4063 "parse.y" /* yacc.c:1646 */
10235  {
10236  (yyval.node) = new_hash_pattern_tail(p, new_hash(p, Qnone, &(yyloc)), (yyvsp[0].id), &(yyloc));
10237  }
10238 #line 10234 "parse.c" /* yacc.c:1646 */
10239  break;
10240 
10241  case 527:
10242 #line 4067 "parse.y" /* yacc.c:1646 */
10243  {
10244  (yyval.node) = new_hash_pattern_tail(p, new_unique_key_hash(p, (yyvsp[-2].node), &(yyloc)), ID2VAL(idNil), &(yyloc));
10245  }
10246 #line 10242 "parse.c" /* yacc.c:1646 */
10247  break;
10248 
10249  case 528:
10250 #line 4071 "parse.y" /* yacc.c:1646 */
10251  {
10252  (yyval.node) = new_hash_pattern_tail(p, new_hash(p, Qnone, &(yyloc)), ID2VAL(idNil), &(yyloc));
10253  }
10254 #line 10250 "parse.c" /* yacc.c:1646 */
10255  break;
10256 
10257  case 530:
10258 #line 4079 "parse.y" /* yacc.c:1646 */
10259  {
10260  /*%%%*/
10261  (yyval.node) = list_concat((yyvsp[-2].node), (yyvsp[0].node));
10262  /*% %*/
10263  /*% ripper: rb_ary_push($1, $3) %*/
10264  }
10265 #line 10261 "parse.c" /* yacc.c:1646 */
10266  break;
10267 
10268  case 531:
10269 #line 4088 "parse.y" /* yacc.c:1646 */
10270  {
10271  error_duplicate_pattern_key(p, get_id((yyvsp[-1].id)), &(yylsp[-1]));
10272  /*%%%*/
10273  (yyval.node) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[-1].id)), &(yyloc)), &(yyloc)), (yyvsp[0].node));
10274  /*% %*/
10275  /*% ripper: rb_ary_new_from_args(2, get_value($1), get_value($2)) %*/
10276  }
10277 #line 10273 "parse.c" /* yacc.c:1646 */
10278  break;
10279 
10280  case 532:
10281 #line 4096 "parse.y" /* yacc.c:1646 */
10282  {
10283  error_duplicate_pattern_key(p, get_id((yyvsp[0].id)), &(yylsp[0]));
10284  if ((yyvsp[0].id) && !is_local_id(get_id((yyvsp[0].id)))) {
10285  yyerror1(&(yylsp[0]), "key must be valid as local variables");
10286  }
10287  error_duplicate_pattern_variable(p, get_id((yyvsp[0].id)), &(yylsp[0]));
10288  /*%%%*/
10289  (yyval.node) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[0].id)), &(yyloc)), &(yyloc)), assignable(p, (yyvsp[0].id), 0, &(yyloc)));
10290  /*% %*/
10291  /*% ripper: rb_ary_new_from_args(2, get_value($1), Qnil) %*/
10292  }
10293 #line 10289 "parse.c" /* yacc.c:1646 */
10294  break;
10295 
10296  case 534:
10297 #line 4111 "parse.y" /* yacc.c:1646 */
10298  {
10299  YYLTYPE loc = code_loc_gen(&(yylsp[-2]), &(yylsp[0]));
10300  /*%%%*/
10301  if (!(yyvsp[-1].node) || nd_type((yyvsp[-1].node)) == NODE_STR) {
10302  NODE *node = dsym_node(p, (yyvsp[-1].node), &loc);
10303  (yyval.id) = SYM2ID(node->nd_lit);
10304  }
10305  /*%
10306  if (ripper_is_node_yylval($2) && RNODE($2)->nd_cval) {
10307  VALUE label = RNODE($2)->nd_cval;
10308  VALUE rval = RNODE($2)->nd_rval;
10309  $$ = ripper_new_yylval(p, rb_intern_str(label), rval, label);
10310  RNODE($$)->nd_loc = loc;
10311  }
10312  %*/
10313  else {
10314  yyerror1(&loc, "symbol literal with interpolation is not allowed");
10315  (yyval.id) = 0;
10316  }
10317  }
10318 #line 10314 "parse.c" /* yacc.c:1646 */
10319  break;
10320 
10321  case 535:
10322 #line 4134 "parse.y" /* yacc.c:1646 */
10323  {
10324  (yyval.id) = (yyvsp[0].id);
10325  }
10326 #line 10322 "parse.c" /* yacc.c:1646 */
10327  break;
10328 
10329  case 536:
10330 #line 4138 "parse.y" /* yacc.c:1646 */
10331  {
10332  (yyval.id) = 0;
10333  }
10334 #line 10330 "parse.c" /* yacc.c:1646 */
10335  break;
10336 
10337  case 537:
10338 #line 4144 "parse.y" /* yacc.c:1646 */
10339  {
10340  (yyval.id) = 0;
10341  }
10342 #line 10338 "parse.c" /* yacc.c:1646 */
10343  break;
10344 
10345  case 539:
10346 #line 4151 "parse.y" /* yacc.c:1646 */
10347  {
10348  /*%%%*/
10349  value_expr((yyvsp[-2].node));
10350  value_expr((yyvsp[0].node));
10351  (yyval.node) = NEW_DOT2((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
10352  /*% %*/
10353  /*% ripper: dot2!($1, $3) %*/
10354  }
10355 #line 10351 "parse.c" /* yacc.c:1646 */
10356  break;
10357 
10358  case 540:
10359 #line 4160 "parse.y" /* yacc.c:1646 */
10360  {
10361  /*%%%*/
10362  value_expr((yyvsp[-2].node));
10363  value_expr((yyvsp[0].node));
10364  (yyval.node) = NEW_DOT3((yyvsp[-2].node), (yyvsp[0].node), &(yyloc));
10365  /*% %*/
10366  /*% ripper: dot3!($1, $3) %*/
10367  }
10368 #line 10364 "parse.c" /* yacc.c:1646 */
10369  break;
10370 
10371  case 541:
10372 #line 4169 "parse.y" /* yacc.c:1646 */
10373  {
10374  /*%%%*/
10375  YYLTYPE loc;
10376  loc.beg_pos = (yylsp[0]).end_pos;
10377  loc.end_pos = (yylsp[0]).end_pos;
10378 
10379  value_expr((yyvsp[-1].node));
10380  (yyval.node) = NEW_DOT2((yyvsp[-1].node), new_nil(&loc), &(yyloc));
10381  /*% %*/
10382  /*% ripper: dot2!($1, Qnil) %*/
10383  }
10384 #line 10380 "parse.c" /* yacc.c:1646 */
10385  break;
10386 
10387  case 542:
10388 #line 4181 "parse.y" /* yacc.c:1646 */
10389  {
10390  /*%%%*/
10391  YYLTYPE loc;
10392  loc.beg_pos = (yylsp[0]).end_pos;
10393  loc.end_pos = (yylsp[0]).end_pos;
10394 
10395  value_expr((yyvsp[-1].node));
10396  (yyval.node) = NEW_DOT3((yyvsp[-1].node), new_nil(&loc), &(yyloc));
10397  /*% %*/
10398  /*% ripper: dot3!($1, Qnil) %*/
10399  }
10400 #line 10396 "parse.c" /* yacc.c:1646 */
10401  break;
10402 
10403  case 546:
10404 #line 4196 "parse.y" /* yacc.c:1646 */
10405  {
10406  /*%%%*/
10407  YYLTYPE loc;
10408  loc.beg_pos = (yylsp[-1]).beg_pos;
10409  loc.end_pos = (yylsp[-1]).beg_pos;
10410 
10411  value_expr((yyvsp[0].node));
10412  (yyval.node) = NEW_DOT2(new_nil(&loc), (yyvsp[0].node), &(yyloc));
10413  /*% %*/
10414  /*% ripper: dot2!(Qnil, $2) %*/
10415  }
10416 #line 10412 "parse.c" /* yacc.c:1646 */
10417  break;
10418 
10419  case 547:
10420 #line 4208 "parse.y" /* yacc.c:1646 */
10421  {
10422  /*%%%*/
10423  YYLTYPE loc;
10424  loc.beg_pos = (yylsp[-1]).beg_pos;
10425  loc.end_pos = (yylsp[-1]).beg_pos;
10426 
10427  value_expr((yyvsp[0].node));
10428  (yyval.node) = NEW_DOT3(new_nil(&loc), (yyvsp[0].node), &(yyloc));
10429  /*% %*/
10430  /*% ripper: dot3!(Qnil, $2) %*/
10431  }
10432 #line 10428 "parse.c" /* yacc.c:1646 */
10433  break;
10434 
10435  case 556:
10436 #line 4230 "parse.y" /* yacc.c:1646 */
10437  {
10438  /*%%%*/
10439  if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_BEGIN(0, &(yyloc));
10440  /*% %*/
10441  /*% ripper: var_ref!($1) %*/
10442  }
10443 #line 10439 "parse.c" /* yacc.c:1646 */
10444  break;
10445 
10446  case 557:
10447 #line 4237 "parse.y" /* yacc.c:1646 */
10448  {
10449  token_info_push(p, "->", &(yylsp[0]));
10450  }
10451 #line 10447 "parse.c" /* yacc.c:1646 */
10452  break;
10453 
10454  case 558:
10455 #line 4241 "parse.y" /* yacc.c:1646 */
10456  {
10457  (yyval.node) = (yyvsp[0].node);
10458  /*%%%*/
10459  nd_set_first_loc((yyval.node), (yylsp[-2]).beg_pos);
10460  /*% %*/
10461  }
10462 #line 10458 "parse.c" /* yacc.c:1646 */
10463  break;
10464 
10465  case 559:
10466 #line 4250 "parse.y" /* yacc.c:1646 */
10467  {
10468  /*%%%*/
10469  error_duplicate_pattern_variable(p, (yyvsp[0].id), &(yylsp[0]));
10470  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
10471  /*% %*/
10472  /*% ripper: assignable(p, var_field(p, $1)) %*/
10473  }
10474 #line 10470 "parse.c" /* yacc.c:1646 */
10475  break;
10476 
10477  case 560:
10478 #line 4260 "parse.y" /* yacc.c:1646 */
10479  {
10480  /*%%%*/
10481  NODE *n = gettable(p, (yyvsp[0].id), &(yyloc));
10482  if (!(nd_type(n) == NODE_LVAR || nd_type(n) == NODE_DVAR)) {
10483  compile_error(p, "%"PRIsVALUE": no such local variable", rb_id2str((yyvsp[0].id)));
10484  }
10485  (yyval.node) = n;
10486  /*% %*/
10487  /*% ripper: var_ref!($2) %*/
10488  }
10489 #line 10485 "parse.c" /* yacc.c:1646 */
10490  break;
10491 
10492  case 561:
10493 #line 4273 "parse.y" /* yacc.c:1646 */
10494  {
10495  /*%%%*/
10496  (yyval.node) = NEW_COLON3((yyvsp[0].id), &(yyloc));
10497  /*% %*/
10498  /*% ripper: top_const_ref!($2) %*/
10499  }
10500 #line 10496 "parse.c" /* yacc.c:1646 */
10501  break;
10502 
10503  case 562:
10504 #line 4280 "parse.y" /* yacc.c:1646 */
10505  {
10506  /*%%%*/
10507  (yyval.node) = NEW_COLON2((yyvsp[-2].node), (yyvsp[0].id), &(yyloc));
10508  /*% %*/
10509  /*% ripper: const_path_ref!($1, $3) %*/
10510  }
10511 #line 10507 "parse.c" /* yacc.c:1646 */
10512  break;
10513 
10514  case 563:
10515 #line 4287 "parse.y" /* yacc.c:1646 */
10516  {
10517  /*%%%*/
10518  (yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc));
10519  /*% %*/
10520  /*% ripper: var_ref!($1) %*/
10521  }
10522 #line 10518 "parse.c" /* yacc.c:1646 */
10523  break;
10524 
10525  case 564:
10526 #line 4298 "parse.y" /* yacc.c:1646 */
10527  {
10528  /*%%%*/
10529  (yyval.node) = NEW_RESBODY((yyvsp[-4].node),
10530  (yyvsp[-3].node) ? block_append(p, node_assign(p, (yyvsp[-3].node), NEW_ERRINFO(&(yylsp[-3])), &(yylsp[-3])), (yyvsp[-1].node)) : (yyvsp[-1].node),
10531  (yyvsp[0].node), &(yyloc));
10532  fixpos((yyval.node), (yyvsp[-4].node)?(yyvsp[-4].node):(yyvsp[-1].node));
10533  /*% %*/
10534  /*% ripper: rescue!(escape_Qundef($2), escape_Qundef($3), escape_Qundef($5), escape_Qundef($6)) %*/
10535  }
10536 #line 10532 "parse.c" /* yacc.c:1646 */
10537  break;
10538 
10539  case 566:
10540 #line 4311 "parse.y" /* yacc.c:1646 */
10541  {
10542  /*%%%*/
10543  (yyval.node) = NEW_LIST((yyvsp[0].node), &(yyloc));
10544  /*% %*/
10545  /*% ripper: rb_ary_new3(1, get_value($1)) %*/
10546  }
10547 #line 10543 "parse.c" /* yacc.c:1646 */
10548  break;
10549 
10550  case 567:
10551 #line 4318 "parse.y" /* yacc.c:1646 */
10552  {
10553  /*%%%*/
10554  if (!((yyval.node) = splat_array((yyvsp[0].node)))) (yyval.node) = (yyvsp[0].node);
10555  /*% %*/
10556  /*% ripper: $1 %*/
10557  }
10558 #line 10554 "parse.c" /* yacc.c:1646 */
10559  break;
10560 
10561  case 569:
10562 #line 4328 "parse.y" /* yacc.c:1646 */
10563  {
10564  (yyval.node) = (yyvsp[0].node);
10565  }
10566 #line 10562 "parse.c" /* yacc.c:1646 */
10567  break;
10568 
10569  case 571:
10570 #line 4335 "parse.y" /* yacc.c:1646 */
10571  {
10572  /*%%%*/
10573  (yyval.node) = (yyvsp[0].node);
10574  /*% %*/
10575  /*% ripper: ensure!($2) %*/
10576  }
10577 #line 10573 "parse.c" /* yacc.c:1646 */
10578  break;
10579 
10580  case 575:
10581 #line 4349 "parse.y" /* yacc.c:1646 */
10582  {
10583  /*%%%*/
10584  NODE *node = (yyvsp[0].node);
10585  if (!node) {
10586  node = NEW_STR(STR_NEW0(), &(yyloc));
10587  RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
10588  }
10589  else {
10590  node = evstr2dstr(p, node);
10591  }
10592  (yyval.node) = node;
10593  /*% %*/
10594  /*% ripper: $1 %*/
10595  }
10596 #line 10592 "parse.c" /* yacc.c:1646 */
10597  break;
10598 
10599  case 578:
10600 #line 4368 "parse.y" /* yacc.c:1646 */
10601  {
10602  /*%%%*/
10603  (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
10604  /*% %*/
10605  /*% ripper: string_concat!($1, $2) %*/
10606  }
10607 #line 10603 "parse.c" /* yacc.c:1646 */
10608  break;
10609 
10610  case 579:
10611 #line 4377 "parse.y" /* yacc.c:1646 */
10612  {
10613  /*%%%*/
10614  (yyval.node) = heredoc_dedent(p, (yyvsp[-1].node));
10615  if ((yyval.node)) nd_set_loc((yyval.node), &(yyloc));
10616  /*% %*/
10617  /*% ripper: string_literal!(heredoc_dedent(p, $2)) %*/
10618  }
10619 #line 10615 "parse.c" /* yacc.c:1646 */
10620  break;
10621 
10622  case 580:
10623 #line 4387 "parse.y" /* yacc.c:1646 */
10624  {
10625  /*%%%*/
10626  (yyval.node) = new_xstring(p, heredoc_dedent(p, (yyvsp[-1].node)), &(yyloc));
10627  /*% %*/
10628  /*% ripper: xstring_literal!(heredoc_dedent(p, $2)) %*/
10629  }
10630 #line 10626 "parse.c" /* yacc.c:1646 */
10631  break;
10632 
10633  case 581:
10634 #line 4396 "parse.y" /* yacc.c:1646 */
10635  {
10636  (yyval.node) = new_regexp(p, (yyvsp[-1].node), (yyvsp[0].num), &(yyloc));
10637  }
10638 #line 10634 "parse.c" /* yacc.c:1646 */
10639  break;
10640 
10641  case 582:
10642 #line 4402 "parse.y" /* yacc.c:1646 */
10643  {
10644  /*%%%*/
10645  (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
10646  /*% %*/
10647  /*% ripper: array!($3) %*/
10648  }
10649 #line 10645 "parse.c" /* yacc.c:1646 */
10650  break;
10651 
10652  case 583:
10653 #line 4411 "parse.y" /* yacc.c:1646 */
10654  {
10655  /*%%%*/
10656  (yyval.node) = 0;
10657  /*% %*/
10658  /*% ripper: words_new! %*/
10659  }
10660 #line 10656 "parse.c" /* yacc.c:1646 */
10661  break;
10662 
10663  case 584:
10664 #line 4418 "parse.y" /* yacc.c:1646 */
10665  {
10666  /*%%%*/
10667  (yyval.node) = list_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
10668  /*% %*/
10669  /*% ripper: words_add!($1, $2) %*/
10670  }
10671 #line 10667 "parse.c" /* yacc.c:1646 */
10672  break;
10673 
10674  case 586:
10675 #line 4429 "parse.y" /* yacc.c:1646 */
10676  {
10677  /*%%%*/
10678  (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
10679  /*% %*/
10680  /*% ripper: word_add!($1, $2) %*/
10681  }
10682 #line 10678 "parse.c" /* yacc.c:1646 */
10683  break;
10684 
10685  case 587:
10686 #line 4438 "parse.y" /* yacc.c:1646 */
10687  {
10688  /*%%%*/
10689  (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
10690  /*% %*/
10691  /*% ripper: array!($3) %*/
10692  }
10693 #line 10689 "parse.c" /* yacc.c:1646 */
10694  break;
10695 
10696  case 588:
10697 #line 4447 "parse.y" /* yacc.c:1646 */
10698  {
10699  /*%%%*/
10700  (yyval.node) = 0;
10701  /*% %*/
10702  /*% ripper: symbols_new! %*/
10703  }
10704 #line 10700 "parse.c" /* yacc.c:1646 */
10705  break;
10706 
10707  case 589:
10708 #line 4454 "parse.y" /* yacc.c:1646 */
10709  {
10710  /*%%%*/
10711  (yyval.node) = symbol_append(p, (yyvsp[-2].node), evstr2dstr(p, (yyvsp[-1].node)));
10712  /*% %*/
10713  /*% ripper: symbols_add!($1, $2) %*/
10714  }
10715 #line 10711 "parse.c" /* yacc.c:1646 */
10716  break;
10717 
10718  case 590:
10719 #line 4463 "parse.y" /* yacc.c:1646 */
10720  {
10721  /*%%%*/
10722  (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
10723  /*% %*/
10724  /*% ripper: array!($3) %*/
10725  }
10726 #line 10722 "parse.c" /* yacc.c:1646 */
10727  break;
10728 
10729  case 591:
10730 #line 4472 "parse.y" /* yacc.c:1646 */
10731  {
10732  /*%%%*/
10733  (yyval.node) = make_list((yyvsp[-1].node), &(yyloc));
10734  /*% %*/
10735  /*% ripper: array!($3) %*/
10736  }
10737 #line 10733 "parse.c" /* yacc.c:1646 */
10738  break;
10739 
10740  case 592:
10741 #line 4481 "parse.y" /* yacc.c:1646 */
10742  {
10743  /*%%%*/
10744  (yyval.node) = 0;
10745  /*% %*/
10746  /*% ripper: qwords_new! %*/
10747  }
10748 #line 10744 "parse.c" /* yacc.c:1646 */
10749  break;
10750 
10751  case 593:
10752 #line 4488 "parse.y" /* yacc.c:1646 */
10753  {
10754  /*%%%*/
10755  (yyval.node) = list_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
10756  /*% %*/
10757  /*% ripper: qwords_add!($1, $2) %*/
10758  }
10759 #line 10755 "parse.c" /* yacc.c:1646 */
10760  break;
10761 
10762  case 594:
10763 #line 4497 "parse.y" /* yacc.c:1646 */
10764  {
10765  /*%%%*/
10766  (yyval.node) = 0;
10767  /*% %*/
10768  /*% ripper: qsymbols_new! %*/
10769  }
10770 #line 10766 "parse.c" /* yacc.c:1646 */
10771  break;
10772 
10773  case 595:
10774 #line 4504 "parse.y" /* yacc.c:1646 */
10775  {
10776  /*%%%*/
10777  (yyval.node) = symbol_append(p, (yyvsp[-2].node), (yyvsp[-1].node));
10778  /*% %*/
10779  /*% ripper: qsymbols_add!($1, $2) %*/
10780  }
10781 #line 10777 "parse.c" /* yacc.c:1646 */
10782  break;
10783 
10784  case 596:
10785 #line 4513 "parse.y" /* yacc.c:1646 */
10786  {
10787  /*%%%*/
10788  (yyval.node) = 0;
10789  /*% %*/
10790  /*% ripper: string_content! %*/
10791  /*%%%*/
10792  /*%
10793  $$ = ripper_new_yylval(p, 0, $$, 0);
10794  %*/
10795  }
10796 #line 10792 "parse.c" /* yacc.c:1646 */
10797  break;
10798 
10799  case 597:
10800 #line 4524 "parse.y" /* yacc.c:1646 */
10801  {
10802  /*%%%*/
10803  (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
10804  /*% %*/
10805  /*% ripper: string_add!($1, $2) %*/
10806  /*%%%*/
10807  /*%
10808  if (ripper_is_node_yylval($1) && ripper_is_node_yylval($2) &&
10809  !RNODE($1)->nd_cval) {
10810  RNODE($1)->nd_cval = RNODE($2)->nd_cval;
10811  RNODE($1)->nd_rval = add_mark_object(p, $$);
10812  $$ = $1;
10813  }
10814  %*/
10815  }
10816 #line 10812 "parse.c" /* yacc.c:1646 */
10817  break;
10818 
10819  case 598:
10820 #line 4542 "parse.y" /* yacc.c:1646 */
10821  {
10822  /*%%%*/
10823  (yyval.node) = 0;
10824  /*% %*/
10825  /*% ripper: xstring_new! %*/
10826  }
10827 #line 10823 "parse.c" /* yacc.c:1646 */
10828  break;
10829 
10830  case 599:
10831 #line 4549 "parse.y" /* yacc.c:1646 */
10832  {
10833  /*%%%*/
10834  (yyval.node) = literal_concat(p, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
10835  /*% %*/
10836  /*% ripper: xstring_add!($1, $2) %*/
10837  }
10838 #line 10834 "parse.c" /* yacc.c:1646 */
10839  break;
10840 
10841  case 600:
10842 #line 4558 "parse.y" /* yacc.c:1646 */
10843  {
10844  /*%%%*/
10845  (yyval.node) = 0;
10846  /*% %*/
10847  /*% ripper: regexp_new! %*/
10848  /*%%%*/
10849  /*%
10850  $$ = ripper_new_yylval(p, 0, $$, 0);
10851  %*/
10852  }
10853 #line 10849 "parse.c" /* yacc.c:1646 */
10854  break;
10855 
10856  case 601:
10857 #line 4569 "parse.y" /* yacc.c:1646 */
10858  {
10859  /*%%%*/
10860  NODE *head = (yyvsp[-1].node), *tail = (yyvsp[0].node);
10861  if (!head) {
10862  (yyval.node) = tail;
10863  }
10864  else if (!tail) {
10865  (yyval.node) = head;
10866  }
10867  else {
10868  switch (nd_type(head)) {
10869  case NODE_STR:
10870  nd_set_type(head, NODE_DSTR);
10871  break;
10872  case NODE_DSTR:
10873  break;
10874  default:
10875  head = list_append(p, NEW_DSTR(Qnil, &(yyloc)), head);
10876  break;
10877  }
10878  (yyval.node) = list_append(p, head, tail);
10879  }
10880  /*%
10881  VALUE s1 = 1, s2 = 0, n1 = $1, n2 = $2;
10882  if (ripper_is_node_yylval(n1)) {
10883  s1 = RNODE(n1)->nd_cval;
10884  n1 = RNODE(n1)->nd_rval;
10885  }
10886  if (ripper_is_node_yylval(n2)) {
10887  s2 = RNODE(n2)->nd_cval;
10888  n2 = RNODE(n2)->nd_rval;
10889  }
10890  $$ = dispatch2(regexp_add, n1, n2);
10891  if (!s1 && s2) {
10892  $$ = ripper_new_yylval(p, 0, $$, s2);
10893  }
10894  %*/
10895  }
10896 #line 10892 "parse.c" /* yacc.c:1646 */
10897  break;
10898 
10899  case 603:
10900 #line 4612 "parse.y" /* yacc.c:1646 */
10901  {
10902  /* need to backup p->lex.strterm so that a string literal `%&foo,#$&,bar&` can be parsed */
10903  (yyval.strterm) = p->lex.strterm;
10904  p->lex.strterm = 0;
10905  SET_LEX_STATE(EXPR_BEG);
10906  }
10907 #line 10903 "parse.c" /* yacc.c:1646 */
10908  break;
10909 
10910  case 604:
10911 #line 4619 "parse.y" /* yacc.c:1646 */
10912  {
10913  p->lex.strterm = (yyvsp[-1].strterm);
10914  /*%%%*/
10915  (yyval.node) = NEW_EVSTR((yyvsp[0].node), &(yyloc));
10916  nd_set_line((yyval.node), (yylsp[0]).end_pos.lineno);
10917  /*% %*/
10918  /*% ripper: string_dvar!($3) %*/
10919  }
10920 #line 10916 "parse.c" /* yacc.c:1646 */
10921  break;
10922 
10923  case 605:
10924 #line 4628 "parse.y" /* yacc.c:1646 */
10925  {
10926  CMDARG_PUSH(0);
10927  COND_PUSH(0);
10928  }
10929 #line 10925 "parse.c" /* yacc.c:1646 */
10930  break;
10931 
10932  case 606:
10933 #line 4632 "parse.y" /* yacc.c:1646 */
10934  {
10935  /* need to backup p->lex.strterm so that a string literal `%!foo,#{ !0 },bar!` can be parsed */
10936  (yyval.strterm) = p->lex.strterm;
10937  p->lex.strterm = 0;
10938  }
10939 #line 10935 "parse.c" /* yacc.c:1646 */
10940  break;
10941 
10942  case 607:
10943 #line 4637 "parse.y" /* yacc.c:1646 */
10944  {
10945  (yyval.num) = p->lex.state;
10946  SET_LEX_STATE(EXPR_BEG);
10947  }
10948 #line 10944 "parse.c" /* yacc.c:1646 */
10949  break;
10950 
10951  case 608:
10952 #line 4641 "parse.y" /* yacc.c:1646 */
10953  {
10954  (yyval.num) = p->lex.brace_nest;
10955  p->lex.brace_nest = 0;
10956  }
10957 #line 10953 "parse.c" /* yacc.c:1646 */
10958  break;
10959 
10960  case 609:
10961 #line 4645 "parse.y" /* yacc.c:1646 */
10962  {
10963  (yyval.num) = p->heredoc_indent;
10964  p->heredoc_indent = 0;
10965  }
10966 #line 10962 "parse.c" /* yacc.c:1646 */
10967  break;
10968 
10969  case 610:
10970 #line 4650 "parse.y" /* yacc.c:1646 */
10971  {
10972  COND_POP();
10973  CMDARG_POP();
10974  p->lex.strterm = (yyvsp[-5].strterm);
10975  SET_LEX_STATE((yyvsp[-4].num));
10976  p->lex.brace_nest = (yyvsp[-3].num);
10977  p->heredoc_indent = (yyvsp[-2].num);
10978  p->heredoc_line_indent = -1;
10979  /*%%%*/
10980  if ((yyvsp[-1].node)) (yyvsp[-1].node)->flags &= ~NODE_FL_NEWLINE;
10981  (yyval.node) = new_evstr(p, (yyvsp[-1].node), &(yyloc));
10982  /*% %*/
10983  /*% ripper: string_embexpr!($7) %*/
10984  }
10985 #line 10981 "parse.c" /* yacc.c:1646 */
10986  break;
10987 
10988  case 611:
10989 #line 4667 "parse.y" /* yacc.c:1646 */
10990  {
10991  /*%%%*/
10992  (yyval.node) = NEW_GVAR((yyvsp[0].id), &(yyloc));
10993  /*% %*/
10994  /*% ripper: var_ref!($1) %*/
10995  }
10996 #line 10992 "parse.c" /* yacc.c:1646 */
10997  break;
10998 
10999  case 612:
11000 #line 4674 "parse.y" /* yacc.c:1646 */
11001  {
11002  /*%%%*/
11003  (yyval.node) = NEW_IVAR((yyvsp[0].id), &(yyloc));
11004  /*% %*/
11005  /*% ripper: var_ref!($1) %*/
11006  }
11007 #line 11003 "parse.c" /* yacc.c:1646 */
11008  break;
11009 
11010  case 613:
11011 #line 4681 "parse.y" /* yacc.c:1646 */
11012  {
11013  /*%%%*/
11014  (yyval.node) = NEW_CVAR((yyvsp[0].id), &(yyloc));
11015  /*% %*/
11016  /*% ripper: var_ref!($1) %*/
11017  }
11018 #line 11014 "parse.c" /* yacc.c:1646 */
11019  break;
11020 
11021  case 617:
11022 #line 4695 "parse.y" /* yacc.c:1646 */
11023  {
11024  SET_LEX_STATE(EXPR_END);
11025  /*%%%*/
11026  (yyval.node) = NEW_LIT(ID2SYM((yyvsp[0].id)), &(yyloc));
11027  /*% %*/
11028  /*% ripper: symbol_literal!(symbol!($2)) %*/
11029  }
11030 #line 11026 "parse.c" /* yacc.c:1646 */
11031  break;
11032 
11033  case 622:
11034 #line 4711 "parse.y" /* yacc.c:1646 */
11035  {
11036  SET_LEX_STATE(EXPR_END);
11037  /*%%%*/
11038  (yyval.node) = dsym_node(p, (yyvsp[-1].node), &(yyloc));
11039  /*% %*/
11040  /*% ripper: dyna_symbol!($2) %*/
11041  }
11042 #line 11038 "parse.c" /* yacc.c:1646 */
11043  break;
11044 
11045  case 624:
11046 #line 4722 "parse.y" /* yacc.c:1646 */
11047  {
11048  /*%%%*/
11049  (yyval.node) = (yyvsp[0].node);
11050  RB_OBJ_WRITE(p->ast, &(yyval.node)->nd_lit, negate_lit(p, (yyval.node)->nd_lit));
11051  /*% %*/
11052  /*% ripper: unary!(ID2VAL(idUMinus), $2) %*/
11053  }
11054 #line 11050 "parse.c" /* yacc.c:1646 */
11055  break;
11056 
11057  case 634:
11058 #line 4744 "parse.y" /* yacc.c:1646 */
11059  {(yyval.id) = KWD2EID(nil, (yyvsp[0].id));}
11060 #line 11056 "parse.c" /* yacc.c:1646 */
11061  break;
11062 
11063  case 635:
11064 #line 4745 "parse.y" /* yacc.c:1646 */
11065  {(yyval.id) = KWD2EID(self, (yyvsp[0].id));}
11066 #line 11062 "parse.c" /* yacc.c:1646 */
11067  break;
11068 
11069  case 636:
11070 #line 4746 "parse.y" /* yacc.c:1646 */
11071  {(yyval.id) = KWD2EID(true, (yyvsp[0].id));}
11072 #line 11068 "parse.c" /* yacc.c:1646 */
11073  break;
11074 
11075  case 637:
11076 #line 4747 "parse.y" /* yacc.c:1646 */
11077  {(yyval.id) = KWD2EID(false, (yyvsp[0].id));}
11078 #line 11074 "parse.c" /* yacc.c:1646 */
11079  break;
11080 
11081  case 638:
11082 #line 4748 "parse.y" /* yacc.c:1646 */
11083  {(yyval.id) = KWD2EID(_FILE__, (yyvsp[0].id));}
11084 #line 11080 "parse.c" /* yacc.c:1646 */
11085  break;
11086 
11087  case 639:
11088 #line 4749 "parse.y" /* yacc.c:1646 */
11089  {(yyval.id) = KWD2EID(_LINE__, (yyvsp[0].id));}
11090 #line 11086 "parse.c" /* yacc.c:1646 */
11091  break;
11092 
11093  case 640:
11094 #line 4750 "parse.y" /* yacc.c:1646 */
11095  {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[0].id));}
11096 #line 11092 "parse.c" /* yacc.c:1646 */
11097  break;
11098 
11099  case 641:
11100 #line 4754 "parse.y" /* yacc.c:1646 */
11101  {
11102  /*%%%*/
11103  if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_BEGIN(0, &(yyloc));
11104  /*%
11105  if (id_is_var(p, get_id($1))) {
11106  $$ = dispatch1(var_ref, $1);
11107  }
11108  else {
11109  $$ = dispatch1(vcall, $1);
11110  }
11111  %*/
11112  }
11113 #line 11109 "parse.c" /* yacc.c:1646 */
11114  break;
11115 
11116  case 642:
11117 #line 4767 "parse.y" /* yacc.c:1646 */
11118  {
11119  /*%%%*/
11120  if (!((yyval.node) = gettable(p, (yyvsp[0].id), &(yyloc)))) (yyval.node) = NEW_BEGIN(0, &(yyloc));
11121  /*% %*/
11122  /*% ripper: var_ref!($1) %*/
11123  }
11124 #line 11120 "parse.c" /* yacc.c:1646 */
11125  break;
11126 
11127  case 643:
11128 #line 4776 "parse.y" /* yacc.c:1646 */
11129  {
11130  /*%%%*/
11131  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
11132  /*% %*/
11133  /*% ripper: assignable(p, var_field(p, $1)) %*/
11134  }
11135 #line 11131 "parse.c" /* yacc.c:1646 */
11136  break;
11137 
11138  case 644:
11139 #line 4783 "parse.y" /* yacc.c:1646 */
11140  {
11141  /*%%%*/
11142  (yyval.node) = assignable(p, (yyvsp[0].id), 0, &(yyloc));
11143  /*% %*/
11144  /*% ripper: assignable(p, var_field(p, $1)) %*/
11145  }
11146 #line 11142 "parse.c" /* yacc.c:1646 */
11147  break;
11148 
11149  case 647:
11150 #line 4796 "parse.y" /* yacc.c:1646 */
11151  {
11152  SET_LEX_STATE(EXPR_BEG);
11153  p->command_start = TRUE;
11154  }
11155 #line 11151 "parse.c" /* yacc.c:1646 */
11156  break;
11157 
11158  case 648:
11159 #line 4801 "parse.y" /* yacc.c:1646 */
11160  {
11161  (yyval.node) = (yyvsp[-1].node);
11162  }
11163 #line 11159 "parse.c" /* yacc.c:1646 */
11164  break;
11165 
11166  case 649:
11167 #line 4805 "parse.y" /* yacc.c:1646 */
11168  {
11169  /*%%%*/
11170  (yyval.node) = 0;
11171  /*% %*/
11172  /*% ripper: Qnil %*/
11173  }
11174 #line 11170 "parse.c" /* yacc.c:1646 */
11175  break;
11176 
11177  case 650:
11178 #line 4814 "parse.y" /* yacc.c:1646 */
11179  {
11180  /*%%%*/
11181  (yyval.node) = (yyvsp[-1].node);
11182  /*% %*/
11183  /*% ripper: paren!($2) %*/
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 651:
11191 #line 4823 "parse.y" /* yacc.c:1646 */
11192  {
11193  arg_var(p, idFWD_REST);
11194 #if idFWD_KWREST
11195  arg_var(p, idFWD_KWREST);
11196 #endif
11197  arg_var(p, idFWD_BLOCK);
11198  /*%%%*/
11199  (yyval.node) = new_args_tail(p, Qnone, idFWD_KWREST, idFWD_BLOCK, &(yylsp[-1]));
11200  (yyval.node) = new_args(p, Qnone, Qnone, idFWD_REST, Qnone, (yyval.node), &(yylsp[-1]));
11201  /*% %*/
11202  /*% ripper: paren!(params_new(Qnone, Qnone, $2, Qnone, Qnone, Qnone, Qnone)) %*/
11203  SET_LEX_STATE(EXPR_BEG);
11204  p->command_start = TRUE;
11205  }
11206 #line 11202 "parse.c" /* yacc.c:1646 */
11207  break;
11208 
11209  case 652:
11210 #line 4837 "parse.y" /* yacc.c:1646 */
11211  {
11212  (yyval.num) = p->in_kwarg;
11213  p->in_kwarg = 1;
11214  SET_LEX_STATE(p->lex.state|EXPR_LABEL); /* force for args */
11215  }
11216 #line 11212 "parse.c" /* yacc.c:1646 */
11217  break;
11218 
11219  case 653:
11220 #line 4843 "parse.y" /* yacc.c:1646 */
11221  {
11222  p->in_kwarg = !!(yyvsp[-2].num);
11223  (yyval.node) = (yyvsp[-1].node);
11224  SET_LEX_STATE(EXPR_BEG);
11225  p->command_start = TRUE;
11226  }
11227 #line 11223 "parse.c" /* yacc.c:1646 */
11228  break;
11229 
11230  case 654:
11231 #line 4852 "parse.y" /* yacc.c:1646 */
11232  {
11233  (yyval.node) = new_args_tail(p, (yyvsp[-3].node), (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
11234  }
11235 #line 11231 "parse.c" /* yacc.c:1646 */
11236  break;
11237 
11238  case 655:
11239 #line 4856 "parse.y" /* yacc.c:1646 */
11240  {
11241  (yyval.node) = new_args_tail(p, (yyvsp[-1].node), Qnone, (yyvsp[0].id), &(yylsp[-1]));
11242  }
11243 #line 11239 "parse.c" /* yacc.c:1646 */
11244  break;
11245 
11246  case 656:
11247 #line 4860 "parse.y" /* yacc.c:1646 */
11248  {
11249  (yyval.node) = new_args_tail(p, Qnone, (yyvsp[-1].id), (yyvsp[0].id), &(yylsp[-1]));
11250  }
11251 #line 11247 "parse.c" /* yacc.c:1646 */
11252  break;
11253 
11254  case 657:
11255 #line 4864 "parse.y" /* yacc.c:1646 */
11256  {
11257  (yyval.node) = new_args_tail(p, Qnone, ID2VAL(idNil), (yyvsp[0].id), &(yylsp[-1]));
11258  }
11259 #line 11255 "parse.c" /* yacc.c:1646 */
11260  break;
11261 
11262  case 658:
11263 #line 4868 "parse.y" /* yacc.c:1646 */
11264  {
11265  (yyval.node) = new_args_tail(p, Qnone, Qnone, (yyvsp[0].id), &(yylsp[0]));
11266  }
11267 #line 11263 "parse.c" /* yacc.c:1646 */
11268  break;
11269 
11270  case 659:
11271 #line 4874 "parse.y" /* yacc.c:1646 */
11272  {
11273  (yyval.node) = (yyvsp[0].node);
11274  }
11275 #line 11271 "parse.c" /* yacc.c:1646 */
11276  break;
11277 
11278  case 660:
11279 #line 4878 "parse.y" /* yacc.c:1646 */
11280  {
11281  (yyval.node) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
11282  }
11283 #line 11279 "parse.c" /* yacc.c:1646 */
11284  break;
11285 
11286  case 661:
11287 #line 4884 "parse.y" /* yacc.c:1646 */
11288  {
11289  (yyval.node) = new_args(p, (yyvsp[-5].node), (yyvsp[-3].node), (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
11290  }
11291 #line 11287 "parse.c" /* yacc.c:1646 */
11292  break;
11293 
11294  case 662:
11295 #line 4888 "parse.y" /* yacc.c:1646 */
11296  {
11297  (yyval.node) = new_args(p, (yyvsp[-7].node), (yyvsp[-5].node), (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11298  }
11299 #line 11295 "parse.c" /* yacc.c:1646 */
11300  break;
11301 
11302  case 663:
11303 #line 4892 "parse.y" /* yacc.c:1646 */
11304  {
11305  (yyval.node) = new_args(p, (yyvsp[-3].node), (yyvsp[-1].node), Qnone, Qnone, (yyvsp[0].node), &(yyloc));
11306  }
11307 #line 11303 "parse.c" /* yacc.c:1646 */
11308  break;
11309 
11310  case 664:
11311 #line 4896 "parse.y" /* yacc.c:1646 */
11312  {
11313  (yyval.node) = new_args(p, (yyvsp[-5].node), (yyvsp[-3].node), Qnone, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11314  }
11315 #line 11311 "parse.c" /* yacc.c:1646 */
11316  break;
11317 
11318  case 665:
11319 #line 4900 "parse.y" /* yacc.c:1646 */
11320  {
11321  (yyval.node) = new_args(p, (yyvsp[-3].node), Qnone, (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
11322  }
11323 #line 11319 "parse.c" /* yacc.c:1646 */
11324  break;
11325 
11326  case 666:
11327 #line 4904 "parse.y" /* yacc.c:1646 */
11328  {
11329  (yyval.node) = new_args(p, (yyvsp[-5].node), Qnone, (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11330  }
11331 #line 11327 "parse.c" /* yacc.c:1646 */
11332  break;
11333 
11334  case 667:
11335 #line 4908 "parse.y" /* yacc.c:1646 */
11336  {
11337  (yyval.node) = new_args(p, (yyvsp[-1].node), Qnone, Qnone, Qnone, (yyvsp[0].node), &(yyloc));
11338  }
11339 #line 11335 "parse.c" /* yacc.c:1646 */
11340  break;
11341 
11342  case 668:
11343 #line 4912 "parse.y" /* yacc.c:1646 */
11344  {
11345  (yyval.node) = new_args(p, Qnone, (yyvsp[-3].node), (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
11346  }
11347 #line 11343 "parse.c" /* yacc.c:1646 */
11348  break;
11349 
11350  case 669:
11351 #line 4916 "parse.y" /* yacc.c:1646 */
11352  {
11353  (yyval.node) = new_args(p, Qnone, (yyvsp[-5].node), (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11354  }
11355 #line 11351 "parse.c" /* yacc.c:1646 */
11356  break;
11357 
11358  case 670:
11359 #line 4920 "parse.y" /* yacc.c:1646 */
11360  {
11361  (yyval.node) = new_args(p, Qnone, (yyvsp[-1].node), Qnone, Qnone, (yyvsp[0].node), &(yyloc));
11362  }
11363 #line 11359 "parse.c" /* yacc.c:1646 */
11364  break;
11365 
11366  case 671:
11367 #line 4924 "parse.y" /* yacc.c:1646 */
11368  {
11369  (yyval.node) = new_args(p, Qnone, (yyvsp[-3].node), Qnone, (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11370  }
11371 #line 11367 "parse.c" /* yacc.c:1646 */
11372  break;
11373 
11374  case 672:
11375 #line 4928 "parse.y" /* yacc.c:1646 */
11376  {
11377  (yyval.node) = new_args(p, Qnone, Qnone, (yyvsp[-1].id), Qnone, (yyvsp[0].node), &(yyloc));
11378  }
11379 #line 11375 "parse.c" /* yacc.c:1646 */
11380  break;
11381 
11382  case 673:
11383 #line 4932 "parse.y" /* yacc.c:1646 */
11384  {
11385  (yyval.node) = new_args(p, Qnone, Qnone, (yyvsp[-3].id), (yyvsp[-1].node), (yyvsp[0].node), &(yyloc));
11386  }
11387 #line 11383 "parse.c" /* yacc.c:1646 */
11388  break;
11389 
11390  case 674:
11391 #line 4936 "parse.y" /* yacc.c:1646 */
11392  {
11393  (yyval.node) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyvsp[0].node), &(yyloc));
11394  }
11395 #line 11391 "parse.c" /* yacc.c:1646 */
11396  break;
11397 
11398  case 675:
11399 #line 4940 "parse.y" /* yacc.c:1646 */
11400  {
11401  (yyval.node) = new_args_tail(p, Qnone, Qnone, Qnone, &(yylsp[0]));
11402  (yyval.node) = new_args(p, Qnone, Qnone, Qnone, Qnone, (yyval.node), &(yylsp[0]));
11403  }
11404 #line 11400 "parse.c" /* yacc.c:1646 */
11405  break;
11406 
11407  case 676:
11408 #line 4947 "parse.y" /* yacc.c:1646 */
11409  {
11410  /*%%%*/
11411  (yyval.id) = idDot3;
11412  /*% %*/
11413  /*% ripper: args_forward! %*/
11414  }
11415 #line 11411 "parse.c" /* yacc.c:1646 */
11416  break;
11417 
11418  case 677:
11419 #line 4956 "parse.y" /* yacc.c:1646 */
11420  {
11421  /*%%%*/
11422  yyerror1(&(yylsp[0]), "formal argument cannot be a constant");
11423  (yyval.id) = 0;
11424  /*% %*/
11425  /*% ripper[error]: param_error!($1) %*/
11426  }
11427 #line 11423 "parse.c" /* yacc.c:1646 */
11428  break;
11429 
11430  case 678:
11431 #line 4964 "parse.y" /* yacc.c:1646 */
11432  {
11433  /*%%%*/
11434  yyerror1(&(yylsp[0]), "formal argument cannot be an instance variable");
11435  (yyval.id) = 0;
11436  /*% %*/
11437  /*% ripper[error]: param_error!($1) %*/
11438  }
11439 #line 11435 "parse.c" /* yacc.c:1646 */
11440  break;
11441 
11442  case 679:
11443 #line 4972 "parse.y" /* yacc.c:1646 */
11444  {
11445  /*%%%*/
11446  yyerror1(&(yylsp[0]), "formal argument cannot be a global variable");
11447  (yyval.id) = 0;
11448  /*% %*/
11449  /*% ripper[error]: param_error!($1) %*/
11450  }
11451 #line 11447 "parse.c" /* yacc.c:1646 */
11452  break;
11453 
11454  case 680:
11455 #line 4980 "parse.y" /* yacc.c:1646 */
11456  {
11457  /*%%%*/
11458  yyerror1(&(yylsp[0]), "formal argument cannot be a class variable");
11459  (yyval.id) = 0;
11460  /*% %*/
11461  /*% ripper[error]: param_error!($1) %*/
11462  }
11463 #line 11459 "parse.c" /* yacc.c:1646 */
11464  break;
11465 
11466  case 682:
11467 #line 4991 "parse.y" /* yacc.c:1646 */
11468  {
11469  formal_argument(p, get_id((yyvsp[0].id)));
11471  (yyval.id) = (yyvsp[0].id);
11472  }
11473 #line 11469 "parse.c" /* yacc.c:1646 */
11474  break;
11475 
11476  case 683:
11477 #line 4999 "parse.y" /* yacc.c:1646 */
11478  {
11479  ID id = get_id((yyvsp[0].id));
11480  arg_var(p, id);
11481  p->cur_arg = id;
11482  (yyval.id) = (yyvsp[0].id);
11483  }
11484 #line 11480 "parse.c" /* yacc.c:1646 */
11485  break;
11486 
11487  case 684:
11488 #line 5008 "parse.y" /* yacc.c:1646 */
11489  {
11490  p->cur_arg = 0;
11491  /*%%%*/
11492  (yyval.node) = NEW_ARGS_AUX((yyvsp[0].id), 1, &NULL_LOC);
11493  /*% %*/
11494  /*% ripper: get_value($1) %*/
11495  }
11496 #line 11492 "parse.c" /* yacc.c:1646 */
11497  break;
11498 
11499  case 685:
11500 #line 5016 "parse.y" /* yacc.c:1646 */
11501  {
11502  /*%%%*/
11503  ID tid = internal_id(p);
11504  YYLTYPE loc;
11505  loc.beg_pos = (yylsp[-1]).beg_pos;
11506  loc.end_pos = (yylsp[-1]).beg_pos;
11507  arg_var(p, tid);
11508  if (dyna_in_block(p)) {
11509  (yyvsp[-1].node)->nd_value = NEW_DVAR(tid, &loc);
11510  }
11511  else {
11512  (yyvsp[-1].node)->nd_value = NEW_LVAR(tid, &loc);
11513  }
11514  (yyval.node) = NEW_ARGS_AUX(tid, 1, &NULL_LOC);
11515  (yyval.node)->nd_next = (yyvsp[-1].node);
11516  /*% %*/
11517  /*% ripper: mlhs_paren!($2) %*/
11518  }
11519 #line 11515 "parse.c" /* yacc.c:1646 */
11520  break;
11521 
11522  case 687:
11523 #line 5039 "parse.y" /* yacc.c:1646 */
11524  {
11525  /*%%%*/
11526  (yyval.node) = (yyvsp[-2].node);
11527  (yyval.node)->nd_plen++;
11528  (yyval.node)->nd_next = block_append(p, (yyval.node)->nd_next, (yyvsp[0].node)->nd_next);
11529  rb_discard_node(p, (yyvsp[0].node));
11530  /*% %*/
11531  /*% ripper: rb_ary_push($1, get_value($3)) %*/
11532  }
11533 #line 11529 "parse.c" /* yacc.c:1646 */
11534  break;
11535 
11536  case 688:
11537 #line 5052 "parse.y" /* yacc.c:1646 */
11538  {
11539  ID id = get_id((yyvsp[0].id));
11540  arg_var(p, formal_argument(p, id));
11541  p->cur_arg = id;
11543  (yyval.id) = (yyvsp[0].id);
11544  }
11545 #line 11541 "parse.c" /* yacc.c:1646 */
11546  break;
11547 
11548  case 689:
11549 #line 5062 "parse.y" /* yacc.c:1646 */
11550  {
11551  p->cur_arg = 0;
11552  /*%%%*/
11553  (yyval.node) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
11554  /*% %*/
11555  /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), get_value($2)) %*/
11556  }
11557 #line 11553 "parse.c" /* yacc.c:1646 */
11558  break;
11559 
11560  case 690:
11561 #line 5070 "parse.y" /* yacc.c:1646 */
11562  {
11563  p->cur_arg = 0;
11564  /*%%%*/
11565  (yyval.node) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
11566  /*% %*/
11567  /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), 0) %*/
11568  }
11569 #line 11565 "parse.c" /* yacc.c:1646 */
11570  break;
11571 
11572  case 691:
11573 #line 5080 "parse.y" /* yacc.c:1646 */
11574  {
11575  /*%%%*/
11576  (yyval.node) = new_kw_arg(p, assignable(p, (yyvsp[-1].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
11577  /*% %*/
11578  /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), get_value($2)) %*/
11579  }
11580 #line 11576 "parse.c" /* yacc.c:1646 */
11581  break;
11582 
11583  case 692:
11584 #line 5087 "parse.y" /* yacc.c:1646 */
11585  {
11586  /*%%%*/
11587  (yyval.node) = new_kw_arg(p, assignable(p, (yyvsp[0].id), NODE_SPECIAL_REQUIRED_KEYWORD, &(yyloc)), &(yyloc));
11588  /*% %*/
11589  /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), 0) %*/
11590  }
11591 #line 11587 "parse.c" /* yacc.c:1646 */
11592  break;
11593 
11594  case 693:
11595 #line 5096 "parse.y" /* yacc.c:1646 */
11596  {
11597  /*%%%*/
11598  (yyval.node) = (yyvsp[0].node);
11599  /*% %*/
11600  /*% ripper: rb_ary_new3(1, get_value($1)) %*/
11601  }
11602 #line 11598 "parse.c" /* yacc.c:1646 */
11603  break;
11604 
11605  case 694:
11606 #line 5103 "parse.y" /* yacc.c:1646 */
11607  {
11608  /*%%%*/
11609  (yyval.node) = kwd_append((yyvsp[-2].node), (yyvsp[0].node));
11610  /*% %*/
11611  /*% ripper: rb_ary_push($1, get_value($3)) %*/
11612  }
11613 #line 11609 "parse.c" /* yacc.c:1646 */
11614  break;
11615 
11616  case 695:
11617 #line 5113 "parse.y" /* yacc.c:1646 */
11618  {
11619  /*%%%*/
11620  (yyval.node) = (yyvsp[0].node);
11621  /*% %*/
11622  /*% ripper: rb_ary_new3(1, get_value($1)) %*/
11623  }
11624 #line 11620 "parse.c" /* yacc.c:1646 */
11625  break;
11626 
11627  case 696:
11628 #line 5120 "parse.y" /* yacc.c:1646 */
11629  {
11630  /*%%%*/
11631  (yyval.node) = kwd_append((yyvsp[-2].node), (yyvsp[0].node));
11632  /*% %*/
11633  /*% ripper: rb_ary_push($1, get_value($3)) %*/
11634  }
11635 #line 11631 "parse.c" /* yacc.c:1646 */
11636  break;
11637 
11638  case 699:
11639 #line 5133 "parse.y" /* yacc.c:1646 */
11640  {
11641  /*%%%*/
11642  /*% %*/
11643  /*% ripper: nokw_param!(Qnil) %*/
11644  }
11645 #line 11641 "parse.c" /* yacc.c:1646 */
11646  break;
11647 
11648  case 700:
11649 #line 5141 "parse.y" /* yacc.c:1646 */
11650  {
11651  arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].id))));
11652  /*%%%*/
11653  (yyval.id) = (yyvsp[0].id);
11654  /*% %*/
11655  /*% ripper: kwrest_param!($2) %*/
11656  }
11657 #line 11653 "parse.c" /* yacc.c:1646 */
11658  break;
11659 
11660  case 701:
11661 #line 5149 "parse.y" /* yacc.c:1646 */
11662  {
11663  /*%%%*/
11664  (yyval.id) = internal_id(p);
11665  arg_var(p, (yyval.id));
11666  /*% %*/
11667  /*% ripper: kwrest_param!(Qnil) %*/
11668  }
11669 #line 11665 "parse.c" /* yacc.c:1646 */
11670  break;
11671 
11672  case 702:
11673 #line 5159 "parse.y" /* yacc.c:1646 */
11674  {
11675  p->cur_arg = 0;
11676  /*%%%*/
11677  (yyval.node) = NEW_OPT_ARG(0, assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
11678  /*% %*/
11679  /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), get_value($3)) %*/
11680  }
11681 #line 11677 "parse.c" /* yacc.c:1646 */
11682  break;
11683 
11684  case 703:
11685 #line 5169 "parse.y" /* yacc.c:1646 */
11686  {
11687  p->cur_arg = 0;
11688  /*%%%*/
11689  (yyval.node) = NEW_OPT_ARG(0, assignable(p, (yyvsp[-2].id), (yyvsp[0].node), &(yyloc)), &(yyloc));
11690  /*% %*/
11691  /*% ripper: rb_assoc_new(get_value(assignable(p, $1)), get_value($3)) %*/
11692  }
11693 #line 11689 "parse.c" /* yacc.c:1646 */
11694  break;
11695 
11696  case 704:
11697 #line 5179 "parse.y" /* yacc.c:1646 */
11698  {
11699  /*%%%*/
11700  (yyval.node) = (yyvsp[0].node);
11701  /*% %*/
11702  /*% ripper: rb_ary_new3(1, get_value($1)) %*/
11703  }
11704 #line 11700 "parse.c" /* yacc.c:1646 */
11705  break;
11706 
11707  case 705:
11708 #line 5186 "parse.y" /* yacc.c:1646 */
11709  {
11710  /*%%%*/
11711  (yyval.node) = opt_arg_append((yyvsp[-2].node), (yyvsp[0].node));
11712  /*% %*/
11713  /*% ripper: rb_ary_push($1, get_value($3)) %*/
11714  }
11715 #line 11711 "parse.c" /* yacc.c:1646 */
11716  break;
11717 
11718  case 706:
11719 #line 5195 "parse.y" /* yacc.c:1646 */
11720  {
11721  /*%%%*/
11722  (yyval.node) = (yyvsp[0].node);
11723  /*% %*/
11724  /*% ripper: rb_ary_new3(1, get_value($1)) %*/
11725  }
11726 #line 11722 "parse.c" /* yacc.c:1646 */
11727  break;
11728 
11729  case 707:
11730 #line 5202 "parse.y" /* yacc.c:1646 */
11731  {
11732  /*%%%*/
11733  (yyval.node) = opt_arg_append((yyvsp[-2].node), (yyvsp[0].node));
11734  /*% %*/
11735  /*% ripper: rb_ary_push($1, get_value($3)) %*/
11736  }
11737 #line 11733 "parse.c" /* yacc.c:1646 */
11738  break;
11739 
11740  case 710:
11741 #line 5215 "parse.y" /* yacc.c:1646 */
11742  {
11743  arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].id))));
11744  /*%%%*/
11745  (yyval.id) = (yyvsp[0].id);
11746  /*% %*/
11747  /*% ripper: rest_param!($2) %*/
11748  }
11749 #line 11745 "parse.c" /* yacc.c:1646 */
11750  break;
11751 
11752  case 711:
11753 #line 5223 "parse.y" /* yacc.c:1646 */
11754  {
11755  /*%%%*/
11756  (yyval.id) = internal_id(p);
11757  arg_var(p, (yyval.id));
11758  /*% %*/
11759  /*% ripper: rest_param!(Qnil) %*/
11760  }
11761 #line 11757 "parse.c" /* yacc.c:1646 */
11762  break;
11763 
11764  case 714:
11765 #line 5237 "parse.y" /* yacc.c:1646 */
11766  {
11767  arg_var(p, shadowing_lvar(p, get_id((yyvsp[0].id))));
11768  /*%%%*/
11769  (yyval.id) = (yyvsp[0].id);
11770  /*% %*/
11771  /*% ripper: blockarg!($2) %*/
11772  }
11773 #line 11769 "parse.c" /* yacc.c:1646 */
11774  break;
11775 
11776  case 715:
11777 #line 5247 "parse.y" /* yacc.c:1646 */
11778  {
11779  (yyval.id) = (yyvsp[0].id);
11780  }
11781 #line 11777 "parse.c" /* yacc.c:1646 */
11782  break;
11783 
11784  case 716:
11785 #line 5251 "parse.y" /* yacc.c:1646 */
11786  {
11787  (yyval.id) = Qnull;
11788  }
11789 #line 11785 "parse.c" /* yacc.c:1646 */
11790  break;
11791 
11792  case 717:
11793 #line 5257 "parse.y" /* yacc.c:1646 */
11794  {
11795  value_expr((yyvsp[0].node));
11796  (yyval.node) = (yyvsp[0].node);
11797  }
11798 #line 11794 "parse.c" /* yacc.c:1646 */
11799  break;
11800 
11801  case 718:
11802 #line 5261 "parse.y" /* yacc.c:1646 */
11803  {SET_LEX_STATE(EXPR_BEG);}
11804 #line 11800 "parse.c" /* yacc.c:1646 */
11805  break;
11806 
11807  case 719:
11808 #line 5262 "parse.y" /* yacc.c:1646 */
11809  {
11810  /*%%%*/
11811  switch (nd_type((yyvsp[-1].node))) {
11812  case NODE_STR:
11813  case NODE_DSTR:
11814  case NODE_XSTR:
11815  case NODE_DXSTR:
11816  case NODE_DREGX:
11817  case NODE_LIT:
11818  case NODE_LIST:
11819  case NODE_ZLIST:
11820  yyerror1(&(yylsp[-1]), "can't define singleton method for literals");
11821  break;
11822  default:
11823  value_expr((yyvsp[-1].node));
11824  break;
11825  }
11826  (yyval.node) = (yyvsp[-1].node);
11827  /*% %*/
11828  /*% ripper: paren!($3) %*/
11829  }
11830 #line 11826 "parse.c" /* yacc.c:1646 */
11831  break;
11832 
11833  case 721:
11834 #line 5287 "parse.y" /* yacc.c:1646 */
11835  {
11836  /*%%%*/
11837  (yyval.node) = (yyvsp[-1].node);
11838  /*% %*/
11839  /*% ripper: assoclist_from_args!($1) %*/
11840  }
11841 #line 11837 "parse.c" /* yacc.c:1646 */
11842  break;
11843 
11844  case 723:
11845 #line 5298 "parse.y" /* yacc.c:1646 */
11846  {
11847  /*%%%*/
11848  NODE *assocs = (yyvsp[-2].node);
11849  NODE *tail = (yyvsp[0].node);
11850  if (!assocs) {
11851  assocs = tail;
11852  }
11853  else if (tail) {
11854  if (assocs->nd_head &&
11855  !tail->nd_head && nd_type(tail->nd_next) == NODE_LIST &&
11856  nd_type(tail->nd_next->nd_head) == NODE_HASH) {
11857  /* DSTAR */
11858  tail = tail->nd_next->nd_head->nd_head;
11859  }
11860  assocs = list_concat(assocs, tail);
11861  }
11862  (yyval.node) = assocs;
11863  /*% %*/
11864  /*% ripper: rb_ary_push($1, get_value($3)) %*/
11865  }
11866 #line 11862 "parse.c" /* yacc.c:1646 */
11867  break;
11868 
11869  case 724:
11870 #line 5321 "parse.y" /* yacc.c:1646 */
11871  {
11872  /*%%%*/
11873  if (nd_type((yyvsp[-2].node)) == NODE_STR) {
11874  nd_set_type((yyvsp[-2].node), NODE_LIT);
11875  RB_OBJ_WRITE(p->ast, &(yyvsp[-2].node)->nd_lit, rb_fstring((yyvsp[-2].node)->nd_lit));
11876  }
11877  (yyval.node) = list_append(p, NEW_LIST((yyvsp[-2].node), &(yyloc)), (yyvsp[0].node));
11878  /*% %*/
11879  /*% ripper: assoc_new!($1, $3) %*/
11880  }
11881 #line 11877 "parse.c" /* yacc.c:1646 */
11882  break;
11883 
11884  case 725:
11885 #line 5332 "parse.y" /* yacc.c:1646 */
11886  {
11887  /*%%%*/
11888  (yyval.node) = list_append(p, NEW_LIST(NEW_LIT(ID2SYM((yyvsp[-1].id)), &(yylsp[-1])), &(yyloc)), (yyvsp[0].node));
11889  /*% %*/
11890  /*% ripper: assoc_new!($1, $2) %*/
11891  }
11892 #line 11888 "parse.c" /* yacc.c:1646 */
11893  break;
11894 
11895  case 726:
11896 #line 5339 "parse.y" /* yacc.c:1646 */
11897  {
11898  /*%%%*/
11899  YYLTYPE loc = code_loc_gen(&(yylsp[-3]), &(yylsp[-1]));
11900  (yyval.node) = list_append(p, NEW_LIST(dsym_node(p, (yyvsp[-2].node), &loc), &loc), (yyvsp[0].node));
11901  /*% %*/
11902  /*% ripper: assoc_new!(dyna_symbol!($2), $4) %*/
11903  }
11904 #line 11900 "parse.c" /* yacc.c:1646 */
11905  break;
11906 
11907  case 727:
11908 #line 5347 "parse.y" /* yacc.c:1646 */
11909  {
11910  /*%%%*/
11911  if (nd_type((yyvsp[0].node)) == NODE_HASH &&
11912  !((yyvsp[0].node)->nd_head && (yyvsp[0].node)->nd_head->nd_alen)) {
11913  static VALUE empty_hash;
11914  if (!empty_hash) {
11915  empty_hash = rb_obj_freeze(rb_hash_new());
11916  rb_gc_register_mark_object(empty_hash);
11917  }
11918  (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), NEW_LIT(empty_hash, &(yyloc)));
11919  }
11920  else
11921  (yyval.node) = list_append(p, NEW_LIST(0, &(yyloc)), (yyvsp[0].node));
11922  /*% %*/
11923  /*% ripper: assoc_splat!($2) %*/
11924  }
11925 #line 11921 "parse.c" /* yacc.c:1646 */
11926  break;
11927 
11928  case 753:
11929 #line 5412 "parse.y" /* yacc.c:1646 */
11930  {yyerrok;token_flush(p);}
11931 #line 11927 "parse.c" /* yacc.c:1646 */
11932  break;
11933 
11934  case 754:
11935 #line 5413 "parse.y" /* yacc.c:1646 */
11936  {token_flush(p);}
11937 #line 11933 "parse.c" /* yacc.c:1646 */
11938  break;
11939 
11940  case 756:
11941 #line 5417 "parse.y" /* yacc.c:1646 */
11942  {yyerrok;}
11943 #line 11939 "parse.c" /* yacc.c:1646 */
11944  break;
11945 
11946  case 757:
11947 #line 5421 "parse.y" /* yacc.c:1646 */
11948  {
11949  (yyval.node) = Qnull;
11950  }
11951 #line 11947 "parse.c" /* yacc.c:1646 */
11952  break;
11953 
11954 
11955 #line 11951 "parse.c" /* yacc.c:1646 */
11956  default: break;
11957  }
11958  /* User semantic actions sometimes alter yychar, and that requires
11959  that yytoken be updated with the new translation. We take the
11960  approach of translating immediately before every use of yytoken.
11961  One alternative is translating here after every semantic action,
11962  but that translation would be missed if the semantic action invokes
11963  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
11964  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
11965  incorrect destructor might then be invoked immediately. In the
11966  case of YYERROR or YYBACKUP, subsequent parser actions might lead
11967  to an incorrect destructor call or verbose syntax error message
11968  before the lookahead is translated. */
11969  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
11970 
11971  YYPOPSTACK (yylen);
11972  yylen = 0;
11973  YY_STACK_PRINT (yyss, yyssp);
11974 
11975  *++yyvsp = yyval;
11976  *++yylsp = yyloc;
11977 
11978  /* Now 'shift' the result of the reduction. Determine what state
11979  that goes to, based on the state we popped back to and the rule
11980  number reduced by. */
11981 
11982  yyn = yyr1[yyn];
11983 
11984  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
11985  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
11986  yystate = yytable[yystate];
11987  else
11988  yystate = yydefgoto[yyn - YYNTOKENS];
11989 
11990  goto yynewstate;
11991 
11992 
11993 /*--------------------------------------.
11994 | yyerrlab -- here on detecting error. |
11995 `--------------------------------------*/
11996 yyerrlab:
11997  /* Make sure we have latest lookahead translation. See comments at
11998  user semantic actions for why this is necessary. */
11999  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
12000 
12001  /* If not already recovering from an error, report this error. */
12002  if (!yyerrstatus)
12003  {
12004  ++yynerrs;
12005 #if ! YYERROR_VERBOSE
12006  yyerror (&yylloc, p, YY_("syntax error"));
12007 #else
12008 # define YYSYNTAX_ERROR yysyntax_error (p, &yymsg_alloc, &yymsg, \
12009  yyssp, yytoken)
12010  {
12011  char const *yymsgp = YY_("syntax error");
12012  int yysyntax_error_status;
12013  yysyntax_error_status = YYSYNTAX_ERROR;
12014  if (yysyntax_error_status == 0)
12015  yymsgp = yymsg;
12016  else if (yysyntax_error_status == 1)
12017  {
12018  if (yymsg != yymsgbuf)
12019  YYSTACK_FREE (yymsg);
12020  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
12021  if (!yymsg)
12022  {
12023  yymsg = yymsgbuf;
12024  yymsg_alloc = sizeof yymsgbuf;
12025  yysyntax_error_status = 2;
12026  }
12027  else
12028  {
12029  yysyntax_error_status = YYSYNTAX_ERROR;
12030  yymsgp = yymsg;
12031  }
12032  }
12033  yyerror (&yylloc, p, yymsgp);
12034  if (yysyntax_error_status == 2)
12035  goto yyexhaustedlab;
12036  }
12037 # undef YYSYNTAX_ERROR
12038 #endif
12039  }
12040 
12041  yyerror_range[1] = yylloc;
12042 
12043  if (yyerrstatus == 3)
12044  {
12045  /* If just tried and failed to reuse lookahead token after an
12046  error, discard it. */
12047 
12048  if (yychar <= YYEOF)
12049  {
12050  /* Return failure if at end of input. */
12051  if (yychar == YYEOF)
12052  YYABORT;
12053  }
12054  else
12055  {
12056  yydestruct ("Error: discarding",
12057  yytoken, &yylval, &yylloc, p);
12058  yychar = YYEMPTY;
12059  }
12060  }
12061 
12062  /* Else will try to reuse lookahead token after shifting the error
12063  token. */
12064  goto yyerrlab1;
12065 
12066 
12067 /*---------------------------------------------------.
12068 | yyerrorlab -- error raised explicitly by YYERROR. |
12069 `---------------------------------------------------*/
12070 yyerrorlab:
12071 
12072  /* Pacify compilers like GCC when the user code never invokes
12073  YYERROR and the label yyerrorlab therefore never appears in user
12074  code. */
12075  if (/*CONSTCOND*/ 0)
12076  goto yyerrorlab;
12077 
12078  yyerror_range[1] = yylsp[1-yylen];
12079  /* Do not reclaim the symbols of the rule whose action triggered
12080  this YYERROR. */
12081  YYPOPSTACK (yylen);
12082  yylen = 0;
12083  YY_STACK_PRINT (yyss, yyssp);
12084  yystate = *yyssp;
12085  goto yyerrlab1;
12086 
12087 
12088 /*-------------------------------------------------------------.
12089 | yyerrlab1 -- common code for both syntax error and YYERROR. |
12090 `-------------------------------------------------------------*/
12091 yyerrlab1:
12092  yyerrstatus = 3; /* Each real token shifted decrements this. */
12093 
12094  for (;;)
12095  {
12096  yyn = yypact[yystate];
12097  if (!yypact_value_is_default (yyn))
12098  {
12099  yyn += YYTERROR;
12100  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
12101  {
12102  yyn = yytable[yyn];
12103  if (0 < yyn)
12104  break;
12105  }
12106  }
12107 
12108  /* Pop the current state because it cannot handle the error token. */
12109  if (yyssp == yyss)
12110  YYABORT;
12111 
12112  yyerror_range[1] = *yylsp;
12113  yydestruct ("Error: popping",
12114  yystos[yystate], yyvsp, yylsp, p);
12115  YYPOPSTACK (1);
12116  yystate = *yyssp;
12117  YY_STACK_PRINT (yyss, yyssp);
12118  }
12119 
12121  *++yyvsp = yylval;
12123 
12124  yyerror_range[2] = yylloc;
12125  /* Using YYLLOC is tempting, but would change the location of
12126  the lookahead. YYLOC is available though. */
12127  YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
12128  *++yylsp = yyloc;
12129 
12130  /* Shift the error token. */
12131  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
12132 
12133  yystate = yyn;
12134  goto yynewstate;
12135 
12136 
12137 /*-------------------------------------.
12138 | yyacceptlab -- YYACCEPT comes here. |
12139 `-------------------------------------*/
12140 yyacceptlab:
12141  yyresult = 0;
12142  goto yyreturn;
12143 
12144 /*-----------------------------------.
12145 | yyabortlab -- YYABORT comes here. |
12146 `-----------------------------------*/
12147 yyabortlab:
12148  yyresult = 1;
12149  goto yyreturn;
12150 
12151 #if !defined yyoverflow || YYERROR_VERBOSE
12152 /*-------------------------------------------------.
12153 | yyexhaustedlab -- memory exhaustion comes here. |
12154 `-------------------------------------------------*/
12155 yyexhaustedlab:
12156  yyerror (&yylloc, p, YY_("memory exhausted"));
12157  yyresult = 2;
12158  /* Fall through. */
12159 #endif
12160 
12161 yyreturn:
12162  if (yychar != YYEMPTY)
12163  {
12164  /* Make sure we have latest lookahead translation. See comments at
12165  user semantic actions for why this is necessary. */
12166  yytoken = YYTRANSLATE (yychar);
12167  yydestruct ("Cleanup: discarding lookahead",
12168  yytoken, &yylval, &yylloc, p);
12169  }
12170  /* Do not reclaim the symbols of the rule whose action triggered
12171  this YYABORT or YYACCEPT. */
12172  YYPOPSTACK (yylen);
12173  YY_STACK_PRINT (yyss, yyssp);
12174  while (yyssp != yyss)
12175  {
12176  yydestruct ("Cleanup: popping",
12177  yystos[*yyssp], yyvsp, yylsp, p);
12178  YYPOPSTACK (1);
12179  }
12180 #ifndef yyoverflow
12181  if (yyss != yyssa)
12182  YYSTACK_FREE (yyss);
12183 #endif
12184 #if YYERROR_VERBOSE
12185  if (yymsg != yymsgbuf)
12186  YYSTACK_FREE (yymsg);
12187 #endif
12188  return yyresult;
12189 }
12190 #line 5425 "parse.y" /* yacc.c:1906 */
12191 
12192 # undef p
12193 # undef yylex
12194 # undef yylval
12195 # define yylval (*p->lval)
12196 
12197 static int regx_options(struct parser_params*);
12198 static int tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**,rb_encoding**);
12199 static void tokaddmbc(struct parser_params *p, int c, rb_encoding *enc);
12200 static enum yytokentype parse_string(struct parser_params*,rb_strterm_literal_t*);
12201 static enum yytokentype here_document(struct parser_params*,rb_strterm_heredoc_t*);
12202 
12203 #ifndef RIPPER
12204 # define set_yylval_node(x) { \
12205  YYLTYPE _cur_loc; \
12206  rb_parser_set_location(p, &_cur_loc); \
12207  yylval.node = (x); \
12208 }
12209 # define set_yylval_str(x) \
12210 do { \
12211  set_yylval_node(NEW_STR(x, &_cur_loc)); \
12212  RB_OBJ_WRITTEN(p->ast, Qnil, x); \
12213 } while(0)
12214 # define set_yylval_literal(x) \
12215 do { \
12216  set_yylval_node(NEW_LIT(x, &_cur_loc)); \
12217  RB_OBJ_WRITTEN(p->ast, Qnil, x); \
12218 } while(0)
12219 # define set_yylval_num(x) (yylval.num = (x))
12220 # define set_yylval_id(x) (yylval.id = (x))
12221 # define set_yylval_name(x) (yylval.id = (x))
12222 # define yylval_id() (yylval.id)
12223 #else
12224 static inline VALUE
12225 ripper_yylval_id(struct parser_params *p, ID x)
12226 {
12227  return ripper_new_yylval(p, x, ID2SYM(x), 0);
12228 }
12229 # define set_yylval_str(x) (yylval.val = add_mark_object(p, (x)))
12230 # define set_yylval_num(x) (yylval.val = ripper_new_yylval(p, (x), 0, 0))
12231 # define set_yylval_id(x) (void)(x)
12232 # define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(p, x))
12233 # define set_yylval_literal(x) add_mark_object(p, (x))
12234 # define set_yylval_node(x) (void)(x)
12235 # define yylval_id() yylval.id
12236 # define _cur_loc NULL_LOC /* dummy */
12237 #endif
12238 
12239 #define set_yylval_noname() set_yylval_id(keyword_nil)
12240 
12241 #ifndef RIPPER
12242 #define literal_flush(p, ptr) ((p)->lex.ptok = (ptr))
12243 #define dispatch_scan_event(p, t) ((void)0)
12244 #define dispatch_delayed_token(p, t) ((void)0)
12245 #define has_delayed_token(p) (0)
12246 #else
12247 #define literal_flush(p, ptr) ((void)(ptr))
12248 
12249 #define yylval_rval (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val))
12250 
12251 static inline VALUE
12252 intern_sym(const char *name)
12253 {
12254  ID id = rb_intern_const(name);
12255  return ID2SYM(id);
12256 }
12257 
12258 static int
12259 ripper_has_scan_event(struct parser_params *p)
12260 {
12261  if (p->lex.pcur < p->lex.ptok) rb_raise(rb_eRuntimeError, "lex.pcur < lex.ptok");
12262  return p->lex.pcur > p->lex.ptok;
12263 }
12264 
12265 static VALUE
12266 ripper_scan_event_val(struct parser_params *p, enum yytokentype t)
12267 {
12268  VALUE str = STR_NEW(p->lex.ptok, p->lex.pcur - p->lex.ptok);
12269  VALUE rval = ripper_dispatch1(p, ripper_token2eventid(t), str);
12270  token_flush(p);
12271  return rval;
12272 }
12273 
12274 static void
12275 ripper_dispatch_scan_event(struct parser_params *p, enum yytokentype t)
12276 {
12277  if (!ripper_has_scan_event(p)) return;
12278  add_mark_object(p, yylval_rval = ripper_scan_event_val(p, t));
12279 }
12280 #define dispatch_scan_event(p, t) ripper_dispatch_scan_event(p, t)
12281 
12282 static void
12283 ripper_dispatch_delayed_token(struct parser_params *p, enum yytokentype t)
12284 {
12285  int saved_line = p->ruby_sourceline;
12286  const char *saved_tokp = p->lex.ptok;
12287 
12288  if (NIL_P(p->delayed.token)) return;
12289  p->ruby_sourceline = p->delayed.line;
12290  p->lex.ptok = p->lex.pbeg + p->delayed.col;
12291  add_mark_object(p, yylval_rval = ripper_dispatch1(p, ripper_token2eventid(t), p->delayed.token));
12292  p->delayed.token = Qnil;
12293  p->ruby_sourceline = saved_line;
12294  p->lex.ptok = saved_tokp;
12295 }
12296 #define dispatch_delayed_token(p, t) ripper_dispatch_delayed_token(p, t)
12297 #define has_delayed_token(p) (!NIL_P(p->delayed.token))
12298 #endif /* RIPPER */
12299 
12300 #include "ruby/regex.h"
12301 #include "ruby/util.h"
12302 
12303 static inline int
12304 is_identchar(const char *ptr, const char *MAYBE_UNUSED(ptr_end), rb_encoding *enc)
12305 {
12306  return rb_enc_isalnum((unsigned char)*ptr, enc) || *ptr == '_' || !ISASCII(*ptr);
12307 }
12308 
12309 static inline int
12310 parser_is_identchar(struct parser_params *p)
12311 {
12312  return !(p)->eofp && is_identchar(p->lex.pcur-1, p->lex.pend, p->enc);
12313 }
12314 
12315 static inline int
12316 parser_isascii(struct parser_params *p)
12317 {
12318  return ISASCII(*(p->lex.pcur-1));
12319 }
12320 
12321 static void
12322 token_info_setup(token_info *ptinfo, const char *ptr, const rb_code_location_t *loc)
12323 {
12324  int column = 1, nonspc = 0, i;
12325  for (i = 0; i < loc->beg_pos.column; i++, ptr++) {
12326  if (*ptr == '\t') {
12327  column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
12328  }
12329  column++;
12330  if (*ptr != ' ' && *ptr != '\t') {
12331  nonspc = 1;
12332  }
12333  }
12334 
12335  ptinfo->beg = loc->beg_pos;
12336  ptinfo->indent = column;
12337  ptinfo->nonspc = nonspc;
12338 }
12339 
12340 static void
12341 token_info_push(struct parser_params *p, const char *token, const rb_code_location_t *loc)
12342 {
12343  token_info *ptinfo;
12344 
12345  if (!p->token_info_enabled) return;
12346  ptinfo = ALLOC(token_info);
12347  ptinfo->token = token;
12348  ptinfo->next = p->token_info;
12349  token_info_setup(ptinfo, p->lex.pbeg, loc);
12350 
12351  p->token_info = ptinfo;
12352 }
12353 
12354 static void
12355 token_info_pop(struct parser_params *p, const char *token, const rb_code_location_t *loc)
12356 {
12357  token_info *ptinfo_beg = p->token_info;
12358 
12359  if (!ptinfo_beg) return;
12360  p->token_info = ptinfo_beg->next;
12361 
12362  /* indentation check of matched keywords (begin..end, if..end, etc.) */
12363  token_info_warn(p, token, ptinfo_beg, 1, loc);
12364  ruby_sized_xfree(ptinfo_beg, sizeof(*ptinfo_beg));
12365 }
12366 
12367 static void
12368 token_info_warn(struct parser_params *p, const char *token, token_info *ptinfo_beg, int same, const rb_code_location_t *loc)
12369 {
12370  token_info ptinfo_end_body, *ptinfo_end = &ptinfo_end_body;
12371  if (!p->token_info_enabled) return;
12372  if (!ptinfo_beg) return;
12373  token_info_setup(ptinfo_end, p->lex.pbeg, loc);
12374  if (ptinfo_beg->beg.lineno == ptinfo_end->beg.lineno) return; /* ignore one-line block */
12375  if (ptinfo_beg->nonspc || ptinfo_end->nonspc) return; /* ignore keyword in the middle of a line */
12376  if (ptinfo_beg->indent == ptinfo_end->indent) return; /* the indents are matched */
12377  if (!same && ptinfo_beg->indent < ptinfo_end->indent) return;
12378  rb_warn3L(ptinfo_end->beg.lineno,
12379  "mismatched indentations at '%s' with '%s' at %d",
12380  WARN_S(token), WARN_S(ptinfo_beg->token), WARN_I(ptinfo_beg->beg.lineno));
12381 }
12382 
12383 static int
12384 parser_precise_mbclen(struct parser_params *p, const char *ptr)
12385 {
12386  int len = rb_enc_precise_mbclen(ptr, p->lex.pend, p->enc);
12387  if (!MBCLEN_CHARFOUND_P(len)) {
12388  compile_error(p, "invalid multibyte char (%s)", rb_enc_name(p->enc));
12389  return -1;
12390  }
12391  return len;
12392 }
12393 
12394 #ifndef RIPPER
12395 static void ruby_show_error_line(VALUE errbuf, const YYLTYPE *yylloc, int lineno, VALUE str);
12396 
12397 static inline void
12398 parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
12399 {
12400  VALUE str;
12401  int lineno = p->ruby_sourceline;
12402  if (!yylloc) {
12403  return;
12404  }
12405  else if (yylloc->beg_pos.lineno == lineno) {
12406  str = p->lex.lastline;
12407  }
12408  else {
12409  return;
12410  }
12411  ruby_show_error_line(p->error_buffer, yylloc, lineno, str);
12412 }
12413 
12414 static int
12415 parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
12416 {
12417  YYLTYPE current;
12418 
12419  if (!yylloc) {
12420  yylloc = RUBY_SET_YYLLOC(current);
12421  }
12422  else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
12423  p->ruby_sourceline != yylloc->end_pos.lineno) ||
12424  (yylloc->beg_pos.lineno == yylloc->end_pos.lineno &&
12425  yylloc->beg_pos.column == yylloc->end_pos.column)) {
12426  yylloc = 0;
12427  }
12428  compile_error(p, "%s", msg);
12429  parser_show_error_line(p, yylloc);
12430  return 0;
12431 }
12432 
12433 static void
12434 ruby_show_error_line(VALUE errbuf, const YYLTYPE *yylloc, int lineno, VALUE str)
12435 {
12436  VALUE mesg;
12437  const int max_line_margin = 30;
12438  const char *ptr, *ptr_end, *pt, *pb;
12439  const char *pre = "", *post = "", *pend;
12440  const char *code = "", *caret = "";
12441  const char *lim;
12442  const char *const pbeg = RSTRING_PTR(str);
12443  char *buf;
12444  long len;
12445  int i;
12446 
12447  if (!yylloc) return;
12448  pend = RSTRING_END(str);
12449  if (pend > pbeg && pend[-1] == '\n') {
12450  if (--pend > pbeg && pend[-1] == '\r') --pend;
12451  }
12452 
12453  pt = pend;
12454  if (lineno == yylloc->end_pos.lineno &&
12455  (pend - pbeg) > yylloc->end_pos.column) {
12456  pt = pbeg + yylloc->end_pos.column;
12457  }
12458 
12459  ptr = ptr_end = pt;
12460  lim = ptr - pbeg > max_line_margin ? ptr - max_line_margin : pbeg;
12461  while ((lim < ptr) && (*(ptr-1) != '\n')) ptr--;
12462 
12463  lim = pend - ptr_end > max_line_margin ? ptr_end + max_line_margin : pend;
12464  while ((ptr_end < lim) && (*ptr_end != '\n') && (*ptr_end != '\r')) ptr_end++;
12465 
12466  len = ptr_end - ptr;
12467  if (len > 4) {
12468  if (ptr > pbeg) {
12469  ptr = rb_enc_prev_char(pbeg, ptr, pt, rb_enc_get(str));
12470  if (ptr > pbeg) pre = "...";
12471  }
12472  if (ptr_end < pend) {
12473  ptr_end = rb_enc_prev_char(pt, ptr_end, pend, rb_enc_get(str));
12474  if (ptr_end < pend) post = "...";
12475  }
12476  }
12477  pb = pbeg;
12478  if (lineno == yylloc->beg_pos.lineno) {
12479  pb += yylloc->beg_pos.column;
12480  if (pb > pt) pb = pt;
12481  }
12482  if (pb < ptr) pb = ptr;
12483  if (len <= 4 && yylloc->beg_pos.lineno == yylloc->end_pos.lineno) {
12484  return;
12485  }
12486  if (RTEST(errbuf)) {
12487  mesg = rb_attr_get(errbuf, idMesg);
12488  if (RSTRING_LEN(mesg) > 0 && *(RSTRING_END(mesg)-1) != '\n')
12489  rb_str_cat_cstr(mesg, "\n");
12490  }
12491  else {
12492  mesg = rb_enc_str_new(0, 0, rb_enc_get(str));
12493  }
12494  if (!errbuf && rb_stderr_tty_p()) {
12495 #define CSI_BEGIN "\033["
12496 #define CSI_SGR "m"
12497  rb_str_catf(mesg,
12498  CSI_BEGIN""CSI_SGR"%s" /* pre */
12499  CSI_BEGIN"1"CSI_SGR"%.*s"
12500  CSI_BEGIN"1;4"CSI_SGR"%.*s"
12501  CSI_BEGIN";1"CSI_SGR"%.*s"
12502  CSI_BEGIN""CSI_SGR"%s" /* post */
12503  "\n",
12504  pre,
12505  (int)(pb - ptr), ptr,
12506  (int)(pt - pb), pb,
12507  (int)(ptr_end - pt), pt,
12508  post);
12509  }
12510  else {
12511  char *p2;
12512 
12513  len = ptr_end - ptr;
12514  lim = pt < pend ? pt : pend;
12515  i = (int)(lim - ptr);
12516  buf = ALLOCA_N(char, i+2);
12517  code = ptr;
12518  caret = p2 = buf;
12519  if (ptr <= pb) {
12520  while (ptr < pb) {
12521  *p2++ = *ptr++ == '\t' ? '\t' : ' ';
12522  }
12523  *p2++ = '^';
12524  ptr++;
12525  }
12526  if (lim > ptr) {
12527  memset(p2, '~', (lim - ptr));
12528  p2 += (lim - ptr);
12529  }
12530  *p2 = '\0';
12531  rb_str_catf(mesg, "%s%.*s%s\n""%s%s\n",
12532  pre, (int)len, code, post,
12533  pre, caret);
12534  }
12535  if (!errbuf) rb_write_error_str(mesg);
12536 }
12537 #else
12538 static int
12539 parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
12540 {
12541  const char *pcur = 0, *ptok = 0;
12542  if (yylloc &&
12543  p->ruby_sourceline == yylloc->beg_pos.lineno &&
12544  p->ruby_sourceline == yylloc->end_pos.lineno) {
12545  pcur = p->lex.pcur;
12546  ptok = p->lex.ptok;
12547  p->lex.ptok = p->lex.pbeg + yylloc->beg_pos.column;
12548  p->lex.pcur = p->lex.pbeg + yylloc->end_pos.column;
12549  }
12550  dispatch1(parse_error, STR_NEW2(msg));
12551  ripper_error(p);
12552  if (pcur) {
12553  p->lex.ptok = ptok;
12554  p->lex.pcur = pcur;
12555  }
12556  return 0;
12557 }
12558 
12559 static inline void
12560 parser_show_error_line(struct parser_params *p, const YYLTYPE *yylloc)
12561 {
12562 }
12563 #endif /* !RIPPER */
12564 
12565 #ifndef RIPPER
12566 static int
12567 vtable_size(const struct vtable *tbl)
12568 {
12569  if (!DVARS_TERMINAL_P(tbl)) {
12570  return tbl->pos;
12571  }
12572  else {
12573  return 0;
12574  }
12575 }
12576 #endif
12577 
12578 static struct vtable *
12579 vtable_alloc_gen(struct parser_params *p, int line, struct vtable *prev)
12580 {
12581  struct vtable *tbl = ALLOC(struct vtable);
12582  tbl->pos = 0;
12583  tbl->capa = 8;
12584  tbl->tbl = ALLOC_N(ID, tbl->capa);
12585  tbl->prev = prev;
12586 #ifndef RIPPER
12587  if (p->debug) {
12588  rb_parser_printf(p, "vtable_alloc:%d: %p\n", line, (void *)tbl);
12589  }
12590 #endif
12591  return tbl;
12592 }
12593 #define vtable_alloc(prev) vtable_alloc_gen(p, __LINE__, prev)
12594 
12595 static void
12596 vtable_free_gen(struct parser_params *p, int line, const char *name,
12597  struct vtable *tbl)
12598 {
12599 #ifndef RIPPER
12600  if (p->debug) {
12601  rb_parser_printf(p, "vtable_free:%d: %s(%p)\n", line, name, (void *)tbl);
12602  }
12603 #endif
12604  if (!DVARS_TERMINAL_P(tbl)) {
12605  if (tbl->tbl) {
12606  ruby_sized_xfree(tbl->tbl, tbl->capa * sizeof(ID));
12607  }
12608  ruby_sized_xfree(tbl, sizeof(tbl));
12609  }
12610 }
12611 #define vtable_free(tbl) vtable_free_gen(p, __LINE__, #tbl, tbl)
12612 
12613 static void
12614 vtable_add_gen(struct parser_params *p, int line, const char *name,
12615  struct vtable *tbl, ID id)
12616 {
12617 #ifndef RIPPER
12618  if (p->debug) {
12619  rb_parser_printf(p, "vtable_add:%d: %s(%p), %s\n",
12620  line, name, (void *)tbl, rb_id2name(id));
12621  }
12622 #endif
12623  if (DVARS_TERMINAL_P(tbl)) {
12624  rb_parser_fatal(p, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
12625  return;
12626  }
12627  if (tbl->pos == tbl->capa) {
12628  tbl->capa = tbl->capa * 2;
12629  SIZED_REALLOC_N(tbl->tbl, ID, tbl->capa, tbl->pos);
12630  }
12631  tbl->tbl[tbl->pos++] = id;
12632 }
12633 #define vtable_add(tbl, id) vtable_add_gen(p, __LINE__, #tbl, tbl, id)
12634 
12635 #ifndef RIPPER
12636 static void
12637 vtable_pop_gen(struct parser_params *p, int line, const char *name,
12638  struct vtable *tbl, int n)
12639 {
12640  if (p->debug) {
12641  rb_parser_printf(p, "vtable_pop:%d: %s(%p), %d\n",
12642  line, name, (void *)tbl, n);
12643  }
12644  if (tbl->pos < n) {
12645  rb_parser_fatal(p, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
12646  return;
12647  }
12648  tbl->pos -= n;
12649 }
12650 #define vtable_pop(tbl, n) vtable_pop_gen(p, __LINE__, #tbl, tbl, n)
12651 #endif
12652 
12653 static int
12654 vtable_included(const struct vtable * tbl, ID id)
12655 {
12656  int i;
12657 
12658  if (!DVARS_TERMINAL_P(tbl)) {
12659  for (i = 0; i < tbl->pos; i++) {
12660  if (tbl->tbl[i] == id) {
12661  return i+1;
12662  }
12663  }
12664  }
12665  return 0;
12666 }
12667 
12668 static void parser_prepare(struct parser_params *p);
12669 
12670 #ifndef RIPPER
12671 static NODE *parser_append_options(struct parser_params *p, NODE *node);
12672 
12673 static VALUE
12674 debug_lines(VALUE fname)
12675 {
12676  ID script_lines;
12677  CONST_ID(script_lines, "SCRIPT_LINES__");
12678  if (rb_const_defined_at(rb_cObject, script_lines)) {
12679  VALUE hash = rb_const_get_at(rb_cObject, script_lines);
12680  if (RB_TYPE_P(hash, T_HASH)) {
12681  VALUE lines = rb_ary_new();
12682  rb_hash_aset(hash, fname, lines);
12683  return lines;
12684  }
12685  }
12686  return 0;
12687 }
12688 
12689 static int
12690 e_option_supplied(struct parser_params *p)
12691 {
12692  return strcmp(p->ruby_sourcefile, "-e") == 0;
12693 }
12694 
12695 static VALUE
12696 yycompile0(VALUE arg)
12697 {
12698  int n;
12699  NODE *tree;
12700  struct parser_params *p = (struct parser_params *)arg;
12701  VALUE cov = Qfalse;
12702 
12705  if (p->debug_lines && p->ruby_sourceline > 0) {
12706  VALUE str = STR_NEW0();
12707  n = p->ruby_sourceline;
12708  do {
12710  } while (--n);
12711  }
12712 
12713  if (!e_option_supplied(p)) {
12714  cov = Qtrue;
12715  }
12716  }
12717 
12718  parser_prepare(p);
12719 #define RUBY_DTRACE_PARSE_HOOK(name) \
12720  if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
12721  RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
12722  }
12723  RUBY_DTRACE_PARSE_HOOK(BEGIN);
12724  n = yyparse(p);
12726  p->debug_lines = 0;
12727 
12728  p->lex.strterm = 0;
12729  p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
12730  p->lex.prevline = p->lex.lastline = p->lex.nextline = 0;
12731  if (n || p->error_p) {
12732  VALUE mesg = p->error_buffer;
12733  if (!mesg) {
12734  mesg = rb_class_new_instance(0, 0, rb_eSyntaxError);
12735  }
12736  rb_set_errinfo(mesg);
12737  return FALSE;
12738  }
12739  tree = p->eval_tree;
12740  if (!tree) {
12741  tree = NEW_NIL(&NULL_LOC);
12742  }
12743  else {
12744  VALUE opt = p->compile_option;
12745  NODE *prelude;
12746  NODE *body = parser_append_options(p, tree->nd_body);
12747  if (!opt) opt = rb_obj_hide(rb_ident_hash_new());
12748  rb_hash_aset(opt, rb_sym_intern_ascii_cstr("coverage_enabled"), cov);
12749  prelude = block_append(p, p->eval_tree_begin, body);
12750  tree->nd_body = prelude;
12751  RB_OBJ_WRITE(p->ast, &p->ast->body.compile_option, opt);
12752  }
12753  p->ast->body.root = tree;
12754  p->ast->body.line_count = p->line_count;
12755  return TRUE;
12756 }
12757 
12758 static rb_ast_t *
12759 yycompile(VALUE vparser, struct parser_params *p, VALUE fname, int line)
12760 {
12761  rb_ast_t *ast;
12762  if (NIL_P(fname)) {
12764  p->ruby_sourcefile = "(none)";
12765  }
12766  else {
12767  p->ruby_sourcefile_string = rb_fstring(fname);
12768  p->ruby_sourcefile = StringValueCStr(fname);
12769  }
12770  p->ruby_sourceline = line - 1;
12771 
12772  p->ast = ast = rb_ast_new();
12773  rb_suppress_tracing(yycompile0, (VALUE)p);
12774  p->ast = 0;
12775  RB_GC_GUARD(vparser); /* prohibit tail call optimization */
12776 
12777  return ast;
12778 }
12779 #endif /* !RIPPER */
12780 
12781 static rb_encoding *
12782 must_be_ascii_compatible(VALUE s)
12783 {
12784  rb_encoding *enc = rb_enc_get(s);
12785  if (!rb_enc_asciicompat(enc)) {
12786  rb_raise(rb_eArgError, "invalid source encoding");
12787  }
12788  return enc;
12789 }
12790 
12791 static VALUE
12792 lex_get_str(struct parser_params *p, VALUE s)
12793 {
12794  char *beg, *end, *start;
12795  long len;
12796 
12797  beg = RSTRING_PTR(s);
12798  len = RSTRING_LEN(s);
12799  start = beg;
12800  if (p->lex.gets_.ptr) {
12801  if (len == p->lex.gets_.ptr) return Qnil;
12802  beg += p->lex.gets_.ptr;
12803  len -= p->lex.gets_.ptr;
12804  }
12805  end = memchr(beg, '\n', len);
12806  if (end) len = ++end - beg;
12807  p->lex.gets_.ptr += len;
12808  return rb_str_subseq(s, beg - start, len);
12809 }
12810 
12811 static VALUE
12812 lex_getline(struct parser_params *p)
12813 {
12814  VALUE line = (*p->lex.gets)(p, p->lex.input);
12815  if (NIL_P(line)) return line;
12816  must_be_ascii_compatible(line);
12817 #ifndef RIPPER
12818  if (p->debug_lines) {
12819  rb_enc_associate(line, p->enc);
12820  rb_ary_push(p->debug_lines, line);
12821  }
12822 #endif
12823  p->line_count++;
12824  return line;
12825 }
12826 
12827 static const rb_data_type_t parser_data_type;
12828 
12829 #ifndef RIPPER
12830 static rb_ast_t*
12831 parser_compile_string(VALUE vparser, VALUE fname, VALUE s, int line)
12832 {
12833  struct parser_params *p;
12834 
12835  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
12836 
12837  p->lex.gets = lex_get_str;
12838  p->lex.gets_.ptr = 0;
12839  p->lex.input = rb_str_new_frozen(s);
12840  p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
12841 
12842  return yycompile(vparser, p, fname, line);
12843 }
12844 
12845 rb_ast_t*
12846 rb_parser_compile_string(VALUE vparser, const char *f, VALUE s, int line)
12847 {
12848  return rb_parser_compile_string_path(vparser, rb_filesystem_str_new_cstr(f), s, line);
12849 }
12850 
12851 rb_ast_t*
12853 {
12854  must_be_ascii_compatible(s);
12855  return parser_compile_string(vparser, f, s, line);
12856 }
12857 
12859 
12860 static VALUE
12861 lex_io_gets(struct parser_params *p, VALUE io)
12862 {
12863  return rb_io_gets_internal(io);
12864 }
12865 
12866 rb_ast_t*
12867 rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE file, int start)
12868 {
12869  struct parser_params *p;
12870 
12871  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
12872 
12873  p->lex.gets = lex_io_gets;
12874  p->lex.input = file;
12875  p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
12876 
12877  return yycompile(vparser, p, fname, start);
12878 }
12879 
12880 static VALUE
12881 lex_generic_gets(struct parser_params *p, VALUE input)
12882 {
12883  return (*p->lex.gets_.call)(input, p->line_count);
12884 }
12885 
12886 rb_ast_t*
12887 rb_parser_compile_generic(VALUE vparser, VALUE (*lex_gets)(VALUE, int), VALUE fname, VALUE input, int start)
12888 {
12889  struct parser_params *p;
12890 
12891  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
12892 
12893  p->lex.gets = lex_generic_gets;
12894  p->lex.gets_.call = lex_gets;
12895  p->lex.input = input;
12896  p->lex.pbeg = p->lex.pcur = p->lex.pend = 0;
12897 
12898  return yycompile(vparser, p, fname, start);
12899 }
12900 #endif /* !RIPPER */
12901 
12902 #define STR_FUNC_ESCAPE 0x01
12903 #define STR_FUNC_EXPAND 0x02
12904 #define STR_FUNC_REGEXP 0x04
12905 #define STR_FUNC_QWORDS 0x08
12906 #define STR_FUNC_SYMBOL 0x10
12907 #define STR_FUNC_INDENT 0x20
12908 #define STR_FUNC_LABEL 0x40
12909 #define STR_FUNC_LIST 0x4000
12910 #define STR_FUNC_TERM 0x8000
12911 
12914  str_squote = (0),
12922 };
12923 
12924 static VALUE
12925 parser_str_new(const char *ptr, long len, rb_encoding *enc, int func, rb_encoding *enc0)
12926 {
12927  VALUE str;
12928 
12929  str = rb_enc_str_new(ptr, len, enc);
12930  if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
12932  }
12933  else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) {
12935  }
12936  }
12937 
12938  return str;
12939 }
12940 
12941 #define lex_goto_eol(p) ((p)->lex.pcur = (p)->lex.pend)
12942 #define lex_eol_p(p) ((p)->lex.pcur >= (p)->lex.pend)
12943 #define lex_eol_n_p(p,n) ((p)->lex.pcur+(n) >= (p)->lex.pend)
12944 #define peek(p,c) peek_n(p, (c), 0)
12945 #define peek_n(p,c,n) (!lex_eol_n_p(p, n) && (c) == (unsigned char)(p)->lex.pcur[n])
12946 #define peekc(p) peekc_n(p, 0)
12947 #define peekc_n(p,n) (lex_eol_n_p(p, n) ? -1 : (unsigned char)(p)->lex.pcur[n])
12948 
12949 #ifdef RIPPER
12950 static void
12951 add_delayed_token(struct parser_params *p, const char *tok, const char *end)
12952 {
12953  if (tok < end) {
12954  if (!has_delayed_token(p)) {
12955  p->delayed.token = rb_str_buf_new(end - tok);
12956  rb_enc_associate(p->delayed.token, p->enc);
12957  p->delayed.line = p->ruby_sourceline;
12958  p->delayed.col = rb_long2int(tok - p->lex.pbeg);
12959  }
12960  rb_str_buf_cat(p->delayed.token, tok, end - tok);
12961  p->lex.ptok = end;
12962  }
12963 }
12964 #else
12965 #define add_delayed_token(p, tok, end) ((void)(tok), (void)(end))
12966 #endif
12967 
12968 static int
12969 nextline(struct parser_params *p)
12970 {
12971  VALUE v = p->lex.nextline;
12972  p->lex.nextline = 0;
12973  if (!v) {
12974  if (p->eofp)
12975  return -1;
12976 
12977  if (p->lex.pend > p->lex.pbeg && *(p->lex.pend-1) != '\n') {
12978  goto end_of_input;
12979  }
12980 
12981  if (!p->lex.input || NIL_P(v = lex_getline(p))) {
12982  end_of_input:
12983  p->eofp = 1;
12984  lex_goto_eol(p);
12985  return -1;
12986  }
12987  p->cr_seen = FALSE;
12988  }
12989  else if (NIL_P(v)) {
12990  /* after here-document without terminator */
12991  goto end_of_input;
12992  }
12993  add_delayed_token(p, p->lex.ptok, p->lex.pend);
12994  if (p->heredoc_end > 0) {
12995  p->ruby_sourceline = p->heredoc_end;
12996  p->heredoc_end = 0;
12997  }
12998  p->ruby_sourceline++;
12999  p->lex.pbeg = p->lex.pcur = RSTRING_PTR(v);
13000  p->lex.pend = p->lex.pcur + RSTRING_LEN(v);
13001  token_flush(p);
13002  p->lex.prevline = p->lex.lastline;
13003  p->lex.lastline = v;
13004  return 0;
13005 }
13006 
13007 static int
13008 parser_cr(struct parser_params *p, int c)
13009 {
13010  if (peek(p, '\n')) {
13011  p->lex.pcur++;
13012  c = '\n';
13013  }
13014  else if (!p->cr_seen) {
13015  p->cr_seen = TRUE;
13016  /* carried over with p->lex.nextline for nextc() */
13017  rb_warn0("encountered \\r in middle of line, treated as a mere space");
13018  }
13019  return c;
13020 }
13021 
13022 static inline int
13023 nextc(struct parser_params *p)
13024 {
13025  int c;
13026 
13027  if (UNLIKELY((p->lex.pcur == p->lex.pend) || p->eofp || RTEST(p->lex.nextline))) {
13028  if (nextline(p)) return -1;
13029  }
13030  c = (unsigned char)*p->lex.pcur++;
13031  if (UNLIKELY(c == '\r')) {
13032  c = parser_cr(p, c);
13033  }
13034 
13035  return c;
13036 }
13037 
13038 static void
13039 pushback(struct parser_params *p, int c)
13040 {
13041  if (c == -1) return;
13042  p->lex.pcur--;
13043  if (p->lex.pcur > p->lex.pbeg && p->lex.pcur[0] == '\n' && p->lex.pcur[-1] == '\r') {
13044  p->lex.pcur--;
13045  }
13046 }
13047 
13048 #define was_bol(p) ((p)->lex.pcur == (p)->lex.pbeg + 1)
13049 
13050 #define tokfix(p) ((p)->tokenbuf[(p)->tokidx]='\0')
13051 #define tok(p) (p)->tokenbuf
13052 #define toklen(p) (p)->tokidx
13053 
13054 static int
13055 looking_at_eol_p(struct parser_params *p)
13056 {
13057  const char *ptr = p->lex.pcur;
13058  while (ptr < p->lex.pend) {
13059  int c = (unsigned char)*ptr++;
13060  int eol = (c == '\n' || c == '#');
13061  if (eol || !ISSPACE(c)) {
13062  return eol;
13063  }
13064  }
13065  return TRUE;
13066 }
13067 
13068 static char*
13069 newtok(struct parser_params *p)
13070 {
13071  p->tokidx = 0;
13072  p->tokline = p->ruby_sourceline;
13073  if (!p->tokenbuf) {
13074  p->toksiz = 60;
13075  p->tokenbuf = ALLOC_N(char, 60);
13076  }
13077  if (p->toksiz > 4096) {
13078  p->toksiz = 60;
13079  REALLOC_N(p->tokenbuf, char, 60);
13080  }
13081  return p->tokenbuf;
13082 }
13083 
13084 static char *
13085 tokspace(struct parser_params *p, int n)
13086 {
13087  p->tokidx += n;
13088 
13089  if (p->tokidx >= p->toksiz) {
13090  do {p->toksiz *= 2;} while (p->toksiz < p->tokidx);
13091  REALLOC_N(p->tokenbuf, char, p->toksiz);
13092  }
13093  return &p->tokenbuf[p->tokidx-n];
13094 }
13095 
13096 static void
13097 tokadd(struct parser_params *p, int c)
13098 {
13099  p->tokenbuf[p->tokidx++] = (char)c;
13100  if (p->tokidx >= p->toksiz) {
13101  p->toksiz *= 2;
13102  REALLOC_N(p->tokenbuf, char, p->toksiz);
13103  }
13104 }
13105 
13106 static int
13107 tok_hex(struct parser_params *p, size_t *numlen)
13108 {
13109  int c;
13110 
13111  c = scan_hex(p->lex.pcur, 2, numlen);
13112  if (!*numlen) {
13113  yyerror0("invalid hex escape");
13114  token_flush(p);
13115  return 0;
13116  }
13117  p->lex.pcur += *numlen;
13118  return c;
13119 }
13120 
13121 #define tokcopy(p, n) memcpy(tokspace(p, n), (p)->lex.pcur - (n), (n))
13122 
13123 static int
13124 escaped_control_code(int c)
13125 {
13126  int c2 = 0;
13127  switch (c) {
13128  case ' ':
13129  c2 = 's';
13130  break;
13131  case '\n':
13132  c2 = 'n';
13133  break;
13134  case '\t':
13135  c2 = 't';
13136  break;
13137  case '\v':
13138  c2 = 'v';
13139  break;
13140  case '\r':
13141  c2 = 'r';
13142  break;
13143  case '\f':
13144  c2 = 'f';
13145  break;
13146  }
13147  return c2;
13148 }
13149 
13150 #define WARN_SPACE_CHAR(c, prefix) \
13151  rb_warn1("invalid character syntax; use "prefix"\\%c", WARN_I(c2))
13152 
13153 static int
13154 tokadd_codepoint(struct parser_params *p, rb_encoding **encp,
13155  int regexp_literal, int wide)
13156 {
13157  size_t numlen;
13158  int codepoint = scan_hex(p->lex.pcur, wide ? p->lex.pend - p->lex.pcur : 4, &numlen);
13159  literal_flush(p, p->lex.pcur);
13160  p->lex.pcur += numlen;
13161  if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
13162  yyerror0("invalid Unicode escape");
13163  return wide && numlen > 0;
13164  }
13165  if (codepoint > 0x10ffff) {
13166  yyerror0("invalid Unicode codepoint (too large)");
13167  return wide;
13168  }
13169  if ((codepoint & 0xfffff800) == 0xd800) {
13170  yyerror0("invalid Unicode codepoint");
13171  return wide;
13172  }
13173  if (regexp_literal) {
13174  tokcopy(p, (int)numlen);
13175  }
13176  else if (codepoint >= 0x80) {
13177  rb_encoding *utf8 = rb_utf8_encoding();
13178  if (*encp && utf8 != *encp) {
13179  YYLTYPE loc = RUBY_INIT_YYLLOC();
13180  compile_error(p, "UTF-8 mixed within %s source", rb_enc_name(*encp));
13181  parser_show_error_line(p, &loc);
13182  return wide;
13183  }
13184  *encp = utf8;
13185  tokaddmbc(p, codepoint, *encp);
13186  }
13187  else {
13188  tokadd(p, codepoint);
13189  }
13190  return TRUE;
13191 }
13192 
13193 /* return value is for ?\u3042 */
13194 static void
13195 tokadd_utf8(struct parser_params *p, rb_encoding **encp,
13196  int term, int symbol_literal, int regexp_literal)
13197 {
13198  /*
13199  * If `term` is not -1, then we allow multiple codepoints in \u{}
13200  * upto `term` byte, otherwise we're parsing a character literal.
13201  * And then add the codepoints to the current token.
13202  */
13203  static const char multiple_codepoints[] = "Multiple codepoints at single character literal";
13204 
13205  const int open_brace = '{', close_brace = '}';
13206 
13207  if (regexp_literal) { tokadd(p, '\\'); tokadd(p, 'u'); }
13208 
13209  if (peek(p, open_brace)) { /* handle \u{...} form */
13210  const char *second = NULL;
13211  int c, last = nextc(p);
13212  if (p->lex.pcur >= p->lex.pend) goto unterminated;
13213  while (ISSPACE(c = *p->lex.pcur) && ++p->lex.pcur < p->lex.pend);
13214  while (c != close_brace) {
13215  if (c == term) goto unterminated;
13216  if (second == multiple_codepoints)
13217  second = p->lex.pcur;
13218  if (regexp_literal) tokadd(p, last);
13219  if (!tokadd_codepoint(p, encp, regexp_literal, TRUE)) {
13220  break;
13221  }
13222  while (ISSPACE(c = *p->lex.pcur)) {
13223  if (++p->lex.pcur >= p->lex.pend) goto unterminated;
13224  last = c;
13225  }
13226  if (term == -1 && !second)
13227  second = multiple_codepoints;
13228  }
13229 
13230  if (c != close_brace) {
13231  unterminated:
13232  token_flush(p);
13233  yyerror0("unterminated Unicode escape");
13234  return;
13235  }
13236  if (second && second != multiple_codepoints) {
13237  const char *pcur = p->lex.pcur;
13238  p->lex.pcur = second;
13240  token_flush(p);
13241  p->lex.pcur = pcur;
13242  yyerror0(multiple_codepoints);
13243  token_flush(p);
13244  }
13245 
13246  if (regexp_literal) tokadd(p, close_brace);
13247  nextc(p);
13248  }
13249  else { /* handle \uxxxx form */
13250  if (!tokadd_codepoint(p, encp, regexp_literal, FALSE)) {
13251  token_flush(p);
13252  return;
13253  }
13254  }
13255 }
13256 
13257 #define ESCAPE_CONTROL 1
13258 #define ESCAPE_META 2
13259 
13260 static int
13261 read_escape(struct parser_params *p, int flags, rb_encoding **encp)
13262 {
13263  int c;
13264  size_t numlen;
13265 
13266  switch (c = nextc(p)) {
13267  case '\\': /* Backslash */
13268  return c;
13269 
13270  case 'n': /* newline */
13271  return '\n';
13272 
13273  case 't': /* horizontal tab */
13274  return '\t';
13275 
13276  case 'r': /* carriage-return */
13277  return '\r';
13278 
13279  case 'f': /* form-feed */
13280  return '\f';
13281 
13282  case 'v': /* vertical tab */
13283  return '\13';
13284 
13285  case 'a': /* alarm(bell) */
13286  return '\007';
13287 
13288  case 'e': /* escape */
13289  return 033;
13290 
13291  case '0': case '1': case '2': case '3': /* octal constant */
13292  case '4': case '5': case '6': case '7':
13293  pushback(p, c);
13294  c = scan_oct(p->lex.pcur, 3, &numlen);
13295  p->lex.pcur += numlen;
13296  return c;
13297 
13298  case 'x': /* hex constant */
13299  c = tok_hex(p, &numlen);
13300  if (numlen == 0) return 0;
13301  return c;
13302 
13303  case 'b': /* backspace */
13304  return '\010';
13305 
13306  case 's': /* space */
13307  return ' ';
13308 
13309  case 'M':
13310  if (flags & ESCAPE_META) goto eof;
13311  if ((c = nextc(p)) != '-') {
13312  goto eof;
13313  }
13314  if ((c = nextc(p)) == '\\') {
13315  if (peek(p, 'u')) goto eof;
13316  return read_escape(p, flags|ESCAPE_META, encp) | 0x80;
13317  }
13318  else if (c == -1 || !ISASCII(c)) goto eof;
13319  else {
13320  int c2 = escaped_control_code(c);
13321  if (c2) {
13322  if (ISCNTRL(c) || !(flags & ESCAPE_CONTROL)) {
13323  WARN_SPACE_CHAR(c2, "\\M-");
13324  }
13325  else {
13326  WARN_SPACE_CHAR(c2, "\\C-\\M-");
13327  }
13328  }
13329  else if (ISCNTRL(c)) goto eof;
13330  return ((c & 0xff) | 0x80);
13331  }
13332 
13333  case 'C':
13334  if ((c = nextc(p)) != '-') {
13335  goto eof;
13336  }
13337  case 'c':
13338  if (flags & ESCAPE_CONTROL) goto eof;
13339  if ((c = nextc(p))== '\\') {
13340  if (peek(p, 'u')) goto eof;
13341  c = read_escape(p, flags|ESCAPE_CONTROL, encp);
13342  }
13343  else if (c == '?')
13344  return 0177;
13345  else if (c == -1 || !ISASCII(c)) goto eof;
13346  else {
13347  int c2 = escaped_control_code(c);
13348  if (c2) {
13349  if (ISCNTRL(c)) {
13350  if (flags & ESCAPE_META) {
13351  WARN_SPACE_CHAR(c2, "\\M-");
13352  }
13353  else {
13354  WARN_SPACE_CHAR(c2, "");
13355  }
13356  }
13357  else {
13358  if (flags & ESCAPE_META) {
13359  WARN_SPACE_CHAR(c2, "\\M-\\C-");
13360  }
13361  else {
13362  WARN_SPACE_CHAR(c2, "\\C-");
13363  }
13364  }
13365  }
13366  else if (ISCNTRL(c)) goto eof;
13367  }
13368  return c & 0x9f;
13369 
13370  eof:
13371  case -1:
13372  yyerror0("Invalid escape character syntax");
13373  token_flush(p);
13374  return '\0';
13375 
13376  default:
13377  return c;
13378  }
13379 }
13380 
13381 static void
13382 tokaddmbc(struct parser_params *p, int c, rb_encoding *enc)
13383 {
13384  int len = rb_enc_codelen(c, enc);
13385  rb_enc_mbcput(c, tokspace(p, len), enc);
13386 }
13387 
13388 static int
13389 tokadd_escape(struct parser_params *p, rb_encoding **encp)
13390 {
13391  int c;
13392  int flags = 0;
13393  size_t numlen;
13394 
13395  first:
13396  switch (c = nextc(p)) {
13397  case '\n':
13398  return 0; /* just ignore */
13399 
13400  case '0': case '1': case '2': case '3': /* octal constant */
13401  case '4': case '5': case '6': case '7':
13402  {
13403  ruby_scan_oct(--p->lex.pcur, 3, &numlen);
13404  if (numlen == 0) goto eof;
13405  p->lex.pcur += numlen;
13406  tokcopy(p, (int)numlen + 1);
13407  }
13408  return 0;
13409 
13410  case 'x': /* hex constant */
13411  {
13412  tok_hex(p, &numlen);
13413  if (numlen == 0) return -1;
13414  tokcopy(p, (int)numlen + 2);
13415  }
13416  return 0;
13417 
13418  case 'M':
13419  if (flags & ESCAPE_META) goto eof;
13420  if ((c = nextc(p)) != '-') {
13421  pushback(p, c);
13422  goto eof;
13423  }
13424  tokcopy(p, 3);
13425  flags |= ESCAPE_META;
13426  goto escaped;
13427 
13428  case 'C':
13429  if (flags & ESCAPE_CONTROL) goto eof;
13430  if ((c = nextc(p)) != '-') {
13431  pushback(p, c);
13432  goto eof;
13433  }
13434  tokcopy(p, 3);
13435  goto escaped;
13436 
13437  case 'c':
13438  if (flags & ESCAPE_CONTROL) goto eof;
13439  tokcopy(p, 2);
13440  flags |= ESCAPE_CONTROL;
13441  escaped:
13442  if ((c = nextc(p)) == '\\') {
13443  goto first;
13444  }
13445  else if (c == -1) goto eof;
13446  tokadd(p, c);
13447  return 0;
13448 
13449  eof:
13450  case -1:
13451  yyerror0("Invalid escape character syntax");
13452  token_flush(p);
13453  return -1;
13454 
13455  default:
13456  tokadd(p, '\\');
13457  tokadd(p, c);
13458  }
13459  return 0;
13460 }
13461 
13462 static int
13463 regx_options(struct parser_params *p)
13464 {
13465  int kcode = 0;
13466  int kopt = 0;
13467  int options = 0;
13468  int c, opt, kc;
13469 
13470  newtok(p);
13471  while (c = nextc(p), ISALPHA(c)) {
13472  if (c == 'o') {
13473  options |= RE_OPTION_ONCE;
13474  }
13475  else if (rb_char_to_option_kcode(c, &opt, &kc)) {
13476  if (kc >= 0) {
13477  if (kc != rb_ascii8bit_encindex()) kcode = c;
13478  kopt = opt;
13479  }
13480  else {
13481  options |= opt;
13482  }
13483  }
13484  else {
13485  tokadd(p, c);
13486  }
13487  }
13488  options |= kopt;
13489  pushback(p, c);
13490  if (toklen(p)) {
13491  YYLTYPE loc = RUBY_INIT_YYLLOC();
13492  tokfix(p);
13493  compile_error(p, "unknown regexp option%s - %*s",
13494  toklen(p) > 1 ? "s" : "", toklen(p), tok(p));
13495  parser_show_error_line(p, &loc);
13496  }
13497  return options | RE_OPTION_ENCODING(kcode);
13498 }
13499 
13500 static int
13501 tokadd_mbchar(struct parser_params *p, int c)
13502 {
13503  int len = parser_precise_mbclen(p, p->lex.pcur-1);
13504  if (len < 0) return -1;
13505  tokadd(p, c);
13506  p->lex.pcur += --len;
13507  if (len > 0) tokcopy(p, len);
13508  return c;
13509 }
13510 
13511 static inline int
13512 simple_re_meta(int c)
13513 {
13514  switch (c) {
13515  case '$': case '*': case '+': case '.':
13516  case '?': case '^': case '|':
13517  case ')': case ']': case '}': case '>':
13518  return TRUE;
13519  default:
13520  return FALSE;
13521  }
13522 }
13523 
13524 static int
13525 parser_update_heredoc_indent(struct parser_params *p, int c)
13526 {
13527  if (p->heredoc_line_indent == -1) {
13528  if (c == '\n') p->heredoc_line_indent = 0;
13529  }
13530  else {
13531  if (c == ' ') {
13532  p->heredoc_line_indent++;
13533  return TRUE;
13534  }
13535  else if (c == '\t') {
13536  int w = (p->heredoc_line_indent / TAB_WIDTH) + 1;
13537  p->heredoc_line_indent = w * TAB_WIDTH;
13538  return TRUE;
13539  }
13540  else if (c != '\n') {
13541  if (p->heredoc_indent > p->heredoc_line_indent) {
13543  }
13544  p->heredoc_line_indent = -1;
13545  }
13546  }
13547  return FALSE;
13548 }
13549 
13550 static void
13551 parser_mixed_error(struct parser_params *p, rb_encoding *enc1, rb_encoding *enc2)
13552 {
13553  YYLTYPE loc = RUBY_INIT_YYLLOC();
13554  const char *n1 = rb_enc_name(enc1), *n2 = rb_enc_name(enc2);
13555  compile_error(p, "%s mixed within %s source", n1, n2);
13556  parser_show_error_line(p, &loc);
13557 }
13558 
13559 static void
13560 parser_mixed_escape(struct parser_params *p, const char *beg, rb_encoding *enc1, rb_encoding *enc2)
13561 {
13562  const char *pos = p->lex.pcur;
13563  p->lex.pcur = beg;
13564  parser_mixed_error(p, enc1, enc2);
13565  p->lex.pcur = pos;
13566 }
13567 
13568 static int
13569 tokadd_string(struct parser_params *p,
13570  int func, int term, int paren, long *nest,
13571  rb_encoding **encp, rb_encoding **enc)
13572 {
13573  int c;
13574  bool erred = false;
13575 
13576 #define mixed_error(enc1, enc2) \
13577  (void)(erred || (parser_mixed_error(p, enc1, enc2), erred = true))
13578 #define mixed_escape(beg, enc1, enc2) \
13579  (void)(erred || (parser_mixed_escape(p, beg, enc1, enc2), erred = true))
13580 
13581  while ((c = nextc(p)) != -1) {
13582  if (p->heredoc_indent > 0) {
13583  parser_update_heredoc_indent(p, c);
13584  }
13585 
13586  if (paren && c == paren) {
13587  ++*nest;
13588  }
13589  else if (c == term) {
13590  if (!nest || !*nest) {
13591  pushback(p, c);
13592  break;
13593  }
13594  --*nest;
13595  }
13596  else if ((func & STR_FUNC_EXPAND) && c == '#' && p->lex.pcur < p->lex.pend) {
13597  int c2 = *p->lex.pcur;
13598  if (c2 == '$' || c2 == '@' || c2 == '{') {
13599  pushback(p, c);
13600  break;
13601  }
13602  }
13603  else if (c == '\\') {
13604  literal_flush(p, p->lex.pcur - 1);
13605  c = nextc(p);
13606  switch (c) {
13607  case '\n':
13608  if (func & STR_FUNC_QWORDS) break;
13609  if (func & STR_FUNC_EXPAND) {
13610  if (!(func & STR_FUNC_INDENT) || (p->heredoc_indent < 0))
13611  continue;
13612  if (c == term) {
13613  c = '\\';
13614  goto terminate;
13615  }
13616  }
13617  tokadd(p, '\\');
13618  break;
13619 
13620  case '\\':
13621  if (func & STR_FUNC_ESCAPE) tokadd(p, c);
13622  break;
13623 
13624  case 'u':
13625  if ((func & STR_FUNC_EXPAND) == 0) {
13626  tokadd(p, '\\');
13627  break;
13628  }
13629  tokadd_utf8(p, enc, term,
13630  func & STR_FUNC_SYMBOL,
13631  func & STR_FUNC_REGEXP);
13632  continue;
13633 
13634  default:
13635  if (c == -1) return -1;
13636  if (!ISASCII(c)) {
13637  if ((func & STR_FUNC_EXPAND) == 0) tokadd(p, '\\');
13638  goto non_ascii;
13639  }
13640  if (func & STR_FUNC_REGEXP) {
13641  if (c == term && !simple_re_meta(c)) {
13642  tokadd(p, c);
13643  continue;
13644  }
13645  pushback(p, c);
13646  if ((c = tokadd_escape(p, enc)) < 0)
13647  return -1;
13648  if (*enc && *enc != *encp) {
13649  mixed_escape(p->lex.ptok+2, *enc, *encp);
13650  }
13651  continue;
13652  }
13653  else if (func & STR_FUNC_EXPAND) {
13654  pushback(p, c);
13655  if (func & STR_FUNC_ESCAPE) tokadd(p, '\\');
13656  c = read_escape(p, 0, enc);
13657  }
13658  else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
13659  /* ignore backslashed spaces in %w */
13660  }
13661  else if (c != term && !(paren && c == paren)) {
13662  tokadd(p, '\\');
13663  pushback(p, c);
13664  continue;
13665  }
13666  }
13667  }
13668  else if (!parser_isascii(p)) {
13669  non_ascii:
13670  if (!*enc) {
13671  *enc = *encp;
13672  }
13673  else if (*enc != *encp) {
13674  mixed_error(*enc, *encp);
13675  continue;
13676  }
13677  if (tokadd_mbchar(p, c) == -1) return -1;
13678  continue;
13679  }
13680  else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
13681  pushback(p, c);
13682  break;
13683  }
13684  if (c & 0x80) {
13685  if (!*enc) {
13686  *enc = *encp;
13687  }
13688  else if (*enc != *encp) {
13689  mixed_error(*enc, *encp);
13690  continue;
13691  }
13692  }
13693  tokadd(p, c);
13694  }
13695  terminate:
13696  if (*enc) *encp = *enc;
13697  return c;
13698 }
13699 
13700 static inline rb_strterm_t *
13701 new_strterm(VALUE v1, VALUE v2, VALUE v3, VALUE v0)
13702 {
13703  return (rb_strterm_t*)rb_imemo_new(imemo_parser_strterm, v1, v2, v3, v0);
13704 }
13705 
13706 /* imemo_parser_strterm for literal */
13707 #define NEW_STRTERM(func, term, paren) \
13708  new_strterm((VALUE)(func), (VALUE)(paren), (VALUE)(term), 0)
13709 
13710 #ifdef RIPPER
13711 static void
13713 {
13714  VALUE content = yylval.val;
13715  if (!ripper_is_node_yylval(content))
13716  content = ripper_new_yylval(p, 0, 0, content);
13717  if (has_delayed_token(p)) {
13718  ptrdiff_t len = p->lex.pcur - p->lex.ptok;
13719  if (len > 0) {
13720  rb_enc_str_buf_cat(p->delayed.token, p->lex.ptok, len, enc);
13721  }
13723  p->lex.ptok = p->lex.pcur;
13724  RNODE(content)->nd_rval = yylval.val;
13725  }
13727  if (yylval.val != content)
13728  RNODE(content)->nd_rval = yylval.val;
13729  yylval.val = content;
13730 }
13731 #else
13732 #define flush_string_content(p, enc) ((void)(enc))
13733 #endif
13734 
13735 RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32];
13736 /* this can be shared with ripper, since it's independent from struct
13737  * parser_params. */
13738 #ifndef RIPPER
13739 #define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
13740 #define SPECIAL_PUNCT(idx) ( \
13741  BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
13742  BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
13743  BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
13744  BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
13745  BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
13746  BIT('0', idx))
13747 const unsigned int ruby_global_name_punct_bits[] = {
13748  SPECIAL_PUNCT(0),
13749  SPECIAL_PUNCT(1),
13750  SPECIAL_PUNCT(2),
13751 };
13752 #undef BIT
13753 #undef SPECIAL_PUNCT
13754 #endif
13755 
13756 static enum yytokentype
13757 parser_peek_variable_name(struct parser_params *p)
13758 {
13759  int c;
13760  const char *ptr = p->lex.pcur;
13761 
13762  if (ptr + 1 >= p->lex.pend) return 0;
13763  c = *ptr++;
13764  switch (c) {
13765  case '$':
13766  if ((c = *ptr) == '-') {
13767  if (++ptr >= p->lex.pend) return 0;
13768  c = *ptr;
13769  }
13770  else if (is_global_name_punct(c) || ISDIGIT(c)) {
13771  return tSTRING_DVAR;
13772  }
13773  break;
13774  case '@':
13775  if ((c = *ptr) == '@') {
13776  if (++ptr >= p->lex.pend) return 0;
13777  c = *ptr;
13778  }
13779  break;
13780  case '{':
13781  p->lex.pcur = ptr;
13782  p->command_start = TRUE;
13783  return tSTRING_DBEG;
13784  default:
13785  return 0;
13786  }
13787  if (!ISASCII(c) || c == '_' || ISALPHA(c))
13788  return tSTRING_DVAR;
13789  return 0;
13790 }
13791 
13792 #define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
13793 #define IS_END() IS_lex_state(EXPR_END_ANY)
13794 #define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
13795 #define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
13796 #define IS_LABEL_POSSIBLE() (\
13797  (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
13798  IS_ARG())
13799 #define IS_LABEL_SUFFIX(n) (peek_n(p, ':',(n)) && !peek_n(p, ':', (n)+1))
13800 #define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
13801 
13802 static inline enum yytokentype
13803 parser_string_term(struct parser_params *p, int func)
13804 {
13805  p->lex.strterm = 0;
13806  if (func & STR_FUNC_REGEXP) {
13807  set_yylval_num(regx_options(p));
13809  SET_LEX_STATE(EXPR_END);
13810  return tREGEXP_END;
13811  }
13812  if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
13813  nextc(p);
13814  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
13815  return tLABEL_END;
13816  }
13817  SET_LEX_STATE(EXPR_END);
13818  return tSTRING_END;
13819 }
13820 
13821 static enum yytokentype
13822 parse_string(struct parser_params *p, rb_strterm_literal_t *quote)
13823 {
13824  int func = (int)quote->u1.func;
13825  int term = (int)quote->u3.term;
13826  int paren = (int)quote->u2.paren;
13827  int c, space = 0;
13828  rb_encoding *enc = p->enc;
13829  rb_encoding *base_enc = 0;
13830  VALUE lit;
13831 
13832  if (func & STR_FUNC_TERM) {
13833  if (func & STR_FUNC_QWORDS) nextc(p); /* delayed term */
13834  SET_LEX_STATE(EXPR_END);
13835  p->lex.strterm = 0;
13836  return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
13837  }
13838  c = nextc(p);
13839  if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
13840  do {c = nextc(p);} while (ISSPACE(c));
13841  space = 1;
13842  }
13843  if (func & STR_FUNC_LIST) {
13844  quote->u1.func &= ~STR_FUNC_LIST;
13845  space = 1;
13846  }
13847  if (c == term && !quote->u0.nest) {
13848  if (func & STR_FUNC_QWORDS) {
13849  quote->u1.func |= STR_FUNC_TERM;
13850  pushback(p, c); /* dispatch the term at tSTRING_END */
13851  add_delayed_token(p, p->lex.ptok, p->lex.pcur);
13852  return ' ';
13853  }
13854  return parser_string_term(p, func);
13855  }
13856  if (space) {
13857  pushback(p, c);
13858  add_delayed_token(p, p->lex.ptok, p->lex.pcur);
13859  return ' ';
13860  }
13861  newtok(p);
13862  if ((func & STR_FUNC_EXPAND) && c == '#') {
13863  int t = parser_peek_variable_name(p);
13864  if (t) return t;
13865  tokadd(p, '#');
13866  c = nextc(p);
13867  }
13868  pushback(p, c);
13869  if (tokadd_string(p, func, term, paren, &quote->u0.nest,
13870  &enc, &base_enc) == -1) {
13871  if (p->eofp) {
13872 #ifndef RIPPER
13873 # define unterminated_literal(mesg) yyerror0(mesg)
13874 #else
13875 # define unterminated_literal(mesg) compile_error(p, mesg)
13876 #endif
13877  literal_flush(p, p->lex.pcur);
13878  if (func & STR_FUNC_QWORDS) {
13879  /* no content to add, bailing out here */
13880  unterminated_literal("unterminated list meets end of file");
13881  p->lex.strterm = 0;
13882  return tSTRING_END;
13883  }
13884  if (func & STR_FUNC_REGEXP) {
13885  unterminated_literal("unterminated regexp meets end of file");
13886  }
13887  else {
13888  unterminated_literal("unterminated string meets end of file");
13889  }
13890  quote->u1.func |= STR_FUNC_TERM;
13891  }
13892  }
13893 
13894  tokfix(p);
13895  lit = STR_NEW3(tok(p), toklen(p), enc, func);
13896  set_yylval_str(lit);
13898 
13899  return tSTRING_CONTENT;
13900 }
13901 
13902 static enum yytokentype
13903 heredoc_identifier(struct parser_params *p)
13904 {
13905  /*
13906  * term_len is length of `<<"END"` except `END`,
13907  * in this case term_len is 4 (<, <, " and ").
13908  */
13909  long len, offset = p->lex.pcur - p->lex.pbeg;
13910  int c = nextc(p), term, func = 0, quote = 0;
13911  enum yytokentype token = tSTRING_BEG;
13912  int indent = 0;
13913 
13914  if (c == '-') {
13915  c = nextc(p);
13916  func = STR_FUNC_INDENT;
13917  offset++;
13918  }
13919  else if (c == '~') {
13920  c = nextc(p);
13921  func = STR_FUNC_INDENT;
13922  offset++;
13923  indent = INT_MAX;
13924  }
13925  switch (c) {
13926  case '\'':
13927  func |= str_squote; goto quoted;
13928  case '"':
13929  func |= str_dquote; goto quoted;
13930  case '`':
13931  token = tXSTRING_BEG;
13932  func |= str_xquote; goto quoted;
13933 
13934  quoted:
13935  quote++;
13936  offset++;
13937  term = c;
13938  len = 0;
13939  while ((c = nextc(p)) != term) {
13940  if (c == -1 || c == '\r' || c == '\n') {
13941  yyerror(NULL, p, "unterminated here document identifier");
13942  return -1;
13943  }
13944  }
13945  break;
13946 
13947  default:
13948  if (!parser_is_identchar(p)) {
13949  pushback(p, c);
13950  if (func & STR_FUNC_INDENT) {
13951  pushback(p, indent > 0 ? '~' : '-');
13952  }
13953  return 0;
13954  }
13955  func |= str_dquote;
13956  do {
13957  int n = parser_precise_mbclen(p, p->lex.pcur-1);
13958  if (n < 0) return 0;
13959  p->lex.pcur += --n;
13960  } while ((c = nextc(p)) != -1 && parser_is_identchar(p));
13961  pushback(p, c);
13962  break;
13963  }
13964 
13965  len = p->lex.pcur - (p->lex.pbeg + offset) - quote;
13966  if ((unsigned long)len >= HERETERM_LENGTH_MAX)
13967  yyerror(NULL, p, "too long here document identifier");
13969  lex_goto_eol(p);
13970 
13971  p->lex.strterm = new_strterm(0, 0, 0, p->lex.lastline);
13973  rb_strterm_heredoc_t *here = &p->lex.strterm->u.heredoc;
13974  here->offset = offset;
13975  here->sourceline = p->ruby_sourceline;
13976  here->length = (int)len;
13977  here->quote = quote;
13978  here->func = func;
13979 
13980  token_flush(p);
13981  p->heredoc_indent = indent;
13982  p->heredoc_line_indent = 0;
13983  return token;
13984 }
13985 
13986 static void
13987 heredoc_restore(struct parser_params *p, rb_strterm_heredoc_t *here)
13988 {
13989  VALUE line;
13990 
13991  p->lex.strterm = 0;
13992  line = here->lastline;
13993  p->lex.lastline = line;
13994  p->lex.pbeg = RSTRING_PTR(line);
13995  p->lex.pend = p->lex.pbeg + RSTRING_LEN(line);
13996  p->lex.pcur = p->lex.pbeg + here->offset + here->length + here->quote;
13997  p->lex.ptok = p->lex.pbeg + here->offset - here->quote;
13998  p->heredoc_end = p->ruby_sourceline;
13999  p->ruby_sourceline = (int)here->sourceline;
14000  if (p->eofp) p->lex.nextline = Qnil;
14001  p->eofp = 0;
14002 }
14003 
14004 static int
14005 dedent_string(VALUE string, int width)
14006 {
14007  char *str;
14008  long len;
14009  int i, col = 0;
14010 
14011  RSTRING_GETMEM(string, str, len);
14012  for (i = 0; i < len && col < width; i++) {
14013  if (str[i] == ' ') {
14014  col++;
14015  }
14016  else if (str[i] == '\t') {
14017  int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
14018  if (n > width) break;
14019  col = n;
14020  }
14021  else {
14022  break;
14023  }
14024  }
14025  if (!i) return 0;
14026  rb_str_modify(string);
14027  str = RSTRING_PTR(string);
14028  if (RSTRING_LEN(string) != len)
14029  rb_fatal("literal string changed: %+"PRIsVALUE, string);
14030  MEMMOVE(str, str + i, char, len - i);
14031  rb_str_set_len(string, len - i);
14032  return i;
14033 }
14034 
14035 #ifndef RIPPER
14036 static NODE *
14037 heredoc_dedent(struct parser_params *p, NODE *root)
14038 {
14039  NODE *node, *str_node, *prev_node;
14040  int indent = p->heredoc_indent;
14041  VALUE prev_lit = 0;
14042 
14043  if (indent <= 0) return root;
14044  p->heredoc_indent = 0;
14045  if (!root) return root;
14046 
14047  prev_node = node = str_node = root;
14048  if (nd_type(root) == NODE_LIST) str_node = root->nd_head;
14049 
14050  while (str_node) {
14051  VALUE lit = str_node->nd_lit;
14052  if (str_node->flags & NODE_FL_NEWLINE) {
14053  dedent_string(lit, indent);
14054  }
14055  if (!prev_lit) {
14056  prev_lit = lit;
14057  }
14058  else if (!literal_concat0(p, prev_lit, lit)) {
14059  return 0;
14060  }
14061  else {
14062  NODE *end = node->nd_end;
14063  node = prev_node->nd_next = node->nd_next;
14064  if (!node) {
14065  if (nd_type(prev_node) == NODE_DSTR)
14066  nd_set_type(prev_node, NODE_STR);
14067  break;
14068  }
14069  node->nd_end = end;
14070  goto next_str;
14071  }
14072 
14073  str_node = 0;
14074  while ((node = (prev_node = node)->nd_next) != 0) {
14075  next_str:
14076  if (nd_type(node) != NODE_LIST) break;
14077  if ((str_node = node->nd_head) != 0) {
14078  enum node_type type = nd_type(str_node);
14079  if (type == NODE_STR || type == NODE_DSTR) break;
14080  prev_lit = 0;
14081  str_node = 0;
14082  }
14083  }
14084  }
14085  return root;
14086 }
14087 #else /* RIPPER */
14088 static VALUE
14089 heredoc_dedent(struct parser_params *p, VALUE array)
14090 {
14091  int indent = p->heredoc_indent;
14092 
14093  if (indent <= 0) return array;
14094  p->heredoc_indent = 0;
14095  dispatch2(heredoc_dedent, array, INT2NUM(indent));
14096  return array;
14097 }
14098 
14099 /*
14100  * call-seq:
14101  * Ripper.dedent_string(input, width) -> Integer
14102  *
14103  * USE OF RIPPER LIBRARY ONLY.
14104  *
14105  * Strips up to +width+ leading whitespaces from +input+,
14106  * and returns the stripped column width.
14107  */
14108 static VALUE
14109 parser_dedent_string(VALUE self, VALUE input, VALUE width)
14110 {
14111  int wid, col;
14112 
14113  StringValue(input);
14114  wid = NUM2UINT(width);
14115  col = dedent_string(input, wid);
14116  return INT2NUM(col);
14117 }
14118 #endif
14119 
14120 static int
14121 whole_match_p(struct parser_params *p, const char *eos, long len, int indent)
14122 {
14123  const char *ptr = p->lex.pbeg;
14124  long n;
14125 
14126  if (indent) {
14127  while (*ptr && ISSPACE(*ptr)) ptr++;
14128  }
14129  n = p->lex.pend - (ptr + len);
14130  if (n < 0) return FALSE;
14131  if (n > 0 && ptr[len] != '\n') {
14132  if (ptr[len] != '\r') return FALSE;
14133  if (n <= 1 || ptr[len+1] != '\n') return FALSE;
14134  }
14135  return strncmp(eos, ptr, len) == 0;
14136 }
14137 
14138 static int
14139 word_match_p(struct parser_params *p, const char *word, long len)
14140 {
14141  if (strncmp(p->lex.pcur, word, len)) return 0;
14142  if (p->lex.pcur + len == p->lex.pend) return 1;
14143  int c = (unsigned char)p->lex.pcur[len];
14144  if (ISSPACE(c)) return 1;
14145  switch (c) {
14146  case '\0': case '\004': case '\032': return 1;
14147  }
14148  return 0;
14149 }
14150 
14151 #define NUM_SUFFIX_R (1<<0)
14152 #define NUM_SUFFIX_I (1<<1)
14153 #define NUM_SUFFIX_ALL 3
14154 
14155 static int
14156 number_literal_suffix(struct parser_params *p, int mask)
14157 {
14158  int c, result = 0;
14159  const char *lastp = p->lex.pcur;
14160 
14161  while ((c = nextc(p)) != -1) {
14162  if ((mask & NUM_SUFFIX_I) && c == 'i') {
14163  result |= (mask & NUM_SUFFIX_I);
14164  mask &= ~NUM_SUFFIX_I;
14165  /* r after i, rational of complex is disallowed */
14166  mask &= ~NUM_SUFFIX_R;
14167  continue;
14168  }
14169  if ((mask & NUM_SUFFIX_R) && c == 'r') {
14170  result |= (mask & NUM_SUFFIX_R);
14171  mask &= ~NUM_SUFFIX_R;
14172  continue;
14173  }
14174  if (!ISASCII(c) || ISALPHA(c) || c == '_') {
14175  p->lex.pcur = lastp;
14176  literal_flush(p, p->lex.pcur);
14177  return 0;
14178  }
14179  pushback(p, c);
14180  break;
14181  }
14182  return result;
14183 }
14184 
14185 static enum yytokentype
14186 set_number_literal(struct parser_params *p, VALUE v,
14187  enum yytokentype type, int suffix)
14188 {
14189  if (suffix & NUM_SUFFIX_I) {
14190  v = rb_complex_raw(INT2FIX(0), v);
14191  type = tIMAGINARY;
14192  }
14194  SET_LEX_STATE(EXPR_END);
14195  return type;
14196 }
14197 
14198 static enum yytokentype
14199 set_integer_literal(struct parser_params *p, VALUE v, int suffix)
14200 {
14201  enum yytokentype type = tINTEGER;
14202  if (suffix & NUM_SUFFIX_R) {
14203  v = rb_rational_raw1(v);
14204  type = tRATIONAL;
14205  }
14206  return set_number_literal(p, v, type, suffix);
14207 }
14208 
14209 #ifdef RIPPER
14210 static void
14212 {
14213  VALUE str;
14214  if (has_delayed_token(p))
14216  str = STR_NEW(p->lex.ptok, p->lex.pend - p->lex.ptok);
14217  ripper_dispatch1(p, ripper_token2eventid(tHEREDOC_END), str);
14218  lex_goto_eol(p);
14219  token_flush(p);
14220 }
14221 
14222 #else
14223 #define dispatch_heredoc_end(p) ((void)0)
14224 #endif
14225 
14226 static enum yytokentype
14227 here_document(struct parser_params *p, rb_strterm_heredoc_t *here)
14228 {
14229  int c, func, indent = 0;
14230  const char *eos, *ptr, *ptr_end;
14231  long len;
14232  VALUE str = 0;
14233  rb_encoding *enc = p->enc;
14234  rb_encoding *base_enc = 0;
14235  int bol;
14236 
14237  eos = RSTRING_PTR(here->lastline) + here->offset;
14238  len = here->length;
14239  indent = (func = here->func) & STR_FUNC_INDENT;
14240 
14241  if ((c = nextc(p)) == -1) {
14242  error:
14243 #ifdef RIPPER
14244  if (!has_delayed_token(p)) {
14246  }
14247  else {
14248  if ((len = p->lex.pcur - p->lex.ptok) > 0) {
14249  if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
14250  int cr = ENC_CODERANGE_UNKNOWN;
14252  if (cr != ENC_CODERANGE_7BIT &&
14253  p->enc == rb_usascii_encoding() &&
14254  enc != rb_utf8_encoding()) {
14256  }
14257  }
14258  rb_enc_str_buf_cat(p->delayed.token, p->lex.ptok, len, enc);
14259  }
14261  }
14262  lex_goto_eol(p);
14263 #endif
14264  heredoc_restore(p, &p->lex.strterm->u.heredoc);
14265  compile_error(p, "can't find string \"%.*s\" anywhere before EOF",
14266  (int)len, eos);
14267  token_flush(p);
14268  p->lex.strterm = 0;
14269  SET_LEX_STATE(EXPR_END);
14270  return tSTRING_END;
14271  }
14272  bol = was_bol(p);
14273  if (!bol) {
14274  /* not beginning of line, cannot be the terminator */
14275  }
14276  else if (p->heredoc_line_indent == -1) {
14277  /* `heredoc_line_indent == -1` means
14278  * - "after an interpolation in the same line", or
14279  * - "in a continuing line"
14280  */
14281  p->heredoc_line_indent = 0;
14282  }
14283  else if (whole_match_p(p, eos, len, indent)) {
14285  restore:
14286  heredoc_restore(p, &p->lex.strterm->u.heredoc);
14287  token_flush(p);
14288  p->lex.strterm = 0;
14289  SET_LEX_STATE(EXPR_END);
14290  return tSTRING_END;
14291  }
14292 
14293  if (!(func & STR_FUNC_EXPAND)) {
14294  do {
14295  ptr = RSTRING_PTR(p->lex.lastline);
14296  ptr_end = p->lex.pend;
14297  if (ptr_end > ptr) {
14298  switch (ptr_end[-1]) {
14299  case '\n':
14300  if (--ptr_end == ptr || ptr_end[-1] != '\r') {
14301  ptr_end++;
14302  break;
14303  }
14304  case '\r':
14305  --ptr_end;
14306  }
14307  }
14308 
14309  if (p->heredoc_indent > 0) {
14310  long i = 0;
14311  while (ptr + i < ptr_end && parser_update_heredoc_indent(p, ptr[i]))
14312  i++;
14313  p->heredoc_line_indent = 0;
14314  }
14315 
14316  if (str)
14317  rb_str_cat(str, ptr, ptr_end - ptr);
14318  else
14319  str = STR_NEW(ptr, ptr_end - ptr);
14320  if (ptr_end < p->lex.pend) rb_str_cat(str, "\n", 1);
14321  lex_goto_eol(p);
14322  if (p->heredoc_indent > 0) {
14323  goto flush_str;
14324  }
14325  if (nextc(p) == -1) {
14326  if (str) {
14327  str = 0;
14328  }
14329  goto error;
14330  }
14331  } while (!whole_match_p(p, eos, len, indent));
14332  }
14333  else {
14334  /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
14335  newtok(p);
14336  if (c == '#') {
14337  int t = parser_peek_variable_name(p);
14338  if (p->heredoc_line_indent != -1) {
14339  if (p->heredoc_indent > p->heredoc_line_indent) {
14341  }
14342  p->heredoc_line_indent = -1;
14343  }
14344  if (t) return t;
14345  tokadd(p, '#');
14346  c = nextc(p);
14347  }
14348  do {
14349  pushback(p, c);
14350  enc = p->enc;
14351  if ((c = tokadd_string(p, func, '\n', 0, NULL, &enc, &base_enc)) == -1) {
14352  if (p->eofp) goto error;
14353  goto restore;
14354  }
14355  if (c != '\n') {
14356  if (c == '\\') p->heredoc_line_indent = -1;
14357  flush:
14358  str = STR_NEW3(tok(p), toklen(p), enc, func);
14359  flush_str:
14361 #ifndef RIPPER
14362  if (bol) yylval.node->flags |= NODE_FL_NEWLINE;
14363 #endif
14365  return tSTRING_CONTENT;
14366  }
14367  tokadd(p, nextc(p));
14368  if (p->heredoc_indent > 0) {
14369  lex_goto_eol(p);
14370  goto flush;
14371  }
14372  /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
14373  if ((c = nextc(p)) == -1) goto error;
14374  } while (!whole_match_p(p, eos, len, indent));
14375  str = STR_NEW3(tok(p), toklen(p), enc, func);
14376  }
14378 #ifdef RIPPER
14379  str = ripper_new_yylval(p, ripper_token2eventid(tSTRING_CONTENT),
14380  yylval.val, str);
14381 #endif
14382  heredoc_restore(p, &p->lex.strterm->u.heredoc);
14383  token_flush(p);
14384  p->lex.strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
14386 #ifndef RIPPER
14387  if (bol) yylval.node->flags |= NODE_FL_NEWLINE;
14388 #endif
14389  return tSTRING_CONTENT;
14390 }
14391 
14392 #include "lex.c"
14393 
14394 static int
14395 arg_ambiguous(struct parser_params *p, char c)
14396 {
14397 #ifndef RIPPER
14398  rb_warning1("ambiguous first argument; put parentheses or a space even after `%c' operator", WARN_I(c));
14399 #else
14400  dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
14401 #endif
14402  return TRUE;
14403 }
14404 
14405 static ID
14406 formal_argument(struct parser_params *p, ID lhs)
14407 {
14408  switch (id_type(lhs)) {
14409  case ID_LOCAL:
14410  break;
14411 #ifndef RIPPER
14412  case ID_CONST:
14413  yyerror0("formal argument cannot be a constant");
14414  return 0;
14415  case ID_INSTANCE:
14416  yyerror0("formal argument cannot be an instance variable");
14417  return 0;
14418  case ID_GLOBAL:
14419  yyerror0("formal argument cannot be a global variable");
14420  return 0;
14421  case ID_CLASS:
14422  yyerror0("formal argument cannot be a class variable");
14423  return 0;
14424  default:
14425  yyerror0("formal argument must be local variable");
14426  return 0;
14427 #else
14428  default:
14429  lhs = dispatch1(param_error, lhs);
14430  ripper_error(p);
14431  return 0;
14432 #endif
14433  }
14434  shadowing_lvar(p, lhs);
14435  return lhs;
14436 }
14437 
14438 static int
14439 lvar_defined(struct parser_params *p, ID id)
14440 {
14441  return (dyna_in_block(p) && dvar_defined(p, id)) || local_id(p, id);
14442 }
14443 
14444 /* emacsen -*- hack */
14445 static long
14446 parser_encode_length(struct parser_params *p, const char *name, long len)
14447 {
14448  long nlen;
14449 
14450  if (len > 5 && name[nlen = len - 5] == '-') {
14451  if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
14452  return nlen;
14453  }
14454  if (len > 4 && name[nlen = len - 4] == '-') {
14455  if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
14456  return nlen;
14457  if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
14458  !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
14459  /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
14460  return nlen;
14461  }
14462  return len;
14463 }
14464 
14465 static void
14466 parser_set_encode(struct parser_params *p, const char *name)
14467 {
14468  int idx = rb_enc_find_index(name);
14469  rb_encoding *enc;
14470  VALUE excargs[3];
14471 
14472  if (idx < 0) {
14473  excargs[1] = rb_sprintf("unknown encoding name: %s", name);
14474  error:
14475  excargs[0] = rb_eArgError;
14476  excargs[2] = rb_make_backtrace();
14478  rb_exc_raise(rb_make_exception(3, excargs));
14479  }
14480  enc = rb_enc_from_index(idx);
14481  if (!rb_enc_asciicompat(enc)) {
14482  excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
14483  goto error;
14484  }
14485  p->enc = enc;
14486 #ifndef RIPPER
14487  if (p->debug_lines) {
14488  VALUE lines = p->debug_lines;
14489  long i, n = RARRAY_LEN(lines);
14490  for (i = 0; i < n; ++i) {
14491  rb_enc_associate_index(RARRAY_AREF(lines, i), idx);
14492  }
14493  }
14494 #endif
14495 }
14496 
14497 static int
14498 comment_at_top(struct parser_params *p)
14499 {
14500  const char *ptr = p->lex.pbeg, *ptr_end = p->lex.pcur - 1;
14501  if (p->line_count != (p->has_shebang ? 2 : 1)) return 0;
14502  while (ptr < ptr_end) {
14503  if (!ISSPACE(*ptr)) return 0;
14504  ptr++;
14505  }
14506  return 1;
14507 }
14508 
14509 typedef long (*rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len);
14510 typedef void (*rb_magic_comment_setter_t)(struct parser_params *p, const char *name, const char *val);
14511 
14512 static void
14513 magic_comment_encoding(struct parser_params *p, const char *name, const char *val)
14514 {
14515  if (!comment_at_top(p)) {
14516  return;
14517  }
14518  parser_set_encode(p, val);
14519 }
14520 
14521 static int
14522 parser_get_bool(struct parser_params *p, const char *name, const char *val)
14523 {
14524  switch (*val) {
14525  case 't': case 'T':
14526  if (strcasecmp(val, "true") == 0) {
14527  return TRUE;
14528  }
14529  break;
14530  case 'f': case 'F':
14531  if (strcasecmp(val, "false") == 0) {
14532  return FALSE;
14533  }
14534  break;
14535  }
14536  rb_compile_warning(p->ruby_sourcefile, p->ruby_sourceline, "invalid value for %s: %s", name, val);
14537  return -1;
14538 }
14539 
14540 static void
14541 parser_set_token_info(struct parser_params *p, const char *name, const char *val)
14542 {
14543  int b = parser_get_bool(p, name, val);
14544  if (b >= 0) p->token_info_enabled = b;
14545 }
14546 
14547 static void
14548 parser_set_compile_option_flag(struct parser_params *p, const char *name, const char *val)
14549 {
14550  int b;
14551 
14552  if (p->token_seen) {
14553  rb_warning1("`%s' is ignored after any tokens", WARN_S(name));
14554  return;
14555  }
14556 
14557  b = parser_get_bool(p, name, val);
14558  if (b < 0) return;
14559 
14560  if (!p->compile_option)
14563  (b ? Qtrue : Qfalse));
14564 }
14565 
14566 # if WARN_PAST_SCOPE
14567 static void
14568 parser_set_past_scope(struct parser_params *p, const char *name, const char *val)
14569 {
14570  int b = parser_get_bool(p, name, val);
14571  if (b >= 0) p->past_scope_enabled = b;
14572 }
14573 # endif
14574 
14575 struct magic_comment {
14576  const char *name;
14579 };
14580 
14581 static const struct magic_comment magic_comments[] = {
14582  {"coding", magic_comment_encoding, parser_encode_length},
14583  {"encoding", magic_comment_encoding, parser_encode_length},
14584  {"frozen_string_literal", parser_set_compile_option_flag},
14585  {"warn_indent", parser_set_token_info},
14586 # if WARN_PAST_SCOPE
14587  {"warn_past_scope", parser_set_past_scope},
14588 # endif
14589 };
14590 
14591 static const char *
14592 magic_comment_marker(const char *str, long len)
14593 {
14594  long i = 2;
14595 
14596  while (i < len) {
14597  switch (str[i]) {
14598  case '-':
14599  if (str[i-1] == '*' && str[i-2] == '-') {
14600  return str + i + 1;
14601  }
14602  i += 2;
14603  break;
14604  case '*':
14605  if (i + 1 >= len) return 0;
14606  if (str[i+1] != '-') {
14607  i += 4;
14608  }
14609  else if (str[i-1] != '-') {
14610  i += 2;
14611  }
14612  else {
14613  return str + i + 2;
14614  }
14615  break;
14616  default:
14617  i += 3;
14618  break;
14619  }
14620  }
14621  return 0;
14622 }
14623 
14624 static int
14625 parser_magic_comment(struct parser_params *p, const char *str, long len)
14626 {
14627  int indicator = 0;
14628  VALUE name = 0, val = 0;
14629  const char *beg, *end, *vbeg, *vend;
14630 #define str_copy(_s, _p, _n) ((_s) \
14631  ? (void)(rb_str_resize((_s), (_n)), \
14632  MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
14633  : (void)((_s) = STR_NEW((_p), (_n))))
14634 
14635  if (len <= 7) return FALSE;
14636  if (!!(beg = magic_comment_marker(str, len))) {
14637  if (!(end = magic_comment_marker(beg, str + len - beg)))
14638  return FALSE;
14639  indicator = TRUE;
14640  str = beg;
14641  len = end - beg - 3;
14642  }
14643 
14644  /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
14645  while (len > 0) {
14646  const struct magic_comment *mc = magic_comments;
14647  char *s;
14648  int i;
14649  long n = 0;
14650 
14651  for (; len > 0 && *str; str++, --len) {
14652  switch (*str) {
14653  case '\'': case '"': case ':': case ';':
14654  continue;
14655  }
14656  if (!ISSPACE(*str)) break;
14657  }
14658  for (beg = str; len > 0; str++, --len) {
14659  switch (*str) {
14660  case '\'': case '"': case ':': case ';':
14661  break;
14662  default:
14663  if (ISSPACE(*str)) break;
14664  continue;
14665  }
14666  break;
14667  }
14668  for (end = str; len > 0 && ISSPACE(*str); str++, --len);
14669  if (!len) break;
14670  if (*str != ':') {
14671  if (!indicator) return FALSE;
14672  continue;
14673  }
14674 
14675  do str++; while (--len > 0 && ISSPACE(*str));
14676  if (!len) break;
14677  if (*str == '"') {
14678  for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
14679  if (*str == '\\') {
14680  --len;
14681  ++str;
14682  }
14683  }
14684  vend = str;
14685  if (len) {
14686  --len;
14687  ++str;
14688  }
14689  }
14690  else {
14691  for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
14692  vend = str;
14693  }
14694  if (indicator) {
14695  while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
14696  }
14697  else {
14698  while (len > 0 && (ISSPACE(*str))) --len, str++;
14699  if (len) return FALSE;
14700  }
14701 
14702  n = end - beg;
14703  str_copy(name, beg, n);
14704  s = RSTRING_PTR(name);
14705  for (i = 0; i < n; ++i) {
14706  if (s[i] == '-') s[i] = '_';
14707  }
14708  do {
14709  if (STRNCASECMP(mc->name, s, n) == 0 && !mc->name[n]) {
14710  n = vend - vbeg;
14711  if (mc->length) {
14712  n = (*mc->length)(p, vbeg, n);
14713  }
14714  str_copy(val, vbeg, n);
14715  (*mc->func)(p, mc->name, RSTRING_PTR(val));
14716  break;
14717  }
14718  } while (++mc < magic_comments + numberof(magic_comments));
14719 #ifdef RIPPER
14720  str_copy(val, vbeg, vend - vbeg);
14721  dispatch2(magic_comment, name, val);
14722 #endif
14723  }
14724 
14725  return TRUE;
14726 }
14727 
14728 static void
14729 set_file_encoding(struct parser_params *p, const char *str, const char *send)
14730 {
14731  int sep = 0;
14732  const char *beg = str;
14733  VALUE s;
14734 
14735  for (;;) {
14736  if (send - str <= 6) return;
14737  switch (str[6]) {
14738  case 'C': case 'c': str += 6; continue;
14739  case 'O': case 'o': str += 5; continue;
14740  case 'D': case 'd': str += 4; continue;
14741  case 'I': case 'i': str += 3; continue;
14742  case 'N': case 'n': str += 2; continue;
14743  case 'G': case 'g': str += 1; continue;
14744  case '=': case ':':
14745  sep = 1;
14746  str += 6;
14747  break;
14748  default:
14749  str += 6;
14750  if (ISSPACE(*str)) break;
14751  continue;
14752  }
14753  if (STRNCASECMP(str-6, "coding", 6) == 0) break;
14754  }
14755  for (;;) {
14756  do {
14757  if (++str >= send) return;
14758  } while (ISSPACE(*str));
14759  if (sep) break;
14760  if (*str != '=' && *str != ':') return;
14761  sep = 1;
14762  str++;
14763  }
14764  beg = str;
14765  while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
14766  s = rb_str_new(beg, parser_encode_length(p, beg, str - beg));
14767  parser_set_encode(p, RSTRING_PTR(s));
14768  rb_str_resize(s, 0);
14769 }
14770 
14771 static void
14772 parser_prepare(struct parser_params *p)
14773 {
14774  int c = nextc(p);
14776  switch (c) {
14777  case '#':
14778  if (peek(p, '!')) p->has_shebang = 1;
14779  break;
14780  case 0xef: /* UTF-8 BOM marker */
14781  if (p->lex.pend - p->lex.pcur >= 2 &&
14782  (unsigned char)p->lex.pcur[0] == 0xbb &&
14783  (unsigned char)p->lex.pcur[1] == 0xbf) {
14784  p->enc = rb_utf8_encoding();
14785  p->lex.pcur += 2;
14786  p->lex.pbeg = p->lex.pcur;
14787  return;
14788  }
14789  break;
14790  case EOF:
14791  return;
14792  }
14793  pushback(p, c);
14794  p->enc = rb_enc_get(p->lex.lastline);
14795 }
14796 
14797 #ifndef RIPPER
14798 #define ambiguous_operator(tok, op, syn) ( \
14799  rb_warning0("`"op"' after local variable or literal is interpreted as binary operator"), \
14800  rb_warning0("even though it seems like "syn""))
14801 #else
14802 #define ambiguous_operator(tok, op, syn) \
14803  dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
14804 #endif
14805 #define warn_balanced(tok, op, syn) ((void) \
14806  (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
14807  space_seen && !ISSPACE(c) && \
14808  (ambiguous_operator(tok, op, syn), 0)), \
14809  (enum yytokentype)(tok))
14810 
14811 static VALUE
14812 parse_rational(struct parser_params *p, char *str, int len, int seen_point)
14813 {
14814  VALUE v;
14815  char *point = &str[seen_point];
14816  size_t fraclen = len-seen_point-1;
14817  memmove(point, point+1, fraclen+1);
14818  v = rb_cstr_to_inum(str, 10, FALSE);
14819  return rb_rational_new(v, rb_int_positive_pow(10, fraclen));
14820 }
14821 
14822 static enum yytokentype
14823 no_digits(struct parser_params *p)
14824 {
14825  yyerror0("numeric literal without digits");
14826  if (peek(p, '_')) nextc(p);
14827  /* dummy 0, for tUMINUS_NUM at numeric */
14828  return set_integer_literal(p, INT2FIX(0), 0);
14829 }
14830 
14831 static enum yytokentype
14832 parse_numeric(struct parser_params *p, int c)
14833 {
14834  int is_float, seen_point, seen_e, nondigit;
14835  int suffix;
14836 
14837  is_float = seen_point = seen_e = nondigit = 0;
14838  SET_LEX_STATE(EXPR_END);
14839  newtok(p);
14840  if (c == '-' || c == '+') {
14841  tokadd(p, c);
14842  c = nextc(p);
14843  }
14844  if (c == '0') {
14845  int start = toklen(p);
14846  c = nextc(p);
14847  if (c == 'x' || c == 'X') {
14848  /* hexadecimal */
14849  c = nextc(p);
14850  if (c != -1 && ISXDIGIT(c)) {
14851  do {
14852  if (c == '_') {
14853  if (nondigit) break;
14854  nondigit = c;
14855  continue;
14856  }
14857  if (!ISXDIGIT(c)) break;
14858  nondigit = 0;
14859  tokadd(p, c);
14860  } while ((c = nextc(p)) != -1);
14861  }
14862  pushback(p, c);
14863  tokfix(p);
14864  if (toklen(p) == start) {
14865  return no_digits(p);
14866  }
14867  else if (nondigit) goto trailing_uc;
14868  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
14869  return set_integer_literal(p, rb_cstr_to_inum(tok(p), 16, FALSE), suffix);
14870  }
14871  if (c == 'b' || c == 'B') {
14872  /* binary */
14873  c = nextc(p);
14874  if (c == '0' || c == '1') {
14875  do {
14876  if (c == '_') {
14877  if (nondigit) break;
14878  nondigit = c;
14879  continue;
14880  }
14881  if (c != '0' && c != '1') break;
14882  nondigit = 0;
14883  tokadd(p, c);
14884  } while ((c = nextc(p)) != -1);
14885  }
14886  pushback(p, c);
14887  tokfix(p);
14888  if (toklen(p) == start) {
14889  return no_digits(p);
14890  }
14891  else if (nondigit) goto trailing_uc;
14892  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
14893  return set_integer_literal(p, rb_cstr_to_inum(tok(p), 2, FALSE), suffix);
14894  }
14895  if (c == 'd' || c == 'D') {
14896  /* decimal */
14897  c = nextc(p);
14898  if (c != -1 && ISDIGIT(c)) {
14899  do {
14900  if (c == '_') {
14901  if (nondigit) break;
14902  nondigit = c;
14903  continue;
14904  }
14905  if (!ISDIGIT(c)) break;
14906  nondigit = 0;
14907  tokadd(p, c);
14908  } while ((c = nextc(p)) != -1);
14909  }
14910  pushback(p, c);
14911  tokfix(p);
14912  if (toklen(p) == start) {
14913  return no_digits(p);
14914  }
14915  else if (nondigit) goto trailing_uc;
14916  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
14917  return set_integer_literal(p, rb_cstr_to_inum(tok(p), 10, FALSE), suffix);
14918  }
14919  if (c == '_') {
14920  /* 0_0 */
14921  goto octal_number;
14922  }
14923  if (c == 'o' || c == 'O') {
14924  /* prefixed octal */
14925  c = nextc(p);
14926  if (c == -1 || c == '_' || !ISDIGIT(c)) {
14927  return no_digits(p);
14928  }
14929  }
14930  if (c >= '0' && c <= '7') {
14931  /* octal */
14932  octal_number:
14933  do {
14934  if (c == '_') {
14935  if (nondigit) break;
14936  nondigit = c;
14937  continue;
14938  }
14939  if (c < '0' || c > '9') break;
14940  if (c > '7') goto invalid_octal;
14941  nondigit = 0;
14942  tokadd(p, c);
14943  } while ((c = nextc(p)) != -1);
14944  if (toklen(p) > start) {
14945  pushback(p, c);
14946  tokfix(p);
14947  if (nondigit) goto trailing_uc;
14948  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
14949  return set_integer_literal(p, rb_cstr_to_inum(tok(p), 8, FALSE), suffix);
14950  }
14951  if (nondigit) {
14952  pushback(p, c);
14953  goto trailing_uc;
14954  }
14955  }
14956  if (c > '7' && c <= '9') {
14957  invalid_octal:
14958  yyerror0("Invalid octal digit");
14959  }
14960  else if (c == '.' || c == 'e' || c == 'E') {
14961  tokadd(p, '0');
14962  }
14963  else {
14964  pushback(p, c);
14965  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
14966  return set_integer_literal(p, INT2FIX(0), suffix);
14967  }
14968  }
14969 
14970  for (;;) {
14971  switch (c) {
14972  case '0': case '1': case '2': case '3': case '4':
14973  case '5': case '6': case '7': case '8': case '9':
14974  nondigit = 0;
14975  tokadd(p, c);
14976  break;
14977 
14978  case '.':
14979  if (nondigit) goto trailing_uc;
14980  if (seen_point || seen_e) {
14981  goto decode_num;
14982  }
14983  else {
14984  int c0 = nextc(p);
14985  if (c0 == -1 || !ISDIGIT(c0)) {
14986  pushback(p, c0);
14987  goto decode_num;
14988  }
14989  c = c0;
14990  }
14991  seen_point = toklen(p);
14992  tokadd(p, '.');
14993  tokadd(p, c);
14994  is_float++;
14995  nondigit = 0;
14996  break;
14997 
14998  case 'e':
14999  case 'E':
15000  if (nondigit) {
15001  pushback(p, c);
15002  c = nondigit;
15003  goto decode_num;
15004  }
15005  if (seen_e) {
15006  goto decode_num;
15007  }
15008  nondigit = c;
15009  c = nextc(p);
15010  if (c != '-' && c != '+' && !ISDIGIT(c)) {
15011  pushback(p, c);
15012  nondigit = 0;
15013  goto decode_num;
15014  }
15015  tokadd(p, nondigit);
15016  seen_e++;
15017  is_float++;
15018  tokadd(p, c);
15019  nondigit = (c == '-' || c == '+') ? c : 0;
15020  break;
15021 
15022  case '_': /* `_' in number just ignored */
15023  if (nondigit) goto decode_num;
15024  nondigit = c;
15025  break;
15026 
15027  default:
15028  goto decode_num;
15029  }
15030  c = nextc(p);
15031  }
15032 
15033  decode_num:
15034  pushback(p, c);
15035  if (nondigit) {
15036  trailing_uc:
15037  literal_flush(p, p->lex.pcur - 1);
15038  YYLTYPE loc = RUBY_INIT_YYLLOC();
15039  compile_error(p, "trailing `%c' in number", nondigit);
15040  parser_show_error_line(p, &loc);
15041  }
15042  tokfix(p);
15043  if (is_float) {
15044  enum yytokentype type = tFLOAT;
15045  VALUE v;
15046 
15047  suffix = number_literal_suffix(p, seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
15048  if (suffix & NUM_SUFFIX_R) {
15049  type = tRATIONAL;
15050  v = parse_rational(p, tok(p), toklen(p), seen_point);
15051  }
15052  else {
15053  double d = strtod(tok(p), 0);
15054  if (errno == ERANGE) {
15055  rb_warning1("Float %s out of range", WARN_S(tok(p)));
15056  errno = 0;
15057  }
15058  v = DBL2NUM(d);
15059  }
15060  return set_number_literal(p, v, type, suffix);
15061  }
15062  suffix = number_literal_suffix(p, NUM_SUFFIX_ALL);
15063  return set_integer_literal(p, rb_cstr_to_inum(tok(p), 10, FALSE), suffix);
15064 }
15065 
15066 static enum yytokentype
15067 parse_qmark(struct parser_params *p, int space_seen)
15068 {
15069  rb_encoding *enc;
15070  register int c;
15071  VALUE lit;
15072 
15073  if (IS_END()) {
15075  return '?';
15076  }
15077  c = nextc(p);
15078  if (c == -1) {
15079  compile_error(p, "incomplete character syntax");
15080  return 0;
15081  }
15082  if (rb_enc_isspace(c, p->enc)) {
15083  if (!IS_ARG()) {
15084  int c2 = escaped_control_code(c);
15085  if (c2) {
15086  WARN_SPACE_CHAR(c2, "?");
15087  }
15088  }
15089  ternary:
15090  pushback(p, c);
15092  return '?';
15093  }
15094  newtok(p);
15095  enc = p->enc;
15096  if (!parser_isascii(p)) {
15097  if (tokadd_mbchar(p, c) == -1) return 0;
15098  }
15099  else if ((rb_enc_isalnum(c, p->enc) || c == '_') &&
15100  p->lex.pcur < p->lex.pend && is_identchar(p->lex.pcur, p->lex.pend, p->enc)) {
15101  if (space_seen) {
15102  const char *start = p->lex.pcur - 1, *ptr = start;
15103  do {
15104  int n = parser_precise_mbclen(p, ptr);
15105  if (n < 0) return -1;
15106  ptr += n;
15107  } while (ptr < p->lex.pend && is_identchar(ptr, p->lex.pend, p->enc));
15108  rb_warn2("`?' just followed by `%.*s' is interpreted as" \
15109  " a conditional operator, put a space after `?'",
15110  WARN_I((int)(ptr - start)), WARN_S_L(start, (ptr - start)));
15111  }
15112  goto ternary;
15113  }
15114  else if (c == '\\') {
15115  if (peek(p, 'u')) {
15116  nextc(p);
15117  enc = rb_utf8_encoding();
15118  tokadd_utf8(p, &enc, -1, 0, 0);
15119  }
15120  else if (!lex_eol_p(p) && !(c = *p->lex.pcur, ISASCII(c))) {
15121  nextc(p);
15122  if (tokadd_mbchar(p, c) == -1) return 0;
15123  }
15124  else {
15125  c = read_escape(p, 0, &enc);
15126  tokadd(p, c);
15127  }
15128  }
15129  else {
15130  tokadd(p, c);
15131  }
15132  tokfix(p);
15133  lit = STR_NEW3(tok(p), toklen(p), enc, 0);
15134  set_yylval_str(lit);
15135  SET_LEX_STATE(EXPR_END);
15136  return tCHAR;
15137 }
15138 
15139 static enum yytokentype
15140 parse_percent(struct parser_params *p, const int space_seen, const enum lex_state_e last_state)
15141 {
15142  register int c;
15143  const char *ptok = p->lex.pcur;
15144 
15145  if (IS_BEG()) {
15146  int term;
15147  int paren;
15148 
15149  c = nextc(p);
15150  quotation:
15151  if (c == -1 || !ISALNUM(c)) {
15152  term = c;
15153  c = 'Q';
15154  }
15155  else {
15156  term = nextc(p);
15157  if (rb_enc_isalnum(term, p->enc) || !parser_isascii(p)) {
15158  yyerror0("unknown type of %string");
15159  return 0;
15160  }
15161  }
15162  if (c == -1 || term == -1) {
15163  compile_error(p, "unterminated quoted string meets end of file");
15164  return 0;
15165  }
15166  paren = term;
15167  if (term == '(') term = ')';
15168  else if (term == '[') term = ']';
15169  else if (term == '{') term = '}';
15170  else if (term == '<') term = '>';
15171  else paren = 0;
15172 
15173  p->lex.ptok = ptok-1;
15174  switch (c) {
15175  case 'Q':
15176  p->lex.strterm = NEW_STRTERM(str_dquote, term, paren);
15177  return tSTRING_BEG;
15178 
15179  case 'q':
15180  p->lex.strterm = NEW_STRTERM(str_squote, term, paren);
15181  return tSTRING_BEG;
15182 
15183  case 'W':
15184  p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
15185  return tWORDS_BEG;
15186 
15187  case 'w':
15188  p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
15189  return tQWORDS_BEG;
15190 
15191  case 'I':
15192  p->lex.strterm = NEW_STRTERM(str_dword, term, paren);
15193  return tSYMBOLS_BEG;
15194 
15195  case 'i':
15196  p->lex.strterm = NEW_STRTERM(str_sword, term, paren);
15197  return tQSYMBOLS_BEG;
15198 
15199  case 'x':
15200  p->lex.strterm = NEW_STRTERM(str_xquote, term, paren);
15201  return tXSTRING_BEG;
15202 
15203  case 'r':
15204  p->lex.strterm = NEW_STRTERM(str_regexp, term, paren);
15205  return tREGEXP_BEG;
15206 
15207  case 's':
15208  p->lex.strterm = NEW_STRTERM(str_ssym, term, paren);
15209  SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
15210  return tSYMBEG;
15211 
15212  default:
15213  yyerror0("unknown type of %string");
15214  return 0;
15215  }
15216  }
15217  if ((c = nextc(p)) == '=') {
15218  set_yylval_id('%');
15219  SET_LEX_STATE(EXPR_BEG);
15220  return tOP_ASGN;
15221  }
15222  if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
15223  goto quotation;
15224  }
15225  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
15226  pushback(p, c);
15227  return warn_balanced('%', "%%", "string literal");
15228 }
15229 
15230 static int
15231 tokadd_ident(struct parser_params *p, int c)
15232 {
15233  do {
15234  if (tokadd_mbchar(p, c) == -1) return -1;
15235  c = nextc(p);
15236  } while (parser_is_identchar(p));
15237  pushback(p, c);
15238  return 0;
15239 }
15240 
15241 static ID
15242 tokenize_ident(struct parser_params *p, const enum lex_state_e last_state)
15243 {
15244  ID ident = TOK_INTERN();
15245 
15246  set_yylval_name(ident);
15247 
15248  return ident;
15249 }
15250 
15251 static int
15252 parse_numvar(struct parser_params *p)
15253 {
15254  size_t len;
15255  int overflow;
15256  unsigned long n = ruby_scan_digits(tok(p)+1, toklen(p)-1, 10, &len, &overflow);
15257  const unsigned long nth_ref_max =
15258  ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
15259  /* NTH_REF is left-shifted to be ORed with back-ref flag and
15260  * turned into a Fixnum, in compile.c */
15261 
15262  if (overflow || n > nth_ref_max) {
15263  /* compile_error()? */
15264  rb_warn1("`%s' is too big for a number variable, always nil", WARN_S(tok(p)));
15265  return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
15266  }
15267  else {
15268  return (int)n;
15269  }
15270 }
15271 
15272 static enum yytokentype
15273 parse_gvar(struct parser_params *p, const enum lex_state_e last_state)
15274 {
15275  const char *ptr = p->lex.pcur;
15276  register int c;
15277 
15278  SET_LEX_STATE(EXPR_END);
15279  p->lex.ptok = ptr - 1; /* from '$' */
15280  newtok(p);
15281  c = nextc(p);
15282  switch (c) {
15283  case '_': /* $_: last read line string */
15284  c = nextc(p);
15285  if (parser_is_identchar(p)) {
15286  tokadd(p, '$');
15287  tokadd(p, '_');
15288  break;
15289  }
15290  pushback(p, c);
15291  c = '_';
15292  /* fall through */
15293  case '~': /* $~: match-data */
15294  case '*': /* $*: argv */
15295  case '$': /* $$: pid */
15296  case '?': /* $?: last status */
15297  case '!': /* $!: error string */
15298  case '@': /* $@: error position */
15299  case '/': /* $/: input record separator */
15300  case '\\': /* $\: output record separator */
15301  case ';': /* $;: field separator */
15302  case ',': /* $,: output field separator */
15303  case '.': /* $.: last read line number */
15304  case '=': /* $=: ignorecase */
15305  case ':': /* $:: load path */
15306  case '<': /* $<: reading filename */
15307  case '>': /* $>: default output handle */
15308  case '\"': /* $": already loaded files */
15309  tokadd(p, '$');
15310  tokadd(p, c);
15311  goto gvar;
15312 
15313  case '-':
15314  tokadd(p, '$');
15315  tokadd(p, c);
15316  c = nextc(p);
15317  if (parser_is_identchar(p)) {
15318  if (tokadd_mbchar(p, c) == -1) return 0;
15319  }
15320  else {
15321  pushback(p, c);
15322  pushback(p, '-');
15323  return '$';
15324  }
15325  gvar:
15327  return tGVAR;
15328 
15329  case '&': /* $&: last match */
15330  case '`': /* $`: string before last match */
15331  case '\'': /* $': string after last match */
15332  case '+': /* $+: string matches last paren. */
15333  if (IS_lex_state_for(last_state, EXPR_FNAME)) {
15334  tokadd(p, '$');
15335  tokadd(p, c);
15336  goto gvar;
15337  }
15338  set_yylval_node(NEW_BACK_REF(c, &_cur_loc));
15339  return tBACK_REF;
15340 
15341  case '1': case '2': case '3':
15342  case '4': case '5': case '6':
15343  case '7': case '8': case '9':
15344  tokadd(p, '$');
15345  do {
15346  tokadd(p, c);
15347  c = nextc(p);
15348  } while (c != -1 && ISDIGIT(c));
15349  pushback(p, c);
15350  if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
15351  tokfix(p);
15352  set_yylval_node(NEW_NTH_REF(parse_numvar(p), &_cur_loc));
15353  return tNTH_REF;
15354 
15355  default:
15356  if (!parser_is_identchar(p)) {
15357  YYLTYPE loc = RUBY_INIT_YYLLOC();
15358  if (c == -1 || ISSPACE(c)) {
15359  compile_error(p, "`$' without identifiers is not allowed as a global variable name");
15360  }
15361  else {
15362  pushback(p, c);
15363  compile_error(p, "`$%c' is not allowed as a global variable name", c);
15364  }
15365  parser_show_error_line(p, &loc);
15367  return tGVAR;
15368  }
15369  /* fall through */
15370  case '0':
15371  tokadd(p, '$');
15372  }
15373 
15374  if (tokadd_ident(p, c)) return 0;
15375  SET_LEX_STATE(EXPR_END);
15376  tokenize_ident(p, last_state);
15377  return tGVAR;
15378 }
15379 
15380 #ifndef RIPPER
15381 static bool
15382 parser_numbered_param(struct parser_params *p, int n)
15383 {
15384  if (n < 0) return false;
15385 
15387  return false;
15388  }
15389  if (p->max_numparam == ORDINAL_PARAM) {
15390  compile_error(p, "ordinary parameter is defined");
15391  return false;
15392  }
15393  struct vtable *args = p->lvtbl->args;
15394  if (p->max_numparam < n) {
15395  p->max_numparam = n;
15396  }
15397  while (n > args->pos) {
15398  vtable_add(args, NUMPARAM_IDX_TO_ID(args->pos+1));
15399  }
15400  return true;
15401 }
15402 #endif
15403 
15404 static enum yytokentype
15405 parse_atmark(struct parser_params *p, const enum lex_state_e last_state)
15406 {
15407  const char *ptr = p->lex.pcur;
15408  enum yytokentype result = tIVAR;
15409  register int c = nextc(p);
15410  YYLTYPE loc;
15411 
15412  p->lex.ptok = ptr - 1; /* from '@' */
15413  newtok(p);
15414  tokadd(p, '@');
15415  if (c == '@') {
15416  result = tCVAR;
15417  tokadd(p, '@');
15418  c = nextc(p);
15419  }
15420  SET_LEX_STATE(IS_lex_state_for(last_state, EXPR_FNAME) ? EXPR_ENDFN : EXPR_END);
15421  if (c == -1 || !parser_is_identchar(p)) {
15422  pushback(p, c);
15423  RUBY_SET_YYLLOC(loc);
15424  if (result == tIVAR) {
15425  compile_error(p, "`@' without identifiers is not allowed as an instance variable name");
15426  }
15427  else {
15428  compile_error(p, "`@@' without identifiers is not allowed as a class variable name");
15429  }
15430  parser_show_error_line(p, &loc);
15432  SET_LEX_STATE(EXPR_END);
15433  return result;
15434  }
15435  else if (ISDIGIT(c)) {
15436  pushback(p, c);
15437  RUBY_SET_YYLLOC(loc);
15438  if (result == tIVAR) {
15439  compile_error(p, "`@%c' is not allowed as an instance variable name", c);
15440  }
15441  else {
15442  compile_error(p, "`@@%c' is not allowed as a class variable name", c);
15443  }
15444  parser_show_error_line(p, &loc);
15446  SET_LEX_STATE(EXPR_END);
15447  return result;
15448  }
15449 
15450  if (tokadd_ident(p, c)) return 0;
15451  tokenize_ident(p, last_state);
15452  return result;
15453 }
15454 
15455 static enum yytokentype
15456 parse_ident(struct parser_params *p, int c, int cmd_state)
15457 {
15458  enum yytokentype result;
15459  int mb = ENC_CODERANGE_7BIT;
15460  const enum lex_state_e last_state = p->lex.state;
15461  ID ident;
15462 
15463  do {
15464  if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN;
15465  if (tokadd_mbchar(p, c) == -1) return 0;
15466  c = nextc(p);
15467  } while (parser_is_identchar(p));
15468  if ((c == '!' || c == '?') && !peek(p, '=')) {
15469  result = tFID;
15470  tokadd(p, c);
15471  }
15472  else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
15473  (!peek(p, '~') && !peek(p, '>') && (!peek(p, '=') || (peek_n(p, '>', 1))))) {
15474  result = tIDENTIFIER;
15475  tokadd(p, c);
15476  }
15477  else {
15478  result = tCONSTANT; /* assume provisionally */
15479  pushback(p, c);
15480  }
15481  tokfix(p);
15482 
15483  if (IS_LABEL_POSSIBLE()) {
15484  if (IS_LABEL_SUFFIX(0)) {
15485  SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
15486  nextc(p);
15488  return tLABEL;
15489  }
15490  }
15491  if (mb == ENC_CODERANGE_7BIT && !IS_lex_state(EXPR_DOT)) {
15492  const struct kwtable *kw;
15493 
15494  /* See if it is a reserved word. */
15495  kw = rb_reserved_word(tok(p), toklen(p));
15496  if (kw) {
15497  enum lex_state_e state = p->lex.state;
15498  SET_LEX_STATE(kw->state);
15499  if (IS_lex_state_for(state, EXPR_FNAME)) {
15501  return kw->id[0];
15502  }
15503  if (IS_lex_state(EXPR_BEG)) {
15504  p->command_start = TRUE;
15505  }
15506  if (kw->id[0] == keyword_do) {
15507  if (lambda_beginning_p()) {
15508  p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE in the body of "-> do ... end" */
15509  return keyword_do_LAMBDA;
15510  }
15511  if (COND_P()) return keyword_do_cond;
15512  if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
15513  return keyword_do_block;
15514  return keyword_do;
15515  }
15516  if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED)))
15517  return kw->id[0];
15518  else {
15519  if (kw->id[0] != kw->id[1])
15520  SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
15521  return kw->id[1];
15522  }
15523  }
15524  }
15525 
15526  if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
15527  if (cmd_state) {
15528  SET_LEX_STATE(EXPR_CMDARG);
15529  }
15530  else {
15531  SET_LEX_STATE(EXPR_ARG);
15532  }
15533  }
15534  else if (p->lex.state == EXPR_FNAME) {
15535  SET_LEX_STATE(EXPR_ENDFN);
15536  }
15537  else {
15538  SET_LEX_STATE(EXPR_END);
15539  }
15540 
15541  ident = tokenize_ident(p, last_state);
15542  if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
15543  if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
15544  (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
15545  lvar_defined(p, ident)) {
15546  SET_LEX_STATE(EXPR_END|EXPR_LABEL);
15547  }
15548  return result;
15549 }
15550 
15551 static enum yytokentype
15552 parser_yylex(struct parser_params *p)
15553 {
15554  register int c;
15555  int space_seen = 0;
15556  int cmd_state;
15557  int label;
15558  enum lex_state_e last_state;
15559  int fallthru = FALSE;
15560  int token_seen = p->token_seen;
15561 
15562  if (p->lex.strterm) {
15563  if (p->lex.strterm->flags & STRTERM_HEREDOC) {
15564  return here_document(p, &p->lex.strterm->u.heredoc);
15565  }
15566  else {
15567  token_flush(p);
15568  return parse_string(p, &p->lex.strterm->u.literal);
15569  }
15570  }
15571  cmd_state = p->command_start;
15572  p->command_start = FALSE;
15573  p->token_seen = TRUE;
15574  retry:
15575  last_state = p->lex.state;
15576 #ifndef RIPPER
15577  token_flush(p);
15578 #endif
15579  switch (c = nextc(p)) {
15580  case '\0': /* NUL */
15581  case '\004': /* ^D */
15582  case '\032': /* ^Z */
15583  case -1: /* end of script. */
15584  return 0;
15585 
15586  /* white spaces */
15587  case ' ': case '\t': case '\f': case '\r':
15588  case '\13': /* '\v' */
15589  space_seen = 1;
15590 #ifdef RIPPER
15591  while ((c = nextc(p))) {
15592  switch (c) {
15593  case ' ': case '\t': case '\f': case '\r':
15594  case '\13': /* '\v' */
15595  break;
15596  default:
15597  goto outofloop;
15598  }
15599  }
15600  outofloop:
15601  pushback(p, c);
15603 #endif
15604  goto retry;
15605 
15606  case '#': /* it's a comment */
15607  p->token_seen = token_seen;
15608  /* no magic_comment in shebang line */
15609  if (!parser_magic_comment(p, p->lex.pcur, p->lex.pend - p->lex.pcur)) {
15610  if (comment_at_top(p)) {
15611  set_file_encoding(p, p->lex.pcur, p->lex.pend);
15612  }
15613  }
15614  lex_goto_eol(p);
15616  fallthru = TRUE;
15617  /* fall through */
15618  case '\n':
15619  p->token_seen = token_seen;
15620  c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
15621  !IS_lex_state(EXPR_LABELED));
15622  if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
15623  if (!fallthru) {
15625  }
15626  fallthru = FALSE;
15627  if (!c && p->in_kwarg) {
15628  goto normal_newline;
15629  }
15630  goto retry;
15631  }
15632  while (1) {
15633  switch (c = nextc(p)) {
15634  case ' ': case '\t': case '\f': case '\r':
15635  case '\13': /* '\v' */
15636  space_seen = 1;
15637  break;
15638  case '#':
15639  pushback(p, c);
15640  if (space_seen) dispatch_scan_event(p, tSP);
15641  goto retry;
15642  case '&':
15643  case '.': {
15645  if (peek(p, '.') == (c == '&')) {
15646  pushback(p, c);
15648  goto retry;
15649  }
15650  }
15651  default:
15652  p->ruby_sourceline--;
15653  p->lex.nextline = p->lex.lastline;
15654  case -1: /* EOF no decrement*/
15655 #ifndef RIPPER
15656  if (p->lex.prevline && !p->eofp) p->lex.lastline = p->lex.prevline;
15657  p->lex.pbeg = RSTRING_PTR(p->lex.lastline);
15658  p->lex.pend = p->lex.pcur = p->lex.pbeg + RSTRING_LEN(p->lex.lastline);
15659  pushback(p, 1); /* always pushback */
15660  p->lex.ptok = p->lex.pcur;
15661 #else
15662  lex_goto_eol(p);
15663  if (c != -1) {
15664  p->lex.ptok = p->lex.pcur;
15665  }
15666 #endif
15667  goto normal_newline;
15668  }
15669  }
15670  normal_newline:
15671  p->command_start = TRUE;
15672  SET_LEX_STATE(EXPR_BEG);
15673  return '\n';
15674 
15675  case '*':
15676  if ((c = nextc(p)) == '*') {
15677  if ((c = nextc(p)) == '=') {
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 = tDSTAR;
15686  }
15687  else if (IS_BEG()) {
15688  c = tDSTAR;
15689  }
15690  else {
15691  c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
15692  }
15693  }
15694  else {
15695  if (c == '=') {
15696  set_yylval_id('*');
15697  SET_LEX_STATE(EXPR_BEG);
15698  return tOP_ASGN;
15699  }
15700  pushback(p, c);
15701  if (IS_SPCARG(c)) {
15702  rb_warning0("`*' interpreted as argument prefix");
15703  c = tSTAR;
15704  }
15705  else if (IS_BEG()) {
15706  c = tSTAR;
15707  }
15708  else {
15709  c = warn_balanced('*', "*", "argument prefix");
15710  }
15711  }
15712  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
15713  return c;
15714 
15715  case '!':
15716  c = nextc(p);
15717  if (IS_AFTER_OPERATOR()) {
15718  SET_LEX_STATE(EXPR_ARG);
15719  if (c == '@') {
15720  return '!';
15721  }
15722  }
15723  else {
15724  SET_LEX_STATE(EXPR_BEG);
15725  }
15726  if (c == '=') {
15727  return tNEQ;
15728  }
15729  if (c == '~') {
15730  return tNMATCH;
15731  }
15732  pushback(p, c);
15733  return '!';
15734 
15735  case '=':
15736  if (was_bol(p)) {
15737  /* skip embedded rd document */
15738  if (word_match_p(p, "begin", 5)) {
15739  int first_p = TRUE;
15740 
15741  lex_goto_eol(p);
15743  for (;;) {
15744  lex_goto_eol(p);
15745  if (!first_p) {
15747  }
15748  first_p = FALSE;
15749  c = nextc(p);
15750  if (c == -1) {
15751  compile_error(p, "embedded document meets end of file");
15752  return 0;
15753  }
15754  if (c == '=' && word_match_p(p, "end", 3)) {
15755  break;
15756  }
15757  pushback(p, c);
15758  }
15759  lex_goto_eol(p);
15761  goto retry;
15762  }
15763  }
15764 
15765  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
15766  if ((c = nextc(p)) == '=') {
15767  if ((c = nextc(p)) == '=') {
15768  return tEQQ;
15769  }
15770  pushback(p, c);
15771  return tEQ;
15772  }
15773  if (c == '~') {
15774  return tMATCH;
15775  }
15776  else if (c == '>') {
15777  return tASSOC;
15778  }
15779  pushback(p, c);
15780  return '=';
15781 
15782  case '<':
15783  c = nextc(p);
15784  if (c == '<' &&
15785  !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
15786  !IS_END() &&
15787  (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
15788  int token = heredoc_identifier(p);
15789  if (token) return token < 0 ? 0 : token;
15790  }
15791  if (IS_AFTER_OPERATOR()) {
15792  SET_LEX_STATE(EXPR_ARG);
15793  }
15794  else {
15795  if (IS_lex_state(EXPR_CLASS))
15796  p->command_start = TRUE;
15797  SET_LEX_STATE(EXPR_BEG);
15798  }
15799  if (c == '=') {
15800  if ((c = nextc(p)) == '>') {
15801  return tCMP;
15802  }
15803  pushback(p, c);
15804  return tLEQ;
15805  }
15806  if (c == '<') {
15807  if ((c = nextc(p)) == '=') {
15809  SET_LEX_STATE(EXPR_BEG);
15810  return tOP_ASGN;
15811  }
15812  pushback(p, c);
15813  return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
15814  }
15815  pushback(p, c);
15816  return '<';
15817 
15818  case '>':
15819  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
15820  if ((c = nextc(p)) == '=') {
15821  return tGEQ;
15822  }
15823  if (c == '>') {
15824  if ((c = nextc(p)) == '=') {
15826  SET_LEX_STATE(EXPR_BEG);
15827  return tOP_ASGN;
15828  }
15829  pushback(p, c);
15830  return tRSHFT;
15831  }
15832  pushback(p, c);
15833  return '>';
15834 
15835  case '"':
15836  label = (IS_LABEL_POSSIBLE() ? str_label : 0);
15837  p->lex.strterm = NEW_STRTERM(str_dquote | label, '"', 0);
15838  p->lex.ptok = p->lex.pcur-1;
15839  return tSTRING_BEG;
15840 
15841  case '`':
15842  if (IS_lex_state(EXPR_FNAME)) {
15843  SET_LEX_STATE(EXPR_ENDFN);
15844  return c;
15845  }
15846  if (IS_lex_state(EXPR_DOT)) {
15847  if (cmd_state)
15848  SET_LEX_STATE(EXPR_CMDARG);
15849  else
15850  SET_LEX_STATE(EXPR_ARG);
15851  return c;
15852  }
15853  p->lex.strterm = NEW_STRTERM(str_xquote, '`', 0);
15854  return tXSTRING_BEG;
15855 
15856  case '\'':
15857  label = (IS_LABEL_POSSIBLE() ? str_label : 0);
15858  p->lex.strterm = NEW_STRTERM(str_squote | label, '\'', 0);
15859  p->lex.ptok = p->lex.pcur-1;
15860  return tSTRING_BEG;
15861 
15862  case '?':
15863  return parse_qmark(p, space_seen);
15864 
15865  case '&':
15866  if ((c = nextc(p)) == '&') {
15867  SET_LEX_STATE(EXPR_BEG);
15868  if ((c = nextc(p)) == '=') {
15870  SET_LEX_STATE(EXPR_BEG);
15871  return tOP_ASGN;
15872  }
15873  pushback(p, c);
15874  return tANDOP;
15875  }
15876  else if (c == '=') {
15877  set_yylval_id('&');
15878  SET_LEX_STATE(EXPR_BEG);
15879  return tOP_ASGN;
15880  }
15881  else if (c == '.') {
15883  SET_LEX_STATE(EXPR_DOT);
15884  return tANDDOT;
15885  }
15886  pushback(p, c);
15887  if (IS_SPCARG(c)) {
15888  if ((c != ':') ||
15889  (c = peekc_n(p, 1)) == -1 ||
15890  !(c == '\'' || c == '"' ||
15891  is_identchar((p->lex.pcur+1), p->lex.pend, p->enc))) {
15892  rb_warning0("`&' interpreted as argument prefix");
15893  }
15894  c = tAMPER;
15895  }
15896  else if (IS_BEG()) {
15897  c = tAMPER;
15898  }
15899  else {
15900  c = warn_balanced('&', "&", "argument prefix");
15901  }
15902  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
15903  return c;
15904 
15905  case '|':
15906  if ((c = nextc(p)) == '|') {
15907  SET_LEX_STATE(EXPR_BEG);
15908  if ((c = nextc(p)) == '=') {
15910  SET_LEX_STATE(EXPR_BEG);
15911  return tOP_ASGN;
15912  }
15913  pushback(p, c);
15914  if (IS_lex_state_for(last_state, EXPR_BEG)) {
15915  c = '|';
15916  pushback(p, '|');
15917  return c;
15918  }
15919  return tOROP;
15920  }
15921  if (c == '=') {
15922  set_yylval_id('|');
15923  SET_LEX_STATE(EXPR_BEG);
15924  return tOP_ASGN;
15925  }
15926  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
15927  pushback(p, c);
15928  return '|';
15929 
15930  case '+':
15931  c = nextc(p);
15932  if (IS_AFTER_OPERATOR()) {
15933  SET_LEX_STATE(EXPR_ARG);
15934  if (c == '@') {
15935  return tUPLUS;
15936  }
15937  pushback(p, c);
15938  return '+';
15939  }
15940  if (c == '=') {
15941  set_yylval_id('+');
15942  SET_LEX_STATE(EXPR_BEG);
15943  return tOP_ASGN;
15944  }
15945  if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '+'))) {
15946  SET_LEX_STATE(EXPR_BEG);
15947  pushback(p, c);
15948  if (c != -1 && ISDIGIT(c)) {
15949  return parse_numeric(p, '+');
15950  }
15951  return tUPLUS;
15952  }
15953  SET_LEX_STATE(EXPR_BEG);
15954  pushback(p, c);
15955  return warn_balanced('+', "+", "unary operator");
15956 
15957  case '-':
15958  c = nextc(p);
15959  if (IS_AFTER_OPERATOR()) {
15960  SET_LEX_STATE(EXPR_ARG);
15961  if (c == '@') {
15962  return tUMINUS;
15963  }
15964  pushback(p, c);
15965  return '-';
15966  }
15967  if (c == '=') {
15968  set_yylval_id('-');
15969  SET_LEX_STATE(EXPR_BEG);
15970  return tOP_ASGN;
15971  }
15972  if (c == '>') {
15973  SET_LEX_STATE(EXPR_ENDFN);
15974  return tLAMBDA;
15975  }
15976  if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous(p, '-'))) {
15977  SET_LEX_STATE(EXPR_BEG);
15978  pushback(p, c);
15979  if (c != -1 && ISDIGIT(c)) {
15980  return tUMINUS_NUM;
15981  }
15982  return tUMINUS;
15983  }
15984  SET_LEX_STATE(EXPR_BEG);
15985  pushback(p, c);
15986  return warn_balanced('-', "-", "unary operator");
15987 
15988  case '.': {
15989  int is_beg = IS_BEG();
15990  SET_LEX_STATE(EXPR_BEG);
15991  if ((c = nextc(p)) == '.') {
15992  if ((c = nextc(p)) == '.') {
15993  if (p->lex.paren_nest == 0 && looking_at_eol_p(p)) {
15994  rb_warn0("... at EOL, should be parenthesized?");
15995  }
15996  return is_beg ? tBDOT3 : tDOT3;
15997  }
15998  pushback(p, c);
15999  return is_beg ? tBDOT2 : tDOT2;
16000  }
16001  pushback(p, c);
16002  if (c != -1 && ISDIGIT(c)) {
16003  char prev = p->lex.pcur-1 > p->lex.pbeg ? *(p->lex.pcur-2) : 0;
16004  parse_numeric(p, '.');
16005  if (ISDIGIT(prev)) {
16006  yyerror0("unexpected fraction part after numeric literal");
16007  }
16008  else {
16009  yyerror0("no .<digit> floating literal anymore; put 0 before dot");
16010  }
16011  SET_LEX_STATE(EXPR_END);
16012  p->lex.ptok = p->lex.pcur;
16013  goto retry;
16014  }
16015  set_yylval_id('.');
16016  SET_LEX_STATE(EXPR_DOT);
16017  return '.';
16018  }
16019 
16020  case '0': case '1': case '2': case '3': case '4':
16021  case '5': case '6': case '7': case '8': case '9':
16022  return parse_numeric(p, c);
16023 
16024  case ')':
16025  COND_POP();
16026  CMDARG_POP();
16027  SET_LEX_STATE(EXPR_ENDFN);
16028  p->lex.paren_nest--;
16029  return c;
16030 
16031  case ']':
16032  COND_POP();
16033  CMDARG_POP();
16034  SET_LEX_STATE(EXPR_END);
16035  p->lex.paren_nest--;
16036  return c;
16037 
16038  case '}':
16039  /* tSTRING_DEND does COND_POP and CMDARG_POP in the yacc's rule */
16040  if (!p->lex.brace_nest--) return tSTRING_DEND;
16041  COND_POP();
16042  CMDARG_POP();
16043  SET_LEX_STATE(EXPR_END);
16044  p->lex.paren_nest--;
16045  return c;
16046 
16047  case ':':
16048  c = nextc(p);
16049  if (c == ':') {
16050  if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
16051  SET_LEX_STATE(EXPR_BEG);
16052  return tCOLON3;
16053  }
16055  SET_LEX_STATE(EXPR_DOT);
16056  return tCOLON2;
16057  }
16058  if (IS_END() || ISSPACE(c) || c == '#') {
16059  pushback(p, c);
16060  c = warn_balanced(':', ":", "symbol literal");
16061  SET_LEX_STATE(EXPR_BEG);
16062  return c;
16063  }
16064  switch (c) {
16065  case '\'':
16066  p->lex.strterm = NEW_STRTERM(str_ssym, c, 0);
16067  break;
16068  case '"':
16069  p->lex.strterm = NEW_STRTERM(str_dsym, c, 0);
16070  break;
16071  default:
16072  pushback(p, c);
16073  break;
16074  }
16075  SET_LEX_STATE(EXPR_FNAME);
16076  return tSYMBEG;
16077 
16078  case '/':
16079  if (IS_BEG()) {
16080  p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
16081  return tREGEXP_BEG;
16082  }
16083  if ((c = nextc(p)) == '=') {
16084  set_yylval_id('/');
16085  SET_LEX_STATE(EXPR_BEG);
16086  return tOP_ASGN;
16087  }
16088  pushback(p, c);
16089  if (IS_SPCARG(c)) {
16090  arg_ambiguous(p, '/');
16091  p->lex.strterm = NEW_STRTERM(str_regexp, '/', 0);
16092  return tREGEXP_BEG;
16093  }
16094  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
16095  return warn_balanced('/', "/", "regexp literal");
16096 
16097  case '^':
16098  if ((c = nextc(p)) == '=') {
16099  set_yylval_id('^');
16100  SET_LEX_STATE(EXPR_BEG);
16101  return tOP_ASGN;
16102  }
16103  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
16104  pushback(p, c);
16105  return '^';
16106 
16107  case ';':
16108  SET_LEX_STATE(EXPR_BEG);
16109  p->command_start = TRUE;
16110  return ';';
16111 
16112  case ',':
16113  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16114  return ',';
16115 
16116  case '~':
16117  if (IS_AFTER_OPERATOR()) {
16118  if ((c = nextc(p)) != '@') {
16119  pushback(p, c);
16120  }
16121  SET_LEX_STATE(EXPR_ARG);
16122  }
16123  else {
16124  SET_LEX_STATE(EXPR_BEG);
16125  }
16126  return '~';
16127 
16128  case '(':
16129  if (IS_BEG()) {
16130  c = tLPAREN;
16131  }
16132  else if (!space_seen) {
16133  /* foo( ... ) => method call, no ambiguity */
16134  }
16135  else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
16136  c = tLPAREN_ARG;
16137  }
16138  else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
16139  rb_warning0("parentheses after method name is interpreted as "
16140  "an argument list, not a decomposed argument");
16141  }
16142  p->lex.paren_nest++;
16143  COND_PUSH(0);
16144  CMDARG_PUSH(0);
16145  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16146  return c;
16147 
16148  case '[':
16149  p->lex.paren_nest++;
16150  if (IS_AFTER_OPERATOR()) {
16151  if ((c = nextc(p)) == ']') {
16152  SET_LEX_STATE(EXPR_ARG);
16153  if ((c = nextc(p)) == '=') {
16154  return tASET;
16155  }
16156  pushback(p, c);
16157  return tAREF;
16158  }
16159  pushback(p, c);
16160  SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
16161  return '[';
16162  }
16163  else if (IS_BEG()) {
16164  c = tLBRACK;
16165  }
16166  else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
16167  c = tLBRACK;
16168  }
16169  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16170  COND_PUSH(0);
16171  CMDARG_PUSH(0);
16172  return c;
16173 
16174  case '{':
16175  ++p->lex.brace_nest;
16176  if (lambda_beginning_p())
16177  c = tLAMBEG;
16178  else if (IS_lex_state(EXPR_LABELED))
16179  c = tLBRACE; /* hash */
16180  else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
16181  c = '{'; /* block (primary) */
16182  else if (IS_lex_state(EXPR_ENDARG))
16183  c = tLBRACE_ARG; /* block (expr) */
16184  else
16185  c = tLBRACE; /* hash */
16186  if (c != tLBRACE) {
16187  p->command_start = TRUE;
16188  SET_LEX_STATE(EXPR_BEG);
16189  }
16190  else {
16191  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
16192  }
16193  ++p->lex.paren_nest; /* after lambda_beginning_p() */
16194  COND_PUSH(0);
16195  CMDARG_PUSH(0);
16196  return c;
16197 
16198  case '\\':
16199  c = nextc(p);
16200  if (c == '\n') {
16201  space_seen = 1;
16203  goto retry; /* skip \\n */
16204  }
16205  if (c == ' ') return tSP;
16206  if (ISSPACE(c)) return c;
16207  pushback(p, c);
16208  return '\\';
16209 
16210  case '%':
16211  return parse_percent(p, space_seen, last_state);
16212 
16213  case '$':
16214  return parse_gvar(p, last_state);
16215 
16216  case '@':
16217  return parse_atmark(p, last_state);
16218 
16219  case '_':
16220  if (was_bol(p) && whole_match_p(p, "__END__", 7, 0)) {
16221  p->ruby__end__seen = 1;
16222  p->eofp = 1;
16223 #ifndef RIPPER
16224  return -1;
16225 #else
16226  lex_goto_eol(p);
16228  return 0;
16229 #endif
16230  }
16231  newtok(p);
16232  break;
16233 
16234  default:
16235  if (!parser_is_identchar(p)) {
16236  compile_error(p, "Invalid char `\\x%02X' in expression", c);
16237  token_flush(p);
16238  goto retry;
16239  }
16240 
16241  newtok(p);
16242  break;
16243  }
16244 
16245  return parse_ident(p, c, cmd_state);
16246 }
16247 
16248 static enum yytokentype
16249 yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *p)
16250 {
16251  enum yytokentype t;
16252 
16253  p->lval = lval;
16254  lval->val = Qundef;
16255  t = parser_yylex(p);
16256  if (has_delayed_token(p))
16257  dispatch_delayed_token(p, t);
16258  else if (t != 0)
16259  dispatch_scan_event(p, t);
16260 
16261  if (p->lex.strterm && (p->lex.strterm->flags & STRTERM_HEREDOC))
16263  else
16264  RUBY_SET_YYLLOC(*yylloc);
16265 
16266  return t;
16267 }
16268 
16269 #define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
16270 
16271 static NODE*
16272 node_newnode(struct parser_params *p, enum node_type type, VALUE a0, VALUE a1, VALUE a2, const rb_code_location_t *loc)
16273 {
16274  NODE *n = rb_ast_newnode(p->ast, type);
16275 
16276  rb_node_init(n, type, a0, a1, a2);
16277 
16278  nd_set_loc(n, loc);
16279  nd_set_node_id(n, parser_get_node_id(p));
16280  return n;
16281 }
16282 
16283 static NODE *
16284 nd_set_loc(NODE *nd, const YYLTYPE *loc)
16285 {
16286  nd->nd_loc = *loc;
16287  nd_set_line(nd, loc->beg_pos.lineno);
16288  return nd;
16289 }
16290 
16291 #ifndef RIPPER
16292 static enum node_type
16293 nodetype(NODE *node) /* for debug */
16294 {
16295  return (enum node_type)nd_type(node);
16296 }
16297 
16298 static int
16299 nodeline(NODE *node)
16300 {
16301  return nd_line(node);
16302 }
16303 
16304 static NODE*
16305 newline_node(NODE *node)
16306 {
16307  if (node) {
16308  node = remove_begin(node);
16309  node->flags |= NODE_FL_NEWLINE;
16310  }
16311  return node;
16312 }
16313 
16314 static void
16315 fixpos(NODE *node, NODE *orig)
16316 {
16317  if (!node) return;
16318  if (!orig) return;
16319  nd_set_line(node, nd_line(orig));
16320 }
16321 
16322 static void
16323 parser_warning(struct parser_params *p, NODE *node, const char *mesg)
16324 {
16325  rb_compile_warning(p->ruby_sourcefile, nd_line(node), "%s", mesg);
16326 }
16327 
16328 static void
16329 parser_warn(struct parser_params *p, NODE *node, const char *mesg)
16330 {
16331  rb_compile_warn(p->ruby_sourcefile, nd_line(node), "%s", mesg);
16332 }
16333 
16334 static NODE*
16335 block_append(struct parser_params *p, NODE *head, NODE *tail)
16336 {
16337  NODE *end, *h = head, *nd;
16338 
16339  if (tail == 0) return head;
16340 
16341  if (h == 0) return tail;
16342  switch (nd_type(h)) {
16343  case NODE_LIT:
16344  case NODE_STR:
16345  case NODE_SELF:
16346  case NODE_TRUE:
16347  case NODE_FALSE:
16348  case NODE_NIL:
16349  parser_warning(p, h, "unused literal ignored");
16350  return tail;
16351  default:
16352  h = end = NEW_BLOCK(head, &head->nd_loc);
16353  end->nd_end = end;
16354  head = end;
16355  break;
16356  case NODE_BLOCK:
16357  end = h->nd_end;
16358  break;
16359  }
16360 
16361  nd = end->nd_head;
16362  switch (nd_type(nd)) {
16363  case NODE_RETURN:
16364  case NODE_BREAK:
16365  case NODE_NEXT:
16366  case NODE_REDO:
16367  case NODE_RETRY:
16368  if (RTEST(ruby_verbose)) {
16369  parser_warning(p, tail, "statement not reached");
16370  }
16371  break;
16372 
16373  default:
16374  break;
16375  }
16376 
16377  if (nd_type(tail) != NODE_BLOCK) {
16378  tail = NEW_BLOCK(tail, &tail->nd_loc);
16379  tail->nd_end = tail;
16380  }
16381  end->nd_next = tail;
16382  h->nd_end = tail->nd_end;
16383  nd_set_last_loc(head, nd_last_loc(tail));
16384  return head;
16385 }
16386 
16387 /* append item to the list */
16388 static NODE*
16389 list_append(struct parser_params *p, NODE *list, NODE *item)
16390 {
16391  NODE *last;
16392 
16393  if (list == 0) return NEW_LIST(item, &item->nd_loc);
16394  if (list->nd_next) {
16395  last = list->nd_next->nd_end;
16396  }
16397  else {
16398  last = list;
16399  }
16400 
16401  list->nd_alen += 1;
16402  last->nd_next = NEW_LIST(item, &item->nd_loc);
16403  list->nd_next->nd_end = last->nd_next;
16404 
16406 
16407  return list;
16408 }
16409 
16410 /* concat two lists */
16411 static NODE*
16412 list_concat(NODE *head, NODE *tail)
16413 {
16414  NODE *last;
16415 
16416  if (head->nd_next) {
16417  last = head->nd_next->nd_end;
16418  }
16419  else {
16420  last = head;
16421  }
16422 
16423  head->nd_alen += tail->nd_alen;
16424  last->nd_next = tail;
16425  if (tail->nd_next) {
16426  head->nd_next->nd_end = tail->nd_next->nd_end;
16427  }
16428  else {
16429  head->nd_next->nd_end = tail;
16430  }
16431 
16432  nd_set_last_loc(head, nd_last_loc(tail));
16433 
16434  return head;
16435 }
16436 
16437 static int
16438 literal_concat0(struct parser_params *p, VALUE head, VALUE tail)
16439 {
16440  if (NIL_P(tail)) return 1;
16441  if (!rb_enc_compatible(head, tail)) {
16442  compile_error(p, "string literal encodings differ (%s / %s)",
16443  rb_enc_name(rb_enc_get(head)),
16444  rb_enc_name(rb_enc_get(tail)));
16445  rb_str_resize(head, 0);
16446  rb_str_resize(tail, 0);
16447  return 0;
16448  }
16449  rb_str_buf_append(head, tail);
16450  return 1;
16451 }
16452 
16453 /* concat two string literals */
16454 static NODE *
16455 literal_concat(struct parser_params *p, NODE *head, NODE *tail, const YYLTYPE *loc)
16456 {
16457  enum node_type htype;
16458  NODE *headlast;
16459  VALUE lit;
16460 
16461  if (!head) return tail;
16462  if (!tail) return head;
16463 
16464  htype = nd_type(head);
16465  if (htype == NODE_EVSTR) {
16466  NODE *node = NEW_DSTR(STR_NEW0(), loc);
16467  RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
16468  head = list_append(p, node, head);
16469  htype = NODE_DSTR;
16470  }
16471  if (p->heredoc_indent > 0) {
16472  switch (htype) {
16473  case NODE_STR:
16474  nd_set_type(head, NODE_DSTR);
16475  case NODE_DSTR:
16476  return list_append(p, head, tail);
16477  default:
16478  break;
16479  }
16480  }
16481  switch (nd_type(tail)) {
16482  case NODE_STR:
16483  if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) &&
16484  nd_type(headlast) == NODE_STR) {
16485  htype = NODE_STR;
16486  lit = headlast->nd_lit;
16487  }
16488  else {
16489  lit = head->nd_lit;
16490  }
16491  if (htype == NODE_STR) {
16492  if (!literal_concat0(p, lit, tail->nd_lit)) {
16493  error:
16494  rb_discard_node(p, head);
16495  rb_discard_node(p, tail);
16496  return 0;
16497  }
16498  rb_discard_node(p, tail);
16499  }
16500  else {
16501  list_append(p, head, tail);
16502  }
16503  break;
16504 
16505  case NODE_DSTR:
16506  if (htype == NODE_STR) {
16507  if (!literal_concat0(p, head->nd_lit, tail->nd_lit))
16508  goto error;
16509  tail->nd_lit = head->nd_lit;
16510  rb_discard_node(p, head);
16511  head = tail;
16512  }
16513  else if (NIL_P(tail->nd_lit)) {
16514  append:
16515  head->nd_alen += tail->nd_alen - 1;
16516  head->nd_next->nd_end->nd_next = tail->nd_next;
16517  head->nd_next->nd_end = tail->nd_next->nd_end;
16518  rb_discard_node(p, tail);
16519  }
16520  else if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) &&
16521  nd_type(headlast) == NODE_STR) {
16522  lit = headlast->nd_lit;
16523  if (!literal_concat0(p, lit, tail->nd_lit))
16524  goto error;
16525  tail->nd_lit = Qnil;
16526  goto append;
16527  }
16528  else {
16529  list_concat(head, NEW_NODE(NODE_LIST, NEW_STR(tail->nd_lit, loc), tail->nd_alen, tail->nd_next, loc));
16530  }
16531  break;
16532 
16533  case NODE_EVSTR:
16534  if (htype == NODE_STR) {
16535  nd_set_type(head, NODE_DSTR);
16536  head->nd_alen = 1;
16537  }
16538  list_append(p, head, tail);
16539  break;
16540  }
16541  return head;
16542 }
16543 
16544 static NODE *
16545 evstr2dstr(struct parser_params *p, NODE *node)
16546 {
16547  if (nd_type(node) == NODE_EVSTR) {
16548  NODE * dstr = NEW_DSTR(STR_NEW0(), &node->nd_loc);
16549  RB_OBJ_WRITTEN(p->ast, Qnil, dstr->nd_lit);
16550  node = list_append(p, dstr, node);
16551  }
16552  return node;
16553 }
16554 
16555 static NODE *
16556 new_evstr(struct parser_params *p, NODE *node, const YYLTYPE *loc)
16557 {
16558  NODE *head = node;
16559 
16560  if (node) {
16561  switch (nd_type(node)) {
16562  case NODE_STR: case NODE_DSTR: case NODE_EVSTR:
16563  return node;
16564  }
16565  }
16566  return NEW_EVSTR(head, loc);
16567 }
16568 
16569 static NODE *
16570 call_bin_op(struct parser_params *p, NODE *recv, ID id, NODE *arg1,
16571  const YYLTYPE *op_loc, const YYLTYPE *loc)
16572 {
16573  NODE *expr;
16574  value_expr(recv);
16575  value_expr(arg1);
16576  expr = NEW_OPCALL(recv, id, NEW_LIST(arg1, &arg1->nd_loc), loc);
16577  nd_set_line(expr, op_loc->beg_pos.lineno);
16578  return expr;
16579 }
16580 
16581 static NODE *
16582 call_uni_op(struct parser_params *p, NODE *recv, ID id, const YYLTYPE *op_loc, const YYLTYPE *loc)
16583 {
16584  NODE *opcall;
16585  value_expr(recv);
16586  opcall = NEW_OPCALL(recv, id, 0, loc);
16587  nd_set_line(opcall, op_loc->beg_pos.lineno);
16588  return opcall;
16589 }
16590 
16591 static NODE *
16592 new_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, const YYLTYPE *op_loc, const YYLTYPE *loc)
16593 {
16594  NODE *qcall = NEW_QCALL(atype, recv, mid, args, loc);
16595  nd_set_line(qcall, op_loc->beg_pos.lineno);
16596  return qcall;
16597 }
16598 
16599 static NODE*
16600 new_command_qcall(struct parser_params* p, ID atype, NODE *recv, ID mid, NODE *args, NODE *block, const YYLTYPE *op_loc, const YYLTYPE *loc)
16601 {
16602  NODE *ret;
16603  if (block) block_dup_check(p, args, block);
16604  ret = new_qcall(p, atype, recv, mid, args, op_loc, loc);
16605  if (block) ret = method_add_block(p, ret, block, loc);
16606  fixpos(ret, recv);
16607  return ret;
16608 }
16609 
16610 #define nd_once_body(node) (nd_type(node) == NODE_ONCE ? (node)->nd_body : node)
16611 static NODE*
16612 match_op(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *op_loc, const YYLTYPE *loc)
16613 {
16614  NODE *n;
16615  int line = op_loc->beg_pos.lineno;
16616 
16617  value_expr(node1);
16618  value_expr(node2);
16619  if (node1 && (n = nd_once_body(node1)) != 0) {
16620  switch (nd_type(n)) {
16621  case NODE_DREGX:
16622  {
16623  NODE *match = NEW_MATCH2(node1, node2, loc);
16624  nd_set_line(match, line);
16625  return match;
16626  }
16627 
16628  case NODE_LIT:
16629  if (RB_TYPE_P(n->nd_lit, T_REGEXP)) {
16630  const VALUE lit = n->nd_lit;
16631  NODE *match = NEW_MATCH2(node1, node2, loc);
16632  match->nd_args = reg_named_capture_assign(p, lit, loc);
16633  nd_set_line(match, line);
16634  return match;
16635  }
16636  }
16637  }
16638 
16639  if (node2 && (n = nd_once_body(node2)) != 0) {
16640  NODE *match3;
16641 
16642  switch (nd_type(n)) {
16643  case NODE_LIT:
16644  if (!RB_TYPE_P(n->nd_lit, T_REGEXP)) break;
16645  /* fallthru */
16646  case NODE_DREGX:
16647  match3 = NEW_MATCH3(node2, node1, loc);
16648  return match3;
16649  }
16650  }
16651 
16652  n = NEW_CALL(node1, tMATCH, NEW_LIST(node2, &node2->nd_loc), loc);
16653  nd_set_line(n, line);
16654  return n;
16655 }
16656 
16657 # if WARN_PAST_SCOPE
16658 static int
16659 past_dvar_p(struct parser_params *p, ID id)
16660 {
16661  struct vtable *past = p->lvtbl->past;
16662  while (past) {
16663  if (vtable_included(past, id)) return 1;
16664  past = past->prev;
16665  }
16666  return 0;
16667 }
16668 # endif
16669 
16670 /* As Ripper#warn does not have arguments for the location, so the
16671  * following messages cannot be separated */
16672 #define WARN_LOCATION(type) do { \
16673  if (p->warn_location) { \
16674  int line; \
16675  VALUE file = rb_source_location(&line); \
16676  rb_warn3(type" in eval may not return location in binding;" \
16677  " use Binding#source_location instead\n" \
16678  "%"PRIsWARN":%d: warning: in `%"PRIsWARN"'", \
16679  file, WARN_I(line), rb_id2str(rb_frame_this_func())); \
16680  } \
16681 } while (0)
16682 
16683 static int
16684 numparam_nested_p(struct parser_params *p)
16685 {
16686  struct local_vars *local = p->lvtbl;
16687  NODE *outer = local->numparam.outer;
16688  NODE *inner = local->numparam.inner;
16689  if (outer || inner) {
16690  NODE *used = outer ? outer : inner;
16691  compile_error(p, "numbered parameter is already used in\n"
16692  "%s:%d: %s block here",
16694  outer ? "outer" : "inner");
16695  parser_show_error_line(p, &used->nd_loc);
16696  return 1;
16697  }
16698  return 0;
16699 }
16700 
16701 static NODE*
16702 gettable(struct parser_params *p, ID id, const YYLTYPE *loc)
16703 {
16704  ID *vidp = NULL;
16705  NODE *node;
16706  switch (id) {
16707  case keyword_self:
16708  return NEW_SELF(loc);
16709  case keyword_nil:
16710  return NEW_NIL(loc);
16711  case keyword_true:
16712  return NEW_TRUE(loc);
16713  case keyword_false:
16714  return NEW_FALSE(loc);
16715  case keyword__FILE__:
16716  WARN_LOCATION("__FILE__");
16717  {
16718  VALUE file = p->ruby_sourcefile_string;
16719  if (NIL_P(file))
16720  file = rb_str_new(0, 0);
16721  else
16722  file = rb_str_dup(file);
16723  node = NEW_STR(file, loc);
16724  RB_OBJ_WRITTEN(p->ast, Qnil, file);
16725  }
16726  return node;
16727  case keyword__LINE__:
16728  WARN_LOCATION("__LINE__");
16729  return NEW_LIT(INT2FIX(p->tokline), loc);
16730  case keyword__ENCODING__:
16731  node = NEW_LIT(rb_enc_from_encoding(p->enc), loc);
16732  RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
16733  return node;
16734 
16735  }
16736  switch (id_type(id)) {
16737  case ID_LOCAL:
16738  if (dyna_in_block(p) && dvar_defined_ref(p, id, &vidp)) {
16739  if (NUMPARAM_ID_P(id) && numparam_nested_p(p)) return 0;
16740  if (id == p->cur_arg) {
16741  compile_error(p, "circular argument reference - %"PRIsWARN, rb_id2str(id));
16742  return 0;
16743  }
16744  if (vidp) *vidp |= LVAR_USED;
16745  node = NEW_DVAR(id, loc);
16746  return node;
16747  }
16748  if (local_id_ref(p, id, &vidp)) {
16749  if (id == p->cur_arg) {
16750  compile_error(p, "circular argument reference - %"PRIsWARN, rb_id2str(id));
16751  return 0;
16752  }
16753  if (vidp) *vidp |= LVAR_USED;
16754  node = NEW_LVAR(id, loc);
16755  return node;
16756  }
16757  if (dyna_in_block(p) && NUMPARAM_ID_P(id) &&
16758  parser_numbered_param(p, NUMPARAM_ID_TO_IDX(id))) {
16759  if (numparam_nested_p(p)) return 0;
16760  node = NEW_DVAR(id, loc);
16761  struct local_vars *local = p->lvtbl;
16762  if (!local->numparam.current) local->numparam.current = node;
16763  return node;
16764  }
16765 # if WARN_PAST_SCOPE
16766  if (!p->in_defined && RTEST(ruby_verbose) && past_dvar_p(p, id)) {
16767  rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
16768  }
16769 # endif
16770  /* method call without arguments */
16771  return NEW_VCALL(id, loc);
16772  case ID_GLOBAL:
16773  return NEW_GVAR(id, loc);
16774  case ID_INSTANCE:
16775  return NEW_IVAR(id, loc);
16776  case ID_CONST:
16777  return NEW_CONST(id, loc);
16778  case ID_CLASS:
16779  return NEW_CVAR(id, loc);
16780  }
16781  compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
16782  return 0;
16783 }
16784 
16785 static NODE *
16786 opt_arg_append(NODE *opt_list, NODE *opt)
16787 {
16788  NODE *opts = opt_list;
16789  opts->nd_loc.end_pos = opt->nd_loc.end_pos;
16790 
16791  while (opts->nd_next) {
16792  opts = opts->nd_next;
16793  opts->nd_loc.end_pos = opt->nd_loc.end_pos;
16794  }
16795  opts->nd_next = opt;
16796 
16797  return opt_list;
16798 }
16799 
16800 static NODE *
16801 kwd_append(NODE *kwlist, NODE *kw)
16802 {
16803  if (kwlist) {
16804  NODE *kws = kwlist;
16805  kws->nd_loc.end_pos = kw->nd_loc.end_pos;
16806  while (kws->nd_next) {
16807  kws = kws->nd_next;
16808  kws->nd_loc.end_pos = kw->nd_loc.end_pos;
16809  }
16810  kws->nd_next = kw;
16811  }
16812  return kwlist;
16813 }
16814 
16815 static NODE *
16816 new_defined(struct parser_params *p, NODE *expr, const YYLTYPE *loc)
16817 {
16818  return NEW_DEFINED(remove_begin_all(expr), loc);
16819 }
16820 
16821 static NODE*
16822 symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol)
16823 {
16824  if (nd_type(symbol) == NODE_DSTR) {
16825  nd_set_type(symbol, NODE_DSYM);
16826  }
16827  else {
16828  nd_set_type(symbol, NODE_LIT);
16829  RB_OBJ_WRITTEN(p->ast, Qnil, symbol->nd_lit = rb_str_intern(symbol->nd_lit));
16830  }
16831  return list_append(p, symbols, symbol);
16832 }
16833 
16834 static NODE *
16835 new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc)
16836 {
16837  NODE *list, *prev;
16838  VALUE lit;
16839 
16840  if (!node) {
16841  node = NEW_LIT(reg_compile(p, STR_NEW0(), options), loc);
16842  RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit);
16843  return node;
16844  }
16845  switch (nd_type(node)) {
16846  case NODE_STR:
16847  {
16848  VALUE src = node->nd_lit;
16849  nd_set_type(node, NODE_LIT);
16850  nd_set_loc(node, loc);
16851  RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit = reg_compile(p, src, options));
16852  }
16853  break;
16854  default:
16855  lit = STR_NEW0();
16856  node = NEW_NODE(NODE_DSTR, lit, 1, NEW_LIST(node, loc), loc);
16857  RB_OBJ_WRITTEN(p->ast, Qnil, lit);
16858  /* fall through */
16859  case NODE_DSTR:
16860  nd_set_type(node, NODE_DREGX);
16861  nd_set_loc(node, loc);
16862  node->nd_cflag = options & RE_OPTION_MASK;
16863  if (!NIL_P(node->nd_lit)) reg_fragment_check(p, node->nd_lit, options);
16864  for (list = (prev = node)->nd_next; list; list = list->nd_next) {
16865  if (nd_type(list->nd_head) == NODE_STR) {
16866  VALUE tail = list->nd_head->nd_lit;
16867  if (reg_fragment_check(p, tail, options) && prev && !NIL_P(prev->nd_lit)) {
16868  VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit;
16869  if (!literal_concat0(p, lit, tail)) {
16870  return NEW_NIL(loc); /* dummy node on error */
16871  }
16872  rb_str_resize(tail, 0);
16873  prev->nd_next = list->nd_next;
16874  rb_discard_node(p, list->nd_head);
16875  rb_discard_node(p, list);
16876  list = prev;
16877  }
16878  else {
16879  prev = list;
16880  }
16881  }
16882  else {
16883  prev = 0;
16884  }
16885  }
16886  if (!node->nd_next) {
16887  VALUE src = node->nd_lit;
16888  nd_set_type(node, NODE_LIT);
16889  RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit = reg_compile(p, src, options));
16890  }
16891  if (options & RE_OPTION_ONCE) {
16892  node = NEW_NODE(NODE_ONCE, 0, node, 0, loc);
16893  }
16894  break;
16895  }
16896  return node;
16897 }
16898 
16899 static NODE *
16900 new_kw_arg(struct parser_params *p, NODE *k, const YYLTYPE *loc)
16901 {
16902  if (!k) return 0;
16903  return NEW_KW_ARG(0, (k), loc);
16904 }
16905 
16906 static NODE *
16907 new_xstring(struct parser_params *p, NODE *node, const YYLTYPE *loc)
16908 {
16909  if (!node) {
16910  VALUE lit = STR_NEW0();
16911  NODE *xstr = NEW_XSTR(lit, loc);
16912  RB_OBJ_WRITTEN(p->ast, Qnil, lit);
16913  return xstr;
16914  }
16915  switch (nd_type(node)) {
16916  case NODE_STR:
16917  nd_set_type(node, NODE_XSTR);
16918  nd_set_loc(node, loc);
16919  break;
16920  case NODE_DSTR:
16921  nd_set_type(node, NODE_DXSTR);
16922  nd_set_loc(node, loc);
16923  break;
16924  default:
16925  node = NEW_NODE(NODE_DXSTR, Qnil, 1, NEW_LIST(node, loc), loc);
16926  break;
16927  }
16928  return node;
16929 }
16930 
16931 static void
16932 check_literal_when(struct parser_params *p, NODE *arg, const YYLTYPE *loc)
16933 {
16934  VALUE lit;
16935 
16936  if (!arg || !p->case_labels) return;
16937 
16939  if (lit == Qundef) return;
16940  if (nd_type(arg) == NODE_STR) {
16941  RB_OBJ_WRITTEN(p->ast, Qnil, arg->nd_lit = lit);
16942  }
16943 
16944  if (NIL_P(p->case_labels)) {
16946  }
16947  else {
16948  VALUE line = rb_hash_lookup(p->case_labels, lit);
16949  if (!NIL_P(line)) {
16950  rb_warning1("duplicated `when' clause with line %d is ignored",
16951  WARN_IVAL(line));
16952  return;
16953  }
16954  }
16956 }
16957 
16958 #else /* !RIPPER */
16959 static int
16960 id_is_var(struct parser_params *p, ID id)
16961 {
16962  if (is_notop_id(id)) {
16963  switch (id & ID_SCOPE_MASK) {
16964  case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
16965  return 1;
16966  case ID_LOCAL:
16967  if (dyna_in_block(p)) {
16968  if (NUMPARAM_ID_P(id) || dvar_defined(p, id)) return 1;
16969  }
16970  if (local_id(p, id)) return 1;
16971  /* method call without arguments */
16972  return 0;
16973  }
16974  }
16975  compile_error(p, "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
16976  return 0;
16977 }
16978 
16979 static VALUE
16980 new_regexp(struct parser_params *p, VALUE re, VALUE opt, const YYLTYPE *loc)
16981 {
16982  VALUE src = 0, err;
16983  int options = 0;
16984  if (ripper_is_node_yylval(re)) {
16985  src = RNODE(re)->nd_cval;
16986  re = RNODE(re)->nd_rval;
16987  }
16988  if (ripper_is_node_yylval(opt)) {
16989  options = (int)RNODE(opt)->nd_tag;
16990  opt = RNODE(opt)->nd_rval;
16991  }
16992  if (src && NIL_P(parser_reg_compile(p, src, options, &err))) {
16993  compile_error(p, "%"PRIsVALUE, err);
16994  }
16995  return dispatch2(regexp_literal, re, opt);
16996 }
16997 #endif /* !RIPPER */
16998 
16999 
17000 #ifndef RIPPER
17001 static const char rb_parser_lex_state_names[][8] = {
17002  "BEG", "END", "ENDARG", "ENDFN", "ARG",
17003  "CMDARG", "MID", "FNAME", "DOT", "CLASS",
17004  "LABEL", "LABELED","FITEM",
17005 };
17006 
17007 static VALUE
17008 append_lex_state_name(enum lex_state_e state, VALUE buf)
17009 {
17010  int i, sep = 0;
17011  unsigned int mask = 1;
17012  static const char none[] = "NONE";
17013 
17014  for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
17015  if ((unsigned)state & mask) {
17016  if (sep) {
17017  rb_str_cat(buf, "|", 1);
17018  }
17019  sep = 1;
17020  rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
17021  }
17022  }
17023  if (!sep) {
17024  rb_str_cat(buf, none, sizeof(none)-1);
17025  }
17026  return buf;
17027 }
17028 
17029 static void
17030 flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str)
17031 {
17032  VALUE mesg = p->debug_buffer;
17033 
17034  if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
17035  p->debug_buffer = Qnil;
17036  rb_io_puts(1, &mesg, out);
17037  }
17038  if (!NIL_P(str) && RSTRING_LEN(str)) {
17040  }
17041 }
17042 
17043 enum lex_state_e
17045  enum lex_state_e to, int line)
17046 {
17047  VALUE mesg;
17048  mesg = rb_str_new_cstr("lex_state: ");
17049  append_lex_state_name(from, mesg);
17050  rb_str_cat_cstr(mesg, " -> ");
17051  append_lex_state_name(to, mesg);
17052  rb_str_catf(mesg, " at line %d\n", line);
17053  flush_debug_buffer(p, p->debug_output, mesg);
17054  return to;
17055 }
17056 
17057 VALUE
17059 {
17060  return rb_fstring(append_lex_state_name(state, rb_str_new(0, 0)));
17061 }
17062 
17063 static void
17064 append_bitstack_value(stack_type stack, VALUE mesg)
17065 {
17066  if (stack == 0) {
17067  rb_str_cat_cstr(mesg, "0");
17068  }
17069  else {
17070  stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
17071  for (; mask && !(stack & mask); mask >>= 1) continue;
17072  for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
17073  }
17074 }
17075 
17076 void
17078  const char *name, int line)
17079 {
17080  VALUE mesg = rb_sprintf("%s: ", name);
17081  append_bitstack_value(stack, mesg);
17082  rb_str_catf(mesg, " at line %d\n", line);
17083  flush_debug_buffer(p, p->debug_output, mesg);
17084 }
17085 
17086 void
17087 rb_parser_fatal(struct parser_params *p, const char *fmt, ...)
17088 {
17089  va_list ap;
17090  VALUE mesg = rb_str_new_cstr("internal parser error: ");
17091 
17092  va_start(ap, fmt);
17093  rb_str_vcatf(mesg, fmt, ap);
17094  va_end(ap);
17095  parser_yyerror(p, NULL, RSTRING_PTR(mesg));
17096  RB_GC_GUARD(mesg);
17097 
17098  mesg = rb_str_new(0, 0);
17099  append_lex_state_name(p->lex.state, mesg);
17100  compile_error(p, "lex.state: %"PRIsVALUE, mesg);
17101  rb_str_resize(mesg, 0);
17102  append_bitstack_value(p->cond_stack, mesg);
17103  compile_error(p, "cond_stack: %"PRIsVALUE, mesg);
17104  rb_str_resize(mesg, 0);
17105  append_bitstack_value(p->cmdarg_stack, mesg);
17106  compile_error(p, "cmdarg_stack: %"PRIsVALUE, mesg);
17107  if (p->debug_output == rb_stdout)
17108  p->debug_output = rb_stderr;
17109  p->debug = TRUE;
17110 }
17111 
17112 YYLTYPE *
17114 {
17115  int sourceline = here->sourceline;
17116  int beg_pos = (int)here->offset - here->quote
17117  - (rb_strlen_lit("<<-") - !(here->func & STR_FUNC_INDENT));
17118  int end_pos = (int)here->offset + here->length + here->quote;
17119 
17120  yylloc->beg_pos.lineno = sourceline;
17121  yylloc->beg_pos.column = beg_pos;
17122  yylloc->end_pos.lineno = sourceline;
17123  yylloc->end_pos.column = end_pos;
17124  return yylloc;
17125 }
17126 
17127 YYLTYPE *
17129 {
17130  yylloc->beg_pos.lineno = p->ruby_sourceline;
17131  yylloc->beg_pos.column = (int)(p->lex.ptok - p->lex.pbeg);
17132  yylloc->end_pos.lineno = p->ruby_sourceline;
17133  yylloc->end_pos.column = (int)(p->lex.ptok - p->lex.pbeg);
17134  return yylloc;
17135 }
17136 
17137 YYLTYPE *
17139 {
17140  yylloc->beg_pos.lineno = p->ruby_sourceline;
17141  yylloc->beg_pos.column = (int)(p->lex.ptok - p->lex.pbeg);
17142  yylloc->end_pos.lineno = p->ruby_sourceline;
17143  yylloc->end_pos.column = (int)(p->lex.pcur - p->lex.pbeg);
17144  return yylloc;
17145 }
17146 #endif /* !RIPPER */
17147 
17148 static void
17149 parser_token_value_print(struct parser_params *p, enum yytokentype type, const YYSTYPE *valp)
17150 {
17151  VALUE v;
17152 
17153  switch (type) {
17154  case tIDENTIFIER: case tFID: case tGVAR: case tIVAR:
17155  case tCONSTANT: case tCVAR: case tLABEL: case tOP_ASGN:
17156 #ifndef RIPPER
17157  v = rb_id2str(valp->id);
17158 #else
17159  v = valp->node->nd_rval;
17160 #endif
17161  rb_parser_printf(p, "%"PRIsVALUE, v);
17162  break;
17163  case tINTEGER: case tFLOAT: case tRATIONAL: case tIMAGINARY:
17164  case tSTRING_CONTENT: case tCHAR:
17165 #ifndef RIPPER
17166  v = valp->node->nd_lit;
17167 #else
17168  v = valp->val;
17169 #endif
17170  rb_parser_printf(p, "%+"PRIsVALUE, v);
17171  break;
17172  case tNTH_REF:
17173 #ifndef RIPPER
17174  rb_parser_printf(p, "$%ld", valp->node->nd_nth);
17175 #else
17176  rb_parser_printf(p, "%"PRIsVALUE, valp->val);
17177 #endif
17178  break;
17179  case tBACK_REF:
17180 #ifndef RIPPER
17181  rb_parser_printf(p, "$%c", (int)valp->node->nd_nth);
17182 #else
17183  rb_parser_printf(p, "%"PRIsVALUE, valp->val);
17184 #endif
17185  break;
17186  default:
17187  break;
17188  }
17189 }
17190 
17191 static int
17192 assignable0(struct parser_params *p, ID id, const char **err)
17193 {
17194  if (!id) return -1;
17195  switch (id) {
17196  case keyword_self:
17197  *err = "Can't change the value of self";
17198  return -1;
17199  case keyword_nil:
17200  *err = "Can't assign to nil";
17201  return -1;
17202  case keyword_true:
17203  *err = "Can't assign to true";
17204  return -1;
17205  case keyword_false:
17206  *err = "Can't assign to false";
17207  return -1;
17208  case keyword__FILE__:
17209  *err = "Can't assign to __FILE__";
17210  return -1;
17211  case keyword__LINE__:
17212  *err = "Can't assign to __LINE__";
17213  return -1;
17214  case keyword__ENCODING__:
17215  *err = "Can't assign to __ENCODING__";
17216  return -1;
17217  }
17218  switch (id_type(id)) {
17219  case ID_LOCAL:
17220  if (dyna_in_block(p)) {
17221  if (p->max_numparam > NO_PARAM && NUMPARAM_ID_P(id)) {
17222  compile_error(p, "Can't assign to numbered parameter _%d",
17223  NUMPARAM_ID_TO_IDX(id));
17224  return -1;
17225  }
17226  if (dvar_curr(p, id)) return NODE_DASGN_CURR;
17227  if (dvar_defined(p, id)) return NODE_DASGN;
17228  if (local_id(p, id)) return NODE_LASGN;
17229  dyna_var(p, id);
17230  return NODE_DASGN_CURR;
17231  }
17232  else {
17233  if (!local_id(p, id)) local_var(p, id);
17234  return NODE_LASGN;
17235  }
17236  break;
17237  case ID_GLOBAL: return NODE_GASGN;
17238  case ID_INSTANCE: return NODE_IASGN;
17239  case ID_CONST:
17240  if (!p->in_def) return NODE_CDECL;
17241  *err = "dynamic constant assignment";
17242  return -1;
17243  case ID_CLASS: return NODE_CVASGN;
17244  default:
17245  compile_error(p, "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
17246  }
17247  return -1;
17248 }
17249 
17250 #ifndef RIPPER
17251 static NODE*
17252 assignable(struct parser_params *p, ID id, NODE *val, const YYLTYPE *loc)
17253 {
17254  const char *err = 0;
17255  int node_type = assignable0(p, id, &err);
17256  switch (node_type) {
17257  case NODE_DASGN_CURR: return NEW_DASGN_CURR(id, val, loc);
17258  case NODE_DASGN: return NEW_DASGN(id, val, loc);
17259  case NODE_LASGN: return NEW_LASGN(id, val, loc);
17260  case NODE_GASGN: return NEW_GASGN(id, val, loc);
17261  case NODE_IASGN: return NEW_IASGN(id, val, loc);
17262  case NODE_CDECL: return NEW_CDECL(id, val, 0, loc);
17263  case NODE_CVASGN: return NEW_CVASGN(id, val, loc);
17264  }
17265  if (err) yyerror1(loc, err);
17266  return NEW_BEGIN(0, loc);
17267 }
17268 #else
17269 static VALUE
17270 assignable(struct parser_params *p, VALUE lhs)
17271 {
17272  const char *err = 0;
17273  assignable0(p, get_id(lhs), &err);
17274  if (err) lhs = assign_error(p, lhs);
17275  return lhs;
17276 }
17277 #endif
17278 
17279 static int
17280 is_private_local_id(ID name)
17281 {
17282  VALUE s;
17283  if (name == idUScore) return 1;
17284  if (!is_local_id(name)) return 0;
17285  s = rb_id2str(name);
17286  if (!s) return 0;
17287  return RSTRING_PTR(s)[0] == '_';
17288 }
17289 
17290 static int
17291 shadowing_lvar_0(struct parser_params *p, ID name)
17292 {
17293  if (is_private_local_id(name)) return 1;
17294  if (dyna_in_block(p)) {
17295  if (dvar_curr(p, name)) {
17296  yyerror0("duplicated argument name");
17297  }
17298  else if (dvar_defined(p, name) || local_id(p, name)) {
17299  vtable_add(p->lvtbl->vars, name);
17300  if (p->lvtbl->used) {
17302  }
17303  return 0;
17304  }
17305  }
17306  else {
17307  if (local_id(p, name)) {
17308  yyerror0("duplicated argument name");
17309  }
17310  }
17311  return 1;
17312 }
17313 
17314 static ID
17315 shadowing_lvar(struct parser_params *p, ID name)
17316 {
17317  shadowing_lvar_0(p, name);
17318  return name;
17319 }
17320 
17321 static void
17322 new_bv(struct parser_params *p, ID name)
17323 {
17324  if (!name) return;
17325  if (!is_local_id(name)) {
17326  compile_error(p, "invalid local variable - %"PRIsVALUE,
17327  rb_id2str(name));
17328  return;
17329  }
17330  if (!shadowing_lvar_0(p, name)) return;
17331  dyna_var(p, name);
17332 }
17333 
17334 #ifndef RIPPER
17335 static NODE *
17336 aryset(struct parser_params *p, NODE *recv, NODE *idx, const YYLTYPE *loc)
17337 {
17338  return NEW_ATTRASGN(recv, tASET, idx, loc);
17339 }
17340 
17341 static void
17342 block_dup_check(struct parser_params *p, NODE *node1, NODE *node2)
17343 {
17344  if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) {
17345  compile_error(p, "both block arg and actual block given");
17346  }
17347 }
17348 
17349 static NODE *
17350 attrset(struct parser_params *p, NODE *recv, ID atype, ID id, const YYLTYPE *loc)
17351 {
17352  if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
17353  return NEW_ATTRASGN(recv, id, 0, loc);
17354 }
17355 
17356 static void
17357 rb_backref_error(struct parser_params *p, NODE *node)
17358 {
17359  switch (nd_type(node)) {
17360  case NODE_NTH_REF:
17361  compile_error(p, "Can't set variable $%ld", node->nd_nth);
17362  break;
17363  case NODE_BACK_REF:
17364  compile_error(p, "Can't set variable $%c", (int)node->nd_nth);
17365  break;
17366  }
17367 }
17368 
17369 static NODE *
17370 arg_append(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
17371 {
17372  if (!node1) return NEW_LIST(node2, &node2->nd_loc);
17373  switch (nd_type(node1)) {
17374  case NODE_LIST:
17375  return list_append(p, node1, node2);
17376  case NODE_BLOCK_PASS:
17377  node1->nd_head = arg_append(p, node1->nd_head, node2, loc);
17378  node1->nd_loc.end_pos = node1->nd_head->nd_loc.end_pos;
17379  return node1;
17380  case NODE_ARGSPUSH:
17381  node1->nd_body = list_append(p, NEW_LIST(node1->nd_body, &node1->nd_body->nd_loc), node2);
17382  node1->nd_loc.end_pos = node1->nd_body->nd_loc.end_pos;
17383  nd_set_type(node1, NODE_ARGSCAT);
17384  return node1;
17385  case NODE_ARGSCAT:
17386  if (nd_type(node1->nd_body) != NODE_LIST) break;
17387  node1->nd_body = list_append(p, node1->nd_body, node2);
17388  node1->nd_loc.end_pos = node1->nd_body->nd_loc.end_pos;
17389  return node1;
17390  }
17391  return NEW_ARGSPUSH(node1, node2, loc);
17392 }
17393 
17394 static NODE *
17395 arg_concat(struct parser_params *p, NODE *node1, NODE *node2, const YYLTYPE *loc)
17396 {
17397  if (!node2) return node1;
17398  switch (nd_type(node1)) {
17399  case NODE_BLOCK_PASS:
17400  if (node1->nd_head)
17401  node1->nd_head = arg_concat(p, node1->nd_head, node2, loc);
17402  else
17403  node1->nd_head = NEW_LIST(node2, loc);
17404  return node1;
17405  case NODE_ARGSPUSH:
17406  if (nd_type(node2) != NODE_LIST) break;
17407  node1->nd_body = list_concat(NEW_LIST(node1->nd_body, loc), node2);
17408  nd_set_type(node1, NODE_ARGSCAT);
17409  return node1;
17410  case NODE_ARGSCAT:
17411  if (nd_type(node2) != NODE_LIST ||
17412  nd_type(node1->nd_body) != NODE_LIST) break;
17413  node1->nd_body = list_concat(node1->nd_body, node2);
17414  return node1;
17415  }
17416  return NEW_ARGSCAT(node1, node2, loc);
17417 }
17418 
17419 static NODE *
17420 last_arg_append(struct parser_params *p, NODE *args, NODE *last_arg, const YYLTYPE *loc)
17421 {
17422  NODE *n1;
17423  if ((n1 = splat_array(args)) != 0) {
17424  return list_append(p, n1, last_arg);
17425  }
17426  return arg_append(p, args, last_arg, loc);
17427 }
17428 
17429 static NODE *
17430 rest_arg_append(struct parser_params *p, NODE *args, NODE *rest_arg, const YYLTYPE *loc)
17431 {
17432  NODE *n1;
17433  if ((nd_type(rest_arg) == NODE_LIST) && (n1 = splat_array(args)) != 0) {
17434  return list_concat(n1, rest_arg);
17435  }
17436  return arg_concat(p, args, rest_arg, loc);
17437 }
17438 
17439 static NODE *
17440 splat_array(NODE* node)
17441 {
17442  if (nd_type(node) == NODE_SPLAT) node = node->nd_head;
17443  if (nd_type(node) == NODE_LIST) return node;
17444  return 0;
17445 }
17446 
17447 static void
17448 mark_lvar_used(struct parser_params *p, NODE *rhs)
17449 {
17450  ID *vidp = NULL;
17451  if (!rhs) return;
17452  switch (nd_type(rhs)) {
17453  case NODE_LASGN:
17454  if (local_id_ref(p, rhs->nd_vid, &vidp)) {
17455  if (vidp) *vidp |= LVAR_USED;
17456  }
17457  break;
17458  case NODE_DASGN:
17459  case NODE_DASGN_CURR:
17460  if (dvar_defined_ref(p, rhs->nd_vid, &vidp)) {
17461  if (vidp) *vidp |= LVAR_USED;
17462  }
17463  break;
17464 #if 0
17465  case NODE_MASGN:
17466  for (rhs = rhs->nd_head; rhs; rhs = rhs->nd_next) {
17467  mark_lvar_used(p, rhs->nd_head);
17468  }
17469  break;
17470 #endif
17471  }
17472 }
17473 
17474 static NODE *
17475 node_assign(struct parser_params *p, NODE *lhs, NODE *rhs, const YYLTYPE *loc)
17476 {
17477  if (!lhs) return 0;
17478 
17479  switch (nd_type(lhs)) {
17480  case NODE_GASGN:
17481  case NODE_IASGN:
17482  case NODE_LASGN:
17483  case NODE_DASGN:
17484  case NODE_DASGN_CURR:
17485  case NODE_MASGN:
17486  case NODE_CDECL:
17487  case NODE_CVASGN:
17488  lhs->nd_value = rhs;
17489  nd_set_loc(lhs, loc);
17490  break;
17491 
17492  case NODE_ATTRASGN:
17493  lhs->nd_args = arg_append(p, lhs->nd_args, rhs, loc);
17494  nd_set_loc(lhs, loc);
17495  break;
17496 
17497  default:
17498  /* should not happen */
17499  break;
17500  }
17501 
17502  return lhs;
17503 }
17504 
17505 static NODE *
17506 value_expr_check(struct parser_params *p, NODE *node)
17507 {
17508  NODE *void_node = 0, *vn;
17509 
17510  if (!node) {
17511  rb_warning0("empty expression");
17512  }
17513  while (node) {
17514  switch (nd_type(node)) {
17515  case NODE_RETURN:
17516  case NODE_BREAK:
17517  case NODE_NEXT:
17518  case NODE_REDO:
17519  case NODE_RETRY:
17520  return void_node ? void_node : node;
17521 
17522  case NODE_CASE3:
17523  if (!node->nd_body || nd_type(node->nd_body) != NODE_IN) {
17524  compile_error(p, "unexpected node");
17525  return NULL;
17526  }
17527  if (node->nd_body->nd_body) {
17528  return NULL;
17529  }
17530  /* single line pattern matching */
17531  return void_node ? void_node : node;
17532 
17533  case NODE_BLOCK:
17534  while (node->nd_next) {
17535  node = node->nd_next;
17536  }
17537  node = node->nd_head;
17538  break;
17539 
17540  case NODE_BEGIN:
17541  node = node->nd_body;
17542  break;
17543 
17544  case NODE_IF:
17545  case NODE_UNLESS:
17546  if (!node->nd_body) {
17547  return NULL;
17548  }
17549  else if (!node->nd_else) {
17550  return NULL;
17551  }
17552  vn = value_expr_check(p, node->nd_body);
17553  if (!vn) return NULL;
17554  if (!void_node) void_node = vn;
17555  node = node->nd_else;
17556  break;
17557 
17558  case NODE_AND:
17559  case NODE_OR:
17560  node = node->nd_1st;
17561  break;
17562 
17563  case NODE_LASGN:
17564  case NODE_DASGN:
17565  case NODE_DASGN_CURR:
17566  case NODE_MASGN:
17567  mark_lvar_used(p, node);
17568  return NULL;
17569 
17570  default:
17571  return NULL;
17572  }
17573  }
17574 
17575  return NULL;
17576 }
17577 
17578 static int
17579 value_expr_gen(struct parser_params *p, NODE *node)
17580 {
17581  NODE *void_node = value_expr_check(p, node);
17582  if (void_node) {
17583  yyerror1(&void_node->nd_loc, "void value expression");
17584  /* or "control never reach"? */
17585  return FALSE;
17586  }
17587  return TRUE;
17588 }
17589 static void
17590 void_expr(struct parser_params *p, NODE *node)
17591 {
17592  const char *useless = 0;
17593 
17594  if (!RTEST(ruby_verbose)) return;
17595 
17596  if (!node || !(node = nd_once_body(node))) return;
17597  switch (nd_type(node)) {
17598  case NODE_OPCALL:
17599  switch (node->nd_mid) {
17600  case '+':
17601  case '-':
17602  case '*':
17603  case '/':
17604  case '%':
17605  case tPOW:
17606  case tUPLUS:
17607  case tUMINUS:
17608  case '|':
17609  case '^':
17610  case '&':
17611  case tCMP:
17612  case '>':
17613  case tGEQ:
17614  case '<':
17615  case tLEQ:
17616  case tEQ:
17617  case tNEQ:
17618  useless = rb_id2name(node->nd_mid);
17619  break;
17620  }
17621  break;
17622 
17623  case NODE_LVAR:
17624  case NODE_DVAR:
17625  case NODE_GVAR:
17626  case NODE_IVAR:
17627  case NODE_CVAR:
17628  case NODE_NTH_REF:
17629  case NODE_BACK_REF:
17630  useless = "a variable";
17631  break;
17632  case NODE_CONST:
17633  useless = "a constant";
17634  break;
17635  case NODE_LIT:
17636  case NODE_STR:
17637  case NODE_DSTR:
17638  case NODE_DREGX:
17639  useless = "a literal";
17640  break;
17641  case NODE_COLON2:
17642  case NODE_COLON3:
17643  useless = "::";
17644  break;
17645  case NODE_DOT2:
17646  useless = "..";
17647  break;
17648  case NODE_DOT3:
17649  useless = "...";
17650  break;
17651  case NODE_SELF:
17652  useless = "self";
17653  break;
17654  case NODE_NIL:
17655  useless = "nil";
17656  break;
17657  case NODE_TRUE:
17658  useless = "true";
17659  break;
17660  case NODE_FALSE:
17661  useless = "false";
17662  break;
17663  case NODE_DEFINED:
17664  useless = "defined?";
17665  break;
17666  }
17667 
17668  if (useless) {
17669  rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
17670  }
17671 }
17672 
17673 static NODE *
17674 void_stmts(struct parser_params *p, NODE *node)
17675 {
17676  NODE *const n = node;
17677  if (!RTEST(ruby_verbose)) return n;
17678  if (!node) return n;
17679  if (nd_type(node) != NODE_BLOCK) return n;
17680 
17681  while (node->nd_next) {
17682  void_expr(p, node->nd_head);
17683  node = node->nd_next;
17684  }
17685  return n;
17686 }
17687 
17688 static NODE *
17689 remove_begin(NODE *node)
17690 {
17691  NODE **n = &node, *n1 = node;
17692  while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) {
17693  *n = n1 = n1->nd_body;
17694  }
17695  return node;
17696 }
17697 
17698 static NODE *
17699 remove_begin_all(NODE *node)
17700 {
17701  NODE **n = &node, *n1 = node;
17702  while (n1 && nd_type(n1) == NODE_BEGIN) {
17703  *n = n1 = n1->nd_body;
17704  }
17705  return node;
17706 }
17707 
17708 static void
17709 reduce_nodes(struct parser_params *p, NODE **body)
17710 {
17711  NODE *node = *body;
17712 
17713  if (!node) {
17714  *body = NEW_NIL(&NULL_LOC);
17715  return;
17716  }
17717 #define subnodes(n1, n2) \
17718  ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \
17719  (!node->n2) ? (body = &node->n1, 1) : \
17720  (reduce_nodes(p, &node->n1), body = &node->n2, 1))
17721 
17722  while (node) {
17723  int newline = (int)(node->flags & NODE_FL_NEWLINE);
17724  switch (nd_type(node)) {
17725  end:
17726  case NODE_NIL:
17727  *body = 0;
17728  return;
17729  case NODE_RETURN:
17730  *body = node = node->nd_stts;
17731  if (newline && node) node->flags |= NODE_FL_NEWLINE;
17732  continue;
17733  case NODE_BEGIN:
17734  *body = node = node->nd_body;
17735  if (newline && node) node->flags |= NODE_FL_NEWLINE;
17736  continue;
17737  case NODE_BLOCK:
17738  body = &node->nd_end->nd_head;
17739  break;
17740  case NODE_IF:
17741  case NODE_UNLESS:
17742  if (subnodes(nd_body, nd_else)) break;
17743  return;
17744  case NODE_CASE:
17745  body = &node->nd_body;
17746  break;
17747  case NODE_WHEN:
17748  if (!subnodes(nd_body, nd_next)) goto end;
17749  break;
17750  case NODE_ENSURE:
17751  if (!subnodes(nd_head, nd_resq)) goto end;
17752  break;
17753  case NODE_RESCUE:
17754  if (node->nd_else) {
17755  body = &node->nd_resq;
17756  break;
17757  }
17758  if (!subnodes(nd_head, nd_resq)) goto end;
17759  break;
17760  default:
17761  return;
17762  }
17763  node = *body;
17764  if (newline && node) node->flags |= NODE_FL_NEWLINE;
17765  }
17766 
17767 #undef subnodes
17768 }
17769 
17770 static int
17771 is_static_content(NODE *node)
17772 {
17773  if (!node) return 1;
17774  switch (nd_type(node)) {
17775  case NODE_HASH:
17776  if (!(node = node->nd_head)) break;
17777  case NODE_LIST:
17778  do {
17779  if (!is_static_content(node->nd_head)) return 0;
17780  } while ((node = node->nd_next) != 0);
17781  case NODE_LIT:
17782  case NODE_STR:
17783  case NODE_NIL:
17784  case NODE_TRUE:
17785  case NODE_FALSE:
17786  case NODE_ZLIST:
17787  break;
17788  default:
17789  return 0;
17790  }
17791  return 1;
17792 }
17793 
17794 static int
17795 assign_in_cond(struct parser_params *p, NODE *node)
17796 {
17797  switch (nd_type(node)) {
17798  case NODE_MASGN:
17799  case NODE_LASGN:
17800  case NODE_DASGN:
17801  case NODE_DASGN_CURR:
17802  case NODE_GASGN:
17803  case NODE_IASGN:
17804  break;
17805 
17806  default:
17807  return 0;
17808  }
17809 
17810  if (!node->nd_value) return 1;
17811  if (is_static_content(node->nd_value)) {
17812  /* reports always */
17813  parser_warn(p, node->nd_value, "found `= literal' in conditional, should be ==");
17814  }
17815  return 1;
17816 }
17817 
17822 };
17823 
17824 #define SWITCH_BY_COND_TYPE(t, w, arg) \
17825  switch (t) { \
17826  case COND_IN_OP: break; \
17827  case COND_IN_COND: rb_##w##0(arg "literal in condition"); break; \
17828  case COND_IN_FF: rb_##w##0(arg "literal in flip-flop"); break; \
17829  }
17830 
17831 static NODE *cond0(struct parser_params*,NODE*,enum cond_type,const YYLTYPE*);
17832 
17833 static NODE*
17834 range_op(struct parser_params *p, NODE *node, const YYLTYPE *loc)
17835 {
17836  enum node_type type;
17837 
17838  if (node == 0) return 0;
17839 
17840  type = nd_type(node);
17841  value_expr(node);
17842  if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
17843  if (!e_option_supplied(p)) parser_warn(p, node, "integer literal in flip-flop");
17844  return NEW_CALL(node, tEQ, NEW_LIST(NEW_GVAR(rb_intern("$."), loc), loc), loc);
17845  }
17846  return cond0(p, node, COND_IN_FF, loc);
17847 }
17848 
17849 static NODE*
17850 cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *loc)
17851 {
17852  if (node == 0) return 0;
17853  if (!(node = nd_once_body(node))) return 0;
17854  assign_in_cond(p, node);
17855 
17856  switch (nd_type(node)) {
17857  case NODE_DSTR:
17858  case NODE_EVSTR:
17859  case NODE_STR:
17860  SWITCH_BY_COND_TYPE(type, warn, "string ")
17861  break;
17862 
17863  case NODE_DREGX:
17864  if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warning, "regex ")
17865 
17866  return NEW_MATCH2(node, NEW_GVAR(idLASTLINE, loc), loc);
17867 
17868  case NODE_AND:
17869  case NODE_OR:
17870  node->nd_1st = cond0(p, node->nd_1st, COND_IN_COND, loc);
17871  node->nd_2nd = cond0(p, node->nd_2nd, COND_IN_COND, loc);
17872  break;
17873 
17874  case NODE_DOT2:
17875  case NODE_DOT3:
17876  node->nd_beg = range_op(p, node->nd_beg, loc);
17877  node->nd_end = range_op(p, node->nd_end, loc);
17878  if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
17879  else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
17880  break;
17881 
17882  case NODE_DSYM:
17883  SWITCH_BY_COND_TYPE(type, warning, "string ")
17884  break;
17885 
17886  case NODE_LIT:
17887  if (RB_TYPE_P(node->nd_lit, T_REGEXP)) {
17888  if (!e_option_supplied(p)) SWITCH_BY_COND_TYPE(type, warn, "regex ")
17889  nd_set_type(node, NODE_MATCH);
17890  }
17891  else if (node->nd_lit == Qtrue ||
17892  node->nd_lit == Qfalse) {
17893  /* booleans are OK, e.g., while true */
17894  }
17895  else {
17896  SWITCH_BY_COND_TYPE(type, warning, "")
17897  }
17898  default:
17899  break;
17900  }
17901  return node;
17902 }
17903 
17904 static NODE*
17905 cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
17906 {
17907  if (node == 0) return 0;
17908  return cond0(p, node, COND_IN_COND, loc);
17909 }
17910 
17911 static NODE*
17912 method_cond(struct parser_params *p, NODE *node, const YYLTYPE *loc)
17913 {
17914  if (node == 0) return 0;
17915  return cond0(p, node, COND_IN_OP, loc);
17916 }
17917 
17918 static NODE*
17919 new_if(struct parser_params *p, NODE *cc, NODE *left, NODE *right, const YYLTYPE *loc)
17920 {
17921  if (!cc) return right;
17922  cc = cond0(p, cc, COND_IN_COND, loc);
17923  return newline_node(NEW_IF(cc, left, right, loc));
17924 }
17925 
17926 static NODE*
17927 new_unless(struct parser_params *p, NODE *cc, NODE *left, NODE *right, const YYLTYPE *loc)
17928 {
17929  if (!cc) return right;
17930  cc = cond0(p, cc, COND_IN_COND, loc);
17931  return newline_node(NEW_UNLESS(cc, left, right, loc));
17932 }
17933 
17934 static NODE*
17935 logop(struct parser_params *p, ID id, NODE *left, NODE *right,
17936  const YYLTYPE *op_loc, const YYLTYPE *loc)
17937 {
17938  enum node_type type = id == idAND || id == idANDOP ? NODE_AND : NODE_OR;
17939  NODE *op;
17940  value_expr(left);
17941  if (left && (enum node_type)nd_type(left) == type) {
17942  NODE *node = left, *second;
17943  while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) {
17944  node = second;
17945  }
17946  node->nd_2nd = NEW_NODE(type, second, right, 0, loc);
17947  nd_set_line(node->nd_2nd, op_loc->beg_pos.lineno);
17948  left->nd_loc.end_pos = loc->end_pos;
17949  return left;
17950  }
17951  op = NEW_NODE(type, left, right, 0, loc);
17952  nd_set_line(op, op_loc->beg_pos.lineno);
17953  return op;
17954 }
17955 
17956 static void
17957 no_blockarg(struct parser_params *p, NODE *node)
17958 {
17959  if (node && nd_type(node) == NODE_BLOCK_PASS) {
17960  compile_error(p, "block argument should not be given");
17961  }
17962 }
17963 
17964 static NODE *
17965 ret_args(struct parser_params *p, NODE *node)
17966 {
17967  if (node) {
17968  no_blockarg(p, node);
17969  if (nd_type(node) == NODE_LIST) {
17970  if (node->nd_next == 0) {
17971  node = node->nd_head;
17972  }
17973  else {
17974  nd_set_type(node, NODE_VALUES);
17975  }
17976  }
17977  }
17978  return node;
17979 }
17980 
17981 static NODE *
17982 new_yield(struct parser_params *p, NODE *node, const YYLTYPE *loc)
17983 {
17984  if (node) no_blockarg(p, node);
17985 
17986  return NEW_YIELD(node, loc);
17987 }
17988 
17989 static VALUE
17990 negate_lit(struct parser_params *p, VALUE lit)
17991 {
17992  if (FIXNUM_P(lit)) {
17993  return LONG2FIX(-FIX2LONG(lit));
17994  }
17995  if (SPECIAL_CONST_P(lit)) {
17996 #if USE_FLONUM
17997  if (FLONUM_P(lit)) {
17998  return DBL2NUM(-RFLOAT_VALUE(lit));
17999  }
18000 #endif
18001  goto unknown;
18002  }
18003  switch (BUILTIN_TYPE(lit)) {
18004  case T_BIGNUM:
18005  BIGNUM_NEGATE(lit);
18006  lit = rb_big_norm(lit);
18007  break;
18008  case T_RATIONAL:
18009  RRATIONAL_SET_NUM(lit, negate_lit(p, RRATIONAL(lit)->num));
18010  break;
18011  case T_COMPLEX:
18012  RCOMPLEX_SET_REAL(lit, negate_lit(p, RCOMPLEX(lit)->real));
18013  RCOMPLEX_SET_IMAG(lit, negate_lit(p, RCOMPLEX(lit)->imag));
18014  break;
18015  case T_FLOAT:
18016  RFLOAT(lit)->float_value = -RFLOAT_VALUE(lit);
18017  break;
18018  unknown:
18019  default:
18020  rb_parser_fatal(p, "unknown literal type (%s) passed to negate_lit",
18021  rb_builtin_class_name(lit));
18022  break;
18023  }
18024  return lit;
18025 }
18026 
18027 static NODE *
18028 arg_blk_pass(NODE *node1, NODE *node2)
18029 {
18030  if (node2) {
18031  if (!node1) return node2;
18032  node2->nd_head = node1;
18033  nd_set_first_lineno(node2, nd_first_lineno(node1));
18034  nd_set_first_column(node2, nd_first_column(node1));
18035  return node2;
18036  }
18037  return node1;
18038 }
18039 
18040 static bool
18041 args_info_empty_p(struct rb_args_info *args)
18042 {
18043  if (args->pre_args_num) return false;
18044  if (args->post_args_num) return false;
18045  if (args->rest_arg) return false;
18046  if (args->opt_args) return false;
18047  if (args->block_arg) return false;
18048  if (args->kw_args) return false;
18049  if (args->kw_rest_arg) return false;
18050  return true;
18051 }
18052 
18053 static NODE*
18054 new_args(struct parser_params *p, NODE *pre_args, NODE *opt_args, ID rest_arg, NODE *post_args, NODE *tail, const YYLTYPE *loc)
18055 {
18056  int saved_line = p->ruby_sourceline;
18057  struct rb_args_info *args = tail->nd_ainfo;
18058 
18059  args->pre_args_num = pre_args ? rb_long2int(pre_args->nd_plen) : 0;
18060  args->pre_init = pre_args ? pre_args->nd_next : 0;
18061 
18062  args->post_args_num = post_args ? rb_long2int(post_args->nd_plen) : 0;
18063  args->post_init = post_args ? post_args->nd_next : 0;
18064  args->first_post_arg = post_args ? post_args->nd_pid : 0;
18065 
18066  args->rest_arg = rest_arg;
18067 
18068  args->opt_args = opt_args;
18069 
18070  args->ruby2_keywords = rest_arg == idFWD_REST;
18071 
18072  p->ruby_sourceline = saved_line;
18073  nd_set_loc(tail, loc);
18074 
18075  return tail;
18076 }
18077 
18078 static NODE*
18079 new_args_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, ID block, const YYLTYPE *loc)
18080 {
18081  int saved_line = p->ruby_sourceline;
18082  NODE *node;
18084  struct rb_args_info *args = ZALLOC(struct rb_args_info);
18085  rb_imemo_tmpbuf_set_ptr(tmpbuf, args);
18086  args->imemo = tmpbuf;
18087  node = NEW_NODE(NODE_ARGS, 0, 0, args, &NULL_LOC);
18088  RB_OBJ_WRITTEN(p->ast, Qnil, tmpbuf);
18089  if (p->error_p) return node;
18090 
18091  args->block_arg = block;
18092  args->kw_args = kw_args;
18093 
18094  if (kw_args) {
18095  /*
18096  * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
18097  * variable order: k1, kr1, k2, &b, internal_id, krest
18098  * #=> <reorder>
18099  * variable order: kr1, k1, k2, internal_id, krest, &b
18100  */
18101  ID kw_bits = internal_id(p), *required_kw_vars, *kw_vars;
18102  struct vtable *vtargs = p->lvtbl->args;
18103  NODE *kwn = kw_args;
18104 
18105  vtable_pop(vtargs, !!block + !!kw_rest_arg);
18106  required_kw_vars = kw_vars = &vtargs->tbl[vtargs->pos];
18107  while (kwn) {
18108  if (!NODE_REQUIRED_KEYWORD_P(kwn->nd_body))
18109  --kw_vars;
18110  --required_kw_vars;
18111  kwn = kwn->nd_next;
18112  }
18113 
18114  for (kwn = kw_args; kwn; kwn = kwn->nd_next) {
18115  ID vid = kwn->nd_body->nd_vid;
18116  if (NODE_REQUIRED_KEYWORD_P(kwn->nd_body)) {
18117  *required_kw_vars++ = vid;
18118  }
18119  else {
18120  *kw_vars++ = vid;
18121  }
18122  }
18123 
18124  arg_var(p, kw_bits);
18125  if (kw_rest_arg) arg_var(p, kw_rest_arg);
18126  if (block) arg_var(p, block);
18127 
18128  args->kw_rest_arg = NEW_DVAR(kw_rest_arg, loc);
18129  args->kw_rest_arg->nd_cflag = kw_bits;
18130  }
18131  else if (kw_rest_arg == idNil) {
18132  args->no_kwarg = 1;
18133  }
18134  else if (kw_rest_arg) {
18135  args->kw_rest_arg = NEW_DVAR(kw_rest_arg, loc);
18136  }
18137 
18138  p->ruby_sourceline = saved_line;
18139  return node;
18140 }
18141 
18142 static NODE *
18143 args_with_numbered(struct parser_params *p, NODE *args, int max_numparam)
18144 {
18145  if (max_numparam > NO_PARAM) {
18146  if (!args) args = new_args_tail(p, 0, 0, 0, 0);
18147  args->nd_ainfo->pre_args_num = max_numparam;
18148  }
18149  return args;
18150 }
18151 
18152 static NODE*
18153 new_array_pattern(struct parser_params *p, NODE *constant, NODE *pre_arg, NODE *aryptn, const YYLTYPE *loc)
18154 {
18155  struct rb_ary_pattern_info *apinfo = aryptn->nd_apinfo;
18156 
18157  aryptn->nd_pconst = constant;
18158 
18159  if (pre_arg) {
18160  NODE *pre_args = NEW_LIST(pre_arg, loc);
18161  if (apinfo->pre_args) {
18162  apinfo->pre_args = list_concat(pre_args, apinfo->pre_args);
18163  }
18164  else {
18165  apinfo->pre_args = pre_args;
18166  }
18167  }
18168  return aryptn;
18169 }
18170 
18171 static NODE*
18172 new_array_pattern_tail(struct parser_params *p, NODE *pre_args, int has_rest, ID rest_arg, NODE *post_args, const YYLTYPE *loc)
18173 {
18174  int saved_line = p->ruby_sourceline;
18175  NODE *node;
18177  struct rb_ary_pattern_info *apinfo = ZALLOC(struct rb_ary_pattern_info);
18178  rb_imemo_tmpbuf_set_ptr(tmpbuf, apinfo);
18179  node = NEW_NODE(NODE_ARYPTN, 0, 0, apinfo, loc);
18180  apinfo->imemo = tmpbuf;
18181  RB_OBJ_WRITTEN(p->ast, Qnil, tmpbuf);
18182 
18183  apinfo->pre_args = pre_args;
18184 
18185  if (has_rest) {
18186  if (rest_arg) {
18187  apinfo->rest_arg = assignable(p, rest_arg, 0, loc);
18188  }
18189  else {
18191  }
18192  }
18193  else {
18194  apinfo->rest_arg = NULL;
18195  }
18196 
18197  apinfo->post_args = post_args;
18198 
18199  p->ruby_sourceline = saved_line;
18200  return node;
18201 }
18202 
18203 static NODE*
18204 new_hash_pattern(struct parser_params *p, NODE *constant, NODE *hshptn, const YYLTYPE *loc)
18205 {
18206  hshptn->nd_pconst = constant;
18207  return hshptn;
18208 }
18209 
18210 static NODE*
18211 new_hash_pattern_tail(struct parser_params *p, NODE *kw_args, ID kw_rest_arg, const YYLTYPE *loc)
18212 {
18213  int saved_line = p->ruby_sourceline;
18214  NODE *node, *kw_rest_arg_node;
18215 
18216  if (kw_rest_arg == idNil) {
18217  kw_rest_arg_node = NODE_SPECIAL_NO_REST_KEYWORD;
18218  }
18219  else if (kw_rest_arg) {
18220  kw_rest_arg_node = assignable(p, kw_rest_arg, 0, loc);
18221  }
18222  else {
18223  kw_rest_arg_node = NULL;
18224  }
18225 
18226  node = NEW_NODE(NODE_HSHPTN, 0, kw_args, kw_rest_arg_node, loc);
18227 
18228  p->ruby_sourceline = saved_line;
18229  return node;
18230 }
18231 
18232 static NODE *
18233 new_case3(struct parser_params *p, NODE *val, NODE *pat, const YYLTYPE *loc)
18234 {
18235  NODE *node = NEW_CASE3(val, pat, loc);
18236 
18238  rb_warn0L(nd_line(node), "Pattern matching is experimental, and the behavior may change in future versions of Ruby!");
18239  return node;
18240 }
18241 
18242 static NODE*
18243 dsym_node(struct parser_params *p, NODE *node, const YYLTYPE *loc)
18244 {
18245  VALUE lit;
18246 
18247  if (!node) {
18248  return NEW_LIT(ID2SYM(idNULL), loc);
18249  }
18250 
18251  switch (nd_type(node)) {
18252  case NODE_DSTR:
18253  nd_set_type(node, NODE_DSYM);
18254  nd_set_loc(node, loc);
18255  break;
18256  case NODE_STR:
18257  lit = node->nd_lit;
18258  RB_OBJ_WRITTEN(p->ast, Qnil, node->nd_lit = ID2SYM(rb_intern_str(lit)));
18259  nd_set_type(node, NODE_LIT);
18260  nd_set_loc(node, loc);
18261  break;
18262  default:
18263  node = NEW_NODE(NODE_DSYM, Qnil, 1, NEW_LIST(node, loc), loc);
18264  break;
18265  }
18266  return node;
18267 }
18268 
18269 static int
18270 append_literal_keys(st_data_t k, st_data_t v, st_data_t h)
18271 {
18272  NODE *node = (NODE *)v;
18273  NODE **result = (NODE **)h;
18274  node->nd_alen = 2;
18275  node->nd_next->nd_end = node->nd_next;
18276  node->nd_next->nd_next = 0;
18277  if (*result)
18278  list_concat(*result, node);
18279  else
18280  *result = node;
18281  return ST_CONTINUE;
18282 }
18283 
18284 static NODE *
18285 remove_duplicate_keys(struct parser_params *p, NODE *hash)
18286 {
18287  st_table *literal_keys = st_init_numtable_with_size(hash->nd_alen / 2);
18288  NODE *result = 0;
18289  rb_code_location_t loc = hash->nd_loc;
18290  while (hash && hash->nd_head && hash->nd_next) {
18291  NODE *head = hash->nd_head;
18292  NODE *value = hash->nd_next;
18293  NODE *next = value->nd_next;
18294  VALUE key = (VALUE)head;
18295  st_data_t data;
18296  if (nd_type(head) == NODE_LIT &&
18297  st_lookup(literal_keys, (key = head->nd_lit), &data)) {
18299  "key %+"PRIsVALUE" is duplicated and overwritten on line %d",
18300  head->nd_lit, nd_line(head));
18301  head = ((NODE *)data)->nd_next;
18302  head->nd_head = block_append(p, head->nd_head, value->nd_head);
18303  }
18304  else {
18305  st_insert(literal_keys, (st_data_t)key, (st_data_t)hash);
18306  }
18307  hash = next;
18308  }
18309  st_foreach(literal_keys, append_literal_keys, (st_data_t)&result);
18310  st_free_table(literal_keys);
18311  if (hash) {
18312  if (!result) result = hash;
18313  else list_concat(result, hash);
18314  }
18315  result->nd_loc = loc;
18316  return result;
18317 }
18318 
18319 static NODE *
18320 new_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
18321 {
18322  if (hash) hash = remove_duplicate_keys(p, hash);
18323  return NEW_HASH(hash, loc);
18324 }
18325 #endif
18326 
18327 static void
18328 error_duplicate_pattern_variable(struct parser_params *p, ID id, const YYLTYPE *loc)
18329 {
18330  if (is_private_local_id(id)) {
18331  return;
18332  }
18333  if (st_is_member(p->pvtbl, id)) {
18334  yyerror1(loc, "duplicated variable name");
18335  }
18336  else {
18337  st_insert(p->pvtbl, (st_data_t)id, 0);
18338  }
18339 }
18340 
18341 static void
18342 error_duplicate_pattern_key(struct parser_params *p, VALUE key, const YYLTYPE *loc)
18343 {
18344  if (!p->pktbl) {
18345  p->pktbl = st_init_numtable();
18346  }
18347  else if (st_is_member(p->pktbl, key)) {
18348  yyerror1(loc, "duplicated key name");
18349  return;
18350  }
18351  st_insert(p->pktbl, (st_data_t)key, 0);
18352 }
18353 
18354 #ifndef RIPPER
18355 static NODE *
18356 new_unique_key_hash(struct parser_params *p, NODE *hash, const YYLTYPE *loc)
18357 {
18358  return NEW_HASH(hash, loc);
18359 }
18360 #endif /* !RIPPER */
18361 
18362 #ifndef RIPPER
18363 static NODE *
18364 new_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc)
18365 {
18366  NODE *asgn;
18367 
18368  if (lhs) {
18369  ID vid = lhs->nd_vid;
18370  YYLTYPE lhs_loc = lhs->nd_loc;
18371  if (op == tOROP) {
18372  lhs->nd_value = rhs;
18373  nd_set_loc(lhs, loc);
18374  asgn = NEW_OP_ASGN_OR(gettable(p, vid, &lhs_loc), lhs, loc);
18375  if (is_notop_id(vid)) {
18376  switch (id_type(vid)) {
18377  case ID_GLOBAL:
18378  case ID_INSTANCE:
18379  case ID_CLASS:
18380  asgn->nd_aid = vid;
18381  }
18382  }
18383  }
18384  else if (op == tANDOP) {
18385  lhs->nd_value = rhs;
18386  nd_set_loc(lhs, loc);
18387  asgn = NEW_OP_ASGN_AND(gettable(p, vid, &lhs_loc), lhs, loc);
18388  }
18389  else {
18390  asgn = lhs;
18391  asgn->nd_value = NEW_CALL(gettable(p, vid, &lhs_loc), op, NEW_LIST(rhs, &rhs->nd_loc), loc);
18392  nd_set_loc(asgn, loc);
18393  }
18394  }
18395  else {
18396  asgn = NEW_BEGIN(0, loc);
18397  }
18398  return asgn;
18399 }
18400 
18401 static NODE *
18402 new_ary_op_assign(struct parser_params *p, NODE *ary,
18403  NODE *args, ID op, NODE *rhs, const YYLTYPE *args_loc, const YYLTYPE *loc)
18404 {
18405  NODE *asgn;
18406 
18407  args = make_list(args, args_loc);
18408  if (nd_type(args) == NODE_BLOCK_PASS) {
18409  args = NEW_ARGSCAT(args, rhs, loc);
18410  }
18411  else {
18412  args = arg_concat(p, args, rhs, loc);
18413  }
18414  asgn = NEW_OP_ASGN1(ary, op, args, loc);
18415  fixpos(asgn, ary);
18416  return asgn;
18417 }
18418 
18419 static NODE *
18420 new_attr_op_assign(struct parser_params *p, NODE *lhs,
18421  ID atype, ID attr, ID op, NODE *rhs, const YYLTYPE *loc)
18422 {
18423  NODE *asgn;
18424 
18425  asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs, loc);
18426  fixpos(asgn, lhs);
18427  return asgn;
18428 }
18429 
18430 static NODE *
18431 new_const_op_assign(struct parser_params *p, NODE *lhs, ID op, NODE *rhs, const YYLTYPE *loc)
18432 {
18433  NODE *asgn;
18434 
18435  if (lhs) {
18436  asgn = NEW_OP_CDECL(lhs, op, rhs, loc);
18437  }
18438  else {
18439  asgn = NEW_BEGIN(0, loc);
18440  }
18441  fixpos(asgn, lhs);
18442  return asgn;
18443 }
18444 
18445 static NODE *
18446 const_decl(struct parser_params *p, NODE *path, const YYLTYPE *loc)
18447 {
18448  if (p->in_def) {
18449  yyerror1(loc, "dynamic constant assignment");
18450  }
18451  return NEW_CDECL(0, 0, (path), loc);
18452 }
18453 #else
18454 static VALUE
18455 const_decl(struct parser_params *p, VALUE path)
18456 {
18457  if (p->in_def) {
18458  path = dispatch1(assign_error, path);
18459  ripper_error(p);
18460  }
18461  return path;
18462 }
18463 
18464 static VALUE
18465 assign_error(struct parser_params *p, VALUE a)
18466 {
18467  a = dispatch1(assign_error, a);
18468  ripper_error(p);
18469  return a;
18470 }
18471 
18472 static VALUE
18473 var_field(struct parser_params *p, VALUE a)
18474 {
18475  return ripper_new_yylval(p, get_id(a), dispatch1(var_field, a), 0);
18476 }
18477 #endif
18478 
18479 #ifndef RIPPER
18480 static NODE *
18481 new_bodystmt(struct parser_params *p, NODE *head, NODE *rescue, NODE *rescue_else, NODE *ensure, const YYLTYPE *loc)
18482 {
18483  NODE *result = head;
18484  if (rescue) {
18485  NODE *tmp = rescue_else ? rescue_else : rescue;
18486  YYLTYPE rescue_loc = code_loc_gen(&head->nd_loc, &tmp->nd_loc);
18487 
18488  result = NEW_RESCUE(head, rescue, rescue_else, &rescue_loc);
18489  nd_set_line(result, rescue->nd_loc.beg_pos.lineno);
18490  }
18491  else if (rescue_else) {
18492  result = block_append(p, result, rescue_else);
18493  }
18494  if (ensure) {
18495  result = NEW_ENSURE(result, ensure, loc);
18496  }
18497  fixpos(result, head);
18498  return result;
18499 }
18500 #endif
18501 
18502 static void
18503 warn_unused_var(struct parser_params *p, struct local_vars *local)
18504 {
18505  int cnt;
18506 
18507  if (!local->used) return;
18508  cnt = local->used->pos;
18509  if (cnt != local->vars->pos) {
18510  rb_parser_fatal(p, "local->used->pos != local->vars->pos");
18511  }
18512 #ifndef RIPPER
18513  ID *v = local->vars->tbl;
18514  ID *u = local->used->tbl;
18515  for (int i = 0; i < cnt; ++i) {
18516  if (!v[i] || (u[i] & LVAR_USED)) continue;
18517  if (is_private_local_id(v[i])) continue;
18518  rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
18519  }
18520 #endif
18521 }
18522 
18523 static void
18524 local_push(struct parser_params *p, int toplevel_scope)
18525 {
18526  struct local_vars *local;
18527  int inherits_dvars = toplevel_scope && compile_for_eval;
18528  int warn_unused_vars = RTEST(ruby_verbose);
18529 
18530  local = ALLOC(struct local_vars);
18531  local->prev = p->lvtbl;
18532  local->args = vtable_alloc(0);
18533  local->vars = vtable_alloc(inherits_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
18534 #ifndef RIPPER
18535  if (toplevel_scope && compile_for_eval) warn_unused_vars = 0;
18536  if (toplevel_scope && e_option_supplied(p)) warn_unused_vars = 0;
18537  local->numparam.outer = 0;
18538  local->numparam.inner = 0;
18539  local->numparam.current = 0;
18540 #endif
18541  local->used = warn_unused_vars ? vtable_alloc(0) : 0;
18542 
18543 # if WARN_PAST_SCOPE
18544  local->past = 0;
18545 # endif
18546  CMDARG_PUSH(0);
18547  COND_PUSH(0);
18548  p->lvtbl = local;
18549 }
18550 
18551 static void
18552 local_pop(struct parser_params *p)
18553 {
18554  struct local_vars *local = p->lvtbl->prev;
18555  if (p->lvtbl->used) {
18556  warn_unused_var(p, p->lvtbl);
18557  vtable_free(p->lvtbl->used);
18558  }
18559 # if WARN_PAST_SCOPE
18560  while (p->lvtbl->past) {
18561  struct vtable *past = p->lvtbl->past;
18562  p->lvtbl->past = past->prev;
18563  vtable_free(past);
18564  }
18565 # endif
18566  vtable_free(p->lvtbl->args);
18567  vtable_free(p->lvtbl->vars);
18568  CMDARG_POP();
18569  COND_POP();
18570  ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
18571  p->lvtbl = local;
18572 }
18573 
18574 #ifndef RIPPER
18575 static ID*
18576 local_tbl(struct parser_params *p)
18577 {
18578  int cnt_args = vtable_size(p->lvtbl->args);
18579  int cnt_vars = vtable_size(p->lvtbl->vars);
18580  int cnt = cnt_args + cnt_vars;
18581  int i, j;
18582  ID *buf;
18583  VALUE tbl = 0;
18584 
18585  if (cnt <= 0) return 0;
18587  buf = ALLOC_N(ID, cnt + 2);
18588  rb_imemo_tmpbuf_set_ptr(tbl, buf);
18589  MEMCPY(buf+1, p->lvtbl->args->tbl, ID, cnt_args);
18590  /* remove IDs duplicated to warn shadowing */
18591  for (i = 0, j = cnt_args+1; i < cnt_vars; ++i) {
18592  ID id = p->lvtbl->vars->tbl[i];
18593  if (!vtable_included(p->lvtbl->args, id)) {
18594  buf[j++] = id;
18595  }
18596  }
18597  if (--j < cnt) {
18598  REALLOC_N(buf, ID, (cnt = j) + 2);
18599  rb_imemo_tmpbuf_set_ptr(tbl, buf);
18600  }
18601  buf[0] = cnt;
18602  buf[cnt + 1] = (ID)tbl;
18603  RB_OBJ_WRITTEN(p->ast, Qnil, tbl);
18604 
18605  return buf;
18606 }
18607 
18608 static NODE*
18609 node_newnode_with_locals(struct parser_params *p, enum node_type type, VALUE a1, VALUE a2, const rb_code_location_t *loc)
18610 {
18611  ID *a0;
18612  NODE *n;
18613 
18614  a0 = local_tbl(p);
18615  n = NEW_NODE(type, a0, a1, a2, loc);
18616  return n;
18617 }
18618 
18619 #endif
18620 
18621 static void
18622 numparam_name(struct parser_params *p, ID id)
18623 {
18624  if (!NUMPARAM_ID_P(id)) return;
18625  rb_warn1("`_%d' is reserved for numbered parameter; consider another name",
18626  WARN_I(NUMPARAM_ID_TO_IDX(id)));
18627 }
18628 
18629 static void
18630 arg_var(struct parser_params *p, ID id)
18631 {
18632  numparam_name(p, id);
18633  vtable_add(p->lvtbl->args, id);
18634 }
18635 
18636 static void
18637 local_var(struct parser_params *p, ID id)
18638 {
18639  numparam_name(p, id);
18640  vtable_add(p->lvtbl->vars, id);
18641  if (p->lvtbl->used) {
18643  }
18644 }
18645 
18646 static int
18647 local_id_ref(struct parser_params *p, ID id, ID **vidrefp)
18648 {
18649  struct vtable *vars, *args, *used;
18650 
18651  vars = p->lvtbl->vars;
18652  args = p->lvtbl->args;
18653  used = p->lvtbl->used;
18654 
18655  while (vars && !DVARS_TERMINAL_P(vars->prev)) {
18656  vars = vars->prev;
18657  args = args->prev;
18658  if (used) used = used->prev;
18659  }
18660 
18661  if (vars && vars->prev == DVARS_INHERIT) {
18662  return rb_local_defined(id, p->parent_iseq);
18663  }
18664  else if (vtable_included(args, id)) {
18665  return 1;
18666  }
18667  else {
18668  int i = vtable_included(vars, id);
18669  if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
18670  return i != 0;
18671  }
18672 }
18673 
18674 static int
18675 local_id(struct parser_params *p, ID id)
18676 {
18677  return local_id_ref(p, id, NULL);
18678 }
18679 
18680 static NODE *
18681 numparam_push(struct parser_params *p)
18682 {
18683 #ifndef RIPPER
18684  struct local_vars *local = p->lvtbl;
18685  NODE *inner = local->numparam.inner;
18686  if (!local->numparam.outer) {
18687  local->numparam.outer = local->numparam.current;
18688  }
18689  local->numparam.inner = 0;
18690  local->numparam.current = 0;
18691  return inner;
18692 #else
18693  return 0;
18694 #endif
18695 }
18696 
18697 static void
18698 numparam_pop(struct parser_params *p, NODE *prev_inner)
18699 {
18700 #ifndef RIPPER
18701  struct local_vars *local = p->lvtbl;
18702  if (prev_inner) {
18703  /* prefer first one */
18704  local->numparam.inner = prev_inner;
18705  }
18706  else if (local->numparam.current) {
18707  /* current and inner are exclusive */
18708  local->numparam.inner = local->numparam.current;
18709  }
18710  if (p->max_numparam > NO_PARAM) {
18711  /* current and outer are exclusive */
18712  local->numparam.current = local->numparam.outer;
18713  local->numparam.outer = 0;
18714  }
18715  else {
18716  /* no numbered parameter */
18717  local->numparam.current = 0;
18718  }
18719 #endif
18720 }
18721 
18722 static const struct vtable *
18723 dyna_push(struct parser_params *p)
18724 {
18725  p->lvtbl->args = vtable_alloc(p->lvtbl->args);
18726  p->lvtbl->vars = vtable_alloc(p->lvtbl->vars);
18727  if (p->lvtbl->used) {
18728  p->lvtbl->used = vtable_alloc(p->lvtbl->used);
18729  }
18730  return p->lvtbl->args;
18731 }
18732 
18733 static void
18734 dyna_pop_vtable(struct parser_params *p, struct vtable **vtblp)
18735 {
18736  struct vtable *tmp = *vtblp;
18737  *vtblp = tmp->prev;
18738 # if WARN_PAST_SCOPE
18739  if (p->past_scope_enabled) {
18740  tmp->prev = p->lvtbl->past;
18741  p->lvtbl->past = tmp;
18742  return;
18743  }
18744 # endif
18745  vtable_free(tmp);
18746 }
18747 
18748 static void
18749 dyna_pop_1(struct parser_params *p)
18750 {
18751  struct vtable *tmp;
18752 
18753  if ((tmp = p->lvtbl->used) != 0) {
18754  warn_unused_var(p, p->lvtbl);
18755  p->lvtbl->used = p->lvtbl->used->prev;
18756  vtable_free(tmp);
18757  }
18758  dyna_pop_vtable(p, &p->lvtbl->args);
18759  dyna_pop_vtable(p, &p->lvtbl->vars);
18760 }
18761 
18762 static void
18763 dyna_pop(struct parser_params *p, const struct vtable *lvargs)
18764 {
18765  while (p->lvtbl->args != lvargs) {
18766  dyna_pop_1(p);
18767  if (!p->lvtbl->args) {
18768  struct local_vars *local = p->lvtbl->prev;
18769  ruby_sized_xfree(p->lvtbl, sizeof(*p->lvtbl));
18770  p->lvtbl = local;
18771  }
18772  }
18773  dyna_pop_1(p);
18774 }
18775 
18776 static int
18777 dyna_in_block(struct parser_params *p)
18778 {
18779  return !DVARS_TERMINAL_P(p->lvtbl->vars) && p->lvtbl->vars->prev != DVARS_TOPSCOPE;
18780 }
18781 
18782 static int
18783 dvar_defined_ref(struct parser_params *p, ID id, ID **vidrefp)
18784 {
18785  struct vtable *vars, *args, *used;
18786  int i;
18787 
18788  args = p->lvtbl->args;
18789  vars = p->lvtbl->vars;
18790  used = p->lvtbl->used;
18791 
18792  while (!DVARS_TERMINAL_P(vars)) {
18793  if (vtable_included(args, id)) {
18794  return 1;
18795  }
18796  if ((i = vtable_included(vars, id)) != 0) {
18797  if (used && vidrefp) *vidrefp = &used->tbl[i-1];
18798  return 1;
18799  }
18800  args = args->prev;
18801  vars = vars->prev;
18802  if (!vidrefp) used = 0;
18803  if (used) used = used->prev;
18804  }
18805 
18806  if (vars == DVARS_INHERIT) {
18807  return rb_dvar_defined(id, p->parent_iseq);
18808  }
18809 
18810  return 0;
18811 }
18812 
18813 static int
18814 dvar_defined(struct parser_params *p, ID id)
18815 {
18816  return dvar_defined_ref(p, id, NULL);
18817 }
18818 
18819 static int
18820 dvar_curr(struct parser_params *p, ID id)
18821 {
18822  return (vtable_included(p->lvtbl->args, id) ||
18823  vtable_included(p->lvtbl->vars, id));
18824 }
18825 
18826 static void
18827 reg_fragment_enc_error(struct parser_params* p, VALUE str, int c)
18828 {
18829  compile_error(p,
18830  "regexp encoding option '%c' differs from source encoding '%s'",
18831  c, rb_enc_name(rb_enc_get(str)));
18832 }
18833 
18834 #ifndef RIPPER
18835 int
18837 {
18838  int c = RE_OPTION_ENCODING_IDX(options);
18839 
18840  if (c) {
18841  int opt, idx;
18842  rb_char_to_option_kcode(c, &opt, &idx);
18843  if (idx != ENCODING_GET(str) &&
18845  goto error;
18846  }
18847  ENCODING_SET(str, idx);
18848  }
18849  else if (RE_OPTION_ENCODING_NONE(options)) {
18850  if (!ENCODING_IS_ASCII8BIT(str) &&
18852  c = 'n';
18853  goto error;
18854  }
18856  }
18857  else if (p->enc == rb_usascii_encoding()) {
18859  /* raise in re.c */
18861  }
18862  else {
18864  }
18865  }
18866  return 0;
18867 
18868  error:
18869  return c;
18870 }
18871 
18872 static void
18873 reg_fragment_setenc(struct parser_params* p, VALUE str, int options)
18874 {
18875  int c = rb_reg_fragment_setenc(p, str, options);
18876  if (c) reg_fragment_enc_error(p, str, c);
18877 }
18878 
18879 static int
18880 reg_fragment_check(struct parser_params* p, VALUE str, int options)
18881 {
18882  VALUE err;
18883  reg_fragment_setenc(p, str, options);
18885  if (err != Qnil) {
18887  compile_error(p, "%"PRIsVALUE, err);
18888  return 0;
18889  }
18890  return 1;
18891 }
18892 
18893 typedef struct {
18894  struct parser_params* parser;
18895  rb_encoding *enc;
18896  NODE *succ_block;
18897  const YYLTYPE *loc;
18899 
18900 static int
18901 reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
18902  int back_num, int *back_refs, OnigRegex regex, void *arg0)
18903 {
18905  struct parser_params* p = arg->parser;
18906  rb_encoding *enc = arg->enc;
18907  long len = name_end - name;
18908  const char *s = (const char *)name;
18909  ID var;
18910  NODE *node, *succ;
18911 
18912  if (!len) return ST_CONTINUE;
18913  if (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len))
18914  return ST_CONTINUE;
18915  if (rb_enc_symname_type(s, len, enc, (1U<<ID_LOCAL)) != ID_LOCAL)
18916  return ST_CONTINUE;
18917 
18918  var = intern_cstr(s, len, enc);
18919  node = node_assign(p, assignable(p, var, 0, arg->loc), NEW_LIT(ID2SYM(var), arg->loc), arg->loc);
18920  succ = arg->succ_block;
18921  if (!succ) succ = NEW_BEGIN(0, arg->loc);
18922  succ = block_append(p, succ, node);
18923  arg->succ_block = succ;
18924  return ST_CONTINUE;
18925 }
18926 
18927 static NODE *
18928 reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc)
18929 {
18931 
18932  arg.parser = p;
18933  arg.enc = rb_enc_get(regexp);
18934  arg.succ_block = 0;
18935  arg.loc = loc;
18936  onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
18937 
18938  if (!arg.succ_block) return 0;
18939  return arg.succ_block->nd_next;
18940 }
18941 
18942 static VALUE
18943 parser_reg_compile(struct parser_params* p, VALUE str, int options)
18944 {
18945  reg_fragment_setenc(p, str, options);
18946  return rb_parser_reg_compile(p, str, options);
18947 }
18948 
18949 VALUE
18951 {
18953 }
18954 
18955 static VALUE
18956 reg_compile(struct parser_params* p, VALUE str, int options)
18957 {
18958  VALUE re;
18959  VALUE err;
18960 
18961  err = rb_errinfo();
18962  re = parser_reg_compile(p, str, options);
18963  if (NIL_P(re)) {
18966  compile_error(p, "%"PRIsVALUE, m);
18967  return Qnil;
18968  }
18969  return re;
18970 }
18971 #else
18972 static VALUE
18973 parser_reg_compile(struct parser_params* p, VALUE str, int options, VALUE *errmsg)
18974 {
18975  VALUE err = rb_errinfo();
18976  VALUE re;
18977  str = ripper_is_node_yylval(str) ? RNODE(str)->nd_cval : str;
18978  int c = rb_reg_fragment_setenc(p, str, options);
18979  if (c) reg_fragment_enc_error(p, str, c);
18980  re = rb_parser_reg_compile(p, str, options);
18981  if (NIL_P(re)) {
18982  *errmsg = rb_attr_get(rb_errinfo(), idMesg);
18984  }
18985  return re;
18986 }
18987 #endif
18988 
18989 #ifndef RIPPER
18990 void
18991 rb_parser_set_options(VALUE vparser, int print, int loop, int chomp, int split)
18992 {
18993  struct parser_params *p;
18994  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
18995  p->do_print = print;
18996  p->do_loop = loop;
18997  p->do_chomp = chomp;
18998  p->do_split = split;
18999 }
19000 
19001 void
19002 rb_parser_warn_location(VALUE vparser, int warn)
19003 {
19004  struct parser_params *p;
19005  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19006  p->warn_location = warn;
19007 }
19008 
19009 static NODE *
19010 parser_append_options(struct parser_params *p, NODE *node)
19011 {
19012  static const YYLTYPE default_location = {{1, 0}, {1, 0}};
19013  const YYLTYPE *const LOC = &default_location;
19014 
19015  if (p->do_print) {
19016  NODE *print = NEW_FCALL(rb_intern("print"),
19017  NEW_LIST(NEW_GVAR(idLASTLINE, LOC), LOC),
19018  LOC);
19019  node = block_append(p, node, print);
19020  }
19021 
19022  if (p->do_loop) {
19023  if (p->do_split) {
19024  NODE *args = NEW_LIST(NEW_GVAR(rb_intern("$;"), LOC), LOC);
19025  NODE *split = NEW_GASGN(rb_intern("$F"),
19027  rb_intern("split"), args, LOC),
19028  LOC);
19029  node = block_append(p, split, node);
19030  }
19031  if (p->do_chomp) {
19032  NODE *chomp = NEW_CALL(NEW_GVAR(idLASTLINE, LOC),
19033  rb_intern("chomp!"), 0, LOC);
19034  node = block_append(p, chomp, node);
19035  }
19036 
19037  node = NEW_WHILE(NEW_VCALL(idGets, LOC), node, 1, LOC);
19038  }
19039 
19040  return node;
19041 }
19042 
19043 void
19045 {
19046  /* just to suppress unused-function warnings */
19047  (void)nodetype;
19048  (void)nodeline;
19049 }
19050 
19051 static ID
19052 internal_id(struct parser_params *p)
19053 {
19054  const ID max_id = RB_ID_SERIAL_MAX & ~0xffff;
19055  ID id = (ID)vtable_size(p->lvtbl->args) + (ID)vtable_size(p->lvtbl->vars);
19056  id = max_id - id;
19057  return ID_STATIC_SYM | ID_INTERNAL | (id << ID_SCOPE_SHIFT);
19058 }
19059 #endif /* !RIPPER */
19060 
19061 static void
19062 parser_initialize(struct parser_params *p)
19063 {
19064  /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
19065  p->command_start = TRUE;
19067  p->lex.lpar_beg = -1; /* make lambda_beginning_p() == FALSE at first */
19068  p->node_id = 0;
19069 #ifdef RIPPER
19070  p->delayed.token = Qnil;
19071  p->result = Qnil;
19072  p->parsing_thread = Qnil;
19073 #else
19074  p->error_buffer = Qfalse;
19075 #endif
19076  p->debug_buffer = Qnil;
19077  p->debug_output = rb_stdout;
19078  p->enc = rb_utf8_encoding();
19079 }
19080 
19081 #ifdef RIPPER
19082 #define parser_mark ripper_parser_mark
19083 #define parser_free ripper_parser_free
19084 #endif
19085 
19086 static void
19087 parser_mark(void *ptr)
19088 {
19089  struct parser_params *p = (struct parser_params*)ptr;
19090 
19091  rb_gc_mark(p->lex.input);
19092  rb_gc_mark(p->lex.prevline);
19093  rb_gc_mark(p->lex.lastline);
19094  rb_gc_mark(p->lex.nextline);
19096  rb_gc_mark((VALUE)p->lex.strterm);
19097  rb_gc_mark((VALUE)p->ast);
19098  rb_gc_mark(p->case_labels);
19099 #ifndef RIPPER
19100  rb_gc_mark(p->debug_lines);
19103 #else
19104  rb_gc_mark(p->delayed.token);
19105  rb_gc_mark(p->value);
19106  rb_gc_mark(p->result);
19107  rb_gc_mark(p->parsing_thread);
19108 #endif
19111 #ifdef YYMALLOC
19112  rb_gc_mark((VALUE)p->heap);
19113 #endif
19114 }
19115 
19116 static void
19117 parser_free(void *ptr)
19118 {
19119  struct parser_params *p = (struct parser_params*)ptr;
19120  struct local_vars *local, *prev;
19121 
19122  if (p->tokenbuf) {
19124  }
19125  for (local = p->lvtbl; local; local = prev) {
19126  if (local->vars) xfree(local->vars);
19127  prev = local->prev;
19128  xfree(local);
19129  }
19130  {
19131  token_info *ptinfo;
19132  while ((ptinfo = p->token_info) != 0) {
19133  p->token_info = ptinfo->next;
19134  xfree(ptinfo);
19135  }
19136  }
19137  xfree(ptr);
19138 }
19139 
19140 static size_t
19141 parser_memsize(const void *ptr)
19142 {
19143  struct parser_params *p = (struct parser_params*)ptr;
19144  struct local_vars *local;
19145  size_t size = sizeof(*p);
19146 
19147  size += p->toksiz;
19148  for (local = p->lvtbl; local; local = local->prev) {
19149  size += sizeof(*local);
19150  if (local->vars) size += local->vars->capa * sizeof(ID);
19151  }
19152  return size;
19153 }
19154 
19155 static const rb_data_type_t parser_data_type = {
19156 #ifndef RIPPER
19157  "parser",
19158 #else
19159  "ripper",
19160 #endif
19161  {
19162  parser_mark,
19163  parser_free,
19164  parser_memsize,
19165  },
19167 };
19168 
19169 #ifndef RIPPER
19170 #undef rb_reserved_word
19171 
19172 const struct kwtable *
19173 rb_reserved_word(const char *str, unsigned int len)
19174 {
19175  return reserved_word(str, len);
19176 }
19177 
19178 VALUE
19180 {
19181  struct parser_params *p;
19182  VALUE parser = TypedData_Make_Struct(0, struct parser_params,
19183  &parser_data_type, p);
19184  parser_initialize(p);
19185  return parser;
19186 }
19187 
19188 VALUE
19189 rb_parser_set_context(VALUE vparser, const struct rb_iseq_struct *base, int main)
19190 {
19191  struct parser_params *p;
19192 
19193  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19194  p->error_buffer = main ? Qfalse : Qnil;
19195  p->parent_iseq = base;
19196  return vparser;
19197 }
19198 #endif
19199 
19200 #ifdef RIPPER
19201 #define rb_parser_end_seen_p ripper_parser_end_seen_p
19202 #define rb_parser_encoding ripper_parser_encoding
19203 #define rb_parser_get_yydebug ripper_parser_get_yydebug
19204 #define rb_parser_set_yydebug ripper_parser_set_yydebug
19205 #define rb_parser_get_debug_output ripper_parser_get_debug_output
19206 #define rb_parser_set_debug_output ripper_parser_set_debug_output
19207 static VALUE ripper_parser_end_seen_p(VALUE vparser);
19208 static VALUE ripper_parser_encoding(VALUE vparser);
19209 static VALUE ripper_parser_get_yydebug(VALUE self);
19210 static VALUE ripper_parser_set_yydebug(VALUE self, VALUE flag);
19211 static VALUE ripper_parser_get_debug_output(VALUE self);
19212 static VALUE ripper_parser_set_debug_output(VALUE self, VALUE output);
19213 
19214 /*
19215  * call-seq:
19216  * ripper.error? -> Boolean
19217  *
19218  * Return true if parsed source has errors.
19219  */
19220 static VALUE
19221 ripper_error_p(VALUE vparser)
19222 {
19223  struct parser_params *p;
19224 
19225  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19226  return p->error_p ? Qtrue : Qfalse;
19227 }
19228 #endif
19229 
19230 /*
19231  * call-seq:
19232  * ripper.end_seen? -> Boolean
19233  *
19234  * Return true if parsed source ended by +\_\_END\_\_+.
19235  */
19236 VALUE
19238 {
19239  struct parser_params *p;
19240 
19241  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19242  return p->ruby__end__seen ? Qtrue : Qfalse;
19243 }
19244 
19245 /*
19246  * call-seq:
19247  * ripper.encoding -> encoding
19248  *
19249  * Return encoding of the source.
19250  */
19251 VALUE
19253 {
19254  struct parser_params *p;
19255 
19256  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
19257  return rb_enc_from_encoding(p->enc);
19258 }
19259 
19260 #ifdef RIPPER
19261 /*
19262  * call-seq:
19263  * ripper.yydebug -> true or false
19264  *
19265  * Get yydebug.
19266  */
19267 VALUE
19268 rb_parser_get_yydebug(VALUE self)
19269 {
19270  struct parser_params *p;
19271 
19272  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19273  return p->debug ? Qtrue : Qfalse;
19274 }
19275 #endif
19276 
19277 /*
19278  * call-seq:
19279  * ripper.yydebug = flag
19280  *
19281  * Set yydebug.
19282  */
19283 VALUE
19285 {
19286  struct parser_params *p;
19287 
19288  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19289  p->debug = RTEST(flag);
19290  return flag;
19291 }
19292 
19293 /*
19294  * call-seq:
19295  * ripper.debug_output -> obj
19296  *
19297  * Get debug output.
19298  */
19299 VALUE
19301 {
19302  struct parser_params *p;
19303 
19304  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19305  return p->debug_output;
19306 }
19307 
19308 /*
19309  * call-seq:
19310  * ripper.debug_output = obj
19311  *
19312  * Set debug output.
19313  */
19314 VALUE
19316 {
19317  struct parser_params *p;
19318 
19319  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19320  return p->debug_output = output;
19321 }
19322 
19323 #ifndef RIPPER
19324 #ifdef YYMALLOC
19325 #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE))
19326 /* Keep the order; NEWHEAP then xmalloc and ADD2HEAP to get rid of
19327  * potential memory leak */
19328 #define NEWHEAP() rb_imemo_tmpbuf_parser_heap(0, p->heap, 0)
19329 #define ADD2HEAP(new, cnt, ptr) ((p->heap = (new))->ptr = (ptr), \
19330  (new)->cnt = (cnt), (ptr))
19331 
19332 void *
19334 {
19335  size_t cnt = HEAPCNT(1, size);
19337  void *ptr = xmalloc(size);
19338 
19339  return ADD2HEAP(n, cnt, ptr);
19340 }
19341 
19342 void *
19343 rb_parser_calloc(struct parser_params *p, size_t nelem, size_t size)
19344 {
19345  size_t cnt = HEAPCNT(nelem, size);
19347  void *ptr = xcalloc(nelem, size);
19348 
19349  return ADD2HEAP(n, cnt, ptr);
19350 }
19351 
19352 void *
19353 rb_parser_realloc(struct parser_params *p, void *ptr, size_t size)
19354 {
19356  size_t cnt = HEAPCNT(1, size);
19357 
19358  if (ptr && (n = p->heap) != NULL) {
19359  do {
19360  if (n->ptr == ptr) {
19361  n->ptr = ptr = xrealloc(ptr, size);
19362  if (n->cnt) n->cnt = cnt;
19363  return ptr;
19364  }
19365  } while ((n = n->next) != NULL);
19366  }
19367  n = NEWHEAP();
19368  ptr = xrealloc(ptr, size);
19369  return ADD2HEAP(n, cnt, ptr);
19370 }
19371 
19372 void
19374 {
19375  rb_imemo_tmpbuf_t **prev = &p->heap, *n;
19376 
19377  while ((n = *prev) != NULL) {
19378  if (n->ptr == ptr) {
19379  *prev = n->next;
19381  break;
19382  }
19383  prev = &n->next;
19384  }
19385  xfree(ptr);
19386 }
19387 #endif
19388 
19389 void
19390 rb_parser_printf(struct parser_params *p, const char *fmt, ...)
19391 {
19392  va_list ap;
19393  VALUE mesg = p->debug_buffer;
19394 
19395  if (NIL_P(mesg)) p->debug_buffer = mesg = rb_str_new(0, 0);
19396  va_start(ap, fmt);
19397  rb_str_vcatf(mesg, fmt, ap);
19398  va_end(ap);
19399  if (RSTRING_END(mesg)[-1] == '\n') {
19400  rb_io_write(p->debug_output, mesg);
19401  p->debug_buffer = Qnil;
19402  }
19403 }
19404 
19405 static void
19406 parser_compile_error(struct parser_params *p, const char *fmt, ...)
19407 {
19408  va_list ap;
19409 
19411  p->error_p = 1;
19412  va_start(ap, fmt);
19413  p->error_buffer =
19416  p->ruby_sourceline,
19417  rb_long2int(p->lex.pcur - p->lex.pbeg),
19418  p->enc, fmt, ap);
19419  va_end(ap);
19420 }
19421 
19422 static size_t
19423 count_char(const char *str, int c)
19424 {
19425  int n = 0;
19426  while (str[n] == c) ++n;
19427  return n;
19428 }
19429 
19430 /*
19431  * strip enclosing double-quotes, same as the default yytnamerr except
19432  * for that single-quotes matching back-quotes do not stop stripping.
19433  *
19434  * "\"`class' keyword\"" => "`class' keyword"
19435  */
19436 RUBY_FUNC_EXPORTED size_t
19437 rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
19438 {
19439  YYUSE(p);
19440  if (*yystr == '"') {
19441  size_t yyn = 0, bquote = 0;
19442  const char *yyp = yystr;
19443 
19444  while (*++yyp) {
19445  switch (*yyp) {
19446  case '`':
19447  if (!bquote) {
19448  bquote = count_char(yyp+1, '`') + 1;
19449  if (yyres) memcpy(&yyres[yyn], yyp, bquote);
19450  yyn += bquote;
19451  yyp += bquote - 1;
19452  break;
19453  }
19454  goto default_char;
19455 
19456  case '\'':
19457  if (bquote && count_char(yyp+1, '\'') + 1 == bquote) {
19458  if (yyres) memcpy(yyres + yyn, yyp, bquote);
19459  yyn += bquote;
19460  yyp += bquote - 1;
19461  bquote = 0;
19462  break;
19463  }
19464  if (yyp[1] && yyp[1] != '\'' && yyp[2] == '\'') {
19465  if (yyres) memcpy(yyres + yyn, yyp, 3);
19466  yyn += 3;
19467  yyp += 2;
19468  break;
19469  }
19470  goto do_not_strip_quotes;
19471 
19472  case ',':
19473  goto do_not_strip_quotes;
19474 
19475  case '\\':
19476  if (*++yyp != '\\')
19477  goto do_not_strip_quotes;
19478  /* Fall through. */
19479  default_char:
19480  default:
19481  if (yyres)
19482  yyres[yyn] = *yyp;
19483  yyn++;
19484  break;
19485 
19486  case '"':
19487  case '\0':
19488  if (yyres)
19489  yyres[yyn] = '\0';
19490  return yyn;
19491  }
19492  }
19493  do_not_strip_quotes: ;
19494  }
19495 
19496  if (!yyres) return strlen(yystr);
19497 
19498  return (YYSIZE_T)(yystpcpy(yyres, yystr) - yyres);
19499 }
19500 #endif
19501 
19502 #ifdef RIPPER
19503 #ifdef RIPPER_DEBUG
19504 /* :nodoc: */
19505 static VALUE
19506 ripper_validate_object(VALUE self, VALUE x)
19507 {
19508  if (x == Qfalse) return x;
19509  if (x == Qtrue) return x;
19510  if (x == Qnil) return x;
19511  if (x == Qundef)
19512  rb_raise(rb_eArgError, "Qundef given");
19513  if (FIXNUM_P(x)) return x;
19514  if (SYMBOL_P(x)) return x;
19515  switch (BUILTIN_TYPE(x)) {
19516  case T_STRING:
19517  case T_OBJECT:
19518  case T_ARRAY:
19519  case T_BIGNUM:
19520  case T_FLOAT:
19521  case T_COMPLEX:
19522  case T_RATIONAL:
19523  break;
19524  case T_NODE:
19525  if (nd_type((NODE *)x) != NODE_RIPPER) {
19526  rb_raise(rb_eArgError, "NODE given: %p", (void *)x);
19527  }
19528  x = ((NODE *)x)->nd_rval;
19529  break;
19530  default:
19531  rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)",
19532  (void *)x, rb_obj_classname(x));
19533  }
19534  if (!RBASIC_CLASS(x)) {
19535  rb_raise(rb_eArgError, "hidden ruby object: %p (%s)",
19536  (void *)x, rb_builtin_type_name(TYPE(x)));
19537  }
19538  return x;
19539 }
19540 #endif
19541 
19542 #define validate(x) ((x) = get_value(x))
19543 
19544 static VALUE
19545 ripper_dispatch0(struct parser_params *p, ID mid)
19546 {
19547  return rb_funcall(p->value, mid, 0);
19548 }
19549 
19550 static VALUE
19551 ripper_dispatch1(struct parser_params *p, ID mid, VALUE a)
19552 {
19553  validate(a);
19554  return rb_funcall(p->value, mid, 1, a);
19555 }
19556 
19557 static VALUE
19558 ripper_dispatch2(struct parser_params *p, ID mid, VALUE a, VALUE b)
19559 {
19560  validate(a);
19561  validate(b);
19562  return rb_funcall(p->value, mid, 2, a, b);
19563 }
19564 
19565 static VALUE
19566 ripper_dispatch3(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c)
19567 {
19568  validate(a);
19569  validate(b);
19570  validate(c);
19571  return rb_funcall(p->value, mid, 3, a, b, c);
19572 }
19573 
19574 static VALUE
19575 ripper_dispatch4(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
19576 {
19577  validate(a);
19578  validate(b);
19579  validate(c);
19580  validate(d);
19581  return rb_funcall(p->value, mid, 4, a, b, c, d);
19582 }
19583 
19584 static VALUE
19585 ripper_dispatch5(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
19586 {
19587  validate(a);
19588  validate(b);
19589  validate(c);
19590  validate(d);
19591  validate(e);
19592  return rb_funcall(p->value, mid, 5, a, b, c, d, e);
19593 }
19594 
19595 static VALUE
19596 ripper_dispatch7(struct parser_params *p, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
19597 {
19598  validate(a);
19599  validate(b);
19600  validate(c);
19601  validate(d);
19602  validate(e);
19603  validate(f);
19604  validate(g);
19605  return rb_funcall(p->value, mid, 7, a, b, c, d, e, f, g);
19606 }
19607 
19608 static ID
19609 ripper_get_id(VALUE v)
19610 {
19611  NODE *nd;
19612  if (!RB_TYPE_P(v, T_NODE)) return 0;
19613  nd = (NODE *)v;
19614  if (nd_type(nd) != NODE_RIPPER) return 0;
19615  return nd->nd_vid;
19616 }
19617 
19618 static VALUE
19619 ripper_get_value(VALUE v)
19620 {
19621  NODE *nd;
19622  if (v == Qundef) return Qnil;
19623  if (!RB_TYPE_P(v, T_NODE)) return v;
19624  nd = (NODE *)v;
19625  if (nd_type(nd) != NODE_RIPPER) return Qnil;
19626  return nd->nd_rval;
19627 }
19628 
19629 static void
19630 ripper_error(struct parser_params *p)
19631 {
19632  p->error_p = TRUE;
19633 }
19634 
19635 static void
19636 ripper_compile_error(struct parser_params *p, const char *fmt, ...)
19637 {
19638  VALUE str;
19639  va_list args;
19640 
19641  va_start(args, fmt);
19642  str = rb_vsprintf(fmt, args);
19643  va_end(args);
19644  rb_funcall(p->value, rb_intern("compile_error"), 1, str);
19645  ripper_error(p);
19646 }
19647 
19648 static VALUE
19649 ripper_lex_get_generic(struct parser_params *p, VALUE src)
19650 {
19651  VALUE line = rb_funcallv_public(src, id_gets, 0, 0);
19652  if (!NIL_P(line) && !RB_TYPE_P(line, T_STRING)) {
19654  "gets returned %"PRIsVALUE" (expected String or nil)",
19655  rb_obj_class(line));
19656  }
19657  return line;
19658 }
19659 
19660 static VALUE
19661 ripper_lex_io_get(struct parser_params *p, VALUE src)
19662 {
19663  return rb_io_gets(src);
19664 }
19665 
19666 static VALUE
19667 ripper_s_allocate(VALUE klass)
19668 {
19669  struct parser_params *p;
19671  &parser_data_type, p);
19672  p->value = self;
19673  return self;
19674 }
19675 
19676 #define ripper_initialized_p(r) ((r)->lex.input != 0)
19677 
19678 /*
19679  * call-seq:
19680  * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper
19681  *
19682  * Create a new Ripper object.
19683  * _src_ must be a String, an IO, or an Object which has #gets method.
19684  *
19685  * This method does not starts parsing.
19686  * See also Ripper#parse and Ripper.parse.
19687  */
19688 static VALUE
19689 ripper_initialize(int argc, VALUE *argv, VALUE self)
19690 {
19691  struct parser_params *p;
19692  VALUE src, fname, lineno;
19693 
19694  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19695  rb_scan_args(argc, argv, "12", &src, &fname, &lineno);
19696  if (RB_TYPE_P(src, T_FILE)) {
19697  p->lex.gets = ripper_lex_io_get;
19698  }
19699  else if (rb_respond_to(src, id_gets)) {
19700  p->lex.gets = ripper_lex_get_generic;
19701  }
19702  else {
19703  StringValue(src);
19704  p->lex.gets = lex_get_str;
19705  }
19706  p->lex.input = src;
19707  p->eofp = 0;
19708  if (NIL_P(fname)) {
19709  fname = STR_NEW2("(ripper)");
19710  OBJ_FREEZE(fname);
19711  }
19712  else {
19713  StringValueCStr(fname);
19714  fname = rb_str_new_frozen(fname);
19715  }
19716  parser_initialize(p);
19717 
19718  p->ruby_sourcefile_string = fname;
19719  p->ruby_sourcefile = RSTRING_PTR(fname);
19720  p->ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1;
19721 
19722  return Qnil;
19723 }
19724 
19725 static VALUE
19726 ripper_parse0(VALUE parser_v)
19727 {
19728  struct parser_params *p;
19729 
19730  TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, p);
19731  parser_prepare(p);
19732  p->ast = rb_ast_new();
19733  ripper_yyparse((void*)p);
19734  rb_ast_dispose(p->ast);
19735  p->ast = 0;
19736  return p->result;
19737 }
19738 
19739 static VALUE
19740 ripper_ensure(VALUE parser_v)
19741 {
19742  struct parser_params *p;
19743 
19744  TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, p);
19745  p->parsing_thread = Qnil;
19746  return Qnil;
19747 }
19748 
19749 /*
19750  * call-seq:
19751  * ripper.parse
19752  *
19753  * Start parsing and returns the value of the root action.
19754  */
19755 static VALUE
19756 ripper_parse(VALUE self)
19757 {
19758  struct parser_params *p;
19759 
19760  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19761  if (!ripper_initialized_p(p)) {
19762  rb_raise(rb_eArgError, "method called for uninitialized object");
19763  }
19764  if (!NIL_P(p->parsing_thread)) {
19765  if (p->parsing_thread == rb_thread_current())
19766  rb_raise(rb_eArgError, "Ripper#parse is not reentrant");
19767  else
19768  rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe");
19769  }
19770  p->parsing_thread = rb_thread_current();
19771  rb_ensure(ripper_parse0, self, ripper_ensure, self);
19772 
19773  return p->result;
19774 }
19775 
19776 /*
19777  * call-seq:
19778  * ripper.column -> Integer
19779  *
19780  * Return column number of current parsing line.
19781  * This number starts from 0.
19782  */
19783 static VALUE
19784 ripper_column(VALUE self)
19785 {
19786  struct parser_params *p;
19787  long col;
19788 
19789  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19790  if (!ripper_initialized_p(p)) {
19791  rb_raise(rb_eArgError, "method called for uninitialized object");
19792  }
19793  if (NIL_P(p->parsing_thread)) return Qnil;
19794  col = p->lex.ptok - p->lex.pbeg;
19795  return LONG2NUM(col);
19796 }
19797 
19798 /*
19799  * call-seq:
19800  * ripper.filename -> String
19801  *
19802  * Return current parsing filename.
19803  */
19804 static VALUE
19805 ripper_filename(VALUE self)
19806 {
19807  struct parser_params *p;
19808 
19809  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19810  if (!ripper_initialized_p(p)) {
19811  rb_raise(rb_eArgError, "method called for uninitialized object");
19812  }
19813  return p->ruby_sourcefile_string;
19814 }
19815 
19816 /*
19817  * call-seq:
19818  * ripper.lineno -> Integer
19819  *
19820  * Return line number of current parsing line.
19821  * This number starts from 1.
19822  */
19823 static VALUE
19824 ripper_lineno(VALUE self)
19825 {
19826  struct parser_params *p;
19827 
19828  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19829  if (!ripper_initialized_p(p)) {
19830  rb_raise(rb_eArgError, "method called for uninitialized object");
19831  }
19832  if (NIL_P(p->parsing_thread)) return Qnil;
19833  return INT2NUM(p->ruby_sourceline);
19834 }
19835 
19836 /*
19837  * call-seq:
19838  * ripper.state -> Integer
19839  *
19840  * Return scanner state of current token.
19841  */
19842 static VALUE
19843 ripper_state(VALUE self)
19844 {
19845  struct parser_params *p;
19846 
19847  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19848  if (!ripper_initialized_p(p)) {
19849  rb_raise(rb_eArgError, "method called for uninitialized object");
19850  }
19851  if (NIL_P(p->parsing_thread)) return Qnil;
19852  return INT2NUM(p->lex.state);
19853 }
19854 
19855 /*
19856  * call-seq:
19857  * ripper.token -> String
19858  *
19859  * Return the current token string.
19860  */
19861 static VALUE
19862 ripper_token(VALUE self)
19863 {
19864  struct parser_params *p;
19865  long pos, len;
19866 
19867  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p);
19868  if (!ripper_initialized_p(p)) {
19869  rb_raise(rb_eArgError, "method called for uninitialized object");
19870  }
19871  if (NIL_P(p->parsing_thread)) return Qnil;
19872  pos = p->lex.ptok - p->lex.pbeg;
19873  len = p->lex.pcur - p->lex.ptok;
19874  return rb_str_subseq(p->lex.lastline, pos, len);
19875 }
19876 
19877 #ifdef RIPPER_DEBUG
19878 /* :nodoc: */
19879 static VALUE
19880 ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg)
19881 {
19882  StringValue(msg);
19883  if (obj == Qundef) {
19884  rb_raise(rb_eArgError, "%"PRIsVALUE, msg);
19885  }
19886  return Qnil;
19887 }
19888 
19889 /* :nodoc: */
19890 static VALUE
19891 ripper_value(VALUE self, VALUE obj)
19892 {
19893  return ULONG2NUM(obj);
19894 }
19895 #endif
19896 
19897 /*
19898  * call-seq:
19899  * Ripper.lex_state_name(integer) -> string
19900  *
19901  * Returns a string representation of lex_state.
19902  */
19903 static VALUE
19904 ripper_lex_state_name(VALUE self, VALUE state)
19905 {
19907 }
19908 
19909 void
19910 Init_ripper(void)
19911 {
19912  ripper_init_eventids1();
19913  ripper_init_eventids2();
19914  id_warn = rb_intern_const("warn");
19915  id_warning = rb_intern_const("warning");
19916  id_gets = rb_intern_const("gets");
19917  id_assoc = rb_intern_const("=>");
19918 
19919  (void)yystpcpy; /* may not used in newer bison */
19920 
19921  InitVM(ripper);
19922 }
19923 
19924 void
19925 InitVM_ripper(void)
19926 {
19927  VALUE Ripper;
19928 
19929  Ripper = rb_define_class("Ripper", rb_cObject);
19930  /* version of Ripper */
19931  rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION));
19932  rb_define_alloc_func(Ripper, ripper_s_allocate);
19933  rb_define_method(Ripper, "initialize", ripper_initialize, -1);
19934  rb_define_method(Ripper, "parse", ripper_parse, 0);
19935  rb_define_method(Ripper, "column", ripper_column, 0);
19936  rb_define_method(Ripper, "filename", ripper_filename, 0);
19937  rb_define_method(Ripper, "lineno", ripper_lineno, 0);
19938  rb_define_method(Ripper, "state", ripper_state, 0);
19939  rb_define_method(Ripper, "token", ripper_token, 0);
19940  rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0);
19941  rb_define_method(Ripper, "encoding", rb_parser_encoding, 0);
19942  rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0);
19943  rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1);
19944  rb_define_method(Ripper, "debug_output", rb_parser_get_debug_output, 0);
19945  rb_define_method(Ripper, "debug_output=", rb_parser_set_debug_output, 1);
19946  rb_define_method(Ripper, "error?", ripper_error_p, 0);
19947 #ifdef RIPPER_DEBUG
19948  rb_define_method(Ripper, "assert_Qundef", ripper_assert_Qundef, 2);
19949  rb_define_method(Ripper, "rawVALUE", ripper_value, 1);
19950  rb_define_method(Ripper, "validate_object", ripper_validate_object, 1);
19951 #endif
19952 
19953  rb_define_singleton_method(Ripper, "dedent_string", parser_dedent_string, 2);
19954  rb_define_private_method(Ripper, "dedent_string", parser_dedent_string, 2);
19955 
19956  rb_define_singleton_method(Ripper, "lex_state_name", ripper_lex_state_name, 1);
19957 
19958 <% @exprs.each do |expr, desc| -%>
19959  /* <%=desc%> */
19960  rb_define_const(Ripper, "<%=expr%>", INT2NUM(<%=expr%>));
19961 <% end %>
19962  ripper_init_eventids1_table(Ripper);
19963  ripper_init_eventids2_table(Ripper);
19964 
19965 # if 0
19966  /* Hack to let RDoc document SCRIPT_LINES__ */
19967 
19968  /*
19969  * When a Hash is assigned to +SCRIPT_LINES__+ the contents of files loaded
19970  * after the assignment will be added as an Array of lines with the file
19971  * name as the key.
19972  */
19973  rb_define_global_const("SCRIPT_LINES__", Qnil);
19974 #endif
19975 
19976 }
19977 #endif /* RIPPER */
19978 
19979 /*
19980  * Local variables:
19981  * mode: c
19982  * c-file-style: "ruby"
19983  * End:
19984  */
idNULL
@ idNULL
Definition: id.h:113
token_info::indent
int indent
Definition: ripper.c:254
NODE_NEXT
@ NODE_NEXT
Definition: node.h:47
parser_params::has_shebang
unsigned int has_shebang
Definition: ripper.c:333
kwtable
Definition: lex.c:34
rb_io_gets
VALUE rb_io_gets(VALUE)
Definition: io.c:3573
FLONUM_P
#define FLONUM_P(x)
Definition: ruby.h:430
tCOMMENT
@ tCOMMENT
Definition: eventids2.c:3
kwtable::state
short state
Definition: lex.c:34
rb_strterm_struct::flags
VALUE flags
Definition: ripper.c:756
local_vars::outer
NODE * outer
Definition: ripper.c:224
rb_io_puts
VALUE rb_io_puts(int, const VALUE *, VALUE)
Definition: io.c:7747
NEW_CDECL
#define NEW_CDECL(v, val, path, loc)
Definition: node.h:321
NODE_COLON3
@ NODE_COLON3
Definition: node.h:119
parser_params::input
VALUE input
Definition: ripper.c:278
tUPLUS
@ tUPLUS
Definition: parse.h:115
NODE_FL_NEWLINE
#define NODE_FL_NEWLINE
Definition: node.h:183
UNLIKELY
#define UNLIKELY(x)
Definition: ffi_common.h:126
parser_params::do_print
unsigned int do_print
Definition: ripper.c:349
NODE_NIL
@ NODE_NIL
Definition: node.h:125
ISASCII
#define ISASCII(c)
Definition: ruby.h:2304
ID
unsigned long ID
Definition: ruby.h:103
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:12920
keyword_defined
@ keyword_defined
Definition: parse.h:92
parser_params::call
VALUE(* call)(VALUE, int)
Definition: ripper.c:288
void
void
Definition: rb_mjit_min_header-2.7.0.h:13273
rb_id2name
const char * rb_id2name(ID)
Definition: symbol.c:801
add_delayed_token
#define add_delayed_token(p, tok, end)
Definition: parse.c:12965
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:14621
rb_warn0L
#define rb_warn0L(l, fmt)
Definition: parse.c:960
rb_warn2
#define rb_warn2(fmt, a, b)
Definition: parse.c:952
TRUE
#define TRUE
Definition: nkf.h:175
rb_str_vcatf
VALUE rb_str_vcatf(VALUE, const char *, va_list)
Definition: sprintf.c:1210
EXPR_FITEM_bit
@ EXPR_FITEM_bit
Definition: parse.c:147
tEQ
@ tEQ
Definition: parse.h:119
NODE_ATTRASGN
@ NODE_ATTRASGN
Definition: node.h:132
nd_set_first_loc
#define nd_set_first_loc(n, v)
Definition: node.h:203
tCONSTANT
@ tCONSTANT
Definition: parse.h:102
WARN_I
#define WARN_I(i)
Definition: parse.c:997
RSTRING_GETMEM
#define RSTRING_GETMEM(str, ptrvar, lenvar)
Definition: ruby.h:1018
STR_FUNC_INDENT
#define STR_FUNC_INDENT
Definition: parse.c:12907
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:13799
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:409
NODE_DSYM
@ NODE_DSYM
Definition: node.h:131
tNMATCH
@ tNMATCH
Definition: parse.h:127
rb_ast_newnode
NODE * rb_ast_newnode(rb_ast_t *ast, enum node_type type)
Definition: node.c:1189
strtod
#define strtod(s, e)
Definition: util.h:76
STR_NEW
#define STR_NEW(ptr, len)
Definition: parse.c:377
local_vars::inner
NODE * inner
Definition: ripper.c:224
vars
const VALUE int int int int int int VALUE * vars[]
Definition: rb_mjit_min_header-2.7.0.h:6462
rb_obj_hide
VALUE rb_obj_hide(VALUE obj)
Make the object invisible from Ruby code.
Definition: object.c:78
ruby_method_ids
ruby_method_ids
Definition: id.h:78
NODE_HSHPTN
@ NODE_HSHPTN
Definition: node.h:135
parser_params::nextline
VALUE nextline
Definition: ripper.c:281
rb_enc_name
#define rb_enc_name(enc)
Definition: encoding.h:177
IS_BEG
#define IS_BEG()
Definition: parse.c:13794
keyword_self
@ keyword_self
Definition: parse.h:79
NEW_MATCH3
#define NEW_MATCH3(r, n2, loc)
Definition: node.h:339
rb_strterm_struct::literal
rb_strterm_literal_t literal
Definition: ripper.c:758
NODE_RESCUE
@ NODE_RESCUE
Definition: node.h:51
str_dquote
@ str_dquote
Definition: parse.c:12915
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:13052
rb_ary_pattern_info::pre_args
NODE * pre_args
Definition: node.h:454
rb_iseq_struct
Definition: vm_core.h:456
parser_params::in_kwarg
unsigned int in_kwarg
Definition: ripper.c:335
tLAMBDA
@ tLAMBDA
Definition: parse.h:150
nd_head
#define nd_head
Definition: node.h:214
yytype_uint8
unsigned char yytype_uint8
Definition: parse.c:1236
rb_ident_hash_new
VALUE rb_ident_hash_new(void)
Definition: hash.c:4203
yyerror0
#define yyerror0(msg)
Definition: parse.c:414
rb_hash_new
VALUE rb_hash_new(void)
Definition: hash.c:1501
set_yylval_id
#define set_yylval_id(x)
Definition: parse.c:12220
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:7063
tLAMBEG
@ tLAMBEG
Definition: parse.h:163
eventids1.c
HEAPCNT
#define HEAPCNT(n, size)
Definition: parse.c:19325
path
VALUE path
Definition: rb_mjit_min_header-2.7.0.h:7351
NODE_TRUE
@ NODE_TRUE
Definition: node.h:126
string_type
string_type
Definition: ripper.c:12957
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
memset
void * memset(void *, int, size_t)
parser_params::in_defined
unsigned int in_defined
Definition: ripper.c:334
rb_node_newnode
#define rb_node_newnode(type, a1, a2, a3, loc)
Definition: parse.c:459
rb_local_defined
int rb_local_defined(ID id, const rb_iseq_t *iseq)
Definition: compile.c:9381
NODE_NTH_REF
@ NODE_NTH_REF
Definition: node.h:88
yydebug
#define yydebug
Definition: parse.c:96
rb_stderr
RUBY_EXTERN VALUE rb_stderr
Definition: ruby.h:2090
peekc_n
#define peekc_n(p, n)
Definition: parse.c:12947
tEMBDOC
@ tEMBDOC
Definition: eventids2.c:5
NODE_ZLIST
@ NODE_ZLIST
Definition: node.h:77
ID_GLOBAL
#define ID_GLOBAL
Definition: id.h:35
NODE_SPECIAL_EXCESSIVE_COMMA
#define NODE_SPECIAL_EXCESSIVE_COMMA
Definition: node.h:385
NODE_DREGX
@ NODE_DREGX
Definition: node.h:99
rb_warn1
#define rb_warn1(fmt, a)
Definition: parse.c:951
ISDIGIT
#define ISDIGIT(c)
Definition: ruby.h:2312
NEW_ZSUPER
#define NEW_ZSUPER(loc)
Definition: node.h:352
parser_params::debug
unsigned int debug
Definition: ripper.c:332
tLBRACK
@ tLBRACK
Definition: parse.h:144
keyword_do_cond
@ keyword_do_cond
Definition: parse.h:73
rb_warning0
#define rb_warning0(fmt)
Definition: parse.c:955
NEW_SCOPE
#define NEW_SCOPE(a, b, loc)
Definition: node.h:287
IS_AFTER_OPERATOR
#define IS_AFTER_OPERATOR()
Definition: parse.c:13800
NODE_OR
@ NODE_OR
Definition: node.h:55
NODE_ARYPTN
@ NODE_ARYPTN
Definition: node.h:134
regenc.h
IS_END
#define IS_END()
Definition: parse.c:13793
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_ary_new_from_args
#define rb_ary_new_from_args(n,...)
Definition: rb_mjit_min_header-2.7.0.h:7214
rb_ast_dispose
void rb_ast_dispose(rb_ast_t *ast)
Definition: node.c:1389
token_info
Definition: ripper.c:251
rb_scan_args
#define rb_scan_args(argc, argvp, fmt,...)
Definition: rb_mjit_min_header-2.7.0.h:6372
rb_parser_set_options
void rb_parser_set_options(VALUE vparser, int print, int loop, int chomp, int split)
Definition: parse.c:18991
keyword_module
@ keyword_module
Definition: parse.h:50
parser_params::eofp
unsigned int eofp
Definition: ripper.c:330
parser_params::heredoc_line_indent
int heredoc_line_indent
Definition: ripper.c:305
NEW_OPT_ARG
#define NEW_OPT_ARG(i, v, loc)
Definition: node.h:354
STR_NEW3
#define STR_NEW3(ptr, len, e, func)
Definition: parse.c:380
idEqq
@ idEqq
Definition: id.h:97
YYSTACK_ALLOC
#define YYSTACK_ALLOC
Definition: parse.c:1377
rb_gc_force_recycle
void rb_gc_force_recycle(VALUE obj)
Definition: gc.c:7011
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:2696
EXPR_VALUE
@ EXPR_VALUE
Definition: parse.c:166
NEW_BEGIN
#define NEW_BEGIN(b, loc)
Definition: node.h:306
local_vars::numparam
struct local_vars::@63 numparam
st_is_member
#define st_is_member(table, key)
Definition: st.h:97
NEW_RESCUE
#define NEW_RESCUE(b, res, e, loc)
Definition: node.h:307
NUMPARAM_ID_TO_IDX
#define NUMPARAM_ID_TO_IDX(id)
Definition: parse.c:236
rb_char_to_option_kcode
int rb_char_to_option_kcode(int c, int *option, int *kcode)
Definition: re.c:319
TAB_WIDTH
#define TAB_WIDTH
Definition: parse.c:94
idFWD_BLOCK
#define idFWD_BLOCK
Definition: parse.c:699
NODE_HASH
@ NODE_HASH
Definition: node.h:79
WARN_LOCATION
#define WARN_LOCATION(type)
Definition: parse.c:16672
rb_strterm_heredoc_struct::func
unsigned func
Definition: ripper.c:745
NEWHEAP
#define NEWHEAP()
Definition: parse.c:19328
rb_parser_set_debug_output
VALUE rb_parser_set_debug_output(VALUE self, VALUE output)
Definition: parse.c:19315
NEW_ITER
#define NEW_ITER(a, b, loc)
Definition: node.h:300
vtable::capa
int capa
Definition: ripper.c:210
NODE_CONST
@ NODE_CONST
Definition: node.h:86
keyword_false
@ keyword_false
Definition: parse.h:82
NEW_IVAR
#define NEW_IVAR(v, loc)
Definition: node.h:332
YY_REDUCE_PRINT
#define YY_REDUCE_PRINT(Rule)
Definition: parse.c:5354
rb_warning_category_enabled_p
MJIT_FUNC_EXPORTED bool rb_warning_category_enabled_p(rb_warning_category_t category)
Definition: error.c:164
RSTRING_PTR
#define RSTRING_PTR(str)
Definition: ruby.h:1009
parser_params::gets
VALUE(* gets)(struct parser_params *, VALUE)
Definition: ripper.c:277
NODE_LASGN
@ NODE_LASGN
Definition: node.h:57
EXPR_END_bit
@ EXPR_END_bit
Definition: parse.c:136
idUMinus
@ idUMinus
Definition: id.h:82
parser_params::do_chomp
unsigned int do_chomp
Definition: ripper.c:351
rb_parser_malloc
void * rb_parser_malloc(struct parser_params *p, size_t size)
Definition: parse.c:19333
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:5205
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:12914
tNTH_REF
@ tNTH_REF
Definition: parse.h:110
parser_params::parent_iseq
const struct rb_iseq_struct * parent_iseq
Definition: ripper.c:359
NODE_FLIP2
@ NODE_FLIP2
Definition: node.h:122
NODE_ARGSPUSH
@ NODE_ARGSPUSH
Definition: node.h:107
rb_ary_unshift
VALUE rb_ary_unshift(VALUE ary, VALUE item)
Definition: array.c:1494
tANDDOT
@ tANDDOT
Definition: parse.h:136
rb_int_positive_pow
RUBY_EXTERN VALUE rb_int_positive_pow(long x, unsigned long y)
Definition: numeric.c:4033
EXPR_CLASS_bit
@ EXPR_CLASS_bit
Definition: parse.c:144
token_info::next
struct token_info * next
Definition: ripper.c:256
NEW_ERRINFO
#define NEW_ERRINFO(loc)
Definition: node.h:375
VALUE
unsigned long VALUE
Definition: ruby.h:102
NODE_CASE
@ NODE_CASE
Definition: node.h:36
idFWD_KWREST
#define idFWD_KWREST
Definition: parse.c:697
rb_id_attrset
ID rb_id_attrset(ID)
Definition: symbol.c:98
rb_strterm_literal_struct::paren
long paren
Definition: ripper.c:721
rb_funcallv_public
VALUE rb_funcallv_public(VALUE, ID, int, const VALUE *)
Calls a method.
Definition: vm_eval.c:980
rb_obj_as_string
VALUE rb_obj_as_string(VALUE)
Definition: string.c:1440
rb_eArgError
VALUE rb_eArgError
Definition: error.c:923
encoding.h
NEW_REDO
#define NEW_REDO(loc)
Definition: node.h:304
ruby_verbose
#define ruby_verbose
Definition: ruby.h:1925
ZALLOC
#define ZALLOC(type)
Definition: ruby.h:1666
rb_intern
#define rb_intern(str)
malloc
void * malloc(size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(1)))
EXPR_ENDFN_bit
@ EXPR_ENDFN_bit
Definition: parse.c:138
NODE_ARGSCAT
@ NODE_ARGSCAT
Definition: node.h:106
rb_eSyntaxError
VALUE rb_eSyntaxError
Definition: error.c:938
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: parse.c:1330
RB_TYPE_P
#define RB_TYPE_P(obj, type)
Definition: ruby.h:560
rb_enc_isalnum
#define rb_enc_isalnum(c, enc)
Definition: encoding.h:235
rb_intern_const
#define rb_intern_const(str)
Definition: ruby.h:1879
parser_params::max_numparam
int max_numparam
Definition: ripper.c:327
rb_warn3L
#define rb_warn3L(l, fmt, a, b, c)
Definition: parse.c:963
IS_LABEL_POSSIBLE
#define IS_LABEL_POSSIBLE()
Definition: parse.c:13796
TYPE
#define TYPE(x)
Definition: ruby.h:554
rb_thread_current
VALUE rb_thread_current(void)
Definition: thread.c:2676
rb_enc_get
rb_encoding * rb_enc_get(VALUE obj)
Definition: encoding.c:872
NEW_UNLESS
#define NEW_UNLESS(c, t, e, loc)
Definition: node.h:290
COND_PUSH
#define COND_PUSH(n)
Definition: parse.c:195
parser_params::cur_arg
ID cur_arg
Definition: ripper.c:322
rb_enc_asciicompat
#define rb_enc_asciicompat(enc)
Definition: encoding.h:245
tAMPER
@ tAMPER
Definition: parse.h:149
rb_args_info::pre_args_num
int pre_args_num
Definition: node.h:435
NEW_CLASS
#define NEW_CLASS(n, b, s, loc)
Definition: node.h:364
ERANGE
#define ERANGE
Definition: rb_mjit_min_header-2.7.0.h:10971
local_vars::current
NODE * current
Definition: ripper.c:224
NODE_DOT2
@ NODE_DOT2
Definition: node.h:120
rb_warn0
#define rb_warn0(fmt)
Definition: parse.c:950
NODE_EVSTR
@ NODE_EVSTR
Definition: node.h:98
ID_STATIC_SYM
#define ID_STATIC_SYM
Definition: id.h:30
NUM_SUFFIX_I
#define NUM_SUFFIX_I
Definition: parse.c:14152
WARN_EOL
#define WARN_EOL(tok)
Definition: parse.c:1016
rb_code_position_struct
Definition: node.h:130
rb_enc_precise_mbclen
int rb_enc_precise_mbclen(const char *p, const char *e, rb_encoding *enc)
Definition: encoding.c:1032
tSTRING_END
@ tSTRING_END
Definition: parse.h:159
NUM_SUFFIX_R
#define NUM_SUFFIX_R
Definition: parse.c:14151
NEW_LAMBDA
#define NEW_LAMBDA(a, b, loc)
Definition: node.h:301
int
__inline__ int
Definition: rb_mjit_min_header-2.7.0.h:2839
magic_comment::length
rb_magic_comment_length_t length
Definition: ripper.c:14623
tEMBDOC_END
@ tEMBDOC_END
Definition: eventids2.c:6
rb_args_info::kw_rest_arg
NODE * kw_rest_arg
Definition: node.h:444
modifier_rescue
@ modifier_rescue
Definition: parse.h:90
rb_const_get_at
VALUE rb_const_get_at(VALUE, ID)
Definition: variable.c:2393
tLABEL_END
@ tLABEL_END
Definition: parse.h:164
tASSOC
@ tASSOC
Definition: parse.h:140
keyword_begin
@ keyword_begin
Definition: parse.h:53
eventids2.c
ID_SCOPE_MASK
#define ID_SCOPE_MASK
Definition: id.h:32
dispatch_scan_event
#define dispatch_scan_event(p, t)
Definition: parse.c:12243
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
idGets
@ idGets
Definition: rb_mjit_min_header-2.7.0.h:8701
rb_rational_raw1
#define rb_rational_raw1(x)
Definition: intern.h:176
rb_args_info::post_init
NODE * post_init
Definition: node.h:433
idAND
@ idAND
Definition: rb_mjit_min_header-2.7.0.h:8732
parser_params::ruby_sourceline
int ruby_sourceline
Definition: ripper.c:311
NEW_RETRY
#define NEW_RETRY(loc)
Definition: node.h:305
NODE_CVASGN
@ NODE_CVASGN
Definition: node.h:63
NODE_AND
@ NODE_AND
Definition: node.h:54
NEW_TRUE
#define NEW_TRUE(loc)
Definition: node.h:373
scan_oct
#define scan_oct(s, l, e)
Definition: util.h:53
tCOLON2
@ tCOLON2
Definition: parse.h:137
rb_code_position_struct::lineno
int lineno
Definition: node.h:131
NODE_LIT
@ NODE_LIT
Definition: node.h:93
YYSTYPE::vars
const struct vtable * vars
Definition: parse.h:182
StringValue
use StringValue() instead")))
WARN_S_L
#define WARN_S_L(s, l)
Definition: parse.c:995
tIVAR
@ tIVAR
Definition: parse.h:101
else
else
Definition: rb_mjit_min_header-2.7.0.h:13246
tASET
@ tASET
Definition: parse.h:133
str_label
@ str_label
Definition: parse.c:12913
parser_params::command_start
unsigned int command_start
Definition: ripper.c:329
NEW_STR
#define NEW_STR(s, loc)
Definition: node.h:341
rb_str_dup
VALUE rb_str_dup(VALUE)
Definition: string.c:1516
YY_NULLPTR
#define YY_NULLPTR
Definition: parse.c:1028
NODE_MASGN
@ NODE_MASGN
Definition: node.h:56
RRATIONAL
#define RRATIONAL(obj)
Definition: internal.h:794
ISALPHA
#define ISALPHA(c)
Definition: ruby.h:2311
rb_reg_fragment_setenc
int rb_reg_fragment_setenc(struct parser_params *, VALUE, int)
Definition: parse.c:18836
NEW_MATCH2
#define NEW_MATCH2(n1, n2, loc)
Definition: node.h:338
NEW_DEFINED
#define NEW_DEFINED(e, loc)
Definition: node.h:376
NEW_BLOCK
#define NEW_BLOCK(a, loc)
Definition: node.h:288
NEW_SUPER
#define NEW_SUPER(a, loc)
Definition: node.h:351
yytokentype
yytokentype
Definition: parse.h:46
Qundef
#define Qundef
Definition: ruby.h:470
rb_strterm_literal_struct
Definition: ripper.c:710
parser_params::ptok
const char * ptok
Definition: ripper.c:285
rb_define_singleton_method
void rb_define_singleton_method(VALUE obj, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a singleton method for obj.
Definition: class.c:1755
T_RATIONAL
#define T_RATIONAL
Definition: ruby.h:541
parser_params::error_buffer
VALUE error_buffer
Definition: ripper.c:357
NODE_DXSTR
@ NODE_DXSTR
Definition: node.h:97
YY_STACK_PRINT
#define YY_STACK_PRINT(Bottom, Top)
Definition: parse.c:5323
NEW_MASGN
#define NEW_MASGN(l, r, loc)
Definition: node.h:315
CHAR_BIT
#define CHAR_BIT
Definition: ruby.h:227
rb_str_modify
void rb_str_modify(VALUE)
Definition: string.c:2114
rb_make_exception
VALUE rb_make_exception(int argc, const VALUE *argv)
Make an Exception object from the list of arguments in a manner similar to Kernel#raise.
Definition: eval.c:850
NEW_LVAR
#define NEW_LVAR(v, loc)
Definition: node.h:330
keyword_do_block
@ keyword_do_block
Definition: parse.h:74
NEW_KW_ARG
#define NEW_KW_ARG(i, v, loc)
Definition: node.h:355
NODE_OPCALL
@ NODE_OPCALL
Definition: node.h:70
NODE_SPECIAL_REQUIRED_KEYWORD
#define NODE_SPECIAL_REQUIRED_KEYWORD
Definition: node.h:381
rb_define_method
void rb_define_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
Definition: class.c:1551
NEW_LIST
#define NEW_LIST(a, loc)
Definition: node.h:312
ID_INSTANCE
#define ID_INSTANCE
Definition: id.h:34
rb_long2int
#define rb_long2int(n)
Definition: ruby.h:350
INT2NUM
#define INT2NUM(x)
Definition: ruby.h:1609
rb_cstr_to_inum
VALUE rb_cstr_to_inum(const char *str, int base, int badcheck)
Definition: bignum.c:4012
idLE
@ idLE
Definition: id.h:93
ptr
struct RIMemo * ptr
Definition: debug.c:74
idUPlus
@ idUPlus
Definition: id.h:81
CMDARG_P
#define CMDARG_P()
Definition: parse.c:204
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:5141
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
idCall
@ idCall
Definition: rb_mjit_min_header-2.7.0.h:8727
ruby_sized_xfree
#define ruby_sized_xfree(ptr, size)
Definition: rb_mjit_min_header-2.7.0.h:7367
modifier_while
@ modifier_while
Definition: parse.h:88
YYTERROR
#define YYTERROR
Definition: parse.c:5166
str_dsym
@ str_dsym
Definition: parse.c:12921
str_sword
@ str_sword
Definition: parse.c:12918
rb_stdout
RUBY_EXTERN VALUE rb_stdout
Definition: ruby.h:2090
DBL2NUM
#define DBL2NUM(dbl)
Definition: ruby.h:967
RNode::flags
VALUE flags
Definition: node.h:150
rb_ast_new
rb_ast_t * rb_ast_new(void)
Definition: node.c:1219
tGEQ
@ tGEQ
Definition: parse.h:122
RUBY_INIT_YYLLOC
#define RUBY_INIT_YYLLOC()
Definition: parse.c:128
dispatch_delayed_token
#define dispatch_delayed_token(p, t)
Definition: parse.c:12244
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:58
rb_stderr_tty_p
int rb_stderr_tty_p(void)
Definition: io.c:7958
YYFPRINTF
#define YYFPRINTF
Definition: parse.c:102
SPECIAL_CONST_P
#define SPECIAL_CONST_P(x)
Definition: ruby.h:1313
BIGNUM_NEGATE
#define BIGNUM_NEGATE(b)
Definition: internal.h:767
NODE_BLOCK
@ NODE_BLOCK
Definition: node.h:33
mixed_error
#define mixed_error(enc1, enc2)
st.h
rb_strterm_literal_struct::u1
union rb_strterm_literal_struct::@67 u1
NULL
#define NULL
Definition: _sdbm.c:101
T_COMPLEX
#define T_COMPLEX
Definition: ruby.h:542
ADD2HEAP
#define ADD2HEAP(new, cnt, ptr)
Definition: parse.c:19329
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:438
rb_strterm_literal_struct::dummy
VALUE dummy
Definition: ripper.c:712
NEW_IN
#define NEW_IN(c, t, e, loc)
Definition: node.h:295
tRSHFT
@ tRSHFT
Definition: parse.h:135
RNode::u2
union RNode::@123 u2
tLEQ
@ tLEQ
Definition: parse.h:123
PRIsVALUE
#define PRIsVALUE
Definition: ruby.h:166
parser_params::pcur
const char * pcur
Definition: ripper.c:283
LVAR_USED
#define LVAR_USED
Definition: parse.c:16269
token_info::beg
rb_code_position_t beg
Definition: ripper.c:253
tOROP
@ tOROP
Definition: parse.h:125
tWORDS_BEG
@ tWORDS_BEG
Definition: parse.h:155
nd_set_node_id
#define nd_set_node_id(n, id)
Definition: node.h:212
rb_enc_from_encoding
VALUE rb_enc_from_encoding(rb_encoding *encoding)
Definition: encoding.c:116
last
unsigned int last
Definition: nkf.c:4324
NUMPARAM_IDX_TO_ID
#define NUMPARAM_IDX_TO_ID(idx)
Definition: parse.c:237
NODE_DSTR
@ NODE_DSTR
Definition: node.h:95
rb_fatal
void rb_fatal(const char *fmt,...)
Definition: error.c:2720
yypact_value_is_default
#define yypact_value_is_default(Yystate)
Definition: parse.c:1728
get_value
#define get_value(val)
Definition: parse.c:588
rb_magic_comment_length_t
long(* rb_magic_comment_length_t)(struct parser_params *p, const char *name, long len)
Definition: parse.c:14509
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
error
const rb_iseq_t const char * error
Definition: rb_mjit_min_header-2.7.0.h:13506
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:108
RB_WARN_CATEGORY_EXPERIMENTAL
@ RB_WARN_CATEGORY_EXPERIMENTAL
Definition: internal.h:1561
DEF_EXPR
#define DEF_EXPR(n)
Definition: parse.c:152
rb_ascii8bit_encindex
int rb_ascii8bit_encindex(void)
Definition: encoding.c:1322
NODE_CDECL
@ NODE_CDECL
Definition: node.h:62
strncmp
int strncmp(const char *, const char *, size_t)
rb_args_info::kw_args
NODE * kw_args
Definition: node.h:443
yyerror
#define yyerror(yylloc, p, msg)
Definition: parse.c:416
YY_INITIAL_VALUE
#define YY_INITIAL_VALUE(Value)
Definition: parse.c:1327
yytable_value_is_error
#define yytable_value_is_error(Yytable_value)
Definition: parse.c:1733
rb_respond_to
int rb_respond_to(VALUE, ID)
Definition: vm_method.c:2190
NODE_CVAR
@ NODE_CVAR
Definition: node.h:87
rb_imemo_new
VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0)
Definition: gc.c:2306
set_yylval_literal
#define set_yylval_literal(x)
Definition: parse.c:12214
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:12219
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
v
int VALUE v
Definition: rb_mjit_min_header-2.7.0.h:12332
rb_args_info::pre_init
NODE * pre_init
Definition: node.h:432
keyword_def
@ keyword_def
Definition: parse.h:51
ALLOC_N
#define ALLOC_N(type, n)
Definition: ruby.h:1663
rb_str_resize
VALUE rb_str_resize(VALUE, long)
Definition: string.c:2709
parser_params::ast
rb_ast_t * ast
Definition: ripper.c:324
YYSTYPE
Definition: parse.h:174
IS_SPCARG
#define IS_SPCARG(c)
Definition: parse.c:13795
rb_ast_delete_node
void rb_ast_delete_node(rb_ast_t *ast, NODE *n)
Definition: node.c:1211
STR_FUNC_QWORDS
#define STR_FUNC_QWORDS
Definition: parse.c:12905
NODE_IN
@ NODE_IN
Definition: node.h:40
keyword_ensure
@ keyword_ensure
Definition: parse.h:55
rb_ast_body_struct::compile_option
VALUE compile_option
Definition: node.h:396
cc
const struct rb_call_cache * cc
Definition: rb_mjit_min_header-2.7.0.h:13228
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:12944
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
idMesg
@ idMesg
Definition: rb_mjit_min_header-2.7.0.h:8728
WARN_ID
#define WARN_ID(i)
Definition: parse.c:998
lex.c
rb_raise
void rb_raise(VALUE exc, const char *fmt,...)
Definition: error.c:2669
rb_reg_compile
VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline)
Definition: re.c:2952
token_flush
#define token_flush(ptr)
Definition: parse.c:417
rb_ary_entry
VALUE rb_ary_entry(VALUE ary, long offset)
Definition: array.c:1512
YYLLOC_DEFAULT
#define YYLLOC_DEFAULT(Current, Rhs, N)
Definition: parse.c:108
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:5136
tCOLON3
@ tCOLON3
Definition: parse.h:138
NEW_IF
#define NEW_IF(c, t, e, loc)
Definition: node.h:289
YYSTYPE::val
VALUE val
Definition: parse.h:177
NUM2UINT
#define NUM2UINT(x)
Definition: ruby.h:716
keyword__LINE__
@ keyword__LINE__
Definition: parse.h:95
rb_parser_get_debug_output
VALUE rb_parser_get_debug_output(VALUE self)
Definition: parse.c:19300
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
obj
const VALUE VALUE obj
Definition: rb_mjit_min_header-2.7.0.h:5742
idNil
@ idNil
Definition: rb_mjit_min_header-2.7.0.h:8739
tEMBDOC_BEG
@ tEMBDOC_BEG
Definition: eventids2.c:4
rb_strterm_literal_t
struct rb_strterm_literal_struct rb_strterm_literal_t
NODE_UNLESS
@ NODE_UNLESS
Definition: node.h:35
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:14510
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
memcpy
void * memcpy(void *__restrict, const void *__restrict, size_t)
ORDINAL_PARAM
@ ORDINAL_PARAM
Definition: parse.c:230
NEW_OPCALL
#define NEW_OPCALL(r, m, a, loc)
Definition: node.h:348
tIGNORED_NL
@ tIGNORED_NL
Definition: eventids2.c:2
NEW_ALIAS
#define NEW_ALIAS(n, o, loc)
Definition: node.h:361
tLABEL
@ tLABEL
Definition: parse.h:104
rb_ast_struct
Definition: node.h:399
rb_parser_warn_location
void rb_parser_warn_location(VALUE vparser, int warn)
Definition: parse.c:19002
str_dword
@ str_dword
Definition: parse.c:12919
rb_args_info::opt_args
NODE * opt_args
Definition: node.h:446
BEG
#define BEG(no)
Definition: re.c:25
tFLOAT
@ tFLOAT
Definition: parse.h:106
rb_node_init
void rb_node_init(NODE *n, enum node_type type, VALUE a0, VALUE a1, VALUE a2)
Definition: node.c:1095
rb_ascii8bit_encoding
rb_encoding * rb_ascii8bit_encoding(void)
Definition: encoding.c:1316
keyword_true
@ keyword_true
Definition: parse.h:81
set_yylval_str
#define set_yylval_str(x)
Definition: parse.c:12209
NEW_CONST
#define NEW_CONST(v, loc)
Definition: node.h:333
tokfix
#define tokfix(p)
Definition: parse.c:13050
nd_ainfo
#define nd_ainfo
Definition: node.h:254
rb_args_info
Definition: node.h:431
kwtable::id
short id[2]
Definition: lex.c:34
vtable_pop
#define vtable_pop(tbl, n)
Definition: parse.c:12650
YYSYNTAX_ERROR
#define YYSYNTAX_ERROR
rb_ary_pattern_info::post_args
NODE * post_args
Definition: node.h:456
NEW_NIL
#define NEW_NIL(loc)
Definition: node.h:372
rb_encoding
const typedef OnigEncodingType rb_encoding
Definition: encoding.h:115
parser_params::pvtbl
st_table * pvtbl
Definition: ripper.c:308
NEW_DSTR
#define NEW_DSTR(s, loc)
Definition: node.h:342
WARN_S
#define WARN_S(s)
Definition: parse.c:996
idLTLT
@ idLTLT
Definition: id.h:90
rb_str_intern
VALUE rb_str_intern(VALUE)
Definition: symbol.c:710
rb_warn1L
#define rb_warn1L(l, fmt, a)
Definition: parse.c:961
tHEREDOC_BEG
@ tHEREDOC_BEG
Definition: eventids2.c:7
YYCASE_
#define YYCASE_(N, S)
tREGEXP_BEG
@ tREGEXP_BEG
Definition: parse.h:154
rb_strterm_mark
void rb_strterm_mark(VALUE obj)
Definition: parse.c:765
token
unsigned short token
Definition: id.c:36
rb_ary_pattern_info::rest_arg
NODE * rest_arg
Definition: node.h:455
memmove
#define memmove(dst, src, len)
Definition: rb_mjit_min_header-2.7.0.h:2848
HERETERM_LENGTH_MAX
#define HERETERM_LENGTH_MAX
tQSYMBOLS_BEG
@ tQSYMBOLS_BEG
Definition: parse.h:158
tIMAGINARY
@ tIMAGINARY
Definition: parse.h:108
RE_OPTION_ENCODING
#define RE_OPTION_ENCODING(e)
Definition: parse.c:703
rb_strterm_literal_struct::u3
union rb_strterm_literal_struct::@69 u3
st_init_numtable_with_size
st_table * st_init_numtable_with_size(st_index_t size)
Definition: st.c:660
nd_set_first_lineno
#define nd_set_first_lineno(n, v)
Definition: node.h:201
idNeq
@ idNeq
Definition: id.h:98
NEW_CVAR
#define NEW_CVAR(v, loc)
Definition: node.h:334
node.h
rb_args_info::imemo
VALUE imemo
Definition: node.h:450
NEW_NTH_REF
#define NEW_NTH_REF(n, loc)
Definition: node.h:335
rb_enc_from_index
rb_encoding * rb_enc_from_index(int index)
Definition: encoding.c:609
ESCAPE_META
#define ESCAPE_META
Definition: parse.c:13258
NEW_SELF
#define NEW_SELF(loc)
Definition: node.h:371
keyword_END
@ keyword_END
Definition: parse.h:94
rb_args_info::ruby2_keywords
unsigned int ruby2_keywords
Definition: node.h:448
parser_params::do_split
unsigned int do_split
Definition: ripper.c:352
RUBY_DTRACE_PARSE_HOOK
#define RUBY_DTRACE_PARSE_HOOK(name)
tREGEXP_END
@ tREGEXP_END
Definition: parse.h:113
NEW_DASGN
#define NEW_DASGN(v, val, loc)
Definition: node.h:318
i
uint32_t i
Definition: rb_mjit_min_header-2.7.0.h:5464
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:12245
RB_OBJ_WRITTEN
#define RB_OBJ_WRITTEN(a, oldv, b)
Definition: ruby.h:1509
ruby_global_name_punct_bits
const RUBY_FUNC_EXPORTED unsigned int ruby_global_name_punct_bits[(0x7e - 0x20+31)/32]
Definition: parse.c:13735
tSTRING_DEND
@ tSTRING_DEND
Definition: parse.h:160
NODE_IF
@ NODE_IF
Definition: node.h:34
YYEOF
#define YYEOF
Definition: parse.c:5139
tLBRACE_ARG
@ tLBRACE_ARG
Definition: parse.h:146
NODE_ENSURE
@ NODE_ENSURE
Definition: node.h:53
keyword_else
@ keyword_else
Definition: parse.h:61
vtable
Definition: ripper.c:207
EXPR_BEG_ANY
@ EXPR_BEG_ANY
Definition: parse.c:167
STR_FUNC_LABEL
#define STR_FUNC_LABEL
Definition: parse.c:12908
rb_compile_warning
void rb_compile_warning(const char *file, int line, const char *fmt,...)
Definition: error.c:285
rb_builtin_type_name
const char * rb_builtin_type_name(int t)
Definition: error.c:761
keyword_retry
@ keyword_retry
Definition: parse.h:70
mask
enum @11::@13::@14 mask
yytype_int16
short int yytype_int16
Definition: parse.c:1254
lex_state_e
lex_state_e
Definition: ripper.c:151
INT_MAX
#define INT_MAX
Definition: rb_mjit_min_header-2.7.0.h:4052
keyword__FILE__
@ keyword__FILE__
Definition: parse.h:96
TOK_INTERN
#define TOK_INTERN()
Definition: parse.c:381
RCOMPLEX_SET_IMAG
#define RCOMPLEX_SET_IMAG(cmp, i)
Definition: internal.h:815
rb_node_case_when_optimizable_literal
VALUE rb_node_case_when_optimizable_literal(const NODE *const node)
Definition: compile.c:4288
T_REGEXP
#define T_REGEXP
Definition: ruby.h:529
long
#define long
Definition: rb_mjit_min_header-2.7.0.h:2880
YYMAXDEPTH
#define YYMAXDEPTH
Definition: parse.c:5386
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:12867
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:1990
rb_errinfo
VALUE rb_errinfo(void)
The current exception in the current thread.
Definition: eval.c:1881
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:13048
rb_parser_calloc
void * rb_parser_calloc(struct parser_params *p, size_t nelem, size_t size)
Definition: parse.c:19343
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:38
nd_end
#define nd_end
Definition: node.h:262
va_end
#define va_end(v)
Definition: rb_mjit_min_header-2.7.0.h:3979
tANDOP
@ tANDOP
Definition: parse.h:124
cnt
rb_atomic_t cnt[RUBY_NSIG]
Definition: signal.c:503
idGE
@ idGE
Definition: id.h:95
idPow
@ idPow
Definition: id.h:83
rb_obj_freeze
VALUE rb_obj_freeze(VALUE)
Make the object unmodifiable.
Definition: object.c:1080
YYLTYPE
Definition: parse.h:195
keyword_then
@ keyword_then
Definition: parse.h:59
idOR
@ idOR
Definition: rb_mjit_min_header-2.7.0.h:8733
rb_strterm_literal_struct::nest
long nest
Definition: ripper.c:713
term
const char term
Definition: id.c:37
NUMPARAM_MAX
@ NUMPARAM_MAX
Definition: parse.c:232
stderr
#define stderr
Definition: rb_mjit_min_header-2.7.0.h:1485
tLSHFT
@ tLSHFT
Definition: parse.h:134
magic_comment
Definition: ripper.c:14620
STR_FUNC_ESCAPE
#define STR_FUNC_ESCAPE
Definition: parse.c:12902
NODE_DASGN_CURR
@ NODE_DASGN_CURR
Definition: node.h:59
YYEMPTY
#define YYEMPTY
Definition: parse.c:5138
rb_eTypeError
VALUE rb_eTypeError
Definition: error.c:922
tok
#define tok(p)
Definition: parse.c:13051
rb_parser_set_location_of_none
YYLTYPE * rb_parser_set_location_of_none(struct parser_params *p, YYLTYPE *yylloc)
Definition: parse.c:17128
STR_FUNC_SYMBOL
#define STR_FUNC_SYMBOL
Definition: parse.c:12906
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:1657
NODE_COLON2
@ NODE_COLON2
Definition: node.h:118
NODE_DOT3
@ NODE_DOT3
Definition: node.h:121
NEW_DOT2
#define NEW_DOT2(b, e, loc)
Definition: node.h:369
node_type
node_type
Definition: node.h:22
rb_io_gets_internal
VALUE rb_io_gets_internal(VALUE io)
Definition: io.c:3579
ALLOC
#define ALLOC(type)
Definition: ruby.h:1664
reg_named_capture_assign_t
Definition: ripper.c:18938
lex_eol_p
#define lex_eol_p(p)
Definition: parse.c:12942
NEW_MODULE
#define NEW_MODULE(n, b, loc)
Definition: node.h:366
tOP_ASGN
@ tOP_ASGN
Definition: parse.h:139
NODE_BREAK
@ NODE_BREAK
Definition: node.h:46
END_OF_INPUT
@ END_OF_INPUT
Definition: parse.h:48
CALL_Q_P
#define CALL_Q_P(q)
Definition: parse.c:427
COND_IN_FF
@ COND_IN_FF
Definition: parse.c:17821
WARN_SPACE_CHAR
#define WARN_SPACE_CHAR(c, prefix)
Definition: parse.c:13150
rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:920
parser_params::in_def
unsigned int in_def
Definition: ripper.c:336
input
unsigned int input
Definition: nkf.c:4325
set_yylval_node
#define set_yylval_node(x)
Definition: parse.c:12204
YYSTYPE::num
int num
Definition: parse.h:180
NODE_GVAR
@ NODE_GVAR
Definition: node.h:84
NEW_DEFN
#define NEW_DEFN(i, a, d, loc)
Definition: node.h:285
ALLOCA_N
#define ALLOCA_N(type, n)
Definition: ruby.h:1684
parser_params::strterm
rb_strterm_t * strterm
Definition: ripper.c:276
RARRAY_AREF
#define RARRAY_AREF(a, i)
Definition: ruby.h:1101
vtable::pos
int pos
Definition: ripper.c:209
compile_for_eval
#define compile_for_eval
Definition: parse.c:422
rb_ast_add_mark_object
void rb_ast_add_mark_object(rb_ast_t *ast, VALUE obj)
Definition: node.c:1395
EXPR_FNAME_bit
@ EXPR_FNAME_bit
Definition: parse.c:142
NODE_XSTR
@ NODE_XSTR
Definition: node.h:96
keyword_end
@ keyword_end
Definition: parse.h:56
STRNCASECMP
#define STRNCASECMP(s1, s2, n)
Definition: ruby.h:2324
Qnull
#define Qnull
Definition: parse.c:942
idFWD_REST
#define idFWD_REST
Definition: parse.c:693
parser_params::heredoc_end
int heredoc_end
Definition: ripper.c:303
idGTGT
@ idGTGT
Definition: id.h:91
PRIsWARN
#define PRIsWARN
Definition: parse.c:1000
NEW_LASGN
#define NEW_LASGN(v, val, loc)
Definition: node.h:317
str_xquote
@ str_xquote
Definition: parse.c:12916
rb_parser_lex_state_name
VALUE rb_parser_lex_state_name(enum lex_state_e state)
Definition: parse.c:17058
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
idUScore
@ idUScore
Definition: rb_mjit_min_header-2.7.0.h:8740
NODE_ARGS
@ NODE_ARGS
Definition: node.h:101
NEW_COLON3
#define NEW_COLON3(i, loc)
Definition: node.h:368
NEW_XSTR
#define NEW_XSTR(s, loc)
Definition: node.h:343
STR_FUNC_LIST
#define STR_FUNC_LIST
Definition: parse.c:12909
tRATIONAL
@ tRATIONAL
Definition: parse.h:107
nd_first_column
#define nd_first_column(n)
Definition: node.h:198
NEW_HASH
#define NEW_HASH(a, loc)
Definition: node.h:314
parser_params::heap
rb_imemo_tmpbuf_t * heap
Definition: ripper.c:271
vtable_free
#define vtable_free(tbl)
Definition: parse.c:12611
NODE_DVAR
@ NODE_DVAR
Definition: node.h:83
rb_parser_printf
void rb_parser_printf(struct parser_params *p, const char *fmt,...)
Definition: parse.c:19390
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
rb_str_new_cstr
#define rb_str_new_cstr(str)
Definition: rb_mjit_min_header-2.7.0.h:6117
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:19237
NEW_OP_ASGN_OR
#define NEW_OP_ASGN_OR(i, val, loc)
Definition: node.h:326
rb_syntax_error_append
VALUE rb_syntax_error_append(VALUE exc, VALUE file, int line, int column, rb_encoding *enc, const char *fmt, va_list args)
Definition: error.c:104
RB_OBJ_WRITE
#define RB_OBJ_WRITE(a, slot, b)
Definition: ruby.h:1508
modifier_unless
@ modifier_unless
Definition: parse.h:87
rb_args_info::post_args_num
int post_args_num
Definition: node.h:436
keyword_while
@ keyword_while
Definition: parse.h:64
tLPAREN_ARG
@ tLPAREN_ARG
Definition: parse.h:142
CONST_ID
#define CONST_ID(var, str)
Definition: ruby.h:1841
yyerror1
#define yyerror1(loc, msg)
Definition: parse.c:415
IS_lex_state
#define IS_lex_state(ls)
Definition: parse.c:174
StringValueCStr
#define StringValueCStr(v)
Definition: ruby.h:604
tDSTAR
@ tDSTAR
Definition: parse.h:148
CSI_SGR
#define CSI_SGR
rb_yytnamerr
size_t rb_yytnamerr(struct parser_params *p, char *yyres, const char *yystr)
Definition: parse.c:19437
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:17113
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:124
local_vars::prev
struct local_vars * prev
Definition: ripper.c:221
parser_params::lval
YYSTYPE * lval
Definition: ripper.c:273
STR_FUNC_REGEXP
#define STR_FUNC_REGEXP
Definition: parse.c:12904
EOF
#define EOF
Definition: vsnprintf.c:203
rb_args_info::no_kwarg
unsigned int no_kwarg
Definition: node.h:447
PRINTF_ARGS
PRINTF_ARGS(void rb_parser_fatal(struct parser_params *p, const char *fmt,...), 2, 3)
NODE_LVAR
@ NODE_LVAR
Definition: node.h:82
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:12903
NODE_STR
@ NODE_STR
Definition: node.h:94
rb_parser_compile_string
rb_ast_t * rb_parser_compile_string(VALUE vparser, const char *f, VALUE s, int line)
Definition: parse.c:12846
src
__inline__ const void *__restrict src
Definition: rb_mjit_min_header-2.7.0.h:2836
rb_str_buf_append
VALUE rb_str_buf_append(VALUE, VALUE)
Definition: string.c:2950
fmt
const VALUE int int int int int int VALUE char * fmt
Definition: rb_mjit_min_header-2.7.0.h:6462
rb_strterm_literal_struct::u0
union rb_strterm_literal_struct::@66 u0
keyword_super
@ keyword_super
Definition: parse.h:78
U
Definition: dtoa.c:290
strcmp
int strcmp(const char *, const char *)
set_yylval_name
#define set_yylval_name(x)
Definition: parse.c:12221
ISCNTRL
#define ISCNTRL(c)
Definition: ruby.h:2315
RCOMPLEX
#define RCOMPLEX(obj)
Definition: internal.h:811
keyword_BEGIN
@ keyword_BEGIN
Definition: parse.h:93
parser_params::ptr
long ptr
Definition: ripper.c:287
NEW_SCLASS
#define NEW_SCLASS(r, b, loc)
Definition: node.h:365
MBCLEN_CHARFOUND_P
#define MBCLEN_CHARFOUND_P(ret)
Definition: encoding.h:191
tSTRING_DBEG
@ tSTRING_DBEG
Definition: parse.h:161
RARRAY_LEN
#define RARRAY_LEN(a)
Definition: ruby.h:1070
st_foreach
int st_foreach(st_table *tab, st_foreach_callback_func *func, st_data_t arg)
Definition: st.c:1718
END
#define END(name)
Definition: asm.h:115
rb_rational_new
VALUE rb_rational_new(VALUE, VALUE)
Definition: rational.c:1945
RE_OPTION_ENCODING_NONE
#define RE_OPTION_ENCODING_NONE(o)
Definition: parse.c:705
iseq_label_data
Definition: compile.c:62
rb_sym_intern_ascii_cstr
#define rb_sym_intern_ascii_cstr(ptr)
Definition: rb_mjit_min_header-2.7.0.h:7758
YY_ATTRIBUTE_UNUSED
#define YY_ATTRIBUTE_UNUSED
Definition: parse.c:1299
NODE_IVAR
@ NODE_IVAR
Definition: node.h:85
char
#define char
Definition: rb_mjit_min_header-2.7.0.h:2876
NEW_OP_ASGN1
#define NEW_OP_ASGN1(p, id, a, loc)
Definition: node.h:323
k__END__
@ k__END__
Definition: eventids2.c:9
parser_params::lvtbl
struct local_vars * lvtbl
Definition: ripper.c:307
parser_params::lastline
VALUE lastline
Definition: ripper.c:280
rb_cObject
RUBY_EXTERN VALUE rb_cObject
Definition: ruby.h:2010
nd_beg
#define nd_beg
Definition: node.h:261
parser_params::gets_
union parser_params::@64::@65 gets_
parser_params::toksiz
int toksiz
Definition: ripper.c:301
buf
unsigned char buf[MIME_BUF_SIZE]
Definition: nkf.c:4322
n
const char size_t n
Definition: rb_mjit_min_header-2.7.0.h:5456
rb_str_cat_cstr
#define rb_str_cat_cstr(str, ptr)
Definition: rb_mjit_min_header-2.7.0.h:6126
rb_exc_raise
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
Definition: eval.c:667
re_pattern_buffer
Definition: onigmo.h:755
T_BIGNUM
#define T_BIGNUM
Definition: ruby.h:533
NODE_BEGIN
@ NODE_BEGIN
Definition: node.h:50
TypedData_Get_Struct
#define TypedData_Get_Struct(obj, type, data_type, sval)
Definition: ruby.h:1252
rb_funcall
#define rb_funcall(recv, mid, argc,...)
Definition: rb_mjit_min_header-2.7.0.h:6585
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:80
scan_hex
#define scan_hex(s, l, e)
Definition: util.h:55
keyword_and
@ keyword_and
Definition: parse.h:83
SWITCH_BY_COND_TYPE
#define SWITCH_BY_COND_TYPE(t, w, arg)
Definition: parse.c:17824
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:127
T_ARRAY
#define T_ARRAY
Definition: ruby.h:530
arg
VALUE arg
Definition: rb_mjit_min_header-2.7.0.h:5601
idCOLON2
@ idCOLON2
Definition: id.h:107
rb_strterm_literal_struct::term
long term
Definition: ripper.c:725
argv
char ** argv
Definition: ruby.c:223
STATIC_ASSERT
STATIC_ASSERT(rb_strterm_heredoc_t, sizeof(rb_strterm_heredoc_t)<=4 *SIZEOF_VALUE)
NODE_ONCE
@ NODE_ONCE
Definition: node.h:100
ID2VAL
#define ID2VAL(id)
Definition: parse.c:935
f
#define f
rb_set_errinfo
void rb_set_errinfo(VALUE err)
Sets the current exception ($!) to the given value.
Definition: eval.c:1895
RNode::nd_loc
rb_code_location_t nd_loc
Definition: node.h:172
lex_goto_eol
#define lex_goto_eol(p)
Definition: parse.c:12941
idOROP
@ idOROP
Definition: id.h:109
rb_strterm_heredoc_struct::length
unsigned length
Definition: ripper.c:742
parser_params::debug_output
VALUE debug_output
Definition: ripper.c:320
keyword_return
@ keyword_return
Definition: parse.h:76
rb_write_error_str
RUBY_EXTERN void rb_write_error_str(VALUE mesg)
Definition: io.c:7936
YYSTACK_FREE
#define YYSTACK_FREE
Definition: parse.c:1378
rb_define_global_const
void rb_define_global_const(const char *, VALUE)
Definition: variable.c:2892
nd_once_body
#define nd_once_body(node)
Definition: parse.c:16610
YYABORT
#define YYABORT
Definition: parse.c:5142
ST_CONTINUE
@ ST_CONTINUE
Definition: st.h:99
rb_make_backtrace
VALUE rb_make_backtrace(void)
Definition: vm_backtrace.c:872
NODE_IASGN
@ NODE_IASGN
Definition: node.h:61
RUBY_SYMBOL_EXPORT_BEGIN
#define RUBY_SYMBOL_EXPORT_BEGIN
Definition: missing.h:48
xmalloc
#define xmalloc
Definition: defines.h:211
xrealloc
#define xrealloc
Definition: defines.h:214
unterminated_literal
#define unterminated_literal(mesg)
nd_set_first_column
#define nd_set_first_column(n, v)
Definition: node.h:199
NEW_VCALL
#define NEW_VCALL(m, loc)
Definition: node.h:350
ENCODING_GET
#define ENCODING_GET(obj)
Definition: encoding.h:62
tSP
@ tSP
Definition: parse.h:114
YYINITDEPTH
#define YYINITDEPTH
Definition: parse.c:5375
dispatch_heredoc_end
#define dispatch_heredoc_end(p)
Definition: parse.c:14223
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:19189
klass
VALUE klass
Definition: rb_mjit_min_header-2.7.0.h:13254
NODE_ARGS_AUX
@ NODE_ARGS_AUX
Definition: node.h:102
nd_lit
#define nd_lit
Definition: node.h:244
NEW_CASE3
#define NEW_CASE3(h, b, loc)
Definition: node.h:293
rb_complex_raw
VALUE rb_complex_raw(VALUE x, VALUE y)
Definition: complex.c:1521
rb_str_subseq
VALUE rb_str_subseq(VALUE, long, long)
Definition: string.c:2474
st_data_t
unsigned long st_data_t
Definition: rb_mjit_min_header-2.7.0.h:5363
idDot3
@ idDot3
Definition: id.h:80
tEQQ
@ tEQQ
Definition: parse.h:120
rb_utf8_encoding
rb_encoding * rb_utf8_encoding(void)
Definition: encoding.c:1328
rb_strterm_heredoc_struct::quote
unsigned quote
Definition: ripper.c:744
NEW_ARGS_AUX
#define NEW_ARGS_AUX(r, b, loc)
Definition: node.h:353
parser_params::line_count
int line_count
Definition: ripper.c:310
str
char str[HTML_ESCAPE_MAX_LEN+1]
Definition: escape.c:18
mixed_escape
#define mixed_escape(beg, enc1, enc2)
NEW_BACK_REF
#define NEW_BACK_REF(n, loc)
Definition: node.h:336
NEW_IASGN
#define NEW_IASGN(v, val, loc)
Definition: node.h:320
nd_first_lineno
#define nd_first_lineno(n)
Definition: node.h:200
keyword_undef
@ keyword_undef
Definition: parse.h:52
parser_params::lex
struct parser_params::@64 lex
nd_set_last_loc
#define nd_set_last_loc(n, v)
Definition: node.h:210
rb_enc_find_index
int rb_enc_find_index(const char *name)
Definition: encoding.c:693
yyalloc::yyls_alloc
YYLTYPE yyls_alloc
Definition: ripper.c:1413
EXPR_END_ANY
@ EXPR_END_ANY
Definition: parse.c:169
rb_usascii_str_new
#define rb_usascii_str_new(str, len)
Definition: rb_mjit_min_header-2.7.0.h:6118
COND_IN_OP
@ COND_IN_OP
Definition: parse.c:17819
YYTRANSLATE
#define YYTRANSLATE(YYX)
Definition: parse.c:1487
YY_SYMBOL_PRINT
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: parse.c:5256
RFLOAT
#define RFLOAT(obj)
Definition: internal.h:803
NODE_WHEN
@ NODE_WHEN
Definition: node.h:39
NODE_BLOCK_PASS
@ NODE_BLOCK_PASS
Definition: node.h:109
EXPR_ENDARG_bit
@ EXPR_ENDARG_bit
Definition: parse.c:137
parser_params::prevline
VALUE prevline
Definition: ripper.c:279
vtable_add
#define vtable_add(tbl, id)
Definition: parse.c:12633
DVARS_INHERIT
#define DVARS_INHERIT
Definition: parse.c:247
NODE_MATCH
@ NODE_MATCH
Definition: node.h:90
RUBY_TYPED_FREE_IMMEDIATELY
#define RUBY_TYPED_FREE_IMMEDIATELY
Definition: ruby.h:1207
idLASTLINE
@ idLASTLINE
Definition: rb_mjit_min_header-2.7.0.h:8752
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:13121
MEMCPY
#define MEMCPY(p1, p2, type, n)
Definition: ruby.h:1753
literal_flush
#define literal_flush(p, ptr)
Definition: parse.c:12242
keyword_until
@ keyword_until
Definition: parse.h:65
NEW_OP_ASGN_AND
#define NEW_OP_ASGN_AND(i, val, loc)
Definition: node.h:327
parser_params::tokidx
int tokidx
Definition: ripper.c:300
keyword_for
@ keyword_for
Definition: parse.h:66
rb_parser_compile_string_path
rb_ast_t * rb_parser_compile_string_path(VALUE vparser, VALUE f, VALUE s, int line)
Definition: parse.c:12852
rb_hash_aset
VALUE rb_hash_aset(VALUE hash, VALUE key, VALUE val)
Definition: hash.c:2779
rb_reserved_word
const struct kwtable * rb_reserved_word(const char *str, unsigned int len)
Definition: parse.c:19173
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:12910
SET_LEX_STATE
#define SET_LEX_STATE(ls)
Definition: parse.c:177
NEW_FALSE
#define NEW_FALSE(loc)
Definition: node.h:374
COND_IN_COND
@ COND_IN_COND
Definition: parse.c:17820
nd_else
#define nd_else
Definition: node.h:220
parser_params::compile_option
VALUE compile_option
Definition: ripper.c:317
NEW_QCALL
#define NEW_QCALL(q, r, m, a, loc)
Definition: parse.c:429
NEW_WHEN
#define NEW_WHEN(c, t, e, loc)
Definition: node.h:294
argc
int argc
Definition: ruby.c:222
vtable::prev
struct vtable * prev
Definition: ripper.c:211
RE_OPTION_ONCE
#define RE_OPTION_ONCE
Definition: parse.c:701
parser_params::ruby__end__seen
unsigned int ruby__end__seen
Definition: ripper.c:331
NEW_BREAK
#define NEW_BREAK(s, loc)
Definition: node.h:302
rb_obj_classname
const char * rb_obj_classname(VALUE)
Definition: variable.c:289
rb_strterm_struct
Definition: ripper.c:755
STR_NEW0
#define STR_NEW0()
Definition: parse.c:378
rb_parser_reg_compile
RUBY_SYMBOL_EXPORT_BEGIN VALUE rb_parser_reg_compile(struct parser_params *p, VALUE str, int options)
Definition: parse.c:18950
keyword_in
@ keyword_in
Definition: parse.h:71
REALLOC_N
#define REALLOC_N(var, type, n)
Definition: ruby.h:1667
rb_code_location_struct::beg_pos
rb_code_position_t beg_pos
Definition: node.h:136
new_nil
#define new_nil(loc)
Definition: parse.c:487
rb_define_const
void rb_define_const(VALUE, const char *, VALUE)
Definition: variable.c:2880
RNode::u1
union RNode::@122 u1
tBACK_REF
@ tBACK_REF
Definition: parse.h:111
HERETERM_LENGTH_BITS
#define HERETERM_LENGTH_BITS
Definition: parse.c:729
NEW_EVSTR
#define NEW_EVSTR(n, loc)
Definition: node.h:346
free
#define free(x)
Definition: dln.c:52
tSTRING_DVAR
@ tSTRING_DVAR
Definition: parse.h:162
YYSTYPE::id
ID id
Definition: parse.h:179
token_info
struct token_info token_info
NEW_WHILE
#define NEW_WHILE(c, b, n, loc)
Definition: node.h:296
err
int err
Definition: win32.c:135
parser_params::pktbl
st_table * pktbl
Definition: ripper.c:309
token_info::nonspc
int nonspc
Definition: ripper.c:255
CMDARG_POP
#define CMDARG_POP()
Definition: parse.c:203
rb_strterm_struct::u
union rb_strterm_struct::@70 u
tUMINUS_NUM
@ tUMINUS_NUM
Definition: parse.h:166
NEW_DOT3
#define NEW_DOT3(b, e, loc)
Definition: node.h:370
tNEQ
@ tNEQ
Definition: parse.h:121
rb_io_write
VALUE rb_io_write(VALUE, VALUE)
Definition: io.c:1804
tDOT2
@ tDOT2
Definition: parse.h:128
lambda_beginning_p
#define lambda_beginning_p()
Definition: parse.c:431
METHOD_NOT
#define METHOD_NOT
Definition: parse.c:690
EXPR_ARG_bit
@ EXPR_ARG_bit
Definition: parse.c:139
rb_data_type_struct
Definition: ruby.h:1148
BUILTIN_TYPE
#define BUILTIN_TYPE(x)
Definition: ruby.h:551
rb_big_norm
VALUE rb_big_norm(VALUE x)
Definition: bignum.c:3152
RFLOAT_VALUE
#define RFLOAT_VALUE(v)
Definition: ruby.h:966
parser_params::cond_stack
stack_type cond_stack
Definition: ripper.c:298
yyalloc
Definition: ripper.c:1409
YYLTYPE::first_column
int first_column
Definition: parse.h:198
NEW_POSTARG
#define NEW_POSTARG(i, v, loc)
Definition: node.h:356
xfree
#define xfree
Definition: defines.h:216
stack_type
VALUE stack_type
Definition: ripper.c:183
IS_ARG
#define IS_ARG()
Definition: parse.c:13792
warn_balanced
#define warn_balanced(tok, op, syn)
Definition: parse.c:14805
RBASIC
#define RBASIC(obj)
Definition: ruby.h:1267
NEW_STRTERM
#define NEW_STRTERM(func, term, paren)
Definition: parse.c:13707
rb_parser_set_yydebug
VALUE rb_parser_set_yydebug(VALUE self, VALUE flag)
Definition: parse.c:19284
SPECIAL_PUNCT
#define SPECIAL_PUNCT(idx)
Definition: parse.c:13740
rb_ary_pattern_info::imemo
VALUE imemo
Definition: node.h:457
YY_
#define YY_(Msgid)
Definition: parse.c:1280
rb_str_new
#define rb_str_new(str, len)
Definition: rb_mjit_min_header-2.7.0.h:6116
rb_parser_encoding
VALUE rb_parser_encoding(VALUE vparser)
Definition: parse.c:19252
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:5212
local_vars::args
struct vtable * args
Definition: ripper.c:215
ENCODING_SET
#define ENCODING_SET(obj, i)
Definition: encoding.h:60
tDOT3
@ tDOT3
Definition: parse.h:129
RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC
#define RUBY_SET_YYLLOC_FROM_STRTERM_HEREDOC(Current)
Definition: parse.c:122
rb_strterm_heredoc_struct
Definition: ripper.c:731
rb_compile_warn
void rb_compile_warn(const char *file, int line, const char *fmt,...)
Definition: error.c:270
parser_params::cmdarg_stack
stack_type cmdarg_stack
Definition: ripper.c:299
vtable_alloc
#define vtable_alloc(prev)
Definition: parse.c:12593
ifndef_ripper
#define ifndef_ripper(x)
Definition: parse.c:943
rb_imemo_tmpbuf_auto_free_pointer
#define rb_imemo_tmpbuf_auto_free_pointer()
Definition: internal.h:1239
NODE_YIELD
@ NODE_YIELD
Definition: node.h:81
NEW_DASGN_CURR
#define NEW_DASGN_CURR(v, val, loc)
Definition: node.h:319
Qtrue
#define Qtrue
Definition: ruby.h:468
errno
int errno
rb_str_catf
VALUE rb_str_catf(VALUE str, const char *format,...)
Definition: sprintf.c:1237
parser_params::paren_nest
int paren_nest
Definition: ripper.c:292
is_notop_id
#define is_notop_id(id)
Definition: symbol.h:35
strcasecmp
int strcasecmp(const char *, const char *) __attribute__((__pure__))
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:17044
len
uint8_t len
Definition: escape.c:17
ID_CLASS
#define ID_CLASS
Definition: id.h:38
idCmp
@ idCmp
Definition: id.h:84
SYMBOL_P
#define SYMBOL_P(x)
Definition: ruby.h:413
NEW_CVASGN
#define NEW_CVASGN(v, val, loc)
Definition: node.h:322
RUBY_SET_YYLLOC_OF_NONE
#define RUBY_SET_YYLLOC_OF_NONE(Current)
Definition: parse.c:124
NEW_RETURN
#define NEW_RETURN(s, loc)
Definition: node.h:310
rb_enc_prev_char
#define rb_enc_prev_char(s, p, e, enc)
Definition: encoding.h:220
RNode::u3
union RNode::@124 u3
rb_usascii_str_new2
#define rb_usascii_str_new2
Definition: intern.h:909
tLBRACE
@ tLBRACE
Definition: parse.h:145
YYLTYPE::first_line
int first_line
Definition: parse.h:197
modifier_until
@ modifier_until
Definition: parse.h:89
cond_type
cond_type
Definition: ripper.c:17863
DVARS_TERMINAL_P
#define DVARS_TERMINAL_P(tbl)
Definition: parse.c:249
YY_IGNORE_MAYBE_UNINITIALIZED_END
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: parse.c:1331
nd_next
#define nd_next
Definition: node.h:216
rb_class_new_instance
VALUE rb_class_new_instance(int, const VALUE *, VALUE)
Allocates and initializes an instance of klass.
Definition: object.c:1955
tBDOT3
@ tBDOT3
Definition: parse.h:131
yylval
#define yylval
Definition: parse.c:12195
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:19373
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:14622
NODE_SPECIAL_NO_NAME_REST
#define NODE_SPECIAL_NO_NAME_REST
Definition: node.h:383
YYSIZE_T
#define YYSIZE_T
Definition: parse.c:1264
rb_parser_new
VALUE rb_parser_new(void)
Definition: parse.c:19179
LONG2FIX
#define LONG2FIX(i)
Definition: ruby.h:265
va_start
#define va_start(v, l)
Definition: rb_mjit_min_header-2.7.0.h:3978
peek_n
#define peek_n(p, c, n)
Definition: parse.c:12945
rb_enc_codelen
int rb_enc_codelen(int c, rb_encoding *enc)
Definition: encoding.c:1089
NODE_BACK_REF
@ NODE_BACK_REF
Definition: node.h:89
nd_line
#define nd_line(n)
Definition: node.h:194
flush_string_content
#define flush_string_content(p, enc)
Definition: parse.c:13732
NO_PARAM
@ NO_PARAM
Definition: parse.c:231
rb_intern_str
#define rb_intern_str(string)
Definition: generator.h:16
T_STRING
#define T_STRING
Definition: ruby.h:528
rb_enc_symname_type
int rb_enc_symname_type(const char *name, long len, rb_encoding *enc, unsigned int allowed_attrset)
Definition: symbol.c:233
EXPR_MID_bit
@ EXPR_MID_bit
Definition: parse.c:141
NODE_DEFINED
@ NODE_DEFINED
Definition: node.h:129
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
va_list
__gnuc_va_list va_list
Definition: rb_mjit_min_header-2.7.0.h:836
rb_args_info::block_arg
ID block_arg
Definition: node.h:441
keyword_case
@ keyword_case
Definition: parse.h:62
NODE_REQUIRED_KEYWORD_P
#define NODE_REQUIRED_KEYWORD_P(node)
Definition: node.h:382
rb_const_defined_at
int rb_const_defined_at(VALUE, ID)
Definition: variable.c:2688
EXPR_BEG_bit
@ EXPR_BEG_bit
Definition: parse.c:135
yytype_int8
signed char yytype_int8
Definition: parse.c:1242
rb_strterm_literal_struct::u2
union rb_strterm_literal_struct::@68 u2
rb_parser_realloc
void * rb_parser_realloc(struct parser_params *p, void *ptr, size_t size)
Definition: parse.c:19353
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:1114
NODE_VALUES
@ NODE_VALUES
Definition: node.h:78
keyword_break
@ keyword_break
Definition: parse.h:67
parser_params::eval_tree_begin
NODE * eval_tree_begin
Definition: ripper.c:355
NODE_FLIP3
@ NODE_FLIP3
Definition: node.h:123
nd_type
#define nd_type(n)
Definition: node.h:188
parser_params::state
enum lex_state_e state
Definition: ripper.c:290
STRTERM_HEREDOC
#define STRTERM_HEREDOC
Definition: parse.c:753
rb_builtin_class_name
const char * rb_builtin_class_name(VALUE x)
Definition: error.c:797
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:12887
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:13257
rb_imemo_tmpbuf_struct
Definition: internal.h:1231
rb_ast_body_struct::root
const NODE * root
Definition: node.h:395
NUM2INT
#define NUM2INT(x)
Definition: ruby.h:715
keyword__ENCODING__
@ keyword__ENCODING__
Definition: parse.h:97
Qnil
#define Qnil
Definition: ruby.h:469
parser_params::brace_nest
int brace_nest
Definition: ripper.c:296
nd_plen
#define nd_plen
Definition: node.h:249
keyword_yield
@ keyword_yield
Definition: parse.h:77
keyword_nil
@ keyword_nil
Definition: parse.h:80
intern_cstr
#define intern_cstr(n, l, en)
Definition: parse.c:375
rb_str_buf_cat
#define rb_str_buf_cat
Definition: intern.h:910
ISXDIGIT
#define ISXDIGIT(c)
Definition: ruby.h:2313
tMATCH
@ tMATCH
Definition: parse.h:126
token_info::token
const char * token
Definition: ripper.c:252
parser_params::ruby_sourcefile_string
VALUE ruby_sourcefile_string
Definition: ripper.c:313
COND_POP
#define COND_POP()
Definition: parse.c:196
NODE_REDO
@ NODE_REDO
Definition: node.h:48
h
size_t st_index_t h
Definition: rb_mjit_min_header-2.7.0.h:5462
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:19044
NEW_COLON2
#define NEW_COLON2(c, i, loc)
Definition: node.h:367
util.h
rb_strterm_heredoc_struct::lastline
VALUE lastline
Definition: ripper.c:732
NUMPARAM_ID_P
#define NUMPARAM_ID_P(id)
Definition: parse.c:235
rb_ary_pattern_info
Definition: node.h:453
str_regexp
@ str_regexp
Definition: parse.c:12917
rb_parser_set_location
YYLTYPE * rb_parser_set_location(struct parser_params *p, YYLTYPE *yylloc)
Definition: parse.c:17138
NEW_UNTIL
#define NEW_UNTIL(c, b, n, loc)
Definition: node.h:297
EXPR_ARG_ANY
@ EXPR_ARG_ANY
Definition: parse.c:168
RB_GC_GUARD
#define RB_GC_GUARD(v)
Definition: ruby.h:585
numberof
#define numberof(array)
Definition: etc.c:618
rb_str_coderange_scan_restartable
long rb_str_coderange_scan_restartable(const char *, const char *, rb_encoding *, int *)
Definition: string.c:567
rb_strlen_lit
#define rb_strlen_lit(str)
Definition: intern.h:913
CSI_BEGIN
#define CSI_BEGIN
tAREF
@ tAREF
Definition: parse.h:132
modifier_if
@ modifier_if
Definition: parse.h:86
parser_params::lpar_beg
int lpar_beg
Definition: ripper.c:294
rb_parser_fatal
void rb_parser_fatal(struct parser_params *p, const char *fmt,...)
Definition: parse.c:17087
tHEREDOC_END
@ tHEREDOC_END
Definition: eventids2.c:8
RSTRING_LEN
#define RSTRING_LEN(str)
Definition: ruby.h:1005
st_free_table
void st_free_table(st_table *tab)
Definition: st.c:709
NEW_SPLAT
#define NEW_SPLAT(a, loc)
Definition: node.h:359
st_table
Definition: st.h:79
rb_strterm_struct::heredoc
rb_strterm_heredoc_t heredoc
Definition: ripper.c:759
ptrdiff_t
long int ptrdiff_t
Definition: rb_mjit_min_header-2.7.0.h:802
rb_strterm_literal_struct::func
long func
Definition: ripper.c:717
nd_2nd
#define nd_2nd
Definition: node.h:226
rb_args_info::rest_arg
ID rest_arg
Definition: node.h:440
set_yylval_noname
#define set_yylval_noname()
Definition: parse.c:12239
tRPAREN
@ tRPAREN
Definition: parse.h:143
ID_CONST
#define ID_CONST
Definition: id.h:37
rb_define_private_method
void rb_define_private_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
Definition: class.c:1569
parser_params::tokline
int tokline
Definition: ripper.c:302
parser_params::node_id
int node_id
Definition: ripper.c:325
NEW_CASE2
#define NEW_CASE2(b, loc)
Definition: node.h:292
rb_enc_isspace
#define rb_enc_isspace(c, enc)
Definition: encoding.h:237
NEW_VALIAS
#define NEW_VALIAS(n, o, loc)
Definition: node.h:362
local_vars::used
struct vtable * used
Definition: ripper.c:217
NODE_SCOPE
@ NODE_SCOPE
Definition: node.h:32
idNeqTilde
@ idNeqTilde
Definition: id.h:104
NEW_DVAR
#define NEW_DVAR(v, loc)
Definition: node.h:331
NODE_RETRY
@ NODE_RETRY
Definition: node.h:49
rb_enc_str_new
VALUE rb_enc_str_new(const char *, long, rb_encoding *)
Definition: string.c:796
NODE_LIST
@ NODE_LIST
Definition: node.h:76
rb_str_cat
VALUE rb_str_cat(VALUE, const char *, long)
Definition: string.c:2812
rb_enc_associate
VALUE rb_enc_associate(VALUE obj, rb_encoding *enc)
Definition: encoding.c:866
tINTEGER
@ tINTEGER
Definition: parse.h:105
RREGEXP_PTR
#define RREGEXP_PTR(r)
Definition: ruby.h:1118
rb_reg_check_preprocess
VALUE rb_reg_check_preprocess(VALUE)
Definition: re.c:2706
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:14153
main
int main(void)
Definition: closure_fn0.c:49
get_id
#define get_id(id)
Definition: parse.c:587
RNode
Definition: node.h:149
__sFILE
Definition: vsnprintf.c:169
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:17077
rb_enc_associate_index
VALUE rb_enc_associate_index(VALUE obj, int idx)
Definition: encoding.c:838
NEW_FCALL
#define NEW_FCALL(m, a, loc)
Definition: node.h:349
rb_usascii_encoding
rb_encoding * rb_usascii_encoding(void)
Definition: encoding.c:1340
rb_dvar_defined
int rb_dvar_defined(ID id, const rb_iseq_t *iseq)
Definition: compile.c:9356
RSTRING_END
#define RSTRING_END(str)
Definition: ruby.h:1013
YYPOPSTACK
#define YYPOPSTACK(N)
tLOWEST
@ tLOWEST
Definition: parse.h:165
memchr
void * memchr(const void *, int, size_t)
name
const char * name
Definition: nkf.c:208
NODE_GASGN
@ NODE_GASGN
Definition: node.h:60