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,
133 X86_STDCALLCC_TOK = 324,
134 X86_FASTCALLCC_TOK = 325,
173 EXTRACTELEMENT = 364,
206 #define ESINT64VAL 272
207 #define EUINT64VAL 273
213 #define ZEROINITIALIZER 279
219 #define STRINGCONSTANT 285
220 #define IMPLEMENTATION 286
229 #define DOTDOTDOT 295
234 #define DLLIMPORT 300
235 #define DLLEXPORT 301
236 #define EXTERN_WEAK 302
237 #define APPENDING 303
243 #define POINTERSIZE 309
252 #define SIDEEFFECT 318
255 #define CSRETCC_TOK 321
256 #define FASTCC_TOK 322
257 #define COLDCC_TOK 323
258 #define X86_STDCALLCC_TOK 324
259 #define X86_FASTCALLCC_TOK 325
260 #define DATALAYOUT 326
266 #define UNREACHABLE 332
290 #define GETELEMENTPTR 356
298 #define EXTRACTELEMENT 364
299 #define INSERTELEMENT 365
300 #define SHUFFLEVECTOR 366
318 /* Copy the first part of user declarations. */
319 #line 14 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
321 #include "ParserInternals.h"
322 #include <llvm/ADT/StringExtras.h>
328 #define YYERROR_VERBOSE 1
329 #define YYINCLUDED_STDLIB_H
332 int yylex(); // declaration" of xxx warnings.
336 static std::string CurFilename;
337 static std::ostream *O = 0;
338 std::istream* LexInput = 0;
339 unsigned SizeOfPointer = 32;
340 static uint64_t unique = 1;
342 typedef std::vector<TypeInfo> TypeVector;
343 static TypeVector EnumeratedTypes;
344 typedef std::map<std::string,TypeInfo> TypeMap;
345 static TypeMap NamedTypes;
347 void destroy(ValueList* VL) {
348 while (!VL->empty()) {
349 ValueInfo& VI = VL->back();
356 void UpgradeAssembly(const std::string &infile, std::istream& in,
357 std::ostream &out, bool debug)
360 CurFilename = infile;
366 std::cerr << "Parse failed.\n";
371 static void ResolveType(TypeInfo& Ty) {
372 if (Ty.oldTy == UnresolvedTy) {
373 TypeMap::iterator I = NamedTypes.find(*Ty.newTy);
374 if (I != NamedTypes.end())
375 Ty.oldTy = I->second.oldTy;
377 std::string msg("Can't resolve type: ");
379 yyerror(msg.c_str());
381 } else if (Ty.oldTy == NumericTy) {
382 unsigned ref = atoi(&((Ty.newTy->c_str())[1])); // Skip the '\\'
383 if (ref < EnumeratedTypes.size()) {
384 Ty.oldTy = EnumeratedTypes[ref].oldTy;
386 std::string msg("Can't resolve type: ");
388 yyerror(msg.c_str());
391 // otherwise its already resolved.
394 static const char* getCastOpcode(
395 std::string& Source, const TypeInfo& SrcTy, const TypeInfo& DstTy)
397 unsigned SrcBits = SrcTy.getBitWidth();
398 unsigned DstBits = DstTy.getBitWidth();
399 const char* opcode = "bitcast";
400 // Run through the possibilities ...
401 if (DstTy.isIntegral()) { // Casting to integral
402 if (SrcTy.isIntegral()) { // Casting from integral
403 if (DstBits < SrcBits)
405 else if (DstBits > SrcBits) { // its an extension
406 if (SrcTy.isSigned())
407 opcode ="sext"; // signed -> SEXT
409 opcode = "zext"; // unsigned -> ZEXT
411 opcode = "bitcast"; // Same size, No-op cast
413 } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt
414 if (DstTy.isSigned())
415 opcode = "fptosi"; // FP -> sint
417 opcode = "fptoui"; // FP -> uint
418 } else if (SrcTy.isPacked()) {
419 assert(DstBits == SrcTy.getBitWidth() &&
420 "Casting packed to integer of different width");
421 opcode = "bitcast"; // same size, no-op cast
423 assert(SrcTy.isPointer() &&
424 "Casting from a value that is not first-class type");
425 opcode = "ptrtoint"; // ptr -> int
427 } else if (DstTy.isFloatingPoint()) { // Casting to floating pt
428 if (SrcTy.isIntegral()) { // Casting from integral
429 if (SrcTy.isSigned())
430 opcode = "sitofp"; // sint -> FP
432 opcode = "uitofp"; // uint -> FP
433 } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt
434 if (DstBits < SrcBits) {
435 opcode = "fptrunc"; // FP -> smaller FP
436 } else if (DstBits > SrcBits) {
437 opcode = "fpext"; // FP -> larger FP
439 opcode ="bitcast"; // same size, no-op cast
441 } else if (SrcTy.isPacked()) {
442 assert(DstBits == SrcTy.getBitWidth() &&
443 "Casting packed to floating point of different width");
444 opcode = "bitcast"; // same size, no-op cast
446 assert(0 && "Casting pointer or non-first class to float");
448 } else if (DstTy.isPacked()) {
449 if (SrcTy.isPacked()) {
450 assert(DstTy.getBitWidth() == SrcTy.getBitWidth() &&
451 "Casting packed to packed of different widths");
452 opcode = "bitcast"; // packed -> packed
453 } else if (DstTy.getBitWidth() == SrcBits) {
454 opcode = "bitcast"; // float/int -> packed
456 assert(!"Illegal cast to packed (wrong type or size)");
458 } else if (DstTy.isPointer()) {
459 if (SrcTy.isPointer()) {
460 opcode = "bitcast"; // ptr -> ptr
461 } else if (SrcTy.isIntegral()) {
462 opcode = "inttoptr"; // int -> ptr
464 assert(!"Casting invalid type to pointer");
467 assert(!"Casting to type that is not first-class");
472 static std::string getCastUpgrade(
473 const std::string& Src, TypeInfo& SrcTy, TypeInfo& DstTy, bool isConst)
476 std::string Source = Src;
477 if (SrcTy.isFloatingPoint() && DstTy.isPointer()) {
478 // fp -> ptr cast is no longer supported but we must upgrade this
479 // by doing a double cast: fp -> int -> ptr
481 Source = "ulong fptoui(" + Source + " to ulong)";
483 *O << " %cast_upgrade" << unique << " = fptoui " << Source
485 Source = "ulong %cast_upgrade" + llvm::utostr(unique);
487 // Update the SrcTy for the getCastOpcode call below
489 SrcTy.newTy = new std::string("ulong");
490 SrcTy.oldTy = ULongTy;
491 } else if (DstTy.oldTy == BoolTy) {
492 // cast ptr %x to bool was previously defined as setne ptr %x, null
493 // The ptrtoint semantic is to truncate, not compare so we must retain
494 // the original intent by replace the cast with a setne
495 const char* comparator = SrcTy.isPointer() ? ", null" :
496 (SrcTy.isFloatingPoint() ? ", 0.0" : ", 0");
498 Result = "setne (" + Source + comparator + ")";
500 Result = "setne " + Source + comparator;
501 return Result; // skip cast processing below
505 std::string Opcode(getCastOpcode(Source, SrcTy, DstTy));
507 Result += Opcode + "( " + Source + " to " + *DstTy.newTy + ")";
509 Result += Opcode + " " + Source + " to " + *DstTy.newTy;
515 /* Enabling traces. */
520 /* Enabling verbose error messages. */
521 #ifdef YYERROR_VERBOSE
522 # undef YYERROR_VERBOSE
523 # define YYERROR_VERBOSE 1
525 # define YYERROR_VERBOSE 0
528 /* Enabling the token table. */
529 #ifndef YYTOKEN_TABLE
530 # define YYTOKEN_TABLE 0
533 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
534 #line 211 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
535 typedef union YYSTYPE {
542 /* Line 196 of yacc.c. */
543 #line 544 "UpgradeParser.tab.c"
544 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
545 # define YYSTYPE_IS_DECLARED 1
546 # define YYSTYPE_IS_TRIVIAL 1
551 /* Copy the second part of user declarations. */
554 /* Line 219 of yacc.c. */
555 #line 556 "UpgradeParser.tab.c"
557 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
558 # define YYSIZE_T __SIZE_TYPE__
560 #if ! defined (YYSIZE_T) && defined (size_t)
561 # define YYSIZE_T size_t
563 #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
564 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
565 # define YYSIZE_T size_t
567 #if ! defined (YYSIZE_T)
568 # define YYSIZE_T unsigned int
574 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
575 # define YY_(msgid) dgettext ("bison-runtime", msgid)
579 # define YY_(msgid) msgid
583 #if ! defined (yyoverflow) || YYERROR_VERBOSE
585 /* The parser invokes alloca or malloc; define the necessary symbols. */
587 # ifdef YYSTACK_USE_ALLOCA
588 # if YYSTACK_USE_ALLOCA
590 # define YYSTACK_ALLOC __builtin_alloca
592 # define YYSTACK_ALLOC alloca
593 # if defined (__STDC__) || defined (__cplusplus)
594 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
595 # define YYINCLUDED_STDLIB_H
601 # ifdef YYSTACK_ALLOC
602 /* Pacify GCC's `empty if-body' warning. */
603 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
604 # ifndef YYSTACK_ALLOC_MAXIMUM
605 /* The OS might guarantee only one guard page at the bottom of the stack,
606 and a page size can be as small as 4096 bytes. So we cannot safely
607 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
608 to allow for a few compiler-allocated temporary stack slots. */
609 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
612 # define YYSTACK_ALLOC YYMALLOC
613 # define YYSTACK_FREE YYFREE
614 # ifndef YYSTACK_ALLOC_MAXIMUM
615 # define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
621 # define YYMALLOC malloc
622 # if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
623 && (defined (__STDC__) || defined (__cplusplus)))
624 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
629 # if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
630 && (defined (__STDC__) || defined (__cplusplus)))
631 void free (void *); /* INFRINGES ON USER NAME SPACE */
638 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
641 #if (! defined (yyoverflow) \
642 && (! defined (__cplusplus) \
643 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
645 /* A type that is properly aligned for any stack member. */
652 /* The size of the maximum gap between one aligned stack and the next. */
653 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
655 /* The size of an array large to enough to hold all stacks, each with
657 # define YYSTACK_BYTES(N) \
658 ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
659 + YYSTACK_GAP_MAXIMUM)
661 /* Copy COUNT objects from FROM to TO. The source and destination do
664 # if defined (__GNUC__) && 1 < __GNUC__
665 # define YYCOPY(To, From, Count) \
666 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
668 # define YYCOPY(To, From, Count) \
672 for (yyi = 0; yyi < (Count); yyi++) \
673 (To)[yyi] = (From)[yyi]; \
679 /* Relocate STACK from its old location to the new one. The
680 local variables YYSIZE and YYSTACKSIZE give the old and new number of
681 elements in the stack, and YYPTR gives the new location of the
682 stack. Advance YYPTR to a properly aligned location for the next
684 # define YYSTACK_RELOCATE(Stack) \
687 YYSIZE_T yynewbytes; \
688 YYCOPY (&yyptr->Stack, Stack, yysize); \
689 Stack = &yyptr->Stack; \
690 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
691 yyptr += yynewbytes / sizeof (*yyptr); \
697 #if defined (__STDC__) || defined (__cplusplus)
698 typedef signed char yysigned_char;
700 typedef short int yysigned_char;
703 /* YYFINAL -- State number of the termination state. */
705 /* YYLAST -- Last index in YYTABLE. */
708 /* YYNTOKENS -- Number of terminals. */
709 #define YYNTOKENS 139
710 /* YYNNTS -- Number of nonterminals. */
712 /* YYNRULES -- Number of rules. */
714 /* YYNRULES -- Number of states. */
715 #define YYNSTATES 522
717 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
719 #define YYMAXUTOK 379
721 #define YYTRANSLATE(YYX) \
722 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
724 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
725 static const unsigned char yytranslate[] =
727 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
728 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
729 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
730 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
731 128, 129, 137, 2, 126, 2, 2, 2, 2, 2,
732 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
733 133, 125, 134, 2, 2, 2, 2, 2, 2, 2,
734 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
735 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
736 2, 130, 127, 132, 2, 2, 2, 2, 2, 138,
737 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
738 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
739 131, 2, 2, 135, 2, 136, 2, 2, 2, 2,
740 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
741 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
742 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
743 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
744 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
745 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
746 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
747 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
748 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
749 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
750 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
751 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
752 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
753 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
754 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
755 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
756 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
757 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
758 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
759 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
760 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
761 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
762 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
763 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
764 115, 116, 117, 118, 119, 120, 121, 122, 123, 124
768 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
770 static const unsigned short int yyprhs[] =
772 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
773 19, 21, 23, 25, 27, 29, 31, 33, 35, 37,
774 39, 41, 43, 45, 47, 49, 51, 53, 55, 57,
775 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
776 79, 81, 83, 85, 87, 89, 91, 93, 95, 97,
777 99, 101, 103, 105, 108, 109, 111, 113, 115, 117,
778 119, 121, 123, 124, 126, 128, 130, 132, 134, 136,
779 139, 140, 141, 144, 145, 149, 152, 153, 155, 156,
780 160, 162, 165, 167, 169, 171, 173, 175, 177, 179,
781 181, 183, 185, 187, 189, 191, 193, 195, 197, 199,
782 201, 203, 205, 208, 213, 219, 225, 229, 232, 235,
783 237, 241, 243, 247, 249, 250, 255, 259, 263, 268,
784 273, 277, 280, 283, 286, 289, 292, 295, 298, 301,
785 304, 307, 314, 320, 329, 336, 343, 350, 357, 364,
786 373, 382, 386, 388, 390, 392, 394, 397, 400, 405,
787 408, 410, 415, 418, 423, 430, 437, 444, 451, 455,
788 460, 461, 463, 465, 467, 471, 475, 479, 483, 487,
789 491, 493, 494, 496, 498, 500, 501, 504, 508, 510,
790 512, 516, 518, 519, 528, 530, 532, 536, 538, 540,
791 544, 545, 547, 549, 553, 554, 556, 558, 560, 562,
792 564, 566, 568, 570, 572, 576, 578, 584, 586, 588,
793 590, 592, 595, 598, 600, 603, 606, 607, 609, 612,
794 615, 619, 629, 639, 648, 663, 665, 667, 674, 680,
795 683, 690, 698, 700, 704, 706, 707, 710, 712, 718,
796 724, 730, 733, 738, 743, 750, 755, 760, 767, 774,
797 777, 785, 787, 790, 791, 793, 794, 798, 805, 809,
801 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
802 static const short int yyrhs[] =
804 171, 0, -1, 19, -1, 20, -1, 17, -1, 18,
805 -1, 78, -1, 79, -1, 80, -1, 81, -1, 82,
806 -1, 83, -1, 84, -1, 85, -1, 86, -1, 87,
807 -1, 88, -1, 89, -1, 90, -1, 91, -1, 92,
808 -1, 93, -1, 94, -1, 95, -1, 104, -1, 105,
809 -1, 106, -1, 107, -1, 113, -1, 114, -1, 115,
810 -1, 116, -1, 117, -1, 118, -1, 119, -1, 120,
811 -1, 121, -1, 122, -1, 123, -1, 124, -1, 112,
812 -1, 11, -1, 9, -1, 7, -1, 5, -1, 12,
813 -1, 10, -1, 8, -1, 6, -1, 147, -1, 148,
814 -1, 13, -1, 14, -1, 179, 125, -1, -1, 42,
815 -1, 43, -1, 44, -1, 48, -1, 45, -1, 46,
816 -1, 47, -1, -1, 65, -1, 66, -1, 67, -1,
817 68, -1, 69, -1, 70, -1, 64, 18, -1, -1,
818 -1, 57, 18, -1, -1, 126, 57, 18, -1, 37,
819 30, -1, -1, 156, -1, -1, 126, 159, 158, -1,
820 156, -1, 57, 18, -1, 162, -1, 3, -1, 164,
821 -1, 3, -1, 164, -1, 4, -1, 5, -1, 6,
822 -1, 7, -1, 8, -1, 9, -1, 10, -1, 11,
823 -1, 12, -1, 13, -1, 14, -1, 15, -1, 16,
824 -1, 193, -1, 163, -1, 127, 18, -1, 161, 128,
825 166, 129, -1, 130, 18, 131, 164, 132, -1, 133,
826 18, 131, 164, 134, -1, 135, 165, 136, -1, 135,
827 136, -1, 164, 137, -1, 164, -1, 165, 126, 164,
828 -1, 165, -1, 165, 126, 40, -1, 40, -1, -1,
829 162, 130, 169, 132, -1, 162, 130, 132, -1, 162,
830 138, 30, -1, 162, 133, 169, 134, -1, 162, 135,
831 169, 136, -1, 162, 135, 136, -1, 162, 22, -1,
832 162, 23, -1, 162, 193, -1, 162, 168, -1, 162,
833 24, -1, 147, 141, -1, 148, 18, -1, 4, 25,
834 -1, 4, 26, -1, 150, 21, -1, 146, 128, 167,
835 39, 162, 129, -1, 101, 128, 167, 207, 129, -1,
836 103, 128, 167, 126, 167, 126, 167, 129, -1, 142,
837 128, 167, 126, 167, 129, -1, 143, 128, 167, 126,
838 167, 129, -1, 144, 128, 167, 126, 167, 129, -1,
839 145, 128, 167, 126, 167, 129, -1, 109, 128, 167,
840 126, 167, 129, -1, 110, 128, 167, 126, 167, 126,
841 167, 129, -1, 111, 128, 167, 126, 167, 126, 167,
842 129, -1, 169, 126, 167, -1, 167, -1, 35, -1,
843 36, -1, 172, -1, 172, 188, -1, 172, 190, -1,
844 172, 62, 61, 174, -1, 172, 31, -1, 173, -1,
845 173, 151, 27, 160, -1, 173, 190, -1, 173, 62,
846 61, 174, -1, 173, 151, 152, 170, 167, 158, -1,
847 173, 151, 50, 170, 162, 158, -1, 173, 151, 45,
848 170, 162, 158, -1, 173, 151, 47, 170, 162, 158,
849 -1, 173, 51, 176, -1, 173, 58, 125, 177, -1,
850 -1, 30, -1, 56, -1, 55, -1, 53, 125, 175,
851 -1, 54, 125, 18, -1, 52, 125, 30, -1, 71,
852 125, 30, -1, 130, 178, 132, -1, 178, 126, 30,
853 -1, 30, -1, -1, 28, -1, 30, -1, 179, -1,
854 -1, 162, 180, -1, 182, 126, 181, -1, 181, -1,
855 182, -1, 182, 126, 40, -1, 40, -1, -1, 153,
856 160, 179, 128, 183, 129, 157, 154, -1, 32, -1,
857 135, -1, 152, 184, 185, -1, 33, -1, 136, -1,
858 186, 196, 187, -1, -1, 45, -1, 47, -1, 34,
859 189, 184, -1, -1, 63, -1, 17, -1, 18, -1,
860 21, -1, 25, -1, 26, -1, 22, -1, 23, -1,
861 24, -1, 133, 169, 134, -1, 168, -1, 61, 191,
862 30, 126, 30, -1, 140, -1, 179, -1, 193, -1,
863 192, -1, 162, 194, -1, 196, 197, -1, 197, -1,
864 198, 199, -1, 198, 201, -1, -1, 29, -1, 72,
865 195, -1, 72, 3, -1, 73, 15, 194, -1, 73,
866 4, 194, 126, 15, 194, 126, 15, 194, -1, 74,
867 149, 194, 126, 15, 194, 130, 200, 132, -1, 74,
868 149, 194, 126, 15, 194, 130, 132, -1, 151, 75,
869 153, 160, 194, 128, 204, 129, 39, 15, 194, 76,
870 15, 194, -1, 76, -1, 77, -1, 200, 149, 192,
871 126, 15, 194, -1, 149, 192, 126, 15, 194, -1,
872 151, 206, -1, 162, 130, 194, 126, 194, 132, -1,
873 202, 126, 130, 194, 126, 194, 132, -1, 195, -1,
874 203, 126, 195, -1, 203, -1, -1, 60, 59, -1,
875 59, -1, 142, 162, 194, 126, 194, -1, 143, 162,
876 194, 126, 194, -1, 144, 162, 194, 126, 194, -1,
877 49, 195, -1, 145, 195, 126, 195, -1, 146, 195,
878 39, 162, -1, 103, 195, 126, 195, 126, 195, -1,
879 108, 195, 126, 162, -1, 109, 195, 126, 195, -1,
880 110, 195, 126, 195, 126, 195, -1, 111, 195, 126,
881 195, 126, 195, -1, 102, 202, -1, 205, 153, 160,
882 194, 128, 204, 129, -1, 209, -1, 126, 203, -1,
883 -1, 38, -1, -1, 96, 162, 155, -1, 96, 162,
884 126, 10, 194, 155, -1, 97, 162, 155, -1, 97,
885 162, 126, 10, 194, 155, -1, 98, 195, -1, 208,
886 99, 162, 194, -1, 208, 100, 195, 126, 162, 194,
887 -1, 101, 162, 194, 207, -1
890 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
891 static const unsigned short int yyrline[] =
893 0, 271, 271, 271, 272, 272, 276, 276, 276, 276,
894 276, 276, 276, 276, 276, 277, 277, 277, 278, 278,
895 278, 278, 278, 278, 279, 279, 279, 279, 280, 280,
896 280, 280, 280, 280, 280, 281, 281, 281, 281, 281,
897 281, 286, 286, 286, 286, 287, 287, 287, 287, 288,
898 288, 289, 289, 292, 295, 300, 300, 300, 300, 300,
899 300, 301, 302, 305, 305, 305, 305, 305, 306, 307,
900 312, 317, 318, 321, 322, 330, 336, 337, 340, 341,
901 350, 351, 364, 364, 365, 365, 366, 370, 370, 370,
902 370, 370, 370, 370, 371, 371, 371, 371, 371, 373,
903 377, 381, 386, 391, 397, 404, 411, 417, 421, 431,
904 434, 442, 443, 448, 451, 461, 467, 472, 478, 484,
905 490, 495, 501, 507, 513, 519, 525, 531, 537, 543,
906 549, 557, 571, 583, 588, 593, 598, 603, 611, 616,
907 621, 631, 636, 641, 641, 651, 656, 659, 664, 668,
908 672, 675, 686, 691, 696, 703, 710, 717, 724, 729,
909 734, 739, 741, 741, 744, 749, 756, 761, 768, 775,
910 780, 781, 789, 789, 790, 790, 792, 799, 803, 807,
911 810, 815, 818, 820, 840, 843, 847, 856, 857, 859,
912 867, 868, 869, 873, 886, 887, 890, 890, 890, 890,
913 890, 890, 890, 891, 892, 897, 898, 907, 907, 911,
914 917, 928, 934, 937, 945, 949, 954, 957, 963, 968,
915 973, 978, 986, 993, 999, 1019, 1024, 1030, 1035, 1043,
916 1052, 1059, 1067, 1071, 1078, 1079, 1083, 1088, 1091, 1096,
917 1101, 1106, 1111, 1119, 1133, 1138, 1143, 1148, 1153, 1158,
918 1163, 1180, 1185, 1186, 1190, 1191, 1194, 1201, 1208, 1215,
919 1222, 1227, 1234, 1241
923 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
924 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
925 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
926 static const char *const yytname[] =
928 "$end", "error", "$undefined", "VOID", "BOOL", "SBYTE", "UBYTE",
929 "SHORT", "USHORT", "INT", "UINT", "LONG", "ULONG", "FLOAT", "DOUBLE",
930 "LABEL", "OPAQUE", "ESINT64VAL", "EUINT64VAL", "SINTVAL", "UINTVAL",
931 "FPVAL", "NULL_TOK", "UNDEF", "ZEROINITIALIZER", "TRUETOK", "FALSETOK",
932 "TYPE", "VAR_ID", "LABELSTR", "STRINGCONSTANT", "IMPLEMENTATION",
933 "BEGINTOK", "ENDTOK", "DECLARE", "GLOBAL", "CONSTANT", "SECTION",
934 "VOLATILE", "TO", "DOTDOTDOT", "CONST", "INTERNAL", "LINKONCE", "WEAK",
935 "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "APPENDING", "NOT", "EXTERNAL",
936 "TARGET", "TRIPLE", "ENDIAN", "POINTERSIZE", "LITTLE", "BIG", "ALIGN",
937 "DEPLIBS", "CALL", "TAIL", "ASM_TOK", "MODULE", "SIDEEFFECT", "CC_TOK",
938 "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK", "COLDCC_TOK",
939 "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT", "RET", "BR",
940 "SWITCH", "INVOKE", "UNWIND", "UNREACHABLE", "ADD", "SUB", "MUL", "UDIV",
941 "SDIV", "FDIV", "UREM", "SREM", "FREM", "AND", "OR", "XOR", "SETLE",
942 "SETGE", "SETLT", "SETGT", "SETEQ", "SETNE", "MALLOC", "ALLOCA", "FREE",
943 "LOAD", "STORE", "GETELEMENTPTR", "PHI_TOK", "SELECT", "SHL", "SHR",
944 "ASHR", "LSHR", "VAARG", "EXTRACTELEMENT", "INSERTELEMENT",
945 "SHUFFLEVECTOR", "CAST", "TRUNC", "ZEXT", "SEXT", "FPTRUNC", "FPEXT",
946 "FPTOUI", "FPTOSI", "UITOFP", "SITOFP", "PTRTOINT", "INTTOPTR",
947 "BITCAST", "'='", "','", "'\\\\'", "'('", "')'", "'['", "'x'", "']'",
948 "'<'", "'>'", "'{'", "'}'", "'*'", "'c'", "$accept", "IntVal",
949 "EInt64Val", "ArithmeticOps", "LogicalOps", "SetCondOps", "ShiftOps",
950 "CastOps", "SIntType", "UIntType", "IntType", "FPType", "OptAssign",
951 "OptLinkage", "OptCallingConv", "OptAlign", "OptCAlign", "SectionString",
952 "OptSection", "GlobalVarAttributes", "GlobalVarAttribute", "TypesV",
953 "UpRTypesV", "Types", "PrimType", "UpRTypes", "TypeListI",
954 "ArgTypeListI", "ConstVal", "ConstExpr", "ConstVector", "GlobalType",
955 "Module", "DefinitionList", "ConstPool", "AsmBlock", "BigOrLittle",
956 "TargetDefinition", "LibrariesDefinition", "LibList", "Name", "OptName",
957 "ArgVal", "ArgListH", "ArgList", "FunctionHeaderH", "BEGIN",
958 "FunctionHeader", "END", "Function", "FnDeclareLinkage", "FunctionProto",
959 "OptSideEffect", "ConstValueRef", "SymbolicValueRef", "ValueRef",
960 "ResolvedVal", "BasicBlockList", "BasicBlock", "InstructionList",
961 "BBTerminatorInst", "JumpTable", "Inst", "PHIList", "ValueRefList",
962 "ValueRefListE", "OptTailCall", "InstVal", "IndexList", "OptVolatile",
968 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
970 static const unsigned short int yytoknum[] =
972 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
973 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
974 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
975 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
976 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
977 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
978 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
979 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
980 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
981 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
982 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
983 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
984 375, 376, 377, 378, 379, 61, 44, 92, 40, 41,
985 91, 120, 93, 60, 62, 123, 125, 42, 99
989 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
990 static const unsigned char yyr1[] =
992 0, 139, 140, 140, 141, 141, 142, 142, 142, 142,
993 142, 142, 142, 142, 142, 143, 143, 143, 144, 144,
994 144, 144, 144, 144, 145, 145, 145, 145, 146, 146,
995 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
996 146, 147, 147, 147, 147, 148, 148, 148, 148, 149,
997 149, 150, 150, 151, 151, 152, 152, 152, 152, 152,
998 152, 152, 152, 153, 153, 153, 153, 153, 153, 153,
999 153, 154, 154, 155, 155, 156, 157, 157, 158, 158,
1000 159, 159, 160, 160, 161, 161, 162, 163, 163, 163,
1001 163, 163, 163, 163, 163, 163, 163, 163, 163, 164,
1002 164, 164, 164, 164, 164, 164, 164, 164, 164, 165,
1003 165, 166, 166, 166, 166, 167, 167, 167, 167, 167,
1004 167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
1005 167, 168, 168, 168, 168, 168, 168, 168, 168, 168,
1006 168, 169, 169, 170, 170, 171, 172, 172, 172, 172,
1007 172, 173, 173, 173, 173, 173, 173, 173, 173, 173,
1008 173, 174, 175, 175, 176, 176, 176, 176, 177, 178,
1009 178, 178, 179, 179, 180, 180, 181, 182, 182, 183,
1010 183, 183, 183, 184, 185, 185, 186, 187, 187, 188,
1011 189, 189, 189, 190, 191, 191, 192, 192, 192, 192,
1012 192, 192, 192, 192, 192, 192, 192, 193, 193, 194,
1013 194, 195, 196, 196, 197, 198, 198, 198, 199, 199,
1014 199, 199, 199, 199, 199, 199, 199, 200, 200, 201,
1015 202, 202, 203, 203, 204, 204, 205, 205, 206, 206,
1016 206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
1017 206, 206, 207, 207, 208, 208, 209, 209, 209, 209,
1021 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1022 static const unsigned char yyr2[] =
1024 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1025 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1026 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1027 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1028 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1029 1, 1, 1, 2, 0, 1, 1, 1, 1, 1,
1030 1, 1, 0, 1, 1, 1, 1, 1, 1, 2,
1031 0, 0, 2, 0, 3, 2, 0, 1, 0, 3,
1032 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1033 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1034 1, 1, 2, 4, 5, 5, 3, 2, 2, 1,
1035 3, 1, 3, 1, 0, 4, 3, 3, 4, 4,
1036 3, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1037 2, 6, 5, 8, 6, 6, 6, 6, 6, 8,
1038 8, 3, 1, 1, 1, 1, 2, 2, 4, 2,
1039 1, 4, 2, 4, 6, 6, 6, 6, 3, 4,
1040 0, 1, 1, 1, 3, 3, 3, 3, 3, 3,
1041 1, 0, 1, 1, 1, 0, 2, 3, 1, 1,
1042 3, 1, 0, 8, 1, 1, 3, 1, 1, 3,
1043 0, 1, 1, 3, 0, 1, 1, 1, 1, 1,
1044 1, 1, 1, 1, 3, 1, 5, 1, 1, 1,
1045 1, 2, 2, 1, 2, 2, 0, 1, 2, 2,
1046 3, 9, 9, 8, 14, 1, 1, 6, 5, 2,
1047 6, 7, 1, 3, 1, 0, 2, 1, 5, 5,
1048 5, 2, 4, 4, 6, 4, 4, 6, 6, 2,
1049 7, 1, 2, 0, 1, 0, 3, 6, 3, 6,
1053 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1054 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1055 means the default is an error. */
1056 static const unsigned short int yydefact[] =
1058 160, 0, 62, 150, 1, 149, 190, 55, 56, 57,
1059 59, 60, 61, 58, 0, 70, 216, 146, 147, 172,
1060 173, 0, 0, 0, 62, 0, 152, 191, 192, 70,
1061 0, 0, 63, 64, 65, 66, 67, 68, 0, 0,
1062 217, 216, 213, 54, 0, 0, 0, 0, 158, 0,
1063 0, 0, 0, 0, 0, 0, 53, 193, 161, 148,
1064 69, 83, 87, 88, 89, 90, 91, 92, 93, 94,
1065 95, 96, 97, 98, 99, 2, 3, 0, 0, 0,
1066 0, 207, 0, 0, 82, 101, 86, 208, 100, 184,
1067 185, 186, 187, 188, 189, 212, 0, 0, 0, 225,
1068 226, 255, 214, 215, 0, 0, 0, 0, 171, 159,
1069 153, 151, 143, 144, 0, 0, 0, 0, 102, 0,
1070 0, 85, 107, 109, 0, 0, 114, 108, 219, 0,
1071 218, 0, 0, 44, 48, 43, 47, 42, 46, 41,
1072 45, 49, 50, 0, 254, 0, 237, 0, 70, 6,
1073 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1074 17, 18, 19, 20, 21, 22, 23, 0, 0, 0,
1075 0, 0, 0, 24, 25, 26, 27, 0, 0, 0,
1076 0, 40, 28, 29, 30, 31, 32, 33, 34, 35,
1077 36, 37, 38, 39, 0, 0, 0, 0, 0, 70,
1078 229, 0, 251, 166, 163, 162, 164, 165, 167, 170,
1079 0, 78, 78, 78, 87, 88, 89, 90, 91, 92,
1080 93, 94, 95, 96, 97, 0, 0, 0, 0, 78,
1081 0, 0, 0, 106, 182, 113, 111, 0, 196, 197,
1082 198, 201, 202, 203, 199, 200, 194, 0, 0, 0,
1083 0, 0, 0, 0, 0, 0, 0, 0, 205, 210,
1084 209, 211, 0, 220, 0, 241, 236, 0, 73, 73,
1085 260, 0, 0, 249, 0, 0, 0, 0, 0, 0,
1086 0, 0, 0, 0, 0, 0, 0, 0, 168, 0,
1087 156, 157, 155, 128, 129, 4, 5, 126, 127, 130,
1088 121, 122, 125, 0, 0, 0, 0, 124, 123, 154,
1089 84, 84, 110, 181, 175, 178, 179, 0, 0, 103,
1090 195, 0, 0, 0, 0, 0, 0, 142, 0, 0,
1091 0, 0, 0, 0, 0, 0, 0, 0, 256, 0,
1092 258, 253, 0, 0, 0, 0, 0, 0, 0, 0,
1093 0, 0, 0, 0, 0, 0, 0, 169, 0, 0,
1094 80, 78, 116, 0, 0, 120, 0, 117, 104, 105,
1095 174, 176, 0, 76, 112, 0, 253, 0, 0, 0,
1096 0, 0, 204, 0, 0, 0, 0, 0, 0, 0,
1097 0, 0, 0, 0, 0, 263, 0, 0, 0, 245,
1098 246, 0, 0, 0, 0, 0, 242, 243, 0, 261,
1099 0, 75, 81, 79, 115, 118, 119, 180, 177, 77,
1100 71, 0, 0, 0, 0, 0, 0, 141, 0, 0,
1101 0, 0, 0, 0, 0, 235, 73, 74, 73, 232,
1102 252, 0, 0, 0, 0, 0, 238, 239, 240, 235,
1103 0, 0, 183, 206, 132, 0, 0, 0, 0, 0,
1104 0, 0, 0, 0, 0, 0, 234, 0, 0, 257,
1105 259, 0, 0, 0, 244, 247, 248, 0, 262, 72,
1106 0, 138, 0, 0, 134, 135, 136, 137, 131, 0,
1107 223, 0, 0, 0, 233, 230, 0, 250, 0, 0,
1108 0, 221, 0, 222, 0, 0, 231, 133, 139, 140,
1109 0, 0, 0, 0, 0, 0, 228, 0, 0, 227,
1113 /* YYDEFGOTO[NTERM-NUM]. */
1114 static const short int yydefgoto[] =
1116 -1, 81, 297, 253, 254, 255, 256, 257, 225, 226,
1117 143, 227, 24, 15, 38, 452, 338, 360, 420, 290,
1118 361, 82, 83, 228, 85, 86, 124, 237, 327, 258,
1119 328, 114, 1, 2, 3, 59, 206, 48, 109, 210,
1120 87, 371, 315, 316, 317, 39, 91, 16, 94, 17,
1121 29, 18, 321, 259, 88, 261, 439, 41, 42, 43,
1122 102, 492, 103, 273, 466, 467, 199, 200, 395, 201,
1126 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1128 #define YYPACT_NINF -472
1129 static const short int yypact[] =
1131 -472, 38, 138, 1015, -472, -472, 59, -472, -472, -472,
1132 -472, -472, -472, -472, -2, 80, 35, -472, -472, -472,
1133 -472, -29, -50, 18, 174, -37, -472, -472, -472, 80,
1134 73, 93, -472, -472, -472, -472, -472, -472, 744, -22,
1135 -472, -21, -472, 9, 3, 12, 54, 64, -472, 37,
1136 73, 744, 84, 84, 84, 84, -472, -472, -472, -472,
1137 -472, 62, -472, -472, -472, -472, -472, -472, -472, -472,
1138 -472, -472, -472, -472, -472, -472, -472, 173, 176, 177,
1139 431, -472, 86, 69, -472, -472, -106, -472, -472, -472,
1140 -472, -472, -472, -472, -472, -472, 772, 28, 343, -472,
1141 -472, 1211, -472, -472, 162, 66, 180, 169, 172, -472,
1142 -472, -472, -472, -472, 802, 802, 802, 831, -472, 72,
1143 74, -472, -472, -106, -46, 76, 504, -472, 62, 1011,
1144 -472, 1011, 1011, -472, -472, -472, -472, -472, -472, -472,
1145 -472, -472, -472, 1011, -472, 802, -472, 148, 80, -472,
1146 -472, -472, -472, -472, -472, -472, -472, -472, -472, -472,
1147 -472, -472, -472, -472, -472, -472, -472, 802, 802, 802,
1148 802, 802, 802, -472, -472, -472, -472, 802, 802, 802,
1149 802, -472, -472, -472, -472, -472, -472, -472, -472, -472,
1150 -472, -472, -472, -472, 802, 802, 802, 802, 802, 80,
1151 -472, 24, -472, -472, -472, -472, -472, -472, -472, -472,
1152 -70, 83, 83, 83, 101, 118, 192, 137, 193, 147,
1153 194, 153, 195, 204, 207, 170, 197, 209, 889, 83,
1154 802, 802, 802, -472, 565, -472, 105, 103, -472, -472,
1155 -472, -472, -472, -472, -472, -472, 171, 107, 108, 109,
1156 110, 113, 831, 114, 115, 116, 117, 122, -472, -472,
1157 -472, -472, 127, -472, 128, -472, -472, 744, 129, 130,
1158 -472, 1011, 132, 131, 133, 144, 145, 152, 154, 1011,
1159 1011, 1011, 155, 219, 744, 802, 802, 243, -472, -16,
1160 -472, -472, -472, -472, -472, -472, -472, -472, -472, -472,
1161 -472, -472, -472, 610, 831, 476, 244, -472, -472, -472,
1162 -102, -32, -106, -472, 86, -472, 156, 150, 638, -472,
1163 -472, 253, 831, 831, 831, 831, 831, -472, -90, 831,
1164 831, 831, 831, 831, 269, 272, 1011, 4, -472, 17,
1165 -472, 163, 1011, 161, 802, 802, 802, 802, 802, 166,
1166 167, 178, 802, 802, 1011, 1011, 179, -472, 265, 278,
1167 -472, 83, -472, -39, -71, -472, -35, -472, -472, -472,
1168 -472, -472, 698, 260, -472, 185, 163, 186, 203, 205,
1169 206, 831, -472, 210, 211, 213, 214, 259, 1011, 1011,
1170 175, 1011, 281, 1011, 802, -472, 215, 1011, 216, -472,
1171 -472, 217, 218, 1011, 1011, 1011, -472, -472, 202, -472,
1172 802, -472, -472, -472, -472, -472, -472, -472, -472, -472,
1173 266, 303, 228, 831, 831, 831, 831, -472, 831, 831,
1174 831, 831, 802, 220, 229, 802, 232, -472, 232, -472,
1175 234, 1011, 236, 802, 802, 802, -472, -472, -472, 802,
1176 1011, 317, -472, -472, -472, 240, 238, 245, 247, 246,
1177 248, 249, 250, 251, 359, 42, 234, 252, 325, -472,
1178 -472, 802, 255, 1011, -472, -472, -472, 254, -472, -472,
1179 831, -472, 831, 831, -472, -472, -472, -472, -472, 1011,
1180 -472, 1124, 61, 349, -472, -472, 258, -472, 264, 270,
1181 271, -472, 275, -472, 1124, 383, -472, -472, -472, -472,
1182 387, 277, 1011, 1011, 389, 332, -472, 1011, 397, -472,
1186 /* YYPGOTO[NTERM-NUM]. */
1187 static const short int yypgoto[] =
1189 -472, -472, -472, 312, 314, 315, 321, 326, -97, -96,
1190 -446, -472, 385, 405, -139, -472, -263, 57, -472, -195,
1191 -472, -44, -472, -38, -472, -69, 305, -472, -5, 221,
1192 -209, 55, -472, -472, -472, 382, -472, -472, -472, -472,
1193 2, -472, 81, -472, -472, 419, -472, -472, -472, -472,
1194 -472, 449, -472, -471, -103, -128, -80, -472, 413, -472,
1195 -472, -472, -472, -472, 63, 6, -472, -472, 82, -472,
1199 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1200 positive, shift that token. If negative, reduce the rule which
1201 number is the opposite. If zero, do what YYDEFACT says.
1202 If YYTABLE_NINF, syntax error. */
1203 #define YYTABLE_NINF -146
1204 static const short int yytable[] =
1206 84, 141, 142, 262, 263, 25, 340, 111, 40, 267,
1207 89, 123, 92, 84, 391, 264, 130, 291, 292, 491,
1208 502, 358, -84, 44, 45, 46, 260, 393, 260, 260,
1209 368, 127, 131, 511, 309, 127, 381, 19, 4, 20,
1210 260, 359, 47, 132, 382, 25, 504, 133, 134, 135,
1211 136, 137, 138, 139, 140, 381, 287, 123, 129, 30,
1212 284, 392, 288, 415, 40, 265, 133, 134, 135, 136,
1213 137, 138, 139, 140, 392, 49, 211, 212, 213, 50,
1214 232, 96, 97, 98, 125, 99, 100, 381, 56, 270,
1215 233, 381, 274, 414, 363, 364, 366, 275, 276, 277,
1216 278, 416, 369, 58, 27, 127, 28, 129, 115, 116,
1217 117, 60, 229, 90, 19, 93, 20, 282, 283, 112,
1218 113, 204, 205, 285, 286, 308, 293, 294, 104, 268,
1219 269, 129, 271, 272, 129, -44, -44, 105, -145, 129,
1220 129, 129, 129, 341, 31, 32, 33, 34, 35, 36,
1221 37, 349, 350, 351, -43, -43, 279, 280, 281, 129,
1222 129, 310, 311, 312, -42, -42, 413, 108, 260, 5,
1223 -41, -41, 6, 469, 490, 470, 260, 260, 260, 106,
1224 7, 8, 9, 10, 11, 12, 13, 295, 296, 107,
1225 -85, 118, 203, 503, 119, 120, 314, 126, 207, 208,
1226 14, 51, 209, 230, 234, 231, 356, 266, 390, 289,
1227 -48, -47, -46, -45, 396, 298, 7, 8, 9, 52,
1228 11, 53, 13, 336, 54, -51, 408, 409, -52, 84,
1229 299, 318, 319, 260, 320, 322, 323, 324, 325, 260,
1230 354, 326, 329, 330, 331, 332, 84, 355, 129, 312,
1231 333, 260, 260, 334, 335, 337, 339, 343, 353, 344,
1232 433, 434, 342, 436, 398, 438, 400, 401, 402, 442,
1233 345, 346, 406, 357, 367, 446, 447, 448, 347, 373,
1234 348, 352, 372, 375, 388, 260, 260, 389, 260, 394,
1235 260, 397, 403, 404, 260, 411, 412, 358, 432, 437,
1236 260, 260, 260, 435, 405, 410, 129, 399, 129, 129,
1237 129, 421, 423, 472, 129, 407, 370, 376, 377, 378,
1238 379, 380, 478, 451, 383, 384, 385, 386, 387, 424,
1239 449, 425, 426, 453, 314, 479, 428, 429, 260, 430,
1240 431, 441, 443, 444, 445, 496, 464, 260, 133, 134,
1241 135, 136, 137, 138, 139, 140, 129, 454, 468, 465,
1242 471, 501, 473, 474, 475, 476, 480, 481, 141, 142,
1243 260, 482, 450, 483, 489, 484, 427, 485, 486, 487,
1244 488, 493, 392, 497, 515, 516, 260, 495, 505, 519,
1245 506, 494, 521, 507, 463, 141, 142, 129, 512, 508,
1246 509, 510, 513, 514, 517, 129, 129, 129, 518, 260,
1247 260, 129, 520, 194, 260, 195, 196, 260, 455, 456,
1248 457, 458, 197, 459, 460, 461, 462, 198, 101, 55,
1249 419, 236, 110, 129, 121, 62, 63, 64, 65, 66,
1250 67, 68, 69, 70, 71, 72, 73, 74, 57, 307,
1251 75, 76, 26, 418, 95, 477, 0, 440, 422, 19,
1252 0, 20, 0, 0, 0, 0, 0, 0, 0, 0,
1253 0, 0, 0, 0, 0, 498, 0, 499, 500, 121,
1254 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
1255 224, 73, 74, 0, 0, 75, 76, 0, 0, 0,
1256 0, 0, 0, 0, 19, 0, 20, 121, 62, 63,
1257 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
1258 74, 0, 0, 75, 76, 0, 0, 0, 0, 0,
1259 0, 0, 19, 0, 20, 0, 0, 0, 0, 0,
1260 0, 0, 0, 0, 235, 0, 0, 0, 0, 0,
1261 0, 0, 0, 0, 0, 0, 0, 0, 77, 0,
1262 0, 78, 0, 0, 79, 0, 80, 122, 121, 62,
1263 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
1264 73, 74, 0, 0, 75, 76, 0, 0, 0, 0,
1265 0, 0, 0, 19, 0, 20, 0, 0, 0, 0,
1266 0, 0, 0, 77, 0, 313, 78, 0, 0, 79,
1267 0, 80, 365, 121, 214, 215, 216, 217, 218, 219,
1268 220, 221, 222, 223, 224, 73, 74, 0, 0, 75,
1269 76, 77, 0, 0, 78, 0, 0, 79, 19, 80,
1270 20, 121, 62, 63, 64, 65, 66, 67, 68, 69,
1271 70, 71, 72, 73, 74, 0, 0, 75, 76, 0,
1272 0, 0, 0, 0, 0, 0, 19, 0, 20, 0,
1273 0, 0, 0, 0, 0, 0, 0, 0, 374, 0,
1274 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1275 0, 0, 77, 0, 0, 78, 0, 0, 79, 0,
1276 80, 121, 62, 63, 64, 65, 66, 67, 68, 69,
1277 70, 71, 72, 73, 74, 0, 0, 75, 76, 0,
1278 0, 0, 0, 0, 0, 0, 19, 0, 20, 0,
1279 0, 0, 0, 0, 0, 0, 0, 77, 417, 0,
1280 78, 0, 362, 79, 0, 80, 0, 61, 62, 63,
1281 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
1282 74, 0, 0, 75, 76, 77, 0, 0, 78, 0,
1283 0, 79, 19, 80, 20, 128, 62, 63, 64, 65,
1284 66, 67, 68, 69, 70, 71, 72, 73, 74, 0,
1285 0, 75, 76, 0, 0, 0, 0, 0, 0, 0,
1286 19, 0, 20, 0, 0, 121, 62, 63, 64, 65,
1287 66, 67, 68, 69, 70, 71, 72, 73, 74, 0,
1288 0, 75, 76, 0, 0, 77, 0, 0, 78, 0,
1289 19, 79, 20, 80, 121, 214, 215, 216, 217, 218,
1290 219, 220, 221, 222, 223, 224, 73, 74, 0, 0,
1291 75, 76, 0, 0, 0, 0, 0, 0, 0, 19,
1292 0, 20, 0, 0, 0, 0, 0, 0, 0, 0,
1293 0, 77, 0, 0, 78, 0, 0, 79, 0, 80,
1294 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1295 0, 0, 0, 0, 0, 0, 0, 0, 0, 77,
1296 0, 0, 78, 0, 0, 79, 0, 80, 75, 76,
1297 0, 300, 301, 302, 0, 0, 0, 19, 0, 20,
1298 0, 0, 0, 0, 0, 0, 0, 0, 0, 77,
1299 0, 0, 78, 0, 0, 79, 0, 80, 0, 0,
1300 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1301 0, 0, 0, 0, 0, 0, 0, 0, 77, 0,
1302 0, 78, 0, 0, 79, 0, 80, 149, 150, 151,
1303 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
1304 162, 163, 164, 165, 166, 0, 0, 0, 0, 0,
1305 247, 0, 248, 173, 174, 175, 176, 0, 249, 250,
1306 251, 181, 182, 183, 184, 185, 186, 187, 188, 189,
1307 190, 191, 192, 193, 0, 0, 0, 0, 0, 303,
1308 0, 0, 304, 0, 305, 0, 0, 306, 238, 239,
1309 75, 76, 240, 241, 242, 243, 244, 245, 0, 19,
1310 0, 20, -54, 19, 0, 20, 0, 0, 0, 6,
1311 -54, -54, 0, 0, 0, 0, 0, -54, -54, -54,
1312 -54, -54, -54, -54, 0, -54, 21, 0, 0, 0,
1313 0, 0, 246, 22, 0, 0, 0, 23, 0, 0,
1314 0, 0, 0, 0, 0, 0, 0, 0, 0, 149,
1315 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1316 160, 161, 162, 163, 164, 165, 166, 0, 0, 0,
1317 0, 0, 247, 0, 248, 173, 174, 175, 176, 0,
1318 249, 250, 251, 181, 182, 183, 184, 185, 186, 187,
1319 188, 189, 190, 191, 192, 193, 0, 0, 0, 0,
1320 0, 238, 239, 0, 252, 240, 241, 242, 243, 244,
1321 245, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1322 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1323 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1324 0, 0, 0, 0, 0, 246, 0, 0, 0, 0,
1325 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1326 0, 0, 149, 150, 151, 152, 153, 154, 155, 156,
1327 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
1328 0, 0, 0, 0, 0, 247, 0, 248, 173, 174,
1329 175, 176, 0, 249, 250, 251, 181, 182, 183, 184,
1330 185, 186, 187, 188, 189, 190, 191, 192, 193, 144,
1331 0, 0, 0, 0, 0, 0, 0, 252, 0, 0,
1332 145, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1333 146, 147, 0, 0, 0, 0, 0, 0, 0, 0,
1334 0, 0, 0, 0, 0, 0, 148, 0, 0, 149,
1335 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1336 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
1337 0, 0, 170, 171, 172, 173, 174, 175, 176, 177,
1338 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
1339 188, 189, 190, 191, 192, 193
1342 static const short int yycheck[] =
1344 38, 98, 98, 131, 132, 3, 269, 51, 29, 148,
1345 32, 80, 33, 51, 10, 143, 96, 212, 213, 465,
1346 491, 37, 128, 52, 53, 54, 129, 10, 131, 132,
1347 132, 137, 4, 504, 229, 137, 126, 28, 0, 30,
1348 143, 57, 71, 15, 134, 43, 492, 5, 6, 7,
1349 8, 9, 10, 11, 12, 126, 126, 126, 96, 61,
1350 199, 57, 132, 134, 29, 145, 5, 6, 7, 8,
1351 9, 10, 11, 12, 57, 125, 114, 115, 116, 61,
1352 126, 72, 73, 74, 82, 76, 77, 126, 125, 169,
1353 136, 126, 172, 132, 303, 304, 305, 177, 178, 179,
1354 180, 136, 134, 30, 45, 137, 47, 145, 53, 54,
1355 55, 18, 117, 135, 28, 136, 30, 197, 198, 35,
1356 36, 55, 56, 99, 100, 228, 25, 26, 125, 167,
1357 168, 169, 170, 171, 172, 17, 18, 125, 0, 177,
1358 178, 179, 180, 271, 64, 65, 66, 67, 68, 69,
1359 70, 279, 280, 281, 17, 18, 194, 195, 196, 197,
1360 198, 230, 231, 232, 17, 18, 361, 130, 271, 31,
1361 17, 18, 34, 436, 132, 438, 279, 280, 281, 125,
1362 42, 43, 44, 45, 46, 47, 48, 17, 18, 125,
1363 128, 18, 30, 132, 18, 18, 234, 128, 18, 30,
1364 62, 27, 30, 131, 128, 131, 286, 59, 336, 126,
1365 18, 18, 18, 18, 342, 18, 42, 43, 44, 45,
1366 46, 47, 48, 267, 50, 21, 354, 355, 21, 267,
1367 21, 126, 129, 336, 63, 128, 128, 128, 128, 342,
1368 284, 128, 128, 128, 128, 128, 284, 285, 286, 318,
1369 128, 354, 355, 126, 126, 126, 126, 126, 39, 126,
1370 388, 389, 130, 391, 344, 393, 346, 347, 348, 397,
1371 126, 126, 352, 30, 30, 403, 404, 405, 126, 129,
1372 126, 126, 126, 30, 15, 388, 389, 15, 391, 126,
1373 393, 130, 126, 126, 397, 30, 18, 37, 39, 18,
1374 403, 404, 405, 128, 126, 126, 344, 345, 346, 347,
1375 348, 126, 126, 441, 352, 353, 314, 322, 323, 324,
1376 325, 326, 450, 57, 329, 330, 331, 332, 333, 126,
1377 128, 126, 126, 30, 372, 18, 126, 126, 441, 126,
1378 126, 126, 126, 126, 126, 473, 126, 450, 5, 6,
1379 7, 8, 9, 10, 11, 12, 394, 129, 126, 130,
1380 126, 489, 126, 443, 444, 445, 126, 129, 465, 465,
1381 473, 126, 410, 126, 15, 129, 381, 129, 129, 129,
1382 129, 129, 57, 129, 512, 513, 489, 132, 39, 517,
1383 132, 471, 520, 129, 432, 492, 492, 435, 15, 129,
1384 129, 126, 15, 126, 15, 443, 444, 445, 76, 512,
1385 513, 449, 15, 101, 517, 101, 101, 520, 423, 424,
1386 425, 426, 101, 428, 429, 430, 431, 101, 43, 24,
1387 373, 126, 50, 471, 3, 4, 5, 6, 7, 8,
1388 9, 10, 11, 12, 13, 14, 15, 16, 29, 228,
1389 19, 20, 3, 372, 41, 449, -1, 394, 376, 28,
1390 -1, 30, -1, -1, -1, -1, -1, -1, -1, -1,
1391 -1, -1, -1, -1, -1, 480, -1, 482, 483, 3,
1392 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1393 14, 15, 16, -1, -1, 19, 20, -1, -1, -1,
1394 -1, -1, -1, -1, 28, -1, 30, 3, 4, 5,
1395 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1396 16, -1, -1, 19, 20, -1, -1, -1, -1, -1,
1397 -1, -1, 28, -1, 30, -1, -1, -1, -1, -1,
1398 -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
1399 -1, -1, -1, -1, -1, -1, -1, -1, 127, -1,
1400 -1, 130, -1, -1, 133, -1, 135, 136, 3, 4,
1401 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1402 15, 16, -1, -1, 19, 20, -1, -1, -1, -1,
1403 -1, -1, -1, 28, -1, 30, -1, -1, -1, -1,
1404 -1, -1, -1, 127, -1, 40, 130, -1, -1, 133,
1405 -1, 135, 136, 3, 4, 5, 6, 7, 8, 9,
1406 10, 11, 12, 13, 14, 15, 16, -1, -1, 19,
1407 20, 127, -1, -1, 130, -1, -1, 133, 28, 135,
1408 30, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1409 12, 13, 14, 15, 16, -1, -1, 19, 20, -1,
1410 -1, -1, -1, -1, -1, -1, 28, -1, 30, -1,
1411 -1, -1, -1, -1, -1, -1, -1, -1, 40, -1,
1412 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1413 -1, -1, 127, -1, -1, 130, -1, -1, 133, -1,
1414 135, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1415 12, 13, 14, 15, 16, -1, -1, 19, 20, -1,
1416 -1, -1, -1, -1, -1, -1, 28, -1, 30, -1,
1417 -1, -1, -1, -1, -1, -1, -1, 127, 40, -1,
1418 130, -1, 132, 133, -1, 135, -1, 3, 4, 5,
1419 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1420 16, -1, -1, 19, 20, 127, -1, -1, 130, -1,
1421 -1, 133, 28, 135, 30, 3, 4, 5, 6, 7,
1422 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
1423 -1, 19, 20, -1, -1, -1, -1, -1, -1, -1,
1424 28, -1, 30, -1, -1, 3, 4, 5, 6, 7,
1425 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
1426 -1, 19, 20, -1, -1, 127, -1, -1, 130, -1,
1427 28, 133, 30, 135, 3, 4, 5, 6, 7, 8,
1428 9, 10, 11, 12, 13, 14, 15, 16, -1, -1,
1429 19, 20, -1, -1, -1, -1, -1, -1, -1, 28,
1430 -1, 30, -1, -1, -1, -1, -1, -1, -1, -1,
1431 -1, 127, -1, -1, 130, -1, -1, 133, -1, 135,
1432 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1433 -1, -1, -1, -1, -1, -1, -1, -1, -1, 127,
1434 -1, -1, 130, -1, -1, 133, -1, 135, 19, 20,
1435 -1, 22, 23, 24, -1, -1, -1, 28, -1, 30,
1436 -1, -1, -1, -1, -1, -1, -1, -1, -1, 127,
1437 -1, -1, 130, -1, -1, 133, -1, 135, -1, -1,
1438 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1439 -1, -1, -1, -1, -1, -1, -1, -1, 127, -1,
1440 -1, 130, -1, -1, 133, -1, 135, 78, 79, 80,
1441 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
1442 91, 92, 93, 94, 95, -1, -1, -1, -1, -1,
1443 101, -1, 103, 104, 105, 106, 107, -1, 109, 110,
1444 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
1445 121, 122, 123, 124, -1, -1, -1, -1, -1, 130,
1446 -1, -1, 133, -1, 135, -1, -1, 138, 17, 18,
1447 19, 20, 21, 22, 23, 24, 25, 26, -1, 28,
1448 -1, 30, 27, 28, -1, 30, -1, -1, -1, 34,
1449 35, 36, -1, -1, -1, -1, -1, 42, 43, 44,
1450 45, 46, 47, 48, -1, 50, 51, -1, -1, -1,
1451 -1, -1, 61, 58, -1, -1, -1, 62, -1, -1,
1452 -1, -1, -1, -1, -1, -1, -1, -1, -1, 78,
1453 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1454 89, 90, 91, 92, 93, 94, 95, -1, -1, -1,
1455 -1, -1, 101, -1, 103, 104, 105, 106, 107, -1,
1456 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
1457 119, 120, 121, 122, 123, 124, -1, -1, -1, -1,
1458 -1, 17, 18, -1, 133, 21, 22, 23, 24, 25,
1459 26, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1460 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1461 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1462 -1, -1, -1, -1, -1, 61, -1, -1, -1, -1,
1463 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1464 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
1465 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1466 -1, -1, -1, -1, -1, 101, -1, 103, 104, 105,
1467 106, 107, -1, 109, 110, 111, 112, 113, 114, 115,
1468 116, 117, 118, 119, 120, 121, 122, 123, 124, 38,
1469 -1, -1, -1, -1, -1, -1, -1, 133, -1, -1,
1470 49, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1471 59, 60, -1, -1, -1, -1, -1, -1, -1, -1,
1472 -1, -1, -1, -1, -1, -1, 75, -1, -1, 78,
1473 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1474 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
1475 -1, -1, 101, 102, 103, 104, 105, 106, 107, 108,
1476 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
1477 119, 120, 121, 122, 123, 124
1480 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1481 symbol of state STATE-NUM. */
1482 static const unsigned char yystos[] =
1484 0, 171, 172, 173, 0, 31, 34, 42, 43, 44,
1485 45, 46, 47, 48, 62, 152, 186, 188, 190, 28,
1486 30, 51, 58, 62, 151, 179, 190, 45, 47, 189,
1487 61, 64, 65, 66, 67, 68, 69, 70, 153, 184,
1488 29, 196, 197, 198, 52, 53, 54, 71, 176, 125,
1489 61, 27, 45, 47, 50, 152, 125, 184, 30, 174,
1490 18, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1491 12, 13, 14, 15, 16, 19, 20, 127, 130, 133,
1492 135, 140, 160, 161, 162, 163, 164, 179, 193, 32,
1493 135, 185, 33, 136, 187, 197, 72, 73, 74, 76,
1494 77, 151, 199, 201, 125, 125, 125, 125, 130, 177,
1495 174, 160, 35, 36, 170, 170, 170, 170, 18, 18,
1496 18, 3, 136, 164, 165, 179, 128, 137, 3, 162,
1497 195, 4, 15, 5, 6, 7, 8, 9, 10, 11,
1498 12, 147, 148, 149, 38, 49, 59, 60, 75, 78,
1499 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1500 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
1501 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
1502 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
1503 121, 122, 123, 124, 142, 143, 144, 145, 146, 205,
1504 206, 208, 209, 30, 55, 56, 175, 18, 30, 30,
1505 178, 162, 162, 162, 4, 5, 6, 7, 8, 9,
1506 10, 11, 12, 13, 14, 147, 148, 150, 162, 167,
1507 131, 131, 126, 136, 128, 40, 165, 166, 17, 18,
1508 21, 22, 23, 24, 25, 26, 61, 101, 103, 109,
1509 110, 111, 133, 142, 143, 144, 145, 146, 168, 192,
1510 193, 194, 194, 194, 194, 195, 59, 153, 162, 162,
1511 195, 162, 162, 202, 195, 195, 195, 195, 195, 162,
1512 162, 162, 195, 195, 153, 99, 100, 126, 132, 126,
1513 158, 158, 158, 25, 26, 17, 18, 141, 18, 21,
1514 22, 23, 24, 130, 133, 135, 138, 168, 193, 158,
1515 164, 164, 164, 40, 162, 181, 182, 183, 126, 129,
1516 63, 191, 128, 128, 128, 128, 128, 167, 169, 128,
1517 128, 128, 128, 128, 126, 126, 160, 126, 155, 126,
1518 155, 194, 130, 126, 126, 126, 126, 126, 126, 194,
1519 194, 194, 126, 39, 160, 162, 195, 30, 37, 57,
1520 156, 159, 132, 169, 169, 136, 169, 30, 132, 134,
1521 179, 180, 126, 129, 40, 30, 167, 167, 167, 167,
1522 167, 126, 134, 167, 167, 167, 167, 167, 15, 15,
1523 194, 10, 57, 10, 126, 207, 194, 130, 195, 162,
1524 195, 195, 195, 126, 126, 126, 195, 162, 194, 194,
1525 126, 30, 18, 158, 132, 134, 136, 40, 181, 156,
1526 157, 126, 207, 126, 126, 126, 126, 167, 126, 126,
1527 126, 126, 39, 194, 194, 128, 194, 18, 194, 195,
1528 203, 126, 194, 126, 126, 126, 194, 194, 194, 128,
1529 162, 57, 154, 30, 129, 167, 167, 167, 167, 167,
1530 167, 167, 167, 162, 126, 130, 203, 204, 126, 155,
1531 155, 126, 194, 126, 195, 195, 195, 204, 194, 18,
1532 126, 129, 126, 126, 129, 129, 129, 129, 129, 15,
1533 132, 149, 200, 129, 195, 132, 194, 129, 167, 167,
1534 167, 194, 192, 132, 149, 39, 132, 129, 129, 129,
1535 126, 192, 15, 15, 126, 194, 194, 15, 76, 194,
1539 #define yyerrok (yyerrstatus = 0)
1540 #define yyclearin (yychar = YYEMPTY)
1541 #define YYEMPTY (-2)
1544 #define YYACCEPT goto yyacceptlab
1545 #define YYABORT goto yyabortlab
1546 #define YYERROR goto yyerrorlab
1549 /* Like YYERROR except do call yyerror. This remains here temporarily
1550 to ease the transition to the new meaning of YYERROR, for GCC.
1551 Once GCC version 2 has supplanted version 1, this can go. */
1553 #define YYFAIL goto yyerrlab
1555 #define YYRECOVERING() (!!yyerrstatus)
1557 #define YYBACKUP(Token, Value) \
1559 if (yychar == YYEMPTY && yylen == 1) \
1563 yytoken = YYTRANSLATE (yychar); \
1569 yyerror (YY_("syntax error: cannot back up")); \
1576 #define YYERRCODE 256
1579 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1580 If N is 0, then set CURRENT to the empty location which ends
1581 the previous symbol: RHS[0] (always defined). */
1583 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1584 #ifndef YYLLOC_DEFAULT
1585 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1589 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1590 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1591 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1592 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1596 (Current).first_line = (Current).last_line = \
1597 YYRHSLOC (Rhs, 0).last_line; \
1598 (Current).first_column = (Current).last_column = \
1599 YYRHSLOC (Rhs, 0).last_column; \
1605 /* YY_LOCATION_PRINT -- Print the location on the stream.
1606 This macro was not mandated originally: define only if we know
1607 we won't break user code: when these are the locations we know. */
1609 #ifndef YY_LOCATION_PRINT
1610 # if YYLTYPE_IS_TRIVIAL
1611 # define YY_LOCATION_PRINT(File, Loc) \
1612 fprintf (File, "%d.%d-%d.%d", \
1613 (Loc).first_line, (Loc).first_column, \
1614 (Loc).last_line, (Loc).last_column)
1616 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1621 /* YYLEX -- calling `yylex' with the right arguments. */
1624 # define YYLEX yylex (YYLEX_PARAM)
1626 # define YYLEX yylex ()
1629 /* Enable debugging if requested. */
1633 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1634 # define YYFPRINTF fprintf
1637 # define YYDPRINTF(Args) \
1643 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1647 YYFPRINTF (stderr, "%s ", Title); \
1648 yysymprint (stderr, \
1650 YYFPRINTF (stderr, "\n"); \
1654 /*------------------------------------------------------------------.
1655 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1657 `------------------------------------------------------------------*/
1659 #if defined (__STDC__) || defined (__cplusplus)
1661 yy_stack_print (short int *bottom, short int *top)
1664 yy_stack_print (bottom, top)
1669 YYFPRINTF (stderr, "Stack now");
1670 for (/* Nothing. */; bottom <= top; ++bottom)
1671 YYFPRINTF (stderr, " %d", *bottom);
1672 YYFPRINTF (stderr, "\n");
1675 # define YY_STACK_PRINT(Bottom, Top) \
1678 yy_stack_print ((Bottom), (Top)); \
1682 /*------------------------------------------------.
1683 | Report that the YYRULE is going to be reduced. |
1684 `------------------------------------------------*/
1686 #if defined (__STDC__) || defined (__cplusplus)
1688 yy_reduce_print (int yyrule)
1691 yy_reduce_print (yyrule)
1696 unsigned long int yylno = yyrline[yyrule];
1697 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
1699 /* Print the symbols being reduced, and their result. */
1700 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
1701 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1702 YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
1705 # define YY_REDUCE_PRINT(Rule) \
1708 yy_reduce_print (Rule); \
1711 /* Nonzero means print parse trace. It is left uninitialized so that
1712 multiple parsers can coexist. */
1714 #else /* !YYDEBUG */
1715 # define YYDPRINTF(Args)
1716 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1717 # define YY_STACK_PRINT(Bottom, Top)
1718 # define YY_REDUCE_PRINT(Rule)
1719 #endif /* !YYDEBUG */
1722 /* YYINITDEPTH -- initial size of the parser's stacks. */
1724 # define YYINITDEPTH 200
1727 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1728 if the built-in stack extension method is used).
1730 Do not make this value too large; the results are undefined if
1731 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1732 evaluated with infinite-precision integer arithmetic. */
1735 # define YYMAXDEPTH 10000
1743 # if defined (__GLIBC__) && defined (_STRING_H)
1744 # define yystrlen strlen
1746 /* Return the length of YYSTR. */
1748 # if defined (__STDC__) || defined (__cplusplus)
1749 yystrlen (const char *yystr)
1755 const char *yys = yystr;
1757 while (*yys++ != '\0')
1760 return yys - yystr - 1;
1766 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1767 # define yystpcpy stpcpy
1769 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1772 # if defined (__STDC__) || defined (__cplusplus)
1773 yystpcpy (char *yydest, const char *yysrc)
1775 yystpcpy (yydest, yysrc)
1781 const char *yys = yysrc;
1783 while ((*yyd++ = *yys++) != '\0')
1792 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1793 quotes and backslashes, so that it's suitable for yyerror. The
1794 heuristic is that double-quoting is unnecessary unless the string
1795 contains an apostrophe, a comma, or backslash (other than
1796 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1797 null, do not copy; instead, return the length of what the result
1800 yytnamerr (char *yyres, const char *yystr)
1805 char const *yyp = yystr;
1812 goto do_not_strip_quotes;
1816 goto do_not_strip_quotes;
1829 do_not_strip_quotes: ;
1833 return yystrlen (yystr);
1835 return yystpcpy (yyres, yystr) - yyres;
1839 #endif /* YYERROR_VERBOSE */
1844 /*--------------------------------.
1845 | Print this symbol on YYOUTPUT. |
1846 `--------------------------------*/
1848 #if defined (__STDC__) || defined (__cplusplus)
1850 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
1853 yysymprint (yyoutput, yytype, yyvaluep)
1859 /* Pacify ``unused variable'' warnings. */
1862 if (yytype < YYNTOKENS)
1863 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1865 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1869 if (yytype < YYNTOKENS)
1870 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1877 YYFPRINTF (yyoutput, ")");
1880 #endif /* ! YYDEBUG */
1881 /*-----------------------------------------------.
1882 | Release the memory associated to this symbol. |
1883 `-----------------------------------------------*/
1885 #if defined (__STDC__) || defined (__cplusplus)
1887 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1890 yydestruct (yymsg, yytype, yyvaluep)
1896 /* Pacify ``unused variable'' warnings. */
1901 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1912 /* Prevent warnings from -Wmissing-prototypes. */
1914 #ifdef YYPARSE_PARAM
1915 # if defined (__STDC__) || defined (__cplusplus)
1916 int yyparse (void *YYPARSE_PARAM);
1920 #else /* ! YYPARSE_PARAM */
1921 #if defined (__STDC__) || defined (__cplusplus)
1926 #endif /* ! YYPARSE_PARAM */
1930 /* The look-ahead symbol. */
1933 /* The semantic value of the look-ahead symbol. */
1936 /* Number of syntax errors so far. */
1945 #ifdef YYPARSE_PARAM
1946 # if defined (__STDC__) || defined (__cplusplus)
1947 int yyparse (void *YYPARSE_PARAM)
1949 int yyparse (YYPARSE_PARAM)
1950 void *YYPARSE_PARAM;
1952 #else /* ! YYPARSE_PARAM */
1953 #if defined (__STDC__) || defined (__cplusplus)
1967 /* Number of tokens to shift before error messages enabled. */
1969 /* Look-ahead token as an internal (translated) token number. */
1972 /* Three stacks and their tools:
1973 `yyss': related to states,
1974 `yyvs': related to semantic values,
1975 `yyls': related to locations.
1977 Refer to the stacks thru separate pointers, to allow yyoverflow
1978 to reallocate them elsewhere. */
1980 /* The state stack. */
1981 short int yyssa[YYINITDEPTH];
1982 short int *yyss = yyssa;
1985 /* The semantic value stack. */
1986 YYSTYPE yyvsa[YYINITDEPTH];
1987 YYSTYPE *yyvs = yyvsa;
1992 #define YYPOPSTACK (yyvsp--, yyssp--)
1994 YYSIZE_T yystacksize = YYINITDEPTH;
1996 /* The variables used to return semantic value and location from the
2001 /* When reducing, the number of symbols on the RHS of the reduced
2005 YYDPRINTF ((stderr, "Starting parse\n"));
2010 yychar = YYEMPTY; /* Cause a token to be read. */
2012 /* Initialize stack pointers.
2013 Waste one element of value and location stack
2014 so that they stay on the same level as the state stack.
2015 The wasted elements are never initialized. */
2022 /*------------------------------------------------------------.
2023 | yynewstate -- Push a new state, which is found in yystate. |
2024 `------------------------------------------------------------*/
2026 /* In all cases, when you get here, the value and location stacks
2027 have just been pushed. so pushing a state here evens the stacks.
2034 if (yyss + yystacksize - 1 <= yyssp)
2036 /* Get the current used size of the three stacks, in elements. */
2037 YYSIZE_T yysize = yyssp - yyss + 1;
2041 /* Give user a chance to reallocate the stack. Use copies of
2042 these so that the &'s don't force the real ones into
2044 YYSTYPE *yyvs1 = yyvs;
2045 short int *yyss1 = yyss;
2048 /* Each stack pointer address is followed by the size of the
2049 data in use in that stack, in bytes. This used to be a
2050 conditional around just the two extra args, but that might
2051 be undefined if yyoverflow is a macro. */
2052 yyoverflow (YY_("memory exhausted"),
2053 &yyss1, yysize * sizeof (*yyssp),
2054 &yyvs1, yysize * sizeof (*yyvsp),
2061 #else /* no yyoverflow */
2062 # ifndef YYSTACK_RELOCATE
2063 goto yyexhaustedlab;
2065 /* Extend the stack our own way. */
2066 if (YYMAXDEPTH <= yystacksize)
2067 goto yyexhaustedlab;
2069 if (YYMAXDEPTH < yystacksize)
2070 yystacksize = YYMAXDEPTH;
2073 short int *yyss1 = yyss;
2074 union yyalloc *yyptr =
2075 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2077 goto yyexhaustedlab;
2078 YYSTACK_RELOCATE (yyss);
2079 YYSTACK_RELOCATE (yyvs);
2081 # undef YYSTACK_RELOCATE
2083 YYSTACK_FREE (yyss1);
2086 #endif /* no yyoverflow */
2088 yyssp = yyss + yysize - 1;
2089 yyvsp = yyvs + yysize - 1;
2092 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2093 (unsigned long int) yystacksize));
2095 if (yyss + yystacksize - 1 <= yyssp)
2099 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2108 /* Do appropriate processing given the current state. */
2109 /* Read a look-ahead token if we need one and don't already have one. */
2112 /* First try to decide what to do without reference to look-ahead token. */
2114 yyn = yypact[yystate];
2115 if (yyn == YYPACT_NINF)
2118 /* Not known => get a look-ahead token if don't already have one. */
2120 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
2121 if (yychar == YYEMPTY)
2123 YYDPRINTF ((stderr, "Reading a token: "));
2127 if (yychar <= YYEOF)
2129 yychar = yytoken = YYEOF;
2130 YYDPRINTF ((stderr, "Now at end of input.\n"));
2134 yytoken = YYTRANSLATE (yychar);
2135 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2138 /* If the proper action on seeing token YYTOKEN is to reduce or to
2139 detect an error, take that action. */
2141 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2146 if (yyn == 0 || yyn == YYTABLE_NINF)
2155 /* Shift the look-ahead token. */
2156 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2158 /* Discard the token being shifted unless it is eof. */
2159 if (yychar != YYEOF)
2165 /* Count tokens shifted since error; after three, turn off error
2174 /*-----------------------------------------------------------.
2175 | yydefault -- do the default action for the current state. |
2176 `-----------------------------------------------------------*/
2178 yyn = yydefact[yystate];
2184 /*-----------------------------.
2185 | yyreduce -- Do a reduction. |
2186 `-----------------------------*/
2188 /* yyn is the number of a rule to reduce with. */
2191 /* If YYLEN is nonzero, implement the default value of the action:
2194 Otherwise, the following line sets YYVAL to garbage.
2195 This behavior is undocumented and Bison
2196 users should not rely upon it. Assigning to YYVAL
2197 unconditionally makes the parser a bit smaller, and it avoids a
2198 GCC warning that YYVAL may be used uninitialized. */
2199 yyval = yyvsp[1-yylen];
2202 YY_REDUCE_PRINT (yyn);
2206 #line 292 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2208 (yyval.String) = (yyvsp[-1].String);
2213 #line 295 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2215 (yyval.String) = new std::string("");
2220 #line 302 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2221 { (yyval.String) = new std::string(""); ;}
2225 #line 307 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2227 *(yyvsp[-1].String) += *(yyvsp[0].String);
2228 delete (yyvsp[0].String);
2229 (yyval.String) = (yyvsp[-1].String);
2234 #line 312 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2235 { (yyval.String) = new std::string(""); ;}
2239 #line 317 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2240 { (yyval.String) = new std::string(); ;}
2244 #line 318 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2245 { *(yyvsp[-1].String) += " " + *(yyvsp[0].String); delete (yyvsp[0].String); (yyval.String) = (yyvsp[-1].String); ;}
2249 #line 321 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2250 { (yyval.String) = new std::string(); ;}
2254 #line 322 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2256 (yyvsp[-1].String)->insert(0, ", ");
2257 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2258 delete (yyvsp[0].String);
2259 (yyval.String) = (yyvsp[-1].String);
2264 #line 330 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2266 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2267 delete (yyvsp[0].String);
2268 (yyval.String) = (yyvsp[-1].String);
2273 #line 336 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2274 { (yyval.String) = new std::string(); ;}
2278 #line 340 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2279 { (yyval.String) = new std::string(); ;}
2283 #line 341 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2285 (yyvsp[-1].String)->insert(0, ", ");
2286 if (!(yyvsp[0].String)->empty())
2287 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2288 delete (yyvsp[0].String);
2289 (yyval.String) = (yyvsp[-1].String);
2294 #line 351 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2296 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2297 delete (yyvsp[0].String);
2298 (yyval.String) = (yyvsp[-1].String);
2303 #line 373 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2305 (yyval.Type).newTy = (yyvsp[0].String);
2306 (yyval.Type).oldTy = OpaqueTy;
2311 #line 377 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2313 (yyval.Type).newTy = (yyvsp[0].String);
2314 (yyval.Type).oldTy = UnresolvedTy;
2319 #line 386 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2320 { // Type UpReference
2321 (yyvsp[0].String)->insert(0, "\\");
2322 (yyval.Type).newTy = (yyvsp[0].String);
2323 (yyval.Type).oldTy = NumericTy;
2328 #line 391 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2329 { // Function derived type?
2330 *(yyvsp[-3].Type).newTy += "( " + *(yyvsp[-1].String) + " )";
2331 delete (yyvsp[-1].String);
2332 (yyval.Type).newTy = (yyvsp[-3].Type).newTy;
2333 (yyval.Type).oldTy = FunctionTy;
2338 #line 397 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2339 { // Sized array type?
2340 (yyvsp[-3].String)->insert(0,"[ ");
2341 *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " ]";
2342 delete (yyvsp[-1].Type).newTy;
2343 (yyval.Type).newTy = (yyvsp[-3].String);
2344 (yyval.Type).oldTy = ArrayTy;
2349 #line 404 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2350 { // Packed array type?
2351 (yyvsp[-3].String)->insert(0,"< ");
2352 *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " >";
2353 delete (yyvsp[-1].Type).newTy;
2354 (yyval.Type).newTy = (yyvsp[-3].String);
2355 (yyval.Type).oldTy = PackedTy;
2360 #line 411 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2361 { // Structure type?
2362 (yyvsp[-1].String)->insert(0, "{ ");
2363 *(yyvsp[-1].String) += " }";
2364 (yyval.Type).newTy = (yyvsp[-1].String);
2365 (yyval.Type).oldTy = StructTy;
2370 #line 417 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2371 { // Empty structure type?
2372 (yyval.Type).newTy = new std::string("{}");
2373 (yyval.Type).oldTy = StructTy;
2378 #line 421 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2380 *(yyvsp[-1].Type).newTy += '*';
2381 (yyvsp[-1].Type).oldTy = PointerTy;
2382 (yyval.Type) = (yyvsp[-1].Type);
2387 #line 431 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2389 (yyval.String) = (yyvsp[0].Type).newTy;
2394 #line 434 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2396 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Type).newTy;
2397 delete (yyvsp[0].Type).newTy;
2398 (yyval.String) = (yyvsp[-2].String);
2403 #line 443 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2405 *(yyvsp[-2].String) += ", ...";
2406 delete (yyvsp[0].String);
2407 (yyval.String) = (yyvsp[-2].String);
2412 #line 448 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2414 (yyval.String) = (yyvsp[0].String);
2419 #line 451 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2421 (yyval.String) = new std::string();
2426 #line 461 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2427 { // Nonempty unsized arr
2428 (yyval.Const).type = (yyvsp[-3].Type);
2429 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2430 *(yyval.Const).cnst += " [ " + *(yyvsp[-1].String) + " ]";
2431 delete (yyvsp[-1].String);
2436 #line 467 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2438 (yyval.Const).type = (yyvsp[-2].Type);
2439 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2440 *(yyval.Const).cnst += "[ ]";
2445 #line 472 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2447 (yyval.Const).type = (yyvsp[-2].Type);
2448 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2449 *(yyval.Const).cnst += " c" + *(yyvsp[0].String);
2450 delete (yyvsp[0].String);
2455 #line 478 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2456 { // Nonempty unsized arr
2457 (yyval.Const).type = (yyvsp[-3].Type);
2458 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2459 *(yyval.Const).cnst += " < " + *(yyvsp[-1].String) + " >";
2460 delete (yyvsp[-1].String);
2465 #line 484 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2467 (yyval.Const).type = (yyvsp[-3].Type);
2468 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2469 *(yyval.Const).cnst += " { " + *(yyvsp[-1].String) + " }";
2470 delete (yyvsp[-1].String);
2475 #line 490 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2477 (yyval.Const).type = (yyvsp[-2].Type);
2478 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2479 *(yyval.Const).cnst += " {}";
2484 #line 495 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2486 (yyval.Const).type = (yyvsp[-1].Type);
2487 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2488 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2489 delete (yyvsp[0].String);
2494 #line 501 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2496 (yyval.Const).type = (yyvsp[-1].Type);
2497 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2498 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2499 delete (yyvsp[0].String);
2504 #line 507 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2506 (yyval.Const).type = (yyvsp[-1].Type);
2507 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2508 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2509 delete (yyvsp[0].String);
2514 #line 513 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2516 (yyval.Const).type = (yyvsp[-1].Type);
2517 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2518 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2519 delete (yyvsp[0].String);
2524 #line 519 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2526 (yyval.Const).type = (yyvsp[-1].Type);
2527 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2528 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2529 delete (yyvsp[0].String);
2534 #line 525 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2535 { // integral constants
2536 (yyval.Const).type = (yyvsp[-1].Type);
2537 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2538 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2539 delete (yyvsp[0].String);
2544 #line 531 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2545 { // integral constants
2546 (yyval.Const).type = (yyvsp[-1].Type);
2547 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2548 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2549 delete (yyvsp[0].String);
2554 #line 537 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2555 { // Boolean constants
2556 (yyval.Const).type = (yyvsp[-1].Type);
2557 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2558 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2559 delete (yyvsp[0].String);
2564 #line 543 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2565 { // Boolean constants
2566 (yyval.Const).type = (yyvsp[-1].Type);
2567 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2568 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2569 delete (yyvsp[0].String);
2574 #line 549 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2575 { // Float & Double constants
2576 (yyval.Const).type = (yyvsp[-1].Type);
2577 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2578 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2579 delete (yyvsp[0].String);
2584 #line 557 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2586 std::string source = *(yyvsp[-3].Const).cnst;
2587 TypeInfo DstTy = (yyvsp[-1].Type);
2589 if (*(yyvsp[-5].String) == "cast") {
2590 // Call getCastUpgrade to upgrade the old cast
2591 (yyval.String) = new std::string(getCastUpgrade(source, (yyvsp[-3].Const).type, (yyvsp[-1].Type), true));
2593 // Nothing to upgrade, just create the cast constant expr
2594 (yyval.String) = new std::string(*(yyvsp[-5].String));
2595 *(yyval.String) += "( " + source + " to " + *(yyvsp[-1].Type).newTy + ")";
2597 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
2602 #line 571 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2604 *(yyvsp[-4].String) += "(" + *(yyvsp[-2].Const).cnst;
2605 for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
2606 ValueInfo& VI = (*(yyvsp[-1].ValList))[i];
2607 *(yyvsp[-4].String) += ", " + *VI.val;
2610 *(yyvsp[-4].String) += ")";
2611 (yyval.String) = (yyvsp[-4].String);
2612 (yyvsp[-2].Const).destroy();
2613 delete (yyvsp[-1].ValList);
2618 #line 583 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2620 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2621 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2622 (yyval.String) = (yyvsp[-7].String);
2627 #line 588 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2629 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2630 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2631 (yyval.String) = (yyvsp[-5].String);
2636 #line 593 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2638 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2639 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2640 (yyval.String) = (yyvsp[-5].String);
2645 #line 598 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2647 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2648 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2649 (yyval.String) = (yyvsp[-5].String);
2654 #line 603 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2656 const char* shiftop = (yyvsp[-5].String)->c_str();
2657 if (*(yyvsp[-5].String) == "shr")
2658 shiftop = ((yyvsp[-3].Const).type.isUnsigned()) ? "lshr" : "ashr";
2659 (yyval.String) = new std::string(shiftop);
2660 *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2661 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2666 #line 611 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2668 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2669 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2670 (yyval.String) = (yyvsp[-5].String);
2675 #line 616 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2677 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2678 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2679 (yyval.String) = (yyvsp[-7].String);
2684 #line 621 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2686 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2687 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2688 (yyval.String) = (yyvsp[-7].String);
2693 #line 631 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2695 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Const).cnst;
2696 (yyvsp[0].Const).destroy();
2697 (yyval.String) = (yyvsp[-2].String);
2702 #line 636 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2703 { (yyval.String) = new std::string(*(yyvsp[0].Const).cnst); (yyvsp[0].Const).destroy(); ;}
2707 #line 651 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2713 #line 656 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2720 #line 659 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2722 *O << *(yyvsp[0].String) << "\n";
2723 delete (yyvsp[0].String);
2729 #line 664 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2731 *O << "module asm " << " " << *(yyvsp[0].String) << "\n";
2737 #line 668 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2739 *O << "implementation\n";
2745 #line 672 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2746 { (yyval.String) = 0; ;}
2750 #line 675 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2752 EnumeratedTypes.push_back((yyvsp[0].Type));
2753 if (!(yyvsp[-2].String)->empty()) {
2754 NamedTypes[*(yyvsp[-2].String)].newTy = new std::string(*(yyvsp[0].Type).newTy);
2755 NamedTypes[*(yyvsp[-2].String)].oldTy = (yyvsp[0].Type).oldTy;
2756 *O << *(yyvsp[-2].String) << " = ";
2758 *O << "type " << *(yyvsp[0].Type).newTy << "\n";
2759 delete (yyvsp[-2].String); delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
2765 #line 686 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2766 { // Function prototypes can be in const pool
2767 *O << *(yyvsp[0].String) << "\n";
2768 delete (yyvsp[0].String);
2774 #line 691 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2775 { // Asm blocks can be in the const pool
2776 *O << *(yyvsp[-2].String) << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
2777 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
2783 #line 696 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2785 if (!(yyvsp[-4].String)->empty())
2786 *O << *(yyvsp[-4].String) << " = ";
2787 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Const).cnst << " " << *(yyvsp[0].String) << "\n";
2788 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Const).destroy(); delete (yyvsp[0].String);
2794 #line 703 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2796 if (!(yyvsp[-4].String)->empty())
2797 *O << *(yyvsp[-4].String) << " = ";
2798 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
2799 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
2805 #line 710 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2807 if (!(yyvsp[-4].String)->empty())
2808 *O << *(yyvsp[-4].String) << " = ";
2809 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
2810 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
2816 #line 717 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2818 if (!(yyvsp[-4].String)->empty())
2819 *O << *(yyvsp[-4].String) << " = ";
2820 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
2821 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
2827 #line 724 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2829 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
2830 delete (yyvsp[-1].String); delete (yyvsp[0].String);
2836 #line 729 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2838 *O << *(yyvsp[-2].String) << " = " << *(yyvsp[0].String) << "\n";
2839 delete (yyvsp[-2].String); delete (yyvsp[0].String);
2845 #line 734 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2852 #line 744 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2854 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
2855 delete (yyvsp[0].String);
2856 (yyval.String) = (yyvsp[-2].String);
2861 #line 749 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2863 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
2864 if (*(yyvsp[0].String) == "64")
2866 delete (yyvsp[0].String);
2867 (yyval.String) = (yyvsp[-2].String);
2872 #line 756 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2874 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
2875 delete (yyvsp[0].String);
2876 (yyval.String) = (yyvsp[-2].String);
2881 #line 761 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2883 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
2884 delete (yyvsp[0].String);
2885 (yyval.String) = (yyvsp[-2].String);
2890 #line 768 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2892 (yyvsp[-1].String)->insert(0, "[ ");
2893 *(yyvsp[-1].String) += " ]";
2894 (yyval.String) = (yyvsp[-1].String);
2899 #line 775 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2901 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
2902 delete (yyvsp[0].String);
2903 (yyval.String) = (yyvsp[-2].String);
2908 #line 781 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2910 (yyval.String) = new std::string();
2915 #line 790 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2916 { (yyval.String) = new std::string(); ;}
2920 #line 792 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2922 (yyval.String) = (yyvsp[-1].Type).newTy;
2923 if (!(yyvsp[0].String)->empty())
2924 *(yyval.String) += " " + *(yyvsp[0].String);
2925 delete (yyvsp[0].String);
2930 #line 799 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2932 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
2933 delete (yyvsp[0].String);
2938 #line 803 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2940 (yyval.String) = (yyvsp[0].String);
2945 #line 807 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2947 (yyval.String) = (yyvsp[0].String);
2952 #line 810 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2954 *(yyvsp[-2].String) += ", ...";
2955 (yyval.String) = (yyvsp[-2].String);
2956 delete (yyvsp[0].String);
2961 #line 815 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2963 (yyval.String) = (yyvsp[0].String);
2968 #line 818 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2969 { (yyval.String) = new std::string(); ;}
2973 #line 821 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2975 if (!(yyvsp[-7].String)->empty()) {
2976 *(yyvsp[-7].String) += " ";
2978 *(yyvsp[-7].String) += *(yyvsp[-6].Type).newTy + " " + *(yyvsp[-5].String) + "(" + *(yyvsp[-3].String) + ")";
2979 if (!(yyvsp[-1].String)->empty()) {
2980 *(yyvsp[-7].String) += " " + *(yyvsp[-1].String);
2982 if (!(yyvsp[0].String)->empty()) {
2983 *(yyvsp[-7].String) += " " + *(yyvsp[0].String);
2985 (yyvsp[-6].Type).destroy();
2986 delete (yyvsp[-5].String);
2987 delete (yyvsp[-3].String);
2988 delete (yyvsp[-1].String);
2989 delete (yyvsp[0].String);
2990 (yyval.String) = (yyvsp[-7].String);
2995 #line 840 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2997 (yyval.String) = new std::string("begin");
3002 #line 843 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3004 (yyval.String) = new std::string ("{");
3009 #line 847 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3011 if (!(yyvsp[-2].String)->empty()) {
3012 *O << *(yyvsp[-2].String) << " ";
3014 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
3015 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3021 #line 856 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3022 { (yyval.String) = new std::string("end"); ;}
3026 #line 857 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3027 { (yyval.String) = new std::string("}"); ;}
3031 #line 859 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3033 if ((yyvsp[-1].String))
3034 *O << *(yyvsp[-1].String);
3035 *O << '\n' << *(yyvsp[0].String) << "\n";
3041 #line 867 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3042 { (yyval.String) = new std::string(); ;}
3046 #line 873 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3048 if (!(yyvsp[-1].String)->empty())
3049 *(yyvsp[-2].String) += " " + *(yyvsp[-1].String);
3050 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3051 delete (yyvsp[-1].String);
3052 delete (yyvsp[0].String);
3053 (yyval.String) = (yyvsp[-2].String);
3058 #line 886 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3059 { (yyval.String) = new std::string(); ;}
3063 #line 892 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3065 (yyvsp[-1].String)->insert(0, "<");
3066 *(yyvsp[-1].String) += ">";
3067 (yyval.String) = (yyvsp[-1].String);
3072 #line 898 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3074 if (!(yyvsp[-3].String)->empty()) {
3075 *(yyvsp[-4].String) += " " + *(yyvsp[-3].String);
3077 *(yyvsp[-4].String) += " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
3078 delete (yyvsp[-3].String); delete (yyvsp[-2].String); delete (yyvsp[0].String);
3079 (yyval.String) = (yyvsp[-4].String);
3084 #line 911 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3086 (yyval.Value).val = (yyvsp[0].String);
3087 (yyval.Value).constant = false;
3088 (yyval.Value).type.newTy = 0;
3089 (yyval.Value).type.oldTy = UnresolvedTy;
3094 #line 917 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3096 (yyval.Value).val = (yyvsp[0].String);
3097 (yyval.Value).constant = true;
3098 (yyval.Value).type.newTy = 0;
3099 (yyval.Value).type.oldTy = UnresolvedTy;
3104 #line 928 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3106 (yyval.Value) = (yyvsp[0].Value);
3107 (yyval.Value).type = (yyvsp[-1].Type);
3108 (yyval.Value).val->insert(0, *(yyvsp[-1].Type).newTy + " ");
3113 #line 934 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3120 #line 937 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3121 { // Do not allow functions with 0 basic blocks
3127 #line 945 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3134 #line 949 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3136 *O << " " << *(yyvsp[0].String) << "\n";
3137 delete (yyvsp[0].String);
3143 #line 954 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3150 #line 957 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3152 *O << *(yyvsp[0].String) << "\n";
3153 delete (yyvsp[0].String);
3159 #line 963 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3160 { // Return with a result...
3161 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Value).val << "\n";
3162 delete (yyvsp[-1].String); (yyvsp[0].Value).destroy();
3168 #line 968 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3169 { // Return with no result...
3170 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Type).newTy << "\n";
3171 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3177 #line 973 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3178 { // Unconditional Branch...
3179 *O << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].Value).val << "\n";
3180 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3186 #line 978 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3188 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", "
3189 << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << ", " << *(yyvsp[-1].Type).newTy << " "
3190 << *(yyvsp[0].Value).val << "\n";
3191 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); (yyvsp[-6].Value).destroy(); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy();
3192 (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3198 #line 986 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3200 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", "
3201 << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << " [" << *(yyvsp[-1].String) << " ]\n";
3202 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); (yyvsp[-6].Value).destroy(); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy();
3203 delete (yyvsp[-1].String);
3209 #line 993 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3211 *O << " " << *(yyvsp[-7].String) << " " << *(yyvsp[-6].Type).newTy << " " << *(yyvsp[-5].Value).val << ", "
3212 << *(yyvsp[-3].Type).newTy << " " << *(yyvsp[-2].Value).val << "[]\n";
3213 delete (yyvsp[-7].String); (yyvsp[-6].Type).destroy(); (yyvsp[-5].Value).destroy(); (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy();
3219 #line 1000 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3222 if (!(yyvsp[-13].String)->empty())
3223 *O << *(yyvsp[-13].String) << " = ";
3224 *O << *(yyvsp[-12].String) << " " << *(yyvsp[-11].String) << " " << *(yyvsp[-10].Type).newTy << " " << *(yyvsp[-9].Value).val << " (";
3225 for (unsigned i = 0; i < (yyvsp[-7].ValList)->size(); ++i) {
3226 ValueInfo& VI = (*(yyvsp[-7].ValList))[i];
3228 if (i+1 < (yyvsp[-7].ValList)->size())
3232 *O << ") " << *(yyvsp[-5].String) << " " << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << " "
3233 << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].Value).val << "\n";
3234 delete (yyvsp[-13].String); delete (yyvsp[-12].String); delete (yyvsp[-11].String); (yyvsp[-10].Type).destroy(); (yyvsp[-9].Value).destroy(); delete (yyvsp[-7].ValList);
3235 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
3236 (yyvsp[0].Value).destroy();
3242 #line 1019 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3244 *O << " " << *(yyvsp[0].String) << "\n";
3245 delete (yyvsp[0].String);
3251 #line 1024 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3253 *O << " " << *(yyvsp[0].String) << "\n";
3254 delete (yyvsp[0].String);
3260 #line 1030 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3262 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].String) + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3263 (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3264 (yyval.String) = (yyvsp[-5].String);
3269 #line 1035 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3271 (yyvsp[-3].String)->insert(0, *(yyvsp[-4].Type).newTy + " " );
3272 *(yyvsp[-3].String) += ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3273 (yyvsp[-4].Type).destroy(); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3274 (yyval.String) = (yyvsp[-3].String);
3279 #line 1043 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3281 if (!(yyvsp[-1].String)->empty())
3282 *(yyvsp[-1].String) += " = ";
3283 *(yyvsp[-1].String) += *(yyvsp[0].String);
3284 delete (yyvsp[0].String);
3285 (yyval.String) = (yyvsp[-1].String);
3290 #line 1052 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3291 { // Used for PHI nodes
3292 (yyvsp[-3].Value).val->insert(0, *(yyvsp[-5].Type).newTy + "[");
3293 *(yyvsp[-3].Value).val += "," + *(yyvsp[-1].Value).val + "]";
3294 (yyvsp[-5].Type).destroy(); (yyvsp[-1].Value).destroy();
3295 (yyval.String) = new std::string(*(yyvsp[-3].Value).val);
3296 (yyvsp[-3].Value).destroy();
3301 #line 1059 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3303 *(yyvsp[-6].String) += ", [" + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + "]";
3304 (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
3305 (yyval.String) = (yyvsp[-6].String);
3310 #line 1067 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3312 (yyval.ValList) = new ValueList();
3313 (yyval.ValList)->push_back((yyvsp[0].Value));
3318 #line 1071 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3320 (yyvsp[-2].ValList)->push_back((yyvsp[0].Value));
3321 (yyval.ValList) = (yyvsp[-2].ValList);
3326 #line 1078 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3327 { (yyval.ValList) = (yyvsp[0].ValList); ;}
3331 #line 1079 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3332 { (yyval.ValList) = new ValueList(); ;}
3336 #line 1083 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3338 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3339 delete (yyvsp[0].String);
3340 (yyval.String) = (yyvsp[-1].String);
3345 #line 1091 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3347 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3348 (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3349 (yyval.String) = (yyvsp[-4].String);
3354 #line 1096 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3356 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3357 (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3358 (yyval.String) = (yyvsp[-4].String);
3363 #line 1101 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3365 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3366 (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3367 (yyval.String) = (yyvsp[-4].String);
3372 #line 1106 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3374 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3375 (yyvsp[0].Value).destroy();
3376 (yyval.String) = (yyvsp[-1].String);
3381 #line 1111 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3383 const char* shiftop = (yyvsp[-3].String)->c_str();
3384 if (*(yyvsp[-3].String) == "shr")
3385 shiftop = ((yyvsp[-2].Value).type.isUnsigned()) ? "lshr" : "ashr";
3386 (yyval.String) = new std::string(shiftop);
3387 *(yyval.String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3388 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3393 #line 1119 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3395 std::string source = *(yyvsp[-2].Value).val;
3396 TypeInfo SrcTy = (yyvsp[-2].Value).type;
3397 TypeInfo DstTy = (yyvsp[0].Type);
3399 (yyval.String) = new std::string();
3400 if (*(yyvsp[-3].String) == "cast") {
3401 *(yyval.String) += getCastUpgrade(source, SrcTy, DstTy, false);
3403 *(yyval.String) += *(yyvsp[-3].String) + " " + source + " to " + *DstTy.newTy;
3405 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy();
3406 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3411 #line 1133 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3413 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3414 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3415 (yyval.String) = (yyvsp[-5].String);
3420 #line 1138 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3422 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Type).newTy;
3423 (yyvsp[-2].Value).destroy(); (yyvsp[0].Type).destroy();
3424 (yyval.String) = (yyvsp[-3].String);
3429 #line 1143 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3431 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3432 (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3433 (yyval.String) = (yyvsp[-3].String);
3438 #line 1148 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3440 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3441 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3442 (yyval.String) = (yyvsp[-5].String);
3447 #line 1153 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3449 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3450 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3451 (yyval.String) = (yyvsp[-5].String);
3456 #line 1158 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3458 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3459 delete (yyvsp[0].String);
3460 (yyval.String) = (yyvsp[-1].String);
3465 #line 1163 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3467 if (!(yyvsp[-5].String)->empty())
3468 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String);
3469 if (!(yyvsp[-6].String)->empty())
3470 *(yyvsp[-6].String) += " ";
3471 *(yyvsp[-6].String) += *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].Value).val + "(";
3472 for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
3473 ValueInfo& VI = (*(yyvsp[-1].ValList))[i];
3474 *(yyvsp[-6].String) += *VI.val;
3475 if (i+1 < (yyvsp[-1].ValList)->size())
3476 *(yyvsp[-6].String) += ", ";
3479 *(yyvsp[-6].String) += ")";
3480 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); delete (yyvsp[-1].ValList);
3481 (yyval.String) = (yyvsp[-6].String);
3486 #line 1185 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3487 { (yyval.ValList) = (yyvsp[0].ValList); ;}
3491 #line 1186 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3492 { (yyval.ValList) = new ValueList(); ;}
3496 #line 1191 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3497 { (yyval.String) = new std::string(); ;}
3501 #line 1194 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3503 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3504 if (!(yyvsp[0].String)->empty())
3505 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3506 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3507 (yyval.String) = (yyvsp[-2].String);
3512 #line 1201 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3514 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3515 if (!(yyvsp[0].String)->empty())
3516 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3517 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].String);
3518 (yyval.String) = (yyvsp[-5].String);
3523 #line 1208 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3525 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3526 if (!(yyvsp[0].String)->empty())
3527 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3528 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3529 (yyval.String) = (yyvsp[-2].String);
3534 #line 1215 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3536 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3537 if (!(yyvsp[0].String)->empty())
3538 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3539 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].String);
3540 (yyval.String) = (yyvsp[-5].String);
3545 #line 1222 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3547 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3548 (yyvsp[0].Value).destroy();
3549 (yyval.String) = (yyvsp[-1].String);
3554 #line 1227 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3556 if (!(yyvsp[-3].String)->empty())
3557 *(yyvsp[-3].String) += " ";
3558 *(yyvsp[-3].String) += *(yyvsp[-2].String) + " " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3559 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3560 (yyval.String) = (yyvsp[-3].String);
3565 #line 1234 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3567 if (!(yyvsp[-5].String)->empty())
3568 *(yyvsp[-5].String) += " ";
3569 *(yyvsp[-5].String) += *(yyvsp[-4].String) + " " + *(yyvsp[-3].Value).val + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3570 delete (yyvsp[-4].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3571 (yyval.String) = (yyvsp[-5].String);
3576 #line 1241 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3578 // Upgrade the indices
3579 for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) {
3580 ValueInfo& VI = (*(yyvsp[0].ValList))[i];
3581 if (VI.type.isUnsigned() && !VI.isConstant() &&
3582 VI.type.getBitWidth() < 64) {
3583 std::string* old = VI.val;
3584 *O << " %gep_upgrade" << unique << " = zext " << *old
3586 VI.val = new std::string("ulong %gep_upgrade" + llvm::utostr(unique++));
3587 VI.type.oldTy = ULongTy;
3591 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3592 for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) {
3593 ValueInfo& VI = (*(yyvsp[0].ValList))[i];
3594 *(yyvsp[-3].String) += ", " + *VI.val;
3597 (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].ValList);
3598 (yyval.String) = (yyvsp[-3].String);
3606 /* Line 1126 of yacc.c. */
3607 #line 3608 "UpgradeParser.tab.c"
3613 YY_STACK_PRINT (yyss, yyssp);
3618 /* Now `shift' the result of the reduction. Determine what state
3619 that goes to, based on the state we popped back to and the rule
3620 number reduced by. */
3624 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3625 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3626 yystate = yytable[yystate];
3628 yystate = yydefgoto[yyn - YYNTOKENS];
3633 /*------------------------------------.
3634 | yyerrlab -- here on detecting error |
3635 `------------------------------------*/
3637 /* If not already recovering from an error, report this error. */
3642 yyn = yypact[yystate];
3644 if (YYPACT_NINF < yyn && yyn < YYLAST)
3646 int yytype = YYTRANSLATE (yychar);
3647 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3648 YYSIZE_T yysize = yysize0;
3650 int yysize_overflow = 0;
3652 # define YYERROR_VERBOSE_ARGS_MAXIMUM 5
3653 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3657 /* This is so xgettext sees the translatable formats that are
3658 constructed on the fly. */
3659 YY_("syntax error, unexpected %s");
3660 YY_("syntax error, unexpected %s, expecting %s");
3661 YY_("syntax error, unexpected %s, expecting %s or %s");
3662 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3663 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3667 static char const yyunexpected[] = "syntax error, unexpected %s";
3668 static char const yyexpecting[] = ", expecting %s";
3669 static char const yyor[] = " or %s";
3670 char yyformat[sizeof yyunexpected
3671 + sizeof yyexpecting - 1
3672 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3673 * (sizeof yyor - 1))];
3674 char const *yyprefix = yyexpecting;
3676 /* Start YYX at -YYN if negative to avoid negative indexes in
3678 int yyxbegin = yyn < 0 ? -yyn : 0;
3680 /* Stay within bounds of both yycheck and yytname. */
3681 int yychecklim = YYLAST - yyn;
3682 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3685 yyarg[0] = yytname[yytype];
3686 yyfmt = yystpcpy (yyformat, yyunexpected);
3688 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3689 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3691 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3695 yyformat[sizeof yyunexpected - 1] = '\0';
3698 yyarg[yycount++] = yytname[yyx];
3699 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3700 yysize_overflow |= yysize1 < yysize;
3702 yyfmt = yystpcpy (yyfmt, yyprefix);
3706 yyf = YY_(yyformat);
3707 yysize1 = yysize + yystrlen (yyf);
3708 yysize_overflow |= yysize1 < yysize;
3711 if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
3712 yymsg = (char *) YYSTACK_ALLOC (yysize);
3715 /* Avoid sprintf, as that infringes on the user's name space.
3716 Don't have undefined behavior even if the translation
3717 produced a string with the wrong number of "%s"s. */
3720 while ((*yyp = *yyf))
3722 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3724 yyp += yytnamerr (yyp, yyarg[yyi++]);
3734 YYSTACK_FREE (yymsg);
3738 yyerror (YY_("syntax error"));
3739 goto yyexhaustedlab;
3743 #endif /* YYERROR_VERBOSE */
3744 yyerror (YY_("syntax error"));
3749 if (yyerrstatus == 3)
3751 /* If just tried and failed to reuse look-ahead token after an
3752 error, discard it. */
3754 if (yychar <= YYEOF)
3756 /* Return failure if at end of input. */
3757 if (yychar == YYEOF)
3762 yydestruct ("Error: discarding", yytoken, &yylval);
3767 /* Else will try to reuse look-ahead token after shifting the error
3772 /*---------------------------------------------------.
3773 | yyerrorlab -- error raised explicitly by YYERROR. |
3774 `---------------------------------------------------*/
3777 /* Pacify compilers like GCC when the user code never invokes
3778 YYERROR and the label yyerrorlab therefore never appears in user
3789 /*-------------------------------------------------------------.
3790 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3791 `-------------------------------------------------------------*/
3793 yyerrstatus = 3; /* Each real token shifted decrements this. */
3797 yyn = yypact[yystate];
3798 if (yyn != YYPACT_NINF)
3801 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3809 /* Pop the current state because it cannot handle the error token. */
3814 yydestruct ("Error: popping", yystos[yystate], yyvsp);
3817 YY_STACK_PRINT (yyss, yyssp);
3826 /* Shift the error token. */
3827 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3833 /*-------------------------------------.
3834 | yyacceptlab -- YYACCEPT comes here. |
3835 `-------------------------------------*/
3840 /*-----------------------------------.
3841 | yyabortlab -- YYABORT comes here. |
3842 `-----------------------------------*/
3848 /*-------------------------------------------------.
3849 | yyexhaustedlab -- memory exhaustion comes here. |
3850 `-------------------------------------------------*/
3852 yyerror (YY_("memory exhausted"));
3858 if (yychar != YYEOF && yychar != YYEMPTY)
3859 yydestruct ("Cleanup: discarding lookahead",
3861 while (yyssp != yyss)
3863 yydestruct ("Cleanup: popping",
3864 yystos[*yyssp], yyvsp);
3869 YYSTACK_FREE (yyss);
3875 #line 1265 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3878 int yyerror(const char *ErrorMsg) {
3880 = std::string((CurFilename == "-") ? std::string("<stdin>") : CurFilename)
3881 + ":" + llvm::utostr((unsigned) Upgradelineno) + ": ";
3882 std::string errMsg = std::string(ErrorMsg) + "\n" + where + " while reading ";
3883 if (yychar == YYEMPTY || yychar == 0)
3884 errMsg += "end-of-file.";
3886 errMsg += "token: '" + std::string(Upgradetext, Upgradeleng) + "'";
3887 std::cerr << errMsg << '\n';