1 /* A Bison parser, made by GNU Bison 2.1. */
3 /* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA. */
21 /* As a special exception, when this file is copied by Bison into a
22 Bison output file, you may use that output file without restriction.
23 This special exception was added by the Free Software Foundation
24 in version 1.24 of Bison. */
26 /* Written by Richard Stallman by simplifying the original so called
27 ``semantic'' parser. */
29 /* All symbols defined below should begin with yy or YY, to avoid
30 infringing on user name space. This should be done even for local
31 variables, as they might otherwise be expanded by user macros.
32 There are some unavoidable exceptions within include files to
33 define necessary library symbols; they are noted "INFRINGES ON
34 USER NAME SPACE" below. */
36 /* Identify Bison output. */
40 #define YYBISON_VERSION "2.1"
43 #define YYSKELETON_NAME "yacc.c"
48 /* Using locations. */
49 #define YYLSP_NEEDED 0
51 /* Substitute the variable and function names. */
52 #define yyparse Upgradeparse
53 #define yylex Upgradelex
54 #define yyerror Upgradeerror
55 #define yylval Upgradelval
56 #define yychar Upgradechar
57 #define yydebug Upgradedebug
58 #define yynerrs Upgradenerrs
64 /* Put the tokens into the symbol table, so that GDB and other debuggers
88 ZEROINITIALIZER = 279,
134 X86_STDCALLCC_TOK = 325,
135 X86_FASTCALLCC_TOK = 326,
199 EXTRACTELEMENT = 390,
232 #define ESINT64VAL 272
233 #define EUINT64VAL 273
239 #define ZEROINITIALIZER 279
245 #define STRINGCONSTANT 285
246 #define IMPLEMENTATION 286
255 #define DOTDOTDOT 295
260 #define DLLIMPORT 300
261 #define DLLEXPORT 301
262 #define EXTERN_WEAK 302
263 #define APPENDING 303
269 #define POINTERSIZE 309
273 #define UNINITIALIZED 313
279 #define SIDEEFFECT 319
282 #define CSRETCC_TOK 322
283 #define FASTCC_TOK 323
284 #define COLDCC_TOK 324
285 #define X86_STDCALLCC_TOK 325
286 #define X86_FASTCALLCC_TOK 326
287 #define DATALAYOUT 327
294 #define UNREACHABLE 334
342 #define GETELEMENTPTR 382
350 #define EXTRACTELEMENT 390
351 #define INSERTELEMENT 391
352 #define SHUFFLEVECTOR 392
370 /* Copy the first part of user declarations. */
371 #line 14 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
373 #include "ParserInternals.h"
374 #include <llvm/ADT/StringExtras.h>
381 #define YYERROR_VERBOSE 1
382 #define YYINCLUDED_STDLIB_H
384 #define UPGRADE_SETCOND_OPS 0
386 int yylex(); // declaration" of xxx warnings.
390 static std::string CurFilename;
391 static std::ostream *O = 0;
392 std::istream* LexInput = 0;
393 unsigned SizeOfPointer = 32;
394 static uint64_t unique = 1;
396 typedef std::vector<TypeInfo> TypeVector;
397 static TypeVector EnumeratedTypes;
398 typedef std::map<std::string,TypeInfo> TypeMap;
399 static TypeMap NamedTypes;
401 void destroy(ValueList* VL) {
402 while (!VL->empty()) {
403 ValueInfo& VI = VL->back();
410 void UpgradeAssembly(const std::string &infile, std::istream& in,
411 std::ostream &out, bool debug)
414 CurFilename = infile;
420 std::cerr << "Parse failed.\n";
425 static void ResolveType(TypeInfo& Ty) {
426 if (Ty.oldTy == UnresolvedTy) {
427 TypeMap::iterator I = NamedTypes.find(*Ty.newTy);
428 if (I != NamedTypes.end()) {
429 Ty.oldTy = I->second.oldTy;
430 Ty.elemTy = I->second.elemTy;
432 std::string msg("Can't resolve type: ");
434 yyerror(msg.c_str());
436 } else if (Ty.oldTy == NumericTy) {
437 unsigned ref = atoi(&((Ty.newTy->c_str())[1])); // Skip the '\\'
438 if (ref < EnumeratedTypes.size()) {
439 Ty.oldTy = EnumeratedTypes[ref].oldTy;
440 Ty.elemTy = EnumeratedTypes[ref].elemTy;
442 std::string msg("Can't resolve type: ");
444 yyerror(msg.c_str());
447 // otherwise its already resolved.
450 static const char* getCastOpcode(
451 std::string& Source, const TypeInfo& SrcTy, const TypeInfo& DstTy)
453 unsigned SrcBits = SrcTy.getBitWidth();
454 unsigned DstBits = DstTy.getBitWidth();
455 const char* opcode = "bitcast";
456 // Run through the possibilities ...
457 if (DstTy.isIntegral()) { // Casting to integral
458 if (SrcTy.isIntegral()) { // Casting from integral
459 if (DstBits < SrcBits)
461 else if (DstBits > SrcBits) { // its an extension
462 if (SrcTy.isSigned())
463 opcode ="sext"; // signed -> SEXT
465 opcode = "zext"; // unsigned -> ZEXT
467 opcode = "bitcast"; // Same size, No-op cast
469 } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt
470 if (DstTy.isSigned())
471 opcode = "fptosi"; // FP -> sint
473 opcode = "fptoui"; // FP -> uint
474 } else if (SrcTy.isPacked()) {
475 assert(DstBits == SrcTy.getBitWidth() &&
476 "Casting packed to integer of different width");
477 opcode = "bitcast"; // same size, no-op cast
479 assert(SrcTy.isPointer() &&
480 "Casting from a value that is not first-class type");
481 opcode = "ptrtoint"; // ptr -> int
483 } else if (DstTy.isFloatingPoint()) { // Casting to floating pt
484 if (SrcTy.isIntegral()) { // Casting from integral
485 if (SrcTy.isSigned())
486 opcode = "sitofp"; // sint -> FP
488 opcode = "uitofp"; // uint -> FP
489 } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt
490 if (DstBits < SrcBits) {
491 opcode = "fptrunc"; // FP -> smaller FP
492 } else if (DstBits > SrcBits) {
493 opcode = "fpext"; // FP -> larger FP
495 opcode ="bitcast"; // same size, no-op cast
497 } else if (SrcTy.isPacked()) {
498 assert(DstBits == SrcTy.getBitWidth() &&
499 "Casting packed to floating point of different width");
500 opcode = "bitcast"; // same size, no-op cast
502 assert(0 && "Casting pointer or non-first class to float");
504 } else if (DstTy.isPacked()) {
505 if (SrcTy.isPacked()) {
506 assert(DstTy.getBitWidth() == SrcTy.getBitWidth() &&
507 "Casting packed to packed of different widths");
508 opcode = "bitcast"; // packed -> packed
509 } else if (DstTy.getBitWidth() == SrcBits) {
510 opcode = "bitcast"; // float/int -> packed
512 assert(!"Illegal cast to packed (wrong type or size)");
514 } else if (DstTy.isPointer()) {
515 if (SrcTy.isPointer()) {
516 opcode = "bitcast"; // ptr -> ptr
517 } else if (SrcTy.isIntegral()) {
518 opcode = "inttoptr"; // int -> ptr
520 assert(!"Casting invalid type to pointer");
523 assert(!"Casting to type that is not first-class");
528 static std::string getCastUpgrade(
529 const std::string& Src, TypeInfo& SrcTy, TypeInfo& DstTy, bool isConst)
532 std::string Source = Src;
533 if (SrcTy.isFloatingPoint() && DstTy.isPointer()) {
534 // fp -> ptr cast is no longer supported but we must upgrade this
535 // by doing a double cast: fp -> int -> ptr
537 Source = "ulong fptoui(" + Source + " to ulong)";
539 *O << " %cast_upgrade" << unique << " = fptoui " << Source
541 Source = "ulong %cast_upgrade" + llvm::utostr(unique);
543 // Update the SrcTy for the getCastOpcode call below
545 SrcTy.newTy = new std::string("ulong");
546 SrcTy.oldTy = ULongTy;
547 } else if (DstTy.oldTy == BoolTy) {
548 // cast ptr %x to bool was previously defined as setne ptr %x, null
549 // The ptrtoint semantic is to truncate, not compare so we must retain
550 // the original intent by replace the cast with a setne
551 const char* comparator = SrcTy.isPointer() ? ", null" :
552 (SrcTy.isFloatingPoint() ? ", 0.0" : ", 0");
554 Result = "setne (" + Source + comparator + ")";
556 Result = "setne " + Source + comparator;
557 return Result; // skip cast processing below
561 std::string Opcode(getCastOpcode(Source, SrcTy, DstTy));
563 Result += Opcode + "( " + Source + " to " + *DstTy.newTy + ")";
565 Result += Opcode + " " + Source + " to " + *DstTy.newTy;
569 const char* getDivRemOpcode(const std::string& opcode, const TypeInfo& TI) {
570 const char* op = opcode.c_str();
574 Ty.oldTy = Ty.getElementType();
576 if (Ty.isFloatingPoint())
578 else if (Ty.isUnsigned())
580 else if (Ty.isSigned())
583 yyerror("Invalid type for div instruction");
584 else if (opcode == "rem")
585 if (Ty.isFloatingPoint())
587 else if (Ty.isUnsigned())
589 else if (Ty.isSigned())
592 yyerror("Invalid type for rem instruction");
597 getCompareOp(const std::string& setcc, const TypeInfo& TI) {
598 assert(setcc.length() == 5);
601 assert(cc1 == 'e' || cc1 == 'n' || cc1 == 'l' || cc1 == 'g');
602 assert(cc2 == 'q' || cc2 == 'e' || cc2 == 'e' || cc2 == 't');
603 std::string result("xcmp xxx");
606 if (TI.isFloatingPoint()) {
608 result[5] = 'o'; // FIXME: Always map to ordered comparison ?
609 } else if (TI.isIntegral() || TI.isPointer()) {
611 if ((cc1 == 'e' && cc2 == 'q') || (cc1 == 'n' && cc2 == 'e'))
613 else if (TI.isSigned())
615 else if (TI.isUnsigned() || TI.isPointer())
618 yyerror("Invalid integral type for setcc");
625 /* Enabling traces. */
630 /* Enabling verbose error messages. */
631 #ifdef YYERROR_VERBOSE
632 # undef YYERROR_VERBOSE
633 # define YYERROR_VERBOSE 1
635 # define YYERROR_VERBOSE 0
638 /* Enabling the token table. */
639 #ifndef YYTOKEN_TABLE
640 # define YYTOKEN_TABLE 0
643 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
644 #line 269 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
645 typedef union YYSTYPE {
652 /* Line 196 of yacc.c. */
653 #line 654 "UpgradeParser.tab.c"
654 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
655 # define YYSTYPE_IS_DECLARED 1
656 # define YYSTYPE_IS_TRIVIAL 1
661 /* Copy the second part of user declarations. */
664 /* Line 219 of yacc.c. */
665 #line 666 "UpgradeParser.tab.c"
667 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
668 # define YYSIZE_T __SIZE_TYPE__
670 #if ! defined (YYSIZE_T) && defined (size_t)
671 # define YYSIZE_T size_t
673 #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
674 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
675 # define YYSIZE_T size_t
677 #if ! defined (YYSIZE_T)
678 # define YYSIZE_T unsigned int
684 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
685 # define YY_(msgid) dgettext ("bison-runtime", msgid)
689 # define YY_(msgid) msgid
693 #if ! defined (yyoverflow) || YYERROR_VERBOSE
695 /* The parser invokes alloca or malloc; define the necessary symbols. */
697 # ifdef YYSTACK_USE_ALLOCA
698 # if YYSTACK_USE_ALLOCA
700 # define YYSTACK_ALLOC __builtin_alloca
702 # define YYSTACK_ALLOC alloca
703 # if defined (__STDC__) || defined (__cplusplus)
704 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
705 # define YYINCLUDED_STDLIB_H
711 # ifdef YYSTACK_ALLOC
712 /* Pacify GCC's `empty if-body' warning. */
713 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
714 # ifndef YYSTACK_ALLOC_MAXIMUM
715 /* The OS might guarantee only one guard page at the bottom of the stack,
716 and a page size can be as small as 4096 bytes. So we cannot safely
717 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
718 to allow for a few compiler-allocated temporary stack slots. */
719 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
722 # define YYSTACK_ALLOC YYMALLOC
723 # define YYSTACK_FREE YYFREE
724 # ifndef YYSTACK_ALLOC_MAXIMUM
725 # define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
731 # define YYMALLOC malloc
732 # if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
733 && (defined (__STDC__) || defined (__cplusplus)))
734 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
739 # if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
740 && (defined (__STDC__) || defined (__cplusplus)))
741 void free (void *); /* INFRINGES ON USER NAME SPACE */
748 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
751 #if (! defined (yyoverflow) \
752 && (! defined (__cplusplus) \
753 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
755 /* A type that is properly aligned for any stack member. */
762 /* The size of the maximum gap between one aligned stack and the next. */
763 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
765 /* The size of an array large to enough to hold all stacks, each with
767 # define YYSTACK_BYTES(N) \
768 ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
769 + YYSTACK_GAP_MAXIMUM)
771 /* Copy COUNT objects from FROM to TO. The source and destination do
774 # if defined (__GNUC__) && 1 < __GNUC__
775 # define YYCOPY(To, From, Count) \
776 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
778 # define YYCOPY(To, From, Count) \
782 for (yyi = 0; yyi < (Count); yyi++) \
783 (To)[yyi] = (From)[yyi]; \
789 /* Relocate STACK from its old location to the new one. The
790 local variables YYSIZE and YYSTACKSIZE give the old and new number of
791 elements in the stack, and YYPTR gives the new location of the
792 stack. Advance YYPTR to a properly aligned location for the next
794 # define YYSTACK_RELOCATE(Stack) \
797 YYSIZE_T yynewbytes; \
798 YYCOPY (&yyptr->Stack, Stack, yysize); \
799 Stack = &yyptr->Stack; \
800 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
801 yyptr += yynewbytes / sizeof (*yyptr); \
807 #if defined (__STDC__) || defined (__cplusplus)
808 typedef signed char yysigned_char;
810 typedef short int yysigned_char;
813 /* YYFINAL -- State number of the termination state. */
815 /* YYLAST -- Last index in YYTABLE. */
818 /* YYNTOKENS -- Number of terminals. */
819 #define YYNTOKENS 165
820 /* YYNNTS -- Number of nonterminals. */
822 /* YYNRULES -- Number of rules. */
824 /* YYNRULES -- Number of states. */
825 #define YYNSTATES 582
827 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
829 #define YYMAXUTOK 405
831 #define YYTRANSLATE(YYX) \
832 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
834 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
835 static const unsigned char yytranslate[] =
837 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
838 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
839 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
840 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
841 154, 155, 163, 2, 152, 2, 2, 2, 2, 2,
842 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
843 159, 151, 160, 2, 2, 2, 2, 2, 2, 2,
844 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
845 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
846 2, 156, 153, 158, 2, 2, 2, 2, 2, 164,
847 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
848 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
849 157, 2, 2, 161, 2, 162, 2, 2, 2, 2,
850 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
851 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
852 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
853 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
854 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
855 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
856 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
857 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
858 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
859 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
860 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
861 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
862 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
863 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
864 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
865 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
866 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
867 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
868 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
869 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
870 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
871 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
872 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
873 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
874 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
875 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
876 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
877 145, 146, 147, 148, 149, 150
881 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
883 static const unsigned short int yyprhs[] =
885 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
886 19, 21, 23, 25, 27, 29, 31, 33, 35, 37,
887 39, 41, 43, 45, 47, 49, 51, 53, 55, 57,
888 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
889 79, 81, 83, 85, 87, 89, 91, 93, 95, 97,
890 99, 101, 103, 105, 107, 109, 111, 113, 115, 117,
891 119, 121, 123, 125, 127, 129, 131, 133, 135, 137,
892 139, 141, 143, 145, 147, 149, 151, 153, 155, 157,
893 159, 161, 164, 165, 167, 169, 171, 173, 175, 177,
894 179, 180, 182, 184, 186, 188, 190, 192, 195, 196,
895 197, 200, 201, 205, 208, 209, 211, 212, 216, 218,
896 221, 223, 225, 227, 229, 231, 233, 235, 237, 239,
897 241, 243, 245, 247, 249, 251, 253, 255, 257, 259,
898 261, 264, 269, 275, 281, 285, 288, 291, 293, 297,
899 299, 303, 305, 306, 311, 315, 319, 324, 329, 333,
900 336, 339, 342, 345, 348, 351, 354, 357, 360, 363,
901 370, 376, 385, 392, 399, 406, 414, 422, 429, 436,
902 445, 454, 458, 460, 462, 464, 466, 469, 472, 477,
903 480, 482, 484, 486, 491, 494, 499, 506, 513, 520,
904 527, 531, 536, 537, 539, 541, 543, 547, 551, 555,
905 559, 563, 567, 569, 570, 572, 574, 576, 577, 580,
906 584, 586, 588, 592, 594, 595, 604, 606, 608, 612,
907 614, 616, 620, 621, 623, 625, 629, 630, 632, 634,
908 636, 638, 640, 642, 644, 646, 648, 652, 654, 660,
909 662, 664, 666, 668, 671, 674, 676, 679, 682, 683,
910 685, 687, 689, 692, 695, 699, 709, 719, 728, 743,
911 745, 747, 754, 760, 763, 770, 778, 780, 784, 786,
912 787, 790, 792, 798, 804, 810, 818, 826, 829, 834,
913 839, 846, 851, 856, 863, 870, 873, 881, 883, 886,
914 887, 889, 890, 894, 901, 905, 912, 915, 920, 927
917 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
918 static const short int yyrhs[] =
920 199, 0, -1, 19, -1, 20, -1, 17, -1, 18,
921 -1, 80, -1, 81, -1, 82, -1, 83, -1, 84,
922 -1, 85, -1, 86, -1, 87, -1, 88, -1, 89,
923 -1, 90, -1, 91, -1, 92, -1, 93, -1, 94,
924 -1, 95, -1, 96, -1, 97, -1, 98, -1, 99,
925 -1, 102, -1, 103, -1, 104, -1, 105, -1, 106,
926 -1, 107, -1, 118, -1, 119, -1, 120, -1, 121,
927 -1, 108, -1, 109, -1, 110, -1, 111, -1, 112,
928 -1, 113, -1, 114, -1, 115, -1, 116, -1, 117,
929 -1, 118, -1, 119, -1, 120, -1, 121, -1, 25,
930 -1, 26, -1, 130, -1, 131, -1, 132, -1, 133,
931 -1, 139, -1, 140, -1, 141, -1, 142, -1, 143,
932 -1, 144, -1, 145, -1, 146, -1, 147, -1, 148,
933 -1, 149, -1, 150, -1, 138, -1, 11, -1, 9,
934 -1, 7, -1, 5, -1, 12, -1, 10, -1, 8,
935 -1, 6, -1, 175, -1, 176, -1, 13, -1, 14,
936 -1, 208, 151, -1, -1, 42, -1, 43, -1, 44,
937 -1, 48, -1, 45, -1, 46, -1, 47, -1, -1,
938 66, -1, 67, -1, 68, -1, 69, -1, 70, -1,
939 71, -1, 65, 18, -1, -1, -1, 57, 18, -1,
940 -1, 152, 57, 18, -1, 37, 30, -1, -1, 184,
941 -1, -1, 152, 187, 186, -1, 184, -1, 57, 18,
942 -1, 190, -1, 3, -1, 192, -1, 3, -1, 192,
943 -1, 4, -1, 5, -1, 6, -1, 7, -1, 8,
944 -1, 9, -1, 10, -1, 11, -1, 12, -1, 13,
945 -1, 14, -1, 15, -1, 16, -1, 222, -1, 191,
946 -1, 153, 18, -1, 189, 154, 194, 155, -1, 156,
947 18, 157, 192, 158, -1, 159, 18, 157, 192, 160,
948 -1, 161, 193, 162, -1, 161, 162, -1, 192, 163,
949 -1, 192, -1, 193, 152, 192, -1, 193, -1, 193,
950 152, 40, -1, 40, -1, -1, 190, 156, 197, 158,
951 -1, 190, 156, 158, -1, 190, 164, 30, -1, 190,
952 159, 197, 160, -1, 190, 161, 197, 162, -1, 190,
953 161, 162, -1, 190, 22, -1, 190, 23, -1, 190,
954 222, -1, 190, 196, -1, 190, 24, -1, 175, 167,
955 -1, 176, 18, -1, 4, 25, -1, 4, 26, -1,
956 178, 21, -1, 174, 154, 195, 39, 190, 155, -1,
957 127, 154, 195, 237, 155, -1, 129, 154, 195, 152,
958 195, 152, 195, 155, -1, 168, 154, 195, 152, 195,
959 155, -1, 169, 154, 195, 152, 195, 155, -1, 170,
960 154, 195, 152, 195, 155, -1, 100, 171, 154, 195,
961 152, 195, 155, -1, 101, 172, 154, 195, 152, 195,
962 155, -1, 173, 154, 195, 152, 195, 155, -1, 135,
963 154, 195, 152, 195, 155, -1, 136, 154, 195, 152,
964 195, 152, 195, 155, -1, 137, 154, 195, 152, 195,
965 152, 195, 155, -1, 197, 152, 195, -1, 195, -1,
966 35, -1, 36, -1, 200, -1, 200, 217, -1, 200,
967 219, -1, 200, 63, 62, 203, -1, 200, 31, -1,
968 202, -1, 50, -1, 58, -1, 202, 179, 27, 188,
969 -1, 202, 219, -1, 202, 63, 62, 203, -1, 202,
970 179, 180, 198, 195, 186, -1, 202, 179, 201, 198,
971 190, 186, -1, 202, 179, 45, 198, 190, 186, -1,
972 202, 179, 47, 198, 190, 186, -1, 202, 51, 205,
973 -1, 202, 59, 151, 206, -1, -1, 30, -1, 56,
974 -1, 55, -1, 53, 151, 204, -1, 54, 151, 18,
975 -1, 52, 151, 30, -1, 72, 151, 30, -1, 156,
976 207, 158, -1, 207, 152, 30, -1, 30, -1, -1,
977 28, -1, 30, -1, 208, -1, -1, 190, 209, -1,
978 211, 152, 210, -1, 210, -1, 211, -1, 211, 152,
979 40, -1, 40, -1, -1, 181, 188, 208, 154, 212,
980 155, 185, 182, -1, 32, -1, 161, -1, 180, 213,
981 214, -1, 33, -1, 162, -1, 215, 225, 216, -1,
982 -1, 45, -1, 47, -1, 34, 218, 213, -1, -1,
983 64, -1, 17, -1, 18, -1, 21, -1, 25, -1,
984 26, -1, 22, -1, 23, -1, 24, -1, 159, 197,
985 160, -1, 196, -1, 62, 220, 30, 152, 30, -1,
986 166, -1, 208, -1, 222, -1, 221, -1, 190, 223,
987 -1, 225, 226, -1, 226, -1, 227, 229, -1, 227,
988 231, -1, -1, 29, -1, 78, -1, 77, -1, 73,
989 224, -1, 73, 3, -1, 74, 15, 223, -1, 74,
990 4, 223, 152, 15, 223, 152, 15, 223, -1, 75,
991 177, 223, 152, 15, 223, 156, 230, 158, -1, 75,
992 177, 223, 152, 15, 223, 156, 158, -1, 179, 76,
993 181, 188, 223, 154, 234, 155, 39, 15, 223, 228,
994 15, 223, -1, 228, -1, 79, -1, 230, 177, 221,
995 152, 15, 223, -1, 177, 221, 152, 15, 223, -1,
996 179, 236, -1, 190, 156, 223, 152, 223, 158, -1,
997 232, 152, 156, 223, 152, 223, 158, -1, 224, -1,
998 233, 152, 224, -1, 233, -1, -1, 61, 60, -1,
999 60, -1, 168, 190, 223, 152, 223, -1, 169, 190,
1000 223, 152, 223, -1, 170, 190, 223, 152, 223, -1,
1001 100, 171, 190, 223, 152, 223, 155, -1, 101, 172,
1002 190, 223, 152, 223, 155, -1, 49, 224, -1, 173,
1003 224, 152, 224, -1, 174, 224, 39, 190, -1, 129,
1004 224, 152, 224, 152, 224, -1, 134, 224, 152, 190,
1005 -1, 135, 224, 152, 224, -1, 136, 224, 152, 224,
1006 152, 224, -1, 137, 224, 152, 224, 152, 224, -1,
1007 128, 232, -1, 235, 181, 188, 223, 154, 234, 155,
1008 -1, 239, -1, 152, 233, -1, -1, 38, -1, -1,
1009 122, 190, 183, -1, 122, 190, 152, 10, 223, 183,
1010 -1, 123, 190, 183, -1, 123, 190, 152, 10, 223,
1011 183, -1, 124, 224, -1, 238, 125, 190, 223, -1,
1012 238, 126, 224, 152, 190, 223, -1, 127, 190, 223,
1016 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1017 static const unsigned short int yyrline[] =
1019 0, 332, 332, 332, 333, 333, 337, 337, 337, 337,
1020 337, 337, 337, 338, 338, 338, 338, 339, 339, 339,
1021 340, 340, 340, 340, 340, 340, 341, 341, 341, 341,
1022 341, 341, 341, 341, 341, 341, 342, 342, 342, 342,
1023 342, 342, 342, 342, 342, 342, 343, 343, 343, 343,
1024 343, 343, 344, 344, 344, 344, 345, 345, 345, 345,
1025 345, 345, 345, 346, 346, 346, 346, 346, 346, 351,
1026 351, 351, 351, 352, 352, 352, 352, 353, 353, 354,
1027 354, 357, 360, 365, 365, 365, 365, 365, 365, 366,
1028 367, 370, 370, 370, 370, 370, 371, 372, 377, 382,
1029 383, 386, 387, 395, 401, 402, 405, 406, 415, 416,
1030 429, 429, 430, 430, 431, 435, 435, 435, 435, 435,
1031 435, 435, 436, 436, 436, 436, 436, 438, 442, 446,
1032 449, 454, 460, 468, 476, 482, 486, 497, 500, 508,
1033 509, 514, 517, 527, 533, 538, 544, 550, 556, 561,
1034 567, 573, 579, 585, 591, 597, 603, 609, 615, 623,
1035 637, 649, 654, 660, 665, 673, 678, 683, 691, 696,
1036 701, 711, 716, 721, 721, 731, 736, 739, 744, 748,
1037 752, 754, 754, 757, 769, 774, 779, 786, 793, 800,
1038 807, 812, 817, 822, 824, 824, 827, 832, 839, 844,
1039 851, 858, 863, 864, 872, 872, 873, 873, 875, 882,
1040 886, 890, 893, 898, 901, 903, 923, 924, 926, 935,
1041 936, 938, 946, 947, 948, 952, 965, 966, 969, 969,
1042 969, 969, 969, 969, 969, 970, 971, 976, 977, 986,
1043 986, 990, 996, 1007, 1013, 1016, 1024, 1028, 1033, 1036,
1044 1042, 1042, 1044, 1049, 1054, 1059, 1067, 1074, 1080, 1100,
1045 1105, 1111, 1116, 1124, 1133, 1140, 1148, 1152, 1159, 1160,
1046 1164, 1169, 1172, 1178, 1183, 1191, 1196, 1201, 1206, 1214,
1047 1228, 1233, 1238, 1243, 1248, 1253, 1258, 1275, 1280, 1281,
1048 1285, 1286, 1289, 1296, 1303, 1310, 1317, 1322, 1329, 1336
1052 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1053 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1054 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1055 static const char *const yytname[] =
1057 "$end", "error", "$undefined", "VOID", "BOOL", "SBYTE", "UBYTE",
1058 "SHORT", "USHORT", "INT", "UINT", "LONG", "ULONG", "FLOAT", "DOUBLE",
1059 "LABEL", "OPAQUE", "ESINT64VAL", "EUINT64VAL", "SINTVAL", "UINTVAL",
1060 "FPVAL", "NULL_TOK", "UNDEF", "ZEROINITIALIZER", "TRUETOK", "FALSETOK",
1061 "TYPE", "VAR_ID", "LABELSTR", "STRINGCONSTANT", "IMPLEMENTATION",
1062 "BEGINTOK", "ENDTOK", "DECLARE", "GLOBAL", "CONSTANT", "SECTION",
1063 "VOLATILE", "TO", "DOTDOTDOT", "CONST", "INTERNAL", "LINKONCE", "WEAK",
1064 "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "APPENDING", "NOT", "EXTERNAL",
1065 "TARGET", "TRIPLE", "ENDIAN", "POINTERSIZE", "LITTLE", "BIG", "ALIGN",
1066 "UNINITIALIZED", "DEPLIBS", "CALL", "TAIL", "ASM_TOK", "MODULE",
1067 "SIDEEFFECT", "CC_TOK", "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK",
1068 "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT",
1069 "RET", "BR", "SWITCH", "INVOKE", "EXCEPT", "UNWIND", "UNREACHABLE",
1070 "ADD", "SUB", "MUL", "DIV", "UDIV", "SDIV", "FDIV", "REM", "UREM",
1071 "SREM", "FREM", "AND", "OR", "XOR", "SETLE", "SETGE", "SETLT", "SETGT",
1072 "SETEQ", "SETNE", "ICMP", "FCMP", "EQ", "NE", "SLT", "SGT", "SLE", "SGE",
1073 "OEQ", "ONE", "OLT", "OGT", "OLE", "OGE", "ORD", "UNO", "UEQ", "UNE",
1074 "ULT", "UGT", "ULE", "UGE", "MALLOC", "ALLOCA", "FREE", "LOAD", "STORE",
1075 "GETELEMENTPTR", "PHI_TOK", "SELECT", "SHL", "SHR", "ASHR", "LSHR",
1076 "VAARG", "EXTRACTELEMENT", "INSERTELEMENT", "SHUFFLEVECTOR", "CAST",
1077 "TRUNC", "ZEXT", "SEXT", "FPTRUNC", "FPEXT", "FPTOUI", "FPTOSI",
1078 "UITOFP", "SITOFP", "PTRTOINT", "INTTOPTR", "BITCAST", "'='", "','",
1079 "'\\\\'", "'('", "')'", "'['", "'x'", "']'", "'<'", "'>'", "'{'", "'}'",
1080 "'*'", "'c'", "$accept", "IntVal", "EInt64Val", "ArithmeticOps",
1081 "LogicalOps", "SetCondOps", "IPredicates", "FPredicates", "ShiftOps",
1082 "CastOps", "SIntType", "UIntType", "IntType", "FPType", "OptAssign",
1083 "OptLinkage", "OptCallingConv", "OptAlign", "OptCAlign", "SectionString",
1084 "OptSection", "GlobalVarAttributes", "GlobalVarAttribute", "TypesV",
1085 "UpRTypesV", "Types", "PrimType", "UpRTypes", "TypeListI",
1086 "ArgTypeListI", "ConstVal", "ConstExpr", "ConstVector", "GlobalType",
1087 "Module", "DefinitionList", "External", "ConstPool", "AsmBlock",
1088 "BigOrLittle", "TargetDefinition", "LibrariesDefinition", "LibList",
1089 "Name", "OptName", "ArgVal", "ArgListH", "ArgList", "FunctionHeaderH",
1090 "BEGIN", "FunctionHeader", "END", "Function", "FnDeclareLinkage",
1091 "FunctionProto", "OptSideEffect", "ConstValueRef", "SymbolicValueRef",
1092 "ValueRef", "ResolvedVal", "BasicBlockList", "BasicBlock",
1093 "InstructionList", "Unwind", "BBTerminatorInst", "JumpTable", "Inst",
1094 "PHIList", "ValueRefList", "ValueRefListE", "OptTailCall", "InstVal",
1095 "IndexList", "OptVolatile", "MemoryInst", 0
1100 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1102 static const unsigned short int yytoknum[] =
1104 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1105 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1106 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1107 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1108 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1109 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1110 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1111 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1112 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1113 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1114 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1115 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1116 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
1117 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
1118 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
1119 405, 61, 44, 92, 40, 41, 91, 120, 93, 60,
1120 62, 123, 125, 42, 99
1124 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1125 static const unsigned char yyr1[] =
1127 0, 165, 166, 166, 167, 167, 168, 168, 168, 168,
1128 168, 168, 168, 168, 168, 168, 168, 169, 169, 169,
1129 170, 170, 170, 170, 170, 170, 171, 171, 171, 171,
1130 171, 171, 171, 171, 171, 171, 172, 172, 172, 172,
1131 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
1132 172, 172, 173, 173, 173, 173, 174, 174, 174, 174,
1133 174, 174, 174, 174, 174, 174, 174, 174, 174, 175,
1134 175, 175, 175, 176, 176, 176, 176, 177, 177, 178,
1135 178, 179, 179, 180, 180, 180, 180, 180, 180, 180,
1136 180, 181, 181, 181, 181, 181, 181, 181, 181, 182,
1137 182, 183, 183, 184, 185, 185, 186, 186, 187, 187,
1138 188, 188, 189, 189, 190, 191, 191, 191, 191, 191,
1139 191, 191, 191, 191, 191, 191, 191, 192, 192, 192,
1140 192, 192, 192, 192, 192, 192, 192, 193, 193, 194,
1141 194, 194, 194, 195, 195, 195, 195, 195, 195, 195,
1142 195, 195, 195, 195, 195, 195, 195, 195, 195, 196,
1143 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
1144 196, 197, 197, 198, 198, 199, 200, 200, 200, 200,
1145 200, 201, 201, 202, 202, 202, 202, 202, 202, 202,
1146 202, 202, 202, 203, 204, 204, 205, 205, 205, 205,
1147 206, 207, 207, 207, 208, 208, 209, 209, 210, 211,
1148 211, 212, 212, 212, 212, 213, 214, 214, 215, 216,
1149 216, 217, 218, 218, 218, 219, 220, 220, 221, 221,
1150 221, 221, 221, 221, 221, 221, 221, 221, 221, 222,
1151 222, 223, 223, 224, 225, 225, 226, 227, 227, 227,
1152 228, 228, 229, 229, 229, 229, 229, 229, 229, 229,
1153 229, 230, 230, 231, 232, 232, 233, 233, 234, 234,
1154 235, 235, 236, 236, 236, 236, 236, 236, 236, 236,
1155 236, 236, 236, 236, 236, 236, 236, 236, 237, 237,
1156 238, 238, 239, 239, 239, 239, 239, 239, 239, 239
1159 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1160 static const unsigned char yyr2[] =
1162 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
1163 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1164 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1165 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1166 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1167 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1168 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1169 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1170 1, 2, 0, 1, 1, 1, 1, 1, 1, 1,
1171 0, 1, 1, 1, 1, 1, 1, 2, 0, 0,
1172 2, 0, 3, 2, 0, 1, 0, 3, 1, 2,
1173 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1174 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1175 2, 4, 5, 5, 3, 2, 2, 1, 3, 1,
1176 3, 1, 0, 4, 3, 3, 4, 4, 3, 2,
1177 2, 2, 2, 2, 2, 2, 2, 2, 2, 6,
1178 5, 8, 6, 6, 6, 7, 7, 6, 6, 8,
1179 8, 3, 1, 1, 1, 1, 2, 2, 4, 2,
1180 1, 1, 1, 4, 2, 4, 6, 6, 6, 6,
1181 3, 4, 0, 1, 1, 1, 3, 3, 3, 3,
1182 3, 3, 1, 0, 1, 1, 1, 0, 2, 3,
1183 1, 1, 3, 1, 0, 8, 1, 1, 3, 1,
1184 1, 3, 0, 1, 1, 3, 0, 1, 1, 1,
1185 1, 1, 1, 1, 1, 1, 3, 1, 5, 1,
1186 1, 1, 1, 2, 2, 1, 2, 2, 0, 1,
1187 1, 1, 2, 2, 3, 9, 9, 8, 14, 1,
1188 1, 6, 5, 2, 6, 7, 1, 3, 1, 0,
1189 2, 1, 5, 5, 5, 7, 7, 2, 4, 4,
1190 6, 4, 4, 6, 6, 2, 7, 1, 2, 0,
1191 1, 0, 3, 6, 3, 6, 2, 4, 6, 4
1194 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1195 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1196 means the default is an error. */
1197 static const unsigned short int yydefact[] =
1199 192, 0, 90, 180, 1, 179, 222, 83, 84, 85,
1200 87, 88, 89, 86, 0, 98, 248, 176, 177, 204,
1201 205, 0, 0, 0, 90, 0, 184, 223, 224, 98,
1202 0, 0, 91, 92, 93, 94, 95, 96, 0, 0,
1203 249, 248, 245, 82, 0, 0, 0, 0, 190, 0,
1204 0, 0, 0, 0, 181, 182, 0, 0, 81, 225,
1205 193, 178, 97, 111, 115, 116, 117, 118, 119, 120,
1206 121, 122, 123, 124, 125, 126, 127, 2, 3, 0,
1207 0, 0, 0, 239, 0, 0, 110, 129, 114, 240,
1208 128, 216, 217, 218, 219, 220, 221, 244, 0, 0,
1209 0, 251, 250, 260, 291, 259, 246, 247, 0, 0,
1210 0, 0, 203, 191, 185, 183, 173, 174, 0, 0,
1211 0, 0, 130, 0, 0, 113, 135, 137, 0, 0,
1212 142, 136, 253, 0, 252, 0, 0, 72, 76, 71,
1213 75, 70, 74, 69, 73, 77, 78, 0, 290, 0,
1214 271, 0, 98, 6, 7, 8, 9, 10, 11, 12,
1215 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1216 23, 24, 25, 0, 0, 0, 0, 0, 0, 0,
1217 0, 52, 53, 54, 55, 0, 0, 0, 0, 68,
1218 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
1219 66, 67, 0, 0, 0, 0, 0, 98, 263, 0,
1220 287, 198, 195, 194, 196, 197, 199, 202, 0, 106,
1221 106, 115, 116, 117, 118, 119, 120, 121, 122, 123,
1222 124, 125, 0, 0, 0, 0, 106, 106, 0, 0,
1223 0, 134, 214, 141, 139, 0, 228, 229, 230, 233,
1224 234, 235, 231, 232, 226, 0, 0, 0, 0, 0,
1225 0, 0, 0, 0, 0, 0, 0, 0, 237, 242,
1226 241, 243, 0, 254, 0, 277, 270, 0, 26, 27,
1227 28, 29, 30, 31, 32, 33, 34, 35, 0, 50,
1228 51, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1229 45, 46, 47, 48, 49, 0, 101, 101, 296, 0,
1230 0, 285, 0, 0, 0, 0, 0, 0, 0, 0,
1231 0, 0, 0, 0, 0, 0, 200, 0, 188, 189,
1232 156, 157, 4, 5, 154, 155, 158, 149, 150, 153,
1233 0, 0, 0, 0, 152, 151, 186, 187, 112, 112,
1234 138, 213, 207, 210, 211, 0, 0, 131, 227, 0,
1235 0, 0, 0, 0, 0, 0, 0, 172, 0, 0,
1236 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1237 292, 0, 294, 289, 0, 0, 0, 0, 0, 0,
1238 0, 0, 0, 0, 0, 0, 0, 0, 0, 201,
1239 0, 0, 108, 106, 144, 0, 0, 148, 0, 145,
1240 132, 133, 206, 208, 0, 104, 140, 0, 0, 0,
1241 289, 0, 0, 0, 0, 0, 236, 0, 0, 0,
1242 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1243 0, 299, 0, 0, 0, 281, 282, 0, 0, 0,
1244 0, 0, 278, 279, 0, 297, 0, 103, 109, 107,
1245 143, 146, 147, 212, 209, 105, 99, 0, 0, 0,
1246 0, 0, 0, 0, 0, 171, 0, 0, 0, 0,
1247 0, 0, 0, 269, 0, 0, 101, 102, 101, 266,
1248 288, 0, 0, 0, 0, 0, 272, 273, 274, 269,
1249 0, 0, 215, 238, 0, 0, 160, 0, 0, 0,
1250 0, 0, 0, 0, 0, 0, 0, 0, 268, 0,
1251 0, 0, 0, 293, 295, 0, 0, 0, 280, 283,
1252 284, 0, 298, 100, 0, 0, 0, 168, 0, 0,
1253 162, 163, 164, 167, 159, 0, 257, 0, 0, 0,
1254 275, 276, 267, 264, 0, 286, 165, 166, 0, 0,
1255 0, 255, 0, 256, 0, 0, 265, 161, 169, 170,
1256 0, 0, 0, 0, 0, 0, 262, 0, 0, 261,
1260 /* YYDEFGOTO[NTERM-NUM]. */
1261 static const short int yydefgoto[] =
1263 -1, 83, 334, 263, 264, 265, 288, 305, 266, 267,
1264 232, 233, 147, 234, 24, 15, 38, 502, 380, 402,
1265 466, 328, 403, 84, 85, 235, 87, 88, 128, 245,
1266 367, 268, 368, 118, 1, 2, 57, 3, 61, 214,
1267 48, 113, 218, 89, 413, 353, 354, 355, 39, 93,
1268 16, 96, 17, 29, 18, 359, 269, 90, 271, 489,
1269 41, 42, 43, 105, 106, 548, 107, 311, 518, 519,
1270 207, 208, 441, 209, 210
1273 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1275 #define YYPACT_NINF -501
1276 static const short int yypact[] =
1278 -501, 82, 9, 975, -501, -501, 72, -501, -501, -501,
1279 -501, -501, -501, -501, 29, 34, 94, -501, -501, -501,
1280 -501, -28, -42, 66, 127, 25, -501, -501, -501, 34,
1281 122, 199, -501, -501, -501, -501, -501, -501, 839, -17,
1282 -501, -19, -501, 47, 67, 68, 69, 75, -501, 71,
1283 122, 839, 11, 11, -501, -501, 11, 11, -501, -501,
1284 -501, -501, -501, 76, -501, -501, -501, -501, -501, -501,
1285 -501, -501, -501, -501, -501, -501, -501, -501, -501, 207,
1286 210, 211, 518, -501, 123, 77, -501, -501, -84, -501,
1287 -501, -501, -501, -501, -501, -501, -501, -501, 876, 8,
1288 253, -501, -501, -501, 1333, -501, -501, -501, 203, 80,
1289 217, 206, 208, -501, -501, -501, -501, -501, 922, 922,
1290 960, 922, -501, 83, 84, -501, -501, -84, -134, 88,
1291 604, -501, 76, 1131, -501, 1131, 1131, -501, -501, -501,
1292 -501, -501, -501, -501, -501, -501, -501, 1131, -501, 922,
1293 -501, 177, 34, -501, -501, -501, -501, -501, -501, -501,
1294 -501, -501, -501, -501, -501, -501, -501, -501, -501, -501,
1295 -501, -501, -501, 103, 81, 922, 922, 922, 922, 922,
1296 922, -501, -501, -501, -501, 922, 922, 922, 922, -501,
1297 -501, -501, -501, -501, -501, -501, -501, -501, -501, -501,
1298 -501, -501, 922, 922, 922, 922, 922, 34, -501, 20,
1299 -501, -501, -501, -501, -501, -501, -501, -501, -44, 91,
1300 91, 130, 143, 226, 145, 227, 161, 230, 163, 231,
1301 232, 233, 165, 234, 245, 1042, 91, 91, 922, 922,
1302 922, -501, 679, -501, 99, 113, -501, -501, -501, -501,
1303 -501, -501, -501, -501, 205, 103, 81, 119, 120, 125,
1304 128, 129, 960, 133, 134, 135, 139, 140, -501, -501,
1305 -501, -501, 124, -501, 149, -501, -501, 839, -501, -501,
1306 -501, -501, -501, -501, -501, -501, -501, -501, 922, -501,
1307 -501, -501, -501, -501, -501, -501, -501, -501, -501, -501,
1308 -501, -501, -501, -501, -501, 922, 150, 151, -501, 1131,
1309 136, 153, 154, 155, 156, 157, 158, 1131, 1131, 1131,
1310 159, 241, 839, 922, 922, 251, -501, -18, -501, -501,
1311 -501, -501, -501, -501, -501, -501, -501, -501, -501, -501,
1312 717, 960, 549, 265, -501, -501, -501, -501, -69, -50,
1313 -84, -501, 123, -501, 160, 142, 763, -501, -501, 283,
1314 164, 166, 960, 960, 960, 960, 960, -501, -110, 960,
1315 960, 960, 960, 960, 302, 304, 1131, 1131, 1131, 1,
1316 -501, 12, -501, 169, 1131, 167, 922, 922, 922, 922,
1317 922, 172, 173, 176, 922, 922, 1131, 1131, 178, -501,
1318 299, 314, -501, 91, -501, -40, -68, -501, -74, -501,
1319 -501, -501, -501, -501, 801, 301, -501, 184, 960, 960,
1320 169, 187, 188, 189, 190, 960, -501, 194, 195, 201,
1321 209, 316, 1131, 1131, 204, 212, 213, 1131, 341, 1131,
1322 922, -501, 214, 1131, 215, -501, -501, 216, 220, 1131,
1323 1131, 1131, -501, -501, 219, -501, 922, -501, -501, -501,
1324 -501, -501, -501, -501, -501, -501, 303, 332, 222, 228,
1325 229, 960, 960, 960, 960, -501, 960, 960, 960, 960,
1326 922, 238, 235, 922, 1131, 1131, 240, -501, 240, -501,
1327 243, 1131, 244, 922, 922, 922, -501, -501, -501, 922,
1328 1131, 345, -501, -501, 960, 960, -501, 246, 242, 247,
1329 248, 252, 254, 255, 256, 257, 354, 26, 243, 258,
1330 259, 260, 325, -501, -501, 922, 225, 1131, -501, -501,
1331 -501, 261, -501, -501, 262, 269, 960, -501, 960, 960,
1332 -501, -501, -501, -501, -501, 1131, -501, 1220, 56, 347,
1333 -501, -501, -501, -501, 250, -501, -501, -501, 270, 271,
1334 272, -501, 249, -501, 1220, 378, -501, -501, -501, -501,
1335 391, 276, 1131, 1131, 415, 138, -501, 1131, 416, -501,
1339 /* YYPGOTO[NTERM-NUM]. */
1340 static const short int yypgoto[] =
1342 -501, -501, -501, 328, 329, 330, 181, 185, 333, 336,
1343 -98, -97, -500, -501, 400, 420, -136, -501, -300, 31,
1344 -501, -216, -501, -45, -501, -38, -501, -81, 317, -501,
1345 126, 218, -208, 74, -501, -501, -501, -501, 398, -501,
1346 -501, -501, -501, 2, -501, 35, -501, -501, 423, -501,
1347 -501, -501, -501, -501, 451, -501, -471, -106, -62, -90,
1348 -501, 417, -501, -116, -501, -501, -501, -501, 22, -39,
1349 -501, -501, 43, -501, -501
1352 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1353 positive, shift that token. If negative, reduce the rule which
1354 number is the opposite. If zero, do what YYDEFACT says.
1355 If YYTABLE_NINF, syntax error. */
1356 #define YYTABLE_NINF -176
1357 static const short int yytable[] =
1359 86, 127, 145, 146, 329, 25, 115, 382, 134, -175,
1360 40, 437, 135, 86, 94, 91, 277, 547, 240, 400,
1361 346, 347, 439, 136, 44, 45, 46, 270, 241, 270,
1362 270, 137, 138, 139, 140, 141, 142, 143, 144, 401,
1363 5, 270, 425, 6, 47, 25, 116, 117, 564, 127,
1364 426, 7, 8, 9, 10, 11, 12, 13, 438, 275,
1365 133, 137, 138, 139, 140, 141, 142, 143, 144, 438,
1366 -112, 322, 14, 272, 273, 19, 562, 20, 425, 131,
1367 219, 220, 4, 237, 425, 274, 129, 308, 462, 410,
1368 312, 30, 461, 571, 131, 313, 314, 315, 316, 31,
1369 32, 33, 34, 35, 36, 37, 289, 290, 325, 49,
1370 411, 133, 425, 131, 326, 320, 321, 27, 460, 28,
1371 98, 99, 100, 40, 101, 102, 103, 119, 50, 345,
1372 120, 121, 405, 406, 408, 212, 213, 306, 307, 133,
1373 309, 310, 133, 95, 92, 323, 324, 133, 133, 133,
1374 133, 19, 60, 20, 51, 330, 331, 348, 349, 350,
1375 -72, -72, -71, -71, 317, 318, 319, 133, 133, 7,
1376 8, 9, 52, 11, 53, 13, 58, 54, -70, -70,
1377 -69, -69, 332, 333, 546, 55, 523, 459, 524, 291,
1378 292, 293, 294, 295, 296, 297, 298, 299, 300, 301,
1379 302, 303, 304, 270, 352, 278, 279, 280, 281, 282,
1380 283, 270, 270, 270, 563, 101, 102, 62, 108, 109,
1381 110, 284, 285, 286, 287, 122, 111, 112, 123, 124,
1382 -113, 130, 376, 211, 398, 215, 216, 276, 217, 86,
1383 238, 239, 242, 327, -76, -75, 236, 383, -74, -73,
1384 377, 356, 335, -79, -80, 391, 392, 393, 137, 138,
1385 139, 140, 141, 142, 143, 144, 336, 378, 357, 358,
1386 270, 270, 270, 362, 363, 350, 374, 396, 270, 364,
1387 395, 399, 365, 366, 86, 397, 133, 369, 370, 371,
1388 270, 270, 384, 372, 373, 409, 444, 415, 446, 447,
1389 448, 375, 379, 381, 452, 385, 386, 387, 388, 389,
1390 390, 394, 414, 417, 434, 435, 436, 432, 418, 433,
1391 419, 440, 442, 443, 449, 450, 270, 270, 451, 457,
1392 456, 270, 458, 270, 454, 455, 467, 270, 400, 471,
1393 472, 473, 474, 270, 270, 270, 476, 477, 133, 445,
1394 133, 133, 133, 478, 412, 480, 133, 453, 483, 487,
1395 501, 479, 503, 533, 484, 485, 491, 493, 494, 545,
1396 481, 482, 495, 499, 504, 486, 352, 488, 270, 270,
1397 505, 492, 438, 553, 506, 270, 565, 496, 497, 498,
1398 516, 517, 522, 572, 270, 525, 527, 537, 536, 538,
1399 539, 570, 133, 528, 529, 530, 573, 540, 566, 541,
1400 542, 543, 544, 549, 550, 551, 555, 556, 500, 145,
1401 146, 270, 520, 521, 557, 567, 568, 569, 574, 526,
1402 577, 580, 202, 203, 204, 552, 360, 205, 532, 270,
1403 206, 361, 515, 104, 56, 133, 465, 244, 114, 464,
1404 145, 146, 59, 344, 26, 133, 133, 133, 97, 578,
1405 531, 133, 490, 470, 0, 554, 270, 270, 0, 0,
1406 0, 270, 0, 0, 270, 0, 0, 0, 0, 0,
1407 0, 0, 0, 561, 0, 0, 0, 133, 420, 421,
1408 422, 423, 424, 0, 0, 427, 428, 429, 430, 431,
1409 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1410 575, 576, 0, 0, 0, 579, 0, 0, 581, 0,
1411 0, 125, 64, 65, 66, 67, 68, 69, 70, 71,
1412 72, 73, 74, 75, 76, 0, 0, 77, 78, 0,
1413 0, 0, 0, 0, 468, 469, 19, 0, 20, 0,
1414 0, 475, 125, 221, 222, 223, 224, 225, 226, 227,
1415 228, 229, 230, 231, 75, 76, 0, 0, 77, 78,
1416 0, 0, 0, 0, 0, 0, 0, 19, 0, 20,
1417 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1418 0, 0, 0, 0, 0, 0, 0, 507, 508, 509,
1419 510, 0, 511, 512, 513, 514, 0, 125, 64, 65,
1420 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
1421 76, 0, 0, 77, 78, 0, 0, 0, 0, 0,
1422 534, 535, 19, 0, 20, 0, 0, 0, 0, 0,
1423 0, 0, 0, 0, 243, 0, 0, 0, 0, 0,
1424 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1425 0, 0, 558, 0, 559, 560, 0, 0, 0, 0,
1426 0, 79, 0, 0, 80, 0, 0, 81, 0, 82,
1427 126, 0, 125, 64, 65, 66, 67, 68, 69, 70,
1428 71, 72, 73, 74, 75, 76, 0, 0, 77, 78,
1429 0, 0, 79, 0, 0, 80, 0, 19, 81, 20,
1430 82, 407, 0, 0, 0, 0, 0, 0, 0, 351,
1431 125, 221, 222, 223, 224, 225, 226, 227, 228, 229,
1432 230, 231, 75, 76, 0, 0, 77, 78, 0, 0,
1433 0, 0, 0, 0, 0, 19, 0, 20, 0, 0,
1434 0, 0, 0, 0, 0, 0, 0, 79, 0, 0,
1435 80, 0, 0, 81, 0, 82, 125, 64, 65, 66,
1436 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
1437 0, 0, 77, 78, 0, 0, 0, 0, 0, 0,
1438 0, 19, 0, 20, 0, 0, 0, 0, 0, 0,
1439 0, 0, 0, 416, 125, 64, 65, 66, 67, 68,
1440 69, 70, 71, 72, 73, 74, 75, 76, 0, 0,
1441 77, 78, 0, 0, 0, 0, 0, 0, 0, 19,
1442 0, 20, 79, 0, 0, 80, 0, 0, 81, 0,
1443 82, 463, 63, 64, 65, 66, 67, 68, 69, 70,
1444 71, 72, 73, 74, 75, 76, 0, 0, 77, 78,
1445 0, 0, 0, 0, 0, 0, 0, 19, 0, 20,
1446 79, 0, 0, 80, 0, 404, 81, 0, 82, 132,
1447 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
1448 74, 75, 76, 0, 0, 77, 78, 0, 0, 0,
1449 0, 0, 0, 0, 19, 0, 20, 0, 0, 0,
1450 0, 0, 0, 0, 0, 0, 79, 0, 0, 80,
1451 0, 0, 81, 0, 82, 125, 64, 65, 66, 67,
1452 68, 69, 70, 71, 72, 73, 74, 75, 76, 0,
1453 0, 77, 78, 0, 0, 0, 0, 0, 0, 0,
1454 19, 0, 20, 0, 79, 0, 0, 80, 0, 0,
1455 81, 0, 82, 125, 221, 222, 223, 224, 225, 226,
1456 227, 228, 229, 230, 231, 75, 76, 0, 0, 77,
1457 78, 0, 0, 0, 0, 0, 0, 0, 19, 0,
1458 20, 0, 79, 0, 0, 80, 0, 0, 81, 0,
1459 82, 0, -82, 19, 0, 20, 0, 0, 0, 6,
1460 -82, -82, 0, 0, 0, 0, 0, -82, -82, -82,
1461 -82, -82, -82, -82, 0, -82, 21, 0, 0, 79,
1462 0, 0, 80, -82, 22, 81, 0, 82, 23, 0,
1463 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1464 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1465 0, 77, 78, 0, 337, 338, 339, 0, 0, 0,
1466 19, 0, 20, 0, 0, 79, 0, 0, 80, 0,
1467 0, 81, 0, 82, 0, 0, 0, 0, 0, 0,
1468 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1469 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1470 0, 0, 0, 79, 0, 0, 80, 0, 0, 81,
1471 0, 82, 153, 154, 155, 156, 157, 158, 159, 160,
1472 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
1473 171, 172, 255, 256, 0, 0, 0, 0, 246, 247,
1474 77, 78, 248, 249, 250, 251, 252, 253, 0, 19,
1475 0, 20, 0, 0, 0, 0, 0, 0, 0, 257,
1476 0, 258, 181, 182, 183, 184, 0, 259, 260, 261,
1477 189, 190, 191, 192, 193, 194, 195, 196, 197, 198,
1478 199, 200, 201, 254, 0, 0, 0, 0, 340, 0,
1479 0, 341, 0, 342, 0, 0, 343, 0, 0, 0,
1480 0, 153, 154, 155, 156, 157, 158, 159, 160, 161,
1481 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
1482 172, 255, 256, 0, 0, 0, 0, 246, 247, 0,
1483 0, 248, 249, 250, 251, 252, 253, 0, 0, 0,
1484 0, 0, 0, 0, 0, 0, 0, 0, 257, 0,
1485 258, 181, 182, 183, 184, 0, 259, 260, 261, 189,
1486 190, 191, 192, 193, 194, 195, 196, 197, 198, 199,
1487 200, 201, 254, 0, 0, 0, 0, 0, 0, 0,
1488 262, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1489 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
1490 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
1491 255, 256, 0, 0, 0, 0, 0, 0, 0, 0,
1492 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1493 0, 0, 0, 0, 0, 0, 0, 257, 0, 258,
1494 181, 182, 183, 184, 0, 259, 260, 261, 189, 190,
1495 191, 192, 193, 194, 195, 196, 197, 198, 199, 200,
1496 201, 148, 0, 0, 0, 0, 0, 0, 0, 262,
1497 0, 0, 149, 0, 0, 0, 0, 0, 0, 0,
1498 0, 0, 0, 150, 151, 0, 0, 0, 0, 0,
1499 0, 0, 0, 0, 0, 0, 0, 0, 0, 152,
1500 0, 0, 0, 153, 154, 155, 156, 157, 158, 159,
1501 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
1502 170, 171, 172, 173, 174, 0, 0, 0, 0, 0,
1503 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1504 0, 0, 0, 0, 0, 175, 176, 177, 0, 0,
1505 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
1506 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
1510 static const short int yycheck[] =
1512 38, 82, 100, 100, 220, 3, 51, 307, 98, 0,
1513 29, 10, 4, 51, 33, 32, 152, 517, 152, 37,
1514 236, 237, 10, 15, 52, 53, 54, 133, 162, 135,
1515 136, 5, 6, 7, 8, 9, 10, 11, 12, 57,
1516 31, 147, 152, 34, 72, 43, 35, 36, 548, 130,
1517 160, 42, 43, 44, 45, 46, 47, 48, 57, 149,
1518 98, 5, 6, 7, 8, 9, 10, 11, 12, 57,
1519 154, 207, 63, 135, 136, 28, 547, 30, 152, 163,
1520 118, 119, 0, 121, 152, 147, 84, 177, 162, 158,
1521 180, 62, 160, 564, 163, 185, 186, 187, 188, 65,
1522 66, 67, 68, 69, 70, 71, 25, 26, 152, 151,
1523 160, 149, 152, 163, 158, 205, 206, 45, 158, 47,
1524 73, 74, 75, 29, 77, 78, 79, 53, 62, 235,
1525 56, 57, 340, 341, 342, 55, 56, 175, 176, 177,
1526 178, 179, 180, 162, 161, 125, 126, 185, 186, 187,
1527 188, 28, 30, 30, 27, 25, 26, 238, 239, 240,
1528 17, 18, 17, 18, 202, 203, 204, 205, 206, 42,
1529 43, 44, 45, 46, 47, 48, 151, 50, 17, 18,
1530 17, 18, 17, 18, 158, 58, 486, 403, 488, 108,
1531 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
1532 119, 120, 121, 309, 242, 102, 103, 104, 105, 106,
1533 107, 317, 318, 319, 158, 77, 78, 18, 151, 151,
1534 151, 118, 119, 120, 121, 18, 151, 156, 18, 18,
1535 154, 154, 277, 30, 324, 18, 30, 60, 30, 277,
1536 157, 157, 154, 152, 18, 18, 120, 309, 18, 18,
1537 288, 152, 18, 21, 21, 317, 318, 319, 5, 6,
1538 7, 8, 9, 10, 11, 12, 21, 305, 155, 64,
1539 376, 377, 378, 154, 154, 356, 152, 322, 384, 154,
1540 39, 30, 154, 154, 322, 323, 324, 154, 154, 154,
1541 396, 397, 156, 154, 154, 30, 386, 155, 388, 389,
1542 390, 152, 152, 152, 394, 152, 152, 152, 152, 152,
1543 152, 152, 152, 30, 376, 377, 378, 15, 154, 15,
1544 154, 152, 384, 156, 152, 152, 432, 433, 152, 30,
1545 152, 437, 18, 439, 396, 397, 152, 443, 37, 152,
1546 152, 152, 152, 449, 450, 451, 152, 152, 386, 387,
1547 388, 389, 390, 152, 352, 39, 394, 395, 154, 18,
1548 57, 152, 30, 18, 152, 152, 152, 152, 152, 15,
1549 432, 433, 152, 154, 152, 437, 414, 439, 484, 485,
1550 152, 443, 57, 158, 155, 491, 39, 449, 450, 451,
1551 152, 156, 152, 15, 500, 152, 152, 155, 152, 152,
1552 152, 152, 440, 493, 494, 495, 15, 155, 158, 155,
1553 155, 155, 155, 155, 155, 155, 155, 155, 456, 517,
1554 517, 527, 484, 485, 155, 155, 155, 155, 152, 491,
1555 15, 15, 104, 104, 104, 525, 255, 104, 500, 545,
1556 104, 256, 480, 43, 24, 483, 415, 130, 50, 414,
1557 548, 548, 29, 235, 3, 493, 494, 495, 41, 575,
1558 499, 499, 440, 420, -1, 527, 572, 573, -1, -1,
1559 -1, 577, -1, -1, 580, -1, -1, -1, -1, -1,
1560 -1, -1, -1, 545, -1, -1, -1, 525, 362, 363,
1561 364, 365, 366, -1, -1, 369, 370, 371, 372, 373,
1562 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1563 572, 573, -1, -1, -1, 577, -1, -1, 580, -1,
1564 -1, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1565 12, 13, 14, 15, 16, -1, -1, 19, 20, -1,
1566 -1, -1, -1, -1, 418, 419, 28, -1, 30, -1,
1567 -1, 425, 3, 4, 5, 6, 7, 8, 9, 10,
1568 11, 12, 13, 14, 15, 16, -1, -1, 19, 20,
1569 -1, -1, -1, -1, -1, -1, -1, 28, -1, 30,
1570 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1571 -1, -1, -1, -1, -1, -1, -1, 471, 472, 473,
1572 474, -1, 476, 477, 478, 479, -1, 3, 4, 5,
1573 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1574 16, -1, -1, 19, 20, -1, -1, -1, -1, -1,
1575 504, 505, 28, -1, 30, -1, -1, -1, -1, -1,
1576 -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
1577 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1578 -1, -1, 536, -1, 538, 539, -1, -1, -1, -1,
1579 -1, 153, -1, -1, 156, -1, -1, 159, -1, 161,
1580 162, -1, 3, 4, 5, 6, 7, 8, 9, 10,
1581 11, 12, 13, 14, 15, 16, -1, -1, 19, 20,
1582 -1, -1, 153, -1, -1, 156, -1, 28, 159, 30,
1583 161, 162, -1, -1, -1, -1, -1, -1, -1, 40,
1584 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1585 13, 14, 15, 16, -1, -1, 19, 20, -1, -1,
1586 -1, -1, -1, -1, -1, 28, -1, 30, -1, -1,
1587 -1, -1, -1, -1, -1, -1, -1, 153, -1, -1,
1588 156, -1, -1, 159, -1, 161, 3, 4, 5, 6,
1589 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1590 -1, -1, 19, 20, -1, -1, -1, -1, -1, -1,
1591 -1, 28, -1, 30, -1, -1, -1, -1, -1, -1,
1592 -1, -1, -1, 40, 3, 4, 5, 6, 7, 8,
1593 9, 10, 11, 12, 13, 14, 15, 16, -1, -1,
1594 19, 20, -1, -1, -1, -1, -1, -1, -1, 28,
1595 -1, 30, 153, -1, -1, 156, -1, -1, 159, -1,
1596 161, 40, 3, 4, 5, 6, 7, 8, 9, 10,
1597 11, 12, 13, 14, 15, 16, -1, -1, 19, 20,
1598 -1, -1, -1, -1, -1, -1, -1, 28, -1, 30,
1599 153, -1, -1, 156, -1, 158, 159, -1, 161, 3,
1600 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1601 14, 15, 16, -1, -1, 19, 20, -1, -1, -1,
1602 -1, -1, -1, -1, 28, -1, 30, -1, -1, -1,
1603 -1, -1, -1, -1, -1, -1, 153, -1, -1, 156,
1604 -1, -1, 159, -1, 161, 3, 4, 5, 6, 7,
1605 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
1606 -1, 19, 20, -1, -1, -1, -1, -1, -1, -1,
1607 28, -1, 30, -1, 153, -1, -1, 156, -1, -1,
1608 159, -1, 161, 3, 4, 5, 6, 7, 8, 9,
1609 10, 11, 12, 13, 14, 15, 16, -1, -1, 19,
1610 20, -1, -1, -1, -1, -1, -1, -1, 28, -1,
1611 30, -1, 153, -1, -1, 156, -1, -1, 159, -1,
1612 161, -1, 27, 28, -1, 30, -1, -1, -1, 34,
1613 35, 36, -1, -1, -1, -1, -1, 42, 43, 44,
1614 45, 46, 47, 48, -1, 50, 51, -1, -1, 153,
1615 -1, -1, 156, 58, 59, 159, -1, 161, 63, -1,
1616 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1617 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1618 -1, 19, 20, -1, 22, 23, 24, -1, -1, -1,
1619 28, -1, 30, -1, -1, 153, -1, -1, 156, -1,
1620 -1, 159, -1, 161, -1, -1, -1, -1, -1, -1,
1621 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1622 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1623 -1, -1, -1, 153, -1, -1, 156, -1, -1, 159,
1624 -1, 161, 80, 81, 82, 83, 84, 85, 86, 87,
1625 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
1626 98, 99, 100, 101, -1, -1, -1, -1, 17, 18,
1627 19, 20, 21, 22, 23, 24, 25, 26, -1, 28,
1628 -1, 30, -1, -1, -1, -1, -1, -1, -1, 127,
1629 -1, 129, 130, 131, 132, 133, -1, 135, 136, 137,
1630 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
1631 148, 149, 150, 62, -1, -1, -1, -1, 156, -1,
1632 -1, 159, -1, 161, -1, -1, 164, -1, -1, -1,
1633 -1, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1634 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
1635 99, 100, 101, -1, -1, -1, -1, 17, 18, -1,
1636 -1, 21, 22, 23, 24, 25, 26, -1, -1, -1,
1637 -1, -1, -1, -1, -1, -1, -1, -1, 127, -1,
1638 129, 130, 131, 132, 133, -1, 135, 136, 137, 138,
1639 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
1640 149, 150, 62, -1, -1, -1, -1, -1, -1, -1,
1641 159, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1642 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
1643 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
1644 100, 101, -1, -1, -1, -1, -1, -1, -1, -1,
1645 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1646 -1, -1, -1, -1, -1, -1, -1, 127, -1, 129,
1647 130, 131, 132, 133, -1, 135, 136, 137, 138, 139,
1648 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
1649 150, 38, -1, -1, -1, -1, -1, -1, -1, 159,
1650 -1, -1, 49, -1, -1, -1, -1, -1, -1, -1,
1651 -1, -1, -1, 60, 61, -1, -1, -1, -1, -1,
1652 -1, -1, -1, -1, -1, -1, -1, -1, -1, 76,
1653 -1, -1, -1, 80, 81, 82, 83, 84, 85, 86,
1654 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
1655 97, 98, 99, 100, 101, -1, -1, -1, -1, -1,
1656 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1657 -1, -1, -1, -1, -1, 122, 123, 124, -1, -1,
1658 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
1659 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
1663 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1664 symbol of state STATE-NUM. */
1665 static const unsigned char yystos[] =
1667 0, 199, 200, 202, 0, 31, 34, 42, 43, 44,
1668 45, 46, 47, 48, 63, 180, 215, 217, 219, 28,
1669 30, 51, 59, 63, 179, 208, 219, 45, 47, 218,
1670 62, 65, 66, 67, 68, 69, 70, 71, 181, 213,
1671 29, 225, 226, 227, 52, 53, 54, 72, 205, 151,
1672 62, 27, 45, 47, 50, 58, 180, 201, 151, 213,
1673 30, 203, 18, 3, 4, 5, 6, 7, 8, 9,
1674 10, 11, 12, 13, 14, 15, 16, 19, 20, 153,
1675 156, 159, 161, 166, 188, 189, 190, 191, 192, 208,
1676 222, 32, 161, 214, 33, 162, 216, 226, 73, 74,
1677 75, 77, 78, 79, 179, 228, 229, 231, 151, 151,
1678 151, 151, 156, 206, 203, 188, 35, 36, 198, 198,
1679 198, 198, 18, 18, 18, 3, 162, 192, 193, 208,
1680 154, 163, 3, 190, 224, 4, 15, 5, 6, 7,
1681 8, 9, 10, 11, 12, 175, 176, 177, 38, 49,
1682 60, 61, 76, 80, 81, 82, 83, 84, 85, 86,
1683 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
1684 97, 98, 99, 100, 101, 122, 123, 124, 127, 128,
1685 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
1686 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
1687 149, 150, 168, 169, 170, 173, 174, 235, 236, 238,
1688 239, 30, 55, 56, 204, 18, 30, 30, 207, 190,
1689 190, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1690 13, 14, 175, 176, 178, 190, 195, 190, 157, 157,
1691 152, 162, 154, 40, 193, 194, 17, 18, 21, 22,
1692 23, 24, 25, 26, 62, 100, 101, 127, 129, 135,
1693 136, 137, 159, 168, 169, 170, 173, 174, 196, 221,
1694 222, 223, 223, 223, 223, 224, 60, 181, 102, 103,
1695 104, 105, 106, 107, 118, 119, 120, 121, 171, 25,
1696 26, 108, 109, 110, 111, 112, 113, 114, 115, 116,
1697 117, 118, 119, 120, 121, 172, 190, 190, 224, 190,
1698 190, 232, 224, 224, 224, 224, 224, 190, 190, 190,
1699 224, 224, 181, 125, 126, 152, 158, 152, 186, 186,
1700 25, 26, 17, 18, 167, 18, 21, 22, 23, 24,
1701 156, 159, 161, 164, 196, 222, 186, 186, 192, 192,
1702 192, 40, 190, 210, 211, 212, 152, 155, 64, 220,
1703 171, 172, 154, 154, 154, 154, 154, 195, 197, 154,
1704 154, 154, 154, 154, 152, 152, 188, 190, 190, 152,
1705 183, 152, 183, 223, 156, 152, 152, 152, 152, 152,
1706 152, 223, 223, 223, 152, 39, 188, 190, 224, 30,
1707 37, 57, 184, 187, 158, 197, 197, 162, 197, 30,
1708 158, 160, 208, 209, 152, 155, 40, 30, 154, 154,
1709 195, 195, 195, 195, 195, 152, 160, 195, 195, 195,
1710 195, 195, 15, 15, 223, 223, 223, 10, 57, 10,
1711 152, 237, 223, 156, 224, 190, 224, 224, 224, 152,
1712 152, 152, 224, 190, 223, 223, 152, 30, 18, 186,
1713 158, 160, 162, 40, 210, 184, 185, 152, 195, 195,
1714 237, 152, 152, 152, 152, 195, 152, 152, 152, 152,
1715 39, 223, 223, 154, 152, 152, 223, 18, 223, 224,
1716 233, 152, 223, 152, 152, 152, 223, 223, 223, 154,
1717 190, 57, 182, 30, 152, 152, 155, 195, 195, 195,
1718 195, 195, 195, 195, 195, 190, 152, 156, 233, 234,
1719 223, 223, 152, 183, 183, 152, 223, 152, 224, 224,
1720 224, 234, 223, 18, 195, 195, 152, 155, 152, 152,
1721 155, 155, 155, 155, 155, 15, 158, 177, 230, 155,
1722 155, 155, 224, 158, 223, 155, 155, 155, 195, 195,
1723 195, 223, 221, 158, 177, 39, 158, 155, 155, 155,
1724 152, 221, 15, 15, 152, 223, 223, 15, 228, 223,
1728 #define yyerrok (yyerrstatus = 0)
1729 #define yyclearin (yychar = YYEMPTY)
1730 #define YYEMPTY (-2)
1733 #define YYACCEPT goto yyacceptlab
1734 #define YYABORT goto yyabortlab
1735 #define YYERROR goto yyerrorlab
1738 /* Like YYERROR except do call yyerror. This remains here temporarily
1739 to ease the transition to the new meaning of YYERROR, for GCC.
1740 Once GCC version 2 has supplanted version 1, this can go. */
1742 #define YYFAIL goto yyerrlab
1744 #define YYRECOVERING() (!!yyerrstatus)
1746 #define YYBACKUP(Token, Value) \
1748 if (yychar == YYEMPTY && yylen == 1) \
1752 yytoken = YYTRANSLATE (yychar); \
1758 yyerror (YY_("syntax error: cannot back up")); \
1765 #define YYERRCODE 256
1768 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1769 If N is 0, then set CURRENT to the empty location which ends
1770 the previous symbol: RHS[0] (always defined). */
1772 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1773 #ifndef YYLLOC_DEFAULT
1774 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1778 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1779 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1780 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1781 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1785 (Current).first_line = (Current).last_line = \
1786 YYRHSLOC (Rhs, 0).last_line; \
1787 (Current).first_column = (Current).last_column = \
1788 YYRHSLOC (Rhs, 0).last_column; \
1794 /* YY_LOCATION_PRINT -- Print the location on the stream.
1795 This macro was not mandated originally: define only if we know
1796 we won't break user code: when these are the locations we know. */
1798 #ifndef YY_LOCATION_PRINT
1799 # if YYLTYPE_IS_TRIVIAL
1800 # define YY_LOCATION_PRINT(File, Loc) \
1801 fprintf (File, "%d.%d-%d.%d", \
1802 (Loc).first_line, (Loc).first_column, \
1803 (Loc).last_line, (Loc).last_column)
1805 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1810 /* YYLEX -- calling `yylex' with the right arguments. */
1813 # define YYLEX yylex (YYLEX_PARAM)
1815 # define YYLEX yylex ()
1818 /* Enable debugging if requested. */
1822 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1823 # define YYFPRINTF fprintf
1826 # define YYDPRINTF(Args) \
1832 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1836 YYFPRINTF (stderr, "%s ", Title); \
1837 yysymprint (stderr, \
1839 YYFPRINTF (stderr, "\n"); \
1843 /*------------------------------------------------------------------.
1844 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1846 `------------------------------------------------------------------*/
1848 #if defined (__STDC__) || defined (__cplusplus)
1850 yy_stack_print (short int *bottom, short int *top)
1853 yy_stack_print (bottom, top)
1858 YYFPRINTF (stderr, "Stack now");
1859 for (/* Nothing. */; bottom <= top; ++bottom)
1860 YYFPRINTF (stderr, " %d", *bottom);
1861 YYFPRINTF (stderr, "\n");
1864 # define YY_STACK_PRINT(Bottom, Top) \
1867 yy_stack_print ((Bottom), (Top)); \
1871 /*------------------------------------------------.
1872 | Report that the YYRULE is going to be reduced. |
1873 `------------------------------------------------*/
1875 #if defined (__STDC__) || defined (__cplusplus)
1877 yy_reduce_print (int yyrule)
1880 yy_reduce_print (yyrule)
1885 unsigned long int yylno = yyrline[yyrule];
1886 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
1888 /* Print the symbols being reduced, and their result. */
1889 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
1890 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1891 YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
1894 # define YY_REDUCE_PRINT(Rule) \
1897 yy_reduce_print (Rule); \
1900 /* Nonzero means print parse trace. It is left uninitialized so that
1901 multiple parsers can coexist. */
1903 #else /* !YYDEBUG */
1904 # define YYDPRINTF(Args)
1905 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1906 # define YY_STACK_PRINT(Bottom, Top)
1907 # define YY_REDUCE_PRINT(Rule)
1908 #endif /* !YYDEBUG */
1911 /* YYINITDEPTH -- initial size of the parser's stacks. */
1913 # define YYINITDEPTH 200
1916 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1917 if the built-in stack extension method is used).
1919 Do not make this value too large; the results are undefined if
1920 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1921 evaluated with infinite-precision integer arithmetic. */
1924 # define YYMAXDEPTH 10000
1932 # if defined (__GLIBC__) && defined (_STRING_H)
1933 # define yystrlen strlen
1935 /* Return the length of YYSTR. */
1937 # if defined (__STDC__) || defined (__cplusplus)
1938 yystrlen (const char *yystr)
1944 const char *yys = yystr;
1946 while (*yys++ != '\0')
1949 return yys - yystr - 1;
1955 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1956 # define yystpcpy stpcpy
1958 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1961 # if defined (__STDC__) || defined (__cplusplus)
1962 yystpcpy (char *yydest, const char *yysrc)
1964 yystpcpy (yydest, yysrc)
1970 const char *yys = yysrc;
1972 while ((*yyd++ = *yys++) != '\0')
1981 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1982 quotes and backslashes, so that it's suitable for yyerror. The
1983 heuristic is that double-quoting is unnecessary unless the string
1984 contains an apostrophe, a comma, or backslash (other than
1985 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1986 null, do not copy; instead, return the length of what the result
1989 yytnamerr (char *yyres, const char *yystr)
1994 char const *yyp = yystr;
2001 goto do_not_strip_quotes;
2005 goto do_not_strip_quotes;
2018 do_not_strip_quotes: ;
2022 return yystrlen (yystr);
2024 return yystpcpy (yyres, yystr) - yyres;
2028 #endif /* YYERROR_VERBOSE */
2033 /*--------------------------------.
2034 | Print this symbol on YYOUTPUT. |
2035 `--------------------------------*/
2037 #if defined (__STDC__) || defined (__cplusplus)
2039 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
2042 yysymprint (yyoutput, yytype, yyvaluep)
2048 /* Pacify ``unused variable'' warnings. */
2051 if (yytype < YYNTOKENS)
2052 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
2054 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
2058 if (yytype < YYNTOKENS)
2059 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
2066 YYFPRINTF (yyoutput, ")");
2069 #endif /* ! YYDEBUG */
2070 /*-----------------------------------------------.
2071 | Release the memory associated to this symbol. |
2072 `-----------------------------------------------*/
2074 #if defined (__STDC__) || defined (__cplusplus)
2076 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
2079 yydestruct (yymsg, yytype, yyvaluep)
2085 /* Pacify ``unused variable'' warnings. */
2090 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2101 /* Prevent warnings from -Wmissing-prototypes. */
2103 #ifdef YYPARSE_PARAM
2104 # if defined (__STDC__) || defined (__cplusplus)
2105 int yyparse (void *YYPARSE_PARAM);
2109 #else /* ! YYPARSE_PARAM */
2110 #if defined (__STDC__) || defined (__cplusplus)
2115 #endif /* ! YYPARSE_PARAM */
2119 /* The look-ahead symbol. */
2122 /* The semantic value of the look-ahead symbol. */
2125 /* Number of syntax errors so far. */
2134 #ifdef YYPARSE_PARAM
2135 # if defined (__STDC__) || defined (__cplusplus)
2136 int yyparse (void *YYPARSE_PARAM)
2138 int yyparse (YYPARSE_PARAM)
2139 void *YYPARSE_PARAM;
2141 #else /* ! YYPARSE_PARAM */
2142 #if defined (__STDC__) || defined (__cplusplus)
2156 /* Number of tokens to shift before error messages enabled. */
2158 /* Look-ahead token as an internal (translated) token number. */
2161 /* Three stacks and their tools:
2162 `yyss': related to states,
2163 `yyvs': related to semantic values,
2164 `yyls': related to locations.
2166 Refer to the stacks thru separate pointers, to allow yyoverflow
2167 to reallocate them elsewhere. */
2169 /* The state stack. */
2170 short int yyssa[YYINITDEPTH];
2171 short int *yyss = yyssa;
2174 /* The semantic value stack. */
2175 YYSTYPE yyvsa[YYINITDEPTH];
2176 YYSTYPE *yyvs = yyvsa;
2181 #define YYPOPSTACK (yyvsp--, yyssp--)
2183 YYSIZE_T yystacksize = YYINITDEPTH;
2185 /* The variables used to return semantic value and location from the
2190 /* When reducing, the number of symbols on the RHS of the reduced
2194 YYDPRINTF ((stderr, "Starting parse\n"));
2199 yychar = YYEMPTY; /* Cause a token to be read. */
2201 /* Initialize stack pointers.
2202 Waste one element of value and location stack
2203 so that they stay on the same level as the state stack.
2204 The wasted elements are never initialized. */
2211 /*------------------------------------------------------------.
2212 | yynewstate -- Push a new state, which is found in yystate. |
2213 `------------------------------------------------------------*/
2215 /* In all cases, when you get here, the value and location stacks
2216 have just been pushed. so pushing a state here evens the stacks.
2223 if (yyss + yystacksize - 1 <= yyssp)
2225 /* Get the current used size of the three stacks, in elements. */
2226 YYSIZE_T yysize = yyssp - yyss + 1;
2230 /* Give user a chance to reallocate the stack. Use copies of
2231 these so that the &'s don't force the real ones into
2233 YYSTYPE *yyvs1 = yyvs;
2234 short int *yyss1 = yyss;
2237 /* Each stack pointer address is followed by the size of the
2238 data in use in that stack, in bytes. This used to be a
2239 conditional around just the two extra args, but that might
2240 be undefined if yyoverflow is a macro. */
2241 yyoverflow (YY_("memory exhausted"),
2242 &yyss1, yysize * sizeof (*yyssp),
2243 &yyvs1, yysize * sizeof (*yyvsp),
2250 #else /* no yyoverflow */
2251 # ifndef YYSTACK_RELOCATE
2252 goto yyexhaustedlab;
2254 /* Extend the stack our own way. */
2255 if (YYMAXDEPTH <= yystacksize)
2256 goto yyexhaustedlab;
2258 if (YYMAXDEPTH < yystacksize)
2259 yystacksize = YYMAXDEPTH;
2262 short int *yyss1 = yyss;
2263 union yyalloc *yyptr =
2264 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2266 goto yyexhaustedlab;
2267 YYSTACK_RELOCATE (yyss);
2268 YYSTACK_RELOCATE (yyvs);
2270 # undef YYSTACK_RELOCATE
2272 YYSTACK_FREE (yyss1);
2275 #endif /* no yyoverflow */
2277 yyssp = yyss + yysize - 1;
2278 yyvsp = yyvs + yysize - 1;
2281 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2282 (unsigned long int) yystacksize));
2284 if (yyss + yystacksize - 1 <= yyssp)
2288 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2297 /* Do appropriate processing given the current state. */
2298 /* Read a look-ahead token if we need one and don't already have one. */
2301 /* First try to decide what to do without reference to look-ahead token. */
2303 yyn = yypact[yystate];
2304 if (yyn == YYPACT_NINF)
2307 /* Not known => get a look-ahead token if don't already have one. */
2309 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
2310 if (yychar == YYEMPTY)
2312 YYDPRINTF ((stderr, "Reading a token: "));
2316 if (yychar <= YYEOF)
2318 yychar = yytoken = YYEOF;
2319 YYDPRINTF ((stderr, "Now at end of input.\n"));
2323 yytoken = YYTRANSLATE (yychar);
2324 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2327 /* If the proper action on seeing token YYTOKEN is to reduce or to
2328 detect an error, take that action. */
2330 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2335 if (yyn == 0 || yyn == YYTABLE_NINF)
2344 /* Shift the look-ahead token. */
2345 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2347 /* Discard the token being shifted unless it is eof. */
2348 if (yychar != YYEOF)
2354 /* Count tokens shifted since error; after three, turn off error
2363 /*-----------------------------------------------------------.
2364 | yydefault -- do the default action for the current state. |
2365 `-----------------------------------------------------------*/
2367 yyn = yydefact[yystate];
2373 /*-----------------------------.
2374 | yyreduce -- Do a reduction. |
2375 `-----------------------------*/
2377 /* yyn is the number of a rule to reduce with. */
2380 /* If YYLEN is nonzero, implement the default value of the action:
2383 Otherwise, the following line sets YYVAL to garbage.
2384 This behavior is undocumented and Bison
2385 users should not rely upon it. Assigning to YYVAL
2386 unconditionally makes the parser a bit smaller, and it avoids a
2387 GCC warning that YYVAL may be used uninitialized. */
2388 yyval = yyvsp[1-yylen];
2391 YY_REDUCE_PRINT (yyn);
2395 #line 357 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2397 (yyval.String) = (yyvsp[-1].String);
2402 #line 360 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2404 (yyval.String) = new std::string("");
2409 #line 367 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2410 { (yyval.String) = new std::string(""); ;}
2414 #line 372 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2416 *(yyvsp[-1].String) += *(yyvsp[0].String);
2417 delete (yyvsp[0].String);
2418 (yyval.String) = (yyvsp[-1].String);
2423 #line 377 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2424 { (yyval.String) = new std::string(""); ;}
2428 #line 382 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2429 { (yyval.String) = new std::string(); ;}
2433 #line 383 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2434 { *(yyvsp[-1].String) += " " + *(yyvsp[0].String); delete (yyvsp[0].String); (yyval.String) = (yyvsp[-1].String); ;}
2438 #line 386 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2439 { (yyval.String) = new std::string(); ;}
2443 #line 387 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2445 (yyvsp[-1].String)->insert(0, ", ");
2446 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2447 delete (yyvsp[0].String);
2448 (yyval.String) = (yyvsp[-1].String);
2453 #line 395 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2455 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2456 delete (yyvsp[0].String);
2457 (yyval.String) = (yyvsp[-1].String);
2462 #line 401 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2463 { (yyval.String) = new std::string(); ;}
2467 #line 405 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2468 { (yyval.String) = new std::string(); ;}
2472 #line 406 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2474 (yyvsp[-1].String)->insert(0, ", ");
2475 if (!(yyvsp[0].String)->empty())
2476 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2477 delete (yyvsp[0].String);
2478 (yyval.String) = (yyvsp[-1].String);
2483 #line 416 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2485 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2486 delete (yyvsp[0].String);
2487 (yyval.String) = (yyvsp[-1].String);
2492 #line 438 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2494 (yyval.Type).newTy = (yyvsp[0].String);
2495 (yyval.Type).oldTy = OpaqueTy;
2500 #line 442 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2502 (yyval.Type).newTy = (yyvsp[0].String);
2503 (yyval.Type).oldTy = UnresolvedTy;
2508 #line 446 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2510 (yyval.Type) = (yyvsp[0].Type);
2515 #line 449 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2516 { // Type UpReference
2517 (yyvsp[0].String)->insert(0, "\\");
2518 (yyval.Type).newTy = (yyvsp[0].String);
2519 (yyval.Type).oldTy = NumericTy;
2524 #line 454 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2525 { // Function derived type?
2526 *(yyvsp[-3].Type).newTy += "( " + *(yyvsp[-1].String) + " )";
2527 delete (yyvsp[-1].String);
2528 (yyval.Type).newTy = (yyvsp[-3].Type).newTy;
2529 (yyval.Type).oldTy = FunctionTy;
2534 #line 460 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2535 { // Sized array type?
2536 (yyvsp[-3].String)->insert(0,"[ ");
2537 *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " ]";
2538 delete (yyvsp[-1].Type).newTy;
2539 (yyval.Type).newTy = (yyvsp[-3].String);
2540 (yyval.Type).oldTy = ArrayTy;
2541 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2546 #line 468 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2547 { // Packed array type?
2548 (yyvsp[-3].String)->insert(0,"< ");
2549 *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " >";
2550 delete (yyvsp[-1].Type).newTy;
2551 (yyval.Type).newTy = (yyvsp[-3].String);
2552 (yyval.Type).oldTy = PackedTy;
2553 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2558 #line 476 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2559 { // Structure type?
2560 (yyvsp[-1].String)->insert(0, "{ ");
2561 *(yyvsp[-1].String) += " }";
2562 (yyval.Type).newTy = (yyvsp[-1].String);
2563 (yyval.Type).oldTy = StructTy;
2568 #line 482 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2569 { // Empty structure type?
2570 (yyval.Type).newTy = new std::string("{}");
2571 (yyval.Type).oldTy = StructTy;
2576 #line 486 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2578 *(yyvsp[-1].Type).newTy += '*';
2579 (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy;
2580 (yyvsp[-1].Type).oldTy = PointerTy;
2581 (yyval.Type) = (yyvsp[-1].Type);
2586 #line 497 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2588 (yyval.String) = (yyvsp[0].Type).newTy;
2593 #line 500 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2595 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Type).newTy;
2596 delete (yyvsp[0].Type).newTy;
2597 (yyval.String) = (yyvsp[-2].String);
2602 #line 509 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2604 *(yyvsp[-2].String) += ", ...";
2605 delete (yyvsp[0].String);
2606 (yyval.String) = (yyvsp[-2].String);
2611 #line 514 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2613 (yyval.String) = (yyvsp[0].String);
2618 #line 517 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2620 (yyval.String) = new std::string();
2625 #line 527 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2626 { // Nonempty unsized arr
2627 (yyval.Const).type = (yyvsp[-3].Type);
2628 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2629 *(yyval.Const).cnst += " [ " + *(yyvsp[-1].String) + " ]";
2630 delete (yyvsp[-1].String);
2635 #line 533 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2637 (yyval.Const).type = (yyvsp[-2].Type);
2638 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2639 *(yyval.Const).cnst += "[ ]";
2644 #line 538 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2646 (yyval.Const).type = (yyvsp[-2].Type);
2647 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2648 *(yyval.Const).cnst += " c" + *(yyvsp[0].String);
2649 delete (yyvsp[0].String);
2654 #line 544 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2655 { // Nonempty unsized arr
2656 (yyval.Const).type = (yyvsp[-3].Type);
2657 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2658 *(yyval.Const).cnst += " < " + *(yyvsp[-1].String) + " >";
2659 delete (yyvsp[-1].String);
2664 #line 550 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
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 556 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2676 (yyval.Const).type = (yyvsp[-2].Type);
2677 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2678 *(yyval.Const).cnst += " {}";
2683 #line 561 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2685 (yyval.Const).type = (yyvsp[-1].Type);
2686 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2687 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2688 delete (yyvsp[0].String);
2693 #line 567 "/proj/llvm/llvm-4/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 573 "/proj/llvm/llvm-4/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 579 "/proj/llvm/llvm-4/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 585 "/proj/llvm/llvm-4/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 591 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2734 { // integral constants
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 597 "/proj/llvm/llvm-4/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 603 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2754 { // Boolean 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 609 "/proj/llvm/llvm-4/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 615 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2774 { // Float & Double 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 623 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2785 std::string source = *(yyvsp[-3].Const).cnst;
2786 TypeInfo DstTy = (yyvsp[-1].Type);
2788 if (*(yyvsp[-5].String) == "cast") {
2789 // Call getCastUpgrade to upgrade the old cast
2790 (yyval.String) = new std::string(getCastUpgrade(source, (yyvsp[-3].Const).type, (yyvsp[-1].Type), true));
2792 // Nothing to upgrade, just create the cast constant expr
2793 (yyval.String) = new std::string(*(yyvsp[-5].String));
2794 *(yyval.String) += "( " + source + " to " + *(yyvsp[-1].Type).newTy + ")";
2796 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
2801 #line 637 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2803 *(yyvsp[-4].String) += "(" + *(yyvsp[-2].Const).cnst;
2804 for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
2805 ValueInfo& VI = (*(yyvsp[-1].ValList))[i];
2806 *(yyvsp[-4].String) += ", " + *VI.val;
2809 *(yyvsp[-4].String) += ")";
2810 (yyval.String) = (yyvsp[-4].String);
2811 (yyvsp[-2].Const).destroy();
2812 delete (yyvsp[-1].ValList);
2817 #line 649 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2819 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2820 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2821 (yyval.String) = (yyvsp[-7].String);
2826 #line 654 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2828 const char* op = getDivRemOpcode(*(yyvsp[-5].String), (yyvsp[-3].Const).type);
2829 (yyval.String) = new std::string(op);
2830 *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2831 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2836 #line 660 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2838 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2839 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2840 (yyval.String) = (yyvsp[-5].String);
2845 #line 665 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2847 #if UPGRADE_SETCOND_OPS
2848 *(yyvsp[-5].String) = getCompareOp(*(yyvsp[-5].String), (yyvsp[-3].Const).type);
2850 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2851 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2852 (yyval.String) = (yyvsp[-5].String);
2857 #line 673 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2859 *(yyvsp[-6].String) += "(" + *(yyvsp[-5].String) + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2860 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2861 (yyval.String) = (yyvsp[-6].String);
2866 #line 678 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2868 *(yyvsp[-6].String) += "(" + *(yyvsp[-5].String) + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2869 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2870 (yyval.String) = (yyvsp[-6].String);
2875 #line 683 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2877 const char* shiftop = (yyvsp[-5].String)->c_str();
2878 if (*(yyvsp[-5].String) == "shr")
2879 shiftop = ((yyvsp[-3].Const).type.isUnsigned()) ? "lshr" : "ashr";
2880 (yyval.String) = new std::string(shiftop);
2881 *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2882 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2887 #line 691 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2889 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2890 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2891 (yyval.String) = (yyvsp[-5].String);
2896 #line 696 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2898 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2899 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2900 (yyval.String) = (yyvsp[-7].String);
2905 #line 701 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2907 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2908 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2909 (yyval.String) = (yyvsp[-7].String);
2914 #line 711 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2916 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Const).cnst;
2917 (yyvsp[0].Const).destroy();
2918 (yyval.String) = (yyvsp[-2].String);
2923 #line 716 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2924 { (yyval.String) = new std::string(*(yyvsp[0].Const).cnst); (yyvsp[0].Const).destroy(); ;}
2928 #line 731 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2934 #line 736 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2941 #line 739 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2943 *O << *(yyvsp[0].String) << "\n";
2944 delete (yyvsp[0].String);
2950 #line 744 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2952 *O << "module asm " << " " << *(yyvsp[0].String) << "\n";
2958 #line 748 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2960 *O << "implementation\n";
2966 #line 752 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2967 { (yyval.String) = 0; ;}
2971 #line 754 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2972 { (yyval.String) = (yyvsp[0].String); *(yyval.String) = "external"; ;}
2976 #line 757 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2978 EnumeratedTypes.push_back((yyvsp[0].Type));
2979 if (!(yyvsp[-2].String)->empty()) {
2980 NamedTypes[*(yyvsp[-2].String)].newTy = new std::string(*(yyvsp[0].Type).newTy);
2981 NamedTypes[*(yyvsp[-2].String)].oldTy = (yyvsp[0].Type).oldTy;
2982 NamedTypes[*(yyvsp[-2].String)].elemTy = (yyvsp[0].Type).elemTy;
2983 *O << *(yyvsp[-2].String) << " = ";
2985 *O << "type " << *(yyvsp[0].Type).newTy << "\n";
2986 delete (yyvsp[-2].String); delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
2992 #line 769 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2993 { // Function prototypes can be in const pool
2994 *O << *(yyvsp[0].String) << "\n";
2995 delete (yyvsp[0].String);
3001 #line 774 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3002 { // Asm blocks can be in the const pool
3003 *O << *(yyvsp[-2].String) << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
3004 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3010 #line 779 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3012 if (!(yyvsp[-4].String)->empty())
3013 *O << *(yyvsp[-4].String) << " = ";
3014 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Const).cnst << " " << *(yyvsp[0].String) << "\n";
3015 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Const).destroy(); delete (yyvsp[0].String);
3021 #line 786 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3023 if (!(yyvsp[-4].String)->empty())
3024 *O << *(yyvsp[-4].String) << " = ";
3025 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3026 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3032 #line 793 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3034 if (!(yyvsp[-4].String)->empty())
3035 *O << *(yyvsp[-4].String) << " = ";
3036 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3037 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3043 #line 800 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3045 if (!(yyvsp[-4].String)->empty())
3046 *O << *(yyvsp[-4].String) << " = ";
3047 *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3048 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3054 #line 807 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3056 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
3057 delete (yyvsp[-1].String); delete (yyvsp[0].String);
3063 #line 812 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3065 *O << *(yyvsp[-2].String) << " = " << *(yyvsp[0].String) << "\n";
3066 delete (yyvsp[-2].String); delete (yyvsp[0].String);
3072 #line 817 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3079 #line 827 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3081 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3082 delete (yyvsp[0].String);
3083 (yyval.String) = (yyvsp[-2].String);
3088 #line 832 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3090 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3091 if (*(yyvsp[0].String) == "64")
3093 delete (yyvsp[0].String);
3094 (yyval.String) = (yyvsp[-2].String);
3099 #line 839 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3101 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3102 delete (yyvsp[0].String);
3103 (yyval.String) = (yyvsp[-2].String);
3108 #line 844 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3110 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
3111 delete (yyvsp[0].String);
3112 (yyval.String) = (yyvsp[-2].String);
3117 #line 851 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3119 (yyvsp[-1].String)->insert(0, "[ ");
3120 *(yyvsp[-1].String) += " ]";
3121 (yyval.String) = (yyvsp[-1].String);
3126 #line 858 "/proj/llvm/llvm-4/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 864 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3137 (yyval.String) = new std::string();
3142 #line 873 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3143 { (yyval.String) = new std::string(); ;}
3147 #line 875 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3149 (yyval.String) = (yyvsp[-1].Type).newTy;
3150 if (!(yyvsp[0].String)->empty())
3151 *(yyval.String) += " " + *(yyvsp[0].String);
3152 delete (yyvsp[0].String);
3157 #line 882 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3159 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
3160 delete (yyvsp[0].String);
3165 #line 886 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3167 (yyval.String) = (yyvsp[0].String);
3172 #line 890 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3174 (yyval.String) = (yyvsp[0].String);
3179 #line 893 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3181 *(yyvsp[-2].String) += ", ...";
3182 (yyval.String) = (yyvsp[-2].String);
3183 delete (yyvsp[0].String);
3188 #line 898 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3190 (yyval.String) = (yyvsp[0].String);
3195 #line 901 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3196 { (yyval.String) = new std::string(); ;}
3200 #line 904 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3202 if (!(yyvsp[-7].String)->empty()) {
3203 *(yyvsp[-7].String) += " ";
3205 *(yyvsp[-7].String) += *(yyvsp[-6].Type).newTy + " " + *(yyvsp[-5].String) + "(" + *(yyvsp[-3].String) + ")";
3206 if (!(yyvsp[-1].String)->empty()) {
3207 *(yyvsp[-7].String) += " " + *(yyvsp[-1].String);
3209 if (!(yyvsp[0].String)->empty()) {
3210 *(yyvsp[-7].String) += " " + *(yyvsp[0].String);
3212 (yyvsp[-6].Type).destroy();
3213 delete (yyvsp[-5].String);
3214 delete (yyvsp[-3].String);
3215 delete (yyvsp[-1].String);
3216 delete (yyvsp[0].String);
3217 (yyval.String) = (yyvsp[-7].String);
3222 #line 923 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3223 { (yyval.String) = new std::string("{"); delete (yyvsp[0].String); ;}
3227 #line 924 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3228 { (yyval.String) = new std::string ("{"); ;}
3232 #line 926 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3234 if (!(yyvsp[-2].String)->empty()) {
3235 *O << *(yyvsp[-2].String) << " ";
3237 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
3238 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3244 #line 935 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3245 { (yyval.String) = new std::string("}"); delete (yyvsp[0].String); ;}
3249 #line 936 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3250 { (yyval.String) = new std::string("}"); ;}
3254 #line 938 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3256 if ((yyvsp[-1].String))
3257 *O << *(yyvsp[-1].String);
3258 *O << '\n' << *(yyvsp[0].String) << "\n";
3264 #line 946 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3265 { (yyval.String) = new std::string(); ;}
3269 #line 952 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3271 if (!(yyvsp[-1].String)->empty())
3272 *(yyvsp[-2].String) += " " + *(yyvsp[-1].String);
3273 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3274 delete (yyvsp[-1].String);
3275 delete (yyvsp[0].String);
3276 (yyval.String) = (yyvsp[-2].String);
3281 #line 965 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3282 { (yyval.String) = new std::string(); ;}
3286 #line 971 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3288 (yyvsp[-1].String)->insert(0, "<");
3289 *(yyvsp[-1].String) += ">";
3290 (yyval.String) = (yyvsp[-1].String);
3295 #line 977 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3297 if (!(yyvsp[-3].String)->empty()) {
3298 *(yyvsp[-4].String) += " " + *(yyvsp[-3].String);
3300 *(yyvsp[-4].String) += " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
3301 delete (yyvsp[-3].String); delete (yyvsp[-2].String); delete (yyvsp[0].String);
3302 (yyval.String) = (yyvsp[-4].String);
3307 #line 990 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3309 (yyval.Value).val = (yyvsp[0].String);
3310 (yyval.Value).constant = false;
3311 (yyval.Value).type.newTy = 0;
3312 (yyval.Value).type.oldTy = UnresolvedTy;
3317 #line 996 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3319 (yyval.Value).val = (yyvsp[0].String);
3320 (yyval.Value).constant = true;
3321 (yyval.Value).type.newTy = 0;
3322 (yyval.Value).type.oldTy = UnresolvedTy;
3327 #line 1007 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3329 (yyval.Value) = (yyvsp[0].Value);
3330 (yyval.Value).type = (yyvsp[-1].Type);
3331 (yyval.Value).val->insert(0, *(yyvsp[-1].Type).newTy + " ");
3336 #line 1013 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3343 #line 1016 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3344 { // Do not allow functions with 0 basic blocks
3350 #line 1024 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3357 #line 1028 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3359 *O << " " << *(yyvsp[0].String) << "\n";
3360 delete (yyvsp[0].String);
3366 #line 1033 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3373 #line 1036 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3375 *O << *(yyvsp[0].String) << "\n";
3376 delete (yyvsp[0].String);
3382 #line 1042 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3383 { (yyval.String) = (yyvsp[0].String); *(yyval.String) = "unwind"; ;}
3387 #line 1044 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3388 { // Return with a result...
3389 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Value).val << "\n";
3390 delete (yyvsp[-1].String); (yyvsp[0].Value).destroy();
3396 #line 1049 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3397 { // Return with no result...
3398 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Type).newTy << "\n";
3399 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3405 #line 1054 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3406 { // Unconditional Branch...
3407 *O << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].Value).val << "\n";
3408 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3414 #line 1059 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3416 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", "
3417 << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << ", " << *(yyvsp[-1].Type).newTy << " "
3418 << *(yyvsp[0].Value).val << "\n";
3419 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); (yyvsp[-6].Value).destroy(); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy();
3420 (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3426 #line 1067 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3428 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", "
3429 << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << " [" << *(yyvsp[-1].String) << " ]\n";
3430 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); (yyvsp[-6].Value).destroy(); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy();
3431 delete (yyvsp[-1].String);
3437 #line 1074 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3439 *O << " " << *(yyvsp[-7].String) << " " << *(yyvsp[-6].Type).newTy << " " << *(yyvsp[-5].Value).val << ", "
3440 << *(yyvsp[-3].Type).newTy << " " << *(yyvsp[-2].Value).val << "[]\n";
3441 delete (yyvsp[-7].String); (yyvsp[-6].Type).destroy(); (yyvsp[-5].Value).destroy(); (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy();
3447 #line 1081 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3450 if (!(yyvsp[-13].String)->empty())
3451 *O << *(yyvsp[-13].String) << " = ";
3452 *O << *(yyvsp[-12].String) << " " << *(yyvsp[-11].String) << " " << *(yyvsp[-10].Type).newTy << " " << *(yyvsp[-9].Value).val << " (";
3453 for (unsigned i = 0; i < (yyvsp[-7].ValList)->size(); ++i) {
3454 ValueInfo& VI = (*(yyvsp[-7].ValList))[i];
3456 if (i+1 < (yyvsp[-7].ValList)->size())
3460 *O << ") " << *(yyvsp[-5].String) << " " << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << " "
3461 << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].Value).val << "\n";
3462 delete (yyvsp[-13].String); delete (yyvsp[-12].String); delete (yyvsp[-11].String); (yyvsp[-10].Type).destroy(); (yyvsp[-9].Value).destroy(); delete (yyvsp[-7].ValList);
3463 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
3464 (yyvsp[0].Value).destroy();
3470 #line 1100 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3472 *O << " " << *(yyvsp[0].String) << "\n";
3473 delete (yyvsp[0].String);
3479 #line 1105 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3481 *O << " " << *(yyvsp[0].String) << "\n";
3482 delete (yyvsp[0].String);
3488 #line 1111 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3490 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].String) + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3491 (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3492 (yyval.String) = (yyvsp[-5].String);
3497 #line 1116 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3499 (yyvsp[-3].String)->insert(0, *(yyvsp[-4].Type).newTy + " " );
3500 *(yyvsp[-3].String) += ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3501 (yyvsp[-4].Type).destroy(); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3502 (yyval.String) = (yyvsp[-3].String);
3507 #line 1124 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3509 if (!(yyvsp[-1].String)->empty())
3510 *(yyvsp[-1].String) += " = ";
3511 *(yyvsp[-1].String) += *(yyvsp[0].String);
3512 delete (yyvsp[0].String);
3513 (yyval.String) = (yyvsp[-1].String);
3518 #line 1133 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3519 { // Used for PHI nodes
3520 (yyvsp[-3].Value).val->insert(0, *(yyvsp[-5].Type).newTy + "[");
3521 *(yyvsp[-3].Value).val += "," + *(yyvsp[-1].Value).val + "]";
3522 (yyvsp[-5].Type).destroy(); (yyvsp[-1].Value).destroy();
3523 (yyval.String) = new std::string(*(yyvsp[-3].Value).val);
3524 (yyvsp[-3].Value).destroy();
3529 #line 1140 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3531 *(yyvsp[-6].String) += ", [" + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + "]";
3532 (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
3533 (yyval.String) = (yyvsp[-6].String);
3538 #line 1148 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3540 (yyval.ValList) = new ValueList();
3541 (yyval.ValList)->push_back((yyvsp[0].Value));
3546 #line 1152 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3548 (yyvsp[-2].ValList)->push_back((yyvsp[0].Value));
3549 (yyval.ValList) = (yyvsp[-2].ValList);
3554 #line 1159 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3555 { (yyval.ValList) = (yyvsp[0].ValList); ;}
3559 #line 1160 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3560 { (yyval.ValList) = new ValueList(); ;}
3564 #line 1164 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3566 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3567 delete (yyvsp[0].String);
3568 (yyval.String) = (yyvsp[-1].String);
3573 #line 1172 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3575 const char* op = getDivRemOpcode(*(yyvsp[-4].String), (yyvsp[-3].Type));
3576 (yyval.String) = new std::string(op);
3577 *(yyval.String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3578 delete (yyvsp[-4].String); (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3583 #line 1178 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3585 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3586 (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3587 (yyval.String) = (yyvsp[-4].String);
3592 #line 1183 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3594 #if UPGRADE_SETCOND_OPS
3595 *(yyvsp[-4].String) = getCompareOp(*(yyvsp[-4].String), (yyvsp[-3].Type));
3597 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3598 (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3599 (yyval.String) = (yyvsp[-4].String);
3604 #line 1191 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3606 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String) + " " + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + ")";
3607 delete (yyvsp[-5].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
3608 (yyval.String) = (yyvsp[-6].String);
3613 #line 1196 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3615 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String) + " " + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + ")";
3616 delete (yyvsp[-5].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy();
3617 (yyval.String) = (yyvsp[-6].String);
3622 #line 1201 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3624 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3625 (yyvsp[0].Value).destroy();
3626 (yyval.String) = (yyvsp[-1].String);
3631 #line 1206 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3633 const char* shiftop = (yyvsp[-3].String)->c_str();
3634 if (*(yyvsp[-3].String) == "shr")
3635 shiftop = ((yyvsp[-2].Value).type.isUnsigned()) ? "lshr" : "ashr";
3636 (yyval.String) = new std::string(shiftop);
3637 *(yyval.String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3638 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3643 #line 1214 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3645 std::string source = *(yyvsp[-2].Value).val;
3646 TypeInfo SrcTy = (yyvsp[-2].Value).type;
3647 TypeInfo DstTy = (yyvsp[0].Type);
3649 (yyval.String) = new std::string();
3650 if (*(yyvsp[-3].String) == "cast") {
3651 *(yyval.String) += getCastUpgrade(source, SrcTy, DstTy, false);
3653 *(yyval.String) += *(yyvsp[-3].String) + " " + source + " to " + *DstTy.newTy;
3655 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy();
3656 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3661 #line 1228 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3663 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3664 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3665 (yyval.String) = (yyvsp[-5].String);
3670 #line 1233 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3672 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Type).newTy;
3673 (yyvsp[-2].Value).destroy(); (yyvsp[0].Type).destroy();
3674 (yyval.String) = (yyvsp[-3].String);
3679 #line 1238 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3681 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3682 (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3683 (yyval.String) = (yyvsp[-3].String);
3688 #line 1243 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3690 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3691 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3692 (yyval.String) = (yyvsp[-5].String);
3697 #line 1248 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3699 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3700 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3701 (yyval.String) = (yyvsp[-5].String);
3706 #line 1253 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3708 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3709 delete (yyvsp[0].String);
3710 (yyval.String) = (yyvsp[-1].String);
3715 #line 1258 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3717 if (!(yyvsp[-5].String)->empty())
3718 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String);
3719 if (!(yyvsp[-6].String)->empty())
3720 *(yyvsp[-6].String) += " ";
3721 *(yyvsp[-6].String) += *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].Value).val + "(";
3722 for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) {
3723 ValueInfo& VI = (*(yyvsp[-1].ValList))[i];
3724 *(yyvsp[-6].String) += *VI.val;
3725 if (i+1 < (yyvsp[-1].ValList)->size())
3726 *(yyvsp[-6].String) += ", ";
3729 *(yyvsp[-6].String) += ")";
3730 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); delete (yyvsp[-1].ValList);
3731 (yyval.String) = (yyvsp[-6].String);
3736 #line 1280 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3737 { (yyval.ValList) = (yyvsp[0].ValList); ;}
3741 #line 1281 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3742 { (yyval.ValList) = new ValueList(); ;}
3746 #line 1286 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3747 { (yyval.String) = new std::string(); ;}
3751 #line 1289 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3753 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3754 if (!(yyvsp[0].String)->empty())
3755 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3756 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3757 (yyval.String) = (yyvsp[-2].String);
3762 #line 1296 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3764 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3765 if (!(yyvsp[0].String)->empty())
3766 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3767 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].String);
3768 (yyval.String) = (yyvsp[-5].String);
3773 #line 1303 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3775 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3776 if (!(yyvsp[0].String)->empty())
3777 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3778 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3779 (yyval.String) = (yyvsp[-2].String);
3784 #line 1310 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3786 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3787 if (!(yyvsp[0].String)->empty())
3788 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3789 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].String);
3790 (yyval.String) = (yyvsp[-5].String);
3795 #line 1317 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3797 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3798 (yyvsp[0].Value).destroy();
3799 (yyval.String) = (yyvsp[-1].String);
3804 #line 1322 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3806 if (!(yyvsp[-3].String)->empty())
3807 *(yyvsp[-3].String) += " ";
3808 *(yyvsp[-3].String) += *(yyvsp[-2].String) + " " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3809 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3810 (yyval.String) = (yyvsp[-3].String);
3815 #line 1329 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3817 if (!(yyvsp[-5].String)->empty())
3818 *(yyvsp[-5].String) += " ";
3819 *(yyvsp[-5].String) += *(yyvsp[-4].String) + " " + *(yyvsp[-3].Value).val + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val;
3820 delete (yyvsp[-4].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy();
3821 (yyval.String) = (yyvsp[-5].String);
3826 #line 1336 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3828 // Upgrade the indices
3829 for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) {
3830 ValueInfo& VI = (*(yyvsp[0].ValList))[i];
3831 if (VI.type.isUnsigned() && !VI.isConstant() &&
3832 VI.type.getBitWidth() < 64) {
3833 std::string* old = VI.val;
3834 *O << " %gep_upgrade" << unique << " = zext " << *old
3836 VI.val = new std::string("ulong %gep_upgrade" + llvm::utostr(unique++));
3837 VI.type.oldTy = ULongTy;
3841 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val;
3842 for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) {
3843 ValueInfo& VI = (*(yyvsp[0].ValList))[i];
3844 *(yyvsp[-3].String) += ", " + *VI.val;
3847 (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].ValList);
3848 (yyval.String) = (yyvsp[-3].String);
3856 /* Line 1126 of yacc.c. */
3857 #line 3858 "UpgradeParser.tab.c"
3863 YY_STACK_PRINT (yyss, yyssp);
3868 /* Now `shift' the result of the reduction. Determine what state
3869 that goes to, based on the state we popped back to and the rule
3870 number reduced by. */
3874 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3875 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3876 yystate = yytable[yystate];
3878 yystate = yydefgoto[yyn - YYNTOKENS];
3883 /*------------------------------------.
3884 | yyerrlab -- here on detecting error |
3885 `------------------------------------*/
3887 /* If not already recovering from an error, report this error. */
3892 yyn = yypact[yystate];
3894 if (YYPACT_NINF < yyn && yyn < YYLAST)
3896 int yytype = YYTRANSLATE (yychar);
3897 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3898 YYSIZE_T yysize = yysize0;
3900 int yysize_overflow = 0;
3902 # define YYERROR_VERBOSE_ARGS_MAXIMUM 5
3903 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3907 /* This is so xgettext sees the translatable formats that are
3908 constructed on the fly. */
3909 YY_("syntax error, unexpected %s");
3910 YY_("syntax error, unexpected %s, expecting %s");
3911 YY_("syntax error, unexpected %s, expecting %s or %s");
3912 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3913 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3917 static char const yyunexpected[] = "syntax error, unexpected %s";
3918 static char const yyexpecting[] = ", expecting %s";
3919 static char const yyor[] = " or %s";
3920 char yyformat[sizeof yyunexpected
3921 + sizeof yyexpecting - 1
3922 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3923 * (sizeof yyor - 1))];
3924 char const *yyprefix = yyexpecting;
3926 /* Start YYX at -YYN if negative to avoid negative indexes in
3928 int yyxbegin = yyn < 0 ? -yyn : 0;
3930 /* Stay within bounds of both yycheck and yytname. */
3931 int yychecklim = YYLAST - yyn;
3932 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3935 yyarg[0] = yytname[yytype];
3936 yyfmt = yystpcpy (yyformat, yyunexpected);
3938 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3939 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3941 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3945 yyformat[sizeof yyunexpected - 1] = '\0';
3948 yyarg[yycount++] = yytname[yyx];
3949 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3950 yysize_overflow |= yysize1 < yysize;
3952 yyfmt = yystpcpy (yyfmt, yyprefix);
3956 yyf = YY_(yyformat);
3957 yysize1 = yysize + yystrlen (yyf);
3958 yysize_overflow |= yysize1 < yysize;
3961 if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
3962 yymsg = (char *) YYSTACK_ALLOC (yysize);
3965 /* Avoid sprintf, as that infringes on the user's name space.
3966 Don't have undefined behavior even if the translation
3967 produced a string with the wrong number of "%s"s. */
3970 while ((*yyp = *yyf))
3972 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3974 yyp += yytnamerr (yyp, yyarg[yyi++]);
3984 YYSTACK_FREE (yymsg);
3988 yyerror (YY_("syntax error"));
3989 goto yyexhaustedlab;
3993 #endif /* YYERROR_VERBOSE */
3994 yyerror (YY_("syntax error"));
3999 if (yyerrstatus == 3)
4001 /* If just tried and failed to reuse look-ahead token after an
4002 error, discard it. */
4004 if (yychar <= YYEOF)
4006 /* Return failure if at end of input. */
4007 if (yychar == YYEOF)
4012 yydestruct ("Error: discarding", yytoken, &yylval);
4017 /* Else will try to reuse look-ahead token after shifting the error
4022 /*---------------------------------------------------.
4023 | yyerrorlab -- error raised explicitly by YYERROR. |
4024 `---------------------------------------------------*/
4027 /* Pacify compilers like GCC when the user code never invokes
4028 YYERROR and the label yyerrorlab therefore never appears in user
4039 /*-------------------------------------------------------------.
4040 | yyerrlab1 -- common code for both syntax error and YYERROR. |
4041 `-------------------------------------------------------------*/
4043 yyerrstatus = 3; /* Each real token shifted decrements this. */
4047 yyn = yypact[yystate];
4048 if (yyn != YYPACT_NINF)
4051 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4059 /* Pop the current state because it cannot handle the error token. */
4064 yydestruct ("Error: popping", yystos[yystate], yyvsp);
4067 YY_STACK_PRINT (yyss, yyssp);
4076 /* Shift the error token. */
4077 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
4083 /*-------------------------------------.
4084 | yyacceptlab -- YYACCEPT comes here. |
4085 `-------------------------------------*/
4090 /*-----------------------------------.
4091 | yyabortlab -- YYABORT comes here. |
4092 `-----------------------------------*/
4098 /*-------------------------------------------------.
4099 | yyexhaustedlab -- memory exhaustion comes here. |
4100 `-------------------------------------------------*/
4102 yyerror (YY_("memory exhausted"));
4108 if (yychar != YYEOF && yychar != YYEMPTY)
4109 yydestruct ("Cleanup: discarding lookahead",
4111 while (yyssp != yyss)
4113 yydestruct ("Cleanup: popping",
4114 yystos[*yyssp], yyvsp);
4119 YYSTACK_FREE (yyss);
4125 #line 1360 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
4128 int yyerror(const char *ErrorMsg) {
4130 = std::string((CurFilename == "-") ? std::string("<stdin>") : CurFilename)
4131 + ":" + llvm::utostr((unsigned) Upgradelineno) + ": ";
4132 std::string errMsg = std::string(ErrorMsg) + "\n" + where + " while reading ";
4133 if (yychar == YYEMPTY || yychar == 0)
4134 errMsg += "end-of-file.";
4136 errMsg += "token: '" + std::string(Upgradetext, Upgradeleng) + "'";
4137 std::cerr << errMsg << '\n';