2 /* A Bison parser, made by GNU Bison 2.4.1. */
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7 Free Software Foundation, Inc.
9 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
22 /* As a special exception, you may create a larger work that contains
23 part or all of the Bison parser skeleton and distribute that work
24 under terms of your choice, so long as that work isn't itself a
25 parser generator using the skeleton or a modified version thereof
26 as a parser skeleton. Alternatively, if you modify or redistribute
27 the parser skeleton itself, you may (at your option) remove this
28 special exception, which will cause the skeleton and the resulting
29 Bison output files to be licensed under the GNU General Public
30 License without this special exception.
32 This special exception was added by the Free Software Foundation in
33 version 2.2 of Bison. */
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36 simplifying the original so-called "semantic" parser. */
38 /* All symbols defined below should begin with yy or YY, to avoid
39 infringing on user name space. This should be done even for local
40 variables, as they might otherwise be expanded by user macros.
41 There are some unavoidable exceptions within include files to
42 define necessary library symbols; they are noted "INFRINGES ON
43 USER NAME SPACE" below. */
45 /* Identify Bison output. */
49 #define YYBISON_VERSION "2.4.1"
52 #define YYSKELETON_NAME "yacc.c"
63 /* Using locations. */
64 #define YYLSP_NEEDED 0
68 /* Copy the first part of user declarations. */
70 /* Line 189 of yacc.c */
85 #define YYMAXDEPTH 200
88 extern void PROTO( eat_nl, (void) ) ;
89 static void PROTO( resize_fblock, (FBLOCK *) ) ;
90 static void PROTO( switch_code_to_main, (void)) ;
91 static void PROTO( code_array, (SYMTAB *) ) ;
92 static void PROTO( code_call_id, (CA_REC *, SYMTAB *) ) ;
93 static void PROTO( field_A2I, (void)) ;
94 static void PROTO( check_var, (SYMTAB *) ) ;
95 static void PROTO( check_array, (SYMTAB *) ) ;
96 static void PROTO( RE_as_arg, (void)) ;
99 static FBLOCK *active_funct ;
100 /* when scope is SCOPE_FUNCT */
102 #define code_address(x) if( is_local(x) ) \
103 code2op(L_PUSHA, (x)->offset) ;\
104 else code2(_PUSHA, (x)->stval.cp)
106 #define CDP(x) (code_base+(x))
107 /* WARNING: These CDP() calculations become invalid after calls
108 that might change code_base. Which are: code2(), code2op(),
109 code_jmp() and code_pop().
112 /* this nonsense caters to MSDOS large model */
113 #define CODE_FE_PUSHA() code_ptr->ptr = (PTR) 0 ; code1(FE_PUSHA)
117 /* Line 189 of yacc.c */
120 /* Enabling traces. */
125 /* Enabling verbose error messages. */
126 #ifdef YYERROR_VERBOSE
127 # undef YYERROR_VERBOSE
128 # define YYERROR_VERBOSE 1
130 # define YYERROR_VERBOSE 0
133 /* Enabling the token table. */
134 #ifndef YYTOKEN_TABLE
135 # define YYTOKEN_TABLE 0
142 /* Put the tokens into the symbol table, so that GDB and other debuggers
222 #define UNEXPECTED 258
223 #define BAD_DECIMAL 259
225 #define SEMI_COLON 261
263 #define INC_or_DEC 299
279 #define MATCH_FUNC 315
300 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
301 typedef union YYSTYPE
304 /* Line 214 of yacc.c */
309 int start ; /* code starting address as offset from code_base */
310 PF_CP fp ; /* ptr to a (print/printf) or (sub/gsub) function */
311 BI_REC *bip ; /* ptr to info about a builtin */
312 FBLOCK *fbp ; /* ptr to a function block */
320 /* Line 214 of yacc.c */
323 # define YYSTYPE_IS_TRIVIAL 1
324 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
325 # define YYSTYPE_IS_DECLARED 1
329 /* Copy the second part of user declarations. */
332 /* Line 264 of yacc.c */
340 typedef YYTYPE_UINT8 yytype_uint8;
342 typedef unsigned char yytype_uint8;
346 typedef YYTYPE_INT8 yytype_int8;
347 #elif (defined __STDC__ || defined __C99__FUNC__ \
348 || defined __cplusplus || defined _MSC_VER)
349 typedef signed char yytype_int8;
351 typedef short int yytype_int8;
355 typedef YYTYPE_UINT16 yytype_uint16;
357 typedef unsigned short int yytype_uint16;
361 typedef YYTYPE_INT16 yytype_int16;
363 typedef short int yytype_int16;
367 # ifdef __SIZE_TYPE__
368 # define YYSIZE_T __SIZE_TYPE__
369 # elif defined size_t
370 # define YYSIZE_T size_t
371 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
372 || defined __cplusplus || defined _MSC_VER)
373 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
374 # define YYSIZE_T size_t
376 # define YYSIZE_T unsigned int
380 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
385 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
386 # define YY_(msgid) dgettext ("bison-runtime", msgid)
390 # define YY_(msgid) msgid
394 /* Suppress unused-variable warnings by "using" E. */
395 #if ! defined lint || defined __GNUC__
396 # define YYUSE(e) ((void) (e))
398 # define YYUSE(e) /* empty */
401 /* Identity function, used to suppress warnings about constant conditions. */
405 #if (defined __STDC__ || defined __C99__FUNC__ \
406 || defined __cplusplus || defined _MSC_VER)
419 #if ! defined yyoverflow || YYERROR_VERBOSE
421 /* The parser invokes alloca or malloc; define the necessary symbols. */
423 # ifdef YYSTACK_USE_ALLOCA
424 # if YYSTACK_USE_ALLOCA
426 # define YYSTACK_ALLOC __builtin_alloca
427 # elif defined __BUILTIN_VA_ARG_INCR
428 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
430 # define YYSTACK_ALLOC __alloca
431 # elif defined _MSC_VER
432 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
433 # define alloca _alloca
435 # define YYSTACK_ALLOC alloca
436 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
437 || defined __cplusplus || defined _MSC_VER)
438 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
447 # ifdef YYSTACK_ALLOC
448 /* Pacify GCC's `empty if-body' warning. */
449 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
450 # ifndef YYSTACK_ALLOC_MAXIMUM
451 /* The OS might guarantee only one guard page at the bottom of the stack,
452 and a page size can be as small as 4096 bytes. So we cannot safely
453 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
454 to allow for a few compiler-allocated temporary stack slots. */
455 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
458 # define YYSTACK_ALLOC YYMALLOC
459 # define YYSTACK_FREE YYFREE
460 # ifndef YYSTACK_ALLOC_MAXIMUM
461 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
463 # if (defined __cplusplus && ! defined _STDLIB_H \
464 && ! ((defined YYMALLOC || defined malloc) \
465 && (defined YYFREE || defined free)))
466 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
472 # define YYMALLOC malloc
473 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
474 || defined __cplusplus || defined _MSC_VER)
475 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
480 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
481 || defined __cplusplus || defined _MSC_VER)
482 void free (void *); /* INFRINGES ON USER NAME SPACE */
486 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
489 #if (! defined yyoverflow \
490 && (! defined __cplusplus \
491 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
493 /* A type that is properly aligned for any stack member. */
496 yytype_int16 yyss_alloc;
500 /* The size of the maximum gap between one aligned stack and the next. */
501 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
503 /* The size of an array large to enough to hold all stacks, each with
505 # define YYSTACK_BYTES(N) \
506 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
507 + YYSTACK_GAP_MAXIMUM)
509 /* Copy COUNT objects from FROM to TO. The source and destination do
512 # if defined __GNUC__ && 1 < __GNUC__
513 # define YYCOPY(To, From, Count) \
514 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
516 # define YYCOPY(To, From, Count) \
520 for (yyi = 0; yyi < (Count); yyi++) \
521 (To)[yyi] = (From)[yyi]; \
527 /* Relocate STACK from its old location to the new one. The
528 local variables YYSIZE and YYSTACKSIZE give the old and new number of
529 elements in the stack, and YYPTR gives the new location of the
530 stack. Advance YYPTR to a properly aligned location for the next
532 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
535 YYSIZE_T yynewbytes; \
536 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
537 Stack = &yyptr->Stack_alloc; \
538 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
539 yyptr += yynewbytes / sizeof (*yyptr); \
545 /* YYFINAL -- State number of the termination state. */
547 /* YYLAST -- Last index in YYTABLE. */
550 /* YYNTOKENS -- Number of terminals. */
552 /* YYNNTS -- Number of nonterminals. */
554 /* YYNRULES -- Number of rules. */
556 /* YYNRULES -- Number of states. */
557 #define YYNSTATES 331
559 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
561 #define YYMAXUTOK 331
563 #define YYTRANSLATE(YYX) \
564 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
566 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
567 static const yytype_uint8 yytranslate[] =
569 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
570 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
571 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
572 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
573 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
574 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
575 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
576 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
577 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
578 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
579 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
580 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
581 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
582 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
583 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
584 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
585 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
586 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
587 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
588 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
589 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
590 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
591 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
592 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
593 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
594 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
595 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
596 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
597 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
598 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
599 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
600 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
601 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
606 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
608 static const yytype_uint16 yyprhs[] =
610 0, 0, 3, 5, 8, 10, 12, 15, 17, 18,
611 22, 23, 27, 28, 32, 33, 34, 41, 45, 49,
612 51, 53, 55, 58, 60, 63, 65, 68, 71, 74,
613 76, 79, 81, 83, 85, 89, 93, 97, 101, 105,
614 109, 113, 117, 121, 125, 129, 133, 137, 141, 142,
615 147, 148, 153, 154, 155, 163, 165, 168, 170, 172,
616 174, 178, 180, 184, 188, 192, 196, 200, 204, 207,
617 210, 213, 215, 218, 221, 224, 227, 229, 230, 232,
618 234, 238, 244, 246, 247, 253, 255, 257, 259, 263,
619 266, 270, 274, 275, 278, 283, 286, 288, 293, 295,
620 303, 308, 311, 316, 320, 325, 327, 330, 332, 335,
621 339, 345, 351, 357, 364, 372, 376, 383, 386, 388,
622 391, 398, 401, 405, 407, 411, 415, 419, 423, 427,
623 431, 435, 438, 444, 446, 450, 457, 459, 462, 466,
624 469, 473, 475, 478, 481, 485, 490, 492, 494, 496,
625 499, 503, 510, 512, 514, 516, 520, 523, 528, 531,
626 534, 535, 537, 539, 543, 545, 549, 552, 555, 557,
630 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
631 static const yytype_int16 yyrhs[] =
633 78, 0, -1, 79, -1, 78, 79, -1, 80, -1,
634 125, -1, 130, 86, -1, 86, -1, -1, 71, 81,
635 86, -1, -1, 72, 82, 86, -1, -1, 91, 83,
636 87, -1, -1, -1, 91, 11, 84, 91, 85, 87,
637 -1, 7, 88, 8, -1, 7, 1, 8, -1, 86,
638 -1, 90, -1, 89, -1, 88, 89, -1, 86, -1,
639 91, 90, -1, 90, -1, 1, 90, -1, 66, 90,
640 -1, 67, 90, -1, 119, -1, 74, 90, -1, 5,
641 -1, 6, -1, 96, -1, 98, 19, 91, -1, 98,
642 18, 91, -1, 98, 17, 91, -1, 98, 16, 91,
643 -1, 98, 15, 91, -1, 98, 14, 91, -1, 98,
644 13, 91, -1, 91, 31, 91, -1, 91, 30, 91,
645 -1, 91, 29, 91, -1, 91, 28, 91, -1, 91,
646 27, 91, -1, 91, 26, 91, -1, 91, 25, 91,
647 -1, -1, 91, 22, 92, 91, -1, -1, 91, 23,
648 93, 91, -1, -1, -1, 91, 21, 94, 91, 20,
649 95, 91, -1, 97, -1, 96, 97, -1, 49, -1,
650 50, -1, 52, -1, 48, 91, 47, -1, 51, -1,
651 97, 35, 97, -1, 97, 34, 97, -1, 97, 38,
652 97, -1, 97, 37, 97, -1, 97, 36, 97, -1,
653 97, 43, 97, -1, 40, 97, -1, 35, 97, -1,
654 34, 97, -1, 101, -1, 52, 44, -1, 44, 98,
655 -1, 115, 44, -1, 44, 115, -1, 52, -1, -1,
656 100, -1, 91, -1, 100, 11, 91, -1, 55, 102,
657 48, 99, 47, -1, 56, -1, -1, 103, 102, 104,
658 106, 90, -1, 57, -1, 58, -1, 99, -1, 48,
659 105, 47, -1, 48, 47, -1, 91, 11, 91, -1,
660 105, 11, 91, -1, -1, 12, 91, -1, 68, 48,
661 91, 47, -1, 107, 89, -1, 69, -1, 107, 89,
662 108, 89, -1, 63, -1, 109, 89, 64, 48, 91,
663 47, 90, -1, 64, 48, 91, 47, -1, 110, 89,
664 -1, 111, 112, 113, 89, -1, 65, 48, 6, -1,
665 65, 48, 91, 6, -1, 6, -1, 91, 6, -1,
666 47, -1, 91, 47, -1, 91, 24, 52, -1, 48,
667 105, 47, 24, 52, -1, 52, 102, 9, 100, 10,
668 -1, 52, 102, 9, 100, 10, -1, 52, 102, 9,
669 100, 10, 44, -1, 70, 52, 102, 9, 100, 10,
670 90, -1, 70, 52, 90, -1, 65, 48, 52, 24,
671 52, 47, -1, 114, 89, -1, 45, -1, 46, 53,
672 -1, 46, 53, 102, 9, 100, 10, -1, 46, 97,
673 -1, 48, 115, 47, -1, 115, -1, 115, 19, 91,
674 -1, 115, 18, 91, -1, 115, 17, 91, -1, 115,
675 16, 91, -1, 115, 15, 91, -1, 115, 14, 91,
676 -1, 115, 13, 91, -1, 116, 117, -1, 59, 48,
677 91, 11, 52, -1, 47, -1, 11, 91, 47, -1,
678 60, 48, 91, 11, 118, 47, -1, 91, -1, 73,
679 90, -1, 73, 91, 90, -1, 75, 90, -1, 75,
680 91, 90, -1, 120, -1, 120, 121, -1, 122, 97,
681 -1, 97, 41, 33, -1, 97, 41, 33, 121, -1,
682 33, -1, 98, -1, 115, -1, 120, 42, -1, 120,
683 121, 42, -1, 123, 48, 118, 11, 91, 124, -1,
684 61, -1, 62, -1, 47, -1, 11, 121, 47, -1,
685 126, 86, -1, 127, 48, 128, 47, -1, 76, 52,
686 -1, 76, 54, -1, -1, 129, -1, 52, -1, 129,
687 11, 52, -1, 1, -1, 54, 102, 131, -1, 48,
688 47, -1, 132, 133, -1, 48, -1, 132, 91, 11,
689 -1, 132, 52, 11, -1, 91, 47, -1, 52, 47,
693 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
694 static const yytype_uint16 yyrline[] =
696 0, 200, 200, 201, 204, 205, 206, 209, 215, 214,
697 221, 220, 227, 226, 234, 250, 233, 263, 265, 271,
698 272, 279, 280, 284, 285, 287, 289, 295, 298, 301,
699 305, 313, 313, 316, 317, 318, 319, 320, 321, 322,
700 323, 324, 325, 326, 327, 328, 329, 331, 359, 358,
701 366, 365, 372, 373, 372, 378, 379, 383, 385, 387,
702 395, 399, 403, 404, 405, 406, 407, 408, 409, 411,
703 413, 415, 418, 426, 433, 437, 444, 453, 454, 457,
704 459, 464, 475, 485, 489, 498, 499, 502, 503, 507,
705 511, 516, 520, 521, 528, 533, 537, 541, 550, 555,
706 561, 581, 607, 631, 632, 636, 637, 654, 658, 671,
707 676, 687, 700, 712, 729, 737, 748, 762, 779, 781,
708 790, 804, 806, 810, 814, 815, 816, 817, 818, 819,
709 820, 826, 830, 837, 839, 863, 870, 893, 896, 900,
710 903, 909, 916, 922, 927, 932, 939, 941, 941, 943,
711 947, 955, 974, 975, 979, 984, 992, 1001, 1020, 1043,
712 1050, 1051, 1054, 1060, 1073, 1086, 1098, 1100, 1115, 1117,
717 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
718 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
719 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
720 static const char *const yytname[] =
722 "$end", "error", "$undefined", "UNEXPECTED", "BAD_DECIMAL", "NL",
723 "SEMI_COLON", "LBRACE", "RBRACE", "LBOX", "RBOX", "COMMA", "IO_OUT",
724 "POW_ASG", "MOD_ASG", "DIV_ASG", "MUL_ASG", "SUB_ASG", "ADD_ASG",
725 "ASSIGN", "COLON", "QMARK", "OR", "AND", "IN", "MATCH", "GTE", "GT",
726 "LTE", "LT", "NEQ", "EQ", "CAT", "GETLINE", "MINUS", "PLUS", "MOD",
727 "DIV", "MUL", "UMINUS", "NOT", "PIPE", "IO_IN", "POW", "INC_or_DEC",
728 "FIELD", "DOLLAR", "RPAREN", "LPAREN", "DOUBLE", "STRING_", "RE", "ID",
729 "D_ID", "FUNCT_ID", "BUILTIN", "LENGTH", "PRINT", "PRINTF", "SPLIT",
730 "MATCH_FUNC", "SUB", "GSUB", "DO", "WHILE", "FOR", "BREAK", "CONTINUE",
731 "IF", "ELSE", "DELETE", "BEGIN", "END", "EXIT", "NEXT", "RETURN",
732 "FUNCTION", "$accept", "program", "program_block", "PA_block", "$@1",
733 "$@2", "$@3", "$@4", "$@5", "block", "block_or_separator",
734 "statement_list", "statement", "separator", "expr", "$@6", "$@7", "$@8",
735 "$@9", "cat_expr", "p_expr", "lvalue", "arglist", "args", "builtin",
736 "mark", "print", "pr_args", "arg2", "pr_direction", "if_front", "else",
737 "do", "while_front", "for1", "for2", "for3", "array_loop_front", "field",
738 "split_front", "split_back", "re_arg", "return_statement", "getline",
739 "fvalue", "getline_file", "sub_or_gsub", "sub_back", "function_def",
740 "funct_start", "funct_head", "f_arglist", "f_args", "outside_error",
741 "call_args", "ca_front", "ca_back", 0
746 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
748 static const yytype_uint16 yytoknum[] =
750 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
751 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
752 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
753 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
754 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
755 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
756 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
757 325, 326, 327, 328, 329, 330, 331
761 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
762 static const yytype_uint8 yyr1[] =
764 0, 77, 78, 78, 79, 79, 79, 80, 81, 80,
765 82, 80, 83, 80, 84, 85, 80, 86, 86, 87,
766 87, 88, 88, 89, 89, 89, 89, 89, 89, 89,
767 89, 90, 90, 91, 91, 91, 91, 91, 91, 91,
768 91, 91, 91, 91, 91, 91, 91, 91, 92, 91,
769 93, 91, 94, 95, 91, 96, 96, 97, 97, 97,
770 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
771 97, 97, 97, 97, 97, 97, 98, 99, 99, 100,
772 100, 101, 101, 102, 89, 103, 103, 104, 104, 104,
773 105, 105, 106, 106, 107, 89, 108, 89, 109, 89,
774 110, 89, 89, 111, 111, 112, 112, 113, 113, 91,
775 91, 98, 97, 97, 89, 89, 114, 89, 115, 115,
776 115, 115, 115, 97, 91, 91, 91, 91, 91, 91,
777 91, 97, 116, 117, 117, 97, 118, 89, 89, 119,
778 119, 97, 97, 97, 97, 97, 120, 121, 121, 122,
779 122, 97, 123, 123, 124, 124, 125, 126, 127, 127,
780 128, 128, 129, 129, 130, 97, 131, 131, 132, 132,
784 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
785 static const yytype_uint8 yyr2[] =
787 0, 2, 1, 2, 1, 1, 2, 1, 0, 3,
788 0, 3, 0, 3, 0, 0, 6, 3, 3, 1,
789 1, 1, 2, 1, 2, 1, 2, 2, 2, 1,
790 2, 1, 1, 1, 3, 3, 3, 3, 3, 3,
791 3, 3, 3, 3, 3, 3, 3, 3, 0, 4,
792 0, 4, 0, 0, 7, 1, 2, 1, 1, 1,
793 3, 1, 3, 3, 3, 3, 3, 3, 2, 2,
794 2, 1, 2, 2, 2, 2, 1, 0, 1, 1,
795 3, 5, 1, 0, 5, 1, 1, 1, 3, 2,
796 3, 3, 0, 2, 4, 2, 1, 4, 1, 7,
797 4, 2, 4, 3, 4, 1, 2, 1, 2, 3,
798 5, 5, 5, 6, 7, 3, 6, 2, 1, 2,
799 6, 2, 3, 1, 3, 3, 3, 3, 3, 3,
800 3, 2, 5, 1, 3, 6, 1, 2, 3, 2,
801 3, 1, 2, 2, 3, 4, 1, 1, 1, 2,
802 3, 6, 1, 1, 1, 3, 2, 4, 2, 2,
803 0, 1, 1, 3, 1, 3, 2, 2, 1, 3,
807 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
808 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
809 means the default is an error. */
810 static const yytype_uint8 yydefact[] =
812 0, 164, 0, 146, 0, 0, 0, 0, 118, 0,
813 0, 57, 58, 61, 59, 83, 83, 82, 0, 0,
814 152, 153, 8, 10, 0, 0, 2, 4, 7, 12,
815 33, 55, 0, 71, 123, 0, 141, 0, 0, 5,
816 0, 0, 0, 0, 31, 32, 85, 86, 98, 0,
817 0, 0, 0, 0, 0, 0, 0, 0, 23, 0,
818 21, 25, 0, 83, 0, 0, 0, 0, 0, 29,
819 0, 59, 70, 123, 69, 68, 0, 76, 73, 75,
820 119, 121, 0, 0, 123, 72, 0, 0, 0, 0,
821 0, 0, 0, 158, 159, 1, 3, 14, 52, 48,
822 50, 0, 0, 0, 0, 0, 0, 0, 0, 0,
823 56, 0, 0, 0, 0, 0, 0, 0, 0, 0,
824 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
825 0, 0, 74, 0, 133, 131, 149, 147, 148, 142,
826 143, 0, 156, 160, 6, 18, 26, 0, 0, 27,
827 28, 0, 83, 137, 0, 30, 139, 0, 0, 17,
828 22, 24, 77, 95, 0, 101, 105, 0, 0, 117,
829 0, 0, 0, 0, 0, 0, 60, 0, 0, 122,
830 0, 168, 165, 0, 77, 0, 0, 9, 11, 0,
831 0, 0, 0, 109, 47, 46, 45, 44, 43, 42,
832 41, 19, 13, 20, 63, 62, 66, 65, 64, 144,
833 67, 40, 39, 38, 37, 36, 35, 34, 130, 129,
834 128, 127, 126, 125, 124, 0, 150, 136, 0, 162,
835 0, 161, 0, 103, 59, 0, 0, 115, 0, 138,
836 140, 0, 79, 87, 78, 92, 96, 0, 0, 106,
837 107, 0, 0, 0, 0, 0, 90, 91, 0, 0,
838 166, 59, 0, 167, 0, 0, 0, 15, 0, 49,
839 51, 145, 134, 0, 157, 0, 100, 0, 104, 94,
840 0, 89, 0, 0, 0, 0, 97, 0, 108, 102,
841 0, 0, 0, 110, 112, 170, 172, 169, 171, 81,
842 132, 0, 0, 53, 0, 163, 0, 0, 88, 80,
843 93, 84, 0, 112, 111, 120, 113, 135, 16, 0,
844 0, 154, 151, 116, 0, 0, 54, 0, 114, 99,
848 /* YYDEFGOTO[NTERM-NUM]. */
849 static const yytype_int16 yydefgoto[] =
851 -1, 25, 26, 27, 91, 92, 109, 189, 302, 58,
852 202, 59, 60, 61, 62, 191, 192, 190, 319, 30,
853 31, 32, 243, 244, 33, 86, 63, 245, 83, 285,
854 64, 247, 65, 66, 67, 168, 252, 68, 34, 35,
855 135, 228, 69, 36, 139, 37, 38, 322, 39, 40,
856 41, 230, 231, 42, 182, 183, 263
859 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
861 #define YYPACT_NINF -189
862 static const yytype_int16 yypact[] =
864 324, -189, 457, -189, 799, 799, 799, 1, -189, 709,
865 829, -189, -189, -189, 389, -189, -189, -189, -39, -26,
866 -189, -189, -189, -189, 39, 289, -189, -189, -189, 1077,
867 799, 129, 966, -189, 466, 3, 35, 799, -21, -189,
868 29, -3, 29, 18, -189, -189, -189, -189, -189, 40,
869 69, 34, 34, 86, -1, 594, 34, 594, -189, 386,
870 -189, -189, 706, -189, 528, 528, 528, 624, 528, -189,
871 829, 10, 51, 14, 51, 51, 30, 128, -189, -189,
872 128, -189, 446, 5, 704, -189, 130, 94, 104, 829,
873 829, 29, 29, -189, -189, -189, -189, -189, -189, -189,
874 -189, 105, 829, 829, 829, 829, 829, 829, 829, 26,
875 129, 799, 799, 799, 799, 799, 136, 799, 829, 829,
876 829, 829, 829, 829, 829, 829, 829, 829, 829, 829,
877 829, 829, -189, 829, -189, -189, -189, -189, -189, 119,
878 73, 829, -189, 121, -189, -189, -189, 829, 654, -189,
879 -189, 829, 34, -189, 706, -189, -189, 706, 34, -189,
880 -189, -189, 859, 102, 110, -189, -189, 1045, 739, -189,
881 931, 167, 131, 170, 172, 829, -189, 829, 158, -189,
882 829, 140, -189, 889, 829, 1098, 1119, -189, -189, 829,
883 829, 829, 829, -189, 70, -189, -189, -189, -189, -189,
884 -189, -189, -189, -189, 23, 23, 51, 51, 51, 1,
885 143, 1142, 1142, 1142, 1142, 1142, 1142, 1142, 1142, 1142,
886 1142, 1142, 1142, 1142, 1142, 942, -189, 1142, 177, -189,
887 146, 187, 969, -189, 216, 1056, 980, -189, 192, -189,
888 -189, 769, 1142, -189, 193, 190, -189, 528, 157, -189,
889 -189, 1007, 528, 829, 829, 829, 1142, 1142, 154, 52,
890 -189, 199, 517, -189, 162, 159, 829, 1142, 1131, 387,
891 595, -189, -189, 829, -189, 168, -189, 171, -189, -189,
892 829, -189, 9, 829, 829, 34, -189, 829, -189, -189,
893 61, 135, 139, -189, 537, -189, -189, -189, -189, -189,
894 -189, 175, 26, -189, 586, -189, 179, 145, 158, 1142,
895 1142, -189, 1018, 180, -189, -189, -189, -189, -189, 829,
896 1, -189, -189, -189, 34, 34, 1142, 189, -189, -189,
900 /* YYPGOTO[NTERM-NUM]. */
901 static const yytype_int16 yypgoto[] =
903 -189, -189, 194, -189, -189, -189, -189, -189, -189, 44,
904 -75, -189, -53, -14, 0, -189, -189, -189, -189, -189,
905 191, -6, 53, -95, -189, 2, -189, -189, 4, -189,
906 -189, -189, -189, -189, -189, -189, -189, -189, -2, -189,
907 -189, -28, -189, -189, -188, -189, -189, -189, -189, -189,
908 -189, -189, -189, -189, -189, -189, -189
911 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
912 positive, shift that token. If negative, reduce the rule which
913 number is the opposite. If zero, do what YYDEFACT says.
914 If YYTABLE_NINF, syntax error. */
915 #define YYTABLE_NINF -112
916 static const yytype_int16 yytable[] =
918 29, 78, 73, 73, 73, 79, 160, 73, 84, 89,
919 82, 163, 164, 165, 133, 169, 177, 87, 88, -83,
920 177, 271, 90, 44, 45, 29, 145, 141, 73, 146,
921 137, 44, 45, 2, 138, 73, 2, 149, 150, 44,
922 45, 153, 155, 156, 28, 143, 8, 9, 161, 76,
923 134, 152, 178, 77, 85, 154, 308, 157, 132, 113,
924 114, 115, 294, 283, 116, 162, 117, 167, 84, 28,
925 170, 313, 283, 171, 172, 8, 9, 136, 76, 173,
926 8, 9, 174, 76, 142, 259, 144, 77, 147, 185,
927 186, 93, 116, 94, 117, 203, 103, 104, 105, 106,
928 107, 108, 194, 195, 196, 197, 198, 199, 200, 73,
929 73, 73, 73, 73, -112, 73, 117, 148, 211, 212,
930 213, 214, 215, 216, 217, 218, 219, 220, 221, 222,
931 223, 224, 327, 225, 151, 187, 188, -83, 237, 180,
932 239, 227, 181, 240, 146, 314, 283, 232, 235, 315,
933 283, 236, 184, 201, 238, 324, 283, 193, 290, 291,
934 292, 226, 242, 111, 112, 113, 114, 115, 251, 209,
935 116, 246, 117, 229, 248, 256, 253, 257, 179, 254,
936 242, 255, 258, 262, 242, 307, 117, 260, 273, 267,
937 268, 269, 270, 274, 286, 72, 74, 75, 275, 289,
938 81, 280, 284, 137, 283, 287, 293, 138, -83, 299,
939 295, 300, -76, -76, -76, -76, -76, -76, -76, 96,
940 305, 110, 317, 306, 316, -83, 323, 318, 140, -76,
941 -76, -76, -76, -76, -76, -76, 330, 264, 301, 84,
942 277, 82, 0, 85, 0, 282, 296, 0, 0, 0,
943 0, 0, 0, 242, 242, 242, 0, 0, 0, 0,
944 85, 0, 0, 0, 0, 0, 227, 0, 0, 0,
945 0, 311, 0, 304, 0, 0, 0, 0, 0, 0,
946 242, 0, 0, 309, 310, 0, 0, 312, 203, 95,
947 1, 0, 0, 0, 0, 0, 2, 0, 0, 0,
948 0, 0, 204, 205, 206, 207, 208, 0, 210, 0,
949 328, 329, 0, 0, 137, 0, 0, 0, 138, 326,
950 0, 0, 3, 4, 5, 1, 0, 0, 0, 6,
951 0, 2, 0, 7, 8, 9, 0, 10, 11, 12,
952 13, 14, 0, 15, 16, 17, 201, 0, 18, 19,
953 20, 21, 0, 0, 0, 0, 0, 3, 4, 5,
954 22, 23, 0, 0, 6, 24, 0, 0, 7, 8,
955 9, 0, 10, 11, 12, 13, 14, 0, 15, 16,
956 17, 0, 0, 18, 19, 20, 21, 158, 0, 0,
957 0, 44, 45, 2, 159, 22, 23, 0, -83, 0,
958 24, 0, -76, -76, -76, -76, -76, -76, -76, 0,
959 100, 101, 102, 103, 104, 105, 106, 107, 108, 3,
960 4, 5, 0, 0, 0, 0, 6, 0, 0, 0,
961 7, 8, 9, 85, 10, 11, 12, 13, 14, 0,
962 15, 16, 17, 46, 47, 18, 19, 20, 21, 48,
963 49, 50, 51, 52, 53, 0, 54, 175, 43, 55,
964 56, 57, 44, 45, 2, 0, 0, 98, 99, 100,
965 101, 102, 103, 104, 105, 106, 107, 108, 0, 125,
966 126, 127, 128, 129, 130, 131, 0, 0, 0, 0,
967 3, 4, 5, 176, 0, 0, 0, 6, 0, 0,
968 0, 7, 8, 9, 0, 10, 11, 12, 13, 14,
969 132, 15, 16, 17, 46, 47, 18, 19, 20, 21,
970 48, 49, 50, 51, 52, 53, 0, 54, 297, 158,
971 55, 56, 57, 44, 45, 2, 0, 0, 98, 99,
972 100, 101, 102, 103, 104, 105, 106, 107, 108, 0,
973 -111, -111, -111, -111, -111, -111, -111, 0, 0, 0,
974 0, 3, 4, 5, 298, 0, 0, 0, 6, 0,
975 0, 0, 7, 8, 9, 0, 10, 11, 12, 13,
976 14, 316, 15, 16, 17, 46, 47, 18, 19, 20,
977 21, 48, 49, 50, 51, 52, 53, 320, 54, 44,
978 45, 55, 56, 57, 0, 0, 0, 98, 99, 100,
979 101, 102, 103, 104, 105, 106, 107, 108, 0, 101,
980 102, 103, 104, 105, 106, 107, 108, 3, 4, 5,
981 166, 0, 0, 321, 6, 0, 0, 0, 7, 8,
982 9, 0, 10, 11, 12, 13, 14, 0, 15, 16,
983 17, 0, 0, 18, 19, 20, 21, 3, 4, 5,
984 233, 0, 0, 0, 6, 0, 0, 0, 7, 8,
985 9, 0, 10, 11, 12, 13, 14, 0, 15, 16,
986 17, 0, 0, 18, 19, 20, 21, 3, 4, 5,
987 0, 0, 0, 0, 6, 0, 0, 0, 7, 8,
988 9, 0, 10, 11, 12, 13, 234, 0, 15, 16,
989 17, 44, 45, 18, 19, 20, 21, 125, 126, 127,
990 128, 129, 130, 131, 0, 0, 0, 98, 99, 100,
991 101, 102, 103, 104, 105, 106, 107, 108, 0, 0,
992 0, 0, 3, 4, 5, 0, 0, 0, 132, 6,
993 0, 179, 0, 7, 8, 9, 0, 70, 11, 12,
994 13, 71, 80, 15, 16, 17, 0, 0, 18, 19,
995 20, 21, 3, 4, 5, 0, 0, 0, 0, 6,
996 0, 0, 0, 7, 8, 9, 250, 10, 11, 12,
997 13, 14, 0, 15, 16, 17, 0, 0, 18, 19,
998 20, 21, 3, 4, 5, 0, 0, 0, 0, 6,
999 0, 0, 0, 7, 8, 9, 281, 10, 11, 12,
1000 13, 14, 0, 15, 16, 17, 0, 0, 18, 19,
1001 20, 21, 3, 4, 5, 0, 0, 0, 0, 6,
1002 0, 0, 0, 7, 8, 9, 0, 70, 11, 12,
1003 13, 71, 0, 15, 16, 17, 0, 0, 18, 19,
1004 20, 21, 3, 4, 5, 0, 0, 0, 0, 6,
1005 0, 0, 0, 7, 8, 9, 0, 10, 11, 12,
1006 13, 14, 0, 15, 16, 17, 0, 0, 18, 19,
1007 20, 21, 3, 4, 5, 0, 0, 0, 0, 6,
1008 0, 0, 0, 7, 8, 9, 0, 241, 11, 12,
1009 13, 14, 0, 15, 16, 17, 0, 0, 18, 19,
1010 20, 21, 3, 4, 5, 0, 0, 0, 0, 6,
1011 0, 0, 0, 7, 8, 9, 0, 10, 11, 12,
1012 13, 261, 0, 15, 16, 17, 0, 0, 18, 19,
1013 20, 21, 98, 99, 100, 101, 102, 103, 104, 105,
1014 106, 107, 108, 98, 99, 100, 101, 102, 103, 104,
1015 105, 106, 107, 108, 0, 0, 0, 0, 176, 118,
1016 119, 120, 121, 122, 123, 124, 0, 0, 0, 272,
1017 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
1018 108, 98, 99, 100, 101, 102, 103, 104, 105, 106,
1019 107, 108, 0, 0, 0, 0, 276, 0, 0, 0,
1020 0, 0, 0, 0, 0, 0, 0, 279, 98, 99,
1021 100, 101, 102, 103, 104, 105, 106, 107, 108, 98,
1022 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
1023 0, 249, 0, 0, 288, 0, 0, 0, 0, 0,
1024 0, 0, 278, 0, 0, 325, 98, 99, 100, 101,
1025 102, 103, 104, 105, 106, 107, 108, 98, 99, 100,
1026 101, 102, 103, 104, 105, 106, 107, 108, 97, 0,
1027 0, 0, 0, 0, 0, 0, 0, 0, 98, 99,
1028 100, 101, 102, 103, 104, 105, 106, 107, 108, 265,
1029 0, 0, 0, 0, 0, 0, 0, 0, 0, 98,
1030 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
1031 266, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1032 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
1033 108, 303, 98, 99, 100, 101, 102, 103, 104, 105,
1034 106, 107, 108, 98, 99, 100, 101, 102, 103, 104,
1038 static const yytype_int16 yycheck[] =
1040 0, 7, 4, 5, 6, 7, 59, 9, 10, 48,
1041 10, 64, 65, 66, 11, 68, 11, 15, 16, 9,
1042 11, 209, 48, 5, 6, 25, 8, 48, 30, 43,
1043 36, 5, 6, 7, 36, 37, 7, 51, 52, 5,
1044 6, 55, 56, 57, 0, 48, 45, 46, 62, 48,
1045 47, 52, 47, 52, 44, 55, 47, 57, 44, 36,
1046 37, 38, 10, 11, 41, 63, 43, 67, 70, 25,
1047 70, 10, 11, 71, 76, 45, 46, 42, 48, 77,
1048 45, 46, 80, 48, 40, 180, 42, 52, 48, 89,
1049 90, 52, 41, 54, 43, 109, 26, 27, 28, 29,
1050 30, 31, 102, 103, 104, 105, 106, 107, 108, 111,
1051 112, 113, 114, 115, 41, 117, 43, 48, 118, 119,
1052 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
1053 130, 131, 320, 133, 48, 91, 92, 9, 152, 9,
1054 154, 141, 48, 157, 158, 10, 11, 147, 148, 10,
1055 11, 151, 48, 109, 152, 10, 11, 52, 253, 254,
1056 255, 42, 162, 34, 35, 36, 37, 38, 168, 33,
1057 41, 69, 43, 52, 64, 175, 9, 177, 47, 9,
1058 180, 9, 24, 183, 184, 280, 43, 47, 11, 189,
1059 190, 191, 192, 47, 247, 4, 5, 6, 11, 252,
1060 9, 9, 12, 209, 11, 48, 52, 209, 9, 47,
1061 11, 52, 13, 14, 15, 16, 17, 18, 19, 25,
1062 52, 30, 47, 52, 44, 9, 47, 302, 37, 13,
1063 14, 15, 16, 17, 18, 19, 47, 184, 266, 241,
1064 24, 241, -1, 44, -1, 241, 47, -1, -1, -1,
1065 -1, -1, -1, 253, 254, 255, -1, -1, -1, -1,
1066 44, -1, -1, -1, -1, -1, 266, -1, -1, -1,
1067 -1, 285, -1, 273, -1, -1, -1, -1, -1, -1,
1068 280, -1, -1, 283, 284, -1, -1, 287, 302, 0,
1069 1, -1, -1, -1, -1, -1, 7, -1, -1, -1,
1070 -1, -1, 111, 112, 113, 114, 115, -1, 117, -1,
1071 324, 325, -1, -1, 320, -1, -1, -1, 320, 319,
1072 -1, -1, 33, 34, 35, 1, -1, -1, -1, 40,
1073 -1, 7, -1, 44, 45, 46, -1, 48, 49, 50,
1074 51, 52, -1, 54, 55, 56, 302, -1, 59, 60,
1075 61, 62, -1, -1, -1, -1, -1, 33, 34, 35,
1076 71, 72, -1, -1, 40, 76, -1, -1, 44, 45,
1077 46, -1, 48, 49, 50, 51, 52, -1, 54, 55,
1078 56, -1, -1, 59, 60, 61, 62, 1, -1, -1,
1079 -1, 5, 6, 7, 8, 71, 72, -1, 9, -1,
1080 76, -1, 13, 14, 15, 16, 17, 18, 19, -1,
1081 23, 24, 25, 26, 27, 28, 29, 30, 31, 33,
1082 34, 35, -1, -1, -1, -1, 40, -1, -1, -1,
1083 44, 45, 46, 44, 48, 49, 50, 51, 52, -1,
1084 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1085 64, 65, 66, 67, 68, -1, 70, 11, 1, 73,
1086 74, 75, 5, 6, 7, -1, -1, 21, 22, 23,
1087 24, 25, 26, 27, 28, 29, 30, 31, -1, 13,
1088 14, 15, 16, 17, 18, 19, -1, -1, -1, -1,
1089 33, 34, 35, 47, -1, -1, -1, 40, -1, -1,
1090 -1, 44, 45, 46, -1, 48, 49, 50, 51, 52,
1091 44, 54, 55, 56, 57, 58, 59, 60, 61, 62,
1092 63, 64, 65, 66, 67, 68, -1, 70, 11, 1,
1093 73, 74, 75, 5, 6, 7, -1, -1, 21, 22,
1094 23, 24, 25, 26, 27, 28, 29, 30, 31, -1,
1095 13, 14, 15, 16, 17, 18, 19, -1, -1, -1,
1096 -1, 33, 34, 35, 47, -1, -1, -1, 40, -1,
1097 -1, -1, 44, 45, 46, -1, 48, 49, 50, 51,
1098 52, 44, 54, 55, 56, 57, 58, 59, 60, 61,
1099 62, 63, 64, 65, 66, 67, 68, 11, 70, 5,
1100 6, 73, 74, 75, -1, -1, -1, 21, 22, 23,
1101 24, 25, 26, 27, 28, 29, 30, 31, -1, 24,
1102 25, 26, 27, 28, 29, 30, 31, 33, 34, 35,
1103 6, -1, -1, 47, 40, -1, -1, -1, 44, 45,
1104 46, -1, 48, 49, 50, 51, 52, -1, 54, 55,
1105 56, -1, -1, 59, 60, 61, 62, 33, 34, 35,
1106 6, -1, -1, -1, 40, -1, -1, -1, 44, 45,
1107 46, -1, 48, 49, 50, 51, 52, -1, 54, 55,
1108 56, -1, -1, 59, 60, 61, 62, 33, 34, 35,
1109 -1, -1, -1, -1, 40, -1, -1, -1, 44, 45,
1110 46, -1, 48, 49, 50, 51, 52, -1, 54, 55,
1111 56, 5, 6, 59, 60, 61, 62, 13, 14, 15,
1112 16, 17, 18, 19, -1, -1, -1, 21, 22, 23,
1113 24, 25, 26, 27, 28, 29, 30, 31, -1, -1,
1114 -1, -1, 33, 34, 35, -1, -1, -1, 44, 40,
1115 -1, 47, -1, 44, 45, 46, -1, 48, 49, 50,
1116 51, 52, 53, 54, 55, 56, -1, -1, 59, 60,
1117 61, 62, 33, 34, 35, -1, -1, -1, -1, 40,
1118 -1, -1, -1, 44, 45, 46, 47, 48, 49, 50,
1119 51, 52, -1, 54, 55, 56, -1, -1, 59, 60,
1120 61, 62, 33, 34, 35, -1, -1, -1, -1, 40,
1121 -1, -1, -1, 44, 45, 46, 47, 48, 49, 50,
1122 51, 52, -1, 54, 55, 56, -1, -1, 59, 60,
1123 61, 62, 33, 34, 35, -1, -1, -1, -1, 40,
1124 -1, -1, -1, 44, 45, 46, -1, 48, 49, 50,
1125 51, 52, -1, 54, 55, 56, -1, -1, 59, 60,
1126 61, 62, 33, 34, 35, -1, -1, -1, -1, 40,
1127 -1, -1, -1, 44, 45, 46, -1, 48, 49, 50,
1128 51, 52, -1, 54, 55, 56, -1, -1, 59, 60,
1129 61, 62, 33, 34, 35, -1, -1, -1, -1, 40,
1130 -1, -1, -1, 44, 45, 46, -1, 48, 49, 50,
1131 51, 52, -1, 54, 55, 56, -1, -1, 59, 60,
1132 61, 62, 33, 34, 35, -1, -1, -1, -1, 40,
1133 -1, -1, -1, 44, 45, 46, -1, 48, 49, 50,
1134 51, 52, -1, 54, 55, 56, -1, -1, 59, 60,
1135 61, 62, 21, 22, 23, 24, 25, 26, 27, 28,
1136 29, 30, 31, 21, 22, 23, 24, 25, 26, 27,
1137 28, 29, 30, 31, -1, -1, -1, -1, 47, 13,
1138 14, 15, 16, 17, 18, 19, -1, -1, -1, 47,
1139 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
1140 31, 21, 22, 23, 24, 25, 26, 27, 28, 29,
1141 30, 31, -1, -1, -1, -1, 47, -1, -1, -1,
1142 -1, -1, -1, -1, -1, -1, -1, 47, 21, 22,
1143 23, 24, 25, 26, 27, 28, 29, 30, 31, 21,
1144 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1145 -1, 6, -1, -1, 47, -1, -1, -1, -1, -1,
1146 -1, -1, 6, -1, -1, 47, 21, 22, 23, 24,
1147 25, 26, 27, 28, 29, 30, 31, 21, 22, 23,
1148 24, 25, 26, 27, 28, 29, 30, 31, 11, -1,
1149 -1, -1, -1, -1, -1, -1, -1, -1, 21, 22,
1150 23, 24, 25, 26, 27, 28, 29, 30, 31, 11,
1151 -1, -1, -1, -1, -1, -1, -1, -1, -1, 21,
1152 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1153 11, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1154 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
1155 31, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1156 29, 30, 31, 21, 22, 23, 24, 25, 26, 27,
1160 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1161 symbol of state STATE-NUM. */
1162 static const yytype_uint8 yystos[] =
1164 0, 1, 7, 33, 34, 35, 40, 44, 45, 46,
1165 48, 49, 50, 51, 52, 54, 55, 56, 59, 60,
1166 61, 62, 71, 72, 76, 78, 79, 80, 86, 91,
1167 96, 97, 98, 101, 115, 116, 120, 122, 123, 125,
1168 126, 127, 130, 1, 5, 6, 57, 58, 63, 64,
1169 65, 66, 67, 68, 70, 73, 74, 75, 86, 88,
1170 89, 90, 91, 103, 107, 109, 110, 111, 114, 119,
1171 48, 52, 97, 115, 97, 97, 48, 52, 98, 115,
1172 53, 97, 91, 105, 115, 44, 102, 102, 102, 48,
1173 48, 81, 82, 52, 54, 0, 79, 11, 21, 22,
1174 23, 24, 25, 26, 27, 28, 29, 30, 31, 83,
1175 97, 34, 35, 36, 37, 38, 41, 43, 13, 14,
1176 15, 16, 17, 18, 19, 13, 14, 15, 16, 17,
1177 18, 19, 44, 11, 47, 117, 42, 98, 115, 121,
1178 97, 48, 86, 48, 86, 8, 90, 48, 48, 90,
1179 90, 48, 52, 90, 91, 90, 90, 91, 1, 8,
1180 89, 90, 102, 89, 89, 89, 6, 91, 112, 89,
1181 91, 102, 115, 102, 102, 11, 47, 11, 47, 47,
1182 9, 48, 131, 132, 48, 91, 91, 86, 86, 84,
1183 94, 92, 93, 52, 91, 91, 91, 91, 91, 91,
1184 91, 86, 87, 90, 97, 97, 97, 97, 97, 33,
1185 97, 91, 91, 91, 91, 91, 91, 91, 91, 91,
1186 91, 91, 91, 91, 91, 91, 42, 91, 118, 52,
1187 128, 129, 91, 6, 52, 91, 91, 90, 102, 90,
1188 90, 48, 91, 99, 100, 104, 69, 108, 64, 6,
1189 47, 91, 113, 9, 9, 9, 91, 91, 24, 100,
1190 47, 52, 91, 133, 99, 11, 11, 91, 91, 91,
1191 91, 121, 47, 11, 47, 11, 47, 24, 6, 47,
1192 9, 47, 105, 11, 12, 106, 89, 48, 47, 89,
1193 100, 100, 100, 52, 10, 11, 47, 11, 47, 47,
1194 52, 118, 85, 20, 91, 52, 52, 100, 47, 91,
1195 91, 90, 91, 10, 10, 10, 44, 47, 87, 95,
1196 11, 47, 124, 47, 10, 47, 91, 121, 90, 90,
1200 #define yyerrok (yyerrstatus = 0)
1201 #define yyclearin (yychar = YYEMPTY)
1202 #define YYEMPTY (-2)
1205 #define YYACCEPT goto yyacceptlab
1206 #define YYABORT goto yyabortlab
1207 #define YYERROR goto yyerrorlab
1210 /* Like YYERROR except do call yyerror. This remains here temporarily
1211 to ease the transition to the new meaning of YYERROR, for GCC.
1212 Once GCC version 2 has supplanted version 1, this can go. */
1214 #define YYFAIL goto yyerrlab
1216 #define YYRECOVERING() (!!yyerrstatus)
1218 #define YYBACKUP(Token, Value) \
1220 if (yychar == YYEMPTY && yylen == 1) \
1224 yytoken = YYTRANSLATE (yychar); \
1230 yyerror (YY_("syntax error: cannot back up")); \
1237 #define YYERRCODE 256
1240 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1241 If N is 0, then set CURRENT to the empty location which ends
1242 the previous symbol: RHS[0] (always defined). */
1244 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1245 #ifndef YYLLOC_DEFAULT
1246 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1250 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1251 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1252 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1253 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1257 (Current).first_line = (Current).last_line = \
1258 YYRHSLOC (Rhs, 0).last_line; \
1259 (Current).first_column = (Current).last_column = \
1260 YYRHSLOC (Rhs, 0).last_column; \
1266 /* YY_LOCATION_PRINT -- Print the location on the stream.
1267 This macro was not mandated originally: define only if we know
1268 we won't break user code: when these are the locations we know. */
1270 #ifndef YY_LOCATION_PRINT
1271 # if YYLTYPE_IS_TRIVIAL
1272 # define YY_LOCATION_PRINT(File, Loc) \
1273 fprintf (File, "%d.%d-%d.%d", \
1274 (Loc).first_line, (Loc).first_column, \
1275 (Loc).last_line, (Loc).last_column)
1277 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1282 /* YYLEX -- calling `yylex' with the right arguments. */
1285 # define YYLEX yylex (YYLEX_PARAM)
1287 # define YYLEX yylex ()
1290 /* Enable debugging if requested. */
1294 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1295 # define YYFPRINTF fprintf
1298 # define YYDPRINTF(Args) \
1304 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1308 YYFPRINTF (stderr, "%s ", Title); \
1309 yy_symbol_print (stderr, \
1311 YYFPRINTF (stderr, "\n"); \
1316 /*--------------------------------.
1317 | Print this symbol on YYOUTPUT. |
1318 `--------------------------------*/
1321 #if (defined __STDC__ || defined __C99__FUNC__ \
1322 || defined __cplusplus || defined _MSC_VER)
1324 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1327 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1330 YYSTYPE const * const yyvaluep;
1336 if (yytype < YYNTOKENS)
1337 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1349 /*--------------------------------.
1350 | Print this symbol on YYOUTPUT. |
1351 `--------------------------------*/
1353 #if (defined __STDC__ || defined __C99__FUNC__ \
1354 || defined __cplusplus || defined _MSC_VER)
1356 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1359 yy_symbol_print (yyoutput, yytype, yyvaluep)
1362 YYSTYPE const * const yyvaluep;
1365 if (yytype < YYNTOKENS)
1366 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1368 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1370 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1371 YYFPRINTF (yyoutput, ")");
1374 /*------------------------------------------------------------------.
1375 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1377 `------------------------------------------------------------------*/
1379 #if (defined __STDC__ || defined __C99__FUNC__ \
1380 || defined __cplusplus || defined _MSC_VER)
1382 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1385 yy_stack_print (yybottom, yytop)
1386 yytype_int16 *yybottom;
1387 yytype_int16 *yytop;
1390 YYFPRINTF (stderr, "Stack now");
1391 for (; yybottom <= yytop; yybottom++)
1393 int yybot = *yybottom;
1394 YYFPRINTF (stderr, " %d", yybot);
1396 YYFPRINTF (stderr, "\n");
1399 # define YY_STACK_PRINT(Bottom, Top) \
1402 yy_stack_print ((Bottom), (Top)); \
1406 /*------------------------------------------------.
1407 | Report that the YYRULE is going to be reduced. |
1408 `------------------------------------------------*/
1410 #if (defined __STDC__ || defined __C99__FUNC__ \
1411 || defined __cplusplus || defined _MSC_VER)
1413 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1416 yy_reduce_print (yyvsp, yyrule)
1421 int yynrhs = yyr2[yyrule];
1423 unsigned long int yylno = yyrline[yyrule];
1424 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1426 /* The symbols being reduced. */
1427 for (yyi = 0; yyi < yynrhs; yyi++)
1429 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1430 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1431 &(yyvsp[(yyi + 1) - (yynrhs)])
1433 YYFPRINTF (stderr, "\n");
1437 # define YY_REDUCE_PRINT(Rule) \
1440 yy_reduce_print (yyvsp, Rule); \
1443 /* Nonzero means print parse trace. It is left uninitialized so that
1444 multiple parsers can coexist. */
1446 #else /* !YYDEBUG */
1447 # define YYDPRINTF(Args)
1448 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1449 # define YY_STACK_PRINT(Bottom, Top)
1450 # define YY_REDUCE_PRINT(Rule)
1451 #endif /* !YYDEBUG */
1454 /* YYINITDEPTH -- initial size of the parser's stacks. */
1456 # define YYINITDEPTH 200
1459 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1460 if the built-in stack extension method is used).
1462 Do not make this value too large; the results are undefined if
1463 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1464 evaluated with infinite-precision integer arithmetic. */
1467 # define YYMAXDEPTH 10000
1475 # if defined __GLIBC__ && defined _STRING_H
1476 # define yystrlen strlen
1478 /* Return the length of YYSTR. */
1479 #if (defined __STDC__ || defined __C99__FUNC__ \
1480 || defined __cplusplus || defined _MSC_VER)
1482 yystrlen (const char *yystr)
1490 for (yylen = 0; yystr[yylen]; yylen++)
1498 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1499 # define yystpcpy stpcpy
1501 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1503 #if (defined __STDC__ || defined __C99__FUNC__ \
1504 || defined __cplusplus || defined _MSC_VER)
1506 yystpcpy (char *yydest, const char *yysrc)
1509 yystpcpy (yydest, yysrc)
1515 const char *yys = yysrc;
1517 while ((*yyd++ = *yys++) != '\0')
1526 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1527 quotes and backslashes, so that it's suitable for yyerror. The
1528 heuristic is that double-quoting is unnecessary unless the string
1529 contains an apostrophe, a comma, or backslash (other than
1530 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1531 null, do not copy; instead, return the length of what the result
1534 yytnamerr (char *yyres, const char *yystr)
1539 char const *yyp = yystr;
1546 goto do_not_strip_quotes;
1550 goto do_not_strip_quotes;
1563 do_not_strip_quotes: ;
1567 return yystrlen (yystr);
1569 return yystpcpy (yyres, yystr) - yyres;
1573 /* Copy into YYRESULT an error message about the unexpected token
1574 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1575 including the terminating null byte. If YYRESULT is null, do not
1576 copy anything; just return the number of bytes that would be
1577 copied. As a special case, return 0 if an ordinary "syntax error"
1578 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1579 size calculation. */
1581 yysyntax_error (char *yyresult, int yystate, int yychar)
1583 int yyn = yypact[yystate];
1585 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1589 int yytype = YYTRANSLATE (yychar);
1590 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1591 YYSIZE_T yysize = yysize0;
1593 int yysize_overflow = 0;
1594 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1595 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1599 /* This is so xgettext sees the translatable formats that are
1600 constructed on the fly. */
1601 YY_("syntax error, unexpected %s");
1602 YY_("syntax error, unexpected %s, expecting %s");
1603 YY_("syntax error, unexpected %s, expecting %s or %s");
1604 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1605 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1609 static char const yyunexpected[] = "syntax error, unexpected %s";
1610 static char const yyexpecting[] = ", expecting %s";
1611 static char const yyor[] = " or %s";
1612 char yyformat[sizeof yyunexpected
1613 + sizeof yyexpecting - 1
1614 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1615 * (sizeof yyor - 1))];
1616 char const *yyprefix = yyexpecting;
1618 /* Start YYX at -YYN if negative to avoid negative indexes in
1620 int yyxbegin = yyn < 0 ? -yyn : 0;
1622 /* Stay within bounds of both yycheck and yytname. */
1623 int yychecklim = YYLAST - yyn + 1;
1624 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1627 yyarg[0] = yytname[yytype];
1628 yyfmt = yystpcpy (yyformat, yyunexpected);
1630 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1631 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1633 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1637 yyformat[sizeof yyunexpected - 1] = '\0';
1640 yyarg[yycount++] = yytname[yyx];
1641 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1642 yysize_overflow |= (yysize1 < yysize);
1644 yyfmt = yystpcpy (yyfmt, yyprefix);
1648 yyf = YY_(yyformat);
1649 yysize1 = yysize + yystrlen (yyf);
1650 yysize_overflow |= (yysize1 < yysize);
1653 if (yysize_overflow)
1654 return YYSIZE_MAXIMUM;
1658 /* Avoid sprintf, as that infringes on the user's name space.
1659 Don't have undefined behavior even if the translation
1660 produced a string with the wrong number of "%s"s. */
1661 char *yyp = yyresult;
1663 while ((*yyp = *yyf) != '\0')
1665 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1667 yyp += yytnamerr (yyp, yyarg[yyi++]);
1680 #endif /* YYERROR_VERBOSE */
1683 /*-----------------------------------------------.
1684 | Release the memory associated to this symbol. |
1685 `-----------------------------------------------*/
1688 #if (defined __STDC__ || defined __C99__FUNC__ \
1689 || defined __cplusplus || defined _MSC_VER)
1691 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1694 yydestruct (yymsg, yytype, yyvaluep)
1704 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1714 /* Prevent warnings from -Wmissing-prototypes. */
1715 #ifdef YYPARSE_PARAM
1716 #if defined __STDC__ || defined __cplusplus
1717 int yyparse (void *YYPARSE_PARAM);
1721 #else /* ! YYPARSE_PARAM */
1722 #if defined __STDC__ || defined __cplusplus
1727 #endif /* ! YYPARSE_PARAM */
1730 /* The lookahead symbol. */
1733 /* The semantic value of the lookahead symbol. */
1736 /* Number of syntax errors so far. */
1741 /*-------------------------.
1742 | yyparse or yypush_parse. |
1743 `-------------------------*/
1745 #ifdef YYPARSE_PARAM
1746 #if (defined __STDC__ || defined __C99__FUNC__ \
1747 || defined __cplusplus || defined _MSC_VER)
1749 yyparse (void *YYPARSE_PARAM)
1752 yyparse (YYPARSE_PARAM)
1753 void *YYPARSE_PARAM;
1755 #else /* ! YYPARSE_PARAM */
1756 #if (defined __STDC__ || defined __C99__FUNC__ \
1757 || defined __cplusplus || defined _MSC_VER)
1770 /* Number of tokens to shift before error messages enabled. */
1773 /* The stacks and their tools:
1774 `yyss': related to states.
1775 `yyvs': related to semantic values.
1777 Refer to the stacks thru separate pointers, to allow yyoverflow
1778 to reallocate them elsewhere. */
1780 /* The state stack. */
1781 yytype_int16 yyssa[YYINITDEPTH];
1783 yytype_int16 *yyssp;
1785 /* The semantic value stack. */
1786 YYSTYPE yyvsa[YYINITDEPTH];
1790 YYSIZE_T yystacksize;
1794 /* Lookahead token as an internal (translated) token number. */
1796 /* The variables used to return semantic value and location from the
1801 /* Buffer for error messages, and its allocated size. */
1803 char *yymsg = yymsgbuf;
1804 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1807 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1809 /* The number of symbols on the RHS of the reduced rule.
1810 Keep to zero when no symbol should be popped. */
1816 yystacksize = YYINITDEPTH;
1818 YYDPRINTF ((stderr, "Starting parse\n"));
1823 yychar = YYEMPTY; /* Cause a token to be read. */
1825 /* Initialize stack pointers.
1826 Waste one element of value and location stack
1827 so that they stay on the same level as the state stack.
1828 The wasted elements are never initialized. */
1834 /*------------------------------------------------------------.
1835 | yynewstate -- Push a new state, which is found in yystate. |
1836 `------------------------------------------------------------*/
1838 /* In all cases, when you get here, the value and location stacks
1839 have just been pushed. So pushing a state here evens the stacks. */
1845 if (yyss + yystacksize - 1 <= yyssp)
1847 /* Get the current used size of the three stacks, in elements. */
1848 YYSIZE_T yysize = yyssp - yyss + 1;
1852 /* Give user a chance to reallocate the stack. Use copies of
1853 these so that the &'s don't force the real ones into
1855 YYSTYPE *yyvs1 = yyvs;
1856 yytype_int16 *yyss1 = yyss;
1858 /* Each stack pointer address is followed by the size of the
1859 data in use in that stack, in bytes. This used to be a
1860 conditional around just the two extra args, but that might
1861 be undefined if yyoverflow is a macro. */
1862 yyoverflow (YY_("memory exhausted"),
1863 &yyss1, yysize * sizeof (*yyssp),
1864 &yyvs1, yysize * sizeof (*yyvsp),
1870 #else /* no yyoverflow */
1871 # ifndef YYSTACK_RELOCATE
1872 goto yyexhaustedlab;
1874 /* Extend the stack our own way. */
1875 if (YYMAXDEPTH <= yystacksize)
1876 goto yyexhaustedlab;
1878 if (YYMAXDEPTH < yystacksize)
1879 yystacksize = YYMAXDEPTH;
1882 yytype_int16 *yyss1 = yyss;
1883 union yyalloc *yyptr =
1884 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1886 goto yyexhaustedlab;
1887 YYSTACK_RELOCATE (yyss_alloc, yyss);
1888 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1889 # undef YYSTACK_RELOCATE
1891 YYSTACK_FREE (yyss1);
1894 #endif /* no yyoverflow */
1896 yyssp = yyss + yysize - 1;
1897 yyvsp = yyvs + yysize - 1;
1899 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1900 (unsigned long int) yystacksize));
1902 if (yyss + yystacksize - 1 <= yyssp)
1906 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1908 if (yystate == YYFINAL)
1918 /* Do appropriate processing given the current state. Read a
1919 lookahead token if we need one and don't already have one. */
1921 /* First try to decide what to do without reference to lookahead token. */
1922 yyn = yypact[yystate];
1923 if (yyn == YYPACT_NINF)
1926 /* Not known => get a lookahead token if don't already have one. */
1928 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1929 if (yychar == YYEMPTY)
1931 YYDPRINTF ((stderr, "Reading a token: "));
1935 if (yychar <= YYEOF)
1937 yychar = yytoken = YYEOF;
1938 YYDPRINTF ((stderr, "Now at end of input.\n"));
1942 yytoken = YYTRANSLATE (yychar);
1943 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1946 /* If the proper action on seeing token YYTOKEN is to reduce or to
1947 detect an error, take that action. */
1949 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1954 if (yyn == 0 || yyn == YYTABLE_NINF)
1960 /* Count tokens shifted since error; after three, turn off error
1965 /* Shift the lookahead token. */
1966 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1968 /* Discard the shifted token. */
1977 /*-----------------------------------------------------------.
1978 | yydefault -- do the default action for the current state. |
1979 `-----------------------------------------------------------*/
1981 yyn = yydefact[yystate];
1987 /*-----------------------------.
1988 | yyreduce -- Do a reduction. |
1989 `-----------------------------*/
1991 /* yyn is the number of a rule to reduce with. */
1994 /* If YYLEN is nonzero, implement the default value of the action:
1997 Otherwise, the following line sets YYVAL to garbage.
1998 This behavior is undocumented and Bison
1999 users should not rely upon it. Assigning to YYVAL
2000 unconditionally makes the parser a bit smaller, and it avoids a
2001 GCC warning that YYVAL may be used uninitialized. */
2002 yyval = yyvsp[1-yylen];
2005 YY_REDUCE_PRINT (yyn);
2010 /* Line 1455 of yacc.c */
2012 { /* this do nothing action removes a vacuous warning
2019 /* Line 1455 of yacc.c */
2021 { be_setup(scope = SCOPE_BEGIN) ; }
2026 /* Line 1455 of yacc.c */
2028 { switch_code_to_main() ; }
2033 /* Line 1455 of yacc.c */
2035 { be_setup(scope = SCOPE_END) ; }
2040 /* Line 1455 of yacc.c */
2042 { switch_code_to_main() ; }
2047 /* Line 1455 of yacc.c */
2049 { code_jmp(_JZ, (INST*)0) ; }
2054 /* Line 1455 of yacc.c */
2056 { patch_jmp( code_ptr ) ; }
2061 /* Line 1455 of yacc.c */
2064 INST *p1 = CDP((yyvsp[(1) - (2)].start)) ;
2067 code_push(p1, code_ptr - p1, scope, active_funct) ;
2070 code2op(_RANGE, 1) ;
2072 len = code_pop(code_ptr) ;
2075 p1 = CDP((yyvsp[(1) - (2)].start)) ;
2076 p1[2].op = code_ptr - (p1+1) ;
2082 /* Line 1455 of yacc.c */
2089 /* Line 1455 of yacc.c */
2092 INST *p1 = CDP((yyvsp[(1) - (6)].start)) ;
2094 p1[3].op = CDP((yyvsp[(6) - (6)].start)) - (p1+1) ;
2095 p1[4].op = code_ptr - (p1+1) ;
2101 /* Line 1455 of yacc.c */
2103 { (yyval.start) = (yyvsp[(2) - (3)].start) ; }
2108 /* Line 1455 of yacc.c */
2110 { (yyval.start) = code_offset ; /* does nothing won't be executed */
2111 print_flag = getline_flag = paren_cnt = 0 ;
2117 /* Line 1455 of yacc.c */
2119 { (yyval.start) = code_offset ;
2120 code1(_PUSHINT) ; code1(0) ;
2121 code2(_PRINT, bi_print) ;
2127 /* Line 1455 of yacc.c */
2134 /* Line 1455 of yacc.c */
2136 { (yyval.start) = code_offset ; }
2141 /* Line 1455 of yacc.c */
2143 { (yyval.start) = code_offset ;
2144 print_flag = getline_flag = 0 ;
2152 /* Line 1455 of yacc.c */
2154 { (yyval.start) = code_offset ; BC_insert('B', code_ptr+1) ;
2155 code2(_JMP, 0) /* don't use code_jmp ! */ ; }
2160 /* Line 1455 of yacc.c */
2162 { (yyval.start) = code_offset ; BC_insert('C', code_ptr+1) ;
2168 /* Line 1455 of yacc.c */
2170 { if ( scope != SCOPE_FUNCT )
2171 compile_error("return outside function body") ;
2177 /* Line 1455 of yacc.c */
2179 { if ( scope != SCOPE_MAIN )
2180 compile_error( "improper use of next" ) ;
2181 (yyval.start) = code_offset ;
2188 /* Line 1455 of yacc.c */
2190 { code1(_ASSIGN) ; }
2195 /* Line 1455 of yacc.c */
2197 { code1(_ADD_ASG) ; }
2202 /* Line 1455 of yacc.c */
2204 { code1(_SUB_ASG) ; }
2209 /* Line 1455 of yacc.c */
2211 { code1(_MUL_ASG) ; }
2216 /* Line 1455 of yacc.c */
2218 { code1(_DIV_ASG) ; }
2223 /* Line 1455 of yacc.c */
2225 { code1(_MOD_ASG) ; }
2230 /* Line 1455 of yacc.c */
2232 { code1(_POW_ASG) ; }
2237 /* Line 1455 of yacc.c */
2244 /* Line 1455 of yacc.c */
2251 /* Line 1455 of yacc.c */
2258 /* Line 1455 of yacc.c */
2265 /* Line 1455 of yacc.c */
2272 /* Line 1455 of yacc.c */
2279 /* Line 1455 of yacc.c */
2282 INST *p3 = CDP((yyvsp[(3) - (3)].start)) ;
2284 if ( p3 == code_ptr - 2 )
2286 if ( p3->op == _MATCH0 ) p3->op = _MATCH1 ;
2288 else /* check for string */
2289 if ( p3->op == _PUSHS )
2290 { CELL *cp = ZMALLOC(CELL) ;
2292 cp->type = C_STRING ;
2293 cp->ptr = p3[1].ptr ;
2296 code2(_MATCH1, cp->ptr) ;
2299 else code1(_MATCH2) ;
2301 else code1(_MATCH2) ;
2303 if ( !(yyvsp[(2) - (3)].ival) ) code1(_NOT) ;
2309 /* Line 1455 of yacc.c */
2312 code_jmp(_LJNZ, (INST*)0) ;
2318 /* Line 1455 of yacc.c */
2320 { code1(_TEST) ; patch_jmp(code_ptr) ; }
2325 /* Line 1455 of yacc.c */
2328 code_jmp(_LJZ, (INST*)0) ;
2334 /* Line 1455 of yacc.c */
2336 { code1(_TEST) ; patch_jmp(code_ptr) ; }
2341 /* Line 1455 of yacc.c */
2343 { code_jmp(_JZ, (INST*)0) ; }
2348 /* Line 1455 of yacc.c */
2350 { code_jmp(_JMP, (INST*)0) ; }
2355 /* Line 1455 of yacc.c */
2357 { patch_jmp(code_ptr) ; patch_jmp(CDP((yyvsp[(7) - (7)].start))) ; }
2362 /* Line 1455 of yacc.c */
2369 /* Line 1455 of yacc.c */
2371 { (yyval.start) = code_offset ; code2(_PUSHD, (yyvsp[(1) - (1)].ptr)) ; }
2376 /* Line 1455 of yacc.c */
2378 { (yyval.start) = code_offset ; code2(_PUSHS, (yyvsp[(1) - (1)].ptr)) ; }
2383 /* Line 1455 of yacc.c */
2385 { check_var((yyvsp[(1) - (1)].stp)) ;
2386 (yyval.start) = code_offset ;
2387 if ( is_local((yyvsp[(1) - (1)].stp)) )
2388 { code2op(L_PUSHI, (yyvsp[(1) - (1)].stp)->offset) ; }
2389 else code2(_PUSHI, (yyvsp[(1) - (1)].stp)->stval.cp) ;
2395 /* Line 1455 of yacc.c */
2397 { (yyval.start) = (yyvsp[(2) - (3)].start) ; }
2402 /* Line 1455 of yacc.c */
2404 { (yyval.start) = code_offset ; code2(_MATCH0, (yyvsp[(1) - (1)].ptr)) ; }
2409 /* Line 1455 of yacc.c */
2416 /* Line 1455 of yacc.c */
2423 /* Line 1455 of yacc.c */
2430 /* Line 1455 of yacc.c */
2437 /* Line 1455 of yacc.c */
2444 /* Line 1455 of yacc.c */
2451 /* Line 1455 of yacc.c */
2453 { (yyval.start) = (yyvsp[(2) - (2)].start) ; code1(_NOT) ; }
2458 /* Line 1455 of yacc.c */
2460 { (yyval.start) = (yyvsp[(2) - (2)].start) ; code1(_UPLUS) ; }
2465 /* Line 1455 of yacc.c */
2467 { (yyval.start) = (yyvsp[(2) - (2)].start) ; code1(_UMINUS) ; }
2472 /* Line 1455 of yacc.c */
2474 { check_var((yyvsp[(1) - (2)].stp)) ;
2475 (yyval.start) = code_offset ;
2476 code_address((yyvsp[(1) - (2)].stp)) ;
2478 if ( (yyvsp[(2) - (2)].ival) == '+' ) code1(_POST_INC) ;
2479 else code1(_POST_DEC) ;
2485 /* Line 1455 of yacc.c */
2487 { (yyval.start) = (yyvsp[(2) - (2)].start) ;
2488 if ( (yyvsp[(1) - (2)].ival) == '+' ) code1(_PRE_INC) ;
2489 else code1(_PRE_DEC) ;
2495 /* Line 1455 of yacc.c */
2497 { if ((yyvsp[(2) - (2)].ival) == '+' ) code1(F_POST_INC ) ;
2498 else code1(F_POST_DEC) ;
2504 /* Line 1455 of yacc.c */
2506 { (yyval.start) = (yyvsp[(2) - (2)].start) ;
2507 if ( (yyvsp[(1) - (2)].ival) == '+' ) code1(F_PRE_INC) ;
2508 else code1( F_PRE_DEC) ;
2514 /* Line 1455 of yacc.c */
2516 { (yyval.start) = code_offset ;
2517 check_var((yyvsp[(1) - (1)].stp)) ;
2518 code_address((yyvsp[(1) - (1)].stp)) ;
2524 /* Line 1455 of yacc.c */
2526 { (yyval.ival) = 0 ; }
2531 /* Line 1455 of yacc.c */
2533 { (yyval.ival) = 1 ; }
2538 /* Line 1455 of yacc.c */
2540 { (yyval.ival) = (yyvsp[(1) - (3)].ival) + 1 ; }
2545 /* Line 1455 of yacc.c */
2547 { BI_REC *p = (yyvsp[(1) - (5)].bip) ;
2548 (yyval.start) = (yyvsp[(2) - (5)].start) ;
2549 if ( (int)p->min_args > (yyvsp[(4) - (5)].ival) || (int)p->max_args < (yyvsp[(4) - (5)].ival) )
2551 "wrong number of arguments in call to %s" ,
2553 if ( p->min_args != p->max_args ) /* variable args */
2554 { code1(_PUSHINT) ; code1((yyvsp[(4) - (5)].ival)) ; }
2555 code2(_BUILTIN , p->fp) ;
2561 /* Line 1455 of yacc.c */
2564 (yyval.start) = code_offset ;
2565 code1(_PUSHINT) ; code1(0) ;
2566 code2(_BUILTIN, (yyvsp[(1) - (1)].bip)->fp) ;
2572 /* Line 1455 of yacc.c */
2574 { (yyval.start) = code_offset ; }
2579 /* Line 1455 of yacc.c */
2581 { code2(_PRINT, (yyvsp[(1) - (5)].fp)) ;
2582 if ( (yyvsp[(1) - (5)].fp) == bi_printf && (yyvsp[(3) - (5)].ival) == 0 )
2583 compile_error("no arguments in call to printf") ;
2585 (yyval.start) = (yyvsp[(2) - (5)].start) ;
2591 /* Line 1455 of yacc.c */
2593 { (yyval.fp) = bi_print ; print_flag = 1 ;}
2598 /* Line 1455 of yacc.c */
2600 { (yyval.fp) = bi_printf ; print_flag = 1 ; }
2605 /* Line 1455 of yacc.c */
2607 { code2op(_PUSHINT, (yyvsp[(1) - (1)].ival)) ; }
2612 /* Line 1455 of yacc.c */
2614 { (yyval.ival) = (yyvsp[(2) - (3)].arg2p)->cnt ; zfree((yyvsp[(2) - (3)].arg2p),sizeof(ARG2_REC)) ;
2615 code2op(_PUSHINT, (yyval.ival)) ;
2621 /* Line 1455 of yacc.c */
2623 { (yyval.ival)=0 ; code2op(_PUSHINT, 0) ; }
2628 /* Line 1455 of yacc.c */
2630 { (yyval.arg2p) = (ARG2_REC*) zmalloc(sizeof(ARG2_REC)) ;
2631 (yyval.arg2p)->start = (yyvsp[(1) - (3)].start) ;
2632 (yyval.arg2p)->cnt = 2 ;
2638 /* Line 1455 of yacc.c */
2640 { (yyval.arg2p) = (yyvsp[(1) - (3)].arg2p) ; (yyval.arg2p)->cnt++ ; }
2645 /* Line 1455 of yacc.c */
2647 { code2op(_PUSHINT, (yyvsp[(1) - (2)].ival)) ; }
2652 /* Line 1455 of yacc.c */
2654 { (yyval.start) = (yyvsp[(3) - (4)].start) ; eat_nl() ; code_jmp(_JZ, (INST*)0) ; }
2659 /* Line 1455 of yacc.c */
2661 { patch_jmp( code_ptr ) ; }
2666 /* Line 1455 of yacc.c */
2668 { eat_nl() ; code_jmp(_JMP, (INST*)0) ; }
2673 /* Line 1455 of yacc.c */
2675 { patch_jmp(code_ptr) ;
2676 patch_jmp(CDP((yyvsp[(4) - (4)].start))) ;
2682 /* Line 1455 of yacc.c */
2684 { eat_nl() ; BC_new() ; }
2689 /* Line 1455 of yacc.c */
2691 { (yyval.start) = (yyvsp[(2) - (7)].start) ;
2692 code_jmp(_JNZ, CDP((yyvsp[(2) - (7)].start))) ;
2693 BC_clear(code_ptr, CDP((yyvsp[(5) - (7)].start))) ; }
2698 /* Line 1455 of yacc.c */
2700 { eat_nl() ; BC_new() ;
2701 (yyval.start) = (yyvsp[(3) - (4)].start) ;
2703 /* check if const expression */
2704 if ( code_ptr - 2 == CDP((yyvsp[(3) - (4)].start)) &&
2705 code_ptr[-2].op == _PUSHD &&
2706 *(double*)code_ptr[-1].ptr != 0.0
2710 { INST *p3 = CDP((yyvsp[(3) - (4)].start)) ;
2711 code_push(p3, code_ptr-p3, scope, active_funct) ;
2713 code2(_JMP, (INST*)0) ; /* code2() not code_jmp() */
2720 /* Line 1455 of yacc.c */
2725 INST *p1 = CDP((yyvsp[(1) - (2)].start)) ;
2726 INST *p2 = CDP((yyvsp[(2) - (2)].start)) ;
2728 if ( p1 != p2 ) /* real test in loop */
2730 p1[1].op = code_ptr-(p1+1) ;
2731 saved_offset = code_offset ;
2732 len = code_pop(code_ptr) ;
2734 code_jmp(_JNZ, CDP((yyvsp[(2) - (2)].start))) ;
2735 BC_clear(code_ptr, CDP(saved_offset)) ;
2739 code_jmp(_JMP, p1) ;
2740 BC_clear(code_ptr, CDP((yyvsp[(2) - (2)].start))) ;
2747 /* Line 1455 of yacc.c */
2750 int cont_offset = code_offset ;
2751 unsigned len = code_pop(code_ptr) ;
2752 INST *p2 = CDP((yyvsp[(2) - (4)].start)) ;
2753 INST *p4 = CDP((yyvsp[(4) - (4)].start)) ;
2757 if ( p2 != p4 ) /* real test in for2 */
2759 p4[-1].op = code_ptr - p4 + 1 ;
2760 len = code_pop(code_ptr) ;
2762 code_jmp(_JNZ, CDP((yyvsp[(4) - (4)].start))) ;
2765 code_jmp(_JMP, p4) ;
2767 BC_clear(code_ptr, CDP(cont_offset)) ;
2774 /* Line 1455 of yacc.c */
2776 { (yyval.start) = code_offset ; }
2781 /* Line 1455 of yacc.c */
2783 { (yyval.start) = (yyvsp[(3) - (4)].start) ; code1(_POP) ; }
2788 /* Line 1455 of yacc.c */
2790 { (yyval.start) = code_offset ; }
2795 /* Line 1455 of yacc.c */
2798 if ( code_ptr - 2 == CDP((yyvsp[(1) - (2)].start)) &&
2799 code_ptr[-2].op == _PUSHD &&
2800 * (double*) code_ptr[-1].ptr != 0.0
2805 INST *p1 = CDP((yyvsp[(1) - (2)].start)) ;
2806 code_push(p1, code_ptr-p1, scope, active_funct) ;
2808 code2(_JMP, (INST*)0) ;
2815 /* Line 1455 of yacc.c */
2817 { eat_nl() ; BC_new() ;
2818 code_push((INST*)0,0, scope, active_funct) ;
2824 /* Line 1455 of yacc.c */
2826 { INST *p1 = CDP((yyvsp[(1) - (2)].start)) ;
2828 eat_nl() ; BC_new() ;
2830 code_push(p1, code_ptr - p1, scope, active_funct) ;
2831 code_ptr -= code_ptr - p1 ;
2837 /* Line 1455 of yacc.c */
2839 { check_array((yyvsp[(3) - (3)].stp)) ;
2840 code_array((yyvsp[(3) - (3)].stp)) ;
2847 /* Line 1455 of yacc.c */
2849 { (yyval.start) = (yyvsp[(2) - (5)].arg2p)->start ;
2850 code2op(A_CAT, (yyvsp[(2) - (5)].arg2p)->cnt) ;
2851 zfree((yyvsp[(2) - (5)].arg2p), sizeof(ARG2_REC)) ;
2853 check_array((yyvsp[(5) - (5)].stp)) ;
2854 code_array((yyvsp[(5) - (5)].stp)) ;
2861 /* Line 1455 of yacc.c */
2864 if ( (yyvsp[(4) - (5)].ival) > 1 )
2865 { code2op(A_CAT, (yyvsp[(4) - (5)].ival)) ; }
2867 check_array((yyvsp[(1) - (5)].stp)) ;
2868 if( is_local((yyvsp[(1) - (5)].stp)) )
2869 { code2op(LAE_PUSHA, (yyvsp[(1) - (5)].stp)->offset) ; }
2870 else code2(AE_PUSHA, (yyvsp[(1) - (5)].stp)->stval.array) ;
2871 (yyval.start) = (yyvsp[(2) - (5)].start) ;
2877 /* Line 1455 of yacc.c */
2880 if ( (yyvsp[(4) - (5)].ival) > 1 )
2881 { code2op(A_CAT, (yyvsp[(4) - (5)].ival)) ; }
2883 check_array((yyvsp[(1) - (5)].stp)) ;
2884 if( is_local((yyvsp[(1) - (5)].stp)) )
2885 { code2op(LAE_PUSHI, (yyvsp[(1) - (5)].stp)->offset) ; }
2886 else code2(AE_PUSHI, (yyvsp[(1) - (5)].stp)->stval.array) ;
2887 (yyval.start) = (yyvsp[(2) - (5)].start) ;
2893 /* Line 1455 of yacc.c */
2896 if ( (yyvsp[(4) - (6)].ival) > 1 )
2897 { code2op(A_CAT,(yyvsp[(4) - (6)].ival)) ; }
2899 check_array((yyvsp[(1) - (6)].stp)) ;
2900 if( is_local((yyvsp[(1) - (6)].stp)) )
2901 { code2op(LAE_PUSHA, (yyvsp[(1) - (6)].stp)->offset) ; }
2902 else code2(AE_PUSHA, (yyvsp[(1) - (6)].stp)->stval.array) ;
2903 if ( (yyvsp[(6) - (6)].ival) == '+' ) code1(_POST_INC) ;
2904 else code1(_POST_DEC) ;
2906 (yyval.start) = (yyvsp[(2) - (6)].start) ;
2912 /* Line 1455 of yacc.c */
2915 (yyval.start) = (yyvsp[(3) - (7)].start) ;
2916 if ( (yyvsp[(5) - (7)].ival) > 1 ) { code2op(A_CAT, (yyvsp[(5) - (7)].ival)) ; }
2917 check_array((yyvsp[(2) - (7)].stp)) ;
2918 code_array((yyvsp[(2) - (7)].stp)) ;
2925 /* Line 1455 of yacc.c */
2928 (yyval.start) = code_offset ;
2929 check_array((yyvsp[(2) - (3)].stp)) ;
2930 code_array((yyvsp[(2) - (3)].stp)) ;
2937 /* Line 1455 of yacc.c */
2939 { eat_nl() ; BC_new() ;
2940 (yyval.start) = code_offset ;
2942 check_var((yyvsp[(3) - (6)].stp)) ;
2943 code_address((yyvsp[(3) - (6)].stp)) ;
2944 check_array((yyvsp[(5) - (6)].stp)) ;
2945 code_array((yyvsp[(5) - (6)].stp)) ;
2947 code2(SET_ALOOP, (INST*)0) ;
2953 /* Line 1455 of yacc.c */
2956 INST *p2 = CDP((yyvsp[(2) - (2)].start)) ;
2958 p2[-1].op = code_ptr - p2 + 1 ;
2959 BC_clear( code_ptr+2 , code_ptr) ;
2960 code_jmp(ALOOP, p2) ;
2967 /* Line 1455 of yacc.c */
2969 { (yyval.start) = code_offset ; code2(F_PUSHA, (yyvsp[(1) - (1)].cp)) ; }
2974 /* Line 1455 of yacc.c */
2976 { check_var((yyvsp[(2) - (2)].stp)) ;
2977 (yyval.start) = code_offset ;
2978 if ( is_local((yyvsp[(2) - (2)].stp)) )
2979 { code2op(L_PUSHI, (yyvsp[(2) - (2)].stp)->offset) ; }
2980 else code2(_PUSHI, (yyvsp[(2) - (2)].stp)->stval.cp) ;
2988 /* Line 1455 of yacc.c */
2991 if ( (yyvsp[(5) - (6)].ival) > 1 )
2992 { code2op(A_CAT, (yyvsp[(5) - (6)].ival)) ; }
2994 check_array((yyvsp[(2) - (6)].stp)) ;
2995 if( is_local((yyvsp[(2) - (6)].stp)) )
2996 { code2op(LAE_PUSHI, (yyvsp[(2) - (6)].stp)->offset) ; }
2997 else code2(AE_PUSHI, (yyvsp[(2) - (6)].stp)->stval.array) ;
3001 (yyval.start) = (yyvsp[(3) - (6)].start) ;
3007 /* Line 1455 of yacc.c */
3009 { (yyval.start) = (yyvsp[(2) - (2)].start) ; CODE_FE_PUSHA() ; }
3014 /* Line 1455 of yacc.c */
3016 { (yyval.start) = (yyvsp[(2) - (3)].start) ; }
3021 /* Line 1455 of yacc.c */
3028 /* Line 1455 of yacc.c */
3030 { code1(F_ASSIGN) ; }
3035 /* Line 1455 of yacc.c */
3037 { code1(F_ADD_ASG) ; }
3042 /* Line 1455 of yacc.c */
3044 { code1(F_SUB_ASG) ; }
3049 /* Line 1455 of yacc.c */
3051 { code1(F_MUL_ASG) ; }
3056 /* Line 1455 of yacc.c */
3058 { code1(F_DIV_ASG) ; }
3063 /* Line 1455 of yacc.c */
3065 { code1(F_MOD_ASG) ; }
3070 /* Line 1455 of yacc.c */
3072 { code1(F_POW_ASG) ; }
3077 /* Line 1455 of yacc.c */
3079 { code2(_BUILTIN, bi_split) ; }
3084 /* Line 1455 of yacc.c */
3086 { (yyval.start) = (yyvsp[(3) - (5)].start) ;
3087 check_array((yyvsp[(5) - (5)].stp)) ;
3088 code_array((yyvsp[(5) - (5)].stp)) ;
3094 /* Line 1455 of yacc.c */
3096 { code2(_PUSHI, &fs_shadow) ; }
3101 /* Line 1455 of yacc.c */
3104 if ( CDP((yyvsp[(2) - (3)].start)) == code_ptr - 2 )
3106 if ( code_ptr[-2].op == _MATCH0 )
3109 if ( code_ptr[-2].op == _PUSHS )
3110 { CELL *cp = ZMALLOC(CELL) ;
3112 cp->type = C_STRING ;
3113 cp->ptr = code_ptr[-1].ptr ;
3114 cast_for_split(cp) ;
3115 code_ptr[-2].op = _PUSHC ;
3116 code_ptr[-1].ptr = (PTR) cp ;
3124 /* Line 1455 of yacc.c */
3126 { (yyval.start) = (yyvsp[(3) - (6)].start) ;
3127 code2(_BUILTIN, bi_match) ;
3133 /* Line 1455 of yacc.c */
3136 INST *p1 = CDP((yyvsp[(1) - (1)].start)) ;
3138 if ( p1 == code_ptr - 2 )
3140 if ( p1->op == _MATCH0 ) RE_as_arg() ;
3142 if ( p1->op == _PUSHS )
3143 { CELL *cp = ZMALLOC(CELL) ;
3145 cp->type = C_STRING ;
3146 cp->ptr = p1[1].ptr ;
3149 p1[1].ptr = (PTR) cp ;
3157 /* Line 1455 of yacc.c */
3159 { (yyval.start) = code_offset ;
3165 /* Line 1455 of yacc.c */
3167 { (yyval.start) = (yyvsp[(2) - (3)].start) ; code1(_EXIT) ; }
3172 /* Line 1455 of yacc.c */
3174 { (yyval.start) = code_offset ;
3180 /* Line 1455 of yacc.c */
3182 { (yyval.start) = (yyvsp[(2) - (3)].start) ; code1(_RET) ; }
3187 /* Line 1455 of yacc.c */
3189 { (yyval.start) = code_offset ;
3190 code2(F_PUSHA, &field[0]) ;
3191 code1(_PUSHINT) ; code1(0) ;
3192 code2(_BUILTIN, bi_getline) ;
3199 /* Line 1455 of yacc.c */
3201 { (yyval.start) = (yyvsp[(2) - (2)].start) ;
3202 code1(_PUSHINT) ; code1(0) ;
3203 code2(_BUILTIN, bi_getline) ;
3210 /* Line 1455 of yacc.c */
3212 { code1(_PUSHINT) ; code1(F_IN) ;
3213 code2(_BUILTIN, bi_getline) ;
3214 /* getline_flag already off in yylex() */
3220 /* Line 1455 of yacc.c */
3222 { code2(F_PUSHA, &field[0]) ;
3223 code1(_PUSHINT) ; code1(PIPE_IN) ;
3224 code2(_BUILTIN, bi_getline) ;
3230 /* Line 1455 of yacc.c */
3233 code1(_PUSHINT) ; code1(PIPE_IN) ;
3234 code2(_BUILTIN, bi_getline) ;
3240 /* Line 1455 of yacc.c */
3242 { getline_flag = 1 ; }
3247 /* Line 1455 of yacc.c */
3249 { (yyval.start) = code_offset ;
3250 code2(F_PUSHA, field+0) ;
3256 /* Line 1455 of yacc.c */
3258 { (yyval.start) = (yyvsp[(2) - (3)].start) ; }
3263 /* Line 1455 of yacc.c */
3266 INST *p5 = CDP((yyvsp[(5) - (6)].start)) ;
3267 INST *p6 = CDP((yyvsp[(6) - (6)].start)) ;
3269 if ( p6 - p5 == 2 && p5->op == _PUSHS )
3270 { /* cast from STRING to REPL at compile time */
3271 CELL *cp = ZMALLOC(CELL) ;
3272 cp->type = C_STRING ;
3273 cp->ptr = p5[1].ptr ;
3276 p5[1].ptr = (PTR) cp ;
3278 code2(_BUILTIN, (yyvsp[(1) - (6)].fp)) ;
3279 (yyval.start) = (yyvsp[(3) - (6)].start) ;
3285 /* Line 1455 of yacc.c */
3287 { (yyval.fp) = bi_sub ; }
3292 /* Line 1455 of yacc.c */
3294 { (yyval.fp) = bi_gsub ; }
3299 /* Line 1455 of yacc.c */
3301 { (yyval.start) = code_offset ;
3302 code2(F_PUSHA, &field[0]) ;
3308 /* Line 1455 of yacc.c */
3310 { (yyval.start) = (yyvsp[(2) - (3)].start) ; }
3315 /* Line 1455 of yacc.c */
3318 resize_fblock((yyvsp[(1) - (2)].fbp)) ;
3320 switch_code_to_main() ;
3326 /* Line 1455 of yacc.c */
3327 #line 1002 "parse.y"
3329 scope = SCOPE_FUNCT ;
3330 active_funct = (yyvsp[(1) - (4)].fbp) ;
3331 *main_code_p = active_code ;
3333 (yyvsp[(1) - (4)].fbp)->nargs = (yyvsp[(3) - (4)].ival) ;
3334 if ( (yyvsp[(3) - (4)].ival) )
3335 (yyvsp[(1) - (4)].fbp)->typev = (char *)
3336 memset( zmalloc((yyvsp[(3) - (4)].ival)), ST_LOCAL_NONE, (yyvsp[(3) - (4)].ival)) ;
3337 else (yyvsp[(1) - (4)].fbp)->typev = (char *) 0 ;
3339 code_ptr = code_base =
3340 (INST *) zmalloc(INST_BYTES(PAGESZ));
3341 code_limit = code_base + PAGESZ ;
3342 code_warn = code_limit - CODEWARN ;
3348 /* Line 1455 of yacc.c */
3349 #line 1021 "parse.y"
3352 if ( (yyvsp[(2) - (2)].stp)->type == ST_NONE )
3354 (yyvsp[(2) - (2)].stp)->type = ST_FUNCT ;
3355 fbp = (yyvsp[(2) - (2)].stp)->stval.fbp =
3356 (FBLOCK *) zmalloc(sizeof(FBLOCK)) ;
3357 fbp->name = (yyvsp[(2) - (2)].stp)->name ;
3358 fbp->code = (INST*) 0 ;
3362 type_error( (yyvsp[(2) - (2)].stp) ) ;
3364 /* this FBLOCK will not be put in
3366 fbp = (FBLOCK*) zmalloc(sizeof(FBLOCK)) ;
3375 /* Line 1455 of yacc.c */
3376 #line 1044 "parse.y"
3377 { (yyval.fbp) = (yyvsp[(2) - (2)].fbp) ;
3378 if ( (yyvsp[(2) - (2)].fbp)->code )
3379 compile_error("redefinition of %s" , (yyvsp[(2) - (2)].fbp)->name) ;
3385 /* Line 1455 of yacc.c */
3386 #line 1050 "parse.y"
3387 { (yyval.ival) = 0 ; }
3392 /* Line 1455 of yacc.c */
3393 #line 1055 "parse.y"
3394 { (yyvsp[(1) - (1)].stp) = save_id((yyvsp[(1) - (1)].stp)->name) ;
3395 (yyvsp[(1) - (1)].stp)->type = ST_LOCAL_NONE ;
3396 (yyvsp[(1) - (1)].stp)->offset = 0 ;
3403 /* Line 1455 of yacc.c */
3404 #line 1061 "parse.y"
3405 { if ( is_local((yyvsp[(3) - (3)].stp)) )
3406 compile_error("%s is duplicated in argument list",
3407 (yyvsp[(3) - (3)].stp)->name) ;
3409 { (yyvsp[(3) - (3)].stp) = save_id((yyvsp[(3) - (3)].stp)->name) ;
3410 (yyvsp[(3) - (3)].stp)->type = ST_LOCAL_NONE ;
3411 (yyvsp[(3) - (3)].stp)->offset = (yyvsp[(1) - (3)].ival) ;
3412 (yyval.ival) = (yyvsp[(1) - (3)].ival) + 1 ;
3419 /* Line 1455 of yacc.c */
3420 #line 1074 "parse.y"
3421 { /* we may have to recover from a bungled function
3423 /* can have local ids, before code scope
3427 switch_code_to_main() ;
3433 /* Line 1455 of yacc.c */
3434 #line 1087 "parse.y"
3435 { (yyval.start) = (yyvsp[(2) - (3)].start) ;
3436 code2(_CALL, (yyvsp[(1) - (3)].fbp)) ;
3438 if ( (yyvsp[(3) - (3)].ca_p) ) code1((yyvsp[(3) - (3)].ca_p)->arg_num+1) ;
3441 check_fcall((yyvsp[(1) - (3)].fbp), scope, code_move_level, active_funct,
3442 (yyvsp[(3) - (3)].ca_p), token_lineno) ;
3448 /* Line 1455 of yacc.c */
3449 #line 1099 "parse.y"
3450 { (yyval.ca_p) = (CA_REC *) 0 ; }
3455 /* Line 1455 of yacc.c */
3456 #line 1101 "parse.y"
3457 { (yyval.ca_p) = (yyvsp[(2) - (2)].ca_p) ;
3458 (yyval.ca_p)->link = (yyvsp[(1) - (2)].ca_p) ;
3459 (yyval.ca_p)->arg_num = (yyvsp[(1) - (2)].ca_p) ? (yyvsp[(1) - (2)].ca_p)->arg_num+1 : 0 ;
3465 /* Line 1455 of yacc.c */
3466 #line 1116 "parse.y"
3467 { (yyval.ca_p) = (CA_REC *) 0 ; }
3472 /* Line 1455 of yacc.c */
3473 #line 1118 "parse.y"
3474 { (yyval.ca_p) = ZMALLOC(CA_REC) ;
3475 (yyval.ca_p)->link = (yyvsp[(1) - (3)].ca_p) ;
3476 (yyval.ca_p)->type = CA_EXPR ;
3477 (yyval.ca_p)->arg_num = (yyvsp[(1) - (3)].ca_p) ? (yyvsp[(1) - (3)].ca_p)->arg_num+1 : 0 ;
3478 (yyval.ca_p)->call_offset = code_offset ;
3484 /* Line 1455 of yacc.c */
3485 #line 1125 "parse.y"
3486 { (yyval.ca_p) = ZMALLOC(CA_REC) ;
3487 (yyval.ca_p)->link = (yyvsp[(1) - (3)].ca_p) ;
3488 (yyval.ca_p)->arg_num = (yyvsp[(1) - (3)].ca_p) ? (yyvsp[(1) - (3)].ca_p)->arg_num+1 : 0 ;
3490 code_call_id((yyval.ca_p), (yyvsp[(2) - (3)].stp)) ;
3496 /* Line 1455 of yacc.c */
3497 #line 1134 "parse.y"
3498 { (yyval.ca_p) = ZMALLOC(CA_REC) ;
3499 (yyval.ca_p)->type = CA_EXPR ;
3500 (yyval.ca_p)->call_offset = code_offset ;
3506 /* Line 1455 of yacc.c */
3507 #line 1140 "parse.y"
3508 { (yyval.ca_p) = ZMALLOC(CA_REC) ;
3509 code_call_id((yyval.ca_p), (yyvsp[(1) - (2)].stp)) ;
3515 /* Line 1455 of yacc.c */
3516 #line 3517 "y.tab.c"
3519 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3523 YY_STACK_PRINT (yyss, yyssp);
3527 /* Now `shift' the result of the reduction. Determine what state
3528 that goes to, based on the state we popped back to and the rule
3529 number reduced by. */
3533 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3534 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3535 yystate = yytable[yystate];
3537 yystate = yydefgoto[yyn - YYNTOKENS];
3542 /*------------------------------------.
3543 | yyerrlab -- here on detecting error |
3544 `------------------------------------*/
3546 /* If not already recovering from an error, report this error. */
3550 #if ! YYERROR_VERBOSE
3551 yyerror (YY_("syntax error"));
3554 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
3555 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
3557 YYSIZE_T yyalloc = 2 * yysize;
3558 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
3559 yyalloc = YYSTACK_ALLOC_MAXIMUM;
3560 if (yymsg != yymsgbuf)
3561 YYSTACK_FREE (yymsg);
3562 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
3564 yymsg_alloc = yyalloc;
3568 yymsg_alloc = sizeof yymsgbuf;
3572 if (0 < yysize && yysize <= yymsg_alloc)
3574 (void) yysyntax_error (yymsg, yystate, yychar);
3579 yyerror (YY_("syntax error"));
3581 goto yyexhaustedlab;
3589 if (yyerrstatus == 3)
3591 /* If just tried and failed to reuse lookahead token after an
3592 error, discard it. */
3594 if (yychar <= YYEOF)
3596 /* Return failure if at end of input. */
3597 if (yychar == YYEOF)
3602 yydestruct ("Error: discarding",
3608 /* Else will try to reuse lookahead token after shifting the error
3613 /*---------------------------------------------------.
3614 | yyerrorlab -- error raised explicitly by YYERROR. |
3615 `---------------------------------------------------*/
3618 /* Pacify compilers like GCC when the user code never invokes
3619 YYERROR and the label yyerrorlab therefore never appears in user
3621 if (/*CONSTCOND*/ 0)
3624 /* Do not reclaim the symbols of the rule which action triggered
3628 YY_STACK_PRINT (yyss, yyssp);
3633 /*-------------------------------------------------------------.
3634 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3635 `-------------------------------------------------------------*/
3637 yyerrstatus = 3; /* Each real token shifted decrements this. */
3641 yyn = yypact[yystate];
3642 if (yyn != YYPACT_NINF)
3645 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3653 /* Pop the current state because it cannot handle the error token. */
3658 yydestruct ("Error: popping",
3659 yystos[yystate], yyvsp);
3662 YY_STACK_PRINT (yyss, yyssp);
3668 /* Shift the error token. */
3669 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3675 /*-------------------------------------.
3676 | yyacceptlab -- YYACCEPT comes here. |
3677 `-------------------------------------*/
3682 /*-----------------------------------.
3683 | yyabortlab -- YYABORT comes here. |
3684 `-----------------------------------*/
3689 #if !defined(yyoverflow) || YYERROR_VERBOSE
3690 /*-------------------------------------------------.
3691 | yyexhaustedlab -- memory exhaustion comes here. |
3692 `-------------------------------------------------*/
3694 yyerror (YY_("memory exhausted"));
3700 if (yychar != YYEMPTY)
3701 yydestruct ("Cleanup: discarding lookahead",
3703 /* Do not reclaim the symbols of the rule which action triggered
3704 this YYABORT or YYACCEPT. */
3706 YY_STACK_PRINT (yyss, yyssp);
3707 while (yyssp != yyss)
3709 yydestruct ("Cleanup: popping",
3710 yystos[*yyssp], yyvsp);
3715 YYSTACK_FREE (yyss);
3718 if (yymsg != yymsgbuf)
3719 YYSTACK_FREE (yymsg);
3721 /* Make sure YYID is used. */
3722 return YYID (yyresult);
3727 /* Line 1675 of yacc.c */
3728 #line 1148 "parse.y"
3731 /* resize the code for a user function */
3733 static void resize_fblock( fbp )
3736 CODEBLOCK *p = ZMALLOC(CODEBLOCK) ;
3739 code2op(_RET0, _HALT) ;
3740 /* make sure there is always a return */
3743 fbp->code = code_shrink(p, &dummy) ;
3744 /* code_shrink() zfrees p */
3746 if ( dump_code_flag ) add_to_fdump_list(fbp) ;
3750 /* convert FE_PUSHA to FE_PUSHI
3751 or F_PUSH to F_PUSHI
3754 static void field_A2I()
3757 if ( code_ptr[-1].op == FE_PUSHA &&
3758 code_ptr[-1].ptr == (PTR) 0)
3759 /* On most architectures, the two tests are the same; a good
3760 compiler might eliminate one. On LM_DOS, and possibly other
3761 segmented architectures, they are not */
3762 { code_ptr[-1].op = FE_PUSHI ; }
3765 cp = (CELL *) code_ptr[-1].ptr ;
3770 SAMESEG(cp,field) &&
3772 cp > NF && cp <= LAST_PFIELD )
3774 code_ptr[-2].op = _PUSHI ;
3776 else if ( cp == NF )
3777 { code_ptr[-2].op = NF_PUSHI ; code_ptr-- ; }
3781 code_ptr[-2].op = F_PUSHI ;
3782 code_ptr -> op = field_addr_to_index( code_ptr[-1].ptr ) ;
3788 /* we've seen an ID in a context where it should be a VAR,
3789 check that's consistent with previous usage */
3791 static void check_var( p )
3792 register SYMTAB *p ;
3796 case ST_NONE : /* new id */
3798 p->stval.cp = ZMALLOC(CELL) ;
3799 p->stval.cp->type = C_NOINIT ;
3802 case ST_LOCAL_NONE :
3803 p->type = ST_LOCAL_VAR ;
3804 active_funct->typev[p->offset] = ST_LOCAL_VAR ;
3808 case ST_LOCAL_VAR : break ;
3816 /* we've seen an ID in a context where it should be an ARRAY,
3817 check that's consistent with previous usage */
3818 static void check_array(p)
3819 register SYMTAB *p ;
3823 case ST_NONE : /* a new array */
3824 p->type = ST_ARRAY ;
3825 p->stval.array = new_ARRAY() ;
3829 case ST_LOCAL_ARRAY :
3832 case ST_LOCAL_NONE :
3833 p->type = ST_LOCAL_ARRAY ;
3834 active_funct->typev[p->offset] = ST_LOCAL_ARRAY ;
3837 default : type_error(p) ; break ;
3841 static void code_array(p)
3842 register SYMTAB *p ;
3844 if ( is_local(p) ) code2op(LA_PUSHA, p->offset) ;
3845 else code2(A_PUSHA, p->stval.array) ;
3849 /* we've seen an ID as an argument to a user defined function */
3851 static void code_call_id( p, ip )
3852 register CA_REC *p ;
3853 register SYMTAB *ip ;
3854 { static CELL dummy ;
3856 p->call_offset = code_offset ;
3857 /* This always get set now. So that fcall:relocate_arglist
3864 code2(_PUSHI, ip->stval.cp) ;
3869 code2op(L_PUSHI, ip->offset) ;
3873 p->type = CA_ARRAY ;
3874 code2(A_PUSHA, ip->stval.array) ;
3877 case ST_LOCAL_ARRAY :
3878 p->type = CA_ARRAY ;
3879 code2op(LA_PUSHA, ip->offset) ;
3882 /* not enough info to code it now; it will have to
3888 code2(_PUSHI, &dummy) ;
3891 case ST_LOCAL_NONE :
3892 p->type = ST_LOCAL_NONE ;
3893 p->type_p = & active_funct->typev[ip->offset] ;
3894 code2op(L_PUSHI, ip->offset) ;
3900 bozo("code_call_id") ;
3906 /* an RE by itself was coded as _MATCH0 , change to
3907 push as an expression */
3909 static void RE_as_arg()
3910 { CELL *cp = ZMALLOC(CELL) ;
3914 cp->ptr = code_ptr[1].ptr ;
3918 /* reset the active_code back to the MAIN block */
3920 switch_code_to_main()
3925 *begin_code_p = active_code ;
3926 active_code = *main_code_p ;
3930 *end_code_p = active_code ;
3931 active_code = *main_code_p ;
3935 active_code = *main_code_p ;
3941 active_funct = (FBLOCK*) 0 ;
3942 scope = SCOPE_MAIN ;
3949 if ( yyparse() || compile_error_count != 0 ) mawk_exit(2) ;
3953 /* code must be set before call to resolve_fcalls() */
3954 if ( resolve_list ) resolve_fcalls() ;
3956 if ( compile_error_count != 0 ) mawk_exit(2) ;
3957 if ( dump_code_flag ) { dump_code() ; mawk_exit(0) ; }