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-4/tools/llvm-upgrade/UpgradeParser.y"
373 #include "ParserInternals.h"
374 #include <llvm/ADT/StringExtras.h>
380 #define YYERROR_VERBOSE 1
381 #define YYINCLUDED_STDLIB_H
383 #define UPGRADE_SETCOND_OPS 1
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 typedef std::vector<TypeInfo> TypeVector;
396 static TypeVector EnumeratedTypes;
397 typedef std::map<std::string,TypeInfo> TypeMap;
398 static TypeMap NamedTypes;
400 void destroy(ValueList* VL) {
401 while (!VL->empty()) {
402 ValueInfo& VI = VL->back();
409 void UpgradeAssembly(const std::string &infile, std::istream& in,
410 std::ostream &out, bool debug)
413 CurFilename = infile;
419 std::cerr << "Parse failed.\n";
424 static void ResolveType(TypeInfo& Ty) {
425 if (Ty.oldTy == UnresolvedTy) {
426 TypeMap::iterator I = NamedTypes.find(*Ty.newTy);
427 if (I != NamedTypes.end()) {
428 Ty.oldTy = I->second.oldTy;
429 Ty.elemTy = I->second.elemTy;
431 std::string msg("Can't resolve type: ");
433 yyerror(msg.c_str());
435 } else if (Ty.oldTy == NumericTy) {
436 unsigned ref = atoi(&((Ty.newTy->c_str())[1])); // Skip the '\\'
437 if (ref < EnumeratedTypes.size()) {
438 Ty.oldTy = EnumeratedTypes[ref].oldTy;
439 Ty.elemTy = EnumeratedTypes[ref].elemTy;
441 std::string msg("Can't resolve type: ");
443 yyerror(msg.c_str());
446 // otherwise its already resolved.
449 static const char* getCastOpcode(
450 std::string& Source, const TypeInfo& SrcTy, const TypeInfo& DstTy)
452 unsigned SrcBits = SrcTy.getBitWidth();
453 unsigned DstBits = DstTy.getBitWidth();
454 const char* opcode = "bitcast";
455 // Run through the possibilities ...
456 if (DstTy.isIntegral()) { // Casting to integral
457 if (SrcTy.isIntegral()) { // Casting from integral
458 if (DstBits < SrcBits)
460 else if (DstBits > SrcBits) { // its an extension
461 if (SrcTy.isSigned())
462 opcode ="sext"; // signed -> SEXT
464 opcode = "zext"; // unsigned -> ZEXT
466 opcode = "bitcast"; // Same size, No-op cast
468 } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt
469 if (DstTy.isSigned())
470 opcode = "fptosi"; // FP -> sint
472 opcode = "fptoui"; // FP -> uint
473 } else if (SrcTy.isPacked()) {
474 assert(DstBits == SrcTy.getBitWidth() &&
475 "Casting packed to integer of different width");
476 opcode = "bitcast"; // same size, no-op cast
478 assert(SrcTy.isPointer() &&
479 "Casting from a value that is not first-class type");
480 opcode = "ptrtoint"; // ptr -> int
482 } else if (DstTy.isFloatingPoint()) { // Casting to floating pt
483 if (SrcTy.isIntegral()) { // Casting from integral
484 if (SrcTy.isSigned())
485 opcode = "sitofp"; // sint -> FP
487 opcode = "uitofp"; // uint -> FP
488 } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt
489 if (DstBits < SrcBits) {
490 opcode = "fptrunc"; // FP -> smaller FP
491 } else if (DstBits > SrcBits) {
492 opcode = "fpext"; // FP -> larger FP
494 opcode ="bitcast"; // same size, no-op cast
496 } else if (SrcTy.isPacked()) {
497 assert(DstBits == SrcTy.getBitWidth() &&
498 "Casting packed to floating point of different width");
499 opcode = "bitcast"; // same size, no-op cast
501 assert(0 && "Casting pointer or non-first class to float");
503 } else if (DstTy.isPacked()) {
504 if (SrcTy.isPacked()) {
505 assert(DstTy.getBitWidth() == SrcTy.getBitWidth() &&
506 "Casting packed to packed of different widths");
507 opcode = "bitcast"; // packed -> packed
508 } else if (DstTy.getBitWidth() == SrcBits) {
509 opcode = "bitcast"; // float/int -> packed
511 assert(!"Illegal cast to packed (wrong type or size)");
513 } else if (DstTy.isPointer()) {
514 if (SrcTy.isPointer()) {
515 opcode = "bitcast"; // ptr -> ptr
516 } else if (SrcTy.isIntegral()) {
517 opcode = "inttoptr"; // int -> ptr
519 assert(!"Casting invalid type to pointer");
522 assert(!"Casting to type that is not first-class");
527 static std::string getCastUpgrade(
528 const std::string& Src, TypeInfo& SrcTy, TypeInfo& DstTy, bool isConst)
531 std::string Source = Src;
532 if (SrcTy.isFloatingPoint() && DstTy.isPointer()) {
533 // fp -> ptr cast is no longer supported but we must upgrade this
534 // by doing a double cast: fp -> int -> ptr
536 Source = "ulong fptoui(" + Source + " to ulong)";
538 *O << " %cast_upgrade" << unique << " = fptoui " << Source
540 Source = "ulong %cast_upgrade" + llvm::utostr(unique);
542 // Update the SrcTy for the getCastOpcode call below
544 SrcTy.newTy = new std::string("ulong");
545 SrcTy.oldTy = ULongTy;
546 } else if (DstTy.oldTy == BoolTy) {
547 // cast ptr %x to bool was previously defined as setne ptr %x, null
548 // The ptrtoint semantic is to truncate, not compare so we must retain
549 // the original intent by replace the cast with a setne
550 const char* comparator = SrcTy.isPointer() ? ", null" :
551 (SrcTy.isFloatingPoint() ? ", 0.0" : ", 0");
553 Result = "setne (" + Source + comparator + ")";
555 Result = "setne " + Source + comparator;
556 return Result; // skip cast processing below
560 std::string Opcode(getCastOpcode(Source, SrcTy, DstTy));
562 Result += Opcode + "( " + Source + " to " + *DstTy.newTy + ")";
564 Result += Opcode + " " + Source + " to " + *DstTy.newTy;
568 const char* getDivRemOpcode(const std::string& opcode, const TypeInfo& TI) {
569 const char* op = opcode.c_str();
573 Ty.oldTy = Ty.getElementType();
575 if (Ty.isFloatingPoint())
577 else if (Ty.isUnsigned())
579 else if (Ty.isSigned())
582 yyerror("Invalid type for div instruction");
583 else if (opcode == "rem")
584 if (Ty.isFloatingPoint())
586 else if (Ty.isUnsigned())
588 else if (Ty.isSigned())
591 yyerror("Invalid type for rem instruction");
596 getCompareOp(const std::string& setcc, const TypeInfo& TI) {
597 assert(setcc.length() == 5);
600 assert(cc1 == 'e' || cc1 == 'n' || cc1 == 'l' || cc1 == 'g');
601 assert(cc2 == 'q' || cc2 == 'e' || cc2 == 'e' || cc2 == 't');
602 std::string result("xcmp xxx");
605 if (TI.isFloatingPoint()) {
607 result[5] = 'o'; // FIXME: Always map to ordered comparison ?
608 } else if (TI.isIntegral() || TI.isPointer()) {
610 if ((cc1 == 'e' && cc2 == 'q') || (cc1 == 'n' && cc2 == 'e'))
612 else if (TI.isSigned())
614 else if (TI.isUnsigned() || TI.isPointer())
617 yyerror("Invalid integral type for setcc");
624 /* Enabling traces. */
629 /* Enabling verbose error messages. */
630 #ifdef YYERROR_VERBOSE
631 # undef YYERROR_VERBOSE
632 # define YYERROR_VERBOSE 1
634 # define YYERROR_VERBOSE 0
637 /* Enabling the token table. */
638 #ifndef YYTOKEN_TABLE
639 # define YYTOKEN_TABLE 0
642 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
643 #line 268 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
644 typedef union YYSTYPE {
651 /* Line 196 of yacc.c. */
652 #line 653 "UpgradeParser.tab.c"
653 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
654 # define YYSTYPE_IS_DECLARED 1
655 # define YYSTYPE_IS_TRIVIAL 1
660 /* Copy the second part of user declarations. */
663 /* Line 219 of yacc.c. */
664 #line 665 "UpgradeParser.tab.c"
666 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
667 # define YYSIZE_T __SIZE_TYPE__
669 #if ! defined (YYSIZE_T) && defined (size_t)
670 # define YYSIZE_T size_t
672 #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
673 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
674 # define YYSIZE_T size_t
676 #if ! defined (YYSIZE_T)
677 # define YYSIZE_T unsigned int
683 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
684 # define YY_(msgid) dgettext ("bison-runtime", msgid)
688 # define YY_(msgid) msgid
692 #if ! defined (yyoverflow) || YYERROR_VERBOSE
694 /* The parser invokes alloca or malloc; define the necessary symbols. */
696 # ifdef YYSTACK_USE_ALLOCA
697 # if YYSTACK_USE_ALLOCA
699 # define YYSTACK_ALLOC __builtin_alloca
701 # define YYSTACK_ALLOC alloca
702 # if defined (__STDC__) || defined (__cplusplus)
703 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
704 # define YYINCLUDED_STDLIB_H
710 # ifdef YYSTACK_ALLOC
711 /* Pacify GCC's `empty if-body' warning. */
712 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
713 # ifndef YYSTACK_ALLOC_MAXIMUM
714 /* The OS might guarantee only one guard page at the bottom of the stack,
715 and a page size can be as small as 4096 bytes. So we cannot safely
716 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
717 to allow for a few compiler-allocated temporary stack slots. */
718 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
721 # define YYSTACK_ALLOC YYMALLOC
722 # define YYSTACK_FREE YYFREE
723 # ifndef YYSTACK_ALLOC_MAXIMUM
724 # define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
730 # define YYMALLOC malloc
731 # if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
732 && (defined (__STDC__) || defined (__cplusplus)))
733 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
738 # if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
739 && (defined (__STDC__) || defined (__cplusplus)))
740 void free (void *); /* INFRINGES ON USER NAME SPACE */
747 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
750 #if (! defined (yyoverflow) \
751 && (! defined (__cplusplus) \
752 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
754 /* A type that is properly aligned for any stack member. */
761 /* The size of the maximum gap between one aligned stack and the next. */
762 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
764 /* The size of an array large to enough to hold all stacks, each with
766 # define YYSTACK_BYTES(N) \
767 ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
768 + YYSTACK_GAP_MAXIMUM)
770 /* Copy COUNT objects from FROM to TO. The source and destination do
773 # if defined (__GNUC__) && 1 < __GNUC__
774 # define YYCOPY(To, From, Count) \
775 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
777 # define YYCOPY(To, From, Count) \
781 for (yyi = 0; yyi < (Count); yyi++) \
782 (To)[yyi] = (From)[yyi]; \
788 /* Relocate STACK from its old location to the new one. The
789 local variables YYSIZE and YYSTACKSIZE give the old and new number of
790 elements in the stack, and YYPTR gives the new location of the
791 stack. Advance YYPTR to a properly aligned location for the next
793 # define YYSTACK_RELOCATE(Stack) \
796 YYSIZE_T yynewbytes; \
797 YYCOPY (&yyptr->Stack, Stack, yysize); \
798 Stack = &yyptr->Stack; \
799 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
800 yyptr += yynewbytes / sizeof (*yyptr); \
806 #if defined (__STDC__) || defined (__cplusplus)
807 typedef signed char yysigned_char;
809 typedef short int yysigned_char;
812 /* YYFINAL -- State number of the termination state. */
814 /* YYLAST -- Last index in YYTABLE. */
817 /* YYNTOKENS -- Number of terminals. */
818 #define YYNTOKENS 165
819 /* YYNNTS -- Number of nonterminals. */
821 /* YYNRULES -- Number of rules. */
823 /* YYNRULES -- Number of states. */
824 #define YYNSTATES 564
826 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
828 #define YYMAXUTOK 405
830 #define YYTRANSLATE(YYX) \
831 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
833 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
834 static const unsigned char yytranslate[] =
836 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
837 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
838 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
839 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
840 154, 155, 163, 2, 152, 2, 2, 2, 2, 2,
841 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
842 159, 151, 160, 2, 2, 2, 2, 2, 2, 2,
843 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
844 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
845 2, 156, 153, 158, 2, 2, 2, 2, 2, 164,
846 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
847 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
848 157, 2, 2, 161, 2, 162, 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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
853 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
854 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
855 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
856 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
857 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
858 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
859 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
860 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
861 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
862 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
863 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
864 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
865 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
866 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
867 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
868 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
869 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
870 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
871 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
872 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
873 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
874 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
875 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
876 145, 146, 147, 148, 149, 150
880 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
882 static const unsigned short int yyprhs[] =
884 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
885 19, 21, 23, 25, 27, 29, 31, 33, 35, 37,
886 39, 41, 43, 45, 47, 49, 51, 53, 55, 57,
887 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
888 79, 81, 83, 85, 87, 89, 91, 93, 95, 97,
889 99, 101, 103, 105, 107, 109, 111, 113, 115, 117,
890 119, 121, 123, 125, 127, 129, 131, 133, 135, 137,
891 139, 141, 143, 145, 147, 149, 151, 153, 156, 157,
892 159, 161, 163, 165, 167, 169, 171, 172, 174, 176,
893 178, 180, 182, 184, 187, 188, 189, 192, 193, 197,
894 200, 201, 203, 204, 208, 210, 213, 215, 217, 219,
895 221, 223, 225, 227, 229, 231, 233, 235, 237, 239,
896 241, 243, 245, 247, 249, 251, 253, 256, 261, 267,
897 273, 277, 280, 283, 285, 289, 291, 295, 297, 298,
898 303, 307, 311, 316, 321, 325, 328, 331, 334, 337,
899 340, 343, 346, 349, 352, 355, 362, 368, 377, 384,
900 391, 398, 406, 413, 420, 429, 438, 442, 444, 446,
901 448, 450, 453, 456, 461, 464, 466, 468, 470, 475,
902 478, 483, 490, 497, 504, 511, 515, 520, 521, 523,
903 525, 527, 531, 535, 539, 543, 547, 551, 553, 554,
904 556, 558, 560, 561, 564, 568, 570, 572, 576, 578,
905 579, 588, 590, 592, 596, 598, 600, 604, 605, 607,
906 609, 613, 614, 616, 618, 620, 622, 624, 626, 628,
907 630, 632, 636, 638, 644, 646, 648, 650, 652, 655,
908 658, 660, 663, 666, 667, 669, 671, 673, 676, 679,
909 683, 693, 703, 712, 727, 729, 731, 738, 744, 747,
910 754, 762, 764, 768, 770, 771, 774, 776, 782, 788,
911 794, 802, 805, 810, 815, 822, 827, 832, 839, 846,
912 849, 857, 859, 862, 863, 865, 866, 870, 877, 881,
916 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
917 static const short int yyrhs[] =
919 199, 0, -1, 19, -1, 20, -1, 17, -1, 18,
920 -1, 80, -1, 81, -1, 82, -1, 83, -1, 84,
921 -1, 85, -1, 86, -1, 87, -1, 88, -1, 89,
922 -1, 90, -1, 91, -1, 92, -1, 93, -1, 94,
923 -1, 95, -1, 96, -1, 97, -1, 98, -1, 99,
924 -1, 100, -1, 101, -1, 102, -1, 103, -1, 104,
925 -1, 105, -1, 106, -1, 107, -1, 118, -1, 119,
926 -1, 120, -1, 121, -1, 108, -1, 109, -1, 110,
927 -1, 111, -1, 112, -1, 113, -1, 114, -1, 115,
928 -1, 116, -1, 117, -1, 130, -1, 131, -1, 132,
929 -1, 133, -1, 139, -1, 140, -1, 141, -1, 142,
930 -1, 143, -1, 144, -1, 145, -1, 146, -1, 147,
931 -1, 148, -1, 149, -1, 150, -1, 138, -1, 11,
932 -1, 9, -1, 7, -1, 5, -1, 12, -1, 10,
933 -1, 8, -1, 6, -1, 175, -1, 176, -1, 13,
934 -1, 14, -1, 208, 151, -1, -1, 42, -1, 43,
935 -1, 44, -1, 48, -1, 45, -1, 46, -1, 47,
936 -1, -1, 66, -1, 67, -1, 68, -1, 69, -1,
937 70, -1, 71, -1, 65, 18, -1, -1, -1, 57,
938 18, -1, -1, 152, 57, 18, -1, 37, 30, -1,
939 -1, 184, -1, -1, 152, 187, 186, -1, 184, -1,
940 57, 18, -1, 190, -1, 3, -1, 192, -1, 3,
941 -1, 192, -1, 4, -1, 5, -1, 6, -1, 7,
942 -1, 8, -1, 9, -1, 10, -1, 11, -1, 12,
943 -1, 13, -1, 14, -1, 15, -1, 16, -1, 222,
944 -1, 191, -1, 153, 18, -1, 189, 154, 194, 155,
945 -1, 156, 18, 157, 192, 158, -1, 159, 18, 157,
946 192, 160, -1, 161, 193, 162, -1, 161, 162, -1,
947 192, 163, -1, 192, -1, 193, 152, 192, -1, 193,
948 -1, 193, 152, 40, -1, 40, -1, -1, 190, 156,
949 197, 158, -1, 190, 156, 158, -1, 190, 164, 30,
950 -1, 190, 159, 197, 160, -1, 190, 161, 197, 162,
951 -1, 190, 161, 162, -1, 190, 22, -1, 190, 23,
952 -1, 190, 222, -1, 190, 196, -1, 190, 24, -1,
953 175, 167, -1, 176, 18, -1, 4, 25, -1, 4,
954 26, -1, 178, 21, -1, 174, 154, 195, 39, 190,
955 155, -1, 127, 154, 195, 237, 155, -1, 129, 154,
956 195, 152, 195, 152, 195, 155, -1, 168, 154, 195,
957 152, 195, 155, -1, 169, 154, 195, 152, 195, 155,
958 -1, 170, 154, 195, 152, 195, 155, -1, 171, 172,
959 154, 195, 152, 195, 155, -1, 173, 154, 195, 152,
960 195, 155, -1, 135, 154, 195, 152, 195, 155, -1,
961 136, 154, 195, 152, 195, 152, 195, 155, -1, 137,
962 154, 195, 152, 195, 152, 195, 155, -1, 197, 152,
963 195, -1, 195, -1, 35, -1, 36, -1, 200, -1,
964 200, 217, -1, 200, 219, -1, 200, 63, 62, 203,
965 -1, 200, 31, -1, 202, -1, 50, -1, 58, -1,
966 202, 179, 27, 188, -1, 202, 219, -1, 202, 63,
967 62, 203, -1, 202, 179, 180, 198, 195, 186, -1,
968 202, 179, 201, 198, 190, 186, -1, 202, 179, 45,
969 198, 190, 186, -1, 202, 179, 47, 198, 190, 186,
970 -1, 202, 51, 205, -1, 202, 59, 151, 206, -1,
971 -1, 30, -1, 56, -1, 55, -1, 53, 151, 204,
972 -1, 54, 151, 18, -1, 52, 151, 30, -1, 72,
973 151, 30, -1, 156, 207, 158, -1, 207, 152, 30,
974 -1, 30, -1, -1, 28, -1, 30, -1, 208, -1,
975 -1, 190, 209, -1, 211, 152, 210, -1, 210, -1,
976 211, -1, 211, 152, 40, -1, 40, -1, -1, 181,
977 188, 208, 154, 212, 155, 185, 182, -1, 32, -1,
978 161, -1, 180, 213, 214, -1, 33, -1, 162, -1,
979 215, 225, 216, -1, -1, 45, -1, 47, -1, 34,
980 218, 213, -1, -1, 64, -1, 17, -1, 18, -1,
981 21, -1, 25, -1, 26, -1, 22, -1, 23, -1,
982 24, -1, 159, 197, 160, -1, 196, -1, 62, 220,
983 30, 152, 30, -1, 166, -1, 208, -1, 222, -1,
984 221, -1, 190, 223, -1, 225, 226, -1, 226, -1,
985 227, 229, -1, 227, 231, -1, -1, 29, -1, 78,
986 -1, 77, -1, 73, 224, -1, 73, 3, -1, 74,
987 15, 223, -1, 74, 4, 223, 152, 15, 223, 152,
988 15, 223, -1, 75, 177, 223, 152, 15, 223, 156,
989 230, 158, -1, 75, 177, 223, 152, 15, 223, 156,
990 158, -1, 179, 76, 181, 188, 223, 154, 234, 155,
991 39, 15, 223, 228, 15, 223, -1, 228, -1, 79,
992 -1, 230, 177, 221, 152, 15, 223, -1, 177, 221,
993 152, 15, 223, -1, 179, 236, -1, 190, 156, 223,
994 152, 223, 158, -1, 232, 152, 156, 223, 152, 223,
995 158, -1, 224, -1, 233, 152, 224, -1, 233, -1,
996 -1, 61, 60, -1, 60, -1, 168, 190, 223, 152,
997 223, -1, 169, 190, 223, 152, 223, -1, 170, 190,
998 223, 152, 223, -1, 171, 172, 190, 223, 152, 223,
999 155, -1, 49, 224, -1, 173, 224, 152, 224, -1,
1000 174, 224, 39, 190, -1, 129, 224, 152, 224, 152,
1001 224, -1, 134, 224, 152, 190, -1, 135, 224, 152,
1002 224, -1, 136, 224, 152, 224, 152, 224, -1, 137,
1003 224, 152, 224, 152, 224, -1, 128, 232, -1, 235,
1004 181, 188, 223, 154, 234, 155, -1, 239, -1, 152,
1005 233, -1, -1, 38, -1, -1, 122, 190, 183, -1,
1006 122, 190, 152, 10, 223, 183, -1, 123, 190, 183,
1007 -1, 123, 190, 152, 10, 223, 183, -1, 124, 224,
1008 -1, 238, 125, 190, 223, -1, 238, 126, 224, 152,
1009 190, 223, -1, 127, 190, 223, 237, -1
1012 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1013 static const unsigned short int yyrline[] =
1015 0, 331, 331, 331, 332, 332, 336, 336, 336, 336,
1016 336, 336, 336, 337, 337, 337, 337, 338, 338, 338,
1017 339, 339, 339, 339, 339, 339, 340, 340, 341, 341,
1018 341, 341, 341, 341, 341, 341, 341, 341, 342, 342,
1019 342, 342, 342, 342, 342, 342, 342, 342, 343, 343,
1020 343, 343, 344, 344, 344, 344, 344, 344, 344, 345,
1021 345, 345, 345, 345, 345, 350, 350, 350, 350, 351,
1022 351, 351, 351, 352, 352, 353, 353, 356, 359, 364,
1023 364, 364, 364, 364, 364, 365, 366, 369, 369, 369,
1024 369, 369, 370, 371, 376, 381, 382, 385, 386, 394,
1025 400, 401, 404, 405, 414, 415, 428, 428, 429, 429,
1026 430, 434, 434, 434, 434, 434, 434, 434, 435, 435,
1027 435, 435, 435, 437, 441, 445, 448, 453, 459, 467,
1028 475, 481, 485, 496, 499, 507, 508, 513, 516, 526,
1029 532, 537, 543, 549, 555, 560, 566, 572, 578, 584,
1030 590, 596, 602, 608, 614, 622, 636, 648, 653, 659,
1031 664, 672, 677, 685, 690, 695, 705, 710, 715, 715,
1032 725, 730, 733, 738, 742, 746, 748, 748, 751, 763,
1033 768, 773, 780, 787, 794, 801, 806, 811, 816, 818,
1034 818, 821, 826, 833, 838, 845, 852, 857, 858, 866,
1035 866, 867, 867, 869, 876, 880, 884, 887, 892, 895,
1036 897, 917, 918, 920, 929, 930, 932, 940, 941, 942,
1037 946, 959, 960, 963, 963, 963, 963, 963, 963, 963,
1038 964, 965, 970, 971, 980, 980, 984, 990, 1001, 1007,
1039 1010, 1018, 1022, 1027, 1030, 1036, 1036, 1038, 1043, 1048,
1040 1053, 1061, 1068, 1074, 1094, 1099, 1105, 1110, 1118, 1127,
1041 1134, 1142, 1146, 1153, 1154, 1158, 1163, 1166, 1172, 1177,
1042 1185, 1190, 1195, 1203, 1217, 1222, 1227, 1232, 1237, 1242,
1043 1247, 1264, 1269, 1270, 1274, 1275, 1278, 1285, 1292, 1299,
1044 1306, 1311, 1318, 1325
1048 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1049 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1050 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1051 static const char *const yytname[] =
1053 "$end", "error", "$undefined", "VOID", "BOOL", "SBYTE", "UBYTE",
1054 "SHORT", "USHORT", "INT", "UINT", "LONG", "ULONG", "FLOAT", "DOUBLE",
1055 "LABEL", "OPAQUE", "ESINT64VAL", "EUINT64VAL", "SINTVAL", "UINTVAL",
1056 "FPVAL", "NULL_TOK", "UNDEF", "ZEROINITIALIZER", "TRUETOK", "FALSETOK",
1057 "TYPE", "VAR_ID", "LABELSTR", "STRINGCONSTANT", "IMPLEMENTATION",
1058 "BEGINTOK", "ENDTOK", "DECLARE", "GLOBAL", "CONSTANT", "SECTION",
1059 "VOLATILE", "TO", "DOTDOTDOT", "CONST", "INTERNAL", "LINKONCE", "WEAK",
1060 "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "APPENDING", "NOT", "EXTERNAL",
1061 "TARGET", "TRIPLE", "ENDIAN", "POINTERSIZE", "LITTLE", "BIG", "ALIGN",
1062 "UNINITIALIZED", "DEPLIBS", "CALL", "TAIL", "ASM_TOK", "MODULE",
1063 "SIDEEFFECT", "CC_TOK", "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK",
1064 "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT",
1065 "RET", "BR", "SWITCH", "INVOKE", "EXCEPT", "UNWIND", "UNREACHABLE",
1066 "ADD", "SUB", "MUL", "DIV", "UDIV", "SDIV", "FDIV", "REM", "UREM",
1067 "SREM", "FREM", "AND", "OR", "XOR", "SETLE", "SETGE", "SETLT", "SETGT",
1068 "SETEQ", "SETNE", "ICMP", "FCMP", "EQ", "NE", "SLT", "SGT", "SLE", "SGE",
1069 "OEQ", "ONE", "OLT", "OGT", "OLE", "OGE", "ORD", "UNO", "UEQ", "UNE",
1070 "ULT", "UGT", "ULE", "UGE", "MALLOC", "ALLOCA", "FREE", "LOAD", "STORE",
1071 "GETELEMENTPTR", "PHI_TOK", "SELECT", "SHL", "SHR", "ASHR", "LSHR",
1072 "VAARG", "EXTRACTELEMENT", "INSERTELEMENT", "SHUFFLEVECTOR", "CAST",
1073 "TRUNC", "ZEXT", "SEXT", "FPTRUNC", "FPEXT", "FPTOUI", "FPTOSI",
1074 "UITOFP", "SITOFP", "PTRTOINT", "INTTOPTR", "BITCAST", "'='", "','",
1075 "'\\\\'", "'('", "')'", "'['", "'x'", "']'", "'<'", "'>'", "'{'", "'}'",
1076 "'*'", "'c'", "$accept", "IntVal", "EInt64Val", "ArithmeticOps",
1077 "LogicalOps", "SetCondOps", "CompareOps", "Predicates", "ShiftOps",
1078 "CastOps", "SIntType", "UIntType", "IntType", "FPType", "OptAssign",
1079 "OptLinkage", "OptCallingConv", "OptAlign", "OptCAlign", "SectionString",
1080 "OptSection", "GlobalVarAttributes", "GlobalVarAttribute", "TypesV",
1081 "UpRTypesV", "Types", "PrimType", "UpRTypes", "TypeListI",
1082 "ArgTypeListI", "ConstVal", "ConstExpr", "ConstVector", "GlobalType",
1083 "Module", "DefinitionList", "External", "ConstPool", "AsmBlock",
1084 "BigOrLittle", "TargetDefinition", "LibrariesDefinition", "LibList",
1085 "Name", "OptName", "ArgVal", "ArgListH", "ArgList", "FunctionHeaderH",
1086 "BEGIN", "FunctionHeader", "END", "Function", "FnDeclareLinkage",
1087 "FunctionProto", "OptSideEffect", "ConstValueRef", "SymbolicValueRef",
1088 "ValueRef", "ResolvedVal", "BasicBlockList", "BasicBlock",
1089 "InstructionList", "Unwind", "BBTerminatorInst", "JumpTable", "Inst",
1090 "PHIList", "ValueRefList", "ValueRefListE", "OptTailCall", "InstVal",
1091 "IndexList", "OptVolatile", "MemoryInst", 0
1096 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1098 static const unsigned short int yytoknum[] =
1100 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1101 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1102 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1103 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1104 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1105 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1106 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1107 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1108 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1109 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1110 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1111 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1112 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
1113 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
1114 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
1115 405, 61, 44, 92, 40, 41, 91, 120, 93, 60,
1116 62, 123, 125, 42, 99
1120 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1121 static const unsigned char yyr1[] =
1123 0, 165, 166, 166, 167, 167, 168, 168, 168, 168,
1124 168, 168, 168, 168, 168, 168, 168, 169, 169, 169,
1125 170, 170, 170, 170, 170, 170, 171, 171, 172, 172,
1126 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
1127 172, 172, 172, 172, 172, 172, 172, 172, 173, 173,
1128 173, 173, 174, 174, 174, 174, 174, 174, 174, 174,
1129 174, 174, 174, 174, 174, 175, 175, 175, 175, 176,
1130 176, 176, 176, 177, 177, 178, 178, 179, 179, 180,
1131 180, 180, 180, 180, 180, 180, 180, 181, 181, 181,
1132 181, 181, 181, 181, 181, 182, 182, 183, 183, 184,
1133 185, 185, 186, 186, 187, 187, 188, 188, 189, 189,
1134 190, 191, 191, 191, 191, 191, 191, 191, 191, 191,
1135 191, 191, 191, 192, 192, 192, 192, 192, 192, 192,
1136 192, 192, 192, 193, 193, 194, 194, 194, 194, 195,
1137 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
1138 195, 195, 195, 195, 195, 196, 196, 196, 196, 196,
1139 196, 196, 196, 196, 196, 196, 197, 197, 198, 198,
1140 199, 200, 200, 200, 200, 200, 201, 201, 202, 202,
1141 202, 202, 202, 202, 202, 202, 202, 202, 203, 204,
1142 204, 205, 205, 205, 205, 206, 207, 207, 207, 208,
1143 208, 209, 209, 210, 211, 211, 212, 212, 212, 212,
1144 213, 214, 214, 215, 216, 216, 217, 218, 218, 218,
1145 219, 220, 220, 221, 221, 221, 221, 221, 221, 221,
1146 221, 221, 221, 221, 222, 222, 223, 223, 224, 225,
1147 225, 226, 227, 227, 227, 228, 228, 229, 229, 229,
1148 229, 229, 229, 229, 229, 229, 230, 230, 231, 232,
1149 232, 233, 233, 234, 234, 235, 235, 236, 236, 236,
1150 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1151 236, 236, 237, 237, 238, 238, 239, 239, 239, 239,
1155 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1156 static const unsigned char yyr2[] =
1158 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1159 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1160 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1161 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1162 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1163 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1164 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1165 1, 1, 1, 1, 1, 1, 1, 2, 0, 1,
1166 1, 1, 1, 1, 1, 1, 0, 1, 1, 1,
1167 1, 1, 1, 2, 0, 0, 2, 0, 3, 2,
1168 0, 1, 0, 3, 1, 2, 1, 1, 1, 1,
1169 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1170 1, 1, 1, 1, 1, 1, 2, 4, 5, 5,
1171 3, 2, 2, 1, 3, 1, 3, 1, 0, 4,
1172 3, 3, 4, 4, 3, 2, 2, 2, 2, 2,
1173 2, 2, 2, 2, 2, 6, 5, 8, 6, 6,
1174 6, 7, 6, 6, 8, 8, 3, 1, 1, 1,
1175 1, 2, 2, 4, 2, 1, 1, 1, 4, 2,
1176 4, 6, 6, 6, 6, 3, 4, 0, 1, 1,
1177 1, 3, 3, 3, 3, 3, 3, 1, 0, 1,
1178 1, 1, 0, 2, 3, 1, 1, 3, 1, 0,
1179 8, 1, 1, 3, 1, 1, 3, 0, 1, 1,
1180 3, 0, 1, 1, 1, 1, 1, 1, 1, 1,
1181 1, 3, 1, 5, 1, 1, 1, 1, 2, 2,
1182 1, 2, 2, 0, 1, 1, 1, 2, 2, 3,
1183 9, 9, 8, 14, 1, 1, 6, 5, 2, 6,
1184 7, 1, 3, 1, 0, 2, 1, 5, 5, 5,
1185 7, 2, 4, 4, 6, 4, 4, 6, 6, 2,
1186 7, 1, 2, 0, 1, 0, 3, 6, 3, 6,
1190 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1191 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1192 means the default is an error. */
1193 static const unsigned short int yydefact[] =
1195 187, 0, 86, 175, 1, 174, 217, 79, 80, 81,
1196 83, 84, 85, 82, 0, 94, 243, 171, 172, 199,
1197 200, 0, 0, 0, 86, 0, 179, 218, 219, 94,
1198 0, 0, 87, 88, 89, 90, 91, 92, 0, 0,
1199 244, 243, 240, 78, 0, 0, 0, 0, 185, 0,
1200 0, 0, 0, 0, 176, 177, 0, 0, 77, 220,
1201 188, 173, 93, 107, 111, 112, 113, 114, 115, 116,
1202 117, 118, 119, 120, 121, 122, 123, 2, 3, 0,
1203 0, 0, 0, 234, 0, 0, 106, 125, 110, 235,
1204 124, 211, 212, 213, 214, 215, 216, 239, 0, 0,
1205 0, 246, 245, 255, 285, 254, 241, 242, 0, 0,
1206 0, 0, 198, 186, 180, 178, 168, 169, 0, 0,
1207 0, 0, 126, 0, 0, 109, 131, 133, 0, 0,
1208 138, 132, 248, 0, 247, 0, 0, 68, 72, 67,
1209 71, 66, 70, 65, 69, 73, 74, 0, 284, 0,
1210 266, 0, 94, 6, 7, 8, 9, 10, 11, 12,
1211 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1212 23, 24, 25, 26, 27, 0, 0, 0, 0, 0,
1213 0, 48, 49, 50, 51, 0, 0, 0, 0, 64,
1214 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
1215 62, 63, 0, 0, 0, 0, 0, 0, 94, 258,
1216 0, 281, 193, 190, 189, 191, 192, 194, 197, 0,
1217 102, 102, 111, 112, 113, 114, 115, 116, 117, 118,
1218 119, 120, 121, 0, 0, 0, 0, 102, 102, 0,
1219 0, 0, 130, 209, 137, 135, 0, 223, 224, 225,
1220 228, 229, 230, 226, 227, 221, 0, 0, 0, 0,
1221 0, 0, 0, 0, 0, 0, 0, 0, 232, 237,
1222 236, 238, 0, 249, 0, 271, 265, 0, 97, 97,
1223 290, 0, 0, 279, 0, 0, 0, 0, 0, 0,
1224 0, 0, 28, 29, 30, 31, 32, 33, 38, 39,
1225 40, 41, 42, 43, 44, 45, 46, 47, 34, 35,
1226 36, 37, 0, 0, 0, 0, 0, 0, 0, 195,
1227 0, 183, 184, 152, 153, 4, 5, 150, 151, 154,
1228 145, 146, 149, 0, 0, 0, 0, 148, 147, 181,
1229 182, 108, 108, 134, 208, 202, 205, 206, 0, 0,
1230 127, 222, 0, 0, 0, 0, 0, 0, 167, 0,
1231 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1232 286, 0, 288, 283, 0, 0, 0, 0, 0, 0,
1233 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1234 196, 0, 0, 104, 102, 140, 0, 0, 144, 0,
1235 141, 128, 129, 201, 203, 0, 100, 136, 0, 283,
1236 0, 0, 0, 0, 0, 231, 0, 0, 0, 0,
1237 0, 0, 0, 0, 0, 0, 0, 0, 0, 293,
1238 0, 0, 0, 275, 276, 0, 0, 0, 0, 0,
1239 0, 272, 273, 0, 291, 0, 99, 105, 103, 139,
1240 142, 143, 207, 204, 101, 95, 0, 0, 0, 0,
1241 0, 0, 166, 0, 0, 0, 0, 0, 0, 0,
1242 0, 264, 97, 98, 97, 261, 282, 0, 0, 0,
1243 0, 0, 267, 268, 269, 0, 264, 0, 0, 210,
1244 233, 156, 0, 0, 0, 0, 0, 0, 0, 0,
1245 0, 0, 0, 0, 263, 0, 0, 287, 289, 0,
1246 0, 0, 274, 277, 278, 0, 0, 292, 96, 0,
1247 163, 0, 0, 158, 159, 160, 0, 162, 155, 0,
1248 252, 0, 0, 0, 262, 259, 0, 270, 280, 0,
1249 0, 0, 161, 250, 0, 251, 0, 0, 260, 157,
1250 164, 165, 0, 0, 0, 0, 0, 0, 257, 0,
1254 /* YYDEFGOTO[NTERM-NUM]. */
1255 static const short int yydefgoto[] =
1257 -1, 83, 327, 262, 263, 264, 265, 312, 266, 267,
1258 233, 234, 147, 235, 24, 15, 38, 489, 370, 393,
1259 455, 321, 394, 84, 85, 236, 87, 88, 128, 246,
1260 358, 268, 359, 118, 1, 2, 57, 3, 61, 215,
1261 48, 113, 219, 89, 404, 346, 347, 348, 39, 93,
1262 16, 96, 17, 29, 18, 352, 269, 90, 271, 475,
1263 41, 42, 43, 105, 106, 532, 107, 283, 504, 505,
1264 208, 209, 429, 210, 211
1267 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1269 #define YYPACT_NINF -507
1270 static const short int yypact[] =
1272 -507, 31, 62, 973, -507, -507, -18, -507, -507, -507,
1273 -507, -507, -507, -507, -3, 124, 43, -507, -507, -507,
1274 -507, -33, -60, 25, 177, -37, -507, -507, -507, 124,
1275 102, 128, -507, -507, -507, -507, -507, -507, 800, -25,
1276 -507, -17, -507, 49, 12, 16, 26, 29, -507, 28,
1277 102, 800, 7, 7, -507, -507, 7, 7, -507, -507,
1278 -507, -507, -507, 42, -507, -507, -507, -507, -507, -507,
1279 -507, -507, -507, -507, -507, -507, -507, -507, -507, 163,
1280 164, 165, 469, -507, 27, 47, -507, -507, -109, -507,
1281 -507, -507, -507, -507, -507, -507, -507, -507, 837, 20,
1282 146, -507, -507, -507, 1314, -507, -507, -507, 155, 19,
1283 179, 172, 173, -507, -507, -507, -507, -507, 882, 882,
1284 921, 882, -507, 50, 51, -507, -507, -109, -126, 52,
1285 564, -507, 42, 1112, -507, 1112, 1112, -507, -507, -507,
1286 -507, -507, -507, -507, -507, -507, -507, 1112, -507, 882,
1287 -507, 149, 124, -507, -507, -507, -507, -507, -507, -507,
1288 -507, -507, -507, -507, -507, -507, -507, -507, -507, -507,
1289 -507, -507, -507, -507, -507, 882, 882, 882, 882, 882,
1290 882, -507, -507, -507, -507, 882, 882, 882, 882, -507,
1291 -507, -507, -507, -507, -507, -507, -507, -507, -507, -507,
1292 -507, -507, 882, 882, 882, 860, 882, 882, 124, -507,
1293 -5, -507, -507, -507, -507, -507, -507, -507, -507, -64,
1294 58, 58, 77, 117, 193, 126, 194, 142, 195, 144,
1295 198, 197, 207, 153, 213, 211, 964, 58, 58, 882,
1296 882, 882, -507, 640, -507, 81, 82, -507, -507, -507,
1297 -507, -507, -507, -507, -507, 170, 84, 86, 87, 88,
1298 89, 921, 90, 91, 92, 860, 93, 94, -507, -507,
1299 -507, -507, 97, -507, 104, -507, -507, 800, 105, 109,
1300 -507, 1112, 80, 112, 114, 115, 118, 120, 121, 1112,
1301 1112, 1112, -507, -507, -507, -507, -507, -507, -507, -507,
1302 -507, -507, -507, -507, -507, -507, -507, -507, -507, -507,
1303 -507, -507, 882, 123, 230, 800, 882, 882, 220, -507,
1304 -23, -507, -507, -507, -507, -507, -507, -507, -507, -507,
1305 -507, -507, -507, 678, 921, 516, 246, -507, -507, -507,
1306 -507, -73, -48, -109, -507, 27, -507, 131, 125, 723,
1307 -507, -507, 256, 921, 921, 921, 921, 921, -507, -76,
1308 921, 921, 921, 133, 921, 921, 274, 278, 1112, -1,
1309 -507, 1, -507, 143, 1112, 138, 882, 882, 882, 882,
1310 882, 147, 148, 150, 1112, 882, 882, 1112, 1112, 151,
1311 -507, 266, 280, -507, 58, -507, -57, -74, -507, -124,
1312 -507, -507, -507, -507, -507, 762, 264, -507, 152, 143,
1313 154, 156, 157, 158, 921, -507, 159, 161, 162, 921,
1314 166, 268, 1112, 1112, 167, 1112, 287, 1112, 882, -507,
1315 171, 1112, 174, -507, -507, 175, 178, 1112, 1112, 1112,
1316 180, -507, -507, 183, -507, 882, -507, -507, -507, -507,
1317 -507, -507, -507, -507, -507, 258, 286, 176, 921, 921,
1318 921, 921, -507, 921, 921, 921, 181, 921, 882, 192,
1319 169, 882, 199, -507, 199, -507, 200, 1112, 201, 882,
1320 882, 882, -507, -507, -507, 1112, 882, 1112, 311, -507,
1321 -507, -507, 202, 190, 203, 212, 191, 216, 217, 921,
1322 218, 221, 334, 41, 200, 222, 293, -507, -507, 882,
1323 208, 1112, -507, -507, -507, 223, 224, -507, -507, 921,
1324 -507, 921, 921, -507, -507, -507, 225, -507, -507, 1112,
1325 -507, 1201, 59, 336, -507, -507, 227, -507, -507, 226,
1326 228, 231, -507, -507, 235, -507, 1201, 373, -507, -507,
1327 -507, -507, 374, 242, 1112, 1112, 380, 98, -507, 1112,
1328 381, -507, 1112, -507
1331 /* YYPGOTO[NTERM-NUM]. */
1332 static const short int yypgoto[] =
1334 -507, -507, -507, 294, 295, 296, 297, 137, 299, 300,
1335 -98, -97, -495, -507, 366, 386, -135, -507, -274, 5,
1336 -507, -215, -507, -47, -507, -38, -507, -67, 282, -507,
1337 -102, 182, -204, 60, -507, -507, -507, -507, 363, -507,
1338 -507, -507, -507, -2, -507, 9, -507, -507, 387, -507,
1339 -507, -507, -507, -507, 412, -507, -506, -103, 79, -88,
1340 -507, 382, -507, -133, -507, -507, -507, -507, -6, -61,
1341 -507, -507, 18, -507, -507
1344 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1345 positive, shift that token. If negative, reduce the rule which
1346 number is the opposite. If zero, do what YYDEFACT says.
1347 If YYTABLE_NINF, syntax error. */
1348 #define YYTABLE_NINF -171
1349 static const short int yytable[] =
1351 86, 25, 145, 146, 115, 372, 322, 91, 531, 425,
1352 134, 427, 40, 86, 391, 127, 94, 277, 237, 44,
1353 45, 46, 339, 340, 135, 544, 241, 27, 414, 28,
1354 270, 4, 270, 270, 392, 136, 242, 546, 451, 47,
1355 553, 25, 116, 117, 270, -108, 137, 138, 139, 140,
1356 141, 142, 143, 144, 131, 19, 426, 20, 426, 30,
1357 133, 275, -170, 127, 137, 138, 139, 140, 141, 142,
1358 143, 144, 40, 315, 213, 214, 414, 19, 414, 20,
1359 220, 221, 129, 238, 415, 401, 450, 50, 318, 280,
1360 131, 49, 284, 5, 319, 414, 6, 285, 286, 287,
1361 288, 449, 323, 324, 7, 8, 9, 10, 11, 12,
1362 13, 133, 402, 119, 58, 131, 120, 121, 313, 314,
1363 316, 317, 98, 99, 100, 14, 101, 102, 103, 396,
1364 397, 399, 60, 338, -68, -68, 92, 278, 279, 133,
1365 281, 282, 133, -67, -67, 95, 62, 133, 133, 133,
1366 133, 137, 138, 139, 140, 141, 142, 143, 144, -66,
1367 -66, -65, -65, 108, 289, 290, 291, 109, 133, 133,
1368 325, 326, 341, 342, 343, 101, 102, 110, 270, 448,
1369 111, 122, 123, 124, 112, 212, 270, 270, 270, 31,
1370 32, 33, 34, 35, 36, 37, -109, 216, 507, 530,
1371 508, 130, 217, 218, 51, 345, 243, 239, 240, 276,
1372 320, -72, -71, -70, 272, 273, -69, 545, -75, 7,
1373 8, 9, 52, 11, 53, 13, 274, 54, -76, 389,
1374 368, 328, 329, 349, 351, 55, 374, 350, 353, 86,
1375 354, 355, 356, 357, 360, 361, 362, 364, 365, 366,
1376 390, 409, 410, 411, 412, 413, 367, 369, 416, 417,
1377 418, 371, 420, 421, 375, 270, 376, 377, 387, 386,
1378 378, 270, 379, 380, 384, 385, 400, 86, 388, 133,
1379 406, 270, 343, 405, 270, 270, 408, 419, 432, 422,
1380 434, 435, 436, 423, 431, 428, 446, 441, 447, 437,
1381 438, 391, 439, 445, 456, 473, 458, 468, 459, 460,
1382 461, 463, 462, 464, 465, 488, 490, 466, 467, 270,
1383 270, 471, 270, 477, 270, 503, 479, 480, 270, 518,
1384 481, 491, 485, 499, 270, 270, 270, 486, 133, 433,
1385 133, 133, 133, 403, 502, 520, 523, 133, 442, 529,
1386 426, 506, 509, 511, 519, 521, 492, 493, 494, 495,
1387 373, 496, 497, 498, 522, 500, 535, 345, 381, 382,
1388 383, 524, 525, 527, 270, 547, 528, 533, 537, 538,
1389 542, 549, 270, 550, 270, 548, 551, 552, 554, 555,
1390 133, 512, 513, 514, 556, 559, 562, 526, 202, 203,
1391 204, 205, 363, 206, 207, 145, 146, 487, 270, 104,
1392 56, 454, 245, 114, 453, 26, 59, 539, 337, 540,
1393 541, 534, 476, 97, 560, 516, 270, 457, 0, 0,
1394 501, 0, 0, 133, 145, 146, 0, 0, 0, 0,
1395 0, 133, 133, 133, 0, 0, 0, 424, 133, 0,
1396 0, 270, 270, 430, 0, 0, 270, 0, 0, 270,
1397 0, 0, 0, 440, 0, 0, 443, 444, 0, 0,
1398 0, 133, 125, 64, 65, 66, 67, 68, 69, 70,
1399 71, 72, 73, 74, 75, 76, 0, 0, 77, 78,
1400 0, 0, 0, 0, 0, 0, 0, 19, 0, 20,
1401 0, 469, 470, 0, 472, 0, 474, 0, 0, 0,
1402 478, 0, 0, 0, 0, 0, 482, 483, 484, 125,
1403 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
1404 232, 75, 76, 0, 0, 77, 78, 0, 0, 0,
1405 0, 0, 0, 0, 19, 0, 20, 0, 0, 0,
1406 0, 0, 0, 0, 0, 0, 510, 0, 0, 0,
1407 0, 0, 0, 0, 515, 0, 517, 125, 64, 65,
1408 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
1409 76, 0, 0, 77, 78, 0, 0, 0, 0, 0,
1410 536, 0, 19, 0, 20, 0, 0, 0, 0, 0,
1411 0, 0, 0, 0, 244, 0, 0, 0, 543, 0,
1412 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1413 0, 0, 79, 0, 0, 80, 0, 0, 81, 0,
1414 82, 126, 0, 557, 558, 0, 0, 0, 561, 0,
1415 0, 563, 0, 125, 64, 65, 66, 67, 68, 69,
1416 70, 71, 72, 73, 74, 75, 76, 0, 0, 77,
1417 78, 0, 0, 0, 0, 0, 0, 0, 19, 79,
1418 20, 0, 80, 0, 0, 81, 0, 82, 398, 0,
1419 344, 125, 222, 223, 224, 225, 226, 227, 228, 229,
1420 230, 231, 232, 75, 76, 0, 0, 77, 78, 0,
1421 0, 0, 0, 0, 0, 0, 19, 0, 20, 0,
1422 0, 0, 0, 0, 0, 0, 0, 79, 0, 0,
1423 80, 0, 0, 81, 0, 82, 125, 64, 65, 66,
1424 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
1425 0, 0, 77, 78, 0, 0, 0, 0, 0, 0,
1426 0, 19, 0, 20, 0, 0, 0, 0, 0, 0,
1427 0, 0, 0, 407, 0, 125, 64, 65, 66, 67,
1428 68, 69, 70, 71, 72, 73, 74, 75, 76, 0,
1429 0, 77, 78, 0, 0, 0, 0, 0, 0, 0,
1430 19, 0, 20, 79, 0, 0, 80, 0, 0, 81,
1431 0, 82, 452, 63, 64, 65, 66, 67, 68, 69,
1432 70, 71, 72, 73, 74, 75, 76, 0, 0, 77,
1433 78, 0, 0, 0, 0, 0, 0, 0, 19, 0,
1434 20, 79, 0, 0, 80, 0, 395, 81, 0, 82,
1435 132, 64, 65, 66, 67, 68, 69, 70, 71, 72,
1436 73, 74, 75, 76, 0, 0, 77, 78, 0, 0,
1437 0, 0, 0, 0, 0, 19, 0, 20, 0, 0,
1438 0, 0, 0, 0, 0, 0, 79, 0, 0, 80,
1439 0, 0, 81, 0, 82, 125, 64, 65, 66, 67,
1440 68, 69, 70, 71, 72, 73, 74, 75, 76, 0,
1441 0, 77, 78, 0, 0, 0, 0, 0, 0, 0,
1442 19, 0, 20, 0, 0, 79, 0, 0, 80, 0,
1443 0, 81, 0, 82, 125, 222, 223, 224, 225, 226,
1444 227, 228, 229, 230, 231, 232, 75, 76, 0, 0,
1445 77, 78, 0, 0, 0, 0, 0, 0, 0, 19,
1446 0, 20, 0, 79, 0, 0, 80, 0, 0, 81,
1447 0, 82, 292, 293, 294, 295, 296, 297, 298, 299,
1448 300, 301, 302, 303, 304, 305, 306, 307, 308, 309,
1449 310, 311, 0, 77, 78, 0, 330, 331, 332, 0,
1450 79, 0, 19, 80, 20, 0, 81, 0, 82, 0,
1451 -78, 19, 0, 20, 0, 0, 0, 6, -78, -78,
1452 0, 0, 0, 0, 0, -78, -78, -78, -78, -78,
1453 -78, -78, 0, -78, 21, 0, 0, 0, 0, 0,
1454 0, -78, 22, 0, 0, 79, 23, 0, 80, 0,
1455 0, 81, 0, 82, 153, 154, 155, 156, 157, 158,
1456 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
1457 169, 170, 171, 172, 173, 174, 0, 0, 0, 0,
1458 0, 0, 0, 0, 79, 0, 0, 80, 0, 0,
1459 81, 0, 82, 0, 0, 0, 0, 0, 0, 0,
1460 0, 256, 0, 257, 181, 182, 183, 184, 0, 258,
1461 259, 260, 189, 190, 191, 192, 193, 194, 195, 196,
1462 197, 198, 199, 200, 201, 0, 0, 0, 0, 0,
1463 333, 0, 0, 334, 0, 335, 0, 0, 336, 247,
1464 248, 77, 78, 249, 250, 251, 252, 253, 254, 0,
1465 19, 0, 20, 0, 0, 0, 0, 0, 0, 0,
1466 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1467 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1468 0, 0, 0, 0, 255, 0, 0, 0, 0, 0,
1469 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1470 0, 0, 153, 154, 155, 156, 157, 158, 159, 160,
1471 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
1472 171, 172, 173, 174, 0, 0, 0, 0, 247, 248,
1473 0, 0, 249, 250, 251, 252, 253, 254, 0, 0,
1474 0, 0, 0, 0, 0, 0, 0, 0, 0, 256,
1475 0, 257, 181, 182, 183, 184, 0, 258, 259, 260,
1476 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
1477 199, 200, 201, 255, 0, 0, 0, 0, 0, 0,
1478 0, 261, 0, 0, 0, 0, 0, 0, 0, 0,
1479 0, 153, 154, 155, 156, 157, 158, 159, 160, 161,
1480 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
1481 172, 173, 174, 0, 0, 0, 0, 0, 0, 0,
1482 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1483 0, 0, 0, 0, 0, 0, 0, 0, 256, 0,
1484 257, 181, 182, 183, 184, 0, 258, 259, 260, 189,
1485 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
1486 200, 201, 148, 0, 0, 0, 0, 0, 0, 0,
1487 261, 0, 0, 149, 0, 0, 0, 0, 0, 0,
1488 0, 0, 0, 0, 150, 151, 0, 0, 0, 0,
1489 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1490 152, 0, 0, 0, 153, 154, 155, 156, 157, 158,
1491 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
1492 169, 170, 171, 172, 173, 174, 0, 0, 0, 0,
1493 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1494 0, 0, 0, 0, 0, 0, 175, 176, 177, 0,
1495 0, 178, 179, 180, 181, 182, 183, 184, 185, 186,
1496 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,
1497 197, 198, 199, 200, 201
1500 static const short int yycheck[] =
1502 38, 3, 100, 100, 51, 279, 221, 32, 503, 10,
1503 98, 10, 29, 51, 37, 82, 33, 152, 120, 52,
1504 53, 54, 237, 238, 4, 531, 152, 45, 152, 47,
1505 133, 0, 135, 136, 57, 15, 162, 532, 162, 72,
1506 546, 43, 35, 36, 147, 154, 5, 6, 7, 8,
1507 9, 10, 11, 12, 163, 28, 57, 30, 57, 62,
1508 98, 149, 0, 130, 5, 6, 7, 8, 9, 10,
1509 11, 12, 29, 208, 55, 56, 152, 28, 152, 30,
1510 118, 119, 84, 121, 160, 158, 160, 62, 152, 177,
1511 163, 151, 180, 31, 158, 152, 34, 185, 186, 187,
1512 188, 158, 25, 26, 42, 43, 44, 45, 46, 47,
1513 48, 149, 160, 53, 151, 163, 56, 57, 206, 207,
1514 125, 126, 73, 74, 75, 63, 77, 78, 79, 333,
1515 334, 335, 30, 236, 17, 18, 161, 175, 176, 177,
1516 178, 179, 180, 17, 18, 162, 18, 185, 186, 187,
1517 188, 5, 6, 7, 8, 9, 10, 11, 12, 17,
1518 18, 17, 18, 151, 202, 203, 204, 151, 206, 207,
1519 17, 18, 239, 240, 241, 77, 78, 151, 281, 394,
1520 151, 18, 18, 18, 156, 30, 289, 290, 291, 65,
1521 66, 67, 68, 69, 70, 71, 154, 18, 472, 158,
1522 474, 154, 30, 30, 27, 243, 154, 157, 157, 60,
1523 152, 18, 18, 18, 135, 136, 18, 158, 21, 42,
1524 43, 44, 45, 46, 47, 48, 147, 50, 21, 317,
1525 277, 18, 21, 152, 64, 58, 156, 155, 154, 277,
1526 154, 154, 154, 154, 154, 154, 154, 154, 154, 152,
1527 30, 353, 354, 355, 356, 357, 152, 152, 360, 361,
1528 362, 152, 364, 365, 152, 368, 152, 152, 315, 39,
1529 152, 374, 152, 152, 312, 152, 30, 315, 316, 317,
1530 155, 384, 349, 152, 387, 388, 30, 154, 376, 15,
1531 378, 379, 380, 15, 156, 152, 30, 385, 18, 152,
1532 152, 37, 152, 152, 152, 18, 152, 39, 152, 152,
1533 152, 152, 414, 152, 152, 57, 30, 419, 152, 422,
1534 423, 154, 425, 152, 427, 156, 152, 152, 431, 18,
1535 152, 155, 152, 152, 437, 438, 439, 154, 376, 377,
1536 378, 379, 380, 345, 152, 155, 155, 385, 386, 15,
1537 57, 152, 152, 152, 152, 152, 458, 459, 460, 461,
1538 281, 463, 464, 465, 152, 467, 158, 405, 289, 290,
1539 291, 155, 155, 155, 477, 39, 155, 155, 155, 155,
1540 155, 155, 485, 155, 487, 158, 155, 152, 15, 15,
1541 428, 479, 480, 481, 152, 15, 15, 499, 104, 104,
1542 104, 104, 265, 104, 104, 503, 503, 445, 511, 43,
1543 24, 406, 130, 50, 405, 3, 29, 519, 236, 521,
1544 522, 509, 428, 41, 557, 486, 529, 409, -1, -1,
1545 468, -1, -1, 471, 532, 532, -1, -1, -1, -1,
1546 -1, 479, 480, 481, -1, -1, -1, 368, 486, -1,
1547 -1, 554, 555, 374, -1, -1, 559, -1, -1, 562,
1548 -1, -1, -1, 384, -1, -1, 387, 388, -1, -1,
1549 -1, 509, 3, 4, 5, 6, 7, 8, 9, 10,
1550 11, 12, 13, 14, 15, 16, -1, -1, 19, 20,
1551 -1, -1, -1, -1, -1, -1, -1, 28, -1, 30,
1552 -1, 422, 423, -1, 425, -1, 427, -1, -1, -1,
1553 431, -1, -1, -1, -1, -1, 437, 438, 439, 3,
1554 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1555 14, 15, 16, -1, -1, 19, 20, -1, -1, -1,
1556 -1, -1, -1, -1, 28, -1, 30, -1, -1, -1,
1557 -1, -1, -1, -1, -1, -1, 477, -1, -1, -1,
1558 -1, -1, -1, -1, 485, -1, 487, 3, 4, 5,
1559 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1560 16, -1, -1, 19, 20, -1, -1, -1, -1, -1,
1561 511, -1, 28, -1, 30, -1, -1, -1, -1, -1,
1562 -1, -1, -1, -1, 40, -1, -1, -1, 529, -1,
1563 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1564 -1, -1, 153, -1, -1, 156, -1, -1, 159, -1,
1565 161, 162, -1, 554, 555, -1, -1, -1, 559, -1,
1566 -1, 562, -1, 3, 4, 5, 6, 7, 8, 9,
1567 10, 11, 12, 13, 14, 15, 16, -1, -1, 19,
1568 20, -1, -1, -1, -1, -1, -1, -1, 28, 153,
1569 30, -1, 156, -1, -1, 159, -1, 161, 162, -1,
1570 40, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1571 12, 13, 14, 15, 16, -1, -1, 19, 20, -1,
1572 -1, -1, -1, -1, -1, -1, 28, -1, 30, -1,
1573 -1, -1, -1, -1, -1, -1, -1, 153, -1, -1,
1574 156, -1, -1, 159, -1, 161, 3, 4, 5, 6,
1575 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1576 -1, -1, 19, 20, -1, -1, -1, -1, -1, -1,
1577 -1, 28, -1, 30, -1, -1, -1, -1, -1, -1,
1578 -1, -1, -1, 40, -1, 3, 4, 5, 6, 7,
1579 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
1580 -1, 19, 20, -1, -1, -1, -1, -1, -1, -1,
1581 28, -1, 30, 153, -1, -1, 156, -1, -1, 159,
1582 -1, 161, 40, 3, 4, 5, 6, 7, 8, 9,
1583 10, 11, 12, 13, 14, 15, 16, -1, -1, 19,
1584 20, -1, -1, -1, -1, -1, -1, -1, 28, -1,
1585 30, 153, -1, -1, 156, -1, 158, 159, -1, 161,
1586 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1587 13, 14, 15, 16, -1, -1, 19, 20, -1, -1,
1588 -1, -1, -1, -1, -1, 28, -1, 30, -1, -1,
1589 -1, -1, -1, -1, -1, -1, 153, -1, -1, 156,
1590 -1, -1, 159, -1, 161, 3, 4, 5, 6, 7,
1591 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
1592 -1, 19, 20, -1, -1, -1, -1, -1, -1, -1,
1593 28, -1, 30, -1, -1, 153, -1, -1, 156, -1,
1594 -1, 159, -1, 161, 3, 4, 5, 6, 7, 8,
1595 9, 10, 11, 12, 13, 14, 15, 16, -1, -1,
1596 19, 20, -1, -1, -1, -1, -1, -1, -1, 28,
1597 -1, 30, -1, 153, -1, -1, 156, -1, -1, 159,
1598 -1, 161, 102, 103, 104, 105, 106, 107, 108, 109,
1599 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
1600 120, 121, -1, 19, 20, -1, 22, 23, 24, -1,
1601 153, -1, 28, 156, 30, -1, 159, -1, 161, -1,
1602 27, 28, -1, 30, -1, -1, -1, 34, 35, 36,
1603 -1, -1, -1, -1, -1, 42, 43, 44, 45, 46,
1604 47, 48, -1, 50, 51, -1, -1, -1, -1, -1,
1605 -1, 58, 59, -1, -1, 153, 63, -1, 156, -1,
1606 -1, 159, -1, 161, 80, 81, 82, 83, 84, 85,
1607 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1608 96, 97, 98, 99, 100, 101, -1, -1, -1, -1,
1609 -1, -1, -1, -1, 153, -1, -1, 156, -1, -1,
1610 159, -1, 161, -1, -1, -1, -1, -1, -1, -1,
1611 -1, 127, -1, 129, 130, 131, 132, 133, -1, 135,
1612 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
1613 146, 147, 148, 149, 150, -1, -1, -1, -1, -1,
1614 156, -1, -1, 159, -1, 161, -1, -1, 164, 17,
1615 18, 19, 20, 21, 22, 23, 24, 25, 26, -1,
1616 28, -1, 30, -1, -1, -1, -1, -1, -1, -1,
1617 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1618 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1619 -1, -1, -1, -1, 62, -1, -1, -1, -1, -1,
1620 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1621 -1, -1, 80, 81, 82, 83, 84, 85, 86, 87,
1622 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
1623 98, 99, 100, 101, -1, -1, -1, -1, 17, 18,
1624 -1, -1, 21, 22, 23, 24, 25, 26, -1, -1,
1625 -1, -1, -1, -1, -1, -1, -1, -1, -1, 127,
1626 -1, 129, 130, 131, 132, 133, -1, 135, 136, 137,
1627 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
1628 148, 149, 150, 62, -1, -1, -1, -1, -1, -1,
1629 -1, 159, -1, -1, -1, -1, -1, -1, -1, -1,
1630 -1, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1631 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
1632 99, 100, 101, -1, -1, -1, -1, -1, -1, -1,
1633 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1634 -1, -1, -1, -1, -1, -1, -1, -1, 127, -1,
1635 129, 130, 131, 132, 133, -1, 135, 136, 137, 138,
1636 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
1637 149, 150, 38, -1, -1, -1, -1, -1, -1, -1,
1638 159, -1, -1, 49, -1, -1, -1, -1, -1, -1,
1639 -1, -1, -1, -1, 60, 61, -1, -1, -1, -1,
1640 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1641 76, -1, -1, -1, 80, 81, 82, 83, 84, 85,
1642 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1643 96, 97, 98, 99, 100, 101, -1, -1, -1, -1,
1644 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1645 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1,
1646 -1, 127, 128, 129, 130, 131, 132, 133, 134, 135,
1647 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
1648 146, 147, 148, 149, 150
1651 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1652 symbol of state STATE-NUM. */
1653 static const unsigned char yystos[] =
1655 0, 199, 200, 202, 0, 31, 34, 42, 43, 44,
1656 45, 46, 47, 48, 63, 180, 215, 217, 219, 28,
1657 30, 51, 59, 63, 179, 208, 219, 45, 47, 218,
1658 62, 65, 66, 67, 68, 69, 70, 71, 181, 213,
1659 29, 225, 226, 227, 52, 53, 54, 72, 205, 151,
1660 62, 27, 45, 47, 50, 58, 180, 201, 151, 213,
1661 30, 203, 18, 3, 4, 5, 6, 7, 8, 9,
1662 10, 11, 12, 13, 14, 15, 16, 19, 20, 153,
1663 156, 159, 161, 166, 188, 189, 190, 191, 192, 208,
1664 222, 32, 161, 214, 33, 162, 216, 226, 73, 74,
1665 75, 77, 78, 79, 179, 228, 229, 231, 151, 151,
1666 151, 151, 156, 206, 203, 188, 35, 36, 198, 198,
1667 198, 198, 18, 18, 18, 3, 162, 192, 193, 208,
1668 154, 163, 3, 190, 224, 4, 15, 5, 6, 7,
1669 8, 9, 10, 11, 12, 175, 176, 177, 38, 49,
1670 60, 61, 76, 80, 81, 82, 83, 84, 85, 86,
1671 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
1672 97, 98, 99, 100, 101, 122, 123, 124, 127, 128,
1673 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
1674 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
1675 149, 150, 168, 169, 170, 171, 173, 174, 235, 236,
1676 238, 239, 30, 55, 56, 204, 18, 30, 30, 207,
1677 190, 190, 4, 5, 6, 7, 8, 9, 10, 11,
1678 12, 13, 14, 175, 176, 178, 190, 195, 190, 157,
1679 157, 152, 162, 154, 40, 193, 194, 17, 18, 21,
1680 22, 23, 24, 25, 26, 62, 127, 129, 135, 136,
1681 137, 159, 168, 169, 170, 171, 173, 174, 196, 221,
1682 222, 223, 223, 223, 223, 224, 60, 181, 190, 190,
1683 224, 190, 190, 232, 224, 224, 224, 224, 224, 190,
1684 190, 190, 102, 103, 104, 105, 106, 107, 108, 109,
1685 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
1686 120, 121, 172, 224, 224, 181, 125, 126, 152, 158,
1687 152, 186, 186, 25, 26, 17, 18, 167, 18, 21,
1688 22, 23, 24, 156, 159, 161, 164, 196, 222, 186,
1689 186, 192, 192, 192, 40, 190, 210, 211, 212, 152,
1690 155, 64, 220, 154, 154, 154, 154, 154, 195, 197,
1691 154, 154, 154, 172, 154, 154, 152, 152, 188, 152,
1692 183, 152, 183, 223, 156, 152, 152, 152, 152, 152,
1693 152, 223, 223, 223, 190, 152, 39, 188, 190, 224,
1694 30, 37, 57, 184, 187, 158, 197, 197, 162, 197,
1695 30, 158, 160, 208, 209, 152, 155, 40, 30, 195,
1696 195, 195, 195, 195, 152, 160, 195, 195, 195, 154,
1697 195, 195, 15, 15, 223, 10, 57, 10, 152, 237,
1698 223, 156, 224, 190, 224, 224, 224, 152, 152, 152,
1699 223, 224, 190, 223, 223, 152, 30, 18, 186, 158,
1700 160, 162, 40, 210, 184, 185, 152, 237, 152, 152,
1701 152, 152, 195, 152, 152, 152, 195, 152, 39, 223,
1702 223, 154, 223, 18, 223, 224, 233, 152, 223, 152,
1703 152, 152, 223, 223, 223, 152, 154, 190, 57, 182,
1704 30, 155, 195, 195, 195, 195, 195, 195, 195, 152,
1705 195, 190, 152, 156, 233, 234, 152, 183, 183, 152,
1706 223, 152, 224, 224, 224, 223, 234, 223, 18, 152,
1707 155, 152, 152, 155, 155, 155, 195, 155, 155, 15,
1708 158, 177, 230, 155, 224, 158, 223, 155, 155, 195,
1709 195, 195, 155, 223, 221, 158, 177, 39, 158, 155,
1710 155, 155, 152, 221, 15, 15, 152, 223, 223, 15,
1714 #define yyerrok (yyerrstatus = 0)
1715 #define yyclearin (yychar = YYEMPTY)
1716 #define YYEMPTY (-2)
1719 #define YYACCEPT goto yyacceptlab
1720 #define YYABORT goto yyabortlab
1721 #define YYERROR goto yyerrorlab
1724 /* Like YYERROR except do call yyerror. This remains here temporarily
1725 to ease the transition to the new meaning of YYERROR, for GCC.
1726 Once GCC version 2 has supplanted version 1, this can go. */
1728 #define YYFAIL goto yyerrlab
1730 #define YYRECOVERING() (!!yyerrstatus)
1732 #define YYBACKUP(Token, Value) \
1734 if (yychar == YYEMPTY && yylen == 1) \
1738 yytoken = YYTRANSLATE (yychar); \
1744 yyerror (YY_("syntax error: cannot back up")); \
1751 #define YYERRCODE 256
1754 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1755 If N is 0, then set CURRENT to the empty location which ends
1756 the previous symbol: RHS[0] (always defined). */
1758 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1759 #ifndef YYLLOC_DEFAULT
1760 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1764 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1765 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1766 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1767 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1771 (Current).first_line = (Current).last_line = \
1772 YYRHSLOC (Rhs, 0).last_line; \
1773 (Current).first_column = (Current).last_column = \
1774 YYRHSLOC (Rhs, 0).last_column; \
1780 /* YY_LOCATION_PRINT -- Print the location on the stream.
1781 This macro was not mandated originally: define only if we know
1782 we won't break user code: when these are the locations we know. */
1784 #ifndef YY_LOCATION_PRINT
1785 # if YYLTYPE_IS_TRIVIAL
1786 # define YY_LOCATION_PRINT(File, Loc) \
1787 fprintf (File, "%d.%d-%d.%d", \
1788 (Loc).first_line, (Loc).first_column, \
1789 (Loc).last_line, (Loc).last_column)
1791 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1796 /* YYLEX -- calling `yylex' with the right arguments. */
1799 # define YYLEX yylex (YYLEX_PARAM)
1801 # define YYLEX yylex ()
1804 /* Enable debugging if requested. */
1808 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1809 # define YYFPRINTF fprintf
1812 # define YYDPRINTF(Args) \
1818 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1822 YYFPRINTF (stderr, "%s ", Title); \
1823 yysymprint (stderr, \
1825 YYFPRINTF (stderr, "\n"); \
1829 /*------------------------------------------------------------------.
1830 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1832 `------------------------------------------------------------------*/
1834 #if defined (__STDC__) || defined (__cplusplus)
1836 yy_stack_print (short int *bottom, short int *top)
1839 yy_stack_print (bottom, top)
1844 YYFPRINTF (stderr, "Stack now");
1845 for (/* Nothing. */; bottom <= top; ++bottom)
1846 YYFPRINTF (stderr, " %d", *bottom);
1847 YYFPRINTF (stderr, "\n");
1850 # define YY_STACK_PRINT(Bottom, Top) \
1853 yy_stack_print ((Bottom), (Top)); \
1857 /*------------------------------------------------.
1858 | Report that the YYRULE is going to be reduced. |
1859 `------------------------------------------------*/
1861 #if defined (__STDC__) || defined (__cplusplus)
1863 yy_reduce_print (int yyrule)
1866 yy_reduce_print (yyrule)
1871 unsigned long int yylno = yyrline[yyrule];
1872 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
1874 /* Print the symbols being reduced, and their result. */
1875 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
1876 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1877 YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
1880 # define YY_REDUCE_PRINT(Rule) \
1883 yy_reduce_print (Rule); \
1886 /* Nonzero means print parse trace. It is left uninitialized so that
1887 multiple parsers can coexist. */
1889 #else /* !YYDEBUG */
1890 # define YYDPRINTF(Args)
1891 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1892 # define YY_STACK_PRINT(Bottom, Top)
1893 # define YY_REDUCE_PRINT(Rule)
1894 #endif /* !YYDEBUG */
1897 /* YYINITDEPTH -- initial size of the parser's stacks. */
1899 # define YYINITDEPTH 200
1902 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1903 if the built-in stack extension method is used).
1905 Do not make this value too large; the results are undefined if
1906 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1907 evaluated with infinite-precision integer arithmetic. */
1910 # define YYMAXDEPTH 10000
1918 # if defined (__GLIBC__) && defined (_STRING_H)
1919 # define yystrlen strlen
1921 /* Return the length of YYSTR. */
1923 # if defined (__STDC__) || defined (__cplusplus)
1924 yystrlen (const char *yystr)
1930 const char *yys = yystr;
1932 while (*yys++ != '\0')
1935 return yys - yystr - 1;
1941 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1942 # define yystpcpy stpcpy
1944 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1947 # if defined (__STDC__) || defined (__cplusplus)
1948 yystpcpy (char *yydest, const char *yysrc)
1950 yystpcpy (yydest, yysrc)
1956 const char *yys = yysrc;
1958 while ((*yyd++ = *yys++) != '\0')
1967 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1968 quotes and backslashes, so that it's suitable for yyerror. The
1969 heuristic is that double-quoting is unnecessary unless the string
1970 contains an apostrophe, a comma, or backslash (other than
1971 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1972 null, do not copy; instead, return the length of what the result
1975 yytnamerr (char *yyres, const char *yystr)
1980 char const *yyp = yystr;
1987 goto do_not_strip_quotes;
1991 goto do_not_strip_quotes;
2004 do_not_strip_quotes: ;
2008 return yystrlen (yystr);
2010 return yystpcpy (yyres, yystr) - yyres;
2014 #endif /* YYERROR_VERBOSE */
2019 /*--------------------------------.
2020 | Print this symbol on YYOUTPUT. |
2021 `--------------------------------*/
2023 #if defined (__STDC__) || defined (__cplusplus)
2025 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
2028 yysymprint (yyoutput, yytype, yyvaluep)
2034 /* Pacify ``unused variable'' warnings. */
2037 if (yytype < YYNTOKENS)
2038 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
2040 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
2044 if (yytype < YYNTOKENS)
2045 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
2052 YYFPRINTF (yyoutput, ")");
2055 #endif /* ! YYDEBUG */
2056 /*-----------------------------------------------.
2057 | Release the memory associated to this symbol. |
2058 `-----------------------------------------------*/
2060 #if defined (__STDC__) || defined (__cplusplus)
2062 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
2065 yydestruct (yymsg, yytype, yyvaluep)
2071 /* Pacify ``unused variable'' warnings. */
2076 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2087 /* Prevent warnings from -Wmissing-prototypes. */
2089 #ifdef YYPARSE_PARAM
2090 # if defined (__STDC__) || defined (__cplusplus)
2091 int yyparse (void *YYPARSE_PARAM);
2095 #else /* ! YYPARSE_PARAM */
2096 #if defined (__STDC__) || defined (__cplusplus)
2101 #endif /* ! YYPARSE_PARAM */
2105 /* The look-ahead symbol. */
2108 /* The semantic value of the look-ahead symbol. */
2111 /* Number of syntax errors so far. */
2120 #ifdef YYPARSE_PARAM
2121 # if defined (__STDC__) || defined (__cplusplus)
2122 int yyparse (void *YYPARSE_PARAM)
2124 int yyparse (YYPARSE_PARAM)
2125 void *YYPARSE_PARAM;
2127 #else /* ! YYPARSE_PARAM */
2128 #if defined (__STDC__) || defined (__cplusplus)
2142 /* Number of tokens to shift before error messages enabled. */
2144 /* Look-ahead token as an internal (translated) token number. */
2147 /* Three stacks and their tools:
2148 `yyss': related to states,
2149 `yyvs': related to semantic values,
2150 `yyls': related to locations.
2152 Refer to the stacks thru separate pointers, to allow yyoverflow
2153 to reallocate them elsewhere. */
2155 /* The state stack. */
2156 short int yyssa[YYINITDEPTH];
2157 short int *yyss = yyssa;
2160 /* The semantic value stack. */
2161 YYSTYPE yyvsa[YYINITDEPTH];
2162 YYSTYPE *yyvs = yyvsa;
2167 #define YYPOPSTACK (yyvsp--, yyssp--)
2169 YYSIZE_T yystacksize = YYINITDEPTH;
2171 /* The variables used to return semantic value and location from the
2176 /* When reducing, the number of symbols on the RHS of the reduced
2180 YYDPRINTF ((stderr, "Starting parse\n"));
2185 yychar = YYEMPTY; /* Cause a token to be read. */
2187 /* Initialize stack pointers.
2188 Waste one element of value and location stack
2189 so that they stay on the same level as the state stack.
2190 The wasted elements are never initialized. */
2197 /*------------------------------------------------------------.
2198 | yynewstate -- Push a new state, which is found in yystate. |
2199 `------------------------------------------------------------*/
2201 /* In all cases, when you get here, the value and location stacks
2202 have just been pushed. so pushing a state here evens the stacks.
2209 if (yyss + yystacksize - 1 <= yyssp)
2211 /* Get the current used size of the three stacks, in elements. */
2212 YYSIZE_T yysize = yyssp - yyss + 1;
2216 /* Give user a chance to reallocate the stack. Use copies of
2217 these so that the &'s don't force the real ones into
2219 YYSTYPE *yyvs1 = yyvs;
2220 short int *yyss1 = yyss;
2223 /* Each stack pointer address is followed by the size of the
2224 data in use in that stack, in bytes. This used to be a
2225 conditional around just the two extra args, but that might
2226 be undefined if yyoverflow is a macro. */
2227 yyoverflow (YY_("memory exhausted"),
2228 &yyss1, yysize * sizeof (*yyssp),
2229 &yyvs1, yysize * sizeof (*yyvsp),
2236 #else /* no yyoverflow */
2237 # ifndef YYSTACK_RELOCATE
2238 goto yyexhaustedlab;
2240 /* Extend the stack our own way. */
2241 if (YYMAXDEPTH <= yystacksize)
2242 goto yyexhaustedlab;
2244 if (YYMAXDEPTH < yystacksize)
2245 yystacksize = YYMAXDEPTH;
2248 short int *yyss1 = yyss;
2249 union yyalloc *yyptr =
2250 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2252 goto yyexhaustedlab;
2253 YYSTACK_RELOCATE (yyss);
2254 YYSTACK_RELOCATE (yyvs);
2256 # undef YYSTACK_RELOCATE
2258 YYSTACK_FREE (yyss1);
2261 #endif /* no yyoverflow */
2263 yyssp = yyss + yysize - 1;
2264 yyvsp = yyvs + yysize - 1;
2267 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2268 (unsigned long int) yystacksize));
2270 if (yyss + yystacksize - 1 <= yyssp)
2274 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2283 /* Do appropriate processing given the current state. */
2284 /* Read a look-ahead token if we need one and don't already have one. */
2287 /* First try to decide what to do without reference to look-ahead token. */
2289 yyn = yypact[yystate];
2290 if (yyn == YYPACT_NINF)
2293 /* Not known => get a look-ahead token if don't already have one. */
2295 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
2296 if (yychar == YYEMPTY)
2298 YYDPRINTF ((stderr, "Reading a token: "));
2302 if (yychar <= YYEOF)
2304 yychar = yytoken = YYEOF;
2305 YYDPRINTF ((stderr, "Now at end of input.\n"));
2309 yytoken = YYTRANSLATE (yychar);
2310 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2313 /* If the proper action on seeing token YYTOKEN is to reduce or to
2314 detect an error, take that action. */
2316 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2321 if (yyn == 0 || yyn == YYTABLE_NINF)
2330 /* Shift the look-ahead token. */
2331 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2333 /* Discard the token being shifted unless it is eof. */
2334 if (yychar != YYEOF)
2340 /* Count tokens shifted since error; after three, turn off error
2349 /*-----------------------------------------------------------.
2350 | yydefault -- do the default action for the current state. |
2351 `-----------------------------------------------------------*/
2353 yyn = yydefact[yystate];
2359 /*-----------------------------.
2360 | yyreduce -- Do a reduction. |
2361 `-----------------------------*/
2363 /* yyn is the number of a rule to reduce with. */
2366 /* If YYLEN is nonzero, implement the default value of the action:
2369 Otherwise, the following line sets YYVAL to garbage.
2370 This behavior is undocumented and Bison
2371 users should not rely upon it. Assigning to YYVAL
2372 unconditionally makes the parser a bit smaller, and it avoids a
2373 GCC warning that YYVAL may be used uninitialized. */
2374 yyval = yyvsp[1-yylen];
2377 YY_REDUCE_PRINT (yyn);
2381 #line 356 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2383 (yyval.String) = (yyvsp[-1].String);
2388 #line 359 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2390 (yyval.String) = new std::string("");
2395 #line 366 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2396 { (yyval.String) = new std::string(""); ;}
2400 #line 371 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2402 *(yyvsp[-1].String) += *(yyvsp[0].String);
2403 delete (yyvsp[0].String);
2404 (yyval.String) = (yyvsp[-1].String);
2409 #line 376 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2410 { (yyval.String) = new std::string(""); ;}
2414 #line 381 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2415 { (yyval.String) = new std::string(); ;}
2419 #line 382 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2420 { *(yyvsp[-1].String) += " " + *(yyvsp[0].String); delete (yyvsp[0].String); (yyval.String) = (yyvsp[-1].String); ;}
2424 #line 385 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2425 { (yyval.String) = new std::string(); ;}
2429 #line 386 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2431 (yyvsp[-1].String)->insert(0, ", ");
2432 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2433 delete (yyvsp[0].String);
2434 (yyval.String) = (yyvsp[-1].String);
2439 #line 394 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2441 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2442 delete (yyvsp[0].String);
2443 (yyval.String) = (yyvsp[-1].String);
2448 #line 400 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2449 { (yyval.String) = new std::string(); ;}
2453 #line 404 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2454 { (yyval.String) = new std::string(); ;}
2458 #line 405 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2460 (yyvsp[-1].String)->insert(0, ", ");
2461 if (!(yyvsp[0].String)->empty())
2462 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2463 delete (yyvsp[0].String);
2464 (yyval.String) = (yyvsp[-1].String);
2469 #line 415 "/proj/llvm/llvm-4/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 437 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2480 (yyval.Type).newTy = (yyvsp[0].String);
2481 (yyval.Type).oldTy = OpaqueTy;
2486 #line 441 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2488 (yyval.Type).newTy = (yyvsp[0].String);
2489 (yyval.Type).oldTy = UnresolvedTy;
2494 #line 445 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2496 (yyval.Type) = (yyvsp[0].Type);
2501 #line 448 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2502 { // Type UpReference
2503 (yyvsp[0].String)->insert(0, "\\");
2504 (yyval.Type).newTy = (yyvsp[0].String);
2505 (yyval.Type).oldTy = NumericTy;
2510 #line 453 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2511 { // Function derived type?
2512 *(yyvsp[-3].Type).newTy += "( " + *(yyvsp[-1].String) + " )";
2513 delete (yyvsp[-1].String);
2514 (yyval.Type).newTy = (yyvsp[-3].Type).newTy;
2515 (yyval.Type).oldTy = FunctionTy;
2520 #line 459 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2521 { // Sized array type?
2522 (yyvsp[-3].String)->insert(0,"[ ");
2523 *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " ]";
2524 delete (yyvsp[-1].Type).newTy;
2525 (yyval.Type).newTy = (yyvsp[-3].String);
2526 (yyval.Type).oldTy = ArrayTy;
2527 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2532 #line 467 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2533 { // Packed array type?
2534 (yyvsp[-3].String)->insert(0,"< ");
2535 *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " >";
2536 delete (yyvsp[-1].Type).newTy;
2537 (yyval.Type).newTy = (yyvsp[-3].String);
2538 (yyval.Type).oldTy = PackedTy;
2539 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2544 #line 475 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2545 { // Structure type?
2546 (yyvsp[-1].String)->insert(0, "{ ");
2547 *(yyvsp[-1].String) += " }";
2548 (yyval.Type).newTy = (yyvsp[-1].String);
2549 (yyval.Type).oldTy = StructTy;
2554 #line 481 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2555 { // Empty structure type?
2556 (yyval.Type).newTy = new std::string("{}");
2557 (yyval.Type).oldTy = StructTy;
2562 #line 485 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2564 *(yyvsp[-1].Type).newTy += '*';
2565 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2566 (yyvsp[-1].Type).oldTy = PointerTy;
2567 (yyval.Type) = (yyvsp[-1].Type);
2572 #line 496 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2574 (yyval.String) = (yyvsp[0].Type).newTy;
2579 #line 499 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2581 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Type).newTy;
2582 delete (yyvsp[0].Type).newTy;
2583 (yyval.String) = (yyvsp[-2].String);
2588 #line 508 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2590 *(yyvsp[-2].String) += ", ...";
2591 delete (yyvsp[0].String);
2592 (yyval.String) = (yyvsp[-2].String);
2597 #line 513 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2599 (yyval.String) = (yyvsp[0].String);
2604 #line 516 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2606 (yyval.String) = new std::string();
2611 #line 526 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2612 { // Nonempty unsized arr
2613 (yyval.Const).type = (yyvsp[-3].Type);
2614 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2615 *(yyval.Const).cnst += " [ " + *(yyvsp[-1].String) + " ]";
2616 delete (yyvsp[-1].String);
2621 #line 532 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2623 (yyval.Const).type = (yyvsp[-2].Type);
2624 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2625 *(yyval.Const).cnst += "[ ]";
2630 #line 537 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2632 (yyval.Const).type = (yyvsp[-2].Type);
2633 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2634 *(yyval.Const).cnst += " c" + *(yyvsp[0].String);
2635 delete (yyvsp[0].String);
2640 #line 543 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2641 { // Nonempty unsized arr
2642 (yyval.Const).type = (yyvsp[-3].Type);
2643 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2644 *(yyval.Const).cnst += " < " + *(yyvsp[-1].String) + " >";
2645 delete (yyvsp[-1].String);
2650 #line 549 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2652 (yyval.Const).type = (yyvsp[-3].Type);
2653 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2654 *(yyval.Const).cnst += " { " + *(yyvsp[-1].String) + " }";
2655 delete (yyvsp[-1].String);
2660 #line 555 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2662 (yyval.Const).type = (yyvsp[-2].Type);
2663 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2664 *(yyval.Const).cnst += " {}";
2669 #line 560 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2671 (yyval.Const).type = (yyvsp[-1].Type);
2672 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2673 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2674 delete (yyvsp[0].String);
2679 #line 566 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2681 (yyval.Const).type = (yyvsp[-1].Type);
2682 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2683 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2684 delete (yyvsp[0].String);
2689 #line 572 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2691 (yyval.Const).type = (yyvsp[-1].Type);
2692 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2693 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2694 delete (yyvsp[0].String);
2699 #line 578 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2701 (yyval.Const).type = (yyvsp[-1].Type);
2702 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2703 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2704 delete (yyvsp[0].String);
2709 #line 584 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2711 (yyval.Const).type = (yyvsp[-1].Type);
2712 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2713 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2714 delete (yyvsp[0].String);
2719 #line 590 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2720 { // integral constants
2721 (yyval.Const).type = (yyvsp[-1].Type);
2722 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2723 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2724 delete (yyvsp[0].String);
2729 #line 596 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2730 { // integral constants
2731 (yyval.Const).type = (yyvsp[-1].Type);
2732 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2733 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2734 delete (yyvsp[0].String);
2739 #line 602 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2740 { // Boolean constants
2741 (yyval.Const).type = (yyvsp[-1].Type);
2742 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2743 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2744 delete (yyvsp[0].String);
2749 #line 608 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2750 { // Boolean constants
2751 (yyval.Const).type = (yyvsp[-1].Type);
2752 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2753 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2754 delete (yyvsp[0].String);
2759 #line 614 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2760 { // Float & Double constants
2761 (yyval.Const).type = (yyvsp[-1].Type);
2762 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2763 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2764 delete (yyvsp[0].String);
2769 #line 622 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2771 std::string source = *(yyvsp[-3].Const).cnst;
2772 TypeInfo DstTy = (yyvsp[-1].Type);
2774 if (*(yyvsp[-5].String) == "cast") {
2775 // Call getCastUpgrade to upgrade the old cast
2776 (yyval.String) = new std::string(getCastUpgrade(source, (yyvsp[-3].Const).type, (yyvsp[-1].Type), true));
2778 // Nothing to upgrade, just create the cast constant expr
2779 (yyval.String) = new std::string(*(yyvsp[-5].String));
2780 *(yyval.String) += "( " + source + " to " + *(yyvsp[-1].Type).newTy + ")";
2782 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
2787 #line 636 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2789 *(yyvsp[-4].String) += "(" + *(yyvsp[-2].Const).cnst;
2790 for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
2791 ValueInfo& VI = (*(yyvsp[-1].ValList))[i];
2792 *(yyvsp[-4].String) += ", " + *VI.val;
2795 *(yyvsp[-4].String) += ")";
2796 (yyval.String) = (yyvsp[-4].String);
2797 (yyvsp[-2].Const).destroy();
2798 delete (yyvsp[-1].ValList);
2803 #line 648 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2805 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2806 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2807 (yyval.String) = (yyvsp[-7].String);
2812 #line 653 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2814 const char* op = getDivRemOpcode(*(yyvsp[-5].String), (yyvsp[-3].Const).type);
2815 (yyval.String) = new std::string(op);
2816 *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2817 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2822 #line 659 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2824 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2825 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2826 (yyval.String) = (yyvsp[-5].String);
2831 #line 664 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2833 #if UPGRADE_SETCOND_OPS
2834 *(yyvsp[-5].String) = getCompareOp(*(yyvsp[-5].String), (yyvsp[-3].Const).type);
2836 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2837 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2838 (yyval.String) = (yyvsp[-5].String);
2843 #line 672 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2845 *(yyvsp[-6].String) += "(" + *(yyvsp[-5].String) + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2846 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2847 (yyval.String) = (yyvsp[-6].String);
2852 #line 677 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2854 const char* shiftop = (yyvsp[-5].String)->c_str();
2855 if (*(yyvsp[-5].String) == "shr")
2856 shiftop = ((yyvsp[-3].Const).type.isUnsigned()) ? "lshr" : "ashr";
2857 (yyval.String) = new std::string(shiftop);
2858 *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2859 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2864 #line 685 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2866 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2867 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2868 (yyval.String) = (yyvsp[-5].String);
2873 #line 690 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2875 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2876 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2877 (yyval.String) = (yyvsp[-7].String);
2882 #line 695 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2884 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2885 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2886 (yyval.String) = (yyvsp[-7].String);
2891 #line 705 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2893 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Const).cnst;
2894 (yyvsp[0].Const).destroy();
2895 (yyval.String) = (yyvsp[-2].String);
2900 #line 710 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2901 { (yyval.String) = new std::string(*(yyvsp[0].Const).cnst); (yyvsp[0].Const).destroy(); ;}
2905 #line 725 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2911 #line 730 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2918 #line 733 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2920 *O << *(yyvsp[0].String) << "\n";
2921 delete (yyvsp[0].String);
2927 #line 738 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2929 *O << "module asm " << " " << *(yyvsp[0].String) << "\n";
2935 #line 742 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2937 *O << "implementation\n";
2943 #line 746 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2944 { (yyval.String) = 0; ;}
2948 #line 748 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2949 { (yyval.String) = (yyvsp[0].String); *(yyval.String) = "external"; ;}
2953 #line 751 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2955 EnumeratedTypes.push_back((yyvsp[0].Type));
2956 if (!(yyvsp[-2].String)->empty()) {
2957 NamedTypes[*(yyvsp[-2].String)].newTy = new std::string(*(yyvsp[0].Type).newTy);
2958 NamedTypes[*(yyvsp[-2].String)].oldTy = (yyvsp[0].Type).oldTy;
2959 NamedTypes[*(yyvsp[-2].String)].elemTy = (yyvsp[0].Type).elemTy;
2960 *O << *(yyvsp[-2].String) << " = ";
2962 *O << "type " << *(yyvsp[0].Type).newTy << "\n";
2963 delete (yyvsp[-2].String); delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
2969 #line 763 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2970 { // Function prototypes can be in const pool
2971 *O << *(yyvsp[0].String) << "\n";
2972 delete (yyvsp[0].String);
2978 #line 768 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2979 { // Asm blocks can be in the const pool
2980 *O << *(yyvsp[-2].String) << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
2981 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
2987 #line 773 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2989 if (!(yyvsp[-4].String)->empty())
2990 *O << *(yyvsp[-4].String) << " = ";
2991 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Const).cnst << " " << *(yyvsp[0].String) << "\n";
2992 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Const).destroy(); delete (yyvsp[0].String);
2998 #line 780 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3000 if (!(yyvsp[-4].String)->empty())
3001 *O << *(yyvsp[-4].String) << " = ";
3002 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3003 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3009 #line 787 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3011 if (!(yyvsp[-4].String)->empty())
3012 *O << *(yyvsp[-4].String) << " = ";
3013 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3014 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3020 #line 794 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3022 if (!(yyvsp[-4].String)->empty())
3023 *O << *(yyvsp[-4].String) << " = ";
3024 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3025 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3031 #line 801 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3033 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
3034 delete (yyvsp[-1].String); delete (yyvsp[0].String);
3040 #line 806 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3042 *O << *(yyvsp[-2].String) << " = " << *(yyvsp[0].String) << "\n";
3043 delete (yyvsp[-2].String); delete (yyvsp[0].String);
3049 #line 811 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3056 #line 821 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3058 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3059 delete (yyvsp[0].String);
3060 (yyval.String) = (yyvsp[-2].String);
3065 #line 826 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3067 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3068 if (*(yyvsp[0].String) == "64")
3070 delete (yyvsp[0].String);
3071 (yyval.String) = (yyvsp[-2].String);
3076 #line 833 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3078 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3079 delete (yyvsp[0].String);
3080 (yyval.String) = (yyvsp[-2].String);
3085 #line 838 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3087 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3088 delete (yyvsp[0].String);
3089 (yyval.String) = (yyvsp[-2].String);
3094 #line 845 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3096 (yyvsp[-1].String)->insert(0, "[ ");
3097 *(yyvsp[-1].String) += " ]";
3098 (yyval.String) = (yyvsp[-1].String);
3103 #line 852 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3105 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
3106 delete (yyvsp[0].String);
3107 (yyval.String) = (yyvsp[-2].String);
3112 #line 858 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3114 (yyval.String) = new std::string();
3119 #line 867 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3120 { (yyval.String) = new std::string(); ;}
3124 #line 869 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3126 (yyval.String) = (yyvsp[-1].Type).newTy;
3127 if (!(yyvsp[0].String)->empty())
3128 *(yyval.String) += " " + *(yyvsp[0].String);
3129 delete (yyvsp[0].String);
3134 #line 876 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3136 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
3137 delete (yyvsp[0].String);
3142 #line 880 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3144 (yyval.String) = (yyvsp[0].String);
3149 #line 884 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3151 (yyval.String) = (yyvsp[0].String);
3156 #line 887 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3158 *(yyvsp[-2].String) += ", ...";
3159 (yyval.String) = (yyvsp[-2].String);
3160 delete (yyvsp[0].String);
3165 #line 892 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3167 (yyval.String) = (yyvsp[0].String);
3172 #line 895 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3173 { (yyval.String) = new std::string(); ;}
3177 #line 898 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3179 if (!(yyvsp[-7].String)->empty()) {
3180 *(yyvsp[-7].String) += " ";
3182 *(yyvsp[-7].String) += *(yyvsp[-6].Type).newTy + " " + *(yyvsp[-5].String) + "(" + *(yyvsp[-3].String) + ")";
3183 if (!(yyvsp[-1].String)->empty()) {
3184 *(yyvsp[-7].String) += " " + *(yyvsp[-1].String);
3186 if (!(yyvsp[0].String)->empty()) {
3187 *(yyvsp[-7].String) += " " + *(yyvsp[0].String);
3189 (yyvsp[-6].Type).destroy();
3190 delete (yyvsp[-5].String);
3191 delete (yyvsp[-3].String);
3192 delete (yyvsp[-1].String);
3193 delete (yyvsp[0].String);
3194 (yyval.String) = (yyvsp[-7].String);
3199 #line 917 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3200 { (yyval.String) = new std::string("{"); delete (yyvsp[0].String); ;}
3204 #line 918 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3205 { (yyval.String) = new std::string ("{"); ;}
3209 #line 920 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3211 if (!(yyvsp[-2].String)->empty()) {
3212 *O << *(yyvsp[-2].String) << " ";
3214 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
3215 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3221 #line 929 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3222 { (yyval.String) = new std::string("}"); delete (yyvsp[0].String); ;}
3226 #line 930 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3227 { (yyval.String) = new std::string("}"); ;}
3231 #line 932 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3233 if ((yyvsp[-1].String))
3234 *O << *(yyvsp[-1].String);
3235 *O << '\n' << *(yyvsp[0].String) << "\n";
3241 #line 940 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3242 { (yyval.String) = new std::string(); ;}
3246 #line 946 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3248 if (!(yyvsp[-1].String)->empty())
3249 *(yyvsp[-2].String) += " " + *(yyvsp[-1].String);
3250 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3251 delete (yyvsp[-1].String);
3252 delete (yyvsp[0].String);
3253 (yyval.String) = (yyvsp[-2].String);
3258 #line 959 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3259 { (yyval.String) = new std::string(); ;}
3263 #line 965 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3265 (yyvsp[-1].String)->insert(0, "<");
3266 *(yyvsp[-1].String) += ">";
3267 (yyval.String) = (yyvsp[-1].String);
3272 #line 971 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3274 if (!(yyvsp[-3].String)->empty()) {
3275 *(yyvsp[-4].String) += " " + *(yyvsp[-3].String);
3277 *(yyvsp[-4].String) += " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
3278 delete (yyvsp[-3].String); delete (yyvsp[-2].String); delete (yyvsp[0].String);
3279 (yyval.String) = (yyvsp[-4].String);
3284 #line 984 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3286 (yyval.Value).val = (yyvsp[0].String);
3287 (yyval.Value).constant = false;
3288 (yyval.Value).type.newTy = 0;
3289 (yyval.Value).type.oldTy = UnresolvedTy;
3294 #line 990 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3296 (yyval.Value).val = (yyvsp[0].String);
3297 (yyval.Value).constant = true;
3298 (yyval.Value).type.newTy = 0;
3299 (yyval.Value).type.oldTy = UnresolvedTy;
3304 #line 1001 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3306 (yyval.Value) = (yyvsp[0].Value);
3307 (yyval.Value).type = (yyvsp[-1].Type);
3308 (yyval.Value).val->insert(0, *(yyvsp[-1].Type).newTy + " ");
3313 #line 1007 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3320 #line 1010 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3321 { // Do not allow functions with 0 basic blocks
3327 #line 1018 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3334 #line 1022 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3336 *O << " " << *(yyvsp[0].String) << "\n";
3337 delete (yyvsp[0].String);
3343 #line 1027 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3350 #line 1030 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3352 *O << *(yyvsp[0].String) << "\n";
3353 delete (yyvsp[0].String);
3359 #line 1036 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3360 { (yyval.String) = (yyvsp[0].String); *(yyval.String) = "unwind"; ;}
3364 #line 1038 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3365 { // Return with a result...
3366 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Value).val << "\n";
3367 delete (yyvsp[-1].String); (yyvsp[0].Value).destroy();
3373 #line 1043 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3374 { // Return with no result...
3375 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Type).newTy << "\n";
3376 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3382 #line 1048 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3383 { // Unconditional Branch...
3384 *O << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].Value).val << "\n";
3385 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3391 #line 1053 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3393 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", "
3394 << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << ", " << *(yyvsp[-1].Type).newTy << " "
3395 << *(yyvsp[0].Value).val << "\n";
3396 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); (yyvsp[-6].Value).destroy(); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy();
3397 (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3403 #line 1061 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3405 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", "
3406 << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << " [" << *(yyvsp[-1].String) << " ]\n";
3407 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); (yyvsp[-6].Value).destroy(); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy();
3408 delete (yyvsp[-1].String);
3414 #line 1068 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3416 *O << " " << *(yyvsp[-7].String) << " " << *(yyvsp[-6].Type).newTy << " " << *(yyvsp[-5].Value).val << ", "
3417 << *(yyvsp[-3].Type).newTy << " " << *(yyvsp[-2].Value).val << "[]\n";
3418 delete (yyvsp[-7].String); (yyvsp[-6].Type).destroy(); (yyvsp[-5].Value).destroy(); (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy();
3424 #line 1075 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3427 if (!(yyvsp[-13].String)->empty())
3428 *O << *(yyvsp[-13].String) << " = ";
3429 *O << *(yyvsp[-12].String) << " " << *(yyvsp[-11].String) << " " << *(yyvsp[-10].Type).newTy << " " << *(yyvsp[-9].Value).val << " (";
3430 for (unsigned i = 0; i < (yyvsp[-7].ValList)->size(); ++i) {
3431 ValueInfo& VI = (*(yyvsp[-7].ValList))[i];
3433 if (i+1 < (yyvsp[-7].ValList)->size())
3437 *O << ") " << *(yyvsp[-5].String) << " " << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << " "
3438 << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].Value).val << "\n";
3439 delete (yyvsp[-13].String); delete (yyvsp[-12].String); delete (yyvsp[-11].String); (yyvsp[-10].Type).destroy(); (yyvsp[-9].Value).destroy(); delete (yyvsp[-7].ValList);
3440 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
3441 (yyvsp[0].Value).destroy();
3447 #line 1094 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3449 *O << " " << *(yyvsp[0].String) << "\n";
3450 delete (yyvsp[0].String);
3456 #line 1099 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3458 *O << " " << *(yyvsp[0].String) << "\n";
3459 delete (yyvsp[0].String);
3465 #line 1105 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3467 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].String) + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3468 (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3469 (yyval.String) = (yyvsp[-5].String);
3474 #line 1110 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3476 (yyvsp[-3].String)->insert(0, *(yyvsp[-4].Type).newTy + " " );
3477 *(yyvsp[-3].String) += ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3478 (yyvsp[-4].Type).destroy(); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3479 (yyval.String) = (yyvsp[-3].String);
3484 #line 1118 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3486 if (!(yyvsp[-1].String)->empty())
3487 *(yyvsp[-1].String) += " = ";
3488 *(yyvsp[-1].String) += *(yyvsp[0].String);
3489 delete (yyvsp[0].String);
3490 (yyval.String) = (yyvsp[-1].String);
3495 #line 1127 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3496 { // Used for PHI nodes
3497 (yyvsp[-3].Value).val->insert(0, *(yyvsp[-5].Type).newTy + "[");
3498 *(yyvsp[-3].Value).val += "," + *(yyvsp[-1].Value).val + "]";
3499 (yyvsp[-5].Type).destroy(); (yyvsp[-1].Value).destroy();
3500 (yyval.String) = new std::string(*(yyvsp[-3].Value).val);
3501 (yyvsp[-3].Value).destroy();
3506 #line 1134 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3508 *(yyvsp[-6].String) += ", [" + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + "]";
3509 (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
3510 (yyval.String) = (yyvsp[-6].String);
3515 #line 1142 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3517 (yyval.ValList) = new ValueList();
3518 (yyval.ValList)->push_back((yyvsp[0].Value));
3523 #line 1146 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3525 (yyvsp[-2].ValList)->push_back((yyvsp[0].Value));
3526 (yyval.ValList) = (yyvsp[-2].ValList);
3531 #line 1153 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3532 { (yyval.ValList) = (yyvsp[0].ValList); ;}
3536 #line 1154 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3537 { (yyval.ValList) = new ValueList(); ;}
3541 #line 1158 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3543 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3544 delete (yyvsp[0].String);
3545 (yyval.String) = (yyvsp[-1].String);
3550 #line 1166 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3552 const char* op = getDivRemOpcode(*(yyvsp[-4].String), (yyvsp[-3].Type));
3553 (yyval.String) = new std::string(op);
3554 *(yyval.String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3555 delete (yyvsp[-4].String); (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3560 #line 1172 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3562 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3563 (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3564 (yyval.String) = (yyvsp[-4].String);
3569 #line 1177 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3571 #if UPGRADE_SETCOND_OPS
3572 *(yyvsp[-4].String) = getCompareOp(*(yyvsp[-4].String), (yyvsp[-3].Type));
3574 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3575 (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3576 (yyval.String) = (yyvsp[-4].String);
3581 #line 1185 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3583 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String) + " " + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + ")";
3584 delete (yyvsp[-5].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
3585 (yyval.String) = (yyvsp[-6].String);
3590 #line 1190 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3592 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3593 (yyvsp[0].Value).destroy();
3594 (yyval.String) = (yyvsp[-1].String);
3599 #line 1195 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3601 const char* shiftop = (yyvsp[-3].String)->c_str();
3602 if (*(yyvsp[-3].String) == "shr")
3603 shiftop = ((yyvsp[-2].Value).type.isUnsigned()) ? "lshr" : "ashr";
3604 (yyval.String) = new std::string(shiftop);
3605 *(yyval.String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3606 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3611 #line 1203 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3613 std::string source = *(yyvsp[-2].Value).val;
3614 TypeInfo SrcTy = (yyvsp[-2].Value).type;
3615 TypeInfo DstTy = (yyvsp[0].Type);
3617 (yyval.String) = new std::string();
3618 if (*(yyvsp[-3].String) == "cast") {
3619 *(yyval.String) += getCastUpgrade(source, SrcTy, DstTy, false);
3621 *(yyval.String) += *(yyvsp[-3].String) + " " + source + " to " + *DstTy.newTy;
3623 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy();
3624 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3629 #line 1217 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3631 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3632 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3633 (yyval.String) = (yyvsp[-5].String);
3638 #line 1222 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3640 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Type).newTy;
3641 (yyvsp[-2].Value).destroy(); (yyvsp[0].Type).destroy();
3642 (yyval.String) = (yyvsp[-3].String);
3647 #line 1227 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3649 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3650 (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3651 (yyval.String) = (yyvsp[-3].String);
3656 #line 1232 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3658 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3659 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3660 (yyval.String) = (yyvsp[-5].String);
3665 #line 1237 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3667 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3668 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3669 (yyval.String) = (yyvsp[-5].String);
3674 #line 1242 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3676 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3677 delete (yyvsp[0].String);
3678 (yyval.String) = (yyvsp[-1].String);
3683 #line 1247 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3685 if (!(yyvsp[-5].String)->empty())
3686 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String);
3687 if (!(yyvsp[-6].String)->empty())
3688 *(yyvsp[-6].String) += " ";
3689 *(yyvsp[-6].String) += *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].Value).val + "(";
3690 for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
3691 ValueInfo& VI = (*(yyvsp[-1].ValList))[i];
3692 *(yyvsp[-6].String) += *VI.val;
3693 if (i+1 < (yyvsp[-1].ValList)->size())
3694 *(yyvsp[-6].String) += ", ";
3697 *(yyvsp[-6].String) += ")";
3698 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); delete (yyvsp[-1].ValList);
3699 (yyval.String) = (yyvsp[-6].String);
3704 #line 1269 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3705 { (yyval.ValList) = (yyvsp[0].ValList); ;}
3709 #line 1270 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3710 { (yyval.ValList) = new ValueList(); ;}
3714 #line 1275 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3715 { (yyval.String) = new std::string(); ;}
3719 #line 1278 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3721 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3722 if (!(yyvsp[0].String)->empty())
3723 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3724 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3725 (yyval.String) = (yyvsp[-2].String);
3730 #line 1285 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3732 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3733 if (!(yyvsp[0].String)->empty())
3734 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3735 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].String);
3736 (yyval.String) = (yyvsp[-5].String);
3741 #line 1292 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3743 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3744 if (!(yyvsp[0].String)->empty())
3745 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3746 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3747 (yyval.String) = (yyvsp[-2].String);
3752 #line 1299 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3754 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3755 if (!(yyvsp[0].String)->empty())
3756 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3757 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].String);
3758 (yyval.String) = (yyvsp[-5].String);
3763 #line 1306 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3765 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3766 (yyvsp[0].Value).destroy();
3767 (yyval.String) = (yyvsp[-1].String);
3772 #line 1311 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3774 if (!(yyvsp[-3].String)->empty())
3775 *(yyvsp[-3].String) += " ";
3776 *(yyvsp[-3].String) += *(yyvsp[-2].String) + " " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3777 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3778 (yyval.String) = (yyvsp[-3].String);
3783 #line 1318 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3785 if (!(yyvsp[-5].String)->empty())
3786 *(yyvsp[-5].String) += " ";
3787 *(yyvsp[-5].String) += *(yyvsp[-4].String) + " " + *(yyvsp[-3].Value).val + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3788 delete (yyvsp[-4].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3789 (yyval.String) = (yyvsp[-5].String);
3794 #line 1325 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3796 // Upgrade the indices
3797 for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) {
3798 ValueInfo& VI = (*(yyvsp[0].ValList))[i];
3799 if (VI.type.isUnsigned() && !VI.isConstant() &&
3800 VI.type.getBitWidth() < 64) {
3801 std::string* old = VI.val;
3802 *O << " %gep_upgrade" << unique << " = zext " << *old
3804 VI.val = new std::string("ulong %gep_upgrade" + llvm::utostr(unique++));
3805 VI.type.oldTy = ULongTy;
3809 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3810 for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) {
3811 ValueInfo& VI = (*(yyvsp[0].ValList))[i];
3812 *(yyvsp[-3].String) += ", " + *VI.val;
3815 (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].ValList);
3816 (yyval.String) = (yyvsp[-3].String);
3824 /* Line 1126 of yacc.c. */
3825 #line 3826 "UpgradeParser.tab.c"
3831 YY_STACK_PRINT (yyss, yyssp);
3836 /* Now `shift' the result of the reduction. Determine what state
3837 that goes to, based on the state we popped back to and the rule
3838 number reduced by. */
3842 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3843 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3844 yystate = yytable[yystate];
3846 yystate = yydefgoto[yyn - YYNTOKENS];
3851 /*------------------------------------.
3852 | yyerrlab -- here on detecting error |
3853 `------------------------------------*/
3855 /* If not already recovering from an error, report this error. */
3860 yyn = yypact[yystate];
3862 if (YYPACT_NINF < yyn && yyn < YYLAST)
3864 int yytype = YYTRANSLATE (yychar);
3865 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3866 YYSIZE_T yysize = yysize0;
3868 int yysize_overflow = 0;
3870 # define YYERROR_VERBOSE_ARGS_MAXIMUM 5
3871 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3875 /* This is so xgettext sees the translatable formats that are
3876 constructed on the fly. */
3877 YY_("syntax error, unexpected %s");
3878 YY_("syntax error, unexpected %s, expecting %s");
3879 YY_("syntax error, unexpected %s, expecting %s or %s");
3880 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3881 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3885 static char const yyunexpected[] = "syntax error, unexpected %s";
3886 static char const yyexpecting[] = ", expecting %s";
3887 static char const yyor[] = " or %s";
3888 char yyformat[sizeof yyunexpected
3889 + sizeof yyexpecting - 1
3890 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3891 * (sizeof yyor - 1))];
3892 char const *yyprefix = yyexpecting;
3894 /* Start YYX at -YYN if negative to avoid negative indexes in
3896 int yyxbegin = yyn < 0 ? -yyn : 0;
3898 /* Stay within bounds of both yycheck and yytname. */
3899 int yychecklim = YYLAST - yyn;
3900 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3903 yyarg[0] = yytname[yytype];
3904 yyfmt = yystpcpy (yyformat, yyunexpected);
3906 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3907 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3909 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3913 yyformat[sizeof yyunexpected - 1] = '\0';
3916 yyarg[yycount++] = yytname[yyx];
3917 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3918 yysize_overflow |= yysize1 < yysize;
3920 yyfmt = yystpcpy (yyfmt, yyprefix);
3924 yyf = YY_(yyformat);
3925 yysize1 = yysize + yystrlen (yyf);
3926 yysize_overflow |= yysize1 < yysize;
3929 if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
3930 yymsg = (char *) YYSTACK_ALLOC (yysize);
3933 /* Avoid sprintf, as that infringes on the user's name space.
3934 Don't have undefined behavior even if the translation
3935 produced a string with the wrong number of "%s"s. */
3938 while ((*yyp = *yyf))
3940 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3942 yyp += yytnamerr (yyp, yyarg[yyi++]);
3952 YYSTACK_FREE (yymsg);
3956 yyerror (YY_("syntax error"));
3957 goto yyexhaustedlab;
3961 #endif /* YYERROR_VERBOSE */
3962 yyerror (YY_("syntax error"));
3967 if (yyerrstatus == 3)
3969 /* If just tried and failed to reuse look-ahead token after an
3970 error, discard it. */
3972 if (yychar <= YYEOF)
3974 /* Return failure if at end of input. */
3975 if (yychar == YYEOF)
3980 yydestruct ("Error: discarding", yytoken, &yylval);
3985 /* Else will try to reuse look-ahead token after shifting the error
3990 /*---------------------------------------------------.
3991 | yyerrorlab -- error raised explicitly by YYERROR. |
3992 `---------------------------------------------------*/
3995 /* Pacify compilers like GCC when the user code never invokes
3996 YYERROR and the label yyerrorlab therefore never appears in user
4007 /*-------------------------------------------------------------.
4008 | yyerrlab1 -- common code for both syntax error and YYERROR. |
4009 `-------------------------------------------------------------*/
4011 yyerrstatus = 3; /* Each real token shifted decrements this. */
4015 yyn = yypact[yystate];
4016 if (yyn != YYPACT_NINF)
4019 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4027 /* Pop the current state because it cannot handle the error token. */
4032 yydestruct ("Error: popping", yystos[yystate], yyvsp);
4035 YY_STACK_PRINT (yyss, yyssp);
4044 /* Shift the error token. */
4045 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
4051 /*-------------------------------------.
4052 | yyacceptlab -- YYACCEPT comes here. |
4053 `-------------------------------------*/
4058 /*-----------------------------------.
4059 | yyabortlab -- YYABORT comes here. |
4060 `-----------------------------------*/
4066 /*-------------------------------------------------.
4067 | yyexhaustedlab -- memory exhaustion comes here. |
4068 `-------------------------------------------------*/
4070 yyerror (YY_("memory exhausted"));
4076 if (yychar != YYEOF && yychar != YYEMPTY)
4077 yydestruct ("Cleanup: discarding lookahead",
4079 while (yyssp != yyss)
4081 yydestruct ("Cleanup: popping",
4082 yystos[*yyssp], yyvsp);
4087 YYSTACK_FREE (yyss);
4093 #line 1349 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
4096 int yyerror(const char *ErrorMsg) {
4098 = std::string((CurFilename == "-") ? std::string("<stdin>") : CurFilename)
4099 + ":" + llvm::utostr((unsigned) Upgradelineno) + ": ";
4100 std::string errMsg = std::string(ErrorMsg) + "\n" + where + " while reading ";
4101 if (yychar == YYEMPTY || yychar == 0)
4102 errMsg += "end-of-file.";
4104 errMsg += "token: '" + std::string(Upgradetext, Upgradeleng) + "'";
4105 std::cerr << errMsg << '\n';