1 /* A Bison parser, made by GNU Bison 2.1. */
3 /* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA. */
21 /* As a special exception, when this file is copied by Bison into a
22 Bison output file, you may use that output file without restriction.
23 This special exception was added by the Free Software Foundation
24 in version 1.24 of Bison. */
26 /* Written by Richard Stallman by simplifying the original so called
27 ``semantic'' parser. */
29 /* All symbols defined below should begin with yy or YY, to avoid
30 infringing on user name space. This should be done even for local
31 variables, as they might otherwise be expanded by user macros.
32 There are some unavoidable exceptions within include files to
33 define necessary library symbols; they are noted "INFRINGES ON
34 USER NAME SPACE" below. */
36 /* Identify Bison output. */
40 #define YYBISON_VERSION "2.1"
43 #define YYSKELETON_NAME "yacc.c"
48 /* Using locations. */
49 #define YYLSP_NEEDED 0
51 /* Substitute the variable and function names. */
52 #define yyparse Upgradeparse
53 #define yylex Upgradelex
54 #define yyerror Upgradeerror
55 #define yylval Upgradelval
56 #define yychar Upgradechar
57 #define yydebug Upgradedebug
58 #define yynerrs Upgradenerrs
64 /* Put the tokens into the symbol table, so that GDB and other debuggers
88 ZEROINITIALIZER = 279,
134 X86_STDCALLCC_TOK = 325,
135 X86_FASTCALLCC_TOK = 326,
199 EXTRACTELEMENT = 390,
232 #define ESINT64VAL 272
233 #define EUINT64VAL 273
239 #define ZEROINITIALIZER 279
245 #define STRINGCONSTANT 285
246 #define IMPLEMENTATION 286
255 #define DOTDOTDOT 295
260 #define DLLIMPORT 300
261 #define DLLEXPORT 301
262 #define EXTERN_WEAK 302
263 #define APPENDING 303
269 #define POINTERSIZE 309
273 #define UNINITIALIZED 313
279 #define SIDEEFFECT 319
282 #define CSRETCC_TOK 322
283 #define FASTCC_TOK 323
284 #define COLDCC_TOK 324
285 #define X86_STDCALLCC_TOK 325
286 #define X86_FASTCALLCC_TOK 326
287 #define DATALAYOUT 327
294 #define UNREACHABLE 334
342 #define GETELEMENTPTR 382
350 #define EXTRACTELEMENT 390
351 #define INSERTELEMENT 391
352 #define SHUFFLEVECTOR 392
370 /* Copy the first part of user declarations. */
371 #line 14 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
373 #include "ParserInternals.h"
374 #include <llvm/ADT/StringExtras.h>
381 #define YYERROR_VERBOSE 1
382 #define YYINCLUDED_STDLIB_H
384 #define UPGRADE_SETCOND_OPS 0
386 int yylex(); // declaration" of xxx warnings.
390 static std::string CurFilename;
391 static std::ostream *O = 0;
392 std::istream* LexInput = 0;
393 unsigned SizeOfPointer = 32;
394 static uint64_t unique = 1;
396 typedef std::vector<TypeInfo> TypeVector;
397 static TypeVector EnumeratedTypes;
398 typedef std::map<std::string,TypeInfo> TypeMap;
399 static TypeMap NamedTypes;
400 static TypeMap Globals;
402 void destroy(ValueList* VL) {
403 while (!VL->empty()) {
404 ValueInfo& VI = VL->back();
411 void UpgradeAssembly(const std::string &infile, std::istream& in,
412 std::ostream &out, bool debug)
415 CurFilename = infile;
421 std::cerr << "Parse failed.\n";
426 static void ResolveType(TypeInfo& Ty) {
427 if (Ty.oldTy == UnresolvedTy) {
428 TypeMap::iterator I = NamedTypes.find(*Ty.newTy);
429 if (I != NamedTypes.end()) {
430 Ty.oldTy = I->second.oldTy;
431 Ty.elemTy = I->second.elemTy;
433 std::string msg("Can't resolve type: ");
435 yyerror(msg.c_str());
437 } else if (Ty.oldTy == NumericTy) {
438 unsigned ref = atoi(&((Ty.newTy->c_str())[1])); // Skip the '\\'
439 if (ref < EnumeratedTypes.size()) {
440 Ty.oldTy = EnumeratedTypes[ref].oldTy;
441 Ty.elemTy = EnumeratedTypes[ref].elemTy;
443 std::string msg("Can't resolve type: ");
445 yyerror(msg.c_str());
448 // otherwise its already resolved.
451 static const char* getCastOpcode(
452 std::string& Source, const TypeInfo& SrcTy, const TypeInfo& DstTy)
454 unsigned SrcBits = SrcTy.getBitWidth();
455 unsigned DstBits = DstTy.getBitWidth();
456 const char* opcode = "bitcast";
457 // Run through the possibilities ...
458 if (DstTy.isIntegral()) { // Casting to integral
459 if (SrcTy.isIntegral()) { // Casting from integral
460 if (DstBits < SrcBits)
462 else if (DstBits > SrcBits) { // its an extension
463 if (SrcTy.isSigned())
464 opcode ="sext"; // signed -> SEXT
466 opcode = "zext"; // unsigned -> ZEXT
468 opcode = "bitcast"; // Same size, No-op cast
470 } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt
471 if (DstTy.isSigned())
472 opcode = "fptosi"; // FP -> sint
474 opcode = "fptoui"; // FP -> uint
475 } else if (SrcTy.isPacked()) {
476 assert(DstBits == SrcTy.getBitWidth() &&
477 "Casting packed to integer of different width");
478 opcode = "bitcast"; // same size, no-op cast
480 assert(SrcTy.isPointer() &&
481 "Casting from a value that is not first-class type");
482 opcode = "ptrtoint"; // ptr -> int
484 } else if (DstTy.isFloatingPoint()) { // Casting to floating pt
485 if (SrcTy.isIntegral()) { // Casting from integral
486 if (SrcTy.isSigned())
487 opcode = "sitofp"; // sint -> FP
489 opcode = "uitofp"; // uint -> FP
490 } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt
491 if (DstBits < SrcBits) {
492 opcode = "fptrunc"; // FP -> smaller FP
493 } else if (DstBits > SrcBits) {
494 opcode = "fpext"; // FP -> larger FP
496 opcode ="bitcast"; // same size, no-op cast
498 } else if (SrcTy.isPacked()) {
499 assert(DstBits == SrcTy.getBitWidth() &&
500 "Casting packed to floating point of different width");
501 opcode = "bitcast"; // same size, no-op cast
503 assert(0 && "Casting pointer or non-first class to float");
505 } else if (DstTy.isPacked()) {
506 if (SrcTy.isPacked()) {
507 assert(DstTy.getBitWidth() == SrcTy.getBitWidth() &&
508 "Casting packed to packed of different widths");
509 opcode = "bitcast"; // packed -> packed
510 } else if (DstTy.getBitWidth() == SrcBits) {
511 opcode = "bitcast"; // float/int -> packed
513 assert(!"Illegal cast to packed (wrong type or size)");
515 } else if (DstTy.isPointer()) {
516 if (SrcTy.isPointer()) {
517 opcode = "bitcast"; // ptr -> ptr
518 } else if (SrcTy.isIntegral()) {
519 opcode = "inttoptr"; // int -> ptr
521 assert(!"Casting invalid type to pointer");
524 assert(!"Casting to type that is not first-class");
529 static std::string getCastUpgrade(
530 const std::string& Src, TypeInfo& SrcTy, TypeInfo& DstTy, bool isConst)
533 std::string Source = Src;
534 if (SrcTy.isFloatingPoint() && DstTy.isPointer()) {
535 // fp -> ptr cast is no longer supported but we must upgrade this
536 // by doing a double cast: fp -> int -> ptr
538 Source = "ulong fptoui(" + Source + " to ulong)";
540 *O << " %cast_upgrade" << unique << " = fptoui " << Source
542 Source = "ulong %cast_upgrade" + llvm::utostr(unique);
544 // Update the SrcTy for the getCastOpcode call below
546 SrcTy.newTy = new std::string("ulong");
547 SrcTy.oldTy = ULongTy;
548 } else if (DstTy.oldTy == BoolTy) {
549 // cast ptr %x to bool was previously defined as setne ptr %x, null
550 // The ptrtoint semantic is to truncate, not compare so we must retain
551 // the original intent by replace the cast with a setne
552 const char* comparator = SrcTy.isPointer() ? ", null" :
553 (SrcTy.isFloatingPoint() ? ", 0.0" : ", 0");
555 Result = "setne (" + Source + comparator + ")";
557 Result = "setne " + Source + comparator;
558 return Result; // skip cast processing below
562 std::string Opcode(getCastOpcode(Source, SrcTy, DstTy));
564 Result += Opcode + "( " + Source + " to " + *DstTy.newTy + ")";
566 Result += Opcode + " " + Source + " to " + *DstTy.newTy;
570 const char* getDivRemOpcode(const std::string& opcode, const TypeInfo& TI) {
571 const char* op = opcode.c_str();
575 Ty.oldTy = Ty.getElementType();
577 if (Ty.isFloatingPoint())
579 else if (Ty.isUnsigned())
581 else if (Ty.isSigned())
584 yyerror("Invalid type for div instruction");
585 else if (opcode == "rem")
586 if (Ty.isFloatingPoint())
588 else if (Ty.isUnsigned())
590 else if (Ty.isSigned())
593 yyerror("Invalid type for rem instruction");
598 getCompareOp(const std::string& setcc, const TypeInfo& TI) {
599 assert(setcc.length() == 5);
602 assert(cc1 == 'e' || cc1 == 'n' || cc1 == 'l' || cc1 == 'g');
603 assert(cc2 == 'q' || cc2 == 'e' || cc2 == 'e' || cc2 == 't');
604 std::string result("xcmp xxx");
607 if (TI.isFloatingPoint()) {
609 result[5] = 'o'; // FIXME: Always map to ordered comparison ?
610 } else if (TI.isIntegral() || TI.isPointer()) {
612 if ((cc1 == 'e' && cc2 == 'q') || (cc1 == 'n' && cc2 == 'e'))
614 else if (TI.isSigned())
616 else if (TI.isUnsigned() || TI.isPointer())
619 yyerror("Invalid integral type for setcc");
626 /* Enabling traces. */
631 /* Enabling verbose error messages. */
632 #ifdef YYERROR_VERBOSE
633 # undef YYERROR_VERBOSE
634 # define YYERROR_VERBOSE 1
636 # define YYERROR_VERBOSE 0
639 /* Enabling the token table. */
640 #ifndef YYTOKEN_TABLE
641 # define YYTOKEN_TABLE 0
644 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
645 #line 270 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
646 typedef union YYSTYPE {
653 /* Line 196 of yacc.c. */
654 #line 655 "UpgradeParser.tab.c"
655 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
656 # define YYSTYPE_IS_DECLARED 1
657 # define YYSTYPE_IS_TRIVIAL 1
662 /* Copy the second part of user declarations. */
665 /* Line 219 of yacc.c. */
666 #line 667 "UpgradeParser.tab.c"
668 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
669 # define YYSIZE_T __SIZE_TYPE__
671 #if ! defined (YYSIZE_T) && defined (size_t)
672 # define YYSIZE_T size_t
674 #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
675 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
676 # define YYSIZE_T size_t
678 #if ! defined (YYSIZE_T)
679 # define YYSIZE_T unsigned int
685 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
686 # define YY_(msgid) dgettext ("bison-runtime", msgid)
690 # define YY_(msgid) msgid
694 #if ! defined (yyoverflow) || YYERROR_VERBOSE
696 /* The parser invokes alloca or malloc; define the necessary symbols. */
698 # ifdef YYSTACK_USE_ALLOCA
699 # if YYSTACK_USE_ALLOCA
701 # define YYSTACK_ALLOC __builtin_alloca
703 # define YYSTACK_ALLOC alloca
704 # if defined (__STDC__) || defined (__cplusplus)
705 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
706 # define YYINCLUDED_STDLIB_H
712 # ifdef YYSTACK_ALLOC
713 /* Pacify GCC's `empty if-body' warning. */
714 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
715 # ifndef YYSTACK_ALLOC_MAXIMUM
716 /* The OS might guarantee only one guard page at the bottom of the stack,
717 and a page size can be as small as 4096 bytes. So we cannot safely
718 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
719 to allow for a few compiler-allocated temporary stack slots. */
720 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
723 # define YYSTACK_ALLOC YYMALLOC
724 # define YYSTACK_FREE YYFREE
725 # ifndef YYSTACK_ALLOC_MAXIMUM
726 # define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
732 # define YYMALLOC malloc
733 # if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
734 && (defined (__STDC__) || defined (__cplusplus)))
735 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
740 # if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
741 && (defined (__STDC__) || defined (__cplusplus)))
742 void free (void *); /* INFRINGES ON USER NAME SPACE */
749 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
752 #if (! defined (yyoverflow) \
753 && (! defined (__cplusplus) \
754 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
756 /* A type that is properly aligned for any stack member. */
763 /* The size of the maximum gap between one aligned stack and the next. */
764 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
766 /* The size of an array large to enough to hold all stacks, each with
768 # define YYSTACK_BYTES(N) \
769 ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
770 + YYSTACK_GAP_MAXIMUM)
772 /* Copy COUNT objects from FROM to TO. The source and destination do
775 # if defined (__GNUC__) && 1 < __GNUC__
776 # define YYCOPY(To, From, Count) \
777 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
779 # define YYCOPY(To, From, Count) \
783 for (yyi = 0; yyi < (Count); yyi++) \
784 (To)[yyi] = (From)[yyi]; \
790 /* Relocate STACK from its old location to the new one. The
791 local variables YYSIZE and YYSTACKSIZE give the old and new number of
792 elements in the stack, and YYPTR gives the new location of the
793 stack. Advance YYPTR to a properly aligned location for the next
795 # define YYSTACK_RELOCATE(Stack) \
798 YYSIZE_T yynewbytes; \
799 YYCOPY (&yyptr->Stack, Stack, yysize); \
800 Stack = &yyptr->Stack; \
801 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
802 yyptr += yynewbytes / sizeof (*yyptr); \
808 #if defined (__STDC__) || defined (__cplusplus)
809 typedef signed char yysigned_char;
811 typedef short int yysigned_char;
814 /* YYFINAL -- State number of the termination state. */
816 /* YYLAST -- Last index in YYTABLE. */
819 /* YYNTOKENS -- Number of terminals. */
820 #define YYNTOKENS 165
821 /* YYNNTS -- Number of nonterminals. */
823 /* YYNRULES -- Number of rules. */
825 /* YYNRULES -- Number of states. */
826 #define YYNSTATES 582
828 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
830 #define YYMAXUTOK 405
832 #define YYTRANSLATE(YYX) \
833 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
835 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
836 static const unsigned char yytranslate[] =
838 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
839 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
840 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
841 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
842 154, 155, 163, 2, 152, 2, 2, 2, 2, 2,
843 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
844 159, 151, 160, 2, 2, 2, 2, 2, 2, 2,
845 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
846 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
847 2, 156, 153, 158, 2, 2, 2, 2, 2, 164,
848 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
849 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
850 157, 2, 2, 161, 2, 162, 2, 2, 2, 2,
851 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
852 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
853 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
854 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
855 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
856 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
857 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
858 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
859 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
860 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
861 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
862 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
863 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
864 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
865 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
866 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
867 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
868 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
869 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
870 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
871 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
872 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
873 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
874 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
875 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
876 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
877 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
878 145, 146, 147, 148, 149, 150
882 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
884 static const unsigned short int yyprhs[] =
886 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
887 19, 21, 23, 25, 27, 29, 31, 33, 35, 37,
888 39, 41, 43, 45, 47, 49, 51, 53, 55, 57,
889 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
890 79, 81, 83, 85, 87, 89, 91, 93, 95, 97,
891 99, 101, 103, 105, 107, 109, 111, 113, 115, 117,
892 119, 121, 123, 125, 127, 129, 131, 133, 135, 137,
893 139, 141, 143, 145, 147, 149, 151, 153, 155, 157,
894 159, 161, 164, 165, 167, 169, 171, 173, 175, 177,
895 179, 180, 182, 184, 186, 188, 190, 192, 195, 196,
896 197, 200, 201, 205, 208, 209, 211, 212, 216, 218,
897 221, 223, 225, 227, 229, 231, 233, 235, 237, 239,
898 241, 243, 245, 247, 249, 251, 253, 255, 257, 259,
899 261, 264, 269, 275, 281, 285, 288, 291, 293, 297,
900 299, 303, 305, 306, 311, 315, 319, 324, 329, 333,
901 336, 339, 342, 345, 348, 351, 354, 357, 360, 363,
902 370, 376, 385, 392, 399, 406, 414, 422, 429, 436,
903 445, 454, 458, 460, 462, 464, 466, 469, 472, 477,
904 480, 482, 484, 486, 491, 494, 499, 506, 513, 520,
905 527, 531, 536, 537, 539, 541, 543, 547, 551, 555,
906 559, 563, 567, 569, 570, 572, 574, 576, 577, 580,
907 584, 586, 588, 592, 594, 595, 604, 606, 608, 612,
908 614, 616, 620, 621, 623, 625, 629, 630, 632, 634,
909 636, 638, 640, 642, 644, 646, 648, 652, 654, 660,
910 662, 664, 666, 668, 671, 674, 676, 679, 682, 683,
911 685, 687, 689, 692, 695, 699, 709, 719, 728, 743,
912 745, 747, 754, 760, 763, 770, 778, 780, 784, 786,
913 787, 790, 792, 798, 804, 810, 818, 826, 829, 834,
914 839, 846, 851, 856, 863, 870, 873, 881, 883, 886,
915 887, 889, 890, 894, 901, 905, 912, 915, 920, 927
918 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
919 static const short int yyrhs[] =
921 199, 0, -1, 19, -1, 20, -1, 17, -1, 18,
922 -1, 80, -1, 81, -1, 82, -1, 83, -1, 84,
923 -1, 85, -1, 86, -1, 87, -1, 88, -1, 89,
924 -1, 90, -1, 91, -1, 92, -1, 93, -1, 94,
925 -1, 95, -1, 96, -1, 97, -1, 98, -1, 99,
926 -1, 102, -1, 103, -1, 104, -1, 105, -1, 106,
927 -1, 107, -1, 118, -1, 119, -1, 120, -1, 121,
928 -1, 108, -1, 109, -1, 110, -1, 111, -1, 112,
929 -1, 113, -1, 114, -1, 115, -1, 116, -1, 117,
930 -1, 118, -1, 119, -1, 120, -1, 121, -1, 25,
931 -1, 26, -1, 130, -1, 131, -1, 132, -1, 133,
932 -1, 139, -1, 140, -1, 141, -1, 142, -1, 143,
933 -1, 144, -1, 145, -1, 146, -1, 147, -1, 148,
934 -1, 149, -1, 150, -1, 138, -1, 11, -1, 9,
935 -1, 7, -1, 5, -1, 12, -1, 10, -1, 8,
936 -1, 6, -1, 175, -1, 176, -1, 13, -1, 14,
937 -1, 208, 151, -1, -1, 42, -1, 43, -1, 44,
938 -1, 48, -1, 45, -1, 46, -1, 47, -1, -1,
939 66, -1, 67, -1, 68, -1, 69, -1, 70, -1,
940 71, -1, 65, 18, -1, -1, -1, 57, 18, -1,
941 -1, 152, 57, 18, -1, 37, 30, -1, -1, 184,
942 -1, -1, 152, 187, 186, -1, 184, -1, 57, 18,
943 -1, 190, -1, 3, -1, 192, -1, 3, -1, 192,
944 -1, 4, -1, 5, -1, 6, -1, 7, -1, 8,
945 -1, 9, -1, 10, -1, 11, -1, 12, -1, 13,
946 -1, 14, -1, 15, -1, 16, -1, 222, -1, 191,
947 -1, 153, 18, -1, 189, 154, 194, 155, -1, 156,
948 18, 157, 192, 158, -1, 159, 18, 157, 192, 160,
949 -1, 161, 193, 162, -1, 161, 162, -1, 192, 163,
950 -1, 192, -1, 193, 152, 192, -1, 193, -1, 193,
951 152, 40, -1, 40, -1, -1, 190, 156, 197, 158,
952 -1, 190, 156, 158, -1, 190, 164, 30, -1, 190,
953 159, 197, 160, -1, 190, 161, 197, 162, -1, 190,
954 161, 162, -1, 190, 22, -1, 190, 23, -1, 190,
955 222, -1, 190, 196, -1, 190, 24, -1, 175, 167,
956 -1, 176, 18, -1, 4, 25, -1, 4, 26, -1,
957 178, 21, -1, 174, 154, 195, 39, 190, 155, -1,
958 127, 154, 195, 237, 155, -1, 129, 154, 195, 152,
959 195, 152, 195, 155, -1, 168, 154, 195, 152, 195,
960 155, -1, 169, 154, 195, 152, 195, 155, -1, 170,
961 154, 195, 152, 195, 155, -1, 100, 171, 154, 195,
962 152, 195, 155, -1, 101, 172, 154, 195, 152, 195,
963 155, -1, 173, 154, 195, 152, 195, 155, -1, 135,
964 154, 195, 152, 195, 155, -1, 136, 154, 195, 152,
965 195, 152, 195, 155, -1, 137, 154, 195, 152, 195,
966 152, 195, 155, -1, 197, 152, 195, -1, 195, -1,
967 35, -1, 36, -1, 200, -1, 200, 217, -1, 200,
968 219, -1, 200, 63, 62, 203, -1, 200, 31, -1,
969 202, -1, 50, -1, 58, -1, 202, 179, 27, 188,
970 -1, 202, 219, -1, 202, 63, 62, 203, -1, 202,
971 179, 180, 198, 195, 186, -1, 202, 179, 201, 198,
972 190, 186, -1, 202, 179, 45, 198, 190, 186, -1,
973 202, 179, 47, 198, 190, 186, -1, 202, 51, 205,
974 -1, 202, 59, 151, 206, -1, -1, 30, -1, 56,
975 -1, 55, -1, 53, 151, 204, -1, 54, 151, 18,
976 -1, 52, 151, 30, -1, 72, 151, 30, -1, 156,
977 207, 158, -1, 207, 152, 30, -1, 30, -1, -1,
978 28, -1, 30, -1, 208, -1, -1, 190, 209, -1,
979 211, 152, 210, -1, 210, -1, 211, -1, 211, 152,
980 40, -1, 40, -1, -1, 181, 188, 208, 154, 212,
981 155, 185, 182, -1, 32, -1, 161, -1, 180, 213,
982 214, -1, 33, -1, 162, -1, 215, 225, 216, -1,
983 -1, 45, -1, 47, -1, 34, 218, 213, -1, -1,
984 64, -1, 17, -1, 18, -1, 21, -1, 25, -1,
985 26, -1, 22, -1, 23, -1, 24, -1, 159, 197,
986 160, -1, 196, -1, 62, 220, 30, 152, 30, -1,
987 166, -1, 208, -1, 222, -1, 221, -1, 190, 223,
988 -1, 225, 226, -1, 226, -1, 227, 229, -1, 227,
989 231, -1, -1, 29, -1, 78, -1, 77, -1, 73,
990 224, -1, 73, 3, -1, 74, 15, 223, -1, 74,
991 4, 223, 152, 15, 223, 152, 15, 223, -1, 75,
992 177, 223, 152, 15, 223, 156, 230, 158, -1, 75,
993 177, 223, 152, 15, 223, 156, 158, -1, 179, 76,
994 181, 188, 223, 154, 234, 155, 39, 15, 223, 228,
995 15, 223, -1, 228, -1, 79, -1, 230, 177, 221,
996 152, 15, 223, -1, 177, 221, 152, 15, 223, -1,
997 179, 236, -1, 190, 156, 223, 152, 223, 158, -1,
998 232, 152, 156, 223, 152, 223, 158, -1, 224, -1,
999 233, 152, 224, -1, 233, -1, -1, 61, 60, -1,
1000 60, -1, 168, 190, 223, 152, 223, -1, 169, 190,
1001 223, 152, 223, -1, 170, 190, 223, 152, 223, -1,
1002 100, 171, 190, 223, 152, 223, 155, -1, 101, 172,
1003 190, 223, 152, 223, 155, -1, 49, 224, -1, 173,
1004 224, 152, 224, -1, 174, 224, 39, 190, -1, 129,
1005 224, 152, 224, 152, 224, -1, 134, 224, 152, 190,
1006 -1, 135, 224, 152, 224, -1, 136, 224, 152, 224,
1007 152, 224, -1, 137, 224, 152, 224, 152, 224, -1,
1008 128, 232, -1, 235, 181, 188, 223, 154, 234, 155,
1009 -1, 239, -1, 152, 233, -1, -1, 38, -1, -1,
1010 122, 190, 183, -1, 122, 190, 152, 10, 223, 183,
1011 -1, 123, 190, 183, -1, 123, 190, 152, 10, 223,
1012 183, -1, 124, 224, -1, 238, 125, 190, 223, -1,
1013 238, 126, 224, 152, 190, 223, -1, 127, 190, 223,
1017 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1018 static const unsigned short int yyrline[] =
1020 0, 333, 333, 333, 334, 334, 338, 338, 338, 338,
1021 338, 338, 338, 339, 339, 339, 339, 340, 340, 340,
1022 341, 341, 341, 341, 341, 341, 342, 342, 342, 342,
1023 342, 342, 342, 342, 342, 342, 343, 343, 343, 343,
1024 343, 343, 343, 343, 343, 343, 344, 344, 344, 344,
1025 344, 344, 345, 345, 345, 345, 346, 346, 346, 346,
1026 346, 346, 346, 347, 347, 347, 347, 347, 347, 352,
1027 352, 352, 352, 353, 353, 353, 353, 354, 354, 355,
1028 355, 358, 361, 366, 366, 366, 366, 366, 366, 367,
1029 368, 371, 371, 371, 371, 371, 372, 373, 378, 383,
1030 384, 387, 388, 396, 402, 403, 406, 407, 416, 417,
1031 430, 430, 431, 431, 432, 436, 436, 436, 436, 436,
1032 436, 436, 437, 437, 437, 437, 437, 439, 443, 447,
1033 450, 455, 461, 469, 477, 483, 487, 498, 501, 509,
1034 510, 515, 518, 528, 534, 539, 545, 551, 557, 562,
1035 568, 574, 580, 586, 592, 598, 604, 610, 616, 624,
1036 638, 650, 655, 661, 666, 674, 679, 684, 692, 697,
1037 702, 712, 717, 722, 722, 732, 737, 740, 745, 749,
1038 753, 755, 755, 758, 770, 775, 780, 789, 798, 807,
1039 816, 821, 826, 831, 833, 833, 836, 841, 848, 853,
1040 860, 867, 872, 873, 881, 881, 882, 882, 884, 891,
1041 895, 899, 902, 907, 910, 912, 932, 933, 935, 944,
1042 945, 947, 955, 956, 957, 961, 974, 975, 978, 978,
1043 978, 978, 978, 978, 978, 979, 980, 985, 986, 995,
1044 995, 999, 1005, 1016, 1022, 1025, 1033, 1037, 1042, 1045,
1045 1051, 1051, 1053, 1058, 1063, 1068, 1076, 1083, 1089, 1109,
1046 1114, 1120, 1125, 1133, 1142, 1149, 1157, 1161, 1168, 1169,
1047 1173, 1178, 1181, 1187, 1192, 1200, 1205, 1210, 1215, 1223,
1048 1237, 1242, 1247, 1252, 1257, 1262, 1267, 1284, 1289, 1290,
1049 1294, 1295, 1298, 1305, 1312, 1319, 1326, 1331, 1338, 1345
1053 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1054 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1055 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1056 static const char *const yytname[] =
1058 "$end", "error", "$undefined", "VOID", "BOOL", "SBYTE", "UBYTE",
1059 "SHORT", "USHORT", "INT", "UINT", "LONG", "ULONG", "FLOAT", "DOUBLE",
1060 "LABEL", "OPAQUE", "ESINT64VAL", "EUINT64VAL", "SINTVAL", "UINTVAL",
1061 "FPVAL", "NULL_TOK", "UNDEF", "ZEROINITIALIZER", "TRUETOK", "FALSETOK",
1062 "TYPE", "VAR_ID", "LABELSTR", "STRINGCONSTANT", "IMPLEMENTATION",
1063 "BEGINTOK", "ENDTOK", "DECLARE", "GLOBAL", "CONSTANT", "SECTION",
1064 "VOLATILE", "TO", "DOTDOTDOT", "CONST", "INTERNAL", "LINKONCE", "WEAK",
1065 "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "APPENDING", "NOT", "EXTERNAL",
1066 "TARGET", "TRIPLE", "ENDIAN", "POINTERSIZE", "LITTLE", "BIG", "ALIGN",
1067 "UNINITIALIZED", "DEPLIBS", "CALL", "TAIL", "ASM_TOK", "MODULE",
1068 "SIDEEFFECT", "CC_TOK", "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK",
1069 "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT",
1070 "RET", "BR", "SWITCH", "INVOKE", "EXCEPT", "UNWIND", "UNREACHABLE",
1071 "ADD", "SUB", "MUL", "DIV", "UDIV", "SDIV", "FDIV", "REM", "UREM",
1072 "SREM", "FREM", "AND", "OR", "XOR", "SETLE", "SETGE", "SETLT", "SETGT",
1073 "SETEQ", "SETNE", "ICMP", "FCMP", "EQ", "NE", "SLT", "SGT", "SLE", "SGE",
1074 "OEQ", "ONE", "OLT", "OGT", "OLE", "OGE", "ORD", "UNO", "UEQ", "UNE",
1075 "ULT", "UGT", "ULE", "UGE", "MALLOC", "ALLOCA", "FREE", "LOAD", "STORE",
1076 "GETELEMENTPTR", "PHI_TOK", "SELECT", "SHL", "SHR", "ASHR", "LSHR",
1077 "VAARG", "EXTRACTELEMENT", "INSERTELEMENT", "SHUFFLEVECTOR", "CAST",
1078 "TRUNC", "ZEXT", "SEXT", "FPTRUNC", "FPEXT", "FPTOUI", "FPTOSI",
1079 "UITOFP", "SITOFP", "PTRTOINT", "INTTOPTR", "BITCAST", "'='", "','",
1080 "'\\\\'", "'('", "')'", "'['", "'x'", "']'", "'<'", "'>'", "'{'", "'}'",
1081 "'*'", "'c'", "$accept", "IntVal", "EInt64Val", "ArithmeticOps",
1082 "LogicalOps", "SetCondOps", "IPredicates", "FPredicates", "ShiftOps",
1083 "CastOps", "SIntType", "UIntType", "IntType", "FPType", "OptAssign",
1084 "OptLinkage", "OptCallingConv", "OptAlign", "OptCAlign", "SectionString",
1085 "OptSection", "GlobalVarAttributes", "GlobalVarAttribute", "TypesV",
1086 "UpRTypesV", "Types", "PrimType", "UpRTypes", "TypeListI",
1087 "ArgTypeListI", "ConstVal", "ConstExpr", "ConstVector", "GlobalType",
1088 "Module", "DefinitionList", "External", "ConstPool", "AsmBlock",
1089 "BigOrLittle", "TargetDefinition", "LibrariesDefinition", "LibList",
1090 "Name", "OptName", "ArgVal", "ArgListH", "ArgList", "FunctionHeaderH",
1091 "BEGIN", "FunctionHeader", "END", "Function", "FnDeclareLinkage",
1092 "FunctionProto", "OptSideEffect", "ConstValueRef", "SymbolicValueRef",
1093 "ValueRef", "ResolvedVal", "BasicBlockList", "BasicBlock",
1094 "InstructionList", "Unwind", "BBTerminatorInst", "JumpTable", "Inst",
1095 "PHIList", "ValueRefList", "ValueRefListE", "OptTailCall", "InstVal",
1096 "IndexList", "OptVolatile", "MemoryInst", 0
1101 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1103 static const unsigned short int yytoknum[] =
1105 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1106 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1107 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1108 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1109 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1110 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1111 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1112 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1113 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1114 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1115 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1116 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1117 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
1118 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
1119 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
1120 405, 61, 44, 92, 40, 41, 91, 120, 93, 60,
1121 62, 123, 125, 42, 99
1125 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1126 static const unsigned char yyr1[] =
1128 0, 165, 166, 166, 167, 167, 168, 168, 168, 168,
1129 168, 168, 168, 168, 168, 168, 168, 169, 169, 169,
1130 170, 170, 170, 170, 170, 170, 171, 171, 171, 171,
1131 171, 171, 171, 171, 171, 171, 172, 172, 172, 172,
1132 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
1133 172, 172, 173, 173, 173, 173, 174, 174, 174, 174,
1134 174, 174, 174, 174, 174, 174, 174, 174, 174, 175,
1135 175, 175, 175, 176, 176, 176, 176, 177, 177, 178,
1136 178, 179, 179, 180, 180, 180, 180, 180, 180, 180,
1137 180, 181, 181, 181, 181, 181, 181, 181, 181, 182,
1138 182, 183, 183, 184, 185, 185, 186, 186, 187, 187,
1139 188, 188, 189, 189, 190, 191, 191, 191, 191, 191,
1140 191, 191, 191, 191, 191, 191, 191, 192, 192, 192,
1141 192, 192, 192, 192, 192, 192, 192, 193, 193, 194,
1142 194, 194, 194, 195, 195, 195, 195, 195, 195, 195,
1143 195, 195, 195, 195, 195, 195, 195, 195, 195, 196,
1144 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
1145 196, 197, 197, 198, 198, 199, 200, 200, 200, 200,
1146 200, 201, 201, 202, 202, 202, 202, 202, 202, 202,
1147 202, 202, 202, 203, 204, 204, 205, 205, 205, 205,
1148 206, 207, 207, 207, 208, 208, 209, 209, 210, 211,
1149 211, 212, 212, 212, 212, 213, 214, 214, 215, 216,
1150 216, 217, 218, 218, 218, 219, 220, 220, 221, 221,
1151 221, 221, 221, 221, 221, 221, 221, 221, 221, 222,
1152 222, 223, 223, 224, 225, 225, 226, 227, 227, 227,
1153 228, 228, 229, 229, 229, 229, 229, 229, 229, 229,
1154 229, 230, 230, 231, 232, 232, 233, 233, 234, 234,
1155 235, 235, 236, 236, 236, 236, 236, 236, 236, 236,
1156 236, 236, 236, 236, 236, 236, 236, 236, 237, 237,
1157 238, 238, 239, 239, 239, 239, 239, 239, 239, 239
1160 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1161 static const unsigned char yyr2[] =
1163 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1164 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1165 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1166 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1167 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1168 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1169 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1170 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1171 1, 2, 0, 1, 1, 1, 1, 1, 1, 1,
1172 0, 1, 1, 1, 1, 1, 1, 2, 0, 0,
1173 2, 0, 3, 2, 0, 1, 0, 3, 1, 2,
1174 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1175 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1176 2, 4, 5, 5, 3, 2, 2, 1, 3, 1,
1177 3, 1, 0, 4, 3, 3, 4, 4, 3, 2,
1178 2, 2, 2, 2, 2, 2, 2, 2, 2, 6,
1179 5, 8, 6, 6, 6, 7, 7, 6, 6, 8,
1180 8, 3, 1, 1, 1, 1, 2, 2, 4, 2,
1181 1, 1, 1, 4, 2, 4, 6, 6, 6, 6,
1182 3, 4, 0, 1, 1, 1, 3, 3, 3, 3,
1183 3, 3, 1, 0, 1, 1, 1, 0, 2, 3,
1184 1, 1, 3, 1, 0, 8, 1, 1, 3, 1,
1185 1, 3, 0, 1, 1, 3, 0, 1, 1, 1,
1186 1, 1, 1, 1, 1, 1, 3, 1, 5, 1,
1187 1, 1, 1, 2, 2, 1, 2, 2, 0, 1,
1188 1, 1, 2, 2, 3, 9, 9, 8, 14, 1,
1189 1, 6, 5, 2, 6, 7, 1, 3, 1, 0,
1190 2, 1, 5, 5, 5, 7, 7, 2, 4, 4,
1191 6, 4, 4, 6, 6, 2, 7, 1, 2, 0,
1192 1, 0, 3, 6, 3, 6, 2, 4, 6, 4
1195 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1196 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1197 means the default is an error. */
1198 static const unsigned short int yydefact[] =
1200 192, 0, 90, 180, 1, 179, 222, 83, 84, 85,
1201 87, 88, 89, 86, 0, 98, 248, 176, 177, 204,
1202 205, 0, 0, 0, 90, 0, 184, 223, 224, 98,
1203 0, 0, 91, 92, 93, 94, 95, 96, 0, 0,
1204 249, 248, 245, 82, 0, 0, 0, 0, 190, 0,
1205 0, 0, 0, 0, 181, 182, 0, 0, 81, 225,
1206 193, 178, 97, 111, 115, 116, 117, 118, 119, 120,
1207 121, 122, 123, 124, 125, 126, 127, 2, 3, 0,
1208 0, 0, 0, 239, 0, 0, 110, 129, 114, 240,
1209 128, 216, 217, 218, 219, 220, 221, 244, 0, 0,
1210 0, 251, 250, 260, 291, 259, 246, 247, 0, 0,
1211 0, 0, 203, 191, 185, 183, 173, 174, 0, 0,
1212 0, 0, 130, 0, 0, 113, 135, 137, 0, 0,
1213 142, 136, 253, 0, 252, 0, 0, 72, 76, 71,
1214 75, 70, 74, 69, 73, 77, 78, 0, 290, 0,
1215 271, 0, 98, 6, 7, 8, 9, 10, 11, 12,
1216 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1217 23, 24, 25, 0, 0, 0, 0, 0, 0, 0,
1218 0, 52, 53, 54, 55, 0, 0, 0, 0, 68,
1219 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
1220 66, 67, 0, 0, 0, 0, 0, 98, 263, 0,
1221 287, 198, 195, 194, 196, 197, 199, 202, 0, 106,
1222 106, 115, 116, 117, 118, 119, 120, 121, 122, 123,
1223 124, 125, 0, 0, 0, 0, 106, 106, 0, 0,
1224 0, 134, 214, 141, 139, 0, 228, 229, 230, 233,
1225 234, 235, 231, 232, 226, 0, 0, 0, 0, 0,
1226 0, 0, 0, 0, 0, 0, 0, 0, 237, 242,
1227 241, 243, 0, 254, 0, 277, 270, 0, 26, 27,
1228 28, 29, 30, 31, 32, 33, 34, 35, 0, 50,
1229 51, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1230 45, 46, 47, 48, 49, 0, 101, 101, 296, 0,
1231 0, 285, 0, 0, 0, 0, 0, 0, 0, 0,
1232 0, 0, 0, 0, 0, 0, 200, 0, 188, 189,
1233 156, 157, 4, 5, 154, 155, 158, 149, 150, 153,
1234 0, 0, 0, 0, 152, 151, 186, 187, 112, 112,
1235 138, 213, 207, 210, 211, 0, 0, 131, 227, 0,
1236 0, 0, 0, 0, 0, 0, 0, 172, 0, 0,
1237 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1238 292, 0, 294, 289, 0, 0, 0, 0, 0, 0,
1239 0, 0, 0, 0, 0, 0, 0, 0, 0, 201,
1240 0, 0, 108, 106, 144, 0, 0, 148, 0, 145,
1241 132, 133, 206, 208, 0, 104, 140, 0, 0, 0,
1242 289, 0, 0, 0, 0, 0, 236, 0, 0, 0,
1243 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1244 0, 299, 0, 0, 0, 281, 282, 0, 0, 0,
1245 0, 0, 278, 279, 0, 297, 0, 103, 109, 107,
1246 143, 146, 147, 212, 209, 105, 99, 0, 0, 0,
1247 0, 0, 0, 0, 0, 171, 0, 0, 0, 0,
1248 0, 0, 0, 269, 0, 0, 101, 102, 101, 266,
1249 288, 0, 0, 0, 0, 0, 272, 273, 274, 269,
1250 0, 0, 215, 238, 0, 0, 160, 0, 0, 0,
1251 0, 0, 0, 0, 0, 0, 0, 0, 268, 0,
1252 0, 0, 0, 293, 295, 0, 0, 0, 280, 283,
1253 284, 0, 298, 100, 0, 0, 0, 168, 0, 0,
1254 162, 163, 164, 167, 159, 0, 257, 0, 0, 0,
1255 275, 276, 267, 264, 0, 286, 165, 166, 0, 0,
1256 0, 255, 0, 256, 0, 0, 265, 161, 169, 170,
1257 0, 0, 0, 0, 0, 0, 262, 0, 0, 261,
1261 /* YYDEFGOTO[NTERM-NUM]. */
1262 static const short int yydefgoto[] =
1264 -1, 83, 334, 263, 264, 265, 288, 305, 266, 267,
1265 232, 233, 147, 234, 24, 15, 38, 502, 380, 402,
1266 466, 328, 403, 84, 85, 235, 87, 88, 128, 245,
1267 367, 268, 368, 118, 1, 2, 57, 3, 61, 214,
1268 48, 113, 218, 89, 413, 353, 354, 355, 39, 93,
1269 16, 96, 17, 29, 18, 359, 269, 90, 271, 489,
1270 41, 42, 43, 105, 106, 548, 107, 311, 518, 519,
1271 207, 208, 441, 209, 210
1274 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1276 #define YYPACT_NINF -501
1277 static const short int yypact[] =
1279 -501, 82, 9, 975, -501, -501, 72, -501, -501, -501,
1280 -501, -501, -501, -501, 29, 34, 94, -501, -501, -501,
1281 -501, -28, -42, 66, 127, 25, -501, -501, -501, 34,
1282 122, 199, -501, -501, -501, -501, -501, -501, 839, -17,
1283 -501, -19, -501, 47, 67, 68, 69, 75, -501, 71,
1284 122, 839, 11, 11, -501, -501, 11, 11, -501, -501,
1285 -501, -501, -501, 76, -501, -501, -501, -501, -501, -501,
1286 -501, -501, -501, -501, -501, -501, -501, -501, -501, 207,
1287 210, 211, 518, -501, 123, 77, -501, -501, -84, -501,
1288 -501, -501, -501, -501, -501, -501, -501, -501, 876, 8,
1289 253, -501, -501, -501, 1333, -501, -501, -501, 203, 80,
1290 217, 206, 208, -501, -501, -501, -501, -501, 922, 922,
1291 960, 922, -501, 83, 84, -501, -501, -84, -134, 88,
1292 604, -501, 76, 1131, -501, 1131, 1131, -501, -501, -501,
1293 -501, -501, -501, -501, -501, -501, -501, 1131, -501, 922,
1294 -501, 177, 34, -501, -501, -501, -501, -501, -501, -501,
1295 -501, -501, -501, -501, -501, -501, -501, -501, -501, -501,
1296 -501, -501, -501, 103, 81, 922, 922, 922, 922, 922,
1297 922, -501, -501, -501, -501, 922, 922, 922, 922, -501,
1298 -501, -501, -501, -501, -501, -501, -501, -501, -501, -501,
1299 -501, -501, 922, 922, 922, 922, 922, 34, -501, 20,
1300 -501, -501, -501, -501, -501, -501, -501, -501, -44, 91,
1301 91, 130, 143, 226, 145, 227, 161, 230, 163, 231,
1302 232, 233, 165, 234, 245, 1042, 91, 91, 922, 922,
1303 922, -501, 679, -501, 99, 113, -501, -501, -501, -501,
1304 -501, -501, -501, -501, 205, 103, 81, 119, 120, 125,
1305 128, 129, 960, 133, 134, 135, 139, 140, -501, -501,
1306 -501, -501, 124, -501, 149, -501, -501, 839, -501, -501,
1307 -501, -501, -501, -501, -501, -501, -501, -501, 922, -501,
1308 -501, -501, -501, -501, -501, -501, -501, -501, -501, -501,
1309 -501, -501, -501, -501, -501, 922, 150, 151, -501, 1131,
1310 136, 153, 154, 155, 156, 157, 158, 1131, 1131, 1131,
1311 159, 241, 839, 922, 922, 251, -501, -18, -501, -501,
1312 -501, -501, -501, -501, -501, -501, -501, -501, -501, -501,
1313 717, 960, 549, 265, -501, -501, -501, -501, -69, -50,
1314 -84, -501, 123, -501, 160, 142, 763, -501, -501, 283,
1315 164, 166, 960, 960, 960, 960, 960, -501, -110, 960,
1316 960, 960, 960, 960, 302, 304, 1131, 1131, 1131, 1,
1317 -501, 12, -501, 169, 1131, 167, 922, 922, 922, 922,
1318 922, 172, 173, 176, 922, 922, 1131, 1131, 178, -501,
1319 299, 314, -501, 91, -501, -40, -68, -501, -74, -501,
1320 -501, -501, -501, -501, 801, 301, -501, 184, 960, 960,
1321 169, 187, 188, 189, 190, 960, -501, 194, 195, 201,
1322 209, 316, 1131, 1131, 204, 212, 213, 1131, 341, 1131,
1323 922, -501, 214, 1131, 215, -501, -501, 216, 220, 1131,
1324 1131, 1131, -501, -501, 219, -501, 922, -501, -501, -501,
1325 -501, -501, -501, -501, -501, -501, 303, 332, 222, 228,
1326 229, 960, 960, 960, 960, -501, 960, 960, 960, 960,
1327 922, 238, 235, 922, 1131, 1131, 240, -501, 240, -501,
1328 243, 1131, 244, 922, 922, 922, -501, -501, -501, 922,
1329 1131, 345, -501, -501, 960, 960, -501, 246, 242, 247,
1330 248, 252, 254, 255, 256, 257, 354, 26, 243, 258,
1331 259, 260, 325, -501, -501, 922, 225, 1131, -501, -501,
1332 -501, 261, -501, -501, 262, 269, 960, -501, 960, 960,
1333 -501, -501, -501, -501, -501, 1131, -501, 1220, 56, 347,
1334 -501, -501, -501, -501, 250, -501, -501, -501, 270, 271,
1335 272, -501, 249, -501, 1220, 378, -501, -501, -501, -501,
1336 391, 276, 1131, 1131, 415, 138, -501, 1131, 416, -501,
1340 /* YYPGOTO[NTERM-NUM]. */
1341 static const short int yypgoto[] =
1343 -501, -501, -501, 328, 329, 330, 181, 185, 333, 336,
1344 -98, -97, -500, -501, 400, 420, -136, -501, -300, 31,
1345 -501, -216, -501, -45, -501, -38, -501, -81, 317, -501,
1346 126, 218, -208, 74, -501, -501, -501, -501, 398, -501,
1347 -501, -501, -501, 2, -501, 35, -501, -501, 423, -501,
1348 -501, -501, -501, -501, 451, -501, -471, -106, -62, -90,
1349 -501, 417, -501, -116, -501, -501, -501, -501, 22, -39,
1350 -501, -501, 43, -501, -501
1353 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1354 positive, shift that token. If negative, reduce the rule which
1355 number is the opposite. If zero, do what YYDEFACT says.
1356 If YYTABLE_NINF, syntax error. */
1357 #define YYTABLE_NINF -176
1358 static const short int yytable[] =
1360 86, 127, 145, 146, 329, 25, 115, 382, 134, -175,
1361 40, 437, 135, 86, 94, 91, 277, 547, 240, 400,
1362 346, 347, 439, 136, 44, 45, 46, 270, 241, 270,
1363 270, 137, 138, 139, 140, 141, 142, 143, 144, 401,
1364 5, 270, 425, 6, 47, 25, 116, 117, 564, 127,
1365 426, 7, 8, 9, 10, 11, 12, 13, 438, 275,
1366 133, 137, 138, 139, 140, 141, 142, 143, 144, 438,
1367 -112, 322, 14, 272, 273, 19, 562, 20, 425, 131,
1368 219, 220, 4, 237, 425, 274, 129, 308, 462, 410,
1369 312, 30, 461, 571, 131, 313, 314, 315, 316, 31,
1370 32, 33, 34, 35, 36, 37, 289, 290, 325, 49,
1371 411, 133, 425, 131, 326, 320, 321, 27, 460, 28,
1372 98, 99, 100, 40, 101, 102, 103, 119, 50, 345,
1373 120, 121, 405, 406, 408, 212, 213, 306, 307, 133,
1374 309, 310, 133, 95, 92, 323, 324, 133, 133, 133,
1375 133, 19, 60, 20, 51, 330, 331, 348, 349, 350,
1376 -72, -72, -71, -71, 317, 318, 319, 133, 133, 7,
1377 8, 9, 52, 11, 53, 13, 58, 54, -70, -70,
1378 -69, -69, 332, 333, 546, 55, 523, 459, 524, 291,
1379 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
1380 302, 303, 304, 270, 352, 278, 279, 280, 281, 282,
1381 283, 270, 270, 270, 563, 101, 102, 62, 108, 109,
1382 110, 284, 285, 286, 287, 122, 111, 112, 123, 124,
1383 -113, 130, 376, 211, 398, 215, 216, 276, 217, 86,
1384 238, 239, 242, 327, -76, -75, 236, 383, -74, -73,
1385 377, 356, 335, -79, -80, 391, 392, 393, 137, 138,
1386 139, 140, 141, 142, 143, 144, 336, 378, 357, 358,
1387 270, 270, 270, 362, 363, 350, 374, 396, 270, 364,
1388 395, 399, 365, 366, 86, 397, 133, 369, 370, 371,
1389 270, 270, 384, 372, 373, 409, 444, 415, 446, 447,
1390 448, 375, 379, 381, 452, 385, 386, 387, 388, 389,
1391 390, 394, 414, 417, 434, 435, 436, 432, 418, 433,
1392 419, 440, 442, 443, 449, 450, 270, 270, 451, 457,
1393 456, 270, 458, 270, 454, 455, 467, 270, 400, 471,
1394 472, 473, 474, 270, 270, 270, 476, 477, 133, 445,
1395 133, 133, 133, 478, 412, 480, 133, 453, 483, 487,
1396 501, 479, 503, 533, 484, 485, 491, 493, 494, 545,
1397 481, 482, 495, 499, 504, 486, 352, 488, 270, 270,
1398 505, 492, 438, 553, 506, 270, 565, 496, 497, 498,
1399 516, 517, 522, 572, 270, 525, 527, 537, 536, 538,
1400 539, 570, 133, 528, 529, 530, 573, 540, 566, 541,
1401 542, 543, 544, 549, 550, 551, 555, 556, 500, 145,
1402 146, 270, 520, 521, 557, 567, 568, 569, 574, 526,
1403 577, 580, 202, 203, 204, 552, 360, 205, 532, 270,
1404 206, 361, 515, 104, 56, 133, 465, 244, 114, 464,
1405 145, 146, 59, 344, 26, 133, 133, 133, 97, 578,
1406 531, 133, 490, 470, 0, 554, 270, 270, 0, 0,
1407 0, 270, 0, 0, 270, 0, 0, 0, 0, 0,
1408 0, 0, 0, 561, 0, 0, 0, 133, 420, 421,
1409 422, 423, 424, 0, 0, 427, 428, 429, 430, 431,
1410 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1411 575, 576, 0, 0, 0, 579, 0, 0, 581, 0,
1412 0, 125, 64, 65, 66, 67, 68, 69, 70, 71,
1413 72, 73, 74, 75, 76, 0, 0, 77, 78, 0,
1414 0, 0, 0, 0, 468, 469, 19, 0, 20, 0,
1415 0, 475, 125, 221, 222, 223, 224, 225, 226, 227,
1416 228, 229, 230, 231, 75, 76, 0, 0, 77, 78,
1417 0, 0, 0, 0, 0, 0, 0, 19, 0, 20,
1418 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1419 0, 0, 0, 0, 0, 0, 0, 507, 508, 509,
1420 510, 0, 511, 512, 513, 514, 0, 125, 64, 65,
1421 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
1422 76, 0, 0, 77, 78, 0, 0, 0, 0, 0,
1423 534, 535, 19, 0, 20, 0, 0, 0, 0, 0,
1424 0, 0, 0, 0, 243, 0, 0, 0, 0, 0,
1425 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1426 0, 0, 558, 0, 559, 560, 0, 0, 0, 0,
1427 0, 79, 0, 0, 80, 0, 0, 81, 0, 82,
1428 126, 0, 125, 64, 65, 66, 67, 68, 69, 70,
1429 71, 72, 73, 74, 75, 76, 0, 0, 77, 78,
1430 0, 0, 79, 0, 0, 80, 0, 19, 81, 20,
1431 82, 407, 0, 0, 0, 0, 0, 0, 0, 351,
1432 125, 221, 222, 223, 224, 225, 226, 227, 228, 229,
1433 230, 231, 75, 76, 0, 0, 77, 78, 0, 0,
1434 0, 0, 0, 0, 0, 19, 0, 20, 0, 0,
1435 0, 0, 0, 0, 0, 0, 0, 79, 0, 0,
1436 80, 0, 0, 81, 0, 82, 125, 64, 65, 66,
1437 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
1438 0, 0, 77, 78, 0, 0, 0, 0, 0, 0,
1439 0, 19, 0, 20, 0, 0, 0, 0, 0, 0,
1440 0, 0, 0, 416, 125, 64, 65, 66, 67, 68,
1441 69, 70, 71, 72, 73, 74, 75, 76, 0, 0,
1442 77, 78, 0, 0, 0, 0, 0, 0, 0, 19,
1443 0, 20, 79, 0, 0, 80, 0, 0, 81, 0,
1444 82, 463, 63, 64, 65, 66, 67, 68, 69, 70,
1445 71, 72, 73, 74, 75, 76, 0, 0, 77, 78,
1446 0, 0, 0, 0, 0, 0, 0, 19, 0, 20,
1447 79, 0, 0, 80, 0, 404, 81, 0, 82, 132,
1448 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
1449 74, 75, 76, 0, 0, 77, 78, 0, 0, 0,
1450 0, 0, 0, 0, 19, 0, 20, 0, 0, 0,
1451 0, 0, 0, 0, 0, 0, 79, 0, 0, 80,
1452 0, 0, 81, 0, 82, 125, 64, 65, 66, 67,
1453 68, 69, 70, 71, 72, 73, 74, 75, 76, 0,
1454 0, 77, 78, 0, 0, 0, 0, 0, 0, 0,
1455 19, 0, 20, 0, 79, 0, 0, 80, 0, 0,
1456 81, 0, 82, 125, 221, 222, 223, 224, 225, 226,
1457 227, 228, 229, 230, 231, 75, 76, 0, 0, 77,
1458 78, 0, 0, 0, 0, 0, 0, 0, 19, 0,
1459 20, 0, 79, 0, 0, 80, 0, 0, 81, 0,
1460 82, 0, -82, 19, 0, 20, 0, 0, 0, 6,
1461 -82, -82, 0, 0, 0, 0, 0, -82, -82, -82,
1462 -82, -82, -82, -82, 0, -82, 21, 0, 0, 79,
1463 0, 0, 80, -82, 22, 81, 0, 82, 23, 0,
1464 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1465 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1466 0, 77, 78, 0, 337, 338, 339, 0, 0, 0,
1467 19, 0, 20, 0, 0, 79, 0, 0, 80, 0,
1468 0, 81, 0, 82, 0, 0, 0, 0, 0, 0,
1469 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1470 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1471 0, 0, 0, 79, 0, 0, 80, 0, 0, 81,
1472 0, 82, 153, 154, 155, 156, 157, 158, 159, 160,
1473 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
1474 171, 172, 255, 256, 0, 0, 0, 0, 246, 247,
1475 77, 78, 248, 249, 250, 251, 252, 253, 0, 19,
1476 0, 20, 0, 0, 0, 0, 0, 0, 0, 257,
1477 0, 258, 181, 182, 183, 184, 0, 259, 260, 261,
1478 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
1479 199, 200, 201, 254, 0, 0, 0, 0, 340, 0,
1480 0, 341, 0, 342, 0, 0, 343, 0, 0, 0,
1481 0, 153, 154, 155, 156, 157, 158, 159, 160, 161,
1482 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
1483 172, 255, 256, 0, 0, 0, 0, 246, 247, 0,
1484 0, 248, 249, 250, 251, 252, 253, 0, 0, 0,
1485 0, 0, 0, 0, 0, 0, 0, 0, 257, 0,
1486 258, 181, 182, 183, 184, 0, 259, 260, 261, 189,
1487 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
1488 200, 201, 254, 0, 0, 0, 0, 0, 0, 0,
1489 262, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1490 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
1491 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
1492 255, 256, 0, 0, 0, 0, 0, 0, 0, 0,
1493 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1494 0, 0, 0, 0, 0, 0, 0, 257, 0, 258,
1495 181, 182, 183, 184, 0, 259, 260, 261, 189, 190,
1496 191, 192, 193, 194, 195, 196, 197, 198, 199, 200,
1497 201, 148, 0, 0, 0, 0, 0, 0, 0, 262,
1498 0, 0, 149, 0, 0, 0, 0, 0, 0, 0,
1499 0, 0, 0, 150, 151, 0, 0, 0, 0, 0,
1500 0, 0, 0, 0, 0, 0, 0, 0, 0, 152,
1501 0, 0, 0, 153, 154, 155, 156, 157, 158, 159,
1502 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
1503 170, 171, 172, 173, 174, 0, 0, 0, 0, 0,
1504 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1505 0, 0, 0, 0, 0, 175, 176, 177, 0, 0,
1506 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
1507 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
1511 static const short int yycheck[] =
1513 38, 82, 100, 100, 220, 3, 51, 307, 98, 0,
1514 29, 10, 4, 51, 33, 32, 152, 517, 152, 37,
1515 236, 237, 10, 15, 52, 53, 54, 133, 162, 135,
1516 136, 5, 6, 7, 8, 9, 10, 11, 12, 57,
1517 31, 147, 152, 34, 72, 43, 35, 36, 548, 130,
1518 160, 42, 43, 44, 45, 46, 47, 48, 57, 149,
1519 98, 5, 6, 7, 8, 9, 10, 11, 12, 57,
1520 154, 207, 63, 135, 136, 28, 547, 30, 152, 163,
1521 118, 119, 0, 121, 152, 147, 84, 177, 162, 158,
1522 180, 62, 160, 564, 163, 185, 186, 187, 188, 65,
1523 66, 67, 68, 69, 70, 71, 25, 26, 152, 151,
1524 160, 149, 152, 163, 158, 205, 206, 45, 158, 47,
1525 73, 74, 75, 29, 77, 78, 79, 53, 62, 235,
1526 56, 57, 340, 341, 342, 55, 56, 175, 176, 177,
1527 178, 179, 180, 162, 161, 125, 126, 185, 186, 187,
1528 188, 28, 30, 30, 27, 25, 26, 238, 239, 240,
1529 17, 18, 17, 18, 202, 203, 204, 205, 206, 42,
1530 43, 44, 45, 46, 47, 48, 151, 50, 17, 18,
1531 17, 18, 17, 18, 158, 58, 486, 403, 488, 108,
1532 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
1533 119, 120, 121, 309, 242, 102, 103, 104, 105, 106,
1534 107, 317, 318, 319, 158, 77, 78, 18, 151, 151,
1535 151, 118, 119, 120, 121, 18, 151, 156, 18, 18,
1536 154, 154, 277, 30, 324, 18, 30, 60, 30, 277,
1537 157, 157, 154, 152, 18, 18, 120, 309, 18, 18,
1538 288, 152, 18, 21, 21, 317, 318, 319, 5, 6,
1539 7, 8, 9, 10, 11, 12, 21, 305, 155, 64,
1540 376, 377, 378, 154, 154, 356, 152, 322, 384, 154,
1541 39, 30, 154, 154, 322, 323, 324, 154, 154, 154,
1542 396, 397, 156, 154, 154, 30, 386, 155, 388, 389,
1543 390, 152, 152, 152, 394, 152, 152, 152, 152, 152,
1544 152, 152, 152, 30, 376, 377, 378, 15, 154, 15,
1545 154, 152, 384, 156, 152, 152, 432, 433, 152, 30,
1546 152, 437, 18, 439, 396, 397, 152, 443, 37, 152,
1547 152, 152, 152, 449, 450, 451, 152, 152, 386, 387,
1548 388, 389, 390, 152, 352, 39, 394, 395, 154, 18,
1549 57, 152, 30, 18, 152, 152, 152, 152, 152, 15,
1550 432, 433, 152, 154, 152, 437, 414, 439, 484, 485,
1551 152, 443, 57, 158, 155, 491, 39, 449, 450, 451,
1552 152, 156, 152, 15, 500, 152, 152, 155, 152, 152,
1553 152, 152, 440, 493, 494, 495, 15, 155, 158, 155,
1554 155, 155, 155, 155, 155, 155, 155, 155, 456, 517,
1555 517, 527, 484, 485, 155, 155, 155, 155, 152, 491,
1556 15, 15, 104, 104, 104, 525, 255, 104, 500, 545,
1557 104, 256, 480, 43, 24, 483, 415, 130, 50, 414,
1558 548, 548, 29, 235, 3, 493, 494, 495, 41, 575,
1559 499, 499, 440, 420, -1, 527, 572, 573, -1, -1,
1560 -1, 577, -1, -1, 580, -1, -1, -1, -1, -1,
1561 -1, -1, -1, 545, -1, -1, -1, 525, 362, 363,
1562 364, 365, 366, -1, -1, 369, 370, 371, 372, 373,
1563 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1564 572, 573, -1, -1, -1, 577, -1, -1, 580, -1,
1565 -1, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1566 12, 13, 14, 15, 16, -1, -1, 19, 20, -1,
1567 -1, -1, -1, -1, 418, 419, 28, -1, 30, -1,
1568 -1, 425, 3, 4, 5, 6, 7, 8, 9, 10,
1569 11, 12, 13, 14, 15, 16, -1, -1, 19, 20,
1570 -1, -1, -1, -1, -1, -1, -1, 28, -1, 30,
1571 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1572 -1, -1, -1, -1, -1, -1, -1, 471, 472, 473,
1573 474, -1, 476, 477, 478, 479, -1, 3, 4, 5,
1574 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1575 16, -1, -1, 19, 20, -1, -1, -1, -1, -1,
1576 504, 505, 28, -1, 30, -1, -1, -1, -1, -1,
1577 -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
1578 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1579 -1, -1, 536, -1, 538, 539, -1, -1, -1, -1,
1580 -1, 153, -1, -1, 156, -1, -1, 159, -1, 161,
1581 162, -1, 3, 4, 5, 6, 7, 8, 9, 10,
1582 11, 12, 13, 14, 15, 16, -1, -1, 19, 20,
1583 -1, -1, 153, -1, -1, 156, -1, 28, 159, 30,
1584 161, 162, -1, -1, -1, -1, -1, -1, -1, 40,
1585 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1586 13, 14, 15, 16, -1, -1, 19, 20, -1, -1,
1587 -1, -1, -1, -1, -1, 28, -1, 30, -1, -1,
1588 -1, -1, -1, -1, -1, -1, -1, 153, -1, -1,
1589 156, -1, -1, 159, -1, 161, 3, 4, 5, 6,
1590 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1591 -1, -1, 19, 20, -1, -1, -1, -1, -1, -1,
1592 -1, 28, -1, 30, -1, -1, -1, -1, -1, -1,
1593 -1, -1, -1, 40, 3, 4, 5, 6, 7, 8,
1594 9, 10, 11, 12, 13, 14, 15, 16, -1, -1,
1595 19, 20, -1, -1, -1, -1, -1, -1, -1, 28,
1596 -1, 30, 153, -1, -1, 156, -1, -1, 159, -1,
1597 161, 40, 3, 4, 5, 6, 7, 8, 9, 10,
1598 11, 12, 13, 14, 15, 16, -1, -1, 19, 20,
1599 -1, -1, -1, -1, -1, -1, -1, 28, -1, 30,
1600 153, -1, -1, 156, -1, 158, 159, -1, 161, 3,
1601 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1602 14, 15, 16, -1, -1, 19, 20, -1, -1, -1,
1603 -1, -1, -1, -1, 28, -1, 30, -1, -1, -1,
1604 -1, -1, -1, -1, -1, -1, 153, -1, -1, 156,
1605 -1, -1, 159, -1, 161, 3, 4, 5, 6, 7,
1606 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
1607 -1, 19, 20, -1, -1, -1, -1, -1, -1, -1,
1608 28, -1, 30, -1, 153, -1, -1, 156, -1, -1,
1609 159, -1, 161, 3, 4, 5, 6, 7, 8, 9,
1610 10, 11, 12, 13, 14, 15, 16, -1, -1, 19,
1611 20, -1, -1, -1, -1, -1, -1, -1, 28, -1,
1612 30, -1, 153, -1, -1, 156, -1, -1, 159, -1,
1613 161, -1, 27, 28, -1, 30, -1, -1, -1, 34,
1614 35, 36, -1, -1, -1, -1, -1, 42, 43, 44,
1615 45, 46, 47, 48, -1, 50, 51, -1, -1, 153,
1616 -1, -1, 156, 58, 59, 159, -1, 161, 63, -1,
1617 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1618 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1619 -1, 19, 20, -1, 22, 23, 24, -1, -1, -1,
1620 28, -1, 30, -1, -1, 153, -1, -1, 156, -1,
1621 -1, 159, -1, 161, -1, -1, -1, -1, -1, -1,
1622 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1623 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1624 -1, -1, -1, 153, -1, -1, 156, -1, -1, 159,
1625 -1, 161, 80, 81, 82, 83, 84, 85, 86, 87,
1626 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
1627 98, 99, 100, 101, -1, -1, -1, -1, 17, 18,
1628 19, 20, 21, 22, 23, 24, 25, 26, -1, 28,
1629 -1, 30, -1, -1, -1, -1, -1, -1, -1, 127,
1630 -1, 129, 130, 131, 132, 133, -1, 135, 136, 137,
1631 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
1632 148, 149, 150, 62, -1, -1, -1, -1, 156, -1,
1633 -1, 159, -1, 161, -1, -1, 164, -1, -1, -1,
1634 -1, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1635 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
1636 99, 100, 101, -1, -1, -1, -1, 17, 18, -1,
1637 -1, 21, 22, 23, 24, 25, 26, -1, -1, -1,
1638 -1, -1, -1, -1, -1, -1, -1, -1, 127, -1,
1639 129, 130, 131, 132, 133, -1, 135, 136, 137, 138,
1640 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
1641 149, 150, 62, -1, -1, -1, -1, -1, -1, -1,
1642 159, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1643 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
1644 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
1645 100, 101, -1, -1, -1, -1, -1, -1, -1, -1,
1646 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1647 -1, -1, -1, -1, -1, -1, -1, 127, -1, 129,
1648 130, 131, 132, 133, -1, 135, 136, 137, 138, 139,
1649 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
1650 150, 38, -1, -1, -1, -1, -1, -1, -1, 159,
1651 -1, -1, 49, -1, -1, -1, -1, -1, -1, -1,
1652 -1, -1, -1, 60, 61, -1, -1, -1, -1, -1,
1653 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
1654 -1, -1, -1, 80, 81, 82, 83, 84, 85, 86,
1655 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
1656 97, 98, 99, 100, 101, -1, -1, -1, -1, -1,
1657 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1658 -1, -1, -1, -1, -1, 122, 123, 124, -1, -1,
1659 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
1660 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
1664 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1665 symbol of state STATE-NUM. */
1666 static const unsigned char yystos[] =
1668 0, 199, 200, 202, 0, 31, 34, 42, 43, 44,
1669 45, 46, 47, 48, 63, 180, 215, 217, 219, 28,
1670 30, 51, 59, 63, 179, 208, 219, 45, 47, 218,
1671 62, 65, 66, 67, 68, 69, 70, 71, 181, 213,
1672 29, 225, 226, 227, 52, 53, 54, 72, 205, 151,
1673 62, 27, 45, 47, 50, 58, 180, 201, 151, 213,
1674 30, 203, 18, 3, 4, 5, 6, 7, 8, 9,
1675 10, 11, 12, 13, 14, 15, 16, 19, 20, 153,
1676 156, 159, 161, 166, 188, 189, 190, 191, 192, 208,
1677 222, 32, 161, 214, 33, 162, 216, 226, 73, 74,
1678 75, 77, 78, 79, 179, 228, 229, 231, 151, 151,
1679 151, 151, 156, 206, 203, 188, 35, 36, 198, 198,
1680 198, 198, 18, 18, 18, 3, 162, 192, 193, 208,
1681 154, 163, 3, 190, 224, 4, 15, 5, 6, 7,
1682 8, 9, 10, 11, 12, 175, 176, 177, 38, 49,
1683 60, 61, 76, 80, 81, 82, 83, 84, 85, 86,
1684 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
1685 97, 98, 99, 100, 101, 122, 123, 124, 127, 128,
1686 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
1687 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
1688 149, 150, 168, 169, 170, 173, 174, 235, 236, 238,
1689 239, 30, 55, 56, 204, 18, 30, 30, 207, 190,
1690 190, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1691 13, 14, 175, 176, 178, 190, 195, 190, 157, 157,
1692 152, 162, 154, 40, 193, 194, 17, 18, 21, 22,
1693 23, 24, 25, 26, 62, 100, 101, 127, 129, 135,
1694 136, 137, 159, 168, 169, 170, 173, 174, 196, 221,
1695 222, 223, 223, 223, 223, 224, 60, 181, 102, 103,
1696 104, 105, 106, 107, 118, 119, 120, 121, 171, 25,
1697 26, 108, 109, 110, 111, 112, 113, 114, 115, 116,
1698 117, 118, 119, 120, 121, 172, 190, 190, 224, 190,
1699 190, 232, 224, 224, 224, 224, 224, 190, 190, 190,
1700 224, 224, 181, 125, 126, 152, 158, 152, 186, 186,
1701 25, 26, 17, 18, 167, 18, 21, 22, 23, 24,
1702 156, 159, 161, 164, 196, 222, 186, 186, 192, 192,
1703 192, 40, 190, 210, 211, 212, 152, 155, 64, 220,
1704 171, 172, 154, 154, 154, 154, 154, 195, 197, 154,
1705 154, 154, 154, 154, 152, 152, 188, 190, 190, 152,
1706 183, 152, 183, 223, 156, 152, 152, 152, 152, 152,
1707 152, 223, 223, 223, 152, 39, 188, 190, 224, 30,
1708 37, 57, 184, 187, 158, 197, 197, 162, 197, 30,
1709 158, 160, 208, 209, 152, 155, 40, 30, 154, 154,
1710 195, 195, 195, 195, 195, 152, 160, 195, 195, 195,
1711 195, 195, 15, 15, 223, 223, 223, 10, 57, 10,
1712 152, 237, 223, 156, 224, 190, 224, 224, 224, 152,
1713 152, 152, 224, 190, 223, 223, 152, 30, 18, 186,
1714 158, 160, 162, 40, 210, 184, 185, 152, 195, 195,
1715 237, 152, 152, 152, 152, 195, 152, 152, 152, 152,
1716 39, 223, 223, 154, 152, 152, 223, 18, 223, 224,
1717 233, 152, 223, 152, 152, 152, 223, 223, 223, 154,
1718 190, 57, 182, 30, 152, 152, 155, 195, 195, 195,
1719 195, 195, 195, 195, 195, 190, 152, 156, 233, 234,
1720 223, 223, 152, 183, 183, 152, 223, 152, 224, 224,
1721 224, 234, 223, 18, 195, 195, 152, 155, 152, 152,
1722 155, 155, 155, 155, 155, 15, 158, 177, 230, 155,
1723 155, 155, 224, 158, 223, 155, 155, 155, 195, 195,
1724 195, 223, 221, 158, 177, 39, 158, 155, 155, 155,
1725 152, 221, 15, 15, 152, 223, 223, 15, 228, 223,
1729 #define yyerrok (yyerrstatus = 0)
1730 #define yyclearin (yychar = YYEMPTY)
1731 #define YYEMPTY (-2)
1734 #define YYACCEPT goto yyacceptlab
1735 #define YYABORT goto yyabortlab
1736 #define YYERROR goto yyerrorlab
1739 /* Like YYERROR except do call yyerror. This remains here temporarily
1740 to ease the transition to the new meaning of YYERROR, for GCC.
1741 Once GCC version 2 has supplanted version 1, this can go. */
1743 #define YYFAIL goto yyerrlab
1745 #define YYRECOVERING() (!!yyerrstatus)
1747 #define YYBACKUP(Token, Value) \
1749 if (yychar == YYEMPTY && yylen == 1) \
1753 yytoken = YYTRANSLATE (yychar); \
1759 yyerror (YY_("syntax error: cannot back up")); \
1766 #define YYERRCODE 256
1769 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1770 If N is 0, then set CURRENT to the empty location which ends
1771 the previous symbol: RHS[0] (always defined). */
1773 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1774 #ifndef YYLLOC_DEFAULT
1775 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1779 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1780 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1781 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1782 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1786 (Current).first_line = (Current).last_line = \
1787 YYRHSLOC (Rhs, 0).last_line; \
1788 (Current).first_column = (Current).last_column = \
1789 YYRHSLOC (Rhs, 0).last_column; \
1795 /* YY_LOCATION_PRINT -- Print the location on the stream.
1796 This macro was not mandated originally: define only if we know
1797 we won't break user code: when these are the locations we know. */
1799 #ifndef YY_LOCATION_PRINT
1800 # if YYLTYPE_IS_TRIVIAL
1801 # define YY_LOCATION_PRINT(File, Loc) \
1802 fprintf (File, "%d.%d-%d.%d", \
1803 (Loc).first_line, (Loc).first_column, \
1804 (Loc).last_line, (Loc).last_column)
1806 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1811 /* YYLEX -- calling `yylex' with the right arguments. */
1814 # define YYLEX yylex (YYLEX_PARAM)
1816 # define YYLEX yylex ()
1819 /* Enable debugging if requested. */
1823 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1824 # define YYFPRINTF fprintf
1827 # define YYDPRINTF(Args) \
1833 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1837 YYFPRINTF (stderr, "%s ", Title); \
1838 yysymprint (stderr, \
1840 YYFPRINTF (stderr, "\n"); \
1844 /*------------------------------------------------------------------.
1845 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1847 `------------------------------------------------------------------*/
1849 #if defined (__STDC__) || defined (__cplusplus)
1851 yy_stack_print (short int *bottom, short int *top)
1854 yy_stack_print (bottom, top)
1859 YYFPRINTF (stderr, "Stack now");
1860 for (/* Nothing. */; bottom <= top; ++bottom)
1861 YYFPRINTF (stderr, " %d", *bottom);
1862 YYFPRINTF (stderr, "\n");
1865 # define YY_STACK_PRINT(Bottom, Top) \
1868 yy_stack_print ((Bottom), (Top)); \
1872 /*------------------------------------------------.
1873 | Report that the YYRULE is going to be reduced. |
1874 `------------------------------------------------*/
1876 #if defined (__STDC__) || defined (__cplusplus)
1878 yy_reduce_print (int yyrule)
1881 yy_reduce_print (yyrule)
1886 unsigned long int yylno = yyrline[yyrule];
1887 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
1889 /* Print the symbols being reduced, and their result. */
1890 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
1891 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1892 YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
1895 # define YY_REDUCE_PRINT(Rule) \
1898 yy_reduce_print (Rule); \
1901 /* Nonzero means print parse trace. It is left uninitialized so that
1902 multiple parsers can coexist. */
1904 #else /* !YYDEBUG */
1905 # define YYDPRINTF(Args)
1906 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1907 # define YY_STACK_PRINT(Bottom, Top)
1908 # define YY_REDUCE_PRINT(Rule)
1909 #endif /* !YYDEBUG */
1912 /* YYINITDEPTH -- initial size of the parser's stacks. */
1914 # define YYINITDEPTH 200
1917 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1918 if the built-in stack extension method is used).
1920 Do not make this value too large; the results are undefined if
1921 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1922 evaluated with infinite-precision integer arithmetic. */
1925 # define YYMAXDEPTH 10000
1933 # if defined (__GLIBC__) && defined (_STRING_H)
1934 # define yystrlen strlen
1936 /* Return the length of YYSTR. */
1938 # if defined (__STDC__) || defined (__cplusplus)
1939 yystrlen (const char *yystr)
1945 const char *yys = yystr;
1947 while (*yys++ != '\0')
1950 return yys - yystr - 1;
1956 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1957 # define yystpcpy stpcpy
1959 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1962 # if defined (__STDC__) || defined (__cplusplus)
1963 yystpcpy (char *yydest, const char *yysrc)
1965 yystpcpy (yydest, yysrc)
1971 const char *yys = yysrc;
1973 while ((*yyd++ = *yys++) != '\0')
1982 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1983 quotes and backslashes, so that it's suitable for yyerror. The
1984 heuristic is that double-quoting is unnecessary unless the string
1985 contains an apostrophe, a comma, or backslash (other than
1986 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1987 null, do not copy; instead, return the length of what the result
1990 yytnamerr (char *yyres, const char *yystr)
1995 char const *yyp = yystr;
2002 goto do_not_strip_quotes;
2006 goto do_not_strip_quotes;
2019 do_not_strip_quotes: ;
2023 return yystrlen (yystr);
2025 return yystpcpy (yyres, yystr) - yyres;
2029 #endif /* YYERROR_VERBOSE */
2034 /*--------------------------------.
2035 | Print this symbol on YYOUTPUT. |
2036 `--------------------------------*/
2038 #if defined (__STDC__) || defined (__cplusplus)
2040 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
2043 yysymprint (yyoutput, yytype, yyvaluep)
2049 /* Pacify ``unused variable'' warnings. */
2052 if (yytype < YYNTOKENS)
2053 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
2055 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
2059 if (yytype < YYNTOKENS)
2060 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
2067 YYFPRINTF (yyoutput, ")");
2070 #endif /* ! YYDEBUG */
2071 /*-----------------------------------------------.
2072 | Release the memory associated to this symbol. |
2073 `-----------------------------------------------*/
2075 #if defined (__STDC__) || defined (__cplusplus)
2077 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
2080 yydestruct (yymsg, yytype, yyvaluep)
2086 /* Pacify ``unused variable'' warnings. */
2091 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2102 /* Prevent warnings from -Wmissing-prototypes. */
2104 #ifdef YYPARSE_PARAM
2105 # if defined (__STDC__) || defined (__cplusplus)
2106 int yyparse (void *YYPARSE_PARAM);
2110 #else /* ! YYPARSE_PARAM */
2111 #if defined (__STDC__) || defined (__cplusplus)
2116 #endif /* ! YYPARSE_PARAM */
2120 /* The look-ahead symbol. */
2123 /* The semantic value of the look-ahead symbol. */
2126 /* Number of syntax errors so far. */
2135 #ifdef YYPARSE_PARAM
2136 # if defined (__STDC__) || defined (__cplusplus)
2137 int yyparse (void *YYPARSE_PARAM)
2139 int yyparse (YYPARSE_PARAM)
2140 void *YYPARSE_PARAM;
2142 #else /* ! YYPARSE_PARAM */
2143 #if defined (__STDC__) || defined (__cplusplus)
2157 /* Number of tokens to shift before error messages enabled. */
2159 /* Look-ahead token as an internal (translated) token number. */
2162 /* Three stacks and their tools:
2163 `yyss': related to states,
2164 `yyvs': related to semantic values,
2165 `yyls': related to locations.
2167 Refer to the stacks thru separate pointers, to allow yyoverflow
2168 to reallocate them elsewhere. */
2170 /* The state stack. */
2171 short int yyssa[YYINITDEPTH];
2172 short int *yyss = yyssa;
2175 /* The semantic value stack. */
2176 YYSTYPE yyvsa[YYINITDEPTH];
2177 YYSTYPE *yyvs = yyvsa;
2182 #define YYPOPSTACK (yyvsp--, yyssp--)
2184 YYSIZE_T yystacksize = YYINITDEPTH;
2186 /* The variables used to return semantic value and location from the
2191 /* When reducing, the number of symbols on the RHS of the reduced
2195 YYDPRINTF ((stderr, "Starting parse\n"));
2200 yychar = YYEMPTY; /* Cause a token to be read. */
2202 /* Initialize stack pointers.
2203 Waste one element of value and location stack
2204 so that they stay on the same level as the state stack.
2205 The wasted elements are never initialized. */
2212 /*------------------------------------------------------------.
2213 | yynewstate -- Push a new state, which is found in yystate. |
2214 `------------------------------------------------------------*/
2216 /* In all cases, when you get here, the value and location stacks
2217 have just been pushed. so pushing a state here evens the stacks.
2224 if (yyss + yystacksize - 1 <= yyssp)
2226 /* Get the current used size of the three stacks, in elements. */
2227 YYSIZE_T yysize = yyssp - yyss + 1;
2231 /* Give user a chance to reallocate the stack. Use copies of
2232 these so that the &'s don't force the real ones into
2234 YYSTYPE *yyvs1 = yyvs;
2235 short int *yyss1 = yyss;
2238 /* Each stack pointer address is followed by the size of the
2239 data in use in that stack, in bytes. This used to be a
2240 conditional around just the two extra args, but that might
2241 be undefined if yyoverflow is a macro. */
2242 yyoverflow (YY_("memory exhausted"),
2243 &yyss1, yysize * sizeof (*yyssp),
2244 &yyvs1, yysize * sizeof (*yyvsp),
2251 #else /* no yyoverflow */
2252 # ifndef YYSTACK_RELOCATE
2253 goto yyexhaustedlab;
2255 /* Extend the stack our own way. */
2256 if (YYMAXDEPTH <= yystacksize)
2257 goto yyexhaustedlab;
2259 if (YYMAXDEPTH < yystacksize)
2260 yystacksize = YYMAXDEPTH;
2263 short int *yyss1 = yyss;
2264 union yyalloc *yyptr =
2265 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2267 goto yyexhaustedlab;
2268 YYSTACK_RELOCATE (yyss);
2269 YYSTACK_RELOCATE (yyvs);
2271 # undef YYSTACK_RELOCATE
2273 YYSTACK_FREE (yyss1);
2276 #endif /* no yyoverflow */
2278 yyssp = yyss + yysize - 1;
2279 yyvsp = yyvs + yysize - 1;
2282 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2283 (unsigned long int) yystacksize));
2285 if (yyss + yystacksize - 1 <= yyssp)
2289 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2298 /* Do appropriate processing given the current state. */
2299 /* Read a look-ahead token if we need one and don't already have one. */
2302 /* First try to decide what to do without reference to look-ahead token. */
2304 yyn = yypact[yystate];
2305 if (yyn == YYPACT_NINF)
2308 /* Not known => get a look-ahead token if don't already have one. */
2310 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
2311 if (yychar == YYEMPTY)
2313 YYDPRINTF ((stderr, "Reading a token: "));
2317 if (yychar <= YYEOF)
2319 yychar = yytoken = YYEOF;
2320 YYDPRINTF ((stderr, "Now at end of input.\n"));
2324 yytoken = YYTRANSLATE (yychar);
2325 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2328 /* If the proper action on seeing token YYTOKEN is to reduce or to
2329 detect an error, take that action. */
2331 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2336 if (yyn == 0 || yyn == YYTABLE_NINF)
2345 /* Shift the look-ahead token. */
2346 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2348 /* Discard the token being shifted unless it is eof. */
2349 if (yychar != YYEOF)
2355 /* Count tokens shifted since error; after three, turn off error
2364 /*-----------------------------------------------------------.
2365 | yydefault -- do the default action for the current state. |
2366 `-----------------------------------------------------------*/
2368 yyn = yydefact[yystate];
2374 /*-----------------------------.
2375 | yyreduce -- Do a reduction. |
2376 `-----------------------------*/
2378 /* yyn is the number of a rule to reduce with. */
2381 /* If YYLEN is nonzero, implement the default value of the action:
2384 Otherwise, the following line sets YYVAL to garbage.
2385 This behavior is undocumented and Bison
2386 users should not rely upon it. Assigning to YYVAL
2387 unconditionally makes the parser a bit smaller, and it avoids a
2388 GCC warning that YYVAL may be used uninitialized. */
2389 yyval = yyvsp[1-yylen];
2392 YY_REDUCE_PRINT (yyn);
2396 #line 358 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2398 (yyval.String) = (yyvsp[-1].String);
2403 #line 361 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2405 (yyval.String) = new std::string("");
2410 #line 368 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2411 { (yyval.String) = new std::string(""); ;}
2415 #line 373 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2417 *(yyvsp[-1].String) += *(yyvsp[0].String);
2418 delete (yyvsp[0].String);
2419 (yyval.String) = (yyvsp[-1].String);
2424 #line 378 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2425 { (yyval.String) = new std::string(""); ;}
2429 #line 383 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2430 { (yyval.String) = new std::string(); ;}
2434 #line 384 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2435 { *(yyvsp[-1].String) += " " + *(yyvsp[0].String); delete (yyvsp[0].String); (yyval.String) = (yyvsp[-1].String); ;}
2439 #line 387 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2440 { (yyval.String) = new std::string(); ;}
2444 #line 388 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2446 (yyvsp[-1].String)->insert(0, ", ");
2447 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2448 delete (yyvsp[0].String);
2449 (yyval.String) = (yyvsp[-1].String);
2454 #line 396 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2456 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2457 delete (yyvsp[0].String);
2458 (yyval.String) = (yyvsp[-1].String);
2463 #line 402 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2464 { (yyval.String) = new std::string(); ;}
2468 #line 406 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2469 { (yyval.String) = new std::string(); ;}
2473 #line 407 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2475 (yyvsp[-1].String)->insert(0, ", ");
2476 if (!(yyvsp[0].String)->empty())
2477 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2478 delete (yyvsp[0].String);
2479 (yyval.String) = (yyvsp[-1].String);
2484 #line 417 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2486 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2487 delete (yyvsp[0].String);
2488 (yyval.String) = (yyvsp[-1].String);
2493 #line 439 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2495 (yyval.Type).newTy = (yyvsp[0].String);
2496 (yyval.Type).oldTy = OpaqueTy;
2501 #line 443 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2503 (yyval.Type).newTy = (yyvsp[0].String);
2504 (yyval.Type).oldTy = UnresolvedTy;
2509 #line 447 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2511 (yyval.Type) = (yyvsp[0].Type);
2516 #line 450 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2517 { // Type UpReference
2518 (yyvsp[0].String)->insert(0, "\\");
2519 (yyval.Type).newTy = (yyvsp[0].String);
2520 (yyval.Type).oldTy = NumericTy;
2525 #line 455 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2526 { // Function derived type?
2527 *(yyvsp[-3].Type).newTy += "( " + *(yyvsp[-1].String) + " )";
2528 delete (yyvsp[-1].String);
2529 (yyval.Type).newTy = (yyvsp[-3].Type).newTy;
2530 (yyval.Type).oldTy = FunctionTy;
2535 #line 461 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2536 { // Sized array type?
2537 (yyvsp[-3].String)->insert(0,"[ ");
2538 *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " ]";
2539 delete (yyvsp[-1].Type).newTy;
2540 (yyval.Type).newTy = (yyvsp[-3].String);
2541 (yyval.Type).oldTy = ArrayTy;
2542 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2547 #line 469 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2548 { // Packed array type?
2549 (yyvsp[-3].String)->insert(0,"< ");
2550 *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " >";
2551 delete (yyvsp[-1].Type).newTy;
2552 (yyval.Type).newTy = (yyvsp[-3].String);
2553 (yyval.Type).oldTy = PackedTy;
2554 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2559 #line 477 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2560 { // Structure type?
2561 (yyvsp[-1].String)->insert(0, "{ ");
2562 *(yyvsp[-1].String) += " }";
2563 (yyval.Type).newTy = (yyvsp[-1].String);
2564 (yyval.Type).oldTy = StructTy;
2569 #line 483 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2570 { // Empty structure type?
2571 (yyval.Type).newTy = new std::string("{}");
2572 (yyval.Type).oldTy = StructTy;
2577 #line 487 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2579 *(yyvsp[-1].Type).newTy += '*';
2580 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2581 (yyvsp[-1].Type).oldTy = PointerTy;
2582 (yyval.Type) = (yyvsp[-1].Type);
2587 #line 498 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2589 (yyval.String) = (yyvsp[0].Type).newTy;
2594 #line 501 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2596 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Type).newTy;
2597 delete (yyvsp[0].Type).newTy;
2598 (yyval.String) = (yyvsp[-2].String);
2603 #line 510 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2605 *(yyvsp[-2].String) += ", ...";
2606 delete (yyvsp[0].String);
2607 (yyval.String) = (yyvsp[-2].String);
2612 #line 515 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2614 (yyval.String) = (yyvsp[0].String);
2619 #line 518 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2621 (yyval.String) = new std::string();
2626 #line 528 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2627 { // Nonempty unsized arr
2628 (yyval.Const).type = (yyvsp[-3].Type);
2629 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2630 *(yyval.Const).cnst += " [ " + *(yyvsp[-1].String) + " ]";
2631 delete (yyvsp[-1].String);
2636 #line 534 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2638 (yyval.Const).type = (yyvsp[-2].Type);
2639 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2640 *(yyval.Const).cnst += "[ ]";
2645 #line 539 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2647 (yyval.Const).type = (yyvsp[-2].Type);
2648 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2649 *(yyval.Const).cnst += " c" + *(yyvsp[0].String);
2650 delete (yyvsp[0].String);
2655 #line 545 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2656 { // Nonempty unsized arr
2657 (yyval.Const).type = (yyvsp[-3].Type);
2658 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2659 *(yyval.Const).cnst += " < " + *(yyvsp[-1].String) + " >";
2660 delete (yyvsp[-1].String);
2665 #line 551 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2667 (yyval.Const).type = (yyvsp[-3].Type);
2668 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2669 *(yyval.Const).cnst += " { " + *(yyvsp[-1].String) + " }";
2670 delete (yyvsp[-1].String);
2675 #line 557 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2677 (yyval.Const).type = (yyvsp[-2].Type);
2678 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2679 *(yyval.Const).cnst += " {}";
2684 #line 562 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2686 (yyval.Const).type = (yyvsp[-1].Type);
2687 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2688 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2689 delete (yyvsp[0].String);
2694 #line 568 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2696 (yyval.Const).type = (yyvsp[-1].Type);
2697 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2698 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2699 delete (yyvsp[0].String);
2704 #line 574 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2706 (yyval.Const).type = (yyvsp[-1].Type);
2707 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2708 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2709 delete (yyvsp[0].String);
2714 #line 580 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2716 (yyval.Const).type = (yyvsp[-1].Type);
2717 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2718 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2719 delete (yyvsp[0].String);
2724 #line 586 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2726 (yyval.Const).type = (yyvsp[-1].Type);
2727 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2728 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2729 delete (yyvsp[0].String);
2734 #line 592 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2735 { // integral constants
2736 (yyval.Const).type = (yyvsp[-1].Type);
2737 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2738 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2739 delete (yyvsp[0].String);
2744 #line 598 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2745 { // integral constants
2746 (yyval.Const).type = (yyvsp[-1].Type);
2747 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2748 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2749 delete (yyvsp[0].String);
2754 #line 604 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2755 { // Boolean constants
2756 (yyval.Const).type = (yyvsp[-1].Type);
2757 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2758 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2759 delete (yyvsp[0].String);
2764 #line 610 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2765 { // Boolean constants
2766 (yyval.Const).type = (yyvsp[-1].Type);
2767 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2768 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2769 delete (yyvsp[0].String);
2774 #line 616 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2775 { // Float & Double constants
2776 (yyval.Const).type = (yyvsp[-1].Type);
2777 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2778 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2779 delete (yyvsp[0].String);
2784 #line 624 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2786 std::string source = *(yyvsp[-3].Const).cnst;
2787 TypeInfo DstTy = (yyvsp[-1].Type);
2789 if (*(yyvsp[-5].String) == "cast") {
2790 // Call getCastUpgrade to upgrade the old cast
2791 (yyval.String) = new std::string(getCastUpgrade(source, (yyvsp[-3].Const).type, (yyvsp[-1].Type), true));
2793 // Nothing to upgrade, just create the cast constant expr
2794 (yyval.String) = new std::string(*(yyvsp[-5].String));
2795 *(yyval.String) += "( " + source + " to " + *(yyvsp[-1].Type).newTy + ")";
2797 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
2802 #line 638 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2804 *(yyvsp[-4].String) += "(" + *(yyvsp[-2].Const).cnst;
2805 for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
2806 ValueInfo& VI = (*(yyvsp[-1].ValList))[i];
2807 *(yyvsp[-4].String) += ", " + *VI.val;
2810 *(yyvsp[-4].String) += ")";
2811 (yyval.String) = (yyvsp[-4].String);
2812 (yyvsp[-2].Const).destroy();
2813 delete (yyvsp[-1].ValList);
2818 #line 650 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2820 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2821 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2822 (yyval.String) = (yyvsp[-7].String);
2827 #line 655 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2829 const char* op = getDivRemOpcode(*(yyvsp[-5].String), (yyvsp[-3].Const).type);
2830 (yyval.String) = new std::string(op);
2831 *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2832 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2837 #line 661 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2839 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2840 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2841 (yyval.String) = (yyvsp[-5].String);
2846 #line 666 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2848 #if UPGRADE_SETCOND_OPS
2849 *(yyvsp[-5].String) = getCompareOp(*(yyvsp[-5].String), (yyvsp[-3].Const).type);
2851 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2852 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2853 (yyval.String) = (yyvsp[-5].String);
2858 #line 674 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2860 *(yyvsp[-6].String) += "(" + *(yyvsp[-5].String) + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2861 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2862 (yyval.String) = (yyvsp[-6].String);
2867 #line 679 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2869 *(yyvsp[-6].String) += "(" + *(yyvsp[-5].String) + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2870 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2871 (yyval.String) = (yyvsp[-6].String);
2876 #line 684 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2878 const char* shiftop = (yyvsp[-5].String)->c_str();
2879 if (*(yyvsp[-5].String) == "shr")
2880 shiftop = ((yyvsp[-3].Const).type.isUnsigned()) ? "lshr" : "ashr";
2881 (yyval.String) = new std::string(shiftop);
2882 *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2883 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2888 #line 692 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2890 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2891 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2892 (yyval.String) = (yyvsp[-5].String);
2897 #line 697 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2899 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2900 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2901 (yyval.String) = (yyvsp[-7].String);
2906 #line 702 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2908 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2909 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2910 (yyval.String) = (yyvsp[-7].String);
2915 #line 712 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2917 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Const).cnst;
2918 (yyvsp[0].Const).destroy();
2919 (yyval.String) = (yyvsp[-2].String);
2924 #line 717 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2925 { (yyval.String) = new std::string(*(yyvsp[0].Const).cnst); (yyvsp[0].Const).destroy(); ;}
2929 #line 732 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2935 #line 737 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2942 #line 740 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2944 *O << *(yyvsp[0].String) << "\n";
2945 delete (yyvsp[0].String);
2951 #line 745 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2953 *O << "module asm " << " " << *(yyvsp[0].String) << "\n";
2959 #line 749 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2961 *O << "implementation\n";
2967 #line 753 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2968 { (yyval.String) = 0; ;}
2972 #line 755 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2973 { (yyval.String) = (yyvsp[0].String); *(yyval.String) = "external"; ;}
2977 #line 758 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2979 EnumeratedTypes.push_back((yyvsp[0].Type));
2980 if (!(yyvsp[-2].String)->empty()) {
2981 NamedTypes[*(yyvsp[-2].String)].newTy = new std::string(*(yyvsp[0].Type).newTy);
2982 NamedTypes[*(yyvsp[-2].String)].oldTy = (yyvsp[0].Type).oldTy;
2983 NamedTypes[*(yyvsp[-2].String)].elemTy = (yyvsp[0].Type).elemTy;
2984 *O << *(yyvsp[-2].String) << " = ";
2986 *O << "type " << *(yyvsp[0].Type).newTy << "\n";
2987 delete (yyvsp[-2].String); delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
2993 #line 770 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2994 { // Function prototypes can be in const pool
2995 *O << *(yyvsp[0].String) << "\n";
2996 delete (yyvsp[0].String);
3002 #line 775 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3003 { // Asm blocks can be in the const pool
3004 *O << *(yyvsp[-2].String) << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
3005 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3011 #line 780 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3013 if (!(yyvsp[-4].String)->empty()) {
3014 *O << *(yyvsp[-4].String) << " = ";
3015 Globals[*(yyvsp[-4].String)] = (yyvsp[-1].Const).type.clone();
3017 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Const).cnst << " " << *(yyvsp[0].String) << "\n";
3018 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Const).destroy(); delete (yyvsp[0].String);
3024 #line 789 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3026 if (!(yyvsp[-4].String)->empty()) {
3027 *O << *(yyvsp[-4].String) << " = ";
3028 Globals[*(yyvsp[-4].String)] = (yyvsp[-1].Type).clone();
3030 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3031 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3037 #line 798 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3039 if (!(yyvsp[-4].String)->empty()) {
3040 *O << *(yyvsp[-4].String) << " = ";
3041 Globals[*(yyvsp[-4].String)] = (yyvsp[-1].Type).clone();
3043 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3044 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3050 #line 807 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3052 if (!(yyvsp[-4].String)->empty()) {
3053 *O << *(yyvsp[-4].String) << " = ";
3054 Globals[*(yyvsp[-4].String)] = (yyvsp[-1].Type).clone();
3056 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3057 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3063 #line 816 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3065 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
3066 delete (yyvsp[-1].String); delete (yyvsp[0].String);
3072 #line 821 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3074 *O << *(yyvsp[-2].String) << " = " << *(yyvsp[0].String) << "\n";
3075 delete (yyvsp[-2].String); delete (yyvsp[0].String);
3081 #line 826 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3088 #line 836 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3090 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3091 delete (yyvsp[0].String);
3092 (yyval.String) = (yyvsp[-2].String);
3097 #line 841 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3099 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3100 if (*(yyvsp[0].String) == "64")
3102 delete (yyvsp[0].String);
3103 (yyval.String) = (yyvsp[-2].String);
3108 #line 848 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3110 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3111 delete (yyvsp[0].String);
3112 (yyval.String) = (yyvsp[-2].String);
3117 #line 853 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3119 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3120 delete (yyvsp[0].String);
3121 (yyval.String) = (yyvsp[-2].String);
3126 #line 860 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3128 (yyvsp[-1].String)->insert(0, "[ ");
3129 *(yyvsp[-1].String) += " ]";
3130 (yyval.String) = (yyvsp[-1].String);
3135 #line 867 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3137 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
3138 delete (yyvsp[0].String);
3139 (yyval.String) = (yyvsp[-2].String);
3144 #line 873 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3146 (yyval.String) = new std::string();
3151 #line 882 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3152 { (yyval.String) = new std::string(); ;}
3156 #line 884 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3158 (yyval.String) = (yyvsp[-1].Type).newTy;
3159 if (!(yyvsp[0].String)->empty())
3160 *(yyval.String) += " " + *(yyvsp[0].String);
3161 delete (yyvsp[0].String);
3166 #line 891 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3168 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
3169 delete (yyvsp[0].String);
3174 #line 895 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3176 (yyval.String) = (yyvsp[0].String);
3181 #line 899 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3183 (yyval.String) = (yyvsp[0].String);
3188 #line 902 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3190 *(yyvsp[-2].String) += ", ...";
3191 (yyval.String) = (yyvsp[-2].String);
3192 delete (yyvsp[0].String);
3197 #line 907 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3199 (yyval.String) = (yyvsp[0].String);
3204 #line 910 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3205 { (yyval.String) = new std::string(); ;}
3209 #line 913 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3211 if (!(yyvsp[-7].String)->empty()) {
3212 *(yyvsp[-7].String) += " ";
3214 *(yyvsp[-7].String) += *(yyvsp[-6].Type).newTy + " " + *(yyvsp[-5].String) + "(" + *(yyvsp[-3].String) + ")";
3215 if (!(yyvsp[-1].String)->empty()) {
3216 *(yyvsp[-7].String) += " " + *(yyvsp[-1].String);
3218 if (!(yyvsp[0].String)->empty()) {
3219 *(yyvsp[-7].String) += " " + *(yyvsp[0].String);
3221 (yyvsp[-6].Type).destroy();
3222 delete (yyvsp[-5].String);
3223 delete (yyvsp[-3].String);
3224 delete (yyvsp[-1].String);
3225 delete (yyvsp[0].String);
3226 (yyval.String) = (yyvsp[-7].String);
3231 #line 932 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3232 { (yyval.String) = new std::string("{"); delete (yyvsp[0].String); ;}
3236 #line 933 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3237 { (yyval.String) = new std::string ("{"); ;}
3241 #line 935 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3243 if (!(yyvsp[-2].String)->empty()) {
3244 *O << *(yyvsp[-2].String) << " ";
3246 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
3247 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3253 #line 944 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3254 { (yyval.String) = new std::string("}"); delete (yyvsp[0].String); ;}
3258 #line 945 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3259 { (yyval.String) = new std::string("}"); ;}
3263 #line 947 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3265 if ((yyvsp[-1].String))
3266 *O << *(yyvsp[-1].String);
3267 *O << '\n' << *(yyvsp[0].String) << "\n";
3273 #line 955 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3274 { (yyval.String) = new std::string(); ;}
3278 #line 961 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3280 if (!(yyvsp[-1].String)->empty())
3281 *(yyvsp[-2].String) += " " + *(yyvsp[-1].String);
3282 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3283 delete (yyvsp[-1].String);
3284 delete (yyvsp[0].String);
3285 (yyval.String) = (yyvsp[-2].String);
3290 #line 974 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3291 { (yyval.String) = new std::string(); ;}
3295 #line 980 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3297 (yyvsp[-1].String)->insert(0, "<");
3298 *(yyvsp[-1].String) += ">";
3299 (yyval.String) = (yyvsp[-1].String);
3304 #line 986 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3306 if (!(yyvsp[-3].String)->empty()) {
3307 *(yyvsp[-4].String) += " " + *(yyvsp[-3].String);
3309 *(yyvsp[-4].String) += " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
3310 delete (yyvsp[-3].String); delete (yyvsp[-2].String); delete (yyvsp[0].String);
3311 (yyval.String) = (yyvsp[-4].String);
3316 #line 999 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3318 (yyval.Value).val = (yyvsp[0].String);
3319 (yyval.Value).constant = false;
3320 (yyval.Value).type.newTy = 0;
3321 (yyval.Value).type.oldTy = UnresolvedTy;
3326 #line 1005 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3328 (yyval.Value).val = (yyvsp[0].String);
3329 (yyval.Value).constant = true;
3330 (yyval.Value).type.newTy = 0;
3331 (yyval.Value).type.oldTy = UnresolvedTy;
3336 #line 1016 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3338 (yyval.Value) = (yyvsp[0].Value);
3339 (yyval.Value).type = (yyvsp[-1].Type);
3340 (yyval.Value).val->insert(0, *(yyvsp[-1].Type).newTy + " ");
3345 #line 1022 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3352 #line 1025 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3353 { // Do not allow functions with 0 basic blocks
3359 #line 1033 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3366 #line 1037 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3368 *O << " " << *(yyvsp[0].String) << "\n";
3369 delete (yyvsp[0].String);
3375 #line 1042 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3382 #line 1045 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3384 *O << *(yyvsp[0].String) << "\n";
3385 delete (yyvsp[0].String);
3391 #line 1051 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3392 { (yyval.String) = (yyvsp[0].String); *(yyval.String) = "unwind"; ;}
3396 #line 1053 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3397 { // Return with a result...
3398 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Value).val << "\n";
3399 delete (yyvsp[-1].String); (yyvsp[0].Value).destroy();
3405 #line 1058 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3406 { // Return with no result...
3407 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Type).newTy << "\n";
3408 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3414 #line 1063 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3415 { // Unconditional Branch...
3416 *O << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].Value).val << "\n";
3417 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3423 #line 1068 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3425 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", "
3426 << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << ", " << *(yyvsp[-1].Type).newTy << " "
3427 << *(yyvsp[0].Value).val << "\n";
3428 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); (yyvsp[-6].Value).destroy(); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy();
3429 (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3435 #line 1076 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3437 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", "
3438 << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << " [" << *(yyvsp[-1].String) << " ]\n";
3439 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); (yyvsp[-6].Value).destroy(); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy();
3440 delete (yyvsp[-1].String);
3446 #line 1083 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3448 *O << " " << *(yyvsp[-7].String) << " " << *(yyvsp[-6].Type).newTy << " " << *(yyvsp[-5].Value).val << ", "
3449 << *(yyvsp[-3].Type).newTy << " " << *(yyvsp[-2].Value).val << "[]\n";
3450 delete (yyvsp[-7].String); (yyvsp[-6].Type).destroy(); (yyvsp[-5].Value).destroy(); (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy();
3456 #line 1090 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3459 if (!(yyvsp[-13].String)->empty())
3460 *O << *(yyvsp[-13].String) << " = ";
3461 *O << *(yyvsp[-12].String) << " " << *(yyvsp[-11].String) << " " << *(yyvsp[-10].Type).newTy << " " << *(yyvsp[-9].Value).val << " (";
3462 for (unsigned i = 0; i < (yyvsp[-7].ValList)->size(); ++i) {
3463 ValueInfo& VI = (*(yyvsp[-7].ValList))[i];
3465 if (i+1 < (yyvsp[-7].ValList)->size())
3469 *O << ") " << *(yyvsp[-5].String) << " " << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << " "
3470 << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].Value).val << "\n";
3471 delete (yyvsp[-13].String); delete (yyvsp[-12].String); delete (yyvsp[-11].String); (yyvsp[-10].Type).destroy(); (yyvsp[-9].Value).destroy(); delete (yyvsp[-7].ValList);
3472 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
3473 (yyvsp[0].Value).destroy();
3479 #line 1109 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3481 *O << " " << *(yyvsp[0].String) << "\n";
3482 delete (yyvsp[0].String);
3488 #line 1114 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3490 *O << " " << *(yyvsp[0].String) << "\n";
3491 delete (yyvsp[0].String);
3497 #line 1120 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3499 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].String) + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3500 (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3501 (yyval.String) = (yyvsp[-5].String);
3506 #line 1125 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3508 (yyvsp[-3].String)->insert(0, *(yyvsp[-4].Type).newTy + " " );
3509 *(yyvsp[-3].String) += ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3510 (yyvsp[-4].Type).destroy(); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3511 (yyval.String) = (yyvsp[-3].String);
3516 #line 1133 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3518 if (!(yyvsp[-1].String)->empty())
3519 *(yyvsp[-1].String) += " = ";
3520 *(yyvsp[-1].String) += *(yyvsp[0].String);
3521 delete (yyvsp[0].String);
3522 (yyval.String) = (yyvsp[-1].String);
3527 #line 1142 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3528 { // Used for PHI nodes
3529 (yyvsp[-3].Value).val->insert(0, *(yyvsp[-5].Type).newTy + "[");
3530 *(yyvsp[-3].Value).val += "," + *(yyvsp[-1].Value).val + "]";
3531 (yyvsp[-5].Type).destroy(); (yyvsp[-1].Value).destroy();
3532 (yyval.String) = new std::string(*(yyvsp[-3].Value).val);
3533 (yyvsp[-3].Value).destroy();
3538 #line 1149 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3540 *(yyvsp[-6].String) += ", [" + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + "]";
3541 (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
3542 (yyval.String) = (yyvsp[-6].String);
3547 #line 1157 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3549 (yyval.ValList) = new ValueList();
3550 (yyval.ValList)->push_back((yyvsp[0].Value));
3555 #line 1161 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3557 (yyvsp[-2].ValList)->push_back((yyvsp[0].Value));
3558 (yyval.ValList) = (yyvsp[-2].ValList);
3563 #line 1168 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3564 { (yyval.ValList) = (yyvsp[0].ValList); ;}
3568 #line 1169 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3569 { (yyval.ValList) = new ValueList(); ;}
3573 #line 1173 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3575 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3576 delete (yyvsp[0].String);
3577 (yyval.String) = (yyvsp[-1].String);
3582 #line 1181 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3584 const char* op = getDivRemOpcode(*(yyvsp[-4].String), (yyvsp[-3].Type));
3585 (yyval.String) = new std::string(op);
3586 *(yyval.String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3587 delete (yyvsp[-4].String); (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3592 #line 1187 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3594 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3595 (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3596 (yyval.String) = (yyvsp[-4].String);
3601 #line 1192 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3603 #if UPGRADE_SETCOND_OPS
3604 *(yyvsp[-4].String) = getCompareOp(*(yyvsp[-4].String), (yyvsp[-3].Type));
3606 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3607 (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3608 (yyval.String) = (yyvsp[-4].String);
3613 #line 1200 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3615 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String) + " " + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + ")";
3616 delete (yyvsp[-5].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
3617 (yyval.String) = (yyvsp[-6].String);
3622 #line 1205 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3624 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String) + " " + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + ")";
3625 delete (yyvsp[-5].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
3626 (yyval.String) = (yyvsp[-6].String);
3631 #line 1210 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3633 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3634 (yyvsp[0].Value).destroy();
3635 (yyval.String) = (yyvsp[-1].String);
3640 #line 1215 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3642 const char* shiftop = (yyvsp[-3].String)->c_str();
3643 if (*(yyvsp[-3].String) == "shr")
3644 shiftop = ((yyvsp[-2].Value).type.isUnsigned()) ? "lshr" : "ashr";
3645 (yyval.String) = new std::string(shiftop);
3646 *(yyval.String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3647 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3652 #line 1223 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3654 std::string source = *(yyvsp[-2].Value).val;
3655 TypeInfo SrcTy = (yyvsp[-2].Value).type;
3656 TypeInfo DstTy = (yyvsp[0].Type);
3658 (yyval.String) = new std::string();
3659 if (*(yyvsp[-3].String) == "cast") {
3660 *(yyval.String) += getCastUpgrade(source, SrcTy, DstTy, false);
3662 *(yyval.String) += *(yyvsp[-3].String) + " " + source + " to " + *DstTy.newTy;
3664 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy();
3665 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3670 #line 1237 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3672 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3673 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3674 (yyval.String) = (yyvsp[-5].String);
3679 #line 1242 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3681 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Type).newTy;
3682 (yyvsp[-2].Value).destroy(); (yyvsp[0].Type).destroy();
3683 (yyval.String) = (yyvsp[-3].String);
3688 #line 1247 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3690 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3691 (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3692 (yyval.String) = (yyvsp[-3].String);
3697 #line 1252 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3699 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3700 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3701 (yyval.String) = (yyvsp[-5].String);
3706 #line 1257 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3708 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3709 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3710 (yyval.String) = (yyvsp[-5].String);
3715 #line 1262 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3717 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3718 delete (yyvsp[0].String);
3719 (yyval.String) = (yyvsp[-1].String);
3724 #line 1267 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3726 if (!(yyvsp[-5].String)->empty())
3727 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String);
3728 if (!(yyvsp[-6].String)->empty())
3729 *(yyvsp[-6].String) += " ";
3730 *(yyvsp[-6].String) += *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].Value).val + "(";
3731 for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
3732 ValueInfo& VI = (*(yyvsp[-1].ValList))[i];
3733 *(yyvsp[-6].String) += *VI.val;
3734 if (i+1 < (yyvsp[-1].ValList)->size())
3735 *(yyvsp[-6].String) += ", ";
3738 *(yyvsp[-6].String) += ")";
3739 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); delete (yyvsp[-1].ValList);
3740 (yyval.String) = (yyvsp[-6].String);
3745 #line 1289 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3746 { (yyval.ValList) = (yyvsp[0].ValList); ;}
3750 #line 1290 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3751 { (yyval.ValList) = new ValueList(); ;}
3755 #line 1295 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3756 { (yyval.String) = new std::string(); ;}
3760 #line 1298 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3762 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3763 if (!(yyvsp[0].String)->empty())
3764 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3765 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3766 (yyval.String) = (yyvsp[-2].String);
3771 #line 1305 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3773 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3774 if (!(yyvsp[0].String)->empty())
3775 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3776 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].String);
3777 (yyval.String) = (yyvsp[-5].String);
3782 #line 1312 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3784 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3785 if (!(yyvsp[0].String)->empty())
3786 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3787 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3788 (yyval.String) = (yyvsp[-2].String);
3793 #line 1319 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3795 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3796 if (!(yyvsp[0].String)->empty())
3797 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3798 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].String);
3799 (yyval.String) = (yyvsp[-5].String);
3804 #line 1326 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3806 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3807 (yyvsp[0].Value).destroy();
3808 (yyval.String) = (yyvsp[-1].String);
3813 #line 1331 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3815 if (!(yyvsp[-3].String)->empty())
3816 *(yyvsp[-3].String) += " ";
3817 *(yyvsp[-3].String) += *(yyvsp[-2].String) + " " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3818 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3819 (yyval.String) = (yyvsp[-3].String);
3824 #line 1338 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3826 if (!(yyvsp[-5].String)->empty())
3827 *(yyvsp[-5].String) += " ";
3828 *(yyvsp[-5].String) += *(yyvsp[-4].String) + " " + *(yyvsp[-3].Value).val + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3829 delete (yyvsp[-4].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3830 (yyval.String) = (yyvsp[-5].String);
3835 #line 1345 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3837 // Upgrade the indices
3838 for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) {
3839 ValueInfo& VI = (*(yyvsp[0].ValList))[i];
3840 if (VI.type.isUnsigned() && !VI.isConstant() &&
3841 VI.type.getBitWidth() < 64) {
3842 std::string* old = VI.val;
3843 *O << " %gep_upgrade" << unique << " = zext " << *old
3845 VI.val = new std::string("ulong %gep_upgrade" + llvm::utostr(unique++));
3846 VI.type.oldTy = ULongTy;
3850 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3851 for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) {
3852 ValueInfo& VI = (*(yyvsp[0].ValList))[i];
3853 *(yyvsp[-3].String) += ", " + *VI.val;
3856 (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].ValList);
3857 (yyval.String) = (yyvsp[-3].String);
3865 /* Line 1126 of yacc.c. */
3866 #line 3867 "UpgradeParser.tab.c"
3872 YY_STACK_PRINT (yyss, yyssp);
3877 /* Now `shift' the result of the reduction. Determine what state
3878 that goes to, based on the state we popped back to and the rule
3879 number reduced by. */
3883 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3884 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3885 yystate = yytable[yystate];
3887 yystate = yydefgoto[yyn - YYNTOKENS];
3892 /*------------------------------------.
3893 | yyerrlab -- here on detecting error |
3894 `------------------------------------*/
3896 /* If not already recovering from an error, report this error. */
3901 yyn = yypact[yystate];
3903 if (YYPACT_NINF < yyn && yyn < YYLAST)
3905 int yytype = YYTRANSLATE (yychar);
3906 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3907 YYSIZE_T yysize = yysize0;
3909 int yysize_overflow = 0;
3911 # define YYERROR_VERBOSE_ARGS_MAXIMUM 5
3912 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3916 /* This is so xgettext sees the translatable formats that are
3917 constructed on the fly. */
3918 YY_("syntax error, unexpected %s");
3919 YY_("syntax error, unexpected %s, expecting %s");
3920 YY_("syntax error, unexpected %s, expecting %s or %s");
3921 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3922 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3926 static char const yyunexpected[] = "syntax error, unexpected %s";
3927 static char const yyexpecting[] = ", expecting %s";
3928 static char const yyor[] = " or %s";
3929 char yyformat[sizeof yyunexpected
3930 + sizeof yyexpecting - 1
3931 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3932 * (sizeof yyor - 1))];
3933 char const *yyprefix = yyexpecting;
3935 /* Start YYX at -YYN if negative to avoid negative indexes in
3937 int yyxbegin = yyn < 0 ? -yyn : 0;
3939 /* Stay within bounds of both yycheck and yytname. */
3940 int yychecklim = YYLAST - yyn;
3941 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3944 yyarg[0] = yytname[yytype];
3945 yyfmt = yystpcpy (yyformat, yyunexpected);
3947 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3948 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3950 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3954 yyformat[sizeof yyunexpected - 1] = '\0';
3957 yyarg[yycount++] = yytname[yyx];
3958 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3959 yysize_overflow |= yysize1 < yysize;
3961 yyfmt = yystpcpy (yyfmt, yyprefix);
3965 yyf = YY_(yyformat);
3966 yysize1 = yysize + yystrlen (yyf);
3967 yysize_overflow |= yysize1 < yysize;
3970 if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
3971 yymsg = (char *) YYSTACK_ALLOC (yysize);
3974 /* Avoid sprintf, as that infringes on the user's name space.
3975 Don't have undefined behavior even if the translation
3976 produced a string with the wrong number of "%s"s. */
3979 while ((*yyp = *yyf))
3981 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3983 yyp += yytnamerr (yyp, yyarg[yyi++]);
3993 YYSTACK_FREE (yymsg);
3997 yyerror (YY_("syntax error"));
3998 goto yyexhaustedlab;
4002 #endif /* YYERROR_VERBOSE */
4003 yyerror (YY_("syntax error"));
4008 if (yyerrstatus == 3)
4010 /* If just tried and failed to reuse look-ahead token after an
4011 error, discard it. */
4013 if (yychar <= YYEOF)
4015 /* Return failure if at end of input. */
4016 if (yychar == YYEOF)
4021 yydestruct ("Error: discarding", yytoken, &yylval);
4026 /* Else will try to reuse look-ahead token after shifting the error
4031 /*---------------------------------------------------.
4032 | yyerrorlab -- error raised explicitly by YYERROR. |
4033 `---------------------------------------------------*/
4036 /* Pacify compilers like GCC when the user code never invokes
4037 YYERROR and the label yyerrorlab therefore never appears in user
4048 /*-------------------------------------------------------------.
4049 | yyerrlab1 -- common code for both syntax error and YYERROR. |
4050 `-------------------------------------------------------------*/
4052 yyerrstatus = 3; /* Each real token shifted decrements this. */
4056 yyn = yypact[yystate];
4057 if (yyn != YYPACT_NINF)
4060 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4068 /* Pop the current state because it cannot handle the error token. */
4073 yydestruct ("Error: popping", yystos[yystate], yyvsp);
4076 YY_STACK_PRINT (yyss, yyssp);
4085 /* Shift the error token. */
4086 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
4092 /*-------------------------------------.
4093 | yyacceptlab -- YYACCEPT comes here. |
4094 `-------------------------------------*/
4099 /*-----------------------------------.
4100 | yyabortlab -- YYABORT comes here. |
4101 `-----------------------------------*/
4107 /*-------------------------------------------------.
4108 | yyexhaustedlab -- memory exhaustion comes here. |
4109 `-------------------------------------------------*/
4111 yyerror (YY_("memory exhausted"));
4117 if (yychar != YYEOF && yychar != YYEMPTY)
4118 yydestruct ("Cleanup: discarding lookahead",
4120 while (yyssp != yyss)
4122 yydestruct ("Cleanup: popping",
4123 yystos[*yyssp], yyvsp);
4128 YYSTACK_FREE (yyss);
4134 #line 1369 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
4137 int yyerror(const char *ErrorMsg) {
4139 = std::string((CurFilename == "-") ? std::string("<stdin>") : CurFilename)
4140 + ":" + llvm::utostr((unsigned) Upgradelineno) + ": ";
4141 std::string errMsg = std::string(ErrorMsg) + "\n" + where + " while reading ";
4142 if (yychar == YYEMPTY || yychar == 0)
4143 errMsg += "end-of-file.";
4145 errMsg += "token: '" + std::string(Upgradetext, Upgradeleng) + "'";
4146 std::cerr << errMsg << '\n';