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-3/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
385 int yylex(); // declaration" of xxx warnings.
389 static std::string CurFilename;
390 static std::ostream *O = 0;
391 std::istream* LexInput = 0;
392 unsigned SizeOfPointer = 32;
393 static uint64_t unique = 1;
395 // This bool controls whether attributes are ever added to function declarations
396 // definitions and calls.
397 static bool AddAttributes = false;
399 typedef std::vector<TypeInfo> TypeVector;
400 static TypeVector EnumeratedTypes;
401 typedef std::map<std::string,TypeInfo> TypeMap;
402 static TypeMap NamedTypes;
403 static TypeMap Globals;
405 void destroy(ValueList* VL) {
406 while (!VL->empty()) {
407 ValueInfo& VI = VL->back();
414 void UpgradeAssembly(const std::string &infile, std::istream& in,
415 std::ostream &out, bool debug, bool addAttrs)
418 CurFilename = infile;
421 AddAttributes = addAttrs;
425 std::cerr << "Parse failed.\n";
430 static void ResolveType(TypeInfo& Ty) {
431 if (Ty.oldTy == UnresolvedTy) {
432 TypeMap::iterator I = NamedTypes.find(*Ty.newTy);
433 if (I != NamedTypes.end()) {
434 Ty.oldTy = I->second.oldTy;
435 Ty.elemTy = I->second.elemTy;
437 std::string msg("Can't resolve type: ");
439 yyerror(msg.c_str());
441 } else if (Ty.oldTy == NumericTy) {
442 unsigned ref = atoi(&((Ty.newTy->c_str())[1])); // Skip the '\\'
443 if (ref < EnumeratedTypes.size()) {
444 Ty.oldTy = EnumeratedTypes[ref].oldTy;
445 Ty.elemTy = EnumeratedTypes[ref].elemTy;
447 std::string msg("Can't resolve type: ");
449 yyerror(msg.c_str());
452 // otherwise its already resolved.
455 static const char* getCastOpcode(
456 std::string& Source, const TypeInfo& SrcTy, const TypeInfo& DstTy)
458 unsigned SrcBits = SrcTy.getBitWidth();
459 unsigned DstBits = DstTy.getBitWidth();
460 const char* opcode = "bitcast";
461 // Run through the possibilities ...
462 if (DstTy.isIntegral()) { // Casting to integral
463 if (SrcTy.isIntegral()) { // Casting from integral
464 if (DstBits < SrcBits)
466 else if (DstBits > SrcBits) { // its an extension
467 if (SrcTy.isSigned())
468 opcode ="sext"; // signed -> SEXT
470 opcode = "zext"; // unsigned -> ZEXT
472 opcode = "bitcast"; // Same size, No-op cast
474 } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt
475 if (DstTy.isSigned())
476 opcode = "fptosi"; // FP -> sint
478 opcode = "fptoui"; // FP -> uint
479 } else if (SrcTy.isPacked()) {
480 assert(DstBits == SrcTy.getBitWidth() &&
481 "Casting packed to integer of different width");
482 opcode = "bitcast"; // same size, no-op cast
484 assert(SrcTy.isPointer() &&
485 "Casting from a value that is not first-class type");
486 opcode = "ptrtoint"; // ptr -> int
488 } else if (DstTy.isFloatingPoint()) { // Casting to floating pt
489 if (SrcTy.isIntegral()) { // Casting from integral
490 if (SrcTy.isSigned())
491 opcode = "sitofp"; // sint -> FP
493 opcode = "uitofp"; // uint -> FP
494 } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt
495 if (DstBits < SrcBits) {
496 opcode = "fptrunc"; // FP -> smaller FP
497 } else if (DstBits > SrcBits) {
498 opcode = "fpext"; // FP -> larger FP
500 opcode ="bitcast"; // same size, no-op cast
502 } else if (SrcTy.isPacked()) {
503 assert(DstBits == SrcTy.getBitWidth() &&
504 "Casting packed to floating point of different width");
505 opcode = "bitcast"; // same size, no-op cast
507 assert(0 && "Casting pointer or non-first class to float");
509 } else if (DstTy.isPacked()) {
510 if (SrcTy.isPacked()) {
511 assert(DstTy.getBitWidth() == SrcTy.getBitWidth() &&
512 "Casting packed to packed of different widths");
513 opcode = "bitcast"; // packed -> packed
514 } else if (DstTy.getBitWidth() == SrcBits) {
515 opcode = "bitcast"; // float/int -> packed
517 assert(!"Illegal cast to packed (wrong type or size)");
519 } else if (DstTy.isPointer()) {
520 if (SrcTy.isPointer()) {
521 opcode = "bitcast"; // ptr -> ptr
522 } else if (SrcTy.isIntegral()) {
523 opcode = "inttoptr"; // int -> ptr
525 assert(!"Casting invalid type to pointer");
528 assert(!"Casting to type that is not first-class");
533 static std::string getCastUpgrade(
534 const std::string& Src, TypeInfo& SrcTy, TypeInfo& DstTy, bool isConst)
537 std::string Source = Src;
538 if (SrcTy.isFloatingPoint() && DstTy.isPointer()) {
539 // fp -> ptr cast is no longer supported but we must upgrade this
540 // by doing a double cast: fp -> int -> ptr
542 Source = "i64 fptoui(" + Source + " to i64)";
544 *O << " %cast_upgrade" << unique << " = fptoui " << Source
546 Source = "i64 %cast_upgrade" + llvm::utostr(unique);
548 // Update the SrcTy for the getCastOpcode call below
550 SrcTy.newTy = new std::string("i64");
551 SrcTy.oldTy = ULongTy;
552 } else if (DstTy.oldTy == BoolTy && SrcTy.oldTy != BoolTy) {
553 // cast ptr %x to bool was previously defined as setne ptr %x, null
554 // The ptrtoint semantic is to truncate, not compare so we must retain
555 // the original intent by replace the cast with a setne
556 const char* comparator = SrcTy.isPointer() ? ", null" :
557 (SrcTy.isFloatingPoint() ? ", 0.0" : ", 0");
558 const char* compareOp = SrcTy.isFloatingPoint() ? "fcmp one " : "icmp ne ";
560 Result = "(" + Source + comparator + ")";
561 Result = compareOp + Result;
563 Result = compareOp + Source + comparator;
564 return Result; // skip cast processing below
568 std::string Opcode(getCastOpcode(Source, SrcTy, DstTy));
570 Result += Opcode + "( " + Source + " to " + *DstTy.newTy + ")";
572 Result += Opcode + " " + Source + " to " + *DstTy.newTy;
576 const char* getDivRemOpcode(const std::string& opcode, const TypeInfo& TI) {
577 const char* op = opcode.c_str();
581 Ty.oldTy = Ty.getElementType();
583 if (Ty.isFloatingPoint())
585 else if (Ty.isUnsigned())
587 else if (Ty.isSigned())
590 yyerror("Invalid type for div instruction");
591 else if (opcode == "rem")
592 if (Ty.isFloatingPoint())
594 else if (Ty.isUnsigned())
596 else if (Ty.isSigned())
599 yyerror("Invalid type for rem instruction");
604 getCompareOp(const std::string& setcc, const TypeInfo& TI) {
605 assert(setcc.length() == 5);
608 assert(cc1 == 'e' || cc1 == 'n' || cc1 == 'l' || cc1 == 'g');
609 assert(cc2 == 'q' || cc2 == 'e' || cc2 == 'e' || cc2 == 't');
610 std::string result("xcmp xxx");
613 if (TI.isFloatingPoint()) {
617 result[5] = 'u'; // NE maps to unordered
619 result[5] = 'o'; // everything else maps to ordered
620 } else if (TI.isIntegral() || TI.isPointer()) {
622 if ((cc1 == 'e' && cc2 == 'q') || (cc1 == 'n' && cc2 == 'e'))
624 else if (TI.isSigned())
626 else if (TI.isUnsigned() || TI.isPointer() || TI.isBool())
629 yyerror("Invalid integral type for setcc");
636 /* Enabling traces. */
641 /* Enabling verbose error messages. */
642 #ifdef YYERROR_VERBOSE
643 # undef YYERROR_VERBOSE
644 # define YYERROR_VERBOSE 1
646 # define YYERROR_VERBOSE 0
649 /* Enabling the token table. */
650 #ifndef YYTOKEN_TABLE
651 # define YYTOKEN_TABLE 0
654 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
655 #line 280 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
656 typedef union YYSTYPE {
663 /* Line 196 of yacc.c. */
664 #line 665 "UpgradeParser.tab.c"
665 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
666 # define YYSTYPE_IS_DECLARED 1
667 # define YYSTYPE_IS_TRIVIAL 1
672 /* Copy the second part of user declarations. */
675 /* Line 219 of yacc.c. */
676 #line 677 "UpgradeParser.tab.c"
678 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
679 # define YYSIZE_T __SIZE_TYPE__
681 #if ! defined (YYSIZE_T) && defined (size_t)
682 # define YYSIZE_T size_t
684 #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
685 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
686 # define YYSIZE_T size_t
688 #if ! defined (YYSIZE_T)
689 # define YYSIZE_T unsigned int
695 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
696 # define YY_(msgid) dgettext ("bison-runtime", msgid)
700 # define YY_(msgid) msgid
704 #if ! defined (yyoverflow) || YYERROR_VERBOSE
706 /* The parser invokes alloca or malloc; define the necessary symbols. */
708 # ifdef YYSTACK_USE_ALLOCA
709 # if YYSTACK_USE_ALLOCA
711 # define YYSTACK_ALLOC __builtin_alloca
713 # define YYSTACK_ALLOC alloca
714 # if defined (__STDC__) || defined (__cplusplus)
715 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
716 # define YYINCLUDED_STDLIB_H
722 # ifdef YYSTACK_ALLOC
723 /* Pacify GCC's `empty if-body' warning. */
724 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
725 # ifndef YYSTACK_ALLOC_MAXIMUM
726 /* The OS might guarantee only one guard page at the bottom of the stack,
727 and a page size can be as small as 4096 bytes. So we cannot safely
728 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
729 to allow for a few compiler-allocated temporary stack slots. */
730 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
733 # define YYSTACK_ALLOC YYMALLOC
734 # define YYSTACK_FREE YYFREE
735 # ifndef YYSTACK_ALLOC_MAXIMUM
736 # define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
742 # define YYMALLOC malloc
743 # if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
744 && (defined (__STDC__) || defined (__cplusplus)))
745 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
750 # if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
751 && (defined (__STDC__) || defined (__cplusplus)))
752 void free (void *); /* INFRINGES ON USER NAME SPACE */
759 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
762 #if (! defined (yyoverflow) \
763 && (! defined (__cplusplus) \
764 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
766 /* A type that is properly aligned for any stack member. */
773 /* The size of the maximum gap between one aligned stack and the next. */
774 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
776 /* The size of an array large to enough to hold all stacks, each with
778 # define YYSTACK_BYTES(N) \
779 ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
780 + YYSTACK_GAP_MAXIMUM)
782 /* Copy COUNT objects from FROM to TO. The source and destination do
785 # if defined (__GNUC__) && 1 < __GNUC__
786 # define YYCOPY(To, From, Count) \
787 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
789 # define YYCOPY(To, From, Count) \
793 for (yyi = 0; yyi < (Count); yyi++) \
794 (To)[yyi] = (From)[yyi]; \
800 /* Relocate STACK from its old location to the new one. The
801 local variables YYSIZE and YYSTACKSIZE give the old and new number of
802 elements in the stack, and YYPTR gives the new location of the
803 stack. Advance YYPTR to a properly aligned location for the next
805 # define YYSTACK_RELOCATE(Stack) \
808 YYSIZE_T yynewbytes; \
809 YYCOPY (&yyptr->Stack, Stack, yysize); \
810 Stack = &yyptr->Stack; \
811 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
812 yyptr += yynewbytes / sizeof (*yyptr); \
818 #if defined (__STDC__) || defined (__cplusplus)
819 typedef signed char yysigned_char;
821 typedef short int yysigned_char;
824 /* YYFINAL -- State number of the termination state. */
826 /* YYLAST -- Last index in YYTABLE. */
829 /* YYNTOKENS -- Number of terminals. */
830 #define YYNTOKENS 165
831 /* YYNNTS -- Number of nonterminals. */
833 /* YYNRULES -- Number of rules. */
835 /* YYNRULES -- Number of states. */
836 #define YYNSTATES 586
838 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
840 #define YYMAXUTOK 405
842 #define YYTRANSLATE(YYX) \
843 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
845 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
846 static const unsigned char yytranslate[] =
848 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
849 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
850 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
851 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
852 154, 155, 163, 2, 152, 2, 2, 2, 2, 2,
853 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
854 159, 151, 160, 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, 156, 153, 158, 2, 2, 2, 2, 2, 164,
858 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
859 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
860 157, 2, 2, 161, 2, 162, 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, 2, 2, 2, 2,
864 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
865 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
866 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
867 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
868 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
869 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
870 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
871 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
872 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
873 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
874 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
875 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
876 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
877 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
878 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
879 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
880 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
881 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
882 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
883 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
884 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
885 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
886 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
887 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
888 145, 146, 147, 148, 149, 150
892 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
894 static const unsigned short int yyprhs[] =
896 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
897 19, 21, 23, 25, 27, 29, 31, 33, 35, 37,
898 39, 41, 43, 45, 47, 49, 51, 53, 55, 57,
899 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
900 79, 81, 83, 85, 87, 89, 91, 93, 95, 97,
901 99, 101, 103, 105, 107, 109, 111, 113, 115, 117,
902 119, 121, 123, 125, 127, 129, 131, 133, 135, 137,
903 139, 141, 143, 145, 147, 149, 151, 153, 155, 157,
904 159, 161, 164, 165, 167, 169, 171, 173, 175, 177,
905 179, 180, 182, 184, 186, 188, 190, 192, 195, 196,
906 197, 200, 201, 205, 208, 209, 211, 212, 216, 218,
907 221, 223, 225, 227, 229, 231, 233, 235, 237, 239,
908 241, 243, 245, 247, 249, 251, 253, 255, 257, 259,
909 261, 264, 269, 275, 281, 285, 288, 294, 299, 302,
910 304, 308, 310, 314, 316, 317, 322, 326, 330, 335,
911 340, 344, 347, 350, 353, 356, 359, 362, 365, 368,
912 371, 374, 381, 387, 396, 403, 410, 417, 425, 433,
913 440, 447, 456, 465, 469, 471, 473, 475, 477, 480,
914 483, 488, 491, 493, 495, 497, 502, 505, 510, 517,
915 524, 531, 538, 542, 547, 548, 550, 552, 554, 558,
916 562, 566, 570, 574, 578, 580, 581, 583, 585, 587,
917 588, 591, 595, 597, 599, 603, 605, 606, 615, 617,
918 619, 623, 625, 627, 631, 632, 634, 636, 640, 641,
919 643, 645, 647, 649, 651, 653, 655, 657, 659, 663,
920 665, 671, 673, 675, 677, 679, 682, 685, 687, 690,
921 693, 694, 696, 698, 700, 703, 706, 710, 720, 730,
922 739, 754, 756, 758, 765, 771, 774, 781, 789, 791,
923 795, 797, 798, 801, 803, 809, 815, 821, 828, 835,
924 838, 843, 848, 855, 860, 865, 872, 879, 882, 890,
925 892, 895, 896, 898, 899, 903, 910, 914, 921, 924,
929 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
930 static const short int yyrhs[] =
932 199, 0, -1, 19, -1, 20, -1, 17, -1, 18,
933 -1, 80, -1, 81, -1, 82, -1, 83, -1, 84,
934 -1, 85, -1, 86, -1, 87, -1, 88, -1, 89,
935 -1, 90, -1, 91, -1, 92, -1, 93, -1, 94,
936 -1, 95, -1, 96, -1, 97, -1, 98, -1, 99,
937 -1, 102, -1, 103, -1, 104, -1, 105, -1, 106,
938 -1, 107, -1, 118, -1, 119, -1, 120, -1, 121,
939 -1, 108, -1, 109, -1, 110, -1, 111, -1, 112,
940 -1, 113, -1, 114, -1, 115, -1, 116, -1, 117,
941 -1, 118, -1, 119, -1, 120, -1, 121, -1, 25,
942 -1, 26, -1, 130, -1, 131, -1, 132, -1, 133,
943 -1, 139, -1, 140, -1, 141, -1, 142, -1, 143,
944 -1, 144, -1, 145, -1, 146, -1, 147, -1, 148,
945 -1, 149, -1, 150, -1, 138, -1, 11, -1, 9,
946 -1, 7, -1, 5, -1, 12, -1, 10, -1, 8,
947 -1, 6, -1, 175, -1, 176, -1, 13, -1, 14,
948 -1, 208, 151, -1, -1, 42, -1, 43, -1, 44,
949 -1, 48, -1, 45, -1, 46, -1, 47, -1, -1,
950 66, -1, 67, -1, 68, -1, 69, -1, 70, -1,
951 71, -1, 65, 18, -1, -1, -1, 57, 18, -1,
952 -1, 152, 57, 18, -1, 37, 30, -1, -1, 184,
953 -1, -1, 152, 187, 186, -1, 184, -1, 57, 18,
954 -1, 190, -1, 3, -1, 192, -1, 3, -1, 192,
955 -1, 4, -1, 5, -1, 6, -1, 7, -1, 8,
956 -1, 9, -1, 10, -1, 11, -1, 12, -1, 13,
957 -1, 14, -1, 15, -1, 16, -1, 222, -1, 191,
958 -1, 153, 18, -1, 189, 154, 194, 155, -1, 156,
959 18, 157, 192, 158, -1, 159, 18, 157, 192, 160,
960 -1, 161, 193, 162, -1, 161, 162, -1, 159, 161,
961 193, 162, 160, -1, 159, 161, 162, 160, -1, 192,
962 163, -1, 192, -1, 193, 152, 192, -1, 193, -1,
963 193, 152, 40, -1, 40, -1, -1, 190, 156, 197,
964 158, -1, 190, 156, 158, -1, 190, 164, 30, -1,
965 190, 159, 197, 160, -1, 190, 161, 197, 162, -1,
966 190, 161, 162, -1, 190, 22, -1, 190, 23, -1,
967 190, 222, -1, 190, 196, -1, 190, 24, -1, 175,
968 167, -1, 176, 18, -1, 4, 25, -1, 4, 26,
969 -1, 178, 21, -1, 174, 154, 195, 39, 190, 155,
970 -1, 127, 154, 195, 237, 155, -1, 129, 154, 195,
971 152, 195, 152, 195, 155, -1, 168, 154, 195, 152,
972 195, 155, -1, 169, 154, 195, 152, 195, 155, -1,
973 170, 154, 195, 152, 195, 155, -1, 100, 171, 154,
974 195, 152, 195, 155, -1, 101, 172, 154, 195, 152,
975 195, 155, -1, 173, 154, 195, 152, 195, 155, -1,
976 135, 154, 195, 152, 195, 155, -1, 136, 154, 195,
977 152, 195, 152, 195, 155, -1, 137, 154, 195, 152,
978 195, 152, 195, 155, -1, 197, 152, 195, -1, 195,
979 -1, 35, -1, 36, -1, 200, -1, 200, 217, -1,
980 200, 219, -1, 200, 63, 62, 203, -1, 200, 31,
981 -1, 202, -1, 50, -1, 58, -1, 202, 179, 27,
982 188, -1, 202, 219, -1, 202, 63, 62, 203, -1,
983 202, 179, 180, 198, 195, 186, -1, 202, 179, 201,
984 198, 190, 186, -1, 202, 179, 45, 198, 190, 186,
985 -1, 202, 179, 47, 198, 190, 186, -1, 202, 51,
986 205, -1, 202, 59, 151, 206, -1, -1, 30, -1,
987 56, -1, 55, -1, 53, 151, 204, -1, 54, 151,
988 18, -1, 52, 151, 30, -1, 72, 151, 30, -1,
989 156, 207, 158, -1, 207, 152, 30, -1, 30, -1,
990 -1, 28, -1, 30, -1, 208, -1, -1, 190, 209,
991 -1, 211, 152, 210, -1, 210, -1, 211, -1, 211,
992 152, 40, -1, 40, -1, -1, 181, 188, 208, 154,
993 212, 155, 185, 182, -1, 32, -1, 161, -1, 180,
994 213, 214, -1, 33, -1, 162, -1, 215, 225, 216,
995 -1, -1, 45, -1, 47, -1, 34, 218, 213, -1,
996 -1, 64, -1, 17, -1, 18, -1, 21, -1, 25,
997 -1, 26, -1, 22, -1, 23, -1, 24, -1, 159,
998 197, 160, -1, 196, -1, 62, 220, 30, 152, 30,
999 -1, 166, -1, 208, -1, 222, -1, 221, -1, 190,
1000 223, -1, 225, 226, -1, 226, -1, 227, 229, -1,
1001 227, 231, -1, -1, 29, -1, 78, -1, 77, -1,
1002 73, 224, -1, 73, 3, -1, 74, 15, 223, -1,
1003 74, 4, 223, 152, 15, 223, 152, 15, 223, -1,
1004 75, 177, 223, 152, 15, 223, 156, 230, 158, -1,
1005 75, 177, 223, 152, 15, 223, 156, 158, -1, 179,
1006 76, 181, 188, 223, 154, 234, 155, 39, 15, 223,
1007 228, 15, 223, -1, 228, -1, 79, -1, 230, 177,
1008 221, 152, 15, 223, -1, 177, 221, 152, 15, 223,
1009 -1, 179, 236, -1, 190, 156, 223, 152, 223, 158,
1010 -1, 232, 152, 156, 223, 152, 223, 158, -1, 224,
1011 -1, 233, 152, 224, -1, 233, -1, -1, 61, 60,
1012 -1, 60, -1, 168, 190, 223, 152, 223, -1, 169,
1013 190, 223, 152, 223, -1, 170, 190, 223, 152, 223,
1014 -1, 100, 171, 190, 223, 152, 223, -1, 101, 172,
1015 190, 223, 152, 223, -1, 49, 224, -1, 173, 224,
1016 152, 224, -1, 174, 224, 39, 190, -1, 129, 224,
1017 152, 224, 152, 224, -1, 134, 224, 152, 190, -1,
1018 135, 224, 152, 224, -1, 136, 224, 152, 224, 152,
1019 224, -1, 137, 224, 152, 224, 152, 224, -1, 128,
1020 232, -1, 235, 181, 188, 223, 154, 234, 155, -1,
1021 239, -1, 152, 233, -1, -1, 38, -1, -1, 122,
1022 190, 183, -1, 122, 190, 152, 10, 223, 183, -1,
1023 123, 190, 183, -1, 123, 190, 152, 10, 223, 183,
1024 -1, 124, 224, -1, 238, 125, 190, 223, -1, 238,
1025 126, 224, 152, 190, 223, -1, 127, 190, 223, 237,
1029 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1030 static const unsigned short int yyrline[] =
1032 0, 343, 343, 343, 344, 344, 348, 348, 348, 348,
1033 348, 348, 348, 349, 349, 349, 349, 350, 350, 350,
1034 351, 351, 351, 351, 351, 351, 352, 352, 352, 352,
1035 352, 352, 352, 352, 352, 352, 353, 353, 353, 353,
1036 353, 353, 353, 353, 353, 353, 354, 354, 354, 354,
1037 354, 354, 355, 355, 355, 355, 356, 356, 356, 356,
1038 356, 356, 356, 357, 357, 357, 357, 357, 357, 362,
1039 362, 362, 362, 363, 363, 363, 363, 364, 364, 365,
1040 365, 368, 371, 376, 376, 376, 376, 376, 376, 377,
1041 378, 381, 381, 381, 381, 381, 382, 383, 388, 393,
1042 394, 397, 398, 406, 412, 413, 416, 417, 426, 427,
1043 440, 440, 441, 441, 442, 446, 446, 446, 446, 446,
1044 446, 446, 447, 447, 447, 447, 447, 449, 453, 457,
1045 460, 465, 471, 479, 487, 493, 497, 503, 507, 518,
1046 521, 529, 530, 535, 538, 548, 554, 559, 565, 571,
1047 577, 582, 588, 594, 600, 606, 612, 618, 624, 630,
1048 636, 644, 658, 670, 675, 681, 686, 692, 697, 702,
1049 710, 715, 720, 730, 735, 740, 740, 750, 755, 758,
1050 763, 767, 771, 773, 773, 776, 788, 793, 798, 807,
1051 816, 825, 834, 839, 844, 849, 851, 851, 854, 859,
1052 866, 871, 878, 885, 890, 891, 899, 899, 900, 900,
1053 902, 909, 913, 917, 920, 925, 928, 931, 950, 951,
1054 954, 965, 966, 968, 976, 977, 978, 982, 995, 996,
1055 999, 999, 999, 999, 999, 999, 999, 1000, 1001, 1006,
1056 1007, 1016, 1016, 1020, 1026, 1037, 1043, 1046, 1054, 1058,
1057 1063, 1066, 1072, 1072, 1074, 1079, 1084, 1089, 1097, 1104,
1058 1110, 1130, 1135, 1141, 1146, 1154, 1163, 1170, 1178, 1182,
1059 1189, 1190, 1194, 1199, 1202, 1208, 1213, 1219, 1224, 1229,
1060 1234, 1242, 1256, 1261, 1266, 1271, 1276, 1281, 1286, 1303,
1061 1308, 1309, 1313, 1314, 1317, 1324, 1331, 1338, 1345, 1350,
1066 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1067 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1068 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1069 static const char *const yytname[] =
1071 "$end", "error", "$undefined", "VOID", "BOOL", "SBYTE", "UBYTE",
1072 "SHORT", "USHORT", "INT", "UINT", "LONG", "ULONG", "FLOAT", "DOUBLE",
1073 "LABEL", "OPAQUE", "ESINT64VAL", "EUINT64VAL", "SINTVAL", "UINTVAL",
1074 "FPVAL", "NULL_TOK", "UNDEF", "ZEROINITIALIZER", "TRUETOK", "FALSETOK",
1075 "TYPE", "VAR_ID", "LABELSTR", "STRINGCONSTANT", "IMPLEMENTATION",
1076 "BEGINTOK", "ENDTOK", "DECLARE", "GLOBAL", "CONSTANT", "SECTION",
1077 "VOLATILE", "TO", "DOTDOTDOT", "CONST", "INTERNAL", "LINKONCE", "WEAK",
1078 "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "APPENDING", "NOT", "EXTERNAL",
1079 "TARGET", "TRIPLE", "ENDIAN", "POINTERSIZE", "LITTLE", "BIG", "ALIGN",
1080 "UNINITIALIZED", "DEPLIBS", "CALL", "TAIL", "ASM_TOK", "MODULE",
1081 "SIDEEFFECT", "CC_TOK", "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK",
1082 "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT",
1083 "RET", "BR", "SWITCH", "INVOKE", "EXCEPT", "UNWIND", "UNREACHABLE",
1084 "ADD", "SUB", "MUL", "DIV", "UDIV", "SDIV", "FDIV", "REM", "UREM",
1085 "SREM", "FREM", "AND", "OR", "XOR", "SETLE", "SETGE", "SETLT", "SETGT",
1086 "SETEQ", "SETNE", "ICMP", "FCMP", "EQ", "NE", "SLT", "SGT", "SLE", "SGE",
1087 "OEQ", "ONE", "OLT", "OGT", "OLE", "OGE", "ORD", "UNO", "UEQ", "UNE",
1088 "ULT", "UGT", "ULE", "UGE", "MALLOC", "ALLOCA", "FREE", "LOAD", "STORE",
1089 "GETELEMENTPTR", "PHI_TOK", "SELECT", "SHL", "SHR", "ASHR", "LSHR",
1090 "VAARG", "EXTRACTELEMENT", "INSERTELEMENT", "SHUFFLEVECTOR", "CAST",
1091 "TRUNC", "ZEXT", "SEXT", "FPTRUNC", "FPEXT", "FPTOUI", "FPTOSI",
1092 "UITOFP", "SITOFP", "PTRTOINT", "INTTOPTR", "BITCAST", "'='", "','",
1093 "'\\\\'", "'('", "')'", "'['", "'x'", "']'", "'<'", "'>'", "'{'", "'}'",
1094 "'*'", "'c'", "$accept", "IntVal", "EInt64Val", "ArithmeticOps",
1095 "LogicalOps", "SetCondOps", "IPredicates", "FPredicates", "ShiftOps",
1096 "CastOps", "SIntType", "UIntType", "IntType", "FPType", "OptAssign",
1097 "OptLinkage", "OptCallingConv", "OptAlign", "OptCAlign", "SectionString",
1098 "OptSection", "GlobalVarAttributes", "GlobalVarAttribute", "TypesV",
1099 "UpRTypesV", "Types", "PrimType", "UpRTypes", "TypeListI",
1100 "ArgTypeListI", "ConstVal", "ConstExpr", "ConstVector", "GlobalType",
1101 "Module", "DefinitionList", "External", "ConstPool", "AsmBlock",
1102 "BigOrLittle", "TargetDefinition", "LibrariesDefinition", "LibList",
1103 "Name", "OptName", "ArgVal", "ArgListH", "ArgList", "FunctionHeaderH",
1104 "BEGIN", "FunctionHeader", "END", "Function", "FnDeclareLinkage",
1105 "FunctionProto", "OptSideEffect", "ConstValueRef", "SymbolicValueRef",
1106 "ValueRef", "ResolvedVal", "BasicBlockList", "BasicBlock",
1107 "InstructionList", "Unwind", "BBTerminatorInst", "JumpTable", "Inst",
1108 "PHIList", "ValueRefList", "ValueRefListE", "OptTailCall", "InstVal",
1109 "IndexList", "OptVolatile", "MemoryInst", 0
1114 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1116 static const unsigned short int yytoknum[] =
1118 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1119 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1120 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1121 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1122 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1123 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1124 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1125 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1126 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1127 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1128 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1129 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1130 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
1131 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
1132 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
1133 405, 61, 44, 92, 40, 41, 91, 120, 93, 60,
1134 62, 123, 125, 42, 99
1138 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1139 static const unsigned char yyr1[] =
1141 0, 165, 166, 166, 167, 167, 168, 168, 168, 168,
1142 168, 168, 168, 168, 168, 168, 168, 169, 169, 169,
1143 170, 170, 170, 170, 170, 170, 171, 171, 171, 171,
1144 171, 171, 171, 171, 171, 171, 172, 172, 172, 172,
1145 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
1146 172, 172, 173, 173, 173, 173, 174, 174, 174, 174,
1147 174, 174, 174, 174, 174, 174, 174, 174, 174, 175,
1148 175, 175, 175, 176, 176, 176, 176, 177, 177, 178,
1149 178, 179, 179, 180, 180, 180, 180, 180, 180, 180,
1150 180, 181, 181, 181, 181, 181, 181, 181, 181, 182,
1151 182, 183, 183, 184, 185, 185, 186, 186, 187, 187,
1152 188, 188, 189, 189, 190, 191, 191, 191, 191, 191,
1153 191, 191, 191, 191, 191, 191, 191, 192, 192, 192,
1154 192, 192, 192, 192, 192, 192, 192, 192, 192, 193,
1155 193, 194, 194, 194, 194, 195, 195, 195, 195, 195,
1156 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
1157 195, 196, 196, 196, 196, 196, 196, 196, 196, 196,
1158 196, 196, 196, 197, 197, 198, 198, 199, 200, 200,
1159 200, 200, 200, 201, 201, 202, 202, 202, 202, 202,
1160 202, 202, 202, 202, 202, 203, 204, 204, 205, 205,
1161 205, 205, 206, 207, 207, 207, 208, 208, 209, 209,
1162 210, 211, 211, 212, 212, 212, 212, 213, 214, 214,
1163 215, 216, 216, 217, 218, 218, 218, 219, 220, 220,
1164 221, 221, 221, 221, 221, 221, 221, 221, 221, 221,
1165 221, 222, 222, 223, 223, 224, 225, 225, 226, 227,
1166 227, 227, 228, 228, 229, 229, 229, 229, 229, 229,
1167 229, 229, 229, 230, 230, 231, 232, 232, 233, 233,
1168 234, 234, 235, 235, 236, 236, 236, 236, 236, 236,
1169 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1170 237, 237, 238, 238, 239, 239, 239, 239, 239, 239,
1174 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1175 static const unsigned char yyr2[] =
1177 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1178 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1179 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1180 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1181 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1182 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1183 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1184 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1185 1, 2, 0, 1, 1, 1, 1, 1, 1, 1,
1186 0, 1, 1, 1, 1, 1, 1, 2, 0, 0,
1187 2, 0, 3, 2, 0, 1, 0, 3, 1, 2,
1188 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1189 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1190 2, 4, 5, 5, 3, 2, 5, 4, 2, 1,
1191 3, 1, 3, 1, 0, 4, 3, 3, 4, 4,
1192 3, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1193 2, 6, 5, 8, 6, 6, 6, 7, 7, 6,
1194 6, 8, 8, 3, 1, 1, 1, 1, 2, 2,
1195 4, 2, 1, 1, 1, 4, 2, 4, 6, 6,
1196 6, 6, 3, 4, 0, 1, 1, 1, 3, 3,
1197 3, 3, 3, 3, 1, 0, 1, 1, 1, 0,
1198 2, 3, 1, 1, 3, 1, 0, 8, 1, 1,
1199 3, 1, 1, 3, 0, 1, 1, 3, 0, 1,
1200 1, 1, 1, 1, 1, 1, 1, 1, 3, 1,
1201 5, 1, 1, 1, 1, 2, 2, 1, 2, 2,
1202 0, 1, 1, 1, 2, 2, 3, 9, 9, 8,
1203 14, 1, 1, 6, 5, 2, 6, 7, 1, 3,
1204 1, 0, 2, 1, 5, 5, 5, 6, 6, 2,
1205 4, 4, 6, 4, 4, 6, 6, 2, 7, 1,
1206 2, 0, 1, 0, 3, 6, 3, 6, 2, 4,
1210 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1211 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1212 means the default is an error. */
1213 static const unsigned short int yydefact[] =
1215 194, 0, 90, 182, 1, 181, 224, 83, 84, 85,
1216 87, 88, 89, 86, 0, 98, 250, 178, 179, 206,
1217 207, 0, 0, 0, 90, 0, 186, 225, 226, 98,
1218 0, 0, 91, 92, 93, 94, 95, 96, 0, 0,
1219 251, 250, 247, 82, 0, 0, 0, 0, 192, 0,
1220 0, 0, 0, 0, 183, 184, 0, 0, 81, 227,
1221 195, 180, 97, 111, 115, 116, 117, 118, 119, 120,
1222 121, 122, 123, 124, 125, 126, 127, 2, 3, 0,
1223 0, 0, 0, 241, 0, 0, 110, 129, 114, 242,
1224 128, 218, 219, 220, 221, 222, 223, 246, 0, 0,
1225 0, 253, 252, 262, 293, 261, 248, 249, 0, 0,
1226 0, 0, 205, 193, 187, 185, 175, 176, 0, 0,
1227 0, 0, 130, 0, 0, 0, 113, 135, 139, 0,
1228 0, 144, 138, 255, 0, 254, 0, 0, 72, 76,
1229 71, 75, 70, 74, 69, 73, 77, 78, 0, 292,
1230 0, 273, 0, 98, 6, 7, 8, 9, 10, 11,
1231 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1232 22, 23, 24, 25, 0, 0, 0, 0, 0, 0,
1233 0, 0, 52, 53, 54, 55, 0, 0, 0, 0,
1234 68, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1235 65, 66, 67, 0, 0, 0, 0, 0, 98, 265,
1236 0, 289, 200, 197, 196, 198, 199, 201, 204, 0,
1237 106, 106, 115, 116, 117, 118, 119, 120, 121, 122,
1238 123, 124, 125, 0, 0, 0, 0, 106, 106, 0,
1239 0, 0, 0, 0, 134, 216, 143, 141, 0, 230,
1240 231, 232, 235, 236, 237, 233, 234, 228, 0, 0,
1241 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1242 0, 239, 244, 243, 245, 0, 256, 0, 279, 272,
1243 0, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1244 35, 0, 50, 51, 36, 37, 38, 39, 40, 41,
1245 42, 43, 44, 45, 46, 47, 48, 49, 0, 101,
1246 101, 298, 0, 0, 287, 0, 0, 0, 0, 0,
1247 0, 0, 0, 0, 0, 0, 0, 0, 0, 202,
1248 0, 190, 191, 158, 159, 4, 5, 156, 157, 160,
1249 151, 152, 155, 0, 0, 0, 0, 154, 153, 188,
1250 189, 112, 112, 137, 0, 140, 215, 209, 212, 213,
1251 0, 0, 131, 229, 0, 0, 0, 0, 0, 0,
1252 0, 0, 174, 0, 0, 0, 0, 0, 0, 0,
1253 0, 0, 0, 0, 0, 294, 0, 296, 291, 0,
1254 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1255 0, 0, 0, 0, 203, 0, 0, 108, 106, 146,
1256 0, 0, 150, 0, 147, 132, 133, 136, 208, 210,
1257 0, 104, 142, 0, 0, 0, 291, 0, 0, 0,
1258 0, 0, 238, 0, 0, 0, 0, 0, 0, 0,
1259 0, 0, 0, 0, 0, 0, 0, 301, 0, 0,
1260 0, 283, 284, 0, 0, 0, 0, 0, 280, 281,
1261 0, 299, 0, 103, 109, 107, 145, 148, 149, 214,
1262 211, 105, 99, 0, 0, 0, 0, 0, 0, 0,
1263 0, 173, 0, 0, 0, 0, 0, 0, 0, 271,
1264 0, 0, 101, 102, 101, 268, 290, 0, 0, 0,
1265 0, 0, 274, 275, 276, 271, 0, 0, 217, 240,
1266 0, 0, 162, 0, 0, 0, 0, 0, 0, 0,
1267 0, 0, 0, 0, 270, 0, 277, 278, 0, 295,
1268 297, 0, 0, 0, 282, 285, 286, 0, 300, 100,
1269 0, 0, 0, 170, 0, 0, 164, 165, 166, 169,
1270 161, 0, 259, 0, 0, 0, 269, 266, 0, 288,
1271 167, 168, 0, 0, 0, 257, 0, 258, 0, 0,
1272 267, 163, 171, 172, 0, 0, 0, 0, 0, 0,
1273 264, 0, 0, 263, 0, 260
1276 /* YYDEFGOTO[NTERM-NUM]. */
1277 static const short int yydefgoto[] =
1279 -1, 83, 337, 266, 267, 268, 291, 308, 269, 270,
1280 233, 234, 148, 235, 24, 15, 38, 508, 385, 407,
1281 472, 331, 408, 84, 85, 236, 87, 88, 129, 248,
1282 372, 271, 373, 118, 1, 2, 57, 3, 61, 215,
1283 48, 113, 219, 89, 419, 358, 359, 360, 39, 93,
1284 16, 96, 17, 29, 18, 364, 272, 90, 274, 495,
1285 41, 42, 43, 105, 106, 554, 107, 314, 524, 525,
1286 208, 209, 447, 210, 211
1289 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1291 #define YYPACT_NINF -513
1292 static const short int yypact[] =
1294 -513, 46, 217, 541, -513, -513, 82, -513, -513, -513,
1295 -513, -513, -513, -513, 16, 111, 25, -513, -513, -513,
1296 -513, 34, -55, 61, 26, -23, -513, -513, -513, 111,
1297 132, 146, -513, -513, -513, -513, -513, -513, 873, -26,
1298 -513, -18, -513, 47, 19, 23, 39, 67, -513, 77,
1299 132, 873, 81, 81, -513, -513, 81, 81, -513, -513,
1300 -513, -513, -513, 86, -513, -513, -513, -513, -513, -513,
1301 -513, -513, -513, -513, -513, -513, -513, -513, -513, 223,
1302 225, -9, 506, -513, 133, 91, -513, -513, -111, -513,
1303 -513, -513, -513, -513, -513, -513, -513, -513, 901, 36,
1304 148, -513, -513, -513, 1336, -513, -513, -513, 219, 76,
1305 229, 222, 224, -513, -513, -513, -513, -513, 933, 933,
1306 963, 933, -513, 98, 100, 614, -513, -513, -111, -104,
1307 104, 216, -513, 86, 1134, -513, 1134, 1134, -513, -513,
1308 -513, -513, -513, -513, -513, -513, -513, -513, 1134, -513,
1309 933, -513, 206, 111, -513, -513, -513, -513, -513, -513,
1310 -513, -513, -513, -513, -513, -513, -513, -513, -513, -513,
1311 -513, -513, -513, -513, 195, 84, 933, 933, 933, 933,
1312 933, 933, -513, -513, -513, -513, 933, 933, 933, 933,
1313 -513, -513, -513, -513, -513, -513, -513, -513, -513, -513,
1314 -513, -513, -513, 933, 933, 933, 933, 933, 111, -513,
1315 11, -513, -513, -513, -513, -513, -513, -513, -513, -93,
1316 115, 115, 121, 166, 250, 169, 251, 191, 253, 193,
1317 254, 252, 257, 220, 256, 260, 1045, 115, 115, 933,
1318 933, 122, -73, 933, -513, 701, -513, 134, 129, -513,
1319 -513, -513, -513, -513, -513, -513, -513, 221, 195, 84,
1320 136, 137, 138, 140, 150, 963, 154, 156, 158, 167,
1321 168, -513, -513, -513, -513, 171, -513, 172, -513, -513,
1322 873, -513, -513, -513, -513, -513, -513, -513, -513, -513,
1323 -513, 933, -513, -513, -513, -513, -513, -513, -513, -513,
1324 -513, -513, -513, -513, -513, -513, -513, -513, 933, 173,
1325 174, -513, 1134, 164, 175, 176, 177, 178, 179, 182,
1326 1134, 1134, 1134, 183, 297, 873, 933, 933, 308, -513,
1327 -8, -513, -513, -513, -513, -513, -513, -513, -513, -513,
1328 -513, -513, -513, 741, 963, 673, 310, -513, -513, -513,
1329 -513, -113, -99, -513, 181, -111, -513, 133, -513, 190,
1330 189, 774, -513, -513, 315, 192, 194, 963, 963, 963,
1331 963, 963, -513, -58, 963, 963, 963, 963, 963, 332,
1332 337, 1134, 1134, 1134, -2, -513, 9, -513, 207, 1134,
1333 204, 933, 933, 933, 933, 933, 211, 212, 213, 933,
1334 933, 1134, 1134, 214, -513, 338, 349, -513, 115, -513,
1335 -61, -57, -513, -70, -513, -513, -513, -513, -513, -513,
1336 833, 333, -513, 231, 963, 963, 207, 235, 236, 237,
1337 238, 963, -513, 240, 241, 242, 243, 334, 1134, 1134,
1338 227, 244, 245, 1134, 353, 1134, 933, -513, 249, 1134,
1339 255, -513, -513, 258, 262, 1134, 1134, 1134, -513, -513,
1340 248, -513, 933, -513, -513, -513, -513, -513, -513, -513,
1341 -513, -513, 317, 346, 263, 264, 265, 963, 963, 963,
1342 963, -513, 963, 963, 963, 963, 933, 266, 247, 933,
1343 1134, 1134, 267, -513, 267, -513, 269, 1134, 270, 933,
1344 933, 933, -513, -513, -513, 933, 1134, 386, -513, -513,
1345 963, 963, -513, 271, 273, 277, 278, 276, 279, 282,
1346 283, 284, 390, 15, 269, 286, -513, -513, 352, -513,
1347 -513, 933, 259, 1134, -513, -513, -513, 289, -513, -513,
1348 292, 294, 963, -513, 963, 963, -513, -513, -513, -513,
1349 -513, 1134, -513, 1223, 27, 367, -513, -513, 274, -513,
1350 -513, -513, 295, 300, 303, -513, 281, -513, 1223, 444,
1351 -513, -513, -513, -513, 445, 312, 1134, 1134, 450, 135,
1352 -513, 1134, 451, -513, 1134, -513
1355 /* YYPGOTO[NTERM-NUM]. */
1356 static const short int yypgoto[] =
1358 -513, -513, -513, 364, 365, 368, 215, 218, 370, 372,
1359 -98, -97, -507, -513, 436, 456, -141, -513, -303, 60,
1360 -513, -220, -513, -46, -513, -38, -513, -68, -20, -513,
1361 130, 246, -230, 51, -513, -513, -513, -513, 433, -513,
1362 -513, -513, -513, 1, -513, 64, -513, -513, 457, -513,
1363 -513, -513, -513, -513, 482, -513, -512, -106, -3, -88,
1364 -513, 448, -513, -89, -513, -513, -513, -513, 45, -13,
1365 -513, -513, 69, -513, -513
1368 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1369 positive, shift that token. If negative, reduce the rule which
1370 number is the opposite. If zero, do what YYDEFACT says.
1371 If YYTABLE_NINF, syntax error. */
1372 #define YYTABLE_NINF -178
1373 static const short int yytable[] =
1375 86, 332, 146, 147, 25, 115, 91, 387, 443, 124,
1376 135, 40, 280, 86, 128, 94, 553, 349, 350, 445,
1377 138, 139, 140, 141, 142, 143, 144, 145, 273, 405,
1378 273, 273, 138, 139, 140, 141, 142, 143, 144, 145,
1379 136, 566, 273, -112, 25, 415, 4, 568, 243, 406,
1380 132, 137, 132, 51, 40, 444, 575, 128, 244, 328,
1381 134, 416, 278, 128, 132, 329, 444, 325, 7, 8,
1382 9, 52, 11, 53, 13, 19, 54, 20, 30, 243,
1383 220, 221, 431, 238, 55, 130, 44, 45, 46, 354,
1384 311, 431, 468, 315, 431, 431, 49, 466, 316, 317,
1385 318, 319, 432, 467, 119, 242, 47, 120, 121, 292,
1386 293, 247, 134, 410, 411, 413, 116, 117, 323, 324,
1387 98, 99, 100, 50, 101, 102, 103, 27, 58, 28,
1388 348, 213, 214, 275, 276, 92, 326, 327, 309, 310,
1389 134, 312, 313, 134, 95, 277, 333, 334, 134, 134,
1390 134, 134, 125, 138, 139, 140, 141, 142, 143, 144,
1391 145, 19, 60, 20, 62, 320, 321, 322, 134, 134,
1392 108, 351, 352, 552, 109, 355, 31, 32, 33, 34,
1393 35, 36, 37, -72, -72, 567, -71, -71, 465, 529,
1394 110, 530, 294, 295, 296, 297, 298, 299, 300, 301,
1395 302, 303, 304, 305, 306, 307, 273, 357, -70, -70,
1396 -69, -69, 101, 102, 273, 273, 273, -177, 111, 126,
1397 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
1398 74, 75, 76, 112, 381, 77, 78, 335, 336, 403,
1399 -113, 122, 86, 123, 19, 131, 20, 216, 5, 212,
1400 237, 6, 217, 382, 218, 239, 246, 240, 245, 7,
1401 8, 9, 10, 11, 12, 13, 279, 330, -76, -75,
1402 383, -74, -73, -79, 338, 273, 273, 273, -80, 401,
1403 14, 339, 353, 273, 362, 363, 361, 86, 402, 134,
1404 367, 368, 369, 355, 370, 273, 273, 281, 282, 283,
1405 284, 285, 286, 450, 371, 452, 453, 454, 374, 388,
1406 375, 458, 376, 287, 288, 289, 290, 396, 397, 398,
1407 389, 377, 378, 379, 380, 384, 386, 390, 391, 392,
1408 393, 394, 273, 273, 395, 399, 400, 273, 404, 273,
1409 414, 417, 420, 273, 421, 423, 424, 438, 425, 273,
1410 273, 273, 439, 134, 451, 134, 134, 134, 418, 446,
1411 449, 134, 459, 455, 456, 457, 462, 464, 463, 79,
1412 405, 493, 80, 486, 507, 81, 509, 82, 440, 441,
1413 442, 489, 357, 473, 273, 273, 448, 477, 478, 479,
1414 480, 273, 482, 483, 484, 485, 490, 491, 460, 461,
1415 273, 497, 505, 523, 539, 551, 569, 499, 134, 444,
1416 500, 534, 535, 536, 501, 510, 511, 557, 522, 528,
1417 512, 531, 533, 542, 506, 146, 147, 273, 543, 544,
1418 545, 546, 570, 574, 547, 487, 488, 548, 549, 550,
1419 492, 555, 494, 556, 559, 273, 498, 560, 521, 561,
1420 571, 134, 502, 503, 504, 572, 146, 147, 573, 576,
1421 577, 134, 134, 134, 578, 581, 584, 134, 203, 204,
1422 273, 273, 205, 365, 206, 273, 207, 366, 273, 104,
1423 56, 471, 347, 114, 470, 26, 59, 526, 527, 97,
1424 582, 496, 537, 134, 532, 476, 0, 426, 427, 428,
1425 429, 430, 0, 538, 433, 434, 435, 436, 437, 126,
1426 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
1427 74, 75, 76, 0, 0, 77, 78, 0, 0, 0,
1428 558, 0, 0, 0, 19, 0, 20, 0, 0, 0,
1429 0, 0, 0, 0, 0, 0, 0, 0, 565, 0,
1430 0, 0, 0, 0, 474, 475, 0, 0, 0, 0,
1431 0, 481, 0, 0, 0, 0, 0, 0, -82, 19,
1432 0, 20, 0, 579, 580, 6, -82, -82, 583, 0,
1433 0, 585, 0, -82, -82, -82, -82, -82, -82, -82,
1434 0, -82, 21, 0, 0, 0, 0, 0, 0, -82,
1435 22, 0, 0, 0, 23, 0, 0, 513, 514, 515,
1436 516, 0, 517, 518, 519, 520, 0, 126, 64, 65,
1437 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
1438 76, 0, 0, 77, 78, 0, 0, 0, 0, 0,
1439 540, 541, 19, 0, 20, 0, 0, 0, 0, 0,
1440 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,
1441 0, 0, 80, 0, 0, 81, 0, 82, 127, 0,
1442 0, 0, 562, 0, 563, 564, 126, 222, 223, 224,
1443 225, 226, 227, 228, 229, 230, 231, 232, 75, 76,
1444 0, 0, 77, 78, 0, 0, 0, 0, 0, 0,
1445 0, 19, 0, 20, 126, 64, 65, 66, 67, 68,
1446 69, 70, 71, 72, 73, 74, 75, 76, 0, 0,
1447 77, 78, 0, 0, 0, 0, 0, 0, 0, 19,
1448 0, 20, 0, 0, 0, 0, 0, 0, 0, 0,
1449 0, 356, 0, 0, 126, 222, 223, 224, 225, 226,
1450 227, 228, 229, 230, 231, 232, 75, 76, 0, 0,
1451 77, 78, 0, 0, 0, 0, 0, 79, 0, 19,
1452 80, 20, 0, 81, 0, 82, 241, 126, 64, 65,
1453 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
1454 76, 0, 0, 77, 78, 0, 0, 0, 0, 0,
1455 0, 0, 19, 0, 20, 0, 0, 0, 0, 0,
1456 0, 0, 0, 0, 422, 0, 0, 0, 0, 0,
1457 0, 0, 0, 0, 0, 0, 79, 0, 0, 80,
1458 0, 0, 81, 0, 82, 412, 126, 64, 65, 66,
1459 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
1460 0, 0, 77, 78, 79, 0, 0, 80, 0, 0,
1461 81, 19, 82, 20, 0, 0, 0, 0, 0, 0,
1462 0, 0, 0, 469, 0, 0, 63, 64, 65, 66,
1463 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
1464 0, 0, 77, 78, 79, 0, 0, 80, 0, 409,
1465 81, 19, 82, 20, 133, 64, 65, 66, 67, 68,
1466 69, 70, 71, 72, 73, 74, 75, 76, 0, 0,
1467 77, 78, 0, 0, 0, 0, 0, 79, 0, 19,
1468 80, 20, 0, 81, 0, 82, 126, 64, 65, 66,
1469 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
1470 0, 0, 77, 78, 0, 0, 0, 0, 0, 0,
1471 0, 19, 0, 20, 0, 0, 126, 222, 223, 224,
1472 225, 226, 227, 228, 229, 230, 231, 232, 75, 76,
1473 0, 0, 77, 78, 0, 0, 79, 0, 0, 80,
1474 0, 19, 81, 20, 82, 0, 0, 0, 0, 0,
1475 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1476 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1477 0, 0, 0, 0, 0, 0, 79, 0, 0, 80,
1478 0, 0, 81, 0, 82, 0, 0, 0, 0, 0,
1479 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1480 0, 0, 0, 0, 79, 0, 0, 80, 0, 0,
1481 81, 0, 82, 0, 77, 78, 0, 340, 341, 342,
1482 0, 0, 0, 19, 0, 20, 0, 0, 0, 0,
1483 0, 0, 0, 0, 0, 0, 79, 0, 0, 80,
1484 0, 0, 81, 0, 82, 0, 0, 0, 0, 0,
1485 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1486 0, 0, 0, 0, 0, 0, 79, 0, 0, 80,
1487 0, 0, 81, 0, 82, 154, 155, 156, 157, 158,
1488 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
1489 169, 170, 171, 172, 173, 258, 259, 0, 0, 0,
1490 0, 249, 250, 77, 78, 251, 252, 253, 254, 255,
1491 256, 0, 19, 0, 20, 0, 0, 0, 0, 0,
1492 0, 0, 260, 0, 261, 182, 183, 184, 185, 0,
1493 262, 263, 264, 190, 191, 192, 193, 194, 195, 196,
1494 197, 198, 199, 200, 201, 202, 257, 0, 0, 0,
1495 0, 343, 0, 0, 344, 0, 345, 0, 0, 346,
1496 0, 0, 0, 0, 154, 155, 156, 157, 158, 159,
1497 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
1498 170, 171, 172, 173, 258, 259, 0, 0, 0, 0,
1499 249, 250, 0, 0, 251, 252, 253, 254, 255, 256,
1500 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1501 0, 260, 0, 261, 182, 183, 184, 185, 0, 262,
1502 263, 264, 190, 191, 192, 193, 194, 195, 196, 197,
1503 198, 199, 200, 201, 202, 257, 0, 0, 0, 0,
1504 0, 0, 0, 265, 0, 0, 0, 0, 0, 0,
1505 0, 0, 0, 154, 155, 156, 157, 158, 159, 160,
1506 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
1507 171, 172, 173, 258, 259, 0, 0, 0, 0, 0,
1508 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1509 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1510 260, 0, 261, 182, 183, 184, 185, 0, 262, 263,
1511 264, 190, 191, 192, 193, 194, 195, 196, 197, 198,
1512 199, 200, 201, 202, 149, 0, 0, 0, 0, 0,
1513 0, 0, 265, 0, 0, 150, 0, 0, 0, 0,
1514 0, 0, 0, 0, 0, 0, 151, 152, 0, 0,
1515 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1516 0, 0, 153, 0, 0, 0, 154, 155, 156, 157,
1517 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
1518 168, 169, 170, 171, 172, 173, 174, 175, 0, 0,
1519 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1520 0, 0, 0, 0, 0, 0, 0, 0, 176, 177,
1521 178, 0, 0, 179, 180, 181, 182, 183, 184, 185,
1522 186, 187, 188, 189, 190, 191, 192, 193, 194, 195,
1523 196, 197, 198, 199, 200, 201, 202
1526 static const short int yycheck[] =
1528 38, 221, 100, 100, 3, 51, 32, 310, 10, 18,
1529 98, 29, 153, 51, 82, 33, 523, 237, 238, 10,
1530 5, 6, 7, 8, 9, 10, 11, 12, 134, 37,
1531 136, 137, 5, 6, 7, 8, 9, 10, 11, 12,
1532 4, 553, 148, 154, 43, 158, 0, 554, 152, 57,
1533 163, 15, 163, 27, 29, 57, 568, 125, 162, 152,
1534 98, 160, 150, 131, 163, 158, 57, 208, 42, 43,
1535 44, 45, 46, 47, 48, 28, 50, 30, 62, 152,
1536 118, 119, 152, 121, 58, 84, 52, 53, 54, 162,
1537 178, 152, 162, 181, 152, 152, 151, 158, 186, 187,
1538 188, 189, 160, 160, 53, 125, 72, 56, 57, 25,
1539 26, 131, 150, 343, 344, 345, 35, 36, 206, 207,
1540 73, 74, 75, 62, 77, 78, 79, 45, 151, 47,
1541 236, 55, 56, 136, 137, 161, 125, 126, 176, 177,
1542 178, 179, 180, 181, 162, 148, 25, 26, 186, 187,
1543 188, 189, 161, 5, 6, 7, 8, 9, 10, 11,
1544 12, 28, 30, 30, 18, 203, 204, 205, 206, 207,
1545 151, 239, 240, 158, 151, 243, 65, 66, 67, 68,
1546 69, 70, 71, 17, 18, 158, 17, 18, 408, 492,
1547 151, 494, 108, 109, 110, 111, 112, 113, 114, 115,
1548 116, 117, 118, 119, 120, 121, 312, 245, 17, 18,
1549 17, 18, 77, 78, 320, 321, 322, 0, 151, 3,
1550 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1551 14, 15, 16, 156, 280, 19, 20, 17, 18, 327,
1552 154, 18, 280, 18, 28, 154, 30, 18, 31, 30,
1553 120, 34, 30, 291, 30, 157, 40, 157, 154, 42,
1554 43, 44, 45, 46, 47, 48, 60, 152, 18, 18,
1555 308, 18, 18, 21, 18, 381, 382, 383, 21, 325,
1556 63, 21, 160, 389, 155, 64, 152, 325, 326, 327,
1557 154, 154, 154, 361, 154, 401, 402, 102, 103, 104,
1558 105, 106, 107, 391, 154, 393, 394, 395, 154, 312,
1559 154, 399, 154, 118, 119, 120, 121, 320, 321, 322,
1560 156, 154, 154, 152, 152, 152, 152, 152, 152, 152,
1561 152, 152, 438, 439, 152, 152, 39, 443, 30, 445,
1562 30, 160, 152, 449, 155, 30, 154, 15, 154, 455,
1563 456, 457, 15, 391, 392, 393, 394, 395, 357, 152,
1564 156, 399, 400, 152, 152, 152, 152, 18, 30, 153,
1565 37, 18, 156, 39, 57, 159, 30, 161, 381, 382,
1566 383, 154, 420, 152, 490, 491, 389, 152, 152, 152,
1567 152, 497, 152, 152, 152, 152, 152, 152, 401, 402,
1568 506, 152, 154, 156, 18, 15, 39, 152, 446, 57,
1569 152, 499, 500, 501, 152, 152, 152, 158, 152, 152,
1570 155, 152, 152, 152, 462, 523, 523, 533, 155, 152,
1571 152, 155, 158, 152, 155, 438, 439, 155, 155, 155,
1572 443, 155, 445, 531, 155, 551, 449, 155, 486, 155,
1573 155, 489, 455, 456, 457, 155, 554, 554, 155, 15,
1574 15, 499, 500, 501, 152, 15, 15, 505, 104, 104,
1575 576, 577, 104, 258, 104, 581, 104, 259, 584, 43,
1576 24, 421, 236, 50, 420, 3, 29, 490, 491, 41,
1577 579, 446, 505, 531, 497, 426, -1, 367, 368, 369,
1578 370, 371, -1, 506, 374, 375, 376, 377, 378, 3,
1579 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1580 14, 15, 16, -1, -1, 19, 20, -1, -1, -1,
1581 533, -1, -1, -1, 28, -1, 30, -1, -1, -1,
1582 -1, -1, -1, -1, -1, -1, -1, -1, 551, -1,
1583 -1, -1, -1, -1, 424, 425, -1, -1, -1, -1,
1584 -1, 431, -1, -1, -1, -1, -1, -1, 27, 28,
1585 -1, 30, -1, 576, 577, 34, 35, 36, 581, -1,
1586 -1, 584, -1, 42, 43, 44, 45, 46, 47, 48,
1587 -1, 50, 51, -1, -1, -1, -1, -1, -1, 58,
1588 59, -1, -1, -1, 63, -1, -1, 477, 478, 479,
1589 480, -1, 482, 483, 484, 485, -1, 3, 4, 5,
1590 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1591 16, -1, -1, 19, 20, -1, -1, -1, -1, -1,
1592 510, 511, 28, -1, 30, -1, -1, -1, -1, -1,
1593 -1, -1, -1, -1, -1, -1, -1, -1, -1, 153,
1594 -1, -1, 156, -1, -1, 159, -1, 161, 162, -1,
1595 -1, -1, 542, -1, 544, 545, 3, 4, 5, 6,
1596 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1597 -1, -1, 19, 20, -1, -1, -1, -1, -1, -1,
1598 -1, 28, -1, 30, 3, 4, 5, 6, 7, 8,
1599 9, 10, 11, 12, 13, 14, 15, 16, -1, -1,
1600 19, 20, -1, -1, -1, -1, -1, -1, -1, 28,
1601 -1, 30, -1, -1, -1, -1, -1, -1, -1, -1,
1602 -1, 40, -1, -1, 3, 4, 5, 6, 7, 8,
1603 9, 10, 11, 12, 13, 14, 15, 16, -1, -1,
1604 19, 20, -1, -1, -1, -1, -1, 153, -1, 28,
1605 156, 30, -1, 159, -1, 161, 162, 3, 4, 5,
1606 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1607 16, -1, -1, 19, 20, -1, -1, -1, -1, -1,
1608 -1, -1, 28, -1, 30, -1, -1, -1, -1, -1,
1609 -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
1610 -1, -1, -1, -1, -1, -1, 153, -1, -1, 156,
1611 -1, -1, 159, -1, 161, 162, 3, 4, 5, 6,
1612 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1613 -1, -1, 19, 20, 153, -1, -1, 156, -1, -1,
1614 159, 28, 161, 30, -1, -1, -1, -1, -1, -1,
1615 -1, -1, -1, 40, -1, -1, 3, 4, 5, 6,
1616 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1617 -1, -1, 19, 20, 153, -1, -1, 156, -1, 158,
1618 159, 28, 161, 30, 3, 4, 5, 6, 7, 8,
1619 9, 10, 11, 12, 13, 14, 15, 16, -1, -1,
1620 19, 20, -1, -1, -1, -1, -1, 153, -1, 28,
1621 156, 30, -1, 159, -1, 161, 3, 4, 5, 6,
1622 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1623 -1, -1, 19, 20, -1, -1, -1, -1, -1, -1,
1624 -1, 28, -1, 30, -1, -1, 3, 4, 5, 6,
1625 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1626 -1, -1, 19, 20, -1, -1, 153, -1, -1, 156,
1627 -1, 28, 159, 30, 161, -1, -1, -1, -1, -1,
1628 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1629 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1630 -1, -1, -1, -1, -1, -1, 153, -1, -1, 156,
1631 -1, -1, 159, -1, 161, -1, -1, -1, -1, -1,
1632 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1633 -1, -1, -1, -1, 153, -1, -1, 156, -1, -1,
1634 159, -1, 161, -1, 19, 20, -1, 22, 23, 24,
1635 -1, -1, -1, 28, -1, 30, -1, -1, -1, -1,
1636 -1, -1, -1, -1, -1, -1, 153, -1, -1, 156,
1637 -1, -1, 159, -1, 161, -1, -1, -1, -1, -1,
1638 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1639 -1, -1, -1, -1, -1, -1, 153, -1, -1, 156,
1640 -1, -1, 159, -1, 161, 80, 81, 82, 83, 84,
1641 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1642 95, 96, 97, 98, 99, 100, 101, -1, -1, -1,
1643 -1, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1644 26, -1, 28, -1, 30, -1, -1, -1, -1, -1,
1645 -1, -1, 127, -1, 129, 130, 131, 132, 133, -1,
1646 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
1647 145, 146, 147, 148, 149, 150, 62, -1, -1, -1,
1648 -1, 156, -1, -1, 159, -1, 161, -1, -1, 164,
1649 -1, -1, -1, -1, 80, 81, 82, 83, 84, 85,
1650 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1651 96, 97, 98, 99, 100, 101, -1, -1, -1, -1,
1652 17, 18, -1, -1, 21, 22, 23, 24, 25, 26,
1653 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1654 -1, 127, -1, 129, 130, 131, 132, 133, -1, 135,
1655 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
1656 146, 147, 148, 149, 150, 62, -1, -1, -1, -1,
1657 -1, -1, -1, 159, -1, -1, -1, -1, -1, -1,
1658 -1, -1, -1, 80, 81, 82, 83, 84, 85, 86,
1659 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
1660 97, 98, 99, 100, 101, -1, -1, -1, -1, -1,
1661 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1662 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1663 127, -1, 129, 130, 131, 132, 133, -1, 135, 136,
1664 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
1665 147, 148, 149, 150, 38, -1, -1, -1, -1, -1,
1666 -1, -1, 159, -1, -1, 49, -1, -1, -1, -1,
1667 -1, -1, -1, -1, -1, -1, 60, 61, -1, -1,
1668 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1669 -1, -1, 76, -1, -1, -1, 80, 81, 82, 83,
1670 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
1671 94, 95, 96, 97, 98, 99, 100, 101, -1, -1,
1672 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1673 -1, -1, -1, -1, -1, -1, -1, -1, 122, 123,
1674 124, -1, -1, 127, 128, 129, 130, 131, 132, 133,
1675 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1676 144, 145, 146, 147, 148, 149, 150
1679 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1680 symbol of state STATE-NUM. */
1681 static const unsigned char yystos[] =
1683 0, 199, 200, 202, 0, 31, 34, 42, 43, 44,
1684 45, 46, 47, 48, 63, 180, 215, 217, 219, 28,
1685 30, 51, 59, 63, 179, 208, 219, 45, 47, 218,
1686 62, 65, 66, 67, 68, 69, 70, 71, 181, 213,
1687 29, 225, 226, 227, 52, 53, 54, 72, 205, 151,
1688 62, 27, 45, 47, 50, 58, 180, 201, 151, 213,
1689 30, 203, 18, 3, 4, 5, 6, 7, 8, 9,
1690 10, 11, 12, 13, 14, 15, 16, 19, 20, 153,
1691 156, 159, 161, 166, 188, 189, 190, 191, 192, 208,
1692 222, 32, 161, 214, 33, 162, 216, 226, 73, 74,
1693 75, 77, 78, 79, 179, 228, 229, 231, 151, 151,
1694 151, 151, 156, 206, 203, 188, 35, 36, 198, 198,
1695 198, 198, 18, 18, 18, 161, 3, 162, 192, 193,
1696 208, 154, 163, 3, 190, 224, 4, 15, 5, 6,
1697 7, 8, 9, 10, 11, 12, 175, 176, 177, 38,
1698 49, 60, 61, 76, 80, 81, 82, 83, 84, 85,
1699 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1700 96, 97, 98, 99, 100, 101, 122, 123, 124, 127,
1701 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
1702 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
1703 148, 149, 150, 168, 169, 170, 173, 174, 235, 236,
1704 238, 239, 30, 55, 56, 204, 18, 30, 30, 207,
1705 190, 190, 4, 5, 6, 7, 8, 9, 10, 11,
1706 12, 13, 14, 175, 176, 178, 190, 195, 190, 157,
1707 157, 162, 193, 152, 162, 154, 40, 193, 194, 17,
1708 18, 21, 22, 23, 24, 25, 26, 62, 100, 101,
1709 127, 129, 135, 136, 137, 159, 168, 169, 170, 173,
1710 174, 196, 221, 222, 223, 223, 223, 223, 224, 60,
1711 181, 102, 103, 104, 105, 106, 107, 118, 119, 120,
1712 121, 171, 25, 26, 108, 109, 110, 111, 112, 113,
1713 114, 115, 116, 117, 118, 119, 120, 121, 172, 190,
1714 190, 224, 190, 190, 232, 224, 224, 224, 224, 224,
1715 190, 190, 190, 224, 224, 181, 125, 126, 152, 158,
1716 152, 186, 186, 25, 26, 17, 18, 167, 18, 21,
1717 22, 23, 24, 156, 159, 161, 164, 196, 222, 186,
1718 186, 192, 192, 160, 162, 192, 40, 190, 210, 211,
1719 212, 152, 155, 64, 220, 171, 172, 154, 154, 154,
1720 154, 154, 195, 197, 154, 154, 154, 154, 154, 152,
1721 152, 188, 190, 190, 152, 183, 152, 183, 223, 156,
1722 152, 152, 152, 152, 152, 152, 223, 223, 223, 152,
1723 39, 188, 190, 224, 30, 37, 57, 184, 187, 158,
1724 197, 197, 162, 197, 30, 158, 160, 160, 208, 209,
1725 152, 155, 40, 30, 154, 154, 195, 195, 195, 195,
1726 195, 152, 160, 195, 195, 195, 195, 195, 15, 15,
1727 223, 223, 223, 10, 57, 10, 152, 237, 223, 156,
1728 224, 190, 224, 224, 224, 152, 152, 152, 224, 190,
1729 223, 223, 152, 30, 18, 186, 158, 160, 162, 40,
1730 210, 184, 185, 152, 195, 195, 237, 152, 152, 152,
1731 152, 195, 152, 152, 152, 152, 39, 223, 223, 154,
1732 152, 152, 223, 18, 223, 224, 233, 152, 223, 152,
1733 152, 152, 223, 223, 223, 154, 190, 57, 182, 30,
1734 152, 152, 155, 195, 195, 195, 195, 195, 195, 195,
1735 195, 190, 152, 156, 233, 234, 223, 223, 152, 183,
1736 183, 152, 223, 152, 224, 224, 224, 234, 223, 18,
1737 195, 195, 152, 155, 152, 152, 155, 155, 155, 155,
1738 155, 15, 158, 177, 230, 155, 224, 158, 223, 155,
1739 155, 155, 195, 195, 195, 223, 221, 158, 177, 39,
1740 158, 155, 155, 155, 152, 221, 15, 15, 152, 223,
1741 223, 15, 228, 223, 15, 223
1744 #define yyerrok (yyerrstatus = 0)
1745 #define yyclearin (yychar = YYEMPTY)
1746 #define YYEMPTY (-2)
1749 #define YYACCEPT goto yyacceptlab
1750 #define YYABORT goto yyabortlab
1751 #define YYERROR goto yyerrorlab
1754 /* Like YYERROR except do call yyerror. This remains here temporarily
1755 to ease the transition to the new meaning of YYERROR, for GCC.
1756 Once GCC version 2 has supplanted version 1, this can go. */
1758 #define YYFAIL goto yyerrlab
1760 #define YYRECOVERING() (!!yyerrstatus)
1762 #define YYBACKUP(Token, Value) \
1764 if (yychar == YYEMPTY && yylen == 1) \
1768 yytoken = YYTRANSLATE (yychar); \
1774 yyerror (YY_("syntax error: cannot back up")); \
1781 #define YYERRCODE 256
1784 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1785 If N is 0, then set CURRENT to the empty location which ends
1786 the previous symbol: RHS[0] (always defined). */
1788 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1789 #ifndef YYLLOC_DEFAULT
1790 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1794 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1795 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1796 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1797 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1801 (Current).first_line = (Current).last_line = \
1802 YYRHSLOC (Rhs, 0).last_line; \
1803 (Current).first_column = (Current).last_column = \
1804 YYRHSLOC (Rhs, 0).last_column; \
1810 /* YY_LOCATION_PRINT -- Print the location on the stream.
1811 This macro was not mandated originally: define only if we know
1812 we won't break user code: when these are the locations we know. */
1814 #ifndef YY_LOCATION_PRINT
1815 # if YYLTYPE_IS_TRIVIAL
1816 # define YY_LOCATION_PRINT(File, Loc) \
1817 fprintf (File, "%d.%d-%d.%d", \
1818 (Loc).first_line, (Loc).first_column, \
1819 (Loc).last_line, (Loc).last_column)
1821 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1826 /* YYLEX -- calling `yylex' with the right arguments. */
1829 # define YYLEX yylex (YYLEX_PARAM)
1831 # define YYLEX yylex ()
1834 /* Enable debugging if requested. */
1838 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1839 # define YYFPRINTF fprintf
1842 # define YYDPRINTF(Args) \
1848 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1852 YYFPRINTF (stderr, "%s ", Title); \
1853 yysymprint (stderr, \
1855 YYFPRINTF (stderr, "\n"); \
1859 /*------------------------------------------------------------------.
1860 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1862 `------------------------------------------------------------------*/
1864 #if defined (__STDC__) || defined (__cplusplus)
1866 yy_stack_print (short int *bottom, short int *top)
1869 yy_stack_print (bottom, top)
1874 YYFPRINTF (stderr, "Stack now");
1875 for (/* Nothing. */; bottom <= top; ++bottom)
1876 YYFPRINTF (stderr, " %d", *bottom);
1877 YYFPRINTF (stderr, "\n");
1880 # define YY_STACK_PRINT(Bottom, Top) \
1883 yy_stack_print ((Bottom), (Top)); \
1887 /*------------------------------------------------.
1888 | Report that the YYRULE is going to be reduced. |
1889 `------------------------------------------------*/
1891 #if defined (__STDC__) || defined (__cplusplus)
1893 yy_reduce_print (int yyrule)
1896 yy_reduce_print (yyrule)
1901 unsigned long int yylno = yyrline[yyrule];
1902 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
1904 /* Print the symbols being reduced, and their result. */
1905 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
1906 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1907 YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
1910 # define YY_REDUCE_PRINT(Rule) \
1913 yy_reduce_print (Rule); \
1916 /* Nonzero means print parse trace. It is left uninitialized so that
1917 multiple parsers can coexist. */
1919 #else /* !YYDEBUG */
1920 # define YYDPRINTF(Args)
1921 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1922 # define YY_STACK_PRINT(Bottom, Top)
1923 # define YY_REDUCE_PRINT(Rule)
1924 #endif /* !YYDEBUG */
1927 /* YYINITDEPTH -- initial size of the parser's stacks. */
1929 # define YYINITDEPTH 200
1932 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1933 if the built-in stack extension method is used).
1935 Do not make this value too large; the results are undefined if
1936 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1937 evaluated with infinite-precision integer arithmetic. */
1940 # define YYMAXDEPTH 10000
1948 # if defined (__GLIBC__) && defined (_STRING_H)
1949 # define yystrlen strlen
1951 /* Return the length of YYSTR. */
1953 # if defined (__STDC__) || defined (__cplusplus)
1954 yystrlen (const char *yystr)
1960 const char *yys = yystr;
1962 while (*yys++ != '\0')
1965 return yys - yystr - 1;
1971 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1972 # define yystpcpy stpcpy
1974 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1977 # if defined (__STDC__) || defined (__cplusplus)
1978 yystpcpy (char *yydest, const char *yysrc)
1980 yystpcpy (yydest, yysrc)
1986 const char *yys = yysrc;
1988 while ((*yyd++ = *yys++) != '\0')
1997 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1998 quotes and backslashes, so that it's suitable for yyerror. The
1999 heuristic is that double-quoting is unnecessary unless the string
2000 contains an apostrophe, a comma, or backslash (other than
2001 backslash-backslash). YYSTR is taken from yytname. If YYRES is
2002 null, do not copy; instead, return the length of what the result
2005 yytnamerr (char *yyres, const char *yystr)
2010 char const *yyp = yystr;
2017 goto do_not_strip_quotes;
2021 goto do_not_strip_quotes;
2034 do_not_strip_quotes: ;
2038 return yystrlen (yystr);
2040 return yystpcpy (yyres, yystr) - yyres;
2044 #endif /* YYERROR_VERBOSE */
2049 /*--------------------------------.
2050 | Print this symbol on YYOUTPUT. |
2051 `--------------------------------*/
2053 #if defined (__STDC__) || defined (__cplusplus)
2055 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
2058 yysymprint (yyoutput, yytype, yyvaluep)
2064 /* Pacify ``unused variable'' warnings. */
2067 if (yytype < YYNTOKENS)
2068 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
2070 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
2074 if (yytype < YYNTOKENS)
2075 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
2082 YYFPRINTF (yyoutput, ")");
2085 #endif /* ! YYDEBUG */
2086 /*-----------------------------------------------.
2087 | Release the memory associated to this symbol. |
2088 `-----------------------------------------------*/
2090 #if defined (__STDC__) || defined (__cplusplus)
2092 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
2095 yydestruct (yymsg, yytype, yyvaluep)
2101 /* Pacify ``unused variable'' warnings. */
2106 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2117 /* Prevent warnings from -Wmissing-prototypes. */
2119 #ifdef YYPARSE_PARAM
2120 # if defined (__STDC__) || defined (__cplusplus)
2121 int yyparse (void *YYPARSE_PARAM);
2125 #else /* ! YYPARSE_PARAM */
2126 #if defined (__STDC__) || defined (__cplusplus)
2131 #endif /* ! YYPARSE_PARAM */
2135 /* The look-ahead symbol. */
2138 /* The semantic value of the look-ahead symbol. */
2141 /* Number of syntax errors so far. */
2150 #ifdef YYPARSE_PARAM
2151 # if defined (__STDC__) || defined (__cplusplus)
2152 int yyparse (void *YYPARSE_PARAM)
2154 int yyparse (YYPARSE_PARAM)
2155 void *YYPARSE_PARAM;
2157 #else /* ! YYPARSE_PARAM */
2158 #if defined (__STDC__) || defined (__cplusplus)
2172 /* Number of tokens to shift before error messages enabled. */
2174 /* Look-ahead token as an internal (translated) token number. */
2177 /* Three stacks and their tools:
2178 `yyss': related to states,
2179 `yyvs': related to semantic values,
2180 `yyls': related to locations.
2182 Refer to the stacks thru separate pointers, to allow yyoverflow
2183 to reallocate them elsewhere. */
2185 /* The state stack. */
2186 short int yyssa[YYINITDEPTH];
2187 short int *yyss = yyssa;
2190 /* The semantic value stack. */
2191 YYSTYPE yyvsa[YYINITDEPTH];
2192 YYSTYPE *yyvs = yyvsa;
2197 #define YYPOPSTACK (yyvsp--, yyssp--)
2199 YYSIZE_T yystacksize = YYINITDEPTH;
2201 /* The variables used to return semantic value and location from the
2206 /* When reducing, the number of symbols on the RHS of the reduced
2210 YYDPRINTF ((stderr, "Starting parse\n"));
2215 yychar = YYEMPTY; /* Cause a token to be read. */
2217 /* Initialize stack pointers.
2218 Waste one element of value and location stack
2219 so that they stay on the same level as the state stack.
2220 The wasted elements are never initialized. */
2227 /*------------------------------------------------------------.
2228 | yynewstate -- Push a new state, which is found in yystate. |
2229 `------------------------------------------------------------*/
2231 /* In all cases, when you get here, the value and location stacks
2232 have just been pushed. so pushing a state here evens the stacks.
2239 if (yyss + yystacksize - 1 <= yyssp)
2241 /* Get the current used size of the three stacks, in elements. */
2242 YYSIZE_T yysize = yyssp - yyss + 1;
2246 /* Give user a chance to reallocate the stack. Use copies of
2247 these so that the &'s don't force the real ones into
2249 YYSTYPE *yyvs1 = yyvs;
2250 short int *yyss1 = yyss;
2253 /* Each stack pointer address is followed by the size of the
2254 data in use in that stack, in bytes. This used to be a
2255 conditional around just the two extra args, but that might
2256 be undefined if yyoverflow is a macro. */
2257 yyoverflow (YY_("memory exhausted"),
2258 &yyss1, yysize * sizeof (*yyssp),
2259 &yyvs1, yysize * sizeof (*yyvsp),
2266 #else /* no yyoverflow */
2267 # ifndef YYSTACK_RELOCATE
2268 goto yyexhaustedlab;
2270 /* Extend the stack our own way. */
2271 if (YYMAXDEPTH <= yystacksize)
2272 goto yyexhaustedlab;
2274 if (YYMAXDEPTH < yystacksize)
2275 yystacksize = YYMAXDEPTH;
2278 short int *yyss1 = yyss;
2279 union yyalloc *yyptr =
2280 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2282 goto yyexhaustedlab;
2283 YYSTACK_RELOCATE (yyss);
2284 YYSTACK_RELOCATE (yyvs);
2286 # undef YYSTACK_RELOCATE
2288 YYSTACK_FREE (yyss1);
2291 #endif /* no yyoverflow */
2293 yyssp = yyss + yysize - 1;
2294 yyvsp = yyvs + yysize - 1;
2297 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2298 (unsigned long int) yystacksize));
2300 if (yyss + yystacksize - 1 <= yyssp)
2304 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2313 /* Do appropriate processing given the current state. */
2314 /* Read a look-ahead token if we need one and don't already have one. */
2317 /* First try to decide what to do without reference to look-ahead token. */
2319 yyn = yypact[yystate];
2320 if (yyn == YYPACT_NINF)
2323 /* Not known => get a look-ahead token if don't already have one. */
2325 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
2326 if (yychar == YYEMPTY)
2328 YYDPRINTF ((stderr, "Reading a token: "));
2332 if (yychar <= YYEOF)
2334 yychar = yytoken = YYEOF;
2335 YYDPRINTF ((stderr, "Now at end of input.\n"));
2339 yytoken = YYTRANSLATE (yychar);
2340 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2343 /* If the proper action on seeing token YYTOKEN is to reduce or to
2344 detect an error, take that action. */
2346 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2351 if (yyn == 0 || yyn == YYTABLE_NINF)
2360 /* Shift the look-ahead token. */
2361 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2363 /* Discard the token being shifted unless it is eof. */
2364 if (yychar != YYEOF)
2370 /* Count tokens shifted since error; after three, turn off error
2379 /*-----------------------------------------------------------.
2380 | yydefault -- do the default action for the current state. |
2381 `-----------------------------------------------------------*/
2383 yyn = yydefact[yystate];
2389 /*-----------------------------.
2390 | yyreduce -- Do a reduction. |
2391 `-----------------------------*/
2393 /* yyn is the number of a rule to reduce with. */
2396 /* If YYLEN is nonzero, implement the default value of the action:
2399 Otherwise, the following line sets YYVAL to garbage.
2400 This behavior is undocumented and Bison
2401 users should not rely upon it. Assigning to YYVAL
2402 unconditionally makes the parser a bit smaller, and it avoids a
2403 GCC warning that YYVAL may be used uninitialized. */
2404 yyval = yyvsp[1-yylen];
2407 YY_REDUCE_PRINT (yyn);
2411 #line 368 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2413 (yyval.String) = (yyvsp[-1].String);
2418 #line 371 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2420 (yyval.String) = new std::string("");
2425 #line 378 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2426 { (yyval.String) = new std::string(""); ;}
2430 #line 383 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2432 *(yyvsp[-1].String) += *(yyvsp[0].String);
2433 delete (yyvsp[0].String);
2434 (yyval.String) = (yyvsp[-1].String);
2439 #line 388 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2440 { (yyval.String) = new std::string(""); ;}
2444 #line 393 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2445 { (yyval.String) = new std::string(); ;}
2449 #line 394 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2450 { *(yyvsp[-1].String) += " " + *(yyvsp[0].String); delete (yyvsp[0].String); (yyval.String) = (yyvsp[-1].String); ;}
2454 #line 397 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2455 { (yyval.String) = new std::string(); ;}
2459 #line 398 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2461 (yyvsp[-1].String)->insert(0, ", ");
2462 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2463 delete (yyvsp[0].String);
2464 (yyval.String) = (yyvsp[-1].String);
2469 #line 406 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2471 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2472 delete (yyvsp[0].String);
2473 (yyval.String) = (yyvsp[-1].String);
2478 #line 412 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2479 { (yyval.String) = new std::string(); ;}
2483 #line 416 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2484 { (yyval.String) = new std::string(); ;}
2488 #line 417 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2490 (yyvsp[-1].String)->insert(0, ", ");
2491 if (!(yyvsp[0].String)->empty())
2492 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2493 delete (yyvsp[0].String);
2494 (yyval.String) = (yyvsp[-1].String);
2499 #line 427 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2501 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2502 delete (yyvsp[0].String);
2503 (yyval.String) = (yyvsp[-1].String);
2508 #line 449 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2510 (yyval.Type).newTy = (yyvsp[0].String);
2511 (yyval.Type).oldTy = OpaqueTy;
2516 #line 453 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2518 (yyval.Type).newTy = (yyvsp[0].String);
2519 (yyval.Type).oldTy = UnresolvedTy;
2524 #line 457 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2526 (yyval.Type) = (yyvsp[0].Type);
2531 #line 460 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2532 { // Type UpReference
2533 (yyvsp[0].String)->insert(0, "\\");
2534 (yyval.Type).newTy = (yyvsp[0].String);
2535 (yyval.Type).oldTy = NumericTy;
2540 #line 465 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2541 { // Function derived type?
2542 *(yyvsp[-3].Type).newTy += "( " + *(yyvsp[-1].String) + " )";
2543 delete (yyvsp[-1].String);
2544 (yyval.Type).newTy = (yyvsp[-3].Type).newTy;
2545 (yyval.Type).oldTy = FunctionTy;
2550 #line 471 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2551 { // Sized array type?
2552 (yyvsp[-3].String)->insert(0,"[ ");
2553 *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " ]";
2554 delete (yyvsp[-1].Type).newTy;
2555 (yyval.Type).newTy = (yyvsp[-3].String);
2556 (yyval.Type).oldTy = ArrayTy;
2557 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2562 #line 479 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2563 { // Packed array type?
2564 (yyvsp[-3].String)->insert(0,"< ");
2565 *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " >";
2566 delete (yyvsp[-1].Type).newTy;
2567 (yyval.Type).newTy = (yyvsp[-3].String);
2568 (yyval.Type).oldTy = PackedTy;
2569 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2574 #line 487 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2575 { // Structure type?
2576 (yyvsp[-1].String)->insert(0, "{ ");
2577 *(yyvsp[-1].String) += " }";
2578 (yyval.Type).newTy = (yyvsp[-1].String);
2579 (yyval.Type).oldTy = StructTy;
2584 #line 493 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2585 { // Empty structure type?
2586 (yyval.Type).newTy = new std::string("{}");
2587 (yyval.Type).oldTy = StructTy;
2592 #line 497 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2593 { // Packed Structure type?
2594 (yyvsp[-2].String)->insert(0, "<{ ");
2595 *(yyvsp[-2].String) += " }>";
2596 (yyval.Type).newTy = (yyvsp[-2].String);
2597 (yyval.Type).oldTy = StructTy;
2602 #line 503 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2603 { // Empty packed structure type?
2604 (yyval.Type).newTy = new std::string("<{}>");
2605 (yyval.Type).oldTy = StructTy;
2610 #line 507 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2612 *(yyvsp[-1].Type).newTy += '*';
2613 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2614 (yyvsp[-1].Type).oldTy = PointerTy;
2615 (yyval.Type) = (yyvsp[-1].Type);
2620 #line 518 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2622 (yyval.String) = (yyvsp[0].Type).newTy;
2627 #line 521 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2629 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Type).newTy;
2630 delete (yyvsp[0].Type).newTy;
2631 (yyval.String) = (yyvsp[-2].String);
2636 #line 530 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2638 *(yyvsp[-2].String) += ", ...";
2639 delete (yyvsp[0].String);
2640 (yyval.String) = (yyvsp[-2].String);
2645 #line 535 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2647 (yyval.String) = (yyvsp[0].String);
2652 #line 538 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2654 (yyval.String) = new std::string();
2659 #line 548 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2660 { // Nonempty unsized arr
2661 (yyval.Const).type = (yyvsp[-3].Type);
2662 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2663 *(yyval.Const).cnst += " [ " + *(yyvsp[-1].String) + " ]";
2664 delete (yyvsp[-1].String);
2669 #line 554 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2671 (yyval.Const).type = (yyvsp[-2].Type);
2672 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2673 *(yyval.Const).cnst += "[ ]";
2678 #line 559 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2680 (yyval.Const).type = (yyvsp[-2].Type);
2681 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2682 *(yyval.Const).cnst += " c" + *(yyvsp[0].String);
2683 delete (yyvsp[0].String);
2688 #line 565 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2689 { // Nonempty unsized arr
2690 (yyval.Const).type = (yyvsp[-3].Type);
2691 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2692 *(yyval.Const).cnst += " < " + *(yyvsp[-1].String) + " >";
2693 delete (yyvsp[-1].String);
2698 #line 571 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2700 (yyval.Const).type = (yyvsp[-3].Type);
2701 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2702 *(yyval.Const).cnst += " { " + *(yyvsp[-1].String) + " }";
2703 delete (yyvsp[-1].String);
2708 #line 577 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2710 (yyval.Const).type = (yyvsp[-2].Type);
2711 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2712 *(yyval.Const).cnst += " {}";
2717 #line 582 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2719 (yyval.Const).type = (yyvsp[-1].Type);
2720 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2721 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2722 delete (yyvsp[0].String);
2727 #line 588 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2729 (yyval.Const).type = (yyvsp[-1].Type);
2730 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2731 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2732 delete (yyvsp[0].String);
2737 #line 594 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2739 (yyval.Const).type = (yyvsp[-1].Type);
2740 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2741 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2742 delete (yyvsp[0].String);
2747 #line 600 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2749 (yyval.Const).type = (yyvsp[-1].Type);
2750 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2751 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2752 delete (yyvsp[0].String);
2757 #line 606 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2759 (yyval.Const).type = (yyvsp[-1].Type);
2760 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2761 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2762 delete (yyvsp[0].String);
2767 #line 612 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2768 { // integral constants
2769 (yyval.Const).type = (yyvsp[-1].Type);
2770 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2771 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2772 delete (yyvsp[0].String);
2777 #line 618 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2778 { // integral constants
2779 (yyval.Const).type = (yyvsp[-1].Type);
2780 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2781 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2782 delete (yyvsp[0].String);
2787 #line 624 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2788 { // Boolean constants
2789 (yyval.Const).type = (yyvsp[-1].Type);
2790 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2791 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2792 delete (yyvsp[0].String);
2797 #line 630 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2798 { // Boolean constants
2799 (yyval.Const).type = (yyvsp[-1].Type);
2800 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2801 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2802 delete (yyvsp[0].String);
2807 #line 636 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2808 { // Float & Double constants
2809 (yyval.Const).type = (yyvsp[-1].Type);
2810 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2811 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2812 delete (yyvsp[0].String);
2817 #line 644 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2819 std::string source = *(yyvsp[-3].Const).cnst;
2820 TypeInfo DstTy = (yyvsp[-1].Type);
2822 if (*(yyvsp[-5].String) == "cast") {
2823 // Call getCastUpgrade to upgrade the old cast
2824 (yyval.String) = new std::string(getCastUpgrade(source, (yyvsp[-3].Const).type, (yyvsp[-1].Type), true));
2826 // Nothing to upgrade, just create the cast constant expr
2827 (yyval.String) = new std::string(*(yyvsp[-5].String));
2828 *(yyval.String) += "( " + source + " to " + *(yyvsp[-1].Type).newTy + ")";
2830 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
2835 #line 658 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2837 *(yyvsp[-4].String) += "(" + *(yyvsp[-2].Const).cnst;
2838 for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
2839 ValueInfo& VI = (*(yyvsp[-1].ValList))[i];
2840 *(yyvsp[-4].String) += ", " + *VI.val;
2843 *(yyvsp[-4].String) += ")";
2844 (yyval.String) = (yyvsp[-4].String);
2845 (yyvsp[-2].Const).destroy();
2846 delete (yyvsp[-1].ValList);
2851 #line 670 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2853 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2854 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2855 (yyval.String) = (yyvsp[-7].String);
2860 #line 675 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2862 const char* op = getDivRemOpcode(*(yyvsp[-5].String), (yyvsp[-3].Const).type);
2863 (yyval.String) = new std::string(op);
2864 *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2865 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2870 #line 681 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2872 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2873 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2874 (yyval.String) = (yyvsp[-5].String);
2879 #line 686 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2881 *(yyvsp[-5].String) = getCompareOp(*(yyvsp[-5].String), (yyvsp[-3].Const).type);
2882 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2883 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2884 (yyval.String) = (yyvsp[-5].String);
2889 #line 692 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2891 *(yyvsp[-6].String) += "(" + *(yyvsp[-5].String) + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2892 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2893 (yyval.String) = (yyvsp[-6].String);
2898 #line 697 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2900 *(yyvsp[-6].String) += "(" + *(yyvsp[-5].String) + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2901 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2902 (yyval.String) = (yyvsp[-6].String);
2907 #line 702 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2909 const char* shiftop = (yyvsp[-5].String)->c_str();
2910 if (*(yyvsp[-5].String) == "shr")
2911 shiftop = ((yyvsp[-3].Const).type.isUnsigned()) ? "lshr" : "ashr";
2912 (yyval.String) = new std::string(shiftop);
2913 *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2914 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2919 #line 710 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2921 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2922 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2923 (yyval.String) = (yyvsp[-5].String);
2928 #line 715 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2930 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2931 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2932 (yyval.String) = (yyvsp[-7].String);
2937 #line 720 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2939 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2940 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2941 (yyval.String) = (yyvsp[-7].String);
2946 #line 730 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2948 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Const).cnst;
2949 (yyvsp[0].Const).destroy();
2950 (yyval.String) = (yyvsp[-2].String);
2955 #line 735 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2956 { (yyval.String) = new std::string(*(yyvsp[0].Const).cnst); (yyvsp[0].Const).destroy(); ;}
2960 #line 750 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2966 #line 755 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2973 #line 758 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2975 *O << *(yyvsp[0].String) << '\n';
2976 delete (yyvsp[0].String);
2982 #line 763 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2984 *O << "module asm " << ' ' << *(yyvsp[0].String) << '\n';
2990 #line 767 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2992 *O << "implementation\n";
2998 #line 771 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
2999 { (yyval.String) = 0; ;}
3003 #line 773 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3004 { (yyval.String) = (yyvsp[0].String); *(yyval.String) = "external"; ;}
3008 #line 776 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3010 EnumeratedTypes.push_back((yyvsp[0].Type));
3011 if (!(yyvsp[-2].String)->empty()) {
3012 NamedTypes[*(yyvsp[-2].String)].newTy = new std::string(*(yyvsp[0].Type).newTy);
3013 NamedTypes[*(yyvsp[-2].String)].oldTy = (yyvsp[0].Type).oldTy;
3014 NamedTypes[*(yyvsp[-2].String)].elemTy = (yyvsp[0].Type).elemTy;
3015 *O << *(yyvsp[-2].String) << " = ";
3017 *O << "type " << *(yyvsp[0].Type).newTy << '\n';
3018 delete (yyvsp[-2].String); delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3024 #line 788 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3025 { // Function prototypes can be in const pool
3026 *O << *(yyvsp[0].String) << '\n';
3027 delete (yyvsp[0].String);
3033 #line 793 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3034 { // Asm blocks can be in the const pool
3035 *O << *(yyvsp[-2].String) << ' ' << *(yyvsp[-1].String) << ' ' << *(yyvsp[0].String) << '\n';
3036 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3042 #line 798 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3044 if (!(yyvsp[-4].String)->empty()) {
3045 *O << *(yyvsp[-4].String) << " = ";
3046 Globals[*(yyvsp[-4].String)] = (yyvsp[-1].Const).type.clone();
3048 *O << *(yyvsp[-3].String) << ' ' << *(yyvsp[-2].String) << ' ' << *(yyvsp[-1].Const).cnst << ' ' << *(yyvsp[0].String) << '\n';
3049 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Const).destroy(); delete (yyvsp[0].String);
3055 #line 807 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3057 if (!(yyvsp[-4].String)->empty()) {
3058 *O << *(yyvsp[-4].String) << " = ";
3059 Globals[*(yyvsp[-4].String)] = (yyvsp[-1].Type).clone();
3061 *O << *(yyvsp[-3].String) << ' ' << *(yyvsp[-2].String) << ' ' << *(yyvsp[-1].Type).newTy << ' ' << *(yyvsp[0].String) << '\n';
3062 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3068 #line 816 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3070 if (!(yyvsp[-4].String)->empty()) {
3071 *O << *(yyvsp[-4].String) << " = ";
3072 Globals[*(yyvsp[-4].String)] = (yyvsp[-1].Type).clone();
3074 *O << *(yyvsp[-3].String) << ' ' << *(yyvsp[-2].String) << ' ' << *(yyvsp[-1].Type).newTy << ' ' << *(yyvsp[0].String) << '\n';
3075 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3081 #line 825 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3083 if (!(yyvsp[-4].String)->empty()) {
3084 *O << *(yyvsp[-4].String) << " = ";
3085 Globals[*(yyvsp[-4].String)] = (yyvsp[-1].Type).clone();
3087 *O << *(yyvsp[-3].String) << ' ' << *(yyvsp[-2].String) << ' ' << *(yyvsp[-1].Type).newTy << ' ' << *(yyvsp[0].String) << '\n';
3088 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3094 #line 834 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3096 *O << *(yyvsp[-1].String) << ' ' << *(yyvsp[0].String) << '\n';
3097 delete (yyvsp[-1].String); delete (yyvsp[0].String);
3103 #line 839 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3105 *O << *(yyvsp[-2].String) << " = " << *(yyvsp[0].String) << '\n';
3106 delete (yyvsp[-2].String); delete (yyvsp[0].String);
3112 #line 844 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3119 #line 854 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3121 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3122 delete (yyvsp[0].String);
3123 (yyval.String) = (yyvsp[-2].String);
3128 #line 859 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3130 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3131 if (*(yyvsp[0].String) == "64")
3133 delete (yyvsp[0].String);
3134 (yyval.String) = (yyvsp[-2].String);
3139 #line 866 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3141 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3142 delete (yyvsp[0].String);
3143 (yyval.String) = (yyvsp[-2].String);
3148 #line 871 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3150 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3151 delete (yyvsp[0].String);
3152 (yyval.String) = (yyvsp[-2].String);
3157 #line 878 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3159 (yyvsp[-1].String)->insert(0, "[ ");
3160 *(yyvsp[-1].String) += " ]";
3161 (yyval.String) = (yyvsp[-1].String);
3166 #line 885 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3168 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
3169 delete (yyvsp[0].String);
3170 (yyval.String) = (yyvsp[-2].String);
3175 #line 891 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3177 (yyval.String) = new std::string();
3182 #line 900 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3183 { (yyval.String) = new std::string(); ;}
3187 #line 902 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3189 (yyval.String) = (yyvsp[-1].Type).newTy;
3190 if (!(yyvsp[0].String)->empty())
3191 *(yyval.String) += " " + *(yyvsp[0].String);
3192 delete (yyvsp[0].String);
3197 #line 909 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3199 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
3200 delete (yyvsp[0].String);
3205 #line 913 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3207 (yyval.String) = (yyvsp[0].String);
3212 #line 917 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3214 (yyval.String) = (yyvsp[0].String);
3219 #line 920 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3221 *(yyvsp[-2].String) += ", ...";
3222 (yyval.String) = (yyvsp[-2].String);
3223 delete (yyvsp[0].String);
3228 #line 925 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3230 (yyval.String) = (yyvsp[0].String);
3235 #line 928 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3236 { (yyval.String) = new std::string(); ;}
3240 #line 931 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3242 if (!(yyvsp[-7].String)->empty()) {
3243 *(yyvsp[-7].String) += " ";
3245 *(yyvsp[-7].String) += *(yyvsp[-6].Type).newTy + " " + *(yyvsp[-5].String) + "(" + *(yyvsp[-3].String) + ")";
3246 if (!(yyvsp[-1].String)->empty()) {
3247 *(yyvsp[-7].String) += " " + *(yyvsp[-1].String);
3249 if (!(yyvsp[0].String)->empty()) {
3250 *(yyvsp[-7].String) += " " + *(yyvsp[0].String);
3252 (yyvsp[-6].Type).destroy();
3253 delete (yyvsp[-5].String);
3254 delete (yyvsp[-3].String);
3255 delete (yyvsp[-1].String);
3256 delete (yyvsp[0].String);
3257 (yyval.String) = (yyvsp[-7].String);
3262 #line 950 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3263 { (yyval.String) = new std::string("{"); delete (yyvsp[0].String); ;}
3267 #line 951 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3268 { (yyval.String) = new std::string ("{"); ;}
3272 #line 954 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3275 if (!(yyvsp[-2].String)->empty()) {
3276 *O << *(yyvsp[-2].String) << ' ';
3278 *O << *(yyvsp[-1].String) << ' ' << *(yyvsp[0].String) << '\n';
3279 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3285 #line 965 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3286 { (yyval.String) = new std::string("}"); delete (yyvsp[0].String); ;}
3290 #line 966 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3291 { (yyval.String) = new std::string("}"); ;}
3295 #line 968 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3297 if ((yyvsp[-1].String))
3298 *O << *(yyvsp[-1].String);
3299 *O << *(yyvsp[0].String) << "\n\n";
3305 #line 976 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3306 { (yyval.String) = new std::string(); ;}
3310 #line 982 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3312 if (!(yyvsp[-1].String)->empty())
3313 *(yyvsp[-2].String) += " " + *(yyvsp[-1].String);
3314 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3315 delete (yyvsp[-1].String);
3316 delete (yyvsp[0].String);
3317 (yyval.String) = (yyvsp[-2].String);
3322 #line 995 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3323 { (yyval.String) = new std::string(); ;}
3327 #line 1001 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3329 (yyvsp[-1].String)->insert(0, "<");
3330 *(yyvsp[-1].String) += ">";
3331 (yyval.String) = (yyvsp[-1].String);
3336 #line 1007 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3338 if (!(yyvsp[-3].String)->empty()) {
3339 *(yyvsp[-4].String) += " " + *(yyvsp[-3].String);
3341 *(yyvsp[-4].String) += " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
3342 delete (yyvsp[-3].String); delete (yyvsp[-2].String); delete (yyvsp[0].String);
3343 (yyval.String) = (yyvsp[-4].String);
3348 #line 1020 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3350 (yyval.Value).val = (yyvsp[0].String);
3351 (yyval.Value).constant = false;
3352 (yyval.Value).type.newTy = 0;
3353 (yyval.Value).type.oldTy = UnresolvedTy;
3358 #line 1026 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3360 (yyval.Value).val = (yyvsp[0].String);
3361 (yyval.Value).constant = true;
3362 (yyval.Value).type.newTy = 0;
3363 (yyval.Value).type.oldTy = UnresolvedTy;
3368 #line 1037 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3370 (yyval.Value) = (yyvsp[0].Value);
3371 (yyval.Value).type = (yyvsp[-1].Type);
3372 (yyval.Value).val->insert(0, *(yyvsp[-1].Type).newTy + " ");
3377 #line 1043 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3384 #line 1046 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3385 { // Do not allow functions with 0 basic blocks
3391 #line 1054 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3398 #line 1058 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3400 *O << " " << *(yyvsp[0].String) << '\n';
3401 delete (yyvsp[0].String);
3407 #line 1063 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3414 #line 1066 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3416 *O << *(yyvsp[0].String) << '\n';
3417 delete (yyvsp[0].String);
3423 #line 1072 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3424 { (yyval.String) = (yyvsp[0].String); *(yyval.String) = "unwind"; ;}
3428 #line 1074 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3429 { // Return with a result...
3430 *O << " " << *(yyvsp[-1].String) << ' ' << *(yyvsp[0].Value).val << '\n';
3431 delete (yyvsp[-1].String); (yyvsp[0].Value).destroy();
3437 #line 1079 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3438 { // Return with no result...
3439 *O << " " << *(yyvsp[-1].String) << ' ' << *(yyvsp[0].Type).newTy << '\n';
3440 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3446 #line 1084 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3447 { // Unconditional Branch...
3448 *O << " " << *(yyvsp[-2].String) << ' ' << *(yyvsp[-1].Type).newTy << ' ' << *(yyvsp[0].Value).val << '\n';
3449 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3455 #line 1089 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3457 *O << " " << *(yyvsp[-8].String) << ' ' << *(yyvsp[-7].Type).newTy << ' ' << *(yyvsp[-6].Value).val << ", "
3458 << *(yyvsp[-4].Type).newTy << ' ' << *(yyvsp[-3].Value).val << ", " << *(yyvsp[-1].Type).newTy << ' '
3459 << *(yyvsp[0].Value).val << '\n';
3460 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); (yyvsp[-6].Value).destroy(); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy();
3461 (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3467 #line 1097 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3469 *O << " " << *(yyvsp[-8].String) << ' ' << *(yyvsp[-7].Type).newTy << ' ' << *(yyvsp[-6].Value).val << ", "
3470 << *(yyvsp[-4].Type).newTy << ' ' << *(yyvsp[-3].Value).val << " [" << *(yyvsp[-1].String) << " ]\n";
3471 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); (yyvsp[-6].Value).destroy(); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy();
3472 delete (yyvsp[-1].String);
3478 #line 1104 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3480 *O << " " << *(yyvsp[-7].String) << ' ' << *(yyvsp[-6].Type).newTy << ' ' << *(yyvsp[-5].Value).val << ", "
3481 << *(yyvsp[-3].Type).newTy << ' ' << *(yyvsp[-2].Value).val << "[]\n";
3482 delete (yyvsp[-7].String); (yyvsp[-6].Type).destroy(); (yyvsp[-5].Value).destroy(); (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy();
3488 #line 1111 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3491 if (!(yyvsp[-13].String)->empty())
3492 *O << *(yyvsp[-13].String) << " = ";
3493 *O << *(yyvsp[-12].String) << ' ' << *(yyvsp[-11].String) << ' ' << *(yyvsp[-10].Type).newTy << ' ' << *(yyvsp[-9].Value).val << " (";
3494 for (unsigned i = 0; i < (yyvsp[-7].ValList)->size(); ++i) {
3495 ValueInfo& VI = (*(yyvsp[-7].ValList))[i];
3497 if (i+1 < (yyvsp[-7].ValList)->size())
3501 *O << ") " << *(yyvsp[-5].String) << ' ' << *(yyvsp[-4].Type).newTy << ' ' << *(yyvsp[-3].Value).val << ' '
3502 << *(yyvsp[-2].String) << ' ' << *(yyvsp[-1].Type).newTy << ' ' << *(yyvsp[0].Value).val << '\n';
3503 delete (yyvsp[-13].String); delete (yyvsp[-12].String); delete (yyvsp[-11].String); (yyvsp[-10].Type).destroy(); (yyvsp[-9].Value).destroy(); delete (yyvsp[-7].ValList);
3504 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
3505 (yyvsp[0].Value).destroy();
3511 #line 1130 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3513 *O << " " << *(yyvsp[0].String) << '\n';
3514 delete (yyvsp[0].String);
3520 #line 1135 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3522 *O << " " << *(yyvsp[0].String) << '\n';
3523 delete (yyvsp[0].String);
3529 #line 1141 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3531 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].String) + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3532 (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3533 (yyval.String) = (yyvsp[-5].String);
3538 #line 1146 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3540 (yyvsp[-3].String)->insert(0, *(yyvsp[-4].Type).newTy + " " );
3541 *(yyvsp[-3].String) += ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3542 (yyvsp[-4].Type).destroy(); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3543 (yyval.String) = (yyvsp[-3].String);
3548 #line 1154 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3550 if (!(yyvsp[-1].String)->empty())
3551 *(yyvsp[-1].String) += " = ";
3552 *(yyvsp[-1].String) += *(yyvsp[0].String);
3553 delete (yyvsp[0].String);
3554 (yyval.String) = (yyvsp[-1].String);
3559 #line 1163 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3560 { // Used for PHI nodes
3561 (yyvsp[-3].Value).val->insert(0, *(yyvsp[-5].Type).newTy + "[");
3562 *(yyvsp[-3].Value).val += "," + *(yyvsp[-1].Value).val + "]";
3563 (yyvsp[-5].Type).destroy(); (yyvsp[-1].Value).destroy();
3564 (yyval.String) = new std::string(*(yyvsp[-3].Value).val);
3565 (yyvsp[-3].Value).destroy();
3570 #line 1170 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3572 *(yyvsp[-6].String) += ", [" + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + "]";
3573 (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
3574 (yyval.String) = (yyvsp[-6].String);
3579 #line 1178 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3581 (yyval.ValList) = new ValueList();
3582 (yyval.ValList)->push_back((yyvsp[0].Value));
3587 #line 1182 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3589 (yyvsp[-2].ValList)->push_back((yyvsp[0].Value));
3590 (yyval.ValList) = (yyvsp[-2].ValList);
3595 #line 1189 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3596 { (yyval.ValList) = (yyvsp[0].ValList); ;}
3600 #line 1190 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3601 { (yyval.ValList) = new ValueList(); ;}
3605 #line 1194 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3607 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3608 delete (yyvsp[0].String);
3609 (yyval.String) = (yyvsp[-1].String);
3614 #line 1202 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3616 const char* op = getDivRemOpcode(*(yyvsp[-4].String), (yyvsp[-3].Type));
3617 (yyval.String) = new std::string(op);
3618 *(yyval.String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3619 delete (yyvsp[-4].String); (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3624 #line 1208 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3626 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3627 (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3628 (yyval.String) = (yyvsp[-4].String);
3633 #line 1213 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3635 *(yyvsp[-4].String) = getCompareOp(*(yyvsp[-4].String), (yyvsp[-3].Type));
3636 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3637 (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3638 (yyval.String) = (yyvsp[-4].String);
3643 #line 1219 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3645 *(yyvsp[-5].String) += " " + *(yyvsp[-4].String) + " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + "," + *(yyvsp[0].Value).val;
3646 delete (yyvsp[-4].String); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3647 (yyval.String) = (yyvsp[-5].String);
3652 #line 1224 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3654 *(yyvsp[-5].String) += " " + *(yyvsp[-4].String) + " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + "," + *(yyvsp[0].Value).val;
3655 delete (yyvsp[-4].String); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3656 (yyval.String) = (yyvsp[-5].String);
3661 #line 1229 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3663 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3664 (yyvsp[0].Value).destroy();
3665 (yyval.String) = (yyvsp[-1].String);
3670 #line 1234 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3672 const char* shiftop = (yyvsp[-3].String)->c_str();
3673 if (*(yyvsp[-3].String) == "shr")
3674 shiftop = ((yyvsp[-2].Value).type.isUnsigned()) ? "lshr" : "ashr";
3675 (yyval.String) = new std::string(shiftop);
3676 *(yyval.String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3677 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3682 #line 1242 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3684 std::string source = *(yyvsp[-2].Value).val;
3685 TypeInfo SrcTy = (yyvsp[-2].Value).type;
3686 TypeInfo DstTy = (yyvsp[0].Type);
3688 (yyval.String) = new std::string();
3689 if (*(yyvsp[-3].String) == "cast") {
3690 *(yyval.String) += getCastUpgrade(source, SrcTy, DstTy, false);
3692 *(yyval.String) += *(yyvsp[-3].String) + " " + source + " to " + *DstTy.newTy;
3694 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy();
3695 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3700 #line 1256 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3702 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3703 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3704 (yyval.String) = (yyvsp[-5].String);
3709 #line 1261 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3711 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Type).newTy;
3712 (yyvsp[-2].Value).destroy(); (yyvsp[0].Type).destroy();
3713 (yyval.String) = (yyvsp[-3].String);
3718 #line 1266 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3720 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3721 (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3722 (yyval.String) = (yyvsp[-3].String);
3727 #line 1271 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3729 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3730 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3731 (yyval.String) = (yyvsp[-5].String);
3736 #line 1276 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3738 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3739 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3740 (yyval.String) = (yyvsp[-5].String);
3745 #line 1281 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3747 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3748 delete (yyvsp[0].String);
3749 (yyval.String) = (yyvsp[-1].String);
3754 #line 1286 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3756 if (!(yyvsp[-5].String)->empty())
3757 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String);
3758 if (!(yyvsp[-6].String)->empty())
3759 *(yyvsp[-6].String) += " ";
3760 *(yyvsp[-6].String) += *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].Value).val + "(";
3761 for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
3762 ValueInfo& VI = (*(yyvsp[-1].ValList))[i];
3763 *(yyvsp[-6].String) += *VI.val;
3764 if (i+1 < (yyvsp[-1].ValList)->size())
3765 *(yyvsp[-6].String) += ", ";
3768 *(yyvsp[-6].String) += ")";
3769 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); delete (yyvsp[-1].ValList);
3770 (yyval.String) = (yyvsp[-6].String);
3775 #line 1308 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3776 { (yyval.ValList) = (yyvsp[0].ValList); ;}
3780 #line 1309 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3781 { (yyval.ValList) = new ValueList(); ;}
3785 #line 1314 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3786 { (yyval.String) = new std::string(); ;}
3790 #line 1317 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3792 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3793 if (!(yyvsp[0].String)->empty())
3794 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3795 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3796 (yyval.String) = (yyvsp[-2].String);
3801 #line 1324 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3803 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3804 if (!(yyvsp[0].String)->empty())
3805 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3806 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].String);
3807 (yyval.String) = (yyvsp[-5].String);
3812 #line 1331 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3814 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3815 if (!(yyvsp[0].String)->empty())
3816 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3817 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3818 (yyval.String) = (yyvsp[-2].String);
3823 #line 1338 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3825 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3826 if (!(yyvsp[0].String)->empty())
3827 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3828 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].String);
3829 (yyval.String) = (yyvsp[-5].String);
3834 #line 1345 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3836 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3837 (yyvsp[0].Value).destroy();
3838 (yyval.String) = (yyvsp[-1].String);
3843 #line 1350 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3845 if (!(yyvsp[-3].String)->empty())
3846 *(yyvsp[-3].String) += " ";
3847 *(yyvsp[-3].String) += *(yyvsp[-2].String) + " " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3848 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3849 (yyval.String) = (yyvsp[-3].String);
3854 #line 1357 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3856 if (!(yyvsp[-5].String)->empty())
3857 *(yyvsp[-5].String) += " ";
3858 *(yyvsp[-5].String) += *(yyvsp[-4].String) + " " + *(yyvsp[-3].Value).val + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3859 delete (yyvsp[-4].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3860 (yyval.String) = (yyvsp[-5].String);
3865 #line 1364 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
3867 // Upgrade the indices
3868 for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) {
3869 ValueInfo& VI = (*(yyvsp[0].ValList))[i];
3870 if (VI.type.isUnsigned() && !VI.isConstant() &&
3871 VI.type.getBitWidth() < 64) {
3872 std::string* old = VI.val;
3873 *O << " %gep_upgrade" << unique << " = zext " << *old
3875 VI.val = new std::string("i64 %gep_upgrade" + llvm::utostr(unique++));
3876 VI.type.oldTy = ULongTy;
3880 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3881 for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) {
3882 ValueInfo& VI = (*(yyvsp[0].ValList))[i];
3883 *(yyvsp[-3].String) += ", " + *VI.val;
3886 (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].ValList);
3887 (yyval.String) = (yyvsp[-3].String);
3895 /* Line 1126 of yacc.c. */
3896 #line 3897 "UpgradeParser.tab.c"
3902 YY_STACK_PRINT (yyss, yyssp);
3907 /* Now `shift' the result of the reduction. Determine what state
3908 that goes to, based on the state we popped back to and the rule
3909 number reduced by. */
3913 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3914 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3915 yystate = yytable[yystate];
3917 yystate = yydefgoto[yyn - YYNTOKENS];
3922 /*------------------------------------.
3923 | yyerrlab -- here on detecting error |
3924 `------------------------------------*/
3926 /* If not already recovering from an error, report this error. */
3931 yyn = yypact[yystate];
3933 if (YYPACT_NINF < yyn && yyn < YYLAST)
3935 int yytype = YYTRANSLATE (yychar);
3936 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3937 YYSIZE_T yysize = yysize0;
3939 int yysize_overflow = 0;
3941 # define YYERROR_VERBOSE_ARGS_MAXIMUM 5
3942 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3946 /* This is so xgettext sees the translatable formats that are
3947 constructed on the fly. */
3948 YY_("syntax error, unexpected %s");
3949 YY_("syntax error, unexpected %s, expecting %s");
3950 YY_("syntax error, unexpected %s, expecting %s or %s");
3951 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3952 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3956 static char const yyunexpected[] = "syntax error, unexpected %s";
3957 static char const yyexpecting[] = ", expecting %s";
3958 static char const yyor[] = " or %s";
3959 char yyformat[sizeof yyunexpected
3960 + sizeof yyexpecting - 1
3961 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3962 * (sizeof yyor - 1))];
3963 char const *yyprefix = yyexpecting;
3965 /* Start YYX at -YYN if negative to avoid negative indexes in
3967 int yyxbegin = yyn < 0 ? -yyn : 0;
3969 /* Stay within bounds of both yycheck and yytname. */
3970 int yychecklim = YYLAST - yyn;
3971 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3974 yyarg[0] = yytname[yytype];
3975 yyfmt = yystpcpy (yyformat, yyunexpected);
3977 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3978 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3980 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3984 yyformat[sizeof yyunexpected - 1] = '\0';
3987 yyarg[yycount++] = yytname[yyx];
3988 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3989 yysize_overflow |= yysize1 < yysize;
3991 yyfmt = yystpcpy (yyfmt, yyprefix);
3995 yyf = YY_(yyformat);
3996 yysize1 = yysize + yystrlen (yyf);
3997 yysize_overflow |= yysize1 < yysize;
4000 if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
4001 yymsg = (char *) YYSTACK_ALLOC (yysize);
4004 /* Avoid sprintf, as that infringes on the user's name space.
4005 Don't have undefined behavior even if the translation
4006 produced a string with the wrong number of "%s"s. */
4009 while ((*yyp = *yyf))
4011 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
4013 yyp += yytnamerr (yyp, yyarg[yyi++]);
4023 YYSTACK_FREE (yymsg);
4027 yyerror (YY_("syntax error"));
4028 goto yyexhaustedlab;
4032 #endif /* YYERROR_VERBOSE */
4033 yyerror (YY_("syntax error"));
4038 if (yyerrstatus == 3)
4040 /* If just tried and failed to reuse look-ahead token after an
4041 error, discard it. */
4043 if (yychar <= YYEOF)
4045 /* Return failure if at end of input. */
4046 if (yychar == YYEOF)
4051 yydestruct ("Error: discarding", yytoken, &yylval);
4056 /* Else will try to reuse look-ahead token after shifting the error
4061 /*---------------------------------------------------.
4062 | yyerrorlab -- error raised explicitly by YYERROR. |
4063 `---------------------------------------------------*/
4066 /* Pacify compilers like GCC when the user code never invokes
4067 YYERROR and the label yyerrorlab therefore never appears in user
4078 /*-------------------------------------------------------------.
4079 | yyerrlab1 -- common code for both syntax error and YYERROR. |
4080 `-------------------------------------------------------------*/
4082 yyerrstatus = 3; /* Each real token shifted decrements this. */
4086 yyn = yypact[yystate];
4087 if (yyn != YYPACT_NINF)
4090 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4098 /* Pop the current state because it cannot handle the error token. */
4103 yydestruct ("Error: popping", yystos[yystate], yyvsp);
4106 YY_STACK_PRINT (yyss, yyssp);
4115 /* Shift the error token. */
4116 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
4122 /*-------------------------------------.
4123 | yyacceptlab -- YYACCEPT comes here. |
4124 `-------------------------------------*/
4129 /*-----------------------------------.
4130 | yyabortlab -- YYABORT comes here. |
4131 `-----------------------------------*/
4137 /*-------------------------------------------------.
4138 | yyexhaustedlab -- memory exhaustion comes here. |
4139 `-------------------------------------------------*/
4141 yyerror (YY_("memory exhausted"));
4147 if (yychar != YYEOF && yychar != YYEMPTY)
4148 yydestruct ("Cleanup: discarding lookahead",
4150 while (yyssp != yyss)
4152 yydestruct ("Cleanup: popping",
4153 yystos[*yyssp], yyvsp);
4158 YYSTACK_FREE (yyss);
4164 #line 1388 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y"
4167 int yyerror(const char *ErrorMsg) {
4169 = std::string((CurFilename == "-") ? std::string("<stdin>") : CurFilename)
4170 + ":" + llvm::utostr((unsigned) Upgradelineno) + ": ";
4171 std::string errMsg = std::string(ErrorMsg) + "\n" + where + " while reading ";
4172 if (yychar == YYEMPTY || yychar == 0)
4173 errMsg += "end-of-file.";
4175 errMsg += "token: '" + std::string(Upgradetext, Upgradeleng) + "'";
4176 std::cerr << "llvm-upgrade: " << errMsg << '\n';