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");
556 Result = "setne (" + Source + comparator + ")";
558 Result = "setne " + Source + comparator;
559 return Result; // skip cast processing below
563 std::string Opcode(getCastOpcode(Source, SrcTy, DstTy));
565 Result += Opcode + "( " + Source + " to " + *DstTy.newTy + ")";
567 Result += Opcode + " " + Source + " to " + *DstTy.newTy;
571 const char* getDivRemOpcode(const std::string& opcode, const TypeInfo& TI) {
572 const char* op = opcode.c_str();
576 Ty.oldTy = Ty.getElementType();
578 if (Ty.isFloatingPoint())
580 else if (Ty.isUnsigned())
582 else if (Ty.isSigned())
585 yyerror("Invalid type for div instruction");
586 else if (opcode == "rem")
587 if (Ty.isFloatingPoint())
589 else if (Ty.isUnsigned())
591 else if (Ty.isSigned())
594 yyerror("Invalid type for rem instruction");
599 getCompareOp(const std::string& setcc, const TypeInfo& TI) {
600 assert(setcc.length() == 5);
603 assert(cc1 == 'e' || cc1 == 'n' || cc1 == 'l' || cc1 == 'g');
604 assert(cc2 == 'q' || cc2 == 'e' || cc2 == 'e' || cc2 == 't');
605 std::string result("xcmp xxx");
608 if (TI.isFloatingPoint()) {
609 #if GENERATE_FCMP_INSTS
611 result[5] = 'o'; // FIXME: Always map to ordered comparison ?
613 result[5] = 'u'; // NE maps to unordered
615 result[5] = 'o'; // everything else maps to ordered
619 } else if (TI.isIntegral() || TI.isPointer()) {
621 if ((cc1 == 'e' && cc2 == 'q') || (cc1 == 'n' && cc2 == 'e'))
623 else if (TI.isSigned())
625 else if (TI.isUnsigned() || TI.isPointer() || TI.isBool())
628 yyerror("Invalid integral type for setcc");
635 /* Enabling traces. */
640 /* Enabling verbose error messages. */
641 #ifdef YYERROR_VERBOSE
642 # undef YYERROR_VERBOSE
643 # define YYERROR_VERBOSE 1
645 # define YYERROR_VERBOSE 0
648 /* Enabling the token table. */
649 #ifndef YYTOKEN_TABLE
650 # define YYTOKEN_TABLE 0
653 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
654 #line 279 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
655 typedef union YYSTYPE {
662 /* Line 196 of yacc.c. */
663 #line 664 "UpgradeParser.tab.c"
664 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
665 # define YYSTYPE_IS_DECLARED 1
666 # define YYSTYPE_IS_TRIVIAL 1
671 /* Copy the second part of user declarations. */
674 /* Line 219 of yacc.c. */
675 #line 676 "UpgradeParser.tab.c"
677 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
678 # define YYSIZE_T __SIZE_TYPE__
680 #if ! defined (YYSIZE_T) && defined (size_t)
681 # define YYSIZE_T size_t
683 #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
684 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
685 # define YYSIZE_T size_t
687 #if ! defined (YYSIZE_T)
688 # define YYSIZE_T unsigned int
694 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
695 # define YY_(msgid) dgettext ("bison-runtime", msgid)
699 # define YY_(msgid) msgid
703 #if ! defined (yyoverflow) || YYERROR_VERBOSE
705 /* The parser invokes alloca or malloc; define the necessary symbols. */
707 # ifdef YYSTACK_USE_ALLOCA
708 # if YYSTACK_USE_ALLOCA
710 # define YYSTACK_ALLOC __builtin_alloca
712 # define YYSTACK_ALLOC alloca
713 # if defined (__STDC__) || defined (__cplusplus)
714 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
715 # define YYINCLUDED_STDLIB_H
721 # ifdef YYSTACK_ALLOC
722 /* Pacify GCC's `empty if-body' warning. */
723 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
724 # ifndef YYSTACK_ALLOC_MAXIMUM
725 /* The OS might guarantee only one guard page at the bottom of the stack,
726 and a page size can be as small as 4096 bytes. So we cannot safely
727 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
728 to allow for a few compiler-allocated temporary stack slots. */
729 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
732 # define YYSTACK_ALLOC YYMALLOC
733 # define YYSTACK_FREE YYFREE
734 # ifndef YYSTACK_ALLOC_MAXIMUM
735 # define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
741 # define YYMALLOC malloc
742 # if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
743 && (defined (__STDC__) || defined (__cplusplus)))
744 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
749 # if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
750 && (defined (__STDC__) || defined (__cplusplus)))
751 void free (void *); /* INFRINGES ON USER NAME SPACE */
758 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
761 #if (! defined (yyoverflow) \
762 && (! defined (__cplusplus) \
763 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
765 /* A type that is properly aligned for any stack member. */
772 /* The size of the maximum gap between one aligned stack and the next. */
773 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
775 /* The size of an array large to enough to hold all stacks, each with
777 # define YYSTACK_BYTES(N) \
778 ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
779 + YYSTACK_GAP_MAXIMUM)
781 /* Copy COUNT objects from FROM to TO. The source and destination do
784 # if defined (__GNUC__) && 1 < __GNUC__
785 # define YYCOPY(To, From, Count) \
786 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
788 # define YYCOPY(To, From, Count) \
792 for (yyi = 0; yyi < (Count); yyi++) \
793 (To)[yyi] = (From)[yyi]; \
799 /* Relocate STACK from its old location to the new one. The
800 local variables YYSIZE and YYSTACKSIZE give the old and new number of
801 elements in the stack, and YYPTR gives the new location of the
802 stack. Advance YYPTR to a properly aligned location for the next
804 # define YYSTACK_RELOCATE(Stack) \
807 YYSIZE_T yynewbytes; \
808 YYCOPY (&yyptr->Stack, Stack, yysize); \
809 Stack = &yyptr->Stack; \
810 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
811 yyptr += yynewbytes / sizeof (*yyptr); \
817 #if defined (__STDC__) || defined (__cplusplus)
818 typedef signed char yysigned_char;
820 typedef short int yysigned_char;
823 /* YYFINAL -- State number of the termination state. */
825 /* YYLAST -- Last index in YYTABLE. */
828 /* YYNTOKENS -- Number of terminals. */
829 #define YYNTOKENS 165
830 /* YYNNTS -- Number of nonterminals. */
832 /* YYNRULES -- Number of rules. */
834 /* YYNRULES -- Number of states. */
835 #define YYNSTATES 582
837 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
839 #define YYMAXUTOK 405
841 #define YYTRANSLATE(YYX) \
842 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
844 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
845 static const unsigned char yytranslate[] =
847 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
848 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
849 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
850 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
851 154, 155, 163, 2, 152, 2, 2, 2, 2, 2,
852 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
853 159, 151, 160, 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, 156, 153, 158, 2, 2, 2, 2, 2, 164,
857 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
858 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
859 157, 2, 2, 161, 2, 162, 2, 2, 2, 2,
860 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
861 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
862 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
863 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
864 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
865 2, 2, 2, 2, 2, 2, 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, 1, 2, 3, 4,
873 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
874 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
875 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
876 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
877 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
878 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
879 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
880 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
881 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
882 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
883 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
884 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
885 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
886 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
887 145, 146, 147, 148, 149, 150
891 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
893 static const unsigned short int yyprhs[] =
895 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
896 19, 21, 23, 25, 27, 29, 31, 33, 35, 37,
897 39, 41, 43, 45, 47, 49, 51, 53, 55, 57,
898 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
899 79, 81, 83, 85, 87, 89, 91, 93, 95, 97,
900 99, 101, 103, 105, 107, 109, 111, 113, 115, 117,
901 119, 121, 123, 125, 127, 129, 131, 133, 135, 137,
902 139, 141, 143, 145, 147, 149, 151, 153, 155, 157,
903 159, 161, 164, 165, 167, 169, 171, 173, 175, 177,
904 179, 180, 182, 184, 186, 188, 190, 192, 195, 196,
905 197, 200, 201, 205, 208, 209, 211, 212, 216, 218,
906 221, 223, 225, 227, 229, 231, 233, 235, 237, 239,
907 241, 243, 245, 247, 249, 251, 253, 255, 257, 259,
908 261, 264, 269, 275, 281, 285, 288, 291, 293, 297,
909 299, 303, 305, 306, 311, 315, 319, 324, 329, 333,
910 336, 339, 342, 345, 348, 351, 354, 357, 360, 363,
911 370, 376, 385, 392, 399, 406, 414, 422, 429, 436,
912 445, 454, 458, 460, 462, 464, 466, 469, 472, 477,
913 480, 482, 484, 486, 491, 494, 499, 506, 513, 520,
914 527, 531, 536, 537, 539, 541, 543, 547, 551, 555,
915 559, 563, 567, 569, 570, 572, 574, 576, 577, 580,
916 584, 586, 588, 592, 594, 595, 604, 606, 608, 612,
917 614, 616, 620, 621, 623, 625, 629, 630, 632, 634,
918 636, 638, 640, 642, 644, 646, 648, 652, 654, 660,
919 662, 664, 666, 668, 671, 674, 676, 679, 682, 683,
920 685, 687, 689, 692, 695, 699, 709, 719, 728, 743,
921 745, 747, 754, 760, 763, 770, 778, 780, 784, 786,
922 787, 790, 792, 798, 804, 810, 818, 826, 829, 834,
923 839, 846, 851, 856, 863, 870, 873, 881, 883, 886,
924 887, 889, 890, 894, 901, 905, 912, 915, 920, 927
927 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
928 static const short int yyrhs[] =
930 199, 0, -1, 19, -1, 20, -1, 17, -1, 18,
931 -1, 80, -1, 81, -1, 82, -1, 83, -1, 84,
932 -1, 85, -1, 86, -1, 87, -1, 88, -1, 89,
933 -1, 90, -1, 91, -1, 92, -1, 93, -1, 94,
934 -1, 95, -1, 96, -1, 97, -1, 98, -1, 99,
935 -1, 102, -1, 103, -1, 104, -1, 105, -1, 106,
936 -1, 107, -1, 118, -1, 119, -1, 120, -1, 121,
937 -1, 108, -1, 109, -1, 110, -1, 111, -1, 112,
938 -1, 113, -1, 114, -1, 115, -1, 116, -1, 117,
939 -1, 118, -1, 119, -1, 120, -1, 121, -1, 25,
940 -1, 26, -1, 130, -1, 131, -1, 132, -1, 133,
941 -1, 139, -1, 140, -1, 141, -1, 142, -1, 143,
942 -1, 144, -1, 145, -1, 146, -1, 147, -1, 148,
943 -1, 149, -1, 150, -1, 138, -1, 11, -1, 9,
944 -1, 7, -1, 5, -1, 12, -1, 10, -1, 8,
945 -1, 6, -1, 175, -1, 176, -1, 13, -1, 14,
946 -1, 208, 151, -1, -1, 42, -1, 43, -1, 44,
947 -1, 48, -1, 45, -1, 46, -1, 47, -1, -1,
948 66, -1, 67, -1, 68, -1, 69, -1, 70, -1,
949 71, -1, 65, 18, -1, -1, -1, 57, 18, -1,
950 -1, 152, 57, 18, -1, 37, 30, -1, -1, 184,
951 -1, -1, 152, 187, 186, -1, 184, -1, 57, 18,
952 -1, 190, -1, 3, -1, 192, -1, 3, -1, 192,
953 -1, 4, -1, 5, -1, 6, -1, 7, -1, 8,
954 -1, 9, -1, 10, -1, 11, -1, 12, -1, 13,
955 -1, 14, -1, 15, -1, 16, -1, 222, -1, 191,
956 -1, 153, 18, -1, 189, 154, 194, 155, -1, 156,
957 18, 157, 192, 158, -1, 159, 18, 157, 192, 160,
958 -1, 161, 193, 162, -1, 161, 162, -1, 192, 163,
959 -1, 192, -1, 193, 152, 192, -1, 193, -1, 193,
960 152, 40, -1, 40, -1, -1, 190, 156, 197, 158,
961 -1, 190, 156, 158, -1, 190, 164, 30, -1, 190,
962 159, 197, 160, -1, 190, 161, 197, 162, -1, 190,
963 161, 162, -1, 190, 22, -1, 190, 23, -1, 190,
964 222, -1, 190, 196, -1, 190, 24, -1, 175, 167,
965 -1, 176, 18, -1, 4, 25, -1, 4, 26, -1,
966 178, 21, -1, 174, 154, 195, 39, 190, 155, -1,
967 127, 154, 195, 237, 155, -1, 129, 154, 195, 152,
968 195, 152, 195, 155, -1, 168, 154, 195, 152, 195,
969 155, -1, 169, 154, 195, 152, 195, 155, -1, 170,
970 154, 195, 152, 195, 155, -1, 100, 171, 154, 195,
971 152, 195, 155, -1, 101, 172, 154, 195, 152, 195,
972 155, -1, 173, 154, 195, 152, 195, 155, -1, 135,
973 154, 195, 152, 195, 155, -1, 136, 154, 195, 152,
974 195, 152, 195, 155, -1, 137, 154, 195, 152, 195,
975 152, 195, 155, -1, 197, 152, 195, -1, 195, -1,
976 35, -1, 36, -1, 200, -1, 200, 217, -1, 200,
977 219, -1, 200, 63, 62, 203, -1, 200, 31, -1,
978 202, -1, 50, -1, 58, -1, 202, 179, 27, 188,
979 -1, 202, 219, -1, 202, 63, 62, 203, -1, 202,
980 179, 180, 198, 195, 186, -1, 202, 179, 201, 198,
981 190, 186, -1, 202, 179, 45, 198, 190, 186, -1,
982 202, 179, 47, 198, 190, 186, -1, 202, 51, 205,
983 -1, 202, 59, 151, 206, -1, -1, 30, -1, 56,
984 -1, 55, -1, 53, 151, 204, -1, 54, 151, 18,
985 -1, 52, 151, 30, -1, 72, 151, 30, -1, 156,
986 207, 158, -1, 207, 152, 30, -1, 30, -1, -1,
987 28, -1, 30, -1, 208, -1, -1, 190, 209, -1,
988 211, 152, 210, -1, 210, -1, 211, -1, 211, 152,
989 40, -1, 40, -1, -1, 181, 188, 208, 154, 212,
990 155, 185, 182, -1, 32, -1, 161, -1, 180, 213,
991 214, -1, 33, -1, 162, -1, 215, 225, 216, -1,
992 -1, 45, -1, 47, -1, 34, 218, 213, -1, -1,
993 64, -1, 17, -1, 18, -1, 21, -1, 25, -1,
994 26, -1, 22, -1, 23, -1, 24, -1, 159, 197,
995 160, -1, 196, -1, 62, 220, 30, 152, 30, -1,
996 166, -1, 208, -1, 222, -1, 221, -1, 190, 223,
997 -1, 225, 226, -1, 226, -1, 227, 229, -1, 227,
998 231, -1, -1, 29, -1, 78, -1, 77, -1, 73,
999 224, -1, 73, 3, -1, 74, 15, 223, -1, 74,
1000 4, 223, 152, 15, 223, 152, 15, 223, -1, 75,
1001 177, 223, 152, 15, 223, 156, 230, 158, -1, 75,
1002 177, 223, 152, 15, 223, 156, 158, -1, 179, 76,
1003 181, 188, 223, 154, 234, 155, 39, 15, 223, 228,
1004 15, 223, -1, 228, -1, 79, -1, 230, 177, 221,
1005 152, 15, 223, -1, 177, 221, 152, 15, 223, -1,
1006 179, 236, -1, 190, 156, 223, 152, 223, 158, -1,
1007 232, 152, 156, 223, 152, 223, 158, -1, 224, -1,
1008 233, 152, 224, -1, 233, -1, -1, 61, 60, -1,
1009 60, -1, 168, 190, 223, 152, 223, -1, 169, 190,
1010 223, 152, 223, -1, 170, 190, 223, 152, 223, -1,
1011 100, 171, 190, 223, 152, 223, 155, -1, 101, 172,
1012 190, 223, 152, 223, 155, -1, 49, 224, -1, 173,
1013 224, 152, 224, -1, 174, 224, 39, 190, -1, 129,
1014 224, 152, 224, 152, 224, -1, 134, 224, 152, 190,
1015 -1, 135, 224, 152, 224, -1, 136, 224, 152, 224,
1016 152, 224, -1, 137, 224, 152, 224, 152, 224, -1,
1017 128, 232, -1, 235, 181, 188, 223, 154, 234, 155,
1018 -1, 239, -1, 152, 233, -1, -1, 38, -1, -1,
1019 122, 190, 183, -1, 122, 190, 152, 10, 223, 183,
1020 -1, 123, 190, 183, -1, 123, 190, 152, 10, 223,
1021 183, -1, 124, 224, -1, 238, 125, 190, 223, -1,
1022 238, 126, 224, 152, 190, 223, -1, 127, 190, 223,
1026 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1027 static const unsigned short int yyrline[] =
1029 0, 342, 342, 342, 343, 343, 347, 347, 347, 347,
1030 347, 347, 347, 348, 348, 348, 348, 349, 349, 349,
1031 350, 350, 350, 350, 350, 350, 351, 351, 351, 351,
1032 351, 351, 351, 351, 351, 351, 352, 352, 352, 352,
1033 352, 352, 352, 352, 352, 352, 353, 353, 353, 353,
1034 353, 353, 354, 354, 354, 354, 355, 355, 355, 355,
1035 355, 355, 355, 356, 356, 356, 356, 356, 356, 361,
1036 361, 361, 361, 362, 362, 362, 362, 363, 363, 364,
1037 364, 367, 370, 375, 375, 375, 375, 375, 375, 376,
1038 377, 380, 380, 380, 380, 380, 381, 382, 387, 392,
1039 393, 396, 397, 405, 411, 412, 415, 416, 425, 426,
1040 439, 439, 440, 440, 441, 445, 445, 445, 445, 445,
1041 445, 445, 446, 446, 446, 446, 446, 448, 452, 456,
1042 459, 464, 470, 478, 486, 492, 496, 507, 510, 518,
1043 519, 524, 527, 537, 543, 548, 554, 560, 566, 571,
1044 577, 583, 589, 595, 601, 607, 613, 619, 625, 633,
1045 647, 659, 664, 670, 675, 683, 688, 693, 701, 706,
1046 711, 721, 726, 731, 731, 741, 746, 749, 754, 758,
1047 762, 764, 764, 767, 779, 784, 789, 798, 807, 816,
1048 825, 830, 835, 840, 842, 842, 845, 850, 857, 862,
1049 869, 876, 881, 882, 890, 890, 891, 891, 893, 900,
1050 904, 908, 911, 916, 919, 921, 941, 942, 944, 953,
1051 954, 956, 964, 965, 966, 970, 983, 984, 987, 987,
1052 987, 987, 987, 987, 987, 988, 989, 994, 995, 1004,
1053 1004, 1008, 1014, 1025, 1031, 1034, 1042, 1046, 1051, 1054,
1054 1060, 1060, 1062, 1067, 1072, 1077, 1085, 1092, 1098, 1118,
1055 1123, 1129, 1134, 1142, 1151, 1158, 1166, 1170, 1177, 1178,
1056 1182, 1187, 1190, 1196, 1201, 1209, 1214, 1219, 1224, 1232,
1057 1246, 1251, 1256, 1261, 1266, 1271, 1276, 1293, 1298, 1299,
1058 1303, 1304, 1307, 1314, 1321, 1328, 1335, 1340, 1347, 1354
1062 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1063 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1064 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1065 static const char *const yytname[] =
1067 "$end", "error", "$undefined", "VOID", "BOOL", "SBYTE", "UBYTE",
1068 "SHORT", "USHORT", "INT", "UINT", "LONG", "ULONG", "FLOAT", "DOUBLE",
1069 "LABEL", "OPAQUE", "ESINT64VAL", "EUINT64VAL", "SINTVAL", "UINTVAL",
1070 "FPVAL", "NULL_TOK", "UNDEF", "ZEROINITIALIZER", "TRUETOK", "FALSETOK",
1071 "TYPE", "VAR_ID", "LABELSTR", "STRINGCONSTANT", "IMPLEMENTATION",
1072 "BEGINTOK", "ENDTOK", "DECLARE", "GLOBAL", "CONSTANT", "SECTION",
1073 "VOLATILE", "TO", "DOTDOTDOT", "CONST", "INTERNAL", "LINKONCE", "WEAK",
1074 "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "APPENDING", "NOT", "EXTERNAL",
1075 "TARGET", "TRIPLE", "ENDIAN", "POINTERSIZE", "LITTLE", "BIG", "ALIGN",
1076 "UNINITIALIZED", "DEPLIBS", "CALL", "TAIL", "ASM_TOK", "MODULE",
1077 "SIDEEFFECT", "CC_TOK", "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK",
1078 "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT",
1079 "RET", "BR", "SWITCH", "INVOKE", "EXCEPT", "UNWIND", "UNREACHABLE",
1080 "ADD", "SUB", "MUL", "DIV", "UDIV", "SDIV", "FDIV", "REM", "UREM",
1081 "SREM", "FREM", "AND", "OR", "XOR", "SETLE", "SETGE", "SETLT", "SETGT",
1082 "SETEQ", "SETNE", "ICMP", "FCMP", "EQ", "NE", "SLT", "SGT", "SLE", "SGE",
1083 "OEQ", "ONE", "OLT", "OGT", "OLE", "OGE", "ORD", "UNO", "UEQ", "UNE",
1084 "ULT", "UGT", "ULE", "UGE", "MALLOC", "ALLOCA", "FREE", "LOAD", "STORE",
1085 "GETELEMENTPTR", "PHI_TOK", "SELECT", "SHL", "SHR", "ASHR", "LSHR",
1086 "VAARG", "EXTRACTELEMENT", "INSERTELEMENT", "SHUFFLEVECTOR", "CAST",
1087 "TRUNC", "ZEXT", "SEXT", "FPTRUNC", "FPEXT", "FPTOUI", "FPTOSI",
1088 "UITOFP", "SITOFP", "PTRTOINT", "INTTOPTR", "BITCAST", "'='", "','",
1089 "'\\\\'", "'('", "')'", "'['", "'x'", "']'", "'<'", "'>'", "'{'", "'}'",
1090 "'*'", "'c'", "$accept", "IntVal", "EInt64Val", "ArithmeticOps",
1091 "LogicalOps", "SetCondOps", "IPredicates", "FPredicates", "ShiftOps",
1092 "CastOps", "SIntType", "UIntType", "IntType", "FPType", "OptAssign",
1093 "OptLinkage", "OptCallingConv", "OptAlign", "OptCAlign", "SectionString",
1094 "OptSection", "GlobalVarAttributes", "GlobalVarAttribute", "TypesV",
1095 "UpRTypesV", "Types", "PrimType", "UpRTypes", "TypeListI",
1096 "ArgTypeListI", "ConstVal", "ConstExpr", "ConstVector", "GlobalType",
1097 "Module", "DefinitionList", "External", "ConstPool", "AsmBlock",
1098 "BigOrLittle", "TargetDefinition", "LibrariesDefinition", "LibList",
1099 "Name", "OptName", "ArgVal", "ArgListH", "ArgList", "FunctionHeaderH",
1100 "BEGIN", "FunctionHeader", "END", "Function", "FnDeclareLinkage",
1101 "FunctionProto", "OptSideEffect", "ConstValueRef", "SymbolicValueRef",
1102 "ValueRef", "ResolvedVal", "BasicBlockList", "BasicBlock",
1103 "InstructionList", "Unwind", "BBTerminatorInst", "JumpTable", "Inst",
1104 "PHIList", "ValueRefList", "ValueRefListE", "OptTailCall", "InstVal",
1105 "IndexList", "OptVolatile", "MemoryInst", 0
1110 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1112 static const unsigned short int yytoknum[] =
1114 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1115 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1116 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1117 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1118 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1119 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1120 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1121 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1122 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1123 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1124 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1125 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1126 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
1127 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
1128 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
1129 405, 61, 44, 92, 40, 41, 91, 120, 93, 60,
1130 62, 123, 125, 42, 99
1134 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1135 static const unsigned char yyr1[] =
1137 0, 165, 166, 166, 167, 167, 168, 168, 168, 168,
1138 168, 168, 168, 168, 168, 168, 168, 169, 169, 169,
1139 170, 170, 170, 170, 170, 170, 171, 171, 171, 171,
1140 171, 171, 171, 171, 171, 171, 172, 172, 172, 172,
1141 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
1142 172, 172, 173, 173, 173, 173, 174, 174, 174, 174,
1143 174, 174, 174, 174, 174, 174, 174, 174, 174, 175,
1144 175, 175, 175, 176, 176, 176, 176, 177, 177, 178,
1145 178, 179, 179, 180, 180, 180, 180, 180, 180, 180,
1146 180, 181, 181, 181, 181, 181, 181, 181, 181, 182,
1147 182, 183, 183, 184, 185, 185, 186, 186, 187, 187,
1148 188, 188, 189, 189, 190, 191, 191, 191, 191, 191,
1149 191, 191, 191, 191, 191, 191, 191, 192, 192, 192,
1150 192, 192, 192, 192, 192, 192, 192, 193, 193, 194,
1151 194, 194, 194, 195, 195, 195, 195, 195, 195, 195,
1152 195, 195, 195, 195, 195, 195, 195, 195, 195, 196,
1153 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
1154 196, 197, 197, 198, 198, 199, 200, 200, 200, 200,
1155 200, 201, 201, 202, 202, 202, 202, 202, 202, 202,
1156 202, 202, 202, 203, 204, 204, 205, 205, 205, 205,
1157 206, 207, 207, 207, 208, 208, 209, 209, 210, 211,
1158 211, 212, 212, 212, 212, 213, 214, 214, 215, 216,
1159 216, 217, 218, 218, 218, 219, 220, 220, 221, 221,
1160 221, 221, 221, 221, 221, 221, 221, 221, 221, 222,
1161 222, 223, 223, 224, 225, 225, 226, 227, 227, 227,
1162 228, 228, 229, 229, 229, 229, 229, 229, 229, 229,
1163 229, 230, 230, 231, 232, 232, 233, 233, 234, 234,
1164 235, 235, 236, 236, 236, 236, 236, 236, 236, 236,
1165 236, 236, 236, 236, 236, 236, 236, 236, 237, 237,
1166 238, 238, 239, 239, 239, 239, 239, 239, 239, 239
1169 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1170 static const unsigned char yyr2[] =
1172 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1173 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1174 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1175 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1176 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1177 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1178 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1179 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1180 1, 2, 0, 1, 1, 1, 1, 1, 1, 1,
1181 0, 1, 1, 1, 1, 1, 1, 2, 0, 0,
1182 2, 0, 3, 2, 0, 1, 0, 3, 1, 2,
1183 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1184 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1185 2, 4, 5, 5, 3, 2, 2, 1, 3, 1,
1186 3, 1, 0, 4, 3, 3, 4, 4, 3, 2,
1187 2, 2, 2, 2, 2, 2, 2, 2, 2, 6,
1188 5, 8, 6, 6, 6, 7, 7, 6, 6, 8,
1189 8, 3, 1, 1, 1, 1, 2, 2, 4, 2,
1190 1, 1, 1, 4, 2, 4, 6, 6, 6, 6,
1191 3, 4, 0, 1, 1, 1, 3, 3, 3, 3,
1192 3, 3, 1, 0, 1, 1, 1, 0, 2, 3,
1193 1, 1, 3, 1, 0, 8, 1, 1, 3, 1,
1194 1, 3, 0, 1, 1, 3, 0, 1, 1, 1,
1195 1, 1, 1, 1, 1, 1, 3, 1, 5, 1,
1196 1, 1, 1, 2, 2, 1, 2, 2, 0, 1,
1197 1, 1, 2, 2, 3, 9, 9, 8, 14, 1,
1198 1, 6, 5, 2, 6, 7, 1, 3, 1, 0,
1199 2, 1, 5, 5, 5, 7, 7, 2, 4, 4,
1200 6, 4, 4, 6, 6, 2, 7, 1, 2, 0,
1201 1, 0, 3, 6, 3, 6, 2, 4, 6, 4
1204 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1205 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1206 means the default is an error. */
1207 static const unsigned short int yydefact[] =
1209 192, 0, 90, 180, 1, 179, 222, 83, 84, 85,
1210 87, 88, 89, 86, 0, 98, 248, 176, 177, 204,
1211 205, 0, 0, 0, 90, 0, 184, 223, 224, 98,
1212 0, 0, 91, 92, 93, 94, 95, 96, 0, 0,
1213 249, 248, 245, 82, 0, 0, 0, 0, 190, 0,
1214 0, 0, 0, 0, 181, 182, 0, 0, 81, 225,
1215 193, 178, 97, 111, 115, 116, 117, 118, 119, 120,
1216 121, 122, 123, 124, 125, 126, 127, 2, 3, 0,
1217 0, 0, 0, 239, 0, 0, 110, 129, 114, 240,
1218 128, 216, 217, 218, 219, 220, 221, 244, 0, 0,
1219 0, 251, 250, 260, 291, 259, 246, 247, 0, 0,
1220 0, 0, 203, 191, 185, 183, 173, 174, 0, 0,
1221 0, 0, 130, 0, 0, 113, 135, 137, 0, 0,
1222 142, 136, 253, 0, 252, 0, 0, 72, 76, 71,
1223 75, 70, 74, 69, 73, 77, 78, 0, 290, 0,
1224 271, 0, 98, 6, 7, 8, 9, 10, 11, 12,
1225 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1226 23, 24, 25, 0, 0, 0, 0, 0, 0, 0,
1227 0, 52, 53, 54, 55, 0, 0, 0, 0, 68,
1228 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
1229 66, 67, 0, 0, 0, 0, 0, 98, 263, 0,
1230 287, 198, 195, 194, 196, 197, 199, 202, 0, 106,
1231 106, 115, 116, 117, 118, 119, 120, 121, 122, 123,
1232 124, 125, 0, 0, 0, 0, 106, 106, 0, 0,
1233 0, 134, 214, 141, 139, 0, 228, 229, 230, 233,
1234 234, 235, 231, 232, 226, 0, 0, 0, 0, 0,
1235 0, 0, 0, 0, 0, 0, 0, 0, 237, 242,
1236 241, 243, 0, 254, 0, 277, 270, 0, 26, 27,
1237 28, 29, 30, 31, 32, 33, 34, 35, 0, 50,
1238 51, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1239 45, 46, 47, 48, 49, 0, 101, 101, 296, 0,
1240 0, 285, 0, 0, 0, 0, 0, 0, 0, 0,
1241 0, 0, 0, 0, 0, 0, 200, 0, 188, 189,
1242 156, 157, 4, 5, 154, 155, 158, 149, 150, 153,
1243 0, 0, 0, 0, 152, 151, 186, 187, 112, 112,
1244 138, 213, 207, 210, 211, 0, 0, 131, 227, 0,
1245 0, 0, 0, 0, 0, 0, 0, 172, 0, 0,
1246 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1247 292, 0, 294, 289, 0, 0, 0, 0, 0, 0,
1248 0, 0, 0, 0, 0, 0, 0, 0, 0, 201,
1249 0, 0, 108, 106, 144, 0, 0, 148, 0, 145,
1250 132, 133, 206, 208, 0, 104, 140, 0, 0, 0,
1251 289, 0, 0, 0, 0, 0, 236, 0, 0, 0,
1252 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1253 0, 299, 0, 0, 0, 281, 282, 0, 0, 0,
1254 0, 0, 278, 279, 0, 297, 0, 103, 109, 107,
1255 143, 146, 147, 212, 209, 105, 99, 0, 0, 0,
1256 0, 0, 0, 0, 0, 171, 0, 0, 0, 0,
1257 0, 0, 0, 269, 0, 0, 101, 102, 101, 266,
1258 288, 0, 0, 0, 0, 0, 272, 273, 274, 269,
1259 0, 0, 215, 238, 0, 0, 160, 0, 0, 0,
1260 0, 0, 0, 0, 0, 0, 0, 0, 268, 0,
1261 0, 0, 0, 293, 295, 0, 0, 0, 280, 283,
1262 284, 0, 298, 100, 0, 0, 0, 168, 0, 0,
1263 162, 163, 164, 167, 159, 0, 257, 0, 0, 0,
1264 275, 276, 267, 264, 0, 286, 165, 166, 0, 0,
1265 0, 255, 0, 256, 0, 0, 265, 161, 169, 170,
1266 0, 0, 0, 0, 0, 0, 262, 0, 0, 261,
1270 /* YYDEFGOTO[NTERM-NUM]. */
1271 static const short int yydefgoto[] =
1273 -1, 83, 334, 263, 264, 265, 288, 305, 266, 267,
1274 232, 233, 147, 234, 24, 15, 38, 502, 380, 402,
1275 466, 328, 403, 84, 85, 235, 87, 88, 128, 245,
1276 367, 268, 368, 118, 1, 2, 57, 3, 61, 214,
1277 48, 113, 218, 89, 413, 353, 354, 355, 39, 93,
1278 16, 96, 17, 29, 18, 359, 269, 90, 271, 489,
1279 41, 42, 43, 105, 106, 548, 107, 311, 518, 519,
1280 207, 208, 441, 209, 210
1283 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1285 #define YYPACT_NINF -501
1286 static const short int yypact[] =
1288 -501, 82, 9, 975, -501, -501, 72, -501, -501, -501,
1289 -501, -501, -501, -501, 29, 34, 94, -501, -501, -501,
1290 -501, -28, -42, 66, 127, 25, -501, -501, -501, 34,
1291 122, 199, -501, -501, -501, -501, -501, -501, 839, -17,
1292 -501, -19, -501, 47, 67, 68, 69, 75, -501, 71,
1293 122, 839, 11, 11, -501, -501, 11, 11, -501, -501,
1294 -501, -501, -501, 76, -501, -501, -501, -501, -501, -501,
1295 -501, -501, -501, -501, -501, -501, -501, -501, -501, 207,
1296 210, 211, 518, -501, 123, 77, -501, -501, -84, -501,
1297 -501, -501, -501, -501, -501, -501, -501, -501, 876, 8,
1298 253, -501, -501, -501, 1333, -501, -501, -501, 203, 80,
1299 217, 206, 208, -501, -501, -501, -501, -501, 922, 922,
1300 960, 922, -501, 83, 84, -501, -501, -84, -134, 88,
1301 604, -501, 76, 1131, -501, 1131, 1131, -501, -501, -501,
1302 -501, -501, -501, -501, -501, -501, -501, 1131, -501, 922,
1303 -501, 177, 34, -501, -501, -501, -501, -501, -501, -501,
1304 -501, -501, -501, -501, -501, -501, -501, -501, -501, -501,
1305 -501, -501, -501, 103, 81, 922, 922, 922, 922, 922,
1306 922, -501, -501, -501, -501, 922, 922, 922, 922, -501,
1307 -501, -501, -501, -501, -501, -501, -501, -501, -501, -501,
1308 -501, -501, 922, 922, 922, 922, 922, 34, -501, 20,
1309 -501, -501, -501, -501, -501, -501, -501, -501, -44, 91,
1310 91, 130, 143, 226, 145, 227, 161, 230, 163, 231,
1311 232, 233, 165, 234, 245, 1042, 91, 91, 922, 922,
1312 922, -501, 679, -501, 99, 113, -501, -501, -501, -501,
1313 -501, -501, -501, -501, 205, 103, 81, 119, 120, 125,
1314 128, 129, 960, 133, 134, 135, 139, 140, -501, -501,
1315 -501, -501, 124, -501, 149, -501, -501, 839, -501, -501,
1316 -501, -501, -501, -501, -501, -501, -501, -501, 922, -501,
1317 -501, -501, -501, -501, -501, -501, -501, -501, -501, -501,
1318 -501, -501, -501, -501, -501, 922, 150, 151, -501, 1131,
1319 136, 153, 154, 155, 156, 157, 158, 1131, 1131, 1131,
1320 159, 241, 839, 922, 922, 251, -501, -18, -501, -501,
1321 -501, -501, -501, -501, -501, -501, -501, -501, -501, -501,
1322 717, 960, 549, 265, -501, -501, -501, -501, -69, -50,
1323 -84, -501, 123, -501, 160, 142, 763, -501, -501, 283,
1324 164, 166, 960, 960, 960, 960, 960, -501, -110, 960,
1325 960, 960, 960, 960, 302, 304, 1131, 1131, 1131, 1,
1326 -501, 12, -501, 169, 1131, 167, 922, 922, 922, 922,
1327 922, 172, 173, 176, 922, 922, 1131, 1131, 178, -501,
1328 299, 314, -501, 91, -501, -40, -68, -501, -74, -501,
1329 -501, -501, -501, -501, 801, 301, -501, 184, 960, 960,
1330 169, 187, 188, 189, 190, 960, -501, 194, 195, 201,
1331 209, 316, 1131, 1131, 204, 212, 213, 1131, 341, 1131,
1332 922, -501, 214, 1131, 215, -501, -501, 216, 220, 1131,
1333 1131, 1131, -501, -501, 219, -501, 922, -501, -501, -501,
1334 -501, -501, -501, -501, -501, -501, 303, 332, 222, 228,
1335 229, 960, 960, 960, 960, -501, 960, 960, 960, 960,
1336 922, 238, 235, 922, 1131, 1131, 240, -501, 240, -501,
1337 243, 1131, 244, 922, 922, 922, -501, -501, -501, 922,
1338 1131, 345, -501, -501, 960, 960, -501, 246, 242, 247,
1339 248, 252, 254, 255, 256, 257, 354, 26, 243, 258,
1340 259, 260, 325, -501, -501, 922, 225, 1131, -501, -501,
1341 -501, 261, -501, -501, 262, 269, 960, -501, 960, 960,
1342 -501, -501, -501, -501, -501, 1131, -501, 1220, 56, 347,
1343 -501, -501, -501, -501, 250, -501, -501, -501, 270, 271,
1344 272, -501, 249, -501, 1220, 378, -501, -501, -501, -501,
1345 391, 276, 1131, 1131, 415, 138, -501, 1131, 416, -501,
1349 /* YYPGOTO[NTERM-NUM]. */
1350 static const short int yypgoto[] =
1352 -501, -501, -501, 328, 329, 330, 181, 185, 333, 336,
1353 -98, -97, -500, -501, 400, 420, -136, -501, -300, 31,
1354 -501, -216, -501, -45, -501, -38, -501, -81, 317, -501,
1355 126, 218, -208, 74, -501, -501, -501, -501, 398, -501,
1356 -501, -501, -501, 2, -501, 35, -501, -501, 423, -501,
1357 -501, -501, -501, -501, 451, -501, -471, -106, -62, -90,
1358 -501, 417, -501, -116, -501, -501, -501, -501, 22, -39,
1359 -501, -501, 43, -501, -501
1362 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1363 positive, shift that token. If negative, reduce the rule which
1364 number is the opposite. If zero, do what YYDEFACT says.
1365 If YYTABLE_NINF, syntax error. */
1366 #define YYTABLE_NINF -176
1367 static const short int yytable[] =
1369 86, 127, 145, 146, 329, 25, 115, 382, 134, -175,
1370 40, 437, 135, 86, 94, 91, 277, 547, 240, 400,
1371 346, 347, 439, 136, 44, 45, 46, 270, 241, 270,
1372 270, 137, 138, 139, 140, 141, 142, 143, 144, 401,
1373 5, 270, 425, 6, 47, 25, 116, 117, 564, 127,
1374 426, 7, 8, 9, 10, 11, 12, 13, 438, 275,
1375 133, 137, 138, 139, 140, 141, 142, 143, 144, 438,
1376 -112, 322, 14, 272, 273, 19, 562, 20, 425, 131,
1377 219, 220, 4, 237, 425, 274, 129, 308, 462, 410,
1378 312, 30, 461, 571, 131, 313, 314, 315, 316, 31,
1379 32, 33, 34, 35, 36, 37, 289, 290, 325, 49,
1380 411, 133, 425, 131, 326, 320, 321, 27, 460, 28,
1381 98, 99, 100, 40, 101, 102, 103, 119, 50, 345,
1382 120, 121, 405, 406, 408, 212, 213, 306, 307, 133,
1383 309, 310, 133, 95, 92, 323, 324, 133, 133, 133,
1384 133, 19, 60, 20, 51, 330, 331, 348, 349, 350,
1385 -72, -72, -71, -71, 317, 318, 319, 133, 133, 7,
1386 8, 9, 52, 11, 53, 13, 58, 54, -70, -70,
1387 -69, -69, 332, 333, 546, 55, 523, 459, 524, 291,
1388 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
1389 302, 303, 304, 270, 352, 278, 279, 280, 281, 282,
1390 283, 270, 270, 270, 563, 101, 102, 62, 108, 109,
1391 110, 284, 285, 286, 287, 122, 111, 112, 123, 124,
1392 -113, 130, 376, 211, 398, 215, 216, 276, 217, 86,
1393 238, 239, 242, 327, -76, -75, 236, 383, -74, -73,
1394 377, 356, 335, -79, -80, 391, 392, 393, 137, 138,
1395 139, 140, 141, 142, 143, 144, 336, 378, 357, 358,
1396 270, 270, 270, 362, 363, 350, 374, 396, 270, 364,
1397 395, 399, 365, 366, 86, 397, 133, 369, 370, 371,
1398 270, 270, 384, 372, 373, 409, 444, 415, 446, 447,
1399 448, 375, 379, 381, 452, 385, 386, 387, 388, 389,
1400 390, 394, 414, 417, 434, 435, 436, 432, 418, 433,
1401 419, 440, 442, 443, 449, 450, 270, 270, 451, 457,
1402 456, 270, 458, 270, 454, 455, 467, 270, 400, 471,
1403 472, 473, 474, 270, 270, 270, 476, 477, 133, 445,
1404 133, 133, 133, 478, 412, 480, 133, 453, 483, 487,
1405 501, 479, 503, 533, 484, 485, 491, 493, 494, 545,
1406 481, 482, 495, 499, 504, 486, 352, 488, 270, 270,
1407 505, 492, 438, 553, 506, 270, 565, 496, 497, 498,
1408 516, 517, 522, 572, 270, 525, 527, 537, 536, 538,
1409 539, 570, 133, 528, 529, 530, 573, 540, 566, 541,
1410 542, 543, 544, 549, 550, 551, 555, 556, 500, 145,
1411 146, 270, 520, 521, 557, 567, 568, 569, 574, 526,
1412 577, 580, 202, 203, 204, 552, 360, 205, 532, 270,
1413 206, 361, 515, 104, 56, 133, 465, 244, 114, 464,
1414 145, 146, 59, 344, 26, 133, 133, 133, 97, 578,
1415 531, 133, 490, 470, 0, 554, 270, 270, 0, 0,
1416 0, 270, 0, 0, 270, 0, 0, 0, 0, 0,
1417 0, 0, 0, 561, 0, 0, 0, 133, 420, 421,
1418 422, 423, 424, 0, 0, 427, 428, 429, 430, 431,
1419 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1420 575, 576, 0, 0, 0, 579, 0, 0, 581, 0,
1421 0, 125, 64, 65, 66, 67, 68, 69, 70, 71,
1422 72, 73, 74, 75, 76, 0, 0, 77, 78, 0,
1423 0, 0, 0, 0, 468, 469, 19, 0, 20, 0,
1424 0, 475, 125, 221, 222, 223, 224, 225, 226, 227,
1425 228, 229, 230, 231, 75, 76, 0, 0, 77, 78,
1426 0, 0, 0, 0, 0, 0, 0, 19, 0, 20,
1427 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1428 0, 0, 0, 0, 0, 0, 0, 507, 508, 509,
1429 510, 0, 511, 512, 513, 514, 0, 125, 64, 65,
1430 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
1431 76, 0, 0, 77, 78, 0, 0, 0, 0, 0,
1432 534, 535, 19, 0, 20, 0, 0, 0, 0, 0,
1433 0, 0, 0, 0, 243, 0, 0, 0, 0, 0,
1434 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1435 0, 0, 558, 0, 559, 560, 0, 0, 0, 0,
1436 0, 79, 0, 0, 80, 0, 0, 81, 0, 82,
1437 126, 0, 125, 64, 65, 66, 67, 68, 69, 70,
1438 71, 72, 73, 74, 75, 76, 0, 0, 77, 78,
1439 0, 0, 79, 0, 0, 80, 0, 19, 81, 20,
1440 82, 407, 0, 0, 0, 0, 0, 0, 0, 351,
1441 125, 221, 222, 223, 224, 225, 226, 227, 228, 229,
1442 230, 231, 75, 76, 0, 0, 77, 78, 0, 0,
1443 0, 0, 0, 0, 0, 19, 0, 20, 0, 0,
1444 0, 0, 0, 0, 0, 0, 0, 79, 0, 0,
1445 80, 0, 0, 81, 0, 82, 125, 64, 65, 66,
1446 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
1447 0, 0, 77, 78, 0, 0, 0, 0, 0, 0,
1448 0, 19, 0, 20, 0, 0, 0, 0, 0, 0,
1449 0, 0, 0, 416, 125, 64, 65, 66, 67, 68,
1450 69, 70, 71, 72, 73, 74, 75, 76, 0, 0,
1451 77, 78, 0, 0, 0, 0, 0, 0, 0, 19,
1452 0, 20, 79, 0, 0, 80, 0, 0, 81, 0,
1453 82, 463, 63, 64, 65, 66, 67, 68, 69, 70,
1454 71, 72, 73, 74, 75, 76, 0, 0, 77, 78,
1455 0, 0, 0, 0, 0, 0, 0, 19, 0, 20,
1456 79, 0, 0, 80, 0, 404, 81, 0, 82, 132,
1457 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
1458 74, 75, 76, 0, 0, 77, 78, 0, 0, 0,
1459 0, 0, 0, 0, 19, 0, 20, 0, 0, 0,
1460 0, 0, 0, 0, 0, 0, 79, 0, 0, 80,
1461 0, 0, 81, 0, 82, 125, 64, 65, 66, 67,
1462 68, 69, 70, 71, 72, 73, 74, 75, 76, 0,
1463 0, 77, 78, 0, 0, 0, 0, 0, 0, 0,
1464 19, 0, 20, 0, 79, 0, 0, 80, 0, 0,
1465 81, 0, 82, 125, 221, 222, 223, 224, 225, 226,
1466 227, 228, 229, 230, 231, 75, 76, 0, 0, 77,
1467 78, 0, 0, 0, 0, 0, 0, 0, 19, 0,
1468 20, 0, 79, 0, 0, 80, 0, 0, 81, 0,
1469 82, 0, -82, 19, 0, 20, 0, 0, 0, 6,
1470 -82, -82, 0, 0, 0, 0, 0, -82, -82, -82,
1471 -82, -82, -82, -82, 0, -82, 21, 0, 0, 79,
1472 0, 0, 80, -82, 22, 81, 0, 82, 23, 0,
1473 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1474 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1475 0, 77, 78, 0, 337, 338, 339, 0, 0, 0,
1476 19, 0, 20, 0, 0, 79, 0, 0, 80, 0,
1477 0, 81, 0, 82, 0, 0, 0, 0, 0, 0,
1478 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1479 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1480 0, 0, 0, 79, 0, 0, 80, 0, 0, 81,
1481 0, 82, 153, 154, 155, 156, 157, 158, 159, 160,
1482 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
1483 171, 172, 255, 256, 0, 0, 0, 0, 246, 247,
1484 77, 78, 248, 249, 250, 251, 252, 253, 0, 19,
1485 0, 20, 0, 0, 0, 0, 0, 0, 0, 257,
1486 0, 258, 181, 182, 183, 184, 0, 259, 260, 261,
1487 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
1488 199, 200, 201, 254, 0, 0, 0, 0, 340, 0,
1489 0, 341, 0, 342, 0, 0, 343, 0, 0, 0,
1490 0, 153, 154, 155, 156, 157, 158, 159, 160, 161,
1491 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
1492 172, 255, 256, 0, 0, 0, 0, 246, 247, 0,
1493 0, 248, 249, 250, 251, 252, 253, 0, 0, 0,
1494 0, 0, 0, 0, 0, 0, 0, 0, 257, 0,
1495 258, 181, 182, 183, 184, 0, 259, 260, 261, 189,
1496 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
1497 200, 201, 254, 0, 0, 0, 0, 0, 0, 0,
1498 262, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1499 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
1500 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
1501 255, 256, 0, 0, 0, 0, 0, 0, 0, 0,
1502 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1503 0, 0, 0, 0, 0, 0, 0, 257, 0, 258,
1504 181, 182, 183, 184, 0, 259, 260, 261, 189, 190,
1505 191, 192, 193, 194, 195, 196, 197, 198, 199, 200,
1506 201, 148, 0, 0, 0, 0, 0, 0, 0, 262,
1507 0, 0, 149, 0, 0, 0, 0, 0, 0, 0,
1508 0, 0, 0, 150, 151, 0, 0, 0, 0, 0,
1509 0, 0, 0, 0, 0, 0, 0, 0, 0, 152,
1510 0, 0, 0, 153, 154, 155, 156, 157, 158, 159,
1511 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
1512 170, 171, 172, 173, 174, 0, 0, 0, 0, 0,
1513 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1514 0, 0, 0, 0, 0, 175, 176, 177, 0, 0,
1515 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
1516 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
1520 static const short int yycheck[] =
1522 38, 82, 100, 100, 220, 3, 51, 307, 98, 0,
1523 29, 10, 4, 51, 33, 32, 152, 517, 152, 37,
1524 236, 237, 10, 15, 52, 53, 54, 133, 162, 135,
1525 136, 5, 6, 7, 8, 9, 10, 11, 12, 57,
1526 31, 147, 152, 34, 72, 43, 35, 36, 548, 130,
1527 160, 42, 43, 44, 45, 46, 47, 48, 57, 149,
1528 98, 5, 6, 7, 8, 9, 10, 11, 12, 57,
1529 154, 207, 63, 135, 136, 28, 547, 30, 152, 163,
1530 118, 119, 0, 121, 152, 147, 84, 177, 162, 158,
1531 180, 62, 160, 564, 163, 185, 186, 187, 188, 65,
1532 66, 67, 68, 69, 70, 71, 25, 26, 152, 151,
1533 160, 149, 152, 163, 158, 205, 206, 45, 158, 47,
1534 73, 74, 75, 29, 77, 78, 79, 53, 62, 235,
1535 56, 57, 340, 341, 342, 55, 56, 175, 176, 177,
1536 178, 179, 180, 162, 161, 125, 126, 185, 186, 187,
1537 188, 28, 30, 30, 27, 25, 26, 238, 239, 240,
1538 17, 18, 17, 18, 202, 203, 204, 205, 206, 42,
1539 43, 44, 45, 46, 47, 48, 151, 50, 17, 18,
1540 17, 18, 17, 18, 158, 58, 486, 403, 488, 108,
1541 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
1542 119, 120, 121, 309, 242, 102, 103, 104, 105, 106,
1543 107, 317, 318, 319, 158, 77, 78, 18, 151, 151,
1544 151, 118, 119, 120, 121, 18, 151, 156, 18, 18,
1545 154, 154, 277, 30, 324, 18, 30, 60, 30, 277,
1546 157, 157, 154, 152, 18, 18, 120, 309, 18, 18,
1547 288, 152, 18, 21, 21, 317, 318, 319, 5, 6,
1548 7, 8, 9, 10, 11, 12, 21, 305, 155, 64,
1549 376, 377, 378, 154, 154, 356, 152, 322, 384, 154,
1550 39, 30, 154, 154, 322, 323, 324, 154, 154, 154,
1551 396, 397, 156, 154, 154, 30, 386, 155, 388, 389,
1552 390, 152, 152, 152, 394, 152, 152, 152, 152, 152,
1553 152, 152, 152, 30, 376, 377, 378, 15, 154, 15,
1554 154, 152, 384, 156, 152, 152, 432, 433, 152, 30,
1555 152, 437, 18, 439, 396, 397, 152, 443, 37, 152,
1556 152, 152, 152, 449, 450, 451, 152, 152, 386, 387,
1557 388, 389, 390, 152, 352, 39, 394, 395, 154, 18,
1558 57, 152, 30, 18, 152, 152, 152, 152, 152, 15,
1559 432, 433, 152, 154, 152, 437, 414, 439, 484, 485,
1560 152, 443, 57, 158, 155, 491, 39, 449, 450, 451,
1561 152, 156, 152, 15, 500, 152, 152, 155, 152, 152,
1562 152, 152, 440, 493, 494, 495, 15, 155, 158, 155,
1563 155, 155, 155, 155, 155, 155, 155, 155, 456, 517,
1564 517, 527, 484, 485, 155, 155, 155, 155, 152, 491,
1565 15, 15, 104, 104, 104, 525, 255, 104, 500, 545,
1566 104, 256, 480, 43, 24, 483, 415, 130, 50, 414,
1567 548, 548, 29, 235, 3, 493, 494, 495, 41, 575,
1568 499, 499, 440, 420, -1, 527, 572, 573, -1, -1,
1569 -1, 577, -1, -1, 580, -1, -1, -1, -1, -1,
1570 -1, -1, -1, 545, -1, -1, -1, 525, 362, 363,
1571 364, 365, 366, -1, -1, 369, 370, 371, 372, 373,
1572 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1573 572, 573, -1, -1, -1, 577, -1, -1, 580, -1,
1574 -1, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1575 12, 13, 14, 15, 16, -1, -1, 19, 20, -1,
1576 -1, -1, -1, -1, 418, 419, 28, -1, 30, -1,
1577 -1, 425, 3, 4, 5, 6, 7, 8, 9, 10,
1578 11, 12, 13, 14, 15, 16, -1, -1, 19, 20,
1579 -1, -1, -1, -1, -1, -1, -1, 28, -1, 30,
1580 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1581 -1, -1, -1, -1, -1, -1, -1, 471, 472, 473,
1582 474, -1, 476, 477, 478, 479, -1, 3, 4, 5,
1583 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1584 16, -1, -1, 19, 20, -1, -1, -1, -1, -1,
1585 504, 505, 28, -1, 30, -1, -1, -1, -1, -1,
1586 -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
1587 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1588 -1, -1, 536, -1, 538, 539, -1, -1, -1, -1,
1589 -1, 153, -1, -1, 156, -1, -1, 159, -1, 161,
1590 162, -1, 3, 4, 5, 6, 7, 8, 9, 10,
1591 11, 12, 13, 14, 15, 16, -1, -1, 19, 20,
1592 -1, -1, 153, -1, -1, 156, -1, 28, 159, 30,
1593 161, 162, -1, -1, -1, -1, -1, -1, -1, 40,
1594 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1595 13, 14, 15, 16, -1, -1, 19, 20, -1, -1,
1596 -1, -1, -1, -1, -1, 28, -1, 30, -1, -1,
1597 -1, -1, -1, -1, -1, -1, -1, 153, -1, -1,
1598 156, -1, -1, 159, -1, 161, 3, 4, 5, 6,
1599 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1600 -1, -1, 19, 20, -1, -1, -1, -1, -1, -1,
1601 -1, 28, -1, 30, -1, -1, -1, -1, -1, -1,
1602 -1, -1, -1, 40, 3, 4, 5, 6, 7, 8,
1603 9, 10, 11, 12, 13, 14, 15, 16, -1, -1,
1604 19, 20, -1, -1, -1, -1, -1, -1, -1, 28,
1605 -1, 30, 153, -1, -1, 156, -1, -1, 159, -1,
1606 161, 40, 3, 4, 5, 6, 7, 8, 9, 10,
1607 11, 12, 13, 14, 15, 16, -1, -1, 19, 20,
1608 -1, -1, -1, -1, -1, -1, -1, 28, -1, 30,
1609 153, -1, -1, 156, -1, 158, 159, -1, 161, 3,
1610 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1611 14, 15, 16, -1, -1, 19, 20, -1, -1, -1,
1612 -1, -1, -1, -1, 28, -1, 30, -1, -1, -1,
1613 -1, -1, -1, -1, -1, -1, 153, -1, -1, 156,
1614 -1, -1, 159, -1, 161, 3, 4, 5, 6, 7,
1615 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
1616 -1, 19, 20, -1, -1, -1, -1, -1, -1, -1,
1617 28, -1, 30, -1, 153, -1, -1, 156, -1, -1,
1618 159, -1, 161, 3, 4, 5, 6, 7, 8, 9,
1619 10, 11, 12, 13, 14, 15, 16, -1, -1, 19,
1620 20, -1, -1, -1, -1, -1, -1, -1, 28, -1,
1621 30, -1, 153, -1, -1, 156, -1, -1, 159, -1,
1622 161, -1, 27, 28, -1, 30, -1, -1, -1, 34,
1623 35, 36, -1, -1, -1, -1, -1, 42, 43, 44,
1624 45, 46, 47, 48, -1, 50, 51, -1, -1, 153,
1625 -1, -1, 156, 58, 59, 159, -1, 161, 63, -1,
1626 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1627 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1628 -1, 19, 20, -1, 22, 23, 24, -1, -1, -1,
1629 28, -1, 30, -1, -1, 153, -1, -1, 156, -1,
1630 -1, 159, -1, 161, -1, -1, -1, -1, -1, -1,
1631 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1632 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1633 -1, -1, -1, 153, -1, -1, 156, -1, -1, 159,
1634 -1, 161, 80, 81, 82, 83, 84, 85, 86, 87,
1635 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
1636 98, 99, 100, 101, -1, -1, -1, -1, 17, 18,
1637 19, 20, 21, 22, 23, 24, 25, 26, -1, 28,
1638 -1, 30, -1, -1, -1, -1, -1, -1, -1, 127,
1639 -1, 129, 130, 131, 132, 133, -1, 135, 136, 137,
1640 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
1641 148, 149, 150, 62, -1, -1, -1, -1, 156, -1,
1642 -1, 159, -1, 161, -1, -1, 164, -1, -1, -1,
1643 -1, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1644 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
1645 99, 100, 101, -1, -1, -1, -1, 17, 18, -1,
1646 -1, 21, 22, 23, 24, 25, 26, -1, -1, -1,
1647 -1, -1, -1, -1, -1, -1, -1, -1, 127, -1,
1648 129, 130, 131, 132, 133, -1, 135, 136, 137, 138,
1649 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
1650 149, 150, 62, -1, -1, -1, -1, -1, -1, -1,
1651 159, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1652 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
1653 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
1654 100, 101, -1, -1, -1, -1, -1, -1, -1, -1,
1655 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1656 -1, -1, -1, -1, -1, -1, -1, 127, -1, 129,
1657 130, 131, 132, 133, -1, 135, 136, 137, 138, 139,
1658 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
1659 150, 38, -1, -1, -1, -1, -1, -1, -1, 159,
1660 -1, -1, 49, -1, -1, -1, -1, -1, -1, -1,
1661 -1, -1, -1, 60, 61, -1, -1, -1, -1, -1,
1662 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
1663 -1, -1, -1, 80, 81, 82, 83, 84, 85, 86,
1664 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
1665 97, 98, 99, 100, 101, -1, -1, -1, -1, -1,
1666 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1667 -1, -1, -1, -1, -1, 122, 123, 124, -1, -1,
1668 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
1669 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
1673 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1674 symbol of state STATE-NUM. */
1675 static const unsigned char yystos[] =
1677 0, 199, 200, 202, 0, 31, 34, 42, 43, 44,
1678 45, 46, 47, 48, 63, 180, 215, 217, 219, 28,
1679 30, 51, 59, 63, 179, 208, 219, 45, 47, 218,
1680 62, 65, 66, 67, 68, 69, 70, 71, 181, 213,
1681 29, 225, 226, 227, 52, 53, 54, 72, 205, 151,
1682 62, 27, 45, 47, 50, 58, 180, 201, 151, 213,
1683 30, 203, 18, 3, 4, 5, 6, 7, 8, 9,
1684 10, 11, 12, 13, 14, 15, 16, 19, 20, 153,
1685 156, 159, 161, 166, 188, 189, 190, 191, 192, 208,
1686 222, 32, 161, 214, 33, 162, 216, 226, 73, 74,
1687 75, 77, 78, 79, 179, 228, 229, 231, 151, 151,
1688 151, 151, 156, 206, 203, 188, 35, 36, 198, 198,
1689 198, 198, 18, 18, 18, 3, 162, 192, 193, 208,
1690 154, 163, 3, 190, 224, 4, 15, 5, 6, 7,
1691 8, 9, 10, 11, 12, 175, 176, 177, 38, 49,
1692 60, 61, 76, 80, 81, 82, 83, 84, 85, 86,
1693 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
1694 97, 98, 99, 100, 101, 122, 123, 124, 127, 128,
1695 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
1696 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
1697 149, 150, 168, 169, 170, 173, 174, 235, 236, 238,
1698 239, 30, 55, 56, 204, 18, 30, 30, 207, 190,
1699 190, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1700 13, 14, 175, 176, 178, 190, 195, 190, 157, 157,
1701 152, 162, 154, 40, 193, 194, 17, 18, 21, 22,
1702 23, 24, 25, 26, 62, 100, 101, 127, 129, 135,
1703 136, 137, 159, 168, 169, 170, 173, 174, 196, 221,
1704 222, 223, 223, 223, 223, 224, 60, 181, 102, 103,
1705 104, 105, 106, 107, 118, 119, 120, 121, 171, 25,
1706 26, 108, 109, 110, 111, 112, 113, 114, 115, 116,
1707 117, 118, 119, 120, 121, 172, 190, 190, 224, 190,
1708 190, 232, 224, 224, 224, 224, 224, 190, 190, 190,
1709 224, 224, 181, 125, 126, 152, 158, 152, 186, 186,
1710 25, 26, 17, 18, 167, 18, 21, 22, 23, 24,
1711 156, 159, 161, 164, 196, 222, 186, 186, 192, 192,
1712 192, 40, 190, 210, 211, 212, 152, 155, 64, 220,
1713 171, 172, 154, 154, 154, 154, 154, 195, 197, 154,
1714 154, 154, 154, 154, 152, 152, 188, 190, 190, 152,
1715 183, 152, 183, 223, 156, 152, 152, 152, 152, 152,
1716 152, 223, 223, 223, 152, 39, 188, 190, 224, 30,
1717 37, 57, 184, 187, 158, 197, 197, 162, 197, 30,
1718 158, 160, 208, 209, 152, 155, 40, 30, 154, 154,
1719 195, 195, 195, 195, 195, 152, 160, 195, 195, 195,
1720 195, 195, 15, 15, 223, 223, 223, 10, 57, 10,
1721 152, 237, 223, 156, 224, 190, 224, 224, 224, 152,
1722 152, 152, 224, 190, 223, 223, 152, 30, 18, 186,
1723 158, 160, 162, 40, 210, 184, 185, 152, 195, 195,
1724 237, 152, 152, 152, 152, 195, 152, 152, 152, 152,
1725 39, 223, 223, 154, 152, 152, 223, 18, 223, 224,
1726 233, 152, 223, 152, 152, 152, 223, 223, 223, 154,
1727 190, 57, 182, 30, 152, 152, 155, 195, 195, 195,
1728 195, 195, 195, 195, 195, 190, 152, 156, 233, 234,
1729 223, 223, 152, 183, 183, 152, 223, 152, 224, 224,
1730 224, 234, 223, 18, 195, 195, 152, 155, 152, 152,
1731 155, 155, 155, 155, 155, 15, 158, 177, 230, 155,
1732 155, 155, 224, 158, 223, 155, 155, 155, 195, 195,
1733 195, 223, 221, 158, 177, 39, 158, 155, 155, 155,
1734 152, 221, 15, 15, 152, 223, 223, 15, 228, 223,
1738 #define yyerrok (yyerrstatus = 0)
1739 #define yyclearin (yychar = YYEMPTY)
1740 #define YYEMPTY (-2)
1743 #define YYACCEPT goto yyacceptlab
1744 #define YYABORT goto yyabortlab
1745 #define YYERROR goto yyerrorlab
1748 /* Like YYERROR except do call yyerror. This remains here temporarily
1749 to ease the transition to the new meaning of YYERROR, for GCC.
1750 Once GCC version 2 has supplanted version 1, this can go. */
1752 #define YYFAIL goto yyerrlab
1754 #define YYRECOVERING() (!!yyerrstatus)
1756 #define YYBACKUP(Token, Value) \
1758 if (yychar == YYEMPTY && yylen == 1) \
1762 yytoken = YYTRANSLATE (yychar); \
1768 yyerror (YY_("syntax error: cannot back up")); \
1775 #define YYERRCODE 256
1778 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1779 If N is 0, then set CURRENT to the empty location which ends
1780 the previous symbol: RHS[0] (always defined). */
1782 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1783 #ifndef YYLLOC_DEFAULT
1784 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1788 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1789 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1790 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1791 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1795 (Current).first_line = (Current).last_line = \
1796 YYRHSLOC (Rhs, 0).last_line; \
1797 (Current).first_column = (Current).last_column = \
1798 YYRHSLOC (Rhs, 0).last_column; \
1804 /* YY_LOCATION_PRINT -- Print the location on the stream.
1805 This macro was not mandated originally: define only if we know
1806 we won't break user code: when these are the locations we know. */
1808 #ifndef YY_LOCATION_PRINT
1809 # if YYLTYPE_IS_TRIVIAL
1810 # define YY_LOCATION_PRINT(File, Loc) \
1811 fprintf (File, "%d.%d-%d.%d", \
1812 (Loc).first_line, (Loc).first_column, \
1813 (Loc).last_line, (Loc).last_column)
1815 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1820 /* YYLEX -- calling `yylex' with the right arguments. */
1823 # define YYLEX yylex (YYLEX_PARAM)
1825 # define YYLEX yylex ()
1828 /* Enable debugging if requested. */
1832 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1833 # define YYFPRINTF fprintf
1836 # define YYDPRINTF(Args) \
1842 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1846 YYFPRINTF (stderr, "%s ", Title); \
1847 yysymprint (stderr, \
1849 YYFPRINTF (stderr, "\n"); \
1853 /*------------------------------------------------------------------.
1854 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1856 `------------------------------------------------------------------*/
1858 #if defined (__STDC__) || defined (__cplusplus)
1860 yy_stack_print (short int *bottom, short int *top)
1863 yy_stack_print (bottom, top)
1868 YYFPRINTF (stderr, "Stack now");
1869 for (/* Nothing. */; bottom <= top; ++bottom)
1870 YYFPRINTF (stderr, " %d", *bottom);
1871 YYFPRINTF (stderr, "\n");
1874 # define YY_STACK_PRINT(Bottom, Top) \
1877 yy_stack_print ((Bottom), (Top)); \
1881 /*------------------------------------------------.
1882 | Report that the YYRULE is going to be reduced. |
1883 `------------------------------------------------*/
1885 #if defined (__STDC__) || defined (__cplusplus)
1887 yy_reduce_print (int yyrule)
1890 yy_reduce_print (yyrule)
1895 unsigned long int yylno = yyrline[yyrule];
1896 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
1898 /* Print the symbols being reduced, and their result. */
1899 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
1900 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1901 YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
1904 # define YY_REDUCE_PRINT(Rule) \
1907 yy_reduce_print (Rule); \
1910 /* Nonzero means print parse trace. It is left uninitialized so that
1911 multiple parsers can coexist. */
1913 #else /* !YYDEBUG */
1914 # define YYDPRINTF(Args)
1915 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1916 # define YY_STACK_PRINT(Bottom, Top)
1917 # define YY_REDUCE_PRINT(Rule)
1918 #endif /* !YYDEBUG */
1921 /* YYINITDEPTH -- initial size of the parser's stacks. */
1923 # define YYINITDEPTH 200
1926 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1927 if the built-in stack extension method is used).
1929 Do not make this value too large; the results are undefined if
1930 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1931 evaluated with infinite-precision integer arithmetic. */
1934 # define YYMAXDEPTH 10000
1942 # if defined (__GLIBC__) && defined (_STRING_H)
1943 # define yystrlen strlen
1945 /* Return the length of YYSTR. */
1947 # if defined (__STDC__) || defined (__cplusplus)
1948 yystrlen (const char *yystr)
1954 const char *yys = yystr;
1956 while (*yys++ != '\0')
1959 return yys - yystr - 1;
1965 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1966 # define yystpcpy stpcpy
1968 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1971 # if defined (__STDC__) || defined (__cplusplus)
1972 yystpcpy (char *yydest, const char *yysrc)
1974 yystpcpy (yydest, yysrc)
1980 const char *yys = yysrc;
1982 while ((*yyd++ = *yys++) != '\0')
1991 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1992 quotes and backslashes, so that it's suitable for yyerror. The
1993 heuristic is that double-quoting is unnecessary unless the string
1994 contains an apostrophe, a comma, or backslash (other than
1995 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1996 null, do not copy; instead, return the length of what the result
1999 yytnamerr (char *yyres, const char *yystr)
2004 char const *yyp = yystr;
2011 goto do_not_strip_quotes;
2015 goto do_not_strip_quotes;
2028 do_not_strip_quotes: ;
2032 return yystrlen (yystr);
2034 return yystpcpy (yyres, yystr) - yyres;
2038 #endif /* YYERROR_VERBOSE */
2043 /*--------------------------------.
2044 | Print this symbol on YYOUTPUT. |
2045 `--------------------------------*/
2047 #if defined (__STDC__) || defined (__cplusplus)
2049 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
2052 yysymprint (yyoutput, yytype, yyvaluep)
2058 /* Pacify ``unused variable'' warnings. */
2061 if (yytype < YYNTOKENS)
2062 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
2064 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
2068 if (yytype < YYNTOKENS)
2069 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
2076 YYFPRINTF (yyoutput, ")");
2079 #endif /* ! YYDEBUG */
2080 /*-----------------------------------------------.
2081 | Release the memory associated to this symbol. |
2082 `-----------------------------------------------*/
2084 #if defined (__STDC__) || defined (__cplusplus)
2086 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
2089 yydestruct (yymsg, yytype, yyvaluep)
2095 /* Pacify ``unused variable'' warnings. */
2100 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2111 /* Prevent warnings from -Wmissing-prototypes. */
2113 #ifdef YYPARSE_PARAM
2114 # if defined (__STDC__) || defined (__cplusplus)
2115 int yyparse (void *YYPARSE_PARAM);
2119 #else /* ! YYPARSE_PARAM */
2120 #if defined (__STDC__) || defined (__cplusplus)
2125 #endif /* ! YYPARSE_PARAM */
2129 /* The look-ahead symbol. */
2132 /* The semantic value of the look-ahead symbol. */
2135 /* Number of syntax errors so far. */
2144 #ifdef YYPARSE_PARAM
2145 # if defined (__STDC__) || defined (__cplusplus)
2146 int yyparse (void *YYPARSE_PARAM)
2148 int yyparse (YYPARSE_PARAM)
2149 void *YYPARSE_PARAM;
2151 #else /* ! YYPARSE_PARAM */
2152 #if defined (__STDC__) || defined (__cplusplus)
2166 /* Number of tokens to shift before error messages enabled. */
2168 /* Look-ahead token as an internal (translated) token number. */
2171 /* Three stacks and their tools:
2172 `yyss': related to states,
2173 `yyvs': related to semantic values,
2174 `yyls': related to locations.
2176 Refer to the stacks thru separate pointers, to allow yyoverflow
2177 to reallocate them elsewhere. */
2179 /* The state stack. */
2180 short int yyssa[YYINITDEPTH];
2181 short int *yyss = yyssa;
2184 /* The semantic value stack. */
2185 YYSTYPE yyvsa[YYINITDEPTH];
2186 YYSTYPE *yyvs = yyvsa;
2191 #define YYPOPSTACK (yyvsp--, yyssp--)
2193 YYSIZE_T yystacksize = YYINITDEPTH;
2195 /* The variables used to return semantic value and location from the
2200 /* When reducing, the number of symbols on the RHS of the reduced
2204 YYDPRINTF ((stderr, "Starting parse\n"));
2209 yychar = YYEMPTY; /* Cause a token to be read. */
2211 /* Initialize stack pointers.
2212 Waste one element of value and location stack
2213 so that they stay on the same level as the state stack.
2214 The wasted elements are never initialized. */
2221 /*------------------------------------------------------------.
2222 | yynewstate -- Push a new state, which is found in yystate. |
2223 `------------------------------------------------------------*/
2225 /* In all cases, when you get here, the value and location stacks
2226 have just been pushed. so pushing a state here evens the stacks.
2233 if (yyss + yystacksize - 1 <= yyssp)
2235 /* Get the current used size of the three stacks, in elements. */
2236 YYSIZE_T yysize = yyssp - yyss + 1;
2240 /* Give user a chance to reallocate the stack. Use copies of
2241 these so that the &'s don't force the real ones into
2243 YYSTYPE *yyvs1 = yyvs;
2244 short int *yyss1 = yyss;
2247 /* Each stack pointer address is followed by the size of the
2248 data in use in that stack, in bytes. This used to be a
2249 conditional around just the two extra args, but that might
2250 be undefined if yyoverflow is a macro. */
2251 yyoverflow (YY_("memory exhausted"),
2252 &yyss1, yysize * sizeof (*yyssp),
2253 &yyvs1, yysize * sizeof (*yyvsp),
2260 #else /* no yyoverflow */
2261 # ifndef YYSTACK_RELOCATE
2262 goto yyexhaustedlab;
2264 /* Extend the stack our own way. */
2265 if (YYMAXDEPTH <= yystacksize)
2266 goto yyexhaustedlab;
2268 if (YYMAXDEPTH < yystacksize)
2269 yystacksize = YYMAXDEPTH;
2272 short int *yyss1 = yyss;
2273 union yyalloc *yyptr =
2274 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2276 goto yyexhaustedlab;
2277 YYSTACK_RELOCATE (yyss);
2278 YYSTACK_RELOCATE (yyvs);
2280 # undef YYSTACK_RELOCATE
2282 YYSTACK_FREE (yyss1);
2285 #endif /* no yyoverflow */
2287 yyssp = yyss + yysize - 1;
2288 yyvsp = yyvs + yysize - 1;
2291 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2292 (unsigned long int) yystacksize));
2294 if (yyss + yystacksize - 1 <= yyssp)
2298 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2307 /* Do appropriate processing given the current state. */
2308 /* Read a look-ahead token if we need one and don't already have one. */
2311 /* First try to decide what to do without reference to look-ahead token. */
2313 yyn = yypact[yystate];
2314 if (yyn == YYPACT_NINF)
2317 /* Not known => get a look-ahead token if don't already have one. */
2319 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
2320 if (yychar == YYEMPTY)
2322 YYDPRINTF ((stderr, "Reading a token: "));
2326 if (yychar <= YYEOF)
2328 yychar = yytoken = YYEOF;
2329 YYDPRINTF ((stderr, "Now at end of input.\n"));
2333 yytoken = YYTRANSLATE (yychar);
2334 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2337 /* If the proper action on seeing token YYTOKEN is to reduce or to
2338 detect an error, take that action. */
2340 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2345 if (yyn == 0 || yyn == YYTABLE_NINF)
2354 /* Shift the look-ahead token. */
2355 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2357 /* Discard the token being shifted unless it is eof. */
2358 if (yychar != YYEOF)
2364 /* Count tokens shifted since error; after three, turn off error
2373 /*-----------------------------------------------------------.
2374 | yydefault -- do the default action for the current state. |
2375 `-----------------------------------------------------------*/
2377 yyn = yydefact[yystate];
2383 /*-----------------------------.
2384 | yyreduce -- Do a reduction. |
2385 `-----------------------------*/
2387 /* yyn is the number of a rule to reduce with. */
2390 /* If YYLEN is nonzero, implement the default value of the action:
2393 Otherwise, the following line sets YYVAL to garbage.
2394 This behavior is undocumented and Bison
2395 users should not rely upon it. Assigning to YYVAL
2396 unconditionally makes the parser a bit smaller, and it avoids a
2397 GCC warning that YYVAL may be used uninitialized. */
2398 yyval = yyvsp[1-yylen];
2401 YY_REDUCE_PRINT (yyn);
2405 #line 367 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2407 (yyval.String) = (yyvsp[-1].String);
2412 #line 370 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2414 (yyval.String) = new std::string("");
2419 #line 377 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2420 { (yyval.String) = new std::string(""); ;}
2424 #line 382 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2426 *(yyvsp[-1].String) += *(yyvsp[0].String);
2427 delete (yyvsp[0].String);
2428 (yyval.String) = (yyvsp[-1].String);
2433 #line 387 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2434 { (yyval.String) = new std::string(""); ;}
2438 #line 392 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2439 { (yyval.String) = new std::string(); ;}
2443 #line 393 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2444 { *(yyvsp[-1].String) += " " + *(yyvsp[0].String); delete (yyvsp[0].String); (yyval.String) = (yyvsp[-1].String); ;}
2448 #line 396 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2449 { (yyval.String) = new std::string(); ;}
2453 #line 397 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2455 (yyvsp[-1].String)->insert(0, ", ");
2456 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2457 delete (yyvsp[0].String);
2458 (yyval.String) = (yyvsp[-1].String);
2463 #line 405 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2465 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2466 delete (yyvsp[0].String);
2467 (yyval.String) = (yyvsp[-1].String);
2472 #line 411 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2473 { (yyval.String) = new std::string(); ;}
2477 #line 415 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2478 { (yyval.String) = new std::string(); ;}
2482 #line 416 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2484 (yyvsp[-1].String)->insert(0, ", ");
2485 if (!(yyvsp[0].String)->empty())
2486 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2487 delete (yyvsp[0].String);
2488 (yyval.String) = (yyvsp[-1].String);
2493 #line 426 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2495 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2496 delete (yyvsp[0].String);
2497 (yyval.String) = (yyvsp[-1].String);
2502 #line 448 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2504 (yyval.Type).newTy = (yyvsp[0].String);
2505 (yyval.Type).oldTy = OpaqueTy;
2510 #line 452 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2512 (yyval.Type).newTy = (yyvsp[0].String);
2513 (yyval.Type).oldTy = UnresolvedTy;
2518 #line 456 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2520 (yyval.Type) = (yyvsp[0].Type);
2525 #line 459 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2526 { // Type UpReference
2527 (yyvsp[0].String)->insert(0, "\\");
2528 (yyval.Type).newTy = (yyvsp[0].String);
2529 (yyval.Type).oldTy = NumericTy;
2534 #line 464 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2535 { // Function derived type?
2536 *(yyvsp[-3].Type).newTy += "( " + *(yyvsp[-1].String) + " )";
2537 delete (yyvsp[-1].String);
2538 (yyval.Type).newTy = (yyvsp[-3].Type).newTy;
2539 (yyval.Type).oldTy = FunctionTy;
2544 #line 470 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2545 { // Sized array type?
2546 (yyvsp[-3].String)->insert(0,"[ ");
2547 *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " ]";
2548 delete (yyvsp[-1].Type).newTy;
2549 (yyval.Type).newTy = (yyvsp[-3].String);
2550 (yyval.Type).oldTy = ArrayTy;
2551 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2556 #line 478 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2557 { // Packed array type?
2558 (yyvsp[-3].String)->insert(0,"< ");
2559 *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " >";
2560 delete (yyvsp[-1].Type).newTy;
2561 (yyval.Type).newTy = (yyvsp[-3].String);
2562 (yyval.Type).oldTy = PackedTy;
2563 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2568 #line 486 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2569 { // Structure type?
2570 (yyvsp[-1].String)->insert(0, "{ ");
2571 *(yyvsp[-1].String) += " }";
2572 (yyval.Type).newTy = (yyvsp[-1].String);
2573 (yyval.Type).oldTy = StructTy;
2578 #line 492 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2579 { // Empty structure type?
2580 (yyval.Type).newTy = new std::string("{}");
2581 (yyval.Type).oldTy = StructTy;
2586 #line 496 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2588 *(yyvsp[-1].Type).newTy += '*';
2589 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2590 (yyvsp[-1].Type).oldTy = PointerTy;
2591 (yyval.Type) = (yyvsp[-1].Type);
2596 #line 507 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2598 (yyval.String) = (yyvsp[0].Type).newTy;
2603 #line 510 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2605 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Type).newTy;
2606 delete (yyvsp[0].Type).newTy;
2607 (yyval.String) = (yyvsp[-2].String);
2612 #line 519 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2614 *(yyvsp[-2].String) += ", ...";
2615 delete (yyvsp[0].String);
2616 (yyval.String) = (yyvsp[-2].String);
2621 #line 524 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2623 (yyval.String) = (yyvsp[0].String);
2628 #line 527 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2630 (yyval.String) = new std::string();
2635 #line 537 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2636 { // Nonempty unsized arr
2637 (yyval.Const).type = (yyvsp[-3].Type);
2638 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2639 *(yyval.Const).cnst += " [ " + *(yyvsp[-1].String) + " ]";
2640 delete (yyvsp[-1].String);
2645 #line 543 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2647 (yyval.Const).type = (yyvsp[-2].Type);
2648 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2649 *(yyval.Const).cnst += "[ ]";
2654 #line 548 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2656 (yyval.Const).type = (yyvsp[-2].Type);
2657 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2658 *(yyval.Const).cnst += " c" + *(yyvsp[0].String);
2659 delete (yyvsp[0].String);
2664 #line 554 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2665 { // Nonempty unsized arr
2666 (yyval.Const).type = (yyvsp[-3].Type);
2667 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2668 *(yyval.Const).cnst += " < " + *(yyvsp[-1].String) + " >";
2669 delete (yyvsp[-1].String);
2674 #line 560 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2676 (yyval.Const).type = (yyvsp[-3].Type);
2677 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2678 *(yyval.Const).cnst += " { " + *(yyvsp[-1].String) + " }";
2679 delete (yyvsp[-1].String);
2684 #line 566 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2686 (yyval.Const).type = (yyvsp[-2].Type);
2687 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2688 *(yyval.Const).cnst += " {}";
2693 #line 571 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2695 (yyval.Const).type = (yyvsp[-1].Type);
2696 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2697 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2698 delete (yyvsp[0].String);
2703 #line 577 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2705 (yyval.Const).type = (yyvsp[-1].Type);
2706 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2707 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2708 delete (yyvsp[0].String);
2713 #line 583 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2715 (yyval.Const).type = (yyvsp[-1].Type);
2716 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2717 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2718 delete (yyvsp[0].String);
2723 #line 589 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2725 (yyval.Const).type = (yyvsp[-1].Type);
2726 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2727 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2728 delete (yyvsp[0].String);
2733 #line 595 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2735 (yyval.Const).type = (yyvsp[-1].Type);
2736 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2737 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2738 delete (yyvsp[0].String);
2743 #line 601 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2744 { // integral constants
2745 (yyval.Const).type = (yyvsp[-1].Type);
2746 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2747 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2748 delete (yyvsp[0].String);
2753 #line 607 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2754 { // integral constants
2755 (yyval.Const).type = (yyvsp[-1].Type);
2756 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2757 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2758 delete (yyvsp[0].String);
2763 #line 613 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2764 { // Boolean constants
2765 (yyval.Const).type = (yyvsp[-1].Type);
2766 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2767 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2768 delete (yyvsp[0].String);
2773 #line 619 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2774 { // Boolean constants
2775 (yyval.Const).type = (yyvsp[-1].Type);
2776 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2777 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2778 delete (yyvsp[0].String);
2783 #line 625 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2784 { // Float & Double constants
2785 (yyval.Const).type = (yyvsp[-1].Type);
2786 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2787 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2788 delete (yyvsp[0].String);
2793 #line 633 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2795 std::string source = *(yyvsp[-3].Const).cnst;
2796 TypeInfo DstTy = (yyvsp[-1].Type);
2798 if (*(yyvsp[-5].String) == "cast") {
2799 // Call getCastUpgrade to upgrade the old cast
2800 (yyval.String) = new std::string(getCastUpgrade(source, (yyvsp[-3].Const).type, (yyvsp[-1].Type), true));
2802 // Nothing to upgrade, just create the cast constant expr
2803 (yyval.String) = new std::string(*(yyvsp[-5].String));
2804 *(yyval.String) += "( " + source + " to " + *(yyvsp[-1].Type).newTy + ")";
2806 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
2811 #line 647 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2813 *(yyvsp[-4].String) += "(" + *(yyvsp[-2].Const).cnst;
2814 for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
2815 ValueInfo& VI = (*(yyvsp[-1].ValList))[i];
2816 *(yyvsp[-4].String) += ", " + *VI.val;
2819 *(yyvsp[-4].String) += ")";
2820 (yyval.String) = (yyvsp[-4].String);
2821 (yyvsp[-2].Const).destroy();
2822 delete (yyvsp[-1].ValList);
2827 #line 659 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2829 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2830 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2831 (yyval.String) = (yyvsp[-7].String);
2836 #line 664 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2838 const char* op = getDivRemOpcode(*(yyvsp[-5].String), (yyvsp[-3].Const).type);
2839 (yyval.String) = new std::string(op);
2840 *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2841 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2846 #line 670 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2848 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2849 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2850 (yyval.String) = (yyvsp[-5].String);
2855 #line 675 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2857 #if UPGRADE_SETCOND_OPS
2858 *(yyvsp[-5].String) = getCompareOp(*(yyvsp[-5].String), (yyvsp[-3].Const).type);
2860 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2861 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2862 (yyval.String) = (yyvsp[-5].String);
2867 #line 683 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2869 *(yyvsp[-6].String) += "(" + *(yyvsp[-5].String) + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2870 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2871 (yyval.String) = (yyvsp[-6].String);
2876 #line 688 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2878 *(yyvsp[-6].String) += "(" + *(yyvsp[-5].String) + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2879 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2880 (yyval.String) = (yyvsp[-6].String);
2885 #line 693 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2887 const char* shiftop = (yyvsp[-5].String)->c_str();
2888 if (*(yyvsp[-5].String) == "shr")
2889 shiftop = ((yyvsp[-3].Const).type.isUnsigned()) ? "lshr" : "ashr";
2890 (yyval.String) = new std::string(shiftop);
2891 *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2892 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2897 #line 701 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2899 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2900 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2901 (yyval.String) = (yyvsp[-5].String);
2906 #line 706 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2908 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2909 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2910 (yyval.String) = (yyvsp[-7].String);
2915 #line 711 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2917 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2918 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2919 (yyval.String) = (yyvsp[-7].String);
2924 #line 721 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2926 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Const).cnst;
2927 (yyvsp[0].Const).destroy();
2928 (yyval.String) = (yyvsp[-2].String);
2933 #line 726 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2934 { (yyval.String) = new std::string(*(yyvsp[0].Const).cnst); (yyvsp[0].Const).destroy(); ;}
2938 #line 741 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2944 #line 746 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2951 #line 749 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2953 *O << *(yyvsp[0].String) << "\n";
2954 delete (yyvsp[0].String);
2960 #line 754 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2962 *O << "module asm " << " " << *(yyvsp[0].String) << "\n";
2968 #line 758 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2970 *O << "implementation\n";
2976 #line 762 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2977 { (yyval.String) = 0; ;}
2981 #line 764 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2982 { (yyval.String) = (yyvsp[0].String); *(yyval.String) = "external"; ;}
2986 #line 767 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
2988 EnumeratedTypes.push_back((yyvsp[0].Type));
2989 if (!(yyvsp[-2].String)->empty()) {
2990 NamedTypes[*(yyvsp[-2].String)].newTy = new std::string(*(yyvsp[0].Type).newTy);
2991 NamedTypes[*(yyvsp[-2].String)].oldTy = (yyvsp[0].Type).oldTy;
2992 NamedTypes[*(yyvsp[-2].String)].elemTy = (yyvsp[0].Type).elemTy;
2993 *O << *(yyvsp[-2].String) << " = ";
2995 *O << "type " << *(yyvsp[0].Type).newTy << "\n";
2996 delete (yyvsp[-2].String); delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3002 #line 779 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3003 { // Function prototypes can be in const pool
3004 *O << *(yyvsp[0].String) << "\n";
3005 delete (yyvsp[0].String);
3011 #line 784 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3012 { // Asm blocks can be in the const pool
3013 *O << *(yyvsp[-2].String) << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
3014 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3020 #line 789 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3022 if (!(yyvsp[-4].String)->empty()) {
3023 *O << *(yyvsp[-4].String) << " = ";
3024 Globals[*(yyvsp[-4].String)] = (yyvsp[-1].Const).type.clone();
3026 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Const).cnst << " " << *(yyvsp[0].String) << "\n";
3027 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Const).destroy(); delete (yyvsp[0].String);
3033 #line 798 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3035 if (!(yyvsp[-4].String)->empty()) {
3036 *O << *(yyvsp[-4].String) << " = ";
3037 Globals[*(yyvsp[-4].String)] = (yyvsp[-1].Type).clone();
3039 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3040 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3046 #line 807 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3048 if (!(yyvsp[-4].String)->empty()) {
3049 *O << *(yyvsp[-4].String) << " = ";
3050 Globals[*(yyvsp[-4].String)] = (yyvsp[-1].Type).clone();
3052 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3053 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3059 #line 816 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3061 if (!(yyvsp[-4].String)->empty()) {
3062 *O << *(yyvsp[-4].String) << " = ";
3063 Globals[*(yyvsp[-4].String)] = (yyvsp[-1].Type).clone();
3065 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3066 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3072 #line 825 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3074 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
3075 delete (yyvsp[-1].String); delete (yyvsp[0].String);
3081 #line 830 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3083 *O << *(yyvsp[-2].String) << " = " << *(yyvsp[0].String) << "\n";
3084 delete (yyvsp[-2].String); delete (yyvsp[0].String);
3090 #line 835 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3097 #line 845 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3099 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3100 delete (yyvsp[0].String);
3101 (yyval.String) = (yyvsp[-2].String);
3106 #line 850 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3108 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3109 if (*(yyvsp[0].String) == "64")
3111 delete (yyvsp[0].String);
3112 (yyval.String) = (yyvsp[-2].String);
3117 #line 857 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3119 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3120 delete (yyvsp[0].String);
3121 (yyval.String) = (yyvsp[-2].String);
3126 #line 862 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3128 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3129 delete (yyvsp[0].String);
3130 (yyval.String) = (yyvsp[-2].String);
3135 #line 869 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3137 (yyvsp[-1].String)->insert(0, "[ ");
3138 *(yyvsp[-1].String) += " ]";
3139 (yyval.String) = (yyvsp[-1].String);
3144 #line 876 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3146 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
3147 delete (yyvsp[0].String);
3148 (yyval.String) = (yyvsp[-2].String);
3153 #line 882 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3155 (yyval.String) = new std::string();
3160 #line 891 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3161 { (yyval.String) = new std::string(); ;}
3165 #line 893 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3167 (yyval.String) = (yyvsp[-1].Type).newTy;
3168 if (!(yyvsp[0].String)->empty())
3169 *(yyval.String) += " " + *(yyvsp[0].String);
3170 delete (yyvsp[0].String);
3175 #line 900 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3177 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
3178 delete (yyvsp[0].String);
3183 #line 904 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3185 (yyval.String) = (yyvsp[0].String);
3190 #line 908 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3192 (yyval.String) = (yyvsp[0].String);
3197 #line 911 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3199 *(yyvsp[-2].String) += ", ...";
3200 (yyval.String) = (yyvsp[-2].String);
3201 delete (yyvsp[0].String);
3206 #line 916 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3208 (yyval.String) = (yyvsp[0].String);
3213 #line 919 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3214 { (yyval.String) = new std::string(); ;}
3218 #line 922 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3220 if (!(yyvsp[-7].String)->empty()) {
3221 *(yyvsp[-7].String) += " ";
3223 *(yyvsp[-7].String) += *(yyvsp[-6].Type).newTy + " " + *(yyvsp[-5].String) + "(" + *(yyvsp[-3].String) + ")";
3224 if (!(yyvsp[-1].String)->empty()) {
3225 *(yyvsp[-7].String) += " " + *(yyvsp[-1].String);
3227 if (!(yyvsp[0].String)->empty()) {
3228 *(yyvsp[-7].String) += " " + *(yyvsp[0].String);
3230 (yyvsp[-6].Type).destroy();
3231 delete (yyvsp[-5].String);
3232 delete (yyvsp[-3].String);
3233 delete (yyvsp[-1].String);
3234 delete (yyvsp[0].String);
3235 (yyval.String) = (yyvsp[-7].String);
3240 #line 941 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3241 { (yyval.String) = new std::string("{"); delete (yyvsp[0].String); ;}
3245 #line 942 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3246 { (yyval.String) = new std::string ("{"); ;}
3250 #line 944 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3252 if (!(yyvsp[-2].String)->empty()) {
3253 *O << *(yyvsp[-2].String) << " ";
3255 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
3256 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3262 #line 953 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3263 { (yyval.String) = new std::string("}"); delete (yyvsp[0].String); ;}
3267 #line 954 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3268 { (yyval.String) = new std::string("}"); ;}
3272 #line 956 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3274 if ((yyvsp[-1].String))
3275 *O << *(yyvsp[-1].String);
3276 *O << '\n' << *(yyvsp[0].String) << "\n";
3282 #line 964 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3283 { (yyval.String) = new std::string(); ;}
3287 #line 970 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3289 if (!(yyvsp[-1].String)->empty())
3290 *(yyvsp[-2].String) += " " + *(yyvsp[-1].String);
3291 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3292 delete (yyvsp[-1].String);
3293 delete (yyvsp[0].String);
3294 (yyval.String) = (yyvsp[-2].String);
3299 #line 983 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3300 { (yyval.String) = new std::string(); ;}
3304 #line 989 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3306 (yyvsp[-1].String)->insert(0, "<");
3307 *(yyvsp[-1].String) += ">";
3308 (yyval.String) = (yyvsp[-1].String);
3313 #line 995 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3315 if (!(yyvsp[-3].String)->empty()) {
3316 *(yyvsp[-4].String) += " " + *(yyvsp[-3].String);
3318 *(yyvsp[-4].String) += " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
3319 delete (yyvsp[-3].String); delete (yyvsp[-2].String); delete (yyvsp[0].String);
3320 (yyval.String) = (yyvsp[-4].String);
3325 #line 1008 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3327 (yyval.Value).val = (yyvsp[0].String);
3328 (yyval.Value).constant = false;
3329 (yyval.Value).type.newTy = 0;
3330 (yyval.Value).type.oldTy = UnresolvedTy;
3335 #line 1014 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3337 (yyval.Value).val = (yyvsp[0].String);
3338 (yyval.Value).constant = true;
3339 (yyval.Value).type.newTy = 0;
3340 (yyval.Value).type.oldTy = UnresolvedTy;
3345 #line 1025 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3347 (yyval.Value) = (yyvsp[0].Value);
3348 (yyval.Value).type = (yyvsp[-1].Type);
3349 (yyval.Value).val->insert(0, *(yyvsp[-1].Type).newTy + " ");
3354 #line 1031 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3361 #line 1034 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3362 { // Do not allow functions with 0 basic blocks
3368 #line 1042 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3375 #line 1046 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3377 *O << " " << *(yyvsp[0].String) << "\n";
3378 delete (yyvsp[0].String);
3384 #line 1051 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3391 #line 1054 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3393 *O << *(yyvsp[0].String) << "\n";
3394 delete (yyvsp[0].String);
3400 #line 1060 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3401 { (yyval.String) = (yyvsp[0].String); *(yyval.String) = "unwind"; ;}
3405 #line 1062 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3406 { // Return with a result...
3407 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Value).val << "\n";
3408 delete (yyvsp[-1].String); (yyvsp[0].Value).destroy();
3414 #line 1067 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3415 { // Return with no result...
3416 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Type).newTy << "\n";
3417 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3423 #line 1072 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3424 { // Unconditional Branch...
3425 *O << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].Value).val << "\n";
3426 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3432 #line 1077 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3434 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", "
3435 << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << ", " << *(yyvsp[-1].Type).newTy << " "
3436 << *(yyvsp[0].Value).val << "\n";
3437 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); (yyvsp[-6].Value).destroy(); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy();
3438 (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3444 #line 1085 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3446 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", "
3447 << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << " [" << *(yyvsp[-1].String) << " ]\n";
3448 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); (yyvsp[-6].Value).destroy(); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy();
3449 delete (yyvsp[-1].String);
3455 #line 1092 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3457 *O << " " << *(yyvsp[-7].String) << " " << *(yyvsp[-6].Type).newTy << " " << *(yyvsp[-5].Value).val << ", "
3458 << *(yyvsp[-3].Type).newTy << " " << *(yyvsp[-2].Value).val << "[]\n";
3459 delete (yyvsp[-7].String); (yyvsp[-6].Type).destroy(); (yyvsp[-5].Value).destroy(); (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy();
3465 #line 1099 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3468 if (!(yyvsp[-13].String)->empty())
3469 *O << *(yyvsp[-13].String) << " = ";
3470 *O << *(yyvsp[-12].String) << " " << *(yyvsp[-11].String) << " " << *(yyvsp[-10].Type).newTy << " " << *(yyvsp[-9].Value).val << " (";
3471 for (unsigned i = 0; i < (yyvsp[-7].ValList)->size(); ++i) {
3472 ValueInfo& VI = (*(yyvsp[-7].ValList))[i];
3474 if (i+1 < (yyvsp[-7].ValList)->size())
3478 *O << ") " << *(yyvsp[-5].String) << " " << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << " "
3479 << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].Value).val << "\n";
3480 delete (yyvsp[-13].String); delete (yyvsp[-12].String); delete (yyvsp[-11].String); (yyvsp[-10].Type).destroy(); (yyvsp[-9].Value).destroy(); delete (yyvsp[-7].ValList);
3481 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
3482 (yyvsp[0].Value).destroy();
3488 #line 1118 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3490 *O << " " << *(yyvsp[0].String) << "\n";
3491 delete (yyvsp[0].String);
3497 #line 1123 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3499 *O << " " << *(yyvsp[0].String) << "\n";
3500 delete (yyvsp[0].String);
3506 #line 1129 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3508 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].String) + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3509 (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3510 (yyval.String) = (yyvsp[-5].String);
3515 #line 1134 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3517 (yyvsp[-3].String)->insert(0, *(yyvsp[-4].Type).newTy + " " );
3518 *(yyvsp[-3].String) += ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3519 (yyvsp[-4].Type).destroy(); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3520 (yyval.String) = (yyvsp[-3].String);
3525 #line 1142 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3527 if (!(yyvsp[-1].String)->empty())
3528 *(yyvsp[-1].String) += " = ";
3529 *(yyvsp[-1].String) += *(yyvsp[0].String);
3530 delete (yyvsp[0].String);
3531 (yyval.String) = (yyvsp[-1].String);
3536 #line 1151 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3537 { // Used for PHI nodes
3538 (yyvsp[-3].Value).val->insert(0, *(yyvsp[-5].Type).newTy + "[");
3539 *(yyvsp[-3].Value).val += "," + *(yyvsp[-1].Value).val + "]";
3540 (yyvsp[-5].Type).destroy(); (yyvsp[-1].Value).destroy();
3541 (yyval.String) = new std::string(*(yyvsp[-3].Value).val);
3542 (yyvsp[-3].Value).destroy();
3547 #line 1158 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3549 *(yyvsp[-6].String) += ", [" + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + "]";
3550 (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
3551 (yyval.String) = (yyvsp[-6].String);
3556 #line 1166 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3558 (yyval.ValList) = new ValueList();
3559 (yyval.ValList)->push_back((yyvsp[0].Value));
3564 #line 1170 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3566 (yyvsp[-2].ValList)->push_back((yyvsp[0].Value));
3567 (yyval.ValList) = (yyvsp[-2].ValList);
3572 #line 1177 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3573 { (yyval.ValList) = (yyvsp[0].ValList); ;}
3577 #line 1178 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3578 { (yyval.ValList) = new ValueList(); ;}
3582 #line 1182 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3584 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3585 delete (yyvsp[0].String);
3586 (yyval.String) = (yyvsp[-1].String);
3591 #line 1190 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3593 const char* op = getDivRemOpcode(*(yyvsp[-4].String), (yyvsp[-3].Type));
3594 (yyval.String) = new std::string(op);
3595 *(yyval.String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3596 delete (yyvsp[-4].String); (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3601 #line 1196 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3603 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3604 (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3605 (yyval.String) = (yyvsp[-4].String);
3610 #line 1201 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3612 #if UPGRADE_SETCOND_OPS
3613 *(yyvsp[-4].String) = getCompareOp(*(yyvsp[-4].String), (yyvsp[-3].Type));
3615 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3616 (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3617 (yyval.String) = (yyvsp[-4].String);
3622 #line 1209 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3624 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String) + " " + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + ")";
3625 delete (yyvsp[-5].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
3626 (yyval.String) = (yyvsp[-6].String);
3631 #line 1214 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3633 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String) + " " + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + ")";
3634 delete (yyvsp[-5].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
3635 (yyval.String) = (yyvsp[-6].String);
3640 #line 1219 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3642 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3643 (yyvsp[0].Value).destroy();
3644 (yyval.String) = (yyvsp[-1].String);
3649 #line 1224 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3651 const char* shiftop = (yyvsp[-3].String)->c_str();
3652 if (*(yyvsp[-3].String) == "shr")
3653 shiftop = ((yyvsp[-2].Value).type.isUnsigned()) ? "lshr" : "ashr";
3654 (yyval.String) = new std::string(shiftop);
3655 *(yyval.String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3656 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3661 #line 1232 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3663 std::string source = *(yyvsp[-2].Value).val;
3664 TypeInfo SrcTy = (yyvsp[-2].Value).type;
3665 TypeInfo DstTy = (yyvsp[0].Type);
3667 (yyval.String) = new std::string();
3668 if (*(yyvsp[-3].String) == "cast") {
3669 *(yyval.String) += getCastUpgrade(source, SrcTy, DstTy, false);
3671 *(yyval.String) += *(yyvsp[-3].String) + " " + source + " to " + *DstTy.newTy;
3673 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy();
3674 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3679 #line 1246 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3681 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3682 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3683 (yyval.String) = (yyvsp[-5].String);
3688 #line 1251 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3690 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Type).newTy;
3691 (yyvsp[-2].Value).destroy(); (yyvsp[0].Type).destroy();
3692 (yyval.String) = (yyvsp[-3].String);
3697 #line 1256 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3699 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3700 (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3701 (yyval.String) = (yyvsp[-3].String);
3706 #line 1261 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3708 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3709 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3710 (yyval.String) = (yyvsp[-5].String);
3715 #line 1266 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3717 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3718 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3719 (yyval.String) = (yyvsp[-5].String);
3724 #line 1271 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3726 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3727 delete (yyvsp[0].String);
3728 (yyval.String) = (yyvsp[-1].String);
3733 #line 1276 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3735 if (!(yyvsp[-5].String)->empty())
3736 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String);
3737 if (!(yyvsp[-6].String)->empty())
3738 *(yyvsp[-6].String) += " ";
3739 *(yyvsp[-6].String) += *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].Value).val + "(";
3740 for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
3741 ValueInfo& VI = (*(yyvsp[-1].ValList))[i];
3742 *(yyvsp[-6].String) += *VI.val;
3743 if (i+1 < (yyvsp[-1].ValList)->size())
3744 *(yyvsp[-6].String) += ", ";
3747 *(yyvsp[-6].String) += ")";
3748 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); delete (yyvsp[-1].ValList);
3749 (yyval.String) = (yyvsp[-6].String);
3754 #line 1298 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3755 { (yyval.ValList) = (yyvsp[0].ValList); ;}
3759 #line 1299 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3760 { (yyval.ValList) = new ValueList(); ;}
3764 #line 1304 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3765 { (yyval.String) = new std::string(); ;}
3769 #line 1307 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3771 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3772 if (!(yyvsp[0].String)->empty())
3773 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3774 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3775 (yyval.String) = (yyvsp[-2].String);
3780 #line 1314 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3782 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3783 if (!(yyvsp[0].String)->empty())
3784 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3785 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].String);
3786 (yyval.String) = (yyvsp[-5].String);
3791 #line 1321 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3793 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3794 if (!(yyvsp[0].String)->empty())
3795 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3796 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3797 (yyval.String) = (yyvsp[-2].String);
3802 #line 1328 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3804 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3805 if (!(yyvsp[0].String)->empty())
3806 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3807 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].String);
3808 (yyval.String) = (yyvsp[-5].String);
3813 #line 1335 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3815 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3816 (yyvsp[0].Value).destroy();
3817 (yyval.String) = (yyvsp[-1].String);
3822 #line 1340 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3824 if (!(yyvsp[-3].String)->empty())
3825 *(yyvsp[-3].String) += " ";
3826 *(yyvsp[-3].String) += *(yyvsp[-2].String) + " " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3827 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3828 (yyval.String) = (yyvsp[-3].String);
3833 #line 1347 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3835 if (!(yyvsp[-5].String)->empty())
3836 *(yyvsp[-5].String) += " ";
3837 *(yyvsp[-5].String) += *(yyvsp[-4].String) + " " + *(yyvsp[-3].Value).val + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3838 delete (yyvsp[-4].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3839 (yyval.String) = (yyvsp[-5].String);
3844 #line 1354 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
3846 // Upgrade the indices
3847 for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) {
3848 ValueInfo& VI = (*(yyvsp[0].ValList))[i];
3849 if (VI.type.isUnsigned() && !VI.isConstant() &&
3850 VI.type.getBitWidth() < 64) {
3851 std::string* old = VI.val;
3852 *O << " %gep_upgrade" << unique << " = zext " << *old
3854 VI.val = new std::string("ulong %gep_upgrade" + llvm::utostr(unique++));
3855 VI.type.oldTy = ULongTy;
3859 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3860 for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) {
3861 ValueInfo& VI = (*(yyvsp[0].ValList))[i];
3862 *(yyvsp[-3].String) += ", " + *VI.val;
3865 (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].ValList);
3866 (yyval.String) = (yyvsp[-3].String);
3874 /* Line 1126 of yacc.c. */
3875 #line 3876 "UpgradeParser.tab.c"
3881 YY_STACK_PRINT (yyss, yyssp);
3886 /* Now `shift' the result of the reduction. Determine what state
3887 that goes to, based on the state we popped back to and the rule
3888 number reduced by. */
3892 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3893 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3894 yystate = yytable[yystate];
3896 yystate = yydefgoto[yyn - YYNTOKENS];
3901 /*------------------------------------.
3902 | yyerrlab -- here on detecting error |
3903 `------------------------------------*/
3905 /* If not already recovering from an error, report this error. */
3910 yyn = yypact[yystate];
3912 if (YYPACT_NINF < yyn && yyn < YYLAST)
3914 int yytype = YYTRANSLATE (yychar);
3915 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3916 YYSIZE_T yysize = yysize0;
3918 int yysize_overflow = 0;
3920 # define YYERROR_VERBOSE_ARGS_MAXIMUM 5
3921 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3925 /* This is so xgettext sees the translatable formats that are
3926 constructed on the fly. */
3927 YY_("syntax error, unexpected %s");
3928 YY_("syntax error, unexpected %s, expecting %s");
3929 YY_("syntax error, unexpected %s, expecting %s or %s");
3930 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3931 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3935 static char const yyunexpected[] = "syntax error, unexpected %s";
3936 static char const yyexpecting[] = ", expecting %s";
3937 static char const yyor[] = " or %s";
3938 char yyformat[sizeof yyunexpected
3939 + sizeof yyexpecting - 1
3940 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3941 * (sizeof yyor - 1))];
3942 char const *yyprefix = yyexpecting;
3944 /* Start YYX at -YYN if negative to avoid negative indexes in
3946 int yyxbegin = yyn < 0 ? -yyn : 0;
3948 /* Stay within bounds of both yycheck and yytname. */
3949 int yychecklim = YYLAST - yyn;
3950 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3953 yyarg[0] = yytname[yytype];
3954 yyfmt = yystpcpy (yyformat, yyunexpected);
3956 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3957 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3959 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3963 yyformat[sizeof yyunexpected - 1] = '\0';
3966 yyarg[yycount++] = yytname[yyx];
3967 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3968 yysize_overflow |= yysize1 < yysize;
3970 yyfmt = yystpcpy (yyfmt, yyprefix);
3974 yyf = YY_(yyformat);
3975 yysize1 = yysize + yystrlen (yyf);
3976 yysize_overflow |= yysize1 < yysize;
3979 if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
3980 yymsg = (char *) YYSTACK_ALLOC (yysize);
3983 /* Avoid sprintf, as that infringes on the user's name space.
3984 Don't have undefined behavior even if the translation
3985 produced a string with the wrong number of "%s"s. */
3988 while ((*yyp = *yyf))
3990 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3992 yyp += yytnamerr (yyp, yyarg[yyi++]);
4002 YYSTACK_FREE (yymsg);
4006 yyerror (YY_("syntax error"));
4007 goto yyexhaustedlab;
4011 #endif /* YYERROR_VERBOSE */
4012 yyerror (YY_("syntax error"));
4017 if (yyerrstatus == 3)
4019 /* If just tried and failed to reuse look-ahead token after an
4020 error, discard it. */
4022 if (yychar <= YYEOF)
4024 /* Return failure if at end of input. */
4025 if (yychar == YYEOF)
4030 yydestruct ("Error: discarding", yytoken, &yylval);
4035 /* Else will try to reuse look-ahead token after shifting the error
4040 /*---------------------------------------------------.
4041 | yyerrorlab -- error raised explicitly by YYERROR. |
4042 `---------------------------------------------------*/
4045 /* Pacify compilers like GCC when the user code never invokes
4046 YYERROR and the label yyerrorlab therefore never appears in user
4057 /*-------------------------------------------------------------.
4058 | yyerrlab1 -- common code for both syntax error and YYERROR. |
4059 `-------------------------------------------------------------*/
4061 yyerrstatus = 3; /* Each real token shifted decrements this. */
4065 yyn = yypact[yystate];
4066 if (yyn != YYPACT_NINF)
4069 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4077 /* Pop the current state because it cannot handle the error token. */
4082 yydestruct ("Error: popping", yystos[yystate], yyvsp);
4085 YY_STACK_PRINT (yyss, yyssp);
4094 /* Shift the error token. */
4095 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
4101 /*-------------------------------------.
4102 | yyacceptlab -- YYACCEPT comes here. |
4103 `-------------------------------------*/
4108 /*-----------------------------------.
4109 | yyabortlab -- YYABORT comes here. |
4110 `-----------------------------------*/
4116 /*-------------------------------------------------.
4117 | yyexhaustedlab -- memory exhaustion comes here. |
4118 `-------------------------------------------------*/
4120 yyerror (YY_("memory exhausted"));
4126 if (yychar != YYEOF && yychar != YYEMPTY)
4127 yydestruct ("Cleanup: discarding lookahead",
4129 while (yyssp != yyss)
4131 yydestruct ("Cleanup: popping",
4132 yystos[*yyssp], yyvsp);
4137 YYSTACK_FREE (yyss);
4143 #line 1378 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
4146 int yyerror(const char *ErrorMsg) {
4148 = std::string((CurFilename == "-") ? std::string("<stdin>") : CurFilename)
4149 + ":" + llvm::utostr((unsigned) Upgradelineno) + ": ";
4150 std::string errMsg = std::string(ErrorMsg) + "\n" + where + " while reading ";
4151 if (yychar == YYEMPTY || yychar == 0)
4152 errMsg += "end-of-file.";
4154 errMsg += "token: '" + std::string(Upgradetext, Upgradeleng) + "'";
4155 std::cerr << errMsg << '\n';