1 /* A Bison parser, made by GNU Bison 2.1. */
3 /* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA. */
21 /* As a special exception, when this file is copied by Bison into a
22 Bison output file, you may use that output file without restriction.
23 This special exception was added by the Free Software Foundation
24 in version 1.24 of Bison. */
26 /* Written by Richard Stallman by simplifying the original so called
27 ``semantic'' parser. */
29 /* All symbols defined below should begin with yy or YY, to avoid
30 infringing on user name space. This should be done even for local
31 variables, as they might otherwise be expanded by user macros.
32 There are some unavoidable exceptions within include files to
33 define necessary library symbols; they are noted "INFRINGES ON
34 USER NAME SPACE" below. */
36 /* Identify Bison output. */
40 #define YYBISON_VERSION "2.1"
43 #define YYSKELETON_NAME "yacc.c"
48 /* Using locations. */
49 #define YYLSP_NEEDED 0
51 /* Substitute the variable and function names. */
52 #define yyparse Upgradeparse
53 #define yylex Upgradelex
54 #define yyerror Upgradeerror
55 #define yylval Upgradelval
56 #define yychar Upgradechar
57 #define yydebug Upgradedebug
58 #define yynerrs Upgradenerrs
64 /* Put the tokens into the symbol table, so that GDB and other debuggers
88 ZEROINITIALIZER = 279,
134 X86_STDCALLCC_TOK = 325,
135 X86_FASTCALLCC_TOK = 326,
199 EXTRACTELEMENT = 390,
232 #define ESINT64VAL 272
233 #define EUINT64VAL 273
239 #define ZEROINITIALIZER 279
245 #define STRINGCONSTANT 285
246 #define IMPLEMENTATION 286
255 #define DOTDOTDOT 295
260 #define DLLIMPORT 300
261 #define DLLEXPORT 301
262 #define EXTERN_WEAK 302
263 #define APPENDING 303
269 #define POINTERSIZE 309
273 #define UNINITIALIZED 313
279 #define SIDEEFFECT 319
282 #define CSRETCC_TOK 322
283 #define FASTCC_TOK 323
284 #define COLDCC_TOK 324
285 #define X86_STDCALLCC_TOK 325
286 #define X86_FASTCALLCC_TOK 326
287 #define DATALAYOUT 327
294 #define UNREACHABLE 334
342 #define GETELEMENTPTR 382
350 #define EXTRACTELEMENT 390
351 #define INSERTELEMENT 391
352 #define SHUFFLEVECTOR 392
370 /* Copy the first part of user declarations. */
371 #line 14 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
373 #include "ParserInternals.h"
374 #include <llvm/ADT/StringExtras.h>
381 #define YYERROR_VERBOSE 1
382 #define YYINCLUDED_STDLIB_H
384 #define UPGRADE_SETCOND_OPS 0
385 #define GENERATE_FCMP_INSTS 0
387 int yylex(); // declaration" of xxx warnings.
391 static std::string CurFilename;
392 static std::ostream *O = 0;
393 std::istream* LexInput = 0;
394 unsigned SizeOfPointer = 32;
395 static uint64_t unique = 1;
397 typedef std::vector<TypeInfo> TypeVector;
398 static TypeVector EnumeratedTypes;
399 typedef std::map<std::string,TypeInfo> TypeMap;
400 static TypeMap NamedTypes;
401 static TypeMap Globals;
403 void destroy(ValueList* VL) {
404 while (!VL->empty()) {
405 ValueInfo& VI = VL->back();
412 void UpgradeAssembly(const std::string &infile, std::istream& in,
413 std::ostream &out, bool debug)
416 CurFilename = infile;
422 std::cerr << "Parse failed.\n";
427 static void ResolveType(TypeInfo& Ty) {
428 if (Ty.oldTy == UnresolvedTy) {
429 TypeMap::iterator I = NamedTypes.find(*Ty.newTy);
430 if (I != NamedTypes.end()) {
431 Ty.oldTy = I->second.oldTy;
432 Ty.elemTy = I->second.elemTy;
434 std::string msg("Can't resolve type: ");
436 yyerror(msg.c_str());
438 } else if (Ty.oldTy == NumericTy) {
439 unsigned ref = atoi(&((Ty.newTy->c_str())[1])); // Skip the '\\'
440 if (ref < EnumeratedTypes.size()) {
441 Ty.oldTy = EnumeratedTypes[ref].oldTy;
442 Ty.elemTy = EnumeratedTypes[ref].elemTy;
444 std::string msg("Can't resolve type: ");
446 yyerror(msg.c_str());
449 // otherwise its already resolved.
452 static const char* getCastOpcode(
453 std::string& Source, const TypeInfo& SrcTy, const TypeInfo& DstTy)
455 unsigned SrcBits = SrcTy.getBitWidth();
456 unsigned DstBits = DstTy.getBitWidth();
457 const char* opcode = "bitcast";
458 // Run through the possibilities ...
459 if (DstTy.isIntegral()) { // Casting to integral
460 if (SrcTy.isIntegral()) { // Casting from integral
461 if (DstBits < SrcBits)
463 else if (DstBits > SrcBits) { // its an extension
464 if (SrcTy.isSigned())
465 opcode ="sext"; // signed -> SEXT
467 opcode = "zext"; // unsigned -> ZEXT
469 opcode = "bitcast"; // Same size, No-op cast
471 } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt
472 if (DstTy.isSigned())
473 opcode = "fptosi"; // FP -> sint
475 opcode = "fptoui"; // FP -> uint
476 } else if (SrcTy.isPacked()) {
477 assert(DstBits == SrcTy.getBitWidth() &&
478 "Casting packed to integer of different width");
479 opcode = "bitcast"; // same size, no-op cast
481 assert(SrcTy.isPointer() &&
482 "Casting from a value that is not first-class type");
483 opcode = "ptrtoint"; // ptr -> int
485 } else if (DstTy.isFloatingPoint()) { // Casting to floating pt
486 if (SrcTy.isIntegral()) { // Casting from integral
487 if (SrcTy.isSigned())
488 opcode = "sitofp"; // sint -> FP
490 opcode = "uitofp"; // uint -> FP
491 } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt
492 if (DstBits < SrcBits) {
493 opcode = "fptrunc"; // FP -> smaller FP
494 } else if (DstBits > SrcBits) {
495 opcode = "fpext"; // FP -> larger FP
497 opcode ="bitcast"; // same size, no-op cast
499 } else if (SrcTy.isPacked()) {
500 assert(DstBits == SrcTy.getBitWidth() &&
501 "Casting packed to floating point of different width");
502 opcode = "bitcast"; // same size, no-op cast
504 assert(0 && "Casting pointer or non-first class to float");
506 } else if (DstTy.isPacked()) {
507 if (SrcTy.isPacked()) {
508 assert(DstTy.getBitWidth() == SrcTy.getBitWidth() &&
509 "Casting packed to packed of different widths");
510 opcode = "bitcast"; // packed -> packed
511 } else if (DstTy.getBitWidth() == SrcBits) {
512 opcode = "bitcast"; // float/int -> packed
514 assert(!"Illegal cast to packed (wrong type or size)");
516 } else if (DstTy.isPointer()) {
517 if (SrcTy.isPointer()) {
518 opcode = "bitcast"; // ptr -> ptr
519 } else if (SrcTy.isIntegral()) {
520 opcode = "inttoptr"; // int -> ptr
522 assert(!"Casting invalid type to pointer");
525 assert(!"Casting to type that is not first-class");
530 static std::string getCastUpgrade(
531 const std::string& Src, TypeInfo& SrcTy, TypeInfo& DstTy, bool isConst)
534 std::string Source = Src;
535 if (SrcTy.isFloatingPoint() && DstTy.isPointer()) {
536 // fp -> ptr cast is no longer supported but we must upgrade this
537 // by doing a double cast: fp -> int -> ptr
539 Source = "ulong fptoui(" + Source + " to ulong)";
541 *O << " %cast_upgrade" << unique << " = fptoui " << Source
543 Source = "ulong %cast_upgrade" + llvm::utostr(unique);
545 // Update the SrcTy for the getCastOpcode call below
547 SrcTy.newTy = new std::string("ulong");
548 SrcTy.oldTy = ULongTy;
549 } else if (DstTy.oldTy == BoolTy) {
550 // cast ptr %x to bool was previously defined as setne ptr %x, null
551 // The ptrtoint semantic is to truncate, not compare so we must retain
552 // the original intent by replace the cast with a setne
553 const char* comparator = SrcTy.isPointer() ? ", null" :
554 (SrcTy.isFloatingPoint() ? ", 0.0" : ", 0");
555 #if UPGRADE_SETCOND_OPS
556 const char* compareOp = SrcTy.isFloatingPoint() ? "setne " : "icmp ne ";
558 const char* compareOp = "setne";
561 Result = "(" + Source + comparator + ")";
562 Result = compareOp + Result;
564 Result = compareOp + Source + comparator;
565 return Result; // skip cast processing below
569 std::string Opcode(getCastOpcode(Source, SrcTy, DstTy));
571 Result += Opcode + "( " + Source + " to " + *DstTy.newTy + ")";
573 Result += Opcode + " " + Source + " to " + *DstTy.newTy;
577 const char* getDivRemOpcode(const std::string& opcode, const TypeInfo& TI) {
578 const char* op = opcode.c_str();
582 Ty.oldTy = Ty.getElementType();
584 if (Ty.isFloatingPoint())
586 else if (Ty.isUnsigned())
588 else if (Ty.isSigned())
591 yyerror("Invalid type for div instruction");
592 else if (opcode == "rem")
593 if (Ty.isFloatingPoint())
595 else if (Ty.isUnsigned())
597 else if (Ty.isSigned())
600 yyerror("Invalid type for rem instruction");
605 getCompareOp(const std::string& setcc, const TypeInfo& TI) {
606 assert(setcc.length() == 5);
609 assert(cc1 == 'e' || cc1 == 'n' || cc1 == 'l' || cc1 == 'g');
610 assert(cc2 == 'q' || cc2 == 'e' || cc2 == 'e' || cc2 == 't');
611 std::string result("xcmp xxx");
614 if (TI.isFloatingPoint()) {
615 #if GENERATE_FCMP_INSTS
617 result[5] = 'o'; // FIXME: Always map to ordered comparison ?
619 result[5] = 'u'; // NE maps to unordered
621 result[5] = 'o'; // everything else maps to ordered
625 } else if (TI.isIntegral() || TI.isPointer()) {
627 if ((cc1 == 'e' && cc2 == 'q') || (cc1 == 'n' && cc2 == 'e'))
629 else if (TI.isSigned())
631 else if (TI.isUnsigned() || TI.isPointer() || TI.isBool())
634 yyerror("Invalid integral type for setcc");
641 /* Enabling traces. */
646 /* Enabling verbose error messages. */
647 #ifdef YYERROR_VERBOSE
648 # undef YYERROR_VERBOSE
649 # define YYERROR_VERBOSE 1
651 # define YYERROR_VERBOSE 0
654 /* Enabling the token table. */
655 #ifndef YYTOKEN_TABLE
656 # define YYTOKEN_TABLE 0
659 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
660 #line 285 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
661 typedef union YYSTYPE {
668 /* Line 196 of yacc.c. */
669 #line 670 "UpgradeParser.tab.c"
670 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
671 # define YYSTYPE_IS_DECLARED 1
672 # define YYSTYPE_IS_TRIVIAL 1
677 /* Copy the second part of user declarations. */
680 /* Line 219 of yacc.c. */
681 #line 682 "UpgradeParser.tab.c"
683 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
684 # define YYSIZE_T __SIZE_TYPE__
686 #if ! defined (YYSIZE_T) && defined (size_t)
687 # define YYSIZE_T size_t
689 #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
690 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
691 # define YYSIZE_T size_t
693 #if ! defined (YYSIZE_T)
694 # define YYSIZE_T unsigned int
700 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
701 # define YY_(msgid) dgettext ("bison-runtime", msgid)
705 # define YY_(msgid) msgid
709 #if ! defined (yyoverflow) || YYERROR_VERBOSE
711 /* The parser invokes alloca or malloc; define the necessary symbols. */
713 # ifdef YYSTACK_USE_ALLOCA
714 # if YYSTACK_USE_ALLOCA
716 # define YYSTACK_ALLOC __builtin_alloca
718 # define YYSTACK_ALLOC alloca
719 # if defined (__STDC__) || defined (__cplusplus)
720 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
721 # define YYINCLUDED_STDLIB_H
727 # ifdef YYSTACK_ALLOC
728 /* Pacify GCC's `empty if-body' warning. */
729 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
730 # ifndef YYSTACK_ALLOC_MAXIMUM
731 /* The OS might guarantee only one guard page at the bottom of the stack,
732 and a page size can be as small as 4096 bytes. So we cannot safely
733 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
734 to allow for a few compiler-allocated temporary stack slots. */
735 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
738 # define YYSTACK_ALLOC YYMALLOC
739 # define YYSTACK_FREE YYFREE
740 # ifndef YYSTACK_ALLOC_MAXIMUM
741 # define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
747 # define YYMALLOC malloc
748 # if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
749 && (defined (__STDC__) || defined (__cplusplus)))
750 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
755 # if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
756 && (defined (__STDC__) || defined (__cplusplus)))
757 void free (void *); /* INFRINGES ON USER NAME SPACE */
764 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
767 #if (! defined (yyoverflow) \
768 && (! defined (__cplusplus) \
769 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
771 /* A type that is properly aligned for any stack member. */
778 /* The size of the maximum gap between one aligned stack and the next. */
779 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
781 /* The size of an array large to enough to hold all stacks, each with
783 # define YYSTACK_BYTES(N) \
784 ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
785 + YYSTACK_GAP_MAXIMUM)
787 /* Copy COUNT objects from FROM to TO. The source and destination do
790 # if defined (__GNUC__) && 1 < __GNUC__
791 # define YYCOPY(To, From, Count) \
792 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
794 # define YYCOPY(To, From, Count) \
798 for (yyi = 0; yyi < (Count); yyi++) \
799 (To)[yyi] = (From)[yyi]; \
805 /* Relocate STACK from its old location to the new one. The
806 local variables YYSIZE and YYSTACKSIZE give the old and new number of
807 elements in the stack, and YYPTR gives the new location of the
808 stack. Advance YYPTR to a properly aligned location for the next
810 # define YYSTACK_RELOCATE(Stack) \
813 YYSIZE_T yynewbytes; \
814 YYCOPY (&yyptr->Stack, Stack, yysize); \
815 Stack = &yyptr->Stack; \
816 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
817 yyptr += yynewbytes / sizeof (*yyptr); \
823 #if defined (__STDC__) || defined (__cplusplus)
824 typedef signed char yysigned_char;
826 typedef short int yysigned_char;
829 /* YYFINAL -- State number of the termination state. */
831 /* YYLAST -- Last index in YYTABLE. */
834 /* YYNTOKENS -- Number of terminals. */
835 #define YYNTOKENS 165
836 /* YYNNTS -- Number of nonterminals. */
838 /* YYNRULES -- Number of rules. */
840 /* YYNRULES -- Number of states. */
841 #define YYNSTATES 582
843 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
845 #define YYMAXUTOK 405
847 #define YYTRANSLATE(YYX) \
848 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
850 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
851 static const unsigned char yytranslate[] =
853 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
854 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
855 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
856 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
857 154, 155, 163, 2, 152, 2, 2, 2, 2, 2,
858 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
859 159, 151, 160, 2, 2, 2, 2, 2, 2, 2,
860 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
861 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
862 2, 156, 153, 158, 2, 2, 2, 2, 2, 164,
863 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
864 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
865 157, 2, 2, 161, 2, 162, 2, 2, 2, 2,
866 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
867 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
868 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
869 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
870 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
871 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
872 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
873 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
874 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
875 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
876 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
877 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
878 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
879 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
880 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
881 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
882 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
883 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
884 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
885 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
886 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
887 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
888 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
889 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
890 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
891 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
892 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
893 145, 146, 147, 148, 149, 150
897 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
899 static const unsigned short int yyprhs[] =
901 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
902 19, 21, 23, 25, 27, 29, 31, 33, 35, 37,
903 39, 41, 43, 45, 47, 49, 51, 53, 55, 57,
904 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
905 79, 81, 83, 85, 87, 89, 91, 93, 95, 97,
906 99, 101, 103, 105, 107, 109, 111, 113, 115, 117,
907 119, 121, 123, 125, 127, 129, 131, 133, 135, 137,
908 139, 141, 143, 145, 147, 149, 151, 153, 155, 157,
909 159, 161, 164, 165, 167, 169, 171, 173, 175, 177,
910 179, 180, 182, 184, 186, 188, 190, 192, 195, 196,
911 197, 200, 201, 205, 208, 209, 211, 212, 216, 218,
912 221, 223, 225, 227, 229, 231, 233, 235, 237, 239,
913 241, 243, 245, 247, 249, 251, 253, 255, 257, 259,
914 261, 264, 269, 275, 281, 285, 288, 291, 293, 297,
915 299, 303, 305, 306, 311, 315, 319, 324, 329, 333,
916 336, 339, 342, 345, 348, 351, 354, 357, 360, 363,
917 370, 376, 385, 392, 399, 406, 414, 422, 429, 436,
918 445, 454, 458, 460, 462, 464, 466, 469, 472, 477,
919 480, 482, 484, 486, 491, 494, 499, 506, 513, 520,
920 527, 531, 536, 537, 539, 541, 543, 547, 551, 555,
921 559, 563, 567, 569, 570, 572, 574, 576, 577, 580,
922 584, 586, 588, 592, 594, 595, 604, 606, 608, 612,
923 614, 616, 620, 621, 623, 625, 629, 630, 632, 634,
924 636, 638, 640, 642, 644, 646, 648, 652, 654, 660,
925 662, 664, 666, 668, 671, 674, 676, 679, 682, 683,
926 685, 687, 689, 692, 695, 699, 709, 719, 728, 743,
927 745, 747, 754, 760, 763, 770, 778, 780, 784, 786,
928 787, 790, 792, 798, 804, 810, 818, 826, 829, 834,
929 839, 846, 851, 856, 863, 870, 873, 881, 883, 886,
930 887, 889, 890, 894, 901, 905, 912, 915, 920, 927
933 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
934 static const short int yyrhs[] =
936 199, 0, -1, 19, -1, 20, -1, 17, -1, 18,
937 -1, 80, -1, 81, -1, 82, -1, 83, -1, 84,
938 -1, 85, -1, 86, -1, 87, -1, 88, -1, 89,
939 -1, 90, -1, 91, -1, 92, -1, 93, -1, 94,
940 -1, 95, -1, 96, -1, 97, -1, 98, -1, 99,
941 -1, 102, -1, 103, -1, 104, -1, 105, -1, 106,
942 -1, 107, -1, 118, -1, 119, -1, 120, -1, 121,
943 -1, 108, -1, 109, -1, 110, -1, 111, -1, 112,
944 -1, 113, -1, 114, -1, 115, -1, 116, -1, 117,
945 -1, 118, -1, 119, -1, 120, -1, 121, -1, 25,
946 -1, 26, -1, 130, -1, 131, -1, 132, -1, 133,
947 -1, 139, -1, 140, -1, 141, -1, 142, -1, 143,
948 -1, 144, -1, 145, -1, 146, -1, 147, -1, 148,
949 -1, 149, -1, 150, -1, 138, -1, 11, -1, 9,
950 -1, 7, -1, 5, -1, 12, -1, 10, -1, 8,
951 -1, 6, -1, 175, -1, 176, -1, 13, -1, 14,
952 -1, 208, 151, -1, -1, 42, -1, 43, -1, 44,
953 -1, 48, -1, 45, -1, 46, -1, 47, -1, -1,
954 66, -1, 67, -1, 68, -1, 69, -1, 70, -1,
955 71, -1, 65, 18, -1, -1, -1, 57, 18, -1,
956 -1, 152, 57, 18, -1, 37, 30, -1, -1, 184,
957 -1, -1, 152, 187, 186, -1, 184, -1, 57, 18,
958 -1, 190, -1, 3, -1, 192, -1, 3, -1, 192,
959 -1, 4, -1, 5, -1, 6, -1, 7, -1, 8,
960 -1, 9, -1, 10, -1, 11, -1, 12, -1, 13,
961 -1, 14, -1, 15, -1, 16, -1, 222, -1, 191,
962 -1, 153, 18, -1, 189, 154, 194, 155, -1, 156,
963 18, 157, 192, 158, -1, 159, 18, 157, 192, 160,
964 -1, 161, 193, 162, -1, 161, 162, -1, 192, 163,
965 -1, 192, -1, 193, 152, 192, -1, 193, -1, 193,
966 152, 40, -1, 40, -1, -1, 190, 156, 197, 158,
967 -1, 190, 156, 158, -1, 190, 164, 30, -1, 190,
968 159, 197, 160, -1, 190, 161, 197, 162, -1, 190,
969 161, 162, -1, 190, 22, -1, 190, 23, -1, 190,
970 222, -1, 190, 196, -1, 190, 24, -1, 175, 167,
971 -1, 176, 18, -1, 4, 25, -1, 4, 26, -1,
972 178, 21, -1, 174, 154, 195, 39, 190, 155, -1,
973 127, 154, 195, 237, 155, -1, 129, 154, 195, 152,
974 195, 152, 195, 155, -1, 168, 154, 195, 152, 195,
975 155, -1, 169, 154, 195, 152, 195, 155, -1, 170,
976 154, 195, 152, 195, 155, -1, 100, 171, 154, 195,
977 152, 195, 155, -1, 101, 172, 154, 195, 152, 195,
978 155, -1, 173, 154, 195, 152, 195, 155, -1, 135,
979 154, 195, 152, 195, 155, -1, 136, 154, 195, 152,
980 195, 152, 195, 155, -1, 137, 154, 195, 152, 195,
981 152, 195, 155, -1, 197, 152, 195, -1, 195, -1,
982 35, -1, 36, -1, 200, -1, 200, 217, -1, 200,
983 219, -1, 200, 63, 62, 203, -1, 200, 31, -1,
984 202, -1, 50, -1, 58, -1, 202, 179, 27, 188,
985 -1, 202, 219, -1, 202, 63, 62, 203, -1, 202,
986 179, 180, 198, 195, 186, -1, 202, 179, 201, 198,
987 190, 186, -1, 202, 179, 45, 198, 190, 186, -1,
988 202, 179, 47, 198, 190, 186, -1, 202, 51, 205,
989 -1, 202, 59, 151, 206, -1, -1, 30, -1, 56,
990 -1, 55, -1, 53, 151, 204, -1, 54, 151, 18,
991 -1, 52, 151, 30, -1, 72, 151, 30, -1, 156,
992 207, 158, -1, 207, 152, 30, -1, 30, -1, -1,
993 28, -1, 30, -1, 208, -1, -1, 190, 209, -1,
994 211, 152, 210, -1, 210, -1, 211, -1, 211, 152,
995 40, -1, 40, -1, -1, 181, 188, 208, 154, 212,
996 155, 185, 182, -1, 32, -1, 161, -1, 180, 213,
997 214, -1, 33, -1, 162, -1, 215, 225, 216, -1,
998 -1, 45, -1, 47, -1, 34, 218, 213, -1, -1,
999 64, -1, 17, -1, 18, -1, 21, -1, 25, -1,
1000 26, -1, 22, -1, 23, -1, 24, -1, 159, 197,
1001 160, -1, 196, -1, 62, 220, 30, 152, 30, -1,
1002 166, -1, 208, -1, 222, -1, 221, -1, 190, 223,
1003 -1, 225, 226, -1, 226, -1, 227, 229, -1, 227,
1004 231, -1, -1, 29, -1, 78, -1, 77, -1, 73,
1005 224, -1, 73, 3, -1, 74, 15, 223, -1, 74,
1006 4, 223, 152, 15, 223, 152, 15, 223, -1, 75,
1007 177, 223, 152, 15, 223, 156, 230, 158, -1, 75,
1008 177, 223, 152, 15, 223, 156, 158, -1, 179, 76,
1009 181, 188, 223, 154, 234, 155, 39, 15, 223, 228,
1010 15, 223, -1, 228, -1, 79, -1, 230, 177, 221,
1011 152, 15, 223, -1, 177, 221, 152, 15, 223, -1,
1012 179, 236, -1, 190, 156, 223, 152, 223, 158, -1,
1013 232, 152, 156, 223, 152, 223, 158, -1, 224, -1,
1014 233, 152, 224, -1, 233, -1, -1, 61, 60, -1,
1015 60, -1, 168, 190, 223, 152, 223, -1, 169, 190,
1016 223, 152, 223, -1, 170, 190, 223, 152, 223, -1,
1017 100, 171, 190, 223, 152, 223, 155, -1, 101, 172,
1018 190, 223, 152, 223, 155, -1, 49, 224, -1, 173,
1019 224, 152, 224, -1, 174, 224, 39, 190, -1, 129,
1020 224, 152, 224, 152, 224, -1, 134, 224, 152, 190,
1021 -1, 135, 224, 152, 224, -1, 136, 224, 152, 224,
1022 152, 224, -1, 137, 224, 152, 224, 152, 224, -1,
1023 128, 232, -1, 235, 181, 188, 223, 154, 234, 155,
1024 -1, 239, -1, 152, 233, -1, -1, 38, -1, -1,
1025 122, 190, 183, -1, 122, 190, 152, 10, 223, 183,
1026 -1, 123, 190, 183, -1, 123, 190, 152, 10, 223,
1027 183, -1, 124, 224, -1, 238, 125, 190, 223, -1,
1028 238, 126, 224, 152, 190, 223, -1, 127, 190, 223,
1032 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1033 static const unsigned short int yyrline[] =
1035 0, 348, 348, 348, 349, 349, 353, 353, 353, 353,
1036 353, 353, 353, 354, 354, 354, 354, 355, 355, 355,
1037 356, 356, 356, 356, 356, 356, 357, 357, 357, 357,
1038 357, 357, 357, 357, 357, 357, 358, 358, 358, 358,
1039 358, 358, 358, 358, 358, 358, 359, 359, 359, 359,
1040 359, 359, 360, 360, 360, 360, 361, 361, 361, 361,
1041 361, 361, 361, 362, 362, 362, 362, 362, 362, 367,
1042 367, 367, 367, 368, 368, 368, 368, 369, 369, 370,
1043 370, 373, 376, 381, 381, 381, 381, 381, 381, 382,
1044 383, 386, 386, 386, 386, 386, 387, 388, 393, 398,
1045 399, 402, 403, 411, 417, 418, 421, 422, 431, 432,
1046 445, 445, 446, 446, 447, 451, 451, 451, 451, 451,
1047 451, 451, 452, 452, 452, 452, 452, 454, 458, 462,
1048 465, 470, 476, 484, 492, 498, 502, 513, 516, 524,
1049 525, 530, 533, 543, 549, 554, 560, 566, 572, 577,
1050 583, 589, 595, 601, 607, 613, 619, 625, 631, 639,
1051 653, 665, 670, 676, 681, 689, 694, 699, 707, 712,
1052 717, 727, 732, 737, 737, 747, 752, 755, 760, 764,
1053 768, 770, 770, 773, 785, 790, 795, 804, 813, 822,
1054 831, 836, 841, 846, 848, 848, 851, 856, 863, 868,
1055 875, 882, 887, 888, 896, 896, 897, 897, 899, 906,
1056 910, 914, 917, 922, 925, 927, 947, 948, 950, 959,
1057 960, 962, 970, 971, 972, 976, 989, 990, 993, 993,
1058 993, 993, 993, 993, 993, 994, 995, 1000, 1001, 1010,
1059 1010, 1014, 1020, 1031, 1037, 1040, 1048, 1052, 1057, 1060,
1060 1066, 1066, 1068, 1073, 1078, 1083, 1091, 1098, 1104, 1124,
1061 1129, 1135, 1140, 1148, 1157, 1164, 1172, 1176, 1183, 1184,
1062 1188, 1193, 1196, 1202, 1207, 1215, 1220, 1225, 1230, 1238,
1063 1252, 1257, 1262, 1267, 1272, 1277, 1282, 1299, 1304, 1305,
1064 1309, 1310, 1313, 1320, 1327, 1334, 1341, 1346, 1353, 1360
1068 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1069 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1070 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1071 static const char *const yytname[] =
1073 "$end", "error", "$undefined", "VOID", "BOOL", "SBYTE", "UBYTE",
1074 "SHORT", "USHORT", "INT", "UINT", "LONG", "ULONG", "FLOAT", "DOUBLE",
1075 "LABEL", "OPAQUE", "ESINT64VAL", "EUINT64VAL", "SINTVAL", "UINTVAL",
1076 "FPVAL", "NULL_TOK", "UNDEF", "ZEROINITIALIZER", "TRUETOK", "FALSETOK",
1077 "TYPE", "VAR_ID", "LABELSTR", "STRINGCONSTANT", "IMPLEMENTATION",
1078 "BEGINTOK", "ENDTOK", "DECLARE", "GLOBAL", "CONSTANT", "SECTION",
1079 "VOLATILE", "TO", "DOTDOTDOT", "CONST", "INTERNAL", "LINKONCE", "WEAK",
1080 "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "APPENDING", "NOT", "EXTERNAL",
1081 "TARGET", "TRIPLE", "ENDIAN", "POINTERSIZE", "LITTLE", "BIG", "ALIGN",
1082 "UNINITIALIZED", "DEPLIBS", "CALL", "TAIL", "ASM_TOK", "MODULE",
1083 "SIDEEFFECT", "CC_TOK", "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK",
1084 "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT",
1085 "RET", "BR", "SWITCH", "INVOKE", "EXCEPT", "UNWIND", "UNREACHABLE",
1086 "ADD", "SUB", "MUL", "DIV", "UDIV", "SDIV", "FDIV", "REM", "UREM",
1087 "SREM", "FREM", "AND", "OR", "XOR", "SETLE", "SETGE", "SETLT", "SETGT",
1088 "SETEQ", "SETNE", "ICMP", "FCMP", "EQ", "NE", "SLT", "SGT", "SLE", "SGE",
1089 "OEQ", "ONE", "OLT", "OGT", "OLE", "OGE", "ORD", "UNO", "UEQ", "UNE",
1090 "ULT", "UGT", "ULE", "UGE", "MALLOC", "ALLOCA", "FREE", "LOAD", "STORE",
1091 "GETELEMENTPTR", "PHI_TOK", "SELECT", "SHL", "SHR", "ASHR", "LSHR",
1092 "VAARG", "EXTRACTELEMENT", "INSERTELEMENT", "SHUFFLEVECTOR", "CAST",
1093 "TRUNC", "ZEXT", "SEXT", "FPTRUNC", "FPEXT", "FPTOUI", "FPTOSI",
1094 "UITOFP", "SITOFP", "PTRTOINT", "INTTOPTR", "BITCAST", "'='", "','",
1095 "'\\\\'", "'('", "')'", "'['", "'x'", "']'", "'<'", "'>'", "'{'", "'}'",
1096 "'*'", "'c'", "$accept", "IntVal", "EInt64Val", "ArithmeticOps",
1097 "LogicalOps", "SetCondOps", "IPredicates", "FPredicates", "ShiftOps",
1098 "CastOps", "SIntType", "UIntType", "IntType", "FPType", "OptAssign",
1099 "OptLinkage", "OptCallingConv", "OptAlign", "OptCAlign", "SectionString",
1100 "OptSection", "GlobalVarAttributes", "GlobalVarAttribute", "TypesV",
1101 "UpRTypesV", "Types", "PrimType", "UpRTypes", "TypeListI",
1102 "ArgTypeListI", "ConstVal", "ConstExpr", "ConstVector", "GlobalType",
1103 "Module", "DefinitionList", "External", "ConstPool", "AsmBlock",
1104 "BigOrLittle", "TargetDefinition", "LibrariesDefinition", "LibList",
1105 "Name", "OptName", "ArgVal", "ArgListH", "ArgList", "FunctionHeaderH",
1106 "BEGIN", "FunctionHeader", "END", "Function", "FnDeclareLinkage",
1107 "FunctionProto", "OptSideEffect", "ConstValueRef", "SymbolicValueRef",
1108 "ValueRef", "ResolvedVal", "BasicBlockList", "BasicBlock",
1109 "InstructionList", "Unwind", "BBTerminatorInst", "JumpTable", "Inst",
1110 "PHIList", "ValueRefList", "ValueRefListE", "OptTailCall", "InstVal",
1111 "IndexList", "OptVolatile", "MemoryInst", 0
1116 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1118 static const unsigned short int yytoknum[] =
1120 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1121 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1122 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1123 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1124 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1125 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1126 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1127 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1128 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1129 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1130 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1131 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1132 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
1133 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
1134 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
1135 405, 61, 44, 92, 40, 41, 91, 120, 93, 60,
1136 62, 123, 125, 42, 99
1140 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1141 static const unsigned char yyr1[] =
1143 0, 165, 166, 166, 167, 167, 168, 168, 168, 168,
1144 168, 168, 168, 168, 168, 168, 168, 169, 169, 169,
1145 170, 170, 170, 170, 170, 170, 171, 171, 171, 171,
1146 171, 171, 171, 171, 171, 171, 172, 172, 172, 172,
1147 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
1148 172, 172, 173, 173, 173, 173, 174, 174, 174, 174,
1149 174, 174, 174, 174, 174, 174, 174, 174, 174, 175,
1150 175, 175, 175, 176, 176, 176, 176, 177, 177, 178,
1151 178, 179, 179, 180, 180, 180, 180, 180, 180, 180,
1152 180, 181, 181, 181, 181, 181, 181, 181, 181, 182,
1153 182, 183, 183, 184, 185, 185, 186, 186, 187, 187,
1154 188, 188, 189, 189, 190, 191, 191, 191, 191, 191,
1155 191, 191, 191, 191, 191, 191, 191, 192, 192, 192,
1156 192, 192, 192, 192, 192, 192, 192, 193, 193, 194,
1157 194, 194, 194, 195, 195, 195, 195, 195, 195, 195,
1158 195, 195, 195, 195, 195, 195, 195, 195, 195, 196,
1159 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
1160 196, 197, 197, 198, 198, 199, 200, 200, 200, 200,
1161 200, 201, 201, 202, 202, 202, 202, 202, 202, 202,
1162 202, 202, 202, 203, 204, 204, 205, 205, 205, 205,
1163 206, 207, 207, 207, 208, 208, 209, 209, 210, 211,
1164 211, 212, 212, 212, 212, 213, 214, 214, 215, 216,
1165 216, 217, 218, 218, 218, 219, 220, 220, 221, 221,
1166 221, 221, 221, 221, 221, 221, 221, 221, 221, 222,
1167 222, 223, 223, 224, 225, 225, 226, 227, 227, 227,
1168 228, 228, 229, 229, 229, 229, 229, 229, 229, 229,
1169 229, 230, 230, 231, 232, 232, 233, 233, 234, 234,
1170 235, 235, 236, 236, 236, 236, 236, 236, 236, 236,
1171 236, 236, 236, 236, 236, 236, 236, 236, 237, 237,
1172 238, 238, 239, 239, 239, 239, 239, 239, 239, 239
1175 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1176 static const unsigned char yyr2[] =
1178 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1179 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1180 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1181 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1182 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1183 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1184 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1185 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1186 1, 2, 0, 1, 1, 1, 1, 1, 1, 1,
1187 0, 1, 1, 1, 1, 1, 1, 2, 0, 0,
1188 2, 0, 3, 2, 0, 1, 0, 3, 1, 2,
1189 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1190 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1191 2, 4, 5, 5, 3, 2, 2, 1, 3, 1,
1192 3, 1, 0, 4, 3, 3, 4, 4, 3, 2,
1193 2, 2, 2, 2, 2, 2, 2, 2, 2, 6,
1194 5, 8, 6, 6, 6, 7, 7, 6, 6, 8,
1195 8, 3, 1, 1, 1, 1, 2, 2, 4, 2,
1196 1, 1, 1, 4, 2, 4, 6, 6, 6, 6,
1197 3, 4, 0, 1, 1, 1, 3, 3, 3, 3,
1198 3, 3, 1, 0, 1, 1, 1, 0, 2, 3,
1199 1, 1, 3, 1, 0, 8, 1, 1, 3, 1,
1200 1, 3, 0, 1, 1, 3, 0, 1, 1, 1,
1201 1, 1, 1, 1, 1, 1, 3, 1, 5, 1,
1202 1, 1, 1, 2, 2, 1, 2, 2, 0, 1,
1203 1, 1, 2, 2, 3, 9, 9, 8, 14, 1,
1204 1, 6, 5, 2, 6, 7, 1, 3, 1, 0,
1205 2, 1, 5, 5, 5, 7, 7, 2, 4, 4,
1206 6, 4, 4, 6, 6, 2, 7, 1, 2, 0,
1207 1, 0, 3, 6, 3, 6, 2, 4, 6, 4
1210 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1211 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1212 means the default is an error. */
1213 static const unsigned short int yydefact[] =
1215 192, 0, 90, 180, 1, 179, 222, 83, 84, 85,
1216 87, 88, 89, 86, 0, 98, 248, 176, 177, 204,
1217 205, 0, 0, 0, 90, 0, 184, 223, 224, 98,
1218 0, 0, 91, 92, 93, 94, 95, 96, 0, 0,
1219 249, 248, 245, 82, 0, 0, 0, 0, 190, 0,
1220 0, 0, 0, 0, 181, 182, 0, 0, 81, 225,
1221 193, 178, 97, 111, 115, 116, 117, 118, 119, 120,
1222 121, 122, 123, 124, 125, 126, 127, 2, 3, 0,
1223 0, 0, 0, 239, 0, 0, 110, 129, 114, 240,
1224 128, 216, 217, 218, 219, 220, 221, 244, 0, 0,
1225 0, 251, 250, 260, 291, 259, 246, 247, 0, 0,
1226 0, 0, 203, 191, 185, 183, 173, 174, 0, 0,
1227 0, 0, 130, 0, 0, 113, 135, 137, 0, 0,
1228 142, 136, 253, 0, 252, 0, 0, 72, 76, 71,
1229 75, 70, 74, 69, 73, 77, 78, 0, 290, 0,
1230 271, 0, 98, 6, 7, 8, 9, 10, 11, 12,
1231 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1232 23, 24, 25, 0, 0, 0, 0, 0, 0, 0,
1233 0, 52, 53, 54, 55, 0, 0, 0, 0, 68,
1234 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
1235 66, 67, 0, 0, 0, 0, 0, 98, 263, 0,
1236 287, 198, 195, 194, 196, 197, 199, 202, 0, 106,
1237 106, 115, 116, 117, 118, 119, 120, 121, 122, 123,
1238 124, 125, 0, 0, 0, 0, 106, 106, 0, 0,
1239 0, 134, 214, 141, 139, 0, 228, 229, 230, 233,
1240 234, 235, 231, 232, 226, 0, 0, 0, 0, 0,
1241 0, 0, 0, 0, 0, 0, 0, 0, 237, 242,
1242 241, 243, 0, 254, 0, 277, 270, 0, 26, 27,
1243 28, 29, 30, 31, 32, 33, 34, 35, 0, 50,
1244 51, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1245 45, 46, 47, 48, 49, 0, 101, 101, 296, 0,
1246 0, 285, 0, 0, 0, 0, 0, 0, 0, 0,
1247 0, 0, 0, 0, 0, 0, 200, 0, 188, 189,
1248 156, 157, 4, 5, 154, 155, 158, 149, 150, 153,
1249 0, 0, 0, 0, 152, 151, 186, 187, 112, 112,
1250 138, 213, 207, 210, 211, 0, 0, 131, 227, 0,
1251 0, 0, 0, 0, 0, 0, 0, 172, 0, 0,
1252 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1253 292, 0, 294, 289, 0, 0, 0, 0, 0, 0,
1254 0, 0, 0, 0, 0, 0, 0, 0, 0, 201,
1255 0, 0, 108, 106, 144, 0, 0, 148, 0, 145,
1256 132, 133, 206, 208, 0, 104, 140, 0, 0, 0,
1257 289, 0, 0, 0, 0, 0, 236, 0, 0, 0,
1258 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1259 0, 299, 0, 0, 0, 281, 282, 0, 0, 0,
1260 0, 0, 278, 279, 0, 297, 0, 103, 109, 107,
1261 143, 146, 147, 212, 209, 105, 99, 0, 0, 0,
1262 0, 0, 0, 0, 0, 171, 0, 0, 0, 0,
1263 0, 0, 0, 269, 0, 0, 101, 102, 101, 266,
1264 288, 0, 0, 0, 0, 0, 272, 273, 274, 269,
1265 0, 0, 215, 238, 0, 0, 160, 0, 0, 0,
1266 0, 0, 0, 0, 0, 0, 0, 0, 268, 0,
1267 0, 0, 0, 293, 295, 0, 0, 0, 280, 283,
1268 284, 0, 298, 100, 0, 0, 0, 168, 0, 0,
1269 162, 163, 164, 167, 159, 0, 257, 0, 0, 0,
1270 275, 276, 267, 264, 0, 286, 165, 166, 0, 0,
1271 0, 255, 0, 256, 0, 0, 265, 161, 169, 170,
1272 0, 0, 0, 0, 0, 0, 262, 0, 0, 261,
1276 /* YYDEFGOTO[NTERM-NUM]. */
1277 static const short int yydefgoto[] =
1279 -1, 83, 334, 263, 264, 265, 288, 305, 266, 267,
1280 232, 233, 147, 234, 24, 15, 38, 502, 380, 402,
1281 466, 328, 403, 84, 85, 235, 87, 88, 128, 245,
1282 367, 268, 368, 118, 1, 2, 57, 3, 61, 214,
1283 48, 113, 218, 89, 413, 353, 354, 355, 39, 93,
1284 16, 96, 17, 29, 18, 359, 269, 90, 271, 489,
1285 41, 42, 43, 105, 106, 548, 107, 311, 518, 519,
1286 207, 208, 441, 209, 210
1289 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1291 #define YYPACT_NINF -501
1292 static const short int yypact[] =
1294 -501, 82, 9, 975, -501, -501, 72, -501, -501, -501,
1295 -501, -501, -501, -501, 29, 34, 94, -501, -501, -501,
1296 -501, -28, -42, 66, 127, 25, -501, -501, -501, 34,
1297 122, 199, -501, -501, -501, -501, -501, -501, 839, -17,
1298 -501, -19, -501, 47, 67, 68, 69, 75, -501, 71,
1299 122, 839, 11, 11, -501, -501, 11, 11, -501, -501,
1300 -501, -501, -501, 76, -501, -501, -501, -501, -501, -501,
1301 -501, -501, -501, -501, -501, -501, -501, -501, -501, 207,
1302 210, 211, 518, -501, 123, 77, -501, -501, -84, -501,
1303 -501, -501, -501, -501, -501, -501, -501, -501, 876, 8,
1304 253, -501, -501, -501, 1333, -501, -501, -501, 203, 80,
1305 217, 206, 208, -501, -501, -501, -501, -501, 922, 922,
1306 960, 922, -501, 83, 84, -501, -501, -84, -134, 88,
1307 604, -501, 76, 1131, -501, 1131, 1131, -501, -501, -501,
1308 -501, -501, -501, -501, -501, -501, -501, 1131, -501, 922,
1309 -501, 177, 34, -501, -501, -501, -501, -501, -501, -501,
1310 -501, -501, -501, -501, -501, -501, -501, -501, -501, -501,
1311 -501, -501, -501, 103, 81, 922, 922, 922, 922, 922,
1312 922, -501, -501, -501, -501, 922, 922, 922, 922, -501,
1313 -501, -501, -501, -501, -501, -501, -501, -501, -501, -501,
1314 -501, -501, 922, 922, 922, 922, 922, 34, -501, 20,
1315 -501, -501, -501, -501, -501, -501, -501, -501, -44, 91,
1316 91, 130, 143, 226, 145, 227, 161, 230, 163, 231,
1317 232, 233, 165, 234, 245, 1042, 91, 91, 922, 922,
1318 922, -501, 679, -501, 99, 113, -501, -501, -501, -501,
1319 -501, -501, -501, -501, 205, 103, 81, 119, 120, 125,
1320 128, 129, 960, 133, 134, 135, 139, 140, -501, -501,
1321 -501, -501, 124, -501, 149, -501, -501, 839, -501, -501,
1322 -501, -501, -501, -501, -501, -501, -501, -501, 922, -501,
1323 -501, -501, -501, -501, -501, -501, -501, -501, -501, -501,
1324 -501, -501, -501, -501, -501, 922, 150, 151, -501, 1131,
1325 136, 153, 154, 155, 156, 157, 158, 1131, 1131, 1131,
1326 159, 241, 839, 922, 922, 251, -501, -18, -501, -501,
1327 -501, -501, -501, -501, -501, -501, -501, -501, -501, -501,
1328 717, 960, 549, 265, -501, -501, -501, -501, -69, -50,
1329 -84, -501, 123, -501, 160, 142, 763, -501, -501, 283,
1330 164, 166, 960, 960, 960, 960, 960, -501, -110, 960,
1331 960, 960, 960, 960, 302, 304, 1131, 1131, 1131, 1,
1332 -501, 12, -501, 169, 1131, 167, 922, 922, 922, 922,
1333 922, 172, 173, 176, 922, 922, 1131, 1131, 178, -501,
1334 299, 314, -501, 91, -501, -40, -68, -501, -74, -501,
1335 -501, -501, -501, -501, 801, 301, -501, 184, 960, 960,
1336 169, 187, 188, 189, 190, 960, -501, 194, 195, 201,
1337 209, 316, 1131, 1131, 204, 212, 213, 1131, 341, 1131,
1338 922, -501, 214, 1131, 215, -501, -501, 216, 220, 1131,
1339 1131, 1131, -501, -501, 219, -501, 922, -501, -501, -501,
1340 -501, -501, -501, -501, -501, -501, 303, 332, 222, 228,
1341 229, 960, 960, 960, 960, -501, 960, 960, 960, 960,
1342 922, 238, 235, 922, 1131, 1131, 240, -501, 240, -501,
1343 243, 1131, 244, 922, 922, 922, -501, -501, -501, 922,
1344 1131, 345, -501, -501, 960, 960, -501, 246, 242, 247,
1345 248, 252, 254, 255, 256, 257, 354, 26, 243, 258,
1346 259, 260, 325, -501, -501, 922, 225, 1131, -501, -501,
1347 -501, 261, -501, -501, 262, 269, 960, -501, 960, 960,
1348 -501, -501, -501, -501, -501, 1131, -501, 1220, 56, 347,
1349 -501, -501, -501, -501, 250, -501, -501, -501, 270, 271,
1350 272, -501, 249, -501, 1220, 378, -501, -501, -501, -501,
1351 391, 276, 1131, 1131, 415, 138, -501, 1131, 416, -501,
1355 /* YYPGOTO[NTERM-NUM]. */
1356 static const short int yypgoto[] =
1358 -501, -501, -501, 328, 329, 330, 181, 185, 333, 336,
1359 -98, -97, -500, -501, 400, 420, -136, -501, -300, 31,
1360 -501, -216, -501, -45, -501, -38, -501, -81, 317, -501,
1361 126, 218, -208, 74, -501, -501, -501, -501, 398, -501,
1362 -501, -501, -501, 2, -501, 35, -501, -501, 423, -501,
1363 -501, -501, -501, -501, 451, -501, -471, -106, -62, -90,
1364 -501, 417, -501, -116, -501, -501, -501, -501, 22, -39,
1365 -501, -501, 43, -501, -501
1368 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1369 positive, shift that token. If negative, reduce the rule which
1370 number is the opposite. If zero, do what YYDEFACT says.
1371 If YYTABLE_NINF, syntax error. */
1372 #define YYTABLE_NINF -176
1373 static const short int yytable[] =
1375 86, 127, 145, 146, 329, 25, 115, 382, 134, -175,
1376 40, 437, 135, 86, 94, 91, 277, 547, 240, 400,
1377 346, 347, 439, 136, 44, 45, 46, 270, 241, 270,
1378 270, 137, 138, 139, 140, 141, 142, 143, 144, 401,
1379 5, 270, 425, 6, 47, 25, 116, 117, 564, 127,
1380 426, 7, 8, 9, 10, 11, 12, 13, 438, 275,
1381 133, 137, 138, 139, 140, 141, 142, 143, 144, 438,
1382 -112, 322, 14, 272, 273, 19, 562, 20, 425, 131,
1383 219, 220, 4, 237, 425, 274, 129, 308, 462, 410,
1384 312, 30, 461, 571, 131, 313, 314, 315, 316, 31,
1385 32, 33, 34, 35, 36, 37, 289, 290, 325, 49,
1386 411, 133, 425, 131, 326, 320, 321, 27, 460, 28,
1387 98, 99, 100, 40, 101, 102, 103, 119, 50, 345,
1388 120, 121, 405, 406, 408, 212, 213, 306, 307, 133,
1389 309, 310, 133, 95, 92, 323, 324, 133, 133, 133,
1390 133, 19, 60, 20, 51, 330, 331, 348, 349, 350,
1391 -72, -72, -71, -71, 317, 318, 319, 133, 133, 7,
1392 8, 9, 52, 11, 53, 13, 58, 54, -70, -70,
1393 -69, -69, 332, 333, 546, 55, 523, 459, 524, 291,
1394 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
1395 302, 303, 304, 270, 352, 278, 279, 280, 281, 282,
1396 283, 270, 270, 270, 563, 101, 102, 62, 108, 109,
1397 110, 284, 285, 286, 287, 122, 111, 112, 123, 124,
1398 -113, 130, 376, 211, 398, 215, 216, 276, 217, 86,
1399 238, 239, 242, 327, -76, -75, 236, 383, -74, -73,
1400 377, 356, 335, -79, -80, 391, 392, 393, 137, 138,
1401 139, 140, 141, 142, 143, 144, 336, 378, 357, 358,
1402 270, 270, 270, 362, 363, 350, 374, 396, 270, 364,
1403 395, 399, 365, 366, 86, 397, 133, 369, 370, 371,
1404 270, 270, 384, 372, 373, 409, 444, 415, 446, 447,
1405 448, 375, 379, 381, 452, 385, 386, 387, 388, 389,
1406 390, 394, 414, 417, 434, 435, 436, 432, 418, 433,
1407 419, 440, 442, 443, 449, 450, 270, 270, 451, 457,
1408 456, 270, 458, 270, 454, 455, 467, 270, 400, 471,
1409 472, 473, 474, 270, 270, 270, 476, 477, 133, 445,
1410 133, 133, 133, 478, 412, 480, 133, 453, 483, 487,
1411 501, 479, 503, 533, 484, 485, 491, 493, 494, 545,
1412 481, 482, 495, 499, 504, 486, 352, 488, 270, 270,
1413 505, 492, 438, 553, 506, 270, 565, 496, 497, 498,
1414 516, 517, 522, 572, 270, 525, 527, 537, 536, 538,
1415 539, 570, 133, 528, 529, 530, 573, 540, 566, 541,
1416 542, 543, 544, 549, 550, 551, 555, 556, 500, 145,
1417 146, 270, 520, 521, 557, 567, 568, 569, 574, 526,
1418 577, 580, 202, 203, 204, 552, 360, 205, 532, 270,
1419 206, 361, 515, 104, 56, 133, 465, 244, 114, 464,
1420 145, 146, 59, 344, 26, 133, 133, 133, 97, 578,
1421 531, 133, 490, 470, 0, 554, 270, 270, 0, 0,
1422 0, 270, 0, 0, 270, 0, 0, 0, 0, 0,
1423 0, 0, 0, 561, 0, 0, 0, 133, 420, 421,
1424 422, 423, 424, 0, 0, 427, 428, 429, 430, 431,
1425 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1426 575, 576, 0, 0, 0, 579, 0, 0, 581, 0,
1427 0, 125, 64, 65, 66, 67, 68, 69, 70, 71,
1428 72, 73, 74, 75, 76, 0, 0, 77, 78, 0,
1429 0, 0, 0, 0, 468, 469, 19, 0, 20, 0,
1430 0, 475, 125, 221, 222, 223, 224, 225, 226, 227,
1431 228, 229, 230, 231, 75, 76, 0, 0, 77, 78,
1432 0, 0, 0, 0, 0, 0, 0, 19, 0, 20,
1433 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1434 0, 0, 0, 0, 0, 0, 0, 507, 508, 509,
1435 510, 0, 511, 512, 513, 514, 0, 125, 64, 65,
1436 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
1437 76, 0, 0, 77, 78, 0, 0, 0, 0, 0,
1438 534, 535, 19, 0, 20, 0, 0, 0, 0, 0,
1439 0, 0, 0, 0, 243, 0, 0, 0, 0, 0,
1440 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1441 0, 0, 558, 0, 559, 560, 0, 0, 0, 0,
1442 0, 79, 0, 0, 80, 0, 0, 81, 0, 82,
1443 126, 0, 125, 64, 65, 66, 67, 68, 69, 70,
1444 71, 72, 73, 74, 75, 76, 0, 0, 77, 78,
1445 0, 0, 79, 0, 0, 80, 0, 19, 81, 20,
1446 82, 407, 0, 0, 0, 0, 0, 0, 0, 351,
1447 125, 221, 222, 223, 224, 225, 226, 227, 228, 229,
1448 230, 231, 75, 76, 0, 0, 77, 78, 0, 0,
1449 0, 0, 0, 0, 0, 19, 0, 20, 0, 0,
1450 0, 0, 0, 0, 0, 0, 0, 79, 0, 0,
1451 80, 0, 0, 81, 0, 82, 125, 64, 65, 66,
1452 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
1453 0, 0, 77, 78, 0, 0, 0, 0, 0, 0,
1454 0, 19, 0, 20, 0, 0, 0, 0, 0, 0,
1455 0, 0, 0, 416, 125, 64, 65, 66, 67, 68,
1456 69, 70, 71, 72, 73, 74, 75, 76, 0, 0,
1457 77, 78, 0, 0, 0, 0, 0, 0, 0, 19,
1458 0, 20, 79, 0, 0, 80, 0, 0, 81, 0,
1459 82, 463, 63, 64, 65, 66, 67, 68, 69, 70,
1460 71, 72, 73, 74, 75, 76, 0, 0, 77, 78,
1461 0, 0, 0, 0, 0, 0, 0, 19, 0, 20,
1462 79, 0, 0, 80, 0, 404, 81, 0, 82, 132,
1463 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
1464 74, 75, 76, 0, 0, 77, 78, 0, 0, 0,
1465 0, 0, 0, 0, 19, 0, 20, 0, 0, 0,
1466 0, 0, 0, 0, 0, 0, 79, 0, 0, 80,
1467 0, 0, 81, 0, 82, 125, 64, 65, 66, 67,
1468 68, 69, 70, 71, 72, 73, 74, 75, 76, 0,
1469 0, 77, 78, 0, 0, 0, 0, 0, 0, 0,
1470 19, 0, 20, 0, 79, 0, 0, 80, 0, 0,
1471 81, 0, 82, 125, 221, 222, 223, 224, 225, 226,
1472 227, 228, 229, 230, 231, 75, 76, 0, 0, 77,
1473 78, 0, 0, 0, 0, 0, 0, 0, 19, 0,
1474 20, 0, 79, 0, 0, 80, 0, 0, 81, 0,
1475 82, 0, -82, 19, 0, 20, 0, 0, 0, 6,
1476 -82, -82, 0, 0, 0, 0, 0, -82, -82, -82,
1477 -82, -82, -82, -82, 0, -82, 21, 0, 0, 79,
1478 0, 0, 80, -82, 22, 81, 0, 82, 23, 0,
1479 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1480 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1481 0, 77, 78, 0, 337, 338, 339, 0, 0, 0,
1482 19, 0, 20, 0, 0, 79, 0, 0, 80, 0,
1483 0, 81, 0, 82, 0, 0, 0, 0, 0, 0,
1484 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1485 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1486 0, 0, 0, 79, 0, 0, 80, 0, 0, 81,
1487 0, 82, 153, 154, 155, 156, 157, 158, 159, 160,
1488 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
1489 171, 172, 255, 256, 0, 0, 0, 0, 246, 247,
1490 77, 78, 248, 249, 250, 251, 252, 253, 0, 19,
1491 0, 20, 0, 0, 0, 0, 0, 0, 0, 257,
1492 0, 258, 181, 182, 183, 184, 0, 259, 260, 261,
1493 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
1494 199, 200, 201, 254, 0, 0, 0, 0, 340, 0,
1495 0, 341, 0, 342, 0, 0, 343, 0, 0, 0,
1496 0, 153, 154, 155, 156, 157, 158, 159, 160, 161,
1497 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
1498 172, 255, 256, 0, 0, 0, 0, 246, 247, 0,
1499 0, 248, 249, 250, 251, 252, 253, 0, 0, 0,
1500 0, 0, 0, 0, 0, 0, 0, 0, 257, 0,
1501 258, 181, 182, 183, 184, 0, 259, 260, 261, 189,
1502 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
1503 200, 201, 254, 0, 0, 0, 0, 0, 0, 0,
1504 262, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1505 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
1506 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
1507 255, 256, 0, 0, 0, 0, 0, 0, 0, 0,
1508 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1509 0, 0, 0, 0, 0, 0, 0, 257, 0, 258,
1510 181, 182, 183, 184, 0, 259, 260, 261, 189, 190,
1511 191, 192, 193, 194, 195, 196, 197, 198, 199, 200,
1512 201, 148, 0, 0, 0, 0, 0, 0, 0, 262,
1513 0, 0, 149, 0, 0, 0, 0, 0, 0, 0,
1514 0, 0, 0, 150, 151, 0, 0, 0, 0, 0,
1515 0, 0, 0, 0, 0, 0, 0, 0, 0, 152,
1516 0, 0, 0, 153, 154, 155, 156, 157, 158, 159,
1517 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
1518 170, 171, 172, 173, 174, 0, 0, 0, 0, 0,
1519 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1520 0, 0, 0, 0, 0, 175, 176, 177, 0, 0,
1521 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
1522 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
1526 static const short int yycheck[] =
1528 38, 82, 100, 100, 220, 3, 51, 307, 98, 0,
1529 29, 10, 4, 51, 33, 32, 152, 517, 152, 37,
1530 236, 237, 10, 15, 52, 53, 54, 133, 162, 135,
1531 136, 5, 6, 7, 8, 9, 10, 11, 12, 57,
1532 31, 147, 152, 34, 72, 43, 35, 36, 548, 130,
1533 160, 42, 43, 44, 45, 46, 47, 48, 57, 149,
1534 98, 5, 6, 7, 8, 9, 10, 11, 12, 57,
1535 154, 207, 63, 135, 136, 28, 547, 30, 152, 163,
1536 118, 119, 0, 121, 152, 147, 84, 177, 162, 158,
1537 180, 62, 160, 564, 163, 185, 186, 187, 188, 65,
1538 66, 67, 68, 69, 70, 71, 25, 26, 152, 151,
1539 160, 149, 152, 163, 158, 205, 206, 45, 158, 47,
1540 73, 74, 75, 29, 77, 78, 79, 53, 62, 235,
1541 56, 57, 340, 341, 342, 55, 56, 175, 176, 177,
1542 178, 179, 180, 162, 161, 125, 126, 185, 186, 187,
1543 188, 28, 30, 30, 27, 25, 26, 238, 239, 240,
1544 17, 18, 17, 18, 202, 203, 204, 205, 206, 42,
1545 43, 44, 45, 46, 47, 48, 151, 50, 17, 18,
1546 17, 18, 17, 18, 158, 58, 486, 403, 488, 108,
1547 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
1548 119, 120, 121, 309, 242, 102, 103, 104, 105, 106,
1549 107, 317, 318, 319, 158, 77, 78, 18, 151, 151,
1550 151, 118, 119, 120, 121, 18, 151, 156, 18, 18,
1551 154, 154, 277, 30, 324, 18, 30, 60, 30, 277,
1552 157, 157, 154, 152, 18, 18, 120, 309, 18, 18,
1553 288, 152, 18, 21, 21, 317, 318, 319, 5, 6,
1554 7, 8, 9, 10, 11, 12, 21, 305, 155, 64,
1555 376, 377, 378, 154, 154, 356, 152, 322, 384, 154,
1556 39, 30, 154, 154, 322, 323, 324, 154, 154, 154,
1557 396, 397, 156, 154, 154, 30, 386, 155, 388, 389,
1558 390, 152, 152, 152, 394, 152, 152, 152, 152, 152,
1559 152, 152, 152, 30, 376, 377, 378, 15, 154, 15,
1560 154, 152, 384, 156, 152, 152, 432, 433, 152, 30,
1561 152, 437, 18, 439, 396, 397, 152, 443, 37, 152,
1562 152, 152, 152, 449, 450, 451, 152, 152, 386, 387,
1563 388, 389, 390, 152, 352, 39, 394, 395, 154, 18,
1564 57, 152, 30, 18, 152, 152, 152, 152, 152, 15,
1565 432, 433, 152, 154, 152, 437, 414, 439, 484, 485,
1566 152, 443, 57, 158, 155, 491, 39, 449, 450, 451,
1567 152, 156, 152, 15, 500, 152, 152, 155, 152, 152,
1568 152, 152, 440, 493, 494, 495, 15, 155, 158, 155,
1569 155, 155, 155, 155, 155, 155, 155, 155, 456, 517,
1570 517, 527, 484, 485, 155, 155, 155, 155, 152, 491,
1571 15, 15, 104, 104, 104, 525, 255, 104, 500, 545,
1572 104, 256, 480, 43, 24, 483, 415, 130, 50, 414,
1573 548, 548, 29, 235, 3, 493, 494, 495, 41, 575,
1574 499, 499, 440, 420, -1, 527, 572, 573, -1, -1,
1575 -1, 577, -1, -1, 580, -1, -1, -1, -1, -1,
1576 -1, -1, -1, 545, -1, -1, -1, 525, 362, 363,
1577 364, 365, 366, -1, -1, 369, 370, 371, 372, 373,
1578 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1579 572, 573, -1, -1, -1, 577, -1, -1, 580, -1,
1580 -1, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1581 12, 13, 14, 15, 16, -1, -1, 19, 20, -1,
1582 -1, -1, -1, -1, 418, 419, 28, -1, 30, -1,
1583 -1, 425, 3, 4, 5, 6, 7, 8, 9, 10,
1584 11, 12, 13, 14, 15, 16, -1, -1, 19, 20,
1585 -1, -1, -1, -1, -1, -1, -1, 28, -1, 30,
1586 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1587 -1, -1, -1, -1, -1, -1, -1, 471, 472, 473,
1588 474, -1, 476, 477, 478, 479, -1, 3, 4, 5,
1589 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1590 16, -1, -1, 19, 20, -1, -1, -1, -1, -1,
1591 504, 505, 28, -1, 30, -1, -1, -1, -1, -1,
1592 -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
1593 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1594 -1, -1, 536, -1, 538, 539, -1, -1, -1, -1,
1595 -1, 153, -1, -1, 156, -1, -1, 159, -1, 161,
1596 162, -1, 3, 4, 5, 6, 7, 8, 9, 10,
1597 11, 12, 13, 14, 15, 16, -1, -1, 19, 20,
1598 -1, -1, 153, -1, -1, 156, -1, 28, 159, 30,
1599 161, 162, -1, -1, -1, -1, -1, -1, -1, 40,
1600 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1601 13, 14, 15, 16, -1, -1, 19, 20, -1, -1,
1602 -1, -1, -1, -1, -1, 28, -1, 30, -1, -1,
1603 -1, -1, -1, -1, -1, -1, -1, 153, -1, -1,
1604 156, -1, -1, 159, -1, 161, 3, 4, 5, 6,
1605 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1606 -1, -1, 19, 20, -1, -1, -1, -1, -1, -1,
1607 -1, 28, -1, 30, -1, -1, -1, -1, -1, -1,
1608 -1, -1, -1, 40, 3, 4, 5, 6, 7, 8,
1609 9, 10, 11, 12, 13, 14, 15, 16, -1, -1,
1610 19, 20, -1, -1, -1, -1, -1, -1, -1, 28,
1611 -1, 30, 153, -1, -1, 156, -1, -1, 159, -1,
1612 161, 40, 3, 4, 5, 6, 7, 8, 9, 10,
1613 11, 12, 13, 14, 15, 16, -1, -1, 19, 20,
1614 -1, -1, -1, -1, -1, -1, -1, 28, -1, 30,
1615 153, -1, -1, 156, -1, 158, 159, -1, 161, 3,
1616 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1617 14, 15, 16, -1, -1, 19, 20, -1, -1, -1,
1618 -1, -1, -1, -1, 28, -1, 30, -1, -1, -1,
1619 -1, -1, -1, -1, -1, -1, 153, -1, -1, 156,
1620 -1, -1, 159, -1, 161, 3, 4, 5, 6, 7,
1621 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
1622 -1, 19, 20, -1, -1, -1, -1, -1, -1, -1,
1623 28, -1, 30, -1, 153, -1, -1, 156, -1, -1,
1624 159, -1, 161, 3, 4, 5, 6, 7, 8, 9,
1625 10, 11, 12, 13, 14, 15, 16, -1, -1, 19,
1626 20, -1, -1, -1, -1, -1, -1, -1, 28, -1,
1627 30, -1, 153, -1, -1, 156, -1, -1, 159, -1,
1628 161, -1, 27, 28, -1, 30, -1, -1, -1, 34,
1629 35, 36, -1, -1, -1, -1, -1, 42, 43, 44,
1630 45, 46, 47, 48, -1, 50, 51, -1, -1, 153,
1631 -1, -1, 156, 58, 59, 159, -1, 161, 63, -1,
1632 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1633 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1634 -1, 19, 20, -1, 22, 23, 24, -1, -1, -1,
1635 28, -1, 30, -1, -1, 153, -1, -1, 156, -1,
1636 -1, 159, -1, 161, -1, -1, -1, -1, -1, -1,
1637 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1638 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1639 -1, -1, -1, 153, -1, -1, 156, -1, -1, 159,
1640 -1, 161, 80, 81, 82, 83, 84, 85, 86, 87,
1641 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
1642 98, 99, 100, 101, -1, -1, -1, -1, 17, 18,
1643 19, 20, 21, 22, 23, 24, 25, 26, -1, 28,
1644 -1, 30, -1, -1, -1, -1, -1, -1, -1, 127,
1645 -1, 129, 130, 131, 132, 133, -1, 135, 136, 137,
1646 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
1647 148, 149, 150, 62, -1, -1, -1, -1, 156, -1,
1648 -1, 159, -1, 161, -1, -1, 164, -1, -1, -1,
1649 -1, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1650 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
1651 99, 100, 101, -1, -1, -1, -1, 17, 18, -1,
1652 -1, 21, 22, 23, 24, 25, 26, -1, -1, -1,
1653 -1, -1, -1, -1, -1, -1, -1, -1, 127, -1,
1654 129, 130, 131, 132, 133, -1, 135, 136, 137, 138,
1655 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
1656 149, 150, 62, -1, -1, -1, -1, -1, -1, -1,
1657 159, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1658 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
1659 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
1660 100, 101, -1, -1, -1, -1, -1, -1, -1, -1,
1661 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1662 -1, -1, -1, -1, -1, -1, -1, 127, -1, 129,
1663 130, 131, 132, 133, -1, 135, 136, 137, 138, 139,
1664 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
1665 150, 38, -1, -1, -1, -1, -1, -1, -1, 159,
1666 -1, -1, 49, -1, -1, -1, -1, -1, -1, -1,
1667 -1, -1, -1, 60, 61, -1, -1, -1, -1, -1,
1668 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
1669 -1, -1, -1, 80, 81, 82, 83, 84, 85, 86,
1670 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
1671 97, 98, 99, 100, 101, -1, -1, -1, -1, -1,
1672 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1673 -1, -1, -1, -1, -1, 122, 123, 124, -1, -1,
1674 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
1675 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
1679 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1680 symbol of state STATE-NUM. */
1681 static const unsigned char yystos[] =
1683 0, 199, 200, 202, 0, 31, 34, 42, 43, 44,
1684 45, 46, 47, 48, 63, 180, 215, 217, 219, 28,
1685 30, 51, 59, 63, 179, 208, 219, 45, 47, 218,
1686 62, 65, 66, 67, 68, 69, 70, 71, 181, 213,
1687 29, 225, 226, 227, 52, 53, 54, 72, 205, 151,
1688 62, 27, 45, 47, 50, 58, 180, 201, 151, 213,
1689 30, 203, 18, 3, 4, 5, 6, 7, 8, 9,
1690 10, 11, 12, 13, 14, 15, 16, 19, 20, 153,
1691 156, 159, 161, 166, 188, 189, 190, 191, 192, 208,
1692 222, 32, 161, 214, 33, 162, 216, 226, 73, 74,
1693 75, 77, 78, 79, 179, 228, 229, 231, 151, 151,
1694 151, 151, 156, 206, 203, 188, 35, 36, 198, 198,
1695 198, 198, 18, 18, 18, 3, 162, 192, 193, 208,
1696 154, 163, 3, 190, 224, 4, 15, 5, 6, 7,
1697 8, 9, 10, 11, 12, 175, 176, 177, 38, 49,
1698 60, 61, 76, 80, 81, 82, 83, 84, 85, 86,
1699 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
1700 97, 98, 99, 100, 101, 122, 123, 124, 127, 128,
1701 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
1702 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
1703 149, 150, 168, 169, 170, 173, 174, 235, 236, 238,
1704 239, 30, 55, 56, 204, 18, 30, 30, 207, 190,
1705 190, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1706 13, 14, 175, 176, 178, 190, 195, 190, 157, 157,
1707 152, 162, 154, 40, 193, 194, 17, 18, 21, 22,
1708 23, 24, 25, 26, 62, 100, 101, 127, 129, 135,
1709 136, 137, 159, 168, 169, 170, 173, 174, 196, 221,
1710 222, 223, 223, 223, 223, 224, 60, 181, 102, 103,
1711 104, 105, 106, 107, 118, 119, 120, 121, 171, 25,
1712 26, 108, 109, 110, 111, 112, 113, 114, 115, 116,
1713 117, 118, 119, 120, 121, 172, 190, 190, 224, 190,
1714 190, 232, 224, 224, 224, 224, 224, 190, 190, 190,
1715 224, 224, 181, 125, 126, 152, 158, 152, 186, 186,
1716 25, 26, 17, 18, 167, 18, 21, 22, 23, 24,
1717 156, 159, 161, 164, 196, 222, 186, 186, 192, 192,
1718 192, 40, 190, 210, 211, 212, 152, 155, 64, 220,
1719 171, 172, 154, 154, 154, 154, 154, 195, 197, 154,
1720 154, 154, 154, 154, 152, 152, 188, 190, 190, 152,
1721 183, 152, 183, 223, 156, 152, 152, 152, 152, 152,
1722 152, 223, 223, 223, 152, 39, 188, 190, 224, 30,
1723 37, 57, 184, 187, 158, 197, 197, 162, 197, 30,
1724 158, 160, 208, 209, 152, 155, 40, 30, 154, 154,
1725 195, 195, 195, 195, 195, 152, 160, 195, 195, 195,
1726 195, 195, 15, 15, 223, 223, 223, 10, 57, 10,
1727 152, 237, 223, 156, 224, 190, 224, 224, 224, 152,
1728 152, 152, 224, 190, 223, 223, 152, 30, 18, 186,
1729 158, 160, 162, 40, 210, 184, 185, 152, 195, 195,
1730 237, 152, 152, 152, 152, 195, 152, 152, 152, 152,
1731 39, 223, 223, 154, 152, 152, 223, 18, 223, 224,
1732 233, 152, 223, 152, 152, 152, 223, 223, 223, 154,
1733 190, 57, 182, 30, 152, 152, 155, 195, 195, 195,
1734 195, 195, 195, 195, 195, 190, 152, 156, 233, 234,
1735 223, 223, 152, 183, 183, 152, 223, 152, 224, 224,
1736 224, 234, 223, 18, 195, 195, 152, 155, 152, 152,
1737 155, 155, 155, 155, 155, 15, 158, 177, 230, 155,
1738 155, 155, 224, 158, 223, 155, 155, 155, 195, 195,
1739 195, 223, 221, 158, 177, 39, 158, 155, 155, 155,
1740 152, 221, 15, 15, 152, 223, 223, 15, 228, 223,
1744 #define yyerrok (yyerrstatus = 0)
1745 #define yyclearin (yychar = YYEMPTY)
1746 #define YYEMPTY (-2)
1749 #define YYACCEPT goto yyacceptlab
1750 #define YYABORT goto yyabortlab
1751 #define YYERROR goto yyerrorlab
1754 /* Like YYERROR except do call yyerror. This remains here temporarily
1755 to ease the transition to the new meaning of YYERROR, for GCC.
1756 Once GCC version 2 has supplanted version 1, this can go. */
1758 #define YYFAIL goto yyerrlab
1760 #define YYRECOVERING() (!!yyerrstatus)
1762 #define YYBACKUP(Token, Value) \
1764 if (yychar == YYEMPTY && yylen == 1) \
1768 yytoken = YYTRANSLATE (yychar); \
1774 yyerror (YY_("syntax error: cannot back up")); \
1781 #define YYERRCODE 256
1784 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1785 If N is 0, then set CURRENT to the empty location which ends
1786 the previous symbol: RHS[0] (always defined). */
1788 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1789 #ifndef YYLLOC_DEFAULT
1790 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1794 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1795 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1796 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1797 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1801 (Current).first_line = (Current).last_line = \
1802 YYRHSLOC (Rhs, 0).last_line; \
1803 (Current).first_column = (Current).last_column = \
1804 YYRHSLOC (Rhs, 0).last_column; \
1810 /* YY_LOCATION_PRINT -- Print the location on the stream.
1811 This macro was not mandated originally: define only if we know
1812 we won't break user code: when these are the locations we know. */
1814 #ifndef YY_LOCATION_PRINT
1815 # if YYLTYPE_IS_TRIVIAL
1816 # define YY_LOCATION_PRINT(File, Loc) \
1817 fprintf (File, "%d.%d-%d.%d", \
1818 (Loc).first_line, (Loc).first_column, \
1819 (Loc).last_line, (Loc).last_column)
1821 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1826 /* YYLEX -- calling `yylex' with the right arguments. */
1829 # define YYLEX yylex (YYLEX_PARAM)
1831 # define YYLEX yylex ()
1834 /* Enable debugging if requested. */
1838 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1839 # define YYFPRINTF fprintf
1842 # define YYDPRINTF(Args) \
1848 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1852 YYFPRINTF (stderr, "%s ", Title); \
1853 yysymprint (stderr, \
1855 YYFPRINTF (stderr, "\n"); \
1859 /*------------------------------------------------------------------.
1860 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1862 `------------------------------------------------------------------*/
1864 #if defined (__STDC__) || defined (__cplusplus)
1866 yy_stack_print (short int *bottom, short int *top)
1869 yy_stack_print (bottom, top)
1874 YYFPRINTF (stderr, "Stack now");
1875 for (/* Nothing. */; bottom <= top; ++bottom)
1876 YYFPRINTF (stderr, " %d", *bottom);
1877 YYFPRINTF (stderr, "\n");
1880 # define YY_STACK_PRINT(Bottom, Top) \
1883 yy_stack_print ((Bottom), (Top)); \
1887 /*------------------------------------------------.
1888 | Report that the YYRULE is going to be reduced. |
1889 `------------------------------------------------*/
1891 #if defined (__STDC__) || defined (__cplusplus)
1893 yy_reduce_print (int yyrule)
1896 yy_reduce_print (yyrule)
1901 unsigned long int yylno = yyrline[yyrule];
1902 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
1904 /* Print the symbols being reduced, and their result. */
1905 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
1906 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1907 YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
1910 # define YY_REDUCE_PRINT(Rule) \
1913 yy_reduce_print (Rule); \
1916 /* Nonzero means print parse trace. It is left uninitialized so that
1917 multiple parsers can coexist. */
1919 #else /* !YYDEBUG */
1920 # define YYDPRINTF(Args)
1921 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1922 # define YY_STACK_PRINT(Bottom, Top)
1923 # define YY_REDUCE_PRINT(Rule)
1924 #endif /* !YYDEBUG */
1927 /* YYINITDEPTH -- initial size of the parser's stacks. */
1929 # define YYINITDEPTH 200
1932 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1933 if the built-in stack extension method is used).
1935 Do not make this value too large; the results are undefined if
1936 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1937 evaluated with infinite-precision integer arithmetic. */
1940 # define YYMAXDEPTH 10000
1948 # if defined (__GLIBC__) && defined (_STRING_H)
1949 # define yystrlen strlen
1951 /* Return the length of YYSTR. */
1953 # if defined (__STDC__) || defined (__cplusplus)
1954 yystrlen (const char *yystr)
1960 const char *yys = yystr;
1962 while (*yys++ != '\0')
1965 return yys - yystr - 1;
1971 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1972 # define yystpcpy stpcpy
1974 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1977 # if defined (__STDC__) || defined (__cplusplus)
1978 yystpcpy (char *yydest, const char *yysrc)
1980 yystpcpy (yydest, yysrc)
1986 const char *yys = yysrc;
1988 while ((*yyd++ = *yys++) != '\0')
1997 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1998 quotes and backslashes, so that it's suitable for yyerror. The
1999 heuristic is that double-quoting is unnecessary unless the string
2000 contains an apostrophe, a comma, or backslash (other than
2001 backslash-backslash). YYSTR is taken from yytname. If YYRES is
2002 null, do not copy; instead, return the length of what the result
2005 yytnamerr (char *yyres, const char *yystr)
2010 char const *yyp = yystr;
2017 goto do_not_strip_quotes;
2021 goto do_not_strip_quotes;
2034 do_not_strip_quotes: ;
2038 return yystrlen (yystr);
2040 return yystpcpy (yyres, yystr) - yyres;
2044 #endif /* YYERROR_VERBOSE */
2049 /*--------------------------------.
2050 | Print this symbol on YYOUTPUT. |
2051 `--------------------------------*/
2053 #if defined (__STDC__) || defined (__cplusplus)
2055 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
2058 yysymprint (yyoutput, yytype, yyvaluep)
2064 /* Pacify ``unused variable'' warnings. */
2067 if (yytype < YYNTOKENS)
2068 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
2070 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
2074 if (yytype < YYNTOKENS)
2075 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
2082 YYFPRINTF (yyoutput, ")");
2085 #endif /* ! YYDEBUG */
2086 /*-----------------------------------------------.
2087 | Release the memory associated to this symbol. |
2088 `-----------------------------------------------*/
2090 #if defined (__STDC__) || defined (__cplusplus)
2092 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
2095 yydestruct (yymsg, yytype, yyvaluep)
2101 /* Pacify ``unused variable'' warnings. */
2106 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2117 /* Prevent warnings from -Wmissing-prototypes. */
2119 #ifdef YYPARSE_PARAM
2120 # if defined (__STDC__) || defined (__cplusplus)
2121 int yyparse (void *YYPARSE_PARAM);
2125 #else /* ! YYPARSE_PARAM */
2126 #if defined (__STDC__) || defined (__cplusplus)
2131 #endif /* ! YYPARSE_PARAM */
2135 /* The look-ahead symbol. */
2138 /* The semantic value of the look-ahead symbol. */
2141 /* Number of syntax errors so far. */
2150 #ifdef YYPARSE_PARAM
2151 # if defined (__STDC__) || defined (__cplusplus)
2152 int yyparse (void *YYPARSE_PARAM)
2154 int yyparse (YYPARSE_PARAM)
2155 void *YYPARSE_PARAM;
2157 #else /* ! YYPARSE_PARAM */
2158 #if defined (__STDC__) || defined (__cplusplus)
2172 /* Number of tokens to shift before error messages enabled. */
2174 /* Look-ahead token as an internal (translated) token number. */
2177 /* Three stacks and their tools:
2178 `yyss': related to states,
2179 `yyvs': related to semantic values,
2180 `yyls': related to locations.
2182 Refer to the stacks thru separate pointers, to allow yyoverflow
2183 to reallocate them elsewhere. */
2185 /* The state stack. */
2186 short int yyssa[YYINITDEPTH];
2187 short int *yyss = yyssa;
2190 /* The semantic value stack. */
2191 YYSTYPE yyvsa[YYINITDEPTH];
2192 YYSTYPE *yyvs = yyvsa;
2197 #define YYPOPSTACK (yyvsp--, yyssp--)
2199 YYSIZE_T yystacksize = YYINITDEPTH;
2201 /* The variables used to return semantic value and location from the
2206 /* When reducing, the number of symbols on the RHS of the reduced
2210 YYDPRINTF ((stderr, "Starting parse\n"));
2215 yychar = YYEMPTY; /* Cause a token to be read. */
2217 /* Initialize stack pointers.
2218 Waste one element of value and location stack
2219 so that they stay on the same level as the state stack.
2220 The wasted elements are never initialized. */
2227 /*------------------------------------------------------------.
2228 | yynewstate -- Push a new state, which is found in yystate. |
2229 `------------------------------------------------------------*/
2231 /* In all cases, when you get here, the value and location stacks
2232 have just been pushed. so pushing a state here evens the stacks.
2239 if (yyss + yystacksize - 1 <= yyssp)
2241 /* Get the current used size of the three stacks, in elements. */
2242 YYSIZE_T yysize = yyssp - yyss + 1;
2246 /* Give user a chance to reallocate the stack. Use copies of
2247 these so that the &'s don't force the real ones into
2249 YYSTYPE *yyvs1 = yyvs;
2250 short int *yyss1 = yyss;
2253 /* Each stack pointer address is followed by the size of the
2254 data in use in that stack, in bytes. This used to be a
2255 conditional around just the two extra args, but that might
2256 be undefined if yyoverflow is a macro. */
2257 yyoverflow (YY_("memory exhausted"),
2258 &yyss1, yysize * sizeof (*yyssp),
2259 &yyvs1, yysize * sizeof (*yyvsp),
2266 #else /* no yyoverflow */
2267 # ifndef YYSTACK_RELOCATE
2268 goto yyexhaustedlab;
2270 /* Extend the stack our own way. */
2271 if (YYMAXDEPTH <= yystacksize)
2272 goto yyexhaustedlab;
2274 if (YYMAXDEPTH < yystacksize)
2275 yystacksize = YYMAXDEPTH;
2278 short int *yyss1 = yyss;
2279 union yyalloc *yyptr =
2280 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2282 goto yyexhaustedlab;
2283 YYSTACK_RELOCATE (yyss);
2284 YYSTACK_RELOCATE (yyvs);
2286 # undef YYSTACK_RELOCATE
2288 YYSTACK_FREE (yyss1);
2291 #endif /* no yyoverflow */
2293 yyssp = yyss + yysize - 1;
2294 yyvsp = yyvs + yysize - 1;
2297 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2298 (unsigned long int) yystacksize));
2300 if (yyss + yystacksize - 1 <= yyssp)
2304 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2313 /* Do appropriate processing given the current state. */
2314 /* Read a look-ahead token if we need one and don't already have one. */
2317 /* First try to decide what to do without reference to look-ahead token. */
2319 yyn = yypact[yystate];
2320 if (yyn == YYPACT_NINF)
2323 /* Not known => get a look-ahead token if don't already have one. */
2325 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
2326 if (yychar == YYEMPTY)
2328 YYDPRINTF ((stderr, "Reading a token: "));
2332 if (yychar <= YYEOF)
2334 yychar = yytoken = YYEOF;
2335 YYDPRINTF ((stderr, "Now at end of input.\n"));
2339 yytoken = YYTRANSLATE (yychar);
2340 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2343 /* If the proper action on seeing token YYTOKEN is to reduce or to
2344 detect an error, take that action. */
2346 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2351 if (yyn == 0 || yyn == YYTABLE_NINF)
2360 /* Shift the look-ahead token. */
2361 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2363 /* Discard the token being shifted unless it is eof. */
2364 if (yychar != YYEOF)
2370 /* Count tokens shifted since error; after three, turn off error
2379 /*-----------------------------------------------------------.
2380 | yydefault -- do the default action for the current state. |
2381 `-----------------------------------------------------------*/
2383 yyn = yydefact[yystate];
2389 /*-----------------------------.
2390 | yyreduce -- Do a reduction. |
2391 `-----------------------------*/
2393 /* yyn is the number of a rule to reduce with. */
2396 /* If YYLEN is nonzero, implement the default value of the action:
2399 Otherwise, the following line sets YYVAL to garbage.
2400 This behavior is undocumented and Bison
2401 users should not rely upon it. Assigning to YYVAL
2402 unconditionally makes the parser a bit smaller, and it avoids a
2403 GCC warning that YYVAL may be used uninitialized. */
2404 yyval = yyvsp[1-yylen];
2407 YY_REDUCE_PRINT (yyn);
2411 #line 373 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2413 (yyval.String) = (yyvsp[-1].String);
2418 #line 376 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2420 (yyval.String) = new std::string("");
2425 #line 383 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2426 { (yyval.String) = new std::string(""); ;}
2430 #line 388 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2432 *(yyvsp[-1].String) += *(yyvsp[0].String);
2433 delete (yyvsp[0].String);
2434 (yyval.String) = (yyvsp[-1].String);
2439 #line 393 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2440 { (yyval.String) = new std::string(""); ;}
2444 #line 398 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2445 { (yyval.String) = new std::string(); ;}
2449 #line 399 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2450 { *(yyvsp[-1].String) += " " + *(yyvsp[0].String); delete (yyvsp[0].String); (yyval.String) = (yyvsp[-1].String); ;}
2454 #line 402 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2455 { (yyval.String) = new std::string(); ;}
2459 #line 403 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2461 (yyvsp[-1].String)->insert(0, ", ");
2462 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2463 delete (yyvsp[0].String);
2464 (yyval.String) = (yyvsp[-1].String);
2469 #line 411 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2471 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2472 delete (yyvsp[0].String);
2473 (yyval.String) = (yyvsp[-1].String);
2478 #line 417 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2479 { (yyval.String) = new std::string(); ;}
2483 #line 421 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2484 { (yyval.String) = new std::string(); ;}
2488 #line 422 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2490 (yyvsp[-1].String)->insert(0, ", ");
2491 if (!(yyvsp[0].String)->empty())
2492 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2493 delete (yyvsp[0].String);
2494 (yyval.String) = (yyvsp[-1].String);
2499 #line 432 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2501 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2502 delete (yyvsp[0].String);
2503 (yyval.String) = (yyvsp[-1].String);
2508 #line 454 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2510 (yyval.Type).newTy = (yyvsp[0].String);
2511 (yyval.Type).oldTy = OpaqueTy;
2516 #line 458 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2518 (yyval.Type).newTy = (yyvsp[0].String);
2519 (yyval.Type).oldTy = UnresolvedTy;
2524 #line 462 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2526 (yyval.Type) = (yyvsp[0].Type);
2531 #line 465 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2532 { // Type UpReference
2533 (yyvsp[0].String)->insert(0, "\\");
2534 (yyval.Type).newTy = (yyvsp[0].String);
2535 (yyval.Type).oldTy = NumericTy;
2540 #line 470 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2541 { // Function derived type?
2542 *(yyvsp[-3].Type).newTy += "( " + *(yyvsp[-1].String) + " )";
2543 delete (yyvsp[-1].String);
2544 (yyval.Type).newTy = (yyvsp[-3].Type).newTy;
2545 (yyval.Type).oldTy = FunctionTy;
2550 #line 476 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2551 { // Sized array type?
2552 (yyvsp[-3].String)->insert(0,"[ ");
2553 *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " ]";
2554 delete (yyvsp[-1].Type).newTy;
2555 (yyval.Type).newTy = (yyvsp[-3].String);
2556 (yyval.Type).oldTy = ArrayTy;
2557 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2562 #line 484 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2563 { // Packed array type?
2564 (yyvsp[-3].String)->insert(0,"< ");
2565 *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " >";
2566 delete (yyvsp[-1].Type).newTy;
2567 (yyval.Type).newTy = (yyvsp[-3].String);
2568 (yyval.Type).oldTy = PackedTy;
2569 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2574 #line 492 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2575 { // Structure type?
2576 (yyvsp[-1].String)->insert(0, "{ ");
2577 *(yyvsp[-1].String) += " }";
2578 (yyval.Type).newTy = (yyvsp[-1].String);
2579 (yyval.Type).oldTy = StructTy;
2584 #line 498 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2585 { // Empty structure type?
2586 (yyval.Type).newTy = new std::string("{}");
2587 (yyval.Type).oldTy = StructTy;
2592 #line 502 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2594 *(yyvsp[-1].Type).newTy += '*';
2595 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2596 (yyvsp[-1].Type).oldTy = PointerTy;
2597 (yyval.Type) = (yyvsp[-1].Type);
2602 #line 513 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2604 (yyval.String) = (yyvsp[0].Type).newTy;
2609 #line 516 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2611 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Type).newTy;
2612 delete (yyvsp[0].Type).newTy;
2613 (yyval.String) = (yyvsp[-2].String);
2618 #line 525 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2620 *(yyvsp[-2].String) += ", ...";
2621 delete (yyvsp[0].String);
2622 (yyval.String) = (yyvsp[-2].String);
2627 #line 530 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2629 (yyval.String) = (yyvsp[0].String);
2634 #line 533 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2636 (yyval.String) = new std::string();
2641 #line 543 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2642 { // Nonempty unsized arr
2643 (yyval.Const).type = (yyvsp[-3].Type);
2644 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2645 *(yyval.Const).cnst += " [ " + *(yyvsp[-1].String) + " ]";
2646 delete (yyvsp[-1].String);
2651 #line 549 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2653 (yyval.Const).type = (yyvsp[-2].Type);
2654 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2655 *(yyval.Const).cnst += "[ ]";
2660 #line 554 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2662 (yyval.Const).type = (yyvsp[-2].Type);
2663 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2664 *(yyval.Const).cnst += " c" + *(yyvsp[0].String);
2665 delete (yyvsp[0].String);
2670 #line 560 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2671 { // Nonempty unsized arr
2672 (yyval.Const).type = (yyvsp[-3].Type);
2673 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2674 *(yyval.Const).cnst += " < " + *(yyvsp[-1].String) + " >";
2675 delete (yyvsp[-1].String);
2680 #line 566 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2682 (yyval.Const).type = (yyvsp[-3].Type);
2683 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2684 *(yyval.Const).cnst += " { " + *(yyvsp[-1].String) + " }";
2685 delete (yyvsp[-1].String);
2690 #line 572 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2692 (yyval.Const).type = (yyvsp[-2].Type);
2693 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2694 *(yyval.Const).cnst += " {}";
2699 #line 577 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2701 (yyval.Const).type = (yyvsp[-1].Type);
2702 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2703 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2704 delete (yyvsp[0].String);
2709 #line 583 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2711 (yyval.Const).type = (yyvsp[-1].Type);
2712 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2713 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2714 delete (yyvsp[0].String);
2719 #line 589 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2721 (yyval.Const).type = (yyvsp[-1].Type);
2722 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2723 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2724 delete (yyvsp[0].String);
2729 #line 595 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2731 (yyval.Const).type = (yyvsp[-1].Type);
2732 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2733 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2734 delete (yyvsp[0].String);
2739 #line 601 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2741 (yyval.Const).type = (yyvsp[-1].Type);
2742 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2743 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2744 delete (yyvsp[0].String);
2749 #line 607 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2750 { // integral constants
2751 (yyval.Const).type = (yyvsp[-1].Type);
2752 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2753 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2754 delete (yyvsp[0].String);
2759 #line 613 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2760 { // integral constants
2761 (yyval.Const).type = (yyvsp[-1].Type);
2762 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2763 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2764 delete (yyvsp[0].String);
2769 #line 619 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2770 { // Boolean constants
2771 (yyval.Const).type = (yyvsp[-1].Type);
2772 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2773 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2774 delete (yyvsp[0].String);
2779 #line 625 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2780 { // Boolean constants
2781 (yyval.Const).type = (yyvsp[-1].Type);
2782 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2783 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2784 delete (yyvsp[0].String);
2789 #line 631 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2790 { // Float & Double constants
2791 (yyval.Const).type = (yyvsp[-1].Type);
2792 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2793 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2794 delete (yyvsp[0].String);
2799 #line 639 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2801 std::string source = *(yyvsp[-3].Const).cnst;
2802 TypeInfo DstTy = (yyvsp[-1].Type);
2804 if (*(yyvsp[-5].String) == "cast") {
2805 // Call getCastUpgrade to upgrade the old cast
2806 (yyval.String) = new std::string(getCastUpgrade(source, (yyvsp[-3].Const).type, (yyvsp[-1].Type), true));
2808 // Nothing to upgrade, just create the cast constant expr
2809 (yyval.String) = new std::string(*(yyvsp[-5].String));
2810 *(yyval.String) += "( " + source + " to " + *(yyvsp[-1].Type).newTy + ")";
2812 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
2817 #line 653 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2819 *(yyvsp[-4].String) += "(" + *(yyvsp[-2].Const).cnst;
2820 for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
2821 ValueInfo& VI = (*(yyvsp[-1].ValList))[i];
2822 *(yyvsp[-4].String) += ", " + *VI.val;
2825 *(yyvsp[-4].String) += ")";
2826 (yyval.String) = (yyvsp[-4].String);
2827 (yyvsp[-2].Const).destroy();
2828 delete (yyvsp[-1].ValList);
2833 #line 665 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2835 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2836 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2837 (yyval.String) = (yyvsp[-7].String);
2842 #line 670 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2844 const char* op = getDivRemOpcode(*(yyvsp[-5].String), (yyvsp[-3].Const).type);
2845 (yyval.String) = new std::string(op);
2846 *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2847 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2852 #line 676 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2854 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2855 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2856 (yyval.String) = (yyvsp[-5].String);
2861 #line 681 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2863 #if UPGRADE_SETCOND_OPS
2864 *(yyvsp[-5].String) = getCompareOp(*(yyvsp[-5].String), (yyvsp[-3].Const).type);
2866 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2867 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2868 (yyval.String) = (yyvsp[-5].String);
2873 #line 689 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2875 *(yyvsp[-6].String) += "(" + *(yyvsp[-5].String) + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2876 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2877 (yyval.String) = (yyvsp[-6].String);
2882 #line 694 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2884 *(yyvsp[-6].String) += "(" + *(yyvsp[-5].String) + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2885 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2886 (yyval.String) = (yyvsp[-6].String);
2891 #line 699 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2893 const char* shiftop = (yyvsp[-5].String)->c_str();
2894 if (*(yyvsp[-5].String) == "shr")
2895 shiftop = ((yyvsp[-3].Const).type.isUnsigned()) ? "lshr" : "ashr";
2896 (yyval.String) = new std::string(shiftop);
2897 *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2898 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2903 #line 707 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2905 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2906 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2907 (yyval.String) = (yyvsp[-5].String);
2912 #line 712 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2914 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2915 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2916 (yyval.String) = (yyvsp[-7].String);
2921 #line 717 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2923 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2924 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2925 (yyval.String) = (yyvsp[-7].String);
2930 #line 727 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2932 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Const).cnst;
2933 (yyvsp[0].Const).destroy();
2934 (yyval.String) = (yyvsp[-2].String);
2939 #line 732 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2940 { (yyval.String) = new std::string(*(yyvsp[0].Const).cnst); (yyvsp[0].Const).destroy(); ;}
2944 #line 747 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2950 #line 752 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2957 #line 755 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2959 *O << *(yyvsp[0].String) << "\n";
2960 delete (yyvsp[0].String);
2966 #line 760 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2968 *O << "module asm " << " " << *(yyvsp[0].String) << "\n";
2974 #line 764 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2976 *O << "implementation\n";
2982 #line 768 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2983 { (yyval.String) = 0; ;}
2987 #line 770 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2988 { (yyval.String) = (yyvsp[0].String); *(yyval.String) = "external"; ;}
2992 #line 773 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2994 EnumeratedTypes.push_back((yyvsp[0].Type));
2995 if (!(yyvsp[-2].String)->empty()) {
2996 NamedTypes[*(yyvsp[-2].String)].newTy = new std::string(*(yyvsp[0].Type).newTy);
2997 NamedTypes[*(yyvsp[-2].String)].oldTy = (yyvsp[0].Type).oldTy;
2998 NamedTypes[*(yyvsp[-2].String)].elemTy = (yyvsp[0].Type).elemTy;
2999 *O << *(yyvsp[-2].String) << " = ";
3001 *O << "type " << *(yyvsp[0].Type).newTy << "\n";
3002 delete (yyvsp[-2].String); delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3008 #line 785 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3009 { // Function prototypes can be in const pool
3010 *O << *(yyvsp[0].String) << "\n";
3011 delete (yyvsp[0].String);
3017 #line 790 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3018 { // Asm blocks can be in the const pool
3019 *O << *(yyvsp[-2].String) << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
3020 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3026 #line 795 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3028 if (!(yyvsp[-4].String)->empty()) {
3029 *O << *(yyvsp[-4].String) << " = ";
3030 Globals[*(yyvsp[-4].String)] = (yyvsp[-1].Const).type.clone();
3032 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Const).cnst << " " << *(yyvsp[0].String) << "\n";
3033 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Const).destroy(); delete (yyvsp[0].String);
3039 #line 804 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3041 if (!(yyvsp[-4].String)->empty()) {
3042 *O << *(yyvsp[-4].String) << " = ";
3043 Globals[*(yyvsp[-4].String)] = (yyvsp[-1].Type).clone();
3045 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3046 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3052 #line 813 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3054 if (!(yyvsp[-4].String)->empty()) {
3055 *O << *(yyvsp[-4].String) << " = ";
3056 Globals[*(yyvsp[-4].String)] = (yyvsp[-1].Type).clone();
3058 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3059 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3065 #line 822 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3067 if (!(yyvsp[-4].String)->empty()) {
3068 *O << *(yyvsp[-4].String) << " = ";
3069 Globals[*(yyvsp[-4].String)] = (yyvsp[-1].Type).clone();
3071 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3072 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3078 #line 831 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3080 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
3081 delete (yyvsp[-1].String); delete (yyvsp[0].String);
3087 #line 836 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3089 *O << *(yyvsp[-2].String) << " = " << *(yyvsp[0].String) << "\n";
3090 delete (yyvsp[-2].String); delete (yyvsp[0].String);
3096 #line 841 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3103 #line 851 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3105 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3106 delete (yyvsp[0].String);
3107 (yyval.String) = (yyvsp[-2].String);
3112 #line 856 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3114 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3115 if (*(yyvsp[0].String) == "64")
3117 delete (yyvsp[0].String);
3118 (yyval.String) = (yyvsp[-2].String);
3123 #line 863 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3125 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3126 delete (yyvsp[0].String);
3127 (yyval.String) = (yyvsp[-2].String);
3132 #line 868 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3134 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3135 delete (yyvsp[0].String);
3136 (yyval.String) = (yyvsp[-2].String);
3141 #line 875 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3143 (yyvsp[-1].String)->insert(0, "[ ");
3144 *(yyvsp[-1].String) += " ]";
3145 (yyval.String) = (yyvsp[-1].String);
3150 #line 882 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3152 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
3153 delete (yyvsp[0].String);
3154 (yyval.String) = (yyvsp[-2].String);
3159 #line 888 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3161 (yyval.String) = new std::string();
3166 #line 897 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3167 { (yyval.String) = new std::string(); ;}
3171 #line 899 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3173 (yyval.String) = (yyvsp[-1].Type).newTy;
3174 if (!(yyvsp[0].String)->empty())
3175 *(yyval.String) += " " + *(yyvsp[0].String);
3176 delete (yyvsp[0].String);
3181 #line 906 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3183 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
3184 delete (yyvsp[0].String);
3189 #line 910 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3191 (yyval.String) = (yyvsp[0].String);
3196 #line 914 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3198 (yyval.String) = (yyvsp[0].String);
3203 #line 917 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3205 *(yyvsp[-2].String) += ", ...";
3206 (yyval.String) = (yyvsp[-2].String);
3207 delete (yyvsp[0].String);
3212 #line 922 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3214 (yyval.String) = (yyvsp[0].String);
3219 #line 925 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3220 { (yyval.String) = new std::string(); ;}
3224 #line 928 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3226 if (!(yyvsp[-7].String)->empty()) {
3227 *(yyvsp[-7].String) += " ";
3229 *(yyvsp[-7].String) += *(yyvsp[-6].Type).newTy + " " + *(yyvsp[-5].String) + "(" + *(yyvsp[-3].String) + ")";
3230 if (!(yyvsp[-1].String)->empty()) {
3231 *(yyvsp[-7].String) += " " + *(yyvsp[-1].String);
3233 if (!(yyvsp[0].String)->empty()) {
3234 *(yyvsp[-7].String) += " " + *(yyvsp[0].String);
3236 (yyvsp[-6].Type).destroy();
3237 delete (yyvsp[-5].String);
3238 delete (yyvsp[-3].String);
3239 delete (yyvsp[-1].String);
3240 delete (yyvsp[0].String);
3241 (yyval.String) = (yyvsp[-7].String);
3246 #line 947 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3247 { (yyval.String) = new std::string("{"); delete (yyvsp[0].String); ;}
3251 #line 948 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3252 { (yyval.String) = new std::string ("{"); ;}
3256 #line 950 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3258 if (!(yyvsp[-2].String)->empty()) {
3259 *O << *(yyvsp[-2].String) << " ";
3261 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
3262 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3268 #line 959 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3269 { (yyval.String) = new std::string("}"); delete (yyvsp[0].String); ;}
3273 #line 960 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3274 { (yyval.String) = new std::string("}"); ;}
3278 #line 962 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3280 if ((yyvsp[-1].String))
3281 *O << *(yyvsp[-1].String);
3282 *O << '\n' << *(yyvsp[0].String) << "\n";
3288 #line 970 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3289 { (yyval.String) = new std::string(); ;}
3293 #line 976 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3295 if (!(yyvsp[-1].String)->empty())
3296 *(yyvsp[-2].String) += " " + *(yyvsp[-1].String);
3297 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3298 delete (yyvsp[-1].String);
3299 delete (yyvsp[0].String);
3300 (yyval.String) = (yyvsp[-2].String);
3305 #line 989 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3306 { (yyval.String) = new std::string(); ;}
3310 #line 995 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3312 (yyvsp[-1].String)->insert(0, "<");
3313 *(yyvsp[-1].String) += ">";
3314 (yyval.String) = (yyvsp[-1].String);
3319 #line 1001 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3321 if (!(yyvsp[-3].String)->empty()) {
3322 *(yyvsp[-4].String) += " " + *(yyvsp[-3].String);
3324 *(yyvsp[-4].String) += " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
3325 delete (yyvsp[-3].String); delete (yyvsp[-2].String); delete (yyvsp[0].String);
3326 (yyval.String) = (yyvsp[-4].String);
3331 #line 1014 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3333 (yyval.Value).val = (yyvsp[0].String);
3334 (yyval.Value).constant = false;
3335 (yyval.Value).type.newTy = 0;
3336 (yyval.Value).type.oldTy = UnresolvedTy;
3341 #line 1020 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3343 (yyval.Value).val = (yyvsp[0].String);
3344 (yyval.Value).constant = true;
3345 (yyval.Value).type.newTy = 0;
3346 (yyval.Value).type.oldTy = UnresolvedTy;
3351 #line 1031 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3353 (yyval.Value) = (yyvsp[0].Value);
3354 (yyval.Value).type = (yyvsp[-1].Type);
3355 (yyval.Value).val->insert(0, *(yyvsp[-1].Type).newTy + " ");
3360 #line 1037 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3367 #line 1040 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3368 { // Do not allow functions with 0 basic blocks
3374 #line 1048 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3381 #line 1052 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3383 *O << " " << *(yyvsp[0].String) << "\n";
3384 delete (yyvsp[0].String);
3390 #line 1057 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3397 #line 1060 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3399 *O << *(yyvsp[0].String) << "\n";
3400 delete (yyvsp[0].String);
3406 #line 1066 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3407 { (yyval.String) = (yyvsp[0].String); *(yyval.String) = "unwind"; ;}
3411 #line 1068 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3412 { // Return with a result...
3413 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Value).val << "\n";
3414 delete (yyvsp[-1].String); (yyvsp[0].Value).destroy();
3420 #line 1073 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3421 { // Return with no result...
3422 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Type).newTy << "\n";
3423 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3429 #line 1078 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3430 { // Unconditional Branch...
3431 *O << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].Value).val << "\n";
3432 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3438 #line 1083 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3440 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", "
3441 << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << ", " << *(yyvsp[-1].Type).newTy << " "
3442 << *(yyvsp[0].Value).val << "\n";
3443 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); (yyvsp[-6].Value).destroy(); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy();
3444 (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3450 #line 1091 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3452 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", "
3453 << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << " [" << *(yyvsp[-1].String) << " ]\n";
3454 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); (yyvsp[-6].Value).destroy(); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy();
3455 delete (yyvsp[-1].String);
3461 #line 1098 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3463 *O << " " << *(yyvsp[-7].String) << " " << *(yyvsp[-6].Type).newTy << " " << *(yyvsp[-5].Value).val << ", "
3464 << *(yyvsp[-3].Type).newTy << " " << *(yyvsp[-2].Value).val << "[]\n";
3465 delete (yyvsp[-7].String); (yyvsp[-6].Type).destroy(); (yyvsp[-5].Value).destroy(); (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy();
3471 #line 1105 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3474 if (!(yyvsp[-13].String)->empty())
3475 *O << *(yyvsp[-13].String) << " = ";
3476 *O << *(yyvsp[-12].String) << " " << *(yyvsp[-11].String) << " " << *(yyvsp[-10].Type).newTy << " " << *(yyvsp[-9].Value).val << " (";
3477 for (unsigned i = 0; i < (yyvsp[-7].ValList)->size(); ++i) {
3478 ValueInfo& VI = (*(yyvsp[-7].ValList))[i];
3480 if (i+1 < (yyvsp[-7].ValList)->size())
3484 *O << ") " << *(yyvsp[-5].String) << " " << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << " "
3485 << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].Value).val << "\n";
3486 delete (yyvsp[-13].String); delete (yyvsp[-12].String); delete (yyvsp[-11].String); (yyvsp[-10].Type).destroy(); (yyvsp[-9].Value).destroy(); delete (yyvsp[-7].ValList);
3487 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
3488 (yyvsp[0].Value).destroy();
3494 #line 1124 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3496 *O << " " << *(yyvsp[0].String) << "\n";
3497 delete (yyvsp[0].String);
3503 #line 1129 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3505 *O << " " << *(yyvsp[0].String) << "\n";
3506 delete (yyvsp[0].String);
3512 #line 1135 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3514 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].String) + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3515 (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3516 (yyval.String) = (yyvsp[-5].String);
3521 #line 1140 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3523 (yyvsp[-3].String)->insert(0, *(yyvsp[-4].Type).newTy + " " );
3524 *(yyvsp[-3].String) += ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3525 (yyvsp[-4].Type).destroy(); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3526 (yyval.String) = (yyvsp[-3].String);
3531 #line 1148 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3533 if (!(yyvsp[-1].String)->empty())
3534 *(yyvsp[-1].String) += " = ";
3535 *(yyvsp[-1].String) += *(yyvsp[0].String);
3536 delete (yyvsp[0].String);
3537 (yyval.String) = (yyvsp[-1].String);
3542 #line 1157 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3543 { // Used for PHI nodes
3544 (yyvsp[-3].Value).val->insert(0, *(yyvsp[-5].Type).newTy + "[");
3545 *(yyvsp[-3].Value).val += "," + *(yyvsp[-1].Value).val + "]";
3546 (yyvsp[-5].Type).destroy(); (yyvsp[-1].Value).destroy();
3547 (yyval.String) = new std::string(*(yyvsp[-3].Value).val);
3548 (yyvsp[-3].Value).destroy();
3553 #line 1164 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3555 *(yyvsp[-6].String) += ", [" + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + "]";
3556 (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
3557 (yyval.String) = (yyvsp[-6].String);
3562 #line 1172 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3564 (yyval.ValList) = new ValueList();
3565 (yyval.ValList)->push_back((yyvsp[0].Value));
3570 #line 1176 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3572 (yyvsp[-2].ValList)->push_back((yyvsp[0].Value));
3573 (yyval.ValList) = (yyvsp[-2].ValList);
3578 #line 1183 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3579 { (yyval.ValList) = (yyvsp[0].ValList); ;}
3583 #line 1184 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3584 { (yyval.ValList) = new ValueList(); ;}
3588 #line 1188 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3590 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3591 delete (yyvsp[0].String);
3592 (yyval.String) = (yyvsp[-1].String);
3597 #line 1196 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3599 const char* op = getDivRemOpcode(*(yyvsp[-4].String), (yyvsp[-3].Type));
3600 (yyval.String) = new std::string(op);
3601 *(yyval.String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3602 delete (yyvsp[-4].String); (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3607 #line 1202 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3609 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3610 (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3611 (yyval.String) = (yyvsp[-4].String);
3616 #line 1207 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3618 #if UPGRADE_SETCOND_OPS
3619 *(yyvsp[-4].String) = getCompareOp(*(yyvsp[-4].String), (yyvsp[-3].Type));
3621 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3622 (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3623 (yyval.String) = (yyvsp[-4].String);
3628 #line 1215 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3630 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String) + " " + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + ")";
3631 delete (yyvsp[-5].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
3632 (yyval.String) = (yyvsp[-6].String);
3637 #line 1220 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3639 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String) + " " + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + ")";
3640 delete (yyvsp[-5].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
3641 (yyval.String) = (yyvsp[-6].String);
3646 #line 1225 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3648 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3649 (yyvsp[0].Value).destroy();
3650 (yyval.String) = (yyvsp[-1].String);
3655 #line 1230 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3657 const char* shiftop = (yyvsp[-3].String)->c_str();
3658 if (*(yyvsp[-3].String) == "shr")
3659 shiftop = ((yyvsp[-2].Value).type.isUnsigned()) ? "lshr" : "ashr";
3660 (yyval.String) = new std::string(shiftop);
3661 *(yyval.String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3662 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3667 #line 1238 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3669 std::string source = *(yyvsp[-2].Value).val;
3670 TypeInfo SrcTy = (yyvsp[-2].Value).type;
3671 TypeInfo DstTy = (yyvsp[0].Type);
3673 (yyval.String) = new std::string();
3674 if (*(yyvsp[-3].String) == "cast") {
3675 *(yyval.String) += getCastUpgrade(source, SrcTy, DstTy, false);
3677 *(yyval.String) += *(yyvsp[-3].String) + " " + source + " to " + *DstTy.newTy;
3679 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy();
3680 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3685 #line 1252 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3687 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3688 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3689 (yyval.String) = (yyvsp[-5].String);
3694 #line 1257 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3696 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Type).newTy;
3697 (yyvsp[-2].Value).destroy(); (yyvsp[0].Type).destroy();
3698 (yyval.String) = (yyvsp[-3].String);
3703 #line 1262 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3705 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3706 (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3707 (yyval.String) = (yyvsp[-3].String);
3712 #line 1267 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3714 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3715 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3716 (yyval.String) = (yyvsp[-5].String);
3721 #line 1272 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3723 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3724 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3725 (yyval.String) = (yyvsp[-5].String);
3730 #line 1277 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3732 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3733 delete (yyvsp[0].String);
3734 (yyval.String) = (yyvsp[-1].String);
3739 #line 1282 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3741 if (!(yyvsp[-5].String)->empty())
3742 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String);
3743 if (!(yyvsp[-6].String)->empty())
3744 *(yyvsp[-6].String) += " ";
3745 *(yyvsp[-6].String) += *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].Value).val + "(";
3746 for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
3747 ValueInfo& VI = (*(yyvsp[-1].ValList))[i];
3748 *(yyvsp[-6].String) += *VI.val;
3749 if (i+1 < (yyvsp[-1].ValList)->size())
3750 *(yyvsp[-6].String) += ", ";
3753 *(yyvsp[-6].String) += ")";
3754 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); delete (yyvsp[-1].ValList);
3755 (yyval.String) = (yyvsp[-6].String);
3760 #line 1304 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3761 { (yyval.ValList) = (yyvsp[0].ValList); ;}
3765 #line 1305 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3766 { (yyval.ValList) = new ValueList(); ;}
3770 #line 1310 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3771 { (yyval.String) = new std::string(); ;}
3775 #line 1313 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3777 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3778 if (!(yyvsp[0].String)->empty())
3779 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3780 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3781 (yyval.String) = (yyvsp[-2].String);
3786 #line 1320 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3788 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3789 if (!(yyvsp[0].String)->empty())
3790 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3791 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].String);
3792 (yyval.String) = (yyvsp[-5].String);
3797 #line 1327 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3799 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3800 if (!(yyvsp[0].String)->empty())
3801 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3802 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3803 (yyval.String) = (yyvsp[-2].String);
3808 #line 1334 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3810 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3811 if (!(yyvsp[0].String)->empty())
3812 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3813 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].String);
3814 (yyval.String) = (yyvsp[-5].String);
3819 #line 1341 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3821 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3822 (yyvsp[0].Value).destroy();
3823 (yyval.String) = (yyvsp[-1].String);
3828 #line 1346 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3830 if (!(yyvsp[-3].String)->empty())
3831 *(yyvsp[-3].String) += " ";
3832 *(yyvsp[-3].String) += *(yyvsp[-2].String) + " " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3833 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3834 (yyval.String) = (yyvsp[-3].String);
3839 #line 1353 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3841 if (!(yyvsp[-5].String)->empty())
3842 *(yyvsp[-5].String) += " ";
3843 *(yyvsp[-5].String) += *(yyvsp[-4].String) + " " + *(yyvsp[-3].Value).val + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3844 delete (yyvsp[-4].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3845 (yyval.String) = (yyvsp[-5].String);
3850 #line 1360 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3852 // Upgrade the indices
3853 for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) {
3854 ValueInfo& VI = (*(yyvsp[0].ValList))[i];
3855 if (VI.type.isUnsigned() && !VI.isConstant() &&
3856 VI.type.getBitWidth() < 64) {
3857 std::string* old = VI.val;
3858 *O << " %gep_upgrade" << unique << " = zext " << *old
3860 VI.val = new std::string("ulong %gep_upgrade" + llvm::utostr(unique++));
3861 VI.type.oldTy = ULongTy;
3865 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3866 for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) {
3867 ValueInfo& VI = (*(yyvsp[0].ValList))[i];
3868 *(yyvsp[-3].String) += ", " + *VI.val;
3871 (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].ValList);
3872 (yyval.String) = (yyvsp[-3].String);
3880 /* Line 1126 of yacc.c. */
3881 #line 3882 "UpgradeParser.tab.c"
3887 YY_STACK_PRINT (yyss, yyssp);
3892 /* Now `shift' the result of the reduction. Determine what state
3893 that goes to, based on the state we popped back to and the rule
3894 number reduced by. */
3898 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3899 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3900 yystate = yytable[yystate];
3902 yystate = yydefgoto[yyn - YYNTOKENS];
3907 /*------------------------------------.
3908 | yyerrlab -- here on detecting error |
3909 `------------------------------------*/
3911 /* If not already recovering from an error, report this error. */
3916 yyn = yypact[yystate];
3918 if (YYPACT_NINF < yyn && yyn < YYLAST)
3920 int yytype = YYTRANSLATE (yychar);
3921 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3922 YYSIZE_T yysize = yysize0;
3924 int yysize_overflow = 0;
3926 # define YYERROR_VERBOSE_ARGS_MAXIMUM 5
3927 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3931 /* This is so xgettext sees the translatable formats that are
3932 constructed on the fly. */
3933 YY_("syntax error, unexpected %s");
3934 YY_("syntax error, unexpected %s, expecting %s");
3935 YY_("syntax error, unexpected %s, expecting %s or %s");
3936 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3937 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3941 static char const yyunexpected[] = "syntax error, unexpected %s";
3942 static char const yyexpecting[] = ", expecting %s";
3943 static char const yyor[] = " or %s";
3944 char yyformat[sizeof yyunexpected
3945 + sizeof yyexpecting - 1
3946 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3947 * (sizeof yyor - 1))];
3948 char const *yyprefix = yyexpecting;
3950 /* Start YYX at -YYN if negative to avoid negative indexes in
3952 int yyxbegin = yyn < 0 ? -yyn : 0;
3954 /* Stay within bounds of both yycheck and yytname. */
3955 int yychecklim = YYLAST - yyn;
3956 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3959 yyarg[0] = yytname[yytype];
3960 yyfmt = yystpcpy (yyformat, yyunexpected);
3962 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3963 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3965 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3969 yyformat[sizeof yyunexpected - 1] = '\0';
3972 yyarg[yycount++] = yytname[yyx];
3973 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3974 yysize_overflow |= yysize1 < yysize;
3976 yyfmt = yystpcpy (yyfmt, yyprefix);
3980 yyf = YY_(yyformat);
3981 yysize1 = yysize + yystrlen (yyf);
3982 yysize_overflow |= yysize1 < yysize;
3985 if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
3986 yymsg = (char *) YYSTACK_ALLOC (yysize);
3989 /* Avoid sprintf, as that infringes on the user's name space.
3990 Don't have undefined behavior even if the translation
3991 produced a string with the wrong number of "%s"s. */
3994 while ((*yyp = *yyf))
3996 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3998 yyp += yytnamerr (yyp, yyarg[yyi++]);
4008 YYSTACK_FREE (yymsg);
4012 yyerror (YY_("syntax error"));
4013 goto yyexhaustedlab;
4017 #endif /* YYERROR_VERBOSE */
4018 yyerror (YY_("syntax error"));
4023 if (yyerrstatus == 3)
4025 /* If just tried and failed to reuse look-ahead token after an
4026 error, discard it. */
4028 if (yychar <= YYEOF)
4030 /* Return failure if at end of input. */
4031 if (yychar == YYEOF)
4036 yydestruct ("Error: discarding", yytoken, &yylval);
4041 /* Else will try to reuse look-ahead token after shifting the error
4046 /*---------------------------------------------------.
4047 | yyerrorlab -- error raised explicitly by YYERROR. |
4048 `---------------------------------------------------*/
4051 /* Pacify compilers like GCC when the user code never invokes
4052 YYERROR and the label yyerrorlab therefore never appears in user
4063 /*-------------------------------------------------------------.
4064 | yyerrlab1 -- common code for both syntax error and YYERROR. |
4065 `-------------------------------------------------------------*/
4067 yyerrstatus = 3; /* Each real token shifted decrements this. */
4071 yyn = yypact[yystate];
4072 if (yyn != YYPACT_NINF)
4075 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4083 /* Pop the current state because it cannot handle the error token. */
4088 yydestruct ("Error: popping", yystos[yystate], yyvsp);
4091 YY_STACK_PRINT (yyss, yyssp);
4100 /* Shift the error token. */
4101 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
4107 /*-------------------------------------.
4108 | yyacceptlab -- YYACCEPT comes here. |
4109 `-------------------------------------*/
4114 /*-----------------------------------.
4115 | yyabortlab -- YYABORT comes here. |
4116 `-----------------------------------*/
4122 /*-------------------------------------------------.
4123 | yyexhaustedlab -- memory exhaustion comes here. |
4124 `-------------------------------------------------*/
4126 yyerror (YY_("memory exhausted"));
4132 if (yychar != YYEOF && yychar != YYEMPTY)
4133 yydestruct ("Cleanup: discarding lookahead",
4135 while (yyssp != yyss)
4137 yydestruct ("Cleanup: popping",
4138 yystos[*yyssp], yyvsp);
4143 YYSTACK_FREE (yyss);
4149 #line 1384 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
4152 int yyerror(const char *ErrorMsg) {
4154 = std::string((CurFilename == "-") ? std::string("<stdin>") : CurFilename)
4155 + ":" + llvm::utostr((unsigned) Upgradelineno) + ": ";
4156 std::string errMsg = std::string(ErrorMsg) + "\n" + where + " while reading ";
4157 if (yychar == YYEMPTY || yychar == 0)
4158 errMsg += "end-of-file.";
4160 errMsg += "token: '" + std::string(Upgradetext, Upgradeleng) + "'";
4161 std::cerr << errMsg << '\n';