Ruby  2.5.0dev(2017-10-22revision60238)
parse.c
Go to the documentation of this file.
1 /* A Bison parser, made by GNU Bison 2.3. */
2 
3 /* Skeleton implementation for Bison's Yacc-like parsers in C
4 
5  Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6  Free Software Foundation, Inc.
7 
8  This program is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 2, or (at your option)
11  any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software
20  Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  Boston, MA 02110-1301, USA. */
22 
23 /* As a special exception, you may create a larger work that contains
24  part or all of the Bison parser skeleton and distribute that work
25  under terms of your choice, so long as that work isn't itself a
26  parser generator using the skeleton or a modified version thereof
27  as a parser skeleton. Alternatively, if you modify or redistribute
28  the parser skeleton itself, you may (at your option) remove this
29  special exception, which will cause the skeleton and the resulting
30  Bison output files to be licensed under the GNU General Public
31  License without this special exception.
32 
33  This special exception was added by the Free Software Foundation in
34  version 2.2 of Bison. */
35 
36 /* C LALR(1) parser skeleton written by Richard Stallman, by
37  simplifying the original so-called "semantic" parser. */
38 
39 /* All symbols defined below should begin with yy or YY, to avoid
40  infringing on user name space. This should be done even for local
41  variables, as they might otherwise be expanded by user macros.
42  There are some unavoidable exceptions within include files to
43  define necessary library symbols; they are noted "INFRINGES ON
44  USER NAME SPACE" below. */
45 
46 /* Identify Bison output. */
47 #define YYBISON 1
48 
49 /* Bison version. */
50 #define YYBISON_VERSION "2.3"
51 
52 /* Skeleton name. */
53 #define YYSKELETON_NAME "yacc.c"
54 
55 /* Pure parsers. */
56 #define YYPURE 1
57 
58 /* Using locations. */
59 #define YYLSP_NEEDED 1
60 
61 
62 
63 /* Tokens. */
64 #ifndef YYTOKENTYPE
65 # define YYTOKENTYPE
66  /* Put the tokens into the symbol table, so that GDB and other debuggers
67  know about them. */
68  enum yytokentype {
72  keyword_def = 260,
77  keyword_end = 265,
78  keyword_if = 266,
80  keyword_then = 268,
82  keyword_else = 270,
83  keyword_case = 271,
84  keyword_when = 272,
87  keyword_for = 275,
89  keyword_next = 277,
90  keyword_redo = 278,
92  keyword_in = 280,
93  keyword_do = 281,
101  keyword_nil = 289,
104  keyword_and = 292,
105  keyword_or = 293,
106  keyword_not = 294,
107  modifier_if = 295,
115  keyword_END = 303,
119  tIDENTIFIER = 307,
120  tFID = 308,
121  tGVAR = 309,
122  tIVAR = 310,
123  tCONSTANT = 311,
124  tCVAR = 312,
125  tLABEL = 313,
126  tINTEGER = 314,
127  tFLOAT = 315,
128  tRATIONAL = 316,
129  tIMAGINARY = 317,
131  tCHAR = 319,
132  tNTH_REF = 320,
133  tBACK_REF = 321,
134  tREGEXP_END = 322,
135  tUPLUS = 130,
136  tUMINUS = 131,
137  tPOW = 132,
138  tCMP = 133,
139  tEQ = 138,
140  tEQQ = 139,
141  tNEQ = 140,
142  tGEQ = 137,
143  tLEQ = 136,
144  tANDOP = 146,
145  tOROP = 147,
146  tMATCH = 141,
147  tNMATCH = 142,
148  tDOT2 = 128,
149  tDOT3 = 129,
150  tAREF = 143,
151  tASET = 144,
152  tLSHFT = 134,
153  tRSHFT = 135,
154  tANDDOT = 148,
155  tCOLON2 = 145,
156  tCOLON3 = 323,
157  tOP_ASGN = 324,
158  tASSOC = 325,
159  tLPAREN = 326,
160  tLPAREN_ARG = 327,
161  tRPAREN = 328,
162  tLBRACK = 329,
163  tLBRACE = 330,
164  tLBRACE_ARG = 331,
165  tSTAR = 332,
166  tDSTAR = 333,
167  tAMPER = 334,
168  tLAMBDA = 335,
169  tSYMBEG = 336,
170  tSTRING_BEG = 337,
172  tREGEXP_BEG = 339,
173  tWORDS_BEG = 340,
174  tQWORDS_BEG = 341,
180  tSTRING_END = 347,
181  tLAMBEG = 348,
182  tLABEL_END = 349,
183  tLOWEST = 350,
184  tUMINUS_NUM = 351,
186  };
187 #endif
188 /* Tokens. */
189 #define END_OF_INPUT 0
190 #define keyword_class 258
191 #define keyword_module 259
192 #define keyword_def 260
193 #define keyword_undef 261
194 #define keyword_begin 262
195 #define keyword_rescue 263
196 #define keyword_ensure 264
197 #define keyword_end 265
198 #define keyword_if 266
199 #define keyword_unless 267
200 #define keyword_then 268
201 #define keyword_elsif 269
202 #define keyword_else 270
203 #define keyword_case 271
204 #define keyword_when 272
205 #define keyword_while 273
206 #define keyword_until 274
207 #define keyword_for 275
208 #define keyword_break 276
209 #define keyword_next 277
210 #define keyword_redo 278
211 #define keyword_retry 279
212 #define keyword_in 280
213 #define keyword_do 281
214 #define keyword_do_cond 282
215 #define keyword_do_block 283
216 #define keyword_do_LAMBDA 284
217 #define keyword_return 285
218 #define keyword_yield 286
219 #define keyword_super 287
220 #define keyword_self 288
221 #define keyword_nil 289
222 #define keyword_true 290
223 #define keyword_false 291
224 #define keyword_and 292
225 #define keyword_or 293
226 #define keyword_not 294
227 #define modifier_if 295
228 #define modifier_unless 296
229 #define modifier_while 297
230 #define modifier_until 298
231 #define modifier_rescue 299
232 #define keyword_alias 300
233 #define keyword_defined 301
234 #define keyword_BEGIN 302
235 #define keyword_END 303
236 #define keyword__LINE__ 304
237 #define keyword__FILE__ 305
238 #define keyword__ENCODING__ 306
239 #define tIDENTIFIER 307
240 #define tFID 308
241 #define tGVAR 309
242 #define tIVAR 310
243 #define tCONSTANT 311
244 #define tCVAR 312
245 #define tLABEL 313
246 #define tINTEGER 314
247 #define tFLOAT 315
248 #define tRATIONAL 316
249 #define tIMAGINARY 317
250 #define tSTRING_CONTENT 318
251 #define tCHAR 319
252 #define tNTH_REF 320
253 #define tBACK_REF 321
254 #define tREGEXP_END 322
255 #define tUPLUS 130
256 #define tUMINUS 131
257 #define tPOW 132
258 #define tCMP 133
259 #define tEQ 138
260 #define tEQQ 139
261 #define tNEQ 140
262 #define tGEQ 137
263 #define tLEQ 136
264 #define tANDOP 146
265 #define tOROP 147
266 #define tMATCH 141
267 #define tNMATCH 142
268 #define tDOT2 128
269 #define tDOT3 129
270 #define tAREF 143
271 #define tASET 144
272 #define tLSHFT 134
273 #define tRSHFT 135
274 #define tANDDOT 148
275 #define tCOLON2 145
276 #define tCOLON3 323
277 #define tOP_ASGN 324
278 #define tASSOC 325
279 #define tLPAREN 326
280 #define tLPAREN_ARG 327
281 #define tRPAREN 328
282 #define tLBRACK 329
283 #define tLBRACE 330
284 #define tLBRACE_ARG 331
285 #define tSTAR 332
286 #define tDSTAR 333
287 #define tAMPER 334
288 #define tLAMBDA 335
289 #define tSYMBEG 336
290 #define tSTRING_BEG 337
291 #define tXSTRING_BEG 338
292 #define tREGEXP_BEG 339
293 #define tWORDS_BEG 340
294 #define tQWORDS_BEG 341
295 #define tSYMBOLS_BEG 342
296 #define tQSYMBOLS_BEG 343
297 #define tSTRING_DBEG 344
298 #define tSTRING_DEND 345
299 #define tSTRING_DVAR 346
300 #define tSTRING_END 347
301 #define tLAMBEG 348
302 #define tLABEL_END 349
303 #define tLOWEST 350
304 #define tUMINUS_NUM 351
305 #define tLAST_TOKEN 352
306 
307 
308 
309 
310 /* Copy the first part of user declarations. */
311 #line 12 "parse.y"
312 
313 
314 #if !YYPURE
315 # error needs pure parser
316 #endif
317 #ifndef PARSER_DEBUG
318 #define PARSER_DEBUG 0
319 #endif
320 #define YYDEBUG 1
321 #define YYERROR_VERBOSE 1
322 #define YYSTACK_USE_ALLOCA 0
323 
324 #include "ruby/ruby.h"
325 #include "ruby/st.h"
326 #include "ruby/encoding.h"
327 #include "internal.h"
328 #include "node.h"
329 #include "parse.h"
330 #include "symbol.h"
331 #include "regenc.h"
332 #include <stdio.h>
333 #include <errno.h>
334 #include <ctype.h>
335 #include "probes.h"
336 
337 #ifndef WARN_PAST_SCOPE
338 # define WARN_PAST_SCOPE 0
339 #endif
340 
341 #define TAB_WIDTH 8
342 
343 #define YYMALLOC(size) rb_parser_malloc(parser, (size))
344 #define YYREALLOC(ptr, size) rb_parser_realloc(parser, (ptr), (size))
345 #define YYCALLOC(nelem, size) rb_parser_calloc(parser, (nelem), (size))
346 #define YYFREE(ptr) rb_parser_free(parser, (ptr))
347 #define YYFPRINTF rb_parser_printf
348 #if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
349 # define YY_LOCATION_PRINT(File, Loc) \
350  rb_parser_printf(parser, "%d.%d-%d.%d", \
351  (Loc).first_line, (Loc).first_column, \
352  (Loc).last_line, (Loc).last_column)
353 #endif
354 #undef malloc
355 #undef realloc
356 #undef calloc
357 #undef free
358 #define malloc YYMALLOC
359 #define realloc YYREALLOC
360 #define calloc YYCALLOC
361 #define free YYFREE
362 
364  EXPR_BEG_bit, /* ignore newline, +/- is a sign. */
365  EXPR_END_bit, /* newline significant, +/- is an operator. */
366  EXPR_ENDARG_bit, /* ditto, and unbound braces. */
367  EXPR_ENDFN_bit, /* ditto, and unbound braces. */
368  EXPR_ARG_bit, /* newline significant, +/- is an operator. */
369  EXPR_CMDARG_bit, /* newline significant, +/- is an operator. */
370  EXPR_MID_bit, /* newline significant, +/- is an operator. */
371  EXPR_FNAME_bit, /* ignore newline, no reserved words. */
372  EXPR_DOT_bit, /* right after `.' or `::', no reserved words. */
373  EXPR_CLASS_bit, /* immediate after `class', no here document. */
374  EXPR_LABEL_bit, /* flag bit, label is allowed. */
375  EXPR_LABELED_bit, /* flag bit, just after a label. */
376  EXPR_FITEM_bit, /* symbol literal as FNAME. */
378 };
379 /* examine combinations */
381 #define DEF_EXPR(n) EXPR_##n = (1 << EXPR_##n##_bit)
383  DEF_EXPR(END),
384  DEF_EXPR(ENDARG),
385  DEF_EXPR(ENDFN),
386  DEF_EXPR(ARG),
387  DEF_EXPR(CMDARG),
388  DEF_EXPR(MID),
389  DEF_EXPR(FNAME),
390  DEF_EXPR(DOT),
391  DEF_EXPR(CLASS),
392  DEF_EXPR(LABEL),
393  DEF_EXPR(LABELED),
394  DEF_EXPR(FITEM),
395  EXPR_VALUE = EXPR_BEG,
396  EXPR_BEG_ANY = (EXPR_BEG | EXPR_MID | EXPR_CLASS),
397  EXPR_ARG_ANY = (EXPR_ARG | EXPR_CMDARG),
398  EXPR_END_ANY = (EXPR_END | EXPR_ENDARG | EXPR_ENDFN)
399 };
400 #define IS_lex_state_for(x, ls) ((x) & (ls))
401 #define IS_lex_state_all_for(x, ls) (((x) & (ls)) == (ls))
402 #define IS_lex_state(ls) IS_lex_state_for(lex_state, (ls))
403 #define IS_lex_state_all(ls) IS_lex_state_all_for(lex_state, (ls))
404 
405 # define SET_LEX_STATE(ls) \
406  (lex_state = \
407  (yydebug ? \
408  rb_parser_trace_lex_state(parser, lex_state, (ls), __LINE__) : \
409  (enum lex_state_e)(ls)))
410 
412 
413 # define SHOW_BITSTACK(stack, name) (yydebug ? rb_parser_show_bitstack(parser, stack, name, __LINE__) : (void)0)
414 # define BITSTACK_PUSH(stack, n) (((stack) = ((stack)<<1)|((n)&1)), SHOW_BITSTACK(stack, #stack"(push)"))
415 # define BITSTACK_POP(stack) (((stack) = (stack) >> 1), SHOW_BITSTACK(stack, #stack"(pop)"))
416 # define BITSTACK_LEXPOP(stack) (((stack) = ((stack) >> 1) | ((stack) & 1)), SHOW_BITSTACK(stack, #stack"(lexpop)"))
417 # define BITSTACK_SET_P(stack) (SHOW_BITSTACK(stack, #stack), (stack)&1)
418 # define BITSTACK_SET(stack, n) ((stack)=(n), SHOW_BITSTACK(stack, #stack"(set)"))
419 
420 #define COND_PUSH(n) BITSTACK_PUSH(cond_stack, (n))
421 #define COND_POP() BITSTACK_POP(cond_stack)
422 #define COND_LEXPOP() BITSTACK_LEXPOP(cond_stack)
423 #define COND_P() BITSTACK_SET_P(cond_stack)
424 #define COND_SET(n) BITSTACK_SET(cond_stack, (n))
425 
426 #define CMDARG_PUSH(n) BITSTACK_PUSH(cmdarg_stack, (n))
427 #define CMDARG_POP() BITSTACK_POP(cmdarg_stack)
428 #define CMDARG_LEXPOP() BITSTACK_LEXPOP(cmdarg_stack)
429 #define CMDARG_P() BITSTACK_SET_P(cmdarg_stack)
430 #define CMDARG_SET(n) BITSTACK_SET(cmdarg_stack, (n))
431 
432 struct vtable {
433  ID *tbl;
434  int pos;
435  int capa;
436  struct vtable *prev;
437 };
438 
439 struct local_vars {
440  struct vtable *args;
441  struct vtable *vars;
442  struct vtable *used;
443 # if WARN_PAST_SCOPE
444  struct vtable *past;
445 # endif
446  struct local_vars *prev;
447  stack_type cmdargs;
448 };
449 
450 #define DVARS_INHERIT ((void*)1)
451 #define DVARS_TOPSCOPE NULL
452 #define DVARS_SPECIAL_P(tbl) (!POINTER_P(tbl))
453 #define POINTER_P(val) ((VALUE)(val) & ~(VALUE)3)
454 
455 typedef struct token_info {
456  const char *token;
457  int linenum;
458  int column;
459  int nonspc;
460  struct token_info *next;
461 } token_info;
462 
463 /*
464  Structure of Lexer Buffer:
465 
466  lex_pbeg tokp lex_p lex_pend
467  | | | |
468  |-----------+--------------+------------|
469  |<------------>|
470  token
471 */
472 struct parser_params {
473  rb_imemo_alloc_t *heap;
474 
475  YYSTYPE *lval;
476 
477  struct {
478  NODE *strterm;
479  VALUE (*gets)(struct parser_params*,VALUE);
480  VALUE input;
481  VALUE lastline;
482  VALUE nextline;
483  const char *pbeg;
484  const char *pcur;
485  const char *pend;
486  const char *ptok;
487  long gets_ptr;
488  enum lex_state_e state;
489  int paren_nest;
490  int lpar_beg;
491  int brace_nest;
492  } lex;
493  stack_type cond_stack;
494  stack_type cmdarg_stack;
495  int tokidx;
496  int toksiz;
497  int tokline;
498  int heredoc_end;
499  int heredoc_indent;
501  char *tokenbuf;
502  struct local_vars *lvtbl;
503  int line_count;
504  int ruby_sourceline; /* current line no. */
505  char *ruby_sourcefile; /* current source file */
507  rb_encoding *enc;
509  VALUE compile_option;
510 
511  VALUE debug_buffer;
512  VALUE debug_output;
513 
514  ID cur_arg;
515 
516  unsigned int command_start:1;
517  unsigned int eofp: 1;
518  unsigned int ruby__end__seen: 1;
519  unsigned int yydebug: 1;
520  unsigned int has_shebang: 1;
521  unsigned int in_defined: 1;
522  unsigned int in_main: 1;
523  unsigned int in_kwarg: 1;
524  unsigned int in_single: 1;
525  unsigned int in_def: 1;
526  unsigned int token_seen: 1;
527  unsigned int token_info_enabled: 1;
528 # if WARN_PAST_SCOPE
529  unsigned int past_scope_enabled: 1;
530 # endif
531  unsigned int error_p: 1;
532  unsigned int cr_seen: 1;
533 
534 #ifndef RIPPER
535  /* Ruby core only */
536 
537  NODE *eval_tree_begin;
538  NODE *eval_tree;
539  VALUE error_buffer;
540  VALUE debug_lines;
541  VALUE coverage;
542  const struct rb_block *base_block;
543 #else
544  /* Ripper only */
545 
546  VALUE delayed;
547  int delayed_line;
548  int delayed_col;
549 
550  VALUE value;
551  VALUE result;
552  VALUE parsing_thread;
553 #endif
554 };
555 
556 #ifdef RIPPER
557 #define intern_cstr(n,l,en) rb_intern3(n,l,en)
558 #else
559 #define intern_cstr(n,l,en) rb_intern3(n,l,en)
560 #endif
561 
562 #define STR_NEW(p,n) rb_enc_str_new((p),(n),current_enc)
563 #define STR_NEW0() rb_enc_str_new(0,0,current_enc)
564 #define STR_NEW2(p) rb_enc_str_new((p),strlen(p),current_enc)
565 #define STR_NEW3(p,n,e,func) parser_str_new((p),(n),(e),(func),current_enc)
566 #define TOK_INTERN() intern_cstr(tok(), toklen(), current_enc)
567 
568 static int parser_yyerror(struct parser_params*, const char*);
569 #define yyerror0(msg) parser_yyerror(parser, (msg))
570 #define yyerror(yylloc, parser, msg) yyerror0(msg)
571 #define token_flush(p) ((p)->lex.ptok = (p)->lex.pcur)
572 
573 #define lex_strterm (parser->lex.strterm)
574 #define lex_state (parser->lex.state)
575 #define cond_stack (parser->cond_stack)
576 #define cmdarg_stack (parser->cmdarg_stack)
577 #define paren_nest (parser->lex.paren_nest)
578 #define lpar_beg (parser->lex.lpar_beg)
579 #define brace_nest (parser->lex.brace_nest)
580 #define in_single (parser->in_single)
581 #define in_def (parser->in_def)
582 #define in_main (parser->in_main)
583 #define in_defined (parser->in_defined)
584 #define tokenbuf (parser->tokenbuf)
585 #define tokidx (parser->tokidx)
586 #define toksiz (parser->toksiz)
587 #define tokline (parser->tokline)
588 #define lex_input (parser->lex.input)
589 #define lex_lastline (parser->lex.lastline)
590 #define lex_nextline (parser->lex.nextline)
591 #define lex_pbeg (parser->lex.pbeg)
592 #define lex_p (parser->lex.pcur)
593 #define lex_pend (parser->lex.pend)
594 #define heredoc_end (parser->heredoc_end)
595 #define heredoc_indent (parser->heredoc_indent)
596 #define heredoc_line_indent (parser->heredoc_line_indent)
597 #define command_start (parser->command_start)
598 #define lex_gets_ptr (parser->lex.gets_ptr)
599 #define lex_gets (parser->lex.gets)
600 #define lvtbl (parser->lvtbl)
601 #define ruby__end__seen (parser->ruby__end__seen)
602 #define ruby_sourceline (parser->ruby_sourceline)
603 #define ruby_sourcefile (parser->ruby_sourcefile)
604 #define ruby_sourcefile_string (parser->ruby_sourcefile_string)
605 #define current_enc (parser->enc)
606 #define current_arg (parser->cur_arg)
607 #define yydebug (parser->yydebug)
608 #ifdef RIPPER
609 #define compile_for_eval (0)
610 #else
611 #define compile_for_eval (parser->base_block != 0 && !in_main)
612 #define ruby_eval_tree (parser->eval_tree)
613 #define ruby_eval_tree_begin (parser->eval_tree_begin)
614 #define ruby_debug_lines (parser->debug_lines)
615 #define ruby_coverage (parser->coverage)
616 #endif
617 #define tokp lex.ptok
618 
619 #define token_column ((int)(parser->tokp - lex_pbeg))
620 
621 #define CALL_Q_P(q) ((q) == TOKEN2VAL(tANDDOT))
622 #define NODE_CALL_Q(q) (CALL_Q_P(q) ? NODE_QCALL : NODE_CALL)
623 #define NEW_QCALL(q,r,m,a) NEW_NODE(NODE_CALL_Q(q),r,m,a)
624 
625 #define lambda_beginning_p() (lpar_beg && lpar_beg == paren_nest)
626 
627 static enum yytokentype yylex(YYSTYPE*, YYLTYPE*, struct parser_params*);
628 
629 static inline void
630 parser_set_line(NODE *n, int l)
631 {
632  nd_set_line(n, l);
633 }
634 
635 #ifndef RIPPER
636 static inline void
637 set_line_body(NODE *body, int line)
638 {
639  if (!body) return;
640  switch (nd_type(body)) {
641  case NODE_RESCUE:
642  case NODE_ENSURE:
643  nd_set_line(body, line);
644  }
645 }
646 
647 #define yyparse ruby_yyparse
648 
649 static NODE* node_newnode(struct parser_params *, enum node_type, VALUE, VALUE, VALUE);
650 #define rb_node_newnode(type, a1, a2, a3) node_newnode(parser, (type), (a1), (a2), (a3))
651 
652 static NODE *cond_gen(struct parser_params*,NODE*,int,int);
653 #define cond(node,column) cond_gen(parser, (node), FALSE, column)
654 #define method_cond(node,column) cond_gen(parser, (node), TRUE, column)
655 #define new_nil() NEW_NIL()
656 static NODE *new_if_gen(struct parser_params*,NODE*,NODE*,NODE*,int);
657 #define new_if(cc,left,right,column) new_if_gen(parser, (cc), (left), (right), (column))
658 static NODE *new_unless_gen(struct parser_params*,NODE*,NODE*,NODE*,int);
659 #define new_unless(cc,left,right,column) new_unless_gen(parser, (cc), (left), (right), (column))
660 static NODE *logop_gen(struct parser_params*,enum node_type,NODE*,NODE*,int);
661 #define logop(id,node1,node2,column) \
662  logop_gen(parser, ((id)==idAND||(id)==idANDOP)?NODE_AND:NODE_OR, \
663  (node1), (node2), (column))
664 
665 static NODE *newline_node(NODE*);
666 static void fixpos(NODE*,NODE*);
667 
668 static int value_expr_gen(struct parser_params*,NODE*);
669 static void void_expr_gen(struct parser_params*,NODE*);
670 static NODE *remove_begin(NODE*);
671 static NODE *remove_begin_all(NODE*);
672 #define value_expr(node) value_expr_gen(parser, (node) = remove_begin(node))
673 #define void_expr0(node) void_expr_gen(parser, (node))
674 #define void_expr(node) void_expr0((node) = remove_begin(node))
675 static void void_stmts_gen(struct parser_params*,NODE*);
676 #define void_stmts(node) void_stmts_gen(parser, (node))
677 static void reduce_nodes_gen(struct parser_params*,NODE**);
678 #define reduce_nodes(n) reduce_nodes_gen(parser,(n))
679 static void block_dup_check_gen(struct parser_params*,NODE*,NODE*);
680 #define block_dup_check(n1,n2) block_dup_check_gen(parser,(n1),(n2))
681 
682 static NODE *block_append_gen(struct parser_params*,NODE*,NODE*,int);
683 #define block_append(h,t,column) block_append_gen(parser,(h),(t),(column))
684 static NODE *list_append_gen(struct parser_params*,NODE*,NODE*,int);
685 #define list_append(l,i,column) list_append_gen(parser,(l),(i),(column))
686 static NODE *list_concat(NODE*,NODE*);
687 static NODE *arg_append_gen(struct parser_params*,NODE*,NODE*,int);
688 #define arg_append(h,t,column) arg_append_gen(parser,(h),(t),(column))
689 static NODE *arg_concat_gen(struct parser_params*,NODE*,NODE*,int);
690 #define arg_concat(h,t,column) arg_concat_gen(parser,(h),(t),(column))
691 static NODE *literal_concat_gen(struct parser_params*,NODE*,NODE*,int);
692 #define literal_concat(h,t,column) literal_concat_gen(parser,(h),(t),(column))
693 static int literal_concat0(struct parser_params *, VALUE, VALUE);
694 static NODE *new_evstr_gen(struct parser_params*,NODE*,int);
695 #define new_evstr(n, column) new_evstr_gen(parser,(n),(column))
696 static NODE *evstr2dstr_gen(struct parser_params*,NODE*,int);
697 #define evstr2dstr(n,column) evstr2dstr_gen(parser,(n),(column))
698 static NODE *splat_array(NODE*);
699 
700 static NODE *call_bin_op_gen(struct parser_params*,NODE*,ID,NODE*,int);
701 #define call_bin_op(recv,id,arg1,column) call_bin_op_gen(parser, (recv),(id),(arg1),(column))
702 static NODE *call_uni_op_gen(struct parser_params*,NODE*,ID,int);
703 #define call_uni_op(recv,id,column) call_uni_op_gen(parser, (recv),(id),(column))
704 static NODE *new_qcall_gen(struct parser_params* parser, ID atype, NODE *recv, ID mid, NODE *args, int column);
705 #define new_qcall(q,r,m,a,column) new_qcall_gen(parser,q,r,m,a,column)
706 #define new_command_qcall(q,r,m,a,column) new_qcall_gen(parser,q,r,m,a,column)
707 static NODE *new_command_gen(struct parser_params*parser, NODE *m, NODE *a) {m->nd_args = a; return m;}
708 #define new_command(m,a) new_command_gen(parser, m, a)
709 static NODE *method_add_block_gen(struct parser_params*parser, NODE *m, NODE *b) {b->nd_iter = m; return b;}
710 #define method_add_block(m,b) method_add_block_gen(parser, m, b)
711 
712 static NODE *new_args_gen(struct parser_params*,NODE*,NODE*,ID,NODE*,NODE*);
713 #define new_args(f,o,r,p,t) new_args_gen(parser, (f),(o),(r),(p),(t))
714 static NODE *new_args_tail_gen(struct parser_params*,NODE*,ID,ID,int);
715 #define new_args_tail(k,kr,b,column) new_args_tail_gen(parser, (k),(kr),(b),(column))
716 static NODE *new_kw_arg_gen(struct parser_params *parser, NODE *k, int column);
717 #define new_kw_arg(k,column) new_kw_arg_gen(parser, k, column)
718 
719 static VALUE negate_lit_gen(struct parser_params*, VALUE);
720 #define negate_lit(lit) negate_lit_gen(parser, lit)
721 static NODE *ret_args_gen(struct parser_params*,NODE*);
722 #define ret_args(node) ret_args_gen(parser, (node))
723 static NODE *arg_blk_pass(NODE*,NODE*);
724 static NODE *new_yield_gen(struct parser_params*,NODE*,int);
725 #define new_yield(node,column) new_yield_gen(parser, (node), (column))
726 static NODE *dsym_node_gen(struct parser_params*,NODE*,int);
727 #define dsym_node(node,column) dsym_node_gen(parser, (node), (column))
728 
729 static NODE *gettable_gen(struct parser_params*,ID,int);
730 #define gettable(id,column) gettable_gen(parser,(id),(column))
731 static NODE *assignable_gen(struct parser_params*,ID,NODE*,int);
732 #define assignable(id,node,column) assignable_gen(parser, (id), (node), (column))
733 
734 static NODE *aryset_gen(struct parser_params*,NODE*,NODE*,int);
735 #define aryset(node1,node2,column) aryset_gen(parser, (node1), (node2), (column))
736 static NODE *attrset_gen(struct parser_params*,NODE*,ID,ID,int);
737 #define attrset(node,q,id,column) attrset_gen(parser, (node), (q), (id), (column))
738 
739 static void rb_backref_error_gen(struct parser_params*,NODE*);
740 #define rb_backref_error(n) rb_backref_error_gen(parser,(n))
741 static NODE *node_assign_gen(struct parser_params*,NODE*,NODE*,int);
742 #define node_assign(node1, node2, column) node_assign_gen(parser, (node1), (node2), (column))
743 
744 static NODE *new_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs, int column);
745 #define new_op_assign(lhs, op, rhs, column) new_op_assign_gen(parser, (lhs), (op), (rhs), (column))
746 static NODE *new_attr_op_assign_gen(struct parser_params *parser, NODE *lhs, ID atype, ID attr, ID op, NODE *rhs, int column);
747 #define new_attr_op_assign(lhs, type, attr, op, rhs, column) new_attr_op_assign_gen(parser, (lhs), (type), (attr), (op), (rhs), (column))
748 static NODE *new_const_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs, int column);
749 #define new_const_op_assign(lhs, op, rhs, column) new_const_op_assign_gen(parser, (lhs), (op), (rhs), (column))
750 
751 static NODE *const_path_field_gen(struct parser_params *parser, NODE *head, ID mid, int column);
752 #define const_path_field(w, n, column) const_path_field_gen(parser, w, n, column)
753 #define top_const_field(n) NEW_COLON3(n)
754 static NODE *const_decl_gen(struct parser_params *parser, NODE* path, int column);
755 #define const_decl(path, column) const_decl_gen(parser, path, column)
756 
757 #define var_field(n) (n)
758 #define backref_assign_error(n, a, column) (rb_backref_error(n), new_begin(0, column))
759 
760 static NODE *kwd_append(NODE*, NODE*);
761 
762 static NODE *new_hash_gen(struct parser_params *parser, NODE *hash, int column);
763 #define new_hash(hash, column) new_hash_gen(parser, (hash), column)
764 
765 static NODE *new_defined_gen(struct parser_params *parser, NODE *expr, int column);
766 #define new_defined(expr, column) new_defined_gen(parser, expr, column)
767 
768 static NODE *new_regexp_gen(struct parser_params *, NODE *, int, int);
769 #define new_regexp(node, opt, column) new_regexp_gen(parser, node, opt, column)
770 
771 static NODE *new_lit_gen(struct parser_params *parser, VALUE sym, int column);
772 #define new_lit(sym, column) new_lit_gen(parser, sym, column)
773 
774 static NODE *new_list_gen(struct parser_params *parser, NODE *item, int column);
775 #define new_list(item, column) new_list_gen(parser, item, column)
776 
777 static NODE *new_str_gen(struct parser_params *parser, VALUE str, int column);
778 #define new_str(s,column) new_str_gen(parser, s, column)
779 
780 static NODE *new_dvar_gen(struct parser_params *parser, ID id, int column);
781 #define new_dvar(id, column) new_dvar_gen(parser, id, column)
782 
783 static NODE *new_resbody_gen(struct parser_params *parser, NODE *exc_list, NODE *stmt, NODE *rescue, int column);
784 #define new_resbody(e,s,r,column) new_resbody_gen(parser, (e),(s),(r),(column))
785 
786 static NODE *new_errinfo_gen(struct parser_params *parser, int column);
787 #define new_errinfo(column) new_errinfo_gen(parser, column)
788 
789 static NODE *new_call_gen(struct parser_params *parser, NODE *recv, ID mid, NODE *args, int column);
790 #define new_call(recv,mid,args,column) new_call_gen(parser, recv,mid,args,column)
791 
792 static NODE *new_fcall_gen(struct parser_params *parser, ID mid, NODE *args, int column);
793 #define new_fcall(mid,args,column) new_fcall_gen(parser, mid, args, column)
794 
795 static NODE *new_for_gen(struct parser_params *parser, NODE *var, NODE *iter, NODE *body, int column);
796 #define new_for(var,iter,body,column) new_for_gen(parser, var, iter, body, column)
797 
798 static NODE *new_gvar_gen(struct parser_params *parser, ID id, int column);
799 #define new_gvar(id, column) new_gvar_gen(parser, id, column)
800 
801 static NODE *new_lvar_gen(struct parser_params *parser, ID id, int column);
802 #define new_lvar(id, column) new_lvar_gen(parser, id, column)
803 
804 static NODE *new_dstr_gen(struct parser_params *parser, VALUE str, int column);
805 #define new_dstr(s, column) new_dstr_gen(parser, s, column)
806 
807 static NODE *new_rescue_gen(struct parser_params *parser, NODE *b, NODE *res, NODE *e, int column);
808 #define new_rescue(b,res,e,column) new_rescue_gen(parser,b,res,e,column)
809 
810 static NODE *new_undef_gen(struct parser_params *parser, NODE *i, int column);
811 #define new_undef(i, column) new_undef_gen(parser, i, column)
812 
813 static NODE *new_zarray_gen(struct parser_params *parser, int column);
814 #define new_zarray(column) new_zarray_gen(parser, column)
815 
816 static NODE *new_ivar_gen(struct parser_params *parser, ID id, int column);
817 #define new_ivar(id, column) new_ivar_gen(parser,id,column)
818 
819 static NODE *new_postarg_gen(struct parser_params *parser, NODE *i, NODE *v, int column);
820 #define new_postarg(i,v,column) new_postarg_gen(parser,i,v,column)
821 
822 static NODE *new_cdecl_gen(struct parser_params *parser, ID v, NODE *val, NODE *path, int column);
823 #define new_cdecl(v,val,path,column) new_cdecl_gen(parser,v,val,path,column)
824 
825 static NODE *new_scope_gen(struct parser_params *parser, NODE *a, NODE *b, int column);
826 #define new_scope(a,b,column) new_scope_gen(parser,a,b,column)
827 
828 static NODE *new_begin_gen(struct parser_params *parser, NODE *b, int column);
829 #define new_begin(b,column) new_begin_gen(parser,b,column)
830 
831 static NODE *new_masgn_gen(struct parser_params *parser, NODE *l, NODE *r, int column);
832 #define new_masgn(l,r,column) new_masgn_gen(parser,l,r,column)
833 
834 static NODE *new_xstring_gen(struct parser_params *, NODE *, int column);
835 #define new_xstring(node, column) new_xstring_gen(parser, node, column)
836 #define new_string1(str) (str)
837 
838 static NODE *new_body_gen(struct parser_params *parser, NODE *param, NODE *stmt, int column);
839 #define new_brace_body(param, stmt, column) new_body_gen(parser, param, stmt, column)
840 #define new_do_body(param, stmt, column) new_body_gen(parser, param, stmt, column)
841 
842 static NODE *match_op_gen(struct parser_params*,NODE*,NODE*,int);
843 #define match_op(node1,node2,column) match_op_gen(parser, (node1), (node2), (column))
844 
845 static ID *local_tbl_gen(struct parser_params*);
846 #define local_tbl() local_tbl_gen(parser)
847 
848 static VALUE reg_compile_gen(struct parser_params*, VALUE, int);
849 #define reg_compile(str,options) reg_compile_gen(parser, (str), (options))
850 static void reg_fragment_setenc_gen(struct parser_params*, VALUE, int);
851 #define reg_fragment_setenc(str,options) reg_fragment_setenc_gen(parser, (str), (options))
852 static int reg_fragment_check_gen(struct parser_params*, VALUE, int);
853 #define reg_fragment_check(str,options) reg_fragment_check_gen(parser, (str), (options))
854 static NODE *reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, int column);
855 #define reg_named_capture_assign(regexp,column) reg_named_capture_assign_gen(parser,(regexp),column)
856 
857 static NODE *parser_heredoc_dedent(struct parser_params*,NODE*);
858 # define heredoc_dedent(str) parser_heredoc_dedent(parser, (str))
859 
860 #define get_id(id) (id)
861 #define get_value(val) (val)
862 #else /* RIPPER */
863 #define NODE_RIPPER NODE_CDECL
864 
865 static inline VALUE
866 ripper_new_yylval(ID a, VALUE b, VALUE c)
867 {
868  return (VALUE)NEW_CDECL(a, b, c);
869 }
870 
871 static inline int
872 ripper_is_node_yylval(VALUE n)
873 {
874  return RB_TYPE_P(n, T_NODE) && nd_type(RNODE(n)) == NODE_RIPPER;
875 }
876 
877 #define value_expr(node) ((void)(node))
878 #define remove_begin(node) (node)
879 #define rb_dvar_defined(id, base) 0
880 #define rb_local_defined(id, base) 0
881 static ID ripper_get_id(VALUE);
882 #define get_id(id) ripper_get_id(id)
883 static VALUE ripper_get_value(VALUE);
884 #define get_value(val) ripper_get_value(val)
885 static VALUE assignable_gen(struct parser_params*,VALUE);
886 #define assignable(lhs,node,column) assignable_gen(parser, (lhs))
887 static int id_is_var_gen(struct parser_params *parser, ID id);
888 #define id_is_var(id) id_is_var_gen(parser, (id))
889 
890 #define method_cond(node,column) (node)
891 #define call_bin_op(recv,id,arg1,column) dispatch3(binary, (recv), STATIC_ID2SYM(id), (arg1))
892 #define match_op(node1,node2,column) call_bin_op((node1), idEqTilde, (node2), -1)
893 #define call_uni_op(recv,id,column) dispatch2(unary, STATIC_ID2SYM(id), (recv))
894 #define logop(id,node1,node2,column) call_bin_op((node1), (id), (node2), -1)
895 #define node_assign(node1, node2, column) dispatch2(assign, (node1), (node2))
896 static VALUE new_qcall_gen(struct parser_params *parser, VALUE q, VALUE r, VALUE m, VALUE a);
897 #define new_qcall(q,r,m,a,column) new_qcall_gen(parser, (r), (q), (m), (a))
898 #define new_command_qcall(q,r,m,a,column) dispatch4(command_call, (r), (q), (m), (a))
899 #define new_command_call(q,r,m,a) dispatch4(command_call, (r), (q), (m), (a))
900 #define new_command(m,a) dispatch2(command, (m), (a));
901 
902 #define new_nil() Qnil
903 static VALUE new_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE op, VALUE rhs);
904 #define new_op_assign(lhs, op, rhs, column) new_op_assign_gen(parser, (lhs), (op), (rhs))
905 static VALUE new_attr_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE type, VALUE attr, VALUE op, VALUE rhs);
906 #define new_attr_op_assign(lhs, type, attr, op, rhs, column) new_attr_op_assign_gen(parser, (lhs), (type), (attr), (op), (rhs))
907 #define new_const_op_assign(lhs, op, rhs, column) new_op_assign(lhs, op, rhs, column)
908 
909 static VALUE new_regexp_gen(struct parser_params *, VALUE, VALUE);
910 #define new_regexp(node, opt, column) new_regexp_gen(parser, node, opt)
911 
912 static VALUE new_xstring_gen(struct parser_params *, VALUE);
913 #define new_xstring(str, column) new_xstring_gen(parser, str)
914 #define new_string1(str) dispatch1(string_literal, str)
915 
916 #define new_brace_body(param, stmt, column) dispatch2(brace_block, escape_Qundef(param), stmt)
917 #define new_do_body(param, stmt, column) dispatch2(do_block, escape_Qundef(param), stmt)
918 
919 #define const_path_field(w, n, column) dispatch2(const_path_field, (w), (n))
920 #define top_const_field(n) dispatch1(top_const_field, (n))
921 static VALUE const_decl_gen(struct parser_params *parser, VALUE path);
922 #define const_decl(path, column) const_decl_gen(parser, path)
923 
924 static VALUE var_field_gen(struct parser_params *parser, VALUE a);
925 #define var_field(a) var_field_gen(parser, (a))
926 static VALUE assign_error_gen(struct parser_params *parser, VALUE a);
927 #define assign_error(a) assign_error_gen(parser, (a))
928 #define backref_assign_error(n, a, column) assign_error(a)
929 
930 #define block_dup_check(n1,n2) ((void)(n1), (void)(n2))
931 #define fixpos(n1,n2) ((void)(n1), (void)(n2))
932 #undef nd_set_line
933 #define nd_set_line(n,l) ((void)(n))
934 
935 static VALUE parser_reg_compile(struct parser_params*, VALUE, int, VALUE *);
936 
937 #endif /* !RIPPER */
938 
940 VALUE rb_parser_reg_compile(struct parser_params* parser, VALUE str, int options);
941 int rb_reg_fragment_setenc(struct parser_params*, VALUE, int);
944 void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int);
945 PRINTF_ARGS(void rb_parser_fatal(struct parser_params *parser, const char *fmt, ...), 2, 3);
947 
948 static ID formal_argument_gen(struct parser_params*, ID);
949 #define formal_argument(id) formal_argument_gen(parser, (id))
950 static ID shadowing_lvar_gen(struct parser_params*,ID);
951 #define shadowing_lvar(name) shadowing_lvar_gen(parser, (name))
952 static void new_bv_gen(struct parser_params*,ID);
953 #define new_bv(id) new_bv_gen(parser, (id))
954 
955 static void local_push_gen(struct parser_params*,int);
956 #define local_push(top) local_push_gen(parser,(top))
957 static void local_pop_gen(struct parser_params*);
958 #define local_pop() local_pop_gen(parser)
959 static void local_var_gen(struct parser_params*, ID);
960 #define local_var(id) local_var_gen(parser, (id))
961 static void arg_var_gen(struct parser_params*, ID);
962 #define arg_var(id) arg_var_gen(parser, (id))
963 static int local_id_gen(struct parser_params*, ID, ID **);
964 #define local_id_ref(id, vidp) local_id_gen(parser, (id), &(vidp))
965 #define local_id(id) local_id_gen(parser, (id), NULL)
966 static ID internal_id_gen(struct parser_params*);
967 #define internal_id() internal_id_gen(parser)
968 
969 static const struct vtable *dyna_push_gen(struct parser_params *);
970 #define dyna_push() dyna_push_gen(parser)
971 static void dyna_pop_gen(struct parser_params*, const struct vtable *);
972 #define dyna_pop(node) dyna_pop_gen(parser, (node))
973 static int dyna_in_block_gen(struct parser_params*);
974 #define dyna_in_block() dyna_in_block_gen(parser)
975 #define dyna_var(id) local_var(id)
976 static int dvar_defined_gen(struct parser_params*, ID, ID**);
977 #define dvar_defined_ref(id, vidp) dvar_defined_gen(parser, (id), &(vidp))
978 #define dvar_defined(id) dvar_defined_gen(parser, (id), NULL)
979 static int dvar_curr_gen(struct parser_params*,ID);
980 #define dvar_curr(id) dvar_curr_gen(parser, (id))
981 
982 static int lvar_defined_gen(struct parser_params*, ID);
983 #define lvar_defined(id) lvar_defined_gen(parser, (id))
984 
985 #ifdef RIPPER
986 # define METHOD_NOT idNOT
987 #else
988 # define METHOD_NOT '!'
989 #endif
990 
991 #define RE_OPTION_ONCE (1<<16)
992 #define RE_OPTION_ENCODING_SHIFT 8
993 #define RE_OPTION_ENCODING(e) (((e)&0xff)<<RE_OPTION_ENCODING_SHIFT)
994 #define RE_OPTION_ENCODING_IDX(o) (((o)>>RE_OPTION_ENCODING_SHIFT)&0xff)
995 #define RE_OPTION_ENCODING_NONE(o) ((o)&RE_OPTION_ARG_ENCODING_NONE)
996 #define RE_OPTION_MASK 0xff
997 #define RE_OPTION_ARG_ENCODING_NONE 32
998 
999 #define NODE_STRTERM NODE_ZARRAY /* nothing to gc */
1000 #define NODE_HEREDOC NODE_ARRAY /* 1, 3 to gc */
1001 #define SIGN_EXTEND(x,n) (((1<<(n)-1)^((x)&~(~0<<(n))))-(1<<(n)-1))
1002 #define nd_func u1.id
1003 #if SIZEOF_SHORT == 2
1004 #define nd_term(node) ((signed short)(node)->u2.id)
1005 #else
1006 #define nd_term(node) SIGN_EXTEND((node)->u2.id, CHAR_BIT*2)
1007 #endif
1008 #define nd_paren(node) (char)((node)->u2.id >> CHAR_BIT*2)
1009 #define nd_nest u3.cnt
1010 
1011 #define TOKEN2ID(tok) ( \
1012  tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
1013  tTOKEN_INSTANCE_BEGIN<(tok)&&(tok)<tTOKEN_INSTANCE_END ? TOKEN2INSTANCEID(tok) : \
1014  tTOKEN_GLOBAL_BEGIN<(tok)&&(tok)<tTOKEN_GLOBAL_END ? TOKEN2GLOBALID(tok) : \
1015  tTOKEN_CONST_BEGIN<(tok)&&(tok)<tTOKEN_CONST_END ? TOKEN2CONSTID(tok) : \
1016  tTOKEN_CLASS_BEGIN<(tok)&&(tok)<tTOKEN_CLASS_END ? TOKEN2CLASSID(tok) : \
1017  tTOKEN_ATTRSET_BEGIN<(tok)&&(tok)<tTOKEN_ATTRSET_END ? TOKEN2ATTRSETID(tok) : \
1018  ((tok) / ((tok)<tPRESERVED_ID_END && ((tok)>=128 || rb_ispunct(tok)))))
1019 
1020 /****** Ripper *******/
1021 
1022 #ifdef RIPPER
1023 #define RIPPER_VERSION "0.1.0"
1024 
1025 static inline VALUE intern_sym(const char *name);
1026 
1027 #include "eventids1.c"
1028 #include "eventids2.c"
1029 
1030 static VALUE ripper_dispatch0(struct parser_params*,ID);
1031 static VALUE ripper_dispatch1(struct parser_params*,ID,VALUE);
1032 static VALUE ripper_dispatch2(struct parser_params*,ID,VALUE,VALUE);
1033 static VALUE ripper_dispatch3(struct parser_params*,ID,VALUE,VALUE,VALUE);
1034 static VALUE ripper_dispatch4(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE);
1035 static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE);
1036 static VALUE ripper_dispatch7(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE);
1037 static void ripper_error_gen(struct parser_params *parser);
1038 #define ripper_error() ripper_error_gen(parser)
1039 
1040 #define dispatch0(n) ripper_dispatch0(parser, TOKEN_PASTE(ripper_id_, n))
1041 #define dispatch1(n,a) ripper_dispatch1(parser, TOKEN_PASTE(ripper_id_, n), (a))
1042 #define dispatch2(n,a,b) ripper_dispatch2(parser, TOKEN_PASTE(ripper_id_, n), (a), (b))
1043 #define dispatch3(n,a,b,c) ripper_dispatch3(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c))
1044 #define dispatch4(n,a,b,c,d) ripper_dispatch4(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d))
1045 #define dispatch5(n,a,b,c,d,e) ripper_dispatch5(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e))
1046 #define dispatch7(n,a,b,c,d,e,f,g) ripper_dispatch7(parser, TOKEN_PASTE(ripper_id_, n), (a), (b), (c), (d), (e), (f), (g))
1047 
1048 #define yyparse ripper_yyparse
1049 
1050 #define ID2VAL(id) STATIC_ID2SYM(id)
1051 #define TOKEN2VAL(t) ID2VAL(TOKEN2ID(t))
1052 #define KWD2EID(t, v) ripper_new_yylval(keyword_##t, get_value(v), 0)
1053 
1054 #define arg_new() dispatch0(args_new)
1055 #define arg_add(l,a) dispatch2(args_add, (l), (a))
1056 #define arg_add_star(l,a) dispatch2(args_add_star, (l), (a))
1057 #define arg_add_block(l,b) dispatch2(args_add_block, (l), (b))
1058 #define arg_add_optblock(l,b) ((b)==Qundef? (l) : dispatch2(args_add_block, (l), (b)))
1059 #define bare_assoc(v) dispatch1(bare_assoc_hash, (v))
1060 #define arg_add_assocs(l,b) arg_add((l), bare_assoc(b))
1061 
1062 #define args2mrhs(a) dispatch1(mrhs_new_from_args, (a))
1063 #define mrhs_new() dispatch0(mrhs_new)
1064 #define mrhs_add(l,a) dispatch2(mrhs_add, (l), (a))
1065 #define mrhs_add_star(l,a) dispatch2(mrhs_add_star, (l), (a))
1066 
1067 #define mlhs_new() dispatch0(mlhs_new)
1068 #define mlhs_add(l,a) dispatch2(mlhs_add, (l), (a))
1069 #define mlhs_add_star(l,a) dispatch2(mlhs_add_star, (l), (a))
1070 #define mlhs_add_post(l,a) dispatch2(mlhs_add_post, (l), (a))
1071 
1072 #define params_new(pars, opts, rest, pars2, kws, kwrest, blk) \
1073  dispatch7(params, (pars), (opts), (rest), (pars2), (kws), (kwrest), (blk))
1074 
1075 #define blockvar_new(p,v) dispatch2(block_var, (p), (v))
1076 
1077 #define method_optarg(m,a) ((a)==Qundef ? (m) : dispatch2(method_add_arg,(m),(a)))
1078 #define method_arg(m,a) dispatch2(method_add_arg,(m),(a))
1079 #define method_add_block(m,b) dispatch2(method_add_block, (m), (b))
1080 
1081 #define escape_Qundef(x) ((x)==Qundef ? Qnil : (x))
1082 
1083 static inline VALUE
1084 new_args_gen(struct parser_params *parser, VALUE f, VALUE o, VALUE r, VALUE p, VALUE tail)
1085 {
1086  NODE *t = (NODE *)tail;
1087  VALUE k = t->u1.value, kr = t->u2.value, b = t->u3.value;
1088  return params_new(f, o, r, p, k, kr, escape_Qundef(b));
1089 }
1090 #define new_args(f,o,r,p,t) new_args_gen(parser, (f),(o),(r),(p),(t))
1091 
1092 static inline VALUE
1093 new_args_tail_gen(struct parser_params *parser, VALUE k, VALUE kr, VALUE b)
1094 {
1095  return (VALUE)MEMO_NEW(k, kr, b);
1096 }
1097 #define new_args_tail(k,kr,b,column) new_args_tail_gen(parser, (k),(kr),(b))
1098 
1099 #define new_defined(expr,column) dispatch1(defined, (expr))
1100 
1101 static VALUE parser_heredoc_dedent(struct parser_params*,VALUE);
1102 # define heredoc_dedent(str) parser_heredoc_dedent(parser, (str))
1103 
1104 #define FIXME 0
1105 
1106 #else
1107 #define ID2VAL(id) ((VALUE)(id))
1108 #define TOKEN2VAL(t) ID2VAL(t)
1109 #define KWD2EID(t, v) keyword_##t
1110 #endif /* RIPPER */
1111 
1112 #ifndef RIPPER
1113 # define Qnone 0
1114 # define Qnull 0
1115 # define ifndef_ripper(x) (x)
1116 #else
1117 # define Qnone Qnil
1118 # define Qnull Qundef
1119 # define ifndef_ripper(x)
1120 #endif
1121 
1122 # define rb_warn0(fmt) WARN_CALL(WARN_ARGS(fmt, 1))
1123 # define rb_warn1(fmt,a) WARN_CALL(WARN_ARGS(fmt, 2), (a))
1124 # define rb_warn2(fmt,a,b) WARN_CALL(WARN_ARGS(fmt, 3), (a), (b))
1125 # define rb_warn3(fmt,a,b,c) WARN_CALL(WARN_ARGS(fmt, 4), (a), (b), (c))
1126 # define rb_warn4(fmt,a,b,c,d) WARN_CALL(WARN_ARGS(fmt, 5), (a), (b), (c), (d))
1127 # define rb_warning0(fmt) WARNING_CALL(WARNING_ARGS(fmt, 1))
1128 # define rb_warning1(fmt,a) WARNING_CALL(WARNING_ARGS(fmt, 2), (a))
1129 # define rb_warning2(fmt,a,b) WARNING_CALL(WARNING_ARGS(fmt, 3), (a), (b))
1130 # define rb_warning3(fmt,a,b,c) WARNING_CALL(WARNING_ARGS(fmt, 4), (a), (b), (c))
1131 # define rb_warning4(fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS(fmt, 5), (a), (b), (c), (d))
1132 # define rb_warn0L(l,fmt) WARN_CALL(WARN_ARGS_L(l, fmt, 1))
1133 # define rb_warn1L(l,fmt,a) WARN_CALL(WARN_ARGS_L(l, fmt, 2), (a))
1134 # define rb_warn2L(l,fmt,a,b) WARN_CALL(WARN_ARGS_L(l, fmt, 3), (a), (b))
1135 # define rb_warn3L(l,fmt,a,b,c) WARN_CALL(WARN_ARGS_L(l, fmt, 4), (a), (b), (c))
1136 # define rb_warn4L(l,fmt,a,b,c,d) WARN_CALL(WARN_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1137 # define rb_warning0L(l,fmt) WARNING_CALL(WARNING_ARGS_L(l, fmt, 1))
1138 # define rb_warning1L(l,fmt,a) WARNING_CALL(WARNING_ARGS_L(l, fmt, 2), (a))
1139 # define rb_warning2L(l,fmt,a,b) WARNING_CALL(WARNING_ARGS_L(l, fmt, 3), (a), (b))
1140 # define rb_warning3L(l,fmt,a,b,c) WARNING_CALL(WARNING_ARGS_L(l, fmt, 4), (a), (b), (c))
1141 # define rb_warning4L(l,fmt,a,b,c,d) WARNING_CALL(WARNING_ARGS_L(l, fmt, 5), (a), (b), (c), (d))
1142 #ifdef RIPPER
1143 static ID id_warn, id_warning, id_gets;
1144 # define WARN_S_L(s,l) STR_NEW(s,l)
1145 # define WARN_S(s) STR_NEW2(s)
1146 # define WARN_I(i) INT2NUM(i)
1147 # define WARN_ID(i) rb_id2str(i)
1148 # define PRIsWARN "s"
1149 # define WARN_ARGS(fmt,n) parser->value, id_warn, n, rb_usascii_str_new_lit(fmt)
1150 # define WARN_ARGS_L(l,fmt,n) WARN_ARGS(fmt,n)
1151 # ifdef HAVE_VA_ARGS_MACRO
1152 # define WARN_CALL(...) rb_funcall(__VA_ARGS__)
1153 # else
1154 # define WARN_CALL rb_funcall
1155 # endif
1156 # define WARNING_ARGS(fmt,n) parser->value, id_warning, n, rb_usascii_str_new_lit(fmt)
1157 # define WARNING_ARGS_L(l, fmt,n) WARNING_ARGS(fmt,n)
1158 # ifdef HAVE_VA_ARGS_MACRO
1159 # define WARNING_CALL(...) rb_funcall(__VA_ARGS__)
1160 # else
1161 # define WARNING_CALL rb_funcall
1162 # endif
1163 PRINTF_ARGS(static void ripper_compile_error(struct parser_params*, const char *fmt, ...), 2, 3);
1164 # define compile_error ripper_compile_error
1165 # define PARSER_ARG parser,
1166 #else
1167 # define WARN_S_L(s,l) s
1168 # define WARN_S(s) s
1169 # define WARN_I(i) i
1170 # define WARN_ID(i) rb_id2name(i)
1171 # define PRIsWARN PRIsVALUE
1172 # define WARN_ARGS(fmt,n) WARN_ARGS_L(ruby_sourceline,fmt,n)
1173 # define WARN_ARGS_L(l,fmt,n) ruby_sourcefile, (l), (fmt)
1174 # define WARN_CALL rb_compile_warn
1175 # define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
1176 # define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
1177 # define WARNING_CALL rb_compile_warning
1178 PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const char *fmt, ...), 2, 3);
1179 # define compile_error parser_compile_error
1180 # define PARSER_ARG parser,
1181 #endif
1182 
1183 /* Older versions of Yacc set YYMAXDEPTH to a very low value by default (150,
1184  for instance). This is too low for Ruby to parse some files, such as
1185  date/format.rb, therefore bump the value up to at least Bison's default. */
1186 #ifdef OLD_YACC
1187 #ifndef YYMAXDEPTH
1188 #define YYMAXDEPTH 10000
1189 #endif
1190 #endif
1191 
1192 static void token_info_push_gen(struct parser_params*, const char *token, size_t len);
1193 static void token_info_pop_gen(struct parser_params*, const char *token, size_t len);
1194 #define token_info_push(token) token_info_push_gen(parser, (token), rb_strlen_lit(token))
1195 #define token_info_pop(token) token_info_pop_gen(parser, (token), rb_strlen_lit(token))
1196 
1197 
1198 /* Enabling traces. */
1199 #ifndef YYDEBUG
1200 # define YYDEBUG 0
1201 #endif
1202 
1203 /* Enabling verbose error messages. */
1204 #ifdef YYERROR_VERBOSE
1205 # undef YYERROR_VERBOSE
1206 # define YYERROR_VERBOSE 1
1207 #else
1208 # define YYERROR_VERBOSE 0
1209 #endif
1210 
1211 /* Enabling the token table. */
1212 #ifndef YYTOKEN_TABLE
1213 # define YYTOKEN_TABLE 0
1214 #endif
1215 
1216 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
1217 typedef union YYSTYPE
1218 #line 902 "parse.y"
1219 {
1220  VALUE val;
1221  NODE *node;
1222  ID id;
1223  int num;
1224  const struct vtable *vars;
1225 }
1226 /* Line 193 of yacc.c. */
1227 #line 1228 "parse.c"
1228  YYSTYPE;
1229 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
1230 # define YYSTYPE_IS_DECLARED 1
1231 # define YYSTYPE_IS_TRIVIAL 1
1232 #endif
1233 
1234 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
1235 typedef struct YYLTYPE
1236 {
1237  int first_line;
1238  int first_column;
1239  int last_line;
1240  int last_column;
1241 } YYLTYPE;
1242 # define yyltype YYLTYPE /* obsolescent; will be withdrawn */
1243 # define YYLTYPE_IS_DECLARED 1
1244 # define YYLTYPE_IS_TRIVIAL 1
1245 #endif
1246 
1247 
1248 /* Copy the second part of user declarations. */
1249 
1250 
1251 /* Line 216 of yacc.c. */
1252 #line 1253 "parse.c"
1253 
1254 #ifdef short
1255 # undef short
1256 #endif
1257 
1258 #ifdef YYTYPE_UINT8
1259 typedef YYTYPE_UINT8 yytype_uint8;
1260 #else
1261 typedef unsigned char yytype_uint8;
1262 #endif
1263 
1264 #ifdef YYTYPE_INT8
1265 typedef YYTYPE_INT8 yytype_int8;
1266 #elif (defined __STDC__ || defined __C99__FUNC__ \
1267  || defined __cplusplus || defined _MSC_VER)
1268 typedef signed char yytype_int8;
1269 #else
1270 typedef short int yytype_int8;
1271 #endif
1272 
1273 #ifdef YYTYPE_UINT16
1274 typedef YYTYPE_UINT16 yytype_uint16;
1275 #else
1276 typedef unsigned short int yytype_uint16;
1277 #endif
1278 
1279 #ifdef YYTYPE_INT16
1280 typedef YYTYPE_INT16 yytype_int16;
1281 #else
1282 typedef short int yytype_int16;
1283 #endif
1284 
1285 #ifndef YYSIZE_T
1286 # ifdef __SIZE_TYPE__
1287 # define YYSIZE_T __SIZE_TYPE__
1288 # elif defined size_t
1289 # define YYSIZE_T size_t
1290 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
1291  || defined __cplusplus || defined _MSC_VER)
1292 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1293 # define YYSIZE_T size_t
1294 # else
1295 # define YYSIZE_T unsigned int
1296 # endif
1297 #endif
1298 
1299 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
1300 
1301 #ifndef YY_
1302 # if defined YYENABLE_NLS && YYENABLE_NLS
1303 # if ENABLE_NLS
1304 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
1305 # define YY_(msgid) dgettext ("bison-runtime", msgid)
1306 # endif
1307 # endif
1308 # ifndef YY_
1309 # define YY_(msgid) msgid
1310 # endif
1311 #endif
1312 
1313 /* Suppress unused-variable warnings by "using" E. */
1314 #if ! defined lint || defined __GNUC__
1315 # define YYUSE(e) ((void) (e))
1316 #else
1317 # define YYUSE(e) /* empty */
1318 #endif
1319 
1320 /* Identity function, used to suppress warnings about constant conditions. */
1321 #ifndef lint
1322 # define YYID(n) (n)
1323 #else
1324 #if (defined __STDC__ || defined __C99__FUNC__ \
1325  || defined __cplusplus || defined _MSC_VER)
1326 static int
1327 YYID (int i)
1328 #else
1329 static int
1330 YYID (i)
1331  int i;
1332 #endif
1333 {
1334  return i;
1335 }
1336 #endif
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 _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1356  || defined __cplusplus || defined _MSC_VER)
1357 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1358 # ifndef _STDLIB_H
1359 # define _STDLIB_H 1
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 (YYID (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 _STDLIB_H \
1383  && ! ((defined YYMALLOC || defined malloc) \
1384  && (defined YYFREE || defined free)))
1385 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1386 # ifndef _STDLIB_H
1387 # define _STDLIB_H 1
1388 # endif
1389 # endif
1390 # ifndef YYMALLOC
1391 # define YYMALLOC malloc
1392 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1393  || defined __cplusplus || defined _MSC_VER)
1394 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
1395 # endif
1396 # endif
1397 # ifndef YYFREE
1398 # define YYFREE free
1399 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
1400  || defined __cplusplus || defined _MSC_VER)
1401 void free (void *); /* INFRINGES ON USER NAME SPACE */
1402 # endif
1403 # endif
1404 # endif
1405 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
1406 
1407 
1408 #if (! defined yyoverflow \
1409  && (! defined __cplusplus \
1410  || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
1411  && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1412 
1413 /* A type that is properly aligned for any stack member. */
1414 union yyalloc
1415 {
1416  yytype_int16 yyss;
1417  YYSTYPE yyvs;
1418  YYLTYPE yyls;
1419 };
1420 
1421 /* The size of the maximum gap between one aligned stack and the next. */
1422 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
1423 
1424 /* The size of an array large to enough to hold all stacks, each with
1425  N elements. */
1426 # define YYSTACK_BYTES(N) \
1427  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
1428  + 2 * YYSTACK_GAP_MAXIMUM)
1429 
1430 /* Copy COUNT objects from FROM to TO. The source and destination do
1431  not overlap. */
1432 # ifndef YYCOPY
1433 # if defined __GNUC__ && 1 < __GNUC__
1434 # define YYCOPY(To, From, Count) \
1435  __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1436 # else
1437 # define YYCOPY(To, From, Count) \
1438  do \
1439  { \
1440  YYSIZE_T yyi; \
1441  for (yyi = 0; yyi < (Count); yyi++) \
1442  (To)[yyi] = (From)[yyi]; \
1443  } \
1444  while (YYID (0))
1445 # endif
1446 # endif
1447 
1448 /* Relocate STACK from its old location to the new one. The
1449  local variables YYSIZE and YYSTACKSIZE give the old and new number of
1450  elements in the stack, and YYPTR gives the new location of the
1451  stack. Advance YYPTR to a properly aligned location for the next
1452  stack. */
1453 # define YYSTACK_RELOCATE(Stack) \
1454  do \
1455  { \
1456  YYSIZE_T yynewbytes; \
1457  YYCOPY (&yyptr->Stack, Stack, yysize); \
1458  Stack = &yyptr->Stack; \
1459  yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
1460  yyptr += yynewbytes / sizeof (*yyptr); \
1461  } \
1462  while (YYID (0))
1463 
1464 #endif
1465 
1466 /* YYFINAL -- State number of the termination state. */
1467 #define YYFINAL 3
1468 /* YYLAST -- Last index in YYTABLE. */
1469 #define YYLAST 11649
1470 
1471 /* YYNTOKENS -- Number of terminals. */
1472 #define YYNTOKENS 146
1473 /* YYNNTS -- Number of nonterminals. */
1474 #define YYNNTS 219
1475 /* YYNRULES -- Number of rules. */
1476 #define YYNRULES 645
1477 /* YYNRULES -- Number of states. */
1478 #define YYNSTATES 1086
1479 
1480 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
1481 #define YYUNDEFTOK 2
1482 #define YYMAXUTOK 352
1483 
1484 #define YYTRANSLATE(YYX) \
1485  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
1486 
1487 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
1488 static const yytype_uint8 yytranslate[] =
1489 {
1490  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1491  145, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1492  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1493  2, 2, 143, 131, 2, 2, 2, 129, 124, 2,
1494  139, 140, 127, 125, 137, 126, 144, 128, 2, 2,
1495  2, 2, 2, 2, 2, 2, 2, 2, 119, 142,
1496  121, 117, 120, 118, 2, 2, 2, 2, 2, 2,
1497  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1498  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1499  2, 136, 2, 141, 123, 2, 138, 2, 2, 2,
1500  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1501  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1502  2, 2, 2, 134, 122, 135, 132, 2, 81, 82,
1503  68, 69, 70, 71, 85, 86, 76, 75, 72, 73,
1504  74, 79, 80, 83, 84, 88, 77, 78, 87, 2,
1505  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1506  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1507  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1508  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1509  2, 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, 1, 2, 3, 4,
1516  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1517  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1518  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1519  35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1520  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1521  55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1522  65, 66, 67, 89, 90, 91, 92, 93, 94, 95,
1523  96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
1524  106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
1525  116, 130, 133
1526 };
1527 
1528 #if YYDEBUG
1529 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
1530  YYRHS. */
1531 static const yytype_uint16 yyprhs[] =
1532 {
1533  0, 0, 3, 4, 7, 10, 12, 14, 18, 21,
1534  23, 24, 30, 35, 38, 40, 42, 46, 49, 51,
1535  52, 58, 59, 64, 68, 72, 76, 79, 83, 87,
1536  91, 95, 99, 104, 106, 110, 114, 118, 120, 124,
1537  128, 135, 141, 147, 153, 159, 163, 165, 169, 171,
1538  173, 177, 181, 185, 188, 190, 192, 194, 196, 198,
1539  203, 204, 209, 211, 214, 218, 223, 229, 234, 240,
1540  243, 246, 249, 252, 255, 257, 261, 263, 267, 269,
1541  272, 276, 282, 285, 290, 293, 298, 300, 304, 306,
1542  310, 313, 317, 319, 323, 325, 327, 332, 336, 340,
1543  344, 348, 351, 353, 355, 357, 362, 366, 370, 374,
1544  378, 381, 383, 385, 387, 390, 392, 396, 398, 400,
1545  402, 404, 406, 408, 410, 412, 414, 416, 417, 422,
1546  424, 426, 428, 430, 432, 434, 436, 438, 440, 442,
1547  444, 446, 448, 450, 452, 454, 456, 458, 460, 462,
1548  464, 466, 468, 470, 472, 474, 476, 478, 480, 482,
1549  484, 486, 488, 490, 492, 494, 496, 498, 500, 502,
1550  504, 506, 508, 510, 512, 514, 516, 518, 520, 522,
1551  524, 526, 528, 530, 532, 534, 536, 538, 540, 542,
1552  544, 546, 548, 550, 552, 554, 556, 558, 560, 562,
1553  564, 568, 572, 579, 585, 591, 597, 603, 608, 612,
1554  616, 620, 624, 628, 632, 636, 640, 644, 649, 652,
1555  655, 659, 663, 667, 671, 673, 677, 681, 685, 689,
1556  693, 696, 699, 703, 707, 711, 715, 716, 721, 728,
1557  730, 732, 734, 736, 738, 742, 746, 748, 750, 753,
1558  758, 761, 763, 767, 771, 773, 775, 777, 779, 782,
1559  787, 790, 792, 795, 798, 803, 805, 806, 809, 812,
1560  815, 817, 819, 822, 826, 831, 833, 835, 839, 844,
1561  847, 849, 851, 853, 855, 857, 859, 861, 863, 865,
1562  867, 869, 870, 875, 876, 880, 881, 882, 888, 892,
1563  896, 899, 903, 907, 909, 914, 918, 920, 921, 928,
1564  933, 937, 940, 942, 945, 948, 955, 962, 963, 964,
1565  972, 973, 974, 982, 988, 993, 994, 995, 1005, 1006,
1566  1013, 1014, 1022, 1023, 1029, 1030, 1031, 1039, 1040, 1041,
1567  1051, 1053, 1055, 1057, 1059, 1061, 1063, 1065, 1067, 1069,
1568  1071, 1073, 1075, 1077, 1079, 1081, 1083, 1085, 1087, 1090,
1569  1092, 1094, 1096, 1102, 1104, 1107, 1109, 1111, 1113, 1117,
1570  1119, 1123, 1125, 1130, 1137, 1141, 1147, 1150, 1155, 1157,
1571  1161, 1166, 1169, 1172, 1174, 1177, 1178, 1185, 1194, 1199,
1572  1206, 1211, 1214, 1221, 1224, 1229, 1236, 1239, 1244, 1247,
1573  1252, 1254, 1256, 1258, 1262, 1264, 1269, 1271, 1276, 1278,
1574  1282, 1284, 1286, 1287, 1288, 1289, 1290, 1297, 1302, 1304,
1575  1308, 1312, 1313, 1318, 1321, 1326, 1332, 1338, 1341, 1342,
1576  1348, 1349, 1355, 1359, 1360, 1365, 1366, 1371, 1374, 1376,
1577  1381, 1382, 1387, 1388, 1393, 1394, 1395, 1400, 1401, 1402,
1578  1407, 1413, 1415, 1417, 1424, 1426, 1428, 1430, 1432, 1435,
1579  1437, 1440, 1442, 1444, 1446, 1448, 1450, 1452, 1454, 1457,
1580  1461, 1465, 1469, 1473, 1477, 1478, 1482, 1484, 1487, 1491,
1581  1495, 1496, 1500, 1504, 1508, 1512, 1516, 1517, 1521, 1522,
1582  1526, 1527, 1530, 1531, 1534, 1535, 1538, 1540, 1541, 1545,
1583  1546, 1547, 1548, 1549, 1550, 1559, 1561, 1563, 1565, 1567,
1584  1570, 1572, 1574, 1576, 1578, 1582, 1584, 1587, 1589, 1591,
1585  1593, 1595, 1597, 1599, 1601, 1603, 1605, 1607, 1609, 1611,
1586  1613, 1615, 1617, 1619, 1621, 1623, 1625, 1627, 1629, 1631,
1587  1632, 1637, 1638, 1642, 1643, 1647, 1652, 1655, 1658, 1660,
1588  1663, 1664, 1671, 1680, 1685, 1692, 1697, 1704, 1707, 1712,
1589  1719, 1722, 1727, 1730, 1735, 1737, 1738, 1740, 1742, 1744,
1590  1746, 1748, 1750, 1752, 1754, 1758, 1760, 1764, 1766, 1769,
1591  1771, 1774, 1776, 1778, 1782, 1784, 1788, 1790, 1792, 1795,
1592  1797, 1801, 1805, 1807, 1811, 1813, 1817, 1819, 1821, 1824,
1593  1826, 1828, 1830, 1833, 1836, 1838, 1840, 1841, 1846, 1848,
1594  1851, 1853, 1857, 1861, 1864, 1869, 1872, 1874, 1876, 1878,
1595  1880, 1882, 1884, 1886, 1888, 1890, 1892, 1894, 1896, 1898,
1596  1900, 1902, 1904, 1905, 1907, 1908, 1910, 1913, 1916, 1917,
1597  1919, 1921, 1923, 1925, 1927, 1930
1598 };
1599 
1600 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
1601 static const yytype_int16 yyrhs[] =
1602 {
1603  147, 0, -1, -1, 148, 149, -1, 150, 357, -1,
1604  364, -1, 151, -1, 150, 363, 151, -1, 1, 151,
1605  -1, 158, -1, -1, 47, 152, 134, 149, 135, -1,
1606  154, 278, 239, 281, -1, 155, 357, -1, 364, -1,
1607  156, -1, 155, 363, 156, -1, 1, 158, -1, 158,
1608  -1, -1, 47, 157, 134, 149, 135, -1, -1, 45,
1609  182, 159, 182, -1, 45, 54, 54, -1, 45, 54,
1610  66, -1, 45, 54, 65, -1, 6, 183, -1, 158,
1611  40, 163, -1, 158, 41, 163, -1, 158, 42, 163,
1612  -1, 158, 43, 163, -1, 158, 44, 158, -1, 48,
1613  134, 154, 135, -1, 160, -1, 170, 117, 164, -1,
1614  177, 117, 204, -1, 170, 117, 203, -1, 162, -1,
1615  177, 117, 161, -1, 316, 90, 161, -1, 224, 136,
1616  196, 360, 90, 161, -1, 224, 355, 52, 90, 161,
1617  -1, 224, 355, 56, 90, 161, -1, 224, 88, 56,
1618  90, 161, -1, 224, 88, 52, 90, 161, -1, 317,
1619  90, 161, -1, 164, -1, 164, 44, 158, -1, 160,
1620  -1, 164, -1, 162, 37, 162, -1, 162, 38, 162,
1621  -1, 39, 358, 162, -1, 131, 164, -1, 187, -1,
1622  162, -1, 169, -1, 165, -1, 261, -1, 261, 356,
1623  352, 198, -1, -1, 97, 167, 270, 135, -1, 351,
1624  -1, 168, 198, -1, 168, 198, 166, -1, 224, 355,
1625  352, 198, -1, 224, 355, 352, 198, 166, -1, 224,
1626  88, 352, 198, -1, 224, 88, 352, 198, 166, -1,
1627  32, 198, -1, 31, 198, -1, 30, 197, -1, 21,
1628  197, -1, 22, 197, -1, 172, -1, 92, 171, 359,
1629  -1, 172, -1, 92, 171, 359, -1, 174, -1, 174,
1630  173, -1, 174, 98, 176, -1, 174, 98, 176, 137,
1631  175, -1, 174, 98, -1, 174, 98, 137, 175, -1,
1632  98, 176, -1, 98, 176, 137, 175, -1, 98, -1,
1633  98, 137, 175, -1, 176, -1, 92, 171, 359, -1,
1634  173, 137, -1, 174, 173, 137, -1, 173, -1, 175,
1635  137, 173, -1, 313, -1, 314, -1, 224, 136, 196,
1636  360, -1, 224, 355, 52, -1, 224, 88, 52, -1,
1637  224, 355, 56, -1, 224, 88, 56, -1, 89, 56,
1638  -1, 317, -1, 313, -1, 314, -1, 224, 136, 196,
1639  360, -1, 224, 355, 52, -1, 224, 88, 52, -1,
1640  224, 355, 56, -1, 224, 88, 56, -1, 89, 56,
1641  -1, 317, -1, 52, -1, 56, -1, 89, 178, -1,
1642  178, -1, 224, 88, 178, -1, 52, -1, 56, -1,
1643  53, -1, 185, -1, 186, -1, 180, -1, 308, -1,
1644  181, -1, 310, -1, 182, -1, -1, 183, 137, 184,
1645  182, -1, 122, -1, 123, -1, 124, -1, 71, -1,
1646  72, -1, 73, -1, 79, -1, 80, -1, 120, -1,
1647  75, -1, 121, -1, 76, -1, 74, -1, 85, -1,
1648  86, -1, 125, -1, 126, -1, 127, -1, 98, -1,
1649  128, -1, 129, -1, 70, -1, 99, -1, 131, -1,
1650  132, -1, 68, -1, 69, -1, 83, -1, 84, -1,
1651  138, -1, 49, -1, 50, -1, 51, -1, 47, -1,
1652  48, -1, 45, -1, 37, -1, 7, -1, 21, -1,
1653  16, -1, 3, -1, 5, -1, 46, -1, 26, -1,
1654  15, -1, 14, -1, 10, -1, 9, -1, 36, -1,
1655  20, -1, 25, -1, 4, -1, 22, -1, 34, -1,
1656  39, -1, 38, -1, 23, -1, 8, -1, 24, -1,
1657  30, -1, 33, -1, 32, -1, 13, -1, 35, -1,
1658  6, -1, 17, -1, 31, -1, 11, -1, 12, -1,
1659  18, -1, 19, -1, 177, 117, 193, -1, 316, 90,
1660  193, -1, 224, 136, 196, 360, 90, 193, -1, 224,
1661  355, 52, 90, 193, -1, 224, 355, 56, 90, 193,
1662  -1, 224, 88, 52, 90, 193, -1, 224, 88, 56,
1663  90, 193, -1, 89, 56, 90, 193, -1, 317, 90,
1664  193, -1, 187, 81, 187, -1, 187, 82, 187, -1,
1665  187, 125, 187, -1, 187, 126, 187, -1, 187, 127,
1666  187, -1, 187, 128, 187, -1, 187, 129, 187, -1,
1667  187, 70, 187, -1, 130, 312, 70, 187, -1, 68,
1668  187, -1, 69, 187, -1, 187, 122, 187, -1, 187,
1669  123, 187, -1, 187, 124, 187, -1, 187, 71, 187,
1670  -1, 190, -1, 187, 72, 187, -1, 187, 73, 187,
1671  -1, 187, 74, 187, -1, 187, 79, 187, -1, 187,
1672  80, 187, -1, 131, 187, -1, 132, 187, -1, 187,
1673  85, 187, -1, 187, 86, 187, -1, 187, 77, 187,
1674  -1, 187, 78, 187, -1, -1, 46, 358, 188, 187,
1675  -1, 187, 118, 187, 358, 119, 187, -1, 205, -1,
1676  120, -1, 121, -1, 75, -1, 76, -1, 187, 189,
1677  187, -1, 190, 189, 187, -1, 187, -1, 364, -1,
1678  202, 361, -1, 202, 137, 349, 361, -1, 349, 361,
1679  -1, 187, -1, 187, 44, 187, -1, 139, 196, 359,
1680  -1, 364, -1, 194, -1, 364, -1, 197, -1, 202,
1681  137, -1, 202, 137, 349, 137, -1, 349, 137, -1,
1682  169, -1, 202, 201, -1, 349, 201, -1, 202, 137,
1683  349, 201, -1, 200, -1, -1, 199, 197, -1, 100,
1684  191, -1, 137, 200, -1, 364, -1, 191, -1, 98,
1685  191, -1, 202, 137, 191, -1, 202, 137, 98, 191,
1686  -1, 204, -1, 191, -1, 202, 137, 191, -1, 202,
1687  137, 98, 191, -1, 98, 191, -1, 282, -1, 283,
1688  -1, 286, -1, 287, -1, 288, -1, 293, -1, 291,
1689  -1, 294, -1, 315, -1, 317, -1, 53, -1, -1,
1690  225, 206, 153, 235, -1, -1, 93, 207, 359, -1,
1691  -1, -1, 93, 208, 158, 209, 359, -1, 92, 154,
1692  140, -1, 224, 88, 56, -1, 89, 56, -1, 95,
1693  192, 141, -1, 96, 348, 135, -1, 30, -1, 31,
1694  139, 197, 359, -1, 31, 139, 359, -1, 31, -1,
1695  -1, 46, 358, 139, 210, 162, 359, -1, 39, 139,
1696  162, 359, -1, 39, 139, 359, -1, 168, 267, -1,
1697  262, -1, 262, 267, -1, 101, 252, -1, 226, 163,
1698  236, 154, 238, 235, -1, 227, 163, 236, 154, 239,
1699  235, -1, -1, -1, 228, 211, 163, 237, 212, 154,
1700  235, -1, -1, -1, 229, 213, 163, 237, 214, 154,
1701  235, -1, 230, 163, 357, 276, 235, -1, 230, 357,
1702  276, 235, -1, -1, -1, 231, 240, 25, 215, 163,
1703  237, 216, 154, 235, -1, -1, 232, 179, 318, 217,
1704  153, 235, -1, -1, 232, 85, 162, 218, 362, 153,
1705  235, -1, -1, 233, 179, 219, 153, 235, -1, -1,
1706  -1, 234, 180, 220, 221, 320, 153, 235, -1, -1,
1707  -1, 234, 346, 354, 222, 180, 223, 320, 153, 235,
1708  -1, 21, -1, 22, -1, 23, -1, 24, -1, 205,
1709  -1, 7, -1, 11, -1, 12, -1, 18, -1, 19,
1710  -1, 16, -1, 20, -1, 3, -1, 4, -1, 5,
1711  -1, 10, -1, 362, -1, 13, -1, 362, 13, -1,
1712  362, -1, 27, -1, 239, -1, 14, 163, 236, 154,
1713  238, -1, 364, -1, 15, 154, -1, 177, -1, 170,
1714  -1, 326, -1, 92, 243, 359, -1, 241, -1, 242,
1715  137, 241, -1, 242, -1, 242, 137, 98, 326, -1,
1716  242, 137, 98, 326, 137, 242, -1, 242, 137, 98,
1717  -1, 242, 137, 98, 137, 242, -1, 98, 326, -1,
1718  98, 326, 137, 242, -1, 98, -1, 98, 137, 242,
1719  -1, 333, 137, 336, 345, -1, 333, 345, -1, 336,
1720  345, -1, 344, -1, 137, 244, -1, -1, 329, 137,
1721  339, 137, 342, 245, -1, 329, 137, 339, 137, 342,
1722  137, 329, 245, -1, 329, 137, 339, 245, -1, 329,
1723  137, 339, 137, 329, 245, -1, 329, 137, 342, 245,
1724  -1, 329, 137, -1, 329, 137, 342, 137, 329, 245,
1725  -1, 329, 245, -1, 339, 137, 342, 245, -1, 339,
1726  137, 342, 137, 329, 245, -1, 339, 245, -1, 339,
1727  137, 329, 245, -1, 342, 245, -1, 342, 137, 329,
1728  245, -1, 244, -1, 364, -1, 248, -1, 122, 249,
1729  122, -1, 78, -1, 122, 246, 249, 122, -1, 358,
1730  -1, 358, 142, 250, 358, -1, 251, -1, 250, 137,
1731  251, -1, 52, -1, 325, -1, -1, -1, -1, -1,
1732  253, 254, 257, 255, 256, 258, -1, 139, 324, 249,
1733  140, -1, 324, -1, 114, 154, 135, -1, 29, 154,
1734  235, -1, -1, 28, 260, 273, 10, -1, 169, 259,
1735  -1, 261, 356, 352, 195, -1, 261, 356, 352, 195,
1736  267, -1, 261, 356, 352, 198, 259, -1, 168, 194,
1737  -1, -1, 224, 355, 352, 263, 195, -1, -1, 224,
1738  88, 352, 264, 194, -1, 224, 88, 353, -1, -1,
1739  224, 355, 265, 194, -1, -1, 224, 88, 266, 194,
1740  -1, 32, 194, -1, 32, -1, 224, 136, 196, 360,
1741  -1, -1, 134, 268, 270, 135, -1, -1, 26, 269,
1742  273, 10, -1, -1, -1, 271, 272, 247, 154, -1,
1743  -1, -1, 274, 275, 247, 153, -1, 17, 202, 236,
1744  154, 277, -1, 239, -1, 276, -1, 8, 279, 280,
1745  236, 154, 278, -1, 364, -1, 191, -1, 204, -1,
1746  364, -1, 91, 177, -1, 364, -1, 9, 154, -1,
1747  364, -1, 311, -1, 308, -1, 310, -1, 284, -1,
1748  64, -1, 285, -1, 284, 285, -1, 103, 297, 113,
1749  -1, 104, 298, 113, -1, 105, 299, 67, -1, 106,
1750  143, 113, -1, 106, 289, 113, -1, -1, 289, 290,
1751  143, -1, 300, -1, 290, 300, -1, 108, 143, 113,
1752  -1, 108, 292, 113, -1, -1, 292, 290, 143, -1,
1753  107, 143, 113, -1, 107, 295, 113, -1, 109, 143,
1754  113, -1, 109, 296, 113, -1, -1, 295, 63, 143,
1755  -1, -1, 296, 63, 143, -1, -1, 297, 300, -1,
1756  -1, 298, 300, -1, -1, 299, 300, -1, 63, -1,
1757  -1, 112, 301, 307, -1, -1, -1, -1, -1, -1,
1758  110, 302, 303, 304, 305, 306, 154, 111, -1, 54,
1759  -1, 55, -1, 57, -1, 317, -1, 102, 309, -1,
1760  180, -1, 55, -1, 54, -1, 57, -1, 102, 298,
1761  113, -1, 312, -1, 130, 312, -1, 59, -1, 60,
1762  -1, 61, -1, 62, -1, 52, -1, 55, -1, 54,
1763  -1, 56, -1, 57, -1, 34, -1, 33, -1, 35,
1764  -1, 36, -1, 50, -1, 49, -1, 51, -1, 313,
1765  -1, 314, -1, 313, -1, 314, -1, 65, -1, 66,
1766  -1, -1, 121, 319, 163, 362, -1, -1, 139, 324,
1767  359, -1, -1, 321, 324, 362, -1, 334, 137, 336,
1768  345, -1, 334, 345, -1, 336, 345, -1, 344, -1,
1769  137, 322, -1, -1, 329, 137, 340, 137, 342, 323,
1770  -1, 329, 137, 340, 137, 342, 137, 329, 323, -1,
1771  329, 137, 340, 323, -1, 329, 137, 340, 137, 329,
1772  323, -1, 329, 137, 342, 323, -1, 329, 137, 342,
1773  137, 329, 323, -1, 329, 323, -1, 340, 137, 342,
1774  323, -1, 340, 137, 342, 137, 329, 323, -1, 340,
1775  323, -1, 340, 137, 329, 323, -1, 342, 323, -1,
1776  342, 137, 329, 323, -1, 322, -1, -1, 56, -1,
1777  55, -1, 54, -1, 57, -1, 325, -1, 52, -1,
1778  326, -1, 327, -1, 92, 243, 359, -1, 328, -1,
1779  329, 137, 328, -1, 58, -1, 330, 191, -1, 330,
1780  -1, 330, 224, -1, 330, -1, 332, -1, 333, 137,
1781  332, -1, 331, -1, 334, 137, 331, -1, 70, -1,
1782  99, -1, 335, 52, -1, 335, -1, 327, 117, 191,
1783  -1, 327, 117, 224, -1, 338, -1, 339, 137, 338,
1784  -1, 337, -1, 340, 137, 337, -1, 127, -1, 98,
1785  -1, 341, 52, -1, 341, -1, 124, -1, 100, -1,
1786  343, 52, -1, 137, 344, -1, 364, -1, 315, -1,
1787  -1, 139, 347, 162, 359, -1, 364, -1, 349, 361,
1788  -1, 350, -1, 349, 137, 350, -1, 191, 91, 191,
1789  -1, 58, 191, -1, 103, 297, 115, 191, -1, 99,
1790  191, -1, 52, -1, 56, -1, 53, -1, 52, -1,
1791  56, -1, 53, -1, 185, -1, 52, -1, 53, -1,
1792  185, -1, 144, -1, 88, -1, 144, -1, 87, -1,
1793  355, -1, 88, -1, -1, 363, -1, -1, 145, -1,
1794  358, 140, -1, 358, 141, -1, -1, 145, -1, 137,
1795  -1, 142, -1, 145, -1, 362, -1, 363, 142, -1,
1796  -1
1797 };
1798 
1799 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1800 static const yytype_uint16 yyrline[] =
1801 {
1802  0, 1064, 1064, 1064, 1095, 1105, 1114, 1122, 1130, 1136,
1803  1138, 1137, 1158, 1194, 1204, 1213, 1221, 1229, 1235, 1240,
1804  1239, 1261, 1261, 1270, 1279, 1291, 1302, 1310, 1319, 1328,
1805  1342, 1356, 1366, 1383, 1384, 1394, 1399, 1408, 1411, 1416,
1806  1421, 1443, 1448, 1453, 1458, 1463, 1470, 1478, 1487, 1490,
1807  1491, 1495, 1499, 1503, 1507, 1510, 1522, 1523, 1526, 1527,
1808  1534, 1533, 1549, 1559, 1568, 1575, 1580, 1587, 1592, 1599,
1809  1609, 1618, 1627, 1636, 1647, 1648, 1658, 1659, 1669, 1677,
1810  1685, 1693, 1702, 1710, 1719, 1727, 1736, 1744, 1755, 1756,
1811  1766, 1774, 1784, 1792, 1802, 1806, 1810, 1818, 1826, 1834,
1812  1842, 1846, 1850, 1857, 1865, 1873, 1881, 1889, 1897, 1905,
1813  1909, 1913, 1920, 1929, 1932, 1940, 1949, 1960, 1961, 1962,
1814  1963, 1968, 1975, 1976, 1979, 1987, 1990, 1998, 1998, 2009,
1815  2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019,
1816  2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029,
1817  2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2041,
1818  2041, 2041, 2042, 2042, 2043, 2043, 2043, 2044, 2044, 2044,
1819  2044, 2045, 2045, 2045, 2045, 2046, 2046, 2046, 2047, 2047,
1820  2047, 2047, 2048, 2048, 2048, 2048, 2049, 2049, 2049, 2049,
1821  2050, 2050, 2050, 2050, 2051, 2051, 2051, 2051, 2052, 2052,
1822  2055, 2059, 2063, 2091, 2096, 2101, 2106, 2111, 2116, 2121,
1823  2132, 2143, 2147, 2151, 2155, 2159, 2163, 2167, 2171, 2175,
1824  2179, 2183, 2187, 2191, 2195, 2196, 2200, 2204, 2208, 2212,
1825  2216, 2220, 2224, 2228, 2232, 2236, 2240, 2240, 2245, 2255,
1826  2261, 2262, 2263, 2264, 2267, 2271, 2278, 2290, 2291, 2295,
1827  2303, 2313, 2321, 2332, 2342, 2343, 2346, 2347, 2348, 2352,
1828  2360, 2370, 2379, 2387, 2397, 2406, 2415, 2415, 2427, 2438,
1829  2442, 2448, 2456, 2465, 2479, 2495, 2496, 2499, 2513, 2528,
1830  2539, 2540, 2541, 2542, 2543, 2544, 2545, 2546, 2547, 2548,
1831  2549, 2558, 2557, 2584, 2584, 2593, 2597, 2592, 2606, 2614,
1832  2623, 2632, 2645, 2654, 2663, 2671, 2680, 2689, 2689, 2694,
1833  2698, 2702, 2712, 2713, 2723, 2727, 2739, 2751, 2751, 2751,
1834  2763, 2763, 2763, 2775, 2787, 2798, 2800, 2797, 2850, 2849,
1835  2874, 2873, 2898, 2897, 2922, 2927, 2921, 2950, 2951, 2950,
1836  2978, 2987, 2996, 3005, 3016, 3028, 3034, 3040, 3046, 3052,
1837  3058, 3068, 3074, 3080, 3086, 3096, 3102, 3107, 3108, 3115,
1838  3120, 3123, 3124, 3137, 3138, 3148, 3149, 3152, 3159, 3169,
1839  3177, 3187, 3195, 3204, 3214, 3222, 3231, 3240, 3250, 3258,
1840  3270, 3274, 3278, 3282, 3288, 3293, 3298, 3302, 3306, 3310,
1841  3314, 3318, 3326, 3330, 3334, 3338, 3342, 3346, 3350, 3354,
1842  3358, 3364, 3365, 3371, 3381, 3390, 3402, 3406, 3416, 3423,
1843  3432, 3440, 3446, 3449, 3454, 3457, 3446, 3478, 3486, 3492,
1844  3497, 3504, 3503, 3518, 3534, 3538, 3550, 3564, 3574, 3573,
1845  3585, 3584, 3595, 3600, 3599, 3611, 3610, 3621, 3630, 3639,
1846  3654, 3653, 3667, 3666, 3681, 3682, 3681, 3691, 3692, 3691,
1847  3701, 3714, 3715, 3718, 3737, 3740, 3748, 3756, 3759, 3763,
1848  3766, 3774, 3777, 3778, 3786, 3789, 3806, 3813, 3814, 3824,
1849  3830, 3836, 3842, 3851, 3862, 3869, 3879, 3887, 3897, 3906,
1850  3917, 3924, 3942, 3951, 3961, 3970, 3981, 3988, 4000, 4007,
1851  4023, 4030, 4041, 4048, 4059, 4066, 4107, 4115, 4114, 4131,
1852  4137, 4141, 4145, 4149, 4130, 4171, 4179, 4187, 4196, 4199,
1853  4210, 4211, 4212, 4213, 4216, 4227, 4228, 4239, 4246, 4253,
1854  4260, 4269, 4270, 4271, 4272, 4273, 4276, 4277, 4278, 4279,
1855  4280, 4281, 4282, 4285, 4298, 4308, 4312, 4318, 4325, 4335,
1856  4334, 4344, 4353, 4363, 4363, 4377, 4381, 4385, 4389, 4395,
1857  4400, 4405, 4409, 4413, 4417, 4421, 4425, 4429, 4433, 4437,
1858  4441, 4445, 4449, 4453, 4457, 4462, 4468, 4478, 4488, 4498,
1859  4510, 4511, 4518, 4527, 4536, 4555, 4562, 4576, 4585, 4595,
1860  4607, 4616, 4627, 4635, 4646, 4654, 4664, 4665, 4668, 4677,
1861  4688, 4701, 4714, 4722, 4738, 4746, 4762, 4763, 4766, 4779,
1862  4790, 4791, 4794, 4811, 4815, 4825, 4835, 4835, 4865, 4866,
1863  4876, 4883, 4907, 4919, 4927, 4935, 4949, 4950, 4951, 4954,
1864  4955, 4956, 4957, 4960, 4961, 4962, 4965, 4966, 4969, 4973,
1865  4979, 4980, 4986, 4987, 4990, 4991, 4994, 4997, 5000, 5001,
1866  5002, 5005, 5006, 5009, 5010, 5014
1867 };
1868 #endif
1869 
1870 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1871 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1872  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1873 static const char *const yytname[] =
1874 {
1875  "\"end-of-input\"", "error", "$undefined", "keyword_class",
1876  "keyword_module", "keyword_def", "keyword_undef", "keyword_begin",
1877  "keyword_rescue", "keyword_ensure", "keyword_end", "keyword_if",
1878  "keyword_unless", "keyword_then", "keyword_elsif", "keyword_else",
1879  "keyword_case", "keyword_when", "keyword_while", "keyword_until",
1880  "keyword_for", "keyword_break", "keyword_next", "keyword_redo",
1881  "keyword_retry", "keyword_in", "keyword_do", "keyword_do_cond",
1882  "keyword_do_block", "keyword_do_LAMBDA", "keyword_return",
1883  "keyword_yield", "keyword_super", "keyword_self", "keyword_nil",
1884  "keyword_true", "keyword_false", "keyword_and", "keyword_or",
1885  "keyword_not", "modifier_if", "modifier_unless", "modifier_while",
1886  "modifier_until", "modifier_rescue", "keyword_alias", "keyword_defined",
1887  "keyword_BEGIN", "keyword_END", "keyword__LINE__", "keyword__FILE__",
1888  "keyword__ENCODING__", "tIDENTIFIER", "tFID", "tGVAR", "tIVAR",
1889  "tCONSTANT", "tCVAR", "tLABEL", "tINTEGER", "tFLOAT", "tRATIONAL",
1890  "tIMAGINARY", "tSTRING_CONTENT", "tCHAR", "tNTH_REF", "tBACK_REF",
1891  "tREGEXP_END", "\"unary+\"", "\"unary-\"", "\"**\"", "\"<=>\"", "\"==\"",
1892  "\"===\"", "\"!=\"", "\">=\"", "\"<=\"", "\"&&\"", "\"||\"", "\"=~\"",
1893  "\"!~\"", "\"..\"", "\"...\"", "\"[]\"", "\"[]=\"", "\"<<\"", "\">>\"",
1894  "\"&.\"", "\"::\"", "\":: at EXPR_BEG\"", "tOP_ASGN", "\"=>\"", "\"(\"",
1895  "\"( arg\"", "\")\"", "\"[\"", "\"{\"", "\"{ arg\"", "\"*\"",
1896  "\"**arg\"", "\"&\"", "\"->\"", "tSYMBEG", "tSTRING_BEG", "tXSTRING_BEG",
1897  "tREGEXP_BEG", "tWORDS_BEG", "tQWORDS_BEG", "tSYMBOLS_BEG",
1898  "tQSYMBOLS_BEG", "tSTRING_DBEG", "tSTRING_DEND", "tSTRING_DVAR",
1899  "tSTRING_END", "tLAMBEG", "tLABEL_END", "tLOWEST", "'='", "'?'", "':'",
1900  "'>'", "'<'", "'|'", "'^'", "'&'", "'+'", "'-'", "'*'", "'/'", "'%'",
1901  "tUMINUS_NUM", "'!'", "'~'", "tLAST_TOKEN", "'{'", "'}'", "'['", "','",
1902  "'`'", "'('", "')'", "']'", "';'", "' '", "'.'", "'\\n'", "$accept",
1903  "program", "@1", "top_compstmt", "top_stmts", "top_stmt", "@2",
1904  "bodystmt", "compstmt", "stmts", "stmt_or_begin", "@3", "stmt", "@4",
1905  "command_asgn", "command_rhs", "expr", "expr_value", "command_call",
1906  "block_command", "cmd_brace_block", "@5", "fcall", "command", "mlhs",
1907  "mlhs_inner", "mlhs_basic", "mlhs_item", "mlhs_head", "mlhs_post",
1908  "mlhs_node", "lhs", "cname", "cpath", "fname", "fsym", "fitem",
1909  "undef_list", "@6", "op", "reswords", "arg", "@7", "relop", "rel_expr",
1910  "arg_value", "aref_args", "arg_rhs", "paren_args", "opt_paren_args",
1911  "opt_call_args", "call_args", "command_args", "@8", "block_arg",
1912  "opt_block_arg", "args", "mrhs_arg", "mrhs", "primary", "@9", "@10",
1913  "@11", "@12", "@13", "@14", "@15", "@16", "@17", "@18", "@19", "@20",
1914  "@21", "@22", "@23", "@24", "@25", "@26", "primary_value", "k_begin",
1915  "k_if", "k_unless", "k_while", "k_until", "k_case", "k_for", "k_class",
1916  "k_module", "k_def", "k_end", "then", "do", "if_tail", "opt_else",
1917  "for_var", "f_marg", "f_marg_list", "f_margs", "block_args_tail",
1918  "opt_block_args_tail", "block_param", "opt_block_param",
1919  "block_param_def", "opt_bv_decl", "bv_decls", "bvar", "lambda", "@27",
1920  "@28", "@29", "@30", "f_larglist", "lambda_body", "do_block", "@31",
1921  "block_call", "method_call", "@32", "@33", "@34", "@35", "brace_block",
1922  "@36", "@37", "brace_body", "@38", "@39", "do_body", "@40", "@41",
1923  "case_body", "cases", "opt_rescue", "exc_list", "exc_var", "opt_ensure",
1924  "literal", "strings", "string", "string1", "xstring", "regexp", "words",
1925  "word_list", "word", "symbols", "symbol_list", "qwords", "qsymbols",
1926  "qword_list", "qsym_list", "string_contents", "xstring_contents",
1927  "regexp_contents", "string_content", "@42", "@43", "@44", "@45", "@46",
1928  "@47", "string_dvar", "symbol", "sym", "dsym", "numeric",
1929  "simple_numeric", "user_variable", "keyword_variable", "var_ref",
1930  "var_lhs", "backref", "superclass", "@48", "f_arglist", "@49",
1931  "args_tail", "opt_args_tail", "f_args", "f_bad_arg", "f_norm_arg",
1932  "f_arg_asgn", "f_arg_item", "f_arg", "f_label", "f_kw", "f_block_kw",
1933  "f_block_kwarg", "f_kwarg", "kwrest_mark", "f_kwrest", "f_opt",
1934  "f_block_opt", "f_block_optarg", "f_optarg", "restarg_mark",
1935  "f_rest_arg", "blkarg_mark", "f_block_arg", "opt_f_block_arg",
1936  "singleton", "@50", "assoc_list", "assocs", "assoc", "operation",
1937  "operation2", "operation3", "dot_or_colon", "call_op", "call_op2",
1938  "opt_terms", "opt_nl", "rparen", "rbracket", "trailer", "term", "terms",
1939  "none", 0
1940 };
1941 #endif
1942 
1943 # ifdef YYPRINT
1944 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1945  token YYLEX-NUM. */
1946 static const yytype_uint16 yytoknum[] =
1947 {
1948  0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1949  265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1950  275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1951  285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1952  295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1953  305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1954  315, 316, 317, 318, 319, 320, 321, 322, 130, 131,
1955  132, 133, 138, 139, 140, 137, 136, 146, 147, 141,
1956  142, 128, 129, 143, 144, 134, 135, 148, 145, 323,
1957  324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
1958  334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
1959  344, 345, 346, 347, 348, 349, 350, 61, 63, 58,
1960  62, 60, 124, 94, 38, 43, 45, 42, 47, 37,
1961  351, 33, 126, 352, 123, 125, 91, 44, 96, 40,
1962  41, 93, 59, 32, 46, 10
1963 };
1964 # endif
1965 
1966 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1967 static const yytype_uint16 yyr1[] =
1968 {
1969  0, 146, 148, 147, 149, 150, 150, 150, 150, 151,
1970  152, 151, 153, 154, 155, 155, 155, 155, 156, 157,
1971  156, 159, 158, 158, 158, 158, 158, 158, 158, 158,
1972  158, 158, 158, 158, 158, 158, 158, 158, 160, 160,
1973  160, 160, 160, 160, 160, 160, 161, 161, 161, 162,
1974  162, 162, 162, 162, 162, 163, 164, 164, 165, 165,
1975  167, 166, 168, 169, 169, 169, 169, 169, 169, 169,
1976  169, 169, 169, 169, 170, 170, 171, 171, 172, 172,
1977  172, 172, 172, 172, 172, 172, 172, 172, 173, 173,
1978  174, 174, 175, 175, 176, 176, 176, 176, 176, 176,
1979  176, 176, 176, 177, 177, 177, 177, 177, 177, 177,
1980  177, 177, 178, 178, 179, 179, 179, 180, 180, 180,
1981  180, 180, 181, 181, 182, 182, 183, 184, 183, 185,
1982  185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
1983  185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
1984  185, 185, 185, 185, 185, 185, 185, 185, 185, 186,
1985  186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
1986  186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
1987  186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
1988  186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
1989  187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
1990  187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
1991  187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
1992  187, 187, 187, 187, 187, 187, 188, 187, 187, 187,
1993  189, 189, 189, 189, 190, 190, 191, 192, 192, 192,
1994  192, 193, 193, 194, 195, 195, 196, 196, 196, 196,
1995  196, 197, 197, 197, 197, 197, 199, 198, 200, 201,
1996  201, 202, 202, 202, 202, 203, 203, 204, 204, 204,
1997  205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
1998  205, 206, 205, 207, 205, 208, 209, 205, 205, 205,
1999  205, 205, 205, 205, 205, 205, 205, 210, 205, 205,
2000  205, 205, 205, 205, 205, 205, 205, 211, 212, 205,
2001  213, 214, 205, 205, 205, 215, 216, 205, 217, 205,
2002  218, 205, 219, 205, 220, 221, 205, 222, 223, 205,
2003  205, 205, 205, 205, 224, 225, 226, 227, 228, 229,
2004  230, 231, 232, 233, 234, 235, 236, 236, 236, 237,
2005  237, 238, 238, 239, 239, 240, 240, 241, 241, 242,
2006  242, 243, 243, 243, 243, 243, 243, 243, 243, 243,
2007  244, 244, 244, 244, 245, 245, 246, 246, 246, 246,
2008  246, 246, 246, 246, 246, 246, 246, 246, 246, 246,
2009  246, 247, 247, 248, 248, 248, 249, 249, 250, 250,
2010  251, 251, 253, 254, 255, 256, 252, 257, 257, 258,
2011  258, 260, 259, 261, 261, 261, 261, 262, 263, 262,
2012  264, 262, 262, 265, 262, 266, 262, 262, 262, 262,
2013  268, 267, 269, 267, 271, 272, 270, 274, 275, 273,
2014  276, 277, 277, 278, 278, 279, 279, 279, 280, 280,
2015  281, 281, 282, 282, 282, 283, 284, 284, 284, 285,
2016  286, 287, 288, 288, 289, 289, 290, 290, 291, 291,
2017  292, 292, 293, 293, 294, 294, 295, 295, 296, 296,
2018  297, 297, 298, 298, 299, 299, 300, 301, 300, 302,
2019  303, 304, 305, 306, 300, 307, 307, 307, 307, 308,
2020  309, 309, 309, 309, 310, 311, 311, 312, 312, 312,
2021  312, 313, 313, 313, 313, 313, 314, 314, 314, 314,
2022  314, 314, 314, 315, 315, 316, 316, 317, 317, 319,
2023  318, 318, 320, 321, 320, 322, 322, 322, 322, 323,
2024  323, 324, 324, 324, 324, 324, 324, 324, 324, 324,
2025  324, 324, 324, 324, 324, 324, 325, 325, 325, 325,
2026  326, 326, 327, 328, 328, 329, 329, 330, 331, 331,
2027  332, 332, 333, 333, 334, 334, 335, 335, 336, 336,
2028  337, 338, 339, 339, 340, 340, 341, 341, 342, 342,
2029  343, 343, 344, 345, 345, 346, 347, 346, 348, 348,
2030  349, 349, 350, 350, 350, 350, 351, 351, 351, 352,
2031  352, 352, 352, 353, 353, 353, 354, 354, 355, 355,
2032  356, 356, 357, 357, 358, 358, 359, 360, 361, 361,
2033  361, 362, 362, 363, 363, 364
2034 };
2035 
2036 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
2037 static const yytype_uint8 yyr2[] =
2038 {
2039  0, 2, 0, 2, 2, 1, 1, 3, 2, 1,
2040  0, 5, 4, 2, 1, 1, 3, 2, 1, 0,
2041  5, 0, 4, 3, 3, 3, 2, 3, 3, 3,
2042  3, 3, 4, 1, 3, 3, 3, 1, 3, 3,
2043  6, 5, 5, 5, 5, 3, 1, 3, 1, 1,
2044  3, 3, 3, 2, 1, 1, 1, 1, 1, 4,
2045  0, 4, 1, 2, 3, 4, 5, 4, 5, 2,
2046  2, 2, 2, 2, 1, 3, 1, 3, 1, 2,
2047  3, 5, 2, 4, 2, 4, 1, 3, 1, 3,
2048  2, 3, 1, 3, 1, 1, 4, 3, 3, 3,
2049  3, 2, 1, 1, 1, 4, 3, 3, 3, 3,
2050  2, 1, 1, 1, 2, 1, 3, 1, 1, 1,
2051  1, 1, 1, 1, 1, 1, 1, 0, 4, 1,
2052  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2053  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2054  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2055  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2056  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2057  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2058  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2059  3, 3, 6, 5, 5, 5, 5, 4, 3, 3,
2060  3, 3, 3, 3, 3, 3, 3, 4, 2, 2,
2061  3, 3, 3, 3, 1, 3, 3, 3, 3, 3,
2062  2, 2, 3, 3, 3, 3, 0, 4, 6, 1,
2063  1, 1, 1, 1, 3, 3, 1, 1, 2, 4,
2064  2, 1, 3, 3, 1, 1, 1, 1, 2, 4,
2065  2, 1, 2, 2, 4, 1, 0, 2, 2, 2,
2066  1, 1, 2, 3, 4, 1, 1, 3, 4, 2,
2067  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2068  1, 0, 4, 0, 3, 0, 0, 5, 3, 3,
2069  2, 3, 3, 1, 4, 3, 1, 0, 6, 4,
2070  3, 2, 1, 2, 2, 6, 6, 0, 0, 7,
2071  0, 0, 7, 5, 4, 0, 0, 9, 0, 6,
2072  0, 7, 0, 5, 0, 0, 7, 0, 0, 9,
2073  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2074  1, 1, 1, 1, 1, 1, 1, 1, 2, 1,
2075  1, 1, 5, 1, 2, 1, 1, 1, 3, 1,
2076  3, 1, 4, 6, 3, 5, 2, 4, 1, 3,
2077  4, 2, 2, 1, 2, 0, 6, 8, 4, 6,
2078  4, 2, 6, 2, 4, 6, 2, 4, 2, 4,
2079  1, 1, 1, 3, 1, 4, 1, 4, 1, 3,
2080  1, 1, 0, 0, 0, 0, 6, 4, 1, 3,
2081  3, 0, 4, 2, 4, 5, 5, 2, 0, 5,
2082  0, 5, 3, 0, 4, 0, 4, 2, 1, 4,
2083  0, 4, 0, 4, 0, 0, 4, 0, 0, 4,
2084  5, 1, 1, 6, 1, 1, 1, 1, 2, 1,
2085  2, 1, 1, 1, 1, 1, 1, 1, 2, 3,
2086  3, 3, 3, 3, 0, 3, 1, 2, 3, 3,
2087  0, 3, 3, 3, 3, 3, 0, 3, 0, 3,
2088  0, 2, 0, 2, 0, 2, 1, 0, 3, 0,
2089  0, 0, 0, 0, 8, 1, 1, 1, 1, 2,
2090  1, 1, 1, 1, 3, 1, 2, 1, 1, 1,
2091  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2092  1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
2093  4, 0, 3, 0, 3, 4, 2, 2, 1, 2,
2094  0, 6, 8, 4, 6, 4, 6, 2, 4, 6,
2095  2, 4, 2, 4, 1, 0, 1, 1, 1, 1,
2096  1, 1, 1, 1, 3, 1, 3, 1, 2, 1,
2097  2, 1, 1, 3, 1, 3, 1, 1, 2, 1,
2098  3, 3, 1, 3, 1, 3, 1, 1, 2, 1,
2099  1, 1, 2, 2, 1, 1, 0, 4, 1, 2,
2100  1, 3, 3, 2, 4, 2, 1, 1, 1, 1,
2101  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2102  1, 1, 0, 1, 0, 1, 2, 2, 0, 1,
2103  1, 1, 1, 1, 2, 0
2104 };
2105 
2106 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
2107  STATE-NUM when YYTABLE doesn't specify something else to do. Zero
2108  means the default is an error. */
2109 static const yytype_uint16 yydefact[] =
2110 {
2111  2, 0, 0, 1, 0, 352, 353, 354, 0, 345,
2112  346, 347, 350, 348, 349, 351, 340, 341, 342, 343,
2113  303, 266, 266, 527, 526, 528, 529, 634, 0, 634,
2114  10, 0, 531, 530, 532, 616, 618, 523, 522, 617,
2115  525, 517, 518, 519, 520, 466, 537, 538, 0, 0,
2116  0, 0, 295, 645, 645, 86, 412, 492, 490, 492,
2117  494, 474, 486, 480, 488, 0, 0, 0, 3, 632,
2118  6, 9, 33, 37, 49, 57, 266, 56, 0, 74,
2119  0, 78, 88, 0, 54, 224, 239, 0, 291, 0,
2120  0, 317, 320, 632, 0, 0, 0, 0, 58, 312,
2121  280, 281, 465, 467, 282, 283, 284, 286, 285, 287,
2122  463, 464, 462, 515, 533, 534, 288, 0, 289, 62,
2123  5, 8, 169, 180, 170, 193, 166, 186, 176, 175,
2124  196, 197, 191, 174, 173, 168, 194, 198, 199, 178,
2125  167, 181, 185, 187, 179, 172, 188, 195, 190, 189,
2126  182, 192, 177, 165, 184, 183, 164, 171, 162, 163,
2127  159, 160, 161, 117, 119, 118, 154, 155, 150, 132,
2128  133, 134, 141, 138, 140, 135, 136, 156, 157, 142,
2129  143, 147, 151, 137, 139, 129, 130, 131, 144, 145,
2130  146, 148, 149, 152, 153, 158, 122, 124, 126, 26,
2131  120, 121, 123, 125, 0, 0, 0, 0, 0, 0,
2132  0, 490, 0, 261, 0, 246, 271, 72, 265, 645,
2133  0, 533, 534, 0, 289, 645, 610, 73, 71, 634,
2134  70, 0, 645, 437, 69, 634, 635, 0, 0, 21,
2135  236, 0, 0, 340, 341, 303, 306, 438, 0, 218,
2136  0, 219, 300, 0, 19, 0, 0, 632, 15, 18,
2137  634, 76, 14, 634, 0, 0, 638, 638, 247, 0,
2138  0, 638, 608, 634, 0, 0, 0, 84, 344, 0,
2139  94, 95, 102, 314, 413, 512, 511, 513, 510, 0,
2140  509, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2141  0, 0, 516, 53, 230, 231, 641, 642, 4, 643,
2142  633, 0, 0, 0, 0, 0, 0, 0, 442, 440,
2143  427, 63, 311, 421, 423, 0, 90, 0, 82, 79,
2144  0, 0, 0, 0, 0, 0, 242, 243, 0, 0,
2145  0, 0, 0, 0, 0, 0, 0, 240, 241, 0,
2146  0, 0, 0, 0, 0, 0, 0, 0, 0, 629,
2147  435, 645, 628, 433, 0, 55, 0, 0, 0, 0,
2148  632, 0, 633, 0, 366, 365, 0, 0, 533, 534,
2149  289, 112, 113, 0, 0, 115, 541, 0, 533, 534,
2150  289, 332, 189, 182, 192, 177, 159, 160, 161, 117,
2151  118, 606, 334, 605, 0, 631, 630, 0, 313, 468,
2152  0, 0, 127, 613, 300, 272, 615, 268, 0, 0,
2153  0, 0, 262, 270, 435, 645, 433, 0, 0, 0,
2154  263, 634, 0, 305, 267, 634, 257, 645, 645, 256,
2155  634, 310, 52, 23, 25, 24, 0, 307, 0, 0,
2156  0, 435, 433, 0, 17, 0, 634, 298, 13, 633,
2157  75, 294, 296, 301, 640, 639, 248, 640, 250, 302,
2158  609, 0, 101, 516, 92, 87, 0, 435, 645, 433,
2159  565, 496, 499, 497, 514, 493, 469, 491, 470, 471,
2160  495, 472, 473, 0, 476, 482, 0, 483, 478, 479,
2161  0, 484, 0, 485, 0, 644, 7, 27, 28, 29,
2162  30, 31, 50, 51, 447, 444, 60, 64, 447, 0,
2163  34, 276, 0, 36, 275, 634, 0, 80, 91, 48,
2164  38, 46, 0, 251, 271, 200, 35, 0, 289, 216,
2165  223, 225, 226, 227, 234, 235, 228, 229, 209, 210,
2166  232, 233, 634, 220, 221, 222, 211, 212, 213, 214,
2167  215, 244, 245, 619, 621, 620, 622, 0, 266, 432,
2168  634, 619, 621, 620, 622, 0, 266, 0, 645, 357,
2169  0, 356, 0, 0, 0, 0, 0, 0, 300, 435,
2170  645, 433, 325, 330, 112, 113, 114, 539, 328, 435,
2171  645, 433, 0, 0, 335, 627, 626, 337, 619, 620,
2172  266, 39, 251, 201, 45, 208, 0, 0, 612, 0,
2173  273, 269, 645, 619, 620, 634, 619, 620, 611, 304,
2174  636, 253, 258, 260, 309, 22, 0, 237, 0, 32,
2175  430, 428, 207, 0, 77, 16, 634, 638, 0, 85,
2176  623, 100, 634, 619, 620, 571, 568, 567, 566, 569,
2177  577, 586, 0, 597, 587, 601, 600, 596, 565, 414,
2178  564, 418, 570, 572, 573, 575, 550, 579, 584, 645,
2179  589, 645, 594, 550, 599, 550, 0, 548, 500, 0,
2180  475, 477, 487, 481, 489, 217, 0, 448, 0, 445,
2181  444, 0, 279, 0, 89, 83, 0, 0, 0, 0,
2182  435, 645, 433, 0, 0, 0, 436, 67, 0, 0,
2183  439, 0, 0, 434, 65, 645, 355, 292, 645, 645,
2184  454, 645, 358, 645, 360, 318, 359, 321, 0, 0,
2185  324, 623, 299, 634, 619, 620, 0, 0, 0, 0,
2186  112, 113, 116, 634, 0, 634, 543, 0, 255, 424,
2187  59, 254, 128, 614, 274, 264, 0, 0, 439, 0,
2188  0, 645, 634, 11, 0, 297, 249, 93, 439, 0,
2189  378, 369, 371, 634, 367, 634, 415, 0, 0, 557,
2190  578, 0, 546, 604, 588, 0, 547, 0, 560, 598,
2191  0, 562, 602, 501, 505, 506, 507, 498, 508, 443,
2192  645, 441, 645, 0, 422, 0, 277, 81, 47, 252,
2193  619, 620, 634, 619, 620, 0, 44, 205, 43, 206,
2194  68, 431, 637, 0, 41, 203, 42, 204, 66, 429,
2195  455, 456, 645, 457, 0, 645, 363, 0, 0, 361,
2196  0, 0, 0, 323, 0, 0, 439, 0, 0, 0,
2197  0, 439, 333, 607, 565, 0, 565, 338, 425, 426,
2198  0, 259, 308, 20, 634, 0, 376, 0, 574, 0,
2199  406, 0, 590, 549, 576, 550, 550, 585, 645, 603,
2200  550, 595, 550, 573, 550, 502, 404, 634, 0, 402,
2201  401, 0, 61, 278, 439, 238, 40, 202, 0, 0,
2202  459, 364, 0, 12, 461, 0, 315, 316, 0, 0,
2203  273, 645, 326, 0, 540, 329, 634, 0, 0, 543,
2204  368, 379, 0, 374, 370, 417, 0, 0, 0, 416,
2205  0, 553, 0, 555, 545, 0, 561, 0, 558, 563,
2206  503, 400, 634, 0, 573, 385, 581, 582, 645, 645,
2207  592, 385, 385, 383, 449, 446, 0, 458, 0, 533,
2208  534, 289, 0, 460, 0, 319, 322, 451, 452, 450,
2209  0, 331, 542, 336, 544, 0, 0, 377, 0, 372,
2210  410, 634, 408, 411, 0, 0, 550, 550, 550, 550,
2211  0, 0, 403, 0, 391, 393, 0, 580, 0, 381,
2212  382, 0, 396, 0, 398, 300, 435, 645, 433, 645,
2213  645, 0, 0, 375, 0, 0, 407, 420, 419, 554,
2214  0, 551, 556, 559, 0, 405, 591, 384, 385, 385,
2215  300, 435, 583, 645, 385, 593, 385, 385, 623, 299,
2216  634, 619, 620, 453, 362, 327, 339, 373, 409, 550,
2217  504, 0, 388, 0, 390, 623, 299, 380, 0, 397,
2218  0, 394, 399, 439, 552, 385, 385, 385, 385, 389,
2219  0, 386, 392, 395, 385, 387
2220 };
2221 
2222 /* YYDEFGOTO[NTERM-NUM]. */
2223 static const yytype_int16 yydefgoto[] =
2224 {
2225  -1, 1, 2, 68, 69, 70, 241, 577, 578, 257,
2226  258, 455, 259, 446, 72, 530, 73, 366, 74, 75,
2227  517, 700, 76, 77, 78, 260, 79, 80, 81, 475,
2228  82, 214, 385, 386, 196, 197, 198, 199, 616, 566,
2229  201, 84, 448, 357, 85, 216, 265, 535, 233, 759,
2230  435, 436, 230, 231, 218, 422, 437, 523, 524, 86,
2231  364, 263, 264, 646, 636, 368, 851, 369, 852, 746,
2232  980, 749, 747, 602, 604, 756, 757, 929, 250, 88,
2233  89, 90, 91, 92, 93, 94, 95, 96, 97, 727,
2234  580, 735, 848, 849, 377, 781, 782, 783, 1037, 1005,
2235  952, 898, 899, 879, 991, 992, 283, 284, 480, 786,
2236  881, 669, 939, 324, 518, 98, 99, 725, 718, 575,
2237  567, 322, 515, 514, 698, 699, 812, 696, 697, 810,
2238  587, 979, 729, 842, 909, 913, 100, 101, 102, 103,
2239  104, 105, 106, 295, 493, 107, 299, 108, 109, 297,
2240  301, 291, 289, 293, 485, 689, 688, 803, 895, 950,
2241  1000, 807, 110, 290, 111, 112, 113, 221, 222, 116,
2242  223, 224, 598, 748, 865, 866, 883, 789, 671, 672,
2243  673, 893, 675, 676, 677, 678, 957, 958, 679, 680,
2244  681, 682, 960, 961, 683, 684, 685, 686, 687, 792,
2245  404, 603, 270, 438, 226, 119, 640, 569, 607, 601,
2246  407, 308, 432, 433, 720, 466, 581, 372, 262
2247 };
2248 
2249 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
2250  STATE-NUM. */
2251 #define YYPACT_NINF -884
2252 static const yytype_int16 yypact[] =
2253 {
2254  -884, 88, 2724, -884, 7808, -884, -884, -884, 7302, -884,
2255  -884, -884, -884, -884, -884, -884, 7925, 7925, -884, -884,
2256  7925, 4141, 3727, -884, -884, -884, -884, 47, 7166, -14,
2257  -884, 76, -884, -884, -884, 3037, 3865, -884, -884, 3175,
2258  -884, -884, -884, -884, -884, -884, -884, -884, 9329, 9329,
2259  64, 5501, 198, 8276, 8627, 7568, -884, 7030, -884, -884,
2260  -884, 19, 77, 111, 162, 796, 9446, 9329, -884, 383,
2261  -884, 1130, -884, 400, -884, -884, 106, 121, 99, -884,
2262  187, 9680, -884, 108, 3291, 472, 378, 566, -884, 9563,
2263  9563, -884, -884, 6402, 9793, 9906, 10019, 6893, 305, 84,
2264  -884, -884, 241, -884, -884, -884, -884, -884, -884, -884,
2265  -884, -884, -884, -884, 415, 621, -884, 285, 653, -884,
2266  -884, -884, -884, -884, -884, -884, -884, -884, -884, -884,
2267  -884, -884, -884, -884, -884, -884, -884, -884, -884, -884,
2268  -884, -884, -884, -884, -884, -884, -884, -884, -884, -884,
2269  -884, -884, -884, -884, -884, -884, -884, -884, -884, -884,
2270  -884, -884, -884, -884, -884, -884, -884, -884, -884, -884,
2271  -884, -884, -884, -884, -884, -884, -884, -884, -884, -884,
2272  -884, -884, -884, -884, -884, -884, -884, -884, -884, -884,
2273  -884, -884, -884, -884, -884, -884, -884, -884, -884, 240,
2274  -884, -884, -884, -884, 244, 9329, 332, 5633, 9329, 9329,
2275  9329, -884, 9329, -884, 280, 3291, 312, -884, -884, 276,
2276  610, 51, 355, 371, 387, 292, -884, -884, -884, 6285,
2277  -884, 7925, 7925, -884, -884, 6519, -884, 9563, 647, -884,
2278  278, 361, 5765, -884, -884, -884, 358, 401, 106, -884,
2279  693, 456, 714, 8042, -884, 5501, 404, 383, -884, 1130,
2280  -14, 424, -884, -14, 8042, 408, -21, -11, -884, 312,
2281  422, -11, -884, -14, 524, 796, 10132, 478, -884, 731,
2282  735, 758, 762, -884, -884, -884, -884, -884, -884, 729,
2283  -884, 891, 911, 452, 496, 957, 518, 80, 532, 977,
2284  539, 252, 564, -884, -884, -884, -884, -884, -884, -884,
2285  6636, 9563, 9563, 9563, 9563, 8042, 9563, 9563, -884, -884,
2286  -884, 568, -884, -884, -884, 8744, -884, 5501, 7688, 530,
2287  8744, 9329, 9329, 9329, 9329, 9329, -884, -884, 9329, 9329,
2288  9329, 9329, 9329, 9329, 9329, 9329, 9329, -884, -884, 9329,
2289  9329, 9329, 9329, 9329, 9329, 9329, 9329, 9329, 9329, -884,
2290  2448, 7925, -884, 10421, 4838, 400, 148, 148, 9563, 9563,
2291  383, 658, 536, 630, -884, -884, 790, 663, 59, 75,
2292  92, 67, 463, 9563, 356, -884, 578, 795, -884, -884,
2293  -884, -884, 4, 27, 31, 97, 266, 327, 339, 344,
2294  414, -884, -884, -884, 443, -884, -884, 10502, -884, -884,
2295  9446, 9446, -884, -884, 473, -884, -884, -884, 699, 9329,
2296  9329, 8159, -884, -884, 10583, 7925, 10664, 9329, 9329, 8393,
2297  -884, -14, 577, -884, -884, -14, -884, 567, 582, -884,
2298  157, -884, -884, -884, -884, -884, 7302, -884, 9329, 5908,
2299  585, 10583, 10664, 9329, 1130, 591, -14, -884, -884, 6753,
2300  593, -884, 1130, -884, 8510, -884, -884, 8627, -884, -884,
2301  -884, 278, 805, -884, -884, 604, 10132, 10745, 7925, 10826,
2302  1469, -884, -884, -884, -884, -884, -884, -884, -884, -884,
2303  -884, -884, -884, 331, -884, -884, 602, -884, -884, -884,
2304  493, -884, 605, -884, 9329, -884, -884, -884, -884, -884,
2305  -884, -884, -884, -884, -884, -884, -884, -884, -884, 9329,
2306  -884, 612, 616, -884, -884, -14, 10132, 619, -884, -884,
2307  -884, 713, 644, 1889, -884, -884, -884, 808, 489, 456,
2308  2576, 2576, 2576, 2576, 3705, 3567, 2576, 2576, 3429, 3429,
2309  544, 544, 11504, 835, 835, 1112, 352, 352, 456, 456,
2310  456, 1188, 1188, 4279, 3313, 4555, 3451, 401, 627, -884,
2311  -14, 780, -884, 893, -884, 401, 4003, 763, 768, -884,
2312  4981, 769, 5267, 140, 140, 658, 8861, 763, 96, 10907,
2313  7925, 10988, -884, 400, -884, 805, -884, -884, -884, 11069,
2314  7925, 10502, 4838, 9563, -884, -884, -884, -884, -884, -884,
2315  2107, -884, 3153, -884, -884, -884, 7302, 9329, -884, 9329,
2316  312, -884, 292, 2899, 3589, -14, 504, 521, -884, -884,
2317  -884, -884, 8159, 8393, -884, -884, 9563, 3291, 650, -884,
2318  -884, -884, -884, 5908, 28, -884, -14, -11, 10132, 604,
2319  384, 596, -14, 437, 444, -884, -884, -884, -884, -884,
2320  -884, -884, 1169, -884, -884, -884, -884, -884, 1619, -884,
2321  -884, -884, -884, -884, 685, -884, 670, 9329, -884, 690,
2322  778, 695, -884, 698, 792, 710, 800, -884, -884, 1153,
2323  -884, -884, -884, -884, -884, 456, 838, -884, 725, -884,
2324  -884, 851, 727, 8978, -884, 604, 10132, 8042, 9446, 9329,
2325  11150, 7925, 11231, 746, 9446, 9446, -884, 568, 401, 728,
2326  959, 9446, 9446, -884, 568, 401, -884, -884, 9095, 858,
2327  -884, 440, -884, 858, -884, -884, -884, -884, 763, 101,
2328  -884, 65, 164, -14, 112, 147, 9563, 383, 9563, 4838,
2329  603, 596, -884, -14, 763, 157, 741, 7438, -884, 84,
2330  121, -884, -884, -884, -884, -884, 9329, 9329, 527, 9329,
2331  9329, 747, 157, -884, 753, -884, -884, -884, 495, 1169,
2332  482, -884, 752, -14, -884, -14, -884, 9329, 1619, -884,
2333  -884, 60, -884, -884, -884, 33, -884, 1619, -884, -884,
2334  1227, -884, -884, -884, -884, -884, -884, -884, -884, -884,
2335  18, -884, 18, 756, -884, 9329, 766, 604, -884, 3291,
2336  4417, 4693, -14, 586, 599, 9329, -884, -884, -884, -884,
2337  -884, -884, -884, 9446, -884, -884, -884, -884, -884, -884,
2338  612, -884, 816, -884, 5384, 890, -884, 9563, 763, -884,
2339  763, 6051, 6051, -884, 9212, 5124, 154, 140, 4838, 383,
2340  763, -884, -884, -884, 1619, 4838, 1619, -884, -884, -884,
2341  9329, 8393, -884, -884, -14, 1108, 776, 1314, -884, 774,
2342  786, 68, -884, -884, -884, 801, 806, -884, 695, -884,
2343  809, -884, 811, -884, 809, -884, -884, 1236, 4838, -884,
2344  -884, 5765, -884, 813, 617, 3291, -884, -884, 10245, 148,
2345  -884, -884, 6051, -884, -884, 148, -884, -884, 763, 763,
2346  -884, 308, -884, 763, -884, -884, -14, 763, 383, 741,
2347  -884, 814, 1108, 744, -884, -884, 1195, 6051, 5765, -884,
2348  1619, -884, 1227, -884, -884, 1227, -884, 1227, -884, -884,
2349  -884, -884, -14, 810, 850, 831, 10358, -884, 841, 695,
2350  -884, 843, 849, -884, -884, -884, 877, -884, 900, 208,
2351  218, 234, 4838, -884, 4981, -884, -884, -884, -884, -884,
2352  6051, -884, -884, -884, -884, 4838, 1108, 814, 1108, 853,
2353  -884, 169, -884, -884, 763, 856, 809, 855, 809, 809,
2354  6168, 875, -884, 10358, 1619, -884, 944, 918, 60, -884,
2355  -884, 1619, -884, 1227, -884, 256, 11312, 7925, 11393, 768,
2356  440, 763, 763, 814, 1108, 1195, -884, -884, -884, -884,
2357  1227, -884, -884, -884, 897, -884, 918, -884, 865, 872,
2358  -884, 11474, -884, 695, 885, -884, 889, 885, 260, 318,
2359  -14, 348, 367, -884, -884, -884, -884, 814, -884, 809,
2360  -884, 1619, -884, 1227, -884, 888, 896, -884, 1227, -884,
2361  1227, -884, -884, 368, -884, 885, 909, 885, 885, -884,
2362  1227, -884, -884, -884, 885, -884
2363 };
2364 
2365 /* YYPGOTO[NTERM-NUM]. */
2366 static const yytype_int16 yypgoto[] =
2367 {
2368  -884, -884, -884, -380, -884, 39, -884, -412, -27, -884,
2369  569, -884, 81, -884, -223, -374, -61, -52, -59, -884,
2370  -378, -884, 2134, -5, 961, -169, 15, -76, -884, -432,
2371  0, 1449, -319, 955, -49, -884, -12, -884, -884, 32,
2372  -884, 767, -884, 973, -884, 1135, -884, 215, -67, 336,
2373  -322, 89, -9, -884, -375, -206, 5, -884, -304, -32,
2374  -884, -884, -884, -884, -884, -884, -884, -884, -884, -884,
2375  -884, -884, -884, -884, -884, -884, -884, -884, 57, -884,
2376  -884, -884, -884, -884, -884, -884, -884, -884, -884, -168,
2377  -349, -531, 43, -642, -884, -809, -805, 286, 171, 91,
2378  -884, 263, -884, -786, -884, 53, -884, -884, -884, -884,
2379  -884, -884, -884, 319, -884, -884, -884, -884, -884, -884,
2380  -884, -98, -884, -884, 372, -884, -884, 562, -884, -884,
2381  -543, -884, 63, -884, -884, -884, -884, -884, -884, 986,
2382  -884, -884, -884, -884, 794, -884, -884, -884, -884, -884,
2383  -884, 880, 1035, -884, -86, -884, -884, -884, -884, -884,
2384  -884, -884, 2, -884, 6, -884, -8, 1181, 1352, 998,
2385  1693, 938, -884, -884, 174, -884, -460, 153, -589, -861,
2386  -211, -433, -706, 259, 73, 313, 107, -884, -884, -884,
2387  3, -741, -883, 110, 338, -884, -675, -884, -145, -601,
2388  -884, -884, -884, 82, -396, -884, -282, -884, -884, -81,
2389  -884, -43, -25, -159, -580, -236, -66, 26, -2
2390 };
2391 
2392 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
2393  positive, shift that token. If negative, reduce the rule which
2394  number is the opposite. If zero, do what YYDEFACT says.
2395  If YYTABLE_NINF, syntax error. */
2396 #define YYTABLE_NINF -646
2397 static const yytype_int16 yytable[] =
2398 {
2399  120, 408, 237, 309, 240, 329, 363, 303, 288, 320,
2400  202, 213, 213, 234, 203, 213, 239, 406, 582, 430,
2401  670, 219, 219, 278, 256, 219, 536, 309, 365, 365,
2402  202, 468, 365, 628, 203, 470, 611, 614, 367, 570,
2403  200, 370, 738, 121, 649, 768, 621, 674, 402, 278,
2404  371, 268, 272, 737, 621, 277, 891, 302, 266, 87,
2405  200, 87, 278, 278, 278, 596, 261, 321, 934, 638,
2406  931, 628, 778, 220, 220, 993, 441, 220, 568, 785,
2407  796, 576, 884, 71, -103, 71, 456, 845, 3, 200,
2408  -107, 850, -527, -616, 705, 310, 896, 937, 225, 225,
2409  -104, 460, 225, 625, 461, 217, 227, 529, 87, 228,
2410  318, 953, 279, 886, 579, -526, 464, -111, 660, -528,
2411  252, -110, 892, 220, 465, 610, 467, 987, 1045, 200,
2412  661, 236, 318, 665, 465, 267, 271, -106, 279, 426,
2413  897, -535, 568, 496, 576, -75, 220, 220, -527, 323,
2414  220, 376, 387, 387, -521, -521, 652, 666, 525, 664,
2415  665, 579, 294, 856, 993, -89, 1001, 734, -103, 452,
2416  641, -526, -108, 861, 440, -528, 442, 934, 1045, -105,
2417  256, 320, 938, 1023, 666, -529, 235, 529, 529, -109,
2418  754, 309, 236, 497, 316, 317, -94, 641, 479, 891,
2419  474, -616, -98, -521, -619, 487, -616, 490, 670, 494,
2420  242, -521, -95, 494, 458, 450, 325, 423, 319, 1057,
2421  296, -103, 962, 423, 213, 330, 213, 213, 256, -102,
2422  439, -104, 430, -101, 219, 674, 219, 628, 854, 884,
2423  319, -529, 904, 306, 278, 232, 307, -111, 471, -97,
2424  365, 365, 365, 365, 298, 512, 513, 621, 621, 507,
2425  508, 509, 510, 774, 87, 997, 520, 473, 743, -110,
2426  261, 531, 629, -107, 817, 926, 631, 928, 753, 977,
2427  752, 634, 306, 459, -99, 307, 220, 944, 220, 220,
2428  306, -96, 220, 307, 220, 591, 278, 644, 884, 87,
2429  256, -100, 236, -620, 309, 300, 1025, 365, 365, 641,
2430  87, 225, 87, 225, 236, 502, 583, 584, 431, 641,
2431  434, 87, 593, 844, 326, 586, 922, 585, 527, 1039,
2432  522, -109, 487, 279, 454, 522, 1046, 860, -293, 830,
2433  826, 828, 261, -293, 58, 462, 838, 834, 836, 506,
2434  -103, 531, 531, -103, -531, 674, 213, 1009, 1010, 439,
2435  -104, -106, 884, -104, 674, 503, 704, 87, 220, 220,
2436  220, 220, 87, 220, 220, 410, -111, 412, 978, -111,
2437  -108, -105, 220, 235, 87, 279, 1076, 537, 414, 822,
2438  855, 71, 359, 405, 481, 574, 511, 419, -110, -619,
2439  474, -110, -107, 420, 670, -107, 670, 691, 594, -98,
2440  -531, 776, 595, 421, 691, -530, 765, 447, 220, 740,
2441  213, 87, 331, 439, 841, 220, 220, -532, 568, 429,
2442  576, 674, -521, 674, 635, 423, 423, 316, 317, 574,
2443  220, 482, 1067, 483, 278, -536, 923, 120, 202, 362,
2444  474, 784, 203, 927, 847, 844, 712, -620, 574, 906,
2445  -109, 427, -97, -109, 954, -344, -344, 537, 537, -99,
2446  1073, -530, -104, 213, 690, 628, 439, 428, 200, 354,
2447  355, 356, 220, -532, 574, 529, 964, 775, -521, -617,
2448  -106, 529, 529, -106, 278, 449, 621, 229, 529, 529,
2449  716, -98, -524, 622, -111, -535, 87, 674, 723, -108,
2450  -105, 574, -108, -105, -344, 481, 87, 736, 736, 489,
2451  -96, -98, -344, -619, -98, 306, 331, 713, 307, -98,
2452  71, 605, -103, 279, 655, 220, 656, 657, 658, 659,
2453  232, -74, 755, 758, 457, 719, 647, 336, 337, 463,
2454  -524, -524, -94, 731, -97, 733, 481, 469, -524, 717,
2455  972, -99, 482, 453, 483, 765, 974, 724, 784, 876,
2456  853, 954, 777, 1022, -97, 772, 730, -97, 954, 411,
2457  472, -99, -97, 279, -99, 213, 862, 606, 439, -99,
2458  -110, 739, 347, 348, 769, 213, 863, -617, 439, -524,
2459  719, 760, -617, 482, 762, 483, -111, -524, 761, 491,
2460  529, 770, -96, 872, 331, 476, 278, 870, 202, 875,
2461  423, -106, 203, 574, 878, 613, 615, 719, 954, -623,
2462  474, 495, -96, 574, 504, -96, 693, 87, -108, 87,
2463  -96, 120, 613, 615, -105, 498, 889, 220, 200, 531,
2464  889, 831, 501, 359, 360, 531, 531, 220, 758, 87,
2465  220, 868, 531, 531, 784, 516, 784, 528, 642, 352,
2466  353, 354, 355, 356, 278, 586, 721, 793, 505, 793,
2467  916, 858, 917, -299, -299, 365, 588, 365, 592, 722,
2468  -623, -623, 925, 220, 857, 1050, 859, 359, 424, 597,
2469  87, 443, 361, -106, 632, 279, 213, 833, 867, 439,
2470  362, -536, 444, 445, 771, 930, -108, 630, 719, 633,
2471  639, 784, 989, 761, 71, 643, 843, 846, 719, 846,
2472  -89, 846, -299, 522, -105, -620, 641, -623, -104, -623,
2473  -299, 648, -619, 411, 574, 692, 425, -623, 694, -271,
2474  975, 976, 963, 703, 362, 981, 706, 707, -95, 983,
2475  880, 708, 481, 279, 87, 537, -430, 982, 220, 423,
2476  -111, 537, 537, 726, 531, 784, 728, 784, 537, 537,
2477  359, 451, 732, 215, 215, 773, 365, 215, 818, 200,
2478  -102, 736, 481, 924, 888, 915, 655, 719, 656, 657,
2479  658, 659, 787, 220, 453, 220, 87, 788, 900, 482,
2480  900, 483, 486, 784, 617, 249, 251, 911, 359, 477,
2481  215, 215, -533, -533, 918, 919, 1027, 791, 921, 425,
2482  794, -110, 795, 304, 305, 797, 798, 362, 801, 482,
2483  910, 483, 484, 914, 799, -534, -534, 800, 809, -289,
2484  -289, -101, 802, 1055, 1056, 41, 42, 43, 44, 963,
2485  811, 814, 984, 889, -272, 825, 963, 478, 963, 832,
2486  721, -533, 880, 844, 965, 362, 278, 359, 589, -533,
2487  864, 988, 359, 599, 871, 973, 793, 1018, 873, 877,
2488  537, 902, -300, -300, -534, 359, 710, -106, -289, 912,
2489  959, 87, -534, -273, 220, 331, -289, 908, 87, 87,
2490  994, 995, 87, 932, 935, 87, 963, -97, 963, 846,
2491  344, 345, 87, 963, 278, 963, 590, 880, 936, 827,
2492  829, 600, 1002, 1015, 362, 963, 835, 837, 940, 362,
2493  118, -300, 118, 942, 711, 1019, 945, 1020, 947, -300,
2494  -274, 986, 362, 1021, 481, 87, 793, 793, 87, 351,
2495  352, 353, 354, 355, 356, 968, 1026, 1003, 1004, 87,
2496  956, 278, 215, 1034, 481, 215, 215, 215, 1008, 304,
2497  1011, 827, 829, 722, 835, 837, 1013, 359, 1016, 118,
2498  1024, 1028, 1030, 282, 87, 87, 215, 1035, 215, 215,
2499  1040, 482, 1061, 483, 486, 359, 1041, 959, 1060, 1063,
2500  -108, 1043, 213, 1007, 959, 439, 959, 730, 846, 282,
2501  481, 482, 1068, 483, 488, 719, 1070, -619, 645, 87,
2502  -99, 87, 380, 390, 390, -620, 1017, 87, 941, 943,
2503  481, 793, 87, 946, 362, 948, 1080, 949, 907, 833,
2504  574, 391, 1012, 1014, 600, 374, 890, 87, 358, 894,
2505  1036, 839, 362, 1054, 959, 874, 959, 482, 951, 483,
2506  492, 959, 813, 959, 220, 901, -105, 956, 1058, 869,
2507  701, 956, 1053, 959, 956, 907, 956, 482, 409, 483,
2508  499, 418, 215, 500, 292, 403, -96, 533, 539, 540,
2509  541, 542, 543, 985, 887, 544, 545, 546, 547, 548,
2510  549, 550, 551, 552, 1038, 1042, 553, 554, 555, 556,
2511  557, 558, 559, 560, 561, 562, 885, 0, 215, 1062,
2512  1064, 0, 0, 0, 956, 1069, 956, 1071, 1072, 0,
2513  0, 956, 0, 956, 0, 118, 0, 0, 0, 1029,
2514  1031, 1032, 1033, 956, 0, 0, 955, 0, 0, 0,
2515  655, 0, 656, 657, 658, 659, 1079, 1081, 1082, 1083,
2516  311, 312, 313, 314, 315, 1085, 0, 612, 612, 0,
2517  118, 0, 331, 114, 0, 114, 612, 215, 215, 269,
2518  0, 118, 215, 118, 612, 612, 215, 344, 345, 996,
2519  779, 998, 118, 0, 0, 0, 999, 804, 805, 0,
2520  806, 0, 1074, 0, 282, 637, 0, 0, 46, 47,
2521  612, 655, 0, 656, 657, 658, 659, 0, 0, 0,
2522  0, 215, 114, 0, 215, 0, 280, 352, 353, 354,
2523  355, 356, 0, 0, 0, 215, 0, 990, 118, 656,
2524  657, 658, 659, 118, 0, 0, 0, 0, 331, 0,
2525  0, 779, 280, 0, 0, 118, 282, 780, 538, 0,
2526  1044, 695, 1047, 344, 345, 378, 388, 388, 388, 655,
2527  0, 656, 657, 658, 659, 660, 215, 0, 655, 1059,
2528  656, 657, 658, 659, 660, 0, 0, 661, 0, 0,
2529  0, 0, 118, 0, 0, 0, 661, 0, 0, 0,
2530  349, 350, 351, 352, 353, 354, 355, 356, 0, 662,
2531  1075, 0, 1077, 0, 0, 0, 664, 665, 662, 1078,
2532  0, 0, 0, 0, 663, 664, 665, 0, 0, 1084,
2533  413, 0, 0, 415, 416, 417, 0, 0, 538, 538,
2534  0, 666, 0, 215, 115, 0, 115, 215, 0, 0,
2535  666, 0, 0, 667, 0, 0, 655, 215, 656, 657,
2536  658, 659, 0, 0, 0, 0, 0, 0, 0, 0,
2537  0, 236, 0, 0, 215, 0, 215, 118, 114, 0,
2538  0, 0, 0, 0, 0, 0, 0, 118, 0, 215,
2539  215, 0, 0, 115, 0, 0, 779, 281, 0, 0,
2540  0, 0, 933, 0, 282, 0, 0, 0, 0, 0,
2541  0, 0, 0, 114, 0, 0, 0, 0, 0, 0,
2542  0, 0, 0, 281, 114, 0, 114, 0, 0, 0,
2543  0, 0, 0, 0, 215, 114, 379, 389, 389, 389,
2544  0, 83, 0, 83, 0, 0, 0, 280, 0, 0,
2545  521, 0, 0, 0, 282, 534, 0, 0, 0, 0,
2546  215, 0, 0, 0, 0, 612, 819, 0, 215, 0,
2547  0, 612, 612, 0, 0, 0, 0, 0, 612, 612,
2548  0, 114, 0, 0, 0, 215, 114, 0, 0, 0,
2549  83, 0, 0, 0, 0, 0, 0, 0, 114, 280,
2550  0, 0, 0, 0, 0, 0, 0, 0, 118, 0,
2551  118, 655, 0, 656, 657, 658, 659, 660, 0, 0,
2552  0, 0, 0, 612, 612, 0, 612, 612, 0, 661,
2553  118, 0, 0, 375, 0, 114, 0, 0, 0, 0,
2554  0, 0, 0, 0, 215, 618, 620, 0, 0, 115,
2555  0, 662, 0, 0, 269, 0, 0, 663, 664, 665,
2556  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2557  0, 118, 215, 0, 0, 0, 282, 0, 0, 0,
2558  0, 0, 905, 666, 115, 0, 667, 0, 0, 620,
2559  612, 0, 269, 0, 0, 115, 0, 115, 668, 0,
2560  0, 0, 0, 0, 0, 0, 115, 0, 0, 0,
2561  0, 215, 0, 0, 0, 0, 0, 808, 281, 0,
2562  114, 0, 0, 0, 0, 0, 0, 612, 215, 0,
2563  114, 0, 0, 0, 282, 118, 538, 0, 0, 0,
2564  0, 0, 538, 538, 702, 0, 83, 280, 0, 538,
2565  538, 0, 115, 0, 0, 0, 0, 115, 0, 0,
2566  0, 655, 0, 656, 657, 658, 659, 660, 0, 115,
2567  281, 0, 0, 0, 0, 0, 0, 118, 0, 661,
2568  0, 83, 0, 0, 0, 117, 0, 117, 0, 0,
2569  0, 0, 83, 0, 83, 0, 0, 280, 0, 0,
2570  0, 662, 0, 83, 0, 0, 115, 663, 664, 665,
2571  0, 534, 0, 0, 0, 0, 0, 0, 0, 0,
2572  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2573  0, 0, 0, 666, 117, 0, 667, 0, 0, 0,
2574  0, 0, 763, 0, 764, 0, 0, 0, 0, 83,
2575  0, 114, 0, 114, 83, 0, 0, 620, 269, 0,
2576  0, 538, 0, 0, 0, 0, 83, 0, 0, 532,
2577  0, 0, 118, 114, 215, 0, 0, 0, 0, 118,
2578  118, 0, 0, 118, 0, 0, 118, 0, 0, 0,
2579  0, 115, 0, 118, 0, 0, 0, 0, 0, 0,
2580  0, 115, 790, 83, 0, 0, 0, 0, 0, 0,
2581  0, 0, 0, 0, 114, 0, 0, 0, 281, 280,
2582  0, 0, 0, 0, 0, 0, 118, 0, 816, 118,
2583  0, 0, 0, 0, 0, 0, 971, 0, 0, 0,
2584  118, 0, 0, 0, 0, 0, 0, 0, 0, 532,
2585  532, 0, 0, 840, 0, 0, 0, 0, 0, 0,
2586  0, 0, 0, 0, 0, 118, 118, 0, 281, 0,
2587  0, 0, 0, 0, 0, 0, 0, 280, 114, 0,
2588  0, 0, 0, 0, 390, 0, 0, 0, 83, 0,
2589  117, 0, 0, 0, 0, 0, 0, 0, 83, 0,
2590  118, 0, 118, 0, 0, 0, 0, 0, 118, 0,
2591  0, 0, 882, 118, 0, 0, 0, 0, 0, 0,
2592  114, 0, 115, 709, 115, 117, 0, 0, 118, 0,
2593  0, 390, 0, 0, 0, 0, 117, 0, 117, 0,
2594  903, 0, 0, 0, 115, 0, 0, 117, 0, 331,
2595  332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
2596  342, 343, 0, 0, 344, 345, 0, 0, 0, 0,
2597  0, 0, 0, 0, 0, 0, 0, 0, 0, 920,
2598  0, 0, 0, 0, 0, 115, 0, 0, 0, 0,
2599  281, 0, 0, 117, 0, 0, 269, 346, 117, 347,
2600  348, 349, 350, 351, 352, 353, 354, 355, 356, 0,
2601  117, 0, 0, 117, 0, 114, -246, 0, 0, 83,
2602  0, 83, 114, 114, 0, 0, 114, 0, 0, 114,
2603  0, 0, 0, 0, 0, 0, 114, 0, 0, 0,
2604  0, 83, 0, 0, 0, 0, 0, 117, 281, 115,
2605  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2606  0, 0, 0, 0, 0, 0, 0, 0, 0, 114,
2607  0, 0, 114, 0, 0, 0, 0, 0, 0, 969,
2608  0, 0, 83, 114, 0, 0, 0, 0, 0, 0,
2609  0, 115, 0, 117, 117, 0, 0, -645, 0, 0,
2610  0, 0, 0, 0, 0, -645, -645, -645, 114, 114,
2611  -645, -645, -645, 0, -645, 0, 0, 0, 0, 0,
2612  0, 0, 0, -645, -645, 0, 0, 388, 0, 0,
2613  0, 0, 117, 0, -645, -645, 0, -645, -645, -645,
2614  -645, -645, 117, 114, 0, 114, 83, 532, 0, 0,
2615  0, 114, 0, 532, 532, 0, 114, 0, 0, 0,
2616  532, 532, 0, 0, 0, 0, 0, 0, 0, 0,
2617  0, 114, 248, 248, 388, 0, 0, 248, 248, 248,
2618  0, 0, 0, 0, -645, -645, 115, 0, 83, 0,
2619  0, 248, 0, 115, 115, 0, 0, 115, 0, 0,
2620  115, 0, 0, 0, 0, 248, 0, 115, -645, 0,
2621  0, 0, 0, 0, 0, 0, 0, 0, 248, 248,
2622  248, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2623  0, -645, -645, 0, 0, 0, 232, -645, 0, -645,
2624  115, -645, -645, 115, 0, 0, 0, 0, 0, 0,
2625  970, 0, 0, 0, 115, 0, 0, 0, 0, 0,
2626  0, 0, 0, 117, 0, 117, 0, 0, 0, 0,
2627  0, 0, 532, 0, 0, 0, 0, 0, 0, 115,
2628  115, 0, 0, 83, 0, 117, 0, 0, 0, 0,
2629  83, 83, 0, 0, 83, 0, 0, 83, 389, 0,
2630  0, 0, 0, 0, 83, 0, 0, 0, 0, 0,
2631  0, 0, 0, 0, 115, 0, 115, 0, 0, 0,
2632  0, 0, 115, 0, 0, 0, 117, 115, 0, 248,
2633  0, 0, 248, 248, 248, 0, 248, 83, 0, 0,
2634  83, 0, 115, 0, 0, 389, 0, 967, 0, 0,
2635  0, 83, 0, 0, 0, 0, 0, 0, 0, 0,
2636  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2637  0, 0, 0, 0, 0, 0, 83, 83, 0, 0,
2638  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2639  117, 117, 0, 0, 0, 0, 0, 117, 117, 0,
2640  248, 0, 0, 0, 117, 117, 0, 0, 0, 0,
2641  0, 83, 0, 83, 0, 0, 0, 0, 0, 83,
2642  0, 0, 0, 0, 83, 0, 0, 0, 0, 0,
2643  0, 0, 117, 0, 0, 0, 0, 0, 0, 83,
2644  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2645  0, 0, 248, 0, 0, 248, 248, 248, 248, 248,
2646  0, 0, 248, 248, 248, 248, 248, 248, 248, 248,
2647  248, 0, 0, 248, 248, 248, 248, 248, 248, 248,
2648  248, 248, 248, 0, 0, 0, 0, 0, 0, 0,
2649  563, 564, 0, 0, 565, 0, 0, 0, 0, 0,
2650  0, 0, 0, 0, 0, 0, 166, 167, 168, 169,
2651  170, 171, 172, 173, 174, 0, 117, 175, 176, 0,
2652  0, 177, 178, 179, 180, 0, 0, 117, 0, 0,
2653  0, 0, 0, 0, 117, 117, 181, 182, 117, 0,
2654  0, 117, 0, 248, 248, 248, 0, 0, 117, 0,
2655  0, 248, 248, 248, 0, 0, 0, 0, 183, 184,
2656  185, 186, 187, 188, 189, 190, 191, 192, 0, 193,
2657  194, 0, 248, 0, 0, 0, 195, 248, 0, 0,
2658  0, 117, 0, 0, 117, 0, 0, 0, 248, 0,
2659  0, 248, 0, 0, 0, 117, 0, 0, 0, 0,
2660  248, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2661  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2662  117, 117, 0, 0, 0, 0, 0, 0, 248, 0,
2663  0, 0, 0, 0, 0, 0, 331, -646, -646, -646,
2664  -646, 336, 337, 248, 0, -646, -646, 0, 0, 0,
2665  248, 344, 345, 0, 0, 117, 0, 117, 0, 0,
2666  0, 0, 0, 117, 0, 0, 0, 0, 117, 0,
2667  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2668  0, 0, 0, 117, 0, 0, 347, 348, 349, 350,
2669  351, 352, 353, 354, 355, 356, 0, 0, 0, 0,
2670  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2671  248, 0, 0, 0, -645, 4, 0, 5, 6, 7,
2672  8, 9, 0, 0, 0, 10, 11, 0, 0, 0,
2673  12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
2674  0, 248, 0, 248, 20, 21, 22, 23, 24, 25,
2675  26, 0, 0, 27, 0, 0, 248, 248, 0, 28,
2676  29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
2677  39, 40, 248, 41, 42, 43, 44, 0, 45, 46,
2678  47, 0, 48, 49, 0, 0, 0, 0, 0, 0,
2679  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2680  0, 248, 0, 50, 0, 0, 51, 52, 0, 53,
2681  54, 0, 55, 0, 0, 56, 57, 58, 59, 60,
2682  61, 62, 63, 64, 0, 0, 0, 248, 0, 0,
2683  248, 0, 0, 248, 0, 0, 0, 0, 0, 0,
2684  0, 0, 0, 0, 65, 66, 67, 0, 0, 0,
2685  0, 0, 248, 0, 0, 0, -645, 0, 0, -645,
2686  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2687  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2688  0, 0, 0, 0, 0, 0, 0, 0, 0, -623,
2689  248, 248, 0, 248, 248, 0, 0, -623, -623, -623,
2690  0, 0, -623, -623, -623, 0, -623, 0, 0, 0,
2691  0, 248, 0, 0, 0, -623, -623, -623, -623, 0,
2692  0, 0, 0, 0, 0, 0, -623, -623, 0, -623,
2693  -623, -623, -623, -623, 0, 0, 0, 0, 0, 248,
2694  0, 0, 0, 0, 0, 0, 0, 0, 0, 248,
2695  0, 0, 0, 0, 0, 0, 0, 0, 0, -623,
2696  -623, -623, -623, -623, -623, -623, -623, -623, -623, -623,
2697  -623, -623, 0, 0, -623, -623, -623, -623, 248, 766,
2698  -623, 0, 0, 0, 0, 0, -623, 0, 0, 0,
2699  0, 0, 0, 0, 248, 248, 0, 0, 0, 0,
2700  -623, 0, 0, -623, 0, 0, -107, -623, -623, -623,
2701  -623, -623, -623, -623, -623, -623, -623, -623, -623, 0,
2702  0, 0, 0, -623, -623, -623, -623, -521, 0, -623,
2703  -623, -623, 248, -623, -623, -521, -521, -521, 0, 0,
2704  -521, -521, -521, 0, -521, 0, 0, 0, 0, 0,
2705  0, 0, -521, 0, -521, -521, -521, 0, 0, 0,
2706  0, 0, 0, 0, -521, -521, 0, -521, -521, -521,
2707  -521, -521, 0, 0, 0, 0, 0, 0, 0, 0,
2708  248, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2709  0, 0, 0, 0, 0, 0, 0, -521, -521, -521,
2710  -521, -521, -521, -521, -521, -521, -521, -521, -521, -521,
2711  0, 0, -521, -521, -521, -521, 0, -521, -521, 0,
2712  0, 0, 0, 0, -521, 0, 0, 248, 0, 0,
2713  0, 0, 0, 0, 0, 0, 0, 0, -521, 0,
2714  0, -521, 0, 0, -521, -521, -521, -521, -521, -521,
2715  -521, -521, -521, -521, -521, -521, -521, 0, 0, 0,
2716  0, 0, -521, -521, -521, -524, 0, -521, -521, -521,
2717  0, -521, -521, -524, -524, -524, 0, 0, -524, -524,
2718  -524, 0, -524, 0, 0, 0, 0, 709, 0, 0,
2719  -524, 0, -524, -524, -524, 0, 0, 0, 0, 0,
2720  0, 0, -524, -524, 0, -524, -524, -524, -524, -524,
2721  0, 0, 0, 331, 332, 333, 334, 335, 336, 337,
2722  338, 339, 340, 341, 342, 343, 0, 0, 344, 345,
2723  0, 0, 0, 0, 0, -524, -524, -524, -524, -524,
2724  -524, -524, -524, -524, -524, -524, -524, -524, 0, 0,
2725  -524, -524, -524, -524, 0, -524, -524, 0, 0, 0,
2726  0, 346, -524, 347, 348, 349, 350, 351, 352, 353,
2727  354, 355, 356, 0, 0, 0, -524, 0, 0, -524,
2728  0, 0, -524, -524, -524, -524, -524, -524, -524, -524,
2729  -524, -524, -524, -524, -524, 0, 0, 0, 0, 0,
2730  -524, -524, -524, -624, 0, -524, -524, -524, 0, -524,
2731  -524, -624, -624, -624, 0, 0, -624, -624, -624, 0,
2732  -624, 0, 0, 0, 0, 0, 0, 0, 0, -624,
2733  -624, -624, -624, 0, 0, 0, 0, 0, 0, 0,
2734  -624, -624, 0, -624, -624, -624, -624, -624, 0, 0,
2735  0, 331, 332, 333, 334, 335, 336, 337, 338, 339,
2736  340, 341, 342, 343, 0, 0, 344, 345, 0, 0,
2737  0, 0, 0, -624, -624, -624, -624, -624, -624, -624,
2738  -624, -624, -624, -624, -624, -624, 0, 0, -624, -624,
2739  -624, -624, 0, 0, -624, 0, 0, 0, 0, 346,
2740  -624, 347, 348, 349, 350, 351, 352, 353, 354, 355,
2741  356, 0, 0, 0, -624, 0, 0, -624, 0, 0,
2742  0, -624, -624, -624, -624, -624, -624, -624, -624, -624,
2743  -624, -624, -624, 0, 0, 0, 0, -624, -624, -624,
2744  -624, -625, 0, -624, -624, -624, 0, -624, -624, -625,
2745  -625, -625, 0, 0, -625, -625, -625, 0, -625, 0,
2746  0, 0, 0, 0, 0, 0, 0, -625, -625, -625,
2747  -625, 0, 0, 0, 0, 0, 0, 0, -625, -625,
2748  0, -625, -625, -625, -625, -625, 0, 0, 0, 331,
2749  332, 333, 334, 335, 336, 337, 338, 339, 340, 341,
2750  -646, -646, 0, 0, 344, 345, 0, 0, 0, 0,
2751  0, -625, -625, -625, -625, -625, -625, -625, -625, -625,
2752  -625, -625, -625, -625, 0, 0, -625, -625, -625, -625,
2753  0, 0, -625, 0, 0, 0, 0, 0, -625, 347,
2754  348, 349, 350, 351, 352, 353, 354, 355, 356, 0,
2755  0, 0, -625, 0, 0, -625, 0, 0, 0, -625,
2756  -625, -625, -625, -625, -625, -625, -625, -625, -625, -625,
2757  -625, 0, 0, 0, 0, -625, -625, -625, -625, -299,
2758  0, -625, -625, -625, 0, -625, -625, -299, -299, -299,
2759  0, 0, -299, -299, -299, 0, -299, 0, 0, 0,
2760  0, 0, 0, 0, 0, 0, -299, -299, -299, 0,
2761  0, 0, 0, 0, 0, 0, -299, -299, 0, -299,
2762  -299, -299, -299, -299, 0, 0, 0, 331, 332, 333,
2763  334, 335, 336, 337, 338, 0, 340, 341, 0, 0,
2764  0, 0, 344, 345, 0, 0, 0, 0, 0, -299,
2765  -299, -299, -299, -299, -299, -299, -299, -299, -299, -299,
2766  -299, -299, 0, 0, -299, -299, -299, -299, 0, 767,
2767  -299, 0, 0, 0, 0, 0, -299, 347, 348, 349,
2768  350, 351, 352, 353, 354, 355, 356, 0, 0, 0,
2769  -299, 0, 0, -299, 0, 0, -109, -299, -299, -299,
2770  -299, -299, -299, -299, -299, -299, -299, -299, -299, 0,
2771  0, 0, 0, 0, -299, -299, -299, -438, 0, -299,
2772  -299, -299, 0, -299, -299, -438, -438, -438, 0, 0,
2773  -438, -438, -438, 0, -438, 0, 0, 0, 0, 0,
2774  0, 0, 0, -438, -438, -438, 0, 0, 0, 0,
2775  0, 0, 0, 0, -438, -438, 0, -438, -438, -438,
2776  -438, -438, 0, 0, 0, 331, 332, 333, 334, 335,
2777  336, 337, 0, 0, 340, 341, 0, 0, 0, 0,
2778  344, 345, 0, 0, 0, 0, 0, -438, -438, -438,
2779  -438, -438, -438, -438, -438, -438, -438, -438, -438, -438,
2780  0, 0, -438, -438, -438, -438, 0, 0, -438, 0,
2781  0, 0, 0, 0, -438, 347, 348, 349, 350, 351,
2782  352, 353, 354, 355, 356, 0, 0, 0, -438, 0,
2783  0, 0, 0, 0, 0, -438, 0, -438, -438, -438,
2784  -438, -438, -438, -438, -438, -438, -438, 0, 0, 0,
2785  0, -438, -438, -438, -438, -290, 232, -438, -438, -438,
2786  0, -438, -438, -290, -290, -290, 0, 0, -290, -290,
2787  -290, 0, -290, 0, 0, 0, 0, 0, 0, 0,
2788  0, 0, -290, -290, -290, 0, 0, 0, 0, 0,
2789  0, 0, -290, -290, 0, -290, -290, -290, -290, -290,
2790  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2791  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2792  0, 0, 0, 0, 0, -290, -290, -290, -290, -290,
2793  -290, -290, -290, -290, -290, -290, -290, -290, 0, 0,
2794  -290, -290, -290, -290, 0, 0, -290, 0, 0, 0,
2795  0, 0, -290, 0, 0, 0, 0, 0, 0, 0,
2796  0, 0, 0, 0, 0, 0, -290, 0, 0, -290,
2797  0, 0, 0, -290, -290, -290, -290, -290, -290, -290,
2798  -290, -290, -290, -290, -290, 0, 0, 0, 0, 0,
2799  -290, -290, -290, -428, 0, -290, -290, -290, 0, -290,
2800  -290, -428, -428, -428, 0, 0, -428, -428, -428, 0,
2801  -428, 0, 0, 0, 0, 0, 0, 0, 0, -428,
2802  -428, -428, 0, 0, 0, 0, 0, 0, 0, 0,
2803  -428, -428, 0, -428, -428, -428, -428, -428, 0, 0,
2804  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2805  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2806  0, 0, 0, -428, -428, -428, -428, -428, -428, -428,
2807  -428, -428, -428, -428, -428, -428, 0, 0, -428, -428,
2808  -428, -428, 0, 0, -428, 0, 0, 0, 0, 0,
2809  -428, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2810  0, 0, 0, 0, -428, 0, 0, 0, 0, 0,
2811  0, -428, 0, -428, -428, -428, -428, -428, -428, -428,
2812  -428, -428, -428, 0, 0, 0, 0, -428, -428, -428,
2813  -428, -306, -428, -428, -428, -428, 0, -428, -428, -306,
2814  -306, -306, 0, 0, -306, -306, -306, 0, -306, 0,
2815  0, 0, 0, 0, 0, 0, 0, 0, -306, -306,
2816  0, 0, 0, 0, 0, 0, 0, 0, -306, -306,
2817  0, -306, -306, -306, -306, -306, 0, 0, 0, 0,
2818  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2819  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2820  0, -306, -306, -306, -306, -306, -306, -306, -306, -306,
2821  -306, -306, -306, -306, 0, 0, -306, -306, -306, -306,
2822  0, 0, -306, 0, 0, 0, 0, 0, -306, 0,
2823  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2824  0, 0, -306, 0, 0, 0, 0, 0, 0, -306,
2825  0, -306, -306, -306, -306, -306, -306, -306, -306, -306,
2826  -306, 0, 0, 0, 0, 0, -306, -306, -306, -623,
2827  229, -306, -306, -306, 0, -306, -306, -623, -623, -623,
2828  0, 0, 0, -623, -623, 0, -623, 0, 0, 0,
2829  0, 0, 0, 0, 0, -623, 0, 0, 0, 0,
2830  0, 0, 0, 0, 0, 0, -623, -623, 0, -623,
2831  -623, -623, -623, -623, 0, 0, 0, 0, 0, 0,
2832  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2833  0, 0, 0, 0, 0, 0, 0, 0, 0, -623,
2834  -623, -623, -623, -623, -623, -623, -623, -623, -623, -623,
2835  -623, -623, 0, 0, -623, -623, -623, -623, 0, 714,
2836  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2837  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2838  -623, 0, 0, 0, 0, 0, -107, -623, 0, -623,
2839  -623, -623, -623, -623, -623, -623, -623, -623, -623, 0,
2840  0, 0, 0, -623, -623, -623, -98, -623, 0, -623,
2841  0, -623, 0, -623, -623, -623, -623, -623, 0, 0,
2842  0, -623, -623, 0, -623, 0, 0, 0, 0, 0,
2843  0, 0, 0, -623, 0, 0, 0, 0, 0, 0,
2844  0, 0, 0, 0, -623, -623, 0, -623, -623, -623,
2845  -623, -623, 0, 0, 0, 0, 0, 0, 0, 0,
2846  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2847  0, 0, 0, 0, 0, 0, 0, -623, -623, -623,
2848  -623, -623, -623, -623, -623, -623, -623, -623, -623, -623,
2849  0, 0, -623, -623, -623, -623, 0, 714, 0, 0,
2850  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2851  0, 0, 0, 0, 0, 0, 0, 0, -623, 0,
2852  0, 0, 0, 0, -107, -623, 0, -623, -623, -623,
2853  -623, -623, -623, -623, -623, -623, -623, 0, 0, 0,
2854  0, -623, -623, -623, -623, -299, 0, -623, 0, -623,
2855  0, -623, -623, -299, -299, -299, 0, 0, 0, -299,
2856  -299, 0, -299, 0, 0, 0, 0, 0, 0, 0,
2857  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2858  0, 0, -299, -299, 0, -299, -299, -299, -299, -299,
2859  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2860  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2861  0, 0, 0, 0, 0, -299, -299, -299, -299, -299,
2862  -299, -299, -299, -299, -299, -299, -299, -299, 0, 0,
2863  -299, -299, -299, -299, 0, 715, 0, 0, 0, 0,
2864  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2865  0, 0, 0, 0, 0, 0, -299, 0, 0, 0,
2866  0, 0, -109, -299, 0, -299, -299, -299, -299, -299,
2867  -299, -299, -299, -299, -299, 0, 0, 0, 0, 0,
2868  -299, -299, -100, -299, 0, -299, 0, -299, 0, -299,
2869  -299, -299, -299, -299, 0, 0, 0, -299, -299, 0,
2870  -299, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2871  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2872  -299, -299, 0, -299, -299, -299, -299, -299, 0, 0,
2873  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2874  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2875  0, 0, 0, -299, -299, -299, -299, -299, -299, -299,
2876  -299, -299, -299, -299, -299, -299, 0, 0, -299, -299,
2877  -299, -299, 0, 715, 0, 0, 0, 0, 0, 0,
2878  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2879  0, 0, 0, 0, -299, 0, 0, 0, 0, 0,
2880  -109, -299, 0, -299, -299, -299, -299, -299, -299, -299,
2881  -299, -299, -299, 0, 0, 0, 0, 0, -299, -299,
2882  -299, 0, 0, -299, 0, -299, 0, -299, -299, 253,
2883  0, 5, 6, 7, 8, 9, -645, -645, -645, 10,
2884  11, 0, 0, -645, 12, 0, 13, 14, 15, 16,
2885  17, 18, 19, 0, 0, 0, 0, 0, 20, 21,
2886  22, 23, 24, 25, 26, 0, 0, 27, 0, 0,
2887  0, 0, 0, 28, 29, 254, 31, 32, 33, 34,
2888  35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
2889  44, 0, 45, 46, 47, 0, 48, 49, 0, 0,
2890  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2891  0, 0, 0, 0, 0, 0, 0, 50, 0, 0,
2892  51, 52, 0, 53, 54, 0, 55, 0, 0, 56,
2893  57, 58, 59, 60, 61, 62, 63, 64, 0, 0,
2894  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2895  0, 0, 0, 0, 0, 0, 0, 0, 65, 66,
2896  67, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2897  -645, 0, 253, -645, 5, 6, 7, 8, 9, 0,
2898  0, -645, 10, 11, 0, -645, -645, 12, 0, 13,
2899  14, 15, 16, 17, 18, 19, 0, 0, 0, 0,
2900  0, 20, 21, 22, 23, 24, 25, 26, 0, 0,
2901  27, 0, 0, 0, 0, 0, 28, 29, 254, 31,
2902  32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
2903  41, 42, 43, 44, 0, 45, 46, 47, 0, 48,
2904  49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2905  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2906  50, 0, 0, 51, 52, 0, 53, 54, 0, 55,
2907  0, 0, 56, 57, 58, 59, 60, 61, 62, 63,
2908  64, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2909  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2910  0, 65, 66, 67, 0, 0, 0, 0, 0, 0,
2911  0, 0, 0, -645, 0, 253, -645, 5, 6, 7,
2912  8, 9, 0, 0, -645, 10, 11, 0, 0, -645,
2913  12, -645, 13, 14, 15, 16, 17, 18, 19, 0,
2914  0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
2915  26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2916  29, 254, 31, 32, 33, 34, 35, 36, 37, 38,
2917  39, 40, 0, 41, 42, 43, 44, 0, 45, 46,
2918  47, 0, 48, 49, 0, 0, 0, 0, 0, 0,
2919  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2920  0, 0, 0, 50, 0, 0, 51, 52, 0, 53,
2921  54, 0, 55, 0, 0, 56, 57, 58, 59, 60,
2922  61, 62, 63, 64, 0, 0, 0, 0, 0, 0,
2923  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2924  0, 0, 0, 0, 65, 66, 67, 0, 0, 0,
2925  0, 0, 0, 0, 0, 0, -645, 0, 253, -645,
2926  5, 6, 7, 8, 9, 0, 0, -645, 10, 11,
2927  0, 0, -645, 12, 0, 13, 14, 15, 16, 17,
2928  18, 19, 0, 0, 0, 0, 0, 20, 21, 22,
2929  23, 24, 25, 26, 0, 0, 27, 0, 0, 0,
2930  0, 0, 28, 29, 254, 31, 32, 33, 34, 35,
2931  36, 37, 38, 39, 40, 0, 41, 42, 43, 44,
2932  0, 45, 46, 47, 0, 48, 49, 0, 0, 0,
2933  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2934  0, 0, 0, 0, 0, 0, 50, 0, 0, 51,
2935  52, 0, 53, 54, 0, 55, 0, 0, 56, 57,
2936  58, 59, 60, 61, 62, 63, 64, 0, 0, 0,
2937  0, 0, 0, 0, 0, 253, 0, 5, 6, 7,
2938  8, 9, 0, -645, -645, 10, 11, 65, 66, 67,
2939  12, 0, 13, 14, 15, 16, 17, 18, 19, -645,
2940  0, 0, -645, 0, 20, 21, 22, 23, 24, 25,
2941  26, 0, 0, 27, 0, 0, 0, 0, 0, 28,
2942  29, 254, 31, 32, 33, 34, 35, 36, 37, 38,
2943  39, 40, 0, 41, 42, 43, 44, 0, 45, 46,
2944  47, 0, 48, 49, 0, 0, 0, 0, 0, 0,
2945  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2946  0, 0, 0, 50, 0, 0, 51, 52, 0, 53,
2947  54, 0, 55, 0, 0, 56, 57, 58, 59, 60,
2948  61, 62, 63, 64, 0, 0, 0, 0, 0, 0,
2949  0, 0, 253, 0, 5, 6, 7, 8, 9, 0,
2950  0, 0, 10, 11, 65, 66, 67, 12, 0, 13,
2951  14, 15, 16, 17, 18, 19, -645, 0, 0, -645,
2952  0, 20, 21, 22, 23, 24, 25, 26, 0, 0,
2953  27, 0, 0, 0, 0, 0, 28, 29, 254, 31,
2954  32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
2955  41, 42, 43, 44, 0, 45, 46, 47, 0, 48,
2956  49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2957  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2958  50, 0, 0, 255, 52, 0, 53, 54, 0, 55,
2959  0, 0, 56, 57, 58, 59, 60, 61, 62, 63,
2960  64, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2961  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2962  0, 65, 66, 67, 253, 0, 5, 6, 7, 8,
2963  9, -645, 0, -645, 10, 11, -645, 0, 0, 12,
2964  0, 13, 14, 15, 16, 17, 18, 19, 0, 0,
2965  0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
2966  0, 0, 27, 0, 0, 0, 0, 0, 28, 29,
2967  254, 31, 32, 33, 34, 35, 36, 37, 38, 39,
2968  40, 0, 41, 42, 43, 44, 0, 45, 46, 47,
2969  0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
2970  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2971  0, 0, 50, 0, 0, 51, 52, 0, 53, 54,
2972  0, 55, 0, 0, 56, 57, 58, 59, 60, 61,
2973  62, 63, 64, 0, 0, 0, 0, 0, 0, 0,
2974  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2975  0, 0, 0, 65, 66, 67, 253, 0, 5, 6,
2976  7, 8, 9, -645, 0, -645, 10, 11, -645, 0,
2977  0, 12, 0, 13, 14, 15, 16, 17, 18, 19,
2978  0, 0, 0, 0, 0, 20, 21, 22, 23, 24,
2979  25, 26, 0, 0, 27, 0, 0, 0, 0, 0,
2980  28, 29, 254, 31, 32, 33, 34, 35, 36, 37,
2981  38, 39, 40, 0, 41, 42, 43, 44, 0, 45,
2982  46, 47, 0, 48, 49, 0, 0, 0, 0, 0,
2983  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2984  0, 0, 0, 0, 50, 0, 0, 51, 52, 0,
2985  53, 54, 0, 55, 0, 0, 56, 57, 58, 59,
2986  60, 61, 62, 63, 64, 0, 0, 0, 0, 0,
2987  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2988  0, 0, 0, 0, 0, 65, 66, 67, 0, 0,
2989  -645, 0, 0, 0, 0, 0, 0, -645, 0, 4,
2990  -645, 5, 6, 7, 8, 9, 0, 0, 0, 10,
2991  11, 0, 0, 0, 12, 0, 13, 14, 15, 16,
2992  17, 18, 19, 0, 0, 0, 0, 0, 20, 21,
2993  22, 23, 24, 25, 26, 0, 0, 27, 0, 0,
2994  0, 0, 0, 28, 29, 30, 31, 32, 33, 34,
2995  35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
2996  44, 0, 45, 46, 47, 0, 48, 49, 0, 0,
2997  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2998  0, 0, 0, 0, 0, 0, 0, 50, 0, 0,
2999  51, 52, 0, 53, 54, 0, 55, 0, 0, 56,
3000  57, 58, 59, 60, 61, 62, 63, 64, 0, 0,
3001  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3002  0, 0, 0, 0, 0, 0, 0, 0, 65, 66,
3003  67, 0, 0, -645, 0, 0, 0, 0, 0, 0,
3004  -645, 0, 253, -645, 5, 6, 7, 8, 9, 0,
3005  0, -645, 10, 11, 0, 0, 0, 12, 0, 13,
3006  14, 15, 16, 17, 18, 19, 0, 0, 0, 0,
3007  0, 20, 21, 22, 23, 24, 25, 26, 0, 0,
3008  27, 0, 0, 0, 0, 0, 28, 29, 254, 31,
3009  32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
3010  41, 42, 43, 44, 0, 45, 46, 47, 0, 48,
3011  49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3012  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3013  50, 0, 0, 51, 52, 0, 53, 54, 0, 55,
3014  0, 0, 56, 57, 58, 59, 60, 61, 62, 63,
3015  64, 0, 0, 0, 0, 0, 0, 0, 0, 253,
3016  0, 5, 6, 7, 8, 9, 0, 0, 0, 10,
3017  11, 65, 66, 67, 12, 0, 13, 14, 15, 16,
3018  17, 18, 19, -645, 0, 0, -645, 0, 20, 21,
3019  22, 23, 24, 25, 26, 0, 0, 27, 0, 0,
3020  0, 0, 0, 28, 29, 254, 31, 32, 33, 34,
3021  35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
3022  44, 0, 45, 46, 47, 0, 48, 49, 0, 0,
3023  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3024  0, 0, 0, 0, 0, 0, 0, 50, 0, 0,
3025  51, 52, 0, 53, 54, 0, 55, 0, 0, 56,
3026  57, 58, 59, 60, 61, 62, 63, 64, 0, -645,
3027  0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
3028  7, 0, 9, 0, 0, 0, 10, 11, 65, 66,
3029  67, 12, 0, 13, 14, 15, 16, 17, 18, 19,
3030  -645, 0, 0, -645, 0, 20, 21, 22, 23, 24,
3031  25, 26, 0, 0, 204, 0, 0, 0, 0, 0,
3032  0, 29, 0, 0, 32, 33, 34, 35, 36, 37,
3033  38, 39, 40, 205, 41, 42, 43, 44, 0, 45,
3034  46, 47, 0, 48, 49, 0, 0, 0, 0, 0,
3035  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3036  0, 0, 0, 0, 206, 0, 0, 207, 52, 0,
3037  53, 54, 0, 208, 209, 210, 56, 57, 211, 59,
3038  60, 61, 62, 63, 64, 0, 0, 0, 0, 0,
3039  0, 0, 0, 0, 0, 5, 6, 7, 0, 9,
3040  0, 0, 0, 10, 11, 65, 212, 67, 12, 0,
3041  13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
3042  236, 0, 20, 21, 22, 23, 24, 25, 26, 0,
3043  0, 27, 0, 0, 0, 0, 0, 0, 29, 0,
3044  0, 32, 33, 34, 35, 36, 37, 38, 39, 40,
3045  0, 41, 42, 43, 44, 0, 45, 46, 47, 0,
3046  48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
3047  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3048  0, 206, 0, 0, 207, 52, 0, 53, 54, 0,
3049  0, 0, 0, 56, 57, 58, 59, 60, 61, 62,
3050  63, 64, 0, 0, 0, 0, 0, 0, 0, 0,
3051  0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
3052  10, 11, 65, 66, 67, 12, 0, 13, 14, 15,
3053  16, 17, 18, 19, 306, 0, 0, 307, 0, 20,
3054  21, 22, 23, 24, 25, 26, 0, 0, 27, 0,
3055  0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
3056  34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
3057  43, 44, 0, 45, 46, 47, 0, 48, 49, 0,
3058  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3059  0, 0, 0, 0, 0, 0, 0, 0, 206, 0,
3060  0, 207, 52, 0, 53, 54, 0, 0, 0, 0,
3061  56, 57, 58, 59, 60, 61, 62, 63, 64, 0,
3062  0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
3063  6, 7, 8, 9, 0, 0, 0, 10, 11, 65,
3064  66, 67, 12, 0, 13, 14, 15, 16, 17, 18,
3065  19, 0, 0, 0, 236, 0, 20, 21, 22, 23,
3066  24, 25, 26, 0, 0, 27, 0, 0, 0, 0,
3067  0, 28, 29, 30, 31, 32, 33, 34, 35, 36,
3068  37, 38, 39, 40, 0, 41, 42, 43, 44, 0,
3069  45, 46, 47, 0, 48, 49, 0, 0, 0, 0,
3070  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3071  0, 0, 0, 0, 0, 50, 0, 0, 51, 52,
3072  0, 53, 54, 0, 55, 0, 0, 56, 57, 58,
3073  59, 60, 61, 62, 63, 64, 0, 0, 0, 0,
3074  0, 0, 0, 0, 0, 0, 5, 6, 7, 8,
3075  9, 0, 0, 0, 10, 11, 65, 66, 67, 12,
3076  0, 13, 14, 15, 16, 17, 18, 19, 505, 0,
3077  0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
3078  0, 0, 27, 0, 0, 0, 0, 0, 28, 29,
3079  254, 31, 32, 33, 34, 35, 36, 37, 38, 39,
3080  40, 0, 41, 42, 43, 44, 0, 45, 46, 47,
3081  0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
3082  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3083  0, 0, 50, 0, 0, 51, 52, 0, 53, 54,
3084  0, 55, 0, 0, 56, 57, 58, 59, 60, 61,
3085  62, 63, 64, 0, 0, 0, 0, 0, 0, 0,
3086  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3087  0, 0, 0, 65, 66, 67, 0, 0, 0, 0,
3088  0, 0, 0, 0, 0, 505, 122, 123, 124, 125,
3089  126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
3090  136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
3091  0, 0, 0, 146, 147, 148, 392, 393, 394, 395,
3092  153, 154, 155, 0, 0, 0, 0, 0, 156, 157,
3093  158, 159, 396, 397, 398, 399, 164, 37, 38, 400,
3094  40, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3095  0, 166, 167, 168, 169, 170, 171, 172, 173, 174,
3096  0, 0, 175, 176, 0, 0, 177, 178, 179, 180,
3097  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3098  0, 181, 182, 0, 0, 0, 0, 0, 0, 0,
3099  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3100  0, 0, 0, 183, 184, 185, 186, 187, 188, 189,
3101  190, 191, 192, 0, 193, 194, 0, 0, 0, 0,
3102  0, 195, 401, 122, 123, 124, 125, 126, 127, 128,
3103  129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
3104  139, 140, 141, 142, 143, 144, 145, 0, 0, 0,
3105  146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
3106  0, 0, 0, 0, 0, 156, 157, 158, 159, 160,
3107  161, 162, 163, 164, 285, 286, 165, 287, 0, 0,
3108  0, 0, 0, 0, 0, 0, 0, 0, 166, 167,
3109  168, 169, 170, 171, 172, 173, 174, 0, 0, 175,
3110  176, 0, 0, 177, 178, 179, 180, 0, 0, 0,
3111  0, 0, 0, 0, 0, 0, 0, 0, 181, 182,
3112  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3113  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3114  183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
3115  0, 193, 194, 0, 0, 0, 0, 0, 195, 122,
3116  123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
3117  133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
3118  143, 144, 145, 0, 0, 0, 146, 147, 148, 149,
3119  150, 151, 152, 153, 154, 155, 0, 0, 0, 0,
3120  0, 156, 157, 158, 159, 160, 161, 162, 163, 164,
3121  238, 0, 165, 0, 0, 0, 0, 0, 0, 0,
3122  0, 0, 0, 0, 166, 167, 168, 169, 170, 171,
3123  172, 173, 174, 0, 0, 175, 176, 0, 0, 177,
3124  178, 179, 180, 0, 0, 0, 0, 0, 0, 0,
3125  0, 0, 0, 0, 181, 182, 0, 0, 57, 0,
3126  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3127  0, 0, 0, 0, 0, 0, 183, 184, 185, 186,
3128  187, 188, 189, 190, 191, 192, 0, 193, 194, 0,
3129  0, 0, 0, 0, 195, 122, 123, 124, 125, 126,
3130  127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
3131  137, 138, 139, 140, 141, 142, 143, 144, 145, 0,
3132  0, 0, 146, 147, 148, 149, 150, 151, 152, 153,
3133  154, 155, 0, 0, 0, 0, 0, 156, 157, 158,
3134  159, 160, 161, 162, 163, 164, 0, 0, 165, 0,
3135  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3136  166, 167, 168, 169, 170, 171, 172, 173, 174, 0,
3137  0, 175, 176, 0, 0, 177, 178, 179, 180, 0,
3138  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3139  181, 182, 0, 0, 57, 0, 0, 0, 0, 0,
3140  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3141  0, 0, 183, 184, 185, 186, 187, 188, 189, 190,
3142  191, 192, 0, 193, 194, 0, 0, 0, 0, 0,
3143  195, 122, 123, 124, 125, 126, 127, 128, 129, 130,
3144  131, 132, 133, 134, 135, 136, 137, 138, 139, 140,
3145  141, 142, 143, 144, 145, 0, 0, 0, 146, 147,
3146  148, 149, 150, 151, 152, 153, 154, 155, 0, 0,
3147  0, 0, 0, 156, 157, 158, 159, 160, 161, 162,
3148  163, 164, 0, 0, 165, 0, 0, 0, 0, 0,
3149  0, 0, 0, 0, 0, 0, 166, 167, 168, 169,
3150  170, 171, 172, 173, 174, 0, 0, 175, 176, 0,
3151  0, 177, 178, 179, 180, 0, 0, 0, 0, 0,
3152  0, 0, 0, 0, 0, 0, 181, 182, 0, 0,
3153  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3154  0, 0, 0, 0, 0, 0, 0, 0, 183, 184,
3155  185, 186, 187, 188, 189, 190, 191, 192, 0, 193,
3156  194, 5, 6, 7, 0, 9, 195, 0, 0, 10,
3157  11, 0, 0, 0, 12, 0, 13, 14, 15, 243,
3158  244, 18, 19, 0, 0, 0, 0, 0, 245, 246,
3159  247, 23, 24, 25, 26, 0, 0, 204, 0, 0,
3160  0, 0, 0, 0, 273, 0, 0, 32, 33, 34,
3161  35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
3162  44, 0, 45, 46, 47, 0, 0, 0, 0, 0,
3163  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3164  0, 0, 0, 0, 0, 0, 0, 274, 0, 0,
3165  207, 52, 0, 53, 54, 0, 0, 0, 0, 56,
3166  57, 58, 59, 60, 61, 62, 63, 64, 0, 0,
3167  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3168  0, 5, 6, 7, 0, 9, 0, 0, 275, 10,
3169  11, 0, 0, 0, 12, 276, 13, 14, 15, 243,
3170  244, 18, 19, 0, 0, 0, 0, 0, 245, 246,
3171  247, 23, 24, 25, 26, 0, 0, 204, 0, 0,
3172  0, 0, 0, 0, 273, 0, 0, 32, 33, 34,
3173  35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
3174  44, 0, 45, 46, 47, 0, 0, 0, 0, 0,
3175  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3176  0, 0, 0, 0, 0, 0, 0, 274, 0, 0,
3177  207, 52, 0, 53, 54, 0, 0, 0, 0, 56,
3178  57, 58, 59, 60, 61, 62, 63, 64, 0, 0,
3179  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3180  0, 5, 6, 7, 8, 9, 0, 0, 275, 10,
3181  11, 0, 0, 0, 12, 526, 13, 14, 15, 16,
3182  17, 18, 19, 0, 0, 0, 0, 0, 20, 21,
3183  22, 23, 24, 25, 26, 0, 0, 27, 0, 0,
3184  0, 0, 0, 28, 29, 30, 31, 32, 33, 34,
3185  35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
3186  44, 0, 45, 46, 47, 0, 48, 49, 0, 0,
3187  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3188  0, 0, 0, 0, 0, 0, 0, 50, 0, 0,
3189  51, 52, 0, 53, 54, 0, 55, 0, 0, 56,
3190  57, 58, 59, 60, 61, 62, 63, 64, 0, 0,
3191  0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
3192  7, 0, 9, 0, 0, 0, 10, 11, 65, 66,
3193  67, 12, 0, 13, 14, 15, 16, 17, 18, 19,
3194  0, 0, 0, 0, 0, 20, 21, 22, 23, 24,
3195  25, 26, 0, 0, 204, 0, 0, 0, 0, 0,
3196  0, 29, 0, 0, 32, 33, 34, 35, 36, 37,
3197  38, 39, 40, 205, 41, 42, 43, 44, 0, 45,
3198  46, 47, 0, 48, 49, 0, 0, 0, 0, 0,
3199  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3200  0, 0, 0, 0, 206, 0, 0, 207, 52, 0,
3201  53, 54, 0, 208, 209, 210, 56, 57, 211, 59,
3202  60, 61, 62, 63, 64, 0, 0, 0, 0, 0,
3203  0, 0, 0, 0, 0, 5, 6, 7, 8, 9,
3204  0, 0, 0, 10, 11, 65, 212, 67, 12, 0,
3205  13, 14, 15, 16, 17, 18, 19, 0, 0, 0,
3206  0, 0, 20, 21, 22, 23, 24, 25, 26, 0,
3207  0, 27, 0, 0, 0, 0, 0, 28, 29, 0,
3208  31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
3209  0, 41, 42, 43, 44, 0, 45, 46, 47, 0,
3210  48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
3211  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3212  0, 50, 0, 0, 51, 52, 0, 53, 54, 0,
3213  55, 0, 0, 56, 57, 58, 59, 60, 61, 62,
3214  63, 64, 0, 0, 0, 0, 0, 0, 0, 0,
3215  0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
3216  10, 11, 65, 66, 67, 12, 0, 13, 14, 15,
3217  243, 244, 18, 19, 0, 0, 0, 0, 0, 245,
3218  246, 247, 23, 24, 25, 26, 0, 0, 204, 0,
3219  0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
3220  34, 35, 36, 37, 38, 39, 40, 205, 41, 42,
3221  43, 44, 0, 45, 46, 47, 0, 48, 49, 0,
3222  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3223  0, 0, 0, 0, 0, 0, 0, 0, 206, 0,
3224  0, 207, 52, 0, 53, 54, 0, 619, 209, 210,
3225  56, 57, 211, 59, 60, 61, 62, 63, 64, 0,
3226  0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
3227  6, 7, 0, 9, 0, 0, 0, 10, 11, 65,
3228  212, 67, 12, 0, 13, 14, 15, 243, 244, 18,
3229  19, 0, 0, 0, 0, 0, 245, 246, 247, 23,
3230  24, 25, 26, 0, 0, 204, 0, 0, 0, 0,
3231  0, 0, 29, 0, 0, 32, 33, 34, 35, 36,
3232  37, 38, 39, 40, 205, 41, 42, 43, 44, 0,
3233  45, 46, 47, 0, 48, 49, 0, 0, 0, 0,
3234  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3235  0, 0, 0, 0, 0, 206, 0, 0, 207, 52,
3236  0, 53, 54, 0, 208, 209, 0, 56, 57, 211,
3237  59, 60, 61, 62, 63, 64, 0, 0, 0, 0,
3238  0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
3239  9, 0, 0, 0, 10, 11, 65, 212, 67, 12,
3240  0, 13, 14, 15, 243, 244, 18, 19, 0, 0,
3241  0, 0, 0, 245, 246, 247, 23, 24, 25, 26,
3242  0, 0, 204, 0, 0, 0, 0, 0, 0, 29,
3243  0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
3244  40, 205, 41, 42, 43, 44, 0, 45, 46, 47,
3245  0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
3246  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3247  0, 0, 206, 0, 0, 207, 52, 0, 53, 54,
3248  0, 0, 209, 210, 56, 57, 211, 59, 60, 61,
3249  62, 63, 64, 0, 0, 0, 0, 0, 0, 0,
3250  0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
3251  0, 10, 11, 65, 212, 67, 12, 0, 13, 14,
3252  15, 243, 244, 18, 19, 0, 0, 0, 0, 0,
3253  245, 246, 247, 23, 24, 25, 26, 0, 0, 204,
3254  0, 0, 0, 0, 0, 0, 29, 0, 0, 32,
3255  33, 34, 35, 36, 37, 38, 39, 40, 205, 41,
3256  42, 43, 44, 0, 45, 46, 47, 0, 48, 49,
3257  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3258  0, 0, 0, 0, 0, 0, 0, 0, 0, 206,
3259  0, 0, 207, 52, 0, 53, 54, 0, 619, 209,
3260  0, 56, 57, 211, 59, 60, 61, 62, 63, 64,
3261  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3262  5, 6, 7, 0, 9, 0, 0, 0, 10, 11,
3263  65, 212, 67, 12, 0, 13, 14, 15, 243, 244,
3264  18, 19, 0, 0, 0, 0, 0, 245, 246, 247,
3265  23, 24, 25, 26, 0, 0, 204, 0, 0, 0,
3266  0, 0, 0, 29, 0, 0, 32, 33, 34, 35,
3267  36, 37, 38, 39, 40, 205, 41, 42, 43, 44,
3268  0, 45, 46, 47, 0, 48, 49, 0, 0, 0,
3269  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3270  0, 0, 0, 0, 0, 0, 206, 0, 0, 207,
3271  52, 0, 53, 54, 0, 0, 209, 0, 56, 57,
3272  211, 59, 60, 61, 62, 63, 64, 0, 0, 0,
3273  0, 0, 0, 0, 0, 0, 0, 5, 6, 7,
3274  0, 9, 0, 0, 0, 10, 11, 65, 212, 67,
3275  12, 0, 13, 14, 15, 16, 17, 18, 19, 0,
3276  0, 0, 0, 0, 20, 21, 22, 23, 24, 25,
3277  26, 0, 0, 204, 0, 0, 0, 0, 0, 0,
3278  29, 0, 0, 32, 33, 34, 35, 36, 37, 38,
3279  39, 40, 0, 41, 42, 43, 44, 0, 45, 46,
3280  47, 0, 48, 49, 0, 0, 0, 0, 0, 0,
3281  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3282  0, 0, 0, 206, 0, 0, 207, 52, 0, 53,
3283  54, 0, 519, 0, 0, 56, 57, 58, 59, 60,
3284  61, 62, 63, 64, 0, 0, 0, 0, 0, 0,
3285  0, 0, 0, 0, 5, 6, 7, 0, 9, 0,
3286  0, 0, 10, 11, 65, 212, 67, 12, 0, 13,
3287  14, 15, 243, 244, 18, 19, 0, 0, 0, 0,
3288  0, 245, 246, 247, 23, 24, 25, 26, 0, 0,
3289  204, 0, 0, 0, 0, 0, 0, 29, 0, 0,
3290  32, 33, 34, 35, 36, 37, 38, 39, 40, 0,
3291  41, 42, 43, 44, 0, 45, 46, 47, 0, 48,
3292  49, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3293  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3294  206, 0, 0, 207, 52, 0, 53, 54, 0, 208,
3295  0, 0, 56, 57, 58, 59, 60, 61, 62, 63,
3296  64, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3297  0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
3298  11, 65, 212, 67, 12, 0, 13, 14, 15, 243,
3299  244, 18, 19, 0, 0, 0, 0, 0, 245, 246,
3300  247, 23, 24, 25, 26, 0, 0, 204, 0, 0,
3301  0, 0, 0, 0, 29, 0, 0, 32, 33, 34,
3302  35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
3303  44, 0, 45, 46, 47, 0, 48, 49, 0, 0,
3304  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3305  0, 0, 0, 0, 0, 0, 0, 206, 0, 0,
3306  207, 52, 0, 53, 54, 0, 815, 0, 0, 56,
3307  57, 58, 59, 60, 61, 62, 63, 64, 0, 0,
3308  0, 0, 0, 0, 0, 0, 0, 0, 5, 6,
3309  7, 0, 9, 0, 0, 0, 10, 11, 65, 212,
3310  67, 12, 0, 13, 14, 15, 243, 244, 18, 19,
3311  0, 0, 0, 0, 0, 245, 246, 247, 23, 24,
3312  25, 26, 0, 0, 204, 0, 0, 0, 0, 0,
3313  0, 29, 0, 0, 32, 33, 34, 35, 36, 37,
3314  38, 39, 40, 0, 41, 42, 43, 44, 0, 45,
3315  46, 47, 0, 48, 49, 0, 0, 0, 0, 0,
3316  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3317  0, 0, 0, 0, 206, 0, 0, 207, 52, 0,
3318  53, 54, 0, 519, 0, 0, 56, 57, 58, 59,
3319  60, 61, 62, 63, 64, 0, 0, 0, 0, 0,
3320  0, 0, 0, 0, 0, 5, 6, 7, 0, 9,
3321  0, 0, 0, 10, 11, 65, 212, 67, 12, 0,
3322  13, 14, 15, 243, 244, 18, 19, 0, 0, 0,
3323  0, 0, 245, 246, 247, 23, 24, 25, 26, 0,
3324  0, 204, 0, 0, 0, 0, 0, 0, 29, 0,
3325  0, 32, 33, 34, 35, 36, 37, 38, 39, 40,
3326  0, 41, 42, 43, 44, 0, 45, 46, 47, 0,
3327  48, 49, 0, 0, 0, 0, 0, 0, 0, 0,
3328  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3329  0, 206, 0, 0, 207, 52, 0, 53, 54, 0,
3330  619, 0, 0, 56, 57, 58, 59, 60, 61, 62,
3331  63, 64, 0, 0, 0, 0, 0, 0, 0, 0,
3332  0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
3333  10, 11, 65, 212, 67, 12, 0, 13, 14, 15,
3334  243, 244, 18, 19, 0, 0, 0, 0, 0, 245,
3335  246, 247, 23, 24, 25, 26, 0, 0, 204, 0,
3336  0, 0, 0, 0, 0, 29, 0, 0, 32, 33,
3337  34, 35, 36, 37, 38, 39, 40, 0, 41, 42,
3338  43, 44, 0, 45, 46, 47, 0, 48, 49, 0,
3339  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3340  0, 0, 0, 0, 0, 0, 0, 0, 206, 0,
3341  0, 207, 52, 0, 53, 54, 0, 0, 0, 0,
3342  56, 57, 58, 59, 60, 61, 62, 63, 64, 0,
3343  0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
3344  6, 7, 0, 9, 0, 0, 0, 10, 11, 65,
3345  212, 67, 12, 0, 13, 14, 15, 16, 17, 18,
3346  19, 0, 0, 0, 0, 0, 20, 21, 22, 23,
3347  24, 25, 26, 0, 0, 204, 0, 0, 0, 0,
3348  0, 0, 29, 0, 0, 32, 33, 34, 35, 36,
3349  37, 38, 39, 40, 0, 41, 42, 43, 44, 0,
3350  45, 46, 47, 0, 48, 49, 0, 0, 0, 0,
3351  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3352  0, 0, 0, 0, 0, 206, 0, 0, 207, 52,
3353  0, 53, 54, 0, 0, 0, 0, 56, 57, 58,
3354  59, 60, 61, 62, 63, 64, 0, 0, 0, 0,
3355  0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
3356  9, 0, 0, 0, 10, 11, 65, 212, 67, 12,
3357  0, 13, 14, 15, 16, 17, 18, 19, 0, 0,
3358  0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
3359  0, 0, 27, 0, 0, 0, 0, 0, 0, 29,
3360  0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
3361  40, 0, 41, 42, 43, 44, 0, 45, 46, 47,
3362  0, 48, 49, 0, 0, 0, 0, 0, 0, 0,
3363  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3364  0, 0, 206, 0, 0, 207, 52, 0, 53, 54,
3365  0, 0, 0, 0, 56, 57, 58, 59, 60, 61,
3366  62, 63, 64, 0, 0, 0, 0, 0, 0, 0,
3367  0, 0, 0, 5, 6, 7, 0, 9, 0, 0,
3368  0, 10, 11, 65, 66, 67, 12, 0, 13, 14,
3369  15, 243, 244, 18, 19, 0, 0, 0, 0, 0,
3370  245, 246, 247, 23, 24, 25, 26, 0, 0, 204,
3371  0, 0, 0, 0, 0, 0, 273, 0, 0, 32,
3372  33, 34, 35, 36, 37, 38, 39, 40, 0, 41,
3373  42, 43, 44, 0, 45, 46, 47, 0, 0, 0,
3374  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3375  0, 0, 0, 0, 0, 0, 0, 0, 0, 274,
3376  0, 0, 327, 52, 0, 53, 54, 0, 328, 0,
3377  0, 56, 57, 58, 59, 60, 61, 62, 63, 64,
3378  0, 0, 0, 0, 0, 0, 5, 6, 7, 0,
3379  9, 0, 0, 0, 10, 11, 0, 0, 0, 12,
3380  275, 13, 14, 15, 243, 244, 18, 19, 0, 0,
3381  0, 0, 0, 245, 246, 247, 23, 24, 25, 26,
3382  0, 0, 204, 0, 0, 0, 0, 0, 0, 273,
3383  0, 0, 32, 33, 34, 35, 36, 37, 38, 39,
3384  40, 0, 41, 42, 43, 44, 0, 45, 46, 47,
3385  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3386  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3387  0, 0, 373, 0, 0, 51, 52, 0, 53, 54,
3388  0, 55, 0, 0, 56, 57, 58, 59, 60, 61,
3389  62, 63, 64, 0, 0, 0, 0, 0, 0, 5,
3390  6, 7, 0, 9, 0, 0, 0, 10, 11, 0,
3391  0, 0, 12, 275, 13, 14, 15, 243, 244, 18,
3392  19, 0, 0, 0, 0, 0, 245, 246, 247, 23,
3393  24, 25, 26, 0, 0, 204, 0, 0, 0, 0,
3394  0, 0, 273, 0, 0, 32, 33, 34, 381, 36,
3395  37, 38, 382, 40, 0, 41, 42, 43, 44, 0,
3396  45, 46, 47, 0, 0, 0, 0, 0, 0, 0,
3397  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3398  0, 383, 0, 0, 0, 384, 0, 0, 207, 52,
3399  0, 53, 54, 0, 0, 0, 0, 56, 57, 58,
3400  59, 60, 61, 62, 63, 64, 0, 0, 0, 0,
3401  0, 0, 5, 6, 7, 0, 9, 0, 0, 0,
3402  10, 11, 0, 0, 0, 12, 275, 13, 14, 15,
3403  243, 244, 18, 19, 0, 0, 0, 0, 0, 245,
3404  246, 247, 23, 24, 25, 26, 0, 0, 204, 0,
3405  0, 0, 0, 0, 0, 273, 0, 0, 32, 33,
3406  34, 381, 36, 37, 38, 382, 40, 0, 41, 42,
3407  43, 44, 0, 45, 46, 47, 0, 0, 0, 0,
3408  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3409  0, 0, 0, 0, 0, 0, 0, 0, 384, 0,
3410  0, 207, 52, 0, 53, 54, 0, 0, 0, 0,
3411  56, 57, 58, 59, 60, 61, 62, 63, 64, 0,
3412  0, 0, 0, 0, 0, 5, 6, 7, 0, 9,
3413  0, 0, 0, 10, 11, 0, 0, 0, 12, 275,
3414  13, 14, 15, 243, 244, 18, 19, 0, 0, 0,
3415  0, 0, 245, 246, 247, 23, 24, 25, 26, 0,
3416  0, 204, 0, 0, 0, 0, 0, 0, 273, 0,
3417  0, 32, 33, 34, 35, 36, 37, 38, 39, 40,
3418  0, 41, 42, 43, 44, 0, 45, 46, 47, 0,
3419  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3420  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3421  0, 274, 0, 0, 327, 52, 0, 53, 54, 0,
3422  0, 0, 0, 56, 57, 58, 59, 60, 61, 62,
3423  63, 64, 0, 0, 0, 0, 0, 0, 5, 6,
3424  7, 0, 9, 0, 0, 0, 10, 11, 0, 0,
3425  0, 12, 275, 13, 14, 15, 243, 244, 18, 19,
3426  0, 0, 0, 0, 0, 245, 246, 247, 23, 24,
3427  25, 26, 0, 0, 204, 0, 0, 0, 0, 0,
3428  0, 273, 0, 0, 32, 33, 34, 35, 36, 37,
3429  38, 39, 40, 0, 41, 42, 43, 44, 0, 45,
3430  46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
3431  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3432  0, 0, 0, 0, 966, 0, 0, 207, 52, 0,
3433  53, 54, 0, 0, 0, 0, 56, 57, 58, 59,
3434  60, 61, 62, 63, 64, 0, 0, 0, 0, 0,
3435  0, 5, 6, 7, 0, 9, 0, 0, 0, 10,
3436  11, 0, 0, 0, 12, 275, 13, 14, 15, 243,
3437  244, 18, 19, 0, 0, 0, 0, 0, 245, 246,
3438  247, 23, 24, 25, 26, 0, 0, 204, 0, 0,
3439  0, 0, 0, 0, 273, 0, 0, 32, 33, 34,
3440  35, 36, 37, 38, 39, 40, 0, 41, 42, 43,
3441  44, 0, 45, 46, 47, 0, 0, 0, 0, 0,
3442  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3443  0, 0, 0, 0, 0, 0, 0, 1006, 0, 0,
3444  207, 52, 0, 53, 54, 0, 0, 0, 0, 56,
3445  57, 58, 59, 60, 61, 62, 63, 64, 0, 0,
3446  0, 0, 0, 571, 572, 0, 0, 573, 0, 0,
3447  0, 0, 0, 0, 0, 0, 0, 0, 275, 166,
3448  167, 168, 169, 170, 171, 172, 173, 174, 0, 0,
3449  175, 176, 0, 0, 177, 178, 179, 180, 0, 0,
3450  0, 0, 0, 0, 0, 0, 0, 0, 0, 181,
3451  182, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3452  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3453  0, 183, 184, 185, 186, 187, 188, 189, 190, 191,
3454  192, 0, 193, 194, 608, 572, 0, 0, 609, 195,
3455  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3456  166, 167, 168, 169, 170, 171, 172, 173, 174, 0,
3457  0, 175, 176, 0, 0, 177, 178, 179, 180, 0,
3458  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3459  181, 182, 0, 0, 0, 0, 0, 0, 0, 0,
3460  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3461  0, 0, 183, 184, 185, 186, 187, 188, 189, 190,
3462  191, 192, 0, 193, 194, 623, 564, 0, 0, 624,
3463  195, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3464  0, 166, 167, 168, 169, 170, 171, 172, 173, 174,
3465  0, 0, 175, 176, 0, 0, 177, 178, 179, 180,
3466  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3467  0, 181, 182, 0, 0, 0, 0, 0, 0, 0,
3468  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3469  0, 0, 0, 183, 184, 185, 186, 187, 188, 189,
3470  190, 191, 192, 0, 193, 194, 626, 572, 0, 0,
3471  627, 195, 0, 0, 0, 0, 0, 0, 0, 0,
3472  0, 0, 166, 167, 168, 169, 170, 171, 172, 173,
3473  174, 0, 0, 175, 176, 0, 0, 177, 178, 179,
3474  180, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3475  0, 0, 181, 182, 0, 0, 0, 0, 0, 0,
3476  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3477  0, 0, 0, 0, 183, 184, 185, 186, 187, 188,
3478  189, 190, 191, 192, 0, 193, 194, 650, 564, 0,
3479  0, 651, 195, 0, 0, 0, 0, 0, 0, 0,
3480  0, 0, 0, 166, 167, 168, 169, 170, 171, 172,
3481  173, 174, 0, 0, 175, 176, 0, 0, 177, 178,
3482  179, 180, 0, 0, 0, 0, 0, 0, 0, 0,
3483  0, 0, 0, 181, 182, 0, 0, 0, 0, 0,
3484  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3485  0, 0, 0, 0, 0, 183, 184, 185, 186, 187,
3486  188, 189, 190, 191, 192, 0, 193, 194, 653, 572,
3487  0, 0, 654, 195, 0, 0, 0, 0, 0, 0,
3488  0, 0, 0, 0, 166, 167, 168, 169, 170, 171,
3489  172, 173, 174, 0, 0, 175, 176, 0, 0, 177,
3490  178, 179, 180, 0, 0, 0, 0, 0, 0, 0,
3491  0, 0, 0, 0, 181, 182, 0, 0, 0, 0,
3492  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3493  0, 0, 0, 0, 0, 0, 183, 184, 185, 186,
3494  187, 188, 189, 190, 191, 192, 0, 193, 194, 741,
3495  564, 0, 0, 742, 195, 0, 0, 0, 0, 0,
3496  0, 0, 0, 0, 0, 166, 167, 168, 169, 170,
3497  171, 172, 173, 174, 0, 0, 175, 176, 0, 0,
3498  177, 178, 179, 180, 0, 0, 0, 0, 0, 0,
3499  0, 0, 0, 0, 0, 181, 182, 0, 0, 0,
3500  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3501  0, 0, 0, 0, 0, 0, 0, 183, 184, 185,
3502  186, 187, 188, 189, 190, 191, 192, 0, 193, 194,
3503  744, 572, 0, 0, 745, 195, 0, 0, 0, 0,
3504  0, 0, 0, 0, 0, 0, 166, 167, 168, 169,
3505  170, 171, 172, 173, 174, 0, 0, 175, 176, 0,
3506  0, 177, 178, 179, 180, 0, 0, 0, 0, 0,
3507  0, 0, 0, 0, 0, 0, 181, 182, 0, 0,
3508  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3509  0, 0, 0, 0, 0, 0, 0, 0, 183, 184,
3510  185, 186, 187, 188, 189, 190, 191, 192, 0, 193,
3511  194, 750, 564, 0, 0, 751, 195, 0, 0, 0,
3512  0, 0, 0, 0, 0, 0, 0, 166, 167, 168,
3513  169, 170, 171, 172, 173, 174, 0, 0, 175, 176,
3514  0, 0, 177, 178, 179, 180, 0, 0, 0, 0,
3515  0, 0, 0, 0, 0, 0, 0, 181, 182, 0,
3516  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3517  0, 0, 0, 0, 0, 0, 0, 0, 0, 183,
3518  184, 185, 186, 187, 188, 189, 190, 191, 192, 0,
3519  193, 194, 820, 564, 0, 0, 821, 195, 0, 0,
3520  0, 0, 0, 0, 0, 0, 0, 0, 166, 167,
3521  168, 169, 170, 171, 172, 173, 174, 0, 0, 175,
3522  176, 0, 0, 177, 178, 179, 180, 0, 0, 0,
3523  0, 0, 0, 0, 0, 0, 0, 0, 181, 182,
3524  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3525  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3526  183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
3527  0, 193, 194, 823, 572, 0, 0, 824, 195, 0,
3528  0, 0, 0, 0, 0, 0, 0, 0, 0, 166,
3529  167, 168, 169, 170, 171, 172, 173, 174, 0, 0,
3530  175, 176, 0, 0, 177, 178, 179, 180, 0, 0,
3531  0, 0, 0, 0, 0, 0, 0, 0, 0, 181,
3532  182, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3533  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3534  0, 183, 184, 185, 186, 187, 188, 189, 190, 191,
3535  192, 0, 193, 194, 1048, 564, 0, 0, 1049, 195,
3536  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3537  166, 167, 168, 169, 170, 171, 172, 173, 174, 0,
3538  0, 175, 176, 0, 0, 177, 178, 179, 180, 0,
3539  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3540  181, 182, 0, 0, 0, 0, 0, 0, 0, 0,
3541  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3542  0, 0, 183, 184, 185, 186, 187, 188, 189, 190,
3543  191, 192, 0, 193, 194, 1051, 572, 0, 0, 1052,
3544  195, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3545  0, 166, 167, 168, 169, 170, 171, 172, 173, 174,
3546  0, 0, 175, 176, 0, 0, 177, 178, 179, 180,
3547  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3548  0, 181, 182, 0, 0, 0, 0, 0, 0, 0,
3549  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3550  0, 0, 0, 183, 184, 185, 186, 187, 188, 189,
3551  190, 191, 192, 0, 193, 194, 1065, 564, 0, 0,
3552  1066, 195, 0, 0, 0, 0, 0, 0, 0, 0,
3553  0, 0, 166, 167, 168, 169, 170, 171, 172, 173,
3554  174, 0, 0, 175, 176, 0, 0, 177, 178, 179,
3555  180, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3556  0, 0, 181, 182, 331, 332, 333, 334, 335, 336,
3557  337, 338, 339, 340, 341, 342, 343, 0, 0, 344,
3558  345, 0, 0, 0, 183, 184, 185, 186, 187, 188,
3559  189, 190, 191, 192, 0, 193, 194, 0, 0, 0,
3560  0, 0, 195, 0, 0, 0, 0, 0, 0, 0,
3561  0, 0, 346, 0, 347, 348, 349, 350, 351, 352,
3562  353, 354, 355, 356, 0, 0, 0, 0, 0, 0,
3563  0, 0, 0, 0, 0, 0, 0, 0, 0, 236
3564 };
3565 
3566 static const yytype_int16 yycheck[] =
3567 {
3568  2, 99, 27, 69, 29, 81, 87, 66, 57, 76,
3569  8, 16, 17, 22, 8, 20, 28, 98, 367, 225,
3570  480, 16, 17, 55, 51, 20, 330, 93, 89, 90,
3571  28, 267, 93, 429, 28, 271, 410, 411, 90, 361,
3572  8, 93, 585, 4, 476, 625, 421, 480, 97, 81,
3573  93, 53, 54, 584, 429, 55, 797, 65, 53, 2,
3574  28, 4, 94, 95, 96, 384, 51, 76, 877, 449,
3575  875, 467, 652, 16, 17, 936, 235, 20, 360, 668,
3576  681, 363, 788, 2, 25, 4, 255, 729, 0, 57,
3577  25, 733, 88, 26, 526, 69, 78, 29, 16, 17,
3578  25, 260, 20, 425, 263, 16, 17, 330, 51, 20,
3579  26, 897, 55, 788, 13, 88, 137, 25, 58, 88,
3580  56, 25, 797, 66, 145, 407, 137, 932, 1011, 97,
3581  70, 145, 26, 100, 145, 53, 54, 25, 81, 220,
3582  122, 90, 424, 63, 426, 117, 89, 90, 144, 28,
3583  93, 94, 95, 96, 87, 88, 478, 124, 327, 99,
3584  100, 13, 143, 743, 1025, 137, 952, 27, 117, 250,
3585  452, 144, 25, 753, 235, 144, 237, 986, 1061, 25,
3586  207, 248, 114, 988, 124, 88, 139, 410, 411, 25,
3587  602, 257, 145, 113, 37, 38, 137, 479, 279, 940,
3588  276, 134, 137, 136, 139, 291, 139, 293, 668, 295,
3589  134, 144, 137, 299, 257, 242, 117, 219, 134, 1024,
3590  143, 13, 897, 225, 229, 117, 231, 232, 255, 137,
3591  232, 13, 438, 137, 229, 668, 231, 633, 137, 945,
3592  134, 144, 822, 142, 276, 139, 145, 13, 273, 137,
3593  311, 312, 313, 314, 143, 316, 317, 632, 633, 311,
3594  312, 313, 314, 643, 207, 940, 325, 275, 590, 13,
3595  255, 330, 431, 13, 706, 864, 435, 866, 600, 921,
3596  599, 440, 142, 257, 137, 145, 229, 888, 231, 232,
3597  142, 137, 235, 145, 237, 376, 328, 456, 1004, 242,
3598  327, 137, 145, 139, 370, 143, 137, 368, 369, 591,
3599  253, 229, 255, 231, 145, 63, 368, 369, 229, 601,
3600  231, 264, 383, 15, 137, 17, 857, 370, 328, 1004,
3601  325, 13, 418, 276, 253, 330, 1011, 749, 140, 717,
3602  714, 715, 327, 145, 103, 264, 724, 721, 722, 310,
3603  142, 410, 411, 145, 88, 788, 361, 958, 959, 361,
3604  142, 13, 1068, 145, 797, 113, 525, 310, 311, 312,
3605  313, 314, 315, 316, 317, 90, 142, 137, 921, 145,
3606  13, 13, 325, 139, 327, 328, 1061, 330, 56, 711,
3607  739, 310, 87, 88, 63, 363, 315, 117, 142, 139,
3608  476, 145, 142, 91, 864, 145, 866, 493, 52, 25,
3609  144, 647, 56, 137, 500, 88, 622, 139, 361, 587,
3610  425, 364, 70, 425, 728, 368, 369, 88, 710, 137,
3611  712, 864, 88, 866, 446, 437, 438, 37, 38, 407,
3612  383, 110, 1043, 112, 476, 90, 858, 449, 446, 144,
3613  526, 662, 446, 865, 14, 15, 537, 139, 426, 833,
3614  142, 90, 25, 145, 897, 87, 88, 410, 411, 25,
3615  1050, 144, 117, 478, 143, 871, 478, 90, 446, 127,
3616  128, 129, 425, 144, 452, 708, 898, 646, 144, 26,
3617  142, 714, 715, 145, 526, 134, 871, 139, 721, 722,
3618  567, 117, 88, 421, 117, 90, 449, 940, 575, 142,
3619  142, 479, 145, 145, 136, 63, 459, 583, 584, 67,
3620  25, 137, 144, 139, 140, 142, 70, 552, 145, 145,
3621  449, 88, 117, 476, 52, 478, 54, 55, 56, 57,
3622  139, 117, 603, 610, 140, 570, 464, 75, 76, 141,
3623  87, 88, 137, 580, 117, 582, 63, 135, 144, 568,
3624  909, 117, 110, 90, 112, 771, 915, 576, 779, 780,
3625  738, 1004, 648, 985, 137, 636, 578, 140, 1011, 90,
3626  56, 137, 145, 526, 140, 590, 754, 144, 590, 145,
3627  117, 586, 120, 121, 90, 600, 755, 134, 600, 136,
3628  625, 610, 139, 110, 616, 112, 117, 144, 610, 113,
3629  833, 90, 117, 772, 70, 137, 648, 90, 616, 137,
3630  622, 117, 616, 591, 783, 410, 411, 652, 1061, 26,
3631  706, 113, 137, 601, 70, 140, 143, 580, 117, 582,
3632  145, 643, 427, 428, 117, 113, 791, 590, 616, 708,
3633  795, 718, 113, 87, 88, 714, 715, 600, 725, 602,
3634  603, 759, 721, 722, 875, 97, 877, 137, 453, 125,
3635  126, 127, 128, 129, 706, 17, 90, 679, 142, 681,
3636  848, 747, 850, 87, 88, 746, 56, 748, 25, 90,
3637  87, 88, 860, 636, 746, 1017, 748, 87, 88, 121,
3638  643, 54, 136, 117, 137, 648, 711, 90, 757, 711,
3639  144, 90, 65, 66, 632, 874, 117, 140, 743, 137,
3640  135, 932, 933, 725, 643, 134, 728, 729, 753, 731,
3641  137, 733, 136, 728, 117, 139, 1018, 134, 117, 136,
3642  144, 137, 139, 90, 712, 143, 136, 144, 143, 137,
3643  918, 919, 897, 137, 144, 923, 137, 44, 137, 927,
3644  785, 117, 63, 706, 707, 708, 139, 926, 711, 771,
3645  117, 714, 715, 10, 833, 986, 8, 988, 721, 722,
3646  87, 88, 13, 16, 17, 135, 847, 20, 707, 757,
3647  137, 857, 63, 859, 791, 847, 52, 822, 54, 55,
3648  56, 57, 117, 746, 90, 748, 749, 137, 810, 110,
3649  812, 112, 113, 1024, 115, 48, 49, 844, 87, 88,
3650  53, 54, 87, 88, 851, 852, 994, 137, 855, 136,
3651  52, 117, 137, 66, 67, 137, 683, 144, 685, 110,
3652  842, 112, 113, 845, 52, 87, 88, 137, 10, 87,
3653  88, 137, 52, 1021, 1022, 59, 60, 61, 62, 1004,
3654  135, 10, 928, 1008, 137, 119, 1011, 136, 1013, 141,
3655  90, 136, 897, 15, 901, 144, 908, 87, 88, 144,
3656  139, 137, 87, 88, 137, 912, 888, 968, 135, 137,
3657  833, 135, 87, 88, 136, 87, 88, 117, 136, 9,
3658  897, 844, 144, 137, 847, 70, 144, 91, 851, 852,
3659  937, 938, 855, 137, 140, 858, 1061, 137, 1063, 921,
3660  85, 86, 865, 1068, 956, 1070, 136, 952, 142, 714,
3661  715, 136, 122, 56, 144, 1080, 721, 722, 137, 144,
3662  2, 136, 4, 137, 136, 972, 137, 974, 137, 144,
3663  137, 137, 144, 980, 63, 898, 958, 959, 901, 124,
3664  125, 126, 127, 128, 129, 908, 991, 117, 137, 912,
3665  897, 1003, 205, 1000, 63, 208, 209, 210, 137, 212,
3666  137, 766, 767, 90, 769, 770, 137, 87, 88, 51,
3667  137, 135, 137, 55, 937, 938, 229, 122, 231, 232,
3668  56, 110, 137, 112, 113, 87, 88, 1004, 111, 137,
3669  117, 1008, 1017, 956, 1011, 1017, 1013, 1019, 1020, 81,
3670  63, 110, 137, 112, 113, 1050, 137, 139, 459, 972,
3671  137, 974, 94, 95, 96, 139, 136, 980, 885, 886,
3672  63, 1043, 985, 890, 144, 892, 137, 894, 833, 90,
3673  1018, 96, 961, 962, 136, 94, 797, 1000, 85, 800,
3674  1003, 725, 144, 1020, 1061, 779, 1063, 110, 897, 112,
3675  113, 1068, 700, 1070, 1017, 812, 117, 1004, 1025, 760,
3676  518, 1008, 1019, 1080, 1011, 870, 1013, 110, 102, 112,
3677  113, 211, 325, 299, 59, 97, 137, 330, 331, 332,
3678  333, 334, 335, 929, 791, 338, 339, 340, 341, 342,
3679  343, 344, 345, 346, 1004, 1008, 349, 350, 351, 352,
3680  353, 354, 355, 356, 357, 358, 788, -1, 361, 1038,
3681  1039, -1, -1, -1, 1061, 1044, 1063, 1046, 1047, -1,
3682  -1, 1068, -1, 1070, -1, 207, -1, -1, -1, 996,
3683  997, 998, 999, 1080, -1, -1, 897, -1, -1, -1,
3684  52, -1, 54, 55, 56, 57, 1075, 1076, 1077, 1078,
3685  40, 41, 42, 43, 44, 1084, -1, 410, 411, -1,
3686  242, -1, 70, 2, -1, 4, 419, 420, 421, 54,
3687  -1, 253, 425, 255, 427, 428, 429, 85, 86, 940,
3688  92, 942, 264, -1, -1, -1, 947, 54, 55, -1,
3689  57, -1, 1059, -1, 276, 448, -1, -1, 65, 66,
3690  453, 52, -1, 54, 55, 56, 57, -1, -1, -1,
3691  -1, 464, 51, -1, 467, -1, 55, 125, 126, 127,
3692  128, 129, -1, -1, -1, 478, -1, 52, 310, 54,
3693  55, 56, 57, 315, -1, -1, -1, -1, 70, -1,
3694  -1, 92, 81, -1, -1, 327, 328, 98, 330, -1,
3695  1011, 504, 1013, 85, 86, 94, 95, 96, 97, 52,
3696  -1, 54, 55, 56, 57, 58, 519, -1, 52, 1030,
3697  54, 55, 56, 57, 58, -1, -1, 70, -1, -1,
3698  -1, -1, 364, -1, -1, -1, 70, -1, -1, -1,
3699  122, 123, 124, 125, 126, 127, 128, 129, -1, 92,
3700  1061, -1, 1063, -1, -1, -1, 99, 100, 92, 1070,
3701  -1, -1, -1, -1, 98, 99, 100, -1, -1, 1080,
3702  205, -1, -1, 208, 209, 210, -1, -1, 410, 411,
3703  -1, 124, -1, 586, 2, -1, 4, 590, -1, -1,
3704  124, -1, -1, 127, -1, -1, 52, 600, 54, 55,
3705  56, 57, -1, -1, -1, -1, -1, -1, -1, -1,
3706  -1, 145, -1, -1, 617, -1, 619, 449, 207, -1,
3707  -1, -1, -1, -1, -1, -1, -1, 459, -1, 632,
3708  633, -1, -1, 51, -1, -1, 92, 55, -1, -1,
3709  -1, -1, 98, -1, 476, -1, -1, -1, -1, -1,
3710  -1, -1, -1, 242, -1, -1, -1, -1, -1, -1,
3711  -1, -1, -1, 81, 253, -1, 255, -1, -1, -1,
3712  -1, -1, -1, -1, 677, 264, 94, 95, 96, 97,
3713  -1, 2, -1, 4, -1, -1, -1, 276, -1, -1,
3714  325, -1, -1, -1, 526, 330, -1, -1, -1, -1,
3715  703, -1, -1, -1, -1, 708, 709, -1, 711, -1,
3716  -1, 714, 715, -1, -1, -1, -1, -1, 721, 722,
3717  -1, 310, -1, -1, -1, 728, 315, -1, -1, -1,
3718  51, -1, -1, -1, -1, -1, -1, -1, 327, 328,
3719  -1, -1, -1, -1, -1, -1, -1, -1, 580, -1,
3720  582, 52, -1, 54, 55, 56, 57, 58, -1, -1,
3721  -1, -1, -1, 766, 767, -1, 769, 770, -1, 70,
3722  602, -1, -1, 94, -1, 364, -1, -1, -1, -1,
3723  -1, -1, -1, -1, 787, 420, 421, -1, -1, 207,
3724  -1, 92, -1, -1, 429, -1, -1, 98, 99, 100,
3725  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3726  -1, 643, 815, -1, -1, -1, 648, -1, -1, -1,
3727  -1, -1, 825, 124, 242, -1, 127, -1, -1, 464,
3728  833, -1, 467, -1, -1, 253, -1, 255, 139, -1,
3729  -1, -1, -1, -1, -1, -1, 264, -1, -1, -1,
3730  -1, 854, -1, -1, -1, -1, -1, 689, 276, -1,
3731  449, -1, -1, -1, -1, -1, -1, 870, 871, -1,
3732  459, -1, -1, -1, 706, 707, 708, -1, -1, -1,
3733  -1, -1, 714, 715, 519, -1, 207, 476, -1, 721,
3734  722, -1, 310, -1, -1, -1, -1, 315, -1, -1,
3735  -1, 52, -1, 54, 55, 56, 57, 58, -1, 327,
3736  328, -1, -1, -1, -1, -1, -1, 749, -1, 70,
3737  -1, 242, -1, -1, -1, 2, -1, 4, -1, -1,
3738  -1, -1, 253, -1, 255, -1, -1, 526, -1, -1,
3739  -1, 92, -1, 264, -1, -1, 364, 98, 99, 100,
3740  -1, 586, -1, -1, -1, -1, -1, -1, -1, -1,
3741  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3742  -1, -1, -1, 124, 51, -1, 127, -1, -1, -1,
3743  -1, -1, 617, -1, 619, -1, -1, -1, -1, 310,
3744  -1, 580, -1, 582, 315, -1, -1, 632, 633, -1,
3745  -1, 833, -1, -1, -1, -1, 327, -1, -1, 330,
3746  -1, -1, 844, 602, 1017, -1, -1, -1, -1, 851,
3747  852, -1, -1, 855, -1, -1, 858, -1, -1, -1,
3748  -1, 449, -1, 865, -1, -1, -1, -1, -1, -1,
3749  -1, 459, 677, 364, -1, -1, -1, -1, -1, -1,
3750  -1, -1, -1, -1, 643, -1, -1, -1, 476, 648,
3751  -1, -1, -1, -1, -1, -1, 898, -1, 703, 901,
3752  -1, -1, -1, -1, -1, -1, 908, -1, -1, -1,
3753  912, -1, -1, -1, -1, -1, -1, -1, -1, 410,
3754  411, -1, -1, 728, -1, -1, -1, -1, -1, -1,
3755  -1, -1, -1, -1, -1, 937, 938, -1, 526, -1,
3756  -1, -1, -1, -1, -1, -1, -1, 706, 707, -1,
3757  -1, -1, -1, -1, 956, -1, -1, -1, 449, -1,
3758  207, -1, -1, -1, -1, -1, -1, -1, 459, -1,
3759  972, -1, 974, -1, -1, -1, -1, -1, 980, -1,
3760  -1, -1, 787, 985, -1, -1, -1, -1, -1, -1,
3761  749, -1, 580, 44, 582, 242, -1, -1, 1000, -1,
3762  -1, 1003, -1, -1, -1, -1, 253, -1, 255, -1,
3763  815, -1, -1, -1, 602, -1, -1, 264, -1, 70,
3764  71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3765  81, 82, -1, -1, 85, 86, -1, -1, -1, -1,
3766  -1, -1, -1, -1, -1, -1, -1, -1, -1, 854,
3767  -1, -1, -1, -1, -1, 643, -1, -1, -1, -1,
3768  648, -1, -1, 310, -1, -1, 871, 118, 315, 120,
3769  121, 122, 123, 124, 125, 126, 127, 128, 129, -1,
3770  327, -1, -1, 330, -1, 844, 137, -1, -1, 580,
3771  -1, 582, 851, 852, -1, -1, 855, -1, -1, 858,
3772  -1, -1, -1, -1, -1, -1, 865, -1, -1, -1,
3773  -1, 602, -1, -1, -1, -1, -1, 364, 706, 707,
3774  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3775  -1, -1, -1, -1, -1, -1, -1, -1, -1, 898,
3776  -1, -1, 901, -1, -1, -1, -1, -1, -1, 908,
3777  -1, -1, 643, 912, -1, -1, -1, -1, -1, -1,
3778  -1, 749, -1, 410, 411, -1, -1, 0, -1, -1,
3779  -1, -1, -1, -1, -1, 8, 9, 10, 937, 938,
3780  13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
3781  -1, -1, -1, 26, 27, -1, -1, 956, -1, -1,
3782  -1, -1, 449, -1, 37, 38, -1, 40, 41, 42,
3783  43, 44, 459, 972, -1, 974, 707, 708, -1, -1,
3784  -1, 980, -1, 714, 715, -1, 985, -1, -1, -1,
3785  721, 722, -1, -1, -1, -1, -1, -1, -1, -1,
3786  -1, 1000, 48, 49, 1003, -1, -1, 53, 54, 55,
3787  -1, -1, -1, -1, 87, 88, 844, -1, 749, -1,
3788  -1, 67, -1, 851, 852, -1, -1, 855, -1, -1,
3789  858, -1, -1, -1, -1, 81, -1, 865, 111, -1,
3790  -1, -1, -1, -1, -1, -1, -1, -1, 94, 95,
3791  96, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3792  -1, 134, 135, -1, -1, -1, 139, 140, -1, 142,
3793  898, 144, 145, 901, -1, -1, -1, -1, -1, -1,
3794  908, -1, -1, -1, 912, -1, -1, -1, -1, -1,
3795  -1, -1, -1, 580, -1, 582, -1, -1, -1, -1,
3796  -1, -1, 833, -1, -1, -1, -1, -1, -1, 937,
3797  938, -1, -1, 844, -1, 602, -1, -1, -1, -1,
3798  851, 852, -1, -1, 855, -1, -1, 858, 956, -1,
3799  -1, -1, -1, -1, 865, -1, -1, -1, -1, -1,
3800  -1, -1, -1, -1, 972, -1, 974, -1, -1, -1,
3801  -1, -1, 980, -1, -1, -1, 643, 985, -1, 205,
3802  -1, -1, 208, 209, 210, -1, 212, 898, -1, -1,
3803  901, -1, 1000, -1, -1, 1003, -1, 908, -1, -1,
3804  -1, 912, -1, -1, -1, -1, -1, -1, -1, -1,
3805  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3806  -1, -1, -1, -1, -1, -1, 937, 938, -1, -1,
3807  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3808  707, 708, -1, -1, -1, -1, -1, 714, 715, -1,
3809  276, -1, -1, -1, 721, 722, -1, -1, -1, -1,
3810  -1, 972, -1, 974, -1, -1, -1, -1, -1, 980,
3811  -1, -1, -1, -1, 985, -1, -1, -1, -1, -1,
3812  -1, -1, 749, -1, -1, -1, -1, -1, -1, 1000,
3813  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3814  -1, -1, 328, -1, -1, 331, 332, 333, 334, 335,
3815  -1, -1, 338, 339, 340, 341, 342, 343, 344, 345,
3816  346, -1, -1, 349, 350, 351, 352, 353, 354, 355,
3817  356, 357, 358, -1, -1, -1, -1, -1, -1, -1,
3818  52, 53, -1, -1, 56, -1, -1, -1, -1, -1,
3819  -1, -1, -1, -1, -1, -1, 68, 69, 70, 71,
3820  72, 73, 74, 75, 76, -1, 833, 79, 80, -1,
3821  -1, 83, 84, 85, 86, -1, -1, 844, -1, -1,
3822  -1, -1, -1, -1, 851, 852, 98, 99, 855, -1,
3823  -1, 858, -1, 419, 420, 421, -1, -1, 865, -1,
3824  -1, 427, 428, 429, -1, -1, -1, -1, 120, 121,
3825  122, 123, 124, 125, 126, 127, 128, 129, -1, 131,
3826  132, -1, 448, -1, -1, -1, 138, 453, -1, -1,
3827  -1, 898, -1, -1, 901, -1, -1, -1, 464, -1,
3828  -1, 467, -1, -1, -1, 912, -1, -1, -1, -1,
3829  476, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3830  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3831  937, 938, -1, -1, -1, -1, -1, -1, 504, -1,
3832  -1, -1, -1, -1, -1, -1, 70, 71, 72, 73,
3833  74, 75, 76, 519, -1, 79, 80, -1, -1, -1,
3834  526, 85, 86, -1, -1, 972, -1, 974, -1, -1,
3835  -1, -1, -1, 980, -1, -1, -1, -1, 985, -1,
3836  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3837  -1, -1, -1, 1000, -1, -1, 120, 121, 122, 123,
3838  124, 125, 126, 127, 128, 129, -1, -1, -1, -1,
3839  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3840  586, -1, -1, -1, 0, 1, -1, 3, 4, 5,
3841  6, 7, -1, -1, -1, 11, 12, -1, -1, -1,
3842  16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
3843  -1, 617, -1, 619, 30, 31, 32, 33, 34, 35,
3844  36, -1, -1, 39, -1, -1, 632, 633, -1, 45,
3845  46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
3846  56, 57, 648, 59, 60, 61, 62, -1, 64, 65,
3847  66, -1, 68, 69, -1, -1, -1, -1, -1, -1,
3848  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3849  -1, 677, -1, 89, -1, -1, 92, 93, -1, 95,
3850  96, -1, 98, -1, -1, 101, 102, 103, 104, 105,
3851  106, 107, 108, 109, -1, -1, -1, 703, -1, -1,
3852  706, -1, -1, 709, -1, -1, -1, -1, -1, -1,
3853  -1, -1, -1, -1, 130, 131, 132, -1, -1, -1,
3854  -1, -1, 728, -1, -1, -1, 142, -1, -1, 145,
3855  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3856  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3857  -1, -1, -1, -1, -1, -1, -1, -1, -1, 0,
3858  766, 767, -1, 769, 770, -1, -1, 8, 9, 10,
3859  -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
3860  -1, 787, -1, -1, -1, 26, 27, 28, 29, -1,
3861  -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
3862  41, 42, 43, 44, -1, -1, -1, -1, -1, 815,
3863  -1, -1, -1, -1, -1, -1, -1, -1, -1, 825,
3864  -1, -1, -1, -1, -1, -1, -1, -1, -1, 70,
3865  71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3866  81, 82, -1, -1, 85, 86, 87, 88, 854, 90,
3867  91, -1, -1, -1, -1, -1, 97, -1, -1, -1,
3868  -1, -1, -1, -1, 870, 871, -1, -1, -1, -1,
3869  111, -1, -1, 114, -1, -1, 117, 118, 119, 120,
3870  121, 122, 123, 124, 125, 126, 127, 128, 129, -1,
3871  -1, -1, -1, 134, 135, 136, 137, 0, -1, 140,
3872  141, 142, 908, 144, 145, 8, 9, 10, -1, -1,
3873  13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
3874  -1, -1, 25, -1, 27, 28, 29, -1, -1, -1,
3875  -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
3876  43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
3877  956, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3878  -1, -1, -1, -1, -1, -1, -1, 70, 71, 72,
3879  73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
3880  -1, -1, 85, 86, 87, 88, -1, 90, 91, -1,
3881  -1, -1, -1, -1, 97, -1, -1, 1003, -1, -1,
3882  -1, -1, -1, -1, -1, -1, -1, -1, 111, -1,
3883  -1, 114, -1, -1, 117, 118, 119, 120, 121, 122,
3884  123, 124, 125, 126, 127, 128, 129, -1, -1, -1,
3885  -1, -1, 135, 136, 137, 0, -1, 140, 141, 142,
3886  -1, 144, 145, 8, 9, 10, -1, -1, 13, 14,
3887  15, -1, 17, -1, -1, -1, -1, 44, -1, -1,
3888  25, -1, 27, 28, 29, -1, -1, -1, -1, -1,
3889  -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
3890  -1, -1, -1, 70, 71, 72, 73, 74, 75, 76,
3891  77, 78, 79, 80, 81, 82, -1, -1, 85, 86,
3892  -1, -1, -1, -1, -1, 70, 71, 72, 73, 74,
3893  75, 76, 77, 78, 79, 80, 81, 82, -1, -1,
3894  85, 86, 87, 88, -1, 90, 91, -1, -1, -1,
3895  -1, 118, 97, 120, 121, 122, 123, 124, 125, 126,
3896  127, 128, 129, -1, -1, -1, 111, -1, -1, 114,
3897  -1, -1, 117, 118, 119, 120, 121, 122, 123, 124,
3898  125, 126, 127, 128, 129, -1, -1, -1, -1, -1,
3899  135, 136, 137, 0, -1, 140, 141, 142, -1, 144,
3900  145, 8, 9, 10, -1, -1, 13, 14, 15, -1,
3901  17, -1, -1, -1, -1, -1, -1, -1, -1, 26,
3902  27, 28, 29, -1, -1, -1, -1, -1, -1, -1,
3903  37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
3904  -1, 70, 71, 72, 73, 74, 75, 76, 77, 78,
3905  79, 80, 81, 82, -1, -1, 85, 86, -1, -1,
3906  -1, -1, -1, 70, 71, 72, 73, 74, 75, 76,
3907  77, 78, 79, 80, 81, 82, -1, -1, 85, 86,
3908  87, 88, -1, -1, 91, -1, -1, -1, -1, 118,
3909  97, 120, 121, 122, 123, 124, 125, 126, 127, 128,
3910  129, -1, -1, -1, 111, -1, -1, 114, -1, -1,
3911  -1, 118, 119, 120, 121, 122, 123, 124, 125, 126,
3912  127, 128, 129, -1, -1, -1, -1, 134, 135, 136,
3913  137, 0, -1, 140, 141, 142, -1, 144, 145, 8,
3914  9, 10, -1, -1, 13, 14, 15, -1, 17, -1,
3915  -1, -1, -1, -1, -1, -1, -1, 26, 27, 28,
3916  29, -1, -1, -1, -1, -1, -1, -1, 37, 38,
3917  -1, 40, 41, 42, 43, 44, -1, -1, -1, 70,
3918  71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3919  81, 82, -1, -1, 85, 86, -1, -1, -1, -1,
3920  -1, 70, 71, 72, 73, 74, 75, 76, 77, 78,
3921  79, 80, 81, 82, -1, -1, 85, 86, 87, 88,
3922  -1, -1, 91, -1, -1, -1, -1, -1, 97, 120,
3923  121, 122, 123, 124, 125, 126, 127, 128, 129, -1,
3924  -1, -1, 111, -1, -1, 114, -1, -1, -1, 118,
3925  119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
3926  129, -1, -1, -1, -1, 134, 135, 136, 137, 0,
3927  -1, 140, 141, 142, -1, 144, 145, 8, 9, 10,
3928  -1, -1, 13, 14, 15, -1, 17, -1, -1, -1,
3929  -1, -1, -1, -1, -1, -1, 27, 28, 29, -1,
3930  -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
3931  41, 42, 43, 44, -1, -1, -1, 70, 71, 72,
3932  73, 74, 75, 76, 77, -1, 79, 80, -1, -1,
3933  -1, -1, 85, 86, -1, -1, -1, -1, -1, 70,
3934  71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
3935  81, 82, -1, -1, 85, 86, 87, 88, -1, 90,
3936  91, -1, -1, -1, -1, -1, 97, 120, 121, 122,
3937  123, 124, 125, 126, 127, 128, 129, -1, -1, -1,
3938  111, -1, -1, 114, -1, -1, 117, 118, 119, 120,
3939  121, 122, 123, 124, 125, 126, 127, 128, 129, -1,
3940  -1, -1, -1, -1, 135, 136, 137, 0, -1, 140,
3941  141, 142, -1, 144, 145, 8, 9, 10, -1, -1,
3942  13, 14, 15, -1, 17, -1, -1, -1, -1, -1,
3943  -1, -1, -1, 26, 27, 28, -1, -1, -1, -1,
3944  -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
3945  43, 44, -1, -1, -1, 70, 71, 72, 73, 74,
3946  75, 76, -1, -1, 79, 80, -1, -1, -1, -1,
3947  85, 86, -1, -1, -1, -1, -1, 70, 71, 72,
3948  73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
3949  -1, -1, 85, 86, 87, 88, -1, -1, 91, -1,
3950  -1, -1, -1, -1, 97, 120, 121, 122, 123, 124,
3951  125, 126, 127, 128, 129, -1, -1, -1, 111, -1,
3952  -1, -1, -1, -1, -1, 118, -1, 120, 121, 122,
3953  123, 124, 125, 126, 127, 128, 129, -1, -1, -1,
3954  -1, 134, 135, 136, 137, 0, 139, 140, 141, 142,
3955  -1, 144, 145, 8, 9, 10, -1, -1, 13, 14,
3956  15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
3957  -1, -1, 27, 28, 29, -1, -1, -1, -1, -1,
3958  -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
3959  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3960  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3961  -1, -1, -1, -1, -1, 70, 71, 72, 73, 74,
3962  75, 76, 77, 78, 79, 80, 81, 82, -1, -1,
3963  85, 86, 87, 88, -1, -1, 91, -1, -1, -1,
3964  -1, -1, 97, -1, -1, -1, -1, -1, -1, -1,
3965  -1, -1, -1, -1, -1, -1, 111, -1, -1, 114,
3966  -1, -1, -1, 118, 119, 120, 121, 122, 123, 124,
3967  125, 126, 127, 128, 129, -1, -1, -1, -1, -1,
3968  135, 136, 137, 0, -1, 140, 141, 142, -1, 144,
3969  145, 8, 9, 10, -1, -1, 13, 14, 15, -1,
3970  17, -1, -1, -1, -1, -1, -1, -1, -1, 26,
3971  27, 28, -1, -1, -1, -1, -1, -1, -1, -1,
3972  37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
3973  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3974  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3975  -1, -1, -1, 70, 71, 72, 73, 74, 75, 76,
3976  77, 78, 79, 80, 81, 82, -1, -1, 85, 86,
3977  87, 88, -1, -1, 91, -1, -1, -1, -1, -1,
3978  97, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3979  -1, -1, -1, -1, 111, -1, -1, -1, -1, -1,
3980  -1, 118, -1, 120, 121, 122, 123, 124, 125, 126,
3981  127, 128, 129, -1, -1, -1, -1, 134, 135, 136,
3982  137, 0, 139, 140, 141, 142, -1, 144, 145, 8,
3983  9, 10, -1, -1, 13, 14, 15, -1, 17, -1,
3984  -1, -1, -1, -1, -1, -1, -1, -1, 27, 28,
3985  -1, -1, -1, -1, -1, -1, -1, -1, 37, 38,
3986  -1, 40, 41, 42, 43, 44, -1, -1, -1, -1,
3987  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3988  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3989  -1, 70, 71, 72, 73, 74, 75, 76, 77, 78,
3990  79, 80, 81, 82, -1, -1, 85, 86, 87, 88,
3991  -1, -1, 91, -1, -1, -1, -1, -1, 97, -1,
3992  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3993  -1, -1, 111, -1, -1, -1, -1, -1, -1, 118,
3994  -1, 120, 121, 122, 123, 124, 125, 126, 127, 128,
3995  129, -1, -1, -1, -1, -1, 135, 136, 137, 0,
3996  139, 140, 141, 142, -1, 144, 145, 8, 9, 10,
3997  -1, -1, -1, 14, 15, -1, 17, -1, -1, -1,
3998  -1, -1, -1, -1, -1, 26, -1, -1, -1, -1,
3999  -1, -1, -1, -1, -1, -1, 37, 38, -1, 40,
4000  41, 42, 43, 44, -1, -1, -1, -1, -1, -1,
4001  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4002  -1, -1, -1, -1, -1, -1, -1, -1, -1, 70,
4003  71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
4004  81, 82, -1, -1, 85, 86, 87, 88, -1, 90,
4005  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4006  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4007  111, -1, -1, -1, -1, -1, 117, 118, -1, 120,
4008  121, 122, 123, 124, 125, 126, 127, 128, 129, -1,
4009  -1, -1, -1, 134, 135, 136, 137, 0, -1, 140,
4010  -1, 142, -1, 144, 145, 8, 9, 10, -1, -1,
4011  -1, 14, 15, -1, 17, -1, -1, -1, -1, -1,
4012  -1, -1, -1, 26, -1, -1, -1, -1, -1, -1,
4013  -1, -1, -1, -1, 37, 38, -1, 40, 41, 42,
4014  43, 44, -1, -1, -1, -1, -1, -1, -1, -1,
4015  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4016  -1, -1, -1, -1, -1, -1, -1, 70, 71, 72,
4017  73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
4018  -1, -1, 85, 86, 87, 88, -1, 90, -1, -1,
4019  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4020  -1, -1, -1, -1, -1, -1, -1, -1, 111, -1,
4021  -1, -1, -1, -1, 117, 118, -1, 120, 121, 122,
4022  123, 124, 125, 126, 127, 128, 129, -1, -1, -1,
4023  -1, 134, 135, 136, 137, 0, -1, 140, -1, 142,
4024  -1, 144, 145, 8, 9, 10, -1, -1, -1, 14,
4025  15, -1, 17, -1, -1, -1, -1, -1, -1, -1,
4026  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4027  -1, -1, 37, 38, -1, 40, 41, 42, 43, 44,
4028  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4029  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4030  -1, -1, -1, -1, -1, 70, 71, 72, 73, 74,
4031  75, 76, 77, 78, 79, 80, 81, 82, -1, -1,
4032  85, 86, 87, 88, -1, 90, -1, -1, -1, -1,
4033  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4034  -1, -1, -1, -1, -1, -1, 111, -1, -1, -1,
4035  -1, -1, 117, 118, -1, 120, 121, 122, 123, 124,
4036  125, 126, 127, 128, 129, -1, -1, -1, -1, -1,
4037  135, 136, 137, 0, -1, 140, -1, 142, -1, 144,
4038  145, 8, 9, 10, -1, -1, -1, 14, 15, -1,
4039  17, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4040  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4041  37, 38, -1, 40, 41, 42, 43, 44, -1, -1,
4042  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4043  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4044  -1, -1, -1, 70, 71, 72, 73, 74, 75, 76,
4045  77, 78, 79, 80, 81, 82, -1, -1, 85, 86,
4046  87, 88, -1, 90, -1, -1, -1, -1, -1, -1,
4047  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4048  -1, -1, -1, -1, 111, -1, -1, -1, -1, -1,
4049  117, 118, -1, 120, 121, 122, 123, 124, 125, 126,
4050  127, 128, 129, -1, -1, -1, -1, -1, 135, 136,
4051  137, -1, -1, 140, -1, 142, -1, 144, 145, 1,
4052  -1, 3, 4, 5, 6, 7, 8, 9, 10, 11,
4053  12, -1, -1, 15, 16, -1, 18, 19, 20, 21,
4054  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4055  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4056  -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
4057  52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4058  62, -1, 64, 65, 66, -1, 68, 69, -1, -1,
4059  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4060  -1, -1, -1, -1, -1, -1, -1, 89, -1, -1,
4061  92, 93, -1, 95, 96, -1, 98, -1, -1, 101,
4062  102, 103, 104, 105, 106, 107, 108, 109, -1, -1,
4063  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4064  -1, -1, -1, -1, -1, -1, -1, -1, 130, 131,
4065  132, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4066  142, -1, 1, 145, 3, 4, 5, 6, 7, -1,
4067  -1, 10, 11, 12, -1, 14, 15, 16, -1, 18,
4068  19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
4069  -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
4070  39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
4071  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
4072  59, 60, 61, 62, -1, 64, 65, 66, -1, 68,
4073  69, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4074  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4075  89, -1, -1, 92, 93, -1, 95, 96, -1, 98,
4076  -1, -1, 101, 102, 103, 104, 105, 106, 107, 108,
4077  109, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4078  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4079  -1, 130, 131, 132, -1, -1, -1, -1, -1, -1,
4080  -1, -1, -1, 142, -1, 1, 145, 3, 4, 5,
4081  6, 7, -1, -1, 10, 11, 12, -1, -1, 15,
4082  16, 17, 18, 19, 20, 21, 22, 23, 24, -1,
4083  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
4084  36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
4085  46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
4086  56, 57, -1, 59, 60, 61, 62, -1, 64, 65,
4087  66, -1, 68, 69, -1, -1, -1, -1, -1, -1,
4088  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4089  -1, -1, -1, 89, -1, -1, 92, 93, -1, 95,
4090  96, -1, 98, -1, -1, 101, 102, 103, 104, 105,
4091  106, 107, 108, 109, -1, -1, -1, -1, -1, -1,
4092  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4093  -1, -1, -1, -1, 130, 131, 132, -1, -1, -1,
4094  -1, -1, -1, -1, -1, -1, 142, -1, 1, 145,
4095  3, 4, 5, 6, 7, -1, -1, 10, 11, 12,
4096  -1, -1, 15, 16, -1, 18, 19, 20, 21, 22,
4097  23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
4098  33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
4099  -1, -1, 45, 46, 47, 48, 49, 50, 51, 52,
4100  53, 54, 55, 56, 57, -1, 59, 60, 61, 62,
4101  -1, 64, 65, 66, -1, 68, 69, -1, -1, -1,
4102  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4103  -1, -1, -1, -1, -1, -1, 89, -1, -1, 92,
4104  93, -1, 95, 96, -1, 98, -1, -1, 101, 102,
4105  103, 104, 105, 106, 107, 108, 109, -1, -1, -1,
4106  -1, -1, -1, -1, -1, 1, -1, 3, 4, 5,
4107  6, 7, -1, 9, 10, 11, 12, 130, 131, 132,
4108  16, -1, 18, 19, 20, 21, 22, 23, 24, 142,
4109  -1, -1, 145, -1, 30, 31, 32, 33, 34, 35,
4110  36, -1, -1, 39, -1, -1, -1, -1, -1, 45,
4111  46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
4112  56, 57, -1, 59, 60, 61, 62, -1, 64, 65,
4113  66, -1, 68, 69, -1, -1, -1, -1, -1, -1,
4114  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4115  -1, -1, -1, 89, -1, -1, 92, 93, -1, 95,
4116  96, -1, 98, -1, -1, 101, 102, 103, 104, 105,
4117  106, 107, 108, 109, -1, -1, -1, -1, -1, -1,
4118  -1, -1, 1, -1, 3, 4, 5, 6, 7, -1,
4119  -1, -1, 11, 12, 130, 131, 132, 16, -1, 18,
4120  19, 20, 21, 22, 23, 24, 142, -1, -1, 145,
4121  -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
4122  39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
4123  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
4124  59, 60, 61, 62, -1, 64, 65, 66, -1, 68,
4125  69, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4126  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4127  89, -1, -1, 92, 93, -1, 95, 96, -1, 98,
4128  -1, -1, 101, 102, 103, 104, 105, 106, 107, 108,
4129  109, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4130  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4131  -1, 130, 131, 132, 1, -1, 3, 4, 5, 6,
4132  7, 140, -1, 142, 11, 12, 145, -1, -1, 16,
4133  -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4134  -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4135  -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
4136  47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
4137  57, -1, 59, 60, 61, 62, -1, 64, 65, 66,
4138  -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
4139  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4140  -1, -1, 89, -1, -1, 92, 93, -1, 95, 96,
4141  -1, 98, -1, -1, 101, 102, 103, 104, 105, 106,
4142  107, 108, 109, -1, -1, -1, -1, -1, -1, -1,
4143  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4144  -1, -1, -1, 130, 131, 132, 1, -1, 3, 4,
4145  5, 6, 7, 140, -1, 142, 11, 12, 145, -1,
4146  -1, 16, -1, 18, 19, 20, 21, 22, 23, 24,
4147  -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
4148  35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4149  45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
4150  55, 56, 57, -1, 59, 60, 61, 62, -1, 64,
4151  65, 66, -1, 68, 69, -1, -1, -1, -1, -1,
4152  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4153  -1, -1, -1, -1, 89, -1, -1, 92, 93, -1,
4154  95, 96, -1, 98, -1, -1, 101, 102, 103, 104,
4155  105, 106, 107, 108, 109, -1, -1, -1, -1, -1,
4156  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4157  -1, -1, -1, -1, -1, 130, 131, 132, -1, -1,
4158  135, -1, -1, -1, -1, -1, -1, 142, -1, 1,
4159  145, 3, 4, 5, 6, 7, -1, -1, -1, 11,
4160  12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
4161  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4162  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4163  -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
4164  52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4165  62, -1, 64, 65, 66, -1, 68, 69, -1, -1,
4166  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4167  -1, -1, -1, -1, -1, -1, -1, 89, -1, -1,
4168  92, 93, -1, 95, 96, -1, 98, -1, -1, 101,
4169  102, 103, 104, 105, 106, 107, 108, 109, -1, -1,
4170  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4171  -1, -1, -1, -1, -1, -1, -1, -1, 130, 131,
4172  132, -1, -1, 135, -1, -1, -1, -1, -1, -1,
4173  142, -1, 1, 145, 3, 4, 5, 6, 7, -1,
4174  -1, 10, 11, 12, -1, -1, -1, 16, -1, 18,
4175  19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
4176  -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
4177  39, -1, -1, -1, -1, -1, 45, 46, 47, 48,
4178  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
4179  59, 60, 61, 62, -1, 64, 65, 66, -1, 68,
4180  69, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4181  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4182  89, -1, -1, 92, 93, -1, 95, 96, -1, 98,
4183  -1, -1, 101, 102, 103, 104, 105, 106, 107, 108,
4184  109, -1, -1, -1, -1, -1, -1, -1, -1, 1,
4185  -1, 3, 4, 5, 6, 7, -1, -1, -1, 11,
4186  12, 130, 131, 132, 16, -1, 18, 19, 20, 21,
4187  22, 23, 24, 142, -1, -1, 145, -1, 30, 31,
4188  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4189  -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
4190  52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4191  62, -1, 64, 65, 66, -1, 68, 69, -1, -1,
4192  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4193  -1, -1, -1, -1, -1, -1, -1, 89, -1, -1,
4194  92, 93, -1, 95, 96, -1, 98, -1, -1, 101,
4195  102, 103, 104, 105, 106, 107, 108, 109, -1, 111,
4196  -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
4197  5, -1, 7, -1, -1, -1, 11, 12, 130, 131,
4198  132, 16, -1, 18, 19, 20, 21, 22, 23, 24,
4199  142, -1, -1, 145, -1, 30, 31, 32, 33, 34,
4200  35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4201  -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
4202  55, 56, 57, 58, 59, 60, 61, 62, -1, 64,
4203  65, 66, -1, 68, 69, -1, -1, -1, -1, -1,
4204  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4205  -1, -1, -1, -1, 89, -1, -1, 92, 93, -1,
4206  95, 96, -1, 98, 99, 100, 101, 102, 103, 104,
4207  105, 106, 107, 108, 109, -1, -1, -1, -1, -1,
4208  -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
4209  -1, -1, -1, 11, 12, 130, 131, 132, 16, -1,
4210  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
4211  145, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4212  -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
4213  -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4214  -1, 59, 60, 61, 62, -1, 64, 65, 66, -1,
4215  68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
4216  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4217  -1, 89, -1, -1, 92, 93, -1, 95, 96, -1,
4218  -1, -1, -1, 101, 102, 103, 104, 105, 106, 107,
4219  108, 109, -1, -1, -1, -1, -1, -1, -1, -1,
4220  -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
4221  11, 12, 130, 131, 132, 16, -1, 18, 19, 20,
4222  21, 22, 23, 24, 142, -1, -1, 145, -1, 30,
4223  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4224  -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
4225  51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
4226  61, 62, -1, 64, 65, 66, -1, 68, 69, -1,
4227  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4228  -1, -1, -1, -1, -1, -1, -1, -1, 89, -1,
4229  -1, 92, 93, -1, 95, 96, -1, -1, -1, -1,
4230  101, 102, 103, 104, 105, 106, 107, 108, 109, -1,
4231  -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
4232  4, 5, 6, 7, -1, -1, -1, 11, 12, 130,
4233  131, 132, 16, -1, 18, 19, 20, 21, 22, 23,
4234  24, -1, -1, -1, 145, -1, 30, 31, 32, 33,
4235  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4236  -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
4237  54, 55, 56, 57, -1, 59, 60, 61, 62, -1,
4238  64, 65, 66, -1, 68, 69, -1, -1, -1, -1,
4239  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4240  -1, -1, -1, -1, -1, 89, -1, -1, 92, 93,
4241  -1, 95, 96, -1, 98, -1, -1, 101, 102, 103,
4242  104, 105, 106, 107, 108, 109, -1, -1, -1, -1,
4243  -1, -1, -1, -1, -1, -1, 3, 4, 5, 6,
4244  7, -1, -1, -1, 11, 12, 130, 131, 132, 16,
4245  -1, 18, 19, 20, 21, 22, 23, 24, 142, -1,
4246  -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4247  -1, -1, 39, -1, -1, -1, -1, -1, 45, 46,
4248  47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
4249  57, -1, 59, 60, 61, 62, -1, 64, 65, 66,
4250  -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
4251  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4252  -1, -1, 89, -1, -1, 92, 93, -1, 95, 96,
4253  -1, 98, -1, -1, 101, 102, 103, 104, 105, 106,
4254  107, 108, 109, -1, -1, -1, -1, -1, -1, -1,
4255  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4256  -1, -1, -1, 130, 131, 132, -1, -1, -1, -1,
4257  -1, -1, -1, -1, -1, 142, 3, 4, 5, 6,
4258  7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
4259  17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
4260  -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4261  37, 38, 39, -1, -1, -1, -1, -1, 45, 46,
4262  47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
4263  57, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4264  -1, 68, 69, 70, 71, 72, 73, 74, 75, 76,
4265  -1, -1, 79, 80, -1, -1, 83, 84, 85, 86,
4266  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4267  -1, 98, 99, -1, -1, -1, -1, -1, -1, -1,
4268  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4269  -1, -1, -1, 120, 121, 122, 123, 124, 125, 126,
4270  127, 128, 129, -1, 131, 132, -1, -1, -1, -1,
4271  -1, 138, 139, 3, 4, 5, 6, 7, 8, 9,
4272  10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
4273  20, 21, 22, 23, 24, 25, 26, -1, -1, -1,
4274  30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
4275  -1, -1, -1, -1, -1, 45, 46, 47, 48, 49,
4276  50, 51, 52, 53, 54, 55, 56, 57, -1, -1,
4277  -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
4278  70, 71, 72, 73, 74, 75, 76, -1, -1, 79,
4279  80, -1, -1, 83, 84, 85, 86, -1, -1, -1,
4280  -1, -1, -1, -1, -1, -1, -1, -1, 98, 99,
4281  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4282  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4283  120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
4284  -1, 131, 132, -1, -1, -1, -1, -1, 138, 3,
4285  4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
4286  14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
4287  24, 25, 26, -1, -1, -1, 30, 31, 32, 33,
4288  34, 35, 36, 37, 38, 39, -1, -1, -1, -1,
4289  -1, 45, 46, 47, 48, 49, 50, 51, 52, 53,
4290  54, -1, 56, -1, -1, -1, -1, -1, -1, -1,
4291  -1, -1, -1, -1, 68, 69, 70, 71, 72, 73,
4292  74, 75, 76, -1, -1, 79, 80, -1, -1, 83,
4293  84, 85, 86, -1, -1, -1, -1, -1, -1, -1,
4294  -1, -1, -1, -1, 98, 99, -1, -1, 102, -1,
4295  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4296  -1, -1, -1, -1, -1, -1, 120, 121, 122, 123,
4297  124, 125, 126, 127, 128, 129, -1, 131, 132, -1,
4298  -1, -1, -1, -1, 138, 3, 4, 5, 6, 7,
4299  8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
4300  18, 19, 20, 21, 22, 23, 24, 25, 26, -1,
4301  -1, -1, 30, 31, 32, 33, 34, 35, 36, 37,
4302  38, 39, -1, -1, -1, -1, -1, 45, 46, 47,
4303  48, 49, 50, 51, 52, 53, -1, -1, 56, -1,
4304  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4305  68, 69, 70, 71, 72, 73, 74, 75, 76, -1,
4306  -1, 79, 80, -1, -1, 83, 84, 85, 86, -1,
4307  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4308  98, 99, -1, -1, 102, -1, -1, -1, -1, -1,
4309  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4310  -1, -1, 120, 121, 122, 123, 124, 125, 126, 127,
4311  128, 129, -1, 131, 132, -1, -1, -1, -1, -1,
4312  138, 3, 4, 5, 6, 7, 8, 9, 10, 11,
4313  12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
4314  22, 23, 24, 25, 26, -1, -1, -1, 30, 31,
4315  32, 33, 34, 35, 36, 37, 38, 39, -1, -1,
4316  -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
4317  52, 53, -1, -1, 56, -1, -1, -1, -1, -1,
4318  -1, -1, -1, -1, -1, -1, 68, 69, 70, 71,
4319  72, 73, 74, 75, 76, -1, -1, 79, 80, -1,
4320  -1, 83, 84, 85, 86, -1, -1, -1, -1, -1,
4321  -1, -1, -1, -1, -1, -1, 98, 99, -1, -1,
4322  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4323  -1, -1, -1, -1, -1, -1, -1, -1, 120, 121,
4324  122, 123, 124, 125, 126, 127, 128, 129, -1, 131,
4325  132, 3, 4, 5, -1, 7, 138, -1, -1, 11,
4326  12, -1, -1, -1, 16, -1, 18, 19, 20, 21,
4327  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4328  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4329  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
4330  52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4331  62, -1, 64, 65, 66, -1, -1, -1, -1, -1,
4332  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4333  -1, -1, -1, -1, -1, -1, -1, 89, -1, -1,
4334  92, 93, -1, 95, 96, -1, -1, -1, -1, 101,
4335  102, 103, 104, 105, 106, 107, 108, 109, -1, -1,
4336  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4337  -1, 3, 4, 5, -1, 7, -1, -1, 130, 11,
4338  12, -1, -1, -1, 16, 137, 18, 19, 20, 21,
4339  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4340  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4341  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
4342  52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4343  62, -1, 64, 65, 66, -1, -1, -1, -1, -1,
4344  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4345  -1, -1, -1, -1, -1, -1, -1, 89, -1, -1,
4346  92, 93, -1, 95, 96, -1, -1, -1, -1, 101,
4347  102, 103, 104, 105, 106, 107, 108, 109, -1, -1,
4348  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4349  -1, 3, 4, 5, 6, 7, -1, -1, 130, 11,
4350  12, -1, -1, -1, 16, 137, 18, 19, 20, 21,
4351  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4352  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4353  -1, -1, -1, 45, 46, 47, 48, 49, 50, 51,
4354  52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4355  62, -1, 64, 65, 66, -1, 68, 69, -1, -1,
4356  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4357  -1, -1, -1, -1, -1, -1, -1, 89, -1, -1,
4358  92, 93, -1, 95, 96, -1, 98, -1, -1, 101,
4359  102, 103, 104, 105, 106, 107, 108, 109, -1, -1,
4360  -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
4361  5, -1, 7, -1, -1, -1, 11, 12, 130, 131,
4362  132, 16, -1, 18, 19, 20, 21, 22, 23, 24,
4363  -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
4364  35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4365  -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
4366  55, 56, 57, 58, 59, 60, 61, 62, -1, 64,
4367  65, 66, -1, 68, 69, -1, -1, -1, -1, -1,
4368  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4369  -1, -1, -1, -1, 89, -1, -1, 92, 93, -1,
4370  95, 96, -1, 98, 99, 100, 101, 102, 103, 104,
4371  105, 106, 107, 108, 109, -1, -1, -1, -1, -1,
4372  -1, -1, -1, -1, -1, 3, 4, 5, 6, 7,
4373  -1, -1, -1, 11, 12, 130, 131, 132, 16, -1,
4374  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
4375  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4376  -1, 39, -1, -1, -1, -1, -1, 45, 46, -1,
4377  48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4378  -1, 59, 60, 61, 62, -1, 64, 65, 66, -1,
4379  68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
4380  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4381  -1, 89, -1, -1, 92, 93, -1, 95, 96, -1,
4382  98, -1, -1, 101, 102, 103, 104, 105, 106, 107,
4383  108, 109, -1, -1, -1, -1, -1, -1, -1, -1,
4384  -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
4385  11, 12, 130, 131, 132, 16, -1, 18, 19, 20,
4386  21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
4387  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4388  -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
4389  51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
4390  61, 62, -1, 64, 65, 66, -1, 68, 69, -1,
4391  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4392  -1, -1, -1, -1, -1, -1, -1, -1, 89, -1,
4393  -1, 92, 93, -1, 95, 96, -1, 98, 99, 100,
4394  101, 102, 103, 104, 105, 106, 107, 108, 109, -1,
4395  -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
4396  4, 5, -1, 7, -1, -1, -1, 11, 12, 130,
4397  131, 132, 16, -1, 18, 19, 20, 21, 22, 23,
4398  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
4399  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4400  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
4401  54, 55, 56, 57, 58, 59, 60, 61, 62, -1,
4402  64, 65, 66, -1, 68, 69, -1, -1, -1, -1,
4403  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4404  -1, -1, -1, -1, -1, 89, -1, -1, 92, 93,
4405  -1, 95, 96, -1, 98, 99, -1, 101, 102, 103,
4406  104, 105, 106, 107, 108, 109, -1, -1, -1, -1,
4407  -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
4408  7, -1, -1, -1, 11, 12, 130, 131, 132, 16,
4409  -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4410  -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4411  -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
4412  -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
4413  57, 58, 59, 60, 61, 62, -1, 64, 65, 66,
4414  -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
4415  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4416  -1, -1, 89, -1, -1, 92, 93, -1, 95, 96,
4417  -1, -1, 99, 100, 101, 102, 103, 104, 105, 106,
4418  107, 108, 109, -1, -1, -1, -1, -1, -1, -1,
4419  -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
4420  -1, 11, 12, 130, 131, 132, 16, -1, 18, 19,
4421  20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
4422  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
4423  -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
4424  50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
4425  60, 61, 62, -1, 64, 65, 66, -1, 68, 69,
4426  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4427  -1, -1, -1, -1, -1, -1, -1, -1, -1, 89,
4428  -1, -1, 92, 93, -1, 95, 96, -1, 98, 99,
4429  -1, 101, 102, 103, 104, 105, 106, 107, 108, 109,
4430  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4431  3, 4, 5, -1, 7, -1, -1, -1, 11, 12,
4432  130, 131, 132, 16, -1, 18, 19, 20, 21, 22,
4433  23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
4434  33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
4435  -1, -1, -1, 46, -1, -1, 49, 50, 51, 52,
4436  53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
4437  -1, 64, 65, 66, -1, 68, 69, -1, -1, -1,
4438  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4439  -1, -1, -1, -1, -1, -1, 89, -1, -1, 92,
4440  93, -1, 95, 96, -1, -1, 99, -1, 101, 102,
4441  103, 104, 105, 106, 107, 108, 109, -1, -1, -1,
4442  -1, -1, -1, -1, -1, -1, -1, 3, 4, 5,
4443  -1, 7, -1, -1, -1, 11, 12, 130, 131, 132,
4444  16, -1, 18, 19, 20, 21, 22, 23, 24, -1,
4445  -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
4446  36, -1, -1, 39, -1, -1, -1, -1, -1, -1,
4447  46, -1, -1, 49, 50, 51, 52, 53, 54, 55,
4448  56, 57, -1, 59, 60, 61, 62, -1, 64, 65,
4449  66, -1, 68, 69, -1, -1, -1, -1, -1, -1,
4450  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4451  -1, -1, -1, 89, -1, -1, 92, 93, -1, 95,
4452  96, -1, 98, -1, -1, 101, 102, 103, 104, 105,
4453  106, 107, 108, 109, -1, -1, -1, -1, -1, -1,
4454  -1, -1, -1, -1, 3, 4, 5, -1, 7, -1,
4455  -1, -1, 11, 12, 130, 131, 132, 16, -1, 18,
4456  19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
4457  -1, 30, 31, 32, 33, 34, 35, 36, -1, -1,
4458  39, -1, -1, -1, -1, -1, -1, 46, -1, -1,
4459  49, 50, 51, 52, 53, 54, 55, 56, 57, -1,
4460  59, 60, 61, 62, -1, 64, 65, 66, -1, 68,
4461  69, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4462  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4463  89, -1, -1, 92, 93, -1, 95, 96, -1, 98,
4464  -1, -1, 101, 102, 103, 104, 105, 106, 107, 108,
4465  109, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4466  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
4467  12, 130, 131, 132, 16, -1, 18, 19, 20, 21,
4468  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4469  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4470  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
4471  52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4472  62, -1, 64, 65, 66, -1, 68, 69, -1, -1,
4473  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4474  -1, -1, -1, -1, -1, -1, -1, 89, -1, -1,
4475  92, 93, -1, 95, 96, -1, 98, -1, -1, 101,
4476  102, 103, 104, 105, 106, 107, 108, 109, -1, -1,
4477  -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
4478  5, -1, 7, -1, -1, -1, 11, 12, 130, 131,
4479  132, 16, -1, 18, 19, 20, 21, 22, 23, 24,
4480  -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
4481  35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4482  -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
4483  55, 56, 57, -1, 59, 60, 61, 62, -1, 64,
4484  65, 66, -1, 68, 69, -1, -1, -1, -1, -1,
4485  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4486  -1, -1, -1, -1, 89, -1, -1, 92, 93, -1,
4487  95, 96, -1, 98, -1, -1, 101, 102, 103, 104,
4488  105, 106, 107, 108, 109, -1, -1, -1, -1, -1,
4489  -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
4490  -1, -1, -1, 11, 12, 130, 131, 132, 16, -1,
4491  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
4492  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4493  -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
4494  -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4495  -1, 59, 60, 61, 62, -1, 64, 65, 66, -1,
4496  68, 69, -1, -1, -1, -1, -1, -1, -1, -1,
4497  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4498  -1, 89, -1, -1, 92, 93, -1, 95, 96, -1,
4499  98, -1, -1, 101, 102, 103, 104, 105, 106, 107,
4500  108, 109, -1, -1, -1, -1, -1, -1, -1, -1,
4501  -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
4502  11, 12, 130, 131, 132, 16, -1, 18, 19, 20,
4503  21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
4504  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4505  -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
4506  51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
4507  61, 62, -1, 64, 65, 66, -1, 68, 69, -1,
4508  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4509  -1, -1, -1, -1, -1, -1, -1, -1, 89, -1,
4510  -1, 92, 93, -1, 95, 96, -1, -1, -1, -1,
4511  101, 102, 103, 104, 105, 106, 107, 108, 109, -1,
4512  -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
4513  4, 5, -1, 7, -1, -1, -1, 11, 12, 130,
4514  131, 132, 16, -1, 18, 19, 20, 21, 22, 23,
4515  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
4516  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4517  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
4518  54, 55, 56, 57, -1, 59, 60, 61, 62, -1,
4519  64, 65, 66, -1, 68, 69, -1, -1, -1, -1,
4520  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4521  -1, -1, -1, -1, -1, 89, -1, -1, 92, 93,
4522  -1, 95, 96, -1, -1, -1, -1, 101, 102, 103,
4523  104, 105, 106, 107, 108, 109, -1, -1, -1, -1,
4524  -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
4525  7, -1, -1, -1, 11, 12, 130, 131, 132, 16,
4526  -1, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4527  -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4528  -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
4529  -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
4530  57, -1, 59, 60, 61, 62, -1, 64, 65, 66,
4531  -1, 68, 69, -1, -1, -1, -1, -1, -1, -1,
4532  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4533  -1, -1, 89, -1, -1, 92, 93, -1, 95, 96,
4534  -1, -1, -1, -1, 101, 102, 103, 104, 105, 106,
4535  107, 108, 109, -1, -1, -1, -1, -1, -1, -1,
4536  -1, -1, -1, 3, 4, 5, -1, 7, -1, -1,
4537  -1, 11, 12, 130, 131, 132, 16, -1, 18, 19,
4538  20, 21, 22, 23, 24, -1, -1, -1, -1, -1,
4539  30, 31, 32, 33, 34, 35, 36, -1, -1, 39,
4540  -1, -1, -1, -1, -1, -1, 46, -1, -1, 49,
4541  50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
4542  60, 61, 62, -1, 64, 65, 66, -1, -1, -1,
4543  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4544  -1, -1, -1, -1, -1, -1, -1, -1, -1, 89,
4545  -1, -1, 92, 93, -1, 95, 96, -1, 98, -1,
4546  -1, 101, 102, 103, 104, 105, 106, 107, 108, 109,
4547  -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
4548  7, -1, -1, -1, 11, 12, -1, -1, -1, 16,
4549  130, 18, 19, 20, 21, 22, 23, 24, -1, -1,
4550  -1, -1, -1, 30, 31, 32, 33, 34, 35, 36,
4551  -1, -1, 39, -1, -1, -1, -1, -1, -1, 46,
4552  -1, -1, 49, 50, 51, 52, 53, 54, 55, 56,
4553  57, -1, 59, 60, 61, 62, -1, 64, 65, 66,
4554  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4555  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4556  -1, -1, 89, -1, -1, 92, 93, -1, 95, 96,
4557  -1, 98, -1, -1, 101, 102, 103, 104, 105, 106,
4558  107, 108, 109, -1, -1, -1, -1, -1, -1, 3,
4559  4, 5, -1, 7, -1, -1, -1, 11, 12, -1,
4560  -1, -1, 16, 130, 18, 19, 20, 21, 22, 23,
4561  24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
4562  34, 35, 36, -1, -1, 39, -1, -1, -1, -1,
4563  -1, -1, 46, -1, -1, 49, 50, 51, 52, 53,
4564  54, 55, 56, 57, -1, 59, 60, 61, 62, -1,
4565  64, 65, 66, -1, -1, -1, -1, -1, -1, -1,
4566  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4567  -1, 85, -1, -1, -1, 89, -1, -1, 92, 93,
4568  -1, 95, 96, -1, -1, -1, -1, 101, 102, 103,
4569  104, 105, 106, 107, 108, 109, -1, -1, -1, -1,
4570  -1, -1, 3, 4, 5, -1, 7, -1, -1, -1,
4571  11, 12, -1, -1, -1, 16, 130, 18, 19, 20,
4572  21, 22, 23, 24, -1, -1, -1, -1, -1, 30,
4573  31, 32, 33, 34, 35, 36, -1, -1, 39, -1,
4574  -1, -1, -1, -1, -1, 46, -1, -1, 49, 50,
4575  51, 52, 53, 54, 55, 56, 57, -1, 59, 60,
4576  61, 62, -1, 64, 65, 66, -1, -1, -1, -1,
4577  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4578  -1, -1, -1, -1, -1, -1, -1, -1, 89, -1,
4579  -1, 92, 93, -1, 95, 96, -1, -1, -1, -1,
4580  101, 102, 103, 104, 105, 106, 107, 108, 109, -1,
4581  -1, -1, -1, -1, -1, 3, 4, 5, -1, 7,
4582  -1, -1, -1, 11, 12, -1, -1, -1, 16, 130,
4583  18, 19, 20, 21, 22, 23, 24, -1, -1, -1,
4584  -1, -1, 30, 31, 32, 33, 34, 35, 36, -1,
4585  -1, 39, -1, -1, -1, -1, -1, -1, 46, -1,
4586  -1, 49, 50, 51, 52, 53, 54, 55, 56, 57,
4587  -1, 59, 60, 61, 62, -1, 64, 65, 66, -1,
4588  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4589  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4590  -1, 89, -1, -1, 92, 93, -1, 95, 96, -1,
4591  -1, -1, -1, 101, 102, 103, 104, 105, 106, 107,
4592  108, 109, -1, -1, -1, -1, -1, -1, 3, 4,
4593  5, -1, 7, -1, -1, -1, 11, 12, -1, -1,
4594  -1, 16, 130, 18, 19, 20, 21, 22, 23, 24,
4595  -1, -1, -1, -1, -1, 30, 31, 32, 33, 34,
4596  35, 36, -1, -1, 39, -1, -1, -1, -1, -1,
4597  -1, 46, -1, -1, 49, 50, 51, 52, 53, 54,
4598  55, 56, 57, -1, 59, 60, 61, 62, -1, 64,
4599  65, 66, -1, -1, -1, -1, -1, -1, -1, -1,
4600  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4601  -1, -1, -1, -1, 89, -1, -1, 92, 93, -1,
4602  95, 96, -1, -1, -1, -1, 101, 102, 103, 104,
4603  105, 106, 107, 108, 109, -1, -1, -1, -1, -1,
4604  -1, 3, 4, 5, -1, 7, -1, -1, -1, 11,
4605  12, -1, -1, -1, 16, 130, 18, 19, 20, 21,
4606  22, 23, 24, -1, -1, -1, -1, -1, 30, 31,
4607  32, 33, 34, 35, 36, -1, -1, 39, -1, -1,
4608  -1, -1, -1, -1, 46, -1, -1, 49, 50, 51,
4609  52, 53, 54, 55, 56, 57, -1, 59, 60, 61,
4610  62, -1, 64, 65, 66, -1, -1, -1, -1, -1,
4611  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4612  -1, -1, -1, -1, -1, -1, -1, 89, -1, -1,
4613  92, 93, -1, 95, 96, -1, -1, -1, -1, 101,
4614  102, 103, 104, 105, 106, 107, 108, 109, -1, -1,
4615  -1, -1, -1, 52, 53, -1, -1, 56, -1, -1,
4616  -1, -1, -1, -1, -1, -1, -1, -1, 130, 68,
4617  69, 70, 71, 72, 73, 74, 75, 76, -1, -1,
4618  79, 80, -1, -1, 83, 84, 85, 86, -1, -1,
4619  -1, -1, -1, -1, -1, -1, -1, -1, -1, 98,
4620  99, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4621  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4622  -1, 120, 121, 122, 123, 124, 125, 126, 127, 128,
4623  129, -1, 131, 132, 52, 53, -1, -1, 56, 138,
4624  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4625  68, 69, 70, 71, 72, 73, 74, 75, 76, -1,
4626  -1, 79, 80, -1, -1, 83, 84, 85, 86, -1,
4627  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4628  98, 99, -1, -1, -1, -1, -1, -1, -1, -1,
4629  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4630  -1, -1, 120, 121, 122, 123, 124, 125, 126, 127,
4631  128, 129, -1, 131, 132, 52, 53, -1, -1, 56,
4632  138, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4633  -1, 68, 69, 70, 71, 72, 73, 74, 75, 76,
4634  -1, -1, 79, 80, -1, -1, 83, 84, 85, 86,
4635  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4636  -1, 98, 99, -1, -1, -1, -1, -1, -1, -1,
4637  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4638  -1, -1, -1, 120, 121, 122, 123, 124, 125, 126,
4639  127, 128, 129, -1, 131, 132, 52, 53, -1, -1,
4640  56, 138, -1, -1, -1, -1, -1, -1, -1, -1,
4641  -1, -1, 68, 69, 70, 71, 72, 73, 74, 75,
4642  76, -1, -1, 79, 80, -1, -1, 83, 84, 85,
4643  86, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4644  -1, -1, 98, 99, -1, -1, -1, -1, -1, -1,
4645  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4646  -1, -1, -1, -1, 120, 121, 122, 123, 124, 125,
4647  126, 127, 128, 129, -1, 131, 132, 52, 53, -1,
4648  -1, 56, 138, -1, -1, -1, -1, -1, -1, -1,
4649  -1, -1, -1, 68, 69, 70, 71, 72, 73, 74,
4650  75, 76, -1, -1, 79, 80, -1, -1, 83, 84,
4651  85, 86, -1, -1, -1, -1, -1, -1, -1, -1,
4652  -1, -1, -1, 98, 99, -1, -1, -1, -1, -1,
4653  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4654  -1, -1, -1, -1, -1, 120, 121, 122, 123, 124,
4655  125, 126, 127, 128, 129, -1, 131, 132, 52, 53,
4656  -1, -1, 56, 138, -1, -1, -1, -1, -1, -1,
4657  -1, -1, -1, -1, 68, 69, 70, 71, 72, 73,
4658  74, 75, 76, -1, -1, 79, 80, -1, -1, 83,
4659  84, 85, 86, -1, -1, -1, -1, -1, -1, -1,
4660  -1, -1, -1, -1, 98, 99, -1, -1, -1, -1,
4661  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4662  -1, -1, -1, -1, -1, -1, 120, 121, 122, 123,
4663  124, 125, 126, 127, 128, 129, -1, 131, 132, 52,
4664  53, -1, -1, 56, 138, -1, -1, -1, -1, -1,
4665  -1, -1, -1, -1, -1, 68, 69, 70, 71, 72,
4666  73, 74, 75, 76, -1, -1, 79, 80, -1, -1,
4667  83, 84, 85, 86, -1, -1, -1, -1, -1, -1,
4668  -1, -1, -1, -1, -1, 98, 99, -1, -1, -1,
4669  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4670  -1, -1, -1, -1, -1, -1, -1, 120, 121, 122,
4671  123, 124, 125, 126, 127, 128, 129, -1, 131, 132,
4672  52, 53, -1, -1, 56, 138, -1, -1, -1, -1,
4673  -1, -1, -1, -1, -1, -1, 68, 69, 70, 71,
4674  72, 73, 74, 75, 76, -1, -1, 79, 80, -1,
4675  -1, 83, 84, 85, 86, -1, -1, -1, -1, -1,
4676  -1, -1, -1, -1, -1, -1, 98, 99, -1, -1,
4677  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4678  -1, -1, -1, -1, -1, -1, -1, -1, 120, 121,
4679  122, 123, 124, 125, 126, 127, 128, 129, -1, 131,
4680  132, 52, 53, -1, -1, 56, 138, -1, -1, -1,
4681  -1, -1, -1, -1, -1, -1, -1, 68, 69, 70,
4682  71, 72, 73, 74, 75, 76, -1, -1, 79, 80,
4683  -1, -1, 83, 84, 85, 86, -1, -1, -1, -1,
4684  -1, -1, -1, -1, -1, -1, -1, 98, 99, -1,
4685  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4686  -1, -1, -1, -1, -1, -1, -1, -1, -1, 120,
4687  121, 122, 123, 124, 125, 126, 127, 128, 129, -1,
4688  131, 132, 52, 53, -1, -1, 56, 138, -1, -1,
4689  -1, -1, -1, -1, -1, -1, -1, -1, 68, 69,
4690  70, 71, 72, 73, 74, 75, 76, -1, -1, 79,
4691  80, -1, -1, 83, 84, 85, 86, -1, -1, -1,
4692  -1, -1, -1, -1, -1, -1, -1, -1, 98, 99,
4693  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4694  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4695  120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
4696  -1, 131, 132, 52, 53, -1, -1, 56, 138, -1,
4697  -1, -1, -1, -1, -1, -1, -1, -1, -1, 68,
4698  69, 70, 71, 72, 73, 74, 75, 76, -1, -1,
4699  79, 80, -1, -1, 83, 84, 85, 86, -1, -1,
4700  -1, -1, -1, -1, -1, -1, -1, -1, -1, 98,
4701  99, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4702  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4703  -1, 120, 121, 122, 123, 124, 125, 126, 127, 128,
4704  129, -1, 131, 132, 52, 53, -1, -1, 56, 138,
4705  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4706  68, 69, 70, 71, 72, 73, 74, 75, 76, -1,
4707  -1, 79, 80, -1, -1, 83, 84, 85, 86, -1,
4708  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4709  98, 99, -1, -1, -1, -1, -1, -1, -1, -1,
4710  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4711  -1, -1, 120, 121, 122, 123, 124, 125, 126, 127,
4712  128, 129, -1, 131, 132, 52, 53, -1, -1, 56,
4713  138, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4714  -1, 68, 69, 70, 71, 72, 73, 74, 75, 76,
4715  -1, -1, 79, 80, -1, -1, 83, 84, 85, 86,
4716  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4717  -1, 98, 99, -1, -1, -1, -1, -1, -1, -1,
4718  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4719  -1, -1, -1, 120, 121, 122, 123, 124, 125, 126,
4720  127, 128, 129, -1, 131, 132, 52, 53, -1, -1,
4721  56, 138, -1, -1, -1, -1, -1, -1, -1, -1,
4722  -1, -1, 68, 69, 70, 71, 72, 73, 74, 75,
4723  76, -1, -1, 79, 80, -1, -1, 83, 84, 85,
4724  86, -1, -1, -1, -1, -1, -1, -1, -1, -1,
4725  -1, -1, 98, 99, 70, 71, 72, 73, 74, 75,
4726  76, 77, 78, 79, 80, 81, 82, -1, -1, 85,
4727  86, -1, -1, -1, 120, 121, 122, 123, 124, 125,
4728  126, 127, 128, 129, -1, 131, 132, -1, -1, -1,
4729  -1, -1, 138, -1, -1, -1, -1, -1, -1, -1,
4730  -1, -1, 118, -1, 120, 121, 122, 123, 124, 125,
4731  126, 127, 128, 129, -1, -1, -1, -1, -1, -1,
4732  -1, -1, -1, -1, -1, -1, -1, -1, -1, 145
4733 };
4734 
4735 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
4736  symbol of state STATE-NUM. */
4737 static const yytype_uint16 yystos[] =
4738 {
4739  0, 147, 148, 0, 1, 3, 4, 5, 6, 7,
4740  11, 12, 16, 18, 19, 20, 21, 22, 23, 24,
4741  30, 31, 32, 33, 34, 35, 36, 39, 45, 46,
4742  47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
4743  57, 59, 60, 61, 62, 64, 65, 66, 68, 69,
4744  89, 92, 93, 95, 96, 98, 101, 102, 103, 104,
4745  105, 106, 107, 108, 109, 130, 131, 132, 149, 150,
4746  151, 158, 160, 162, 164, 165, 168, 169, 170, 172,
4747  173, 174, 176, 177, 187, 190, 205, 224, 225, 226,
4748  227, 228, 229, 230, 231, 232, 233, 234, 261, 262,
4749  282, 283, 284, 285, 286, 287, 288, 291, 293, 294,
4750  308, 310, 311, 312, 313, 314, 315, 316, 317, 351,
4751  364, 151, 3, 4, 5, 6, 7, 8, 9, 10,
4752  11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
4753  21, 22, 23, 24, 25, 26, 30, 31, 32, 33,
4754  34, 35, 36, 37, 38, 39, 45, 46, 47, 48,
4755  49, 50, 51, 52, 53, 56, 68, 69, 70, 71,
4756  72, 73, 74, 75, 76, 79, 80, 83, 84, 85,
4757  86, 98, 99, 120, 121, 122, 123, 124, 125, 126,
4758  127, 128, 129, 131, 132, 138, 180, 181, 182, 183,
4759  185, 186, 308, 310, 39, 58, 89, 92, 98, 99,
4760  100, 103, 131, 169, 177, 187, 191, 197, 200, 202,
4761  224, 313, 314, 316, 317, 349, 350, 197, 197, 139,
4762  198, 199, 139, 194, 198, 139, 145, 358, 54, 182,
4763  358, 152, 134, 21, 22, 30, 31, 32, 168, 187,
4764  224, 187, 56, 1, 47, 92, 154, 155, 156, 158,
4765  171, 172, 364, 207, 208, 192, 202, 349, 364, 191,
4766  348, 349, 364, 46, 89, 130, 137, 176, 205, 224,
4767  313, 314, 317, 252, 253, 54, 55, 57, 180, 298,
4768  309, 297, 298, 299, 143, 289, 143, 295, 143, 292,
4769  143, 296, 312, 164, 187, 187, 142, 145, 357, 362,
4770  363, 40, 41, 42, 43, 44, 37, 38, 26, 134,
4771  194, 198, 267, 28, 259, 117, 137, 92, 98, 173,
4772  117, 70, 71, 72, 73, 74, 75, 76, 77, 78,
4773  79, 80, 81, 82, 85, 86, 118, 120, 121, 122,
4774  123, 124, 125, 126, 127, 128, 129, 189, 189, 87,
4775  88, 136, 144, 355, 206, 162, 163, 163, 211, 213,
4776  163, 357, 363, 89, 170, 177, 224, 240, 313, 314,
4777  317, 52, 56, 85, 89, 178, 179, 224, 313, 314,
4778  317, 179, 33, 34, 35, 36, 49, 50, 51, 52,
4779  56, 139, 180, 315, 346, 88, 355, 356, 267, 285,
4780  90, 90, 137, 191, 56, 191, 191, 191, 297, 117,
4781  91, 137, 201, 364, 88, 136, 355, 90, 90, 137,
4782  201, 197, 358, 359, 197, 196, 197, 202, 349, 364,
4783  162, 359, 162, 54, 65, 66, 159, 139, 188, 134,
4784  154, 88, 355, 90, 158, 157, 171, 140, 357, 363,
4785  359, 359, 158, 141, 137, 145, 361, 137, 361, 135,
4786  361, 358, 56, 312, 173, 175, 137, 88, 136, 355,
4787  254, 63, 110, 112, 113, 300, 113, 300, 113, 67,
4788  300, 113, 113, 290, 300, 113, 63, 113, 113, 113,
4789  290, 113, 63, 113, 70, 142, 151, 163, 163, 163,
4790  163, 158, 162, 162, 269, 268, 97, 166, 260, 98,
4791  164, 191, 202, 203, 204, 171, 137, 176, 137, 160,
4792  161, 164, 177, 187, 191, 193, 204, 224, 317, 187,
4793  187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
4794  187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
4795  187, 187, 187, 52, 53, 56, 185, 266, 352, 353,
4796  196, 52, 53, 56, 185, 265, 352, 153, 154, 13,
4797  236, 362, 236, 163, 163, 357, 17, 276, 56, 88,
4798  136, 355, 25, 162, 52, 56, 178, 121, 318, 88,
4799  136, 355, 219, 347, 220, 88, 144, 354, 52, 56,
4800  352, 161, 187, 193, 161, 193, 184, 115, 191, 98,
4801  191, 200, 349, 52, 56, 196, 52, 56, 350, 359,
4802  140, 359, 137, 137, 359, 182, 210, 187, 149, 135,
4803  352, 352, 193, 134, 359, 156, 209, 349, 137, 175,
4804  52, 56, 196, 52, 56, 52, 54, 55, 56, 57,
4805  58, 70, 92, 98, 99, 100, 124, 127, 139, 257,
4806  322, 324, 325, 326, 327, 328, 329, 330, 331, 334,
4807  335, 336, 337, 340, 341, 342, 343, 344, 302, 301,
4808  143, 300, 143, 143, 143, 187, 273, 274, 270, 271,
4809  167, 273, 191, 137, 359, 175, 137, 44, 117, 44,
4810  88, 136, 355, 358, 90, 90, 194, 198, 264, 358,
4811  360, 90, 90, 194, 198, 263, 10, 235, 8, 278,
4812  364, 154, 13, 154, 27, 237, 362, 237, 276, 202,
4813  235, 52, 56, 196, 52, 56, 215, 218, 319, 217,
4814  52, 56, 178, 196, 153, 162, 221, 222, 194, 195,
4815  198, 364, 182, 191, 191, 201, 90, 90, 360, 90,
4816  90, 349, 162, 135, 149, 359, 361, 173, 360, 92,
4817  98, 241, 242, 243, 326, 324, 255, 117, 137, 323,
4818  191, 137, 345, 364, 52, 137, 345, 137, 323, 52,
4819  137, 323, 52, 303, 54, 55, 57, 307, 317, 10,
4820  275, 135, 272, 270, 10, 98, 191, 175, 158, 187,
4821  52, 56, 196, 52, 56, 119, 161, 193, 161, 193,
4822  166, 194, 141, 90, 161, 193, 161, 193, 166, 195,
4823  191, 204, 279, 364, 15, 239, 364, 14, 238, 239,
4824  239, 212, 214, 235, 137, 236, 360, 163, 362, 163,
4825  153, 360, 235, 359, 139, 320, 321, 180, 267, 259,
4826  90, 137, 359, 135, 243, 137, 326, 137, 359, 249,
4827  358, 256, 191, 322, 328, 340, 342, 331, 336, 344,
4828  329, 337, 342, 327, 329, 304, 78, 122, 247, 248,
4829  364, 247, 135, 191, 360, 187, 161, 193, 91, 280,
4830  364, 154, 9, 281, 364, 163, 235, 235, 154, 154,
4831  191, 154, 237, 153, 362, 235, 324, 153, 324, 223,
4832  359, 242, 137, 98, 241, 140, 142, 29, 114, 258,
4833  137, 323, 137, 323, 345, 137, 323, 137, 323, 323,
4834  305, 244, 246, 249, 327, 329, 330, 332, 333, 336,
4835  338, 339, 342, 344, 153, 154, 89, 177, 224, 313,
4836  314, 317, 236, 154, 236, 235, 235, 239, 276, 277,
4837  216, 235, 359, 235, 362, 320, 137, 242, 137, 326,
4838  52, 250, 251, 325, 154, 154, 329, 342, 329, 329,
4839  306, 249, 122, 117, 137, 245, 89, 224, 137, 345,
4840  345, 137, 245, 137, 245, 56, 88, 136, 355, 154,
4841  154, 154, 153, 242, 137, 137, 358, 235, 135, 323,
4842  137, 323, 323, 323, 154, 122, 224, 244, 339, 342,
4843  56, 88, 332, 336, 329, 338, 342, 329, 52, 56,
4844  196, 52, 56, 278, 238, 235, 235, 242, 251, 329,
4845  111, 137, 245, 137, 245, 52, 56, 345, 137, 245,
4846  137, 245, 245, 360, 323, 329, 342, 329, 329, 245,
4847  137, 245, 245, 245, 329, 245
4848 };
4849 
4850 #define yyerrok (yyerrstatus = 0)
4851 #define yyclearin (yychar = YYEMPTY)
4852 #define YYEMPTY (-2)
4853 #define YYEOF 0
4854 
4855 #define YYACCEPT goto yyacceptlab
4856 #define YYABORT goto yyabortlab
4857 #define YYERROR goto yyerrorlab
4858 
4859 
4860 /* Like YYERROR except do call yyerror. This remains here temporarily
4861  to ease the transition to the new meaning of YYERROR, for GCC.
4862  Once GCC version 2 has supplanted version 1, this can go. */
4863 
4864 #define YYFAIL goto yyerrlab
4865 
4866 #define YYRECOVERING() (!!yyerrstatus)
4867 
4868 #define YYBACKUP(Token, Value) \
4869 do \
4870  if (yychar == YYEMPTY && yylen == 1) \
4871  { \
4872  yychar = (Token); \
4873  yylval = (Value); \
4874  yytoken = YYTRANSLATE (yychar); \
4875  YYPOPSTACK (1); \
4876  goto yybackup; \
4877  } \
4878  else \
4879  { \
4880  yyerror (&yylloc, parser, YY_("syntax error: cannot back up")); \
4881  YYERROR; \
4882  } \
4883 while (YYID (0))
4884 
4885 
4886 #define YYTERROR 1
4887 #define YYERRCODE 256
4888 
4889 
4890 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
4891  If N is 0, then set CURRENT to the empty location which ends
4892  the previous symbol: RHS[0] (always defined). */
4893 
4894 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
4895 #ifndef YYLLOC_DEFAULT
4896 # define YYLLOC_DEFAULT(Current, Rhs, N) \
4897  do \
4898  if (YYID (N)) \
4899  { \
4900  (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
4901  (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
4902  (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
4903  (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
4904  } \
4905  else \
4906  { \
4907  (Current).first_line = (Current).last_line = \
4908  YYRHSLOC (Rhs, 0).last_line; \
4909  (Current).first_column = (Current).last_column = \
4910  YYRHSLOC (Rhs, 0).last_column; \
4911  } \
4912  while (YYID (0))
4913 #endif
4914 
4915 
4916 /* YY_LOCATION_PRINT -- Print the location on the stream.
4917  This macro was not mandated originally: define only if we know
4918  we won't break user code: when these are the locations we know. */
4919 
4920 #ifndef YY_LOCATION_PRINT
4921 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
4922 # define YY_LOCATION_PRINT(File, Loc) \
4923  fprintf (File, "%d.%d-%d.%d", \
4924  (Loc).first_line, (Loc).first_column, \
4925  (Loc).last_line, (Loc).last_column)
4926 # else
4927 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
4928 # endif
4929 #endif
4930 
4931 
4932 /* YYLEX -- calling `yylex' with the right arguments. */
4933 
4934 #ifdef YYLEX_PARAM
4935 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
4936 #else
4937 # define YYLEX yylex (&yylval, &yylloc, parser)
4938 #endif
4939 
4940 /* Enable debugging if requested. */
4941 #if YYDEBUG
4942 
4943 # ifndef YYFPRINTF
4944 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
4945 # define YYFPRINTF fprintf
4946 # endif
4947 
4948 # define YYDPRINTF(Args) \
4949 do { \
4950  if (yydebug) \
4951  YYFPRINTF Args; \
4952 } while (YYID (0))
4953 
4954 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
4955 do { \
4956  if (yydebug) \
4957  { \
4958  YYFPRINTF (parser, "%s ", Title); \
4959  yy_symbol_print (stderr, \
4960  Type, Value, Location, parser); \
4961  YYFPRINTF (parser, "\n"); \
4962  } \
4963 } while (YYID (0))
4964 
4965 
4966 /*--------------------------------.
4967 | Print this symbol on YYOUTPUT. |
4968 `--------------------------------*/
4969 
4970 /*ARGSUSED*/
4971 #if (defined __STDC__ || defined __C99__FUNC__ \
4972  || defined __cplusplus || defined _MSC_VER)
4973 static void
4974 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *parser)
4975 #else
4976 static void
4977 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, parser)
4978  FILE *yyoutput;
4979  int yytype;
4980  YYSTYPE const * const yyvaluep;
4981  YYLTYPE const * const yylocationp;
4982  struct parser_params *parser;
4983 #endif
4984 {
4985  if (!yyvaluep)
4986  return;
4987  YYUSE (yylocationp);
4988  YYUSE (parser);
4989 # ifdef YYPRINT
4990  if (yytype < YYNTOKENS)
4991  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
4992 # else
4993  YYUSE (yyoutput);
4994 # endif
4995  switch (yytype)
4996  {
4997  default:
4998  break;
4999  }
5000 }
5001 
5002 
5003 /*--------------------------------.
5004 | Print this symbol on YYOUTPUT. |
5005 `--------------------------------*/
5006 
5007 #if (defined __STDC__ || defined __C99__FUNC__ \
5008  || defined __cplusplus || defined _MSC_VER)
5009 static void
5010 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct parser_params *parser)
5011 #else
5012 static void
5013 yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, parser)
5014  FILE *yyoutput;
5015  int yytype;
5016  YYSTYPE const * const yyvaluep;
5017  YYLTYPE const * const yylocationp;
5018  struct parser_params *parser;
5019 #endif
5020 {
5021  if (yytype < YYNTOKENS)
5022  YYFPRINTF (parser, "token %s (", yytname[yytype]);
5023  else
5024  YYFPRINTF (parser, "nterm %s (", yytname[yytype]);
5025 
5026  YY_LOCATION_PRINT (yyoutput, *yylocationp);
5027  YYFPRINTF (parser, ": ");
5028  yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, parser);
5029  YYFPRINTF (parser, ")");
5030 }
5031 
5032 /*------------------------------------------------------------------.
5033 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
5034 | TOP (included). |
5035 `------------------------------------------------------------------*/
5036 
5037 #if (defined __STDC__ || defined __C99__FUNC__ \
5038  || defined __cplusplus || defined _MSC_VER)
5039 static void
5040 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top, struct parser_params *parser)
5041 #else
5042 static void
5043 yy_stack_print (bottom, top, parser)
5044  yytype_int16 *bottom;
5045  yytype_int16 *top;
5046 #endif
5047 {
5048  YYFPRINTF (parser, "Stack now");
5049  for (; bottom <= top; ++bottom)
5050  YYFPRINTF (parser, " %d", *bottom);
5051  YYFPRINTF (parser, "\n");
5052 }
5053 
5054 # define YY_STACK_PRINT(Bottom, Top) \
5055 do { \
5056  if (yydebug) \
5057  yy_stack_print ((Bottom), (Top), parser); \
5058 } while (YYID (0))
5059 
5060 
5061 /*------------------------------------------------.
5062 | Report that the YYRULE is going to be reduced. |
5063 `------------------------------------------------*/
5064 
5065 #if (defined __STDC__ || defined __C99__FUNC__ \
5066  || defined __cplusplus || defined _MSC_VER)
5067 static void
5068 yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, struct parser_params *parser)
5069 #else
5070 static void
5071 yy_reduce_print (yyvsp, yylsp, yyrule, parser)
5072  YYSTYPE *yyvsp;
5073  YYLTYPE *yylsp;
5074  int yyrule;
5075  struct parser_params *parser;
5076 #endif
5077 {
5078  int yynrhs = yyr2[yyrule];
5079  int yyi;
5080  unsigned long int yylno = yyrline[yyrule];
5081  YYFPRINTF (parser, "Reducing stack by rule %d (line %lu):\n",
5082  yyrule - 1, yylno);
5083  /* The symbols being reduced. */
5084  for (yyi = 0; yyi < yynrhs; yyi++)
5085  {
5086  YYFPRINTF (parser, " $%d = ", yyi + 1);
5087  yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
5088  &(yyvsp[(yyi + 1) - (yynrhs)])
5089  , &(yylsp[(yyi + 1) - (yynrhs)]) , parser);
5090  YYFPRINTF (parser, "\n");
5091  }
5092 }
5093 
5094 # define YY_REDUCE_PRINT(Rule) \
5095 do { \
5096  if (yydebug) \
5097  yy_reduce_print (yyvsp, yylsp, Rule, parser); \
5098 } while (YYID (0))
5099 
5100 /* Nonzero means print parse trace. It is left uninitialized so that
5101  multiple parsers can coexist. */
5102 #ifndef yydebug
5103 int yydebug;
5104 #endif
5105 #else /* !YYDEBUG */
5106 # define YYDPRINTF(Args)
5107 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
5108 # define YY_STACK_PRINT(Bottom, Top)
5109 # define YY_REDUCE_PRINT(Rule)
5110 #endif /* !YYDEBUG */
5111 
5112 
5113 /* YYINITDEPTH -- initial size of the parser's stacks. */
5114 #ifndef YYINITDEPTH
5115 # define YYINITDEPTH 200
5116 #endif
5117 
5118 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
5119  if the built-in stack extension method is used).
5120 
5121  Do not make this value too large; the results are undefined if
5122  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
5123  evaluated with infinite-precision integer arithmetic. */
5124 
5125 #ifndef YYMAXDEPTH
5126 # define YYMAXDEPTH 10000
5127 #endif
5128 
5129 
5130 
5131 #if YYERROR_VERBOSE
5132 
5133 # ifndef yystrlen
5134 # if defined __GLIBC__ && defined _STRING_H
5135 # define yystrlen strlen
5136 # else
5137 /* Return the length of YYSTR. */
5138 #if (defined __STDC__ || defined __C99__FUNC__ \
5139  || defined __cplusplus || defined _MSC_VER)
5140 static YYSIZE_T
5141 yystrlen (const char *yystr)
5142 #else
5143 static YYSIZE_T
5144 yystrlen (yystr)
5145  const char *yystr;
5146 #endif
5147 {
5148  YYSIZE_T yylen;
5149  for (yylen = 0; yystr[yylen]; yylen++)
5150  continue;
5151  return yylen;
5152 }
5153 # endif
5154 # endif
5155 
5156 # ifndef yystpcpy
5157 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
5158 # define yystpcpy stpcpy
5159 # else
5160 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
5161  YYDEST. */
5162 #if (defined __STDC__ || defined __C99__FUNC__ \
5163  || defined __cplusplus || defined _MSC_VER)
5164 static char *
5165 yystpcpy (char *yydest, const char *yysrc)
5166 #else
5167 static char *
5168 yystpcpy (yydest, yysrc)
5169  char *yydest;
5170  const char *yysrc;
5171 #endif
5172 {
5173  char *yyd = yydest;
5174  const char *yys = yysrc;
5175 
5176  while ((*yyd++ = *yys++) != '\0')
5177  continue;
5178 
5179  return yyd - 1;
5180 }
5181 # endif
5182 # endif
5183 
5184 # ifndef yytnamerr
5185 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
5186  quotes and backslashes, so that it's suitable for yyerror. The
5187  heuristic is that double-quoting is unnecessary unless the string
5188  contains an apostrophe, a comma, or backslash (other than
5189  backslash-backslash). YYSTR is taken from yytname. If YYRES is
5190  null, do not copy; instead, return the length of what the result
5191  would have been. */
5192 static YYSIZE_T
5193 yytnamerr (char *yyres, const char *yystr)
5194 {
5195  if (*yystr == '"')
5196  {
5197  YYSIZE_T yyn = 0;
5198  char const *yyp = yystr;
5199 
5200  for (;;)
5201  switch (*++yyp)
5202  {
5203  case '\'':
5204  case ',':
5205  goto do_not_strip_quotes;
5206 
5207  case '\\':
5208  if (*++yyp != '\\')
5209  goto do_not_strip_quotes;
5210  /* Fall through. */
5211  default:
5212  if (yyres)
5213  yyres[yyn] = *yyp;
5214  yyn++;
5215  break;
5216 
5217  case '"':
5218  if (yyres)
5219  yyres[yyn] = '\0';
5220  return yyn;
5221  }
5222  do_not_strip_quotes: ;
5223  }
5224 
5225  if (! yyres)
5226  return yystrlen (yystr);
5227 
5228  return yystpcpy (yyres, yystr) - yyres;
5229 }
5230 # endif
5231 
5232 /* Copy into YYRESULT an error message about the unexpected token
5233  YYCHAR while in state YYSTATE. Return the number of bytes copied,
5234  including the terminating null byte. If YYRESULT is null, do not
5235  copy anything; just return the number of bytes that would be
5236  copied. As a special case, return 0 if an ordinary "syntax error"
5237  message will do. Return YYSIZE_MAXIMUM if overflow occurs during
5238  size calculation. */
5239 static YYSIZE_T
5240 yysyntax_error (char *yyresult, int yystate, int yychar)
5241 {
5242  int yyn = yypact[yystate];
5243 
5244  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
5245  return 0;
5246  else
5247  {
5248  int yytype = YYTRANSLATE (yychar);
5249  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
5250  YYSIZE_T yysize = yysize0;
5251  YYSIZE_T yysize1;
5252  int yysize_overflow = 0;
5253  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
5254  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
5255  int yyx;
5256 
5257 # if 0
5258  /* This is so xgettext sees the translatable formats that are
5259  constructed on the fly. */
5260  YY_("syntax error, unexpected %s");
5261  YY_("syntax error, unexpected %s, expecting %s");
5262  YY_("syntax error, unexpected %s, expecting %s or %s");
5263  YY_("syntax error, unexpected %s, expecting %s or %s or %s");
5264  YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
5265 # endif
5266  char *yyfmt;
5267  char const *yyf;
5268  static char const yyunexpected[] = "syntax error, unexpected %s";
5269  static char const yyexpecting[] = ", expecting %s";
5270  static char const yyor[] = " or %s";
5271  char yyformat[sizeof yyunexpected
5272  + sizeof yyexpecting - 1
5273  + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
5274  * (sizeof yyor - 1))];
5275  char const *yyprefix = yyexpecting;
5276 
5277  /* Start YYX at -YYN if negative to avoid negative indexes in
5278  YYCHECK. */
5279  int yyxbegin = yyn < 0 ? -yyn : 0;
5280 
5281  /* Stay within bounds of both yycheck and yytname. */
5282  int yychecklim = YYLAST - yyn + 1;
5283  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
5284  int yycount = 1;
5285 
5286  yyarg[0] = yytname[yytype];
5287  yyfmt = yystpcpy (yyformat, yyunexpected);
5288 
5289  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
5290  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
5291  {
5292  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
5293  {
5294  yycount = 1;
5295  yysize = yysize0;
5296  yyformat[sizeof yyunexpected - 1] = '\0';
5297  break;
5298  }
5299  yyarg[yycount++] = yytname[yyx];
5300  yysize1 = yysize + yytnamerr (0, yytname[yyx]);
5301  yysize_overflow |= (yysize1 < yysize);
5302  yysize = yysize1;
5303  yyfmt = yystpcpy (yyfmt, yyprefix);
5304  yyprefix = yyor;
5305  }
5306 
5307  yyf = YY_(yyformat);
5308  yysize1 = yysize + yystrlen (yyf);
5309  yysize_overflow |= (yysize1 < yysize);
5310  yysize = yysize1;
5311 
5312  if (yysize_overflow)
5313  return YYSIZE_MAXIMUM;
5314 
5315  if (yyresult)
5316  {
5317  /* Avoid sprintf, as that infringes on the user's name space.
5318  Don't have undefined behavior even if the translation
5319  produced a string with the wrong number of "%s"s. */
5320  char *yyp = yyresult;
5321  int yyi = 0;
5322  while ((*yyp = *yyf) != '\0')
5323  {
5324  if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
5325  {
5326  yyp += yytnamerr (yyp, yyarg[yyi++]);
5327  yyf += 2;
5328  }
5329  else
5330  {
5331  yyp++;
5332  yyf++;
5333  }
5334  }
5335  }
5336  return yysize;
5337  }
5338 }
5339 #endif /* YYERROR_VERBOSE */
5340 
5341 
5342 /*-----------------------------------------------.
5343 | Release the memory associated to this symbol. |
5344 `-----------------------------------------------*/
5345 
5346 /*ARGSUSED*/
5347 #if (defined __STDC__ || defined __C99__FUNC__ \
5348  || defined __cplusplus || defined _MSC_VER)
5349 static void
5350 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct parser_params *parser)
5351 #else
5352 static void
5353 yydestruct (yymsg, yytype, yyvaluep, yylocationp, parser)
5354  const char *yymsg;
5355  int yytype;
5356  YYSTYPE *yyvaluep;
5357  YYLTYPE *yylocationp;
5358  struct parser_params *parser;
5359 #endif
5360 {
5361  YYUSE (yyvaluep);
5362  YYUSE (yylocationp);
5363  YYUSE (parser);
5364 
5365  if (!yymsg)
5366  yymsg = "Deleting";
5367  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
5368 
5369  switch (yytype)
5370  {
5371 
5372  default:
5373  break;
5374  }
5375 }
5376 
5377 
5378 /* Prevent warnings from -Wmissing-prototypes. */
5379 
5380 #ifdef YYPARSE_PARAM
5381 #if defined __STDC__ || defined __cplusplus
5382 int yyparse (void *YYPARSE_PARAM);
5383 #else
5384 int yyparse ();
5385 #endif
5386 #else /* ! YYPARSE_PARAM */
5387 #if defined __STDC__ || defined __cplusplus
5388 int yyparse (struct parser_params *parser);
5389 #else
5390 int yyparse ();
5391 #endif
5392 #endif /* ! YYPARSE_PARAM */
5393 
5394 
5395 
5396 
5397 
5398 
5399 /*----------.
5400 | yyparse. |
5401 `----------*/
5402 
5403 #ifdef YYPARSE_PARAM
5404 #if (defined __STDC__ || defined __C99__FUNC__ \
5405  || defined __cplusplus || defined _MSC_VER)
5406 int
5407 yyparse (void *YYPARSE_PARAM)
5408 #else
5409 int
5410 yyparse (YYPARSE_PARAM)
5411  void *YYPARSE_PARAM;
5412 #endif
5413 #else /* ! YYPARSE_PARAM */
5414 #if (defined __STDC__ || defined __C99__FUNC__ \
5415  || defined __cplusplus || defined _MSC_VER)
5416 int
5417 yyparse (struct parser_params *parser)
5418 #else
5419 int
5420 yyparse (parser)
5421  struct parser_params *parser;
5422 #endif
5423 #endif
5424 {
5425  /* The look-ahead symbol. */
5426 int yychar;
5427 
5428 /* The semantic value of the look-ahead symbol. */
5429 YYSTYPE yylval;
5430 
5431 /* Number of syntax errors so far. */
5432 int yynerrs;
5433 /* Location data for the look-ahead symbol. */
5434 YYLTYPE yylloc;
5435 
5436  int yystate;
5437  int yyn;
5438  int yyresult;
5439  /* Number of tokens to shift before error messages enabled. */
5440  int yyerrstatus;
5441  /* Look-ahead token as an internal (translated) token number. */
5442  int yytoken = 0;
5443 #if YYERROR_VERBOSE
5444  /* Buffer for error messages, and its allocated size. */
5445  char yymsgbuf[128];
5446  char *yymsg = yymsgbuf;
5447  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
5448 #endif
5449 
5450  /* Three stacks and their tools:
5451  `yyss': related to states,
5452  `yyvs': related to semantic values,
5453  `yyls': related to locations.
5454 
5455  Refer to the stacks thru separate pointers, to allow yyoverflow
5456  to reallocate them elsewhere. */
5457 
5458  /* The state stack. */
5459  yytype_int16 yyssa[YYINITDEPTH];
5460  yytype_int16 *yyss = yyssa;
5461  yytype_int16 *yyssp;
5462 
5463  /* The semantic value stack. */
5464  YYSTYPE yyvsa[YYINITDEPTH];
5465  YYSTYPE *yyvs = yyvsa;
5466  YYSTYPE *yyvsp;
5467 
5468  /* The location stack. */
5469  YYLTYPE yylsa[YYINITDEPTH];
5470  YYLTYPE *yyls = yylsa;
5471  YYLTYPE *yylsp;
5472  /* The locations where the error started and ended. */
5473  YYLTYPE yyerror_range[2];
5474 
5475 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
5476 
5477  YYSIZE_T yystacksize = YYINITDEPTH;
5478 
5479  /* The variables used to return semantic value and location from the
5480  action routines. */
5481  YYSTYPE yyval;
5482  YYLTYPE yyloc;
5483 
5484  /* The number of symbols on the RHS of the reduced rule.
5485  Keep to zero when no symbol should be popped. */
5486  int yylen = 0;
5487 
5488  YYDPRINTF ((parser, "Starting parse\n"));
5489 
5490  yystate = 0;
5491  yyerrstatus = 0;
5492  yynerrs = 0;
5493  yychar = YYEMPTY; /* Cause a token to be read. */
5494 
5495  /* Initialize stack pointers.
5496  Waste one element of value and location stack
5497  so that they stay on the same level as the state stack.
5498  The wasted elements are never initialized. */
5499 
5500  yyssp = yyss;
5501  yyvsp = yyvs;
5502  yylsp = yyls;
5503 #if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
5504  /* Initialize the default location before parsing starts. */
5505  yylloc.first_line = yylloc.last_line = 1;
5506  yylloc.first_column = yylloc.last_column = 0;
5507 #endif
5508 
5509  goto yysetstate;
5510 
5511 /*------------------------------------------------------------.
5512 | yynewstate -- Push a new state, which is found in yystate. |
5513 `------------------------------------------------------------*/
5514  yynewstate:
5515  /* In all cases, when you get here, the value and location stacks
5516  have just been pushed. So pushing a state here evens the stacks. */
5517  yyssp++;
5518 
5519  yysetstate:
5520  *yyssp = yystate;
5521 
5522  if (yyss + yystacksize - 1 <= yyssp)
5523  {
5524  /* Get the current used size of the three stacks, in elements. */
5525  YYSIZE_T yysize = yyssp - yyss + 1;
5526 
5527 #ifdef yyoverflow
5528  {
5529  /* Give user a chance to reallocate the stack. Use copies of
5530  these so that the &'s don't force the real ones into
5531  memory. */
5532  YYSTYPE *yyvs1 = yyvs;
5533  yytype_int16 *yyss1 = yyss;
5534  YYLTYPE *yyls1 = yyls;
5535 
5536  /* Each stack pointer address is followed by the size of the
5537  data in use in that stack, in bytes. This used to be a
5538  conditional around just the two extra args, but that might
5539  be undefined if yyoverflow is a macro. */
5540  yyoverflow (YY_("memory exhausted"),
5541  &yyss1, yysize * sizeof (*yyssp),
5542  &yyvs1, yysize * sizeof (*yyvsp),
5543  &yyls1, yysize * sizeof (*yylsp),
5544  &yystacksize);
5545  yyls = yyls1;
5546  yyss = yyss1;
5547  yyvs = yyvs1;
5548  }
5549 #else /* no yyoverflow */
5550 # ifndef YYSTACK_RELOCATE
5551  goto yyexhaustedlab;
5552 # else
5553  /* Extend the stack our own way. */
5554  if (YYMAXDEPTH <= yystacksize)
5555  goto yyexhaustedlab;
5556  yystacksize *= 2;
5557  if (YYMAXDEPTH < yystacksize)
5558  yystacksize = YYMAXDEPTH;
5559 
5560  {
5561  yytype_int16 *yyss1 = yyss;
5562  union yyalloc *yyptr =
5563  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
5564  if (! yyptr)
5565  goto yyexhaustedlab;
5566  YYSTACK_RELOCATE (yyss);
5567  YYSTACK_RELOCATE (yyvs);
5568  YYSTACK_RELOCATE (yyls);
5569 # undef YYSTACK_RELOCATE
5570  if (yyss1 != yyssa)
5571  YYSTACK_FREE (yyss1);
5572  }
5573 # endif
5574 #endif /* no yyoverflow */
5575 
5576  yyssp = yyss + yysize - 1;
5577  yyvsp = yyvs + yysize - 1;
5578  yylsp = yyls + yysize - 1;
5579 
5580  YYDPRINTF ((parser, "Stack size increased to %lu\n",
5581  (unsigned long int) yystacksize));
5582 
5583  if (yyss + yystacksize - 1 <= yyssp)
5584  YYABORT;
5585  }
5586 
5587  YYDPRINTF ((parser, "Entering state %d\n", yystate));
5588 
5589  goto yybackup;
5590 
5591 /*-----------.
5592 | yybackup. |
5593 `-----------*/
5594 yybackup:
5595 
5596  /* Do appropriate processing given the current state. Read a
5597  look-ahead token if we need one and don't already have one. */
5598 
5599  /* First try to decide what to do without reference to look-ahead token. */
5600  yyn = yypact[yystate];
5601  if (yyn == YYPACT_NINF)
5602  goto yydefault;
5603 
5604  /* Not known => get a look-ahead token if don't already have one. */
5605 
5606  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
5607  if (yychar == YYEMPTY)
5608  {
5609  YYDPRINTF ((parser, "Reading a token: "));
5610  yychar = YYLEX;
5611  }
5612 
5613  if (yychar <= YYEOF)
5614  {
5615  yychar = yytoken = YYEOF;
5616  YYDPRINTF ((parser, "Now at end of input.\n"));
5617  }
5618  else
5619  {
5620  yytoken = YYTRANSLATE (yychar);
5621  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
5622  }
5623 
5624  /* If the proper action on seeing token YYTOKEN is to reduce or to
5625  detect an error, take that action. */
5626  yyn += yytoken;
5627  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
5628  goto yydefault;
5629  yyn = yytable[yyn];
5630  if (yyn <= 0)
5631  {
5632  if (yyn == 0 || yyn == YYTABLE_NINF)
5633  goto yyerrlab;
5634  yyn = -yyn;
5635  goto yyreduce;
5636  }
5637 
5638  if (yyn == YYFINAL)
5639  YYACCEPT;
5640 
5641  /* Count tokens shifted since error; after three, turn off error
5642  status. */
5643  if (yyerrstatus)
5644  yyerrstatus--;
5645 
5646  /* Shift the look-ahead token. */
5647  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
5648 
5649  /* Discard the shifted token unless it is eof. */
5650  if (yychar != YYEOF)
5651  yychar = YYEMPTY;
5652 
5653  yystate = yyn;
5654  *++yyvsp = yylval;
5655  *++yylsp = yylloc;
5656  goto yynewstate;
5657 
5658 
5659 /*-----------------------------------------------------------.
5660 | yydefault -- do the default action for the current state. |
5661 `-----------------------------------------------------------*/
5662 yydefault:
5663  yyn = yydefact[yystate];
5664  if (yyn == 0)
5665  goto yyerrlab;
5666  goto yyreduce;
5667 
5668 
5669 /*-----------------------------.
5670 | yyreduce -- Do a reduction. |
5671 `-----------------------------*/
5672 yyreduce:
5673  /* yyn is the number of a rule to reduce with. */
5674  yylen = yyr2[yyn];
5675 
5676  /* If YYLEN is nonzero, implement the default value of the action:
5677  `$$ = $1'.
5678 
5679  Otherwise, the following line sets YYVAL to garbage.
5680  This behavior is undocumented and Bison
5681  users should not rely upon it. Assigning to YYVAL
5682  unconditionally makes the parser a bit smaller, and it avoids a
5683  GCC warning that YYVAL may be used uninitialized. */
5684  yyval = yyvsp[1-yylen];
5685 
5686  /* Default location. */
5687  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
5688  YY_REDUCE_PRINT (yyn);
5689  switch (yyn)
5690  {
5691  case 2:
5692 #line 1064 "parse.y"
5693  {
5694  SET_LEX_STATE(EXPR_BEG);
5695  /*%%%*/
5697  /*%
5698  local_push(0);
5699  %*/
5700  ;}
5701  break;
5702 
5703  case 3:
5704 #line 1073 "parse.y"
5705  {
5706  /*%%%*/
5707  if ((yyvsp[(2) - (2)].node) && !compile_for_eval) {
5708  /* last expression should not be void */
5709  if (nd_type((yyvsp[(2) - (2)].node)) != NODE_BLOCK) void_expr((yyvsp[(2) - (2)].node));
5710  else {
5711  NODE *node = (yyvsp[(2) - (2)].node);
5712  while (node->nd_next) {
5713  node = node->nd_next;
5714  }
5715  void_expr(node->nd_head);
5716  }
5717  }
5718  ruby_eval_tree = new_scope(0, block_append(ruby_eval_tree, (yyvsp[(2) - (2)].node), (yylsp[(1) - (2)]).first_column), (yylsp[(1) - (2)]).first_column);
5719  /*%
5720  $$ = $2;
5721  parser->result = dispatch1(program, $$);
5722  %*/
5723  local_pop();
5724  ;}
5725  break;
5726 
5727  case 4:
5728 #line 1096 "parse.y"
5729  {
5730  /*%%%*/
5731  void_stmts((yyvsp[(1) - (2)].node));
5732  /*%
5733  %*/
5734  (yyval.node) = (yyvsp[(1) - (2)].node);
5735  ;}
5736  break;
5737 
5738  case 5:
5739 #line 1106 "parse.y"
5740  {
5741  /*%%%*/
5742  (yyval.node) = new_begin(0, (yylsp[(1) - (1)]).first_column);
5743  /*%
5744  $$ = dispatch2(stmts_add, dispatch0(stmts_new),
5745  dispatch0(void_stmt));
5746  %*/
5747  ;}
5748  break;
5749 
5750  case 6:
5751 #line 1115 "parse.y"
5752  {
5753  /*%%%*/
5754  (yyval.node) = newline_node((yyvsp[(1) - (1)].node));
5755  /*%
5756  $$ = dispatch2(stmts_add, dispatch0(stmts_new), $1);
5757  %*/
5758  ;}
5759  break;
5760 
5761  case 7:
5762 #line 1123 "parse.y"
5763  {
5764  /*%%%*/
5765  (yyval.node) = block_append((yyvsp[(1) - (3)].node), newline_node((yyvsp[(3) - (3)].node)), (yylsp[(1) - (3)]).first_column);
5766  /*%
5767  $$ = dispatch2(stmts_add, $1, $3);
5768  %*/
5769  ;}
5770  break;
5771 
5772  case 8:
5773 #line 1131 "parse.y"
5774  {
5775  (yyval.node) = remove_begin((yyvsp[(2) - (2)].node));
5776  ;}
5777  break;
5778 
5779  case 10:
5780 #line 1138 "parse.y"
5781  {
5782  /*%%%*/
5783  /* local_push(0); */
5784  /*%
5785  %*/
5786  ;}
5787  break;
5788 
5789  case 11:
5790 #line 1145 "parse.y"
5791  {
5792  /*%%%*/
5794  (yyvsp[(4) - (5)].node), (yylsp[(1) - (5)]).first_column);
5795  /* NEW_PREEXE($4)); */
5796  /* local_pop(); */
5797  (yyval.node) = new_begin(0, (yylsp[(1) - (5)]).first_column);
5798  /*%
5799  $$ = dispatch1(BEGIN, $4);
5800  %*/
5801  ;}
5802  break;
5803 
5804  case 12:
5805 #line 1162 "parse.y"
5806  {
5807  /*%%%*/
5808  (yyval.node) = (yyvsp[(1) - (4)].node);
5809  if ((yyvsp[(2) - (4)].node)) {
5810  (yyval.node) = new_rescue((yyvsp[(1) - (4)].node), (yyvsp[(2) - (4)].node), (yyvsp[(3) - (4)].node), (yylsp[(1) - (4)]).first_column);
5811  }
5812  else if ((yyvsp[(3) - (4)].node)) {
5813  rb_warn0("else without rescue is useless");
5814  (yyval.node) = block_append((yyval.node), (yyvsp[(3) - (4)].node), (yylsp[(1) - (4)]).first_column);
5815  }
5816  if ((yyvsp[(4) - (4)].node)) {
5817  if ((yyval.node)) {
5818  (yyval.node) = NEW_ENSURE((yyval.node), (yyvsp[(4) - (4)].node));
5819  nd_set_column((yyval.node), (yylsp[(1) - (4)]).first_column);
5820  }
5821  else {
5822  NODE *nil = NEW_NIL();
5823  nd_set_column(nil, (yylsp[(1) - (4)]).first_column);
5824  (yyval.node) = block_append((yyvsp[(4) - (4)].node), nil, (yylsp[(1) - (4)]).first_column);
5825  }
5826  }
5827  fixpos((yyval.node), (yyvsp[(1) - (4)].node));
5828  /*%
5829  $$ = dispatch4(bodystmt,
5830  escape_Qundef($1),
5831  escape_Qundef($2),
5832  escape_Qundef($3),
5833  escape_Qundef($4));
5834  %*/
5835  ;}
5836  break;
5837 
5838  case 13:
5839 #line 1195 "parse.y"
5840  {
5841  /*%%%*/
5842  void_stmts((yyvsp[(1) - (2)].node));
5843  /*%
5844  %*/
5845  (yyval.node) = (yyvsp[(1) - (2)].node);
5846  ;}
5847  break;
5848 
5849  case 14:
5850 #line 1205 "parse.y"
5851  {
5852  /*%%%*/
5853  (yyval.node) = new_begin(0, (yylsp[(1) - (1)]).first_column);
5854  /*%
5855  $$ = dispatch2(stmts_add, dispatch0(stmts_new),
5856  dispatch0(void_stmt));
5857  %*/
5858  ;}
5859  break;
5860 
5861  case 15:
5862 #line 1214 "parse.y"
5863  {
5864  /*%%%*/
5865  (yyval.node) = newline_node((yyvsp[(1) - (1)].node));
5866  /*%
5867  $$ = dispatch2(stmts_add, dispatch0(stmts_new), $1);
5868  %*/
5869  ;}
5870  break;
5871 
5872  case 16:
5873 #line 1222 "parse.y"
5874  {
5875  /*%%%*/
5876  (yyval.node) = block_append((yyvsp[(1) - (3)].node), newline_node((yyvsp[(3) - (3)].node)), (yylsp[(1) - (3)]).first_column);
5877  /*%
5878  $$ = dispatch2(stmts_add, $1, $3);
5879  %*/
5880  ;}
5881  break;
5882 
5883  case 17:
5884 #line 1230 "parse.y"
5885  {
5886  (yyval.node) = remove_begin((yyvsp[(2) - (2)].node));
5887  ;}
5888  break;
5889 
5890  case 18:
5891 #line 1236 "parse.y"
5892  {
5893  (yyval.node) = (yyvsp[(1) - (1)].node);
5894  ;}
5895  break;
5896 
5897  case 19:
5898 #line 1240 "parse.y"
5899  {
5900  yyerror0("BEGIN is permitted only at toplevel");
5901  /*%%%*/
5902  /* local_push(0); */
5903  /*%
5904  %*/
5905  ;}
5906  break;
5907 
5908  case 20:
5909 #line 1248 "parse.y"
5910  {
5911  /*%%%*/
5913  (yyvsp[(4) - (5)].node), (yylsp[(1) - (5)]).first_column);
5914  /* NEW_PREEXE($4)); */
5915  /* local_pop(); */
5916  (yyval.node) = new_begin(0, (yylsp[(1) - (5)]).first_column);
5917  /*%
5918  $$ = dispatch1(BEGIN, $4);
5919  %*/
5920  ;}
5921  break;
5922 
5923  case 21:
5924 #line 1261 "parse.y"
5925  {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);;}
5926  break;
5927 
5928  case 22:
5929 #line 1262 "parse.y"
5930  {
5931  /*%%%*/
5932  (yyval.node) = NEW_ALIAS((yyvsp[(2) - (4)].node), (yyvsp[(4) - (4)].node));
5933  nd_set_column((yyval.node), (yylsp[(1) - (4)]).first_column);
5934  /*%
5935  $$ = dispatch2(alias, $2, $4);
5936  %*/
5937  ;}
5938  break;
5939 
5940  case 23:
5941 #line 1271 "parse.y"
5942  {
5943  /*%%%*/
5944  (yyval.node) = NEW_VALIAS((yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].id));
5945  nd_set_column((yyval.node), (yylsp[(1) - (3)]).first_column);
5946  /*%
5947  $$ = dispatch2(var_alias, $2, $3);
5948  %*/
5949  ;}
5950  break;
5951 
5952  case 24:
5953 #line 1280 "parse.y"
5954  {
5955  /*%%%*/
5956  char buf[2];
5957  buf[0] = '$';
5958  buf[1] = (char)(yyvsp[(3) - (3)].node)->nd_nth;
5959  (yyval.node) = NEW_VALIAS((yyvsp[(2) - (3)].id), rb_intern2(buf, 2));
5960  nd_set_column((yyval.node), (yylsp[(1) - (3)]).first_column);
5961  /*%
5962  $$ = dispatch2(var_alias, $2, $3);
5963  %*/
5964  ;}
5965  break;
5966 
5967  case 25:
5968 #line 1292 "parse.y"
5969  {
5970  /*%%%*/
5971  yyerror0("can't make alias for the number variables");
5972  (yyval.node) = new_begin(0, (yylsp[(1) - (3)]).first_column);
5973  /*%
5974  $$ = dispatch2(var_alias, $2, $3);
5975  $$ = dispatch1(alias_error, $$);
5976  ripper_error();
5977  %*/
5978  ;}
5979  break;
5980 
5981  case 26:
5982 #line 1303 "parse.y"
5983  {
5984  /*%%%*/
5985  (yyval.node) = (yyvsp[(2) - (2)].node);
5986  /*%
5987  $$ = dispatch1(undef, $2);
5988  %*/
5989  ;}
5990  break;
5991 
5992  case 27:
5993 #line 1311 "parse.y"
5994  {
5995  /*%%%*/
5996  (yyval.node) = new_if((yyvsp[(3) - (3)].node), remove_begin((yyvsp[(1) - (3)].node)), 0, (yylsp[(1) - (3)]).first_column);
5997  fixpos((yyval.node), (yyvsp[(3) - (3)].node));
5998  /*%
5999  $$ = dispatch2(if_mod, $3, $1);
6000  %*/
6001  ;}
6002  break;
6003 
6004  case 28:
6005 #line 1320 "parse.y"
6006  {
6007  /*%%%*/
6008  (yyval.node) = new_unless((yyvsp[(3) - (3)].node), remove_begin((yyvsp[(1) - (3)].node)), 0, (yylsp[(1) - (3)]).first_column);
6009  fixpos((yyval.node), (yyvsp[(3) - (3)].node));
6010  /*%
6011  $$ = dispatch2(unless_mod, $3, $1);
6012  %*/
6013  ;}
6014  break;
6015 
6016  case 29:
6017 #line 1329 "parse.y"
6018  {
6019  /*%%%*/
6020  if ((yyvsp[(1) - (3)].node) && nd_type((yyvsp[(1) - (3)].node)) == NODE_BEGIN) {
6021  (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column), (yyvsp[(1) - (3)].node)->nd_body, 0);
6022  }
6023  else {
6024  (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column), (yyvsp[(1) - (3)].node), 1);
6025  }
6026  nd_set_column((yyval.node), (yylsp[(1) - (3)]).first_column);
6027  /*%
6028  $$ = dispatch2(while_mod, $3, $1);
6029  %*/
6030  ;}
6031  break;
6032 
6033  case 30:
6034 #line 1343 "parse.y"
6035  {
6036  /*%%%*/
6037  if ((yyvsp[(1) - (3)].node) && nd_type((yyvsp[(1) - (3)].node)) == NODE_BEGIN) {
6038  (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column), (yyvsp[(1) - (3)].node)->nd_body, 0);
6039  }
6040  else {
6041  (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column), (yyvsp[(1) - (3)].node), 1);
6042  }
6043  nd_set_column((yyval.node), (yylsp[(1) - (3)]).first_column);
6044  /*%
6045  $$ = dispatch2(until_mod, $3, $1);
6046  %*/
6047  ;}
6048  break;
6049 
6050  case 31:
6051 #line 1357 "parse.y"
6052  {
6053  /*%%%*/
6054  NODE *resq = new_resbody(0, remove_begin((yyvsp[(3) - (3)].node)), 0, (yylsp[(1) - (3)]).first_column);
6055  (yyval.node) = new_rescue(remove_begin((yyvsp[(1) - (3)].node)), resq, 0, (yylsp[(1) - (3)]).first_column);
6056  nd_set_column(resq, (yylsp[(1) - (3)]).first_column);
6057  /*%
6058  $$ = dispatch2(rescue_mod, $1, $3);
6059  %*/
6060  ;}
6061  break;
6062 
6063  case 32:
6064 #line 1367 "parse.y"
6065  {
6066  if (in_def || in_single) {
6067  rb_warn0("END in method; use at_exit");
6068  }
6069  /*%%%*/
6070  {
6071  NODE *scope = NEW_NODE(
6072  NODE_SCOPE, 0 /* tbl */, (yyvsp[(3) - (4)].node) /* body */, 0 /* args */);
6073  (yyval.node) = NEW_POSTEXE(scope);
6074  nd_set_column(scope, (yylsp[(1) - (4)]).first_column);
6075  nd_set_column((yyval.node), (yylsp[(1) - (4)]).first_column);
6076  }
6077  /*%
6078  $$ = dispatch1(END, $3);
6079  %*/
6080  ;}
6081  break;
6082 
6083  case 34:
6084 #line 1385 "parse.y"
6085  {
6086  /*%%%*/
6087  value_expr((yyvsp[(3) - (3)].node));
6088  (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node);
6089  (yyval.node) = (yyvsp[(1) - (3)].node);
6090  /*%
6091  $$ = dispatch2(massign, $1, $3);
6092  %*/
6093  ;}
6094  break;
6095 
6096  case 35:
6097 #line 1395 "parse.y"
6098  {
6099  value_expr((yyvsp[(3) - (3)].node));
6100  (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
6101  ;}
6102  break;
6103 
6104  case 36:
6105 #line 1400 "parse.y"
6106  {
6107  /*%%%*/
6108  (yyvsp[(1) - (3)].node)->nd_value = (yyvsp[(3) - (3)].node);
6109  (yyval.node) = (yyvsp[(1) - (3)].node);
6110  /*%
6111  $$ = dispatch2(massign, $1, $3);
6112  %*/
6113  ;}
6114  break;
6115 
6116  case 38:
6117 #line 1412 "parse.y"
6118  {
6119  value_expr((yyvsp[(3) - (3)].node));
6120  (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
6121  ;}
6122  break;
6123 
6124  case 39:
6125 #line 1417 "parse.y"
6126  {
6127  value_expr((yyvsp[(3) - (3)].node));
6128  (yyval.node) = new_op_assign((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
6129  ;}
6130  break;
6131 
6132  case 40:
6133 #line 1422 "parse.y"
6134  {
6135  /*%%%*/
6136  NODE *args;
6137 
6138  value_expr((yyvsp[(6) - (6)].node));
6139  if (!(yyvsp[(3) - (6)].node)) (yyvsp[(3) - (6)].node) = new_zarray((yylsp[(1) - (6)]).first_column);
6140  args = arg_concat((yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node), (yylsp[(1) - (6)]).first_column);
6141  if ((yyvsp[(5) - (6)].id) == tOROP) {
6142  (yyvsp[(5) - (6)].id) = 0;
6143  }
6144  else if ((yyvsp[(5) - (6)].id) == tANDOP) {
6145  (yyvsp[(5) - (6)].id) = 1;
6146  }
6147  (yyval.node) = NEW_OP_ASGN1((yyvsp[(1) - (6)].node), (yyvsp[(5) - (6)].id), args);
6148  fixpos((yyval.node), (yyvsp[(1) - (6)].node));
6149  nd_set_column((yyval.node), (yylsp[(1) - (6)]).first_column);
6150  /*%
6151  $$ = dispatch2(aref_field, $1, escape_Qundef($3));
6152  $$ = dispatch3(opassign, $$, $5, $6);
6153  %*/
6154  ;}
6155  break;
6156 
6157  case 41:
6158 #line 1444 "parse.y"
6159  {
6160  value_expr((yyvsp[(5) - (5)].node));
6161  (yyval.node) = new_attr_op_assign((yyvsp[(1) - (5)].node), (yyvsp[(2) - (5)].id), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node), (yylsp[(1) - (5)]).first_column);
6162  ;}
6163  break;
6164 
6165  case 42:
6166 #line 1449 "parse.y"
6167  {
6168  value_expr((yyvsp[(5) - (5)].node));
6169  (yyval.node) = new_attr_op_assign((yyvsp[(1) - (5)].node), (yyvsp[(2) - (5)].id), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node), (yylsp[(1) - (5)]).first_column);
6170  ;}
6171  break;
6172 
6173  case 43:
6174 #line 1454 "parse.y"
6175  {
6176  (yyval.node) = const_path_field((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yylsp[(1) - (5)]).first_column);
6177  (yyval.node) = new_const_op_assign((yyval.node), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node), (yylsp[(1) - (5)]).first_column);
6178  ;}
6179  break;
6180 
6181  case 44:
6182 #line 1459 "parse.y"
6183  {
6184  value_expr((yyvsp[(5) - (5)].node));
6185  (yyval.node) = new_attr_op_assign((yyvsp[(1) - (5)].node), ID2VAL(idCOLON2), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node), (yylsp[(1) - (5)]).first_column);
6186  ;}
6187  break;
6188 
6189  case 45:
6190 #line 1464 "parse.y"
6191  {
6192  (yyvsp[(1) - (3)].node) = var_field((yyvsp[(1) - (3)].node));
6193  (yyval.node) = backref_assign_error((yyvsp[(1) - (3)].node), node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column), (yylsp[(1) - (3)]).first_column);
6194  ;}
6195  break;
6196 
6197  case 46:
6198 #line 1471 "parse.y"
6199  {
6200  /*%%%*/
6201  value_expr((yyvsp[(1) - (1)].node));
6202  (yyval.node) = (yyvsp[(1) - (1)].node);
6203  /*%
6204  %*/
6205  ;}
6206  break;
6207 
6208  case 47:
6209 #line 1479 "parse.y"
6210  {
6211  /*%%%*/
6212  value_expr((yyvsp[(1) - (3)].node));
6213  (yyval.node) = new_rescue((yyvsp[(1) - (3)].node), new_resbody(0, remove_begin((yyvsp[(3) - (3)].node)), 0, (yylsp[(1) - (3)]).first_column), 0, (yylsp[(1) - (3)]).first_column);
6214  /*%
6215  $$ = dispatch2(rescue_mod, $1, $3);
6216  %*/
6217  ;}
6218  break;
6219 
6220  case 50:
6221 #line 1492 "parse.y"
6222  {
6223  (yyval.node) = logop(idAND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
6224  ;}
6225  break;
6226 
6227  case 51:
6228 #line 1496 "parse.y"
6229  {
6230  (yyval.node) = logop(idOR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
6231  ;}
6232  break;
6233 
6234  case 52:
6235 #line 1500 "parse.y"
6236  {
6237  (yyval.node) = call_uni_op(method_cond((yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column), METHOD_NOT, (yylsp[(1) - (3)]).first_column);
6238  ;}
6239  break;
6240 
6241  case 53:
6242 #line 1504 "parse.y"
6243  {
6244  (yyval.node) = call_uni_op(method_cond((yyvsp[(2) - (2)].node), (yylsp[(1) - (2)]).first_column), '!', (yylsp[(1) - (2)]).first_column);
6245  ;}
6246  break;
6247 
6248  case 55:
6249 #line 1511 "parse.y"
6250  {
6251  /*%%%*/
6252  value_expr((yyvsp[(1) - (1)].node));
6253  (yyval.node) = (yyvsp[(1) - (1)].node);
6254  if (!(yyval.node)) (yyval.node) = NEW_NIL();
6255  /*%
6256  $$ = $1;
6257  %*/
6258  ;}
6259  break;
6260 
6261  case 59:
6262 #line 1528 "parse.y"
6263  {
6264  (yyval.node) = new_qcall((yyvsp[(2) - (4)].id), (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node), (yylsp[(1) - (4)]).first_column);
6265  ;}
6266  break;
6267 
6268  case 60:
6269 #line 1534 "parse.y"
6270  {
6271  /*%%%*/
6272  (yyval.num) = ruby_sourceline;
6273  /*%
6274  %*/
6275  ;}
6276  break;
6277 
6278  case 61:
6279 #line 1541 "parse.y"
6280  {
6281  (yyval.node) = (yyvsp[(3) - (4)].node);
6282  /*%%%*/
6283  nd_set_line((yyval.node), (yyvsp[(2) - (4)].num));
6284  /*% %*/
6285  ;}
6286  break;
6287 
6288  case 62:
6289 #line 1550 "parse.y"
6290  {
6291  /*%%%*/
6292  (yyval.node) = new_fcall((yyvsp[(1) - (1)].id), 0, (yylsp[(1) - (1)]).first_column);
6293  nd_set_line((yyval.node), tokline);
6294  /*%
6295  %*/
6296  ;}
6297  break;
6298 
6299  case 63:
6300 #line 1560 "parse.y"
6301  {
6302  /*%%%*/
6303  (yyval.node) = (yyvsp[(1) - (2)].node);
6304  (yyval.node)->nd_args = (yyvsp[(2) - (2)].node);
6305  /*%
6306  $$ = dispatch2(command, $1, $2);
6307  %*/
6308  ;}
6309  break;
6310 
6311  case 64:
6312 #line 1569 "parse.y"
6313  {
6314  block_dup_check((yyvsp[(2) - (3)].node),(yyvsp[(3) - (3)].node));
6315  (yyval.node) = new_command((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node));
6316  (yyval.node) = method_add_block((yyval.node), (yyvsp[(3) - (3)].node));
6317  fixpos((yyval.node), (yyvsp[(1) - (3)].node));
6318  ;}
6319  break;
6320 
6321  case 65:
6322 #line 1576 "parse.y"
6323  {
6324  (yyval.node) = new_command_qcall((yyvsp[(2) - (4)].id), (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node), (yylsp[(1) - (4)]).first_column);
6325  fixpos((yyval.node), (yyvsp[(1) - (4)].node));
6326  ;}
6327  break;
6328 
6329  case 66:
6330 #line 1581 "parse.y"
6331  {
6332  block_dup_check((yyvsp[(4) - (5)].node),(yyvsp[(5) - (5)].node));
6333  (yyval.node) = new_command_qcall((yyvsp[(2) - (5)].id), (yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node), (yylsp[(1) - (5)]).first_column);
6334  (yyval.node) = method_add_block((yyval.node), (yyvsp[(5) - (5)].node));
6335  fixpos((yyval.node), (yyvsp[(1) - (5)].node));
6336  ;}
6337  break;
6338 
6339  case 67:
6340 #line 1588 "parse.y"
6341  {
6342  (yyval.node) = new_command_qcall(ID2VAL(idCOLON2), (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node), (yylsp[(1) - (4)]).first_column);
6343  fixpos((yyval.node), (yyvsp[(1) - (4)].node));
6344  ;}
6345  break;
6346 
6347  case 68:
6348 #line 1593 "parse.y"
6349  {
6350  block_dup_check((yyvsp[(4) - (5)].node),(yyvsp[(5) - (5)].node));
6351  (yyval.node) = new_command_qcall(ID2VAL(idCOLON2), (yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node), (yylsp[(1) - (5)]).first_column);
6352  (yyval.node) = method_add_block((yyval.node), (yyvsp[(5) - (5)].node));
6353  fixpos((yyval.node), (yyvsp[(1) - (5)].node));
6354  ;}
6355  break;
6356 
6357  case 69:
6358 #line 1600 "parse.y"
6359  {
6360  /*%%%*/
6361  (yyval.node) = NEW_SUPER((yyvsp[(2) - (2)].node));
6362  fixpos((yyval.node), (yyvsp[(2) - (2)].node));
6363  nd_set_column((yyval.node), (yylsp[(1) - (2)]).first_column);
6364  /*%
6365  $$ = dispatch1(super, $2);
6366  %*/
6367  ;}
6368  break;
6369 
6370  case 70:
6371 #line 1610 "parse.y"
6372  {
6373  /*%%%*/
6374  (yyval.node) = new_yield((yyvsp[(2) - (2)].node), (yylsp[(1) - (2)]).first_column);
6375  fixpos((yyval.node), (yyvsp[(2) - (2)].node));
6376  /*%
6377  $$ = dispatch1(yield, $2);
6378  %*/
6379  ;}
6380  break;
6381 
6382  case 71:
6383 #line 1619 "parse.y"
6384  {
6385  /*%%%*/
6386  (yyval.node) = NEW_RETURN(ret_args((yyvsp[(2) - (2)].node)));
6387  nd_set_column((yyval.node), (yylsp[(1) - (2)]).first_column);
6388  /*%
6389  $$ = dispatch1(return, $2);
6390  %*/
6391  ;}
6392  break;
6393 
6394  case 72:
6395 #line 1628 "parse.y"
6396  {
6397  /*%%%*/
6398  (yyval.node) = NEW_BREAK(ret_args((yyvsp[(2) - (2)].node)));
6399  nd_set_column((yyval.node), (yylsp[(1) - (2)]).first_column);
6400  /*%
6401  $$ = dispatch1(break, $2);
6402  %*/
6403  ;}
6404  break;
6405 
6406  case 73:
6407 #line 1637 "parse.y"
6408  {
6409  /*%%%*/
6410  (yyval.node) = NEW_NEXT(ret_args((yyvsp[(2) - (2)].node)));
6411  nd_set_column((yyval.node), (yylsp[(1) - (2)]).first_column);
6412  /*%
6413  $$ = dispatch1(next, $2);
6414  %*/
6415  ;}
6416  break;
6417 
6418  case 75:
6419 #line 1649 "parse.y"
6420  {
6421  /*%%%*/
6422  (yyval.node) = (yyvsp[(2) - (3)].node);
6423  /*%
6424  $$ = dispatch1(mlhs_paren, $2);
6425  %*/
6426  ;}
6427  break;
6428 
6429  case 77:
6430 #line 1660 "parse.y"
6431  {
6432  /*%%%*/
6433  (yyval.node) = new_masgn(new_list((yyvsp[(2) - (3)].node), (yylsp[(1) - (3)]).first_column), 0, (yylsp[(1) - (3)]).first_column);
6434  /*%
6435  $$ = dispatch1(mlhs_paren, $2);
6436  %*/
6437  ;}
6438  break;
6439 
6440  case 78:
6441 #line 1670 "parse.y"
6442  {
6443  /*%%%*/
6444  (yyval.node) = new_masgn((yyvsp[(1) - (1)].node), 0, (yylsp[(1) - (1)]).first_column);
6445  /*%
6446  $$ = $1;
6447  %*/
6448  ;}
6449  break;
6450 
6451  case 79:
6452 #line 1678 "parse.y"
6453  {
6454  /*%%%*/
6455  (yyval.node) = new_masgn(list_append((yyvsp[(1) - (2)].node),(yyvsp[(2) - (2)].node),(yylsp[(1) - (2)]).first_column), 0, (yylsp[(1) - (2)]).first_column);
6456  /*%
6457  $$ = mlhs_add($1, $2);
6458  %*/
6459  ;}
6460  break;
6461 
6462  case 80:
6463 #line 1686 "parse.y"
6464  {
6465  /*%%%*/
6466  (yyval.node) = new_masgn((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
6467  /*%
6468  $$ = mlhs_add_star($1, $3);
6469  %*/
6470  ;}
6471  break;
6472 
6473  case 81:
6474 #line 1694 "parse.y"
6475  {
6476  /*%%%*/
6477  (yyval.node) = new_masgn((yyvsp[(1) - (5)].node), new_postarg((yyvsp[(3) - (5)].node),(yyvsp[(5) - (5)].node),(yylsp[(1) - (5)]).first_column), (yylsp[(1) - (5)]).first_column);
6478  /*%
6479  $1 = mlhs_add_star($1, $3);
6480  $$ = mlhs_add_post($1, $5);
6481  %*/
6482  ;}
6483  break;
6484 
6485  case 82:
6486 #line 1703 "parse.y"
6487  {
6488  /*%%%*/
6489  (yyval.node) = new_masgn((yyvsp[(1) - (2)].node), (NODE *)-1, (yylsp[(1) - (2)]).first_column);
6490  /*%
6491  $$ = mlhs_add_star($1, Qnil);
6492  %*/
6493  ;}
6494  break;
6495 
6496  case 83:
6497 #line 1711 "parse.y"
6498  {
6499  /*%%%*/
6500  (yyval.node) = new_masgn((yyvsp[(1) - (4)].node), new_postarg((NODE *)-1, (yyvsp[(4) - (4)].node), (yylsp[(1) - (4)]).first_column), (yylsp[(1) - (4)]).first_column);
6501  /*%
6502  $1 = mlhs_add_star($1, Qnil);
6503  $$ = mlhs_add_post($1, $4);
6504  %*/
6505  ;}
6506  break;
6507 
6508  case 84:
6509 #line 1720 "parse.y"
6510  {
6511  /*%%%*/
6512  (yyval.node) = new_masgn(0, (yyvsp[(2) - (2)].node), (yylsp[(1) - (2)]).first_column);
6513  /*%
6514  $$ = mlhs_add_star(mlhs_new(), $2);
6515  %*/
6516  ;}
6517  break;
6518 
6519  case 85:
6520 #line 1728 "parse.y"
6521  {
6522  /*%%%*/
6523  (yyval.node) = new_masgn(0, new_postarg((yyvsp[(2) - (4)].node),(yyvsp[(4) - (4)].node),(yylsp[(1) - (4)]).first_column), (yylsp[(1) - (4)]).first_column);
6524  /*%
6525  $2 = mlhs_add_star(mlhs_new(), $2);
6526  $$ = mlhs_add_post($2, $4);
6527  %*/
6528  ;}
6529  break;
6530 
6531  case 86:
6532 #line 1737 "parse.y"
6533  {
6534  /*%%%*/
6535  (yyval.node) = new_masgn(0, (NODE *)-1, (yylsp[(1) - (1)]).first_column);
6536  /*%
6537  $$ = mlhs_add_star(mlhs_new(), Qnil);
6538  %*/
6539  ;}
6540  break;
6541 
6542  case 87:
6543 #line 1745 "parse.y"
6544  {
6545  /*%%%*/
6546  (yyval.node) = new_masgn(0, new_postarg((NODE *)-1, (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column), (yylsp[(1) - (3)]).first_column);
6547  /*%
6548  $$ = mlhs_add_star(mlhs_new(), Qnil);
6549  $$ = mlhs_add_post($$, $3);
6550  %*/
6551  ;}
6552  break;
6553 
6554  case 89:
6555 #line 1757 "parse.y"
6556  {
6557  /*%%%*/
6558  (yyval.node) = (yyvsp[(2) - (3)].node);
6559  /*%
6560  $$ = dispatch1(mlhs_paren, $2);
6561  %*/
6562  ;}
6563  break;
6564 
6565  case 90:
6566 #line 1767 "parse.y"
6567  {
6568  /*%%%*/
6569  (yyval.node) = new_list((yyvsp[(1) - (2)].node), (yylsp[(1) - (2)]).first_column);
6570  /*%
6571  $$ = mlhs_add(mlhs_new(), $1);
6572  %*/
6573  ;}
6574  break;
6575 
6576  case 91:
6577 #line 1775 "parse.y"
6578  {
6579  /*%%%*/
6580  (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node), (yylsp[(1) - (3)]).first_column);
6581  /*%
6582  $$ = mlhs_add($1, $2);
6583  %*/
6584  ;}
6585  break;
6586 
6587  case 92:
6588 #line 1785 "parse.y"
6589  {
6590  /*%%%*/
6591  (yyval.node) = new_list((yyvsp[(1) - (1)].node), (yylsp[(1) - (1)]).first_column);
6592  /*%
6593  $$ = mlhs_add(mlhs_new(), $1);
6594  %*/
6595  ;}
6596  break;
6597 
6598  case 93:
6599 #line 1793 "parse.y"
6600  {
6601  /*%%%*/
6602  (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
6603  /*%
6604  $$ = mlhs_add($1, $3);
6605  %*/
6606  ;}
6607  break;
6608 
6609  case 94:
6610 #line 1803 "parse.y"
6611  {
6612  (yyval.node) = assignable(var_field((yyvsp[(1) - (1)].id)), 0, (yylsp[(1) - (1)]).first_column);
6613  ;}
6614  break;
6615 
6616  case 95:
6617 #line 1807 "parse.y"
6618  {
6619  (yyval.node) = assignable(var_field((yyvsp[(1) - (1)].id)), 0, (yylsp[(1) - (1)]).first_column);
6620  ;}
6621  break;
6622 
6623  case 96:
6624 #line 1811 "parse.y"
6625  {
6626  /*%%%*/
6627  (yyval.node) = aryset((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node), (yylsp[(1) - (4)]).first_column);
6628  /*%
6629  $$ = dispatch2(aref_field, $1, escape_Qundef($3));
6630  %*/
6631  ;}
6632  break;
6633 
6634  case 97:
6635 #line 1819 "parse.y"
6636  {
6637  /*%%%*/
6638  (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].id), (yylsp[(1) - (3)]).first_column);
6639  /*%
6640  $$ = dispatch3(field, $1, $2, $3);
6641  %*/
6642  ;}
6643  break;
6644 
6645  case 98:
6646 #line 1827 "parse.y"
6647  {
6648  /*%%%*/
6649  (yyval.node) = attrset((yyvsp[(1) - (3)].node), idCOLON2, (yyvsp[(3) - (3)].id), (yylsp[(1) - (3)]).first_column);
6650  /*%
6651  $$ = dispatch2(const_path_field, $1, $3);
6652  %*/
6653  ;}
6654  break;
6655 
6656  case 99:
6657 #line 1835 "parse.y"
6658  {
6659  /*%%%*/
6660  (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].id), (yylsp[(1) - (3)]).first_column);
6661  /*%
6662  $$ = dispatch3(field, $1, $2, $3);
6663  %*/
6664  ;}
6665  break;
6666 
6667  case 100:
6668 #line 1843 "parse.y"
6669  {
6670  (yyval.node) = const_decl(const_path_field((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id), (yylsp[(1) - (3)]).first_column), (yylsp[(1) - (3)]).first_column);
6671  ;}
6672  break;
6673 
6674  case 101:
6675 #line 1847 "parse.y"
6676  {
6677  (yyval.node) = const_decl(top_const_field((yyvsp[(2) - (2)].id)), (yylsp[(1) - (2)]).first_column);
6678  ;}
6679  break;
6680 
6681  case 102:
6682 #line 1851 "parse.y"
6683  {
6684  (yyvsp[(1) - (1)].node) = var_field((yyvsp[(1) - (1)].node));
6685  (yyval.node) = backref_assign_error((yyvsp[(1) - (1)].node), (yyvsp[(1) - (1)].node), (yylsp[(1) - (1)]).first_column);
6686  ;}
6687  break;
6688 
6689  case 103:
6690 #line 1858 "parse.y"
6691  {
6692  (yyval.node) = assignable(var_field((yyvsp[(1) - (1)].id)), 0, (yylsp[(1) - (1)]).first_column);
6693  /*%%%*/
6694  if (!(yyval.node)) (yyval.node) = new_begin(0, (yylsp[(1) - (1)]).first_column);
6695  /*%
6696  %*/
6697  ;}
6698  break;
6699 
6700  case 104:
6701 #line 1866 "parse.y"
6702  {
6703  (yyval.node) = assignable(var_field((yyvsp[(1) - (1)].id)), 0, (yylsp[(1) - (1)]).first_column);
6704  /*%%%*/
6705  if (!(yyval.node)) (yyval.node) = new_begin(0, (yylsp[(1) - (1)]).first_column);
6706  /*%
6707  %*/
6708  ;}
6709  break;
6710 
6711  case 105:
6712 #line 1874 "parse.y"
6713  {
6714  /*%%%*/
6715  (yyval.node) = aryset((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node), (yylsp[(1) - (4)]).first_column);
6716  /*%
6717  $$ = dispatch2(aref_field, $1, escape_Qundef($3));
6718  %*/
6719  ;}
6720  break;
6721 
6722  case 106:
6723 #line 1882 "parse.y"
6724  {
6725  /*%%%*/
6726  (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].id), (yylsp[(1) - (3)]).first_column);
6727  /*%
6728  $$ = dispatch3(field, $1, $2, $3);
6729  %*/
6730  ;}
6731  break;
6732 
6733  case 107:
6734 #line 1890 "parse.y"
6735  {
6736  /*%%%*/
6737  (yyval.node) = attrset((yyvsp[(1) - (3)].node), idCOLON2, (yyvsp[(3) - (3)].id), (yylsp[(1) - (3)]).first_column);
6738  /*%
6739  $$ = dispatch3(field, $1, ID2VAL(idCOLON2), $3);
6740  %*/
6741  ;}
6742  break;
6743 
6744  case 108:
6745 #line 1898 "parse.y"
6746  {
6747  /*%%%*/
6748  (yyval.node) = attrset((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].id), (yylsp[(1) - (3)]).first_column);
6749  /*%
6750  $$ = dispatch3(field, $1, $2, $3);
6751  %*/
6752  ;}
6753  break;
6754 
6755  case 109:
6756 #line 1906 "parse.y"
6757  {
6758  (yyval.node) = const_decl(const_path_field((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id), (yylsp[(1) - (3)]).first_column), (yylsp[(1) - (3)]).first_column);
6759  ;}
6760  break;
6761 
6762  case 110:
6763 #line 1910 "parse.y"
6764  {
6765  (yyval.node) = const_decl(top_const_field((yyvsp[(2) - (2)].id)), (yylsp[(1) - (2)]).first_column);
6766  ;}
6767  break;
6768 
6769  case 111:
6770 #line 1914 "parse.y"
6771  {
6772  (yyvsp[(1) - (1)].node) = var_field((yyvsp[(1) - (1)].node));
6773  (yyval.node) = backref_assign_error((yyvsp[(1) - (1)].node), (yyvsp[(1) - (1)].node), (yylsp[(1) - (1)]).first_column);
6774  ;}
6775  break;
6776 
6777  case 112:
6778 #line 1921 "parse.y"
6779  {
6780  /*%%%*/
6781  yyerror0("class/module name must be CONSTANT");
6782  /*%
6783  $$ = dispatch1(class_name_error, $1);
6784  ripper_error();
6785  %*/
6786  ;}
6787  break;
6788 
6789  case 114:
6790 #line 1933 "parse.y"
6791  {
6792  /*%%%*/
6793  (yyval.node) = NEW_COLON3((yyvsp[(2) - (2)].id));
6794  /*%
6795  $$ = dispatch1(top_const_ref, $2);
6796  %*/
6797  ;}
6798  break;
6799 
6800  case 115:
6801 #line 1941 "parse.y"
6802  {
6803  /*%%%*/
6804  (yyval.node) = NEW_COLON2(0, (yyval.node));
6805  nd_set_column((yyval.node), (yylsp[(1) - (1)]).first_column);
6806  /*%
6807  $$ = dispatch1(const_ref, $1);
6808  %*/
6809  ;}
6810  break;
6811 
6812  case 116:
6813 #line 1950 "parse.y"
6814  {
6815  /*%%%*/
6816  (yyval.node) = NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id));
6817  nd_set_column((yyval.node), (yylsp[(1) - (3)]).first_column);
6818  /*%
6819  $$ = dispatch2(const_path_ref, $1, $3);
6820  %*/
6821  ;}
6822  break;
6823 
6824  case 120:
6825 #line 1964 "parse.y"
6826  {
6827  SET_LEX_STATE(EXPR_ENDFN);
6828  (yyval.id) = (yyvsp[(1) - (1)].id);
6829  ;}
6830  break;
6831 
6832  case 121:
6833 #line 1969 "parse.y"
6834  {
6835  SET_LEX_STATE(EXPR_ENDFN);
6836  (yyval.id) = (yyvsp[(1) - (1)].id);
6837  ;}
6838  break;
6839 
6840  case 124:
6841 #line 1980 "parse.y"
6842  {
6843  /*%%%*/
6844  (yyval.node) = new_lit(ID2SYM((yyvsp[(1) - (1)].id)), (yylsp[(1) - (1)]).first_column);
6845  /*%
6846  $$ = dispatch1(symbol_literal, $1);
6847  %*/
6848  ;}
6849  break;
6850 
6851  case 126:
6852 #line 1991 "parse.y"
6853  {
6854  /*%%%*/
6855  (yyval.node) = new_undef((yyvsp[(1) - (1)].node), (yylsp[(1) - (1)]).first_column);
6856  /*%
6857  $$ = rb_ary_new3(1, get_value($1));
6858  %*/
6859  ;}
6860  break;
6861 
6862  case 127:
6863 #line 1998 "parse.y"
6864  {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);;}
6865  break;
6866 
6867  case 128:
6868 #line 1999 "parse.y"
6869  {
6870  /*%%%*/
6871  NODE *undef = new_undef((yyvsp[(4) - (4)].node), (yylsp[(1) - (4)]).first_column);
6872  (yyval.node) = block_append((yyvsp[(1) - (4)].node), undef, (yylsp[(1) - (4)]).first_column);
6873  /*%
6874  rb_ary_push($1, get_value($4));
6875  %*/
6876  ;}
6877  break;
6878 
6879  case 129:
6880 #line 2009 "parse.y"
6881  { ifndef_ripper((yyval.id) = '|'); ;}
6882  break;
6883 
6884  case 130:
6885 #line 2010 "parse.y"
6886  { ifndef_ripper((yyval.id) = '^'); ;}
6887  break;
6888 
6889  case 131:
6890 #line 2011 "parse.y"
6891  { ifndef_ripper((yyval.id) = '&'); ;}
6892  break;
6893 
6894  case 132:
6895 #line 2012 "parse.y"
6896  { ifndef_ripper((yyval.id) = tCMP); ;}
6897  break;
6898 
6899  case 133:
6900 #line 2013 "parse.y"
6901  { ifndef_ripper((yyval.id) = tEQ); ;}
6902  break;
6903 
6904  case 134:
6905 #line 2014 "parse.y"
6906  { ifndef_ripper((yyval.id) = tEQQ); ;}
6907  break;
6908 
6909  case 135:
6910 #line 2015 "parse.y"
6911  { ifndef_ripper((yyval.id) = tMATCH); ;}
6912  break;
6913 
6914  case 136:
6915 #line 2016 "parse.y"
6916  { ifndef_ripper((yyval.id) = tNMATCH); ;}
6917  break;
6918 
6919  case 137:
6920 #line 2017 "parse.y"
6921  { ifndef_ripper((yyval.id) = '>'); ;}
6922  break;
6923 
6924  case 138:
6925 #line 2018 "parse.y"
6926  { ifndef_ripper((yyval.id) = tGEQ); ;}
6927  break;
6928 
6929  case 139:
6930 #line 2019 "parse.y"
6931  { ifndef_ripper((yyval.id) = '<'); ;}
6932  break;
6933 
6934  case 140:
6935 #line 2020 "parse.y"
6936  { ifndef_ripper((yyval.id) = tLEQ); ;}
6937  break;
6938 
6939  case 141:
6940 #line 2021 "parse.y"
6941  { ifndef_ripper((yyval.id) = tNEQ); ;}
6942  break;
6943 
6944  case 142:
6945 #line 2022 "parse.y"
6946  { ifndef_ripper((yyval.id) = tLSHFT); ;}
6947  break;
6948 
6949  case 143:
6950 #line 2023 "parse.y"
6951  { ifndef_ripper((yyval.id) = tRSHFT); ;}
6952  break;
6953 
6954  case 144:
6955 #line 2024 "parse.y"
6956  { ifndef_ripper((yyval.id) = '+'); ;}
6957  break;
6958 
6959  case 145:
6960 #line 2025 "parse.y"
6961  { ifndef_ripper((yyval.id) = '-'); ;}
6962  break;
6963 
6964  case 146:
6965 #line 2026 "parse.y"
6966  { ifndef_ripper((yyval.id) = '*'); ;}
6967  break;
6968 
6969  case 147:
6970 #line 2027 "parse.y"
6971  { ifndef_ripper((yyval.id) = '*'); ;}
6972  break;
6973 
6974  case 148:
6975 #line 2028 "parse.y"
6976  { ifndef_ripper((yyval.id) = '/'); ;}
6977  break;
6978 
6979  case 149:
6980 #line 2029 "parse.y"
6981  { ifndef_ripper((yyval.id) = '%'); ;}
6982  break;
6983 
6984  case 150:
6985 #line 2030 "parse.y"
6986  { ifndef_ripper((yyval.id) = tPOW); ;}
6987  break;
6988 
6989  case 151:
6990 #line 2031 "parse.y"
6991  { ifndef_ripper((yyval.id) = tDSTAR); ;}
6992  break;
6993 
6994  case 152:
6995 #line 2032 "parse.y"
6996  { ifndef_ripper((yyval.id) = '!'); ;}
6997  break;
6998 
6999  case 153:
7000 #line 2033 "parse.y"
7001  { ifndef_ripper((yyval.id) = '~'); ;}
7002  break;
7003 
7004  case 154:
7005 #line 2034 "parse.y"
7006  { ifndef_ripper((yyval.id) = tUPLUS); ;}
7007  break;
7008 
7009  case 155:
7010 #line 2035 "parse.y"
7011  { ifndef_ripper((yyval.id) = tUMINUS); ;}
7012  break;
7013 
7014  case 156:
7015 #line 2036 "parse.y"
7016  { ifndef_ripper((yyval.id) = tAREF); ;}
7017  break;
7018 
7019  case 157:
7020 #line 2037 "parse.y"
7021  { ifndef_ripper((yyval.id) = tASET); ;}
7022  break;
7023 
7024  case 158:
7025 #line 2038 "parse.y"
7026  { ifndef_ripper((yyval.id) = '`'); ;}
7027  break;
7028 
7029  case 200:
7030 #line 2056 "parse.y"
7031  {
7032  (yyval.node) = node_assign((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7033  ;}
7034  break;
7035 
7036  case 201:
7037 #line 2060 "parse.y"
7038  {
7039  (yyval.node) = new_op_assign((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7040  ;}
7041  break;
7042 
7043  case 202:
7044 #line 2064 "parse.y"
7045  {
7046  /*%%%*/
7047  NODE *args;
7048 
7049  value_expr((yyvsp[(6) - (6)].node));
7050  if (!(yyvsp[(3) - (6)].node)) (yyvsp[(3) - (6)].node) = new_zarray((yylsp[(1) - (6)]).first_column);
7051  if (nd_type((yyvsp[(3) - (6)].node)) == NODE_BLOCK_PASS) {
7052  args = NEW_ARGSCAT((yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node));
7053  nd_set_column(args, (yylsp[(1) - (6)]).first_column);
7054  }
7055  else {
7056  args = arg_concat((yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node), (yylsp[(1) - (6)]).first_column);
7057  }
7058  if ((yyvsp[(5) - (6)].id) == tOROP) {
7059  (yyvsp[(5) - (6)].id) = 0;
7060  }
7061  else if ((yyvsp[(5) - (6)].id) == tANDOP) {
7062  (yyvsp[(5) - (6)].id) = 1;
7063  }
7064  (yyval.node) = NEW_OP_ASGN1((yyvsp[(1) - (6)].node), (yyvsp[(5) - (6)].id), args);
7065  fixpos((yyval.node), (yyvsp[(1) - (6)].node));
7066  nd_set_column((yyval.node), (yylsp[(1) - (6)]).first_column);
7067  /*%
7068  $1 = dispatch2(aref_field, $1, escape_Qundef($3));
7069  $$ = dispatch3(opassign, $1, $5, $6);
7070  %*/
7071  ;}
7072  break;
7073 
7074  case 203:
7075 #line 2092 "parse.y"
7076  {
7077  value_expr((yyvsp[(5) - (5)].node));
7078  (yyval.node) = new_attr_op_assign((yyvsp[(1) - (5)].node), (yyvsp[(2) - (5)].id), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node), (yylsp[(1) - (5)]).first_column);
7079  ;}
7080  break;
7081 
7082  case 204:
7083 #line 2097 "parse.y"
7084  {
7085  value_expr((yyvsp[(5) - (5)].node));
7086  (yyval.node) = new_attr_op_assign((yyvsp[(1) - (5)].node), (yyvsp[(2) - (5)].id), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node), (yylsp[(1) - (5)]).first_column);
7087  ;}
7088  break;
7089 
7090  case 205:
7091 #line 2102 "parse.y"
7092  {
7093  value_expr((yyvsp[(5) - (5)].node));
7094  (yyval.node) = new_attr_op_assign((yyvsp[(1) - (5)].node), ID2VAL(idCOLON2), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node), (yylsp[(1) - (5)]).first_column);
7095  ;}
7096  break;
7097 
7098  case 206:
7099 #line 2107 "parse.y"
7100  {
7101  (yyval.node) = const_path_field((yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yylsp[(1) - (5)]).first_column);
7102  (yyval.node) = new_const_op_assign((yyval.node), (yyvsp[(4) - (5)].id), (yyvsp[(5) - (5)].node), (yylsp[(1) - (5)]).first_column);
7103  ;}
7104  break;
7105 
7106  case 207:
7107 #line 2112 "parse.y"
7108  {
7109  (yyval.node) = top_const_field((yyvsp[(2) - (4)].id));
7110  (yyval.node) = new_const_op_assign((yyval.node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node), (yylsp[(1) - (4)]).first_column);
7111  ;}
7112  break;
7113 
7114  case 208:
7115 #line 2117 "parse.y"
7116  {
7117  (yyvsp[(1) - (3)].node) = var_field((yyvsp[(1) - (3)].node));
7118  (yyval.node) = backref_assign_error((yyvsp[(1) - (3)].node), new_op_assign((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column), (yylsp[(1) - (3)]).first_column);
7119  ;}
7120  break;
7121 
7122  case 209:
7123 #line 2122 "parse.y"
7124  {
7125  /*%%%*/
7126  value_expr((yyvsp[(1) - (3)].node));
7127  value_expr((yyvsp[(3) - (3)].node));
7128  (yyval.node) = NEW_DOT2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
7129  nd_set_column((yyval.node), (yylsp[(1) - (3)]).first_column);
7130  /*%
7131  $$ = dispatch2(dot2, $1, $3);
7132  %*/
7133  ;}
7134  break;
7135 
7136  case 210:
7137 #line 2133 "parse.y"
7138  {
7139  /*%%%*/
7140  value_expr((yyvsp[(1) - (3)].node));
7141  value_expr((yyvsp[(3) - (3)].node));
7142  (yyval.node) = NEW_DOT3((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
7143  nd_set_column((yyval.node), (yylsp[(1) - (3)]).first_column);
7144  /*%
7145  $$ = dispatch2(dot3, $1, $3);
7146  %*/
7147  ;}
7148  break;
7149 
7150  case 211:
7151 #line 2144 "parse.y"
7152  {
7153  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '+', (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7154  ;}
7155  break;
7156 
7157  case 212:
7158 #line 2148 "parse.y"
7159  {
7160  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '-', (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7161  ;}
7162  break;
7163 
7164  case 213:
7165 #line 2152 "parse.y"
7166  {
7167  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '*', (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7168  ;}
7169  break;
7170 
7171  case 214:
7172 #line 2156 "parse.y"
7173  {
7174  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '/', (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7175  ;}
7176  break;
7177 
7178  case 215:
7179 #line 2160 "parse.y"
7180  {
7181  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '%', (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7182  ;}
7183  break;
7184 
7185  case 216:
7186 #line 2164 "parse.y"
7187  {
7188  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), idPow, (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7189  ;}
7190  break;
7191 
7192  case 217:
7193 #line 2168 "parse.y"
7194  {
7195  (yyval.node) = call_uni_op(call_bin_op((yyvsp[(2) - (4)].node), idPow, (yyvsp[(4) - (4)].node), (yylsp[(1) - (4)]).first_column), idUMinus, (yylsp[(1) - (4)]).first_column);
7196  ;}
7197  break;
7198 
7199  case 218:
7200 #line 2172 "parse.y"
7201  {
7202  (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), idUPlus, (yylsp[(1) - (2)]).first_column);
7203  ;}
7204  break;
7205 
7206  case 219:
7207 #line 2176 "parse.y"
7208  {
7209  (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), idUMinus, (yylsp[(1) - (2)]).first_column);
7210  ;}
7211  break;
7212 
7213  case 220:
7214 #line 2180 "parse.y"
7215  {
7216  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '|', (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7217  ;}
7218  break;
7219 
7220  case 221:
7221 #line 2184 "parse.y"
7222  {
7223  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '^', (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7224  ;}
7225  break;
7226 
7227  case 222:
7228 #line 2188 "parse.y"
7229  {
7230  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), '&', (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7231  ;}
7232  break;
7233 
7234  case 223:
7235 #line 2192 "parse.y"
7236  {
7237  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), idCmp, (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7238  ;}
7239  break;
7240 
7241  case 225:
7242 #line 2197 "parse.y"
7243  {
7244  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), idEq, (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7245  ;}
7246  break;
7247 
7248  case 226:
7249 #line 2201 "parse.y"
7250  {
7251  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), idEqq, (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7252  ;}
7253  break;
7254 
7255  case 227:
7256 #line 2205 "parse.y"
7257  {
7258  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), idNeq, (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7259  ;}
7260  break;
7261 
7262  case 228:
7263 #line 2209 "parse.y"
7264  {
7265  (yyval.node) = match_op((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7266  ;}
7267  break;
7268 
7269  case 229:
7270 #line 2213 "parse.y"
7271  {
7272  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), idNeqTilde, (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7273  ;}
7274  break;
7275 
7276  case 230:
7277 #line 2217 "parse.y"
7278  {
7279  (yyval.node) = call_uni_op(method_cond((yyvsp[(2) - (2)].node), (yylsp[(1) - (2)]).first_column), '!', (yylsp[(1) - (2)]).first_column);
7280  ;}
7281  break;
7282 
7283  case 231:
7284 #line 2221 "parse.y"
7285  {
7286  (yyval.node) = call_uni_op((yyvsp[(2) - (2)].node), '~', (yylsp[(1) - (2)]).first_column);
7287  ;}
7288  break;
7289 
7290  case 232:
7291 #line 2225 "parse.y"
7292  {
7293  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), idLTLT, (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7294  ;}
7295  break;
7296 
7297  case 233:
7298 #line 2229 "parse.y"
7299  {
7300  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), idGTGT, (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7301  ;}
7302  break;
7303 
7304  case 234:
7305 #line 2233 "parse.y"
7306  {
7307  (yyval.node) = logop(idANDOP, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7308  ;}
7309  break;
7310 
7311  case 235:
7312 #line 2237 "parse.y"
7313  {
7314  (yyval.node) = logop(idOROP, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7315  ;}
7316  break;
7317 
7318  case 236:
7319 #line 2240 "parse.y"
7320  {in_defined = 1;;}
7321  break;
7322 
7323  case 237:
7324 #line 2241 "parse.y"
7325  {
7326  in_defined = 0;
7327  (yyval.node) = new_defined((yyvsp[(4) - (4)].node), (yylsp[(1) - (4)]).first_column);
7328  ;}
7329  break;
7330 
7331  case 238:
7332 #line 2246 "parse.y"
7333  {
7334  /*%%%*/
7335  value_expr((yyvsp[(1) - (6)].node));
7336  (yyval.node) = new_if((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node), (yylsp[(1) - (6)]).first_column);
7337  fixpos((yyval.node), (yyvsp[(1) - (6)].node));
7338  /*%
7339  $$ = dispatch3(ifop, $1, $3, $6);
7340  %*/
7341  ;}
7342  break;
7343 
7344  case 239:
7345 #line 2256 "parse.y"
7346  {
7347  (yyval.node) = (yyvsp[(1) - (1)].node);
7348  ;}
7349  break;
7350 
7351  case 240:
7352 #line 2261 "parse.y"
7353  {(yyval.id) = '>';;}
7354  break;
7355 
7356  case 241:
7357 #line 2262 "parse.y"
7358  {(yyval.id) = '<';;}
7359  break;
7360 
7361  case 242:
7362 #line 2263 "parse.y"
7363  {(yyval.id) = idGE;;}
7364  break;
7365 
7366  case 243:
7367 #line 2264 "parse.y"
7368  {(yyval.id) = idLE;;}
7369  break;
7370 
7371  case 244:
7372 #line 2268 "parse.y"
7373  {
7374  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7375  ;}
7376  break;
7377 
7378  case 245:
7379 #line 2272 "parse.y"
7380  {
7381  rb_warning1("comparison '%s' after comparison", WARN_ID((yyvsp[(2) - (3)].id)));
7382  (yyval.node) = call_bin_op((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7383  ;}
7384  break;
7385 
7386  case 246:
7387 #line 2279 "parse.y"
7388  {
7389  /*%%%*/
7390  value_expr((yyvsp[(1) - (1)].node));
7391  (yyval.node) = (yyvsp[(1) - (1)].node);
7392  if (!(yyval.node)) (yyval.node) = NEW_NIL();
7393  /*%
7394  $$ = $1;
7395  %*/
7396  ;}
7397  break;
7398 
7399  case 248:
7400 #line 2292 "parse.y"
7401  {
7402  (yyval.node) = (yyvsp[(1) - (2)].node);
7403  ;}
7404  break;
7405 
7406  case 249:
7407 #line 2296 "parse.y"
7408  {
7409  /*%%%*/
7410  (yyval.node) = (yyvsp[(3) - (4)].node) ? arg_append((yyvsp[(1) - (4)].node), new_hash((yyvsp[(3) - (4)].node), (yylsp[(1) - (4)]).first_column), (yylsp[(1) - (4)]).first_column) : (yyvsp[(1) - (4)].node);
7411  /*%
7412  $$ = arg_add_assocs($1, $3);
7413  %*/
7414  ;}
7415  break;
7416 
7417  case 250:
7418 #line 2304 "parse.y"
7419  {
7420  /*%%%*/
7421  (yyval.node) = (yyvsp[(1) - (2)].node) ? new_list(new_hash((yyvsp[(1) - (2)].node), (yylsp[(1) - (2)]).first_column), (yylsp[(1) - (2)]).first_column) : 0;
7422  /*%
7423  $$ = arg_add_assocs(arg_new(), $1);
7424  %*/
7425  ;}
7426  break;
7427 
7428  case 251:
7429 #line 2314 "parse.y"
7430  {
7431  /*%%%*/
7432  value_expr((yyvsp[(1) - (1)].node));
7433  (yyval.node) = (yyvsp[(1) - (1)].node);
7434  /*%
7435  %*/
7436  ;}
7437  break;
7438 
7439  case 252:
7440 #line 2322 "parse.y"
7441  {
7442  /*%%%*/
7443  value_expr((yyvsp[(1) - (3)].node));
7444  (yyval.node) = new_rescue((yyvsp[(1) - (3)].node), new_resbody(0, remove_begin((yyvsp[(3) - (3)].node)), 0, (yylsp[(1) - (3)]).first_column), 0, (yylsp[(1) - (3)]).first_column);
7445  /*%
7446  $$ = dispatch2(rescue_mod, $1, $3);
7447  %*/
7448  ;}
7449  break;
7450 
7451  case 253:
7452 #line 2333 "parse.y"
7453  {
7454  /*%%%*/
7455  (yyval.node) = (yyvsp[(2) - (3)].node);
7456  /*%
7457  $$ = dispatch1(arg_paren, escape_Qundef($2));
7458  %*/
7459  ;}
7460  break;
7461 
7462  case 258:
7463 #line 2349 "parse.y"
7464  {
7465  (yyval.node) = (yyvsp[(1) - (2)].node);
7466  ;}
7467  break;
7468 
7469  case 259:
7470 #line 2353 "parse.y"
7471  {
7472  /*%%%*/
7473  (yyval.node) = (yyvsp[(3) - (4)].node) ? arg_append((yyvsp[(1) - (4)].node), new_hash((yyvsp[(3) - (4)].node), (yylsp[(1) - (4)]).first_column), (yylsp[(1) - (4)]).first_column) : (yyvsp[(1) - (4)].node);
7474  /*%
7475  $$ = arg_add_assocs($1, $3);
7476  %*/
7477  ;}
7478  break;
7479 
7480  case 260:
7481 #line 2361 "parse.y"
7482  {
7483  /*%%%*/
7484  (yyval.node) = (yyvsp[(1) - (2)].node) ? new_list(new_hash((yyvsp[(1) - (2)].node), (yylsp[(1) - (2)]).first_column), (yylsp[(1) - (2)]).first_column) : 0;
7485  /*%
7486  $$ = arg_add_assocs(arg_new(), $1);
7487  %*/
7488  ;}
7489  break;
7490 
7491  case 261:
7492 #line 2371 "parse.y"
7493  {
7494  /*%%%*/
7495  value_expr((yyvsp[(1) - (1)].node));
7496  (yyval.node) = new_list((yyvsp[(1) - (1)].node), (yylsp[(1) - (1)]).first_column);
7497  /*%
7498  $$ = arg_add(arg_new(), $1);
7499  %*/
7500  ;}
7501  break;
7502 
7503  case 262:
7504 #line 2380 "parse.y"
7505  {
7506  /*%%%*/
7507  (yyval.node) = arg_blk_pass((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
7508  /*%
7509  $$ = arg_add_optblock($1, $2);
7510  %*/
7511  ;}
7512  break;
7513 
7514  case 263:
7515 #line 2388 "parse.y"
7516  {
7517  /*%%%*/
7518  (yyval.node) = (yyvsp[(1) - (2)].node) ? new_list(new_hash((yyvsp[(1) - (2)].node), (yylsp[(1) - (2)]).first_column), (yylsp[(1) - (2)]).first_column) : 0;
7519  (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(2) - (2)].node));
7520  /*%
7521  $$ = arg_add_assocs(arg_new(), $1);
7522  $$ = arg_add_optblock($$, $2);
7523  %*/
7524  ;}
7525  break;
7526 
7527  case 264:
7528 #line 2398 "parse.y"
7529  {
7530  /*%%%*/
7531  (yyval.node) = (yyvsp[(3) - (4)].node) ? arg_append((yyvsp[(1) - (4)].node), new_hash((yyvsp[(3) - (4)].node), (yylsp[(1) - (4)]).first_column), (yylsp[(1) - (4)]).first_column) : (yyvsp[(1) - (4)].node);
7532  (yyval.node) = arg_blk_pass((yyval.node), (yyvsp[(4) - (4)].node));
7533  /*%
7534  $$ = arg_add_optblock(arg_add_assocs($1, $3), $4);
7535  %*/
7536  ;}
7537  break;
7538 
7539  case 266:
7540 #line 2415 "parse.y"
7541  {
7542  (yyval.val) = cmdarg_stack;
7543  CMDARG_PUSH(1);
7544  ;}
7545  break;
7546 
7547  case 267:
7548 #line 2420 "parse.y"
7549  {
7550  /* CMDARG_POP() */
7551  CMDARG_SET((yyvsp[(1) - (2)].val));
7552  (yyval.node) = (yyvsp[(2) - (2)].node);
7553  ;}
7554  break;
7555 
7556  case 268:
7557 #line 2428 "parse.y"
7558  {
7559  /*%%%*/
7560  (yyval.node) = NEW_BLOCK_PASS((yyvsp[(2) - (2)].node));
7561  nd_set_column((yyval.node), (yylsp[(1) - (2)]).first_column);
7562  /*%
7563  $$ = $2;
7564  %*/
7565  ;}
7566  break;
7567 
7568  case 269:
7569 #line 2439 "parse.y"
7570  {
7571  (yyval.node) = (yyvsp[(2) - (2)].node);
7572  ;}
7573  break;
7574 
7575  case 270:
7576 #line 2443 "parse.y"
7577  {
7578  (yyval.node) = 0;
7579  ;}
7580  break;
7581 
7582  case 271:
7583 #line 2449 "parse.y"
7584  {
7585  /*%%%*/
7586  (yyval.node) = new_list((yyvsp[(1) - (1)].node), (yylsp[(1) - (1)]).first_column);
7587  /*%
7588  $$ = arg_add(arg_new(), $1);
7589  %*/
7590  ;}
7591  break;
7592 
7593  case 272:
7594 #line 2457 "parse.y"
7595  {
7596  /*%%%*/
7597  (yyval.node) = NEW_SPLAT((yyvsp[(2) - (2)].node));
7598  nd_set_column((yyval.node), (yylsp[(1) - (2)]).first_column);
7599  /*%
7600  $$ = arg_add_star(arg_new(), $2);
7601  %*/
7602  ;}
7603  break;
7604 
7605  case 273:
7606 #line 2466 "parse.y"
7607  {
7608  /*%%%*/
7609  NODE *n1;
7610  if ((n1 = splat_array((yyvsp[(1) - (3)].node))) != 0) {
7611  (yyval.node) = list_append(n1, (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7612  }
7613  else {
7614  (yyval.node) = arg_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7615  }
7616  /*%
7617  $$ = arg_add($1, $3);
7618  %*/
7619  ;}
7620  break;
7621 
7622  case 274:
7623 #line 2480 "parse.y"
7624  {
7625  /*%%%*/
7626  NODE *n1;
7627  if ((nd_type((yyvsp[(4) - (4)].node)) == NODE_ARRAY) && (n1 = splat_array((yyvsp[(1) - (4)].node))) != 0) {
7628  (yyval.node) = list_concat(n1, (yyvsp[(4) - (4)].node));
7629  }
7630  else {
7631  (yyval.node) = arg_concat((yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node), (yylsp[(1) - (4)]).first_column);
7632  }
7633  /*%
7634  $$ = arg_add_star($1, $4);
7635  %*/
7636  ;}
7637  break;
7638 
7639  case 277:
7640 #line 2500 "parse.y"
7641  {
7642  /*%%%*/
7643  NODE *n1;
7644  if ((n1 = splat_array((yyvsp[(1) - (3)].node))) != 0) {
7645  (yyval.node) = list_append(n1, (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7646  }
7647  else {
7648  (yyval.node) = arg_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
7649  }
7650  /*%
7651  $$ = mrhs_add(args2mrhs($1), $3);
7652  %*/
7653  ;}
7654  break;
7655 
7656  case 278:
7657 #line 2514 "parse.y"
7658  {
7659  /*%%%*/
7660  NODE *n1;
7661  if (nd_type((yyvsp[(4) - (4)].node)) == NODE_ARRAY &&
7662  (n1 = splat_array((yyvsp[(1) - (4)].node))) != 0) {
7663  (yyval.node) = list_concat(n1, (yyvsp[(4) - (4)].node));
7664  }
7665  else {
7666  (yyval.node) = arg_concat((yyvsp[(1) - (4)].node), (yyvsp[(4) - (4)].node), (yylsp[(1) - (4)]).first_column);
7667  }
7668  /*%
7669  $$ = mrhs_add_star(args2mrhs($1), $4);
7670  %*/
7671  ;}
7672  break;
7673 
7674  case 279:
7675 #line 2529 "parse.y"
7676  {
7677  /*%%%*/
7678  (yyval.node) = NEW_SPLAT((yyvsp[(2) - (2)].node));
7679  nd_set_column((yyval.node), (yylsp[(1) - (2)]).first_column);
7680  /*%
7681  $$ = mrhs_add_star(mrhs_new(), $2);
7682  %*/
7683  ;}
7684  break;
7685 
7686  case 290:
7687 #line 2550 "parse.y"
7688  {
7689  /*%%%*/
7690  (yyval.node) = new_fcall((yyvsp[(1) - (1)].id), 0, (yylsp[(1) - (1)]).first_column);
7691  /*%
7692  $$ = method_arg(dispatch1(fcall, $1), arg_new());
7693  %*/
7694  ;}
7695  break;
7696 
7697  case 291:
7698 #line 2558 "parse.y"
7699  {
7700  (yyvsp[(1) - (1)].val) = cmdarg_stack;
7701  CMDARG_SET(0);
7702  /*%%%*/
7703  (yyval.num) = ruby_sourceline;
7704  /*%
7705  %*/
7706  ;}
7707  break;
7708 
7709  case 292:
7710 #line 2568 "parse.y"
7711  {
7712  CMDARG_SET((yyvsp[(1) - (4)].val));
7713  /*%%%*/
7714  if ((yyvsp[(3) - (4)].node) == NULL) {
7715  (yyval.node) = NEW_NIL();
7716  nd_set_column((yyval.node), (yylsp[(1) - (4)]).first_column);
7717  }
7718  else {
7719  set_line_body((yyvsp[(3) - (4)].node), (yyvsp[(2) - (4)].num));
7720  (yyval.node) = new_begin((yyvsp[(3) - (4)].node), (yylsp[(1) - (4)]).first_column);
7721  }
7722  nd_set_line((yyval.node), (yyvsp[(2) - (4)].num));
7723  /*%
7724  $$ = dispatch1(begin, $3);
7725  %*/
7726  ;}
7727  break;
7728 
7729  case 293:
7730 #line 2584 "parse.y"
7731  {SET_LEX_STATE(EXPR_ENDARG);;}
7732  break;
7733 
7734  case 294:
7735 #line 2585 "parse.y"
7736  {
7737  /*%%%*/
7738  (yyval.node) = new_begin(0, (yylsp[(1) - (3)]).first_column);
7739  /*%
7740  $$ = dispatch1(paren, 0);
7741  %*/
7742  ;}
7743  break;
7744 
7745  case 295:
7746 #line 2593 "parse.y"
7747  {
7748  (yyvsp[(1) - (1)].val) = cmdarg_stack;
7749  CMDARG_SET(0);
7750  ;}
7751  break;
7752 
7753  case 296:
7754 #line 2597 "parse.y"
7755  {SET_LEX_STATE(EXPR_ENDARG);;}
7756  break;
7757 
7758  case 297:
7759 #line 2598 "parse.y"
7760  {
7761  CMDARG_SET((yyvsp[(1) - (5)].val));
7762  /*%%%*/
7763  (yyval.node) = (yyvsp[(3) - (5)].node);
7764  /*%
7765  $$ = dispatch1(paren, $3);
7766  %*/
7767  ;}
7768  break;
7769 
7770  case 298:
7771 #line 2607 "parse.y"
7772  {
7773  /*%%%*/
7774  (yyval.node) = (yyvsp[(2) - (3)].node);
7775  /*%
7776  $$ = dispatch1(paren, $2);
7777  %*/
7778  ;}
7779  break;
7780 
7781  case 299:
7782 #line 2615 "parse.y"
7783  {
7784  /*%%%*/
7785  (yyval.node) = NEW_COLON2((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id));
7786  nd_set_column((yyval.node), (yylsp[(1) - (3)]).first_column);
7787  /*%
7788  $$ = dispatch2(const_path_ref, $1, $3);
7789  %*/
7790  ;}
7791  break;
7792 
7793  case 300:
7794 #line 2624 "parse.y"
7795  {
7796  /*%%%*/
7797  (yyval.node) = NEW_COLON3((yyvsp[(2) - (2)].id));
7798  nd_set_column((yyval.node), (yylsp[(1) - (2)]).first_column);
7799  /*%
7800  $$ = dispatch1(top_const_ref, $2);
7801  %*/
7802  ;}
7803  break;
7804 
7805  case 301:
7806 #line 2633 "parse.y"
7807  {
7808  /*%%%*/
7809  if ((yyvsp[(2) - (3)].node) == 0) {
7810  (yyval.node) = new_zarray((yylsp[(1) - (3)]).first_column); /* zero length array*/
7811  }
7812  else {
7813  (yyval.node) = (yyvsp[(2) - (3)].node);
7814  }
7815  /*%
7816  $$ = dispatch1(array, escape_Qundef($2));
7817  %*/
7818  ;}
7819  break;
7820 
7821  case 302:
7822 #line 2646 "parse.y"
7823  {
7824  /*%%%*/
7825  (yyval.node) = new_hash((yyvsp[(2) - (3)].node), (yylsp[(1) - (3)]).first_column);
7826  (yyval.node)->nd_alen = TRUE;
7827  /*%
7828  $$ = dispatch1(hash, escape_Qundef($2));
7829  %*/
7830  ;}
7831  break;
7832 
7833  case 303:
7834 #line 2655 "parse.y"
7835  {
7836  /*%%%*/
7837  (yyval.node) = NEW_RETURN(0);
7838  nd_set_column((yyval.node), (yylsp[(1) - (1)]).first_column);
7839  /*%
7840  $$ = dispatch0(return0);
7841  %*/
7842  ;}
7843  break;
7844 
7845  case 304:
7846 #line 2664 "parse.y"
7847  {
7848  /*%%%*/
7849  (yyval.node) = new_yield((yyvsp[(3) - (4)].node), (yylsp[(1) - (4)]).first_column);
7850  /*%
7851  $$ = dispatch1(yield, dispatch1(paren, $3));
7852  %*/
7853  ;}
7854  break;
7855 
7856  case 305:
7857 #line 2672 "parse.y"
7858  {
7859  /*%%%*/
7860  (yyval.node) = NEW_YIELD(0);
7861  nd_set_column((yyval.node), (yylsp[(1) - (3)]).first_column);
7862  /*%
7863  $$ = dispatch1(yield, dispatch1(paren, arg_new()));
7864  %*/
7865  ;}
7866  break;
7867 
7868  case 306:
7869 #line 2681 "parse.y"
7870  {
7871  /*%%%*/
7872  (yyval.node) = NEW_YIELD(0);
7873  nd_set_column((yyval.node), (yylsp[(1) - (1)]).first_column);
7874  /*%
7875  $$ = dispatch0(yield0);
7876  %*/
7877  ;}
7878  break;
7879 
7880  case 307:
7881 #line 2689 "parse.y"
7882  {in_defined = 1;;}
7883  break;
7884 
7885  case 308:
7886 #line 2690 "parse.y"
7887  {
7888  in_defined = 0;
7889  (yyval.node) = new_defined((yyvsp[(5) - (6)].node), (yylsp[(1) - (6)]).first_column);
7890  ;}
7891  break;
7892 
7893  case 309:
7894 #line 2695 "parse.y"
7895  {
7896  (yyval.node) = call_uni_op(method_cond((yyvsp[(3) - (4)].node), (yylsp[(1) - (4)]).first_column), METHOD_NOT, (yylsp[(1) - (4)]).first_column);
7897  ;}
7898  break;
7899 
7900  case 310:
7901 #line 2699 "parse.y"
7902  {
7903  (yyval.node) = call_uni_op(method_cond(new_nil(), (yylsp[(1) - (3)]).first_column), METHOD_NOT, (yylsp[(1) - (3)]).first_column);
7904  ;}
7905  break;
7906 
7907  case 311:
7908 #line 2703 "parse.y"
7909  {
7910  /*%%%*/
7911  (yyvsp[(2) - (2)].node)->nd_iter = (yyvsp[(1) - (2)].node);
7912  (yyval.node) = (yyvsp[(2) - (2)].node);
7913  /*%
7914  $$ = method_arg(dispatch1(fcall, $1), arg_new());
7915  $$ = method_add_block($$, $2);
7916  %*/
7917  ;}
7918  break;
7919 
7920  case 313:
7921 #line 2714 "parse.y"
7922  {
7923  /*%%%*/
7924  block_dup_check((yyvsp[(1) - (2)].node)->nd_args, (yyvsp[(2) - (2)].node));
7925  (yyvsp[(2) - (2)].node)->nd_iter = (yyvsp[(1) - (2)].node);
7926  (yyval.node) = (yyvsp[(2) - (2)].node);
7927  /*%
7928  $$ = method_add_block($1, $2);
7929  %*/
7930  ;}
7931  break;
7932 
7933  case 314:
7934 #line 2724 "parse.y"
7935  {
7936  (yyval.node) = (yyvsp[(2) - (2)].node);
7937  ;}
7938  break;
7939 
7940  case 315:
7941 #line 2731 "parse.y"
7942  {
7943  /*%%%*/
7944  (yyval.node) = new_if((yyvsp[(2) - (6)].node), (yyvsp[(4) - (6)].node), (yyvsp[(5) - (6)].node), (yylsp[(1) - (6)]).first_column);
7945  fixpos((yyval.node), (yyvsp[(2) - (6)].node));
7946  /*%
7947  $$ = dispatch3(if, $2, $4, escape_Qundef($5));
7948  %*/
7949  ;}
7950  break;
7951 
7952  case 316:
7953 #line 2743 "parse.y"
7954  {
7955  /*%%%*/
7956  (yyval.node) = new_unless((yyvsp[(2) - (6)].node), (yyvsp[(4) - (6)].node), (yyvsp[(5) - (6)].node), (yylsp[(1) - (6)]).first_column);
7957  fixpos((yyval.node), (yyvsp[(2) - (6)].node));
7958  /*%
7959  $$ = dispatch3(unless, $2, $4, escape_Qundef($5));
7960  %*/
7961  ;}
7962  break;
7963 
7964  case 317:
7965 #line 2751 "parse.y"
7966  {COND_PUSH(1);;}
7967  break;
7968 
7969  case 318:
7970 #line 2751 "parse.y"
7971  {COND_POP();;}
7972  break;
7973 
7974  case 319:
7975 #line 2754 "parse.y"
7976  {
7977  /*%%%*/
7978  (yyval.node) = NEW_WHILE(cond((yyvsp[(3) - (7)].node), (yylsp[(1) - (7)]).first_column), (yyvsp[(6) - (7)].node), 1);
7979  fixpos((yyval.node), (yyvsp[(3) - (7)].node));
7980  nd_set_column((yyval.node), (yylsp[(1) - (7)]).first_column);
7981  /*%
7982  $$ = dispatch2(while, $3, $6);
7983  %*/
7984  ;}
7985  break;
7986 
7987  case 320:
7988 #line 2763 "parse.y"
7989  {COND_PUSH(1);;}
7990  break;
7991 
7992  case 321:
7993 #line 2763 "parse.y"
7994  {COND_POP();;}
7995  break;
7996 
7997  case 322:
7998 #line 2766 "parse.y"
7999  {
8000  /*%%%*/
8001  (yyval.node) = NEW_UNTIL(cond((yyvsp[(3) - (7)].node), (yylsp[(1) - (7)]).first_column), (yyvsp[(6) - (7)].node), 1);
8002  fixpos((yyval.node), (yyvsp[(3) - (7)].node));
8003  nd_set_column((yyval.node), (yylsp[(1) - (7)]).first_column);
8004  /*%
8005  $$ = dispatch2(until, $3, $6);
8006  %*/
8007  ;}
8008  break;
8009 
8010  case 323:
8011 #line 2778 "parse.y"
8012  {
8013  /*%%%*/
8014  (yyval.node) = NEW_CASE((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node));
8015  fixpos((yyval.node), (yyvsp[(2) - (5)].node));
8016  nd_set_column((yyval.node), (yylsp[(1) - (5)]).first_column);
8017  /*%
8018  $$ = dispatch2(case, $2, $4);
8019  %*/
8020  ;}
8021  break;
8022 
8023  case 324:
8024 #line 2788 "parse.y"
8025  {
8026  /*%%%*/
8027  (yyval.node) = NEW_CASE(0, (yyvsp[(3) - (4)].node));
8028  nd_set_line((yyvsp[(3) - (4)].node), (yyvsp[(1) - (4)].num));
8029  nd_set_column((yyval.node), (yylsp[(1) - (4)]).first_column);
8030  /*%
8031  $$ = dispatch2(case, Qnil, $3);
8032  %*/
8033  ;}
8034  break;
8035 
8036  case 325:
8037 #line 2798 "parse.y"
8038  {COND_PUSH(1);;}
8039  break;
8040 
8041  case 326:
8042 #line 2800 "parse.y"
8043  {COND_POP();;}
8044  break;
8045 
8046  case 327:
8047 #line 2803 "parse.y"
8048  {
8049  /*%%%*/
8050  /*
8051  * for a, b, c in e
8052  * #=>
8053  * e.each{|*x| a, b, c = x}
8054  *
8055  * for a in e
8056  * #=>
8057  * e.each{|x| a, = x}
8058  */
8059  ID id = internal_id();
8060  ID *tbl = ALLOC_N(ID, 2);
8061  NODE *m = NEW_ARGS_AUX(0, 0);
8062  NODE *args, *scope;
8063 
8064  switch (nd_type((yyvsp[(2) - (9)].node))) {
8065  case NODE_MASGN:
8066  m->nd_next = node_assign((yyvsp[(2) - (9)].node), new_for(new_dvar(id, (yylsp[(1) - (9)]).first_column), 0, 0, (yylsp[(1) - (9)]).first_column), (yylsp[(1) - (9)]).first_column);
8067  args = new_args(m, 0, id, 0, new_args_tail(0, 0, 0, (yylsp[(1) - (9)]).first_column));
8068  break;
8069  case NODE_LASGN:
8070  case NODE_DASGN:
8071  case NODE_DASGN_CURR:
8072  (yyvsp[(2) - (9)].node)->nd_value = new_dvar(id, (yylsp[(1) - (9)]).first_column);
8073  m->nd_plen = 1;
8074  m->nd_next = (yyvsp[(2) - (9)].node);
8075  args = new_args(m, 0, 0, 0, new_args_tail(0, 0, 0, (yylsp[(1) - (9)]).first_column));
8076  break;
8077  default:
8078  {
8079  NODE *masgn = new_masgn(new_list((yyvsp[(2) - (9)].node), (yylsp[(1) - (9)]).first_column), 0, (yylsp[(1) - (9)]).first_column);
8080  m->nd_next = node_assign(masgn, new_dvar(id, (yylsp[(1) - (9)]).first_column), (yylsp[(1) - (9)]).first_column);
8081  args = new_args(m, 0, id, 0, new_args_tail(0, 0, 0, (yylsp[(1) - (9)]).first_column));
8082  break;
8083  }
8084  }
8085  scope = NEW_NODE(NODE_SCOPE, tbl, (yyvsp[(8) - (9)].node), args);
8086  nd_set_column(scope, (yylsp[(1) - (9)]).first_column);
8087  tbl[0] = 1; tbl[1] = id;
8088  (yyval.node) = new_for(0, (yyvsp[(5) - (9)].node), scope, (yylsp[(1) - (9)]).first_column);
8089  fixpos((yyval.node), (yyvsp[(2) - (9)].node));
8090  /*%
8091  $$ = dispatch3(for, $2, $5, $8);
8092  %*/
8093  ;}
8094  break;
8095 
8096  case 328:
8097 #line 2850 "parse.y"
8098  {
8099  if (in_def || in_single)
8100  yyerror0("class definition in method body");
8101  local_push(0);
8102  /*%%%*/
8103  (yyval.num) = ruby_sourceline;
8104  /*%
8105  %*/
8106  ;}
8107  break;
8108 
8109  case 329:
8110 #line 2861 "parse.y"
8111  {
8112  /*%%%*/
8113  (yyval.node) = NEW_CLASS((yyvsp[(2) - (6)].node), (yyvsp[(5) - (6)].node), (yyvsp[(3) - (6)].node));
8114  nd_set_column((yyval.node)->nd_body, (yylsp[(1) - (6)]).first_column);
8115  set_line_body((yyvsp[(5) - (6)].node), (yyvsp[(4) - (6)].num));
8116  nd_set_line((yyval.node), (yyvsp[(4) - (6)].num));
8117  nd_set_column((yyval.node), (yylsp[(1) - (6)]).first_column);
8118  /*%
8119  $$ = dispatch3(class, $2, $3, $5);
8120  %*/
8121  local_pop();
8122  ;}
8123  break;
8124 
8125  case 330:
8126 #line 2874 "parse.y"
8127  {
8128  (yyval.num) = (in_def << 1) | in_single;
8129  in_def = 0;
8130  in_single = 0;
8131  local_push(0);
8132  ;}
8133  break;
8134 
8135  case 331:
8136 #line 2883 "parse.y"
8137  {
8138  /*%%%*/
8139  (yyval.node) = NEW_SCLASS((yyvsp[(3) - (7)].node), (yyvsp[(6) - (7)].node));
8140  nd_set_column((yyval.node)->nd_body, (yylsp[(1) - (7)]).first_column);
8141  set_line_body((yyvsp[(6) - (7)].node), nd_line((yyvsp[(3) - (7)].node)));
8142  fixpos((yyval.node), (yyvsp[(3) - (7)].node));
8143  nd_set_column((yyval.node), (yylsp[(1) - (7)]).first_column);
8144  /*%
8145  $$ = dispatch2(sclass, $3, $6);
8146  %*/
8147  local_pop();
8148  in_def = ((yyvsp[(4) - (7)].num) >> 1) & 1;
8149  in_single = (yyvsp[(4) - (7)].num) & 1;
8150  ;}
8151  break;
8152 
8153  case 332:
8154 #line 2898 "parse.y"
8155  {
8156  if (in_def || in_single)
8157  yyerror0("module definition in method body");
8158  local_push(0);
8159  /*%%%*/
8160  (yyval.num) = ruby_sourceline;
8161  /*%
8162  %*/
8163  ;}
8164  break;
8165 
8166  case 333:
8167 #line 2909 "parse.y"
8168  {
8169  /*%%%*/
8170  (yyval.node) = NEW_MODULE((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node));
8171  nd_set_column((yyval.node)->nd_body, (yylsp[(1) - (5)]).first_column);
8172  set_line_body((yyvsp[(4) - (5)].node), (yyvsp[(3) - (5)].num));
8173  nd_set_line((yyval.node), (yyvsp[(3) - (5)].num));
8174  nd_set_column((yyval.node), (yylsp[(1) - (5)]).first_column);
8175  /*%
8176  $$ = dispatch2(module, $2, $4);
8177  %*/
8178  local_pop();
8179  ;}
8180  break;
8181 
8182  case 334:
8183 #line 2922 "parse.y"
8184  {
8185  local_push(0);
8186  (yyval.id) = current_arg;
8187  current_arg = 0;
8188  ;}
8189  break;
8190 
8191  case 335:
8192 #line 2927 "parse.y"
8193  {
8194  (yyval.num) = in_def;
8195  in_def = 1;
8196  ;}
8197  break;
8198 
8199  case 336:
8200 #line 2934 "parse.y"
8201  {
8202  /*%%%*/
8203  NODE *body = remove_begin((yyvsp[(6) - (7)].node));
8204  reduce_nodes(&body);
8205  (yyval.node) = NEW_DEFN((yyvsp[(2) - (7)].id), (yyvsp[(5) - (7)].node), body, METHOD_VISI_PRIVATE);
8206  nd_set_column((yyval.node)->nd_defn, (yylsp[(1) - (7)]).first_column);
8207  set_line_body(body, (yyvsp[(1) - (7)].num));
8208  nd_set_line((yyval.node), (yyvsp[(1) - (7)].num));
8209  nd_set_column((yyval.node), (yylsp[(1) - (7)]).first_column);
8210  /*%
8211  $$ = dispatch3(def, $2, $5, $6);
8212  %*/
8213  local_pop();
8214  in_def = (yyvsp[(4) - (7)].num) & 1;
8215  current_arg = (yyvsp[(3) - (7)].id);
8216  ;}
8217  break;
8218 
8219  case 337:
8220 #line 2950 "parse.y"
8221  {SET_LEX_STATE(EXPR_FNAME);;}
8222  break;
8223 
8224  case 338:
8225 #line 2951 "parse.y"
8226  {
8227  (yyvsp[(4) - (5)].num) = in_single;
8228  in_single = 1;
8229  SET_LEX_STATE(EXPR_ENDFN|EXPR_LABEL); /* force for args */
8230  local_push(0);
8231  (yyval.id) = current_arg;
8232  current_arg = 0;
8233  ;}
8234  break;
8235 
8236  case 339:
8237 #line 2962 "parse.y"
8238  {
8239  /*%%%*/
8240  NODE *body = remove_begin((yyvsp[(8) - (9)].node));
8241  reduce_nodes(&body);
8242  (yyval.node) = NEW_DEFS((yyvsp[(2) - (9)].node), (yyvsp[(5) - (9)].id), (yyvsp[(7) - (9)].node), body);
8243  nd_set_column((yyval.node)->nd_defn, (yylsp[(1) - (9)]).first_column);
8244  set_line_body(body, (yyvsp[(1) - (9)].num));
8245  nd_set_line((yyval.node), (yyvsp[(1) - (9)].num));
8246  nd_set_column((yyval.node), (yylsp[(1) - (9)]).first_column);
8247  /*%
8248  $$ = dispatch5(defs, $2, $<val>3, $5, $7, $8);
8249  %*/
8250  local_pop();
8251  in_single = (yyvsp[(4) - (9)].num) & 1;
8252  current_arg = (yyvsp[(6) - (9)].id);
8253  ;}
8254  break;
8255 
8256  case 340:
8257 #line 2979 "parse.y"
8258  {
8259  /*%%%*/
8260  (yyval.node) = NEW_BREAK(0);
8261  nd_set_column((yyval.node), (yylsp[(1) - (1)]).first_column);
8262  /*%
8263  $$ = dispatch1(break, arg_new());
8264  %*/
8265  ;}
8266  break;
8267 
8268  case 341:
8269 #line 2988 "parse.y"
8270  {
8271  /*%%%*/
8272  (yyval.node) = NEW_NEXT(0);
8273  nd_set_column((yyval.node), (yylsp[(1) - (1)]).first_column);
8274  /*%
8275  $$ = dispatch1(next, arg_new());
8276  %*/
8277  ;}
8278  break;
8279 
8280  case 342:
8281 #line 2997 "parse.y"
8282  {
8283  /*%%%*/
8284  (yyval.node) = NEW_REDO();
8285  nd_set_column((yyval.node), (yylsp[(1) - (1)]).first_column);
8286  /*%
8287  $$ = dispatch0(redo);
8288  %*/
8289  ;}
8290  break;
8291 
8292  case 343:
8293 #line 3006 "parse.y"
8294  {
8295  /*%%%*/
8296  (yyval.node) = NEW_RETRY();
8297  nd_set_column((yyval.node), (yylsp[(1) - (1)]).first_column);
8298  /*%
8299  $$ = dispatch0(retry);
8300  %*/
8301  ;}
8302  break;
8303 
8304  case 344:
8305 #line 3017 "parse.y"
8306  {
8307  /*%%%*/
8308  value_expr((yyvsp[(1) - (1)].node));
8309  (yyval.node) = (yyvsp[(1) - (1)].node);
8310  if (!(yyval.node)) (yyval.node) = NEW_NIL();
8311  /*%
8312  $$ = $1;
8313  %*/
8314  ;}
8315  break;
8316 
8317  case 345:
8318 #line 3029 "parse.y"
8319  {
8320  token_info_push("begin");
8321  ;}
8322  break;
8323 
8324  case 346:
8325 #line 3035 "parse.y"
8326  {
8327  token_info_push("if");
8328  ;}
8329  break;
8330 
8331  case 347:
8332 #line 3041 "parse.y"
8333  {
8334  token_info_push("unless");
8335  ;}
8336  break;
8337 
8338  case 348:
8339 #line 3047 "parse.y"
8340  {
8341  token_info_push("while");
8342  ;}
8343  break;
8344 
8345  case 349:
8346 #line 3053 "parse.y"
8347  {
8348  token_info_push("until");
8349  ;}
8350  break;
8351 
8352  case 350:
8353 #line 3059 "parse.y"
8354  {
8355  token_info_push("case");
8356  /*%%%*/
8357  (yyval.num) = ruby_sourceline;
8358  /*%
8359  %*/
8360  ;}
8361  break;
8362 
8363  case 351:
8364 #line 3069 "parse.y"
8365  {
8366  token_info_push("for");
8367  ;}
8368  break;
8369 
8370  case 352:
8371 #line 3075 "parse.y"
8372  {
8373  token_info_push("class");
8374  ;}
8375  break;
8376 
8377  case 353:
8378 #line 3081 "parse.y"
8379  {
8380  token_info_push("module");
8381  ;}
8382  break;
8383 
8384  case 354:
8385 #line 3087 "parse.y"
8386  {
8387  token_info_push("def");
8388  /*%%%*/
8389  (yyval.num) = ruby_sourceline;
8390  /*%
8391  %*/
8392  ;}
8393  break;
8394 
8395  case 355:
8396 #line 3097 "parse.y"
8397  {
8398  token_info_pop("end");
8399  ;}
8400  break;
8401 
8402  case 362:
8403 #line 3127 "parse.y"
8404  {
8405  /*%%%*/
8406  (yyval.node) = new_if((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node), (yylsp[(1) - (5)]).first_column);
8407  fixpos((yyval.node), (yyvsp[(2) - (5)].node));
8408  /*%
8409  $$ = dispatch3(elsif, $2, $4, escape_Qundef($5));
8410  %*/
8411  ;}
8412  break;
8413 
8414  case 364:
8415 #line 3139 "parse.y"
8416  {
8417  /*%%%*/
8418  (yyval.node) = (yyvsp[(2) - (2)].node);
8419  /*%
8420  $$ = dispatch1(else, $2);
8421  %*/
8422  ;}
8423  break;
8424 
8425  case 367:
8426 #line 3153 "parse.y"
8427  {
8428  (yyval.node) = assignable((yyvsp[(1) - (1)].id), 0, (yylsp[(1) - (1)]).first_column);
8429  /*%%%*/
8430  /*%
8431  %*/
8432  ;}
8433  break;
8434 
8435  case 368:
8436 #line 3160 "parse.y"
8437  {
8438  /*%%%*/
8439  (yyval.node) = (yyvsp[(2) - (3)].node);
8440  /*%
8441  $$ = dispatch1(mlhs_paren, $2);
8442  %*/
8443  ;}
8444  break;
8445 
8446  case 369:
8447 #line 3170 "parse.y"
8448  {
8449  /*%%%*/
8450  (yyval.node) = new_list((yyvsp[(1) - (1)].node), (yylsp[(1) - (1)]).first_column);
8451  /*%
8452  $$ = mlhs_add(mlhs_new(), $1);
8453  %*/
8454  ;}
8455  break;
8456 
8457  case 370:
8458 #line 3178 "parse.y"
8459  {
8460  /*%%%*/
8461  (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
8462  /*%
8463  $$ = mlhs_add($1, $3);
8464  %*/
8465  ;}
8466  break;
8467 
8468  case 371:
8469 #line 3188 "parse.y"
8470  {
8471  /*%%%*/
8472  (yyval.node) = new_masgn((yyvsp[(1) - (1)].node), 0, (yylsp[(1) - (1)]).first_column);
8473  /*%
8474  $$ = $1;
8475  %*/
8476  ;}
8477  break;
8478 
8479  case 372:
8480 #line 3196 "parse.y"
8481  {
8482  (yyval.node) = assignable((yyvsp[(4) - (4)].id), 0, (yylsp[(1) - (4)]).first_column);
8483  /*%%%*/
8484  (yyval.node) = new_masgn((yyvsp[(1) - (4)].node), (yyval.node), (yylsp[(1) - (4)]).first_column);
8485  /*%
8486  $$ = mlhs_add_star($1, $$);
8487  %*/
8488  ;}
8489  break;
8490 
8491  case 373:
8492 #line 3205 "parse.y"
8493  {
8494  (yyval.node) = assignable((yyvsp[(4) - (6)].id), 0, (yylsp[(1) - (6)]).first_column);
8495  /*%%%*/
8496  (yyval.node) = new_masgn((yyvsp[(1) - (6)].node), new_postarg((yyval.node), (yyvsp[(6) - (6)].node), (yylsp[(1) - (6)]).first_column), (yylsp[(1) - (6)]).first_column);
8497  /*%
8498  $$ = mlhs_add_star($1, $$);
8499  $$ = mlhs_add_post($$, $6);
8500  %*/
8501  ;}
8502  break;
8503 
8504  case 374:
8505 #line 3215 "parse.y"
8506  {
8507  /*%%%*/
8508  (yyval.node) = new_masgn((yyvsp[(1) - (3)].node), (NODE *)-1, (yylsp[(1) - (3)]).first_column);
8509  /*%
8510  $$ = mlhs_add_star($1, Qnil);
8511  %*/
8512  ;}
8513  break;
8514 
8515  case 375:
8516 #line 3223 "parse.y"
8517  {
8518  /*%%%*/
8519  (yyval.node) = new_masgn((yyvsp[(1) - (5)].node), new_postarg((NODE *)-1, (yyvsp[(5) - (5)].node), (yylsp[(1) - (5)]).first_column), (yylsp[(1) - (5)]).first_column);
8520  /*%
8521  $$ = mlhs_add_star($1, Qnil);
8522  $$ = mlhs_add_post($$, $5);
8523  %*/
8524  ;}
8525  break;
8526 
8527  case 376:
8528 #line 3232 "parse.y"
8529  {
8530  (yyval.node) = assignable((yyvsp[(2) - (2)].id), 0, (yylsp[(1) - (2)]).first_column);
8531  /*%%%*/
8532  (yyval.node) = new_masgn(0, (yyval.node), (yylsp[(1) - (2)]).first_column);
8533  /*%
8534  $$ = mlhs_add_star(mlhs_new(), $$);
8535  %*/
8536  ;}
8537  break;
8538 
8539  case 377:
8540 #line 3241 "parse.y"
8541  {
8542  (yyval.node) = assignable((yyvsp[(2) - (4)].id), 0, (yylsp[(1) - (4)]).first_column);
8543  /*%%%*/
8544  (yyval.node) = new_masgn(0, new_postarg((yyval.node), (yyvsp[(4) - (4)].node), (yylsp[(1) - (4)]).first_column), (yylsp[(1) - (4)]).first_column);
8545  /*%
8546  $$ = mlhs_add_star(mlhs_new(), $$);
8547  $$ = mlhs_add_post($$, $4);
8548  %*/
8549  ;}
8550  break;
8551 
8552  case 378:
8553 #line 3251 "parse.y"
8554  {
8555  /*%%%*/
8556  (yyval.node) = new_masgn(0, (NODE *)-1, (yylsp[(1) - (1)]).first_column);
8557  /*%
8558  $$ = mlhs_add_star(mlhs_new(), Qnil);
8559  %*/
8560  ;}
8561  break;
8562 
8563  case 379:
8564 #line 3259 "parse.y"
8565  {
8566  /*%%%*/
8567  (yyval.node) = new_masgn(0, new_postarg((NODE *)-1, (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column), (yylsp[(1) - (3)]).first_column);
8568  /*%
8569  $$ = mlhs_add_star(mlhs_new(), Qnil);
8570  $$ = mlhs_add_post($$, $3);
8571  %*/
8572  ;}
8573  break;
8574 
8575  case 380:
8576 #line 3271 "parse.y"
8577  {
8578  (yyval.node) = new_args_tail((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].id), (yylsp[(1) - (4)]).first_column);
8579  ;}
8580  break;
8581 
8582  case 381:
8583 #line 3275 "parse.y"
8584  {
8585  (yyval.node) = new_args_tail((yyvsp[(1) - (2)].node), Qnone, (yyvsp[(2) - (2)].id), (yylsp[(1) - (2)]).first_column);
8586  ;}
8587  break;
8588 
8589  case 382:
8590 #line 3279 "parse.y"
8591  {
8592  (yyval.node) = new_args_tail(Qnone, (yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].id), (yylsp[(1) - (2)]).first_column);
8593  ;}
8594  break;
8595 
8596  case 383:
8597 #line 3283 "parse.y"
8598  {
8599  (yyval.node) = new_args_tail(Qnone, Qnone, (yyvsp[(1) - (1)].id), (yylsp[(1) - (1)]).first_column);
8600  ;}
8601  break;
8602 
8603  case 384:
8604 #line 3289 "parse.y"
8605  {
8606  (yyval.node) = (yyvsp[(2) - (2)].node);
8607  ;}
8608  break;
8609 
8610  case 385:
8611 #line 3293 "parse.y"
8612  {
8613  (yyval.node) = new_args_tail(Qnone, Qnone, Qnone, (yylsp[(0) - (0)]).first_column);
8614  ;}
8615  break;
8616 
8617  case 386:
8618 #line 3299 "parse.y"
8619  {
8620  (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].id), Qnone, (yyvsp[(6) - (6)].node));
8621  ;}
8622  break;
8623 
8624  case 387:
8625 #line 3303 "parse.y"
8626  {
8627  (yyval.node) = new_args((yyvsp[(1) - (8)].node), (yyvsp[(3) - (8)].node), (yyvsp[(5) - (8)].id), (yyvsp[(7) - (8)].node), (yyvsp[(8) - (8)].node));
8628  ;}
8629  break;
8630 
8631  case 388:
8632 #line 3307 "parse.y"
8633  {
8634  (yyval.node) = new_args((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node), Qnone, Qnone, (yyvsp[(4) - (4)].node));
8635  ;}
8636  break;
8637 
8638  case 389:
8639 #line 3311 "parse.y"
8640  {
8641  (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), Qnone, (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node));
8642  ;}
8643  break;
8644 
8645  case 390:
8646 #line 3315 "parse.y"
8647  {
8648  (yyval.node) = new_args((yyvsp[(1) - (4)].node), Qnone, (yyvsp[(3) - (4)].id), Qnone, (yyvsp[(4) - (4)].node));
8649  ;}
8650  break;
8651 
8652  case 391:
8653 #line 3319 "parse.y"
8654  {
8655  (yyval.node) = new_args((yyvsp[(1) - (2)].node), Qnone, 1, Qnone, new_args_tail(Qnone, Qnone, Qnone, (yylsp[(1) - (2)]).first_column));
8656  /*%%%*/
8657  /*%
8658  dispatch1(excessed_comma, $$);
8659  %*/
8660  ;}
8661  break;
8662 
8663  case 392:
8664 #line 3327 "parse.y"
8665  {
8666  (yyval.node) = new_args((yyvsp[(1) - (6)].node), Qnone, (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node));
8667  ;}
8668  break;
8669 
8670  case 393:
8671 #line 3331 "parse.y"
8672  {
8673  (yyval.node) = new_args((yyvsp[(1) - (2)].node), Qnone, Qnone, Qnone, (yyvsp[(2) - (2)].node));
8674  ;}
8675  break;
8676 
8677  case 394:
8678 #line 3335 "parse.y"
8679  {
8680  (yyval.node) = new_args(Qnone, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), Qnone, (yyvsp[(4) - (4)].node));
8681  ;}
8682  break;
8683 
8684  case 395:
8685 #line 3339 "parse.y"
8686  {
8687  (yyval.node) = new_args(Qnone, (yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node));
8688  ;}
8689  break;
8690 
8691  case 396:
8692 #line 3343 "parse.y"
8693  {
8694  (yyval.node) = new_args(Qnone, (yyvsp[(1) - (2)].node), Qnone, Qnone, (yyvsp[(2) - (2)].node));
8695  ;}
8696  break;
8697 
8698  case 397:
8699 #line 3347 "parse.y"
8700  {
8701  (yyval.node) = new_args(Qnone, (yyvsp[(1) - (4)].node), Qnone, (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].node));
8702  ;}
8703  break;
8704 
8705  case 398:
8706 #line 3351 "parse.y"
8707  {
8708  (yyval.node) = new_args(Qnone, Qnone, (yyvsp[(1) - (2)].id), Qnone, (yyvsp[(2) - (2)].node));
8709  ;}
8710  break;
8711 
8712  case 399:
8713 #line 3355 "parse.y"
8714  {
8715  (yyval.node) = new_args(Qnone, Qnone, (yyvsp[(1) - (4)].id), (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].node));
8716  ;}
8717  break;
8718 
8719  case 400:
8720 #line 3359 "parse.y"
8721  {
8722  (yyval.node) = new_args(Qnone, Qnone, Qnone, Qnone, (yyvsp[(1) - (1)].node));
8723  ;}
8724  break;
8725 
8726  case 402:
8727 #line 3366 "parse.y"
8728  {
8729  command_start = TRUE;
8730  ;}
8731  break;
8732 
8733  case 403:
8734 #line 3372 "parse.y"
8735  {
8736  current_arg = 0;
8737  /*%%%*/
8738  (yyval.node) = 0;
8739  /*%
8740  $$ = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil),
8741  escape_Qundef($2));
8742  %*/
8743  ;}
8744  break;
8745 
8746  case 404:
8747 #line 3382 "parse.y"
8748  {
8749  /*%%%*/
8750  (yyval.node) = 0;
8751  /*%
8752  $$ = blockvar_new(params_new(Qnil,Qnil,Qnil,Qnil,Qnil,Qnil,Qnil),
8753  Qnil);
8754  %*/
8755  ;}
8756  break;
8757 
8758  case 405:
8759 #line 3391 "parse.y"
8760  {
8761  current_arg = 0;
8762  /*%%%*/
8763  (yyval.node) = (yyvsp[(2) - (4)].node);
8764  /*%
8765  $$ = blockvar_new(escape_Qundef($2), escape_Qundef($3));
8766  %*/
8767  ;}
8768  break;
8769 
8770  case 406:
8771 #line 3403 "parse.y"
8772  {
8773  (yyval.node) = 0;
8774  ;}
8775  break;
8776 
8777  case 407:
8778 #line 3407 "parse.y"
8779  {
8780  /*%%%*/
8781  (yyval.node) = 0;
8782  /*%
8783  $$ = $3;
8784  %*/
8785  ;}
8786  break;
8787 
8788  case 410:
8789 #line 3433 "parse.y"
8790  {
8791  new_bv(get_id((yyvsp[(1) - (1)].id)));
8792  /*%%%*/
8793  /*%
8794  $$ = get_value($1);
8795  %*/
8796  ;}
8797  break;
8798 
8799  case 411:
8800 #line 3441 "parse.y"
8801  {
8802  (yyval.node) = 0;
8803  ;}
8804  break;
8805 
8806  case 412:
8807 #line 3446 "parse.y"
8808  {
8809  (yyval.vars) = dyna_push();
8810  ;}
8811  break;
8812 
8813  case 413:
8814 #line 3449 "parse.y"
8815  {
8816  (yyval.num) = lpar_beg;
8817  lpar_beg = ++paren_nest;
8818  ;}
8819  break;
8820 
8821  case 414:
8822 #line 3454 "parse.y"
8823  {
8824  (yyval.num) = ruby_sourceline;
8825  ;}
8826  break;
8827 
8828  case 415:
8829 #line 3457 "parse.y"
8830  {
8831  (yyval.val) = cmdarg_stack;
8832  CMDARG_SET(0);
8833  ;}
8834  break;
8835 
8836  case 416:
8837 #line 3462 "parse.y"
8838  {
8839  lpar_beg = (yyvsp[(2) - (6)].num);
8840  CMDARG_SET((yyvsp[(5) - (6)].val));
8841  CMDARG_LEXPOP();
8842  /*%%%*/
8843  (yyval.node) = NEW_LAMBDA((yyvsp[(3) - (6)].node), (yyvsp[(6) - (6)].node));
8844  nd_set_line((yyval.node), (yyvsp[(4) - (6)].num));
8845  nd_set_column((yyval.node), (yylsp[(1) - (6)]).first_column);
8846  nd_set_column((yyval.node)->nd_body, (yylsp[(1) - (6)]).first_column);
8847  /*%
8848  $$ = dispatch2(lambda, $3, $6);
8849  %*/
8850  dyna_pop((yyvsp[(1) - (6)].vars));
8851  ;}
8852  break;
8853 
8854  case 417:
8855 #line 3479 "parse.y"
8856  {
8857  /*%%%*/
8858  (yyval.node) = (yyvsp[(2) - (4)].node);
8859  /*%
8860  $$ = dispatch1(paren, $2);
8861  %*/
8862  ;}
8863  break;
8864 
8865  case 418:
8866 #line 3487 "parse.y"
8867  {
8868  (yyval.node) = (yyvsp[(1) - (1)].node);
8869  ;}
8870  break;
8871 
8872  case 419:
8873 #line 3493 "parse.y"
8874  {
8875  token_info_pop("}");
8876  (yyval.node) = (yyvsp[(2) - (3)].node);
8877  ;}
8878  break;
8879 
8880  case 420:
8881 #line 3498 "parse.y"
8882  {
8883  (yyval.node) = (yyvsp[(2) - (3)].node);
8884  ;}
8885  break;
8886 
8887  case 421:
8888 #line 3504 "parse.y"
8889  {
8890  /*%%%*/
8891  (yyval.num) = ruby_sourceline;
8892  /*% %*/
8893  ;}
8894  break;
8895 
8896  case 422:
8897 #line 3510 "parse.y"
8898  {
8899  (yyval.node) = (yyvsp[(3) - (4)].node);
8900  /*%%%*/
8901  nd_set_line((yyval.node), (yyvsp[(2) - (4)].num));
8902  /*% %*/
8903  ;}
8904  break;
8905 
8906  case 423:
8907 #line 3519 "parse.y"
8908  {
8909  /*%%%*/
8910  if (nd_type((yyvsp[(1) - (2)].node)) == NODE_YIELD) {
8911  compile_error(PARSER_ARG "block given to yield");
8912  }
8913  else {
8914  block_dup_check((yyvsp[(1) - (2)].node)->nd_args, (yyvsp[(2) - (2)].node));
8915  }
8916  (yyvsp[(2) - (2)].node)->nd_iter = (yyvsp[(1) - (2)].node);
8917  (yyval.node) = (yyvsp[(2) - (2)].node);
8918  fixpos((yyval.node), (yyvsp[(1) - (2)].node));
8919  /*%
8920  $$ = method_add_block($1, $2);
8921  %*/
8922  ;}
8923  break;
8924 
8925  case 424:
8926 #line 3535 "parse.y"
8927  {
8928  (yyval.node) = new_qcall((yyvsp[(2) - (4)].id), (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].node), (yylsp[(1) - (4)]).first_column);
8929  ;}
8930  break;
8931 
8932  case 425:
8933 #line 3539 "parse.y"
8934  {
8935  /*%%%*/
8936  block_dup_check((yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node));
8937  (yyvsp[(5) - (5)].node)->nd_iter = new_command_qcall((yyvsp[(2) - (5)].id), (yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node), (yylsp[(1) - (5)]).first_column);
8938  (yyval.node) = (yyvsp[(5) - (5)].node);
8939  fixpos((yyval.node), (yyvsp[(1) - (5)].node));
8940  /*%
8941  $$ = dispatch4(command_call, $1, $2, $3, $4);
8942  $$ = method_add_block($$, $5);
8943  %*/
8944  ;}
8945  break;
8946 
8947  case 426:
8948 #line 3551 "parse.y"
8949  {
8950  /*%%%*/
8951  block_dup_check((yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node));
8952  (yyvsp[(5) - (5)].node)->nd_iter = new_command_qcall((yyvsp[(2) - (5)].id), (yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(4) - (5)].node), (yylsp[(1) - (5)]).first_column);
8953  (yyval.node) = (yyvsp[(5) - (5)].node);
8954  fixpos((yyval.node), (yyvsp[(1) - (5)].node));
8955  /*%
8956  $$ = dispatch4(command_call, $1, $2, $3, $4);
8957  $$ = method_add_block($$, $5);
8958  %*/
8959  ;}
8960  break;
8961 
8962  case 427:
8963 #line 3565 "parse.y"
8964  {
8965  /*%%%*/
8966  (yyval.node) = (yyvsp[(1) - (2)].node);
8967  (yyval.node)->nd_args = (yyvsp[(2) - (2)].node);
8968  /*%
8969  $$ = method_arg(dispatch1(fcall, $1), $2);
8970  %*/
8971  ;}
8972  break;
8973 
8974  case 428:
8975 #line 3574 "parse.y"
8976  {
8977  /*%%%*/
8978  (yyval.num) = ruby_sourceline;
8979  /*% %*/
8980  ;}
8981  break;
8982 
8983  case 429:
8984 #line 3580 "parse.y"
8985  {
8986  (yyval.node) = new_qcall((yyvsp[(2) - (5)].id), (yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(5) - (5)].node), (yylsp[(1) - (5)]).first_column);
8987  nd_set_line((yyval.node), (yyvsp[(4) - (5)].num));
8988  ;}
8989  break;
8990 
8991  case 430:
8992 #line 3585 "parse.y"
8993  {
8994  /*%%%*/
8995  (yyval.num) = ruby_sourceline;
8996  /*% %*/
8997  ;}
8998  break;
8999 
9000  case 431:
9001 #line 3591 "parse.y"
9002  {
9003  (yyval.node) = new_qcall(ID2VAL(idCOLON2), (yyvsp[(1) - (5)].node), (yyvsp[(3) - (5)].id), (yyvsp[(5) - (5)].node), (yylsp[(1) - (5)]).first_column);
9004  nd_set_line((yyval.node), (yyvsp[(4) - (5)].num));
9005  ;}
9006  break;
9007 
9008  case 432:
9009 #line 3596 "parse.y"
9010  {
9011  (yyval.node) = new_qcall(ID2VAL(idCOLON2), (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].id), Qnull, (yylsp[(1) - (3)]).first_column);
9012  ;}
9013  break;
9014 
9015  case 433:
9016 #line 3600 "parse.y"
9017  {
9018  /*%%%*/
9019  (yyval.num) = ruby_sourceline;
9020  /*% %*/
9021  ;}
9022  break;
9023 
9024  case 434:
9025 #line 3606 "parse.y"
9026  {
9027  (yyval.node) = new_qcall((yyvsp[(2) - (4)].id), (yyvsp[(1) - (4)].node), ID2VAL(idCall), (yyvsp[(4) - (4)].node), (yylsp[(1) - (4)]).first_column);
9028  nd_set_line((yyval.node), (yyvsp[(3) - (4)].num));
9029  ;}
9030  break;
9031 
9032  case 435:
9033 #line 3611 "parse.y"
9034  {
9035  /*%%%*/
9036  (yyval.num) = ruby_sourceline;
9037  /*% %*/
9038  ;}
9039  break;
9040 
9041  case 436:
9042 #line 3617 "parse.y"
9043  {
9044  (yyval.node) = new_qcall(ID2VAL(idCOLON2), (yyvsp[(1) - (4)].node), ID2VAL(idCall), (yyvsp[(4) - (4)].node), (yylsp[(1) - (4)]).first_column);
9045  nd_set_line((yyval.node), (yyvsp[(3) - (4)].num));
9046  ;}
9047  break;
9048 
9049  case 437:
9050 #line 3622 "parse.y"
9051  {
9052  /*%%%*/
9053  (yyval.node) = NEW_SUPER((yyvsp[(2) - (2)].node));
9054  nd_set_column((yyval.node), (yylsp[(1) - (2)]).first_column);
9055  /*%
9056  $$ = dispatch1(super, $2);
9057  %*/
9058  ;}
9059  break;
9060 
9061  case 438:
9062 #line 3631 "parse.y"
9063  {
9064  /*%%%*/
9065  (yyval.node) = NEW_ZSUPER();
9066  nd_set_column((yyval.node), (yylsp[(1) - (1)]).first_column);
9067  /*%
9068  $$ = dispatch0(zsuper);
9069  %*/
9070  ;}
9071  break;
9072 
9073  case 439:
9074 #line 3640 "parse.y"
9075  {
9076  /*%%%*/
9077  if ((yyvsp[(1) - (4)].node) && nd_type((yyvsp[(1) - (4)].node)) == NODE_SELF)
9078  (yyval.node) = new_fcall(tAREF, (yyvsp[(3) - (4)].node), (yylsp[(1) - (4)]).first_column);
9079  else
9080  (yyval.node) = new_call((yyvsp[(1) - (4)].node), tAREF, (yyvsp[(3) - (4)].node), (yylsp[(1) - (4)]).first_column);
9081  fixpos((yyval.node), (yyvsp[(1) - (4)].node));
9082  /*%
9083  $$ = dispatch2(aref, $1, escape_Qundef($3));
9084  %*/
9085  ;}
9086  break;
9087 
9088  case 440:
9089 #line 3654 "parse.y"
9090  {
9091  /*%%%*/
9092  (yyval.num) = ruby_sourceline;
9093  /*% %*/
9094  ;}
9095  break;
9096 
9097  case 441:
9098 #line 3660 "parse.y"
9099  {
9100  (yyval.node) = (yyvsp[(3) - (4)].node);
9101  /*%%%*/
9102  nd_set_line((yyval.node), (yyvsp[(2) - (4)].num));
9103  /*% %*/
9104  ;}
9105  break;
9106 
9107  case 442:
9108 #line 3667 "parse.y"
9109  {
9110  /*%%%*/
9111  (yyval.num) = ruby_sourceline;
9112  /*% %*/
9113  ;}
9114  break;
9115 
9116  case 443:
9117 #line 3673 "parse.y"
9118  {
9119  (yyval.node) = (yyvsp[(3) - (4)].node);
9120  /*%%%*/
9121  nd_set_line((yyval.node), (yyvsp[(2) - (4)].num));
9122  /*% %*/
9123  ;}
9124  break;
9125 
9126  case 444:
9127 #line 3681 "parse.y"
9128  {(yyval.vars) = dyna_push();;}
9129  break;
9130 
9131  case 445:
9132 #line 3682 "parse.y"
9133  {(yyval.val) = cmdarg_stack >> 1; CMDARG_SET(0);;}
9134  break;
9135 
9136  case 446:
9137 #line 3684 "parse.y"
9138  {
9139  (yyval.node) = new_brace_body((yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].node), (yylsp[(1) - (4)]).first_column);
9140  dyna_pop((yyvsp[(1) - (4)].vars));
9141  CMDARG_SET((yyvsp[(2) - (4)].val));
9142  ;}
9143  break;
9144 
9145  case 447:
9146 #line 3691 "parse.y"
9147  {(yyval.vars) = dyna_push();;}
9148  break;
9149 
9150  case 448:
9151 #line 3692 "parse.y"
9152  {(yyval.val) = cmdarg_stack; CMDARG_SET(0);;}
9153  break;
9154 
9155  case 449:
9156 #line 3694 "parse.y"
9157  {
9158  (yyval.node) = new_do_body((yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].node), (yylsp[(1) - (4)]).first_column);
9159  dyna_pop((yyvsp[(1) - (4)].vars));
9160  CMDARG_SET((yyvsp[(2) - (4)].val));
9161  ;}
9162  break;
9163 
9164  case 450:
9165 #line 3704 "parse.y"
9166  {
9167  /*%%%*/
9168  (yyval.node) = NEW_WHEN((yyvsp[(2) - (5)].node), (yyvsp[(4) - (5)].node), (yyvsp[(5) - (5)].node));
9169  nd_set_column((yyval.node), (yylsp[(1) - (5)]).first_column);
9170  /*%
9171  $$ = dispatch3(when, $2, $4, escape_Qundef($5));
9172  %*/
9173  ;}
9174  break;
9175 
9176  case 453:
9177 #line 3721 "parse.y"
9178  {
9179  /*%%%*/
9180  if ((yyvsp[(3) - (6)].node)) {
9181  (yyvsp[(3) - (6)].node) = node_assign((yyvsp[(3) - (6)].node), new_errinfo((yylsp[(1) - (6)]).first_column), (yylsp[(1) - (6)]).first_column);
9182  (yyvsp[(5) - (6)].node) = block_append((yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].node), (yylsp[(1) - (6)]).first_column);
9183  }
9184  (yyval.node) = new_resbody((yyvsp[(2) - (6)].node), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node), (yylsp[(1) - (6)]).first_column);
9185  fixpos((yyval.node), (yyvsp[(2) - (6)].node)?(yyvsp[(2) - (6)].node):(yyvsp[(5) - (6)].node));
9186  /*%
9187  $$ = dispatch4(rescue,
9188  escape_Qundef($2),
9189  escape_Qundef($3),
9190  escape_Qundef($5),
9191  escape_Qundef($6));
9192  %*/
9193  ;}
9194  break;
9195 
9196  case 455:
9197 #line 3741 "parse.y"
9198  {
9199  /*%%%*/
9200  (yyval.node) = new_list((yyvsp[(1) - (1)].node), (yylsp[(1) - (1)]).first_column);
9201  /*%
9202  $$ = rb_ary_new3(1, get_value($1));
9203  %*/
9204  ;}
9205  break;
9206 
9207  case 456:
9208 #line 3749 "parse.y"
9209  {
9210  /*%%%*/
9211  if (!((yyval.node) = splat_array((yyvsp[(1) - (1)].node)))) (yyval.node) = (yyvsp[(1) - (1)].node);
9212  /*%
9213  $$ = $1;
9214  %*/
9215  ;}
9216  break;
9217 
9218  case 458:
9219 #line 3760 "parse.y"
9220  {
9221  (yyval.node) = (yyvsp[(2) - (2)].node);
9222  ;}
9223  break;
9224 
9225  case 460:
9226 #line 3767 "parse.y"
9227  {
9228  /*%%%*/
9229  (yyval.node) = (yyvsp[(2) - (2)].node);
9230  /*%
9231  $$ = dispatch1(ensure, $2);
9232  %*/
9233  ;}
9234  break;
9235 
9236  case 463:
9237 #line 3779 "parse.y"
9238  {
9239  /*%%%*/
9240  (yyval.node) = new_lit(ID2SYM((yyvsp[(1) - (1)].id)), (yylsp[(1) - (1)]).first_column);
9241  /*%
9242  $$ = dispatch1(symbol_literal, $1);
9243  %*/
9244  ;}
9245  break;
9246 
9247  case 465:
9248 #line 3790 "parse.y"
9249  {
9250  /*%%%*/
9251  NODE *node = (yyvsp[(1) - (1)].node);
9252  if (!node) {
9253  node = new_str(STR_NEW0(), (yylsp[(1) - (1)]).first_column);
9254  }
9255  else {
9256  node = evstr2dstr(node, (yylsp[(1) - (1)]).first_column);
9257  }
9258  (yyval.node) = node;
9259  /*%
9260  $$ = $1;
9261  %*/
9262  ;}
9263  break;
9264 
9265  case 466:
9266 #line 3807 "parse.y"
9267  {
9268  /*%%%*/
9269  nd_set_column((yyval.node), (yylsp[(1) - (1)]).first_column);
9270  /*%
9271  %*/
9272  ;}
9273  break;
9274 
9275  case 468:
9276 #line 3815 "parse.y"
9277  {
9278  /*%%%*/
9279  (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node), (yylsp[(1) - (2)]).first_column);
9280  /*%
9281  $$ = dispatch2(string_concat, $1, $2);
9282  %*/
9283  ;}
9284  break;
9285 
9286  case 469:
9287 #line 3825 "parse.y"
9288  {
9289  (yyval.node) = new_string1(heredoc_dedent((yyvsp[(2) - (3)].node)));
9290  ;}
9291  break;
9292 
9293  case 470:
9294 #line 3831 "parse.y"
9295  {
9296  (yyval.node) = new_xstring(heredoc_dedent((yyvsp[(2) - (3)].node)), (yylsp[(1) - (3)]).first_column);
9297  ;}
9298  break;
9299 
9300  case 471:
9301 #line 3837 "parse.y"
9302  {
9303  (yyval.node) = new_regexp((yyvsp[(2) - (3)].node), (yyvsp[(3) - (3)].num), (yylsp[(1) - (3)]).first_column);
9304  ;}
9305  break;
9306 
9307  case 472:
9308 #line 3843 "parse.y"
9309  {
9310  /*%%%*/
9311  (yyval.node) = new_zarray((yylsp[(1) - (3)]).first_column);
9312  /*%
9313  $$ = dispatch0(words_new);
9314  $$ = dispatch1(array, $$);
9315  %*/
9316  ;}
9317  break;
9318 
9319  case 473:
9320 #line 3852 "parse.y"
9321  {
9322  /*%%%*/
9323  (yyval.node) = (yyvsp[(2) - (3)].node);
9324  /*%
9325  $$ = dispatch1(array, $2);
9326  %*/
9327  ;}
9328  break;
9329 
9330  case 474:
9331 #line 3862 "parse.y"
9332  {
9333  /*%%%*/
9334  (yyval.node) = 0;
9335  /*%
9336  $$ = dispatch0(words_new);
9337  %*/
9338  ;}
9339  break;
9340 
9341  case 475:
9342 #line 3870 "parse.y"
9343  {
9344  /*%%%*/
9345  (yyval.node) = list_append((yyvsp[(1) - (3)].node), evstr2dstr((yyvsp[(2) - (3)].node), (yylsp[(1) - (3)]).first_column), (yylsp[(1) - (3)]).first_column);
9346  /*%
9347  $$ = dispatch2(words_add, $1, $2);
9348  %*/
9349  ;}
9350  break;
9351 
9352  case 477:
9353 #line 3888 "parse.y"
9354  {
9355  /*%%%*/
9356  (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node), (yylsp[(1) - (2)]).first_column);
9357  /*%
9358  $$ = dispatch2(word_add, $1, $2);
9359  %*/
9360  ;}
9361  break;
9362 
9363  case 478:
9364 #line 3898 "parse.y"
9365  {
9366  /*%%%*/
9367  (yyval.node) = new_zarray((yylsp[(1) - (3)]).first_column);
9368  /*%
9369  $$ = dispatch0(symbols_new);
9370  $$ = dispatch1(array, $$);
9371  %*/
9372  ;}
9373  break;
9374 
9375  case 479:
9376 #line 3907 "parse.y"
9377  {
9378  /*%%%*/
9379  (yyval.node) = (yyvsp[(2) - (3)].node);
9380  /*%
9381  $$ = dispatch1(array, $2);
9382  %*/
9383  ;}
9384  break;
9385 
9386  case 480:
9387 #line 3917 "parse.y"
9388  {
9389  /*%%%*/
9390  (yyval.node) = 0;
9391  /*%
9392  $$ = dispatch0(symbols_new);
9393  %*/
9394  ;}
9395  break;
9396 
9397  case 481:
9398 #line 3925 "parse.y"
9399  {
9400  /*%%%*/
9401  (yyvsp[(2) - (3)].node) = evstr2dstr((yyvsp[(2) - (3)].node), (yylsp[(1) - (3)]).first_column);
9402  if (nd_type((yyvsp[(2) - (3)].node)) == NODE_DSTR) {
9403  nd_set_type((yyvsp[(2) - (3)].node), NODE_DSYM);
9404  }
9405  else {
9406  nd_set_type((yyvsp[(2) - (3)].node), NODE_LIT);
9407  (yyvsp[(2) - (3)].node)->nd_lit = rb_str_intern((yyvsp[(2) - (3)].node)->nd_lit);
9408  }
9409  (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node), (yylsp[(1) - (3)]).first_column);
9410  /*%
9411  $$ = dispatch2(symbols_add, $1, $2);
9412  %*/
9413  ;}
9414  break;
9415 
9416  case 482:
9417 #line 3943 "parse.y"
9418  {
9419  /*%%%*/
9420  (yyval.node) = new_zarray((yylsp[(1) - (3)]).first_column);
9421  /*%
9422  $$ = dispatch0(qwords_new);
9423  $$ = dispatch1(array, $$);
9424  %*/
9425  ;}
9426  break;
9427 
9428  case 483:
9429 #line 3952 "parse.y"
9430  {
9431  /*%%%*/
9432  (yyval.node) = (yyvsp[(2) - (3)].node);
9433  /*%
9434  $$ = dispatch1(array, $2);
9435  %*/
9436  ;}
9437  break;
9438 
9439  case 484:
9440 #line 3962 "parse.y"
9441  {
9442  /*%%%*/
9443  (yyval.node) = new_zarray((yylsp[(1) - (3)]).first_column);
9444  /*%
9445  $$ = dispatch0(qsymbols_new);
9446  $$ = dispatch1(array, $$);
9447  %*/
9448  ;}
9449  break;
9450 
9451  case 485:
9452 #line 3971 "parse.y"
9453  {
9454  /*%%%*/
9455  (yyval.node) = (yyvsp[(2) - (3)].node);
9456  /*%
9457  $$ = dispatch1(array, $2);
9458  %*/
9459  ;}
9460  break;
9461 
9462  case 486:
9463 #line 3981 "parse.y"
9464  {
9465  /*%%%*/
9466  (yyval.node) = 0;
9467  /*%
9468  $$ = dispatch0(qwords_new);
9469  %*/
9470  ;}
9471  break;
9472 
9473  case 487:
9474 #line 3989 "parse.y"
9475  {
9476  /*%%%*/
9477  (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node), (yylsp[(1) - (3)]).first_column);
9478  nd_set_column((yyvsp[(2) - (3)].node), (yylsp[(1) - (3)]).first_column);
9479  /*%
9480  $$ = dispatch2(qwords_add, $1, $2);
9481  %*/
9482  ;}
9483  break;
9484 
9485  case 488:
9486 #line 4000 "parse.y"
9487  {
9488  /*%%%*/
9489  (yyval.node) = 0;
9490  /*%
9491  $$ = dispatch0(qsymbols_new);
9492  %*/
9493  ;}
9494  break;
9495 
9496  case 489:
9497 #line 4008 "parse.y"
9498  {
9499  /*%%%*/
9500  VALUE lit;
9501  lit = (yyvsp[(2) - (3)].node)->nd_lit;
9502  (yyvsp[(2) - (3)].node)->nd_lit = ID2SYM(rb_intern_str(lit));
9503  nd_set_type((yyvsp[(2) - (3)].node), NODE_LIT);
9504  (yyval.node) = list_append((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].node), (yylsp[(1) - (3)]).first_column);
9505  nd_set_column((yyvsp[(2) - (3)].node), (yylsp[(1) - (3)]).first_column);
9506  /*%
9507  $$ = dispatch2(qsymbols_add, $1, $2);
9508  %*/
9509  ;}
9510  break;
9511 
9512  case 490:
9513 #line 4023 "parse.y"
9514  {
9515  /*%%%*/
9516  (yyval.node) = 0;
9517  /*%
9518  $$ = dispatch0(string_content);
9519  %*/
9520  ;}
9521  break;
9522 
9523  case 491:
9524 #line 4031 "parse.y"
9525  {
9526  /*%%%*/
9527  (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node), (yylsp[(1) - (2)]).first_column);
9528  /*%
9529  $$ = dispatch2(string_add, $1, $2);
9530  %*/
9531  ;}
9532  break;
9533 
9534  case 492:
9535 #line 4041 "parse.y"
9536  {
9537  /*%%%*/
9538  (yyval.node) = 0;
9539  /*%
9540  $$ = dispatch0(xstring_new);
9541  %*/
9542  ;}
9543  break;
9544 
9545  case 493:
9546 #line 4049 "parse.y"
9547  {
9548  /*%%%*/
9549  (yyval.node) = literal_concat((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node), (yylsp[(1) - (2)]).first_column);
9550  /*%
9551  $$ = dispatch2(xstring_add, $1, $2);
9552  %*/
9553  ;}
9554  break;
9555 
9556  case 494:
9557 #line 4059 "parse.y"
9558  {
9559  /*%%%*/
9560  (yyval.node) = 0;
9561  /*%
9562  $$ = ripper_new_yylval(0, dispatch0(regexp_new), 0);
9563  %*/
9564  ;}
9565  break;
9566 
9567  case 495:
9568 #line 4067 "parse.y"
9569  {
9570  /*%%%*/
9571  NODE *head = (yyvsp[(1) - (2)].node), *tail = (yyvsp[(2) - (2)].node);
9572  if (!head) {
9573  (yyval.node) = tail;
9574  }
9575  else if (!tail) {
9576  (yyval.node) = head;
9577  }
9578  else {
9579  switch (nd_type(head)) {
9580  case NODE_STR:
9581  nd_set_type(head, NODE_DSTR);
9582  break;
9583  case NODE_DSTR:
9584  break;
9585  default:
9586  head = list_append(new_dstr(Qnil, (yylsp[(1) - (2)]).first_column), head, (yylsp[(1) - (2)]).first_column);
9587  break;
9588  }
9589  (yyval.node) = list_append(head, tail, (yylsp[(1) - (2)]).first_column);
9590  }
9591  /*%
9592  VALUE s1 = 1, s2 = 0, n1 = $1, n2 = $2;
9593  if (ripper_is_node_yylval(n1)) {
9594  s1 = RNODE(n1)->nd_cval;
9595  n1 = RNODE(n1)->nd_rval;
9596  }
9597  if (ripper_is_node_yylval(n2)) {
9598  s2 = RNODE(n2)->nd_cval;
9599  n2 = RNODE(n2)->nd_rval;
9600  }
9601  $$ = dispatch2(regexp_add, n1, n2);
9602  if (!s1 && s2) {
9603  $$ = ripper_new_yylval(0, $$, s2);
9604  }
9605  %*/
9606  ;}
9607  break;
9608 
9609  case 496:
9610 #line 4108 "parse.y"
9611  {
9612  /*%%%*/
9613  nd_set_column((yyval.node), (yylsp[(1) - (1)]).first_column);
9614  /*%
9615  %*/
9616  ;}
9617  break;
9618 
9619  case 497:
9620 #line 4115 "parse.y"
9621  {
9622  (yyval.node) = lex_strterm;
9623  lex_strterm = 0;
9624  SET_LEX_STATE(EXPR_BEG);
9625  ;}
9626  break;
9627 
9628  case 498:
9629 #line 4121 "parse.y"
9630  {
9631  lex_strterm = (yyvsp[(2) - (3)].node);
9632  /*%%%*/
9633  (yyval.node) = NEW_EVSTR((yyvsp[(3) - (3)].node));
9634  nd_set_column((yyval.node), (yylsp[(1) - (3)]).first_column);
9635  /*%
9636  $$ = dispatch1(string_dvar, $3);
9637  %*/
9638  ;}
9639  break;
9640 
9641  case 499:
9642 #line 4131 "parse.y"
9643  {
9644  (yyvsp[(1) - (1)].val) = cond_stack;
9645  (yyval.val) = cmdarg_stack;
9646  COND_SET(0);
9647  CMDARG_SET(0);
9648  ;}
9649  break;
9650 
9651  case 500:
9652 #line 4137 "parse.y"
9653  {
9654  (yyval.node) = lex_strterm;
9655  lex_strterm = 0;
9656  ;}
9657  break;
9658 
9659  case 501:
9660 #line 4141 "parse.y"
9661  {
9662  (yyval.num) = lex_state;
9663  SET_LEX_STATE(EXPR_BEG);
9664  ;}
9665  break;
9666 
9667  case 502:
9668 #line 4145 "parse.y"
9669  {
9670  (yyval.num) = brace_nest;
9671  brace_nest = 0;
9672  ;}
9673  break;
9674 
9675  case 503:
9676 #line 4149 "parse.y"
9677  {
9678  (yyval.num) = heredoc_indent;
9679  heredoc_indent = 0;
9680  ;}
9681  break;
9682 
9683  case 504:
9684 #line 4154 "parse.y"
9685  {
9686  COND_SET((yyvsp[(1) - (8)].val));
9687  CMDARG_SET((yyvsp[(2) - (8)].val));
9688  lex_strterm = (yyvsp[(3) - (8)].node);
9689  SET_LEX_STATE((yyvsp[(4) - (8)].num));
9690  brace_nest = (yyvsp[(5) - (8)].num);
9691  heredoc_indent = (yyvsp[(6) - (8)].num);
9692  heredoc_line_indent = -1;
9693  /*%%%*/
9694  if ((yyvsp[(7) - (8)].node)) (yyvsp[(7) - (8)].node)->flags &= ~NODE_FL_NEWLINE;
9695  (yyval.node) = new_evstr((yyvsp[(7) - (8)].node), (yylsp[(1) - (8)]).first_column);
9696  /*%
9697  $$ = dispatch1(string_embexpr, $7);
9698  %*/
9699  ;}
9700  break;
9701 
9702  case 505:
9703 #line 4172 "parse.y"
9704  {
9705  /*%%%*/
9706  (yyval.node) = new_gvar((yyvsp[(1) - (1)].id), (yylsp[(1) - (1)]).first_column);
9707  /*%
9708  $$ = dispatch1(var_ref, $1);
9709  %*/
9710  ;}
9711  break;
9712 
9713  case 506:
9714 #line 4180 "parse.y"
9715  {
9716  /*%%%*/
9717  (yyval.node) = new_ivar((yyvsp[(1) - (1)].id), (yylsp[(1) - (1)]).first_column);
9718  /*%
9719  $$ = dispatch1(var_ref, $1);
9720  %*/
9721  ;}
9722  break;
9723 
9724  case 507:
9725 #line 4188 "parse.y"
9726  {
9727  /*%%%*/
9728  (yyval.node) = NEW_CVAR((yyvsp[(1) - (1)].id));
9729  nd_set_column((yyval.node), (yylsp[(1) - (1)]).first_column);
9730  /*%
9731  $$ = dispatch1(var_ref, $1);
9732  %*/
9733  ;}
9734  break;
9735 
9736  case 509:
9737 #line 4200 "parse.y"
9738  {
9739  SET_LEX_STATE(EXPR_END|EXPR_ENDARG);
9740  /*%%%*/
9741  (yyval.id) = (yyvsp[(2) - (2)].id);
9742  /*%
9743  $$ = dispatch1(symbol, $2);
9744  %*/
9745  ;}
9746  break;
9747 
9748  case 514:
9749 #line 4217 "parse.y"
9750  {
9751  SET_LEX_STATE(EXPR_END|EXPR_ENDARG);
9752  /*%%%*/
9753  (yyval.node) = dsym_node((yyvsp[(2) - (3)].node), (yylsp[(1) - (3)]).first_column);
9754  /*%
9755  $$ = dispatch1(dyna_symbol, $2);
9756  %*/
9757  ;}
9758  break;
9759 
9760  case 516:
9761 #line 4229 "parse.y"
9762  {
9763  /*%%%*/
9764  (yyval.node) = (yyvsp[(2) - (2)].node);
9765  (yyval.node)->nd_lit = negate_lit((yyval.node)->nd_lit);
9766  /*%
9767  $$ = dispatch2(unary, ID2VAL(idUMinus), $2);
9768  %*/
9769  ;}
9770  break;
9771 
9772  case 517:
9773 #line 4240 "parse.y"
9774  {
9775  /*%%%*/
9776  nd_set_column((yyval.node), (yylsp[(1) - (1)]).first_column);
9777  /*%
9778  %*/
9779  ;}
9780  break;
9781 
9782  case 518:
9783 #line 4247 "parse.y"
9784  {
9785  /*%%%*/
9786  nd_set_column((yyval.node), (yylsp[(1) - (1)]).first_column);
9787  /*%
9788  %*/
9789  ;}
9790  break;
9791 
9792  case 519:
9793 #line 4254 "parse.y"
9794  {
9795  /*%%%*/
9796  nd_set_column((yyval.node), (yylsp[(1) - (1)]).first_column);
9797  /*%
9798  %*/
9799  ;}
9800  break;
9801 
9802  case 520:
9803 #line 4261 "parse.y"
9804  {
9805  /*%%%*/
9806  nd_set_column((yyval.node), (yylsp[(1) - (1)]).first_column);
9807  /*%
9808  %*/
9809  ;}
9810  break;
9811 
9812  case 526:
9813 #line 4276 "parse.y"
9814  {(yyval.id) = KWD2EID(nil, (yyvsp[(1) - (1)].id));;}
9815  break;
9816 
9817  case 527:
9818 #line 4277 "parse.y"
9819  {(yyval.id) = KWD2EID(self, (yyvsp[(1) - (1)].id));;}
9820  break;
9821 
9822  case 528:
9823 #line 4278 "parse.y"
9824  {(yyval.id) = KWD2EID(true, (yyvsp[(1) - (1)].id));;}
9825  break;
9826 
9827  case 529:
9828 #line 4279 "parse.y"
9829  {(yyval.id) = KWD2EID(false, (yyvsp[(1) - (1)].id));;}
9830  break;
9831 
9832  case 530:
9833 #line 4280 "parse.y"
9834  {(yyval.id) = KWD2EID(_FILE__, (yyvsp[(1) - (1)].id));;}
9835  break;
9836 
9837  case 531:
9838 #line 4281 "parse.y"
9839  {(yyval.id) = KWD2EID(_LINE__, (yyvsp[(1) - (1)].id));;}
9840  break;
9841 
9842  case 532:
9843 #line 4282 "parse.y"
9844  {(yyval.id) = KWD2EID(_ENCODING__, (yyvsp[(1) - (1)].id));;}
9845  break;
9846 
9847  case 533:
9848 #line 4286 "parse.y"
9849  {
9850  /*%%%*/
9851  if (!((yyval.node) = gettable((yyvsp[(1) - (1)].id), (yylsp[(1) - (1)]).first_column))) (yyval.node) = new_begin(0, (yylsp[(1) - (1)]).first_column);
9852  /*%
9853  if (id_is_var(get_id($1))) {
9854  $$ = dispatch1(var_ref, $1);
9855  }
9856  else {
9857  $$ = dispatch1(vcall, $1);
9858  }
9859  %*/
9860  ;}
9861  break;
9862 
9863  case 534:
9864 #line 4299 "parse.y"
9865  {
9866  /*%%%*/
9867  if (!((yyval.node) = gettable((yyvsp[(1) - (1)].id), (yylsp[(1) - (1)]).first_column))) (yyval.node) = new_begin(0, (yylsp[(1) - (1)]).first_column);
9868  /*%
9869  $$ = dispatch1(var_ref, $1);
9870  %*/
9871  ;}
9872  break;
9873 
9874  case 535:
9875 #line 4309 "parse.y"
9876  {
9877  (yyval.node) = assignable(var_field((yyvsp[(1) - (1)].id)), 0, (yylsp[(1) - (1)]).first_column);
9878  ;}
9879  break;
9880 
9881  case 536:
9882 #line 4313 "parse.y"
9883  {
9884  (yyval.node) = assignable(var_field((yyvsp[(1) - (1)].id)), 0, (yylsp[(1) - (1)]).first_column);
9885  ;}
9886  break;
9887 
9888  case 537:
9889 #line 4319 "parse.y"
9890  {
9891  /*%%%*/
9892  nd_set_column((yyval.node), (yylsp[(1) - (1)]).first_column);
9893  /*%
9894  %*/
9895  ;}
9896  break;
9897 
9898  case 538:
9899 #line 4326 "parse.y"
9900  {
9901  /*%%%*/
9902  nd_set_column((yyval.node), (yylsp[(1) - (1)]).first_column);
9903  /*%
9904  %*/
9905  ;}
9906  break;
9907 
9908  case 539:
9909 #line 4335 "parse.y"
9910  {
9911  SET_LEX_STATE(EXPR_BEG);
9912  command_start = TRUE;
9913  ;}
9914  break;
9915 
9916  case 540:
9917 #line 4340 "parse.y"
9918  {
9919  (yyval.node) = (yyvsp[(3) - (4)].node);
9920  ;}
9921  break;
9922 
9923  case 541:
9924 #line 4344 "parse.y"
9925  {
9926  /*%%%*/
9927  (yyval.node) = 0;
9928  /*%
9929  $$ = Qnil;
9930  %*/
9931  ;}
9932  break;
9933 
9934  case 542:
9935 #line 4354 "parse.y"
9936  {
9937  /*%%%*/
9938  (yyval.node) = (yyvsp[(2) - (3)].node);
9939  /*%
9940  $$ = dispatch1(paren, $2);
9941  %*/
9942  SET_LEX_STATE(EXPR_BEG);
9943  command_start = TRUE;
9944  ;}
9945  break;
9946 
9947  case 543:
9948 #line 4363 "parse.y"
9949  {
9950  (yyval.num) = parser->in_kwarg;
9951  parser->in_kwarg = 1;
9952  SET_LEX_STATE(lex_state|EXPR_LABEL); /* force for args */
9953  ;}
9954  break;
9955 
9956  case 544:
9957 #line 4369 "parse.y"
9958  {
9959  parser->in_kwarg = !!(yyvsp[(1) - (3)].num);
9960  (yyval.node) = (yyvsp[(2) - (3)].node);
9961  SET_LEX_STATE(EXPR_BEG);
9962  command_start = TRUE;
9963  ;}
9964  break;
9965 
9966  case 545:
9967 #line 4378 "parse.y"
9968  {
9969  (yyval.node) = new_args_tail((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), (yyvsp[(4) - (4)].id), (yylsp[(1) - (4)]).first_column);
9970  ;}
9971  break;
9972 
9973  case 546:
9974 #line 4382 "parse.y"
9975  {
9976  (yyval.node) = new_args_tail((yyvsp[(1) - (2)].node), Qnone, (yyvsp[(2) - (2)].id), (yylsp[(1) - (2)]).first_column);
9977  ;}
9978  break;
9979 
9980  case 547:
9981 #line 4386 "parse.y"
9982  {
9983  (yyval.node) = new_args_tail(Qnone, (yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].id), (yylsp[(1) - (2)]).first_column);
9984  ;}
9985  break;
9986 
9987  case 548:
9988 #line 4390 "parse.y"
9989  {
9990  (yyval.node) = new_args_tail(Qnone, Qnone, (yyvsp[(1) - (1)].id), (yylsp[(1) - (1)]).first_column);
9991  ;}
9992  break;
9993 
9994  case 549:
9995 #line 4396 "parse.y"
9996  {
9997  (yyval.node) = (yyvsp[(2) - (2)].node);
9998  ;}
9999  break;
10000 
10001  case 550:
10002 #line 4400 "parse.y"
10003  {
10004  (yyval.node) = new_args_tail(Qnone, Qnone, Qnone, (yylsp[(0) - (0)]).first_column);
10005  ;}
10006  break;
10007 
10008  case 551:
10009 #line 4406 "parse.y"
10010  {
10011  (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), (yyvsp[(5) - (6)].id), Qnone, (yyvsp[(6) - (6)].node));
10012  ;}
10013  break;
10014 
10015  case 552:
10016 #line 4410 "parse.y"
10017  {
10018  (yyval.node) = new_args((yyvsp[(1) - (8)].node), (yyvsp[(3) - (8)].node), (yyvsp[(5) - (8)].id), (yyvsp[(7) - (8)].node), (yyvsp[(8) - (8)].node));
10019  ;}
10020  break;
10021 
10022  case 553:
10023 #line 4414 "parse.y"
10024  {
10025  (yyval.node) = new_args((yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].node), Qnone, Qnone, (yyvsp[(4) - (4)].node));
10026  ;}
10027  break;
10028 
10029  case 554:
10030 #line 4418 "parse.y"
10031  {
10032  (yyval.node) = new_args((yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].node), Qnone, (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node));
10033  ;}
10034  break;
10035 
10036  case 555:
10037 #line 4422 "parse.y"
10038  {
10039  (yyval.node) = new_args((yyvsp[(1) - (4)].node), Qnone, (yyvsp[(3) - (4)].id), Qnone, (yyvsp[(4) - (4)].node));
10040  ;}
10041  break;
10042 
10043  case 556:
10044 #line 4426 "parse.y"
10045  {
10046  (yyval.node) = new_args((yyvsp[(1) - (6)].node), Qnone, (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node));
10047  ;}
10048  break;
10049 
10050  case 557:
10051 #line 4430 "parse.y"
10052  {
10053  (yyval.node) = new_args((yyvsp[(1) - (2)].node), Qnone, Qnone, Qnone, (yyvsp[(2) - (2)].node));
10054  ;}
10055  break;
10056 
10057  case 558:
10058 #line 4434 "parse.y"
10059  {
10060  (yyval.node) = new_args(Qnone, (yyvsp[(1) - (4)].node), (yyvsp[(3) - (4)].id), Qnone, (yyvsp[(4) - (4)].node));
10061  ;}
10062  break;
10063 
10064  case 559:
10065 #line 4438 "parse.y"
10066  {
10067  (yyval.node) = new_args(Qnone, (yyvsp[(1) - (6)].node), (yyvsp[(3) - (6)].id), (yyvsp[(5) - (6)].node), (yyvsp[(6) - (6)].node));
10068  ;}
10069  break;
10070 
10071  case 560:
10072 #line 4442 "parse.y"
10073  {
10074  (yyval.node) = new_args(Qnone, (yyvsp[(1) - (2)].node), Qnone, Qnone, (yyvsp[(2) - (2)].node));
10075  ;}
10076  break;
10077 
10078  case 561:
10079 #line 4446 "parse.y"
10080  {
10081  (yyval.node) = new_args(Qnone, (yyvsp[(1) - (4)].node), Qnone, (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].node));
10082  ;}
10083  break;
10084 
10085  case 562:
10086 #line 4450 "parse.y"
10087  {
10088  (yyval.node) = new_args(Qnone, Qnone, (yyvsp[(1) - (2)].id), Qnone, (yyvsp[(2) - (2)].node));
10089  ;}
10090  break;
10091 
10092  case 563:
10093 #line 4454 "parse.y"
10094  {
10095  (yyval.node) = new_args(Qnone, Qnone, (yyvsp[(1) - (4)].id), (yyvsp[(3) - (4)].node), (yyvsp[(4) - (4)].node));
10096  ;}
10097  break;
10098 
10099  case 564:
10100 #line 4458 "parse.y"
10101  {
10102  (yyval.node) = new_args(Qnone, Qnone, Qnone, Qnone, (yyvsp[(1) - (1)].node));
10103  ;}
10104  break;
10105 
10106  case 565:
10107 #line 4462 "parse.y"
10108  {
10109  (yyval.node) = new_args_tail(Qnone, Qnone, Qnone, (yylsp[(0) - (0)]).first_column);
10110  (yyval.node) = new_args(Qnone, Qnone, Qnone, Qnone, (yyval.node));
10111  ;}
10112  break;
10113 
10114  case 566:
10115 #line 4469 "parse.y"
10116  {
10117  /*%%%*/
10118  yyerror0("formal argument cannot be a constant");
10119  (yyval.id) = 0;
10120  /*%
10121  $$ = dispatch1(param_error, $1);
10122  ripper_error();
10123  %*/
10124  ;}
10125  break;
10126 
10127  case 567:
10128 #line 4479 "parse.y"
10129  {
10130  /*%%%*/
10131  yyerror0("formal argument cannot be an instance variable");
10132  (yyval.id) = 0;
10133  /*%
10134  $$ = dispatch1(param_error, $1);
10135  ripper_error();
10136  %*/
10137  ;}
10138  break;
10139 
10140  case 568:
10141 #line 4489 "parse.y"
10142  {
10143  /*%%%*/
10144  yyerror0("formal argument cannot be a global variable");
10145  (yyval.id) = 0;
10146  /*%
10147  $$ = dispatch1(param_error, $1);
10148  ripper_error();
10149  %*/
10150  ;}
10151  break;
10152 
10153  case 569:
10154 #line 4499 "parse.y"
10155  {
10156  /*%%%*/
10157  yyerror0("formal argument cannot be a class variable");
10158  (yyval.id) = 0;
10159  /*%
10160  $$ = dispatch1(param_error, $1);
10161  ripper_error();
10162  %*/
10163  ;}
10164  break;
10165 
10166  case 571:
10167 #line 4512 "parse.y"
10168  {
10169  formal_argument(get_id((yyvsp[(1) - (1)].id)));
10170  (yyval.id) = (yyvsp[(1) - (1)].id);
10171  ;}
10172  break;
10173 
10174  case 572:
10175 #line 4519 "parse.y"
10176  {
10177  ID id = get_id((yyvsp[(1) - (1)].id));
10178  arg_var(id);
10179  current_arg = id;
10180  (yyval.id) = (yyvsp[(1) - (1)].id);
10181  ;}
10182  break;
10183 
10184  case 573:
10185 #line 4528 "parse.y"
10186  {
10187  current_arg = 0;
10188  /*%%%*/
10189  (yyval.node) = NEW_ARGS_AUX((yyvsp[(1) - (1)].id), 1);
10190  /*%
10191  $$ = get_value($1);
10192  %*/
10193  ;}
10194  break;
10195 
10196  case 574:
10197 #line 4537 "parse.y"
10198  {
10199  ID tid = internal_id();
10200  arg_var(tid);
10201  /*%%%*/
10202  if (dyna_in_block()) {
10203  (yyvsp[(2) - (3)].node)->nd_value = new_dvar(tid, (yylsp[(1) - (3)]).first_column);
10204  }
10205  else {
10206  (yyvsp[(2) - (3)].node)->nd_value = new_lvar(tid, (yylsp[(1) - (3)]).first_column);
10207  }
10208  (yyval.node) = NEW_ARGS_AUX(tid, 1);
10209  (yyval.node)->nd_next = (yyvsp[(2) - (3)].node);
10210  /*%
10211  $$ = dispatch1(mlhs_paren, $2);
10212  %*/
10213  ;}
10214  break;
10215 
10216  case 576:
10217 #line 4563 "parse.y"
10218  {
10219  /*%%%*/
10220  (yyval.node) = (yyvsp[(1) - (3)].node);
10221  (yyval.node)->nd_plen++;
10222  (yyval.node)->nd_next = block_append((yyval.node)->nd_next, (yyvsp[(3) - (3)].node)->nd_next, (yylsp[(1) - (3)]).first_column);
10223  rb_gc_force_recycle((VALUE)(yyvsp[(3) - (3)].node));
10224  /*%
10225  $$ = rb_ary_push($1, get_value($3));
10226  %*/
10227  ;}
10228  break;
10229 
10230  case 577:
10231 #line 4577 "parse.y"
10232  {
10233  ID id = get_id((yyvsp[(1) - (1)].id));
10234  arg_var(formal_argument(id));
10235  current_arg = id;
10236  (yyval.id) = (yyvsp[(1) - (1)].id);
10237  ;}
10238  break;
10239 
10240  case 578:
10241 #line 4586 "parse.y"
10242  {
10243  current_arg = 0;
10244  (yyval.node) = assignable((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].node), (yylsp[(1) - (2)]).first_column);
10245  /*%%%*/
10246  (yyval.node) = new_kw_arg((yyval.node), (yylsp[(1) - (2)]).first_column);
10247  /*%
10248  $$ = rb_assoc_new(get_value($$), get_value($2));
10249  %*/
10250  ;}
10251  break;
10252 
10253  case 579:
10254 #line 4596 "parse.y"
10255  {
10256  current_arg = 0;
10257  (yyval.node) = assignable((yyvsp[(1) - (1)].id), (NODE *)-1, (yylsp[(1) - (1)]).first_column);
10258  /*%%%*/
10259  (yyval.node) = new_kw_arg((yyval.node), (yylsp[(1) - (1)]).first_column);
10260  /*%
10261  $$ = rb_assoc_new(get_value($$), 0);
10262  %*/
10263  ;}
10264  break;
10265 
10266  case 580:
10267 #line 4608 "parse.y"
10268  {
10269  (yyval.node) = assignable((yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].node), (yylsp[(1) - (2)]).first_column);
10270  /*%%%*/
10271  (yyval.node) = new_kw_arg((yyval.node), (yylsp[(1) - (2)]).first_column);
10272  /*%
10273  $$ = rb_assoc_new(get_value($$), get_value($2));
10274  %*/
10275  ;}
10276  break;
10277 
10278  case 581:
10279 #line 4617 "parse.y"
10280  {
10281  (yyval.node) = assignable((yyvsp[(1) - (1)].id), (NODE *)-1, (yylsp[(1) - (1)]).first_column);
10282  /*%%%*/
10283  (yyval.node) = new_kw_arg((yyval.node), (yylsp[(1) - (1)]).first_column);
10284  /*%
10285  $$ = rb_assoc_new(get_value($$), 0);
10286  %*/
10287  ;}
10288  break;
10289 
10290  case 582:
10291 #line 4628 "parse.y"
10292  {
10293  /*%%%*/
10294  (yyval.node) = (yyvsp[(1) - (1)].node);
10295  /*%
10296  $$ = rb_ary_new3(1, get_value($1));
10297  %*/
10298  ;}
10299  break;
10300 
10301  case 583:
10302 #line 4636 "parse.y"
10303  {
10304  /*%%%*/
10305  (yyval.node) = kwd_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
10306  /*%
10307  $$ = rb_ary_push($1, get_value($3));
10308  %*/
10309  ;}
10310  break;
10311 
10312  case 584:
10313 #line 4647 "parse.y"
10314  {
10315  /*%%%*/
10316  (yyval.node) = (yyvsp[(1) - (1)].node);
10317  /*%
10318  $$ = rb_ary_new3(1, get_value($1));
10319  %*/
10320  ;}
10321  break;
10322 
10323  case 585:
10324 #line 4655 "parse.y"
10325  {
10326  /*%%%*/
10327  (yyval.node) = kwd_append((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
10328  /*%
10329  $$ = rb_ary_push($1, get_value($3));
10330  %*/
10331  ;}
10332  break;
10333 
10334  case 588:
10335 #line 4669 "parse.y"
10336  {
10337  shadowing_lvar(get_id((yyvsp[(2) - (2)].id)));
10338  /*%%%*/
10339  (yyval.id) = (yyvsp[(2) - (2)].id);
10340  /*%
10341  $$ = dispatch1(kwrest_param, $2);
10342  %*/
10343  ;}
10344  break;
10345 
10346  case 589:
10347 #line 4678 "parse.y"
10348  {
10349  /*%%%*/
10350  (yyval.id) = internal_id();
10351  arg_var((yyval.id));
10352  /*%
10353  $$ = dispatch1(kwrest_param, Qnil);
10354  %*/
10355  ;}
10356  break;
10357 
10358  case 590:
10359 #line 4689 "parse.y"
10360  {
10361  current_arg = 0;
10362  (yyval.node) = assignable((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
10363  /*%%%*/
10364  (yyval.node) = NEW_OPT_ARG(0, (yyval.node));
10365  nd_set_column((yyval.node), (yylsp[(1) - (3)]).first_column);
10366  /*%
10367  $$ = rb_assoc_new(get_value($$), get_value($3));
10368  %*/
10369  ;}
10370  break;
10371 
10372  case 591:
10373 #line 4702 "parse.y"
10374  {
10375  current_arg = 0;
10376  (yyval.node) = assignable((yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
10377  /*%%%*/
10378  (yyval.node) = NEW_OPT_ARG(0, (yyval.node));
10379  nd_set_column((yyval.node), (yylsp[(1) - (3)]).first_column);
10380  /*%
10381  $$ = rb_assoc_new(get_value($$), get_value($3));
10382  %*/
10383  ;}
10384  break;
10385 
10386  case 592:
10387 #line 4715 "parse.y"
10388  {
10389  /*%%%*/
10390  (yyval.node) = (yyvsp[(1) - (1)].node);
10391  /*%
10392  $$ = rb_ary_new3(1, get_value($1));
10393  %*/
10394  ;}
10395  break;
10396 
10397  case 593:
10398 #line 4723 "parse.y"
10399  {
10400  /*%%%*/
10401  NODE *opts = (yyvsp[(1) - (3)].node);
10402 
10403  while (opts->nd_next) {
10404  opts = opts->nd_next;
10405  }
10406  opts->nd_next = (yyvsp[(3) - (3)].node);
10407  (yyval.node) = (yyvsp[(1) - (3)].node);
10408  /*%
10409  $$ = rb_ary_push($1, get_value($3));
10410  %*/
10411  ;}
10412  break;
10413 
10414  case 594:
10415 #line 4739 "parse.y"
10416  {
10417  /*%%%*/
10418  (yyval.node) = (yyvsp[(1) - (1)].node);
10419  /*%
10420  $$ = rb_ary_new3(1, get_value($1));
10421  %*/
10422  ;}
10423  break;
10424 
10425  case 595:
10426 #line 4747 "parse.y"
10427  {
10428  /*%%%*/
10429  NODE *opts = (yyvsp[(1) - (3)].node);
10430 
10431  while (opts->nd_next) {
10432  opts = opts->nd_next;
10433  }
10434  opts->nd_next = (yyvsp[(3) - (3)].node);
10435  (yyval.node) = (yyvsp[(1) - (3)].node);
10436  /*%
10437  $$ = rb_ary_push($1, get_value($3));
10438  %*/
10439  ;}
10440  break;
10441 
10442  case 598:
10443 #line 4767 "parse.y"
10444  {
10445  /*%%%*/
10446  if (!is_local_id((yyvsp[(2) - (2)].id)))
10447  yyerror0("rest argument must be local variable");
10448  /*% %*/
10449  arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].id))));
10450  /*%%%*/
10451  (yyval.id) = (yyvsp[(2) - (2)].id);
10452  /*%
10453  $$ = dispatch1(rest_param, $2);
10454  %*/
10455  ;}
10456  break;
10457 
10458  case 599:
10459 #line 4780 "parse.y"
10460  {
10461  /*%%%*/
10462  (yyval.id) = internal_id();
10463  arg_var((yyval.id));
10464  /*%
10465  $$ = dispatch1(rest_param, Qnil);
10466  %*/
10467  ;}
10468  break;
10469 
10470  case 602:
10471 #line 4795 "parse.y"
10472  {
10473  /*%%%*/
10474  if (!is_local_id((yyvsp[(2) - (2)].id)))
10475  yyerror0("block argument must be local variable");
10476  else if (!dyna_in_block() && local_id((yyvsp[(2) - (2)].id)))
10477  yyerror0("duplicated block argument name");
10478  /*% %*/
10479  arg_var(shadowing_lvar(get_id((yyvsp[(2) - (2)].id))));
10480  /*%%%*/
10481  (yyval.id) = (yyvsp[(2) - (2)].id);
10482  /*%
10483  $$ = dispatch1(blockarg, $2);
10484  %*/
10485  ;}
10486  break;
10487 
10488  case 603:
10489 #line 4812 "parse.y"
10490  {
10491  (yyval.id) = (yyvsp[(2) - (2)].id);
10492  ;}
10493  break;
10494 
10495  case 604:
10496 #line 4816 "parse.y"
10497  {
10498  /*%%%*/
10499  (yyval.id) = 0;
10500  /*%
10501  $$ = Qundef;
10502  %*/
10503  ;}
10504  break;
10505 
10506  case 605:
10507 #line 4826 "parse.y"
10508  {
10509  /*%%%*/
10510  value_expr((yyvsp[(1) - (1)].node));
10511  (yyval.node) = (yyvsp[(1) - (1)].node);
10512  if (!(yyval.node)) (yyval.node) = NEW_NIL();
10513  /*%
10514  $$ = $1;
10515  %*/
10516  ;}
10517  break;
10518 
10519  case 606:
10520 #line 4835 "parse.y"
10521  {SET_LEX_STATE(EXPR_BEG);;}
10522  break;
10523 
10524  case 607:
10525 #line 4836 "parse.y"
10526  {
10527  /*%%%*/
10528  if ((yyvsp[(3) - (4)].node) == 0) {
10529  yyerror0("can't define singleton method for ().");
10530  }
10531  else {
10532  switch (nd_type((yyvsp[(3) - (4)].node))) {
10533  case NODE_STR:
10534  case NODE_DSTR:
10535  case NODE_XSTR:
10536  case NODE_DXSTR:
10537  case NODE_DREGX:
10538  case NODE_LIT:
10539  case NODE_ARRAY:
10540  case NODE_ZARRAY:
10541  yyerror0("can't define singleton method for literals");
10542  break;
10543  default:
10544  value_expr((yyvsp[(3) - (4)].node));
10545  break;
10546  }
10547  }
10548  (yyval.node) = (yyvsp[(3) - (4)].node);
10549  /*%
10550  $$ = dispatch1(paren, $3);
10551  %*/
10552  ;}
10553  break;
10554 
10555  case 609:
10556 #line 4867 "parse.y"
10557  {
10558  /*%%%*/
10559  (yyval.node) = (yyvsp[(1) - (2)].node);
10560  /*%
10561  $$ = dispatch1(assoclist_from_args, $1);
10562  %*/
10563  ;}
10564  break;
10565 
10566  case 611:
10567 #line 4884 "parse.y"
10568  {
10569  /*%%%*/
10570  NODE *assocs = (yyvsp[(1) - (3)].node);
10571  NODE *tail = (yyvsp[(3) - (3)].node);
10572  if (!assocs) {
10573  assocs = tail;
10574  }
10575  else if (tail) {
10576  if (assocs->nd_head &&
10577  !tail->nd_head && nd_type(tail->nd_next) == NODE_ARRAY &&
10578  nd_type(tail->nd_next->nd_head) == NODE_HASH) {
10579  /* DSTAR */
10580  tail = tail->nd_next->nd_head->nd_head;
10581  }
10582  assocs = list_concat(assocs, tail);
10583  }
10584  (yyval.node) = assocs;
10585  /*%
10586  $$ = rb_ary_push($1, get_value($3));
10587  %*/
10588  ;}
10589  break;
10590 
10591  case 612:
10592 #line 4908 "parse.y"
10593  {
10594  /*%%%*/
10595  if (nd_type((yyvsp[(1) - (3)].node)) == NODE_STR) {
10596  nd_set_type((yyvsp[(1) - (3)].node), NODE_LIT);
10597  (yyvsp[(1) - (3)].node)->nd_lit = rb_fstring((yyvsp[(1) - (3)].node)->nd_lit);
10598  }
10599  (yyval.node) = list_append(new_list((yyvsp[(1) - (3)].node), (yylsp[(1) - (3)]).first_column), (yyvsp[(3) - (3)].node), (yylsp[(1) - (3)]).first_column);
10600  /*%
10601  $$ = dispatch2(assoc_new, $1, $3);
10602  %*/
10603  ;}
10604  break;
10605 
10606  case 613:
10607 #line 4920 "parse.y"
10608  {
10609  /*%%%*/
10610  (yyval.node) = list_append(new_list(new_lit(ID2SYM((yyvsp[(1) - (2)].id)), (yylsp[(1) - (2)]).first_column), (yylsp[(1) - (2)]).first_column), (yyvsp[(2) - (2)].node), (yylsp[(1) - (2)]).first_column);
10611  /*%
10612  $$ = dispatch2(assoc_new, $1, $2);
10613  %*/
10614  ;}
10615  break;
10616 
10617  case 614:
10618 #line 4928 "parse.y"
10619  {
10620  /*%%%*/
10621  (yyval.node) = list_append(new_list(dsym_node((yyvsp[(2) - (4)].node), (yylsp[(1) - (4)]).first_column), (yylsp[(1) - (4)]).first_column), (yyvsp[(4) - (4)].node), (yylsp[(1) - (4)]).first_column);
10622  /*%
10623  $$ = dispatch2(assoc_new, dispatch1(dyna_symbol, $2), $4);
10624  %*/
10625  ;}
10626  break;
10627 
10628  case 615:
10629 #line 4936 "parse.y"
10630  {
10631  /*%%%*/
10632  if (nd_type((yyvsp[(2) - (2)].node)) == NODE_HASH &&
10633  !((yyvsp[(2) - (2)].node)->nd_head && (yyvsp[(2) - (2)].node)->nd_head->nd_alen))
10634  (yyval.node) = 0;
10635  else
10636  (yyval.node) = list_append(new_list(0, (yylsp[(1) - (2)]).first_column), (yyvsp[(2) - (2)].node), (yylsp[(1) - (2)]).first_column);
10637  /*%
10638  $$ = dispatch1(assoc_splat, $2);
10639  %*/
10640  ;}
10641  break;
10642 
10643  case 628:
10644 #line 4970 "parse.y"
10645  {
10646  (yyval.id) = TOKEN2VAL('.');
10647  ;}
10648  break;
10649 
10650  case 629:
10651 #line 4974 "parse.y"
10652  {
10653  (yyval.id) = ID2VAL(idANDDOT);
10654  ;}
10655  break;
10656 
10657  case 631:
10658 #line 4981 "parse.y"
10659  {
10660  (yyval.id) = ID2VAL(idCOLON2);
10661  ;}
10662  break;
10663 
10664  case 641:
10665 #line 5005 "parse.y"
10666  {yyerrok;token_flush(parser);;}
10667  break;
10668 
10669  case 642:
10670 #line 5006 "parse.y"
10671  {token_flush(parser);;}
10672  break;
10673 
10674  case 644:
10675 #line 5010 "parse.y"
10676  {yyerrok;;}
10677  break;
10678 
10679  case 645:
10680 #line 5014 "parse.y"
10681  {
10682  (yyval.node) = Qnull;
10683  ;}
10684  break;
10685 
10686 
10687 /* Line 1267 of yacc.c. */
10688 #line 10687 "parse.c"
10689  default: break;
10690  }
10691  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
10692 
10693  YYPOPSTACK (yylen);
10694  yylen = 0;
10695  YY_STACK_PRINT (yyss, yyssp);
10696 
10697  *++yyvsp = yyval;
10698  *++yylsp = yyloc;
10699 
10700  /* Now `shift' the result of the reduction. Determine what state
10701  that goes to, based on the state we popped back to and the rule
10702  number reduced by. */
10703 
10704  yyn = yyr1[yyn];
10705 
10706  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
10707  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
10708  yystate = yytable[yystate];
10709  else
10710  yystate = yydefgoto[yyn - YYNTOKENS];
10711 
10712  goto yynewstate;
10713 
10714 
10715 /*------------------------------------.
10716 | yyerrlab -- here on detecting error |
10717 `------------------------------------*/
10718 yyerrlab:
10719  /* If not already recovering from an error, report this error. */
10720  if (!yyerrstatus)
10721  {
10722  ++yynerrs;
10723 #if ! YYERROR_VERBOSE
10724  yyerror (&yylloc, parser, YY_("syntax error"));
10725 #else
10726  {
10727  YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
10728  if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
10729  {
10730  YYSIZE_T yyalloc = 2 * yysize;
10731  if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
10732  yyalloc = YYSTACK_ALLOC_MAXIMUM;
10733  if (yymsg != yymsgbuf)
10734  YYSTACK_FREE (yymsg);
10735  yymsg = (char *) YYSTACK_ALLOC (yyalloc);
10736  if (yymsg)
10737  yymsg_alloc = yyalloc;
10738  else
10739  {
10740  yymsg = yymsgbuf;
10741  yymsg_alloc = sizeof yymsgbuf;
10742  }
10743  }
10744 
10745  if (0 < yysize && yysize <= yymsg_alloc)
10746  {
10747  (void) yysyntax_error (yymsg, yystate, yychar);
10748  yyerror (&yylloc, parser, yymsg);
10749  }
10750  else
10751  {
10752  yyerror (&yylloc, parser, YY_("syntax error"));
10753  if (yysize != 0)
10754  goto yyexhaustedlab;
10755  }
10756  }
10757 #endif
10758  }
10759 
10760  yyerror_range[0] = yylloc;
10761 
10762  if (yyerrstatus == 3)
10763  {
10764  /* If just tried and failed to reuse look-ahead token after an
10765  error, discard it. */
10766 
10767  if (yychar <= YYEOF)
10768  {
10769  /* Return failure if at end of input. */
10770  if (yychar == YYEOF)
10771  YYABORT;
10772  }
10773  else
10774  {
10775  yydestruct ("Error: discarding",
10776  yytoken, &yylval, &yylloc, parser);
10777  yychar = YYEMPTY;
10778  }
10779  }
10780 
10781  /* Else will try to reuse look-ahead token after shifting the error
10782  token. */
10783  goto yyerrlab1;
10784 
10785 
10786 /*---------------------------------------------------.
10787 | yyerrorlab -- error raised explicitly by YYERROR. |
10788 `---------------------------------------------------*/
10789 yyerrorlab:
10790 
10791  /* Pacify compilers like GCC when the user code never invokes
10792  YYERROR and the label yyerrorlab therefore never appears in user
10793  code. */
10794  if (/*CONSTCOND*/ 0)
10795  goto yyerrorlab;
10796 
10797  yyerror_range[0] = yylsp[1-yylen];
10798  /* Do not reclaim the symbols of the rule which action triggered
10799  this YYERROR. */
10800  YYPOPSTACK (yylen);
10801  yylen = 0;
10802  YY_STACK_PRINT (yyss, yyssp);
10803  yystate = *yyssp;
10804  goto yyerrlab1;
10805 
10806 
10807 /*-------------------------------------------------------------.
10808 | yyerrlab1 -- common code for both syntax error and YYERROR. |
10809 `-------------------------------------------------------------*/
10810 yyerrlab1:
10811  yyerrstatus = 3; /* Each real token shifted decrements this. */
10812 
10813  for (;;)
10814  {
10815  yyn = yypact[yystate];
10816  if (yyn != YYPACT_NINF)
10817  {
10818  yyn += YYTERROR;
10819  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
10820  {
10821  yyn = yytable[yyn];
10822  if (0 < yyn)
10823  break;
10824  }
10825  }
10826 
10827  /* Pop the current state because it cannot handle the error token. */
10828  if (yyssp == yyss)
10829  YYABORT;
10830 
10831  yyerror_range[0] = *yylsp;
10832  yydestruct ("Error: popping",
10833  yystos[yystate], yyvsp, yylsp, parser);
10834  YYPOPSTACK (1);
10835  yystate = *yyssp;
10836  YY_STACK_PRINT (yyss, yyssp);
10837  }
10838 
10839  if (yyn == YYFINAL)
10840  YYACCEPT;
10841 
10842  *++yyvsp = yylval;
10843 
10844  yyerror_range[1] = yylloc;
10845  /* Using YYLLOC is tempting, but would change the location of
10846  the look-ahead. YYLOC is available though. */
10847  YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
10848  *++yylsp = yyloc;
10849 
10850  /* Shift the error token. */
10851  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
10852 
10853  yystate = yyn;
10854  goto yynewstate;
10855 
10856 
10857 /*-------------------------------------.
10858 | yyacceptlab -- YYACCEPT comes here. |
10859 `-------------------------------------*/
10860 yyacceptlab:
10861  yyresult = 0;
10862  goto yyreturn;
10863 
10864 /*-----------------------------------.
10865 | yyabortlab -- YYABORT comes here. |
10866 `-----------------------------------*/
10867 yyabortlab:
10868  yyresult = 1;
10869  goto yyreturn;
10870 
10871 #ifndef yyoverflow
10872 /*-------------------------------------------------.
10873 | yyexhaustedlab -- memory exhaustion comes here. |
10874 `-------------------------------------------------*/
10875 yyexhaustedlab:
10876  yyerror (&yylloc, parser, YY_("memory exhausted"));
10877  yyresult = 2;
10878  /* Fall through. */
10879 #endif
10880 
10881 yyreturn:
10882  if (yychar != YYEOF && yychar != YYEMPTY)
10883  yydestruct ("Cleanup: discarding lookahead",
10884  yytoken, &yylval, &yylloc, parser);
10885  /* Do not reclaim the symbols of the rule which action triggered
10886  this YYABORT or YYACCEPT. */
10887  YYPOPSTACK (yylen);
10888  YY_STACK_PRINT (yyss, yyssp);
10889  while (yyssp != yyss)
10890  {
10891  yydestruct ("Cleanup: popping",
10892  yystos[*yyssp], yyvsp, yylsp, parser);
10893  YYPOPSTACK (1);
10894  }
10895 #ifndef yyoverflow
10896  if (yyss != yyssa)
10897  YYSTACK_FREE (yyss);
10898 #endif
10899 #if YYERROR_VERBOSE
10900  if (yymsg != yymsgbuf)
10901  YYSTACK_FREE (yymsg);
10902 #endif
10903  /* Make sure YYID is used. */
10904  return YYID (yyresult);
10905 }
10906 
10907 
10908 #line 5018 "parse.y"
10909 
10910 # undef parser
10911 # undef yylex
10912 # undef yylval
10913 # define yylval (*parser->lval)
10914 
10915 static int parser_regx_options(struct parser_params*);
10916 static int parser_tokadd_string(struct parser_params*,int,int,int,long*,rb_encoding**);
10917 static void parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc);
10918 static enum yytokentype parser_parse_string(struct parser_params*,NODE*);
10919 static enum yytokentype parser_here_document(struct parser_params*,NODE*);
10920 
10921 
10922 # define nextc() parser_nextc(parser)
10923 # define pushback(c) parser_pushback(parser, (c))
10924 # define newtok() parser_newtok(parser)
10925 # define tokspace(n) parser_tokspace(parser, (n))
10926 # define tokadd(c) parser_tokadd(parser, (c))
10927 # define tok_hex(numlen) parser_tok_hex(parser, (numlen))
10928 # define read_escape(flags,e) parser_read_escape(parser, (flags), (e))
10929 # define tokadd_escape(e) parser_tokadd_escape(parser, (e))
10930 # define regx_options() parser_regx_options(parser)
10931 # define tokadd_string(f,t,p,n,e) parser_tokadd_string(parser,(f),(t),(p),(n),(e))
10932 # define parse_string(n) parser_parse_string(parser,(n))
10933 # define tokaddmbc(c, enc) parser_tokaddmbc(parser, (c), (enc))
10934 # define here_document(n) parser_here_document(parser,(n))
10935 # define heredoc_identifier() parser_heredoc_identifier(parser)
10936 # define heredoc_restore(n) parser_heredoc_restore(parser,(n))
10937 # define whole_match_p(e,l,i) parser_whole_match_p(parser,(e),(l),(i))
10938 # define number_literal_suffix(f) parser_number_literal_suffix(parser, (f))
10939 # define set_number_literal(v, t, f) parser_set_number_literal(parser, (v), (t), (f))
10940 # define set_integer_literal(v, f) parser_set_integer_literal(parser, (v), (f))
10941 
10942 #ifndef RIPPER
10943 # define set_yylval_str(x) (yylval.node = NEW_STR(x))
10944 # define set_yylval_num(x) (yylval.num = (x))
10945 # define set_yylval_id(x) (yylval.id = (x))
10946 # define set_yylval_name(x) (yylval.id = (x))
10947 # define set_yylval_literal(x) (yylval.node = NEW_LIT(x))
10948 # define set_yylval_node(x) (yylval.node = (x))
10949 # define yylval_id() (yylval.id)
10950 #else
10951 static inline VALUE
10952 ripper_yylval_id(ID x)
10953 {
10954  return ripper_new_yylval(x, ID2SYM(x), 0);
10955 }
10956 # define set_yylval_str(x) (yylval.val = (x))
10957 # define set_yylval_num(x) (yylval.val = ripper_new_yylval((x), 0, 0))
10958 # define set_yylval_id(x) (void)(x)
10959 # define set_yylval_name(x) (void)(yylval.val = ripper_yylval_id(x))
10960 # define set_yylval_literal(x) (void)(x)
10961 # define set_yylval_node(x) (void)(x)
10962 # define yylval_id() yylval.id
10963 #endif
10964 
10965 #ifndef RIPPER
10966 #define literal_flush(p) (parser->tokp = (p))
10967 #define dispatch_scan_event(t) ((void)0)
10968 #define dispatch_delayed_token(t) ((void)0)
10969 #define has_delayed_token() (0)
10970 #else
10971 #define literal_flush(p) ((void)0)
10972 
10973 #define yylval_rval (*(RB_TYPE_P(yylval.val, T_NODE) ? &yylval.node->nd_rval : &yylval.val))
10974 
10975 static inline VALUE
10976 intern_sym(const char *name)
10977 {
10978  ID id = rb_intern_const(name);
10979  return ID2SYM(id);
10980 }
10981 
10982 static int
10983 ripper_has_scan_event(struct parser_params *parser)
10984 {
10985 
10986  if (lex_p < parser->tokp) rb_raise(rb_eRuntimeError, "lex_p < tokp");
10987  return lex_p > parser->tokp;
10988 }
10989 
10990 static VALUE
10991 ripper_scan_event_val(struct parser_params *parser, int t)
10992 {
10993  VALUE str = STR_NEW(parser->tokp, lex_p - parser->tokp);
10994  VALUE rval = ripper_dispatch1(parser, ripper_token2eventid(t), str);
10995  token_flush(parser);
10996  return rval;
10997 }
10998 
10999 static void
11000 ripper_dispatch_scan_event(struct parser_params *parser, int t)
11001 {
11002  if (!ripper_has_scan_event(parser)) return;
11003  yylval_rval = ripper_scan_event_val(parser, t);
11004 }
11005 #define dispatch_scan_event(t) ripper_dispatch_scan_event(parser, t)
11006 
11007 static void
11008 ripper_dispatch_delayed_token(struct parser_params *parser, int t)
11009 {
11010  int saved_line = ruby_sourceline;
11011  const char *saved_tokp = parser->tokp;
11012 
11013  ruby_sourceline = parser->delayed_line;
11014  parser->tokp = lex_pbeg + parser->delayed_col;
11015  yylval_rval = ripper_dispatch1(parser, ripper_token2eventid(t), parser->delayed);
11016  parser->delayed = Qnil;
11017  ruby_sourceline = saved_line;
11018  parser->tokp = saved_tokp;
11019 }
11020 #define dispatch_delayed_token(t) ripper_dispatch_delayed_token(parser, t)
11021 #define has_delayed_token() (!NIL_P(parser->delayed))
11022 #endif /* RIPPER */
11023 
11024 #include "ruby/regex.h"
11025 #include "ruby/util.h"
11026 
11027 #define parser_encoding_name() (current_enc->name)
11028 #define parser_mbclen() mbclen((lex_p-1),lex_pend,current_enc)
11029 #define is_identchar(p,e,enc) (rb_enc_isalnum((unsigned char)(*(p)),(enc)) || (*(p)) == '_' || !ISASCII(*(p)))
11030 #define parser_is_identchar() (!parser->eofp && is_identchar((lex_p-1),lex_pend,current_enc))
11031 
11032 #define parser_isascii() ISASCII(*(lex_p-1))
11033 
11034 static int
11035 token_info_get_column(struct parser_params *parser, const char *pend)
11036 {
11037  int column = 1;
11038  const char *p;
11039  for (p = lex_pbeg; p < pend; p++) {
11040  if (*p == '\t') {
11041  column = (((column - 1) / TAB_WIDTH) + 1) * TAB_WIDTH;
11042  }
11043  column++;
11044  }
11045  return column;
11046 }
11047 
11048 static int
11049 token_info_has_nonspaces(struct parser_params *parser, const char *pend)
11050 {
11051  const char *p;
11052  for (p = lex_pbeg; p < pend; p++) {
11053  if (*p != ' ' && *p != '\t') {
11054  return 1;
11055  }
11056  }
11057  return 0;
11058 }
11059 
11060 static void
11061 token_info_push_gen(struct parser_params *parser, const char *token, size_t len)
11062 {
11063  token_info *ptinfo;
11064  const char *t = lex_p - len;
11065 
11066  if (!parser->token_info_enabled) return;
11067  ptinfo = ALLOC(token_info);
11068  ptinfo->token = token;
11069  ptinfo->linenum = ruby_sourceline;
11070  ptinfo->column = token_info_get_column(parser, t);
11071  ptinfo->nonspc = token_info_has_nonspaces(parser, t);
11072  ptinfo->next = parser->token_info;
11073 
11074  parser->token_info = ptinfo;
11075 }
11076 
11077 static void
11078 token_info_pop_gen(struct parser_params *parser, const char *token, size_t len)
11079 {
11080  int linenum;
11081  token_info *ptinfo = parser->token_info;
11082  const char *t = lex_p - len;
11083 
11084  if (!ptinfo) return;
11085  parser->token_info = ptinfo->next;
11086  linenum = ruby_sourceline;
11087  if (parser->token_info_enabled &&
11088  linenum != ptinfo->linenum && !ptinfo->nonspc &&
11089  !token_info_has_nonspaces(parser, t) &&
11090  token_info_get_column(parser, t) != ptinfo->column) {
11091  rb_warn3L(linenum,
11092  "mismatched indentations at '%s' with '%s' at %d",
11093  WARN_S(token), WARN_S(ptinfo->token), WARN_I(ptinfo->linenum));
11094  }
11095 
11096  xfree(ptinfo);
11097 }
11098 
11099 static int
11100 parser_precise_mbclen(struct parser_params *parser, const char *p)
11101 {
11103  if (!MBCLEN_CHARFOUND_P(len)) {
11104  compile_error(PARSER_ARG "invalid multibyte char (%s)", parser_encoding_name());
11105  return -1;
11106  }
11107  return len;
11108 }
11109 
11110 static int
11111 parser_yyerror(struct parser_params *parser, const char *msg)
11112 {
11113 #ifndef RIPPER
11114  const int max_line_margin = 30;
11115  const char *p, *pe;
11116  const char *pre = "", *post = "", *pend;
11117  const char *code = "", *caret = "", *newline = "";
11118  const char *lim;
11119  char *buf;
11120  long len;
11121  int i;
11122 
11123  pend = lex_pend;
11124  if (pend > lex_pbeg && pend[-1] == '\n') {
11125  if (--pend > lex_pbeg && pend[-1] == '\r') --pend;
11126  }
11127 
11128  p = pe = lex_p < pend ? lex_p : pend;
11129  lim = p - lex_pbeg > max_line_margin ? p - max_line_margin : lex_pbeg;
11130  while ((lim < p) && (*(p-1) != '\n')) p--;
11131 
11132  lim = pend - pe > max_line_margin ? pe + max_line_margin : pend;
11133  while ((pe < lim) && (*pe != '\n')) pe++;
11134 
11135  len = pe - p;
11136  if (len > 4) {
11137  char *p2;
11138 
11139  if (p > lex_pbeg) {
11141  if (p > lex_pbeg) pre = "...";
11142  }
11143  if (pe < pend) {
11144  pe = rb_enc_prev_char(lex_p, pe, pend, rb_enc_get(lex_lastline));
11145  if (pe < pend) post = "...";
11146  }
11147  len = pe - p;
11148  lim = lex_p < pend ? lex_p : pend;
11149  i = (int)(lim - p);
11150  buf = ALLOCA_N(char, i+2);
11151  code = p;
11152  caret = p2 = buf;
11153  pe = (parser->tokp < lim ? parser->tokp : lim);
11154  if (p <= pe) {
11155  while (p < pe) {
11156  *p2++ = *p++ == '\t' ? '\t' : ' ';
11157  }
11158  *p2++ = '^';
11159  p++;
11160  }
11161  if (lim > p) {
11162  memset(p2, '~', (lim - p));
11163  p2 += (lim - p);
11164  }
11165  *p2 = '\0';
11166  newline = "\n";
11167  }
11168  else {
11169  len = 0;
11170  }
11171  compile_error(PARSER_ARG "%s%s""%s%.*s%s%s""%s%s",
11172  msg, newline,
11173  pre, (int)len, code, post, newline,
11174  pre, caret);
11175 #else
11176  dispatch1(parse_error, STR_NEW2(msg));
11177  ripper_error();
11178 #endif /* !RIPPER */
11179  return 0;
11180 }
11181 
11182 static int
11183 vtable_size(const struct vtable *tbl)
11184 {
11185  if (POINTER_P(tbl)) {
11186  return tbl->pos;
11187  }
11188  else {
11189  return 0;
11190  }
11191 }
11192 
11193 static struct vtable *
11194 vtable_alloc_gen(struct parser_params *parser, int line, struct vtable *prev)
11195 {
11196  struct vtable *tbl = ALLOC(struct vtable);
11197  tbl->pos = 0;
11198  tbl->capa = 8;
11199  tbl->tbl = ALLOC_N(ID, tbl->capa);
11200  tbl->prev = prev;
11201 #ifndef RIPPER
11202  if (yydebug) {
11203  rb_parser_printf(parser, "vtable_alloc:%d: %p\n", line, tbl);
11204  }
11205 #endif
11206  return tbl;
11207 }
11208 #define vtable_alloc(prev) vtable_alloc_gen(parser, __LINE__, prev)
11209 
11210 static void
11211 vtable_free_gen(struct parser_params *parser, int line, const char *name,
11212  struct vtable *tbl)
11213 {
11214 #ifndef RIPPER
11215  if (yydebug) {
11216  rb_parser_printf(parser, "vtable_free:%d: %s(%p)\n", line, name, tbl);
11217  }
11218 #endif
11219  if (POINTER_P(tbl)) {
11220  if (tbl->tbl) {
11221  xfree(tbl->tbl);
11222  }
11223  xfree(tbl);
11224  }
11225 }
11226 #define vtable_free(tbl) vtable_free_gen(parser, __LINE__, #tbl, tbl)
11227 
11228 static void
11229 vtable_add_gen(struct parser_params *parser, int line, const char *name,
11230  struct vtable *tbl, ID id)
11231 {
11232 #ifndef RIPPER
11233  if (yydebug) {
11234  rb_parser_printf(parser, "vtable_add:%d: %s(%p), %s\n",
11235  line, name, tbl, rb_id2name(id));
11236  }
11237 #endif
11238  if (!POINTER_P(tbl)) {
11239  rb_parser_fatal(parser, "vtable_add: vtable is not allocated (%p)", (void *)tbl);
11240  return;
11241  }
11242  if (tbl->pos == tbl->capa) {
11243  tbl->capa = tbl->capa * 2;
11244  REALLOC_N(tbl->tbl, ID, tbl->capa);
11245  }
11246  tbl->tbl[tbl->pos++] = id;
11247 }
11248 #define vtable_add(tbl, id) vtable_add_gen(parser, __LINE__, #tbl, tbl, id)
11249 
11250 #ifndef RIPPER
11251 static void
11252 vtable_pop_gen(struct parser_params *parser, int line, const char *name,
11253  struct vtable *tbl, int n)
11254 {
11255  if (yydebug) {
11256  rb_parser_printf(parser, "vtable_pop:%d: %s(%p), %d\n",
11257  line, name, tbl, n);
11258  }
11259  if (tbl->pos < n) {
11260  rb_parser_fatal(parser, "vtable_pop: unreachable (%d < %d)", tbl->pos, n);
11261  return;
11262  }
11263  tbl->pos -= n;
11264 }
11265 #define vtable_pop(tbl, n) vtable_pop_gen(parser, __LINE__, #tbl, tbl, n)
11266 #endif
11267 
11268 static int
11269 vtable_included(const struct vtable * tbl, ID id)
11270 {
11271  int i;
11272 
11273  if (POINTER_P(tbl)) {
11274  for (i = 0; i < tbl->pos; i++) {
11275  if (tbl->tbl[i] == id) {
11276  return i+1;
11277  }
11278  }
11279  }
11280  return 0;
11281 }
11282 
11283 static void parser_prepare(struct parser_params *parser);
11284 
11285 #ifndef RIPPER
11286 static VALUE
11287 debug_lines(VALUE fname)
11288 {
11289  ID script_lines;
11290  CONST_ID(script_lines, "SCRIPT_LINES__");
11291  if (rb_const_defined_at(rb_cObject, script_lines)) {
11292  VALUE hash = rb_const_get_at(rb_cObject, script_lines);
11293  if (RB_TYPE_P(hash, T_HASH)) {
11294  VALUE lines = rb_ary_new();
11295  rb_hash_aset(hash, fname, lines);
11296  return lines;
11297  }
11298  }
11299  return 0;
11300 }
11301 
11302 static VALUE
11303 coverage(VALUE fname, int n)
11304 {
11305  VALUE coverages = rb_get_coverages();
11306  if (RTEST(coverages) && RBASIC(coverages)->klass == 0) {
11307  VALUE coverage = rb_default_coverage(n);
11308  VALUE lines = RARRAY_AREF(coverage, COVERAGE_INDEX_LINES);
11309 
11310  rb_hash_aset(coverages, fname, coverage);
11311 
11312  return lines == Qnil ? Qfalse : lines;
11313  }
11314  return 0;
11315 }
11316 
11317 static int
11318 e_option_supplied(struct parser_params *parser)
11319 {
11320  return strcmp(ruby_sourcefile, "-e") == 0;
11321 }
11322 
11323 static VALUE
11324 yycompile0(VALUE arg)
11325 {
11326  int n;
11327  NODE *tree;
11328  struct parser_params *parser = (struct parser_params *)arg;
11329  VALUE cov = Qfalse;
11330 
11331  if (!compile_for_eval && rb_safe_level() == 0) {
11333  if (ruby_debug_lines && ruby_sourceline > 0) {
11334  VALUE str = STR_NEW0();
11335  n = ruby_sourceline;
11336  do {
11338  } while (--n);
11339  }
11340 
11341  if (!e_option_supplied(parser)) {
11343  cov = Qtrue;
11344  }
11345  }
11346 
11347  parser_prepare(parser);
11348 #ifndef RIPPER
11349 #define RUBY_DTRACE_PARSE_HOOK(name) \
11350  if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \
11351  RUBY_DTRACE_PARSE_##name(ruby_sourcefile, ruby_sourceline); \
11352  }
11353  RUBY_DTRACE_PARSE_HOOK(BEGIN);
11354 #endif
11355  n = yyparse((void*)parser);
11356 #ifndef RIPPER
11358 #endif
11359  ruby_debug_lines = 0;
11360  ruby_coverage = 0;
11361 
11362  lex_strterm = 0;
11363  lex_p = lex_pbeg = lex_pend = 0;
11364  lex_lastline = lex_nextline = 0;
11365  if (parser->error_p) {
11366  VALUE mesg = parser->error_buffer;
11367  if (!mesg) {
11368  mesg = rb_class_new_instance(0, 0, rb_eSyntaxError);
11369  }
11370  rb_set_errinfo(mesg);
11371  return 0;
11372  }
11373  tree = ruby_eval_tree;
11374  if (!tree) {
11375  tree = NEW_NIL();
11376  }
11377  else {
11378  VALUE opt = parser->compile_option;
11379  NODE *prelude;
11380  if (!opt) opt = rb_obj_hide(rb_ident_hash_new());
11381  rb_hash_aset(opt, rb_sym_intern_ascii_cstr("coverage_enabled"), cov);
11382  prelude = NEW_PRELUDE(ruby_eval_tree_begin, tree->nd_body, opt);
11383  nd_set_column(prelude, nd_column(tree->nd_body));
11384  tree->nd_body = prelude;
11385  }
11386  return (VALUE)tree;
11387 }
11388 
11389 static NODE*
11390 yycompile(struct parser_params *parser, VALUE fname, int line)
11391 {
11393  ruby_sourcefile = RSTRING_PTR(fname);
11394  ruby_sourceline = line - 1;
11395  return (NODE *)rb_suppress_tracing(yycompile0, (VALUE)parser);
11396 }
11397 #endif /* !RIPPER */
11398 
11399 static rb_encoding *
11400 must_be_ascii_compatible(VALUE s)
11401 {
11402  rb_encoding *enc = rb_enc_get(s);
11403  if (!rb_enc_asciicompat(enc)) {
11404  rb_raise(rb_eArgError, "invalid source encoding");
11405  }
11406  return enc;
11407 }
11408 
11409 static VALUE
11410 lex_get_str(struct parser_params *parser, VALUE s)
11411 {
11412  char *beg, *end, *start;
11413  long len;
11414 
11415  beg = RSTRING_PTR(s);
11416  len = RSTRING_LEN(s);
11417  start = beg;
11418  if (lex_gets_ptr) {
11419  if (len == lex_gets_ptr) return Qnil;
11420  beg += lex_gets_ptr;
11421  len -= lex_gets_ptr;
11422  }
11423  end = memchr(beg, '\n', len);
11424  if (end) len = ++end - beg;
11425  lex_gets_ptr += len;
11426  return rb_str_subseq(s, beg - start, len);
11427 }
11428 
11429 static VALUE
11430 lex_getline(struct parser_params *parser)
11431 {
11432  VALUE line = (*lex_gets)(parser, lex_input);
11433  if (NIL_P(line)) return line;
11434  must_be_ascii_compatible(line);
11435 #ifndef RIPPER
11436  if (ruby_debug_lines) {
11439  }
11440  if (ruby_coverage) {
11442  }
11443 #endif
11444  return line;
11445 }
11446 
11447 static const rb_data_type_t parser_data_type;
11448 
11449 #ifndef RIPPER
11450 static NODE*
11451 parser_compile_string(VALUE vparser, VALUE fname, VALUE s, int line)
11452 {
11453  struct parser_params *parser;
11454  NODE *node;
11455 
11456  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
11457  lex_gets = lex_get_str;
11458  lex_gets_ptr = 0;
11460  lex_pbeg = lex_p = lex_pend = 0;
11461 
11462  node = yycompile(parser, fname, line);
11463  RB_GC_GUARD(vparser); /* prohibit tail call optimization */
11464 
11465  return node;
11466 }
11467 
11468 NODE*
11469 rb_compile_string(const char *f, VALUE s, int line)
11470 {
11471  must_be_ascii_compatible(s);
11472  return parser_compile_string(rb_parser_new(), rb_filesystem_str_new_cstr(f), s, line);
11473 }
11474 
11475 NODE*
11476 rb_parser_compile_string(VALUE vparser, const char *f, VALUE s, int line)
11477 {
11478  return rb_parser_compile_string_path(vparser, rb_filesystem_str_new_cstr(f), s, line);
11479 }
11480 
11481 NODE*
11483 {
11484  must_be_ascii_compatible(s);
11485  return parser_compile_string(vparser, f, s, line);
11486 }
11487 
11488 NODE*
11489 rb_compile_cstr(const char *f, const char *s, int len, int line)
11490 {
11491  VALUE str = rb_str_new(s, len);
11492  return parser_compile_string(rb_parser_new(), rb_filesystem_str_new_cstr(f), str, line);
11493 }
11494 
11495 NODE*
11496 rb_parser_compile_cstr(VALUE vparser, const char *f, const char *s, int len, int line)
11497 {
11498  VALUE str = rb_str_new(s, len);
11499  return parser_compile_string(vparser, rb_filesystem_str_new_cstr(f), str, line);
11500 }
11501 
11503 
11504 static VALUE
11505 lex_io_gets(struct parser_params *parser, VALUE io)
11506 {
11507  return rb_io_gets_internal(io);
11508 }
11509 
11510 NODE*
11511 rb_compile_file(const char *f, VALUE file, int start)
11512 {
11513  VALUE vparser = rb_parser_new();
11514 
11515  return rb_parser_compile_file(vparser, f, file, start);
11516 }
11517 
11518 NODE*
11519 rb_parser_compile_file(VALUE vparser, const char *f, VALUE file, int start)
11520 {
11521  return rb_parser_compile_file_path(vparser, rb_filesystem_str_new_cstr(f), file, start);
11522 }
11523 
11524 NODE*
11525 rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE file, int start)
11526 {
11527  struct parser_params *parser;
11528  NODE *node;
11529 
11530  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
11531  lex_gets = lex_io_gets;
11532  lex_input = file;
11533  lex_pbeg = lex_p = lex_pend = 0;
11534 
11535  node = yycompile(parser, fname, start);
11536  RB_GC_GUARD(vparser); /* prohibit tail call optimization */
11537 
11538  return node;
11539 }
11540 #endif /* !RIPPER */
11541 
11542 #define STR_FUNC_ESCAPE 0x01
11543 #define STR_FUNC_EXPAND 0x02
11544 #define STR_FUNC_REGEXP 0x04
11545 #define STR_FUNC_QWORDS 0x08
11546 #define STR_FUNC_SYMBOL 0x10
11547 #define STR_FUNC_INDENT 0x20
11548 #define STR_FUNC_LABEL 0x40
11549 #define STR_FUNC_TERM 0x8000
11550 
11553  str_squote = (0),
11561 };
11562 
11563 static VALUE
11564 parser_str_new(const char *p, long n, rb_encoding *enc, int func, rb_encoding *enc0)
11565 {
11566  VALUE str;
11567 
11568  str = rb_enc_str_new(p, n, enc);
11569  if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
11571  }
11572  else if (enc0 == rb_usascii_encoding() && enc != rb_utf8_encoding()) {
11574  }
11575  }
11576 
11577  return str;
11578 }
11579 
11580 #define lex_goto_eol(parser) ((parser)->lex.pcur = (parser)->lex.pend)
11581 #define lex_eol_p() (lex_p >= lex_pend)
11582 #define peek(c) peek_n((c), 0)
11583 #define peek_n(c,n) (lex_p+(n) < lex_pend && (c) == (unsigned char)lex_p[n])
11584 #define peekc() peekc_n(0)
11585 #define peekc_n(n) (lex_p+(n) < lex_pend ? (unsigned char)lex_p[n] : -1)
11586 
11587 static int
11588 parser_nextline(struct parser_params *parser)
11589 {
11590  VALUE v = lex_nextline;
11591  lex_nextline = 0;
11592  if (!v) {
11593  if (parser->eofp)
11594  return -1;
11595 
11596  if (!lex_input || NIL_P(v = lex_getline(parser))) {
11597  parser->eofp = 1;
11598  lex_goto_eol(parser);
11599  return -1;
11600  }
11601  parser->cr_seen = FALSE;
11602  }
11603 #ifdef RIPPER
11604  if (parser->tokp < lex_pend) {
11605  if (!has_delayed_token()) {
11606  parser->delayed = rb_str_buf_new(1024);
11607  rb_enc_associate(parser->delayed, current_enc);
11608  rb_str_buf_cat(parser->delayed,
11609  parser->tokp, lex_pend - parser->tokp);
11610  parser->delayed_line = ruby_sourceline;
11611  parser->delayed_col = (int)(parser->tokp - lex_pbeg);
11612  }
11613  else {
11614  rb_str_buf_cat(parser->delayed,
11615  parser->tokp, lex_pend - parser->tokp);
11616  }
11617  }
11618 #endif
11619  if (heredoc_end > 0) {
11621  heredoc_end = 0;
11622  }
11623  ruby_sourceline++;
11624  parser->line_count++;
11625  lex_pbeg = lex_p = RSTRING_PTR(v);
11626  lex_pend = lex_p + RSTRING_LEN(v);
11627  token_flush(parser);
11628  lex_lastline = v;
11629  return 0;
11630 }
11631 
11632 static int
11633 parser_cr(struct parser_params *parser, int c)
11634 {
11635  if (peek('\n')) {
11636  lex_p++;
11637  c = '\n';
11638  }
11639  else if (!parser->cr_seen) {
11640  parser->cr_seen = TRUE;
11641  /* carried over with lex_nextline for nextc() */
11642  rb_warn0("encountered \\r in middle of line, treated as a mere space");
11643  }
11644  return c;
11645 }
11646 
11647 static inline int
11648 parser_nextc(struct parser_params *parser)
11649 {
11650  int c;
11651 
11652  if (UNLIKELY(lex_p == lex_pend)) {
11653  if (parser_nextline(parser)) return -1;
11654  }
11655  c = (unsigned char)*lex_p++;
11656  if (UNLIKELY(c == '\r')) {
11657  c = parser_cr(parser, c);
11658  }
11659 
11660  return c;
11661 }
11662 
11663 static void
11664 parser_pushback(struct parser_params *parser, int c)
11665 {
11666  if (c == -1) return;
11667  lex_p--;
11668  if (lex_p > lex_pbeg && lex_p[0] == '\n' && lex_p[-1] == '\r') {
11669  lex_p--;
11670  }
11671 }
11672 
11673 #define was_bol() (lex_p == lex_pbeg + 1)
11674 
11675 #define tokfix() (tokenbuf[tokidx]='\0')
11676 #define tok() tokenbuf
11677 #define toklen() tokidx
11678 #define toklast() (tokidx>0?tokenbuf[tokidx-1]:0)
11679 
11680 static char*
11681 parser_newtok(struct parser_params *parser)
11682 {
11683  tokidx = 0;
11685  if (!tokenbuf) {
11686  toksiz = 60;
11687  tokenbuf = ALLOC_N(char, 60);
11688  }
11689  if (toksiz > 4096) {
11690  toksiz = 60;
11691  REALLOC_N(tokenbuf, char, 60);
11692  }
11693  return tokenbuf;
11694 }
11695 
11696 static char *
11697 parser_tokspace(struct parser_params *parser, int n)
11698 {
11699  tokidx += n;
11700 
11701  if (tokidx >= toksiz) {
11702  do {toksiz *= 2;} while (toksiz < tokidx);
11703  REALLOC_N(tokenbuf, char, toksiz);
11704  }
11705  return &tokenbuf[tokidx-n];
11706 }
11707 
11708 static void
11709 parser_tokadd(struct parser_params *parser, int c)
11710 {
11711  tokenbuf[tokidx++] = (char)c;
11712  if (tokidx >= toksiz) {
11713  toksiz *= 2;
11714  REALLOC_N(tokenbuf, char, toksiz);
11715  }
11716 }
11717 
11718 static int
11719 parser_tok_hex(struct parser_params *parser, size_t *numlen)
11720 {
11721  int c;
11722 
11723  c = scan_hex(lex_p, 2, numlen);
11724  if (!*numlen) {
11725  parser->tokp = lex_p;
11726  yyerror0("invalid hex escape");
11727  return 0;
11728  }
11729  lex_p += *numlen;
11730  return c;
11731 }
11732 
11733 #define tokcopy(n) memcpy(tokspace(n), lex_p - (n), (n))
11734 
11735 static int
11736 parser_tokadd_codepoint(struct parser_params *parser, rb_encoding **encp,
11737  int regexp_literal, int wide)
11738 {
11739  size_t numlen;
11740  int codepoint = scan_hex(lex_p, wide ? lex_pend - lex_p : 4, &numlen);
11742  lex_p += numlen;
11743  if (wide ? (numlen == 0 || numlen > 6) : (numlen < 4)) {
11744  yyerror0("invalid Unicode escape");
11745  return wide && numlen > 0;
11746  }
11747  if (codepoint > 0x10ffff) {
11748  yyerror0("invalid Unicode codepoint (too large)");
11749  return wide;
11750  }
11751  if ((codepoint & 0xfffff800) == 0xd800) {
11752  yyerror0("invalid Unicode codepoint");
11753  return wide;
11754  }
11755  if (regexp_literal) {
11756  tokcopy((int)numlen);
11757  }
11758  else if (codepoint >= 0x80) {
11759  rb_encoding *utf8 = rb_utf8_encoding();
11760  if (*encp && utf8 != *encp) {
11761  static const char mixed_utf8[] = "UTF-8 mixed within %s source";
11762  size_t len = sizeof(mixed_utf8) - 2 + strlen(rb_enc_name(*encp));
11763  char *mesg = alloca(len);
11764  snprintf(mesg, len, mixed_utf8, rb_enc_name(*encp));
11765  yyerror0(mesg);
11766  return wide;
11767  }
11768  *encp = utf8;
11769  tokaddmbc(codepoint, *encp);
11770  }
11771  else {
11772  tokadd(codepoint);
11773  }
11774  return TRUE;
11775 }
11776 
11777 /* return value is for ?\u3042 */
11778 static int
11779 parser_tokadd_utf8(struct parser_params *parser, rb_encoding **encp,
11780  int string_literal, int symbol_literal, int regexp_literal)
11781 {
11782  /*
11783  * If string_literal is true, then we allow multiple codepoints
11784  * in \u{}, and add the codepoints to the current token.
11785  * Otherwise we're parsing a character literal and return a single
11786  * codepoint without adding it
11787  */
11788 
11789  const int open_brace = '{', close_brace = '}';
11790 
11791  if (regexp_literal) { tokadd('\\'); tokadd('u'); }
11792 
11793  if (peek(open_brace)) { /* handle \u{...} form */
11794  int c, last = nextc();
11795  if (lex_p >= lex_pend) goto unterminated;
11796  while (ISSPACE(c = *lex_p) && ++lex_p < lex_pend);
11797  do {
11798  if (regexp_literal) tokadd(last);
11799  if (!parser_tokadd_codepoint(parser, encp, regexp_literal, TRUE)) {
11800  break;
11801  }
11802  while (ISSPACE(c = *lex_p)) {
11803  if (++lex_p >= lex_pend) goto unterminated;
11804  last = c;
11805  }
11806  } while (c != close_brace);
11807 
11808  if (c != close_brace) {
11809  unterminated:
11811  yyerror0("unterminated Unicode escape");
11812  return 0;
11813  }
11814 
11815  if (regexp_literal) tokadd(close_brace);
11816  nextc();
11817  }
11818  else { /* handle \uxxxx form */
11819  if (!parser_tokadd_codepoint(parser, encp, regexp_literal, FALSE)) {
11820  return 0;
11821  }
11822  }
11823 
11824  return TRUE;
11825 }
11826 
11827 #define ESCAPE_CONTROL 1
11828 #define ESCAPE_META 2
11829 
11830 static int
11831 parser_read_escape(struct parser_params *parser, int flags,
11832  rb_encoding **encp)
11833 {
11834  int c;
11835  size_t numlen;
11836 
11837  switch (c = nextc()) {
11838  case '\\': /* Backslash */
11839  return c;
11840 
11841  case 'n': /* newline */
11842  return '\n';
11843 
11844  case 't': /* horizontal tab */
11845  return '\t';
11846 
11847  case 'r': /* carriage-return */
11848  return '\r';
11849 
11850  case 'f': /* form-feed */
11851  return '\f';
11852 
11853  case 'v': /* vertical tab */
11854  return '\13';
11855 
11856  case 'a': /* alarm(bell) */
11857  return '\007';
11858 
11859  case 'e': /* escape */
11860  return 033;
11861 
11862  case '0': case '1': case '2': case '3': /* octal constant */
11863  case '4': case '5': case '6': case '7':
11864  pushback(c);
11865  c = scan_oct(lex_p, 3, &numlen);
11866  lex_p += numlen;
11867  return c;
11868 
11869  case 'x': /* hex constant */
11870  c = tok_hex(&numlen);
11871  if (numlen == 0) return 0;
11872  return c;
11873 
11874  case 'b': /* backspace */
11875  return '\010';
11876 
11877  case 's': /* space */
11878  return ' ';
11879 
11880  case 'M':
11881  if (flags & ESCAPE_META) goto eof;
11882  if ((c = nextc()) != '-') {
11883  goto eof;
11884  }
11885  if ((c = nextc()) == '\\') {
11886  if (peek('u')) goto eof;
11887  return read_escape(flags|ESCAPE_META, encp) | 0x80;
11888  }
11889  else if (c == -1 || !ISASCII(c)) goto eof;
11890  else {
11891  return ((c & 0xff) | 0x80);
11892  }
11893 
11894  case 'C':
11895  if ((c = nextc()) != '-') {
11896  goto eof;
11897  }
11898  case 'c':
11899  if (flags & ESCAPE_CONTROL) goto eof;
11900  if ((c = nextc())== '\\') {
11901  if (peek('u')) goto eof;
11902  c = read_escape(flags|ESCAPE_CONTROL, encp);
11903  }
11904  else if (c == '?')
11905  return 0177;
11906  else if (c == -1 || !ISASCII(c)) goto eof;
11907  return c & 0x9f;
11908 
11909  eof:
11910  case -1:
11911  yyerror0("Invalid escape character syntax");
11912  pushback(c);
11913  return '\0';
11914 
11915  default:
11916  return c;
11917  }
11918 }
11919 
11920 static void
11921 parser_tokaddmbc(struct parser_params *parser, int c, rb_encoding *enc)
11922 {
11923  int len = rb_enc_codelen(c, enc);
11924  rb_enc_mbcput(c, tokspace(len), enc);
11925 }
11926 
11927 static int
11928 parser_tokadd_escape(struct parser_params *parser, rb_encoding **encp)
11929 {
11930  int c;
11931  int flags = 0;
11932  size_t numlen;
11933 
11934  first:
11935  switch (c = nextc()) {
11936  case '\n':
11937  return 0; /* just ignore */
11938 
11939  case '0': case '1': case '2': case '3': /* octal constant */
11940  case '4': case '5': case '6': case '7':
11941  {
11942  ruby_scan_oct(--lex_p, 3, &numlen);
11943  if (numlen == 0) goto eof;
11944  lex_p += numlen;
11945  tokcopy((int)numlen + 1);
11946  }
11947  return 0;
11948 
11949  case 'x': /* hex constant */
11950  {
11951  tok_hex(&numlen);
11952  if (numlen == 0) return -1;
11953  tokcopy((int)numlen + 2);
11954  }
11955  return 0;
11956 
11957  case 'M':
11958  if (flags & ESCAPE_META) goto eof;
11959  if ((c = nextc()) != '-') {
11960  pushback(c);
11961  goto eof;
11962  }
11963  tokcopy(3);
11964  flags |= ESCAPE_META;
11965  goto escaped;
11966 
11967  case 'C':
11968  if (flags & ESCAPE_CONTROL) goto eof;
11969  if ((c = nextc()) != '-') {
11970  pushback(c);
11971  goto eof;
11972  }
11973  tokcopy(3);
11974  goto escaped;
11975 
11976  case 'c':
11977  if (flags & ESCAPE_CONTROL) goto eof;
11978  tokcopy(2);
11979  flags |= ESCAPE_CONTROL;
11980  escaped:
11981  if ((c = nextc()) == '\\') {
11982  goto first;
11983  }
11984  else if (c == -1) goto eof;
11985  tokadd(c);
11986  return 0;
11987 
11988  eof:
11989  case -1:
11990  yyerror0("Invalid escape character syntax");
11991  return -1;
11992 
11993  default:
11994  tokadd('\\');
11995  tokadd(c);
11996  }
11997  return 0;
11998 }
11999 
12000 static int
12001 parser_regx_options(struct parser_params *parser)
12002 {
12003  int kcode = 0;
12004  int kopt = 0;
12005  int options = 0;
12006  int c, opt, kc;
12007 
12008  newtok();
12009  while (c = nextc(), ISALPHA(c)) {
12010  if (c == 'o') {
12011  options |= RE_OPTION_ONCE;
12012  }
12013  else if (rb_char_to_option_kcode(c, &opt, &kc)) {
12014  if (kc >= 0) {
12015  if (kc != rb_ascii8bit_encindex()) kcode = c;
12016  kopt = opt;
12017  }
12018  else {
12019  options |= opt;
12020  }
12021  }
12022  else {
12023  tokadd(c);
12024  }
12025  }
12026  options |= kopt;
12027  pushback(c);
12028  if (toklen()) {
12029  tokfix();
12030  compile_error(PARSER_ARG "unknown regexp option%s - %s",
12031  toklen() > 1 ? "s" : "", tok());
12032  }
12033  return options | RE_OPTION_ENCODING(kcode);
12034 }
12035 
12036 static void
12037 dispose_string(VALUE str)
12038 {
12039  rb_str_free(str);
12040  rb_gc_force_recycle(str);
12041 }
12042 
12043 static int
12044 parser_tokadd_mbchar(struct parser_params *parser, int c)
12045 {
12046  int len = parser_precise_mbclen(parser, lex_p-1);
12047  if (len < 0) return -1;
12048  tokadd(c);
12049  lex_p += --len;
12050  if (len > 0) tokcopy(len);
12051  return c;
12052 }
12053 
12054 #define tokadd_mbchar(c) parser_tokadd_mbchar(parser, (c))
12055 
12056 static inline int
12057 simple_re_meta(int c)
12058 {
12059  switch (c) {
12060  case '$': case '*': case '+': case '.':
12061  case '?': case '^': case '|':
12062  case ')': case ']': case '}': case '>':
12063  return TRUE;
12064  default:
12065  return FALSE;
12066  }
12067 }
12068 
12069 static int
12070 parser_update_heredoc_indent(struct parser_params *parser, int c)
12071 {
12072  if (heredoc_line_indent == -1) {
12073  if (c == '\n') heredoc_line_indent = 0;
12074  }
12075  else {
12076  if (c == ' ') {
12078  return TRUE;
12079  }
12080  else if (c == '\t') {
12081  int w = (heredoc_line_indent / TAB_WIDTH) + 1;
12083  return TRUE;
12084  }
12085  else if (c != '\n') {
12088  }
12089  heredoc_line_indent = -1;
12090  }
12091  }
12092  return FALSE;
12093 }
12094 
12095 static int
12096 parser_tokadd_string(struct parser_params *parser,
12097  int func, int term, int paren, long *nest,
12098  rb_encoding **encp)
12099 {
12100  int c;
12101  rb_encoding *enc = 0;
12102  char *errbuf = 0;
12103  static const char mixed_msg[] = "%s mixed within %s source";
12104 
12105 #define mixed_error(enc1, enc2) if (!errbuf) { \
12106  size_t len = sizeof(mixed_msg) - 4; \
12107  len += strlen(rb_enc_name(enc1)); \
12108  len += strlen(rb_enc_name(enc2)); \
12109  errbuf = ALLOCA_N(char, len); \
12110  snprintf(errbuf, len, mixed_msg, \
12111  rb_enc_name(enc1), \
12112  rb_enc_name(enc2)); \
12113  yyerror0(errbuf); \
12114  }
12115 #define mixed_escape(beg, enc1, enc2) do { \
12116  const char *pos = lex_p; \
12117  lex_p = (beg); \
12118  mixed_error((enc1), (enc2)); \
12119  lex_p = pos; \
12120  } while (0)
12121 
12122  while ((c = nextc()) != -1) {
12123  if (heredoc_indent > 0) {
12124  parser_update_heredoc_indent(parser, c);
12125  }
12126 
12127  if (paren && c == paren) {
12128  ++*nest;
12129  }
12130  else if (c == term) {
12131  if (!nest || !*nest) {
12132  pushback(c);
12133  break;
12134  }
12135  --*nest;
12136  }
12137  else if ((func & STR_FUNC_EXPAND) && c == '#' && lex_p < lex_pend) {
12138  int c2 = *lex_p;
12139  if (c2 == '$' || c2 == '@' || c2 == '{') {
12140  pushback(c);
12141  break;
12142  }
12143  }
12144  else if (c == '\\') {
12145  literal_flush(lex_p - 1);
12146  c = nextc();
12147  switch (c) {
12148  case '\n':
12149  if (func & STR_FUNC_QWORDS) break;
12150  if (func & STR_FUNC_EXPAND) continue;
12151  tokadd('\\');
12152  break;
12153 
12154  case '\\':
12155  if (func & STR_FUNC_ESCAPE) tokadd(c);
12156  break;
12157 
12158  case 'u':
12159  if ((func & STR_FUNC_EXPAND) == 0) {
12160  tokadd('\\');
12161  break;
12162  }
12163  if (!parser_tokadd_utf8(parser, &enc, term,
12164  func & STR_FUNC_SYMBOL,
12165  func & STR_FUNC_REGEXP)) {
12166  return -1;
12167  }
12168  continue;
12169 
12170  default:
12171  if (c == -1) return -1;
12172  if (!ISASCII(c)) {
12173  if ((func & STR_FUNC_EXPAND) == 0) tokadd('\\');
12174  goto non_ascii;
12175  }
12176  if (func & STR_FUNC_REGEXP) {
12177  if (c == term && !simple_re_meta(c)) {
12178  tokadd(c);
12179  continue;
12180  }
12181  pushback(c);
12182  if ((c = tokadd_escape(&enc)) < 0)
12183  return -1;
12184  if (enc && enc != *encp) {
12185  mixed_escape(parser->tokp+2, enc, *encp);
12186  }
12187  continue;
12188  }
12189  else if (func & STR_FUNC_EXPAND) {
12190  pushback(c);
12191  if (func & STR_FUNC_ESCAPE) tokadd('\\');
12192  c = read_escape(0, &enc);
12193  }
12194  else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
12195  /* ignore backslashed spaces in %w */
12196  }
12197  else if (c != term && !(paren && c == paren)) {
12198  tokadd('\\');
12199  pushback(c);
12200  continue;
12201  }
12202  }
12203  }
12204  else if (!parser_isascii()) {
12205  non_ascii:
12206  if (!enc) {
12207  enc = *encp;
12208  }
12209  else if (enc != *encp) {
12210  mixed_error(enc, *encp);
12211  continue;
12212  }
12213  if (tokadd_mbchar(c) == -1) return -1;
12214  continue;
12215  }
12216  else if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
12217  pushback(c);
12218  break;
12219  }
12220  if (c & 0x80) {
12221  if (!enc) {
12222  enc = *encp;
12223  }
12224  else if (enc != *encp) {
12225  mixed_error(enc, *encp);
12226  continue;
12227  }
12228  }
12229  tokadd(c);
12230  }
12231  if (enc) *encp = enc;
12232  return c;
12233 }
12234 
12235 #define NEW_STRTERM(func, term, paren) \
12236  rb_node_newnode(NODE_STRTERM, (func), (term) | ((paren) << (CHAR_BIT * 2)), 0)
12237 
12238 #ifdef RIPPER
12239 static void
12240 token_flush_string_content(struct parser_params *parser, rb_encoding *enc)
12241 {
12242  VALUE content = yylval.val;
12243  if (!ripper_is_node_yylval(content))
12244  content = ripper_new_yylval(0, 0, content);
12245  if (has_delayed_token()) {
12246  ptrdiff_t len = lex_p - parser->tokp;
12247  if (len > 0) {
12248  rb_enc_str_buf_cat(parser->delayed, parser->tokp, len, enc);
12249  }
12251  parser->tokp = lex_p;
12252  RNODE(content)->nd_rval = yylval.val;
12253  }
12255  if (yylval.val != content)
12256  RNODE(content)->nd_rval = yylval.val;
12257  yylval.val = content;
12258 }
12259 
12260 #define flush_string_content(enc) token_flush_string_content(parser, (enc))
12261 #else
12262 #define flush_string_content(enc) ((void)(enc))
12263 #endif
12264 
12265 RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20 + 31) / 32];
12266 /* this can be shared with ripper, since it's independent from struct
12267  * parser_params. */
12268 #ifndef RIPPER
12269 #define BIT(c, idx) (((c) / 32 - 1 == idx) ? (1U << ((c) % 32)) : 0)
12270 #define SPECIAL_PUNCT(idx) ( \
12271  BIT('~', idx) | BIT('*', idx) | BIT('$', idx) | BIT('?', idx) | \
12272  BIT('!', idx) | BIT('@', idx) | BIT('/', idx) | BIT('\\', idx) | \
12273  BIT(';', idx) | BIT(',', idx) | BIT('.', idx) | BIT('=', idx) | \
12274  BIT(':', idx) | BIT('<', idx) | BIT('>', idx) | BIT('\"', idx) | \
12275  BIT('&', idx) | BIT('`', idx) | BIT('\'', idx) | BIT('+', idx) | \
12276  BIT('0', idx))
12277 const unsigned int ruby_global_name_punct_bits[] = {
12278  SPECIAL_PUNCT(0),
12279  SPECIAL_PUNCT(1),
12280  SPECIAL_PUNCT(2),
12281 };
12282 #undef BIT
12283 #undef SPECIAL_PUNCT
12284 #endif
12285 
12286 static enum yytokentype
12287 parser_peek_variable_name(struct parser_params *parser)
12288 {
12289  int c;
12290  const char *p = lex_p;
12291 
12292  if (p + 1 >= lex_pend) return 0;
12293  c = *p++;
12294  switch (c) {
12295  case '$':
12296  if ((c = *p) == '-') {
12297  if (++p >= lex_pend) return 0;
12298  c = *p;
12299  }
12300  else if (is_global_name_punct(c) || ISDIGIT(c)) {
12301  return tSTRING_DVAR;
12302  }
12303  break;
12304  case '@':
12305  if ((c = *p) == '@') {
12306  if (++p >= lex_pend) return 0;
12307  c = *p;
12308  }
12309  break;
12310  case '{':
12311  lex_p = p;
12312  command_start = TRUE;
12313  return tSTRING_DBEG;
12314  default:
12315  return 0;
12316  }
12317  if (!ISASCII(c) || c == '_' || ISALPHA(c))
12318  return tSTRING_DVAR;
12319  return 0;
12320 }
12321 
12322 #define IS_ARG() IS_lex_state(EXPR_ARG_ANY)
12323 #define IS_END() IS_lex_state(EXPR_END_ANY)
12324 #define IS_BEG() (IS_lex_state(EXPR_BEG_ANY) || IS_lex_state_all(EXPR_ARG|EXPR_LABELED))
12325 #define IS_SPCARG(c) (IS_ARG() && space_seen && !ISSPACE(c))
12326 #define IS_LABEL_POSSIBLE() (\
12327  (IS_lex_state(EXPR_LABEL|EXPR_ENDFN) && !cmd_state) || \
12328  IS_ARG())
12329 #define IS_LABEL_SUFFIX(n) (peek_n(':',(n)) && !peek_n(':', (n)+1))
12330 #define IS_AFTER_OPERATOR() IS_lex_state(EXPR_FNAME | EXPR_DOT)
12331 
12332 static inline enum yytokentype
12333 parser_string_term(struct parser_params *parser, int func)
12334 {
12336  lex_strterm = 0;
12337  if (func & STR_FUNC_REGEXP) {
12340  SET_LEX_STATE(EXPR_END|EXPR_ENDARG);
12341  return tREGEXP_END;
12342  }
12343  if ((func & STR_FUNC_LABEL) && IS_LABEL_SUFFIX(0)) {
12344  nextc();
12345  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
12346  return tLABEL_END;
12347  }
12348  SET_LEX_STATE(EXPR_END|EXPR_ENDARG);
12349  return tSTRING_END;
12350 }
12351 
12352 static enum yytokentype
12353 parser_parse_string(struct parser_params *parser, NODE *quote)
12354 {
12355  int func = (int)quote->nd_func;
12356  int term = nd_term(quote);
12357  int paren = nd_paren(quote);
12358  int c, space = 0;
12359  rb_encoding *enc = current_enc;
12360 
12361  if (func & STR_FUNC_TERM) {
12362  SET_LEX_STATE(EXPR_END|EXPR_ENDARG);
12363  lex_strterm = 0;
12364  return func & STR_FUNC_REGEXP ? tREGEXP_END : tSTRING_END;
12365  }
12366  c = nextc();
12367  if ((func & STR_FUNC_QWORDS) && ISSPACE(c)) {
12368  do {c = nextc();} while (ISSPACE(c));
12369  space = 1;
12370  }
12371  if (c == term && !quote->nd_nest) {
12372  if (func & STR_FUNC_QWORDS) {
12373  quote->nd_func |= STR_FUNC_TERM;
12374  return ' ';
12375  }
12376  return parser_string_term(parser, func);
12377  }
12378  if (space) {
12379  pushback(c);
12380  return ' ';
12381  }
12382  newtok();
12383  if ((func & STR_FUNC_EXPAND) && c == '#') {
12384  int t = parser_peek_variable_name(parser);
12385  if (t) return t;
12386  tokadd('#');
12387  c = nextc();
12388  }
12389  pushback(c);
12390  if (tokadd_string(func, term, paren, &quote->nd_nest,
12391  &enc) == -1) {
12392  if (parser->eofp) {
12393 #ifndef RIPPER
12394 # define unterminated_literal(mesg) yyerror0(mesg)
12395 #else
12396 # define unterminated_literal(mesg) compile_error(PARSER_ARG mesg)
12397 #endif
12399  if (func & STR_FUNC_REGEXP) {
12400  unterminated_literal("unterminated regexp meets end of file");
12401  }
12402  else {
12403  unterminated_literal("unterminated string meets end of file");
12404  }
12405  quote->nd_func |= STR_FUNC_TERM;
12406  }
12407  }
12408 
12409  tokfix();
12410  set_yylval_str(STR_NEW3(tok(), toklen(), enc, func));
12411  flush_string_content(enc);
12412 
12413  return tSTRING_CONTENT;
12414 }
12415 
12416 static enum yytokentype
12417 parser_heredoc_identifier(struct parser_params *parser)
12418 {
12419  int c = nextc(), term, func = 0;
12420  enum yytokentype token = tSTRING_BEG;
12421  long len;
12422  int newline = 0;
12423  int indent = 0;
12424 
12425  if (c == '-') {
12426  c = nextc();
12427  func = STR_FUNC_INDENT;
12428  }
12429  else if (c == '~') {
12430  c = nextc();
12431  func = STR_FUNC_INDENT;
12432  indent = INT_MAX;
12433  }
12434  switch (c) {
12435  case '\'':
12436  func |= str_squote; goto quoted;
12437  case '"':
12438  func |= str_dquote; goto quoted;
12439  case '`':
12440  token = tXSTRING_BEG;
12441  func |= str_xquote; goto quoted;
12442 
12443  quoted:
12444  newtok();
12445  tokadd(func);
12446  term = c;
12447  while ((c = nextc()) != -1 && c != term) {
12448  if (tokadd_mbchar(c) == -1) return 0;
12449  if (!newline && c == '\n') newline = 1;
12450  else if (newline) newline = 2;
12451  }
12452  if (c == -1) {
12453  compile_error(PARSER_ARG "unterminated here document identifier");
12454  return 0;
12455  }
12456  switch (newline) {
12457  case 1:
12458  rb_warn0("here document identifier ends with a newline");
12459  if (--tokidx > 0 && tokenbuf[tokidx] == '\r') --tokidx;
12460  break;
12461  case 2:
12462  compile_error(PARSER_ARG "here document identifier across newlines, never match");
12463  return -1;
12464  }
12465  break;
12466 
12467  default:
12468  if (!parser_is_identchar()) {
12469  pushback(c);
12470  if (func & STR_FUNC_INDENT) {
12471  pushback(indent > 0 ? '~' : '-');
12472  }
12473  return 0;
12474  }
12475  newtok();
12476  tokadd(func |= str_dquote);
12477  do {
12478  if (tokadd_mbchar(c) == -1) return 0;
12479  } while ((c = nextc()) != -1 && parser_is_identchar());
12480  pushback(c);
12481  break;
12482  }
12483 
12484  tokfix();
12486  len = lex_p - lex_pbeg;
12487  lex_goto_eol(parser);
12489  STR_NEW(tok(), toklen()), /* nd_lit */
12490  len, /* nd_nth */
12491  lex_lastline); /* nd_orig */
12492  parser_set_line(lex_strterm, ruby_sourceline);
12493  token_flush(parser);
12494  heredoc_indent = indent;
12495  heredoc_line_indent = 0;
12496  return token;
12497 }
12498 
12499 static void
12500 parser_heredoc_restore(struct parser_params *parser, NODE *here)
12501 {
12502  VALUE line;
12503 
12504  lex_strterm = 0;
12505  line = here->nd_orig;
12506  lex_lastline = line;
12507  lex_pbeg = RSTRING_PTR(line);
12508  lex_pend = lex_pbeg + RSTRING_LEN(line);
12509  lex_p = lex_pbeg + here->nd_nth;
12511  ruby_sourceline = nd_line(here);
12512  dispose_string(here->nd_lit);
12513  rb_gc_force_recycle((VALUE)here);
12514  token_flush(parser);
12515 }
12516 
12517 static int
12518 dedent_string(VALUE string, int width)
12519 {
12520  char *str;
12521  long len;
12522  int i, col = 0;
12523 
12524  RSTRING_GETMEM(string, str, len);
12525  for (i = 0; i < len && col < width; i++) {
12526  if (str[i] == ' ') {
12527  col++;
12528  }
12529  else if (str[i] == '\t') {
12530  int n = TAB_WIDTH * (col / TAB_WIDTH + 1);
12531  if (n > width) break;
12532  col = n;
12533  }
12534  else {
12535  break;
12536  }
12537  }
12538  if (!i) return 0;
12539  rb_str_modify(string);
12540  str = RSTRING_PTR(string);
12541  if (RSTRING_LEN(string) != len)
12542  rb_fatal("literal string changed: %+"PRIsVALUE, string);
12543  MEMMOVE(str, str + i, char, len - i);
12544  rb_str_set_len(string, len - i);
12545  return i;
12546 }
12547 
12548 #ifndef RIPPER
12549 static NODE *
12550 parser_heredoc_dedent(struct parser_params *parser, NODE *root)
12551 {
12552  NODE *node, *str_node;
12553  int bol = TRUE;
12554  int indent = heredoc_indent;
12555 
12556  if (indent <= 0) return root;
12557  heredoc_indent = 0;
12558  if (!root) return root;
12559 
12560  node = str_node = root;
12561  if (nd_type(root) == NODE_ARRAY) str_node = root->nd_head;
12562 
12563  while (str_node) {
12564  VALUE lit = str_node->nd_lit;
12565  if (bol) dedent_string(lit, indent);
12566  bol = TRUE;
12567 
12568  str_node = 0;
12569  while ((node = node->nd_next) != 0 && nd_type(node) == NODE_ARRAY) {
12570  if ((str_node = node->nd_head) != 0) {
12571  enum node_type type = nd_type(str_node);
12572  if (type == NODE_STR || type == NODE_DSTR) break;
12573  bol = FALSE;
12574  str_node = 0;
12575  }
12576  }
12577  }
12578  return root;
12579 }
12580 #else /* RIPPER */
12581 static VALUE
12582 parser_heredoc_dedent(struct parser_params *parser, VALUE array)
12583 {
12584  int indent = heredoc_indent;
12585 
12586  if (indent <= 0) return array;
12587  heredoc_indent = 0;
12588  dispatch2(heredoc_dedent, array, INT2NUM(indent));
12589  return array;
12590 }
12591 
12592 static VALUE
12593 parser_dedent_string(VALUE self, VALUE input, VALUE width)
12594 {
12595  int wid, col;
12596 
12597  StringValue(input);
12598  wid = NUM2UINT(width);
12599  col = dedent_string(input, wid);
12600  return INT2NUM(col);
12601 }
12602 #endif
12603 
12604 static int
12605 parser_whole_match_p(struct parser_params *parser,
12606  const char *eos, long len, int indent)
12607 {
12608  const char *p = lex_pbeg;
12609  long n;
12610 
12611  if (indent) {
12612  while (*p && ISSPACE(*p)) p++;
12613  }
12614  n = lex_pend - (p + len);
12615  if (n < 0) return FALSE;
12616  if (n > 0 && p[len] != '\n') {
12617  if (p[len] != '\r') return FALSE;
12618  if (n <= 1 || p[len+1] != '\n') return FALSE;
12619  }
12620  return strncmp(eos, p, len) == 0;
12621 }
12622 
12623 #define NUM_SUFFIX_R (1<<0)
12624 #define NUM_SUFFIX_I (1<<1)
12625 #define NUM_SUFFIX_ALL 3
12626 
12627 static int
12628 parser_number_literal_suffix(struct parser_params *parser, int mask)
12629 {
12630  int c, result = 0;
12631  const char *lastp = lex_p;
12632 
12633  while ((c = nextc()) != -1) {
12634  if ((mask & NUM_SUFFIX_I) && c == 'i') {
12635  result |= (mask & NUM_SUFFIX_I);
12636  mask &= ~NUM_SUFFIX_I;
12637  /* r after i, rational of complex is disallowed */
12638  mask &= ~NUM_SUFFIX_R;
12639  continue;
12640  }
12641  if ((mask & NUM_SUFFIX_R) && c == 'r') {
12642  result |= (mask & NUM_SUFFIX_R);
12643  mask &= ~NUM_SUFFIX_R;
12644  continue;
12645  }
12646  if (!ISASCII(c) || ISALPHA(c) || c == '_') {
12647  lex_p = lastp;
12649  return 0;
12650  }
12651  pushback(c);
12652  if (c == '.') {
12653  c = peekc_n(1);
12654  if (ISDIGIT(c)) {
12655  yyerror0("unexpected fraction part after numeric literal");
12656  lex_p += 2;
12657  while (parser_is_identchar()) nextc();
12658  }
12659  }
12660  break;
12661  }
12662  return result;
12663 }
12664 
12665 static enum yytokentype
12666 parser_set_number_literal(struct parser_params *parser, VALUE v,
12667  enum yytokentype type, int suffix)
12668 {
12669  if (suffix & NUM_SUFFIX_I) {
12670  v = rb_complex_raw(INT2FIX(0), v);
12671  type = tIMAGINARY;
12672  }
12673  set_yylval_literal(v);
12674  SET_LEX_STATE(EXPR_END|EXPR_ENDARG);
12675  return type;
12676 }
12677 
12678 static int
12679 parser_set_integer_literal(struct parser_params *parser, VALUE v, int suffix)
12680 {
12681  enum yytokentype type = tINTEGER;
12682  if (suffix & NUM_SUFFIX_R) {
12683  v = rb_rational_raw1(v);
12684  type = tRATIONAL;
12685  }
12686  return set_number_literal(v, type, suffix);
12687 }
12688 
12689 #ifdef RIPPER
12690 static void
12691 ripper_dispatch_heredoc_end(struct parser_params *parser)
12692 {
12693  VALUE str;
12694  if (has_delayed_token())
12696  str = STR_NEW(parser->tokp, lex_pend - parser->tokp);
12697  ripper_dispatch1(parser, ripper_token2eventid(tHEREDOC_END), str);
12698  lex_goto_eol(parser);
12699  token_flush(parser);
12700 }
12701 
12702 #define dispatch_heredoc_end() ripper_dispatch_heredoc_end(parser)
12703 #else
12704 #define dispatch_heredoc_end() ((void)0)
12705 #endif
12706 
12707 static enum yytokentype
12708 parser_here_document(struct parser_params *parser, NODE *here)
12709 {
12710  int c, func, indent = 0;
12711  const char *eos, *p, *pend;
12712  long len;
12713  VALUE str = 0;
12714  rb_encoding *enc = current_enc;
12715 
12716  eos = RSTRING_PTR(here->nd_lit);
12717  len = RSTRING_LEN(here->nd_lit) - 1;
12718  indent = (func = *eos++) & STR_FUNC_INDENT;
12719 
12720  if ((c = nextc()) == -1) {
12721  error:
12722  compile_error(PARSER_ARG "can't find string \"%s\" anywhere before EOF", eos);
12723 #ifdef RIPPER
12724  if (!has_delayed_token()) {
12726  }
12727  else {
12728  if (str) {
12729  rb_str_append(parser->delayed, str);
12730  }
12731  else if ((len = lex_p - parser->tokp) > 0) {
12732  if (!(func & STR_FUNC_REGEXP) && rb_enc_asciicompat(enc)) {
12733  int cr = ENC_CODERANGE_UNKNOWN;
12734  rb_str_coderange_scan_restartable(parser->tokp, lex_p, enc, &cr);
12735  if (cr != ENC_CODERANGE_7BIT &&
12737  enc != rb_utf8_encoding()) {
12738  enc = rb_ascii8bit_encoding();
12739  }
12740  }
12741  rb_enc_str_buf_cat(parser->delayed, parser->tokp, len, enc);
12742  }
12744  }
12745  lex_goto_eol(parser);
12746 #endif
12747  restore:
12749  lex_strterm = 0;
12750  return 0;
12751  }
12752  if (was_bol() && whole_match_p(eos, len, indent)) {
12755  lex_strterm = 0;
12756  SET_LEX_STATE(EXPR_END);
12757  return tSTRING_END;
12758  }
12759 
12760  if (!(func & STR_FUNC_EXPAND)) {
12761  do {
12763  pend = lex_pend;
12764  if (pend > p) {
12765  switch (pend[-1]) {
12766  case '\n':
12767  if (--pend == p || pend[-1] != '\r') {
12768  pend++;
12769  break;
12770  }
12771  case '\r':
12772  --pend;
12773  }
12774  }
12775 
12776  if (heredoc_indent > 0) {
12777  long i = 0;
12778  while (p + i < pend && parser_update_heredoc_indent(parser, p[i]))
12779  i++;
12780  heredoc_line_indent = 0;
12781  }
12782 
12783  if (str)
12784  rb_str_cat(str, p, pend - p);
12785  else
12786  str = STR_NEW(p, pend - p);
12787  if (pend < lex_pend) rb_str_cat(str, "\n", 1);
12788  lex_goto_eol(parser);
12789  if (heredoc_indent > 0) {
12790  set_yylval_str(str);
12791  flush_string_content(enc);
12792  return tSTRING_CONTENT;
12793  }
12794  if (nextc() == -1) {
12795  if (str) {
12796  dispose_string(str);
12797  str = 0;
12798  }
12799  goto error;
12800  }
12801  } while (!whole_match_p(eos, len, indent));
12802  }
12803  else {
12804  /* int mb = ENC_CODERANGE_7BIT, *mbp = &mb;*/
12805  newtok();
12806  if (c == '#') {
12807  int t = parser_peek_variable_name(parser);
12808  if (heredoc_line_indent != -1) {
12811  }
12812  heredoc_line_indent = -1;
12813  }
12814  if (t) return t;
12815  tokadd('#');
12816  c = nextc();
12817  }
12818  do {
12819  pushback(c);
12820  if ((c = tokadd_string(func, '\n', 0, NULL, &enc)) == -1) {
12821  if (parser->eofp) goto error;
12822  goto restore;
12823  }
12824  if (c != '\n') {
12825  flush:
12826  set_yylval_str(STR_NEW3(tok(), toklen(), enc, func));
12827  flush_string_content(enc);
12828  return tSTRING_CONTENT;
12829  }
12830  tokadd(nextc());
12831  if (heredoc_indent > 0) {
12832  lex_goto_eol(parser);
12833  goto flush;
12834  }
12835  /* if (mbp && mb == ENC_CODERANGE_UNKNOWN) mbp = 0;*/
12836  if ((c = nextc()) == -1) goto error;
12837  } while (!whole_match_p(eos, len, indent));
12838  str = STR_NEW3(tok(), toklen(), enc, func);
12839  }
12841 #ifdef RIPPER
12842  str = ripper_new_yylval(ripper_token2eventid(tSTRING_CONTENT),
12843  yylval.val, str);
12844 #endif
12846  lex_strterm = NEW_STRTERM(func | STR_FUNC_TERM, 0, 0);
12847  set_yylval_str(str);
12848  return tSTRING_CONTENT;
12849 }
12850 
12851 #include "lex.c"
12852 
12853 static void
12854 arg_ambiguous_gen(struct parser_params *parser, char c)
12855 {
12856 #ifndef RIPPER
12857  rb_warning1("ambiguous first argument; put parentheses or a space even after `%c' operator", WARN_I(c));
12858 #else
12859  dispatch1(arg_ambiguous, rb_usascii_str_new(&c, 1));
12860 #endif
12861 }
12862 #define arg_ambiguous(c) (arg_ambiguous_gen(parser, (c)), 1)
12863 
12864 static ID
12865 formal_argument_gen(struct parser_params *parser, ID lhs)
12866 {
12867  switch (id_type(lhs)) {
12868  case ID_LOCAL:
12869  break;
12870 #ifndef RIPPER
12871  case ID_CONST:
12872  yyerror0("formal argument cannot be a constant");
12873  return 0;
12874  case ID_INSTANCE:
12875  yyerror0("formal argument cannot be an instance variable");
12876  return 0;
12877  case ID_GLOBAL:
12878  yyerror0("formal argument cannot be a global variable");
12879  return 0;
12880  case ID_CLASS:
12881  yyerror0("formal argument cannot be a class variable");
12882  return 0;
12883  default:
12884  yyerror0("formal argument must be local variable");
12885  return 0;
12886 #else
12887  default:
12888  lhs = dispatch1(param_error, lhs);
12889  ripper_error();
12890  return 0;
12891 #endif
12892  }
12893  shadowing_lvar(lhs);
12894  return lhs;
12895 }
12896 
12897 static int
12898 lvar_defined_gen(struct parser_params *parser, ID id)
12899 {
12900  return (dyna_in_block() && dvar_defined(id)) || local_id(id);
12901 }
12902 
12903 /* emacsen -*- hack */
12904 static long
12905 parser_encode_length(struct parser_params *parser, const char *name, long len)
12906 {
12907  long nlen;
12908 
12909  if (len > 5 && name[nlen = len - 5] == '-') {
12910  if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
12911  return nlen;
12912  }
12913  if (len > 4 && name[nlen = len - 4] == '-') {
12914  if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
12915  return nlen;
12916  if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
12917  !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
12918  /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
12919  return nlen;
12920  }
12921  return len;
12922 }
12923 
12924 static void
12925 parser_set_encode(struct parser_params *parser, const char *name)
12926 {
12927  int idx = rb_enc_find_index(name);
12928  rb_encoding *enc;
12929  VALUE excargs[3];
12930 
12931  if (idx < 0) {
12932  excargs[1] = rb_sprintf("unknown encoding name: %s", name);
12933  error:
12934  excargs[0] = rb_eArgError;
12935  excargs[2] = rb_make_backtrace();
12937  rb_exc_raise(rb_make_exception(3, excargs));
12938  }
12939  enc = rb_enc_from_index(idx);
12940  if (!rb_enc_asciicompat(enc)) {
12941  excargs[1] = rb_sprintf("%s is not ASCII compatible", rb_enc_name(enc));
12942  goto error;
12943  }
12944  parser->enc = enc;
12945 #ifndef RIPPER
12946  if (ruby_debug_lines) {
12947  VALUE lines = ruby_debug_lines;
12948  long i, n = RARRAY_LEN(lines);
12949  for (i = 0; i < n; ++i) {
12950  rb_enc_associate_index(RARRAY_AREF(lines, i), idx);
12951  }
12952  }
12953 #endif
12954 }
12955 
12956 static int
12957 comment_at_top(struct parser_params *parser)
12958 {
12959  const char *p = lex_pbeg, *pend = lex_p - 1;
12960  if (parser->line_count != (parser->has_shebang ? 2 : 1)) return 0;
12961  while (p < pend) {
12962  if (!ISSPACE(*p)) return 0;
12963  p++;
12964  }
12965  return 1;
12966 }
12967 
12968 typedef long (*rb_magic_comment_length_t)(struct parser_params *parser, const char *name, long len);
12969 typedef void (*rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val);
12970 
12971 static void
12972 magic_comment_encoding(struct parser_params *parser, const char *name, const char *val)
12973 {
12974  if (!comment_at_top(parser)) {
12975  return;
12976  }
12977  parser_set_encode(parser, val);
12978 }
12979 
12980 static int
12981 parser_get_bool(struct parser_params *parser, const char *name, const char *val)
12982 {
12983  switch (*val) {
12984  case 't': case 'T':
12985  if (strcasecmp(val, "true") == 0) {
12986  return TRUE;
12987  }
12988  break;
12989  case 'f': case 'F':
12990  if (strcasecmp(val, "false") == 0) {
12991  return FALSE;
12992  }
12993  break;
12994  }
12995  rb_compile_warning(ruby_sourcefile, ruby_sourceline, "invalid value for %s: %s", name, val);
12996  return -1;
12997 }
12998 
12999 static void
13000 parser_set_token_info(struct parser_params *parser, const char *name, const char *val)
13001 {
13002  int b = parser_get_bool(parser, name, val);
13003  if (b >= 0) parser->token_info_enabled = b;
13004 }
13005 
13006 static void
13007 parser_set_compile_option_flag(struct parser_params *parser, const char *name, const char *val)
13008 {
13009  int b;
13010 
13011  if (parser->token_seen) {
13012  rb_warning1("`%s' is ignored after any tokens", WARN_S(name));
13013  return;
13014  }
13015 
13016  b = parser_get_bool(parser, name, val);
13017  if (b < 0) return;
13018 
13019  if (!parser->compile_option)
13021  rb_hash_aset(parser->compile_option, ID2SYM(rb_intern(name)),
13022  (b ? Qtrue : Qfalse));
13023 }
13024 
13025 # if WARN_PAST_SCOPE
13026 static void
13027 parser_set_past_scope(struct parser_params *parser, const char *name, const char *val)
13028 {
13029  int b = parser_get_bool(parser, name, val);
13030  if (b >= 0) parser->past_scope_enabled = b;
13031 }
13032 # endif
13033 
13034 struct magic_comment {
13035  const char *name;
13038 };
13039 
13040 static const struct magic_comment magic_comments[] = {
13041  {"coding", magic_comment_encoding, parser_encode_length},
13042  {"encoding", magic_comment_encoding, parser_encode_length},
13043  {"frozen_string_literal", parser_set_compile_option_flag},
13044  {"warn_indent", parser_set_token_info},
13045 # if WARN_PAST_SCOPE
13046  {"warn_past_scope", parser_set_past_scope},
13047 # endif
13048 };
13049 
13050 static const char *
13051 magic_comment_marker(const char *str, long len)
13052 {
13053  long i = 2;
13054 
13055  while (i < len) {
13056  switch (str[i]) {
13057  case '-':
13058  if (str[i-1] == '*' && str[i-2] == '-') {
13059  return str + i + 1;
13060  }
13061  i += 2;
13062  break;
13063  case '*':
13064  if (i + 1 >= len) return 0;
13065  if (str[i+1] != '-') {
13066  i += 4;
13067  }
13068  else if (str[i-1] != '-') {
13069  i += 2;
13070  }
13071  else {
13072  return str + i + 2;
13073  }
13074  break;
13075  default:
13076  i += 3;
13077  break;
13078  }
13079  }
13080  return 0;
13081 }
13082 
13083 static int
13084 parser_magic_comment(struct parser_params *parser, const char *str, long len)
13085 {
13086  int indicator = 0;
13087  VALUE name = 0, val = 0;
13088  const char *beg, *end, *vbeg, *vend;
13089 #define str_copy(_s, _p, _n) ((_s) \
13090  ? (void)(rb_str_resize((_s), (_n)), \
13091  MEMCPY(RSTRING_PTR(_s), (_p), char, (_n)), (_s)) \
13092  : (void)((_s) = STR_NEW((_p), (_n))))
13093 
13094  if (len <= 7) return FALSE;
13095  if (!!(beg = magic_comment_marker(str, len))) {
13096  if (!(end = magic_comment_marker(beg, str + len - beg)))
13097  return FALSE;
13098  indicator = TRUE;
13099  str = beg;
13100  len = end - beg - 3;
13101  }
13102 
13103  /* %r"([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" */
13104  while (len > 0) {
13105  const struct magic_comment *p = magic_comments;
13106  char *s;
13107  int i;
13108  long n = 0;
13109 
13110  for (; len > 0 && *str; str++, --len) {
13111  switch (*str) {
13112  case '\'': case '"': case ':': case ';':
13113  continue;
13114  }
13115  if (!ISSPACE(*str)) break;
13116  }
13117  for (beg = str; len > 0; str++, --len) {
13118  switch (*str) {
13119  case '\'': case '"': case ':': case ';':
13120  break;
13121  default:
13122  if (ISSPACE(*str)) break;
13123  continue;
13124  }
13125  break;
13126  }
13127  for (end = str; len > 0 && ISSPACE(*str); str++, --len);
13128  if (!len) break;
13129  if (*str != ':') {
13130  if (!indicator) return FALSE;
13131  continue;
13132  }
13133 
13134  do str++; while (--len > 0 && ISSPACE(*str));
13135  if (!len) break;
13136  if (*str == '"') {
13137  for (vbeg = ++str; --len > 0 && *str != '"'; str++) {
13138  if (*str == '\\') {
13139  --len;
13140  ++str;
13141  }
13142  }
13143  vend = str;
13144  if (len) {
13145  --len;
13146  ++str;
13147  }
13148  }
13149  else {
13150  for (vbeg = str; len > 0 && *str != '"' && *str != ';' && !ISSPACE(*str); --len, str++);
13151  vend = str;
13152  }
13153  if (indicator) {
13154  while (len > 0 && (*str == ';' || ISSPACE(*str))) --len, str++;
13155  }
13156  else {
13157  while (len > 0 && (ISSPACE(*str))) --len, str++;
13158  if (len) return FALSE;
13159  }
13160 
13161  n = end - beg;
13162  str_copy(name, beg, n);
13163  s = RSTRING_PTR(name);
13164  for (i = 0; i < n; ++i) {
13165  if (s[i] == '-') s[i] = '_';
13166  }
13167  do {
13168  if (STRNCASECMP(p->name, s, n) == 0 && !p->name[n]) {
13169  n = vend - vbeg;
13170  if (p->length) {
13171  n = (*p->length)(parser, vbeg, n);
13172  }
13173  str_copy(val, vbeg, n);
13174  (*p->func)(parser, p->name, RSTRING_PTR(val));
13175  break;
13176  }
13177  } while (++p < magic_comments + numberof(magic_comments));
13178 #ifdef RIPPER
13179  str_copy(val, vbeg, vend - vbeg);
13180  dispatch2(magic_comment, name, val);
13181 #endif
13182  }
13183 
13184  return TRUE;
13185 }
13186 
13187 static void
13188 set_file_encoding(struct parser_params *parser, const char *str, const char *send)
13189 {
13190  int sep = 0;
13191  const char *beg = str;
13192  VALUE s;
13193 
13194  for (;;) {
13195  if (send - str <= 6) return;
13196  switch (str[6]) {
13197  case 'C': case 'c': str += 6; continue;
13198  case 'O': case 'o': str += 5; continue;
13199  case 'D': case 'd': str += 4; continue;
13200  case 'I': case 'i': str += 3; continue;
13201  case 'N': case 'n': str += 2; continue;
13202  case 'G': case 'g': str += 1; continue;
13203  case '=': case ':':
13204  sep = 1;
13205  str += 6;
13206  break;
13207  default:
13208  str += 6;
13209  if (ISSPACE(*str)) break;
13210  continue;
13211  }
13212  if (STRNCASECMP(str-6, "coding", 6) == 0) break;
13213  }
13214  for (;;) {
13215  do {
13216  if (++str >= send) return;
13217  } while (ISSPACE(*str));
13218  if (sep) break;
13219  if (*str != '=' && *str != ':') return;
13220  sep = 1;
13221  str++;
13222  }
13223  beg = str;
13224  while ((*str == '-' || *str == '_' || ISALNUM(*str)) && ++str < send);
13225  s = rb_str_new(beg, parser_encode_length(parser, beg, str - beg));
13226  parser_set_encode(parser, RSTRING_PTR(s));
13227  rb_str_resize(s, 0);
13228 }
13229 
13230 static void
13231 parser_prepare(struct parser_params *parser)
13232 {
13233  int c = nextc();
13235  switch (c) {
13236  case '#':
13237  if (peek('!')) parser->has_shebang = 1;
13238  break;
13239  case 0xef: /* UTF-8 BOM marker */
13240  if (lex_pend - lex_p >= 2 &&
13241  (unsigned char)lex_p[0] == 0xbb &&
13242  (unsigned char)lex_p[1] == 0xbf) {
13243  parser->enc = rb_utf8_encoding();
13244  lex_p += 2;
13245  lex_pbeg = lex_p;
13246  return;
13247  }
13248  break;
13249  case EOF:
13250  return;
13251  }
13252  pushback(c);
13253  parser->enc = rb_enc_get(lex_lastline);
13254 }
13255 
13256 #ifndef RIPPER
13257 #define ambiguous_operator(tok, op, syn) ( \
13258  rb_warning0("`"op"' after local variable or literal is interpreted as binary operator"), \
13259  rb_warning0("even though it seems like "syn""))
13260 #else
13261 #define ambiguous_operator(tok, op, syn) \
13262  dispatch2(operator_ambiguous, TOKEN2VAL(tok), rb_str_new_cstr(syn))
13263 #endif
13264 #define warn_balanced(tok, op, syn) ((void) \
13265  (!IS_lex_state_for(last_state, EXPR_CLASS|EXPR_DOT|EXPR_FNAME|EXPR_ENDFN) && \
13266  space_seen && !ISSPACE(c) && \
13267  (ambiguous_operator(tok, op, syn), 0)), \
13268  (enum yytokentype)(tok))
13269 
13270 static VALUE
13271 parse_rational(struct parser_params *parser, char *str, int len, int seen_point)
13272 {
13273  VALUE v;
13274  char *point = &str[seen_point];
13275  size_t fraclen = len-seen_point-1;
13276  memmove(point, point+1, fraclen+1);
13277  v = rb_cstr_to_inum(str, 10, FALSE);
13278  return rb_rational_new(v, rb_int_positive_pow(10, fraclen));
13279 }
13280 
13281 static int
13282 parse_numeric(struct parser_params *parser, int c)
13283 {
13284  int is_float, seen_point, seen_e, nondigit;
13285  int suffix;
13286 
13287  is_float = seen_point = seen_e = nondigit = 0;
13288  SET_LEX_STATE(EXPR_END);
13289  newtok();
13290  if (c == '-' || c == '+') {
13291  tokadd(c);
13292  c = nextc();
13293  }
13294  if (c == '0') {
13295 #define no_digits() do {yyerror0("numeric literal without digits"); return 0;} while (0)
13296  int start = toklen();
13297  c = nextc();
13298  if (c == 'x' || c == 'X') {
13299  /* hexadecimal */
13300  c = nextc();
13301  if (c != -1 && ISXDIGIT(c)) {
13302  do {
13303  if (c == '_') {
13304  if (nondigit) break;
13305  nondigit = c;
13306  continue;
13307  }
13308  if (!ISXDIGIT(c)) break;
13309  nondigit = 0;
13310  tokadd(c);
13311  } while ((c = nextc()) != -1);
13312  }
13313  pushback(c);
13314  tokfix();
13315  if (toklen() == start) {
13316  no_digits();
13317  }
13318  else if (nondigit) goto trailing_uc;
13320  return set_integer_literal(rb_cstr_to_inum(tok(), 16, FALSE), suffix);
13321  }
13322  if (c == 'b' || c == 'B') {
13323  /* binary */
13324  c = nextc();
13325  if (c == '0' || c == '1') {
13326  do {
13327  if (c == '_') {
13328  if (nondigit) break;
13329  nondigit = c;
13330  continue;
13331  }
13332  if (c != '0' && c != '1') break;
13333  nondigit = 0;
13334  tokadd(c);
13335  } while ((c = nextc()) != -1);
13336  }
13337  pushback(c);
13338  tokfix();
13339  if (toklen() == start) {
13340  no_digits();
13341  }
13342  else if (nondigit) goto trailing_uc;
13344  return set_integer_literal(rb_cstr_to_inum(tok(), 2, FALSE), suffix);
13345  }
13346  if (c == 'd' || c == 'D') {
13347  /* decimal */
13348  c = nextc();
13349  if (c != -1 && ISDIGIT(c)) {
13350  do {
13351  if (c == '_') {
13352  if (nondigit) break;
13353  nondigit = c;
13354  continue;
13355  }
13356  if (!ISDIGIT(c)) break;
13357  nondigit = 0;
13358  tokadd(c);
13359  } while ((c = nextc()) != -1);
13360  }
13361  pushback(c);
13362  tokfix();
13363  if (toklen() == start) {
13364  no_digits();
13365  }
13366  else if (nondigit) goto trailing_uc;
13368  return set_integer_literal(rb_cstr_to_inum(tok(), 10, FALSE), suffix);
13369  }
13370  if (c == '_') {
13371  /* 0_0 */
13372  goto octal_number;
13373  }
13374  if (c == 'o' || c == 'O') {
13375  /* prefixed octal */
13376  c = nextc();
13377  if (c == -1 || c == '_' || !ISDIGIT(c)) {
13378  no_digits();
13379  }
13380  }
13381  if (c >= '0' && c <= '7') {
13382  /* octal */
13383  octal_number:
13384  do {
13385  if (c == '_') {
13386  if (nondigit) break;
13387  nondigit = c;
13388  continue;
13389  }
13390  if (c < '0' || c > '9') break;
13391  if (c > '7') goto invalid_octal;
13392  nondigit = 0;
13393  tokadd(c);
13394  } while ((c = nextc()) != -1);
13395  if (toklen() > start) {
13396  pushback(c);
13397  tokfix();
13398  if (nondigit) goto trailing_uc;
13400  return set_integer_literal(rb_cstr_to_inum(tok(), 8, FALSE), suffix);
13401  }
13402  if (nondigit) {
13403  pushback(c);
13404  goto trailing_uc;
13405  }
13406  }
13407  if (c > '7' && c <= '9') {
13408  invalid_octal:
13409  yyerror0("Invalid octal digit");
13410  }
13411  else if (c == '.' || c == 'e' || c == 'E') {
13412  tokadd('0');
13413  }
13414  else {
13415  pushback(c);
13417  return set_integer_literal(INT2FIX(0), suffix);
13418  }
13419  }
13420 
13421  for (;;) {
13422  switch (c) {
13423  case '0': case '1': case '2': case '3': case '4':
13424  case '5': case '6': case '7': case '8': case '9':
13425  nondigit = 0;
13426  tokadd(c);
13427  break;
13428 
13429  case '.':
13430  if (nondigit) goto trailing_uc;
13431  if (seen_point || seen_e) {
13432  goto decode_num;
13433  }
13434  else {
13435  int c0 = nextc();
13436  if (c0 == -1 || !ISDIGIT(c0)) {
13437  pushback(c0);
13438  goto decode_num;
13439  }
13440  c = c0;
13441  }
13442  seen_point = toklen();
13443  tokadd('.');
13444  tokadd(c);
13445  is_float++;
13446  nondigit = 0;
13447  break;
13448 
13449  case 'e':
13450  case 'E':
13451  if (nondigit) {
13452  pushback(c);
13453  c = nondigit;
13454  goto decode_num;
13455  }
13456  if (seen_e) {
13457  goto decode_num;
13458  }
13459  nondigit = c;
13460  c = nextc();
13461  if (c != '-' && c != '+' && !ISDIGIT(c)) {
13462  pushback(c);
13463  nondigit = 0;
13464  goto decode_num;
13465  }
13466  tokadd(nondigit);
13467  seen_e++;
13468  is_float++;
13469  tokadd(c);
13470  nondigit = (c == '-' || c == '+') ? c : 0;
13471  break;
13472 
13473  case '_': /* `_' in number just ignored */
13474  if (nondigit) goto decode_num;
13475  nondigit = c;
13476  break;
13477 
13478  default:
13479  goto decode_num;
13480  }
13481  c = nextc();
13482  }
13483 
13484  decode_num:
13485  pushback(c);
13486  if (nondigit) {
13487  char tmp[30];
13488  trailing_uc:
13489  literal_flush(lex_p - 1);
13490  snprintf(tmp, sizeof(tmp), "trailing `%c' in number", nondigit);
13491  yyerror0(tmp);
13492  }
13493  tokfix();
13494  if (is_float) {
13495  int type = tFLOAT;
13496  VALUE v;
13497 
13498  suffix = number_literal_suffix(seen_e ? NUM_SUFFIX_I : NUM_SUFFIX_ALL);
13499  if (suffix & NUM_SUFFIX_R) {
13500  type = tRATIONAL;
13501  v = parse_rational(parser, tok(), toklen(), seen_point);
13502  }
13503  else {
13504  double d = strtod(tok(), 0);
13505  if (errno == ERANGE) {
13506  rb_warning1("Float %s out of range", WARN_S(tok()));
13507  errno = 0;
13508  }
13509  v = DBL2NUM(d);
13510  }
13511  return set_number_literal(v, type, suffix);
13512  }
13514  return set_integer_literal(rb_cstr_to_inum(tok(), 10, FALSE), suffix);
13515 }
13516 
13517 static enum yytokentype
13518 parse_qmark(struct parser_params *parser, int space_seen)
13519 {
13520  rb_encoding *enc;
13521  register int c;
13522 
13523  if (IS_END()) {
13525  return '?';
13526  }
13527  c = nextc();
13528  if (c == -1) {
13529  compile_error(PARSER_ARG "incomplete character syntax");
13530  return 0;
13531  }
13532  if (rb_enc_isspace(c, current_enc)) {
13533  if (!IS_ARG()) {
13534  int c2 = 0;
13535  switch (c) {
13536  case ' ':
13537  c2 = 's';
13538  break;
13539  case '\n':
13540  c2 = 'n';
13541  break;
13542  case '\t':
13543  c2 = 't';
13544  break;
13545  case '\v':
13546  c2 = 'v';
13547  break;
13548  case '\r':
13549  c2 = 'r';
13550  break;
13551  case '\f':
13552  c2 = 'f';
13553  break;
13554  }
13555  if (c2) {
13556  rb_warn1("invalid character syntax; use ?\\%c", WARN_I(c2));
13557  }
13558  }
13559  ternary:
13560  pushback(c);
13562  return '?';
13563  }
13564  newtok();
13565  enc = current_enc;
13566  if (!parser_isascii()) {
13567  if (tokadd_mbchar(c) == -1) return 0;
13568  }
13569  else if ((rb_enc_isalnum(c, current_enc) || c == '_') &&
13571  if (space_seen) {
13572  const char *start = lex_p - 1, *p = start;
13573  do {
13574  int n = parser_precise_mbclen(parser, p);
13575  if (n < 0) return -1;
13576  p += n;
13577  } while (p < lex_pend && is_identchar(p, lex_pend, current_enc));
13578  rb_warn2("`?' just followed by `%.*s' is interpreted as" \
13579  " a conditional operator, put a space after `?'",
13580  WARN_I((int)(p - start)), WARN_S_L(start, (p - start)));
13581  }
13582  goto ternary;
13583  }
13584  else if (c == '\\') {
13585  if (peek('u')) {
13586  nextc();
13587  enc = rb_utf8_encoding();
13588  if (!parser_tokadd_utf8(parser, &enc, -1, 0, 0))
13589  return 0;
13590  }
13591  else if (!lex_eol_p() && !(c = *lex_p, ISASCII(c))) {
13592  nextc();
13593  if (tokadd_mbchar(c) == -1) return 0;
13594  }
13595  else {
13596  c = read_escape(0, &enc);
13597  tokadd(c);
13598  }
13599  }
13600  else {
13601  tokadd(c);
13602  }
13603  tokfix();
13604  set_yylval_str(STR_NEW3(tok(), toklen(), enc, 0));
13605  SET_LEX_STATE(EXPR_END);
13606  return tCHAR;
13607 }
13608 
13609 static enum yytokentype
13610 parse_percent(struct parser_params *parser, const int space_seen, const enum lex_state_e last_state)
13611 {
13612  register int c;
13613 
13614  if (IS_BEG()) {
13615  int term;
13616  int paren;
13617 
13618  c = nextc();
13619  quotation:
13620  if (c == -1 || !ISALNUM(c)) {
13621  term = c;
13622  c = 'Q';
13623  }
13624  else {
13625  term = nextc();
13626  if (rb_enc_isalnum(term, current_enc) || !parser_isascii()) {
13627  yyerror0("unknown type of %string");
13628  return 0;
13629  }
13630  }
13631  if (c == -1 || term == -1) {
13632  compile_error(PARSER_ARG "unterminated quoted string meets end of file");
13633  return 0;
13634  }
13635  paren = term;
13636  if (term == '(') term = ')';
13637  else if (term == '[') term = ']';
13638  else if (term == '{') term = '}';
13639  else if (term == '<') term = '>';
13640  else paren = 0;
13641 
13642  switch (c) {
13643  case 'Q':
13644  lex_strterm = NEW_STRTERM(str_dquote, term, paren);
13645  return tSTRING_BEG;
13646 
13647  case 'q':
13648  lex_strterm = NEW_STRTERM(str_squote, term, paren);
13649  return tSTRING_BEG;
13650 
13651  case 'W':
13652  lex_strterm = NEW_STRTERM(str_dword, term, paren);
13653  do {c = nextc();} while (ISSPACE(c));
13654  pushback(c);
13655  return tWORDS_BEG;
13656 
13657  case 'w':
13658  lex_strterm = NEW_STRTERM(str_sword, term, paren);
13659  do {c = nextc();} while (ISSPACE(c));
13660  pushback(c);
13661  return tQWORDS_BEG;
13662 
13663  case 'I':
13664  lex_strterm = NEW_STRTERM(str_dword, term, paren);
13665  do {c = nextc();} while (ISSPACE(c));
13666  pushback(c);
13667  return tSYMBOLS_BEG;
13668 
13669  case 'i':
13670  lex_strterm = NEW_STRTERM(str_sword, term, paren);
13671  do {c = nextc();} while (ISSPACE(c));
13672  pushback(c);
13673  return tQSYMBOLS_BEG;
13674 
13675  case 'x':
13676  lex_strterm = NEW_STRTERM(str_xquote, term, paren);
13677  return tXSTRING_BEG;
13678 
13679  case 'r':
13680  lex_strterm = NEW_STRTERM(str_regexp, term, paren);
13681  return tREGEXP_BEG;
13682 
13683  case 's':
13684  lex_strterm = NEW_STRTERM(str_ssym, term, paren);
13685  SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);
13686  return tSYMBEG;
13687 
13688  default:
13689  yyerror0("unknown type of %string");
13690  return 0;
13691  }
13692  }
13693  if ((c = nextc()) == '=') {
13694  set_yylval_id('%');
13695  SET_LEX_STATE(EXPR_BEG);
13696  return tOP_ASGN;
13697  }
13698  if (IS_SPCARG(c) || (IS_lex_state(EXPR_FITEM) && c == 's')) {
13699  goto quotation;
13700  }
13701  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
13702  pushback(c);
13703  return warn_balanced('%', "%%", "string literal");
13704 }
13705 
13706 static int
13707 tokadd_ident(struct parser_params *parser, int c)
13708 {
13709  do {
13710  if (tokadd_mbchar(c) == -1) return -1;
13711  c = nextc();
13712  } while (parser_is_identchar());
13713  pushback(c);
13714  return 0;
13715 }
13716 
13717 static ID
13718 tokenize_ident(struct parser_params *parser, const enum lex_state_e last_state)
13719 {
13720  ID ident = TOK_INTERN();
13721 
13722  set_yylval_name(ident);
13723 
13724  return ident;
13725 }
13726 
13727 static int
13728 parse_numvar(struct parser_params *parser)
13729 {
13730  size_t len;
13731  int overflow;
13732  unsigned long n = ruby_scan_digits(tok()+1, toklen()-1, 10, &len, &overflow);
13733  const unsigned long nth_ref_max =
13734  ((FIXNUM_MAX < INT_MAX) ? FIXNUM_MAX : INT_MAX) >> 1;
13735  /* NTH_REF is left-shifted to be ORed with back-ref flag and
13736  * turned into a Fixnum, in compile.c */
13737 
13738  if (overflow || n > nth_ref_max) {
13739  /* compile_error()? */
13740  rb_warn1("`%s' is too big for a number variable, always nil", WARN_S(tok()));
13741  return 0; /* $0 is $PROGRAM_NAME, not NTH_REF */
13742  }
13743  else {
13744  return (int)n;
13745  }
13746 }
13747 
13748 static enum yytokentype
13749 parse_gvar(struct parser_params *parser, const enum lex_state_e last_state)
13750 {
13751  register int c;
13752 
13753  SET_LEX_STATE(EXPR_END);
13754  newtok();
13755  c = nextc();
13756  switch (c) {
13757  case '_': /* $_: last read line string */
13758  c = nextc();
13759  if (parser_is_identchar()) {
13760  tokadd('$');
13761  tokadd('_');
13762  break;
13763  }
13764  pushback(c);
13765  c = '_';
13766  /* fall through */
13767  case '~': /* $~: match-data */
13768  case '*': /* $*: argv */
13769  case '$': /* $$: pid */
13770  case '?': /* $?: last status */
13771  case '!': /* $!: error string */
13772  case '@': /* $@: error position */
13773  case '/': /* $/: input record separator */
13774  case '\\': /* $\: output record separator */
13775  case ';': /* $;: field separator */
13776  case ',': /* $,: output field separator */
13777  case '.': /* $.: last read line number */
13778  case '=': /* $=: ignorecase */
13779  case ':': /* $:: load path */
13780  case '<': /* $<: reading filename */
13781  case '>': /* $>: default output handle */
13782  case '\"': /* $": already loaded files */
13783  tokadd('$');
13784  tokadd(c);
13785  goto gvar;
13786 
13787  case '-':
13788  tokadd('$');
13789  tokadd(c);
13790  c = nextc();
13791  if (parser_is_identchar()) {
13792  if (tokadd_mbchar(c) == -1) return 0;
13793  }
13794  else {
13795  pushback(c);
13796  pushback('-');
13797  return '$';
13798  }
13799  gvar:
13801  return tGVAR;
13802 
13803  case '&': /* $&: last match */
13804  case '`': /* $`: string before last match */
13805  case '\'': /* $': string after last match */
13806  case '+': /* $+: string matches last paren. */
13807  if (IS_lex_state_for(last_state, EXPR_FNAME)) {
13808  tokadd('$');
13809  tokadd(c);
13810  goto gvar;
13811  }
13813  return tBACK_REF;
13814 
13815  case '1': case '2': case '3':
13816  case '4': case '5': case '6':
13817  case '7': case '8': case '9':
13818  tokadd('$');
13819  do {
13820  tokadd(c);
13821  c = nextc();
13822  } while (c != -1 && ISDIGIT(c));
13823  pushback(c);
13824  if (IS_lex_state_for(last_state, EXPR_FNAME)) goto gvar;
13825  tokfix();
13826  set_yylval_node(NEW_NTH_REF(parse_numvar(parser)));
13827  return tNTH_REF;
13828 
13829  default:
13830  if (!parser_is_identchar()) {
13831  if (c == -1 || ISSPACE(c)) {
13832  compile_error(PARSER_ARG "`$' without identifiers is not allowed as a global variable name");
13833  }
13834  else {
13835  pushback(c);
13836  compile_error(PARSER_ARG "`$%c' is not allowed as a global variable name", c);
13837  }
13838  return 0;
13839  }
13840  case '0':
13841  tokadd('$');
13842  }
13843 
13844  if (tokadd_ident(parser, c)) return 0;
13845  SET_LEX_STATE(EXPR_END);
13846  tokenize_ident(parser, last_state);
13847  return tGVAR;
13848 }
13849 
13850 static enum yytokentype
13851 parse_atmark(struct parser_params *parser, const enum lex_state_e last_state)
13852 {
13853  enum yytokentype result = tIVAR;
13854  register int c = nextc();
13855 
13856  newtok();
13857  tokadd('@');
13858  if (c == '@') {
13859  result = tCVAR;
13860  tokadd('@');
13861  c = nextc();
13862  }
13863  if (c == -1 || ISSPACE(c)) {
13864  if (result == tIVAR) {
13865  compile_error(PARSER_ARG "`@' without identifiers is not allowed as an instance variable name");
13866  }
13867  else {
13868  compile_error(PARSER_ARG "`@@' without identifiers is not allowed as a class variable name");
13869  }
13870  return 0;
13871  }
13872  else if (ISDIGIT(c) || !parser_is_identchar()) {
13873  pushback(c);
13874  if (result == tIVAR) {
13875  compile_error(PARSER_ARG "`@%c' is not allowed as an instance variable name", c);
13876  }
13877  else {
13878  compile_error(PARSER_ARG "`@@%c' is not allowed as a class variable name", c);
13879  }
13880  return 0;
13881  }
13882 
13883  if (tokadd_ident(parser, c)) return 0;
13884  SET_LEX_STATE(EXPR_END);
13885  tokenize_ident(parser, last_state);
13886  return result;
13887 }
13888 
13889 static enum yytokentype
13890 parse_ident(struct parser_params *parser, int c, int cmd_state)
13891 {
13892  enum yytokentype result;
13893  int mb = ENC_CODERANGE_7BIT;
13894  const enum lex_state_e last_state = lex_state;
13895  ID ident;
13896 
13897  do {
13898  if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN;
13899  if (tokadd_mbchar(c) == -1) return 0;
13900  c = nextc();
13901  } while (parser_is_identchar());
13902  if ((c == '!' || c == '?') && !peek('=')) {
13903  result = tFID;
13904  tokadd(c);
13905  }
13906  else if (c == '=' && IS_lex_state(EXPR_FNAME) &&
13907  (!peek('~') && !peek('>') && (!peek('=') || (peek_n('>', 1))))) {
13908  result = tIDENTIFIER;
13909  tokadd(c);
13910  }
13911  else {
13912  result = tCONSTANT; /* assume provisionally */
13913  pushback(c);
13914  }
13915  tokfix();
13916 
13917  if (IS_LABEL_POSSIBLE()) {
13918  if (IS_LABEL_SUFFIX(0)) {
13919  SET_LEX_STATE(EXPR_ARG|EXPR_LABELED);
13920  nextc();
13922  return tLABEL;
13923  }
13924  }
13925  if (mb == ENC_CODERANGE_7BIT && !IS_lex_state(EXPR_DOT)) {
13926  const struct kwtable *kw;
13927 
13928  /* See if it is a reserved word. */
13929  kw = rb_reserved_word(tok(), toklen());
13930  if (kw) {
13931  enum lex_state_e state = lex_state;
13932  SET_LEX_STATE(kw->state);
13933  if (IS_lex_state_for(state, EXPR_FNAME)) {
13935  return kw->id[0];
13936  }
13937  if (IS_lex_state(EXPR_BEG)) {
13938  command_start = TRUE;
13939  }
13940  if (kw->id[0] == keyword_do) {
13941  if (lambda_beginning_p()) {
13942  lpar_beg = 0;
13943  --paren_nest;
13944  return keyword_do_LAMBDA;
13945  }
13946  if (COND_P()) return keyword_do_cond;
13947  if (CMDARG_P() && !IS_lex_state_for(state, EXPR_CMDARG))
13948  return keyword_do_block;
13949  if (IS_lex_state_for(state, (EXPR_BEG | EXPR_ENDARG)))
13950  return keyword_do_block;
13951  return keyword_do;
13952  }
13953  if (IS_lex_state_for(state, (EXPR_BEG | EXPR_LABELED)))
13954  return kw->id[0];
13955  else {
13956  if (kw->id[0] != kw->id[1])
13957  SET_LEX_STATE(EXPR_BEG | EXPR_LABEL);
13958  return kw->id[1];
13959  }
13960  }
13961  }
13962 
13963  if (IS_lex_state(EXPR_BEG_ANY | EXPR_ARG_ANY | EXPR_DOT)) {
13964  if (cmd_state) {
13965  SET_LEX_STATE(EXPR_CMDARG);
13966  }
13967  else {
13968  SET_LEX_STATE(EXPR_ARG);
13969  }
13970  }
13971  else if (lex_state == EXPR_FNAME) {
13972  SET_LEX_STATE(EXPR_ENDFN);
13973  }
13974  else {
13975  SET_LEX_STATE(EXPR_END);
13976  }
13977 
13978  ident = tokenize_ident(parser, last_state);
13979  if (result == tCONSTANT && is_local_id(ident)) result = tIDENTIFIER;
13980  if (!IS_lex_state_for(last_state, EXPR_DOT|EXPR_FNAME) &&
13981  (result == tIDENTIFIER) && /* not EXPR_FNAME, not attrasgn */
13982  lvar_defined(ident)) {
13983  SET_LEX_STATE(EXPR_END|EXPR_LABEL);
13984  }
13985  return result;
13986 }
13987 
13988 static enum yytokentype
13989 parser_yylex(struct parser_params *parser)
13990 {
13991  register int c;
13992  int space_seen = 0;
13993  int cmd_state;
13994  int label;
13995  enum lex_state_e last_state;
13996  int fallthru = FALSE;
13997  int token_seen = parser->token_seen;
13998 
13999  if (lex_strterm) {
14000  if (nd_type(lex_strterm) == NODE_HEREDOC) {
14001  return here_document(lex_strterm);
14002  }
14003  else {
14004  return parse_string(lex_strterm);
14005  }
14006  }
14007  cmd_state = command_start;
14008  command_start = FALSE;
14009  parser->token_seen = TRUE;
14010  retry:
14011  last_state = lex_state;
14012 #ifndef RIPPER
14013  token_flush(parser);
14014 #endif
14015  switch (c = nextc()) {
14016  case '\0': /* NUL */
14017  case '\004': /* ^D */
14018  case '\032': /* ^Z */
14019  case -1: /* end of script. */
14020  return 0;
14021 
14022  /* white spaces */
14023  case ' ': case '\t': case '\f': case '\r':
14024  case '\13': /* '\v' */
14025  space_seen = 1;
14026 #ifdef RIPPER
14027  while ((c = nextc())) {
14028  switch (c) {
14029  case ' ': case '\t': case '\f': case '\r':
14030  case '\13': /* '\v' */
14031  break;
14032  default:
14033  goto outofloop;
14034  }
14035  }
14036  outofloop:
14037  pushback(c);
14039 #endif
14040  goto retry;
14041 
14042  case '#': /* it's a comment */
14043  parser->token_seen = token_seen;
14044  /* no magic_comment in shebang line */
14045  if (!parser_magic_comment(parser, lex_p, lex_pend - lex_p)) {
14046  if (comment_at_top(parser)) {
14047  set_file_encoding(parser, lex_p, lex_pend);
14048  }
14049  }
14050  lex_p = lex_pend;
14052  fallthru = TRUE;
14053  /* fall through */
14054  case '\n':
14055  parser->token_seen = token_seen;
14056  c = (IS_lex_state(EXPR_BEG|EXPR_CLASS|EXPR_FNAME|EXPR_DOT) &&
14057  !IS_lex_state(EXPR_LABELED));
14058  if (c || IS_lex_state_all(EXPR_ARG|EXPR_LABELED)) {
14059  if (!fallthru) {
14061  }
14062  fallthru = FALSE;
14063  if (!c && parser->in_kwarg) {
14064  goto normal_newline;
14065  }
14066  goto retry;
14067  }
14068  while ((c = nextc())) {
14069  switch (c) {
14070  case ' ': case '\t': case '\f': case '\r':
14071  case '\13': /* '\v' */
14072  space_seen = 1;
14073  break;
14074  case '&':
14075  case '.': {
14077  if (peek('.') == (c == '&')) {
14078  pushback(c);
14080  goto retry;
14081  }
14082  }
14083  default:
14084  --ruby_sourceline;
14086  case -1: /* EOF no decrement*/
14087  lex_goto_eol(parser);
14088 #ifdef RIPPER
14089  if (c != -1) {
14090  parser->tokp = lex_p;
14091  }
14092 #endif
14093  goto normal_newline;
14094  }
14095  }
14096  normal_newline:
14097  command_start = TRUE;
14098  SET_LEX_STATE(EXPR_BEG);
14099  return '\n';
14100 
14101  case '*':
14102  if ((c = nextc()) == '*') {
14103  if ((c = nextc()) == '=') {
14105  SET_LEX_STATE(EXPR_BEG);
14106  return tOP_ASGN;
14107  }
14108  pushback(c);
14109  if (IS_SPCARG(c)) {
14110  rb_warning0("`**' interpreted as argument prefix");
14111  c = tDSTAR;
14112  }
14113  else if (IS_BEG()) {
14114  c = tDSTAR;
14115  }
14116  else {
14117  c = warn_balanced((enum ruby_method_ids)tPOW, "**", "argument prefix");
14118  }
14119  }
14120  else {
14121  if (c == '=') {
14122  set_yylval_id('*');
14123  SET_LEX_STATE(EXPR_BEG);
14124  return tOP_ASGN;
14125  }
14126  pushback(c);
14127  if (IS_SPCARG(c)) {
14128  rb_warning0("`*' interpreted as argument prefix");
14129  c = tSTAR;
14130  }
14131  else if (IS_BEG()) {
14132  c = tSTAR;
14133  }
14134  else {
14135  c = warn_balanced('*', "*", "argument prefix");
14136  }
14137  }
14138  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
14139  return c;
14140 
14141  case '!':
14142  c = nextc();
14143  if (IS_AFTER_OPERATOR()) {
14144  SET_LEX_STATE(EXPR_ARG);
14145  if (c == '@') {
14146  return '!';
14147  }
14148  }
14149  else {
14150  SET_LEX_STATE(EXPR_BEG);
14151  }
14152  if (c == '=') {
14153  return tNEQ;
14154  }
14155  if (c == '~') {
14156  return tNMATCH;
14157  }
14158  pushback(c);
14159  return '!';
14160 
14161  case '=':
14162  if (was_bol()) {
14163  /* skip embedded rd document */
14164  if (strncmp(lex_p, "begin", 5) == 0 && ISSPACE(lex_p[5])) {
14165  int first_p = TRUE;
14166 
14167  lex_goto_eol(parser);
14169  for (;;) {
14170  lex_goto_eol(parser);
14171  if (!first_p) {
14173  }
14174  first_p = FALSE;
14175  c = nextc();
14176  if (c == -1) {
14177  compile_error(PARSER_ARG "embedded document meets end of file");
14178  return 0;
14179  }
14180  if (c != '=') continue;
14181  if (c == '=' && strncmp(lex_p, "end", 3) == 0 &&
14182  (lex_p + 3 == lex_pend || ISSPACE(lex_p[3]))) {
14183  break;
14184  }
14185  }
14186  lex_goto_eol(parser);
14188  goto retry;
14189  }
14190  }
14191 
14192  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
14193  if ((c = nextc()) == '=') {
14194  if ((c = nextc()) == '=') {
14195  return tEQQ;
14196  }
14197  pushback(c);
14198  return tEQ;
14199  }
14200  if (c == '~') {
14201  return tMATCH;
14202  }
14203  else if (c == '>') {
14204  return tASSOC;
14205  }
14206  pushback(c);
14207  return '=';
14208 
14209  case '<':
14210  last_state = lex_state;
14211  c = nextc();
14212  if (c == '<' &&
14213  !IS_lex_state(EXPR_DOT | EXPR_CLASS) &&
14214  !IS_END() &&
14215  (!IS_ARG() || IS_lex_state(EXPR_LABELED) || space_seen)) {
14216  int token = heredoc_identifier();
14217  if (token) return token;
14218  }
14219  if (IS_AFTER_OPERATOR()) {
14220  SET_LEX_STATE(EXPR_ARG);
14221  }
14222  else {
14223  if (IS_lex_state(EXPR_CLASS))
14224  command_start = TRUE;
14225  SET_LEX_STATE(EXPR_BEG);
14226  }
14227  if (c == '=') {
14228  if ((c = nextc()) == '>') {
14229  return tCMP;
14230  }
14231  pushback(c);
14232  return tLEQ;
14233  }
14234  if (c == '<') {
14235  if ((c = nextc()) == '=') {
14237  SET_LEX_STATE(EXPR_BEG);
14238  return tOP_ASGN;
14239  }
14240  pushback(c);
14241  return warn_balanced((enum ruby_method_ids)tLSHFT, "<<", "here document");
14242  }
14243  pushback(c);
14244  return '<';
14245 
14246  case '>':
14247  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
14248  if ((c = nextc()) == '=') {
14249  return tGEQ;
14250  }
14251  if (c == '>') {
14252  if ((c = nextc()) == '=') {
14254  SET_LEX_STATE(EXPR_BEG);
14255  return tOP_ASGN;
14256  }
14257  pushback(c);
14258  return tRSHFT;
14259  }
14260  pushback(c);
14261  return '>';
14262 
14263  case '"':
14264  label = (IS_LABEL_POSSIBLE() ? str_label : 0);
14265  lex_strterm = NEW_STRTERM(str_dquote | label, '"', 0);
14266  return tSTRING_BEG;
14267 
14268  case '`':
14269  if (IS_lex_state(EXPR_FNAME)) {
14270  SET_LEX_STATE(EXPR_ENDFN);
14271  return c;
14272  }
14273  if (IS_lex_state(EXPR_DOT)) {
14274  if (cmd_state)
14275  SET_LEX_STATE(EXPR_CMDARG);
14276  else
14277  SET_LEX_STATE(EXPR_ARG);
14278  return c;
14279  }
14280  lex_strterm = NEW_STRTERM(str_xquote, '`', 0);
14281  return tXSTRING_BEG;
14282 
14283  case '\'':
14284  label = (IS_LABEL_POSSIBLE() ? str_label : 0);
14285  lex_strterm = NEW_STRTERM(str_squote | label, '\'', 0);
14286  return tSTRING_BEG;
14287 
14288  case '?':
14289  return parse_qmark(parser, space_seen);
14290 
14291  case '&':
14292  if ((c = nextc()) == '&') {
14293  SET_LEX_STATE(EXPR_BEG);
14294  if ((c = nextc()) == '=') {
14296  SET_LEX_STATE(EXPR_BEG);
14297  return tOP_ASGN;
14298  }
14299  pushback(c);
14300  return tANDOP;
14301  }
14302  else if (c == '=') {
14303  set_yylval_id('&');
14304  SET_LEX_STATE(EXPR_BEG);
14305  return tOP_ASGN;
14306  }
14307  else if (c == '.') {
14308  SET_LEX_STATE(EXPR_DOT);
14309  return tANDDOT;
14310  }
14311  pushback(c);
14312  if (IS_SPCARG(c)) {
14313  if ((c != ':') ||
14314  (c = peekc_n(1)) == -1 ||
14315  !(c == '\'' || c == '"' ||
14317  rb_warning0("`&' interpreted as argument prefix");
14318  }
14319  c = tAMPER;
14320  }
14321  else if (IS_BEG()) {
14322  c = tAMPER;
14323  }
14324  else {
14325  c = warn_balanced('&', "&", "argument prefix");
14326  }
14327  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
14328  return c;
14329 
14330  case '|':
14331  if ((c = nextc()) == '|') {
14332  SET_LEX_STATE(EXPR_BEG);
14333  if ((c = nextc()) == '=') {
14335  SET_LEX_STATE(EXPR_BEG);
14336  return tOP_ASGN;
14337  }
14338  pushback(c);
14339  return tOROP;
14340  }
14341  if (c == '=') {
14342  set_yylval_id('|');
14343  SET_LEX_STATE(EXPR_BEG);
14344  return tOP_ASGN;
14345  }
14346  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG|EXPR_LABEL);
14347  pushback(c);
14348  return '|';
14349 
14350  case '+':
14351  c = nextc();
14352  if (IS_AFTER_OPERATOR()) {
14353  SET_LEX_STATE(EXPR_ARG);
14354  if (c == '@') {
14355  return tUPLUS;
14356  }
14357  pushback(c);
14358  return '+';
14359  }
14360  if (c == '=') {
14361  set_yylval_id('+');
14362  SET_LEX_STATE(EXPR_BEG);
14363  return tOP_ASGN;
14364  }
14365  if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous('+'))) {
14366  SET_LEX_STATE(EXPR_BEG);
14367  pushback(c);
14368  if (c != -1 && ISDIGIT(c)) {
14369  return parse_numeric(parser, '+');
14370  }
14371  return tUPLUS;
14372  }
14373  SET_LEX_STATE(EXPR_BEG);
14374  pushback(c);
14375  return warn_balanced('+', "+", "unary operator");
14376 
14377  case '-':
14378  c = nextc();
14379  if (IS_AFTER_OPERATOR()) {
14380  SET_LEX_STATE(EXPR_ARG);
14381  if (c == '@') {
14382  return tUMINUS;
14383  }
14384  pushback(c);
14385  return '-';
14386  }
14387  if (c == '=') {
14388  set_yylval_id('-');
14389  SET_LEX_STATE(EXPR_BEG);
14390  return tOP_ASGN;
14391  }
14392  if (c == '>') {
14393  SET_LEX_STATE(EXPR_ENDFN);
14394  token_info_push("->");
14395  return tLAMBDA;
14396  }
14397  if (IS_BEG() || (IS_SPCARG(c) && arg_ambiguous('-'))) {
14398  SET_LEX_STATE(EXPR_BEG);
14399  pushback(c);
14400  if (c != -1 && ISDIGIT(c)) {
14401  return tUMINUS_NUM;
14402  }
14403  return tUMINUS;
14404  }
14405  SET_LEX_STATE(EXPR_BEG);
14406  pushback(c);
14407  return warn_balanced('-', "-", "unary operator");
14408 
14409  case '.':
14410  SET_LEX_STATE(EXPR_BEG);
14411  if ((c = nextc()) == '.') {
14412  if ((c = nextc()) == '.') {
14413  return tDOT3;
14414  }
14415  pushback(c);
14416  return tDOT2;
14417  }
14418  pushback(c);
14419  if (c != -1 && ISDIGIT(c)) {
14420  yyerror0("no .<digit> floating literal anymore; put 0 before dot");
14421  }
14422  SET_LEX_STATE(EXPR_DOT);
14423  return '.';
14424 
14425  case '0': case '1': case '2': case '3': case '4':
14426  case '5': case '6': case '7': case '8': case '9':
14427  return parse_numeric(parser, c);
14428 
14429  case ')':
14430  case ']':
14431  paren_nest--;
14432  case '}':
14433  COND_LEXPOP();
14434  CMDARG_LEXPOP();
14435  if (c == ')')
14436  SET_LEX_STATE(EXPR_ENDFN);
14437  else
14438  SET_LEX_STATE(EXPR_END);
14439  if (c == '}') {
14440  if (!brace_nest--) c = tSTRING_DEND;
14441  }
14442  return c;
14443 
14444  case ':':
14445  c = nextc();
14446  if (c == ':') {
14447  if (IS_BEG() || IS_lex_state(EXPR_CLASS) || IS_SPCARG(-1)) {
14448  SET_LEX_STATE(EXPR_BEG);
14449  return tCOLON3;
14450  }
14451  SET_LEX_STATE(EXPR_DOT);
14452  return tCOLON2;
14453  }
14454  if (IS_END() || ISSPACE(c) || c == '#') {
14455  pushback(c);
14456  c = warn_balanced(':', ":", "symbol literal");
14457  SET_LEX_STATE(EXPR_BEG);
14458  return c;
14459  }
14460  switch (c) {
14461  case '\'':
14462  lex_strterm = NEW_STRTERM(str_ssym, c, 0);
14463  break;
14464  case '"':
14465  lex_strterm = NEW_STRTERM(str_dsym, c, 0);
14466  break;
14467  default:
14468  pushback(c);
14469  break;
14470  }
14471  SET_LEX_STATE(EXPR_FNAME);
14472  return tSYMBEG;
14473 
14474  case '/':
14475  if (IS_BEG()) {
14476  lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
14477  return tREGEXP_BEG;
14478  }
14479  if ((c = nextc()) == '=') {
14480  set_yylval_id('/');
14481  SET_LEX_STATE(EXPR_BEG);
14482  return tOP_ASGN;
14483  }
14484  pushback(c);
14485  if (IS_SPCARG(c)) {
14486  (void)arg_ambiguous('/');
14487  lex_strterm = NEW_STRTERM(str_regexp, '/', 0);
14488  return tREGEXP_BEG;
14489  }
14490  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
14491  return warn_balanced('/', "/", "regexp literal");
14492 
14493  case '^':
14494  if ((c = nextc()) == '=') {
14495  set_yylval_id('^');
14496  SET_LEX_STATE(EXPR_BEG);
14497  return tOP_ASGN;
14498  }
14499  SET_LEX_STATE(IS_AFTER_OPERATOR() ? EXPR_ARG : EXPR_BEG);
14500  pushback(c);
14501  return '^';
14502 
14503  case ';':
14504  SET_LEX_STATE(EXPR_BEG);
14505  command_start = TRUE;
14506  return ';';
14507 
14508  case ',':
14509  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
14510  return ',';
14511 
14512  case '~':
14513  if (IS_AFTER_OPERATOR()) {
14514  if ((c = nextc()) != '@') {
14515  pushback(c);
14516  }
14517  SET_LEX_STATE(EXPR_ARG);
14518  }
14519  else {
14520  SET_LEX_STATE(EXPR_BEG);
14521  }
14522  return '~';
14523 
14524  case '(':
14525  if (IS_BEG()) {
14526  c = tLPAREN;
14527  }
14528  else if (!space_seen) {
14529  /* foo( ... ) => method call, no ambiguity */
14530  }
14531  else if (IS_ARG() || IS_lex_state_all(EXPR_END|EXPR_LABEL)) {
14532  c = tLPAREN_ARG;
14533  }
14534  else if (IS_lex_state(EXPR_ENDFN) && !lambda_beginning_p()) {
14535  rb_warning0("parentheses after method name is interpreted as "
14536  "an argument list, not a decomposed argument");
14537  }
14538  paren_nest++;
14539  COND_PUSH(0);
14540  CMDARG_PUSH(0);
14541  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
14542  return c;
14543 
14544  case '[':
14545  paren_nest++;
14546  if (IS_AFTER_OPERATOR()) {
14547  if ((c = nextc()) == ']') {
14548  SET_LEX_STATE(EXPR_ARG);
14549  if ((c = nextc()) == '=') {
14550  return tASET;
14551  }
14552  pushback(c);
14553  return tAREF;
14554  }
14555  pushback(c);
14556  SET_LEX_STATE(EXPR_ARG|EXPR_LABEL);
14557  return '[';
14558  }
14559  else if (IS_BEG()) {
14560  c = tLBRACK;
14561  }
14562  else if (IS_ARG() && (space_seen || IS_lex_state(EXPR_LABELED))) {
14563  c = tLBRACK;
14564  }
14565  SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
14566  COND_PUSH(0);
14567  CMDARG_PUSH(0);
14568  return c;
14569 
14570  case '{':
14571  ++brace_nest;
14572  if (lambda_beginning_p()) {
14573  SET_LEX_STATE(EXPR_BEG);
14574  lpar_beg = 0;
14575  --paren_nest;
14576  COND_PUSH(0);
14577  CMDARG_PUSH(0);
14578  return tLAMBEG;
14579  }
14580  if (IS_lex_state(EXPR_LABELED))
14581  c = tLBRACE; /* hash */
14582  else if (IS_lex_state(EXPR_ARG_ANY | EXPR_END | EXPR_ENDFN))
14583  c = '{'; /* block (primary) */
14584  else if (IS_lex_state(EXPR_ENDARG))
14585  c = tLBRACE_ARG; /* block (expr) */
14586  else
14587  c = tLBRACE; /* hash */
14588  COND_PUSH(0);
14589  CMDARG_PUSH(0);
14590  SET_LEX_STATE(c == tLBRACE_ARG ? EXPR_BEG : EXPR_BEG|EXPR_LABEL);
14591  if (c != tLBRACE) command_start = TRUE;
14592  return c;
14593 
14594  case '\\':
14595  c = nextc();
14596  if (c == '\n') {
14597  space_seen = 1;
14599  goto retry; /* skip \\n */
14600  }
14601  pushback(c);
14602  return '\\';
14603 
14604  case '%':
14605  return parse_percent(parser, space_seen, last_state);
14606 
14607  case '$':
14608  return parse_gvar(parser, last_state);
14609 
14610  case '@':
14611  return parse_atmark(parser, last_state);
14612 
14613  case '_':
14614  if (was_bol() && whole_match_p("__END__", 7, 0)) {
14615  ruby__end__seen = 1;
14616  parser->eofp = 1;
14617 #ifndef RIPPER
14618  return -1;
14619 #else
14620  lex_goto_eol(parser);
14622  return 0;
14623 #endif
14624  }
14625  newtok();
14626  break;
14627 
14628  default:
14629  if (!parser_is_identchar()) {
14630  compile_error(PARSER_ARG "Invalid char `\\x%02X' in expression", c);
14631  goto retry;
14632  }
14633 
14634  newtok();
14635  break;
14636  }
14637 
14638  return parse_ident(parser, c, cmd_state);
14639 }
14640 
14641 static enum yytokentype
14642 yylex(YYSTYPE *lval, YYLTYPE *yylloc, struct parser_params *parser)
14643 {
14644  enum yytokentype t;
14645 
14646  parser->lval = lval;
14647  lval->val = Qundef;
14648  t = parser_yylex(parser);
14649  if (has_delayed_token())
14651  else if (t != 0)
14653 
14654  yylloc->first_column = (int)(parser->tokp - lex_pbeg);
14655  yylloc->last_column = (int)(lex_p - lex_pbeg);
14656 
14657  return t;
14658 }
14659 
14660 #define LVAR_USED ((ID)1 << (sizeof(ID) * CHAR_BIT - 1))
14661 
14662 #ifndef RIPPER
14663 static NODE*
14664 node_newnode(struct parser_params *parser, enum node_type type, VALUE a0, VALUE a1, VALUE a2)
14665 {
14666  NODE *n = (rb_node_newnode)(type, a0, a1, a2);
14668  /* mark not cared column to -1 */
14669  nd_set_column(n, -1);
14670  return n;
14671 }
14672 
14673 static enum node_type
14674 nodetype(NODE *node) /* for debug */
14675 {
14676  return (enum node_type)nd_type(node);
14677 }
14678 
14679 static int
14680 nodeline(NODE *node)
14681 {
14682  return nd_line(node);
14683 }
14684 
14685 static NODE*
14686 newline_node(NODE *node)
14687 {
14688  if (node) {
14689  node = remove_begin(node);
14690  node->flags |= NODE_FL_NEWLINE;
14691  }
14692  return node;
14693 }
14694 
14695 static void
14696 fixpos(NODE *node, NODE *orig)
14697 {
14698  if (!node) return;
14699  if (!orig) return;
14700  if (orig == (NODE*)1) return;
14701  nd_set_line(node, nd_line(orig));
14702 }
14703 
14704 static void
14705 parser_warning(struct parser_params *parser, NODE *node, const char *mesg)
14706 {
14707  rb_compile_warning(ruby_sourcefile, nd_line(node), "%s", mesg);
14708 }
14709 #define parser_warning(node, mesg) parser_warning(parser, (node), (mesg))
14710 
14711 static void
14712 parser_warn(struct parser_params *parser, NODE *node, const char *mesg)
14713 {
14714  rb_compile_warn(ruby_sourcefile, nd_line(node), "%s", mesg);
14715 }
14716 #define parser_warn(node, mesg) parser_warn(parser, (node), (mesg))
14717 
14718 static NODE*
14719 block_append_gen(struct parser_params *parser, NODE *head, NODE *tail, int column)
14720 {
14721  NODE *end, *h = head, *nd;
14722 
14723  if (tail == 0) return head;
14724 
14725  if (h == 0) return tail;
14726  switch (nd_type(h)) {
14727  case NODE_LIT:
14728  case NODE_STR:
14729  case NODE_SELF:
14730  case NODE_TRUE:
14731  case NODE_FALSE:
14732  case NODE_NIL:
14733  parser_warning(h, "unused literal ignored");
14734  return tail;
14735  default:
14736  h = end = NEW_BLOCK(head);
14737  nd_set_column(end, column);
14738  end->nd_end = end;
14739  fixpos(end, head);
14740  head = end;
14741  break;
14742  case NODE_BLOCK:
14743  end = h->nd_end;
14744  break;
14745  }
14746 
14747  nd = end->nd_head;
14748  switch (nd_type(nd)) {
14749  case NODE_RETURN:
14750  case NODE_BREAK:
14751  case NODE_NEXT:
14752  case NODE_REDO:
14753  case NODE_RETRY:
14754  if (RTEST(ruby_verbose)) {
14755  parser_warning(tail, "statement not reached");
14756  }
14757  break;
14758 
14759  default:
14760  break;
14761  }
14762 
14763  if (nd_type(tail) != NODE_BLOCK) {
14764  tail = NEW_BLOCK(tail);
14765  nd_set_column(tail, column);
14766  tail->nd_end = tail;
14767  }
14768  end->nd_next = tail;
14769  h->nd_end = tail->nd_end;
14770  return head;
14771 }
14772 
14773 /* append item to the list */
14774 static NODE*
14775 list_append_gen(struct parser_params *parser, NODE *list, NODE *item, int column)
14776 {
14777  NODE *last;
14778 
14779  if (list == 0) return new_list(item, column);
14780  if (list->nd_next) {
14781  last = list->nd_next->nd_end;
14782  }
14783  else {
14784  last = list;
14785  }
14786 
14787  list->nd_alen += 1;
14788  last->nd_next = new_list(item, column);
14789  list->nd_next->nd_end = last->nd_next;
14790  return list;
14791 }
14792 
14793 /* concat two lists */
14794 static NODE*
14795 list_concat(NODE *head, NODE *tail)
14796 {
14797  NODE *last;
14798 
14799  if (head->nd_next) {
14800  last = head->nd_next->nd_end;
14801  }
14802  else {
14803  last = head;
14804  }
14805 
14806  head->nd_alen += tail->nd_alen;
14807  last->nd_next = tail;
14808  if (tail->nd_next) {
14809  head->nd_next->nd_end = tail->nd_next->nd_end;
14810  }
14811  else {
14812  head->nd_next->nd_end = tail;
14813  }
14814 
14815  return head;
14816 }
14817 
14818 static int
14819 literal_concat0(struct parser_params *parser, VALUE head, VALUE tail)
14820 {
14821  if (NIL_P(tail)) return 1;
14822  if (!rb_enc_compatible(head, tail)) {
14823  compile_error(PARSER_ARG "string literal encodings differ (%s / %s)",
14824  rb_enc_name(rb_enc_get(head)),
14825  rb_enc_name(rb_enc_get(tail)));
14826  rb_str_resize(head, 0);
14827  rb_str_resize(tail, 0);
14828  return 0;
14829  }
14830  rb_str_buf_append(head, tail);
14831  return 1;
14832 }
14833 
14834 /* concat two string literals */
14835 static NODE *
14836 literal_concat_gen(struct parser_params *parser, NODE *head, NODE *tail, int column)
14837 {
14838  enum node_type htype;
14839  NODE *headlast;
14840  VALUE lit;
14841 
14842  if (!head) return tail;
14843  if (!tail) return head;
14844 
14845  htype = nd_type(head);
14846  if (htype == NODE_EVSTR) {
14847  NODE *node = new_dstr(STR_NEW0(), column);
14848  head = list_append(node, head, column);
14849  htype = NODE_DSTR;
14850  }
14851  if (heredoc_indent > 0) {
14852  switch (htype) {
14853  case NODE_STR:
14854  nd_set_type(head, NODE_DSTR);
14855  case NODE_DSTR:
14856  return list_append(head, tail, column);
14857  default:
14858  break;
14859  }
14860  }
14861  switch (nd_type(tail)) {
14862  case NODE_STR:
14863  if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) &&
14864  nd_type(headlast) == NODE_STR) {
14865  htype = NODE_STR;
14866  lit = headlast->nd_lit;
14867  }
14868  else {
14869  lit = head->nd_lit;
14870  }
14871  if (htype == NODE_STR) {
14872  if (!literal_concat0(parser, lit, tail->nd_lit)) {
14873  error:
14874  rb_gc_force_recycle((VALUE)head);
14875  rb_gc_force_recycle((VALUE)tail);
14876  return 0;
14877  }
14878  rb_gc_force_recycle((VALUE)tail);
14879  }
14880  else {
14881  list_append(head, tail, column);
14882  }
14883  break;
14884 
14885  case NODE_DSTR:
14886  if (htype == NODE_STR) {
14887  if (!literal_concat0(parser, head->nd_lit, tail->nd_lit))
14888  goto error;
14889  tail->nd_lit = head->nd_lit;
14890  rb_gc_force_recycle((VALUE)head);
14891  head = tail;
14892  }
14893  else if (NIL_P(tail->nd_lit)) {
14894  append:
14895  head->nd_alen += tail->nd_alen - 1;
14896  head->nd_next->nd_end->nd_next = tail->nd_next;
14897  head->nd_next->nd_end = tail->nd_next->nd_end;
14898  rb_gc_force_recycle((VALUE)tail);
14899  }
14900  else if (htype == NODE_DSTR && (headlast = head->nd_next->nd_end->nd_head) &&
14901  nd_type(headlast) == NODE_STR) {
14902  lit = headlast->nd_lit;
14903  if (!literal_concat0(parser, lit, tail->nd_lit))
14904  goto error;
14905  tail->nd_lit = Qnil;
14906  goto append;
14907  }
14908  else {
14909  nd_set_type(tail, NODE_ARRAY);
14910  tail->nd_head = new_str(tail->nd_lit, column);
14911  list_concat(head, tail);
14912  }
14913  break;
14914 
14915  case NODE_EVSTR:
14916  if (htype == NODE_STR) {
14917  nd_set_type(head, NODE_DSTR);
14918  head->nd_alen = 1;
14919  }
14920  list_append(head, tail, column);
14921  break;
14922  }
14923  return head;
14924 }
14925 
14926 static NODE *
14927 evstr2dstr_gen(struct parser_params *parser, NODE *node, int column)
14928 {
14929  if (nd_type(node) == NODE_EVSTR) {
14930  node = list_append(new_dstr(STR_NEW0(), column), node, column);
14931  }
14932  return node;
14933 }
14934 
14935 static NODE *
14936 new_evstr_gen(struct parser_params *parser, NODE *node, int column)
14937 {
14938  NODE *head = node;
14939  NODE *evstr;
14940 
14941  if (node) {
14942  switch (nd_type(node)) {
14943  case NODE_STR: case NODE_DSTR: case NODE_EVSTR:
14944  return node;
14945  }
14946  }
14947  evstr = NEW_EVSTR(head);
14948  nd_set_column(evstr, column);
14949  return evstr;
14950 }
14951 
14952 static NODE *
14953 call_bin_op_gen(struct parser_params *parser, NODE *recv, ID id, NODE *arg1, int column)
14954 {
14955  NODE *expr;
14956  value_expr(recv);
14957  value_expr(arg1);
14958  expr = NEW_OPCALL(recv, id, new_list(arg1, column));
14959  fixpos(expr, recv);
14960  nd_set_column(expr, column);
14961  return expr;
14962 }
14963 
14964 static NODE *
14965 call_uni_op_gen(struct parser_params *parser, NODE *recv, ID id, int column)
14966 {
14967  NODE *opcall;
14968  value_expr(recv);
14969  opcall = NEW_OPCALL(recv, id, 0);
14970  nd_set_column(opcall, column);
14971  return opcall;
14972 }
14973 
14974 static NODE *
14975 new_qcall_gen(struct parser_params* parser, ID atype, NODE *recv, ID mid, NODE *args, int column)
14976 {
14977  NODE *qcall = NEW_QCALL(atype, recv, mid, args);
14978  nd_set_column(qcall, column);
14979  return qcall;
14980 }
14981 
14982 static NODE*
14983 match_op_gen(struct parser_params *parser, NODE *node1, NODE *node2, int column)
14984 {
14985  value_expr(node1);
14986  value_expr(node2);
14987  if (node1) {
14988  switch (nd_type(node1)) {
14989  case NODE_DREGX:
14990  case NODE_DREGX_ONCE:
14991  {
14992  NODE *match = NEW_MATCH2(node1, node2);
14993  nd_set_column(match, column);
14994  return match;
14995  }
14996 
14997  case NODE_LIT:
14998  if (RB_TYPE_P(node1->nd_lit, T_REGEXP)) {
14999  const VALUE lit = node1->nd_lit;
15000  NODE *match = NEW_MATCH2(node1, node2);
15001  match->nd_args = reg_named_capture_assign(lit, column);
15002  nd_set_column(match, column);
15003  return match;
15004  }
15005  }
15006  }
15007 
15008  if (node2) {
15009  NODE *match3;
15010 
15011  switch (nd_type(node2)) {
15012  case NODE_DREGX:
15013  case NODE_DREGX_ONCE:
15014  match3 = NEW_MATCH3(node2, node1);
15015  nd_set_column(match3, column);
15016  return match3;
15017 
15018  case NODE_LIT:
15019  if (RB_TYPE_P(node2->nd_lit, T_REGEXP)) {
15020  match3 = NEW_MATCH3(node2, node1);
15021  nd_set_column(match3, column);
15022  return match3;
15023  }
15024  }
15025  }
15026 
15027  return new_call(node1, tMATCH, new_list(node2, column), column);
15028 }
15029 
15030 # if WARN_PAST_SCOPE
15031 static int
15032 past_dvar_p(struct parser_params *parser, ID id)
15033 {
15034  struct vtable *past = lvtbl->past;
15035  while (past) {
15036  if (vtable_included(past, id)) return 1;
15037  past = past->prev;
15038  }
15039  return 0;
15040 }
15041 # endif
15042 
15043 static NODE*
15044 gettable_gen(struct parser_params *parser, ID id, int column)
15045 {
15046  ID *vidp = NULL;
15047  NODE *node;
15048  switch (id) {
15049  case keyword_self:
15050  node = NEW_SELF();
15051  nd_set_column(node, column);
15052  return node;
15053  case keyword_nil:
15054  node = NEW_NIL();
15055  nd_set_column(node, column);
15056  return node;
15057  case keyword_true:
15058  node = NEW_TRUE();
15059  nd_set_column(node, column);
15060  return node;
15061  case keyword_false:
15062  node = NEW_FALSE();
15063  nd_set_column(node, column);
15064  return node;
15065  case keyword__FILE__:
15066  node = new_str(rb_str_dup(ruby_sourcefile_string), column);
15067  return node;
15068  case keyword__LINE__:
15069  return new_lit(INT2FIX(tokline), column);
15070  case keyword__ENCODING__:
15071  return new_lit(rb_enc_from_encoding(current_enc), column);
15072  }
15073  switch (id_type(id)) {
15074  case ID_LOCAL:
15075  if (dyna_in_block() && dvar_defined_ref(id, vidp)) {
15076  if (id == current_arg) {
15077  rb_warn1("circular argument reference - %"PRIsWARN, rb_id2str(id));
15078  }
15079  if (vidp) *vidp |= LVAR_USED;
15080  node = new_dvar(id, column);
15081  return node;
15082  }
15083  if (local_id_ref(id, vidp)) {
15084  if (id == current_arg) {
15085  rb_warn1("circular argument reference - %"PRIsWARN, rb_id2str(id));
15086  }
15087  if (vidp) *vidp |= LVAR_USED;
15088  node = new_lvar(id, column);
15089  return node;
15090  }
15091 # if WARN_PAST_SCOPE
15092  if (!in_defined && RTEST(ruby_verbose) && past_dvar_p(parser, id)) {
15093  rb_warning1("possible reference to past scope - %"PRIsWARN, rb_id2str(id));
15094  }
15095 # endif
15096  /* method call without arguments */
15097  node = NEW_VCALL(id);
15098  nd_set_column(node, column);
15099  return node;
15100  case ID_GLOBAL:
15101  node = new_gvar(id, column);
15102  return node;
15103  case ID_INSTANCE:
15104  node = new_ivar(id, column);
15105  return node;
15106  case ID_CONST:
15107  node = NEW_CONST(id);
15108  nd_set_column(node, column);
15109  return node;
15110  case ID_CLASS:
15111  node = NEW_CVAR(id);
15112  nd_set_column(node, column);
15113  return node;
15114  }
15115  compile_error(PARSER_ARG "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
15116  return 0;
15117 }
15118 
15119 static NODE *
15120 kwd_append(NODE *kwlist, NODE *kw)
15121 {
15122  if (kwlist) {
15123  NODE *kws = kwlist;
15124  while (kws->nd_next) {
15125  kws = kws->nd_next;
15126  }
15127  kws->nd_next = kw;
15128  }
15129  return kwlist;
15130 }
15131 
15132 static NODE *
15133 new_defined_gen(struct parser_params *parser, NODE *expr, int column)
15134 {
15135  NODE *defined = NEW_DEFINED(remove_begin_all(expr));
15136  nd_set_column(defined, column);
15137  return defined;
15138 }
15139 
15140 static NODE *
15141 new_regexp_gen(struct parser_params *parser, NODE *node, int options, int column)
15142 {
15143  NODE *list, *prev;
15144 
15145  if (!node) {
15146  return new_lit(reg_compile(STR_NEW0(), options), column);
15147  }
15148  switch (nd_type(node)) {
15149  case NODE_STR:
15150  {
15151  VALUE src = node->nd_lit;
15152  nd_set_type(node, NODE_LIT);
15153  node->nd_lit = reg_compile(src, options);
15154  }
15155  break;
15156  default:
15157  node = NEW_NODE(NODE_DSTR, STR_NEW0(), 1, new_list(node, column));
15158  nd_set_column(node, column);
15159  case NODE_DSTR:
15160  nd_set_type(node, NODE_DREGX);
15161  node->nd_cflag = options & RE_OPTION_MASK;
15162  if (!NIL_P(node->nd_lit)) reg_fragment_check(node->nd_lit, options);
15163  for (list = (prev = node)->nd_next; list; list = list->nd_next) {
15164  if (nd_type(list->nd_head) == NODE_STR) {
15165  VALUE tail = list->nd_head->nd_lit;
15166  if (reg_fragment_check(tail, options) && prev && !NIL_P(prev->nd_lit)) {
15167  VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit;
15168  if (!literal_concat0(parser, lit, tail)) {
15169  node = 0;
15170  break;
15171  }
15172  rb_str_resize(tail, 0);
15173  prev->nd_next = list->nd_next;
15174  rb_gc_force_recycle((VALUE)list->nd_head);
15175  rb_gc_force_recycle((VALUE)list);
15176  list = prev;
15177  }
15178  else {
15179  prev = list;
15180  }
15181  }
15182  else {
15183  prev = 0;
15184  }
15185  }
15186  if (!node->nd_next) {
15187  VALUE src = node->nd_lit;
15188  nd_set_type(node, NODE_LIT);
15189  node->nd_lit = reg_compile(src, options);
15190  }
15191  if (options & RE_OPTION_ONCE) {
15192  node = NEW_NODE(NODE_SCOPE, 0, node, 0);
15193  }
15194  break;
15195  }
15196  return node;
15197 }
15198 
15199 static NODE *
15200 new_lit_gen(struct parser_params *parser, VALUE sym, int column)
15201 {
15202  NODE *lit = NEW_LIT(sym);
15203  nd_set_column(lit, column);
15204  return lit;
15205 }
15206 
15207 static NODE *
15208 new_list_gen(struct parser_params *parser, NODE *item, int column)
15209 {
15210  NODE *list = NEW_LIST(item);
15211  nd_set_column(list, column);
15212  return list;
15213 }
15214 
15215 static NODE *
15216 new_str_gen(struct parser_params *parser, VALUE str, int column)
15217 {
15218  NODE *nd_str = NEW_STR(str);
15219  nd_set_column(nd_str, column);
15220  return nd_str;
15221 }
15222 
15223 static NODE *
15224 new_dvar_gen(struct parser_params *parser, ID id, int column)
15225 {
15226  NODE *dvar = NEW_DVAR(id);
15227  nd_set_column(dvar, column);
15228  return dvar;
15229 }
15230 
15231 static NODE *
15232 new_resbody_gen(struct parser_params *parser, NODE *exc_list, NODE *stmt, NODE *rescue, int column)
15233 {
15234  NODE *resbody = NEW_RESBODY(exc_list, stmt, rescue);
15235  nd_set_column(resbody, column);
15236  return resbody;
15237 }
15238 
15239 static NODE *
15240 new_errinfo_gen(struct parser_params *parser, int column)
15241 {
15242  NODE *errinfo = NEW_ERRINFO();
15243  nd_set_column(errinfo, column);
15244  return errinfo;
15245 }
15246 
15247 static NODE *
15248 new_call_gen(struct parser_params *parser, NODE *recv, ID mid, NODE *args, int column)
15249 {
15250  NODE *call = NEW_CALL(recv, mid, args);
15251  nd_set_column(call, column);
15252  return call;
15253 }
15254 
15255 static NODE *
15256 new_fcall_gen(struct parser_params *parser, ID mid, NODE *args, int column)
15257 {
15258  NODE *fcall = NEW_FCALL(mid, args);
15259  nd_set_column(fcall, column);
15260  return fcall;
15261 }
15262 
15263 static NODE *
15264 new_for_gen(struct parser_params *parser, NODE *var, NODE *iter, NODE *body, int column)
15265 {
15266  NODE *nd_for = NEW_FOR(var, iter, body);
15267  nd_set_column(nd_for, column);
15268  return nd_for;
15269 }
15270 
15271 static NODE *
15272 new_gvar_gen(struct parser_params *parser, ID id, int column)
15273 {
15274  NODE *gvar = NEW_GVAR(id);
15275  nd_set_column(gvar, column);
15276  return gvar;
15277 }
15278 
15279 static NODE *
15280 new_lvar_gen(struct parser_params *parser, ID id, int column)
15281 {
15282  NODE *lvar = NEW_LVAR(id);
15283  nd_set_column(lvar, column);
15284  return lvar;
15285 }
15286 
15287 static NODE *
15288 new_dstr_gen(struct parser_params *parser, VALUE str, int column)
15289 {
15290  NODE *dstr = NEW_DSTR(str);
15291  nd_set_column(dstr, column);
15292  return dstr;
15293 }
15294 
15295 static NODE *
15296 new_rescue_gen(struct parser_params *parser, NODE *b, NODE *res, NODE *e, int column)
15297 {
15298  NODE *rescue = NEW_RESCUE(b, res, e);
15299  nd_set_column(rescue, column);
15300  return rescue;
15301 }
15302 
15303 static NODE *
15304 new_undef_gen(struct parser_params *parser, NODE *i, int column)
15305 {
15306  NODE *undef = NEW_UNDEF(i);
15307  nd_set_column(undef, column);
15308  return undef;
15309 }
15310 
15311 static NODE *
15312 new_zarray_gen(struct parser_params *parser, int column)
15313 {
15314  NODE *zarray = NEW_ZARRAY();
15315  nd_set_column(zarray, column);
15316  return zarray;
15317 }
15318 
15319 static NODE *
15320 new_ivar_gen(struct parser_params *parser, ID id, int column)
15321 {
15322  NODE *ivar = NEW_IVAR(id);
15323  nd_set_column(ivar, column);
15324  return ivar;
15325 }
15326 
15327 static NODE *
15328 new_postarg_gen(struct parser_params *parser, NODE *i, NODE *v, int column)
15329 {
15330  NODE *postarg = NEW_POSTARG(i, v);
15331  nd_set_column(postarg, column);
15332  return postarg;
15333 }
15334 
15335 static NODE *
15336 new_cdecl_gen(struct parser_params *parser, ID v, NODE *val, NODE *path, int column)
15337 {
15338  NODE *nd_cdecl = NEW_CDECL(v, val, path);
15339  nd_set_column(nd_cdecl, column);
15340  return nd_cdecl;
15341 }
15342 
15343 static NODE *
15344 new_scope_gen(struct parser_params *parser, NODE *a, NODE *b, int column)
15345 {
15346  NODE *scope = NEW_SCOPE(a, b);
15347  nd_set_column(scope, column);
15348  return scope;
15349 }
15350 
15351 static NODE *
15352 new_begin_gen(struct parser_params *parser, NODE *b, int column)
15353 {
15354  NODE *begin = NEW_BEGIN(b);
15355  nd_set_column(begin, column);
15356  return begin;
15357 }
15358 
15359 static NODE *
15360 new_masgn_gen(struct parser_params *parser, NODE *l, NODE *r, int column)
15361 {
15362  NODE *masgn = NEW_MASGN(l, r);
15363  nd_set_column(masgn, column);
15364  return masgn;
15365 }
15366 
15367 
15368 static NODE *
15369 new_kw_arg_gen(struct parser_params *parser, NODE *k, int column)
15370 {
15371  NODE *kw_arg;
15372  if (!k) return 0;
15373  kw_arg = NEW_KW_ARG(0, (k));
15374  nd_set_column(kw_arg, column);
15375  return kw_arg;
15376 }
15377 
15378 static NODE *
15379 new_xstring_gen(struct parser_params *parser, NODE *node, int column)
15380 {
15381  if (!node) {
15382  NODE *xstr = NEW_XSTR(STR_NEW0());
15383  nd_set_column(xstr, column);
15384  return xstr;
15385  }
15386  switch (nd_type(node)) {
15387  case NODE_STR:
15388  nd_set_type(node, NODE_XSTR);
15389  break;
15390  case NODE_DSTR:
15391  nd_set_type(node, NODE_DXSTR);
15392  break;
15393  default:
15394  node = NEW_NODE(NODE_DXSTR, Qnil, 1, new_list(node, column));
15395  nd_set_column(node, column);
15396  break;
15397  }
15398  return node;
15399 }
15400 
15401 static NODE *
15402 new_body_gen(struct parser_params *parser, NODE *param, NODE *stmt, int column)
15403 {
15404  NODE *iter = NEW_ITER(param, stmt);
15405  nd_set_column(iter->nd_body, column);
15406  nd_set_column(iter, column);
15407  return iter;
15408 
15409 }
15410 #else /* !RIPPER */
15411 static int
15412 id_is_var_gen(struct parser_params *parser, ID id)
15413 {
15414  if (is_notop_id(id)) {
15415  switch (id & ID_SCOPE_MASK) {
15416  case ID_GLOBAL: case ID_INSTANCE: case ID_CONST: case ID_CLASS:
15417  return 1;
15418  case ID_LOCAL:
15419  if (dyna_in_block() && dvar_defined(id)) return 1;
15420  if (local_id(id)) return 1;
15421  /* method call without arguments */
15422  return 0;
15423  }
15424  }
15425  compile_error(PARSER_ARG "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
15426  return 0;
15427 }
15428 
15429 static VALUE
15430 new_regexp_gen(struct parser_params *parser, VALUE re, VALUE opt)
15431 {
15432  VALUE src = 0, err;
15433  int options = 0;
15434  if (ripper_is_node_yylval(re)) {
15435  src = RNODE(re)->nd_cval;
15436  re = RNODE(re)->nd_rval;
15437  }
15438  if (ripper_is_node_yylval(opt)) {
15439  options = (int)RNODE(opt)->nd_tag;
15440  opt = RNODE(opt)->nd_rval;
15441  }
15442  if (src && NIL_P(parser_reg_compile(parser, src, options, &err))) {
15444  }
15445  return dispatch2(regexp_literal, re, opt);
15446 }
15447 
15448 static VALUE
15449 new_xstring_gen(struct parser_params *parser, VALUE str)
15450 {
15451  return dispatch1(xstring_literal, str);
15452 }
15453 #endif /* !RIPPER */
15454 
15455 #ifndef RIPPER
15456 const char rb_parser_lex_state_names[][13] = {
15457  "EXPR_BEG", "EXPR_END", "EXPR_ENDARG", "EXPR_ENDFN", "EXPR_ARG",
15458  "EXPR_CMDARG", "EXPR_MID", "EXPR_FNAME", "EXPR_DOT", "EXPR_CLASS",
15459  "EXPR_LABEL", "EXPR_LABELED","EXPR_FITEM",
15460 };
15461 
15462 static VALUE
15463 append_lex_state_name(enum lex_state_e state, VALUE buf)
15464 {
15465  int i, sep = 0;
15466  unsigned int mask = 1;
15467  static const char none[] = "EXPR_NONE";
15468 
15469  for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
15470  if ((unsigned)state & mask) {
15471  if (sep) {
15472  rb_str_cat(buf, "|", 1);
15473  }
15474  sep = 1;
15475  rb_str_cat_cstr(buf, rb_parser_lex_state_names[i]);
15476  }
15477  }
15478  if (!sep) {
15479  rb_str_cat(buf, none, sizeof(none)-1);
15480  }
15481  return buf;
15482 }
15483 
15484 static void
15485 flush_debug_buffer(struct parser_params *parser, VALUE out, VALUE str)
15486 {
15487  VALUE mesg = parser->debug_buffer;
15488 
15489  if (!NIL_P(mesg) && RSTRING_LEN(mesg)) {
15490  parser->debug_buffer = Qnil;
15491  rb_io_puts(1, &mesg, out);
15492  }
15493  if (!NIL_P(str) && RSTRING_LEN(str)) {
15494  rb_io_write(parser->debug_output, str);
15495  }
15496 }
15497 
15498 enum lex_state_e
15500  enum lex_state_e to, int line)
15501 {
15502  VALUE mesg;
15503  mesg = rb_str_new_cstr("lex_state: ");
15504  append_lex_state_name(from, mesg);
15505  rb_str_cat_cstr(mesg, " -> ");
15506  append_lex_state_name(to, mesg);
15507  rb_str_catf(mesg, " at line %d\n", line);
15508  flush_debug_buffer(parser, parser->debug_output, mesg);
15509  return to;
15510 }
15511 
15512 VALUE
15514 {
15515  return append_lex_state_name(state, rb_str_new(0, 0));
15516 }
15517 
15518 static void
15519 append_bitstack_value(stack_type stack, VALUE mesg)
15520 {
15521  if (stack == 0) {
15522  rb_str_cat_cstr(mesg, "0");
15523  }
15524  else {
15525  stack_type mask = (stack_type)1U << (CHAR_BIT * sizeof(stack_type) - 1);
15526  for (; mask && !(stack & mask); mask >>= 1) continue;
15527  for (; mask; mask >>= 1) rb_str_cat(mesg, stack & mask ? "1" : "0", 1);
15528  }
15529 }
15530 
15531 void
15532 rb_parser_show_bitstack(struct parser_params *parser, stack_type stack,
15533  const char *name, int line)
15534 {
15535  VALUE mesg = rb_sprintf("%s: ", name);
15536  append_bitstack_value(stack, mesg);
15537  rb_str_catf(mesg, " at line %d\n", line);
15538  flush_debug_buffer(parser, parser->debug_output, mesg);
15539 }
15540 
15541 void
15542 rb_parser_fatal(struct parser_params *parser, const char *fmt, ...)
15543 {
15544  va_list ap;
15545  VALUE mesg = rb_str_new_cstr("internal parser error: ");
15546 
15547  va_start(ap, fmt);
15548  rb_str_vcatf(mesg, fmt, ap);
15549  va_end(ap);
15550 #ifndef RIPPER
15551  parser_yyerror(parser, RSTRING_PTR(mesg));
15552  RB_GC_GUARD(mesg);
15553 #else
15554  dispatch1(parse_error, mesg);
15555  ripper_error();
15556 #endif /* !RIPPER */
15557 
15558  mesg = rb_str_new(0, 0);
15559  append_lex_state_name(lex_state, mesg);
15560  compile_error(PARSER_ARG "lex_state: %"PRIsVALUE, mesg);
15561  rb_str_resize(mesg, 0);
15562  append_bitstack_value(cond_stack, mesg);
15563  compile_error(PARSER_ARG "cond_stack: %"PRIsVALUE, mesg);
15564  rb_str_resize(mesg, 0);
15565  append_bitstack_value(cmdarg_stack, mesg);
15566  compile_error(PARSER_ARG "cmdarg_stack: %"PRIsVALUE, mesg);
15567  if (parser->debug_output == rb_stdout)
15568  parser->debug_output = rb_stderr;
15569  yydebug = TRUE;
15570 }
15571 #endif /* !RIPPER */
15572 
15573 #ifndef RIPPER
15574 static NODE*
15575 assignable_result0(NODE *node, int column)
15576 {
15577  if (node) nd_set_column(node, column);
15578  return node;
15579 }
15580 #endif /* !RIPPER */
15581 
15582 #ifdef RIPPER
15583 static VALUE
15584 assignable_gen(struct parser_params *parser, VALUE lhs)
15585 #else
15586 static NODE*
15587 assignable_gen(struct parser_params *parser, ID id, NODE *val, int column)
15588 #endif
15589 {
15590 #ifdef RIPPER
15591  ID id = get_id(lhs);
15592 # define assignable_result(x) (lhs)
15593 # define parser_yyerror(parser, x) (lhs = assign_error_gen(parser, lhs))
15594 #else
15595 # define assignable_result(x) assignable_result0(x, column)
15596 #endif
15597  if (!id) return assignable_result(0);
15598  switch (id) {
15599  case keyword_self:
15600  yyerror0("Can't change the value of self");
15601  goto error;
15602  case keyword_nil:
15603  yyerror0("Can't assign to nil");
15604  goto error;
15605  case keyword_true:
15606  yyerror0("Can't assign to true");
15607  goto error;
15608  case keyword_false:
15609  yyerror0("Can't assign to false");
15610  goto error;
15611  case keyword__FILE__:
15612  yyerror0("Can't assign to __FILE__");
15613  goto error;
15614  case keyword__LINE__:
15615  yyerror0("Can't assign to __LINE__");
15616  goto error;
15617  case keyword__ENCODING__:
15618  yyerror0("Can't assign to __ENCODING__");
15619  goto error;
15620  }
15621  switch (id_type(id)) {
15622  case ID_LOCAL:
15623  if (dyna_in_block()) {
15624  if (dvar_curr(id)) {
15625  return assignable_result(NEW_DASGN_CURR(id, val));
15626  }
15627  else if (dvar_defined(id)) {
15628  return assignable_result(NEW_DASGN(id, val));
15629  }
15630  else if (local_id(id)) {
15631  return assignable_result(NEW_LASGN(id, val));
15632  }
15633  else {
15634  dyna_var(id);
15635  return assignable_result(NEW_DASGN_CURR(id, val));
15636  }
15637  }
15638  else {
15639  if (!local_id(id)) {
15640  local_var(id);
15641  }
15642  return assignable_result(NEW_LASGN(id, val));
15643  }
15644  break;
15645  case ID_GLOBAL:
15646  return assignable_result(NEW_GASGN(id, val));
15647  case ID_INSTANCE:
15648  return assignable_result(NEW_IASGN(id, val));
15649  case ID_CONST:
15650  if (!in_def && !in_single)
15651  return assignable_result(new_cdecl(id, val, 0, column));
15652  yyerror0("dynamic constant assignment");
15653  break;
15654  case ID_CLASS:
15655  return assignable_result(NEW_CVASGN(id, val));
15656  default:
15657  compile_error(PARSER_ARG "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
15658  }
15659  error:
15660  return assignable_result(0);
15661 #undef assignable_result
15662 #undef parser_yyerror
15663 }
15664 
15665 static int
15666 is_private_local_id(ID name)
15667 {
15668  VALUE s;
15669  if (name == idUScore) return 1;
15670  if (!is_local_id(name)) return 0;
15671  s = rb_id2str(name);
15672  if (!s) return 0;
15673  return RSTRING_PTR(s)[0] == '_';
15674 }
15675 
15676 static int
15677 shadowing_lvar_0(struct parser_params *parser, ID name)
15678 {
15679  if (is_private_local_id(name)) return 1;
15680  if (dyna_in_block()) {
15681  if (dvar_curr(name)) {
15682  yyerror0("duplicated argument name");
15683  }
15684  else if (dvar_defined(name) || local_id(name)) {
15685  rb_warning1("shadowing outer local variable - %"PRIsWARN, rb_id2str(name));
15686  vtable_add(lvtbl->vars, name);
15687  if (lvtbl->used) {
15689  }
15690  return 0;
15691  }
15692  }
15693  else {
15694  if (local_id(name)) {
15695  yyerror0("duplicated argument name");
15696  }
15697  }
15698  return 1;
15699 }
15700 
15701 static ID
15702 shadowing_lvar_gen(struct parser_params *parser, ID name)
15703 {
15704  shadowing_lvar_0(parser, name);
15705  return name;
15706 }
15707 
15708 static void
15709 new_bv_gen(struct parser_params *parser, ID name)
15710 {
15711  if (!name) return;
15712  if (!is_local_id(name)) {
15713  compile_error(PARSER_ARG "invalid local variable - %"PRIsVALUE,
15714  rb_id2str(name));
15715  return;
15716  }
15717  if (!shadowing_lvar_0(parser, name)) return;
15718  dyna_var(name);
15719 }
15720 
15721 #ifndef RIPPER
15722 static NODE *
15723 aryset_gen(struct parser_params *parser, NODE *recv, NODE *idx, int column)
15724 {
15725  NODE *attrasgn = NEW_ATTRASGN(recv, tASET, idx);
15726  nd_set_column(attrasgn, column);
15727  return attrasgn;
15728 }
15729 
15730 static void
15731 block_dup_check_gen(struct parser_params *parser, NODE *node1, NODE *node2)
15732 {
15733  if (node2 && node1 && nd_type(node1) == NODE_BLOCK_PASS) {
15734  compile_error(PARSER_ARG "both block arg and actual block given");
15735  }
15736 }
15737 
15738 static NODE *
15739 attrset_gen(struct parser_params *parser, NODE *recv, ID atype, ID id, int column)
15740 {
15741  NODE *attrasgn;
15742  if (!CALL_Q_P(atype)) id = rb_id_attrset(id);
15743  attrasgn = NEW_ATTRASGN(recv, id, 0);
15744  nd_set_column(attrasgn, column);
15745  return attrasgn;
15746 }
15747 
15748 static void
15749 rb_backref_error_gen(struct parser_params *parser, NODE *node)
15750 {
15751  switch (nd_type(node)) {
15752  case NODE_NTH_REF:
15753  compile_error(PARSER_ARG "Can't set variable $%ld", node->nd_nth);
15754  break;
15755  case NODE_BACK_REF:
15756  compile_error(PARSER_ARG "Can't set variable $%c", (int)node->nd_nth);
15757  break;
15758  }
15759 }
15760 
15761 static NODE *
15762 arg_concat_gen(struct parser_params *parser, NODE *node1, NODE *node2, int column)
15763 {
15764  NODE *argscat;
15765 
15766  if (!node2) return node1;
15767  switch (nd_type(node1)) {
15768  case NODE_BLOCK_PASS:
15769  if (node1->nd_head)
15770  node1->nd_head = arg_concat(node1->nd_head, node2, column);
15771  else
15772  node1->nd_head = new_list(node2, column);
15773  return node1;
15774  case NODE_ARGSPUSH:
15775  if (nd_type(node2) != NODE_ARRAY) break;
15776  node1->nd_body = list_concat(new_list(node1->nd_body, column), node2);
15777  nd_set_type(node1, NODE_ARGSCAT);
15778  return node1;
15779  case NODE_ARGSCAT:
15780  if (nd_type(node2) != NODE_ARRAY ||
15781  nd_type(node1->nd_body) != NODE_ARRAY) break;
15782  node1->nd_body = list_concat(node1->nd_body, node2);
15783  return node1;
15784  }
15785  argscat = NEW_ARGSCAT(node1, node2);
15786  nd_set_column(argscat, column);
15787  return argscat;
15788 }
15789 
15790 static NODE *
15791 arg_append_gen(struct parser_params *parser, NODE *node1, NODE *node2, int column)
15792 {
15793  NODE *argspush;
15794 
15795  if (!node1) return new_list(node2, column);
15796  switch (nd_type(node1)) {
15797  case NODE_ARRAY:
15798  return list_append(node1, node2, column);
15799  case NODE_BLOCK_PASS:
15800  node1->nd_head = arg_append(node1->nd_head, node2, column);
15801  return node1;
15802  case NODE_ARGSPUSH:
15803  node1->nd_body = list_append(new_list(node1->nd_body, column), node2, column);
15804  nd_set_type(node1, NODE_ARGSCAT);
15805  return node1;
15806  }
15807  argspush = NEW_ARGSPUSH(node1, node2);
15808  nd_set_column(argspush, column);
15809  return argspush;
15810 }
15811 
15812 static NODE *
15813 splat_array(NODE* node)
15814 {
15815  if (nd_type(node) == NODE_SPLAT) node = node->nd_head;
15816  if (nd_type(node) == NODE_ARRAY) return node;
15817  return 0;
15818 }
15819 
15820 static NODE *
15821 node_assign_gen(struct parser_params *parser, NODE *lhs, NODE *rhs, int column)
15822 {
15823  if (!lhs) return 0;
15824 
15825  switch (nd_type(lhs)) {
15826  case NODE_GASGN:
15827  case NODE_IASGN:
15828  case NODE_LASGN:
15829  case NODE_DASGN:
15830  case NODE_DASGN_CURR:
15831  case NODE_MASGN:
15832  case NODE_CDECL:
15833  case NODE_CVASGN:
15834  lhs->nd_value = rhs;
15835  break;
15836 
15837  case NODE_ATTRASGN:
15838  case NODE_CALL:
15839  lhs->nd_args = arg_append(lhs->nd_args, rhs, column);
15840  break;
15841 
15842  default:
15843  /* should not happen */
15844  break;
15845  }
15846 
15847  return lhs;
15848 }
15849 
15850 static int
15851 value_expr_gen(struct parser_params *parser, NODE *node)
15852 {
15853  int cond = 0;
15854 
15855  if (!node) {
15856  rb_warning0("empty expression");
15857  }
15858  while (node) {
15859  switch (nd_type(node)) {
15860  case NODE_RETURN:
15861  case NODE_BREAK:
15862  case NODE_NEXT:
15863  case NODE_REDO:
15864  case NODE_RETRY:
15865  if (!cond) yyerror0("void value expression");
15866  /* or "control never reach"? */
15867  return FALSE;
15868 
15869  case NODE_BLOCK:
15870  while (node->nd_next) {
15871  node = node->nd_next;
15872  }
15873  node = node->nd_head;
15874  break;
15875 
15876  case NODE_BEGIN:
15877  node = node->nd_body;
15878  break;
15879 
15880  case NODE_IF:
15881  case NODE_UNLESS:
15882  if (!node->nd_body) {
15883  node = node->nd_else;
15884  break;
15885  }
15886  else if (!node->nd_else) {
15887  node = node->nd_body;
15888  break;
15889  }
15890  if (!value_expr(node->nd_body)) return FALSE;
15891  node = node->nd_else;
15892  break;
15893 
15894  case NODE_AND:
15895  case NODE_OR:
15896  cond = 1;
15897  node = node->nd_2nd;
15898  break;
15899 
15900  default:
15901  return TRUE;
15902  }
15903  }
15904 
15905  return TRUE;
15906 }
15907 
15908 static void
15909 void_expr_gen(struct parser_params *parser, NODE *node)
15910 {
15911  const char *useless = 0;
15912 
15913  if (!RTEST(ruby_verbose)) return;
15914 
15915  if (!node) return;
15916  switch (nd_type(node)) {
15917  case NODE_OPCALL:
15918  switch (node->nd_mid) {
15919  case '+':
15920  case '-':
15921  case '*':
15922  case '/':
15923  case '%':
15924  case tPOW:
15925  case tUPLUS:
15926  case tUMINUS:
15927  case '|':
15928  case '^':
15929  case '&':
15930  case tCMP:
15931  case '>':
15932  case tGEQ:
15933  case '<':
15934  case tLEQ:
15935  case tEQ:
15936  case tNEQ:
15937  useless = rb_id2name(node->nd_mid);
15938  break;
15939  }
15940  break;
15941 
15942  case NODE_LVAR:
15943  case NODE_DVAR:
15944  case NODE_GVAR:
15945  case NODE_IVAR:
15946  case NODE_CVAR:
15947  case NODE_NTH_REF:
15948  case NODE_BACK_REF:
15949  useless = "a variable";
15950  break;
15951  case NODE_CONST:
15952  useless = "a constant";
15953  break;
15954  case NODE_LIT:
15955  case NODE_STR:
15956  case NODE_DSTR:
15957  case NODE_DREGX:
15958  case NODE_DREGX_ONCE:
15959  useless = "a literal";
15960  break;
15961  case NODE_COLON2:
15962  case NODE_COLON3:
15963  useless = "::";
15964  break;
15965  case NODE_DOT2:
15966  useless = "..";
15967  break;
15968  case NODE_DOT3:
15969  useless = "...";
15970  break;
15971  case NODE_SELF:
15972  useless = "self";
15973  break;
15974  case NODE_NIL:
15975  useless = "nil";
15976  break;
15977  case NODE_TRUE:
15978  useless = "true";
15979  break;
15980  case NODE_FALSE:
15981  useless = "false";
15982  break;
15983  case NODE_DEFINED:
15984  useless = "defined?";
15985  break;
15986  }
15987 
15988  if (useless) {
15989  rb_warn1L(nd_line(node), "possibly useless use of %s in void context", WARN_S(useless));
15990  }
15991 }
15992 
15993 static void
15994 void_stmts_gen(struct parser_params *parser, NODE *node)
15995 {
15996  if (!RTEST(ruby_verbose)) return;
15997  if (!node) return;
15998  if (nd_type(node) != NODE_BLOCK) return;
15999 
16000  for (;;) {
16001  if (!node->nd_next) return;
16002  void_expr0(node->nd_head);
16003  node = node->nd_next;
16004  }
16005 }
16006 
16007 static NODE *
16008 remove_begin(NODE *node)
16009 {
16010  NODE **n = &node, *n1 = node;
16011  while (n1 && nd_type(n1) == NODE_BEGIN && n1->nd_body) {
16012  *n = n1 = n1->nd_body;
16013  }
16014  return node;
16015 }
16016 
16017 static NODE *
16018 remove_begin_all(NODE *node)
16019 {
16020  NODE **n = &node, *n1 = node;
16021  while (n1 && nd_type(n1) == NODE_BEGIN) {
16022  *n = n1 = n1->nd_body;
16023  }
16024  return node;
16025 }
16026 
16027 static void
16028 reduce_nodes_gen(struct parser_params *parser, NODE **body)
16029 {
16030  NODE *node = *body;
16031 
16032  if (!node) {
16033  *body = NEW_NIL();
16034  return;
16035  }
16036 #define subnodes(n1, n2) \
16037  ((!node->n1) ? (node->n2 ? (body = &node->n2, 1) : 0) : \
16038  (!node->n2) ? (body = &node->n1, 1) : \
16039  (reduce_nodes(&node->n1), body = &node->n2, 1))
16040 
16041  while (node) {
16042  int newline = (int)(node->flags & NODE_FL_NEWLINE);
16043  switch (nd_type(node)) {
16044  end:
16045  case NODE_NIL:
16046  *body = 0;
16047  return;
16048  case NODE_RETURN:
16049  *body = node = node->nd_stts;
16050  if (newline && node) node->flags |= NODE_FL_NEWLINE;
16051  continue;
16052  case NODE_BEGIN:
16053  *body = node = node->nd_body;
16054  if (newline && node) node->flags |= NODE_FL_NEWLINE;
16055  continue;
16056  case NODE_BLOCK:
16057  body = &node->nd_end->nd_head;
16058  break;
16059  case NODE_IF:
16060  case NODE_UNLESS:
16061  if (subnodes(nd_body, nd_else)) break;
16062  return;
16063  case NODE_CASE:
16064  body = &node->nd_body;
16065  break;
16066  case NODE_WHEN:
16067  if (!subnodes(nd_body, nd_next)) goto end;
16068  break;
16069  case NODE_ENSURE:
16070  if (!subnodes(nd_head, nd_resq)) goto end;
16071  break;
16072  case NODE_RESCUE:
16073  if (node->nd_else) {
16074  body = &node->nd_resq;
16075  break;
16076  }
16077  if (!subnodes(nd_head, nd_resq)) goto end;
16078  break;
16079  default:
16080  return;
16081  }
16082  node = *body;
16083  if (newline && node) node->flags |= NODE_FL_NEWLINE;
16084  }
16085 
16086 #undef subnodes
16087 }
16088 
16089 static int
16090 is_static_content(NODE *node)
16091 {
16092  if (!node) return 1;
16093  switch (nd_type(node)) {
16094  case NODE_HASH:
16095  if (!(node = node->nd_head)) break;
16096  case NODE_ARRAY:
16097  do {
16098  if (!is_static_content(node->nd_head)) return 0;
16099  } while ((node = node->nd_next) != 0);
16100  case NODE_LIT:
16101  case NODE_STR:
16102  case NODE_NIL:
16103  case NODE_TRUE:
16104  case NODE_FALSE:
16105  case NODE_ZARRAY:
16106  break;
16107  default:
16108  return 0;
16109  }
16110  return 1;
16111 }
16112 
16113 static int
16114 assign_in_cond(struct parser_params *parser, NODE *node)
16115 {
16116  switch (nd_type(node)) {
16117  case NODE_MASGN:
16118  case NODE_LASGN:
16119  case NODE_DASGN:
16120  case NODE_DASGN_CURR:
16121  case NODE_GASGN:
16122  case NODE_IASGN:
16123  break;
16124 
16125  default:
16126  return 0;
16127  }
16128 
16129  if (!node->nd_value) return 1;
16130  if (is_static_content(node->nd_value)) {
16131  /* reports always */
16132  parser_warn(node->nd_value, "found = in conditional, should be ==");
16133  }
16134  return 1;
16135 }
16136 
16137 static void
16138 warn_unless_e_option(struct parser_params *parser, NODE *node, const char *str)
16139 {
16140  if (!e_option_supplied(parser)) parser_warn(node, str);
16141 }
16142 
16143 static void
16144 warning_unless_e_option(struct parser_params *parser, NODE *node, const char *str)
16145 {
16146  if (!e_option_supplied(parser)) parser_warning(node, str);
16147 }
16148 
16149 static NODE *cond0(struct parser_params*,NODE*,int,int);
16150 
16151 static NODE*
16152 range_op(struct parser_params *parser, NODE *node, int column)
16153 {
16154  enum node_type type;
16155 
16156  if (node == 0) return 0;
16157 
16158  type = nd_type(node);
16159  value_expr(node);
16160  if (type == NODE_LIT && FIXNUM_P(node->nd_lit)) {
16161  warn_unless_e_option(parser, node, "integer literal in conditional range");
16162  return new_call(node, tEQ, new_list(new_gvar(rb_intern("$."), column), column), column);
16163  }
16164  return cond0(parser, node, FALSE, column);
16165 }
16166 
16167 static int
16168 literal_node(NODE *node)
16169 {
16170  if (!node) return 1; /* same as NODE_NIL */
16171  switch (nd_type(node)) {
16172  case NODE_LIT:
16173  case NODE_STR:
16174  case NODE_DSTR:
16175  case NODE_EVSTR:
16176  case NODE_DREGX:
16177  case NODE_DREGX_ONCE:
16178  case NODE_DSYM:
16179  return 2;
16180  case NODE_TRUE:
16181  case NODE_FALSE:
16182  case NODE_NIL:
16183  return 1;
16184  }
16185  return 0;
16186 }
16187 
16188 static NODE*
16189 cond0(struct parser_params *parser, NODE *node, int method_op, int column)
16190 {
16191  if (node == 0) return 0;
16192  assign_in_cond(parser, node);
16193 
16194  switch (nd_type(node)) {
16195  case NODE_DSTR:
16196  case NODE_EVSTR:
16197  case NODE_STR:
16198  if (!method_op) rb_warn0("string literal in condition");
16199  break;
16200 
16201  case NODE_DREGX:
16202  case NODE_DREGX_ONCE:
16203  {
16204  NODE *match;
16205  if (!method_op)
16206  warning_unless_e_option(parser, node, "regex literal in condition");
16207 
16208  match = NEW_MATCH2(node, new_gvar(idLASTLINE, column));
16209  nd_set_column(match, column);
16210  return match;
16211  }
16212 
16213  case NODE_AND:
16214  case NODE_OR:
16215  node->nd_1st = cond0(parser, node->nd_1st, FALSE, column);
16216  node->nd_2nd = cond0(parser, node->nd_2nd, FALSE, column);
16217  break;
16218 
16219  case NODE_DOT2:
16220  case NODE_DOT3:
16221  node->nd_beg = range_op(parser, node->nd_beg, column);
16222  node->nd_end = range_op(parser, node->nd_end, column);
16223  if (nd_type(node) == NODE_DOT2) nd_set_type(node,NODE_FLIP2);
16224  else if (nd_type(node) == NODE_DOT3) nd_set_type(node, NODE_FLIP3);
16225  if (!method_op && !e_option_supplied(parser)) {
16226  int b = literal_node(node->nd_beg);
16227  int e = literal_node(node->nd_end);
16228  if ((b == 1 && e == 1) || (b + e >= 2 && RTEST(ruby_verbose))) {
16229  parser_warn(node, "range literal in condition");
16230  }
16231  }
16232  break;
16233 
16234  case NODE_DSYM:
16235  if (!method_op) parser_warning(node, "literal in condition");
16236  break;
16237 
16238  case NODE_LIT:
16239  if (RB_TYPE_P(node->nd_lit, T_REGEXP)) {
16240  if (!method_op)
16241  warn_unless_e_option(parser, node, "regex literal in condition");
16242  nd_set_type(node, NODE_MATCH);
16243  }
16244  else {
16245  if (!method_op)
16246  parser_warning(node, "literal in condition");
16247  }
16248  default:
16249  break;
16250  }
16251  return node;
16252 }
16253 
16254 static NODE*
16255 cond_gen(struct parser_params *parser, NODE *node, int method_op, int column)
16256 {
16257  if (node == 0) return 0;
16258  return cond0(parser, node, method_op, column);
16259 }
16260 
16261 static NODE*
16262 new_if_gen(struct parser_params *parser, NODE *cc, NODE *left, NODE *right, int column)
16263 {
16264  NODE *node_if;
16265 
16266  if (!cc) return right;
16267  cc = cond0(parser, cc, FALSE, column);
16268  node_if = NEW_IF(cc, left, right);
16269  nd_set_column(node_if, column);
16270  return newline_node(node_if);
16271 }
16272 
16273 static NODE*
16274 new_unless_gen(struct parser_params *parser, NODE *cc, NODE *left, NODE *right, int column)
16275 {
16276  NODE *node_unless;
16277 
16278  if (!cc) return right;
16279  cc = cond0(parser, cc, FALSE, column);
16280  node_unless = NEW_UNLESS(cc, left, right);
16281  nd_set_column(node_unless, column);
16282  return newline_node(node_unless);
16283 }
16284 
16285 static NODE*
16286 logop_gen(struct parser_params *parser, enum node_type type, NODE *left, NODE *right, int column)
16287 {
16288  NODE *op;
16289  value_expr(left);
16290  if (left && (enum node_type)nd_type(left) == type) {
16291  NODE *node = left, *second;
16292  while ((second = node->nd_2nd) != 0 && (enum node_type)nd_type(second) == type) {
16293  node = second;
16294  }
16295  node->nd_2nd = NEW_NODE(type, second, right, 0);
16296  nd_set_column(node->nd_2nd, column);
16297  return left;
16298  }
16299  op = NEW_NODE(type, left, right, 0);
16300  nd_set_column(op, column);
16301  return op;
16302 }
16303 
16304 static void
16305 no_blockarg(struct parser_params *parser, NODE *node)
16306 {
16307  if (node && nd_type(node) == NODE_BLOCK_PASS) {
16308  compile_error(PARSER_ARG "block argument should not be given");
16309  }
16310 }
16311 
16312 static NODE *
16313 ret_args_gen(struct parser_params *parser, NODE *node)
16314 {
16315  if (node) {
16316  no_blockarg(parser, node);
16317  if (nd_type(node) == NODE_ARRAY) {
16318  if (node->nd_next == 0) {
16319  node = node->nd_head;
16320  }
16321  else {
16322  nd_set_type(node, NODE_VALUES);
16323  }
16324  }
16325  }
16326  return node;
16327 }
16328 
16329 static NODE *
16330 new_yield_gen(struct parser_params *parser, NODE *node, int column)
16331 {
16332  NODE *yield;
16333  if (node) no_blockarg(parser, node);
16334 
16335  yield = NEW_YIELD(node);
16336  nd_set_column(yield, column);
16337  return yield;
16338 }
16339 
16340 static VALUE
16341 negate_lit_gen(struct parser_params *parser, VALUE lit)
16342 {
16343  int type = TYPE(lit);
16344  switch (type) {
16345  case T_FIXNUM:
16346  lit = LONG2FIX(-FIX2LONG(lit));
16347  break;
16348  case T_BIGNUM:
16349  BIGNUM_NEGATE(lit);
16350  lit = rb_big_norm(lit);
16351  break;
16352  case T_RATIONAL:
16353  RRATIONAL_SET_NUM(lit, negate_lit(RRATIONAL(lit)->num));
16354  break;
16355  case T_COMPLEX:
16356  RCOMPLEX_SET_REAL(lit, negate_lit(RCOMPLEX(lit)->real));
16357  RCOMPLEX_SET_IMAG(lit, negate_lit(RCOMPLEX(lit)->imag));
16358  break;
16359  case T_FLOAT:
16360 #if USE_FLONUM
16361  if (FLONUM_P(lit)) {
16362  lit = DBL2NUM(-RFLOAT_VALUE(lit));
16363  break;
16364  }
16365 #endif
16366  RFLOAT(lit)->float_value = -RFLOAT_VALUE(lit);
16367  break;
16368  default:
16369  rb_parser_fatal(parser, "unknown literal type (%d) passed to negate_lit", type);
16370  break;
16371  }
16372  return lit;
16373 }
16374 
16375 static NODE *
16376 arg_blk_pass(NODE *node1, NODE *node2)
16377 {
16378  if (node2) {
16379  node2->nd_head = node1;
16380  return node2;
16381  }
16382  return node1;
16383 }
16384 
16385 
16386 static NODE*
16387 new_args_gen(struct parser_params *parser, NODE *m, NODE *o, ID r, NODE *p, NODE *tail)
16388 {
16389  int saved_line = ruby_sourceline;
16390  struct rb_args_info *args = tail->nd_ainfo;
16391 
16392  args->pre_args_num = m ? rb_long2int(m->nd_plen) : 0;
16393  args->pre_init = m ? m->nd_next : 0;
16394 
16395  args->post_args_num = p ? rb_long2int(p->nd_plen) : 0;
16396  args->post_init = p ? p->nd_next : 0;
16397  args->first_post_arg = p ? p->nd_pid : 0;
16398 
16399  args->rest_arg = r;
16400 
16401  args->opt_args = o;
16402 
16403  ruby_sourceline = saved_line;
16404 
16405  return tail;
16406 }
16407 
16408 static NODE*
16409 new_args_tail_gen(struct parser_params *parser, NODE *k, ID kr, ID b, int column)
16410 {
16411  int saved_line = ruby_sourceline;
16412  struct rb_args_info *args;
16413  NODE *node;
16414 
16415  args = ZALLOC(struct rb_args_info);
16416  node = NEW_NODE(NODE_ARGS, 0, 0, args);
16417  nd_set_column(node, column);
16418  if (parser->error_p) return node;
16419 
16420  args->block_arg = b;
16421  args->kw_args = k;
16422 
16423  if (k) {
16424  /*
16425  * def foo(k1: 1, kr1:, k2: 2, **krest, &b)
16426  * variable order: k1, kr1, k2, &b, internal_id, krest
16427  * #=> <reorder>
16428  * variable order: kr1, k1, k2, internal_id, krest, &b
16429  */
16430  ID kw_bits;
16431  NODE *kwn = k;
16432  struct vtable *required_kw_vars = vtable_alloc(NULL);
16433  struct vtable *kw_vars = vtable_alloc(NULL);
16434  int i;
16435 
16436  while (kwn) {
16437  NODE *val_node = kwn->nd_body->nd_value;
16438  ID vid = kwn->nd_body->nd_vid;
16439 
16440  if (val_node == (NODE *)-1) {
16441  vtable_add(required_kw_vars, vid);
16442  }
16443  else {
16444  vtable_add(kw_vars, vid);
16445  }
16446 
16447  kwn = kwn->nd_next;
16448  }
16449 
16450  kw_bits = internal_id();
16451  if (kr && is_junk_id(kr)) vtable_pop(lvtbl->args, 1);
16452  vtable_pop(lvtbl->args, vtable_size(required_kw_vars) + vtable_size(kw_vars) + (b != 0));
16453 
16454  for (i=0; i<vtable_size(required_kw_vars); i++) arg_var(required_kw_vars->tbl[i]);
16455  for (i=0; i<vtable_size(kw_vars); i++) arg_var(kw_vars->tbl[i]);
16456  vtable_free(required_kw_vars);
16457  vtable_free(kw_vars);
16458 
16459  arg_var(kw_bits);
16460  if (kr) arg_var(kr);
16461  if (b) arg_var(b);
16462 
16463  args->kw_rest_arg = new_dvar(kr, column);
16464  args->kw_rest_arg->nd_cflag = kw_bits;
16465  }
16466  else if (kr) {
16467  if (b) vtable_pop(lvtbl->args, 1); /* reorder */
16468  arg_var(kr);
16469  if (b) arg_var(b);
16470  args->kw_rest_arg = new_dvar(kr, column);
16471  }
16472 
16473  ruby_sourceline = saved_line;
16474  return node;
16475 }
16476 
16477 static NODE*
16478 dsym_node_gen(struct parser_params *parser, NODE *node, int column)
16479 {
16480  VALUE lit;
16481 
16482  if (!node) {
16483  return new_lit(ID2SYM(idNULL), column);
16484  }
16485 
16486  switch (nd_type(node)) {
16487  case NODE_DSTR:
16488  nd_set_type(node, NODE_DSYM);
16489  break;
16490  case NODE_STR:
16491  lit = node->nd_lit;
16492  node->nd_lit = ID2SYM(rb_intern_str(lit));
16493  nd_set_type(node, NODE_LIT);
16494  break;
16495  default:
16496  node = NEW_NODE(NODE_DSYM, Qnil, 1, new_list(node, column));
16497  nd_set_column(node, column);
16498  break;
16499  }
16500  return node;
16501 }
16502 
16503 static int
16504 append_literal_keys(st_data_t k, st_data_t v, st_data_t h)
16505 {
16506  NODE *node = (NODE *)v;
16507  NODE **result = (NODE **)h;
16508  node->nd_alen = 2;
16509  node->nd_next->nd_end = node->nd_next;
16510  node->nd_next->nd_next = 0;
16511  if (*result)
16512  list_concat(*result, node);
16513  else
16514  *result = node;
16515  return ST_CONTINUE;
16516 }
16517 
16518 static NODE *
16519 remove_duplicate_keys(struct parser_params *parser, NODE *hash, int column)
16520 {
16521  st_table *literal_keys = st_init_numtable_with_size(hash->nd_alen / 2);
16522  NODE *result = 0;
16523  while (hash && hash->nd_head && hash->nd_next) {
16524  NODE *head = hash->nd_head;
16525  NODE *value = hash->nd_next;
16526  NODE *next = value->nd_next;
16527  VALUE key = (VALUE)head;
16528  st_data_t data;
16529  if (nd_type(head) == NODE_LIT &&
16530  st_lookup(literal_keys, (key = head->nd_lit), &data)) {
16532  "key %+"PRIsVALUE" is duplicated and overwritten on line %d",
16533  head->nd_lit, nd_line(head));
16534  head = ((NODE *)data)->nd_next;
16535  head->nd_head = block_append(head->nd_head, value->nd_head, column);
16536  }
16537  else {
16538  st_insert(literal_keys, (st_data_t)key, (st_data_t)hash);
16539  }
16540  hash = next;
16541  }
16542  st_foreach(literal_keys, append_literal_keys, (st_data_t)&result);
16543  st_free_table(literal_keys);
16544  if (hash) {
16545  if (!result) result = hash;
16546  else list_concat(result, hash);
16547  }
16548  return result;
16549 }
16550 
16551 static NODE *
16552 new_hash_gen(struct parser_params *parser, NODE *hash, int column)
16553 {
16554  NODE *nd_hash;
16555  if (hash) hash = remove_duplicate_keys(parser, hash, column);
16556  nd_hash = NEW_HASH(hash);
16557  nd_set_column(nd_hash, column);
16558  return nd_hash;
16559 }
16560 #endif /* !RIPPER */
16561 
16562 #ifndef RIPPER
16563 static NODE *
16564 new_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs, int column)
16565 {
16566  NODE *asgn;
16567 
16568  if (lhs) {
16569  ID vid = lhs->nd_vid;
16570  if (op == tOROP) {
16571  lhs->nd_value = rhs;
16572  asgn = NEW_OP_ASGN_OR(gettable(vid, column), lhs);
16573  nd_set_column(asgn, column);
16574  if (is_notop_id(vid)) {
16575  switch (id_type(vid)) {
16576  case ID_GLOBAL:
16577  case ID_INSTANCE:
16578  case ID_CLASS:
16579  asgn->nd_aid = vid;
16580  }
16581  }
16582  }
16583  else if (op == tANDOP) {
16584  lhs->nd_value = rhs;
16585  asgn = NEW_OP_ASGN_AND(gettable(vid, column), lhs);
16586  nd_set_column(asgn, column);
16587  }
16588  else {
16589  asgn = lhs;
16590  asgn->nd_value = new_call(gettable(vid, column), op, new_list(rhs, column), column);
16591  }
16592  }
16593  else {
16594  asgn = new_begin(0, column);
16595  }
16596  return asgn;
16597 }
16598 
16599 static NODE *
16600 new_attr_op_assign_gen(struct parser_params *parser, NODE *lhs,
16601  ID atype, ID attr, ID op, NODE *rhs, int column)
16602 {
16603  NODE *asgn;
16604 
16605  if (op == tOROP) {
16606  op = 0;
16607  }
16608  else if (op == tANDOP) {
16609  op = 1;
16610  }
16611  asgn = NEW_OP_ASGN2(lhs, CALL_Q_P(atype), attr, op, rhs);
16612  nd_set_column(asgn, column);
16613  fixpos(asgn, lhs);
16614  return asgn;
16615 }
16616 
16617 static NODE *
16618 new_const_op_assign_gen(struct parser_params *parser, NODE *lhs, ID op, NODE *rhs, int column)
16619 {
16620  NODE *asgn;
16621 
16622  if (op == tOROP) {
16623  op = 0;
16624  }
16625  else if (op == tANDOP) {
16626  op = 1;
16627  }
16628  if (lhs) {
16629  asgn = NEW_OP_CDECL(lhs, op, rhs);
16630  }
16631  else {
16632  asgn = new_begin(0, column);
16633  }
16634  fixpos(asgn, lhs);
16635  nd_set_column(asgn, column);
16636  return asgn;
16637 }
16638 
16639 static NODE *
16640 const_path_field_gen(struct parser_params *parser, NODE *head, ID mid, int column)
16641 {
16642  NODE *colon2 = NEW_COLON2(head, mid);
16643  nd_set_column(colon2, column);
16644  return colon2;
16645 }
16646 
16647 static NODE *
16648 const_decl_gen(struct parser_params *parser, NODE *path, int column)
16649 {
16650  if (in_def || in_single) {
16651  yyerror0("dynamic constant assignment");
16652  }
16653  return new_cdecl(0, 0, (path), column);
16654 }
16655 #else
16656 static VALUE
16657 new_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE op, VALUE rhs)
16658 {
16659  return dispatch3(opassign, lhs, op, rhs);
16660 }
16661 
16662 static VALUE
16663 new_attr_op_assign_gen(struct parser_params *parser, VALUE lhs, VALUE type, VALUE attr, VALUE op, VALUE rhs)
16664 {
16665  VALUE recv = dispatch3(field, lhs, type, attr);
16666  return dispatch3(opassign, recv, op, rhs);
16667 }
16668 
16669 static VALUE
16670 new_qcall_gen(struct parser_params *parser, VALUE r, VALUE q, VALUE m, VALUE a)
16671 {
16672  VALUE ret = dispatch3(call, (r), (q), (m));
16673  return method_optarg(ret, (a));
16674 }
16675 
16676 static VALUE
16677 const_decl_gen(struct parser_params *parser, VALUE path)
16678 {
16679  if (in_def || in_single) {
16680  path = dispatch1(assign_error, path);
16681  ripper_error();
16682  }
16683  return path;
16684 }
16685 
16686 static VALUE
16687 assign_error_gen(struct parser_params *parser, VALUE a)
16688 {
16689  a = dispatch1(assign_error, a);
16690  ripper_error();
16691  return a;
16692 }
16693 
16694 static VALUE
16695 var_field_gen(struct parser_params *parser, VALUE a)
16696 {
16697  return ripper_new_yylval(get_id(a), dispatch1(var_field, a), 0);
16698 }
16699 #endif
16700 
16701 static void
16702 warn_unused_var(struct parser_params *parser, struct local_vars *local)
16703 {
16704  int i, cnt;
16705  ID *v, *u;
16706 
16707  if (!local->used) return;
16708  v = local->vars->tbl;
16709  u = local->used->tbl;
16710  cnt = local->used->pos;
16711  if (cnt != local->vars->pos) {
16712  rb_parser_fatal(parser, "local->used->pos != local->vars->pos");
16713  }
16714  for (i = 0; i < cnt; ++i) {
16715  if (!v[i] || (u[i] & LVAR_USED)) continue;
16716  if (is_private_local_id(v[i])) continue;
16717  rb_warn1L((int)u[i], "assigned but unused variable - %"PRIsWARN, rb_id2str(v[i]));
16718  }
16719 }
16720 
16721 static void
16722 local_push_gen(struct parser_params *parser, int inherit_dvars)
16723 {
16724  struct local_vars *local;
16725 
16726  local = ALLOC(struct local_vars);
16727  local->prev = lvtbl;
16728  local->args = vtable_alloc(0);
16729  local->vars = vtable_alloc(inherit_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE);
16730  local->used = !(inherit_dvars &&
16731  (ifndef_ripper(compile_for_eval || e_option_supplied(parser))+0)) &&
16732  RTEST(ruby_verbose) ? vtable_alloc(0) : 0;
16733 # if WARN_PAST_SCOPE
16734  local->past = 0;
16735 # endif
16736  local->cmdargs = cmdarg_stack;
16737  CMDARG_SET(0);
16738  lvtbl = local;
16739 }
16740 
16741 static void
16742 local_pop_gen(struct parser_params *parser)
16743 {
16744  struct local_vars *local = lvtbl->prev;
16745  if (lvtbl->used) {
16746  warn_unused_var(parser, lvtbl);
16747  vtable_free(lvtbl->used);
16748  }
16749 # if WARN_PAST_SCOPE
16750  while (lvtbl->past) {
16751  struct vtable *past = lvtbl->past;
16752  lvtbl->past = past->prev;
16753  vtable_free(past);
16754  }
16755 # endif
16756  vtable_free(lvtbl->args);
16757  vtable_free(lvtbl->vars);
16758  CMDARG_SET(lvtbl->cmdargs);
16759  xfree(lvtbl);
16760  lvtbl = local;
16761 }
16762 
16763 #ifndef RIPPER
16764 static ID*
16765 local_tbl_gen(struct parser_params *parser)
16766 {
16767  int cnt_args = vtable_size(lvtbl->args);
16768  int cnt_vars = vtable_size(lvtbl->vars);
16769  int cnt = cnt_args + cnt_vars;
16770  int i, j;
16771  ID *buf;
16772 
16773  if (cnt <= 0) return 0;
16774  buf = ALLOC_N(ID, cnt + 1);
16775  MEMCPY(buf+1, lvtbl->args->tbl, ID, cnt_args);
16776  /* remove IDs duplicated to warn shadowing */
16777  for (i = 0, j = cnt_args+1; i < cnt_vars; ++i) {
16778  ID id = lvtbl->vars->tbl[i];
16779  if (!vtable_included(lvtbl->args, id)) {
16780  buf[j++] = id;
16781  }
16782  }
16783  if (--j < cnt) REALLOC_N(buf, ID, (cnt = j) + 1);
16784  buf[0] = cnt;
16785  return buf;
16786 }
16787 #endif
16788 
16789 static void
16790 arg_var_gen(struct parser_params *parser, ID id)
16791 {
16792  vtable_add(lvtbl->args, id);
16793 }
16794 
16795 static void
16796 local_var_gen(struct parser_params *parser, ID id)
16797 {
16798  vtable_add(lvtbl->vars, id);
16799  if (lvtbl->used) {
16801  }
16802 }
16803 
16804 static int
16805 local_id_gen(struct parser_params *parser, ID id, ID **vidrefp)
16806 {
16807  struct vtable *vars, *args, *used;
16808 
16809  vars = lvtbl->vars;
16810  args = lvtbl->args;
16811  used = lvtbl->used;
16812 
16813  while (vars && POINTER_P(vars->prev)) {
16814  vars = vars->prev;
16815  args = args->prev;
16816  if (used) used = used->prev;
16817  }
16818 
16819  if (vars && vars->prev == DVARS_INHERIT) {
16820  return rb_local_defined(id, parser->base_block);
16821  }
16822  else if (vtable_included(args, id)) {
16823  return 1;
16824  }
16825  else {
16826  int i = vtable_included(vars, id);
16827  if (i && used && vidrefp) *vidrefp = &used->tbl[i-1];
16828  return i != 0;
16829  }
16830 }
16831 
16832 static const struct vtable *
16833 dyna_push_gen(struct parser_params *parser)
16834 {
16835  lvtbl->args = vtable_alloc(lvtbl->args);
16836  lvtbl->vars = vtable_alloc(lvtbl->vars);
16837  if (lvtbl->used) {
16838  lvtbl->used = vtable_alloc(lvtbl->used);
16839  }
16840  return lvtbl->args;
16841 }
16842 
16843 static void
16844 dyna_pop_vtable(struct parser_params *parser, struct vtable **vtblp)
16845 {
16846  struct vtable *tmp = *vtblp;
16847  *vtblp = tmp->prev;
16848 # if WARN_PAST_SCOPE
16849  if (parser->past_scope_enabled) {
16850  tmp->prev = lvtbl->past;
16851  lvtbl->past = tmp;
16852  return;
16853  }
16854 # endif
16855  vtable_free(tmp);
16856 }
16857 
16858 static void
16859 dyna_pop_1(struct parser_params *parser)
16860 {
16861  struct vtable *tmp;
16862 
16863  if ((tmp = lvtbl->used) != 0) {
16864  warn_unused_var(parser, lvtbl);
16865  lvtbl->used = lvtbl->used->prev;
16866  vtable_free(tmp);
16867  }
16868  dyna_pop_vtable(parser, &lvtbl->args);
16869  dyna_pop_vtable(parser, &lvtbl->vars);
16870 }
16871 
16872 static void
16873 dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs)
16874 {
16875  while (lvtbl->args != lvargs) {
16876  dyna_pop_1(parser);
16877  if (!lvtbl->args) {
16878  struct local_vars *local = lvtbl->prev;
16879  xfree(lvtbl);
16880  lvtbl = local;
16881  }
16882  }
16883  dyna_pop_1(parser);
16884 }
16885 
16886 static int
16887 dyna_in_block_gen(struct parser_params *parser)
16888 {
16889  return POINTER_P(lvtbl->vars) && lvtbl->vars->prev != DVARS_TOPSCOPE;
16890 }
16891 
16892 static int
16893 dvar_defined_gen(struct parser_params *parser, ID id, ID **vidrefp)
16894 {
16895  struct vtable *vars, *args, *used;
16896  int i;
16897 
16898  args = lvtbl->args;
16899  vars = lvtbl->vars;
16900  used = lvtbl->used;
16901 
16902  while (POINTER_P(vars)) {
16903  if (vtable_included(args, id)) {
16904  return 1;
16905  }
16906  if ((i = vtable_included(vars, id)) != 0) {
16907  if (used && vidrefp) *vidrefp = &used->tbl[i-1];
16908  return 1;
16909  }
16910  args = args->prev;
16911  vars = vars->prev;
16912  if (!vidrefp) used = 0;
16913  if (used) used = used->prev;
16914  }
16915 
16916  if (vars == DVARS_INHERIT) {
16917  return rb_dvar_defined(id, parser->base_block);
16918  }
16919 
16920  return 0;
16921 }
16922 
16923 static int
16924 dvar_curr_gen(struct parser_params *parser, ID id)
16925 {
16926  return (vtable_included(lvtbl->args, id) ||
16927  vtable_included(lvtbl->vars, id));
16928 }
16929 
16930 static void
16931 reg_fragment_enc_error(struct parser_params* parser, VALUE str, int c)
16932 {
16934  "regexp encoding option '%c' differs from source encoding '%s'",
16935  c, rb_enc_name(rb_enc_get(str)));
16936 }
16937 
16938 #ifndef RIPPER
16939 int
16940 rb_reg_fragment_setenc(struct parser_params* parser, VALUE str, int options)
16941 {
16942  int c = RE_OPTION_ENCODING_IDX(options);
16943 
16944  if (c) {
16945  int opt, idx;
16946  rb_char_to_option_kcode(c, &opt, &idx);
16947  if (idx != ENCODING_GET(str) &&
16949  goto error;
16950  }
16951  ENCODING_SET(str, idx);
16952  }
16953  else if (RE_OPTION_ENCODING_NONE(options)) {
16954  if (!ENCODING_IS_ASCII8BIT(str) &&
16956  c = 'n';
16957  goto error;
16958  }
16960  }
16961  else if (current_enc == rb_usascii_encoding()) {
16963  /* raise in re.c */
16965  }
16966  else {
16968  }
16969  }
16970  return 0;
16971 
16972  error:
16973  return c;
16974 }
16975 
16976 static void
16977 reg_fragment_setenc_gen(struct parser_params* parser, VALUE str, int options)
16978 {
16979  int c = rb_reg_fragment_setenc(parser, str, options);
16980  if (c) reg_fragment_enc_error(parser, str, c);
16981 }
16982 
16983 static int
16984 reg_fragment_check_gen(struct parser_params* parser, VALUE str, int options)
16985 {
16986  VALUE err;
16987  reg_fragment_setenc(str, options);
16988  err = rb_reg_check_preprocess(str);
16989  if (err != Qnil) {
16990  err = rb_obj_as_string(err);
16992  return 0;
16993  }
16994  return 1;
16995 }
16996 
16997 typedef struct {
16998  struct parser_params* parser;
16999  rb_encoding *enc;
17000  NODE *succ_block;
17001  int column;
17003 
17004 static int
17005 reg_named_capture_assign_iter(const OnigUChar *name, const OnigUChar *name_end,
17006  int back_num, int *back_refs, OnigRegex regex, void *arg0)
17007 {
17009  struct parser_params* parser = arg->parser;
17010  rb_encoding *enc = arg->enc;
17011  long len = name_end - name;
17012  const char *s = (const char *)name;
17013  ID var;
17014  NODE *node, *succ;
17015 
17016  if (!len || (*name != '_' && ISASCII(*name) && !rb_enc_islower(*name, enc)) ||
17017  (len < MAX_WORD_LENGTH && rb_reserved_word(s, (int)len)) ||
17018  !rb_enc_symname2_p(s, len, enc)) {
17019  return ST_CONTINUE;
17020  }
17021  var = intern_cstr(s, len, enc);
17022  node = node_assign(assignable(var, 0, arg->column), new_lit(ID2SYM(var), arg->column), arg->column);
17023  succ = arg->succ_block;
17024  if (!succ) succ = new_begin(0, arg->column);
17025  succ = block_append(succ, node, arg->column);
17026  arg->succ_block = succ;
17027  return ST_CONTINUE;
17028 }
17029 
17030 static NODE *
17031 reg_named_capture_assign_gen(struct parser_params* parser, VALUE regexp, int column)
17032 {
17034 
17035  arg.parser = parser;
17036  arg.enc = rb_enc_get(regexp);
17037  arg.succ_block = 0;
17038  arg.column = column;
17039  onig_foreach_name(RREGEXP_PTR(regexp), reg_named_capture_assign_iter, &arg);
17040 
17041  if (!arg.succ_block) return 0;
17042  return arg.succ_block->nd_next;
17043 }
17044 
17045 static VALUE
17046 parser_reg_compile(struct parser_params* parser, VALUE str, int options)
17047 {
17048  reg_fragment_setenc(str, options);
17049  return rb_parser_reg_compile(parser, str, options);
17050 }
17051 
17052 VALUE
17053 rb_parser_reg_compile(struct parser_params* parser, VALUE str, int options)
17054 {
17056 }
17057 
17058 static VALUE
17059 reg_compile_gen(struct parser_params* parser, VALUE str, int options)
17060 {
17061  VALUE re;
17062  VALUE err;
17063 
17064  err = rb_errinfo();
17065  re = parser_reg_compile(parser, str, options);
17066  if (NIL_P(re)) {
17067  VALUE m = rb_attr_get(rb_errinfo(), idMesg);
17068  rb_set_errinfo(err);
17070  return Qnil;
17071  }
17072  return re;
17073 }
17074 #else
17075 static VALUE
17076 parser_reg_compile(struct parser_params* parser, VALUE str, int options, VALUE *errmsg)
17077 {
17078  VALUE err = rb_errinfo();
17079  VALUE re;
17080  int c = rb_reg_fragment_setenc(parser, str, options);
17081  if (c) reg_fragment_enc_error(parser, str, c);
17082  re = rb_parser_reg_compile(parser, str, options);
17083  if (NIL_P(re)) {
17084  *errmsg = rb_attr_get(rb_errinfo(), idMesg);
17085  rb_set_errinfo(err);
17086  }
17087  return re;
17088 }
17089 #endif
17090 
17091 #ifndef RIPPER
17092 NODE*
17094 {
17095  NODE *prelude = 0;
17096  NODE *scope = node;
17097  struct parser_params *parser;
17098 
17099  if (!node) return node;
17100 
17101  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
17102 
17103  node = node->nd_body;
17104 
17105  if (nd_type(node) == NODE_PRELUDE) {
17106  prelude = node;
17107  node = node->nd_body;
17108  }
17109 
17110  node = block_append(node,
17111  new_fcall(rb_intern("print"),
17112  NEW_ARRAY(new_gvar(idLASTLINE, 0)), 0),
17113  0);
17114  if (prelude) {
17115  prelude->nd_body = node;
17116  scope->nd_body = prelude;
17117  }
17118  else {
17119  scope->nd_body = node;
17120  }
17121 
17122  return scope;
17123 }
17124 
17125 NODE *
17126 rb_parser_while_loop(VALUE vparser, NODE *node, int chomp, int split)
17127 {
17128  NODE *prelude = 0;
17129  NODE *scope = node;
17130  struct parser_params *parser;
17131 
17132  if (!node) return node;
17133 
17134  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
17135 
17136  node = node->nd_body;
17137 
17138  if (nd_type(node) == NODE_PRELUDE) {
17139  prelude = node;
17140  node = node->nd_body;
17141  }
17142  if (split) {
17143  node = block_append(NEW_GASGN(rb_intern("$F"),
17144  new_call(new_gvar(idLASTLINE, 0),
17145  rb_intern("split"), 0, 0)),
17146  node, 0);
17147  }
17148  if (chomp) {
17149  node = block_append(new_call(new_gvar(idLASTLINE, 0),
17150  rb_intern("chomp!"), 0, 0), node, 0);
17151  }
17152 
17153  node = NEW_OPT_N(node);
17154 
17155  if (prelude) {
17156  prelude->nd_body = node;
17157  scope->nd_body = prelude;
17158  }
17159  else {
17160  scope->nd_body = node;
17161  }
17162 
17163  return scope;
17164 }
17165 
17166 void
17168 {
17169  /* just to suppress unused-function warnings */
17170  (void)nodetype;
17171  (void)nodeline;
17172 }
17173 #endif /* !RIPPER */
17174 
17175 static ID
17176 internal_id_gen(struct parser_params *parser)
17177 {
17178  ID id = (ID)vtable_size(lvtbl->args) + (ID)vtable_size(lvtbl->vars);
17179  id += ((tLAST_TOKEN - ID_INTERNAL) >> ID_SCOPE_SHIFT) + 1;
17180  return ID_STATIC_SYM | ID_INTERNAL | (id << ID_SCOPE_SHIFT);
17181 }
17182 
17183 static void
17184 parser_initialize(struct parser_params *parser)
17185 {
17186  /* note: we rely on TypedData_Make_Struct to set most fields to 0 */
17187  command_start = TRUE;
17189 #ifdef RIPPER
17190  parser->delayed = Qnil;
17191  parser->result = Qnil;
17192  parser->parsing_thread = Qnil;
17193 #else
17194  parser->error_buffer = Qfalse;
17195 #endif
17196  parser->debug_buffer = Qnil;
17197  parser->debug_output = rb_stdout;
17198  parser->enc = rb_utf8_encoding();
17199 }
17200 
17201 #ifdef RIPPER
17202 #define parser_mark ripper_parser_mark
17203 #define parser_free ripper_parser_free
17204 #endif
17205 
17206 static void
17207 parser_mark(void *ptr)
17208 {
17209  struct parser_params *parser = (struct parser_params*)ptr;
17210 
17216 #ifndef RIPPER
17220  rb_gc_mark(parser->compile_option);
17221  rb_gc_mark(parser->error_buffer);
17222 #else
17223  rb_gc_mark(parser->delayed);
17224  rb_gc_mark(parser->value);
17225  rb_gc_mark(parser->result);
17226  rb_gc_mark(parser->parsing_thread);
17227 #endif
17228  rb_gc_mark(parser->debug_buffer);
17229  rb_gc_mark(parser->debug_output);
17230 #ifdef YYMALLOC
17231  rb_gc_mark((VALUE)parser->heap);
17232 #endif
17233 }
17234 
17235 static void
17236 parser_free(void *ptr)
17237 {
17238  struct parser_params *parser = (struct parser_params*)ptr;
17239  struct local_vars *local, *prev;
17240 
17241  if (tokenbuf) {
17242  xfree(tokenbuf);
17243  }
17244  for (local = lvtbl; local; local = prev) {
17245  if (local->vars) xfree(local->vars);
17246  prev = local->prev;
17247  xfree(local);
17248  }
17249  {
17250  token_info *ptinfo;
17251  while ((ptinfo = parser->token_info) != 0) {
17252  parser->token_info = ptinfo->next;
17253  xfree(ptinfo);
17254  }
17255  }
17256  xfree(ptr);
17257 }
17258 
17259 static size_t
17260 parser_memsize(const void *ptr)
17261 {
17262  struct parser_params *parser = (struct parser_params*)ptr;
17263  struct local_vars *local;
17264  size_t size = sizeof(*parser);
17265 
17266  size += toksiz;
17267  for (local = lvtbl; local; local = local->prev) {
17268  size += sizeof(*local);
17269  if (local->vars) size += local->vars->capa * sizeof(ID);
17270  }
17271  return size;
17272 }
17273 
17274 static const rb_data_type_t parser_data_type = {
17275 #ifndef RIPPER
17276  "parser",
17277 #else
17278  "ripper",
17279 #endif
17280  {
17281  parser_mark,
17282  parser_free,
17283  parser_memsize,
17284  },
17286 };
17287 
17288 #ifndef RIPPER
17289 #undef rb_reserved_word
17290 
17291 const struct kwtable *
17292 rb_reserved_word(const char *str, unsigned int len)
17293 {
17294  return reserved_word(str, len);
17295 }
17296 
17297 VALUE
17299 {
17300  struct parser_params *p;
17301  VALUE parser = TypedData_Make_Struct(0, struct parser_params,
17302  &parser_data_type, p);
17303  parser_initialize(p);
17304  return parser;
17305 }
17306 
17307 VALUE
17308 rb_parser_set_context(VALUE vparser, const struct rb_block *base, int main)
17309 {
17310  struct parser_params *parser;
17311 
17312  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
17313  parser->error_buffer = main ? Qfalse : Qnil;
17314  parser->base_block = base;
17315  in_main = main;
17316  return vparser;
17317 }
17318 #endif
17319 
17320 #ifdef RIPPER
17321 #define rb_parser_end_seen_p ripper_parser_end_seen_p
17322 #define rb_parser_encoding ripper_parser_encoding
17323 #define rb_parser_get_yydebug ripper_parser_get_yydebug
17324 #define rb_parser_set_yydebug ripper_parser_set_yydebug
17325 static VALUE ripper_parser_end_seen_p(VALUE vparser);
17326 static VALUE ripper_parser_encoding(VALUE vparser);
17327 static VALUE ripper_parser_get_yydebug(VALUE self);
17328 static VALUE ripper_parser_set_yydebug(VALUE self, VALUE flag);
17329 
17330 /*
17331  * call-seq:
17332  * ripper.error? -> Boolean
17333  *
17334  * Return true if parsed source has errors.
17335  */
17336 static VALUE
17337 ripper_error_p(VALUE vparser)
17338 {
17339  struct parser_params *parser;
17340 
17341  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
17342  return parser->error_p ? Qtrue : Qfalse;
17343 }
17344 #endif
17345 
17346 /*
17347  * call-seq:
17348  * ripper.end_seen? -> Boolean
17349  *
17350  * Return true if parsed source ended by +\_\_END\_\_+.
17351  */
17352 VALUE
17354 {
17355  struct parser_params *parser;
17356 
17357  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
17358  return ruby__end__seen ? Qtrue : Qfalse;
17359 }
17360 
17361 /*
17362  * call-seq:
17363  * ripper.encoding -> encoding
17364  *
17365  * Return encoding of the source.
17366  */
17367 VALUE
17369 {
17370  struct parser_params *parser;
17371 
17372  TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, parser);
17374 }
17375 
17376 /*
17377  * call-seq:
17378  * ripper.yydebug -> true or false
17379  *
17380  * Get yydebug.
17381  */
17382 VALUE
17384 {
17385  struct parser_params *parser;
17386 
17387  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
17388  return yydebug ? Qtrue : Qfalse;
17389 }
17390 
17391 /*
17392  * call-seq:
17393  * ripper.yydebug = flag
17394  *
17395  * Set yydebug.
17396  */
17397 VALUE
17399 {
17400  struct parser_params *parser;
17401 
17402  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
17403  yydebug = RTEST(flag);
17404  return flag;
17405 }
17406 
17407 #ifndef RIPPER
17408 #ifdef YYMALLOC
17409 #define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE))
17410 #define NEWHEAP() (rb_imemo_alloc_t *)rb_imemo_new(imemo_alloc, 0, (VALUE)parser->heap, 0, 0)
17411 #define ADD2HEAP(n, c, p) ((parser->heap = (n))->ptr = (p), \
17412  (n)->cnt = (c), (p))
17413 
17414 void *
17415 rb_parser_malloc(struct parser_params *parser, size_t size)
17416 {
17417  size_t cnt = HEAPCNT(1, size);
17418  rb_imemo_alloc_t *n = NEWHEAP();
17419  void *ptr = xmalloc(size);
17420 
17421  return ADD2HEAP(n, cnt, ptr);
17422 }
17423 
17424 void *
17425 rb_parser_calloc(struct parser_params *parser, size_t nelem, size_t size)
17426 {
17427  size_t cnt = HEAPCNT(nelem, size);
17428  rb_imemo_alloc_t *n = NEWHEAP();
17429  void *ptr = xcalloc(nelem, size);
17430 
17431  return ADD2HEAP(n, cnt, ptr);
17432 }
17433 
17434 void *
17435 rb_parser_realloc(struct parser_params *parser, void *ptr, size_t size)
17436 {
17437  rb_imemo_alloc_t *n;
17438  size_t cnt = HEAPCNT(1, size);
17439 
17440  if (ptr && (n = parser->heap) != NULL) {
17441  do {
17442  if (n->ptr == ptr) {
17443  n->ptr = ptr = xrealloc(ptr, size);
17444  if (n->cnt) n->cnt = cnt;
17445  return ptr;
17446  }
17447  } while ((n = n->next) != NULL);
17448  }
17449  n = NEWHEAP();
17450  ptr = xrealloc(ptr, size);
17451  return ADD2HEAP(n, cnt, ptr);
17452 }
17453 
17454 void
17455 rb_parser_free(struct parser_params *parser, void *ptr)
17456 {
17457  rb_imemo_alloc_t **prev = &parser->heap, *n;
17458 
17459  while ((n = *prev) != NULL) {
17460  if (n->ptr == ptr) {
17461  *prev = n->next;
17463  break;
17464  }
17465  prev = &n->next;
17466  }
17467  xfree(ptr);
17468 }
17469 #endif
17470 
17471 void
17472 rb_parser_printf(struct parser_params *parser, const char *fmt, ...)
17473 {
17474  va_list ap;
17475  VALUE mesg = parser->debug_buffer;
17476 
17477  if (NIL_P(mesg)) parser->debug_buffer = mesg = rb_str_new(0, 0);
17478  va_start(ap, fmt);
17479  rb_str_vcatf(mesg, fmt, ap);
17480  va_end(ap);
17481  if (RSTRING_END(mesg)[-1] == '\n') {
17482  rb_io_write(parser->debug_output, mesg);
17483  parser->debug_buffer = Qnil;
17484  }
17485 }
17486 
17487 static void
17488 parser_compile_error(struct parser_params *parser, const char *fmt, ...)
17489 {
17490  va_list ap;
17491 
17492  rb_io_flush(parser->debug_output);
17493  parser->error_p = 1;
17494  va_start(ap, fmt);
17495  parser->error_buffer =
17500  current_enc, fmt, ap);
17501  va_end(ap);
17502 }
17503 #endif
17504 
17505 #ifdef RIPPER
17506 #ifdef RIPPER_DEBUG
17507 extern int rb_is_pointer_to_heap(VALUE);
17508 
17509 /* :nodoc: */
17510 static VALUE
17511 ripper_validate_object(VALUE self, VALUE x)
17512 {
17513  if (x == Qfalse) return x;
17514  if (x == Qtrue) return x;
17515  if (x == Qnil) return x;
17516  if (x == Qundef)
17517  rb_raise(rb_eArgError, "Qundef given");
17518  if (FIXNUM_P(x)) return x;
17519  if (SYMBOL_P(x)) return x;
17520  if (!rb_is_pointer_to_heap(x))
17521  rb_raise(rb_eArgError, "invalid pointer: %p", x);
17522  switch (BUILTIN_TYPE(x)) {
17523  case T_STRING:
17524  case T_OBJECT:
17525  case T_ARRAY:
17526  case T_BIGNUM:
17527  case T_FLOAT:
17528  case T_COMPLEX:
17529  case T_RATIONAL:
17530  return x;
17531  case T_NODE:
17532  if (nd_type(x) != NODE_RIPPER) {
17533  rb_raise(rb_eArgError, "NODE given: %p", x);
17534  }
17535  return ((NODE *)x)->nd_rval;
17536  default:
17537  rb_raise(rb_eArgError, "wrong type of ruby object: %p (%s)",
17538  x, rb_obj_classname(x));
17539  }
17540  return x;
17541 }
17542 #endif
17543 
17544 #define validate(x) ((x) = get_value(x))
17545 
17546 static VALUE
17547 ripper_dispatch0(struct parser_params *parser, ID mid)
17548 {
17549  return rb_funcall(parser->value, mid, 0);
17550 }
17551 
17552 static VALUE
17553 ripper_dispatch1(struct parser_params *parser, ID mid, VALUE a)
17554 {
17555  validate(a);
17556  return rb_funcall(parser->value, mid, 1, a);
17557 }
17558 
17559 static VALUE
17560 ripper_dispatch2(struct parser_params *parser, ID mid, VALUE a, VALUE b)
17561 {
17562  validate(a);
17563  validate(b);
17564  return rb_funcall(parser->value, mid, 2, a, b);
17565 }
17566 
17567 static VALUE
17568 ripper_dispatch3(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c)
17569 {
17570  validate(a);
17571  validate(b);
17572  validate(c);
17573  return rb_funcall(parser->value, mid, 3, a, b, c);
17574 }
17575 
17576 static VALUE
17577 ripper_dispatch4(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d)
17578 {
17579  validate(a);
17580  validate(b);
17581  validate(c);
17582  validate(d);
17583  return rb_funcall(parser->value, mid, 4, a, b, c, d);
17584 }
17585 
17586 static VALUE
17587 ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e)
17588 {
17589  validate(a);
17590  validate(b);
17591  validate(c);
17592  validate(d);
17593  validate(e);
17594  return rb_funcall(parser->value, mid, 5, a, b, c, d, e);
17595 }
17596 
17597 static VALUE
17598 ripper_dispatch7(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c, VALUE d, VALUE e, VALUE f, VALUE g)
17599 {
17600  validate(a);
17601  validate(b);
17602  validate(c);
17603  validate(d);
17604  validate(e);
17605  validate(f);
17606  validate(g);
17607  return rb_funcall(parser->value, mid, 7, a, b, c, d, e, f, g);
17608 }
17609 
17610 static ID
17611 ripper_get_id(VALUE v)
17612 {
17613  NODE *nd;
17614  if (!RB_TYPE_P(v, T_NODE)) return 0;
17615  nd = (NODE *)v;
17616  if (nd_type(nd) != NODE_RIPPER) return 0;
17617  return nd->nd_vid;
17618 }
17619 
17620 static VALUE
17621 ripper_get_value(VALUE v)
17622 {
17623  NODE *nd;
17624  if (v == Qundef) return Qnil;
17625  if (!RB_TYPE_P(v, T_NODE)) return v;
17626  nd = (NODE *)v;
17627  if (nd_type(nd) != NODE_RIPPER) return Qnil;
17628  return nd->nd_rval;
17629 }
17630 
17631 static void
17632 ripper_error_gen(struct parser_params *parser)
17633 {
17634  parser->error_p = TRUE;
17635 }
17636 
17637 static void
17638 ripper_compile_error(struct parser_params *parser, const char *fmt, ...)
17639 {
17640  VALUE str;
17641  va_list args;
17642 
17643  va_start(args, fmt);
17644  str = rb_vsprintf(fmt, args);
17645  va_end(args);
17646  rb_funcall(parser->value, rb_intern("compile_error"), 1, str);
17647  ripper_error_gen(parser);
17648 }
17649 
17650 static VALUE
17651 ripper_lex_get_generic(struct parser_params *parser, VALUE src)
17652 {
17653  VALUE line = rb_funcallv_public(src, id_gets, 0, 0);
17654  if (!NIL_P(line) && !RB_TYPE_P(line, T_STRING)) {
17656  "gets returned %"PRIsVALUE" (expected String or nil)",
17657  rb_obj_class(line));
17658  }
17659  return line;
17660 }
17661 
17662 static VALUE
17663 ripper_lex_io_get(struct parser_params *parser, VALUE src)
17664 {
17665  return rb_io_gets(src);
17666 }
17667 
17668 static VALUE
17669 ripper_s_allocate(VALUE klass)
17670 {
17671  struct parser_params *p;
17672  VALUE self = TypedData_Make_Struct(klass, struct parser_params,
17673  &parser_data_type, p);
17674  p->value = self;
17675  return self;
17676 }
17677 
17678 #define ripper_initialized_p(r) ((r)->lex.input != 0)
17679 
17680 /*
17681  * call-seq:
17682  * Ripper.new(src, filename="(ripper)", lineno=1) -> ripper
17683  *
17684  * Create a new Ripper object.
17685  * _src_ must be a String, an IO, or an Object which has #gets method.
17686  *
17687  * This method does not starts parsing.
17688  * See also Ripper#parse and Ripper.parse.
17689  */
17690 static VALUE
17691 ripper_initialize(int argc, VALUE *argv, VALUE self)
17692 {
17693  struct parser_params *parser;
17694  VALUE src, fname, lineno;
17695 
17696  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
17697  rb_scan_args(argc, argv, "12", &src, &fname, &lineno);
17698  if (RB_TYPE_P(src, T_FILE)) {
17699  lex_gets = ripper_lex_io_get;
17700  }
17701  else if (rb_respond_to(src, id_gets)) {
17702  lex_gets = ripper_lex_get_generic;
17703  }
17704  else {
17705  StringValue(src);
17706  lex_gets = lex_get_str;
17707  }
17708  lex_input = src;
17709  parser->eofp = 0;
17710  if (NIL_P(fname)) {
17711  fname = STR_NEW2("(ripper)");
17712  OBJ_FREEZE(fname);
17713  }
17714  else {
17715  StringValueCStr(fname);
17716  fname = rb_str_new_frozen(fname);
17717  }
17718  parser_initialize(parser);
17719 
17720  ruby_sourcefile_string = fname;
17721  ruby_sourcefile = RSTRING_PTR(fname);
17722  ruby_sourceline = NIL_P(lineno) ? 0 : NUM2INT(lineno) - 1;
17723 
17724  return Qnil;
17725 }
17726 
17727 struct ripper_args {
17728  struct parser_params *parser;
17729  int argc;
17730  VALUE *argv;
17731 };
17732 
17733 static VALUE
17734 ripper_parse0(VALUE parser_v)
17735 {
17736  struct parser_params *parser;
17737 
17738  TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser);
17739  parser_prepare(parser);
17740  ripper_yyparse((void*)parser);
17741  return parser->result;
17742 }
17743 
17744 static VALUE
17745 ripper_ensure(VALUE parser_v)
17746 {
17747  struct parser_params *parser;
17748 
17749  TypedData_Get_Struct(parser_v, struct parser_params, &parser_data_type, parser);
17750  parser->parsing_thread = Qnil;
17751  return Qnil;
17752 }
17753 
17754 /*
17755  * call-seq:
17756  * ripper.parse
17757  *
17758  * Start parsing and returns the value of the root action.
17759  */
17760 static VALUE
17761 ripper_parse(VALUE self)
17762 {
17763  struct parser_params *parser;
17764 
17765  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
17766  if (!ripper_initialized_p(parser)) {
17767  rb_raise(rb_eArgError, "method called for uninitialized object");
17768  }
17769  if (!NIL_P(parser->parsing_thread)) {
17770  if (parser->parsing_thread == rb_thread_current())
17771  rb_raise(rb_eArgError, "Ripper#parse is not reentrant");
17772  else
17773  rb_raise(rb_eArgError, "Ripper#parse is not multithread-safe");
17774  }
17775  parser->parsing_thread = rb_thread_current();
17776  rb_ensure(ripper_parse0, self, ripper_ensure, self);
17777 
17778  return parser->result;
17779 }
17780 
17781 /*
17782  * call-seq:
17783  * ripper.column -> Integer
17784  *
17785  * Return column number of current parsing line.
17786  * This number starts from 0.
17787  */
17788 static VALUE
17789 ripper_column(VALUE self)
17790 {
17791  struct parser_params *parser;
17792  long col;
17793 
17794  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
17795  if (!ripper_initialized_p(parser)) {
17796  rb_raise(rb_eArgError, "method called for uninitialized object");
17797  }
17798  if (NIL_P(parser->parsing_thread)) return Qnil;
17799  col = parser->tokp - lex_pbeg;
17800  return LONG2NUM(col);
17801 }
17802 
17803 /*
17804  * call-seq:
17805  * ripper.filename -> String
17806  *
17807  * Return current parsing filename.
17808  */
17809 static VALUE
17810 ripper_filename(VALUE self)
17811 {
17812  struct parser_params *parser;
17813 
17814  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
17815  if (!ripper_initialized_p(parser)) {
17816  rb_raise(rb_eArgError, "method called for uninitialized object");
17817  }
17818  return ruby_sourcefile_string;
17819 }
17820 
17821 /*
17822  * call-seq:
17823  * ripper.lineno -> Integer
17824  *
17825  * Return line number of current parsing line.
17826  * This number starts from 1.
17827  */
17828 static VALUE
17829 ripper_lineno(VALUE self)
17830 {
17831  struct parser_params *parser;
17832 
17833  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
17834  if (!ripper_initialized_p(parser)) {
17835  rb_raise(rb_eArgError, "method called for uninitialized object");
17836  }
17837  if (NIL_P(parser->parsing_thread)) return Qnil;
17838  return INT2NUM(ruby_sourceline);
17839 }
17840 
17841 /*
17842  * call-seq:
17843  * ripper.state -> Integer
17844  *
17845  * Return scanner state of current token.
17846  */
17847 static VALUE
17848 ripper_state(VALUE self)
17849 {
17850  struct parser_params *parser;
17851 
17852  TypedData_Get_Struct(self, struct parser_params, &parser_data_type, parser);
17853  if (!ripper_initialized_p(parser)) {
17854  rb_raise(rb_eArgError, "method called for uninitialized object");
17855  }
17856  if (NIL_P(parser->parsing_thread)) return Qnil;
17857  return INT2NUM(lex_state);
17858 }
17859 
17860 #ifdef RIPPER_DEBUG
17861 /* :nodoc: */
17862 static VALUE
17863 ripper_assert_Qundef(VALUE self, VALUE obj, VALUE msg)
17864 {
17865  StringValue(msg);
17866  if (obj == Qundef) {
17867  rb_raise(rb_eArgError, "%"PRIsVALUE, msg);
17868  }
17869  return Qnil;
17870 }
17871 
17872 /* :nodoc: */
17873 static VALUE
17874 ripper_value(VALUE self, VALUE obj)
17875 {
17876  return ULONG2NUM(obj);
17877 }
17878 #endif
17879 
17880 static VALUE
17881 ripper_lex_state_name(VALUE self, VALUE state)
17882 {
17883  return rb_parser_lex_state_name(NUM2INT(state));
17884 }
17885 
17886 void
17887 Init_ripper(void)
17888 {
17889  ripper_init_eventids1();
17890  ripper_init_eventids2();
17891  id_warn = rb_intern_const("warn");
17892  id_warning = rb_intern_const("warning");
17893  id_gets = rb_intern_const("gets");
17894 
17895  InitVM(ripper);
17896 }
17897 
17898 void
17899 InitVM_ripper(void)
17900 {
17901  VALUE Ripper;
17902 
17903  Ripper = rb_define_class("Ripper", rb_cObject);
17904  /* version of Ripper */
17905  rb_define_const(Ripper, "Version", rb_usascii_str_new2(RIPPER_VERSION));
17906  rb_define_alloc_func(Ripper, ripper_s_allocate);
17907  rb_define_method(Ripper, "initialize", ripper_initialize, -1);
17908  rb_define_method(Ripper, "parse", ripper_parse, 0);
17909  rb_define_method(Ripper, "column", ripper_column, 0);
17910  rb_define_method(Ripper, "filename", ripper_filename, 0);
17911  rb_define_method(Ripper, "lineno", ripper_lineno, 0);
17912  rb_define_method(Ripper, "state", ripper_state, 0);
17913  rb_define_method(Ripper, "end_seen?", rb_parser_end_seen_p, 0);
17914  rb_define_method(Ripper, "encoding", rb_parser_encoding, 0);
17915  rb_define_method(Ripper, "yydebug", rb_parser_get_yydebug, 0);
17916  rb_define_method(Ripper, "yydebug=", rb_parser_set_yydebug, 1);
17917  rb_define_method(Ripper, "error?", ripper_error_p, 0);
17918 #ifdef RIPPER_DEBUG
17919  rb_define_method(rb_mKernel, "assert_Qundef", ripper_assert_Qundef, 2);
17920  rb_define_method(rb_mKernel, "rawVALUE", ripper_value, 1);
17921  rb_define_method(rb_mKernel, "validate_object", ripper_validate_object, 1);
17922 #endif
17923 
17924  rb_define_singleton_method(Ripper, "dedent_string", parser_dedent_string, 2);
17925  rb_define_private_method(Ripper, "dedent_string", parser_dedent_string, 2);
17926 
17927  rb_define_singleton_method(Ripper, "lex_state_name", ripper_lex_state_name, 1);
17928 
17929 <% @exprs.each do |expr, desc| -%>
17930  /* <%=desc%> */
17931  rb_define_const(Ripper, "<%=expr%>", INT2NUM(<%=expr%>));
17932 <% end %>
17933  ripper_init_eventids1_table(Ripper);
17934  ripper_init_eventids2_table(Ripper);
17935 
17936 # if 0
17937  /* Hack to let RDoc document SCRIPT_LINES__ */
17938 
17939  /*
17940  * When a Hash is assigned to +SCRIPT_LINES__+ the contents of files loaded
17941  * after the assignment will be added as an Array of lines with the file
17942  * name as the key.
17943  */
17944  rb_define_global_const("SCRIPT_LINES__", Qnil);
17945 #endif
17946 
17947 }
17948 #endif /* RIPPER */
17949 
#define STRNCASECMP(s1, s2, n)
Definition: ruby.h:2159
#define tGEQ
Definition: parse.c:262
#define tokadd_mbchar(c)
Definition: parse.c:12054
void rb_define_global_const(const char *, VALUE)
Definition: variable.c:2702
#define modifier_unless
Definition: parse.c:228
#define command_start
Definition: parse.c:597
VALUE val
Definition: parse.h:286
#define YYFPRINTF
Definition: parse.c:347
#define YYLAST
Definition: parse.c:1469
#define new_attr_op_assign(lhs, type, attr, op, rhs, column)
Definition: parse.c:747
void rb_fatal(const char *fmt,...)
Definition: error.c:2338
NODE * rb_parser_compile_string_path(VALUE vparser, VALUE f, VALUE s, int line)
Definition: parse.c:11482
#define ID2VAL(id)
Definition: parse.c:1107
#define tNTH_REF
Definition: parse.c:252
#define nd_column(n)
Definition: node.h:281
#define T_OBJECT
Definition: ruby.h:491
Definition: node.h:91
Definition: node.h:31
stack_type cmdargs
Definition: ripper.c:447
#define ISDIGIT(c)
Definition: ruby.h:2150
#define NEW_RETURN(s)
Definition: node.h:378
#define tRATIONAL
Definition: parse.c:248
ONIG_EXTERN int onig_foreach_name(OnigRegex reg, int(*func)(const OnigUChar *, const OnigUChar *, int, int *, OnigRegex, void *), void *arg)
int state
Definition: lex.c:33
VALUE rb_ary_unshift(VALUE ary, VALUE item)
Definition: array.c:1197
Definition: lex.c:33
#define tokenbuf
Definition: parse.c:584
#define nd_alen
Definition: node.h:285
int rb_enc_codelen(int c, rb_encoding *enc)
Definition: encoding.c:1077
#define heredoc_line_indent
Definition: parse.c:596
#define match_op(node1, node2, column)
Definition: parse.c:843
#define NEW_OP_ASGN_AND(i, val)
Definition: node.h:396
#define const_decl(path, column)
Definition: parse.c:755
#define heredoc_indent
Definition: parse.c:595
#define tCOLON3
Definition: parse.c:276
#define YY_REDUCE_PRINT(Rule)
Definition: parse.c:5094
#define shadowing_lvar(name)
Definition: parse.c:951
#define MBCLEN_CHARFOUND_P(ret)
Definition: encoding.h:185
unsigned int in_kwarg
Definition: ripper.c:523
#define tCMP
Definition: parse.c:258
#define tANDDOT
Definition: parse.c:274
#define nextc()
Definition: parse.c:10922
#define RRATIONAL_SET_NUM(rat, n)
Definition: internal.h:631
#define RE_OPTION_ENCODING_IDX(o)
Definition: parse.c:994
#define NEW_OP_ASGN1(p, id, a)
Definition: node.h:392
void * rb_parser_malloc(struct parser_params *parser, size_t size)
Definition: parse.c:17415
#define NEW_SCLASS(r, b)
Definition: node.h:436
#define lex_strterm
Definition: parse.c:573
#define tLBRACK
Definition: parse.c:282
#define RARRAY_LEN(a)
Definition: ruby.h:1019
int num
Definition: parse.h:289
#define tEQ
Definition: parse.c:259
#define mixed_escape(beg, enc1, enc2)
struct token_info * next
Definition: ripper.c:460
#define FALSE
Definition: nkf.h:174
#define RUBY_TYPED_FREE_IMMEDIATELY
Definition: ruby.h:1138
#define NUM_SUFFIX_R
Definition: parse.c:12623
#define CMDARG_P()
Definition: parse.c:429
long rb_str_coderange_scan_restartable(const char *, const char *, rb_encoding *, int *)
Definition: string.c:531
#define heredoc_end
Definition: parse.c:594
#define NEW_LIST(a)
Definition: node.h:380
#define NEW_DEFINED(e)
Definition: node.h:447
struct vtable * used
Definition: ripper.c:442
#define tHEREDOC_BEG
Definition: eventids2.c:7
#define pushback(c)
Definition: parse.c:10923
size_t strlen(const char *)
#define WARN_S_L(s, l)
Definition: parse.c:1167
#define INT2NUM(x)
Definition: ruby.h:1538
#define new_command_qcall(q, r, m, a, column)
Definition: parse.c:706
#define new_yield(node, column)
Definition: parse.c:725
VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline)
Definition: re.c:2919
#define new_do_body(param, stmt, column)
Definition: parse.c:840
#define unterminated_literal(mesg)
#define scan_oct(s, l, e)
Definition: util.h:53
#define nd_plen
Definition: node.h:323
#define compile_error
Definition: parse.c:1179
#define local_id_ref(id, vidp)
Definition: parse.c:964
#define T_FIXNUM
Definition: ruby.h:503
Definition: st.h:79
#define toklen()
Definition: parse.c:11677
#define dispatch_heredoc_end()
Definition: parse.c:12704
Definition: node.h:49
#define NEW_XSTR(s)
Definition: node.h:412
#define formal_argument(id)
Definition: parse.c:949
#define set_number_literal(v, t, f)
Definition: parse.c:10939
#define keyword_BEGIN
Definition: parse.c:234
const struct kwtable * rb_reserved_word(const char *str, unsigned int len)
Definition: parse.c:17292
#define YY_STACK_PRINT(Bottom, Top)
Definition: parse.c:5054
#define NUM2INT(x)
Definition: ruby.h:684
ID rb_intern2(const char *, long)
Definition: symbol.c:604
#define NEW_DOT2(b, e)
Definition: node.h:440
#define NUM2UINT(x)
Definition: ruby.h:685
#define tokfix()
Definition: parse.c:11675
#define local_pop()
Definition: parse.c:958
void rb_define_singleton_method(VALUE obj, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a singleton method for obj.
Definition: class.c:1716
#define malloc
Definition: parse.c:358
#define local_var(id)
Definition: parse.c:960
#define RUBY_DTRACE_PARSE_HOOK(name)
#define IS_LABEL_POSSIBLE()
Definition: parse.c:12326
#define tEMBDOC_BEG
Definition: eventids2.c:3
#define POINTER_P(val)
Definition: parse.c:453
#define rb_usascii_str_new2
Definition: intern.h:841
RUBY_FUNC_EXPORTED const unsigned int ruby_global_name_punct_bits[(0x7e - 0x20+31)/32]
Definition: parse.c:12265
#define internal_id()
Definition: parse.c:967
#define tSTRING_DBEG
Definition: parse.c:297
void rb_raise(VALUE exc, const char *fmt,...)
Definition: error.c:2284
#define InitVM(ext)
Definition: ruby.h:2164
unsigned short int yytype_uint16
Definition: parse.c:1276
VALUE rb_str_cat(VALUE, const char *, long)
Definition: string.c:2746
NODE * rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE file, int start)
Definition: parse.c:11525
#define lex_nextline
Definition: parse.c:590
#define st_foreach
Definition: regint.h:186
Definition: id.h:108
#define tANDOP
Definition: parse.c:264
#define nd_line(n)
Definition: node.h:278
Definition: id.h:88
#define Qtrue
Definition: ruby.h:437
VALUE rb_reg_check_preprocess(VALUE)
Definition: re.c:2672
#define tLABEL
Definition: parse.c:245
#define RE_OPTION_ENCODING(e)
Definition: parse.c:993
#define yyparse
Definition: parse.c:647
#define DVARS_TOPSCOPE
Definition: parse.c:451
#define set_yylval_str(x)
Definition: parse.c:10943
#define set_yylval_literal(x)
Definition: parse.c:10947
#define YYPOPSTACK(N)
VALUE rb_io_flush(VALUE)
Definition: io.c:1592
#define lambda_beginning_p()
Definition: parse.c:625
#define new_brace_body(param, stmt, column)
Definition: parse.c:839
#define ADD2HEAP(n, c, p)
Definition: parse.c:17411
#define rb_id2str(id)
Definition: vm_backtrace.c:29
VALUE rb_io_gets_internal(VALUE io)
Definition: io.c:3287
VALUE rb_parser_encoding(VALUE vparser)
Definition: parse.c:17368
Definition: id.h:91
Definition: id.h:79
Definition: st.h:99
#define TypedData_Get_Struct(obj, type, data_type, sval)
Definition: ruby.h:1183
Definition: id.h:96
#define OBJ_FREEZE(x)
Definition: ruby.h:1306
#define tFLOAT
Definition: parse.c:247
const int id
Definition: nkf.c:209
#define keyword_super
Definition: parse.c:219
int line_count
Definition: ripper.c:503
node_type
Definition: node.h:22
PRINTF_ARGS(void rb_parser_fatal(struct parser_params *parser, const char *fmt,...), 2, 3)
#define tLBRACE_ARG
Definition: parse.c:284
#define tLEQ
Definition: parse.c:263
#define strcasecmp
Definition: win32.h:191
#define STR_NEW2(p)
Definition: parse.c:564
#define ID_CONST
Definition: id.h:37
VALUE rb_suppress_tracing(VALUE(*func)(VALUE), VALUE arg)
Definition: vm_trace.c:376
void rb_define_private_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
Definition: class.c:1527
#define tokspace(n)
Definition: parse.c:10925
#define keyword_unless
Definition: parse.c:199
VALUE rb_enc_from_encoding(rb_encoding *encoding)
Definition: encoding.c:117
unsigned int eofp
Definition: ripper.c:517
#define new_ivar(id, column)
Definition: parse.c:817
int rb_enc_symname2_p(const char *, long, rb_encoding *)
Definition: symbol.c:311
union YYSTYPE YYSTYPE
#define keyword_for
Definition: parse.c:207
#define keyword_not
Definition: parse.c:226
#define TOKEN2VAL(t)
Definition: parse.c:1108
NODE * node
Definition: parse.h:287
#define T_RATIONAL
Definition: ruby.h:509
#define PARSER_ARG
Definition: parse.c:1180
NODE * rb_parser_compile_string(VALUE vparser, const char *f, VALUE s, int line)
Definition: parse.c:11476
#define keyword_begin
Definition: parse.c:194
VALUE rb_default_coverage(int)
Definition: thread.c:5081
#define IS_lex_state_all(ls)
Definition: parse.c:403
#define ULONG2NUM(x)
Definition: ruby.h:1574
#define lvar_defined(id)
Definition: parse.c:983
VALUE rb_ary_push(VALUE ary, VALUE item)
Definition: array.c:924
#define keyword_while
Definition: parse.c:205
#define new_cdecl(v, val, path, column)
Definition: parse.c:823
#define rb_long2int(n)
Definition: ruby.h:319
#define RREGEXP_PTR(r)
Definition: ruby.h:1049
#define NEW_CLASS(n, b, s)
Definition: node.h:435
#define current_enc
Definition: parse.c:605
#define lex_pbeg
Definition: parse.c:591
#define tLAMBEG
Definition: parse.c:301
#define MAX_WORD_LENGTH
Definition: lex.c:43
#define subnodes(n1, n2)
#define yydebug
Definition: parse.c:607
#define tLPAREN_ARG
Definition: parse.c:280
#define YYSTACK_BYTES(N)
Definition: parse.c:1426
#define nd_term(node)
Definition: parse.c:1006
#define keyword_alias
Definition: parse.c:232
rb_encoding * rb_enc_compatible(VALUE str1, VALUE str2)
Definition: encoding.c:962
#define NEW_OPT_N(b)
Definition: node.h:364
#define tCONSTANT
Definition: parse.c:243
#define CMDARG_LEXPOP()
Definition: parse.c:428
#define nd_set_column(n, v)
Definition: node.h:282
int rb_local_defined(ID id, const struct rb_block *base_block)
Definition: compile.c:7517
union RNode::@90 u3
VALUE debug_lines
Definition: ripper.c:540
#define tRPAREN
Definition: parse.c:281
VALUE rb_funcall(VALUE, ID, int,...)
Calls a method.
Definition: vm_eval.c:774
YYSTYPE * lval
Definition: ripper.c:475
ID id
Definition: parse.h:288
void rb_str_set_len(VALUE, long)
Definition: string.c:2627
#define tCHAR
Definition: parse.c:251
#define rb_warn2(fmt, a, b)
Definition: parse.c:1124
unsigned int token_seen
Definition: ripper.c:526
int rb_enc_str_coderange(VALUE)
Definition: string.c:621
#define tASET
Definition: parse.c:271
token_info * token_info
Definition: ripper.c:508
#define keyword_when
Definition: parse.c:204
#define keyword_do_cond
Definition: parse.c:214
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: parse.c:4954
#define RE_OPTION_ONCE
Definition: parse.c:991
#define NEW_NIL()
Definition: node.h:443
#define KWD2EID(t, v)
Definition: parse.c:1109
#define RSTRING_GETMEM(str, ptrvar, lenvar)
Definition: ruby.h:984
#define block_dup_check(n1, n2)
Definition: parse.c:680
VALUE rb_enc_associate(VALUE obj, rb_encoding *enc)
Definition: encoding.c:854
ID * tbl
Definition: ripper.c:433
NODE * rb_parser_compile_cstr(VALUE vparser, const char *f, const char *s, int len, int line)
Definition: parse.c:11496
#define keyword_else
Definition: parse.c:202
#define NEW_OP_ASGN2(r, t, i, o, val)
Definition: node.h:393
int pre_args_num
Definition: node.h:486
#define RB_GC_GUARD(v)
Definition: ruby.h:552
void rb_define_alloc_func(VALUE, rb_alloc_func_t)
#define T_HASH
Definition: ruby.h:499
int first_column
Definition: parse.h:305
#define var_field(n)
Definition: parse.c:757
#define new_for(var, iter, body, column)
Definition: parse.c:796
#define keyword__LINE__
Definition: parse.c:236
#define ID_LOCAL
Definition: id.h:33
#define tUPLUS
Definition: parse.c:255
#define peekc_n(n)
Definition: parse.c:11585
#define nd_args
Definition: node.h:327
#define rb_warning1(fmt, a)
Definition: parse.c:1128
unsigned short token
Definition: id.c:36
#define nd_set_type(n, t)
Definition: node.h:273
void rb_gc_mark(VALUE ptr)
Definition: gc.c:4464
#define lex_pend
Definition: parse.c:593
#define arg_ambiguous(c)
Definition: parse.c:12862
#define T_ARRAY
Definition: ruby.h:498
#define NEW_DOT3(b, e)
Definition: node.h:441
#define nd_paren(node)
Definition: parse.c:1008
#define call_uni_op(recv, id, column)
Definition: parse.c:703
#define st_lookup
Definition: regint.h:185
#define cmdarg_stack
Definition: parse.c:576
#define rb_enc_islower(c, enc)
Definition: encoding.h:226
#define vtable_pop(tbl, n)
Definition: parse.c:11265
VALUE rb_io_write(VALUE, VALUE)
Definition: io.c:1510
#define call_bin_op(recv, id, arg1, column)
Definition: parse.c:701
#define tLAMBDA
Definition: parse.c:288
#define NEW_ITER(a, b)
Definition: node.h:368
Definition: id.h:80
#define STR_NEW0()
Definition: parse.c:563
#define literal_concat(h, t, column)
Definition: parse.c:692
#define RCOMPLEX(obj)
Definition: internal.h:647
#define reg_compile(str, options)
Definition: parse.c:849
NODE * pre_init
Definition: node.h:483
#define rb_warn3L(l, fmt, a, b, c)
Definition: parse.c:1135
#define tIVAR
Definition: parse.c:242
#define tLPAREN
Definition: parse.c:279
#define str_copy(_s, _p, _n)
#define NEW_IVAR(v)
Definition: node.h:401
#define RCOMPLEX_SET_IMAG(cmp, i)
Definition: ruby.h:1069
unsigned int last
Definition: nkf.c:4311
ID block_arg
Definition: node.h:492
VALUE rb_ensure(VALUE(*b_proc)(ANYARGS), VALUE data1, VALUE(*e_proc)(ANYARGS), VALUE data2)
An equivalent to ensure clause.
Definition: eval.c:1035
#define tRSHFT
Definition: parse.c:273
void rb_gc_force_recycle(VALUE obj)
Definition: gc.c:6175
#define MEMO_NEW(a, b, c)
Definition: internal.h:963
VALUE rb_parser_set_context(VALUE vparser, const struct rb_block *base, int main)
Definition: parse.c:17308
Definition: parse.h:302
#define NEW_IASGN(v, val)
Definition: node.h:389
#define FIXNUM_P(f)
Definition: ruby.h:365
#define YYLLOC_DEFAULT(Current, Rhs, N)
Definition: parse.c:4896
#define keyword_or
Definition: parse.c:225
rb_encoding * rb_utf8_encoding(void)
Definition: encoding.c:1320
#define keyword_def
Definition: parse.c:192
#define tAMPER
Definition: parse.c:287
#define nd_type(n)
Definition: node.h:272
#define RE_OPTION_ENCODING_NONE(o)
Definition: parse.c:995
#define YYNTOKENS
Definition: parse.c:1472
#define list_append(l, i, column)
Definition: parse.c:685
const char * ptok
Definition: ripper.c:486
#define tOROP
Definition: parse.c:265
#define vtable_add(tbl, id)
Definition: parse.c:11248
#define tokadd_string(f, t, p, n, e)
Definition: parse.c:10931
#define paren_nest
Definition: parse.c:577
VALUE error_buffer
Definition: ripper.c:539
VALUE rb_str_buf_append(VALUE, VALUE)
Definition: string.c:2884
#define tNMATCH
Definition: parse.c:267
#define number_literal_suffix(f)
Definition: parse.c:10938
#define is_identchar(p, e, enc)
Definition: parse.c:11029
int pos
Definition: ripper.c:434
#define new_lvar(id, column)
Definition: parse.c:802
#define tIDENTIFIER
Definition: parse.c:239
#define st_init_numtable_with_size
Definition: regint.h:179
#define ENC_CODERANGE_7BIT
Definition: encoding.h:100
const char * rb_obj_classname(VALUE)
Definition: variable.c:459
#define lex_lastline
Definition: parse.c:589
#define NEW_SCOPE(a, b)
Definition: node.h:358
#define tok_hex(numlen)
Definition: parse.c:10927
const char term
Definition: id.c:37
RUBY_EXTERN void * memmove(void *, const void *, size_t)
Definition: memmove.c:7
#define NUM_SUFFIX_I
Definition: parse.c:12624
Definition: node.h:27
RUBY_EXTERN unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow)
Definition: util.c:84
VALUE rb_eArgError
Definition: error.c:802
#define sym(x)
Definition: date_core.c:3721
#define in_main
Definition: parse.c:582
#define new_resbody(e, s, r, column)
Definition: parse.c:784
VALUE rb_str_buf_cat(VALUE, const char *, long)
RUBY_SYMBOL_EXPORT_BEGIN typedef unsigned long st_data_t
Definition: st.h:22
unsigned int error_p
Definition: ripper.c:531
Definition: node.h:233
#define YYABORT
Definition: parse.c:4856
Definition: parse.h:284
#define keyword_do_block
Definition: parse.c:215
long gets_ptr
Definition: ripper.c:487
#define ISALPHA(c)
Definition: ruby.h:2149
#define modifier_rescue
Definition: parse.c:231
#define in_single
Definition: parse.c:580
#define modifier_if
Definition: parse.c:227
#define NEW_VCALL(m)
Definition: node.h:419
#define strtod(s, e)
Definition: util.h:77
#define ID_STATIC_SYM
Definition: id.h:30
#define parser_warn(node, mesg)
Definition: parse.c:14716
NODE * rb_parser_compile_file(VALUE vparser, const char *f, VALUE file, int start)
Definition: parse.c:11519
struct vtable * prev
Definition: ripper.c:436
#define NEW_VALIAS(n, o)
Definition: node.h:433
VALUE rb_obj_class(VALUE)
call-seq: obj.class -> class
Definition: object.c:277
#define RB_TYPE_P(obj, type)
Definition: ruby.h:527
const char * pcur
Definition: ripper.c:484
#define NEW_LVAR(v)
Definition: node.h:399
Definition: id.h:104
#define tSTRING_DEND
Definition: parse.c:298
#define NEW_ATTRASGN(r, m, a)
Definition: node.h:451
#define assignable(id, node, column)
Definition: parse.c:732
#define toksiz
Definition: parse.c:586
#define ID_SCOPE_MASK
Definition: id.h:32
rb_encoding * enc
Definition: ripper.c:507
#define keyword_ensure
Definition: parse.c:196
#define free
Definition: parse.c:361
#define UNLIKELY(x)
Definition: internal.h:43
#define tIMAGINARY
Definition: parse.c:249
#define keyword_elsif
Definition: parse.c:201
#define tUMINUS
Definition: parse.c:256
#define new_op_assign(lhs, op, rhs, column)
Definition: parse.c:745
#define lex_gets
Definition: parse.c:599
#define NEW_POSTEXE(b)
Definition: node.h:449
int capa
Definition: ripper.c:435
#define vtable_free(tbl)
Definition: parse.c:11226
void * rb_parser_realloc(struct parser_params *parser, void *ptr, size_t size)
Definition: parse.c:17435
#define modifier_until
Definition: parse.c:230
#define void_expr(node)
Definition: parse.c:674
unsigned int input
Definition: nkf.c:4312
#define scan_hex(s, l, e)
Definition: util.h:55
#define rb_intern_str(string)
Definition: generator.h:16
#define tSTRING_END
Definition: parse.c:300
#define NEW_IF(c, t, e)
Definition: node.h:360
#define local_id(id)
Definition: parse.c:965
#define tNEQ
Definition: parse.c:261
#define here_document(n)
Definition: parse.c:10934
#define lex_goto_eol(parser)
Definition: parse.c:11580
#define rb_rational_raw1(x)
Definition: intern.h:163
#define tPOW
Definition: parse.c:257
#define ruby_sourcefile
Definition: parse.c:603
#define ALLOC_N(type, n)
Definition: ruby.h:1587
VALUE rb_hash_aset(VALUE hash, VALUE key, VALUE val)
Definition: hash.c:1616
VALUE rb_parser_lex_state_name(enum lex_state_e state)
Definition: parse.c:15513
VALUE rb_parser_get_yydebug(VALUE self)
Definition: parse.c:17383
#define SET_LEX_STATE(ls)
Definition: parse.c:405
#define CALL_Q_P(q)
Definition: parse.c:621
#define new_const_op_assign(lhs, op, rhs, column)
Definition: parse.c:749
void rb_parser_printf(struct parser_params *parser, const char *fmt,...)
Definition: parse.c:17472
#define YYTRANSLATE(YYX)
Definition: parse.c:1484
#define val
#define new_lit(sym, column)
Definition: parse.c:772
#define NEW_ARRAY(a)
Definition: node.h:381
#define tokidx
Definition: parse.c:585
RUBY_EXTERN VALUE rb_cObject
Definition: ruby.h:1893
#define yyerror(yylloc, parser, msg)
Definition: parse.c:570
#define NEW_STRTERM(func, term, paren)
Definition: parse.c:12235
#define ID_INSTANCE
Definition: id.h:34
#define tWORDS_BEG
Definition: parse.c:293
#define CMDARG_PUSH(n)
Definition: parse.c:426
void rb_str_free(VALUE)
Definition: string.c:1316
struct parser_params * parser
Definition: ripper.c:17057
#define RSTRING_END(str)
Definition: ruby.h:979
#define RE_OPTION_MASK
Definition: parse.c:996
void * rb_parser_calloc(struct parser_params *parser, size_t nelem, size_t size)
Definition: parse.c:17425
enum lex_state_e state
Definition: ripper.c:488
#define keyword_until
Definition: parse.c:206
#define NEW_HASH(a)
Definition: node.h:383
#define DEF_EXPR(n)
Definition: parse.c:381
VALUE rb_get_coverages(void)
Definition: thread.c:5044
#define NEW_ZARRAY()
Definition: node.h:382
#define NEW_FALSE()
Definition: node.h:445
#define token_info_push(token)
Definition: parse.c:1194
const struct rb_block * base_block
Definition: ripper.c:542
VALUE rb_obj_as_string(VALUE)
Definition: string.c:1410
void rb_set_errinfo(VALUE err)
Sets the current exception ($!) to the given value.
Definition: eval.c:1792
#define gettable(id, column)
Definition: parse.c:730
VALUE rb_ary_new(void)
Definition: array.c:499
#define keyword__ENCODING__
Definition: parse.c:238
#define YY_(msgid)
Definition: parse.c:1309
#define NODE_HEREDOC
Definition: parse.c:1000
int rb_ascii8bit_encindex(void)
Definition: encoding.c:1314
#define NEW_ARGSPUSH(a, b)
Definition: node.h:427
#define new_postarg(i, v, column)
Definition: parse.c:820
#define cond_stack
Definition: parse.c:575
#define NEW_REDO()
Definition: node.h:372
#define NEW_NTH_REF(n)
Definition: node.h:404
#define NEW_UNLESS(c, t, e)
Definition: node.h:361
RUBY_EXTERN VALUE rb_mKernel
Definition: ruby.h:1881
#define snprintf
Definition: subst.h:6
VALUE rb_thread_current(void)
Definition: thread.c:2494
#define RRATIONAL(obj)
Definition: internal.h:630
#define IS_SPCARG(c)
Definition: parse.c:12325
#define new_str(s, column)
Definition: parse.c:778
rb_imemo_alloc_t * heap
Definition: ripper.c:473
Definition: id.h:89
#define set_yylval_id(x)
Definition: parse.c:10945
#define NIL_P(v)
Definition: ruby.h:451
#define ISASCII(c)
Definition: ruby.h:2142
VALUE rb_define_class(const char *name, VALUE super)
Defines a top-level class.
Definition: class.c:646
#define YYSIZE_MAXIMUM
Definition: parse.c:1299
#define NEW_GVAR(v)
Definition: node.h:398
struct rb_imemo_alloc_struct * next
Definition: internal.h:937
NODE * opt_args
Definition: node.h:497
#define NEW_YIELD(a)
Definition: node.h:379
#define new_scope(a, b, column)
Definition: parse.c:826
#define YYSTACK_ALLOC
Definition: parse.c:1377
#define STR_FUNC_REGEXP
Definition: parse.c:11544
NODE * rb_compile_string(const char *f, VALUE s, int line)
Definition: parse.c:11469
void rb_define_const(VALUE, const char *, VALUE)
Definition: variable.c:2691
VALUE value
Definition: node.h:239
#define new_hash(hash, column)
Definition: parse.c:763
void rb_compile_warn(const char *file, int line, const char *fmt,...)
Definition: error.c:200
#define ID_SCOPE_SHIFT
Definition: id.h:31
#define k__END__
Definition: eventids2.c:9
#define ISALNUM(c)
Definition: ruby.h:2148
#define NEW_CASE(h, b)
Definition: node.h:362
rb_atomic_t cnt[RUBY_NSIG]
Definition: signal.c:525
#define keyword_then
Definition: parse.c:200
#define new_command(m, a)
Definition: parse.c:708
#define FLONUM_P(x)
Definition: ruby.h:399
#define tOP_ASGN
Definition: parse.c:277
unsigned int has_shebang
Definition: ripper.c:520
#define T_FLOAT
Definition: ruby.h:495
#define LVAR_USED
Definition: parse.c:14660
#define new_evstr(n, column)
Definition: parse.c:695
#define TYPE(x)
Definition: ruby.h:521
int argc
Definition: ruby.c:187
Definition: node.h:61
void rb_init_parse(void)
Definition: parse.c:17167
#define STR_FUNC_INDENT
Definition: parse.c:11547
unsigned char OnigUChar
Definition: onigmo.h:79
Definition: id.h:106
VALUE rb_eSyntaxError
Definition: error.c:816
#define Qfalse
Definition: ruby.h:436
#define END_OF_INPUT
Definition: parse.c:189
#define NEW_EVSTR(n)
Definition: node.h:415
VALUE rb_rational_new(VALUE, VALUE)
Definition: rational.c:1973
VALUE nextline
Definition: ripper.c:482
#define ALLOCA_N(type, n)
Definition: ruby.h:1593
#define tokadd(c)
Definition: parse.c:10926
#define NEW_OP_CDECL(v, op, val)
Definition: node.h:397
#define no_digits()
#define peek_n(c, n)
Definition: parse.c:11583
#define T_BIGNUM
Definition: ruby.h:501
#define tQWORDS_BEG
Definition: parse.c:294
#define ENC_CODERANGE_UNKNOWN
Definition: encoding.h:99
#define YYFINAL
Definition: parse.c:1467
#define RUBY_FUNC_EXPORTED
Definition: defines.h:263
#define MEMCPY(p1, p2, type, n)
Definition: ruby.h:1661
#define T_NODE
Definition: ruby.h:513
#define keyword_nil
Definition: parse.c:221
VALUE rb_enc_associate_index(VALUE obj, int idx)
Definition: encoding.c:826
#define RNODE(obj)
Definition: node.h:260
int err
Definition: win32.c:135
#define dispatch_delayed_token(t)
Definition: parse.c:10968
#define IS_AFTER_OPERATOR()
Definition: parse.c:12330
#define T_COMPLEX
Definition: ruby.h:510
#define new_zarray(column)
Definition: parse.c:814
#define new_if(cc, left, right, column)
Definition: parse.c:657
#define nd_else
Definition: node.h:290
#define tFID
Definition: parse.c:240
#define arg_concat(h, t, column)
Definition: parse.c:690
#define set_yylval_num(x)
Definition: parse.c:10944
#define WARN_S(s)
Definition: parse.c:1168
#define dsym_node(node, column)
Definition: parse.c:727
#define tLOWEST
Definition: parse.c:303
VALUE lastline
Definition: ripper.c:481
Definition: util.c:841
#define parser_encoding_name()
Definition: parse.c:11027
RUBY_EXTERN VALUE rb_int_positive_pow(long x, unsigned long y)
Definition: numeric.c:3942
int column
Definition: ripper.c:458
#define YYSIZE_T
Definition: parse.c:1295
#define numberof(array)
Definition: etc.c:618
VALUE rb_make_backtrace(void)
Definition: vm_backtrace.c:813
#define ALLOC(type)
Definition: ruby.h:1588
#define END(no)
Definition: re.c:25
#define NEW_FOR(v, i, b)
Definition: node.h:367
#define brace_nest
Definition: parse.c:579
void rb_parser_fatal(struct parser_params *parser, const char *fmt,...)
Definition: parse.c:15542
#define EOF
Definition: vsnprintf.c:203
Definition: id.h:82
#define negate_lit(lit)
Definition: parse.c:720
#define NEW_WHEN(c, t, e)
Definition: node.h:363
VALUE rb_str_resize(VALUE, long)
Definition: string.c:2644
#define keyword_defined
Definition: parse.c:233
#define tHEREDOC_END
Definition: eventids2.c:8
#define has_delayed_token()
Definition: parse.c:10969
#define NEW_DASGN(v, val)
Definition: node.h:387
const char * pbeg
Definition: ripper.c:483
#define tQSYMBOLS_BEG
Definition: parse.c:296
#define flush_string_content(enc)
Definition: parse.c:12262
#define NEW_ERRINFO()
Definition: node.h:446
#define NEW_BLOCK_PASS(b)
Definition: node.h:431
#define keyword_case
Definition: parse.c:203
VALUE rb_str_subseq(VALUE, long, long)
Definition: string.c:2406
#define ZALLOC(type)
Definition: ruby.h:1590
string_type
Definition: ripper.c:11609
#define tASSOC
Definition: parse.c:278
#define dispatch_scan_event(t)
Definition: parse.c:10967
#define RSTRING_LEN(str)
Definition: ruby.h:971
lex_state_bits
Definition: ripper.c:363
VALUE rb_funcallv_public(VALUE, ID, int, const VALUE *)
Calls a method.
Definition: vm_eval.c:820
#define ret_args(node)
Definition: parse.c:722
#define keyword_if
Definition: parse.c:198
unsigned int cr_seen
Definition: ripper.c:532
#define COND_LEXPOP()
Definition: parse.c:422
ID rest_arg
Definition: node.h:491
#define REALLOC_N(var, type, n)
Definition: ruby.h:1591
#define keyword_retry
Definition: parse.c:211
int errno
#define TRUE
Definition: nkf.h:175
#define node_assign(node1, node2, column)
Definition: parse.c:742
#define nd_next
Definition: node.h:286
#define heredoc_dedent(str)
Definition: parse.c:858
#define NEW_CONST(v)
Definition: node.h:402
#define COND_POP()
Definition: parse.c:421
#define NEW_LIT(l)
Definition: node.h:409
VALUE rb_io_gets(VALUE)
Definition: io.c:3281
int rb_dvar_defined(ID id, const struct rb_block *base_block)
Definition: compile.c:7492
VALUE rb_sprintf(const char *format,...)
Definition: sprintf.c:1452
#define set_integer_literal(v, f)
Definition: parse.c:10940
#define COND_P()
Definition: parse.c:423
#define ruby_coverage
Definition: parse.c:615
#define tGVAR
Definition: parse.c:241
#define NEW_OP_ASGN_OR(i, val)
Definition: node.h:395
#define rb_enc_isspace(c, enc)
Definition: encoding.h:231
#define ruby_sourcefile_string
Definition: parse.c:604
#define keyword_false
Definition: parse.c:223
int rb_enc_precise_mbclen(const char *p, const char *e, rb_encoding *enc)
Definition: encoding.c:1020
#define NEW_NEXT(s)
Definition: node.h:371
#define parser_warning(node, mesg)
Definition: parse.c:14709
#define mixed_error(enc1, enc2)
#define rb_enc_name(enc)
Definition: encoding.h:171
#define tUMINUS_NUM
Definition: parse.c:304
#define value_expr(node)
Definition: parse.c:672
int last_column
Definition: parse.h:307
#define rb_warning0(fmt)
Definition: parse.c:1127
#define keyword_self
Definition: parse.c:220
#define new_dstr(s, column)
Definition: parse.c:805
#define TOK_INTERN()
Definition: parse.c:566
#define MEMMOVE(p1, p2, type, n)
Definition: ruby.h:1662
#define reg_fragment_setenc(str, options)
Definition: parse.c:851
VALUE rb_str_vcatf(VALUE, const char *, va_list)
Definition: sprintf.c:1465
#define RUBY_SYMBOL_EXPORT_END
Definition: missing.h:49
void rb_compile_warning(const char *file, int line, const char *fmt,...)
Definition: error.c:215
#define NEW_RESCUE(b, res, e)
Definition: node.h:375
#define YYDPRINTF(Args)
Definition: parse.c:4948
#define STR_FUNC_LABEL
Definition: parse.c:11548
#define keyword_yield
Definition: parse.c:218
#define rb_warn0(fmt)
Definition: parse.c:1122
rb_magic_comment_length_t length
Definition: ripper.c:13095
int rb_scan_args(int argc, const VALUE *argv, const char *fmt,...)
Definition: class.c:1908
#define keyword_undef
Definition: parse.c:193
#define new_bv(id)
Definition: parse.c:953
#define YYEMPTY
Definition: parse.c:4852
#define tLSHFT
Definition: parse.c:272
#define YYSTACK_FREE
Definition: parse.c:1378
#define aryset(node1, node2, column)
Definition: parse.c:735
#define YYID(n)
Definition: parse.c:1322
VALUE stack_type
Definition: parse.c:411
unsigned char buf[MIME_BUF_SIZE]
Definition: nkf.c:4309
#define modifier_while
Definition: parse.c:229
#define PRIsVALUE
Definition: ruby.h:135
unsigned long ID
Definition: ruby.h:86
rb_encoding * rb_usascii_encoding(void)
Definition: encoding.c:1335
#define keyword_do
Definition: parse.c:213
#define tCVAR
Definition: parse.c:244
#define rb_enc_isalnum(c, enc)
Definition: encoding.h:229
#define dyna_pop(node)
Definition: parse.c:972
#define nd_resq
Definition: node.h:294
#define NEW_PRELUDE(p, b, o)
Definition: node.h:452
#define dyna_in_block()
Definition: parse.c:974
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:788
#define Qnil
Definition: ruby.h:438
#define dyna_var(id)
Definition: parse.c:975
#define NEW_BACK_REF(n)
Definition: node.h:405
#define new_begin(b, column)
Definition: parse.c:829
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
Definition: eval.c:615
#define STR_FUNC_ESCAPE
Definition: parse.c:11542
int id[2]
Definition: lex.c:33
#define NODE_FL_NEWLINE
Definition: node.h:267
#define NEW_MASGN(l, r)
Definition: node.h:384
#define heredoc_restore(n)
Definition: parse.c:10936
#define BUILTIN_TYPE(x)
Definition: ruby.h:518
int last_line
Definition: parse.h:306
#define keyword_class
Definition: parse.c:190
#define NEW_COLON2(c, i)
Definition: node.h:438
#define keyword_redo
Definition: parse.c:210
unsigned long VALUE
Definition: ruby.h:85
#define RFLOAT(obj)
Definition: internal.h:639
#define intern_cstr(n, l, en)
Definition: parse.c:559
#define peek(c)
Definition: parse.c:11582
#define IS_lex_state_for(x, ls)
Definition: parse.c:400
#define reg_named_capture_assign(regexp, column)
Definition: parse.c:855
NODE * post_init
Definition: node.h:484
#define RBASIC(obj)
Definition: ruby.h:1197
#define heredoc_identifier()
Definition: parse.c:10935
VALUE rb_eTypeError
Definition: error.c:801
#define NEW_KW_ARG(i, v)
Definition: node.h:424
Definition: id.h:93
#define RUBY_SYMBOL_EXPORT_BEGIN
Definition: missing.h:48
#define COVERAGE_INDEX_LINES
Definition: internal.h:1694
void rb_parser_show_bitstack(struct parser_params *, stack_type, const char *, int)
Definition: parse.c:15532
#define regx_options()
Definition: parse.c:10930
VALUE rb_io_puts(int, const VALUE *, VALUE)
Definition: io.c:7399
int post_args_num
Definition: node.h:487
#define NEW_ENSURE(b, en)
Definition: node.h:377
#define token_info_pop(token)
Definition: parse.c:1195
#define PRIsWARN
Definition: parse.c:1171
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:111
#define const_path_field(w, n, column)
Definition: parse.c:752
#define NEW_ZSUPER()
Definition: node.h:421
const char * rb_id2name(ID)
Definition: symbol.c:751
#define rb_enc_asciicompat(enc)
Definition: encoding.h:239
#define Qnull
Definition: parse.c:1114
VALUE rb_str_new_cstr(const char *)
Definition: string.c:771
int rb_char_to_option_kcode(int c, int *option, int *kcode)
Definition: re.c:324
#define NEW_COLON3(i)
Definition: node.h:439
#define NEW_BLOCK(a)
Definition: node.h:359
VALUE rb_obj_hide(VALUE obj)
Make the object invisible from Ruby code.
Definition: object.c:72
#define Qnone
Definition: parse.c:1113
#define assignable_result(x)
#define new_undef(i, column)
Definition: parse.c:811
#define nd_body
Definition: node.h:289
VALUE flags
Definition: node.h:234
const char * pend
Definition: ripper.c:485
VALUE rb_fstring(VALUE)
Definition: string.c:306
enum lex_state_e rb_parser_trace_lex_state(struct parser_params *, enum lex_state_e, enum lex_state_e, int)
Definition: parse.c:15499
const char * token
Definition: ripper.c:456
#define tAREF
Definition: parse.c:270
#define ENCODING_IS_ASCII8BIT(obj)
Definition: encoding.h:59
VALUE rb_str_dup(VALUE)
Definition: string.c:1488
#define top_const_field(n)
Definition: parse.c:753
#define new_xstring(node, column)
Definition: parse.c:835
NODE * rb_parser_while_loop(VALUE vparser, NODE *node, int chomp, int split)
Definition: parse.c:17126
#define tSTAR
Definition: parse.c:285
unsigned int token_info_enabled
Definition: ripper.c:527
#define ruby_sourceline
Definition: parse.c:602
#define CMDARG_SET(n)
Definition: parse.c:430
#define new_dvar(id, column)
Definition: parse.c:781
#define CHAR_BIT
Definition: ruby.h:196
#define lex_input
Definition: parse.c:588
#define tINTEGER
Definition: parse.c:246
#define STR_FUNC_QWORDS
Definition: parse.c:11545
VALUE rb_sym_intern_ascii_cstr(const char *ptr)
Definition: symbol.c:1042
#define ruby_eval_tree
Definition: parse.c:612
#define LONG2NUM(x)
Definition: ruby.h:1573
#define tDOT3
Definition: parse.c:269
#define cond(node, column)
Definition: parse.c:653
#define new_gvar(id, column)
Definition: parse.c:799
int rb_respond_to(VALUE, ID)
Definition: vm_method.c:1994
register unsigned int len
Definition: zonetab.h:51
#define YYPACT_NINF
Definition: parse.c:2251
NODE * rb_compile_cstr(const char *f, const char *s, int len, int line)
Definition: parse.c:11489
#define StringValueCStr(v)
Definition: ruby.h:571
#define parser_is_identchar()
Definition: parse.c:11030
#define NEW_BEGIN(b)
Definition: node.h:374
#define STR_FUNC_TERM
Definition: parse.c:11549
#define ruby__end__seen
Definition: parse.c:601
#define dvar_curr(id)
Definition: parse.c:980
#define new_regexp(node, opt, column)
Definition: parse.c:769
#define set_yylval_node(x)
Definition: parse.c:10948
#define new_rescue(b, res, e, column)
Definition: parse.c:808
#define RSTRING_PTR(str)
Definition: ruby.h:975
unsigned int top
Definition: nkf.c:4310
#define NEW_SPLAT(a)
Definition: node.h:428
#define token_flush(p)
Definition: parse.c:571
#define reg_fragment_check(str, options)
Definition: parse.c:853
void rb_str_modify(VALUE)
Definition: string.c:2046
#define new_list(item, column)
Definition: parse.c:775
#define attrset(node, q, id, column)
Definition: parse.c:737
const struct vtable * vars
Definition: parse.h:290
int rb_const_defined_at(VALUE, ID)
Definition: variable.c:2543
#define ENCODING_GET(obj)
Definition: encoding.h:58
#define lex_state
Definition: parse.c:574
struct YYLTYPE YYLTYPE
rb_encoding * rb_enc_get(VALUE obj)
Definition: encoding.c:860
#define new_masgn(l, r, column)
Definition: parse.c:832
VALUE debug_buffer
Definition: ripper.c:511
#define new_fcall(mid, args, column)
Definition: parse.c:793
#define new_call(recv, mid, args, column)
Definition: parse.c:790
#define RFLOAT_VALUE(v)
Definition: ruby.h:933
int nonspc
Definition: ripper.c:459
int size
Definition: encoding.c:57
RUBY_EXTERN VALUE rb_stderr
Definition: ruby.h:1971
#define YYSTACK_ALLOC_MAXIMUM
Definition: parse.c:1380
VALUE rb_ident_hash_new(void)
Definition: hash.c:2924
#define NEW_DSTR(s)
Definition: node.h:411
#define newtok()
Definition: parse.c:10924
#define f
#define TAB_WIDTH
Definition: parse.c:341
#define yylval
Definition: parse.c:10913
#define INT2FIX(i)
Definition: ruby.h:232
#define tSTRING_BEG
Definition: parse.c:290
#define set_yylval_name(x)
Definition: parse.c:10946
#define is_local_id(id)
Definition: symbol.h:36
#define NEW_GASGN(v, val)
Definition: node.h:385
#define NEW_BREAK(s)
Definition: node.h:370
yytokentype
Definition: ripper.c:68
int rb_safe_level(void)
Definition: safe.c:35
#define RARRAY_AREF(a, i)
Definition: ruby.h:1033
Definition: node.h:47
#define lpar_beg
Definition: parse.c:578
#define YYUSE(e)
Definition: parse.c:1315
#define COND_PUSH(n)
Definition: parse.c:420
#define xmalloc
Definition: defines.h:183
#define YYACCEPT
Definition: parse.c:4855
VALUE coverage
Definition: ripper.c:541
#define yyerror0(msg)
Definition: parse.c:569
#define keyword_break
Definition: parse.c:208
#define lex_gets_ptr
Definition: parse.c:598
#define keyword_true
Definition: parse.c:222
#define new_args_tail(k, kr, b, column)
Definition: parse.c:715
#define tSYMBEG
Definition: parse.c:289
#define tBACK_REF
Definition: parse.c:253
#define NEW_TRUE()
Definition: node.h:444
#define WARN_I(i)
Definition: parse.c:1169
#define keyword_do_LAMBDA
Definition: parse.c:216
#define tLAST_TOKEN
Definition: parse.c:305
const char * name
Definition: ripper.c:13093
VALUE rb_eRuntimeError
Definition: error.c:800
#define tSP
Definition: eventids2.c:6
#define NEW_LAMBDA(a, b)
Definition: node.h:369
VALUE rb_complex_raw(VALUE x, VALUE y)
Definition: complex.c:1442
#define IS_lex_state(ls)
Definition: parse.c:402
Definition: node.h:207
#define NEW_UNTIL(c, b, n)
Definition: node.h:366
#define lvtbl
Definition: parse.c:600
#define tLABEL_END
Definition: parse.c:302
#define rb_warn1(fmt, a)
Definition: parse.c:1123
#define NEW_MODULE(n, b)
Definition: node.h:437
#define tokaddmbc(c, enc)
Definition: parse.c:10933
VALUE rb_str_catf(VALUE str, const char *format,...)
Definition: sprintf.c:1492
#define BIGNUM_NEGATE(b)
Definition: internal.h:605
#define dvar_defined_ref(id, vidp)
Definition: parse.c:977
short int yytype_int16
Definition: parse.c:1282
#define STR_NEW3(p, n, e, func)
Definition: parse.c:565
#define IS_BEG()
Definition: parse.c:12324
rb_magic_comment_setter_t func
Definition: ripper.c:13094
#define is_junk_id(id)
Definition: symbol.h:42
#define keyword_end
Definition: parse.c:197
#define dvar_defined(id)
Definition: parse.c:978
#define ESCAPE_CONTROL
Definition: parse.c:11827
#define tREGEXP_END
Definition: parse.c:254
VALUE rb_big_norm(VALUE x)
Definition: bignum.c:3134
#define nd_head
Definition: node.h:284
struct local_vars * prev
Definition: ripper.c:446
#define IS_END()
Definition: parse.c:12323
#define LONG2FIX(i)
Definition: ruby.h:234
#define NEW_WHILE(c, b, n)
Definition: node.h:365
struct vtable * vars
Definition: ripper.c:441
#define RTEST(v)
Definition: ruby.h:450
Definition: node.h:141
#define new_args(f, o, r, p, t)
Definition: parse.c:713
#define T_STRING
Definition: ruby.h:496
#define NEW_POSTARG(i, v)
Definition: node.h:425
#define new_nil()
Definition: parse.c:655
#define YYINITDEPTH
Definition: parse.c:5115
VALUE rb_class_new_instance(int, const VALUE *, VALUE)
Allocates and initializes an instance of klass.
Definition: object.c:2170
VALUE rb_parser_new(void)
Definition: parse.c:17298
#define NEW_UNDEF(i)
Definition: node.h:434
struct rb_encoding_entry * list
Definition: encoding.c:55
union RNode::@88 u1
Definition: id.h:103
VALUE rb_str_cat_cstr(VALUE, const char *)
Definition: string.c:2756
#define parse_string(n)
Definition: parse.c:10932
Definition: id.h:95
#define T_FILE
Definition: ruby.h:502
#define NEWHEAP()
Definition: parse.c:17410
#define NEW_CVASGN(v, val)
Definition: node.h:391
#define current_arg
Definition: parse.c:606
Definition: id.h:105
#define new_defined(expr, column)
Definition: parse.c:766
#define tSTRING_CONTENT
Definition: parse.c:250
#define NEW_FCALL(m, a)
Definition: node.h:418
int linenum
Definition: ripper.c:457
VALUE compile_option
Definition: ripper.c:509
VALUE rb_errinfo(void)
The current exception in the current thread.
Definition: eval.c:1777
#define TypedData_Make_Struct(klass, type, data_type, sval)
Definition: ruby.h:1175
#define YYEOF
Definition: parse.c:4853
#define tEMBDOC
Definition: eventids2.c:4
int first_line
Definition: parse.h:304
#define NEW_QCALL(q, r, m, a)
Definition: parse.c:623
#define NEW_MATCH3(r, n2)
Definition: node.h:408
long(* rb_magic_comment_length_t)(struct parser_params *parser, const char *name, long len)
Definition: parse.c:12968
#define get_id(id)
Definition: parse.c:860
#define NEW_OPT_ARG(i, v)
Definition: node.h:423
#define COND_SET(n)
Definition: parse.c:424
#define BEG(no)
Definition: re.c:24
short int yytype_int8
Definition: parse.c:1270
#define method_cond(node, column)
Definition: parse.c:654
#define keyword_and
Definition: parse.c:224
struct parser_params::@46 lex
VALUE debug_output
Definition: ripper.c:512
union RNode::@89 u2
#define YYTERROR
Definition: parse.c:4886
#define st_insert
Definition: regint.h:184
#define tok()
Definition: parse.c:11676
VALUE rb_filesystem_str_new_cstr(const char *)
Definition: string.c:1085
#define YYSTACK_RELOCATE(Stack)
Definition: parse.c:1453
#define ruby_eval_tree_begin
Definition: parse.c:613
Definition: id.h:81
NODE * rb_parser_append_print(VALUE vparser, NODE *node)
Definition: parse.c:17093
Definition: id.h:100
VALUE rb_enc_str_new(const char *, long, rb_encoding *)
Definition: string.c:759
Definition: ripper.c:432
VALUE rb_const_get_at(VALUE, ID)
Definition: variable.c:2298
#define NUM_SUFFIX_ALL
Definition: parse.c:12625
#define lex_p
Definition: parse.c:592
int main(int argc, char **argv)
Definition: nkf.c:6921
#define new_string1(str)
Definition: parse.c:836
const char * name
Definition: nkf.c:208
#define xrealloc
Definition: defines.h:186
#define new_qcall(q, r, m, a, column)
Definition: parse.c:705
lex_state_e
Definition: ripper.c:380
#define tSYMBOLS_BEG
Definition: parse.c:295
#define read_escape(flags, e)
Definition: parse.c:10928
#define parser_isascii()
Definition: parse.c:11032
#define ID2SYM(x)
Definition: ruby.h:383
ruby_method_ids
Definition: id.h:76
Definition: node.h:63
#define NEW_RETRY()
Definition: node.h:373
#define STR_FUNC_SYMBOL
Definition: parse.c:11546
#define nd_value
Definition: node.h:314
#define DVARS_INHERIT
Definition: parse.c:450
#define ID_INTERNAL
Definition: id.h:40
RUBY_SYMBOL_EXPORT_BEGIN void * alloca()
enum rb_block_type type
Definition: vm_core.h:659
#define keyword_END
Definition: parse.c:235
VALUE rb_str_new_frozen(VALUE)
Definition: string.c:1158
unsigned char yytype_uint8
Definition: parse.c:1261
void(* rb_magic_comment_setter_t)(struct parser_params *parser, const char *name, const char *val)
Definition: parse.c:12969
#define NEW_RESBODY(a, ex, n)
Definition: node.h:376
#define NEW_ARGSCAT(a, b)
Definition: node.h:426
#define arg_var(id)
Definition: parse.c:962
#define st_free_table
Definition: regint.h:188
#define NEW_DASGN_CURR(v, val)
Definition: node.h:388
#define keyword_in
Definition: parse.c:212
#define NEW_SUPER(a)
Definition: node.h:420
#define NEW_CALL(r, m, a)
Definition: node.h:416
#define in_defined
Definition: parse.c:583
rb_encoding * rb_ascii8bit_encoding(void)
Definition: encoding.c:1305
RUBY_SYMBOL_EXPORT_BEGIN VALUE rb_parser_reg_compile(struct parser_params *parser, VALUE str, int options)
Definition: parse.c:17053
int rb_enc_find_index(const char *name)
Definition: encoding.c:704
#define tMATCH
Definition: parse.c:266
#define tDSTAR
Definition: parse.c:286
VALUE rb_parser_end_seen_p(VALUE vparser)
Definition: parse.c:17353
#define WARN_ID(i)
Definition: parse.c:1170
Definition: node.h:33
#define tDOT2
Definition: parse.c:268
#define RCOMPLEX_SET_REAL(cmp, r)
Definition: ruby.h:1068
#define CONST_ID(var, str)
Definition: ruby.h:1743
#define keyword_module
Definition: parse.c:191
#define backref_assign_error(n, a, column)
Definition: parse.c:758
#define method_add_block(m, b)
Definition: parse.c:710
RUBY_EXTERN VALUE rb_stdout
Definition: ruby.h:1971
#define METHOD_NOT
Definition: parse.c:988
#define tokp
Definition: parse.c:617
#define literal_flush(p)
Definition: parse.c:10966
#define keyword__FILE__
Definition: parse.c:237
VALUE rb_str_intern(VALUE)
Definition: symbol.c:661
#define rb_intern_const(str)
Definition: ruby.h:1777
#define NEW_CVAR(v)
Definition: node.h:403
ID rb_id_attrset(ID)
Definition: symbol.c:100
#define tokline
Definition: parse.c:587
#define tEQQ
Definition: parse.c:260
int rb_reg_fragment_setenc(struct parser_params *, VALUE, int)
Definition: parse.c:16940
#define ESCAPE_META
Definition: parse.c:11828
#define local_push(top)
Definition: parse.c:956
void void xfree(void *)
#define is_notop_id(id)
Definition: symbol.h:35
#define NEW_MATCH2(n1, n2)
Definition: node.h:407
VALUE rb_parser_set_yydebug(VALUE self, VALUE flag)
Definition: parse.c:17398
ID first_post_arg
Definition: node.h:489
const char rb_parser_lex_state_names[][13]
Definition: parse.c:15456
VALUE rb_cstr_to_inum(const char *str, int base, int badcheck)
Definition: bignum.c:3992
#define ruby_debug_lines
Definition: parse.c:614
#define vtable_alloc(prev)
Definition: parse.c:11208
Definition: id.h:94
#define rb_enc_mbcput(c, buf, enc)
Definition: encoding.h:211
#define IS_ARG()
Definition: parse.c:12322
#define NEW_DVAR(v)
Definition: node.h:400
#define rb_intern(str)
#define NEW_DEFN(i, a, d, p)
Definition: node.h:356
NODE * rb_compile_file(const char *f, VALUE file, int start)
Definition: parse.c:11511
#define warn_balanced(tok, op, syn)
Definition: parse.c:13264
VALUE rb_str_buf_new(long)
Definition: string.c:1282
#define tLBRACE
Definition: parse.c:283
VALUE rb_usascii_str_new(const char *, long)
Definition: string.c:743
#define lex_eol_p()
Definition: parse.c:11581
#define rb_node_newnode(type, a1, a2, a3)
Definition: parse.c:650
#define SYMBOL_P(x)
Definition: ruby.h:382
#define tCOMMENT
Definition: eventids2.c:2
#define new_kw_arg(k, column)
Definition: parse.c:717
NODE * kw_args
Definition: node.h:494
#define nd_iter
Definition: node.h:312
#define nd_set_line(n, l)
Definition: node.h:279
VALUE rb_vsprintf(const char *, va_list)
Definition: sprintf.c:1446
#define void_stmts(node)
Definition: parse.c:676
#define NULL
Definition: _sdbm.c:102
#define compile_for_eval
Definition: parse.c:611
#define NEW_LASGN(v, val)
Definition: node.h:386
struct token_info token_info
#define FIX2LONG(x)
Definition: ruby.h:363
#define Qundef
Definition: ruby.h:439
#define tIGNORED_NL
Definition: eventids2.c:1
#define logop(id, node1, node2, column)
Definition: parse.c:661
#define yyerrok
Definition: parse.c:4850
#define NEW_STR(s)
Definition: node.h:410
#define YYMAXDEPTH
Definition: parse.c:5126
void rb_parser_free(struct parser_params *parser, void *ptr)
Definition: parse.c:17455
NODE * kw_rest_arg
Definition: node.h:495
#define ID_GLOBAL
Definition: id.h:35
#define in_def
Definition: parse.c:581
#define ISXDIGIT(c)
Definition: ruby.h:2151
#define ENCODING_SET(obj, i)
Definition: encoding.h:56
#define tCOLON2
Definition: parse.c:275
#define IS_LABEL_SUFFIX(n)
Definition: parse.c:12329
#define NEW_SELF()
Definition: node.h:442
void rb_define_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
Definition: class.c:1515
#define ruby_verbose
Definition: ruby.h:1813
VALUE rb_str_append(VALUE, VALUE)
Definition: string.c:2900
#define NEW_NODE(t, a0, a1, a2)
Definition: node.h:354
#define NEW_ARGS_AUX(r, b)
Definition: node.h:422
#define YYTABLE_NINF
Definition: parse.c:2396
#define new_errinfo(column)
Definition: parse.c:787
int rb_memcicmp(const void *, const void *, long)
Definition: re.c:79
#define NEW_ALIAS(n, o)
Definition: node.h:432
#define ifndef_ripper(x)
Definition: parse.c:1115
#define YYLEX
Definition: parse.c:4937
#define keyword_return
Definition: parse.c:217
#define nd_lit
Definition: node.h:317
#define rb_enc_prev_char(s, p, e, enc)
Definition: encoding.h:214
#define YY_LOCATION_PRINT(File, Loc)
Definition: parse.c:349
#define T_REGEXP
Definition: ruby.h:497
#define tokadd_escape(e)
Definition: parse.c:10929
Definition: node.h:139
#define tREGEXP_BEG
Definition: parse.c:292
#define dyna_push()
Definition: parse.c:970
#define arg_append(h, t, column)
Definition: parse.c:688
#define whole_match_p(e, l, i)
Definition: parse.c:10937
#define was_bol()
Definition: parse.c:11673
unsigned long ruby_scan_oct(const char *, size_t, size_t *)
Definition: util.c:34
#define HEAPCNT(n, size)
Definition: parse.c:17409
#define STR_FUNC_EXPAND
Definition: parse.c:11543
VALUE rb_attr_get(VALUE, ID)
Definition: variable.c:1224
struct vtable * args
Definition: ripper.c:440
#define tSTRING_DVAR
Definition: parse.c:299
#define SPECIAL_PUNCT(idx)
Definition: parse.c:12270
#define NEW_CDECL(v, val, path)
Definition: node.h:390
#define NEW_OPCALL(r, m, a)
Definition: node.h:417
#define NEW_DEFS(r, i, a, d)
Definition: node.h:357
char ** argv
Definition: ruby.c:188
#define tEMBDOC_END
Definition: eventids2.c:5
#define DBL2NUM(dbl)
Definition: ruby.h:934
#define tXSTRING_BEG
Definition: parse.c:291
#define ISSPACE(c)
Definition: ruby.h:2145
#define StringValue(v)
Definition: ruby.h:569
VALUE rb_enc_str_buf_cat(VALUE str, const char *ptr, long len, rb_encoding *enc)
Definition: string.c:2853
#define keyword_rescue
Definition: parse.c:195
#define STR_NEW(p, n)
Definition: parse.c:562
#define reduce_nodes(n)
Definition: parse.c:678
#define void_expr0(node)
Definition: parse.c:673
rb_encoding * rb_enc_from_index(int index)
Definition: encoding.c:616
#define tokcopy(n)
Definition: parse.c:11733
#define evstr2dstr(n, column)
Definition: parse.c:697
VALUE rb_str_new(const char *, long)
Definition: string.c:737
#define xcalloc
Definition: defines.h:185
#define rb_warn1L(l, fmt, a)
Definition: parse.c:1133
#define ID_CLASS
Definition: id.h:38
#define new_unless(cc, left, right, column)
Definition: parse.c:659
#define block_append(h, t, column)
Definition: parse.c:683
#define keyword_next
Definition: parse.c:209