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>
381 #define YYERROR_VERBOSE 1
382 #define YYINCLUDED_STDLIB_H
384 #define UPGRADE_SETCOND_OPS 0
386 int yylex(); // declaration" of xxx warnings.
390 static std::string CurFilename;
391 static std::ostream *O = 0;
392 std::istream* LexInput = 0;
393 unsigned SizeOfPointer = 32;
394 static uint64_t unique = 1;
396 typedef std::vector<TypeInfo> TypeVector;
397 static TypeVector EnumeratedTypes;
398 typedef std::map<std::string,TypeInfo> TypeMap;
399 static TypeMap NamedTypes;
401 void destroy(ValueList* VL) {
402 while (!VL->empty()) {
403 ValueInfo& VI = VL->back();
410 void UpgradeAssembly(const std::string &infile, std::istream& in,
411 std::ostream &out, bool debug)
414 CurFilename = infile;
420 std::cerr << "Parse failed.\n";
425 static void ResolveType(TypeInfo& Ty) {
426 if (Ty.oldTy == UnresolvedTy) {
427 TypeMap::iterator I = NamedTypes.find(*Ty.newTy);
428 if (I != NamedTypes.end()) {
429 Ty.oldTy = I->second.oldTy;
430 Ty.elemTy = I->second.elemTy;
432 std::string msg("Can't resolve type: ");
434 yyerror(msg.c_str());
436 } else if (Ty.oldTy == NumericTy) {
437 unsigned ref = atoi(&((Ty.newTy->c_str())[1])); // Skip the '\\'
438 if (ref < EnumeratedTypes.size()) {
439 Ty.oldTy = EnumeratedTypes[ref].oldTy;
440 Ty.elemTy = EnumeratedTypes[ref].elemTy;
442 std::string msg("Can't resolve type: ");
444 yyerror(msg.c_str());
447 // otherwise its already resolved.
450 static const char* getCastOpcode(
451 std::string& Source, const TypeInfo& SrcTy, const TypeInfo& DstTy)
453 unsigned SrcBits = SrcTy.getBitWidth();
454 unsigned DstBits = DstTy.getBitWidth();
455 const char* opcode = "bitcast";
456 // Run through the possibilities ...
457 if (DstTy.isIntegral()) { // Casting to integral
458 if (SrcTy.isIntegral()) { // Casting from integral
459 if (DstBits < SrcBits)
461 else if (DstBits > SrcBits) { // its an extension
462 if (SrcTy.isSigned())
463 opcode ="sext"; // signed -> SEXT
465 opcode = "zext"; // unsigned -> ZEXT
467 opcode = "bitcast"; // Same size, No-op cast
469 } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt
470 if (DstTy.isSigned())
471 opcode = "fptosi"; // FP -> sint
473 opcode = "fptoui"; // FP -> uint
474 } else if (SrcTy.isPacked()) {
475 assert(DstBits == SrcTy.getBitWidth() &&
476 "Casting packed to integer of different width");
477 opcode = "bitcast"; // same size, no-op cast
479 assert(SrcTy.isPointer() &&
480 "Casting from a value that is not first-class type");
481 opcode = "ptrtoint"; // ptr -> int
483 } else if (DstTy.isFloatingPoint()) { // Casting to floating pt
484 if (SrcTy.isIntegral()) { // Casting from integral
485 if (SrcTy.isSigned())
486 opcode = "sitofp"; // sint -> FP
488 opcode = "uitofp"; // uint -> FP
489 } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt
490 if (DstBits < SrcBits) {
491 opcode = "fptrunc"; // FP -> smaller FP
492 } else if (DstBits > SrcBits) {
493 opcode = "fpext"; // FP -> larger FP
495 opcode ="bitcast"; // same size, no-op cast
497 } else if (SrcTy.isPacked()) {
498 assert(DstBits == SrcTy.getBitWidth() &&
499 "Casting packed to floating point of different width");
500 opcode = "bitcast"; // same size, no-op cast
502 assert(0 && "Casting pointer or non-first class to float");
504 } else if (DstTy.isPacked()) {
505 if (SrcTy.isPacked()) {
506 assert(DstTy.getBitWidth() == SrcTy.getBitWidth() &&
507 "Casting packed to packed of different widths");
508 opcode = "bitcast"; // packed -> packed
509 } else if (DstTy.getBitWidth() == SrcBits) {
510 opcode = "bitcast"; // float/int -> packed
512 assert(!"Illegal cast to packed (wrong type or size)");
514 } else if (DstTy.isPointer()) {
515 if (SrcTy.isPointer()) {
516 opcode = "bitcast"; // ptr -> ptr
517 } else if (SrcTy.isIntegral()) {
518 opcode = "inttoptr"; // int -> ptr
520 assert(!"Casting invalid type to pointer");
523 assert(!"Casting to type that is not first-class");
528 static std::string getCastUpgrade(
529 const std::string& Src, TypeInfo& SrcTy, TypeInfo& DstTy, bool isConst)
532 std::string Source = Src;
533 if (SrcTy.isFloatingPoint() && DstTy.isPointer()) {
534 // fp -> ptr cast is no longer supported but we must upgrade this
535 // by doing a double cast: fp -> int -> ptr
537 Source = "ulong fptoui(" + Source + " to ulong)";
539 *O << " %cast_upgrade" << unique << " = fptoui " << Source
541 Source = "ulong %cast_upgrade" + llvm::utostr(unique);
543 // Update the SrcTy for the getCastOpcode call below
545 SrcTy.newTy = new std::string("ulong");
546 SrcTy.oldTy = ULongTy;
547 } else if (DstTy.oldTy == BoolTy) {
548 // cast ptr %x to bool was previously defined as setne ptr %x, null
549 // The ptrtoint semantic is to truncate, not compare so we must retain
550 // the original intent by replace the cast with a setne
551 const char* comparator = SrcTy.isPointer() ? ", null" :
552 (SrcTy.isFloatingPoint() ? ", 0.0" : ", 0");
554 Result = "setne (" + Source + comparator + ")";
556 Result = "setne " + Source + comparator;
557 return Result; // skip cast processing below
561 std::string Opcode(getCastOpcode(Source, SrcTy, DstTy));
563 Result += Opcode + "( " + Source + " to " + *DstTy.newTy + ")";
565 Result += Opcode + " " + Source + " to " + *DstTy.newTy;
569 const char* getDivRemOpcode(const std::string& opcode, const TypeInfo& TI) {
570 const char* op = opcode.c_str();
574 Ty.oldTy = Ty.getElementType();
576 if (Ty.isFloatingPoint())
578 else if (Ty.isUnsigned())
580 else if (Ty.isSigned())
583 yyerror("Invalid type for div instruction");
584 else if (opcode == "rem")
585 if (Ty.isFloatingPoint())
587 else if (Ty.isUnsigned())
589 else if (Ty.isSigned())
592 yyerror("Invalid type for rem instruction");
597 getCompareOp(const std::string& setcc, const TypeInfo& TI) {
598 assert(setcc.length() == 5);
601 assert(cc1 == 'e' || cc1 == 'n' || cc1 == 'l' || cc1 == 'g');
602 assert(cc2 == 'q' || cc2 == 'e' || cc2 == 'e' || cc2 == 't');
603 std::string result("xcmp xxx");
606 if (TI.isFloatingPoint()) {
608 result[5] = 'o'; // FIXME: Always map to ordered comparison ?
609 } else if (TI.isIntegral() || TI.isPointer()) {
611 if ((cc1 == 'e' && cc2 == 'q') || (cc1 == 'n' && cc2 == 'e'))
613 else if (TI.isSigned())
615 else if (TI.isUnsigned() || TI.isPointer())
618 yyerror("Invalid integral type for setcc");
625 /* Enabling traces. */
630 /* Enabling verbose error messages. */
631 #ifdef YYERROR_VERBOSE
632 # undef YYERROR_VERBOSE
633 # define YYERROR_VERBOSE 1
635 # define YYERROR_VERBOSE 0
638 /* Enabling the token table. */
639 #ifndef YYTOKEN_TABLE
640 # define YYTOKEN_TABLE 0
643 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
644 #line 269 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
645 typedef union YYSTYPE {
652 /* Line 196 of yacc.c. */
653 #line 654 "UpgradeParser.tab.c"
654 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
655 # define YYSTYPE_IS_DECLARED 1
656 # define YYSTYPE_IS_TRIVIAL 1
661 /* Copy the second part of user declarations. */
664 /* Line 219 of yacc.c. */
665 #line 666 "UpgradeParser.tab.c"
667 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
668 # define YYSIZE_T __SIZE_TYPE__
670 #if ! defined (YYSIZE_T) && defined (size_t)
671 # define YYSIZE_T size_t
673 #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
674 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
675 # define YYSIZE_T size_t
677 #if ! defined (YYSIZE_T)
678 # define YYSIZE_T unsigned int
684 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
685 # define YY_(msgid) dgettext ("bison-runtime", msgid)
689 # define YY_(msgid) msgid
693 #if ! defined (yyoverflow) || YYERROR_VERBOSE
695 /* The parser invokes alloca or malloc; define the necessary symbols. */
697 # ifdef YYSTACK_USE_ALLOCA
698 # if YYSTACK_USE_ALLOCA
700 # define YYSTACK_ALLOC __builtin_alloca
702 # define YYSTACK_ALLOC alloca
703 # if defined (__STDC__) || defined (__cplusplus)
704 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
705 # define YYINCLUDED_STDLIB_H
711 # ifdef YYSTACK_ALLOC
712 /* Pacify GCC's `empty if-body' warning. */
713 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
714 # ifndef YYSTACK_ALLOC_MAXIMUM
715 /* The OS might guarantee only one guard page at the bottom of the stack,
716 and a page size can be as small as 4096 bytes. So we cannot safely
717 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
718 to allow for a few compiler-allocated temporary stack slots. */
719 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
722 # define YYSTACK_ALLOC YYMALLOC
723 # define YYSTACK_FREE YYFREE
724 # ifndef YYSTACK_ALLOC_MAXIMUM
725 # define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
731 # define YYMALLOC malloc
732 # if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
733 && (defined (__STDC__) || defined (__cplusplus)))
734 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
739 # if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
740 && (defined (__STDC__) || defined (__cplusplus)))
741 void free (void *); /* INFRINGES ON USER NAME SPACE */
748 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
751 #if (! defined (yyoverflow) \
752 && (! defined (__cplusplus) \
753 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
755 /* A type that is properly aligned for any stack member. */
762 /* The size of the maximum gap between one aligned stack and the next. */
763 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
765 /* The size of an array large to enough to hold all stacks, each with
767 # define YYSTACK_BYTES(N) \
768 ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
769 + YYSTACK_GAP_MAXIMUM)
771 /* Copy COUNT objects from FROM to TO. The source and destination do
774 # if defined (__GNUC__) && 1 < __GNUC__
775 # define YYCOPY(To, From, Count) \
776 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
778 # define YYCOPY(To, From, Count) \
782 for (yyi = 0; yyi < (Count); yyi++) \
783 (To)[yyi] = (From)[yyi]; \
789 /* Relocate STACK from its old location to the new one. The
790 local variables YYSIZE and YYSTACKSIZE give the old and new number of
791 elements in the stack, and YYPTR gives the new location of the
792 stack. Advance YYPTR to a properly aligned location for the next
794 # define YYSTACK_RELOCATE(Stack) \
797 YYSIZE_T yynewbytes; \
798 YYCOPY (&yyptr->Stack, Stack, yysize); \
799 Stack = &yyptr->Stack; \
800 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
801 yyptr += yynewbytes / sizeof (*yyptr); \
807 #if defined (__STDC__) || defined (__cplusplus)
808 typedef signed char yysigned_char;
810 typedef short int yysigned_char;
813 /* YYFINAL -- State number of the termination state. */
815 /* YYLAST -- Last index in YYTABLE. */
818 /* YYNTOKENS -- Number of terminals. */
819 #define YYNTOKENS 165
820 /* YYNNTS -- Number of nonterminals. */
822 /* YYNRULES -- Number of rules. */
824 /* YYNRULES -- Number of states. */
825 #define YYNSTATES 564
827 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
829 #define YYMAXUTOK 405
831 #define YYTRANSLATE(YYX) \
832 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
834 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
835 static const unsigned char yytranslate[] =
837 0, 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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
841 154, 155, 163, 2, 152, 2, 2, 2, 2, 2,
842 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
843 159, 151, 160, 2, 2, 2, 2, 2, 2, 2,
844 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
845 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
846 2, 156, 153, 158, 2, 2, 2, 2, 2, 164,
847 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
848 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
849 157, 2, 2, 161, 2, 162, 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, 2, 2, 2, 2,
862 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
863 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
864 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
865 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
866 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
867 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
868 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
869 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
870 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
871 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
872 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
873 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
874 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
875 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
876 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
877 145, 146, 147, 148, 149, 150
881 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
883 static const unsigned short int yyprhs[] =
885 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
886 19, 21, 23, 25, 27, 29, 31, 33, 35, 37,
887 39, 41, 43, 45, 47, 49, 51, 53, 55, 57,
888 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
889 79, 81, 83, 85, 87, 89, 91, 93, 95, 97,
890 99, 101, 103, 105, 107, 109, 111, 113, 115, 117,
891 119, 121, 123, 125, 127, 129, 131, 133, 135, 137,
892 139, 141, 143, 145, 147, 149, 151, 153, 156, 157,
893 159, 161, 163, 165, 167, 169, 171, 172, 174, 176,
894 178, 180, 182, 184, 187, 188, 189, 192, 193, 197,
895 200, 201, 203, 204, 208, 210, 213, 215, 217, 219,
896 221, 223, 225, 227, 229, 231, 233, 235, 237, 239,
897 241, 243, 245, 247, 249, 251, 253, 256, 261, 267,
898 273, 277, 280, 283, 285, 289, 291, 295, 297, 298,
899 303, 307, 311, 316, 321, 325, 328, 331, 334, 337,
900 340, 343, 346, 349, 352, 355, 362, 368, 377, 384,
901 391, 398, 406, 413, 420, 429, 438, 442, 444, 446,
902 448, 450, 453, 456, 461, 464, 466, 468, 470, 475,
903 478, 483, 490, 497, 504, 511, 515, 520, 521, 523,
904 525, 527, 531, 535, 539, 543, 547, 551, 553, 554,
905 556, 558, 560, 561, 564, 568, 570, 572, 576, 578,
906 579, 588, 590, 592, 596, 598, 600, 604, 605, 607,
907 609, 613, 614, 616, 618, 620, 622, 624, 626, 628,
908 630, 632, 636, 638, 644, 646, 648, 650, 652, 655,
909 658, 660, 663, 666, 667, 669, 671, 673, 676, 679,
910 683, 693, 703, 712, 727, 729, 731, 738, 744, 747,
911 754, 762, 764, 768, 770, 771, 774, 776, 782, 788,
912 794, 802, 805, 810, 815, 822, 827, 832, 839, 846,
913 849, 857, 859, 862, 863, 865, 866, 870, 877, 881,
917 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
918 static const short int yyrhs[] =
920 199, 0, -1, 19, -1, 20, -1, 17, -1, 18,
921 -1, 80, -1, 81, -1, 82, -1, 83, -1, 84,
922 -1, 85, -1, 86, -1, 87, -1, 88, -1, 89,
923 -1, 90, -1, 91, -1, 92, -1, 93, -1, 94,
924 -1, 95, -1, 96, -1, 97, -1, 98, -1, 99,
925 -1, 100, -1, 101, -1, 102, -1, 103, -1, 104,
926 -1, 105, -1, 106, -1, 107, -1, 118, -1, 119,
927 -1, 120, -1, 121, -1, 108, -1, 109, -1, 110,
928 -1, 111, -1, 112, -1, 113, -1, 114, -1, 115,
929 -1, 116, -1, 117, -1, 130, -1, 131, -1, 132,
930 -1, 133, -1, 139, -1, 140, -1, 141, -1, 142,
931 -1, 143, -1, 144, -1, 145, -1, 146, -1, 147,
932 -1, 148, -1, 149, -1, 150, -1, 138, -1, 11,
933 -1, 9, -1, 7, -1, 5, -1, 12, -1, 10,
934 -1, 8, -1, 6, -1, 175, -1, 176, -1, 13,
935 -1, 14, -1, 208, 151, -1, -1, 42, -1, 43,
936 -1, 44, -1, 48, -1, 45, -1, 46, -1, 47,
937 -1, -1, 66, -1, 67, -1, 68, -1, 69, -1,
938 70, -1, 71, -1, 65, 18, -1, -1, -1, 57,
939 18, -1, -1, 152, 57, 18, -1, 37, 30, -1,
940 -1, 184, -1, -1, 152, 187, 186, -1, 184, -1,
941 57, 18, -1, 190, -1, 3, -1, 192, -1, 3,
942 -1, 192, -1, 4, -1, 5, -1, 6, -1, 7,
943 -1, 8, -1, 9, -1, 10, -1, 11, -1, 12,
944 -1, 13, -1, 14, -1, 15, -1, 16, -1, 222,
945 -1, 191, -1, 153, 18, -1, 189, 154, 194, 155,
946 -1, 156, 18, 157, 192, 158, -1, 159, 18, 157,
947 192, 160, -1, 161, 193, 162, -1, 161, 162, -1,
948 192, 163, -1, 192, -1, 193, 152, 192, -1, 193,
949 -1, 193, 152, 40, -1, 40, -1, -1, 190, 156,
950 197, 158, -1, 190, 156, 158, -1, 190, 164, 30,
951 -1, 190, 159, 197, 160, -1, 190, 161, 197, 162,
952 -1, 190, 161, 162, -1, 190, 22, -1, 190, 23,
953 -1, 190, 222, -1, 190, 196, -1, 190, 24, -1,
954 175, 167, -1, 176, 18, -1, 4, 25, -1, 4,
955 26, -1, 178, 21, -1, 174, 154, 195, 39, 190,
956 155, -1, 127, 154, 195, 237, 155, -1, 129, 154,
957 195, 152, 195, 152, 195, 155, -1, 168, 154, 195,
958 152, 195, 155, -1, 169, 154, 195, 152, 195, 155,
959 -1, 170, 154, 195, 152, 195, 155, -1, 171, 172,
960 154, 195, 152, 195, 155, -1, 173, 154, 195, 152,
961 195, 155, -1, 135, 154, 195, 152, 195, 155, -1,
962 136, 154, 195, 152, 195, 152, 195, 155, -1, 137,
963 154, 195, 152, 195, 152, 195, 155, -1, 197, 152,
964 195, -1, 195, -1, 35, -1, 36, -1, 200, -1,
965 200, 217, -1, 200, 219, -1, 200, 63, 62, 203,
966 -1, 200, 31, -1, 202, -1, 50, -1, 58, -1,
967 202, 179, 27, 188, -1, 202, 219, -1, 202, 63,
968 62, 203, -1, 202, 179, 180, 198, 195, 186, -1,
969 202, 179, 201, 198, 190, 186, -1, 202, 179, 45,
970 198, 190, 186, -1, 202, 179, 47, 198, 190, 186,
971 -1, 202, 51, 205, -1, 202, 59, 151, 206, -1,
972 -1, 30, -1, 56, -1, 55, -1, 53, 151, 204,
973 -1, 54, 151, 18, -1, 52, 151, 30, -1, 72,
974 151, 30, -1, 156, 207, 158, -1, 207, 152, 30,
975 -1, 30, -1, -1, 28, -1, 30, -1, 208, -1,
976 -1, 190, 209, -1, 211, 152, 210, -1, 210, -1,
977 211, -1, 211, 152, 40, -1, 40, -1, -1, 181,
978 188, 208, 154, 212, 155, 185, 182, -1, 32, -1,
979 161, -1, 180, 213, 214, -1, 33, -1, 162, -1,
980 215, 225, 216, -1, -1, 45, -1, 47, -1, 34,
981 218, 213, -1, -1, 64, -1, 17, -1, 18, -1,
982 21, -1, 25, -1, 26, -1, 22, -1, 23, -1,
983 24, -1, 159, 197, 160, -1, 196, -1, 62, 220,
984 30, 152, 30, -1, 166, -1, 208, -1, 222, -1,
985 221, -1, 190, 223, -1, 225, 226, -1, 226, -1,
986 227, 229, -1, 227, 231, -1, -1, 29, -1, 78,
987 -1, 77, -1, 73, 224, -1, 73, 3, -1, 74,
988 15, 223, -1, 74, 4, 223, 152, 15, 223, 152,
989 15, 223, -1, 75, 177, 223, 152, 15, 223, 156,
990 230, 158, -1, 75, 177, 223, 152, 15, 223, 156,
991 158, -1, 179, 76, 181, 188, 223, 154, 234, 155,
992 39, 15, 223, 228, 15, 223, -1, 228, -1, 79,
993 -1, 230, 177, 221, 152, 15, 223, -1, 177, 221,
994 152, 15, 223, -1, 179, 236, -1, 190, 156, 223,
995 152, 223, 158, -1, 232, 152, 156, 223, 152, 223,
996 158, -1, 224, -1, 233, 152, 224, -1, 233, -1,
997 -1, 61, 60, -1, 60, -1, 168, 190, 223, 152,
998 223, -1, 169, 190, 223, 152, 223, -1, 170, 190,
999 223, 152, 223, -1, 171, 172, 190, 223, 152, 223,
1000 155, -1, 49, 224, -1, 173, 224, 152, 224, -1,
1001 174, 224, 39, 190, -1, 129, 224, 152, 224, 152,
1002 224, -1, 134, 224, 152, 190, -1, 135, 224, 152,
1003 224, -1, 136, 224, 152, 224, 152, 224, -1, 137,
1004 224, 152, 224, 152, 224, -1, 128, 232, -1, 235,
1005 181, 188, 223, 154, 234, 155, -1, 239, -1, 152,
1006 233, -1, -1, 38, -1, -1, 122, 190, 183, -1,
1007 122, 190, 152, 10, 223, 183, -1, 123, 190, 183,
1008 -1, 123, 190, 152, 10, 223, 183, -1, 124, 224,
1009 -1, 238, 125, 190, 223, -1, 238, 126, 224, 152,
1010 190, 223, -1, 127, 190, 223, 237, -1
1013 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1014 static const unsigned short int yyrline[] =
1016 0, 332, 332, 332, 333, 333, 337, 337, 337, 337,
1017 337, 337, 337, 338, 338, 338, 338, 339, 339, 339,
1018 340, 340, 340, 340, 340, 340, 341, 341, 342, 342,
1019 342, 342, 342, 342, 342, 342, 342, 342, 343, 343,
1020 343, 343, 343, 343, 343, 343, 343, 343, 344, 344,
1021 344, 344, 345, 345, 345, 345, 345, 345, 345, 346,
1022 346, 346, 346, 346, 346, 351, 351, 351, 351, 352,
1023 352, 352, 352, 353, 353, 354, 354, 357, 360, 365,
1024 365, 365, 365, 365, 365, 366, 367, 370, 370, 370,
1025 370, 370, 371, 372, 377, 382, 383, 386, 387, 395,
1026 401, 402, 405, 406, 415, 416, 429, 429, 430, 430,
1027 431, 435, 435, 435, 435, 435, 435, 435, 436, 436,
1028 436, 436, 436, 438, 442, 446, 449, 454, 460, 468,
1029 476, 482, 486, 497, 500, 508, 509, 514, 517, 527,
1030 533, 538, 544, 550, 556, 561, 567, 573, 579, 585,
1031 591, 597, 603, 609, 615, 623, 637, 649, 654, 660,
1032 665, 673, 678, 686, 691, 696, 706, 711, 716, 716,
1033 726, 731, 734, 739, 743, 747, 749, 749, 752, 764,
1034 769, 774, 781, 788, 795, 802, 807, 812, 817, 819,
1035 819, 822, 827, 834, 839, 846, 853, 858, 859, 867,
1036 867, 868, 868, 870, 877, 881, 885, 888, 893, 896,
1037 898, 918, 919, 921, 930, 931, 933, 941, 942, 943,
1038 947, 960, 961, 964, 964, 964, 964, 964, 964, 964,
1039 965, 966, 971, 972, 981, 981, 985, 991, 1002, 1008,
1040 1011, 1019, 1023, 1028, 1031, 1037, 1037, 1039, 1044, 1049,
1041 1054, 1062, 1069, 1075, 1095, 1100, 1106, 1111, 1119, 1128,
1042 1135, 1143, 1147, 1154, 1155, 1159, 1164, 1167, 1173, 1178,
1043 1186, 1191, 1196, 1204, 1218, 1223, 1228, 1233, 1238, 1243,
1044 1248, 1265, 1270, 1271, 1275, 1276, 1279, 1286, 1293, 1300,
1045 1307, 1312, 1319, 1326
1049 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1050 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1051 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1052 static const char *const yytname[] =
1054 "$end", "error", "$undefined", "VOID", "BOOL", "SBYTE", "UBYTE",
1055 "SHORT", "USHORT", "INT", "UINT", "LONG", "ULONG", "FLOAT", "DOUBLE",
1056 "LABEL", "OPAQUE", "ESINT64VAL", "EUINT64VAL", "SINTVAL", "UINTVAL",
1057 "FPVAL", "NULL_TOK", "UNDEF", "ZEROINITIALIZER", "TRUETOK", "FALSETOK",
1058 "TYPE", "VAR_ID", "LABELSTR", "STRINGCONSTANT", "IMPLEMENTATION",
1059 "BEGINTOK", "ENDTOK", "DECLARE", "GLOBAL", "CONSTANT", "SECTION",
1060 "VOLATILE", "TO", "DOTDOTDOT", "CONST", "INTERNAL", "LINKONCE", "WEAK",
1061 "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "APPENDING", "NOT", "EXTERNAL",
1062 "TARGET", "TRIPLE", "ENDIAN", "POINTERSIZE", "LITTLE", "BIG", "ALIGN",
1063 "UNINITIALIZED", "DEPLIBS", "CALL", "TAIL", "ASM_TOK", "MODULE",
1064 "SIDEEFFECT", "CC_TOK", "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK",
1065 "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT",
1066 "RET", "BR", "SWITCH", "INVOKE", "EXCEPT", "UNWIND", "UNREACHABLE",
1067 "ADD", "SUB", "MUL", "DIV", "UDIV", "SDIV", "FDIV", "REM", "UREM",
1068 "SREM", "FREM", "AND", "OR", "XOR", "SETLE", "SETGE", "SETLT", "SETGT",
1069 "SETEQ", "SETNE", "ICMP", "FCMP", "EQ", "NE", "SLT", "SGT", "SLE", "SGE",
1070 "OEQ", "ONE", "OLT", "OGT", "OLE", "OGE", "ORD", "UNO", "UEQ", "UNE",
1071 "ULT", "UGT", "ULE", "UGE", "MALLOC", "ALLOCA", "FREE", "LOAD", "STORE",
1072 "GETELEMENTPTR", "PHI_TOK", "SELECT", "SHL", "SHR", "ASHR", "LSHR",
1073 "VAARG", "EXTRACTELEMENT", "INSERTELEMENT", "SHUFFLEVECTOR", "CAST",
1074 "TRUNC", "ZEXT", "SEXT", "FPTRUNC", "FPEXT", "FPTOUI", "FPTOSI",
1075 "UITOFP", "SITOFP", "PTRTOINT", "INTTOPTR", "BITCAST", "'='", "','",
1076 "'\\\\'", "'('", "')'", "'['", "'x'", "']'", "'<'", "'>'", "'{'", "'}'",
1077 "'*'", "'c'", "$accept", "IntVal", "EInt64Val", "ArithmeticOps",
1078 "LogicalOps", "SetCondOps", "CompareOps", "Predicates", "ShiftOps",
1079 "CastOps", "SIntType", "UIntType", "IntType", "FPType", "OptAssign",
1080 "OptLinkage", "OptCallingConv", "OptAlign", "OptCAlign", "SectionString",
1081 "OptSection", "GlobalVarAttributes", "GlobalVarAttribute", "TypesV",
1082 "UpRTypesV", "Types", "PrimType", "UpRTypes", "TypeListI",
1083 "ArgTypeListI", "ConstVal", "ConstExpr", "ConstVector", "GlobalType",
1084 "Module", "DefinitionList", "External", "ConstPool", "AsmBlock",
1085 "BigOrLittle", "TargetDefinition", "LibrariesDefinition", "LibList",
1086 "Name", "OptName", "ArgVal", "ArgListH", "ArgList", "FunctionHeaderH",
1087 "BEGIN", "FunctionHeader", "END", "Function", "FnDeclareLinkage",
1088 "FunctionProto", "OptSideEffect", "ConstValueRef", "SymbolicValueRef",
1089 "ValueRef", "ResolvedVal", "BasicBlockList", "BasicBlock",
1090 "InstructionList", "Unwind", "BBTerminatorInst", "JumpTable", "Inst",
1091 "PHIList", "ValueRefList", "ValueRefListE", "OptTailCall", "InstVal",
1092 "IndexList", "OptVolatile", "MemoryInst", 0
1097 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1099 static const unsigned short int yytoknum[] =
1101 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1102 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1103 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1104 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1105 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1106 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1107 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1108 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1109 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1110 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1111 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1112 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1113 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
1114 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
1115 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
1116 405, 61, 44, 92, 40, 41, 91, 120, 93, 60,
1117 62, 123, 125, 42, 99
1121 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1122 static const unsigned char yyr1[] =
1124 0, 165, 166, 166, 167, 167, 168, 168, 168, 168,
1125 168, 168, 168, 168, 168, 168, 168, 169, 169, 169,
1126 170, 170, 170, 170, 170, 170, 171, 171, 172, 172,
1127 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
1128 172, 172, 172, 172, 172, 172, 172, 172, 173, 173,
1129 173, 173, 174, 174, 174, 174, 174, 174, 174, 174,
1130 174, 174, 174, 174, 174, 175, 175, 175, 175, 176,
1131 176, 176, 176, 177, 177, 178, 178, 179, 179, 180,
1132 180, 180, 180, 180, 180, 180, 180, 181, 181, 181,
1133 181, 181, 181, 181, 181, 182, 182, 183, 183, 184,
1134 185, 185, 186, 186, 187, 187, 188, 188, 189, 189,
1135 190, 191, 191, 191, 191, 191, 191, 191, 191, 191,
1136 191, 191, 191, 192, 192, 192, 192, 192, 192, 192,
1137 192, 192, 192, 193, 193, 194, 194, 194, 194, 195,
1138 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
1139 195, 195, 195, 195, 195, 196, 196, 196, 196, 196,
1140 196, 196, 196, 196, 196, 196, 197, 197, 198, 198,
1141 199, 200, 200, 200, 200, 200, 201, 201, 202, 202,
1142 202, 202, 202, 202, 202, 202, 202, 202, 203, 204,
1143 204, 205, 205, 205, 205, 206, 207, 207, 207, 208,
1144 208, 209, 209, 210, 211, 211, 212, 212, 212, 212,
1145 213, 214, 214, 215, 216, 216, 217, 218, 218, 218,
1146 219, 220, 220, 221, 221, 221, 221, 221, 221, 221,
1147 221, 221, 221, 221, 222, 222, 223, 223, 224, 225,
1148 225, 226, 227, 227, 227, 228, 228, 229, 229, 229,
1149 229, 229, 229, 229, 229, 229, 230, 230, 231, 232,
1150 232, 233, 233, 234, 234, 235, 235, 236, 236, 236,
1151 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1152 236, 236, 237, 237, 238, 238, 239, 239, 239, 239,
1156 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1157 static const unsigned char yyr2[] =
1159 0, 2, 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, 1, 1, 1,
1166 1, 1, 1, 1, 1, 1, 1, 2, 0, 1,
1167 1, 1, 1, 1, 1, 1, 0, 1, 1, 1,
1168 1, 1, 1, 2, 0, 0, 2, 0, 3, 2,
1169 0, 1, 0, 3, 1, 2, 1, 1, 1, 1,
1170 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1171 1, 1, 1, 1, 1, 1, 2, 4, 5, 5,
1172 3, 2, 2, 1, 3, 1, 3, 1, 0, 4,
1173 3, 3, 4, 4, 3, 2, 2, 2, 2, 2,
1174 2, 2, 2, 2, 2, 6, 5, 8, 6, 6,
1175 6, 7, 6, 6, 8, 8, 3, 1, 1, 1,
1176 1, 2, 2, 4, 2, 1, 1, 1, 4, 2,
1177 4, 6, 6, 6, 6, 3, 4, 0, 1, 1,
1178 1, 3, 3, 3, 3, 3, 3, 1, 0, 1,
1179 1, 1, 0, 2, 3, 1, 1, 3, 1, 0,
1180 8, 1, 1, 3, 1, 1, 3, 0, 1, 1,
1181 3, 0, 1, 1, 1, 1, 1, 1, 1, 1,
1182 1, 3, 1, 5, 1, 1, 1, 1, 2, 2,
1183 1, 2, 2, 0, 1, 1, 1, 2, 2, 3,
1184 9, 9, 8, 14, 1, 1, 6, 5, 2, 6,
1185 7, 1, 3, 1, 0, 2, 1, 5, 5, 5,
1186 7, 2, 4, 4, 6, 4, 4, 6, 6, 2,
1187 7, 1, 2, 0, 1, 0, 3, 6, 3, 6,
1191 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1192 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1193 means the default is an error. */
1194 static const unsigned short int yydefact[] =
1196 187, 0, 86, 175, 1, 174, 217, 79, 80, 81,
1197 83, 84, 85, 82, 0, 94, 243, 171, 172, 199,
1198 200, 0, 0, 0, 86, 0, 179, 218, 219, 94,
1199 0, 0, 87, 88, 89, 90, 91, 92, 0, 0,
1200 244, 243, 240, 78, 0, 0, 0, 0, 185, 0,
1201 0, 0, 0, 0, 176, 177, 0, 0, 77, 220,
1202 188, 173, 93, 107, 111, 112, 113, 114, 115, 116,
1203 117, 118, 119, 120, 121, 122, 123, 2, 3, 0,
1204 0, 0, 0, 234, 0, 0, 106, 125, 110, 235,
1205 124, 211, 212, 213, 214, 215, 216, 239, 0, 0,
1206 0, 246, 245, 255, 285, 254, 241, 242, 0, 0,
1207 0, 0, 198, 186, 180, 178, 168, 169, 0, 0,
1208 0, 0, 126, 0, 0, 109, 131, 133, 0, 0,
1209 138, 132, 248, 0, 247, 0, 0, 68, 72, 67,
1210 71, 66, 70, 65, 69, 73, 74, 0, 284, 0,
1211 266, 0, 94, 6, 7, 8, 9, 10, 11, 12,
1212 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1213 23, 24, 25, 26, 27, 0, 0, 0, 0, 0,
1214 0, 48, 49, 50, 51, 0, 0, 0, 0, 64,
1215 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
1216 62, 63, 0, 0, 0, 0, 0, 0, 94, 258,
1217 0, 281, 193, 190, 189, 191, 192, 194, 197, 0,
1218 102, 102, 111, 112, 113, 114, 115, 116, 117, 118,
1219 119, 120, 121, 0, 0, 0, 0, 102, 102, 0,
1220 0, 0, 130, 209, 137, 135, 0, 223, 224, 225,
1221 228, 229, 230, 226, 227, 221, 0, 0, 0, 0,
1222 0, 0, 0, 0, 0, 0, 0, 0, 232, 237,
1223 236, 238, 0, 249, 0, 271, 265, 0, 97, 97,
1224 290, 0, 0, 279, 0, 0, 0, 0, 0, 0,
1225 0, 0, 28, 29, 30, 31, 32, 33, 38, 39,
1226 40, 41, 42, 43, 44, 45, 46, 47, 34, 35,
1227 36, 37, 0, 0, 0, 0, 0, 0, 0, 195,
1228 0, 183, 184, 152, 153, 4, 5, 150, 151, 154,
1229 145, 146, 149, 0, 0, 0, 0, 148, 147, 181,
1230 182, 108, 108, 134, 208, 202, 205, 206, 0, 0,
1231 127, 222, 0, 0, 0, 0, 0, 0, 167, 0,
1232 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1233 286, 0, 288, 283, 0, 0, 0, 0, 0, 0,
1234 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1235 196, 0, 0, 104, 102, 140, 0, 0, 144, 0,
1236 141, 128, 129, 201, 203, 0, 100, 136, 0, 283,
1237 0, 0, 0, 0, 0, 231, 0, 0, 0, 0,
1238 0, 0, 0, 0, 0, 0, 0, 0, 0, 293,
1239 0, 0, 0, 275, 276, 0, 0, 0, 0, 0,
1240 0, 272, 273, 0, 291, 0, 99, 105, 103, 139,
1241 142, 143, 207, 204, 101, 95, 0, 0, 0, 0,
1242 0, 0, 166, 0, 0, 0, 0, 0, 0, 0,
1243 0, 264, 97, 98, 97, 261, 282, 0, 0, 0,
1244 0, 0, 267, 268, 269, 0, 264, 0, 0, 210,
1245 233, 156, 0, 0, 0, 0, 0, 0, 0, 0,
1246 0, 0, 0, 0, 263, 0, 0, 287, 289, 0,
1247 0, 0, 274, 277, 278, 0, 0, 292, 96, 0,
1248 163, 0, 0, 158, 159, 160, 0, 162, 155, 0,
1249 252, 0, 0, 0, 262, 259, 0, 270, 280, 0,
1250 0, 0, 161, 250, 0, 251, 0, 0, 260, 157,
1251 164, 165, 0, 0, 0, 0, 0, 0, 257, 0,
1255 /* YYDEFGOTO[NTERM-NUM]. */
1256 static const short int yydefgoto[] =
1258 -1, 83, 327, 262, 263, 264, 265, 312, 266, 267,
1259 233, 234, 147, 235, 24, 15, 38, 489, 370, 393,
1260 455, 321, 394, 84, 85, 236, 87, 88, 128, 246,
1261 358, 268, 359, 118, 1, 2, 57, 3, 61, 215,
1262 48, 113, 219, 89, 404, 346, 347, 348, 39, 93,
1263 16, 96, 17, 29, 18, 352, 269, 90, 271, 475,
1264 41, 42, 43, 105, 106, 532, 107, 283, 504, 505,
1265 208, 209, 429, 210, 211
1268 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1270 #define YYPACT_NINF -507
1271 static const short int yypact[] =
1273 -507, 31, 62, 973, -507, -507, -18, -507, -507, -507,
1274 -507, -507, -507, -507, -3, 124, 43, -507, -507, -507,
1275 -507, -33, -60, 25, 177, -37, -507, -507, -507, 124,
1276 102, 128, -507, -507, -507, -507, -507, -507, 800, -25,
1277 -507, -17, -507, 49, 12, 16, 26, 29, -507, 28,
1278 102, 800, 7, 7, -507, -507, 7, 7, -507, -507,
1279 -507, -507, -507, 42, -507, -507, -507, -507, -507, -507,
1280 -507, -507, -507, -507, -507, -507, -507, -507, -507, 163,
1281 164, 165, 469, -507, 27, 47, -507, -507, -109, -507,
1282 -507, -507, -507, -507, -507, -507, -507, -507, 837, 20,
1283 146, -507, -507, -507, 1314, -507, -507, -507, 155, 19,
1284 179, 172, 173, -507, -507, -507, -507, -507, 882, 882,
1285 921, 882, -507, 50, 51, -507, -507, -109, -126, 52,
1286 564, -507, 42, 1112, -507, 1112, 1112, -507, -507, -507,
1287 -507, -507, -507, -507, -507, -507, -507, 1112, -507, 882,
1288 -507, 149, 124, -507, -507, -507, -507, -507, -507, -507,
1289 -507, -507, -507, -507, -507, -507, -507, -507, -507, -507,
1290 -507, -507, -507, -507, -507, 882, 882, 882, 882, 882,
1291 882, -507, -507, -507, -507, 882, 882, 882, 882, -507,
1292 -507, -507, -507, -507, -507, -507, -507, -507, -507, -507,
1293 -507, -507, 882, 882, 882, 860, 882, 882, 124, -507,
1294 -5, -507, -507, -507, -507, -507, -507, -507, -507, -64,
1295 58, 58, 77, 117, 193, 126, 194, 142, 195, 144,
1296 198, 197, 207, 153, 213, 211, 964, 58, 58, 882,
1297 882, 882, -507, 640, -507, 81, 82, -507, -507, -507,
1298 -507, -507, -507, -507, -507, 170, 84, 86, 87, 88,
1299 89, 921, 90, 91, 92, 860, 93, 94, -507, -507,
1300 -507, -507, 97, -507, 104, -507, -507, 800, 105, 109,
1301 -507, 1112, 80, 112, 114, 115, 118, 120, 121, 1112,
1302 1112, 1112, -507, -507, -507, -507, -507, -507, -507, -507,
1303 -507, -507, -507, -507, -507, -507, -507, -507, -507, -507,
1304 -507, -507, 882, 123, 230, 800, 882, 882, 220, -507,
1305 -23, -507, -507, -507, -507, -507, -507, -507, -507, -507,
1306 -507, -507, -507, 678, 921, 516, 246, -507, -507, -507,
1307 -507, -73, -48, -109, -507, 27, -507, 131, 125, 723,
1308 -507, -507, 256, 921, 921, 921, 921, 921, -507, -76,
1309 921, 921, 921, 133, 921, 921, 274, 278, 1112, -1,
1310 -507, 1, -507, 143, 1112, 138, 882, 882, 882, 882,
1311 882, 147, 148, 150, 1112, 882, 882, 1112, 1112, 151,
1312 -507, 266, 280, -507, 58, -507, -57, -74, -507, -124,
1313 -507, -507, -507, -507, -507, 762, 264, -507, 152, 143,
1314 154, 156, 157, 158, 921, -507, 159, 161, 162, 921,
1315 166, 268, 1112, 1112, 167, 1112, 287, 1112, 882, -507,
1316 171, 1112, 174, -507, -507, 175, 178, 1112, 1112, 1112,
1317 180, -507, -507, 183, -507, 882, -507, -507, -507, -507,
1318 -507, -507, -507, -507, -507, 258, 286, 176, 921, 921,
1319 921, 921, -507, 921, 921, 921, 181, 921, 882, 192,
1320 169, 882, 199, -507, 199, -507, 200, 1112, 201, 882,
1321 882, 882, -507, -507, -507, 1112, 882, 1112, 311, -507,
1322 -507, -507, 202, 190, 203, 212, 191, 216, 217, 921,
1323 218, 221, 334, 41, 200, 222, 293, -507, -507, 882,
1324 208, 1112, -507, -507, -507, 223, 224, -507, -507, 921,
1325 -507, 921, 921, -507, -507, -507, 225, -507, -507, 1112,
1326 -507, 1201, 59, 336, -507, -507, 227, -507, -507, 226,
1327 228, 231, -507, -507, 235, -507, 1201, 373, -507, -507,
1328 -507, -507, 374, 242, 1112, 1112, 380, 98, -507, 1112,
1329 381, -507, 1112, -507
1332 /* YYPGOTO[NTERM-NUM]. */
1333 static const short int yypgoto[] =
1335 -507, -507, -507, 294, 295, 296, 297, 137, 299, 300,
1336 -98, -97, -495, -507, 366, 386, -135, -507, -274, 5,
1337 -507, -215, -507, -47, -507, -38, -507, -67, 282, -507,
1338 -102, 182, -204, 60, -507, -507, -507, -507, 363, -507,
1339 -507, -507, -507, -2, -507, 9, -507, -507, 387, -507,
1340 -507, -507, -507, -507, 412, -507, -506, -103, 79, -88,
1341 -507, 382, -507, -133, -507, -507, -507, -507, -6, -61,
1342 -507, -507, 18, -507, -507
1345 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1346 positive, shift that token. If negative, reduce the rule which
1347 number is the opposite. If zero, do what YYDEFACT says.
1348 If YYTABLE_NINF, syntax error. */
1349 #define YYTABLE_NINF -171
1350 static const short int yytable[] =
1352 86, 25, 145, 146, 115, 372, 322, 91, 531, 425,
1353 134, 427, 40, 86, 391, 127, 94, 277, 237, 44,
1354 45, 46, 339, 340, 135, 544, 241, 27, 414, 28,
1355 270, 4, 270, 270, 392, 136, 242, 546, 451, 47,
1356 553, 25, 116, 117, 270, -108, 137, 138, 139, 140,
1357 141, 142, 143, 144, 131, 19, 426, 20, 426, 30,
1358 133, 275, -170, 127, 137, 138, 139, 140, 141, 142,
1359 143, 144, 40, 315, 213, 214, 414, 19, 414, 20,
1360 220, 221, 129, 238, 415, 401, 450, 50, 318, 280,
1361 131, 49, 284, 5, 319, 414, 6, 285, 286, 287,
1362 288, 449, 323, 324, 7, 8, 9, 10, 11, 12,
1363 13, 133, 402, 119, 58, 131, 120, 121, 313, 314,
1364 316, 317, 98, 99, 100, 14, 101, 102, 103, 396,
1365 397, 399, 60, 338, -68, -68, 92, 278, 279, 133,
1366 281, 282, 133, -67, -67, 95, 62, 133, 133, 133,
1367 133, 137, 138, 139, 140, 141, 142, 143, 144, -66,
1368 -66, -65, -65, 108, 289, 290, 291, 109, 133, 133,
1369 325, 326, 341, 342, 343, 101, 102, 110, 270, 448,
1370 111, 122, 123, 124, 112, 212, 270, 270, 270, 31,
1371 32, 33, 34, 35, 36, 37, -109, 216, 507, 530,
1372 508, 130, 217, 218, 51, 345, 243, 239, 240, 276,
1373 320, -72, -71, -70, 272, 273, -69, 545, -75, 7,
1374 8, 9, 52, 11, 53, 13, 274, 54, -76, 389,
1375 368, 328, 329, 349, 351, 55, 374, 350, 353, 86,
1376 354, 355, 356, 357, 360, 361, 362, 364, 365, 366,
1377 390, 409, 410, 411, 412, 413, 367, 369, 416, 417,
1378 418, 371, 420, 421, 375, 270, 376, 377, 387, 386,
1379 378, 270, 379, 380, 384, 385, 400, 86, 388, 133,
1380 406, 270, 343, 405, 270, 270, 408, 419, 432, 422,
1381 434, 435, 436, 423, 431, 428, 446, 441, 447, 437,
1382 438, 391, 439, 445, 456, 473, 458, 468, 459, 460,
1383 461, 463, 462, 464, 465, 488, 490, 466, 467, 270,
1384 270, 471, 270, 477, 270, 503, 479, 480, 270, 518,
1385 481, 491, 485, 499, 270, 270, 270, 486, 133, 433,
1386 133, 133, 133, 403, 502, 520, 523, 133, 442, 529,
1387 426, 506, 509, 511, 519, 521, 492, 493, 494, 495,
1388 373, 496, 497, 498, 522, 500, 535, 345, 381, 382,
1389 383, 524, 525, 527, 270, 547, 528, 533, 537, 538,
1390 542, 549, 270, 550, 270, 548, 551, 552, 554, 555,
1391 133, 512, 513, 514, 556, 559, 562, 526, 202, 203,
1392 204, 205, 363, 206, 207, 145, 146, 487, 270, 104,
1393 56, 454, 245, 114, 453, 26, 59, 539, 337, 540,
1394 541, 534, 476, 97, 560, 516, 270, 457, 0, 0,
1395 501, 0, 0, 133, 145, 146, 0, 0, 0, 0,
1396 0, 133, 133, 133, 0, 0, 0, 424, 133, 0,
1397 0, 270, 270, 430, 0, 0, 270, 0, 0, 270,
1398 0, 0, 0, 440, 0, 0, 443, 444, 0, 0,
1399 0, 133, 125, 64, 65, 66, 67, 68, 69, 70,
1400 71, 72, 73, 74, 75, 76, 0, 0, 77, 78,
1401 0, 0, 0, 0, 0, 0, 0, 19, 0, 20,
1402 0, 469, 470, 0, 472, 0, 474, 0, 0, 0,
1403 478, 0, 0, 0, 0, 0, 482, 483, 484, 125,
1404 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
1405 232, 75, 76, 0, 0, 77, 78, 0, 0, 0,
1406 0, 0, 0, 0, 19, 0, 20, 0, 0, 0,
1407 0, 0, 0, 0, 0, 0, 510, 0, 0, 0,
1408 0, 0, 0, 0, 515, 0, 517, 125, 64, 65,
1409 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
1410 76, 0, 0, 77, 78, 0, 0, 0, 0, 0,
1411 536, 0, 19, 0, 20, 0, 0, 0, 0, 0,
1412 0, 0, 0, 0, 244, 0, 0, 0, 543, 0,
1413 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1414 0, 0, 79, 0, 0, 80, 0, 0, 81, 0,
1415 82, 126, 0, 557, 558, 0, 0, 0, 561, 0,
1416 0, 563, 0, 125, 64, 65, 66, 67, 68, 69,
1417 70, 71, 72, 73, 74, 75, 76, 0, 0, 77,
1418 78, 0, 0, 0, 0, 0, 0, 0, 19, 79,
1419 20, 0, 80, 0, 0, 81, 0, 82, 398, 0,
1420 344, 125, 222, 223, 224, 225, 226, 227, 228, 229,
1421 230, 231, 232, 75, 76, 0, 0, 77, 78, 0,
1422 0, 0, 0, 0, 0, 0, 19, 0, 20, 0,
1423 0, 0, 0, 0, 0, 0, 0, 79, 0, 0,
1424 80, 0, 0, 81, 0, 82, 125, 64, 65, 66,
1425 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
1426 0, 0, 77, 78, 0, 0, 0, 0, 0, 0,
1427 0, 19, 0, 20, 0, 0, 0, 0, 0, 0,
1428 0, 0, 0, 407, 0, 125, 64, 65, 66, 67,
1429 68, 69, 70, 71, 72, 73, 74, 75, 76, 0,
1430 0, 77, 78, 0, 0, 0, 0, 0, 0, 0,
1431 19, 0, 20, 79, 0, 0, 80, 0, 0, 81,
1432 0, 82, 452, 63, 64, 65, 66, 67, 68, 69,
1433 70, 71, 72, 73, 74, 75, 76, 0, 0, 77,
1434 78, 0, 0, 0, 0, 0, 0, 0, 19, 0,
1435 20, 79, 0, 0, 80, 0, 395, 81, 0, 82,
1436 132, 64, 65, 66, 67, 68, 69, 70, 71, 72,
1437 73, 74, 75, 76, 0, 0, 77, 78, 0, 0,
1438 0, 0, 0, 0, 0, 19, 0, 20, 0, 0,
1439 0, 0, 0, 0, 0, 0, 79, 0, 0, 80,
1440 0, 0, 81, 0, 82, 125, 64, 65, 66, 67,
1441 68, 69, 70, 71, 72, 73, 74, 75, 76, 0,
1442 0, 77, 78, 0, 0, 0, 0, 0, 0, 0,
1443 19, 0, 20, 0, 0, 79, 0, 0, 80, 0,
1444 0, 81, 0, 82, 125, 222, 223, 224, 225, 226,
1445 227, 228, 229, 230, 231, 232, 75, 76, 0, 0,
1446 77, 78, 0, 0, 0, 0, 0, 0, 0, 19,
1447 0, 20, 0, 79, 0, 0, 80, 0, 0, 81,
1448 0, 82, 292, 293, 294, 295, 296, 297, 298, 299,
1449 300, 301, 302, 303, 304, 305, 306, 307, 308, 309,
1450 310, 311, 0, 77, 78, 0, 330, 331, 332, 0,
1451 79, 0, 19, 80, 20, 0, 81, 0, 82, 0,
1452 -78, 19, 0, 20, 0, 0, 0, 6, -78, -78,
1453 0, 0, 0, 0, 0, -78, -78, -78, -78, -78,
1454 -78, -78, 0, -78, 21, 0, 0, 0, 0, 0,
1455 0, -78, 22, 0, 0, 79, 23, 0, 80, 0,
1456 0, 81, 0, 82, 153, 154, 155, 156, 157, 158,
1457 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
1458 169, 170, 171, 172, 173, 174, 0, 0, 0, 0,
1459 0, 0, 0, 0, 79, 0, 0, 80, 0, 0,
1460 81, 0, 82, 0, 0, 0, 0, 0, 0, 0,
1461 0, 256, 0, 257, 181, 182, 183, 184, 0, 258,
1462 259, 260, 189, 190, 191, 192, 193, 194, 195, 196,
1463 197, 198, 199, 200, 201, 0, 0, 0, 0, 0,
1464 333, 0, 0, 334, 0, 335, 0, 0, 336, 247,
1465 248, 77, 78, 249, 250, 251, 252, 253, 254, 0,
1466 19, 0, 20, 0, 0, 0, 0, 0, 0, 0,
1467 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1468 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1469 0, 0, 0, 0, 255, 0, 0, 0, 0, 0,
1470 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1471 0, 0, 153, 154, 155, 156, 157, 158, 159, 160,
1472 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
1473 171, 172, 173, 174, 0, 0, 0, 0, 247, 248,
1474 0, 0, 249, 250, 251, 252, 253, 254, 0, 0,
1475 0, 0, 0, 0, 0, 0, 0, 0, 0, 256,
1476 0, 257, 181, 182, 183, 184, 0, 258, 259, 260,
1477 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
1478 199, 200, 201, 255, 0, 0, 0, 0, 0, 0,
1479 0, 261, 0, 0, 0, 0, 0, 0, 0, 0,
1480 0, 153, 154, 155, 156, 157, 158, 159, 160, 161,
1481 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
1482 172, 173, 174, 0, 0, 0, 0, 0, 0, 0,
1483 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1484 0, 0, 0, 0, 0, 0, 0, 0, 256, 0,
1485 257, 181, 182, 183, 184, 0, 258, 259, 260, 189,
1486 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
1487 200, 201, 148, 0, 0, 0, 0, 0, 0, 0,
1488 261, 0, 0, 149, 0, 0, 0, 0, 0, 0,
1489 0, 0, 0, 0, 150, 151, 0, 0, 0, 0,
1490 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1491 152, 0, 0, 0, 153, 154, 155, 156, 157, 158,
1492 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
1493 169, 170, 171, 172, 173, 174, 0, 0, 0, 0,
1494 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1495 0, 0, 0, 0, 0, 0, 175, 176, 177, 0,
1496 0, 178, 179, 180, 181, 182, 183, 184, 185, 186,
1497 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,
1498 197, 198, 199, 200, 201
1501 static const short int yycheck[] =
1503 38, 3, 100, 100, 51, 279, 221, 32, 503, 10,
1504 98, 10, 29, 51, 37, 82, 33, 152, 120, 52,
1505 53, 54, 237, 238, 4, 531, 152, 45, 152, 47,
1506 133, 0, 135, 136, 57, 15, 162, 532, 162, 72,
1507 546, 43, 35, 36, 147, 154, 5, 6, 7, 8,
1508 9, 10, 11, 12, 163, 28, 57, 30, 57, 62,
1509 98, 149, 0, 130, 5, 6, 7, 8, 9, 10,
1510 11, 12, 29, 208, 55, 56, 152, 28, 152, 30,
1511 118, 119, 84, 121, 160, 158, 160, 62, 152, 177,
1512 163, 151, 180, 31, 158, 152, 34, 185, 186, 187,
1513 188, 158, 25, 26, 42, 43, 44, 45, 46, 47,
1514 48, 149, 160, 53, 151, 163, 56, 57, 206, 207,
1515 125, 126, 73, 74, 75, 63, 77, 78, 79, 333,
1516 334, 335, 30, 236, 17, 18, 161, 175, 176, 177,
1517 178, 179, 180, 17, 18, 162, 18, 185, 186, 187,
1518 188, 5, 6, 7, 8, 9, 10, 11, 12, 17,
1519 18, 17, 18, 151, 202, 203, 204, 151, 206, 207,
1520 17, 18, 239, 240, 241, 77, 78, 151, 281, 394,
1521 151, 18, 18, 18, 156, 30, 289, 290, 291, 65,
1522 66, 67, 68, 69, 70, 71, 154, 18, 472, 158,
1523 474, 154, 30, 30, 27, 243, 154, 157, 157, 60,
1524 152, 18, 18, 18, 135, 136, 18, 158, 21, 42,
1525 43, 44, 45, 46, 47, 48, 147, 50, 21, 317,
1526 277, 18, 21, 152, 64, 58, 156, 155, 154, 277,
1527 154, 154, 154, 154, 154, 154, 154, 154, 154, 152,
1528 30, 353, 354, 355, 356, 357, 152, 152, 360, 361,
1529 362, 152, 364, 365, 152, 368, 152, 152, 315, 39,
1530 152, 374, 152, 152, 312, 152, 30, 315, 316, 317,
1531 155, 384, 349, 152, 387, 388, 30, 154, 376, 15,
1532 378, 379, 380, 15, 156, 152, 30, 385, 18, 152,
1533 152, 37, 152, 152, 152, 18, 152, 39, 152, 152,
1534 152, 152, 414, 152, 152, 57, 30, 419, 152, 422,
1535 423, 154, 425, 152, 427, 156, 152, 152, 431, 18,
1536 152, 155, 152, 152, 437, 438, 439, 154, 376, 377,
1537 378, 379, 380, 345, 152, 155, 155, 385, 386, 15,
1538 57, 152, 152, 152, 152, 152, 458, 459, 460, 461,
1539 281, 463, 464, 465, 152, 467, 158, 405, 289, 290,
1540 291, 155, 155, 155, 477, 39, 155, 155, 155, 155,
1541 155, 155, 485, 155, 487, 158, 155, 152, 15, 15,
1542 428, 479, 480, 481, 152, 15, 15, 499, 104, 104,
1543 104, 104, 265, 104, 104, 503, 503, 445, 511, 43,
1544 24, 406, 130, 50, 405, 3, 29, 519, 236, 521,
1545 522, 509, 428, 41, 557, 486, 529, 409, -1, -1,
1546 468, -1, -1, 471, 532, 532, -1, -1, -1, -1,
1547 -1, 479, 480, 481, -1, -1, -1, 368, 486, -1,
1548 -1, 554, 555, 374, -1, -1, 559, -1, -1, 562,
1549 -1, -1, -1, 384, -1, -1, 387, 388, -1, -1,
1550 -1, 509, 3, 4, 5, 6, 7, 8, 9, 10,
1551 11, 12, 13, 14, 15, 16, -1, -1, 19, 20,
1552 -1, -1, -1, -1, -1, -1, -1, 28, -1, 30,
1553 -1, 422, 423, -1, 425, -1, 427, -1, -1, -1,
1554 431, -1, -1, -1, -1, -1, 437, 438, 439, 3,
1555 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1556 14, 15, 16, -1, -1, 19, 20, -1, -1, -1,
1557 -1, -1, -1, -1, 28, -1, 30, -1, -1, -1,
1558 -1, -1, -1, -1, -1, -1, 477, -1, -1, -1,
1559 -1, -1, -1, -1, 485, -1, 487, 3, 4, 5,
1560 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1561 16, -1, -1, 19, 20, -1, -1, -1, -1, -1,
1562 511, -1, 28, -1, 30, -1, -1, -1, -1, -1,
1563 -1, -1, -1, -1, 40, -1, -1, -1, 529, -1,
1564 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1565 -1, -1, 153, -1, -1, 156, -1, -1, 159, -1,
1566 161, 162, -1, 554, 555, -1, -1, -1, 559, -1,
1567 -1, 562, -1, 3, 4, 5, 6, 7, 8, 9,
1568 10, 11, 12, 13, 14, 15, 16, -1, -1, 19,
1569 20, -1, -1, -1, -1, -1, -1, -1, 28, 153,
1570 30, -1, 156, -1, -1, 159, -1, 161, 162, -1,
1571 40, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1572 12, 13, 14, 15, 16, -1, -1, 19, 20, -1,
1573 -1, -1, -1, -1, -1, -1, 28, -1, 30, -1,
1574 -1, -1, -1, -1, -1, -1, -1, 153, -1, -1,
1575 156, -1, -1, 159, -1, 161, 3, 4, 5, 6,
1576 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1577 -1, -1, 19, 20, -1, -1, -1, -1, -1, -1,
1578 -1, 28, -1, 30, -1, -1, -1, -1, -1, -1,
1579 -1, -1, -1, 40, -1, 3, 4, 5, 6, 7,
1580 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
1581 -1, 19, 20, -1, -1, -1, -1, -1, -1, -1,
1582 28, -1, 30, 153, -1, -1, 156, -1, -1, 159,
1583 -1, 161, 40, 3, 4, 5, 6, 7, 8, 9,
1584 10, 11, 12, 13, 14, 15, 16, -1, -1, 19,
1585 20, -1, -1, -1, -1, -1, -1, -1, 28, -1,
1586 30, 153, -1, -1, 156, -1, 158, 159, -1, 161,
1587 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1588 13, 14, 15, 16, -1, -1, 19, 20, -1, -1,
1589 -1, -1, -1, -1, -1, 28, -1, 30, -1, -1,
1590 -1, -1, -1, -1, -1, -1, 153, -1, -1, 156,
1591 -1, -1, 159, -1, 161, 3, 4, 5, 6, 7,
1592 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
1593 -1, 19, 20, -1, -1, -1, -1, -1, -1, -1,
1594 28, -1, 30, -1, -1, 153, -1, -1, 156, -1,
1595 -1, 159, -1, 161, 3, 4, 5, 6, 7, 8,
1596 9, 10, 11, 12, 13, 14, 15, 16, -1, -1,
1597 19, 20, -1, -1, -1, -1, -1, -1, -1, 28,
1598 -1, 30, -1, 153, -1, -1, 156, -1, -1, 159,
1599 -1, 161, 102, 103, 104, 105, 106, 107, 108, 109,
1600 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
1601 120, 121, -1, 19, 20, -1, 22, 23, 24, -1,
1602 153, -1, 28, 156, 30, -1, 159, -1, 161, -1,
1603 27, 28, -1, 30, -1, -1, -1, 34, 35, 36,
1604 -1, -1, -1, -1, -1, 42, 43, 44, 45, 46,
1605 47, 48, -1, 50, 51, -1, -1, -1, -1, -1,
1606 -1, 58, 59, -1, -1, 153, 63, -1, 156, -1,
1607 -1, 159, -1, 161, 80, 81, 82, 83, 84, 85,
1608 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1609 96, 97, 98, 99, 100, 101, -1, -1, -1, -1,
1610 -1, -1, -1, -1, 153, -1, -1, 156, -1, -1,
1611 159, -1, 161, -1, -1, -1, -1, -1, -1, -1,
1612 -1, 127, -1, 129, 130, 131, 132, 133, -1, 135,
1613 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
1614 146, 147, 148, 149, 150, -1, -1, -1, -1, -1,
1615 156, -1, -1, 159, -1, 161, -1, -1, 164, 17,
1616 18, 19, 20, 21, 22, 23, 24, 25, 26, -1,
1617 28, -1, 30, -1, -1, -1, -1, -1, -1, -1,
1618 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1619 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1620 -1, -1, -1, -1, 62, -1, -1, -1, -1, -1,
1621 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1622 -1, -1, 80, 81, 82, 83, 84, 85, 86, 87,
1623 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
1624 98, 99, 100, 101, -1, -1, -1, -1, 17, 18,
1625 -1, -1, 21, 22, 23, 24, 25, 26, -1, -1,
1626 -1, -1, -1, -1, -1, -1, -1, -1, -1, 127,
1627 -1, 129, 130, 131, 132, 133, -1, 135, 136, 137,
1628 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
1629 148, 149, 150, 62, -1, -1, -1, -1, -1, -1,
1630 -1, 159, -1, -1, -1, -1, -1, -1, -1, -1,
1631 -1, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1632 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
1633 99, 100, 101, -1, -1, -1, -1, -1, -1, -1,
1634 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1635 -1, -1, -1, -1, -1, -1, -1, -1, 127, -1,
1636 129, 130, 131, 132, 133, -1, 135, 136, 137, 138,
1637 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
1638 149, 150, 38, -1, -1, -1, -1, -1, -1, -1,
1639 159, -1, -1, 49, -1, -1, -1, -1, -1, -1,
1640 -1, -1, -1, -1, 60, 61, -1, -1, -1, -1,
1641 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1642 76, -1, -1, -1, 80, 81, 82, 83, 84, 85,
1643 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1644 96, 97, 98, 99, 100, 101, -1, -1, -1, -1,
1645 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1646 -1, -1, -1, -1, -1, -1, 122, 123, 124, -1,
1647 -1, 127, 128, 129, 130, 131, 132, 133, 134, 135,
1648 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
1649 146, 147, 148, 149, 150
1652 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1653 symbol of state STATE-NUM. */
1654 static const unsigned char yystos[] =
1656 0, 199, 200, 202, 0, 31, 34, 42, 43, 44,
1657 45, 46, 47, 48, 63, 180, 215, 217, 219, 28,
1658 30, 51, 59, 63, 179, 208, 219, 45, 47, 218,
1659 62, 65, 66, 67, 68, 69, 70, 71, 181, 213,
1660 29, 225, 226, 227, 52, 53, 54, 72, 205, 151,
1661 62, 27, 45, 47, 50, 58, 180, 201, 151, 213,
1662 30, 203, 18, 3, 4, 5, 6, 7, 8, 9,
1663 10, 11, 12, 13, 14, 15, 16, 19, 20, 153,
1664 156, 159, 161, 166, 188, 189, 190, 191, 192, 208,
1665 222, 32, 161, 214, 33, 162, 216, 226, 73, 74,
1666 75, 77, 78, 79, 179, 228, 229, 231, 151, 151,
1667 151, 151, 156, 206, 203, 188, 35, 36, 198, 198,
1668 198, 198, 18, 18, 18, 3, 162, 192, 193, 208,
1669 154, 163, 3, 190, 224, 4, 15, 5, 6, 7,
1670 8, 9, 10, 11, 12, 175, 176, 177, 38, 49,
1671 60, 61, 76, 80, 81, 82, 83, 84, 85, 86,
1672 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
1673 97, 98, 99, 100, 101, 122, 123, 124, 127, 128,
1674 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
1675 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
1676 149, 150, 168, 169, 170, 171, 173, 174, 235, 236,
1677 238, 239, 30, 55, 56, 204, 18, 30, 30, 207,
1678 190, 190, 4, 5, 6, 7, 8, 9, 10, 11,
1679 12, 13, 14, 175, 176, 178, 190, 195, 190, 157,
1680 157, 152, 162, 154, 40, 193, 194, 17, 18, 21,
1681 22, 23, 24, 25, 26, 62, 127, 129, 135, 136,
1682 137, 159, 168, 169, 170, 171, 173, 174, 196, 221,
1683 222, 223, 223, 223, 223, 224, 60, 181, 190, 190,
1684 224, 190, 190, 232, 224, 224, 224, 224, 224, 190,
1685 190, 190, 102, 103, 104, 105, 106, 107, 108, 109,
1686 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
1687 120, 121, 172, 224, 224, 181, 125, 126, 152, 158,
1688 152, 186, 186, 25, 26, 17, 18, 167, 18, 21,
1689 22, 23, 24, 156, 159, 161, 164, 196, 222, 186,
1690 186, 192, 192, 192, 40, 190, 210, 211, 212, 152,
1691 155, 64, 220, 154, 154, 154, 154, 154, 195, 197,
1692 154, 154, 154, 172, 154, 154, 152, 152, 188, 152,
1693 183, 152, 183, 223, 156, 152, 152, 152, 152, 152,
1694 152, 223, 223, 223, 190, 152, 39, 188, 190, 224,
1695 30, 37, 57, 184, 187, 158, 197, 197, 162, 197,
1696 30, 158, 160, 208, 209, 152, 155, 40, 30, 195,
1697 195, 195, 195, 195, 152, 160, 195, 195, 195, 154,
1698 195, 195, 15, 15, 223, 10, 57, 10, 152, 237,
1699 223, 156, 224, 190, 224, 224, 224, 152, 152, 152,
1700 223, 224, 190, 223, 223, 152, 30, 18, 186, 158,
1701 160, 162, 40, 210, 184, 185, 152, 237, 152, 152,
1702 152, 152, 195, 152, 152, 152, 195, 152, 39, 223,
1703 223, 154, 223, 18, 223, 224, 233, 152, 223, 152,
1704 152, 152, 223, 223, 223, 152, 154, 190, 57, 182,
1705 30, 155, 195, 195, 195, 195, 195, 195, 195, 152,
1706 195, 190, 152, 156, 233, 234, 152, 183, 183, 152,
1707 223, 152, 224, 224, 224, 223, 234, 223, 18, 152,
1708 155, 152, 152, 155, 155, 155, 195, 155, 155, 15,
1709 158, 177, 230, 155, 224, 158, 223, 155, 155, 195,
1710 195, 195, 155, 223, 221, 158, 177, 39, 158, 155,
1711 155, 155, 152, 221, 15, 15, 152, 223, 223, 15,
1715 #define yyerrok (yyerrstatus = 0)
1716 #define yyclearin (yychar = YYEMPTY)
1717 #define YYEMPTY (-2)
1720 #define YYACCEPT goto yyacceptlab
1721 #define YYABORT goto yyabortlab
1722 #define YYERROR goto yyerrorlab
1725 /* Like YYERROR except do call yyerror. This remains here temporarily
1726 to ease the transition to the new meaning of YYERROR, for GCC.
1727 Once GCC version 2 has supplanted version 1, this can go. */
1729 #define YYFAIL goto yyerrlab
1731 #define YYRECOVERING() (!!yyerrstatus)
1733 #define YYBACKUP(Token, Value) \
1735 if (yychar == YYEMPTY && yylen == 1) \
1739 yytoken = YYTRANSLATE (yychar); \
1745 yyerror (YY_("syntax error: cannot back up")); \
1752 #define YYERRCODE 256
1755 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1756 If N is 0, then set CURRENT to the empty location which ends
1757 the previous symbol: RHS[0] (always defined). */
1759 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1760 #ifndef YYLLOC_DEFAULT
1761 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1765 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1766 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1767 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1768 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1772 (Current).first_line = (Current).last_line = \
1773 YYRHSLOC (Rhs, 0).last_line; \
1774 (Current).first_column = (Current).last_column = \
1775 YYRHSLOC (Rhs, 0).last_column; \
1781 /* YY_LOCATION_PRINT -- Print the location on the stream.
1782 This macro was not mandated originally: define only if we know
1783 we won't break user code: when these are the locations we know. */
1785 #ifndef YY_LOCATION_PRINT
1786 # if YYLTYPE_IS_TRIVIAL
1787 # define YY_LOCATION_PRINT(File, Loc) \
1788 fprintf (File, "%d.%d-%d.%d", \
1789 (Loc).first_line, (Loc).first_column, \
1790 (Loc).last_line, (Loc).last_column)
1792 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1797 /* YYLEX -- calling `yylex' with the right arguments. */
1800 # define YYLEX yylex (YYLEX_PARAM)
1802 # define YYLEX yylex ()
1805 /* Enable debugging if requested. */
1809 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1810 # define YYFPRINTF fprintf
1813 # define YYDPRINTF(Args) \
1819 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1823 YYFPRINTF (stderr, "%s ", Title); \
1824 yysymprint (stderr, \
1826 YYFPRINTF (stderr, "\n"); \
1830 /*------------------------------------------------------------------.
1831 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1833 `------------------------------------------------------------------*/
1835 #if defined (__STDC__) || defined (__cplusplus)
1837 yy_stack_print (short int *bottom, short int *top)
1840 yy_stack_print (bottom, top)
1845 YYFPRINTF (stderr, "Stack now");
1846 for (/* Nothing. */; bottom <= top; ++bottom)
1847 YYFPRINTF (stderr, " %d", *bottom);
1848 YYFPRINTF (stderr, "\n");
1851 # define YY_STACK_PRINT(Bottom, Top) \
1854 yy_stack_print ((Bottom), (Top)); \
1858 /*------------------------------------------------.
1859 | Report that the YYRULE is going to be reduced. |
1860 `------------------------------------------------*/
1862 #if defined (__STDC__) || defined (__cplusplus)
1864 yy_reduce_print (int yyrule)
1867 yy_reduce_print (yyrule)
1872 unsigned long int yylno = yyrline[yyrule];
1873 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
1875 /* Print the symbols being reduced, and their result. */
1876 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
1877 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1878 YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
1881 # define YY_REDUCE_PRINT(Rule) \
1884 yy_reduce_print (Rule); \
1887 /* Nonzero means print parse trace. It is left uninitialized so that
1888 multiple parsers can coexist. */
1890 #else /* !YYDEBUG */
1891 # define YYDPRINTF(Args)
1892 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1893 # define YY_STACK_PRINT(Bottom, Top)
1894 # define YY_REDUCE_PRINT(Rule)
1895 #endif /* !YYDEBUG */
1898 /* YYINITDEPTH -- initial size of the parser's stacks. */
1900 # define YYINITDEPTH 200
1903 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1904 if the built-in stack extension method is used).
1906 Do not make this value too large; the results are undefined if
1907 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1908 evaluated with infinite-precision integer arithmetic. */
1911 # define YYMAXDEPTH 10000
1919 # if defined (__GLIBC__) && defined (_STRING_H)
1920 # define yystrlen strlen
1922 /* Return the length of YYSTR. */
1924 # if defined (__STDC__) || defined (__cplusplus)
1925 yystrlen (const char *yystr)
1931 const char *yys = yystr;
1933 while (*yys++ != '\0')
1936 return yys - yystr - 1;
1942 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1943 # define yystpcpy stpcpy
1945 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1948 # if defined (__STDC__) || defined (__cplusplus)
1949 yystpcpy (char *yydest, const char *yysrc)
1951 yystpcpy (yydest, yysrc)
1957 const char *yys = yysrc;
1959 while ((*yyd++ = *yys++) != '\0')
1968 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1969 quotes and backslashes, so that it's suitable for yyerror. The
1970 heuristic is that double-quoting is unnecessary unless the string
1971 contains an apostrophe, a comma, or backslash (other than
1972 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1973 null, do not copy; instead, return the length of what the result
1976 yytnamerr (char *yyres, const char *yystr)
1981 char const *yyp = yystr;
1988 goto do_not_strip_quotes;
1992 goto do_not_strip_quotes;
2005 do_not_strip_quotes: ;
2009 return yystrlen (yystr);
2011 return yystpcpy (yyres, yystr) - yyres;
2015 #endif /* YYERROR_VERBOSE */
2020 /*--------------------------------.
2021 | Print this symbol on YYOUTPUT. |
2022 `--------------------------------*/
2024 #if defined (__STDC__) || defined (__cplusplus)
2026 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
2029 yysymprint (yyoutput, yytype, yyvaluep)
2035 /* Pacify ``unused variable'' warnings. */
2038 if (yytype < YYNTOKENS)
2039 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
2041 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
2045 if (yytype < YYNTOKENS)
2046 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
2053 YYFPRINTF (yyoutput, ")");
2056 #endif /* ! YYDEBUG */
2057 /*-----------------------------------------------.
2058 | Release the memory associated to this symbol. |
2059 `-----------------------------------------------*/
2061 #if defined (__STDC__) || defined (__cplusplus)
2063 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
2066 yydestruct (yymsg, yytype, yyvaluep)
2072 /* Pacify ``unused variable'' warnings. */
2077 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2088 /* Prevent warnings from -Wmissing-prototypes. */
2090 #ifdef YYPARSE_PARAM
2091 # if defined (__STDC__) || defined (__cplusplus)
2092 int yyparse (void *YYPARSE_PARAM);
2096 #else /* ! YYPARSE_PARAM */
2097 #if defined (__STDC__) || defined (__cplusplus)
2102 #endif /* ! YYPARSE_PARAM */
2106 /* The look-ahead symbol. */
2109 /* The semantic value of the look-ahead symbol. */
2112 /* Number of syntax errors so far. */
2121 #ifdef YYPARSE_PARAM
2122 # if defined (__STDC__) || defined (__cplusplus)
2123 int yyparse (void *YYPARSE_PARAM)
2125 int yyparse (YYPARSE_PARAM)
2126 void *YYPARSE_PARAM;
2128 #else /* ! YYPARSE_PARAM */
2129 #if defined (__STDC__) || defined (__cplusplus)
2143 /* Number of tokens to shift before error messages enabled. */
2145 /* Look-ahead token as an internal (translated) token number. */
2148 /* Three stacks and their tools:
2149 `yyss': related to states,
2150 `yyvs': related to semantic values,
2151 `yyls': related to locations.
2153 Refer to the stacks thru separate pointers, to allow yyoverflow
2154 to reallocate them elsewhere. */
2156 /* The state stack. */
2157 short int yyssa[YYINITDEPTH];
2158 short int *yyss = yyssa;
2161 /* The semantic value stack. */
2162 YYSTYPE yyvsa[YYINITDEPTH];
2163 YYSTYPE *yyvs = yyvsa;
2168 #define YYPOPSTACK (yyvsp--, yyssp--)
2170 YYSIZE_T yystacksize = YYINITDEPTH;
2172 /* The variables used to return semantic value and location from the
2177 /* When reducing, the number of symbols on the RHS of the reduced
2181 YYDPRINTF ((stderr, "Starting parse\n"));
2186 yychar = YYEMPTY; /* Cause a token to be read. */
2188 /* Initialize stack pointers.
2189 Waste one element of value and location stack
2190 so that they stay on the same level as the state stack.
2191 The wasted elements are never initialized. */
2198 /*------------------------------------------------------------.
2199 | yynewstate -- Push a new state, which is found in yystate. |
2200 `------------------------------------------------------------*/
2202 /* In all cases, when you get here, the value and location stacks
2203 have just been pushed. so pushing a state here evens the stacks.
2210 if (yyss + yystacksize - 1 <= yyssp)
2212 /* Get the current used size of the three stacks, in elements. */
2213 YYSIZE_T yysize = yyssp - yyss + 1;
2217 /* Give user a chance to reallocate the stack. Use copies of
2218 these so that the &'s don't force the real ones into
2220 YYSTYPE *yyvs1 = yyvs;
2221 short int *yyss1 = yyss;
2224 /* Each stack pointer address is followed by the size of the
2225 data in use in that stack, in bytes. This used to be a
2226 conditional around just the two extra args, but that might
2227 be undefined if yyoverflow is a macro. */
2228 yyoverflow (YY_("memory exhausted"),
2229 &yyss1, yysize * sizeof (*yyssp),
2230 &yyvs1, yysize * sizeof (*yyvsp),
2237 #else /* no yyoverflow */
2238 # ifndef YYSTACK_RELOCATE
2239 goto yyexhaustedlab;
2241 /* Extend the stack our own way. */
2242 if (YYMAXDEPTH <= yystacksize)
2243 goto yyexhaustedlab;
2245 if (YYMAXDEPTH < yystacksize)
2246 yystacksize = YYMAXDEPTH;
2249 short int *yyss1 = yyss;
2250 union yyalloc *yyptr =
2251 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2253 goto yyexhaustedlab;
2254 YYSTACK_RELOCATE (yyss);
2255 YYSTACK_RELOCATE (yyvs);
2257 # undef YYSTACK_RELOCATE
2259 YYSTACK_FREE (yyss1);
2262 #endif /* no yyoverflow */
2264 yyssp = yyss + yysize - 1;
2265 yyvsp = yyvs + yysize - 1;
2268 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2269 (unsigned long int) yystacksize));
2271 if (yyss + yystacksize - 1 <= yyssp)
2275 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2284 /* Do appropriate processing given the current state. */
2285 /* Read a look-ahead token if we need one and don't already have one. */
2288 /* First try to decide what to do without reference to look-ahead token. */
2290 yyn = yypact[yystate];
2291 if (yyn == YYPACT_NINF)
2294 /* Not known => get a look-ahead token if don't already have one. */
2296 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
2297 if (yychar == YYEMPTY)
2299 YYDPRINTF ((stderr, "Reading a token: "));
2303 if (yychar <= YYEOF)
2305 yychar = yytoken = YYEOF;
2306 YYDPRINTF ((stderr, "Now at end of input.\n"));
2310 yytoken = YYTRANSLATE (yychar);
2311 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2314 /* If the proper action on seeing token YYTOKEN is to reduce or to
2315 detect an error, take that action. */
2317 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2322 if (yyn == 0 || yyn == YYTABLE_NINF)
2331 /* Shift the look-ahead token. */
2332 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2334 /* Discard the token being shifted unless it is eof. */
2335 if (yychar != YYEOF)
2341 /* Count tokens shifted since error; after three, turn off error
2350 /*-----------------------------------------------------------.
2351 | yydefault -- do the default action for the current state. |
2352 `-----------------------------------------------------------*/
2354 yyn = yydefact[yystate];
2360 /*-----------------------------.
2361 | yyreduce -- Do a reduction. |
2362 `-----------------------------*/
2364 /* yyn is the number of a rule to reduce with. */
2367 /* If YYLEN is nonzero, implement the default value of the action:
2370 Otherwise, the following line sets YYVAL to garbage.
2371 This behavior is undocumented and Bison
2372 users should not rely upon it. Assigning to YYVAL
2373 unconditionally makes the parser a bit smaller, and it avoids a
2374 GCC warning that YYVAL may be used uninitialized. */
2375 yyval = yyvsp[1-yylen];
2378 YY_REDUCE_PRINT (yyn);
2382 #line 357 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2384 (yyval.String) = (yyvsp[-1].String);
2389 #line 360 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2391 (yyval.String) = new std::string("");
2396 #line 367 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2397 { (yyval.String) = new std::string(""); ;}
2401 #line 372 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2403 *(yyvsp[-1].String) += *(yyvsp[0].String);
2404 delete (yyvsp[0].String);
2405 (yyval.String) = (yyvsp[-1].String);
2410 #line 377 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2411 { (yyval.String) = new std::string(""); ;}
2415 #line 382 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2416 { (yyval.String) = new std::string(); ;}
2420 #line 383 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2421 { *(yyvsp[-1].String) += " " + *(yyvsp[0].String); delete (yyvsp[0].String); (yyval.String) = (yyvsp[-1].String); ;}
2425 #line 386 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2426 { (yyval.String) = new std::string(); ;}
2430 #line 387 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2432 (yyvsp[-1].String)->insert(0, ", ");
2433 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2434 delete (yyvsp[0].String);
2435 (yyval.String) = (yyvsp[-1].String);
2440 #line 395 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2442 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2443 delete (yyvsp[0].String);
2444 (yyval.String) = (yyvsp[-1].String);
2449 #line 401 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2450 { (yyval.String) = new std::string(); ;}
2454 #line 405 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2455 { (yyval.String) = new std::string(); ;}
2459 #line 406 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2461 (yyvsp[-1].String)->insert(0, ", ");
2462 if (!(yyvsp[0].String)->empty())
2463 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2464 delete (yyvsp[0].String);
2465 (yyval.String) = (yyvsp[-1].String);
2470 #line 416 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2472 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2473 delete (yyvsp[0].String);
2474 (yyval.String) = (yyvsp[-1].String);
2479 #line 438 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2481 (yyval.Type).newTy = (yyvsp[0].String);
2482 (yyval.Type).oldTy = OpaqueTy;
2487 #line 442 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2489 (yyval.Type).newTy = (yyvsp[0].String);
2490 (yyval.Type).oldTy = UnresolvedTy;
2495 #line 446 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2497 (yyval.Type) = (yyvsp[0].Type);
2502 #line 449 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2503 { // Type UpReference
2504 (yyvsp[0].String)->insert(0, "\\");
2505 (yyval.Type).newTy = (yyvsp[0].String);
2506 (yyval.Type).oldTy = NumericTy;
2511 #line 454 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2512 { // Function derived type?
2513 *(yyvsp[-3].Type).newTy += "( " + *(yyvsp[-1].String) + " )";
2514 delete (yyvsp[-1].String);
2515 (yyval.Type).newTy = (yyvsp[-3].Type).newTy;
2516 (yyval.Type).oldTy = FunctionTy;
2521 #line 460 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2522 { // Sized array type?
2523 (yyvsp[-3].String)->insert(0,"[ ");
2524 *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " ]";
2525 delete (yyvsp[-1].Type).newTy;
2526 (yyval.Type).newTy = (yyvsp[-3].String);
2527 (yyval.Type).oldTy = ArrayTy;
2528 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2533 #line 468 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2534 { // Packed array type?
2535 (yyvsp[-3].String)->insert(0,"< ");
2536 *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " >";
2537 delete (yyvsp[-1].Type).newTy;
2538 (yyval.Type).newTy = (yyvsp[-3].String);
2539 (yyval.Type).oldTy = PackedTy;
2540 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2545 #line 476 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2546 { // Structure type?
2547 (yyvsp[-1].String)->insert(0, "{ ");
2548 *(yyvsp[-1].String) += " }";
2549 (yyval.Type).newTy = (yyvsp[-1].String);
2550 (yyval.Type).oldTy = StructTy;
2555 #line 482 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2556 { // Empty structure type?
2557 (yyval.Type).newTy = new std::string("{}");
2558 (yyval.Type).oldTy = StructTy;
2563 #line 486 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2565 *(yyvsp[-1].Type).newTy += '*';
2566 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2567 (yyvsp[-1].Type).oldTy = PointerTy;
2568 (yyval.Type) = (yyvsp[-1].Type);
2573 #line 497 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2575 (yyval.String) = (yyvsp[0].Type).newTy;
2580 #line 500 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2582 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Type).newTy;
2583 delete (yyvsp[0].Type).newTy;
2584 (yyval.String) = (yyvsp[-2].String);
2589 #line 509 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2591 *(yyvsp[-2].String) += ", ...";
2592 delete (yyvsp[0].String);
2593 (yyval.String) = (yyvsp[-2].String);
2598 #line 514 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2600 (yyval.String) = (yyvsp[0].String);
2605 #line 517 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2607 (yyval.String) = new std::string();
2612 #line 527 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2613 { // Nonempty unsized arr
2614 (yyval.Const).type = (yyvsp[-3].Type);
2615 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2616 *(yyval.Const).cnst += " [ " + *(yyvsp[-1].String) + " ]";
2617 delete (yyvsp[-1].String);
2622 #line 533 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2624 (yyval.Const).type = (yyvsp[-2].Type);
2625 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2626 *(yyval.Const).cnst += "[ ]";
2631 #line 538 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2633 (yyval.Const).type = (yyvsp[-2].Type);
2634 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2635 *(yyval.Const).cnst += " c" + *(yyvsp[0].String);
2636 delete (yyvsp[0].String);
2641 #line 544 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2642 { // Nonempty unsized arr
2643 (yyval.Const).type = (yyvsp[-3].Type);
2644 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2645 *(yyval.Const).cnst += " < " + *(yyvsp[-1].String) + " >";
2646 delete (yyvsp[-1].String);
2651 #line 550 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2653 (yyval.Const).type = (yyvsp[-3].Type);
2654 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2655 *(yyval.Const).cnst += " { " + *(yyvsp[-1].String) + " }";
2656 delete (yyvsp[-1].String);
2661 #line 556 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2663 (yyval.Const).type = (yyvsp[-2].Type);
2664 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2665 *(yyval.Const).cnst += " {}";
2670 #line 561 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2672 (yyval.Const).type = (yyvsp[-1].Type);
2673 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2674 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2675 delete (yyvsp[0].String);
2680 #line 567 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2682 (yyval.Const).type = (yyvsp[-1].Type);
2683 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2684 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2685 delete (yyvsp[0].String);
2690 #line 573 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2692 (yyval.Const).type = (yyvsp[-1].Type);
2693 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2694 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2695 delete (yyvsp[0].String);
2700 #line 579 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2702 (yyval.Const).type = (yyvsp[-1].Type);
2703 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2704 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2705 delete (yyvsp[0].String);
2710 #line 585 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2712 (yyval.Const).type = (yyvsp[-1].Type);
2713 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2714 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2715 delete (yyvsp[0].String);
2720 #line 591 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2721 { // integral constants
2722 (yyval.Const).type = (yyvsp[-1].Type);
2723 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2724 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2725 delete (yyvsp[0].String);
2730 #line 597 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2731 { // integral constants
2732 (yyval.Const).type = (yyvsp[-1].Type);
2733 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2734 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2735 delete (yyvsp[0].String);
2740 #line 603 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2741 { // Boolean constants
2742 (yyval.Const).type = (yyvsp[-1].Type);
2743 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2744 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2745 delete (yyvsp[0].String);
2750 #line 609 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2751 { // Boolean constants
2752 (yyval.Const).type = (yyvsp[-1].Type);
2753 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2754 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2755 delete (yyvsp[0].String);
2760 #line 615 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2761 { // Float & Double constants
2762 (yyval.Const).type = (yyvsp[-1].Type);
2763 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2764 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2765 delete (yyvsp[0].String);
2770 #line 623 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2772 std::string source = *(yyvsp[-3].Const).cnst;
2773 TypeInfo DstTy = (yyvsp[-1].Type);
2775 if (*(yyvsp[-5].String) == "cast") {
2776 // Call getCastUpgrade to upgrade the old cast
2777 (yyval.String) = new std::string(getCastUpgrade(source, (yyvsp[-3].Const).type, (yyvsp[-1].Type), true));
2779 // Nothing to upgrade, just create the cast constant expr
2780 (yyval.String) = new std::string(*(yyvsp[-5].String));
2781 *(yyval.String) += "( " + source + " to " + *(yyvsp[-1].Type).newTy + ")";
2783 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
2788 #line 637 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2790 *(yyvsp[-4].String) += "(" + *(yyvsp[-2].Const).cnst;
2791 for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
2792 ValueInfo& VI = (*(yyvsp[-1].ValList))[i];
2793 *(yyvsp[-4].String) += ", " + *VI.val;
2796 *(yyvsp[-4].String) += ")";
2797 (yyval.String) = (yyvsp[-4].String);
2798 (yyvsp[-2].Const).destroy();
2799 delete (yyvsp[-1].ValList);
2804 #line 649 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2806 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2807 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2808 (yyval.String) = (yyvsp[-7].String);
2813 #line 654 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2815 const char* op = getDivRemOpcode(*(yyvsp[-5].String), (yyvsp[-3].Const).type);
2816 (yyval.String) = new std::string(op);
2817 *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2818 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2823 #line 660 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2825 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2826 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2827 (yyval.String) = (yyvsp[-5].String);
2832 #line 665 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2834 #if UPGRADE_SETCOND_OPS
2835 *(yyvsp[-5].String) = getCompareOp(*(yyvsp[-5].String), (yyvsp[-3].Const).type);
2837 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2838 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2839 (yyval.String) = (yyvsp[-5].String);
2844 #line 673 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2846 *(yyvsp[-6].String) += "(" + *(yyvsp[-5].String) + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2847 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2848 (yyval.String) = (yyvsp[-6].String);
2853 #line 678 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2855 const char* shiftop = (yyvsp[-5].String)->c_str();
2856 if (*(yyvsp[-5].String) == "shr")
2857 shiftop = ((yyvsp[-3].Const).type.isUnsigned()) ? "lshr" : "ashr";
2858 (yyval.String) = new std::string(shiftop);
2859 *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2860 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2865 #line 686 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2867 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2868 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2869 (yyval.String) = (yyvsp[-5].String);
2874 #line 691 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2876 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2877 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2878 (yyval.String) = (yyvsp[-7].String);
2883 #line 696 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2885 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2886 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2887 (yyval.String) = (yyvsp[-7].String);
2892 #line 706 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2894 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Const).cnst;
2895 (yyvsp[0].Const).destroy();
2896 (yyval.String) = (yyvsp[-2].String);
2901 #line 711 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2902 { (yyval.String) = new std::string(*(yyvsp[0].Const).cnst); (yyvsp[0].Const).destroy(); ;}
2906 #line 726 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2912 #line 731 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2919 #line 734 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2921 *O << *(yyvsp[0].String) << "\n";
2922 delete (yyvsp[0].String);
2928 #line 739 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2930 *O << "module asm " << " " << *(yyvsp[0].String) << "\n";
2936 #line 743 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2938 *O << "implementation\n";
2944 #line 747 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2945 { (yyval.String) = 0; ;}
2949 #line 749 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2950 { (yyval.String) = (yyvsp[0].String); *(yyval.String) = "external"; ;}
2954 #line 752 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2956 EnumeratedTypes.push_back((yyvsp[0].Type));
2957 if (!(yyvsp[-2].String)->empty()) {
2958 NamedTypes[*(yyvsp[-2].String)].newTy = new std::string(*(yyvsp[0].Type).newTy);
2959 NamedTypes[*(yyvsp[-2].String)].oldTy = (yyvsp[0].Type).oldTy;
2960 NamedTypes[*(yyvsp[-2].String)].elemTy = (yyvsp[0].Type).elemTy;
2961 *O << *(yyvsp[-2].String) << " = ";
2963 *O << "type " << *(yyvsp[0].Type).newTy << "\n";
2964 delete (yyvsp[-2].String); delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
2970 #line 764 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2971 { // Function prototypes can be in const pool
2972 *O << *(yyvsp[0].String) << "\n";
2973 delete (yyvsp[0].String);
2979 #line 769 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2980 { // Asm blocks can be in the const pool
2981 *O << *(yyvsp[-2].String) << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
2982 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
2988 #line 774 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2990 if (!(yyvsp[-4].String)->empty())
2991 *O << *(yyvsp[-4].String) << " = ";
2992 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Const).cnst << " " << *(yyvsp[0].String) << "\n";
2993 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Const).destroy(); delete (yyvsp[0].String);
2999 #line 781 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3001 if (!(yyvsp[-4].String)->empty())
3002 *O << *(yyvsp[-4].String) << " = ";
3003 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3004 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3010 #line 788 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3012 if (!(yyvsp[-4].String)->empty())
3013 *O << *(yyvsp[-4].String) << " = ";
3014 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3015 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3021 #line 795 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3023 if (!(yyvsp[-4].String)->empty())
3024 *O << *(yyvsp[-4].String) << " = ";
3025 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3026 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3032 #line 802 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3034 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
3035 delete (yyvsp[-1].String); delete (yyvsp[0].String);
3041 #line 807 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3043 *O << *(yyvsp[-2].String) << " = " << *(yyvsp[0].String) << "\n";
3044 delete (yyvsp[-2].String); delete (yyvsp[0].String);
3050 #line 812 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3057 #line 822 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3059 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3060 delete (yyvsp[0].String);
3061 (yyval.String) = (yyvsp[-2].String);
3066 #line 827 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3068 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3069 if (*(yyvsp[0].String) == "64")
3071 delete (yyvsp[0].String);
3072 (yyval.String) = (yyvsp[-2].String);
3077 #line 834 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3079 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3080 delete (yyvsp[0].String);
3081 (yyval.String) = (yyvsp[-2].String);
3086 #line 839 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3088 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3089 delete (yyvsp[0].String);
3090 (yyval.String) = (yyvsp[-2].String);
3095 #line 846 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3097 (yyvsp[-1].String)->insert(0, "[ ");
3098 *(yyvsp[-1].String) += " ]";
3099 (yyval.String) = (yyvsp[-1].String);
3104 #line 853 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3106 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
3107 delete (yyvsp[0].String);
3108 (yyval.String) = (yyvsp[-2].String);
3113 #line 859 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3115 (yyval.String) = new std::string();
3120 #line 868 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3121 { (yyval.String) = new std::string(); ;}
3125 #line 870 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3127 (yyval.String) = (yyvsp[-1].Type).newTy;
3128 if (!(yyvsp[0].String)->empty())
3129 *(yyval.String) += " " + *(yyvsp[0].String);
3130 delete (yyvsp[0].String);
3135 #line 877 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3137 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
3138 delete (yyvsp[0].String);
3143 #line 881 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3145 (yyval.String) = (yyvsp[0].String);
3150 #line 885 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3152 (yyval.String) = (yyvsp[0].String);
3157 #line 888 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3159 *(yyvsp[-2].String) += ", ...";
3160 (yyval.String) = (yyvsp[-2].String);
3161 delete (yyvsp[0].String);
3166 #line 893 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3168 (yyval.String) = (yyvsp[0].String);
3173 #line 896 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3174 { (yyval.String) = new std::string(); ;}
3178 #line 899 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3180 if (!(yyvsp[-7].String)->empty()) {
3181 *(yyvsp[-7].String) += " ";
3183 *(yyvsp[-7].String) += *(yyvsp[-6].Type).newTy + " " + *(yyvsp[-5].String) + "(" + *(yyvsp[-3].String) + ")";
3184 if (!(yyvsp[-1].String)->empty()) {
3185 *(yyvsp[-7].String) += " " + *(yyvsp[-1].String);
3187 if (!(yyvsp[0].String)->empty()) {
3188 *(yyvsp[-7].String) += " " + *(yyvsp[0].String);
3190 (yyvsp[-6].Type).destroy();
3191 delete (yyvsp[-5].String);
3192 delete (yyvsp[-3].String);
3193 delete (yyvsp[-1].String);
3194 delete (yyvsp[0].String);
3195 (yyval.String) = (yyvsp[-7].String);
3200 #line 918 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3201 { (yyval.String) = new std::string("{"); delete (yyvsp[0].String); ;}
3205 #line 919 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3206 { (yyval.String) = new std::string ("{"); ;}
3210 #line 921 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3212 if (!(yyvsp[-2].String)->empty()) {
3213 *O << *(yyvsp[-2].String) << " ";
3215 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
3216 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3222 #line 930 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3223 { (yyval.String) = new std::string("}"); delete (yyvsp[0].String); ;}
3227 #line 931 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3228 { (yyval.String) = new std::string("}"); ;}
3232 #line 933 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3234 if ((yyvsp[-1].String))
3235 *O << *(yyvsp[-1].String);
3236 *O << '\n' << *(yyvsp[0].String) << "\n";
3242 #line 941 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3243 { (yyval.String) = new std::string(); ;}
3247 #line 947 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3249 if (!(yyvsp[-1].String)->empty())
3250 *(yyvsp[-2].String) += " " + *(yyvsp[-1].String);
3251 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3252 delete (yyvsp[-1].String);
3253 delete (yyvsp[0].String);
3254 (yyval.String) = (yyvsp[-2].String);
3259 #line 960 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3260 { (yyval.String) = new std::string(); ;}
3264 #line 966 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3266 (yyvsp[-1].String)->insert(0, "<");
3267 *(yyvsp[-1].String) += ">";
3268 (yyval.String) = (yyvsp[-1].String);
3273 #line 972 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3275 if (!(yyvsp[-3].String)->empty()) {
3276 *(yyvsp[-4].String) += " " + *(yyvsp[-3].String);
3278 *(yyvsp[-4].String) += " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
3279 delete (yyvsp[-3].String); delete (yyvsp[-2].String); delete (yyvsp[0].String);
3280 (yyval.String) = (yyvsp[-4].String);
3285 #line 985 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3287 (yyval.Value).val = (yyvsp[0].String);
3288 (yyval.Value).constant = false;
3289 (yyval.Value).type.newTy = 0;
3290 (yyval.Value).type.oldTy = UnresolvedTy;
3295 #line 991 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3297 (yyval.Value).val = (yyvsp[0].String);
3298 (yyval.Value).constant = true;
3299 (yyval.Value).type.newTy = 0;
3300 (yyval.Value).type.oldTy = UnresolvedTy;
3305 #line 1002 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3307 (yyval.Value) = (yyvsp[0].Value);
3308 (yyval.Value).type = (yyvsp[-1].Type);
3309 (yyval.Value).val->insert(0, *(yyvsp[-1].Type).newTy + " ");
3314 #line 1008 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3321 #line 1011 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3322 { // Do not allow functions with 0 basic blocks
3328 #line 1019 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3335 #line 1023 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3337 *O << " " << *(yyvsp[0].String) << "\n";
3338 delete (yyvsp[0].String);
3344 #line 1028 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3351 #line 1031 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3353 *O << *(yyvsp[0].String) << "\n";
3354 delete (yyvsp[0].String);
3360 #line 1037 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3361 { (yyval.String) = (yyvsp[0].String); *(yyval.String) = "unwind"; ;}
3365 #line 1039 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3366 { // Return with a result...
3367 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Value).val << "\n";
3368 delete (yyvsp[-1].String); (yyvsp[0].Value).destroy();
3374 #line 1044 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3375 { // Return with no result...
3376 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Type).newTy << "\n";
3377 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3383 #line 1049 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3384 { // Unconditional Branch...
3385 *O << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].Value).val << "\n";
3386 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3392 #line 1054 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3394 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", "
3395 << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << ", " << *(yyvsp[-1].Type).newTy << " "
3396 << *(yyvsp[0].Value).val << "\n";
3397 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); (yyvsp[-6].Value).destroy(); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy();
3398 (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3404 #line 1062 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3406 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", "
3407 << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << " [" << *(yyvsp[-1].String) << " ]\n";
3408 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); (yyvsp[-6].Value).destroy(); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy();
3409 delete (yyvsp[-1].String);
3415 #line 1069 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3417 *O << " " << *(yyvsp[-7].String) << " " << *(yyvsp[-6].Type).newTy << " " << *(yyvsp[-5].Value).val << ", "
3418 << *(yyvsp[-3].Type).newTy << " " << *(yyvsp[-2].Value).val << "[]\n";
3419 delete (yyvsp[-7].String); (yyvsp[-6].Type).destroy(); (yyvsp[-5].Value).destroy(); (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy();
3425 #line 1076 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3428 if (!(yyvsp[-13].String)->empty())
3429 *O << *(yyvsp[-13].String) << " = ";
3430 *O << *(yyvsp[-12].String) << " " << *(yyvsp[-11].String) << " " << *(yyvsp[-10].Type).newTy << " " << *(yyvsp[-9].Value).val << " (";
3431 for (unsigned i = 0; i < (yyvsp[-7].ValList)->size(); ++i) {
3432 ValueInfo& VI = (*(yyvsp[-7].ValList))[i];
3434 if (i+1 < (yyvsp[-7].ValList)->size())
3438 *O << ") " << *(yyvsp[-5].String) << " " << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << " "
3439 << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].Value).val << "\n";
3440 delete (yyvsp[-13].String); delete (yyvsp[-12].String); delete (yyvsp[-11].String); (yyvsp[-10].Type).destroy(); (yyvsp[-9].Value).destroy(); delete (yyvsp[-7].ValList);
3441 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
3442 (yyvsp[0].Value).destroy();
3448 #line 1095 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3450 *O << " " << *(yyvsp[0].String) << "\n";
3451 delete (yyvsp[0].String);
3457 #line 1100 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3459 *O << " " << *(yyvsp[0].String) << "\n";
3460 delete (yyvsp[0].String);
3466 #line 1106 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3468 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].String) + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3469 (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3470 (yyval.String) = (yyvsp[-5].String);
3475 #line 1111 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3477 (yyvsp[-3].String)->insert(0, *(yyvsp[-4].Type).newTy + " " );
3478 *(yyvsp[-3].String) += ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3479 (yyvsp[-4].Type).destroy(); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3480 (yyval.String) = (yyvsp[-3].String);
3485 #line 1119 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3487 if (!(yyvsp[-1].String)->empty())
3488 *(yyvsp[-1].String) += " = ";
3489 *(yyvsp[-1].String) += *(yyvsp[0].String);
3490 delete (yyvsp[0].String);
3491 (yyval.String) = (yyvsp[-1].String);
3496 #line 1128 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3497 { // Used for PHI nodes
3498 (yyvsp[-3].Value).val->insert(0, *(yyvsp[-5].Type).newTy + "[");
3499 *(yyvsp[-3].Value).val += "," + *(yyvsp[-1].Value).val + "]";
3500 (yyvsp[-5].Type).destroy(); (yyvsp[-1].Value).destroy();
3501 (yyval.String) = new std::string(*(yyvsp[-3].Value).val);
3502 (yyvsp[-3].Value).destroy();
3507 #line 1135 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3509 *(yyvsp[-6].String) += ", [" + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + "]";
3510 (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
3511 (yyval.String) = (yyvsp[-6].String);
3516 #line 1143 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3518 (yyval.ValList) = new ValueList();
3519 (yyval.ValList)->push_back((yyvsp[0].Value));
3524 #line 1147 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3526 (yyvsp[-2].ValList)->push_back((yyvsp[0].Value));
3527 (yyval.ValList) = (yyvsp[-2].ValList);
3532 #line 1154 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3533 { (yyval.ValList) = (yyvsp[0].ValList); ;}
3537 #line 1155 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3538 { (yyval.ValList) = new ValueList(); ;}
3542 #line 1159 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3544 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3545 delete (yyvsp[0].String);
3546 (yyval.String) = (yyvsp[-1].String);
3551 #line 1167 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3553 const char* op = getDivRemOpcode(*(yyvsp[-4].String), (yyvsp[-3].Type));
3554 (yyval.String) = new std::string(op);
3555 *(yyval.String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3556 delete (yyvsp[-4].String); (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3561 #line 1173 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3563 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3564 (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3565 (yyval.String) = (yyvsp[-4].String);
3570 #line 1178 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3572 #if UPGRADE_SETCOND_OPS
3573 *(yyvsp[-4].String) = getCompareOp(*(yyvsp[-4].String), (yyvsp[-3].Type));
3575 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3576 (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3577 (yyval.String) = (yyvsp[-4].String);
3582 #line 1186 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3584 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String) + " " + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + ")";
3585 delete (yyvsp[-5].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
3586 (yyval.String) = (yyvsp[-6].String);
3591 #line 1191 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3593 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3594 (yyvsp[0].Value).destroy();
3595 (yyval.String) = (yyvsp[-1].String);
3600 #line 1196 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3602 const char* shiftop = (yyvsp[-3].String)->c_str();
3603 if (*(yyvsp[-3].String) == "shr")
3604 shiftop = ((yyvsp[-2].Value).type.isUnsigned()) ? "lshr" : "ashr";
3605 (yyval.String) = new std::string(shiftop);
3606 *(yyval.String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3607 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3612 #line 1204 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3614 std::string source = *(yyvsp[-2].Value).val;
3615 TypeInfo SrcTy = (yyvsp[-2].Value).type;
3616 TypeInfo DstTy = (yyvsp[0].Type);
3618 (yyval.String) = new std::string();
3619 if (*(yyvsp[-3].String) == "cast") {
3620 *(yyval.String) += getCastUpgrade(source, SrcTy, DstTy, false);
3622 *(yyval.String) += *(yyvsp[-3].String) + " " + source + " to " + *DstTy.newTy;
3624 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy();
3625 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3630 #line 1218 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3632 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3633 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3634 (yyval.String) = (yyvsp[-5].String);
3639 #line 1223 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3641 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Type).newTy;
3642 (yyvsp[-2].Value).destroy(); (yyvsp[0].Type).destroy();
3643 (yyval.String) = (yyvsp[-3].String);
3648 #line 1228 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3650 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3651 (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3652 (yyval.String) = (yyvsp[-3].String);
3657 #line 1233 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3659 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3660 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3661 (yyval.String) = (yyvsp[-5].String);
3666 #line 1238 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3668 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3669 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3670 (yyval.String) = (yyvsp[-5].String);
3675 #line 1243 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3677 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3678 delete (yyvsp[0].String);
3679 (yyval.String) = (yyvsp[-1].String);
3684 #line 1248 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3686 if (!(yyvsp[-5].String)->empty())
3687 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String);
3688 if (!(yyvsp[-6].String)->empty())
3689 *(yyvsp[-6].String) += " ";
3690 *(yyvsp[-6].String) += *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].Value).val + "(";
3691 for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
3692 ValueInfo& VI = (*(yyvsp[-1].ValList))[i];
3693 *(yyvsp[-6].String) += *VI.val;
3694 if (i+1 < (yyvsp[-1].ValList)->size())
3695 *(yyvsp[-6].String) += ", ";
3698 *(yyvsp[-6].String) += ")";
3699 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); delete (yyvsp[-1].ValList);
3700 (yyval.String) = (yyvsp[-6].String);
3705 #line 1270 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3706 { (yyval.ValList) = (yyvsp[0].ValList); ;}
3710 #line 1271 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3711 { (yyval.ValList) = new ValueList(); ;}
3715 #line 1276 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3716 { (yyval.String) = new std::string(); ;}
3720 #line 1279 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3722 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3723 if (!(yyvsp[0].String)->empty())
3724 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3725 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3726 (yyval.String) = (yyvsp[-2].String);
3731 #line 1286 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3733 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3734 if (!(yyvsp[0].String)->empty())
3735 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3736 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].String);
3737 (yyval.String) = (yyvsp[-5].String);
3742 #line 1293 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3744 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3745 if (!(yyvsp[0].String)->empty())
3746 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3747 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3748 (yyval.String) = (yyvsp[-2].String);
3753 #line 1300 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3755 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3756 if (!(yyvsp[0].String)->empty())
3757 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3758 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].String);
3759 (yyval.String) = (yyvsp[-5].String);
3764 #line 1307 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3766 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3767 (yyvsp[0].Value).destroy();
3768 (yyval.String) = (yyvsp[-1].String);
3773 #line 1312 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3775 if (!(yyvsp[-3].String)->empty())
3776 *(yyvsp[-3].String) += " ";
3777 *(yyvsp[-3].String) += *(yyvsp[-2].String) + " " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3778 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3779 (yyval.String) = (yyvsp[-3].String);
3784 #line 1319 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3786 if (!(yyvsp[-5].String)->empty())
3787 *(yyvsp[-5].String) += " ";
3788 *(yyvsp[-5].String) += *(yyvsp[-4].String) + " " + *(yyvsp[-3].Value).val + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3789 delete (yyvsp[-4].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3790 (yyval.String) = (yyvsp[-5].String);
3795 #line 1326 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3797 // Upgrade the indices
3798 for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) {
3799 ValueInfo& VI = (*(yyvsp[0].ValList))[i];
3800 if (VI.type.isUnsigned() && !VI.isConstant() &&
3801 VI.type.getBitWidth() < 64) {
3802 std::string* old = VI.val;
3803 *O << " %gep_upgrade" << unique << " = zext " << *old
3805 VI.val = new std::string("ulong %gep_upgrade" + llvm::utostr(unique++));
3806 VI.type.oldTy = ULongTy;
3810 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3811 for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) {
3812 ValueInfo& VI = (*(yyvsp[0].ValList))[i];
3813 *(yyvsp[-3].String) += ", " + *VI.val;
3816 (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].ValList);
3817 (yyval.String) = (yyvsp[-3].String);
3825 /* Line 1126 of yacc.c. */
3826 #line 3827 "UpgradeParser.tab.c"
3832 YY_STACK_PRINT (yyss, yyssp);
3837 /* Now `shift' the result of the reduction. Determine what state
3838 that goes to, based on the state we popped back to and the rule
3839 number reduced by. */
3843 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3844 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3845 yystate = yytable[yystate];
3847 yystate = yydefgoto[yyn - YYNTOKENS];
3852 /*------------------------------------.
3853 | yyerrlab -- here on detecting error |
3854 `------------------------------------*/
3856 /* If not already recovering from an error, report this error. */
3861 yyn = yypact[yystate];
3863 if (YYPACT_NINF < yyn && yyn < YYLAST)
3865 int yytype = YYTRANSLATE (yychar);
3866 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3867 YYSIZE_T yysize = yysize0;
3869 int yysize_overflow = 0;
3871 # define YYERROR_VERBOSE_ARGS_MAXIMUM 5
3872 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3876 /* This is so xgettext sees the translatable formats that are
3877 constructed on the fly. */
3878 YY_("syntax error, unexpected %s");
3879 YY_("syntax error, unexpected %s, expecting %s");
3880 YY_("syntax error, unexpected %s, expecting %s or %s");
3881 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3882 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3886 static char const yyunexpected[] = "syntax error, unexpected %s";
3887 static char const yyexpecting[] = ", expecting %s";
3888 static char const yyor[] = " or %s";
3889 char yyformat[sizeof yyunexpected
3890 + sizeof yyexpecting - 1
3891 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3892 * (sizeof yyor - 1))];
3893 char const *yyprefix = yyexpecting;
3895 /* Start YYX at -YYN if negative to avoid negative indexes in
3897 int yyxbegin = yyn < 0 ? -yyn : 0;
3899 /* Stay within bounds of both yycheck and yytname. */
3900 int yychecklim = YYLAST - yyn;
3901 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3904 yyarg[0] = yytname[yytype];
3905 yyfmt = yystpcpy (yyformat, yyunexpected);
3907 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3908 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3910 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3914 yyformat[sizeof yyunexpected - 1] = '\0';
3917 yyarg[yycount++] = yytname[yyx];
3918 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3919 yysize_overflow |= yysize1 < yysize;
3921 yyfmt = yystpcpy (yyfmt, yyprefix);
3925 yyf = YY_(yyformat);
3926 yysize1 = yysize + yystrlen (yyf);
3927 yysize_overflow |= yysize1 < yysize;
3930 if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
3931 yymsg = (char *) YYSTACK_ALLOC (yysize);
3934 /* Avoid sprintf, as that infringes on the user's name space.
3935 Don't have undefined behavior even if the translation
3936 produced a string with the wrong number of "%s"s. */
3939 while ((*yyp = *yyf))
3941 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3943 yyp += yytnamerr (yyp, yyarg[yyi++]);
3953 YYSTACK_FREE (yymsg);
3957 yyerror (YY_("syntax error"));
3958 goto yyexhaustedlab;
3962 #endif /* YYERROR_VERBOSE */
3963 yyerror (YY_("syntax error"));
3968 if (yyerrstatus == 3)
3970 /* If just tried and failed to reuse look-ahead token after an
3971 error, discard it. */
3973 if (yychar <= YYEOF)
3975 /* Return failure if at end of input. */
3976 if (yychar == YYEOF)
3981 yydestruct ("Error: discarding", yytoken, &yylval);
3986 /* Else will try to reuse look-ahead token after shifting the error
3991 /*---------------------------------------------------.
3992 | yyerrorlab -- error raised explicitly by YYERROR. |
3993 `---------------------------------------------------*/
3996 /* Pacify compilers like GCC when the user code never invokes
3997 YYERROR and the label yyerrorlab therefore never appears in user
4008 /*-------------------------------------------------------------.
4009 | yyerrlab1 -- common code for both syntax error and YYERROR. |
4010 `-------------------------------------------------------------*/
4012 yyerrstatus = 3; /* Each real token shifted decrements this. */
4016 yyn = yypact[yystate];
4017 if (yyn != YYPACT_NINF)
4020 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4028 /* Pop the current state because it cannot handle the error token. */
4033 yydestruct ("Error: popping", yystos[yystate], yyvsp);
4036 YY_STACK_PRINT (yyss, yyssp);
4045 /* Shift the error token. */
4046 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
4052 /*-------------------------------------.
4053 | yyacceptlab -- YYACCEPT comes here. |
4054 `-------------------------------------*/
4059 /*-----------------------------------.
4060 | yyabortlab -- YYABORT comes here. |
4061 `-----------------------------------*/
4067 /*-------------------------------------------------.
4068 | yyexhaustedlab -- memory exhaustion comes here. |
4069 `-------------------------------------------------*/
4071 yyerror (YY_("memory exhausted"));
4077 if (yychar != YYEOF && yychar != YYEMPTY)
4078 yydestruct ("Cleanup: discarding lookahead",
4080 while (yyssp != yyss)
4082 yydestruct ("Cleanup: popping",
4083 yystos[*yyssp], yyvsp);
4088 YYSTACK_FREE (yyss);
4094 #line 1350 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
4097 int yyerror(const char *ErrorMsg) {
4099 = std::string((CurFilename == "-") ? std::string("<stdin>") : CurFilename)
4100 + ":" + llvm::utostr((unsigned) Upgradelineno) + ": ";
4101 std::string errMsg = std::string(ErrorMsg) + "\n" + where + " while reading ";
4102 if (yychar == YYEMPTY || yychar == 0)
4103 errMsg += "end-of-file.";
4105 errMsg += "token: '" + std::string(Upgradetext, Upgradeleng) + "'";
4106 std::cerr << errMsg << '\n';