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,
177 EXTRACTELEMENT = 368,
210 #define ESINT64VAL 272
211 #define EUINT64VAL 273
217 #define ZEROINITIALIZER 279
223 #define STRINGCONSTANT 285
224 #define IMPLEMENTATION 286
233 #define DOTDOTDOT 295
238 #define DLLIMPORT 300
239 #define DLLEXPORT 301
240 #define EXTERN_WEAK 302
241 #define APPENDING 303
247 #define POINTERSIZE 309
251 #define UNINITIALIZED 313
257 #define SIDEEFFECT 319
260 #define CSRETCC_TOK 322
261 #define FASTCC_TOK 323
262 #define COLDCC_TOK 324
263 #define X86_STDCALLCC_TOK 325
264 #define X86_FASTCALLCC_TOK 326
265 #define DATALAYOUT 327
272 #define UNREACHABLE 334
298 #define GETELEMENTPTR 360
306 #define EXTRACTELEMENT 368
307 #define INSERTELEMENT 369
308 #define SHUFFLEVECTOR 370
326 /* Copy the first part of user declarations. */
327 #line 14 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
329 #include "ParserInternals.h"
330 #include <llvm/ADT/StringExtras.h>
336 #define YYERROR_VERBOSE 1
337 #define YYINCLUDED_STDLIB_H
340 int yylex(); // declaration" of xxx warnings.
344 static std::string CurFilename;
345 static std::ostream *O = 0;
346 std::istream* LexInput = 0;
347 unsigned SizeOfPointer = 32;
348 static uint64_t unique = 1;
350 typedef std::vector<TypeInfo> TypeVector;
351 static TypeVector EnumeratedTypes;
352 typedef std::map<std::string,TypeInfo> TypeMap;
353 static TypeMap NamedTypes;
355 void destroy(ValueList* VL) {
356 while (!VL->empty()) {
357 ValueInfo& VI = VL->back();
364 void UpgradeAssembly(const std::string &infile, std::istream& in,
365 std::ostream &out, bool debug)
368 CurFilename = infile;
374 std::cerr << "Parse failed.\n";
379 static void ResolveType(TypeInfo& Ty) {
380 if (Ty.oldTy == UnresolvedTy) {
381 TypeMap::iterator I = NamedTypes.find(*Ty.newTy);
382 if (I != NamedTypes.end()) {
383 Ty.oldTy = I->second.oldTy;
384 Ty.elemTy = I->second.elemTy;
386 std::string msg("Can't resolve type: ");
388 yyerror(msg.c_str());
390 } else if (Ty.oldTy == NumericTy) {
391 unsigned ref = atoi(&((Ty.newTy->c_str())[1])); // Skip the '\\'
392 if (ref < EnumeratedTypes.size()) {
393 Ty.oldTy = EnumeratedTypes[ref].oldTy;
394 Ty.elemTy = EnumeratedTypes[ref].elemTy;
396 std::string msg("Can't resolve type: ");
398 yyerror(msg.c_str());
401 // otherwise its already resolved.
404 static const char* getCastOpcode(
405 std::string& Source, const TypeInfo& SrcTy, const TypeInfo& DstTy)
407 unsigned SrcBits = SrcTy.getBitWidth();
408 unsigned DstBits = DstTy.getBitWidth();
409 const char* opcode = "bitcast";
410 // Run through the possibilities ...
411 if (DstTy.isIntegral()) { // Casting to integral
412 if (SrcTy.isIntegral()) { // Casting from integral
413 if (DstBits < SrcBits)
415 else if (DstBits > SrcBits) { // its an extension
416 if (SrcTy.isSigned())
417 opcode ="sext"; // signed -> SEXT
419 opcode = "zext"; // unsigned -> ZEXT
421 opcode = "bitcast"; // Same size, No-op cast
423 } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt
424 if (DstTy.isSigned())
425 opcode = "fptosi"; // FP -> sint
427 opcode = "fptoui"; // FP -> uint
428 } else if (SrcTy.isPacked()) {
429 assert(DstBits == SrcTy.getBitWidth() &&
430 "Casting packed to integer of different width");
431 opcode = "bitcast"; // same size, no-op cast
433 assert(SrcTy.isPointer() &&
434 "Casting from a value that is not first-class type");
435 opcode = "ptrtoint"; // ptr -> int
437 } else if (DstTy.isFloatingPoint()) { // Casting to floating pt
438 if (SrcTy.isIntegral()) { // Casting from integral
439 if (SrcTy.isSigned())
440 opcode = "sitofp"; // sint -> FP
442 opcode = "uitofp"; // uint -> FP
443 } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt
444 if (DstBits < SrcBits) {
445 opcode = "fptrunc"; // FP -> smaller FP
446 } else if (DstBits > SrcBits) {
447 opcode = "fpext"; // FP -> larger FP
449 opcode ="bitcast"; // same size, no-op cast
451 } else if (SrcTy.isPacked()) {
452 assert(DstBits == SrcTy.getBitWidth() &&
453 "Casting packed to floating point of different width");
454 opcode = "bitcast"; // same size, no-op cast
456 assert(0 && "Casting pointer or non-first class to float");
458 } else if (DstTy.isPacked()) {
459 if (SrcTy.isPacked()) {
460 assert(DstTy.getBitWidth() == SrcTy.getBitWidth() &&
461 "Casting packed to packed of different widths");
462 opcode = "bitcast"; // packed -> packed
463 } else if (DstTy.getBitWidth() == SrcBits) {
464 opcode = "bitcast"; // float/int -> packed
466 assert(!"Illegal cast to packed (wrong type or size)");
468 } else if (DstTy.isPointer()) {
469 if (SrcTy.isPointer()) {
470 opcode = "bitcast"; // ptr -> ptr
471 } else if (SrcTy.isIntegral()) {
472 opcode = "inttoptr"; // int -> ptr
474 assert(!"Casting invalid type to pointer");
477 assert(!"Casting to type that is not first-class");
482 static std::string getCastUpgrade(
483 const std::string& Src, TypeInfo& SrcTy, TypeInfo& DstTy, bool isConst)
486 std::string Source = Src;
487 if (SrcTy.isFloatingPoint() && DstTy.isPointer()) {
488 // fp -> ptr cast is no longer supported but we must upgrade this
489 // by doing a double cast: fp -> int -> ptr
491 Source = "ulong fptoui(" + Source + " to ulong)";
493 *O << " %cast_upgrade" << unique << " = fptoui " << Source
495 Source = "ulong %cast_upgrade" + llvm::utostr(unique);
497 // Update the SrcTy for the getCastOpcode call below
499 SrcTy.newTy = new std::string("ulong");
500 SrcTy.oldTy = ULongTy;
501 } else if (DstTy.oldTy == BoolTy) {
502 // cast ptr %x to bool was previously defined as setne ptr %x, null
503 // The ptrtoint semantic is to truncate, not compare so we must retain
504 // the original intent by replace the cast with a setne
505 const char* comparator = SrcTy.isPointer() ? ", null" :
506 (SrcTy.isFloatingPoint() ? ", 0.0" : ", 0");
508 Result = "setne (" + Source + comparator + ")";
510 Result = "setne " + Source + comparator;
511 return Result; // skip cast processing below
515 std::string Opcode(getCastOpcode(Source, SrcTy, DstTy));
517 Result += Opcode + "( " + Source + " to " + *DstTy.newTy + ")";
519 Result += Opcode + " " + Source + " to " + *DstTy.newTy;
523 const char* getDivRemOpcode(const std::string& opcode, const TypeInfo& TI) {
524 const char* op = opcode.c_str();
528 Ty.oldTy = Ty.getElementType();
530 if (Ty.isFloatingPoint())
532 else if (Ty.isUnsigned())
534 else if (Ty.isSigned())
537 yyerror("Invalid type for div instruction");
538 else if (opcode == "rem")
539 if (Ty.isFloatingPoint())
541 else if (Ty.isUnsigned())
543 else if (Ty.isSigned())
546 yyerror("Invalid type for rem instruction");
551 /* Enabling traces. */
556 /* Enabling verbose error messages. */
557 #ifdef YYERROR_VERBOSE
558 # undef YYERROR_VERBOSE
559 # define YYERROR_VERBOSE 1
561 # define YYERROR_VERBOSE 0
564 /* Enabling the token table. */
565 #ifndef YYTOKEN_TABLE
566 # define YYTOKEN_TABLE 0
569 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
570 #line 239 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
571 typedef union YYSTYPE {
578 /* Line 196 of yacc.c. */
579 #line 580 "UpgradeParser.tab.c"
580 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
581 # define YYSTYPE_IS_DECLARED 1
582 # define YYSTYPE_IS_TRIVIAL 1
587 /* Copy the second part of user declarations. */
590 /* Line 219 of yacc.c. */
591 #line 592 "UpgradeParser.tab.c"
593 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
594 # define YYSIZE_T __SIZE_TYPE__
596 #if ! defined (YYSIZE_T) && defined (size_t)
597 # define YYSIZE_T size_t
599 #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
600 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
601 # define YYSIZE_T size_t
603 #if ! defined (YYSIZE_T)
604 # define YYSIZE_T unsigned int
610 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
611 # define YY_(msgid) dgettext ("bison-runtime", msgid)
615 # define YY_(msgid) msgid
619 #if ! defined (yyoverflow) || YYERROR_VERBOSE
621 /* The parser invokes alloca or malloc; define the necessary symbols. */
623 # ifdef YYSTACK_USE_ALLOCA
624 # if YYSTACK_USE_ALLOCA
626 # define YYSTACK_ALLOC __builtin_alloca
628 # define YYSTACK_ALLOC alloca
629 # if defined (__STDC__) || defined (__cplusplus)
630 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
631 # define YYINCLUDED_STDLIB_H
637 # ifdef YYSTACK_ALLOC
638 /* Pacify GCC's `empty if-body' warning. */
639 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
640 # ifndef YYSTACK_ALLOC_MAXIMUM
641 /* The OS might guarantee only one guard page at the bottom of the stack,
642 and a page size can be as small as 4096 bytes. So we cannot safely
643 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
644 to allow for a few compiler-allocated temporary stack slots. */
645 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
648 # define YYSTACK_ALLOC YYMALLOC
649 # define YYSTACK_FREE YYFREE
650 # ifndef YYSTACK_ALLOC_MAXIMUM
651 # define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
657 # define YYMALLOC malloc
658 # if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
659 && (defined (__STDC__) || defined (__cplusplus)))
660 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
665 # if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
666 && (defined (__STDC__) || defined (__cplusplus)))
667 void free (void *); /* INFRINGES ON USER NAME SPACE */
674 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
677 #if (! defined (yyoverflow) \
678 && (! defined (__cplusplus) \
679 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
681 /* A type that is properly aligned for any stack member. */
688 /* The size of the maximum gap between one aligned stack and the next. */
689 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
691 /* The size of an array large to enough to hold all stacks, each with
693 # define YYSTACK_BYTES(N) \
694 ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
695 + YYSTACK_GAP_MAXIMUM)
697 /* Copy COUNT objects from FROM to TO. The source and destination do
700 # if defined (__GNUC__) && 1 < __GNUC__
701 # define YYCOPY(To, From, Count) \
702 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
704 # define YYCOPY(To, From, Count) \
708 for (yyi = 0; yyi < (Count); yyi++) \
709 (To)[yyi] = (From)[yyi]; \
715 /* Relocate STACK from its old location to the new one. The
716 local variables YYSIZE and YYSTACKSIZE give the old and new number of
717 elements in the stack, and YYPTR gives the new location of the
718 stack. Advance YYPTR to a properly aligned location for the next
720 # define YYSTACK_RELOCATE(Stack) \
723 YYSIZE_T yynewbytes; \
724 YYCOPY (&yyptr->Stack, Stack, yysize); \
725 Stack = &yyptr->Stack; \
726 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
727 yyptr += yynewbytes / sizeof (*yyptr); \
733 #if defined (__STDC__) || defined (__cplusplus)
734 typedef signed char yysigned_char;
736 typedef short int yysigned_char;
739 /* YYFINAL -- State number of the termination state. */
741 /* YYLAST -- Last index in YYTABLE. */
744 /* YYNTOKENS -- Number of terminals. */
745 #define YYNTOKENS 143
746 /* YYNNTS -- Number of nonterminals. */
748 /* YYNRULES -- Number of rules. */
750 /* YYNRULES -- Number of states. */
751 #define YYNSTATES 528
753 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
755 #define YYMAXUTOK 383
757 #define YYTRANSLATE(YYX) \
758 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
760 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
761 static const unsigned char yytranslate[] =
763 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
764 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
765 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
766 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
767 132, 133, 141, 2, 130, 2, 2, 2, 2, 2,
768 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
769 137, 129, 138, 2, 2, 2, 2, 2, 2, 2,
770 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
771 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
772 2, 134, 131, 136, 2, 2, 2, 2, 2, 142,
773 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
774 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
775 135, 2, 2, 139, 2, 140, 2, 2, 2, 2,
776 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
777 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
778 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
779 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
780 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
781 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
782 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
783 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
784 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
785 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
786 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
787 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
788 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
789 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
790 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
791 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
792 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
793 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
794 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
795 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
796 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
797 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
798 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
799 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
800 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
805 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
807 static const unsigned short int yyprhs[] =
809 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
810 19, 21, 23, 25, 27, 29, 31, 33, 35, 37,
811 39, 41, 43, 45, 47, 49, 51, 53, 55, 57,
812 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
813 79, 81, 83, 85, 87, 89, 91, 93, 95, 97,
814 99, 101, 103, 105, 107, 109, 112, 113, 115, 117,
815 119, 121, 123, 125, 127, 128, 130, 132, 134, 136,
816 138, 140, 143, 144, 145, 148, 149, 153, 156, 157,
817 159, 160, 164, 166, 169, 171, 173, 175, 177, 179,
818 181, 183, 185, 187, 189, 191, 193, 195, 197, 199,
819 201, 203, 205, 207, 209, 212, 217, 223, 229, 233,
820 236, 239, 241, 245, 247, 251, 253, 254, 259, 263,
821 267, 272, 277, 281, 284, 287, 290, 293, 296, 299,
822 302, 305, 308, 311, 318, 324, 333, 340, 347, 354,
823 361, 368, 377, 386, 390, 392, 394, 396, 398, 401,
824 404, 409, 412, 414, 416, 418, 423, 426, 431, 438,
825 445, 452, 459, 463, 468, 469, 471, 473, 475, 479,
826 483, 487, 491, 495, 499, 501, 502, 504, 506, 508,
827 509, 512, 516, 518, 520, 524, 526, 527, 536, 538,
828 540, 544, 546, 548, 552, 553, 555, 557, 561, 562,
829 564, 566, 568, 570, 572, 574, 576, 578, 580, 584,
830 586, 592, 594, 596, 598, 600, 603, 606, 608, 611,
831 614, 615, 617, 619, 621, 624, 627, 631, 641, 651,
832 660, 675, 677, 679, 686, 692, 695, 702, 710, 712,
833 716, 718, 719, 722, 724, 730, 736, 742, 745, 750,
834 755, 762, 767, 772, 779, 786, 789, 797, 799, 802,
835 803, 805, 806, 810, 817, 821, 828, 831, 836, 843
838 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
839 static const short int yyrhs[] =
841 175, 0, -1, 19, -1, 20, -1, 17, -1, 18,
842 -1, 80, -1, 81, -1, 82, -1, 83, -1, 84,
843 -1, 85, -1, 86, -1, 87, -1, 88, -1, 89,
844 -1, 90, -1, 91, -1, 92, -1, 93, -1, 94,
845 -1, 95, -1, 96, -1, 97, -1, 98, -1, 99,
846 -1, 108, -1, 109, -1, 110, -1, 111, -1, 117,
847 -1, 118, -1, 119, -1, 120, -1, 121, -1, 122,
848 -1, 123, -1, 124, -1, 125, -1, 126, -1, 127,
849 -1, 128, -1, 116, -1, 11, -1, 9, -1, 7,
850 -1, 5, -1, 12, -1, 10, -1, 8, -1, 6,
851 -1, 151, -1, 152, -1, 13, -1, 14, -1, 184,
852 129, -1, -1, 42, -1, 43, -1, 44, -1, 48,
853 -1, 45, -1, 46, -1, 47, -1, -1, 66, -1,
854 67, -1, 68, -1, 69, -1, 70, -1, 71, -1,
855 65, 18, -1, -1, -1, 57, 18, -1, -1, 130,
856 57, 18, -1, 37, 30, -1, -1, 160, -1, -1,
857 130, 163, 162, -1, 160, -1, 57, 18, -1, 166,
858 -1, 3, -1, 168, -1, 3, -1, 168, -1, 4,
859 -1, 5, -1, 6, -1, 7, -1, 8, -1, 9,
860 -1, 10, -1, 11, -1, 12, -1, 13, -1, 14,
861 -1, 15, -1, 16, -1, 198, -1, 167, -1, 131,
862 18, -1, 165, 132, 170, 133, -1, 134, 18, 135,
863 168, 136, -1, 137, 18, 135, 168, 138, -1, 139,
864 169, 140, -1, 139, 140, -1, 168, 141, -1, 168,
865 -1, 169, 130, 168, -1, 169, -1, 169, 130, 40,
866 -1, 40, -1, -1, 166, 134, 173, 136, -1, 166,
867 134, 136, -1, 166, 142, 30, -1, 166, 137, 173,
868 138, -1, 166, 139, 173, 140, -1, 166, 139, 140,
869 -1, 166, 22, -1, 166, 23, -1, 166, 198, -1,
870 166, 172, -1, 166, 24, -1, 151, 145, -1, 152,
871 18, -1, 4, 25, -1, 4, 26, -1, 154, 21,
872 -1, 150, 132, 171, 39, 166, 133, -1, 105, 132,
873 171, 213, 133, -1, 107, 132, 171, 130, 171, 130,
874 171, 133, -1, 146, 132, 171, 130, 171, 133, -1,
875 147, 132, 171, 130, 171, 133, -1, 148, 132, 171,
876 130, 171, 133, -1, 149, 132, 171, 130, 171, 133,
877 -1, 113, 132, 171, 130, 171, 133, -1, 114, 132,
878 171, 130, 171, 130, 171, 133, -1, 115, 132, 171,
879 130, 171, 130, 171, 133, -1, 173, 130, 171, -1,
880 171, -1, 35, -1, 36, -1, 176, -1, 176, 193,
881 -1, 176, 195, -1, 176, 63, 62, 179, -1, 176,
882 31, -1, 178, -1, 50, -1, 58, -1, 178, 155,
883 27, 164, -1, 178, 195, -1, 178, 63, 62, 179,
884 -1, 178, 155, 156, 174, 171, 162, -1, 178, 155,
885 177, 174, 166, 162, -1, 178, 155, 45, 174, 166,
886 162, -1, 178, 155, 47, 174, 166, 162, -1, 178,
887 51, 181, -1, 178, 59, 129, 182, -1, -1, 30,
888 -1, 56, -1, 55, -1, 53, 129, 180, -1, 54,
889 129, 18, -1, 52, 129, 30, -1, 72, 129, 30,
890 -1, 134, 183, 136, -1, 183, 130, 30, -1, 30,
891 -1, -1, 28, -1, 30, -1, 184, -1, -1, 166,
892 185, -1, 187, 130, 186, -1, 186, -1, 187, -1,
893 187, 130, 40, -1, 40, -1, -1, 157, 164, 184,
894 132, 188, 133, 161, 158, -1, 32, -1, 139, -1,
895 156, 189, 190, -1, 33, -1, 140, -1, 191, 201,
896 192, -1, -1, 45, -1, 47, -1, 34, 194, 189,
897 -1, -1, 64, -1, 17, -1, 18, -1, 21, -1,
898 25, -1, 26, -1, 22, -1, 23, -1, 24, -1,
899 137, 173, 138, -1, 172, -1, 62, 196, 30, 130,
900 30, -1, 144, -1, 184, -1, 198, -1, 197, -1,
901 166, 199, -1, 201, 202, -1, 202, -1, 203, 205,
902 -1, 203, 207, -1, -1, 29, -1, 78, -1, 77,
903 -1, 73, 200, -1, 73, 3, -1, 74, 15, 199,
904 -1, 74, 4, 199, 130, 15, 199, 130, 15, 199,
905 -1, 75, 153, 199, 130, 15, 199, 134, 206, 136,
906 -1, 75, 153, 199, 130, 15, 199, 134, 136, -1,
907 155, 76, 157, 164, 199, 132, 210, 133, 39, 15,
908 199, 204, 15, 199, -1, 204, -1, 79, -1, 206,
909 153, 197, 130, 15, 199, -1, 153, 197, 130, 15,
910 199, -1, 155, 212, -1, 166, 134, 199, 130, 199,
911 136, -1, 208, 130, 134, 199, 130, 199, 136, -1,
912 200, -1, 209, 130, 200, -1, 209, -1, -1, 61,
913 60, -1, 60, -1, 146, 166, 199, 130, 199, -1,
914 147, 166, 199, 130, 199, -1, 148, 166, 199, 130,
915 199, -1, 49, 200, -1, 149, 200, 130, 200, -1,
916 150, 200, 39, 166, -1, 107, 200, 130, 200, 130,
917 200, -1, 112, 200, 130, 166, -1, 113, 200, 130,
918 200, -1, 114, 200, 130, 200, 130, 200, -1, 115,
919 200, 130, 200, 130, 200, -1, 106, 208, -1, 211,
920 157, 164, 199, 132, 210, 133, -1, 215, -1, 130,
921 209, -1, -1, 38, -1, -1, 100, 166, 159, -1,
922 100, 166, 130, 10, 199, 159, -1, 101, 166, 159,
923 -1, 101, 166, 130, 10, 199, 159, -1, 102, 200,
924 -1, 214, 103, 166, 199, -1, 214, 104, 200, 130,
925 166, 199, -1, 105, 166, 199, 213, -1
928 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
929 static const unsigned short int yyrline[] =
931 0, 299, 299, 299, 300, 300, 304, 304, 304, 304,
932 304, 304, 304, 305, 305, 305, 305, 306, 306, 306,
933 307, 307, 307, 307, 307, 307, 308, 308, 308, 308,
934 309, 309, 309, 309, 309, 309, 309, 310, 310, 310,
935 310, 310, 310, 315, 315, 315, 315, 316, 316, 316,
936 316, 317, 317, 318, 318, 321, 324, 329, 329, 329,
937 329, 329, 329, 330, 331, 334, 334, 334, 334, 334,
938 335, 336, 341, 346, 347, 350, 351, 359, 365, 366,
939 369, 370, 379, 380, 393, 393, 394, 394, 395, 399,
940 399, 399, 399, 399, 399, 399, 400, 400, 400, 400,
941 400, 402, 406, 410, 413, 418, 424, 432, 440, 446,
942 450, 461, 464, 472, 473, 478, 481, 491, 497, 502,
943 508, 514, 520, 525, 531, 537, 543, 549, 555, 561,
944 567, 573, 579, 587, 601, 613, 618, 624, 629, 634,
945 642, 647, 652, 662, 667, 672, 672, 682, 687, 690,
946 695, 699, 703, 705, 705, 708, 720, 725, 730, 737,
947 744, 751, 758, 763, 768, 773, 775, 775, 778, 783,
948 790, 795, 802, 809, 814, 815, 823, 823, 824, 824,
949 826, 833, 837, 841, 844, 849, 852, 854, 874, 875,
950 877, 886, 887, 889, 897, 898, 899, 903, 916, 917,
951 920, 920, 920, 920, 920, 920, 920, 921, 922, 927,
952 928, 937, 937, 941, 947, 958, 964, 967, 975, 979,
953 984, 987, 993, 993, 995, 1000, 1005, 1010, 1018, 1025,
954 1031, 1051, 1056, 1062, 1067, 1075, 1084, 1091, 1099, 1103,
955 1110, 1111, 1115, 1120, 1123, 1129, 1134, 1139, 1144, 1152,
956 1166, 1171, 1176, 1181, 1186, 1191, 1196, 1213, 1218, 1219,
957 1223, 1224, 1227, 1234, 1241, 1248, 1255, 1260, 1267, 1274
961 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
962 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
963 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
964 static const char *const yytname[] =
966 "$end", "error", "$undefined", "VOID", "BOOL", "SBYTE", "UBYTE",
967 "SHORT", "USHORT", "INT", "UINT", "LONG", "ULONG", "FLOAT", "DOUBLE",
968 "LABEL", "OPAQUE", "ESINT64VAL", "EUINT64VAL", "SINTVAL", "UINTVAL",
969 "FPVAL", "NULL_TOK", "UNDEF", "ZEROINITIALIZER", "TRUETOK", "FALSETOK",
970 "TYPE", "VAR_ID", "LABELSTR", "STRINGCONSTANT", "IMPLEMENTATION",
971 "BEGINTOK", "ENDTOK", "DECLARE", "GLOBAL", "CONSTANT", "SECTION",
972 "VOLATILE", "TO", "DOTDOTDOT", "CONST", "INTERNAL", "LINKONCE", "WEAK",
973 "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "APPENDING", "NOT", "EXTERNAL",
974 "TARGET", "TRIPLE", "ENDIAN", "POINTERSIZE", "LITTLE", "BIG", "ALIGN",
975 "UNINITIALIZED", "DEPLIBS", "CALL", "TAIL", "ASM_TOK", "MODULE",
976 "SIDEEFFECT", "CC_TOK", "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK",
977 "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT",
978 "RET", "BR", "SWITCH", "INVOKE", "EXCEPT", "UNWIND", "UNREACHABLE",
979 "ADD", "SUB", "MUL", "DIV", "UDIV", "SDIV", "FDIV", "REM", "UREM",
980 "SREM", "FREM", "AND", "OR", "XOR", "SETLE", "SETGE", "SETLT", "SETGT",
981 "SETEQ", "SETNE", "MALLOC", "ALLOCA", "FREE", "LOAD", "STORE",
982 "GETELEMENTPTR", "PHI_TOK", "SELECT", "SHL", "SHR", "ASHR", "LSHR",
983 "VAARG", "EXTRACTELEMENT", "INSERTELEMENT", "SHUFFLEVECTOR", "CAST",
984 "TRUNC", "ZEXT", "SEXT", "FPTRUNC", "FPEXT", "FPTOUI", "FPTOSI",
985 "UITOFP", "SITOFP", "PTRTOINT", "INTTOPTR", "BITCAST", "'='", "','",
986 "'\\\\'", "'('", "')'", "'['", "'x'", "']'", "'<'", "'>'", "'{'", "'}'",
987 "'*'", "'c'", "$accept", "IntVal", "EInt64Val", "ArithmeticOps",
988 "LogicalOps", "SetCondOps", "ShiftOps", "CastOps", "SIntType",
989 "UIntType", "IntType", "FPType", "OptAssign", "OptLinkage",
990 "OptCallingConv", "OptAlign", "OptCAlign", "SectionString", "OptSection",
991 "GlobalVarAttributes", "GlobalVarAttribute", "TypesV", "UpRTypesV",
992 "Types", "PrimType", "UpRTypes", "TypeListI", "ArgTypeListI", "ConstVal",
993 "ConstExpr", "ConstVector", "GlobalType", "Module", "DefinitionList",
994 "External", "ConstPool", "AsmBlock", "BigOrLittle", "TargetDefinition",
995 "LibrariesDefinition", "LibList", "Name", "OptName", "ArgVal",
996 "ArgListH", "ArgList", "FunctionHeaderH", "BEGIN", "FunctionHeader",
997 "END", "Function", "FnDeclareLinkage", "FunctionProto", "OptSideEffect",
998 "ConstValueRef", "SymbolicValueRef", "ValueRef", "ResolvedVal",
999 "BasicBlockList", "BasicBlock", "InstructionList", "Unwind",
1000 "BBTerminatorInst", "JumpTable", "Inst", "PHIList", "ValueRefList",
1001 "ValueRefListE", "OptTailCall", "InstVal", "IndexList", "OptVolatile",
1007 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1009 static const unsigned short int yytoknum[] =
1011 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1012 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1013 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1014 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1015 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1016 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1017 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1018 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1019 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1020 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1021 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1022 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1023 375, 376, 377, 378, 379, 380, 381, 382, 383, 61,
1024 44, 92, 40, 41, 91, 120, 93, 60, 62, 123,
1029 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1030 static const unsigned char yyr1[] =
1032 0, 143, 144, 144, 145, 145, 146, 146, 146, 146,
1033 146, 146, 146, 146, 146, 146, 146, 147, 147, 147,
1034 148, 148, 148, 148, 148, 148, 149, 149, 149, 149,
1035 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1036 150, 150, 150, 151, 151, 151, 151, 152, 152, 152,
1037 152, 153, 153, 154, 154, 155, 155, 156, 156, 156,
1038 156, 156, 156, 156, 156, 157, 157, 157, 157, 157,
1039 157, 157, 157, 158, 158, 159, 159, 160, 161, 161,
1040 162, 162, 163, 163, 164, 164, 165, 165, 166, 167,
1041 167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
1042 167, 168, 168, 168, 168, 168, 168, 168, 168, 168,
1043 168, 169, 169, 170, 170, 170, 170, 171, 171, 171,
1044 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
1045 171, 171, 171, 172, 172, 172, 172, 172, 172, 172,
1046 172, 172, 172, 173, 173, 174, 174, 175, 176, 176,
1047 176, 176, 176, 177, 177, 178, 178, 178, 178, 178,
1048 178, 178, 178, 178, 178, 179, 180, 180, 181, 181,
1049 181, 181, 182, 183, 183, 183, 184, 184, 185, 185,
1050 186, 187, 187, 188, 188, 188, 188, 189, 190, 190,
1051 191, 192, 192, 193, 194, 194, 194, 195, 196, 196,
1052 197, 197, 197, 197, 197, 197, 197, 197, 197, 197,
1053 197, 198, 198, 199, 199, 200, 201, 201, 202, 203,
1054 203, 203, 204, 204, 205, 205, 205, 205, 205, 205,
1055 205, 205, 205, 206, 206, 207, 208, 208, 209, 209,
1056 210, 210, 211, 211, 212, 212, 212, 212, 212, 212,
1057 212, 212, 212, 212, 212, 212, 212, 212, 213, 213,
1058 214, 214, 215, 215, 215, 215, 215, 215, 215, 215
1061 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1062 static const unsigned char yyr2[] =
1064 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1065 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1066 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1067 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1068 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1069 1, 1, 1, 1, 1, 2, 0, 1, 1, 1,
1070 1, 1, 1, 1, 0, 1, 1, 1, 1, 1,
1071 1, 2, 0, 0, 2, 0, 3, 2, 0, 1,
1072 0, 3, 1, 2, 1, 1, 1, 1, 1, 1,
1073 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1074 1, 1, 1, 1, 2, 4, 5, 5, 3, 2,
1075 2, 1, 3, 1, 3, 1, 0, 4, 3, 3,
1076 4, 4, 3, 2, 2, 2, 2, 2, 2, 2,
1077 2, 2, 2, 6, 5, 8, 6, 6, 6, 6,
1078 6, 8, 8, 3, 1, 1, 1, 1, 2, 2,
1079 4, 2, 1, 1, 1, 4, 2, 4, 6, 6,
1080 6, 6, 3, 4, 0, 1, 1, 1, 3, 3,
1081 3, 3, 3, 3, 1, 0, 1, 1, 1, 0,
1082 2, 3, 1, 1, 3, 1, 0, 8, 1, 1,
1083 3, 1, 1, 3, 0, 1, 1, 3, 0, 1,
1084 1, 1, 1, 1, 1, 1, 1, 1, 3, 1,
1085 5, 1, 1, 1, 1, 2, 2, 1, 2, 2,
1086 0, 1, 1, 1, 2, 2, 3, 9, 9, 8,
1087 14, 1, 1, 6, 5, 2, 6, 7, 1, 3,
1088 1, 0, 2, 1, 5, 5, 5, 2, 4, 4,
1089 6, 4, 4, 6, 6, 2, 7, 1, 2, 0,
1090 1, 0, 3, 6, 3, 6, 2, 4, 6, 4
1093 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1094 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1095 means the default is an error. */
1096 static const unsigned short int yydefact[] =
1098 164, 0, 64, 152, 1, 151, 194, 57, 58, 59,
1099 61, 62, 63, 60, 0, 72, 220, 148, 149, 176,
1100 177, 0, 0, 0, 64, 0, 156, 195, 196, 72,
1101 0, 0, 65, 66, 67, 68, 69, 70, 0, 0,
1102 221, 220, 217, 56, 0, 0, 0, 0, 162, 0,
1103 0, 0, 0, 0, 153, 154, 0, 0, 55, 197,
1104 165, 150, 71, 85, 89, 90, 91, 92, 93, 94,
1105 95, 96, 97, 98, 99, 100, 101, 2, 3, 0,
1106 0, 0, 0, 211, 0, 0, 84, 103, 88, 212,
1107 102, 188, 189, 190, 191, 192, 193, 216, 0, 0,
1108 0, 223, 222, 232, 261, 231, 218, 219, 0, 0,
1109 0, 0, 175, 163, 157, 155, 145, 146, 0, 0,
1110 0, 0, 104, 0, 0, 87, 109, 111, 0, 0,
1111 116, 110, 225, 0, 224, 0, 0, 46, 50, 45,
1112 49, 44, 48, 43, 47, 51, 52, 0, 260, 0,
1113 243, 0, 72, 6, 7, 8, 9, 10, 11, 12,
1114 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1115 23, 24, 25, 0, 0, 0, 0, 0, 0, 26,
1116 27, 28, 29, 0, 0, 0, 0, 42, 30, 31,
1117 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1118 0, 0, 0, 0, 0, 72, 235, 0, 257, 170,
1119 167, 166, 168, 169, 171, 174, 0, 80, 80, 89,
1120 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
1121 0, 0, 0, 0, 80, 80, 0, 0, 0, 108,
1122 186, 115, 113, 0, 200, 201, 202, 205, 206, 207,
1123 203, 204, 198, 0, 0, 0, 0, 0, 0, 0,
1124 0, 0, 0, 0, 209, 214, 213, 215, 0, 226,
1125 0, 247, 242, 0, 75, 75, 266, 0, 0, 255,
1126 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1127 0, 0, 0, 0, 172, 0, 160, 161, 130, 131,
1128 4, 5, 128, 129, 132, 123, 124, 127, 0, 0,
1129 0, 0, 126, 125, 158, 159, 86, 86, 112, 185,
1130 179, 182, 183, 0, 0, 105, 199, 0, 0, 0,
1131 0, 0, 0, 144, 0, 0, 0, 0, 0, 0,
1132 0, 0, 0, 0, 262, 0, 264, 259, 0, 0,
1133 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1134 0, 0, 0, 173, 0, 0, 82, 80, 118, 0,
1135 0, 122, 0, 119, 106, 107, 178, 180, 0, 78,
1136 114, 0, 259, 0, 0, 0, 0, 0, 208, 0,
1137 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1138 0, 269, 0, 0, 0, 251, 252, 0, 0, 0,
1139 0, 0, 248, 249, 0, 267, 0, 77, 83, 81,
1140 117, 120, 121, 184, 181, 79, 73, 0, 0, 0,
1141 0, 0, 0, 143, 0, 0, 0, 0, 0, 0,
1142 0, 241, 75, 76, 75, 238, 258, 0, 0, 0,
1143 0, 0, 244, 245, 246, 241, 0, 0, 187, 210,
1144 134, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1145 0, 0, 240, 0, 0, 263, 265, 0, 0, 0,
1146 250, 253, 254, 0, 268, 74, 0, 140, 0, 0,
1147 136, 137, 138, 139, 133, 0, 229, 0, 0, 0,
1148 239, 236, 0, 256, 0, 0, 0, 227, 0, 228,
1149 0, 0, 237, 135, 141, 142, 0, 0, 0, 0,
1150 0, 0, 234, 0, 0, 233, 0, 230
1153 /* YYDEFGOTO[NTERM-NUM]. */
1154 static const short int yydefgoto[] =
1156 -1, 83, 302, 259, 260, 261, 262, 263, 230, 231,
1157 147, 232, 24, 15, 38, 458, 344, 366, 426, 296,
1158 367, 84, 85, 233, 87, 88, 128, 243, 333, 264,
1159 334, 118, 1, 2, 57, 3, 61, 212, 48, 113,
1160 216, 89, 377, 321, 322, 323, 39, 93, 16, 96,
1161 17, 29, 18, 327, 265, 90, 267, 445, 41, 42,
1162 43, 105, 106, 498, 107, 279, 472, 473, 205, 206,
1166 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1168 #define YYPACT_NINF -477
1169 static const short int yypact[] =
1171 -477, 20, 54, 872, -477, -477, 86, -477, -477, -477,
1172 -477, -477, -477, -477, 24, 110, 65, -477, -477, -477,
1173 -477, 37, -105, 51, 3, -8, -477, -477, -477, 110,
1174 111, 126, -477, -477, -477, -477, -477, -477, 703, -23,
1175 -477, -18, -477, -1, 23, 43, 64, 74, -477, 70,
1176 111, 703, 71, 71, -477, -477, 71, 71, -477, -477,
1177 -477, -477, -477, 73, -477, -477, -477, -477, -477, -477,
1178 -477, -477, -477, -477, -477, -477, -477, -477, -477, 188,
1179 189, 190, 457, -477, 104, 77, -477, -477, -29, -477,
1180 -477, -477, -477, -477, -477, -477, -477, -477, 736, 80,
1181 118, -477, -477, -477, 1196, -477, -477, -477, 181, 87,
1182 192, 182, 183, -477, -477, -477, -477, -477, 764, 764,
1183 802, 764, -477, 81, 82, -477, -477, -29, -114, 83,
1184 513, -477, 73, 988, -477, 988, 988, -477, -477, -477,
1185 -477, -477, -477, -477, -477, -477, -477, 988, -477, 764,
1186 -477, 158, 110, -477, -477, -477, -477, -477, -477, -477,
1187 -477, -477, -477, -477, -477, -477, -477, -477, -477, -477,
1188 -477, -477, -477, 764, 764, 764, 764, 764, 764, -477,
1189 -477, -477, -477, 764, 764, 764, 764, -477, -477, -477,
1190 -477, -477, -477, -477, -477, -477, -477, -477, -477, -477,
1191 764, 764, 764, 764, 764, 110, -477, 57, -477, -477,
1192 -477, -477, -477, -477, -477, -477, -26, 89, 89, 160,
1193 170, 203, 172, 204, 174, 205, 178, 207, 206, 208,
1194 180, 210, 209, 862, 89, 89, 764, 764, 764, -477,
1195 552, -477, 96, 98, -477, -477, -477, -477, -477, -477,
1196 -477, -477, 173, 102, 106, 108, 112, 114, 802, 115,
1197 116, 117, 119, 127, -477, -477, -477, -477, 113, -477,
1198 125, -477, -477, 703, 130, 131, -477, 988, 128, 133,
1199 134, 135, 138, 140, 142, 988, 988, 988, 143, 197,
1200 703, 764, 764, 212, -477, -2, -477, -477, -477, -477,
1201 -477, -477, -477, -477, -477, -477, -477, -477, 598, 802,
1202 485, 244, -477, -477, -477, -477, 15, -82, -29, -477,
1203 104, -477, 147, 145, 626, -477, -477, 250, 802, 802,
1204 802, 802, 802, -477, -113, 802, 802, 802, 802, 802,
1205 273, 274, 988, 0, -477, 18, -477, 163, 988, 156,
1206 764, 764, 764, 764, 764, 165, 167, 168, 764, 764,
1207 988, 988, 169, -477, 271, 284, -477, 89, -477, -22,
1208 -51, -477, -48, -477, -477, -477, -477, -477, 665, 266,
1209 -477, 179, 163, 187, 211, 213, 215, 802, -477, 216,
1210 217, 218, 219, 272, 988, 988, 186, 988, 292, 988,
1211 764, -477, 220, 988, 222, -477, -477, 224, 225, 988,
1212 988, 988, -477, -477, 226, -477, 764, -477, -477, -477,
1213 -477, -477, -477, -477, -477, -477, 265, 305, 223, 802,
1214 802, 802, 802, -477, 802, 802, 802, 802, 764, 227,
1215 202, 764, 229, -477, 229, -477, 230, 988, 231, 764,
1216 764, 764, -477, -477, -477, 764, 988, 319, -477, -477,
1217 -477, 233, 232, 234, 236, 235, 237, 238, 240, 242,
1218 323, 31, 230, 246, 282, -477, -477, 764, 241, 988,
1219 -477, -477, -477, 247, -477, -477, 802, -477, 802, 802,
1220 -477, -477, -477, -477, -477, 988, -477, 1105, 58, 303,
1221 -477, -477, 245, -477, 251, 252, 253, -477, 239, -477,
1222 1105, 368, -477, -477, -477, -477, 372, 258, 988, 988,
1223 374, 123, -477, 988, 379, -477, 988, -477
1226 /* YYPGOTO[NTERM-NUM]. */
1227 static const short int yypgoto[] =
1229 -477, -477, -477, 293, 298, 300, 301, 302, -99, -97,
1230 -440, -477, 353, 383, -134, -477, -271, 29, -477, -212,
1231 -477, -49, -477, -38, -477, -68, 279, -477, -5, 177,
1232 -190, 97, -477, -477, -477, -477, 364, -477, -477, -477,
1233 -477, 9, -477, 40, -477, -477, 390, -477, -477, -477,
1234 -477, -477, 418, -477, -476, -128, -103, 101, -477, 381,
1235 -477, -93, -477, -477, -477, -477, 33, -21, -477, -477,
1239 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1240 positive, shift that token. If negative, reduce the rule which
1241 number is the opposite. If zero, do what YYDEFACT says.
1242 If YYTABLE_NINF, syntax error. */
1243 #define YYTABLE_NINF -148
1244 static const short int yytable[] =
1246 86, 145, 115, 146, 346, 266, 297, 266, 266, 91,
1247 397, 40, 25, 86, 127, 94, 238, 387, 273, 266,
1248 4, 508, 314, 315, 49, 388, 239, 19, 399, 20,
1249 51, 497, 268, 269, 517, 364, 137, 138, 139, 140,
1250 141, 142, 143, 144, 270, 7, 8, 9, 52, 11,
1251 53, 13, 25, 54, -147, 365, 375, 398, 510, 131,
1252 133, 55, 127, 137, 138, 139, 140, 141, 142, 143,
1253 144, 290, 98, 99, 100, 398, 101, 102, 103, 387,
1254 217, 218, 387, 235, 135, 5, 30, 421, 6, 44,
1255 45, 46, 422, 129, 40, 136, 7, 8, 9, 10,
1256 11, 12, 13, -86, 293, 313, 116, 117, 387, 47,
1257 294, 133, 131, 50, 420, 234, 92, 14, 369, 370,
1258 372, 58, 95, 137, 138, 139, 140, 141, 142, 143,
1259 144, 27, 19, 28, 20, 274, 275, 133, 277, 278,
1260 133, 60, 210, 211, 62, 133, 133, 133, 133, 266,
1261 119, 374, 108, 120, 121, 419, 131, 266, 266, 266,
1262 291, 292, 285, 286, 287, 133, 133, 496, 316, 317,
1263 318, 475, 109, 476, 347, 31, 32, 33, 34, 35,
1264 36, 37, 355, 356, 357, 298, 299, -46, -46, -45,
1265 -45, -44, -44, 110, 509, -43, -43, 300, 301, 134,
1266 101, 102, 320, 111, 112, -87, 122, 123, 124, 130,
1267 213, 209, 214, 215, 266, 240, 236, 237, 272, 295,
1268 266, -50, -49, -48, 342, -47, 324, -53, 303, -54,
1269 304, 325, 266, 266, 328, 86, 359, 326, 329, 396,
1270 330, 360, 363, 340, 331, 402, 332, 335, 336, 337,
1271 271, 338, 86, 361, 133, 341, 318, 414, 415, 339,
1272 343, 345, 348, 349, 350, 351, 266, 266, 352, 266,
1273 353, 266, 354, 358, 373, 266, 276, 378, 379, 280,
1274 381, 266, 266, 266, 281, 282, 283, 284, 394, 395,
1275 403, 439, 440, 400, 442, 409, 444, 410, 411, 416,
1276 448, 417, 418, 364, 288, 289, 452, 453, 454, 427,
1277 443, 438, 133, 405, 133, 133, 133, 429, 441, 266,
1278 133, 413, 457, 382, 383, 384, 385, 386, 266, 376,
1279 389, 390, 391, 392, 393, 459, 471, 485, 495, 398,
1280 320, 430, 511, 431, 478, 432, 434, 435, 436, 437,
1281 447, 266, 449, 484, 450, 451, 460, 470, 455, 474,
1282 477, 479, 133, 486, 488, 487, 489, 266, 490, 516,
1283 491, 492, 145, 493, 146, 494, 502, 501, 456, 499,
1284 503, 512, 433, 518, 513, 514, 515, 519, 520, 523,
1285 266, 266, 507, 362, 526, 266, 104, 200, 266, 145,
1286 469, 146, 201, 133, 202, 203, 204, 56, 425, 242,
1287 312, 133, 133, 133, 114, 521, 522, 133, 424, 59,
1288 525, 26, 97, 527, 461, 462, 463, 464, 524, 465,
1289 466, 467, 468, 446, 483, 428, 0, 0, 0, 133,
1290 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1291 0, 404, 0, 406, 407, 408, 0, 0, 0, 412,
1292 125, 64, 65, 66, 67, 68, 69, 70, 71, 72,
1293 73, 74, 75, 76, 0, 0, 77, 78, 0, 0,
1294 0, 504, 0, 505, 506, 19, 0, 20, 125, 219,
1295 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
1296 75, 76, 0, 0, 77, 78, 0, 0, 0, 0,
1297 0, 0, 0, 19, 0, 20, 125, 64, 65, 66,
1298 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
1299 0, 0, 77, 78, 0, 0, 0, 0, 0, 0,
1300 0, 19, 0, 20, 0, 0, 0, 0, 0, 0,
1301 480, 481, 482, 241, 0, 125, 64, 65, 66, 67,
1302 68, 69, 70, 71, 72, 73, 74, 75, 76, 0,
1303 0, 77, 78, 0, 0, 0, 0, 0, 500, 0,
1304 19, 0, 20, 0, 0, 0, 0, 0, 79, 0,
1305 0, 80, 319, 0, 81, 0, 82, 126, 0, 0,
1306 0, 125, 219, 220, 221, 222, 223, 224, 225, 226,
1307 227, 228, 229, 75, 76, 0, 79, 77, 78, 80,
1308 0, 0, 81, 0, 82, 371, 19, 0, 20, 125,
1309 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
1310 74, 75, 76, 0, 79, 77, 78, 80, 0, 0,
1311 81, 0, 82, 0, 19, 0, 20, 0, 0, 0,
1312 0, 0, 0, 0, 0, 0, 380, 0, 125, 64,
1313 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1314 75, 76, 0, 79, 77, 78, 80, 0, 0, 81,
1315 0, 82, 0, 19, 0, 20, 0, 0, 0, 0,
1316 0, 0, 0, 0, 0, 423, 63, 64, 65, 66,
1317 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
1318 0, 0, 77, 78, 0, 0, 0, 0, 0, 79,
1319 0, 19, 80, 20, 368, 81, 0, 82, 0, 132,
1320 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
1321 74, 75, 76, 0, 0, 77, 78, 79, 0, 0,
1322 80, 0, 0, 81, 19, 82, 20, 125, 64, 65,
1323 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
1324 76, 0, 0, 77, 78, 0, 0, 0, 0, 0,
1325 0, 0, 19, 0, 20, 0, 79, 0, 0, 80,
1326 0, 0, 81, 0, 82, 125, 219, 220, 221, 222,
1327 223, 224, 225, 226, 227, 228, 229, 75, 76, 0,
1328 0, 77, 78, 0, 0, 0, 0, 0, 0, 0,
1329 19, 0, 20, 0, 79, 0, 0, 80, 0, 0,
1330 81, 0, 82, 0, 0, 0, 0, 0, 0, 0,
1331 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1332 0, 0, 0, 0, 0, 0, 0, 79, 0, 0,
1333 80, 0, 0, 81, 0, 82, 0, 0, 0, 0,
1334 0, 77, 78, 0, 305, 306, 307, 0, 0, 0,
1335 19, 0, 20, 0, 0, 79, 0, 0, 80, -56,
1336 19, 81, 20, 82, 0, 0, 6, -56, -56, 0,
1337 0, 0, 0, 0, -56, -56, -56, -56, -56, -56,
1338 -56, 0, -56, 21, 0, 0, 0, 0, 0, 0,
1339 -56, 22, 0, 79, 0, 23, 80, 0, 0, 81,
1340 0, 82, 153, 154, 155, 156, 157, 158, 159, 160,
1341 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
1342 171, 172, 0, 0, 0, 0, 0, 253, 0, 254,
1343 179, 180, 181, 182, 0, 255, 256, 257, 187, 188,
1344 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
1345 199, 0, 0, 0, 0, 0, 308, 0, 0, 309,
1346 0, 310, 0, 0, 311, 244, 245, 77, 78, 246,
1347 247, 248, 249, 250, 251, 0, 19, 0, 20, 0,
1348 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1349 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1350 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1351 252, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1352 0, 0, 0, 0, 0, 0, 0, 0, 153, 154,
1353 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
1354 165, 166, 167, 168, 169, 170, 171, 172, 0, 0,
1355 0, 0, 0, 253, 0, 254, 179, 180, 181, 182,
1356 0, 255, 256, 257, 187, 188, 189, 190, 191, 192,
1357 193, 194, 195, 196, 197, 198, 199, 0, 0, 0,
1358 0, 0, 244, 245, 0, 258, 246, 247, 248, 249,
1359 250, 251, 0, 0, 0, 0, 0, 0, 0, 0,
1360 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1361 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1362 0, 0, 0, 0, 0, 0, 0, 252, 0, 0,
1363 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1364 0, 0, 0, 0, 0, 153, 154, 155, 156, 157,
1365 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
1366 168, 169, 170, 171, 172, 0, 0, 0, 0, 0,
1367 253, 0, 254, 179, 180, 181, 182, 0, 255, 256,
1368 257, 187, 188, 189, 190, 191, 192, 193, 194, 195,
1369 196, 197, 198, 199, 148, 0, 0, 0, 0, 0,
1370 0, 0, 258, 0, 0, 149, 0, 0, 0, 0,
1371 0, 0, 0, 0, 0, 0, 150, 151, 0, 0,
1372 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1373 0, 0, 152, 0, 0, 0, 153, 154, 155, 156,
1374 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
1375 167, 168, 169, 170, 171, 172, 173, 174, 175, 0,
1376 0, 176, 177, 178, 179, 180, 181, 182, 183, 184,
1377 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
1378 195, 196, 197, 198, 199
1381 static const short int yycheck[] =
1383 38, 100, 51, 100, 275, 133, 218, 135, 136, 32,
1384 10, 29, 3, 51, 82, 33, 130, 130, 152, 147,
1385 0, 497, 234, 235, 129, 138, 140, 28, 10, 30,
1386 27, 471, 135, 136, 510, 37, 5, 6, 7, 8,
1387 9, 10, 11, 12, 147, 42, 43, 44, 45, 46,
1388 47, 48, 43, 50, 0, 57, 138, 57, 498, 141,
1389 98, 58, 130, 5, 6, 7, 8, 9, 10, 11,
1390 12, 205, 73, 74, 75, 57, 77, 78, 79, 130,
1391 118, 119, 130, 121, 4, 31, 62, 138, 34, 52,
1392 53, 54, 140, 84, 29, 15, 42, 43, 44, 45,
1393 46, 47, 48, 132, 130, 233, 35, 36, 130, 72,
1394 136, 149, 141, 62, 136, 120, 139, 63, 308, 309,
1395 310, 129, 140, 5, 6, 7, 8, 9, 10, 11,
1396 12, 45, 28, 47, 30, 173, 174, 175, 176, 177,
1397 178, 30, 55, 56, 18, 183, 184, 185, 186, 277,
1398 53, 136, 129, 56, 57, 367, 141, 285, 286, 287,
1399 103, 104, 200, 201, 202, 203, 204, 136, 236, 237,
1400 238, 442, 129, 444, 277, 65, 66, 67, 68, 69,
1401 70, 71, 285, 286, 287, 25, 26, 17, 18, 17,
1402 18, 17, 18, 129, 136, 17, 18, 17, 18, 98,
1403 77, 78, 240, 129, 134, 132, 18, 18, 18, 132,
1404 18, 30, 30, 30, 342, 132, 135, 135, 60, 130,
1405 348, 18, 18, 18, 273, 18, 130, 21, 18, 21,
1406 21, 133, 360, 361, 132, 273, 39, 64, 132, 342,
1407 132, 290, 30, 130, 132, 348, 132, 132, 132, 132,
1408 149, 132, 290, 291, 292, 130, 324, 360, 361, 132,
1409 130, 130, 134, 130, 130, 130, 394, 395, 130, 397,
1410 130, 399, 130, 130, 30, 403, 175, 130, 133, 178,
1411 30, 409, 410, 411, 183, 184, 185, 186, 15, 15,
1412 134, 394, 395, 130, 397, 130, 399, 130, 130, 130,
1413 403, 30, 18, 37, 203, 204, 409, 410, 411, 130,
1414 18, 39, 350, 351, 352, 353, 354, 130, 132, 447,
1415 358, 359, 57, 328, 329, 330, 331, 332, 456, 320,
1416 335, 336, 337, 338, 339, 30, 134, 18, 15, 57,
1417 378, 130, 39, 130, 447, 130, 130, 130, 130, 130,
1418 130, 479, 130, 456, 130, 130, 133, 130, 132, 130,
1419 130, 130, 400, 130, 130, 133, 130, 495, 133, 130,
1420 133, 133, 471, 133, 471, 133, 479, 136, 416, 133,
1421 133, 136, 387, 15, 133, 133, 133, 15, 130, 15,
1422 518, 519, 495, 292, 15, 523, 43, 104, 526, 498,
1423 438, 498, 104, 441, 104, 104, 104, 24, 379, 130,
1424 233, 449, 450, 451, 50, 518, 519, 455, 378, 29,
1425 523, 3, 41, 526, 429, 430, 431, 432, 521, 434,
1426 435, 436, 437, 400, 455, 382, -1, -1, -1, 477,
1427 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1428 -1, 350, -1, 352, 353, 354, -1, -1, -1, 358,
1429 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1430 13, 14, 15, 16, -1, -1, 19, 20, -1, -1,
1431 -1, 486, -1, 488, 489, 28, -1, 30, 3, 4,
1432 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1433 15, 16, -1, -1, 19, 20, -1, -1, -1, -1,
1434 -1, -1, -1, 28, -1, 30, 3, 4, 5, 6,
1435 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1436 -1, -1, 19, 20, -1, -1, -1, -1, -1, -1,
1437 -1, 28, -1, 30, -1, -1, -1, -1, -1, -1,
1438 449, 450, 451, 40, -1, 3, 4, 5, 6, 7,
1439 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
1440 -1, 19, 20, -1, -1, -1, -1, -1, 477, -1,
1441 28, -1, 30, -1, -1, -1, -1, -1, 131, -1,
1442 -1, 134, 40, -1, 137, -1, 139, 140, -1, -1,
1443 -1, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1444 12, 13, 14, 15, 16, -1, 131, 19, 20, 134,
1445 -1, -1, 137, -1, 139, 140, 28, -1, 30, 3,
1446 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1447 14, 15, 16, -1, 131, 19, 20, 134, -1, -1,
1448 137, -1, 139, -1, 28, -1, 30, -1, -1, -1,
1449 -1, -1, -1, -1, -1, -1, 40, -1, 3, 4,
1450 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1451 15, 16, -1, 131, 19, 20, 134, -1, -1, 137,
1452 -1, 139, -1, 28, -1, 30, -1, -1, -1, -1,
1453 -1, -1, -1, -1, -1, 40, 3, 4, 5, 6,
1454 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1455 -1, -1, 19, 20, -1, -1, -1, -1, -1, 131,
1456 -1, 28, 134, 30, 136, 137, -1, 139, -1, 3,
1457 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1458 14, 15, 16, -1, -1, 19, 20, 131, -1, -1,
1459 134, -1, -1, 137, 28, 139, 30, 3, 4, 5,
1460 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1461 16, -1, -1, 19, 20, -1, -1, -1, -1, -1,
1462 -1, -1, 28, -1, 30, -1, 131, -1, -1, 134,
1463 -1, -1, 137, -1, 139, 3, 4, 5, 6, 7,
1464 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
1465 -1, 19, 20, -1, -1, -1, -1, -1, -1, -1,
1466 28, -1, 30, -1, 131, -1, -1, 134, -1, -1,
1467 137, -1, 139, -1, -1, -1, -1, -1, -1, -1,
1468 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1469 -1, -1, -1, -1, -1, -1, -1, 131, -1, -1,
1470 134, -1, -1, 137, -1, 139, -1, -1, -1, -1,
1471 -1, 19, 20, -1, 22, 23, 24, -1, -1, -1,
1472 28, -1, 30, -1, -1, 131, -1, -1, 134, 27,
1473 28, 137, 30, 139, -1, -1, 34, 35, 36, -1,
1474 -1, -1, -1, -1, 42, 43, 44, 45, 46, 47,
1475 48, -1, 50, 51, -1, -1, -1, -1, -1, -1,
1476 58, 59, -1, 131, -1, 63, 134, -1, -1, 137,
1477 -1, 139, 80, 81, 82, 83, 84, 85, 86, 87,
1478 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
1479 98, 99, -1, -1, -1, -1, -1, 105, -1, 107,
1480 108, 109, 110, 111, -1, 113, 114, 115, 116, 117,
1481 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1482 128, -1, -1, -1, -1, -1, 134, -1, -1, 137,
1483 -1, 139, -1, -1, 142, 17, 18, 19, 20, 21,
1484 22, 23, 24, 25, 26, -1, 28, -1, 30, -1,
1485 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1486 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1487 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1488 62, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1489 -1, -1, -1, -1, -1, -1, -1, -1, 80, 81,
1490 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
1491 92, 93, 94, 95, 96, 97, 98, 99, -1, -1,
1492 -1, -1, -1, 105, -1, 107, 108, 109, 110, 111,
1493 -1, 113, 114, 115, 116, 117, 118, 119, 120, 121,
1494 122, 123, 124, 125, 126, 127, 128, -1, -1, -1,
1495 -1, -1, 17, 18, -1, 137, 21, 22, 23, 24,
1496 25, 26, -1, -1, -1, -1, -1, -1, -1, -1,
1497 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1498 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1499 -1, -1, -1, -1, -1, -1, -1, 62, -1, -1,
1500 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1501 -1, -1, -1, -1, -1, 80, 81, 82, 83, 84,
1502 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1503 95, 96, 97, 98, 99, -1, -1, -1, -1, -1,
1504 105, -1, 107, 108, 109, 110, 111, -1, 113, 114,
1505 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
1506 125, 126, 127, 128, 38, -1, -1, -1, -1, -1,
1507 -1, -1, 137, -1, -1, 49, -1, -1, -1, -1,
1508 -1, -1, -1, -1, -1, -1, 60, 61, -1, -1,
1509 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1510 -1, -1, 76, -1, -1, -1, 80, 81, 82, 83,
1511 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
1512 94, 95, 96, 97, 98, 99, 100, 101, 102, -1,
1513 -1, 105, 106, 107, 108, 109, 110, 111, 112, 113,
1514 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
1515 124, 125, 126, 127, 128
1518 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1519 symbol of state STATE-NUM. */
1520 static const unsigned char yystos[] =
1522 0, 175, 176, 178, 0, 31, 34, 42, 43, 44,
1523 45, 46, 47, 48, 63, 156, 191, 193, 195, 28,
1524 30, 51, 59, 63, 155, 184, 195, 45, 47, 194,
1525 62, 65, 66, 67, 68, 69, 70, 71, 157, 189,
1526 29, 201, 202, 203, 52, 53, 54, 72, 181, 129,
1527 62, 27, 45, 47, 50, 58, 156, 177, 129, 189,
1528 30, 179, 18, 3, 4, 5, 6, 7, 8, 9,
1529 10, 11, 12, 13, 14, 15, 16, 19, 20, 131,
1530 134, 137, 139, 144, 164, 165, 166, 167, 168, 184,
1531 198, 32, 139, 190, 33, 140, 192, 202, 73, 74,
1532 75, 77, 78, 79, 155, 204, 205, 207, 129, 129,
1533 129, 129, 134, 182, 179, 164, 35, 36, 174, 174,
1534 174, 174, 18, 18, 18, 3, 140, 168, 169, 184,
1535 132, 141, 3, 166, 200, 4, 15, 5, 6, 7,
1536 8, 9, 10, 11, 12, 151, 152, 153, 38, 49,
1537 60, 61, 76, 80, 81, 82, 83, 84, 85, 86,
1538 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
1539 97, 98, 99, 100, 101, 102, 105, 106, 107, 108,
1540 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
1541 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
1542 146, 147, 148, 149, 150, 211, 212, 214, 215, 30,
1543 55, 56, 180, 18, 30, 30, 183, 166, 166, 4,
1544 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1545 151, 152, 154, 166, 171, 166, 135, 135, 130, 140,
1546 132, 40, 169, 170, 17, 18, 21, 22, 23, 24,
1547 25, 26, 62, 105, 107, 113, 114, 115, 137, 146,
1548 147, 148, 149, 150, 172, 197, 198, 199, 199, 199,
1549 199, 200, 60, 157, 166, 166, 200, 166, 166, 208,
1550 200, 200, 200, 200, 200, 166, 166, 166, 200, 200,
1551 157, 103, 104, 130, 136, 130, 162, 162, 25, 26,
1552 17, 18, 145, 18, 21, 22, 23, 24, 134, 137,
1553 139, 142, 172, 198, 162, 162, 168, 168, 168, 40,
1554 166, 186, 187, 188, 130, 133, 64, 196, 132, 132,
1555 132, 132, 132, 171, 173, 132, 132, 132, 132, 132,
1556 130, 130, 164, 130, 159, 130, 159, 199, 134, 130,
1557 130, 130, 130, 130, 130, 199, 199, 199, 130, 39,
1558 164, 166, 200, 30, 37, 57, 160, 163, 136, 173,
1559 173, 140, 173, 30, 136, 138, 184, 185, 130, 133,
1560 40, 30, 171, 171, 171, 171, 171, 130, 138, 171,
1561 171, 171, 171, 171, 15, 15, 199, 10, 57, 10,
1562 130, 213, 199, 134, 200, 166, 200, 200, 200, 130,
1563 130, 130, 200, 166, 199, 199, 130, 30, 18, 162,
1564 136, 138, 140, 40, 186, 160, 161, 130, 213, 130,
1565 130, 130, 130, 171, 130, 130, 130, 130, 39, 199,
1566 199, 132, 199, 18, 199, 200, 209, 130, 199, 130,
1567 130, 130, 199, 199, 199, 132, 166, 57, 158, 30,
1568 133, 171, 171, 171, 171, 171, 171, 171, 171, 166,
1569 130, 134, 209, 210, 130, 159, 159, 130, 199, 130,
1570 200, 200, 200, 210, 199, 18, 130, 133, 130, 130,
1571 133, 133, 133, 133, 133, 15, 136, 153, 206, 133,
1572 200, 136, 199, 133, 171, 171, 171, 199, 197, 136,
1573 153, 39, 136, 133, 133, 133, 130, 197, 15, 15,
1574 130, 199, 199, 15, 204, 199, 15, 199
1577 #define yyerrok (yyerrstatus = 0)
1578 #define yyclearin (yychar = YYEMPTY)
1579 #define YYEMPTY (-2)
1582 #define YYACCEPT goto yyacceptlab
1583 #define YYABORT goto yyabortlab
1584 #define YYERROR goto yyerrorlab
1587 /* Like YYERROR except do call yyerror. This remains here temporarily
1588 to ease the transition to the new meaning of YYERROR, for GCC.
1589 Once GCC version 2 has supplanted version 1, this can go. */
1591 #define YYFAIL goto yyerrlab
1593 #define YYRECOVERING() (!!yyerrstatus)
1595 #define YYBACKUP(Token, Value) \
1597 if (yychar == YYEMPTY && yylen == 1) \
1601 yytoken = YYTRANSLATE (yychar); \
1607 yyerror (YY_("syntax error: cannot back up")); \
1614 #define YYERRCODE 256
1617 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1618 If N is 0, then set CURRENT to the empty location which ends
1619 the previous symbol: RHS[0] (always defined). */
1621 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1622 #ifndef YYLLOC_DEFAULT
1623 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1627 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1628 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1629 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1630 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1634 (Current).first_line = (Current).last_line = \
1635 YYRHSLOC (Rhs, 0).last_line; \
1636 (Current).first_column = (Current).last_column = \
1637 YYRHSLOC (Rhs, 0).last_column; \
1643 /* YY_LOCATION_PRINT -- Print the location on the stream.
1644 This macro was not mandated originally: define only if we know
1645 we won't break user code: when these are the locations we know. */
1647 #ifndef YY_LOCATION_PRINT
1648 # if YYLTYPE_IS_TRIVIAL
1649 # define YY_LOCATION_PRINT(File, Loc) \
1650 fprintf (File, "%d.%d-%d.%d", \
1651 (Loc).first_line, (Loc).first_column, \
1652 (Loc).last_line, (Loc).last_column)
1654 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1659 /* YYLEX -- calling `yylex' with the right arguments. */
1662 # define YYLEX yylex (YYLEX_PARAM)
1664 # define YYLEX yylex ()
1667 /* Enable debugging if requested. */
1671 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1672 # define YYFPRINTF fprintf
1675 # define YYDPRINTF(Args) \
1681 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1685 YYFPRINTF (stderr, "%s ", Title); \
1686 yysymprint (stderr, \
1688 YYFPRINTF (stderr, "\n"); \
1692 /*------------------------------------------------------------------.
1693 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1695 `------------------------------------------------------------------*/
1697 #if defined (__STDC__) || defined (__cplusplus)
1699 yy_stack_print (short int *bottom, short int *top)
1702 yy_stack_print (bottom, top)
1707 YYFPRINTF (stderr, "Stack now");
1708 for (/* Nothing. */; bottom <= top; ++bottom)
1709 YYFPRINTF (stderr, " %d", *bottom);
1710 YYFPRINTF (stderr, "\n");
1713 # define YY_STACK_PRINT(Bottom, Top) \
1716 yy_stack_print ((Bottom), (Top)); \
1720 /*------------------------------------------------.
1721 | Report that the YYRULE is going to be reduced. |
1722 `------------------------------------------------*/
1724 #if defined (__STDC__) || defined (__cplusplus)
1726 yy_reduce_print (int yyrule)
1729 yy_reduce_print (yyrule)
1734 unsigned long int yylno = yyrline[yyrule];
1735 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
1737 /* Print the symbols being reduced, and their result. */
1738 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
1739 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1740 YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
1743 # define YY_REDUCE_PRINT(Rule) \
1746 yy_reduce_print (Rule); \
1749 /* Nonzero means print parse trace. It is left uninitialized so that
1750 multiple parsers can coexist. */
1752 #else /* !YYDEBUG */
1753 # define YYDPRINTF(Args)
1754 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1755 # define YY_STACK_PRINT(Bottom, Top)
1756 # define YY_REDUCE_PRINT(Rule)
1757 #endif /* !YYDEBUG */
1760 /* YYINITDEPTH -- initial size of the parser's stacks. */
1762 # define YYINITDEPTH 200
1765 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1766 if the built-in stack extension method is used).
1768 Do not make this value too large; the results are undefined if
1769 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1770 evaluated with infinite-precision integer arithmetic. */
1773 # define YYMAXDEPTH 10000
1781 # if defined (__GLIBC__) && defined (_STRING_H)
1782 # define yystrlen strlen
1784 /* Return the length of YYSTR. */
1786 # if defined (__STDC__) || defined (__cplusplus)
1787 yystrlen (const char *yystr)
1793 const char *yys = yystr;
1795 while (*yys++ != '\0')
1798 return yys - yystr - 1;
1804 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1805 # define yystpcpy stpcpy
1807 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1810 # if defined (__STDC__) || defined (__cplusplus)
1811 yystpcpy (char *yydest, const char *yysrc)
1813 yystpcpy (yydest, yysrc)
1819 const char *yys = yysrc;
1821 while ((*yyd++ = *yys++) != '\0')
1830 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1831 quotes and backslashes, so that it's suitable for yyerror. The
1832 heuristic is that double-quoting is unnecessary unless the string
1833 contains an apostrophe, a comma, or backslash (other than
1834 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1835 null, do not copy; instead, return the length of what the result
1838 yytnamerr (char *yyres, const char *yystr)
1843 char const *yyp = yystr;
1850 goto do_not_strip_quotes;
1854 goto do_not_strip_quotes;
1867 do_not_strip_quotes: ;
1871 return yystrlen (yystr);
1873 return yystpcpy (yyres, yystr) - yyres;
1877 #endif /* YYERROR_VERBOSE */
1882 /*--------------------------------.
1883 | Print this symbol on YYOUTPUT. |
1884 `--------------------------------*/
1886 #if defined (__STDC__) || defined (__cplusplus)
1888 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
1891 yysymprint (yyoutput, yytype, yyvaluep)
1897 /* Pacify ``unused variable'' warnings. */
1900 if (yytype < YYNTOKENS)
1901 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1903 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1907 if (yytype < YYNTOKENS)
1908 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1915 YYFPRINTF (yyoutput, ")");
1918 #endif /* ! YYDEBUG */
1919 /*-----------------------------------------------.
1920 | Release the memory associated to this symbol. |
1921 `-----------------------------------------------*/
1923 #if defined (__STDC__) || defined (__cplusplus)
1925 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1928 yydestruct (yymsg, yytype, yyvaluep)
1934 /* Pacify ``unused variable'' warnings. */
1939 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1950 /* Prevent warnings from -Wmissing-prototypes. */
1952 #ifdef YYPARSE_PARAM
1953 # if defined (__STDC__) || defined (__cplusplus)
1954 int yyparse (void *YYPARSE_PARAM);
1958 #else /* ! YYPARSE_PARAM */
1959 #if defined (__STDC__) || defined (__cplusplus)
1964 #endif /* ! YYPARSE_PARAM */
1968 /* The look-ahead symbol. */
1971 /* The semantic value of the look-ahead symbol. */
1974 /* Number of syntax errors so far. */
1983 #ifdef YYPARSE_PARAM
1984 # if defined (__STDC__) || defined (__cplusplus)
1985 int yyparse (void *YYPARSE_PARAM)
1987 int yyparse (YYPARSE_PARAM)
1988 void *YYPARSE_PARAM;
1990 #else /* ! YYPARSE_PARAM */
1991 #if defined (__STDC__) || defined (__cplusplus)
2005 /* Number of tokens to shift before error messages enabled. */
2007 /* Look-ahead token as an internal (translated) token number. */
2010 /* Three stacks and their tools:
2011 `yyss': related to states,
2012 `yyvs': related to semantic values,
2013 `yyls': related to locations.
2015 Refer to the stacks thru separate pointers, to allow yyoverflow
2016 to reallocate them elsewhere. */
2018 /* The state stack. */
2019 short int yyssa[YYINITDEPTH];
2020 short int *yyss = yyssa;
2023 /* The semantic value stack. */
2024 YYSTYPE yyvsa[YYINITDEPTH];
2025 YYSTYPE *yyvs = yyvsa;
2030 #define YYPOPSTACK (yyvsp--, yyssp--)
2032 YYSIZE_T yystacksize = YYINITDEPTH;
2034 /* The variables used to return semantic value and location from the
2039 /* When reducing, the number of symbols on the RHS of the reduced
2043 YYDPRINTF ((stderr, "Starting parse\n"));
2048 yychar = YYEMPTY; /* Cause a token to be read. */
2050 /* Initialize stack pointers.
2051 Waste one element of value and location stack
2052 so that they stay on the same level as the state stack.
2053 The wasted elements are never initialized. */
2060 /*------------------------------------------------------------.
2061 | yynewstate -- Push a new state, which is found in yystate. |
2062 `------------------------------------------------------------*/
2064 /* In all cases, when you get here, the value and location stacks
2065 have just been pushed. so pushing a state here evens the stacks.
2072 if (yyss + yystacksize - 1 <= yyssp)
2074 /* Get the current used size of the three stacks, in elements. */
2075 YYSIZE_T yysize = yyssp - yyss + 1;
2079 /* Give user a chance to reallocate the stack. Use copies of
2080 these so that the &'s don't force the real ones into
2082 YYSTYPE *yyvs1 = yyvs;
2083 short int *yyss1 = yyss;
2086 /* Each stack pointer address is followed by the size of the
2087 data in use in that stack, in bytes. This used to be a
2088 conditional around just the two extra args, but that might
2089 be undefined if yyoverflow is a macro. */
2090 yyoverflow (YY_("memory exhausted"),
2091 &yyss1, yysize * sizeof (*yyssp),
2092 &yyvs1, yysize * sizeof (*yyvsp),
2099 #else /* no yyoverflow */
2100 # ifndef YYSTACK_RELOCATE
2101 goto yyexhaustedlab;
2103 /* Extend the stack our own way. */
2104 if (YYMAXDEPTH <= yystacksize)
2105 goto yyexhaustedlab;
2107 if (YYMAXDEPTH < yystacksize)
2108 yystacksize = YYMAXDEPTH;
2111 short int *yyss1 = yyss;
2112 union yyalloc *yyptr =
2113 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2115 goto yyexhaustedlab;
2116 YYSTACK_RELOCATE (yyss);
2117 YYSTACK_RELOCATE (yyvs);
2119 # undef YYSTACK_RELOCATE
2121 YYSTACK_FREE (yyss1);
2124 #endif /* no yyoverflow */
2126 yyssp = yyss + yysize - 1;
2127 yyvsp = yyvs + yysize - 1;
2130 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2131 (unsigned long int) yystacksize));
2133 if (yyss + yystacksize - 1 <= yyssp)
2137 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2146 /* Do appropriate processing given the current state. */
2147 /* Read a look-ahead token if we need one and don't already have one. */
2150 /* First try to decide what to do without reference to look-ahead token. */
2152 yyn = yypact[yystate];
2153 if (yyn == YYPACT_NINF)
2156 /* Not known => get a look-ahead token if don't already have one. */
2158 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
2159 if (yychar == YYEMPTY)
2161 YYDPRINTF ((stderr, "Reading a token: "));
2165 if (yychar <= YYEOF)
2167 yychar = yytoken = YYEOF;
2168 YYDPRINTF ((stderr, "Now at end of input.\n"));
2172 yytoken = YYTRANSLATE (yychar);
2173 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2176 /* If the proper action on seeing token YYTOKEN is to reduce or to
2177 detect an error, take that action. */
2179 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2184 if (yyn == 0 || yyn == YYTABLE_NINF)
2193 /* Shift the look-ahead token. */
2194 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2196 /* Discard the token being shifted unless it is eof. */
2197 if (yychar != YYEOF)
2203 /* Count tokens shifted since error; after three, turn off error
2212 /*-----------------------------------------------------------.
2213 | yydefault -- do the default action for the current state. |
2214 `-----------------------------------------------------------*/
2216 yyn = yydefact[yystate];
2222 /*-----------------------------.
2223 | yyreduce -- Do a reduction. |
2224 `-----------------------------*/
2226 /* yyn is the number of a rule to reduce with. */
2229 /* If YYLEN is nonzero, implement the default value of the action:
2232 Otherwise, the following line sets YYVAL to garbage.
2233 This behavior is undocumented and Bison
2234 users should not rely upon it. Assigning to YYVAL
2235 unconditionally makes the parser a bit smaller, and it avoids a
2236 GCC warning that YYVAL may be used uninitialized. */
2237 yyval = yyvsp[1-yylen];
2240 YY_REDUCE_PRINT (yyn);
2244 #line 321 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2246 (yyval.String) = (yyvsp[-1].String);
2251 #line 324 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2253 (yyval.String) = new std::string("");
2258 #line 331 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2259 { (yyval.String) = new std::string(""); ;}
2263 #line 336 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2265 *(yyvsp[-1].String) += *(yyvsp[0].String);
2266 delete (yyvsp[0].String);
2267 (yyval.String) = (yyvsp[-1].String);
2272 #line 341 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2273 { (yyval.String) = new std::string(""); ;}
2277 #line 346 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2278 { (yyval.String) = new std::string(); ;}
2282 #line 347 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2283 { *(yyvsp[-1].String) += " " + *(yyvsp[0].String); delete (yyvsp[0].String); (yyval.String) = (yyvsp[-1].String); ;}
2287 #line 350 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2288 { (yyval.String) = new std::string(); ;}
2292 #line 351 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2294 (yyvsp[-1].String)->insert(0, ", ");
2295 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2296 delete (yyvsp[0].String);
2297 (yyval.String) = (yyvsp[-1].String);
2302 #line 359 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2304 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2305 delete (yyvsp[0].String);
2306 (yyval.String) = (yyvsp[-1].String);
2311 #line 365 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2312 { (yyval.String) = new std::string(); ;}
2316 #line 369 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2317 { (yyval.String) = new std::string(); ;}
2321 #line 370 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2323 (yyvsp[-1].String)->insert(0, ", ");
2324 if (!(yyvsp[0].String)->empty())
2325 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2326 delete (yyvsp[0].String);
2327 (yyval.String) = (yyvsp[-1].String);
2332 #line 380 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2334 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2335 delete (yyvsp[0].String);
2336 (yyval.String) = (yyvsp[-1].String);
2341 #line 402 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2343 (yyval.Type).newTy = (yyvsp[0].String);
2344 (yyval.Type).oldTy = OpaqueTy;
2349 #line 406 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2351 (yyval.Type).newTy = (yyvsp[0].String);
2352 (yyval.Type).oldTy = UnresolvedTy;
2357 #line 410 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2359 (yyval.Type) = (yyvsp[0].Type);
2364 #line 413 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2365 { // Type UpReference
2366 (yyvsp[0].String)->insert(0, "\\");
2367 (yyval.Type).newTy = (yyvsp[0].String);
2368 (yyval.Type).oldTy = NumericTy;
2373 #line 418 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2374 { // Function derived type?
2375 *(yyvsp[-3].Type).newTy += "( " + *(yyvsp[-1].String) + " )";
2376 delete (yyvsp[-1].String);
2377 (yyval.Type).newTy = (yyvsp[-3].Type).newTy;
2378 (yyval.Type).oldTy = FunctionTy;
2383 #line 424 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2384 { // Sized array type?
2385 (yyvsp[-3].String)->insert(0,"[ ");
2386 *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " ]";
2387 delete (yyvsp[-1].Type).newTy;
2388 (yyval.Type).newTy = (yyvsp[-3].String);
2389 (yyval.Type).oldTy = ArrayTy;
2390 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2395 #line 432 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2396 { // Packed array type?
2397 (yyvsp[-3].String)->insert(0,"< ");
2398 *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " >";
2399 delete (yyvsp[-1].Type).newTy;
2400 (yyval.Type).newTy = (yyvsp[-3].String);
2401 (yyval.Type).oldTy = PackedTy;
2402 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2407 #line 440 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2408 { // Structure type?
2409 (yyvsp[-1].String)->insert(0, "{ ");
2410 *(yyvsp[-1].String) += " }";
2411 (yyval.Type).newTy = (yyvsp[-1].String);
2412 (yyval.Type).oldTy = StructTy;
2417 #line 446 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2418 { // Empty structure type?
2419 (yyval.Type).newTy = new std::string("{}");
2420 (yyval.Type).oldTy = StructTy;
2425 #line 450 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2427 *(yyvsp[-1].Type).newTy += '*';
2428 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2429 (yyvsp[-1].Type).oldTy = PointerTy;
2430 (yyval.Type) = (yyvsp[-1].Type);
2435 #line 461 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2437 (yyval.String) = (yyvsp[0].Type).newTy;
2442 #line 464 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2444 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Type).newTy;
2445 delete (yyvsp[0].Type).newTy;
2446 (yyval.String) = (yyvsp[-2].String);
2451 #line 473 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2453 *(yyvsp[-2].String) += ", ...";
2454 delete (yyvsp[0].String);
2455 (yyval.String) = (yyvsp[-2].String);
2460 #line 478 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2462 (yyval.String) = (yyvsp[0].String);
2467 #line 481 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2469 (yyval.String) = new std::string();
2474 #line 491 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2475 { // Nonempty unsized arr
2476 (yyval.Const).type = (yyvsp[-3].Type);
2477 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2478 *(yyval.Const).cnst += " [ " + *(yyvsp[-1].String) + " ]";
2479 delete (yyvsp[-1].String);
2484 #line 497 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2486 (yyval.Const).type = (yyvsp[-2].Type);
2487 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2488 *(yyval.Const).cnst += "[ ]";
2493 #line 502 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2495 (yyval.Const).type = (yyvsp[-2].Type);
2496 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2497 *(yyval.Const).cnst += " c" + *(yyvsp[0].String);
2498 delete (yyvsp[0].String);
2503 #line 508 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2504 { // Nonempty unsized arr
2505 (yyval.Const).type = (yyvsp[-3].Type);
2506 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2507 *(yyval.Const).cnst += " < " + *(yyvsp[-1].String) + " >";
2508 delete (yyvsp[-1].String);
2513 #line 514 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2515 (yyval.Const).type = (yyvsp[-3].Type);
2516 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2517 *(yyval.Const).cnst += " { " + *(yyvsp[-1].String) + " }";
2518 delete (yyvsp[-1].String);
2523 #line 520 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2525 (yyval.Const).type = (yyvsp[-2].Type);
2526 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2527 *(yyval.Const).cnst += " {}";
2532 #line 525 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2534 (yyval.Const).type = (yyvsp[-1].Type);
2535 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2536 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2537 delete (yyvsp[0].String);
2542 #line 531 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2544 (yyval.Const).type = (yyvsp[-1].Type);
2545 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2546 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2547 delete (yyvsp[0].String);
2552 #line 537 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2554 (yyval.Const).type = (yyvsp[-1].Type);
2555 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2556 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2557 delete (yyvsp[0].String);
2562 #line 543 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2564 (yyval.Const).type = (yyvsp[-1].Type);
2565 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2566 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2567 delete (yyvsp[0].String);
2572 #line 549 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2574 (yyval.Const).type = (yyvsp[-1].Type);
2575 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2576 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2577 delete (yyvsp[0].String);
2582 #line 555 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2583 { // integral constants
2584 (yyval.Const).type = (yyvsp[-1].Type);
2585 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2586 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2587 delete (yyvsp[0].String);
2592 #line 561 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2593 { // integral constants
2594 (yyval.Const).type = (yyvsp[-1].Type);
2595 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2596 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2597 delete (yyvsp[0].String);
2602 #line 567 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2603 { // Boolean constants
2604 (yyval.Const).type = (yyvsp[-1].Type);
2605 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2606 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2607 delete (yyvsp[0].String);
2612 #line 573 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2613 { // Boolean constants
2614 (yyval.Const).type = (yyvsp[-1].Type);
2615 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2616 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2617 delete (yyvsp[0].String);
2622 #line 579 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2623 { // Float & Double constants
2624 (yyval.Const).type = (yyvsp[-1].Type);
2625 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2626 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2627 delete (yyvsp[0].String);
2632 #line 587 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2634 std::string source = *(yyvsp[-3].Const).cnst;
2635 TypeInfo DstTy = (yyvsp[-1].Type);
2637 if (*(yyvsp[-5].String) == "cast") {
2638 // Call getCastUpgrade to upgrade the old cast
2639 (yyval.String) = new std::string(getCastUpgrade(source, (yyvsp[-3].Const).type, (yyvsp[-1].Type), true));
2641 // Nothing to upgrade, just create the cast constant expr
2642 (yyval.String) = new std::string(*(yyvsp[-5].String));
2643 *(yyval.String) += "( " + source + " to " + *(yyvsp[-1].Type).newTy + ")";
2645 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
2650 #line 601 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2652 *(yyvsp[-4].String) += "(" + *(yyvsp[-2].Const).cnst;
2653 for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
2654 ValueInfo& VI = (*(yyvsp[-1].ValList))[i];
2655 *(yyvsp[-4].String) += ", " + *VI.val;
2658 *(yyvsp[-4].String) += ")";
2659 (yyval.String) = (yyvsp[-4].String);
2660 (yyvsp[-2].Const).destroy();
2661 delete (yyvsp[-1].ValList);
2666 #line 613 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2668 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2669 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2670 (yyval.String) = (yyvsp[-7].String);
2675 #line 618 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2677 const char* op = getDivRemOpcode(*(yyvsp[-5].String), (yyvsp[-3].Const).type);
2678 (yyval.String) = new std::string(op);
2679 *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2680 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2685 #line 624 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2687 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2688 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2689 (yyval.String) = (yyvsp[-5].String);
2694 #line 629 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2696 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2697 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2698 (yyval.String) = (yyvsp[-5].String);
2703 #line 634 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2705 const char* shiftop = (yyvsp[-5].String)->c_str();
2706 if (*(yyvsp[-5].String) == "shr")
2707 shiftop = ((yyvsp[-3].Const).type.isUnsigned()) ? "lshr" : "ashr";
2708 (yyval.String) = new std::string(shiftop);
2709 *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2710 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2715 #line 642 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2717 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2718 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2719 (yyval.String) = (yyvsp[-5].String);
2724 #line 647 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2726 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2727 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2728 (yyval.String) = (yyvsp[-7].String);
2733 #line 652 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2735 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2736 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2737 (yyval.String) = (yyvsp[-7].String);
2742 #line 662 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2744 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Const).cnst;
2745 (yyvsp[0].Const).destroy();
2746 (yyval.String) = (yyvsp[-2].String);
2751 #line 667 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2752 { (yyval.String) = new std::string(*(yyvsp[0].Const).cnst); (yyvsp[0].Const).destroy(); ;}
2756 #line 682 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2762 #line 687 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2769 #line 690 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2771 *O << *(yyvsp[0].String) << "\n";
2772 delete (yyvsp[0].String);
2778 #line 695 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2780 *O << "module asm " << " " << *(yyvsp[0].String) << "\n";
2786 #line 699 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2788 *O << "implementation\n";
2794 #line 703 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2795 { (yyval.String) = 0; ;}
2799 #line 705 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2800 { (yyval.String) = (yyvsp[0].String); *(yyval.String) = "external"; ;}
2804 #line 708 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2806 EnumeratedTypes.push_back((yyvsp[0].Type));
2807 if (!(yyvsp[-2].String)->empty()) {
2808 NamedTypes[*(yyvsp[-2].String)].newTy = new std::string(*(yyvsp[0].Type).newTy);
2809 NamedTypes[*(yyvsp[-2].String)].oldTy = (yyvsp[0].Type).oldTy;
2810 NamedTypes[*(yyvsp[-2].String)].elemTy = (yyvsp[0].Type).elemTy;
2811 *O << *(yyvsp[-2].String) << " = ";
2813 *O << "type " << *(yyvsp[0].Type).newTy << "\n";
2814 delete (yyvsp[-2].String); delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
2820 #line 720 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2821 { // Function prototypes can be in const pool
2822 *O << *(yyvsp[0].String) << "\n";
2823 delete (yyvsp[0].String);
2829 #line 725 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2830 { // Asm blocks can be in the const pool
2831 *O << *(yyvsp[-2].String) << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
2832 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
2838 #line 730 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2840 if (!(yyvsp[-4].String)->empty())
2841 *O << *(yyvsp[-4].String) << " = ";
2842 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Const).cnst << " " << *(yyvsp[0].String) << "\n";
2843 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Const).destroy(); delete (yyvsp[0].String);
2849 #line 737 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2851 if (!(yyvsp[-4].String)->empty())
2852 *O << *(yyvsp[-4].String) << " = ";
2853 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
2854 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
2860 #line 744 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2862 if (!(yyvsp[-4].String)->empty())
2863 *O << *(yyvsp[-4].String) << " = ";
2864 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
2865 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
2871 #line 751 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2873 if (!(yyvsp[-4].String)->empty())
2874 *O << *(yyvsp[-4].String) << " = ";
2875 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
2876 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
2882 #line 758 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2884 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
2885 delete (yyvsp[-1].String); delete (yyvsp[0].String);
2891 #line 763 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2893 *O << *(yyvsp[-2].String) << " = " << *(yyvsp[0].String) << "\n";
2894 delete (yyvsp[-2].String); delete (yyvsp[0].String);
2900 #line 768 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2907 #line 778 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2909 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
2910 delete (yyvsp[0].String);
2911 (yyval.String) = (yyvsp[-2].String);
2916 #line 783 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2918 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
2919 if (*(yyvsp[0].String) == "64")
2921 delete (yyvsp[0].String);
2922 (yyval.String) = (yyvsp[-2].String);
2927 #line 790 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2929 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
2930 delete (yyvsp[0].String);
2931 (yyval.String) = (yyvsp[-2].String);
2936 #line 795 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2938 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
2939 delete (yyvsp[0].String);
2940 (yyval.String) = (yyvsp[-2].String);
2945 #line 802 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2947 (yyvsp[-1].String)->insert(0, "[ ");
2948 *(yyvsp[-1].String) += " ]";
2949 (yyval.String) = (yyvsp[-1].String);
2954 #line 809 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2956 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
2957 delete (yyvsp[0].String);
2958 (yyval.String) = (yyvsp[-2].String);
2963 #line 815 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2965 (yyval.String) = new std::string();
2970 #line 824 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2971 { (yyval.String) = new std::string(); ;}
2975 #line 826 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2977 (yyval.String) = (yyvsp[-1].Type).newTy;
2978 if (!(yyvsp[0].String)->empty())
2979 *(yyval.String) += " " + *(yyvsp[0].String);
2980 delete (yyvsp[0].String);
2985 #line 833 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2987 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
2988 delete (yyvsp[0].String);
2993 #line 837 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2995 (yyval.String) = (yyvsp[0].String);
3000 #line 841 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3002 (yyval.String) = (yyvsp[0].String);
3007 #line 844 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3009 *(yyvsp[-2].String) += ", ...";
3010 (yyval.String) = (yyvsp[-2].String);
3011 delete (yyvsp[0].String);
3016 #line 849 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3018 (yyval.String) = (yyvsp[0].String);
3023 #line 852 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3024 { (yyval.String) = new std::string(); ;}
3028 #line 855 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3030 if (!(yyvsp[-7].String)->empty()) {
3031 *(yyvsp[-7].String) += " ";
3033 *(yyvsp[-7].String) += *(yyvsp[-6].Type).newTy + " " + *(yyvsp[-5].String) + "(" + *(yyvsp[-3].String) + ")";
3034 if (!(yyvsp[-1].String)->empty()) {
3035 *(yyvsp[-7].String) += " " + *(yyvsp[-1].String);
3037 if (!(yyvsp[0].String)->empty()) {
3038 *(yyvsp[-7].String) += " " + *(yyvsp[0].String);
3040 (yyvsp[-6].Type).destroy();
3041 delete (yyvsp[-5].String);
3042 delete (yyvsp[-3].String);
3043 delete (yyvsp[-1].String);
3044 delete (yyvsp[0].String);
3045 (yyval.String) = (yyvsp[-7].String);
3050 #line 874 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3051 { (yyval.String) = new std::string("{"); delete (yyvsp[0].String); ;}
3055 #line 875 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3056 { (yyval.String) = new std::string ("{"); ;}
3060 #line 877 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3062 if (!(yyvsp[-2].String)->empty()) {
3063 *O << *(yyvsp[-2].String) << " ";
3065 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
3066 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3072 #line 886 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3073 { (yyval.String) = new std::string("}"); delete (yyvsp[0].String); ;}
3077 #line 887 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3078 { (yyval.String) = new std::string("}"); ;}
3082 #line 889 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3084 if ((yyvsp[-1].String))
3085 *O << *(yyvsp[-1].String);
3086 *O << '\n' << *(yyvsp[0].String) << "\n";
3092 #line 897 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3093 { (yyval.String) = new std::string(); ;}
3097 #line 903 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3099 if (!(yyvsp[-1].String)->empty())
3100 *(yyvsp[-2].String) += " " + *(yyvsp[-1].String);
3101 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3102 delete (yyvsp[-1].String);
3103 delete (yyvsp[0].String);
3104 (yyval.String) = (yyvsp[-2].String);
3109 #line 916 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3110 { (yyval.String) = new std::string(); ;}
3114 #line 922 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3116 (yyvsp[-1].String)->insert(0, "<");
3117 *(yyvsp[-1].String) += ">";
3118 (yyval.String) = (yyvsp[-1].String);
3123 #line 928 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3125 if (!(yyvsp[-3].String)->empty()) {
3126 *(yyvsp[-4].String) += " " + *(yyvsp[-3].String);
3128 *(yyvsp[-4].String) += " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
3129 delete (yyvsp[-3].String); delete (yyvsp[-2].String); delete (yyvsp[0].String);
3130 (yyval.String) = (yyvsp[-4].String);
3135 #line 941 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3137 (yyval.Value).val = (yyvsp[0].String);
3138 (yyval.Value).constant = false;
3139 (yyval.Value).type.newTy = 0;
3140 (yyval.Value).type.oldTy = UnresolvedTy;
3145 #line 947 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3147 (yyval.Value).val = (yyvsp[0].String);
3148 (yyval.Value).constant = true;
3149 (yyval.Value).type.newTy = 0;
3150 (yyval.Value).type.oldTy = UnresolvedTy;
3155 #line 958 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3157 (yyval.Value) = (yyvsp[0].Value);
3158 (yyval.Value).type = (yyvsp[-1].Type);
3159 (yyval.Value).val->insert(0, *(yyvsp[-1].Type).newTy + " ");
3164 #line 964 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3171 #line 967 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3172 { // Do not allow functions with 0 basic blocks
3178 #line 975 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3185 #line 979 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3187 *O << " " << *(yyvsp[0].String) << "\n";
3188 delete (yyvsp[0].String);
3194 #line 984 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3201 #line 987 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3203 *O << *(yyvsp[0].String) << "\n";
3204 delete (yyvsp[0].String);
3210 #line 993 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3211 { (yyval.String) = (yyvsp[0].String); *(yyval.String) = "unwind"; ;}
3215 #line 995 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3216 { // Return with a result...
3217 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Value).val << "\n";
3218 delete (yyvsp[-1].String); (yyvsp[0].Value).destroy();
3224 #line 1000 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3225 { // Return with no result...
3226 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Type).newTy << "\n";
3227 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3233 #line 1005 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3234 { // Unconditional Branch...
3235 *O << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].Value).val << "\n";
3236 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3242 #line 1010 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3244 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", "
3245 << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << ", " << *(yyvsp[-1].Type).newTy << " "
3246 << *(yyvsp[0].Value).val << "\n";
3247 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); (yyvsp[-6].Value).destroy(); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy();
3248 (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3254 #line 1018 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3256 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", "
3257 << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << " [" << *(yyvsp[-1].String) << " ]\n";
3258 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); (yyvsp[-6].Value).destroy(); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy();
3259 delete (yyvsp[-1].String);
3265 #line 1025 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3267 *O << " " << *(yyvsp[-7].String) << " " << *(yyvsp[-6].Type).newTy << " " << *(yyvsp[-5].Value).val << ", "
3268 << *(yyvsp[-3].Type).newTy << " " << *(yyvsp[-2].Value).val << "[]\n";
3269 delete (yyvsp[-7].String); (yyvsp[-6].Type).destroy(); (yyvsp[-5].Value).destroy(); (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy();
3275 #line 1032 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3278 if (!(yyvsp[-13].String)->empty())
3279 *O << *(yyvsp[-13].String) << " = ";
3280 *O << *(yyvsp[-12].String) << " " << *(yyvsp[-11].String) << " " << *(yyvsp[-10].Type).newTy << " " << *(yyvsp[-9].Value).val << " (";
3281 for (unsigned i = 0; i < (yyvsp[-7].ValList)->size(); ++i) {
3282 ValueInfo& VI = (*(yyvsp[-7].ValList))[i];
3284 if (i+1 < (yyvsp[-7].ValList)->size())
3288 *O << ") " << *(yyvsp[-5].String) << " " << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << " "
3289 << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].Value).val << "\n";
3290 delete (yyvsp[-13].String); delete (yyvsp[-12].String); delete (yyvsp[-11].String); (yyvsp[-10].Type).destroy(); (yyvsp[-9].Value).destroy(); delete (yyvsp[-7].ValList);
3291 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
3292 (yyvsp[0].Value).destroy();
3298 #line 1051 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3300 *O << " " << *(yyvsp[0].String) << "\n";
3301 delete (yyvsp[0].String);
3307 #line 1056 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3309 *O << " " << *(yyvsp[0].String) << "\n";
3310 delete (yyvsp[0].String);
3316 #line 1062 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3318 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].String) + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3319 (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3320 (yyval.String) = (yyvsp[-5].String);
3325 #line 1067 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3327 (yyvsp[-3].String)->insert(0, *(yyvsp[-4].Type).newTy + " " );
3328 *(yyvsp[-3].String) += ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3329 (yyvsp[-4].Type).destroy(); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3330 (yyval.String) = (yyvsp[-3].String);
3335 #line 1075 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3337 if (!(yyvsp[-1].String)->empty())
3338 *(yyvsp[-1].String) += " = ";
3339 *(yyvsp[-1].String) += *(yyvsp[0].String);
3340 delete (yyvsp[0].String);
3341 (yyval.String) = (yyvsp[-1].String);
3346 #line 1084 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3347 { // Used for PHI nodes
3348 (yyvsp[-3].Value).val->insert(0, *(yyvsp[-5].Type).newTy + "[");
3349 *(yyvsp[-3].Value).val += "," + *(yyvsp[-1].Value).val + "]";
3350 (yyvsp[-5].Type).destroy(); (yyvsp[-1].Value).destroy();
3351 (yyval.String) = new std::string(*(yyvsp[-3].Value).val);
3352 (yyvsp[-3].Value).destroy();
3357 #line 1091 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3359 *(yyvsp[-6].String) += ", [" + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + "]";
3360 (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
3361 (yyval.String) = (yyvsp[-6].String);
3366 #line 1099 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3368 (yyval.ValList) = new ValueList();
3369 (yyval.ValList)->push_back((yyvsp[0].Value));
3374 #line 1103 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3376 (yyvsp[-2].ValList)->push_back((yyvsp[0].Value));
3377 (yyval.ValList) = (yyvsp[-2].ValList);
3382 #line 1110 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3383 { (yyval.ValList) = (yyvsp[0].ValList); ;}
3387 #line 1111 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3388 { (yyval.ValList) = new ValueList(); ;}
3392 #line 1115 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3394 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3395 delete (yyvsp[0].String);
3396 (yyval.String) = (yyvsp[-1].String);
3401 #line 1123 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3403 const char* op = getDivRemOpcode(*(yyvsp[-4].String), (yyvsp[-3].Type));
3404 (yyval.String) = new std::string(op);
3405 *(yyval.String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3406 delete (yyvsp[-4].String); (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3411 #line 1129 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3413 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3414 (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3415 (yyval.String) = (yyvsp[-4].String);
3420 #line 1134 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3422 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3423 (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3424 (yyval.String) = (yyvsp[-4].String);
3429 #line 1139 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3431 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3432 (yyvsp[0].Value).destroy();
3433 (yyval.String) = (yyvsp[-1].String);
3438 #line 1144 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3440 const char* shiftop = (yyvsp[-3].String)->c_str();
3441 if (*(yyvsp[-3].String) == "shr")
3442 shiftop = ((yyvsp[-2].Value).type.isUnsigned()) ? "lshr" : "ashr";
3443 (yyval.String) = new std::string(shiftop);
3444 *(yyval.String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3445 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3450 #line 1152 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3452 std::string source = *(yyvsp[-2].Value).val;
3453 TypeInfo SrcTy = (yyvsp[-2].Value).type;
3454 TypeInfo DstTy = (yyvsp[0].Type);
3456 (yyval.String) = new std::string();
3457 if (*(yyvsp[-3].String) == "cast") {
3458 *(yyval.String) += getCastUpgrade(source, SrcTy, DstTy, false);
3460 *(yyval.String) += *(yyvsp[-3].String) + " " + source + " to " + *DstTy.newTy;
3462 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy();
3463 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3468 #line 1166 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3470 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3471 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3472 (yyval.String) = (yyvsp[-5].String);
3477 #line 1171 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3479 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Type).newTy;
3480 (yyvsp[-2].Value).destroy(); (yyvsp[0].Type).destroy();
3481 (yyval.String) = (yyvsp[-3].String);
3486 #line 1176 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3488 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3489 (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3490 (yyval.String) = (yyvsp[-3].String);
3495 #line 1181 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3497 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3498 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3499 (yyval.String) = (yyvsp[-5].String);
3504 #line 1186 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3506 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3507 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3508 (yyval.String) = (yyvsp[-5].String);
3513 #line 1191 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3515 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3516 delete (yyvsp[0].String);
3517 (yyval.String) = (yyvsp[-1].String);
3522 #line 1196 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3524 if (!(yyvsp[-5].String)->empty())
3525 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String);
3526 if (!(yyvsp[-6].String)->empty())
3527 *(yyvsp[-6].String) += " ";
3528 *(yyvsp[-6].String) += *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].Value).val + "(";
3529 for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
3530 ValueInfo& VI = (*(yyvsp[-1].ValList))[i];
3531 *(yyvsp[-6].String) += *VI.val;
3532 if (i+1 < (yyvsp[-1].ValList)->size())
3533 *(yyvsp[-6].String) += ", ";
3536 *(yyvsp[-6].String) += ")";
3537 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); delete (yyvsp[-1].ValList);
3538 (yyval.String) = (yyvsp[-6].String);
3543 #line 1218 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3544 { (yyval.ValList) = (yyvsp[0].ValList); ;}
3548 #line 1219 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3549 { (yyval.ValList) = new ValueList(); ;}
3553 #line 1224 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3554 { (yyval.String) = new std::string(); ;}
3558 #line 1227 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3560 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3561 if (!(yyvsp[0].String)->empty())
3562 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3563 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3564 (yyval.String) = (yyvsp[-2].String);
3569 #line 1234 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3571 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3572 if (!(yyvsp[0].String)->empty())
3573 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3574 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].String);
3575 (yyval.String) = (yyvsp[-5].String);
3580 #line 1241 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3582 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3583 if (!(yyvsp[0].String)->empty())
3584 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3585 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3586 (yyval.String) = (yyvsp[-2].String);
3591 #line 1248 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3593 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3594 if (!(yyvsp[0].String)->empty())
3595 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3596 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].String);
3597 (yyval.String) = (yyvsp[-5].String);
3602 #line 1255 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3604 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3605 (yyvsp[0].Value).destroy();
3606 (yyval.String) = (yyvsp[-1].String);
3611 #line 1260 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3613 if (!(yyvsp[-3].String)->empty())
3614 *(yyvsp[-3].String) += " ";
3615 *(yyvsp[-3].String) += *(yyvsp[-2].String) + " " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3616 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3617 (yyval.String) = (yyvsp[-3].String);
3622 #line 1267 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3624 if (!(yyvsp[-5].String)->empty())
3625 *(yyvsp[-5].String) += " ";
3626 *(yyvsp[-5].String) += *(yyvsp[-4].String) + " " + *(yyvsp[-3].Value).val + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3627 delete (yyvsp[-4].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3628 (yyval.String) = (yyvsp[-5].String);
3633 #line 1274 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3635 // Upgrade the indices
3636 for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) {
3637 ValueInfo& VI = (*(yyvsp[0].ValList))[i];
3638 if (VI.type.isUnsigned() && !VI.isConstant() &&
3639 VI.type.getBitWidth() < 64) {
3640 std::string* old = VI.val;
3641 *O << " %gep_upgrade" << unique << " = zext " << *old
3643 VI.val = new std::string("ulong %gep_upgrade" + llvm::utostr(unique++));
3644 VI.type.oldTy = ULongTy;
3648 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3649 for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) {
3650 ValueInfo& VI = (*(yyvsp[0].ValList))[i];
3651 *(yyvsp[-3].String) += ", " + *VI.val;
3654 (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].ValList);
3655 (yyval.String) = (yyvsp[-3].String);
3663 /* Line 1126 of yacc.c. */
3664 #line 3665 "UpgradeParser.tab.c"
3670 YY_STACK_PRINT (yyss, yyssp);
3675 /* Now `shift' the result of the reduction. Determine what state
3676 that goes to, based on the state we popped back to and the rule
3677 number reduced by. */
3681 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3682 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3683 yystate = yytable[yystate];
3685 yystate = yydefgoto[yyn - YYNTOKENS];
3690 /*------------------------------------.
3691 | yyerrlab -- here on detecting error |
3692 `------------------------------------*/
3694 /* If not already recovering from an error, report this error. */
3699 yyn = yypact[yystate];
3701 if (YYPACT_NINF < yyn && yyn < YYLAST)
3703 int yytype = YYTRANSLATE (yychar);
3704 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3705 YYSIZE_T yysize = yysize0;
3707 int yysize_overflow = 0;
3709 # define YYERROR_VERBOSE_ARGS_MAXIMUM 5
3710 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3714 /* This is so xgettext sees the translatable formats that are
3715 constructed on the fly. */
3716 YY_("syntax error, unexpected %s");
3717 YY_("syntax error, unexpected %s, expecting %s");
3718 YY_("syntax error, unexpected %s, expecting %s or %s");
3719 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3720 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3724 static char const yyunexpected[] = "syntax error, unexpected %s";
3725 static char const yyexpecting[] = ", expecting %s";
3726 static char const yyor[] = " or %s";
3727 char yyformat[sizeof yyunexpected
3728 + sizeof yyexpecting - 1
3729 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3730 * (sizeof yyor - 1))];
3731 char const *yyprefix = yyexpecting;
3733 /* Start YYX at -YYN if negative to avoid negative indexes in
3735 int yyxbegin = yyn < 0 ? -yyn : 0;
3737 /* Stay within bounds of both yycheck and yytname. */
3738 int yychecklim = YYLAST - yyn;
3739 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3742 yyarg[0] = yytname[yytype];
3743 yyfmt = yystpcpy (yyformat, yyunexpected);
3745 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3746 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3748 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3752 yyformat[sizeof yyunexpected - 1] = '\0';
3755 yyarg[yycount++] = yytname[yyx];
3756 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3757 yysize_overflow |= yysize1 < yysize;
3759 yyfmt = yystpcpy (yyfmt, yyprefix);
3763 yyf = YY_(yyformat);
3764 yysize1 = yysize + yystrlen (yyf);
3765 yysize_overflow |= yysize1 < yysize;
3768 if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
3769 yymsg = (char *) YYSTACK_ALLOC (yysize);
3772 /* Avoid sprintf, as that infringes on the user's name space.
3773 Don't have undefined behavior even if the translation
3774 produced a string with the wrong number of "%s"s. */
3777 while ((*yyp = *yyf))
3779 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3781 yyp += yytnamerr (yyp, yyarg[yyi++]);
3791 YYSTACK_FREE (yymsg);
3795 yyerror (YY_("syntax error"));
3796 goto yyexhaustedlab;
3800 #endif /* YYERROR_VERBOSE */
3801 yyerror (YY_("syntax error"));
3806 if (yyerrstatus == 3)
3808 /* If just tried and failed to reuse look-ahead token after an
3809 error, discard it. */
3811 if (yychar <= YYEOF)
3813 /* Return failure if at end of input. */
3814 if (yychar == YYEOF)
3819 yydestruct ("Error: discarding", yytoken, &yylval);
3824 /* Else will try to reuse look-ahead token after shifting the error
3829 /*---------------------------------------------------.
3830 | yyerrorlab -- error raised explicitly by YYERROR. |
3831 `---------------------------------------------------*/
3834 /* Pacify compilers like GCC when the user code never invokes
3835 YYERROR and the label yyerrorlab therefore never appears in user
3846 /*-------------------------------------------------------------.
3847 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3848 `-------------------------------------------------------------*/
3850 yyerrstatus = 3; /* Each real token shifted decrements this. */
3854 yyn = yypact[yystate];
3855 if (yyn != YYPACT_NINF)
3858 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3866 /* Pop the current state because it cannot handle the error token. */
3871 yydestruct ("Error: popping", yystos[yystate], yyvsp);
3874 YY_STACK_PRINT (yyss, yyssp);
3883 /* Shift the error token. */
3884 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3890 /*-------------------------------------.
3891 | yyacceptlab -- YYACCEPT comes here. |
3892 `-------------------------------------*/
3897 /*-----------------------------------.
3898 | yyabortlab -- YYABORT comes here. |
3899 `-----------------------------------*/
3905 /*-------------------------------------------------.
3906 | yyexhaustedlab -- memory exhaustion comes here. |
3907 `-------------------------------------------------*/
3909 yyerror (YY_("memory exhausted"));
3915 if (yychar != YYEOF && yychar != YYEMPTY)
3916 yydestruct ("Cleanup: discarding lookahead",
3918 while (yyssp != yyss)
3920 yydestruct ("Cleanup: popping",
3921 yystos[*yyssp], yyvsp);
3926 YYSTACK_FREE (yyss);
3932 #line 1298 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3935 int yyerror(const char *ErrorMsg) {
3937 = std::string((CurFilename == "-") ? std::string("<stdin>") : CurFilename)
3938 + ":" + llvm::utostr((unsigned) Upgradelineno) + ": ";
3939 std::string errMsg = std::string(ErrorMsg) + "\n" + where + " while reading ";
3940 if (yychar == YYEMPTY || yychar == 0)
3941 errMsg += "end-of-file.";
3943 errMsg += "token: '" + std::string(Upgradetext, Upgradeleng) + "'";
3944 std::cerr << errMsg << '\n';