1 /* A Bison parser, made by GNU Bison 2.1. */
3 /* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA. */
21 /* As a special exception, when this file is copied by Bison into a
22 Bison output file, you may use that output file without restriction.
23 This special exception was added by the Free Software Foundation
24 in version 1.24 of Bison. */
26 /* Written by Richard Stallman by simplifying the original so called
27 ``semantic'' parser. */
29 /* All symbols defined below should begin with yy or YY, to avoid
30 infringing on user name space. This should be done even for local
31 variables, as they might otherwise be expanded by user macros.
32 There are some unavoidable exceptions within include files to
33 define necessary library symbols; they are noted "INFRINGES ON
34 USER NAME SPACE" below. */
36 /* Identify Bison output. */
40 #define YYBISON_VERSION "2.1"
43 #define YYSKELETON_NAME "yacc.c"
48 /* Using locations. */
49 #define YYLSP_NEEDED 0
51 /* Substitute the variable and function names. */
52 #define yyparse Upgradeparse
53 #define yylex Upgradelex
54 #define yyerror Upgradeerror
55 #define yylval Upgradelval
56 #define yychar Upgradechar
57 #define yydebug Upgradedebug
58 #define yynerrs Upgradenerrs
64 /* Put the tokens into the symbol table, so that GDB and other debuggers
88 ZEROINITIALIZER = 279,
133 X86_STDCALLCC_TOK = 324,
134 X86_FASTCALLCC_TOK = 325,
173 EXTRACTELEMENT = 364,
206 #define ESINT64VAL 272
207 #define EUINT64VAL 273
213 #define ZEROINITIALIZER 279
219 #define STRINGCONSTANT 285
220 #define IMPLEMENTATION 286
229 #define DOTDOTDOT 295
234 #define DLLIMPORT 300
235 #define DLLEXPORT 301
236 #define EXTERN_WEAK 302
237 #define APPENDING 303
243 #define POINTERSIZE 309
252 #define SIDEEFFECT 318
255 #define CSRETCC_TOK 321
256 #define FASTCC_TOK 322
257 #define COLDCC_TOK 323
258 #define X86_STDCALLCC_TOK 324
259 #define X86_FASTCALLCC_TOK 325
260 #define DATALAYOUT 326
266 #define UNREACHABLE 332
290 #define GETELEMENTPTR 356
298 #define EXTRACTELEMENT 364
299 #define INSERTELEMENT 365
300 #define SHUFFLEVECTOR 366
318 /* Copy the first part of user declarations. */
319 #line 14 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
321 #include "ParserInternals.h"
322 #include <llvm/ADT/StringExtras.h>
328 #define YYERROR_VERBOSE 1
329 #define YYINCLUDED_STDLIB_H
332 int yylex(); // declaration" of xxx warnings.
336 static std::string CurFilename;
337 static std::ostream *O = 0;
338 std::istream* LexInput = 0;
339 unsigned SizeOfPointer = 32;
341 void UpgradeAssembly(const std::string &infile, std::istream& in,
342 std::ostream &out, bool debug)
345 CurFilename = infile;
351 std::cerr << "Parse failed.\n";
356 std::string getCastUpgrade(std::string& Source, TypeInfo& SrcTy,
357 TypeInfo&DstTy, bool isConst = false)
360 if (SrcTy.isFloatingPoint() && DstTy.isPointer()) {
362 Source = "ulong fptoui(" + Source + " to ulong)";
364 Result = "%cast_upgrade = fptoui " + Source + " to ulong";
365 Source = "ulong %cast_upgrade";
368 SrcTy.newTy = new std::string("ulong");
369 SrcTy.oldTy = ULongTy;
374 const char* getCastOpcode(std::string& Source, TypeInfo& SrcTy,
376 unsigned SrcBits = SrcTy.getBitWidth();
377 unsigned DstBits = DstTy.getBitWidth();
378 const char* opcode = "bitcast";
379 // Run through the possibilities ...
380 if (DstTy.isIntegral()) { // Casting to integral
381 if (SrcTy.isIntegral()) { // Casting from integral
382 if (DstBits < SrcBits)
384 else if (DstBits > SrcBits) { // its an extension
385 if (SrcTy.isSigned())
386 opcode ="sext"; // signed -> SEXT
388 opcode = "zext"; // unsigned -> ZEXT
390 opcode = "bitcast"; // Same size, No-op cast
392 } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt
393 if (DstTy.isSigned())
394 opcode = "fptosi"; // FP -> sint
396 opcode = "fptoui"; // FP -> uint
397 } else if (SrcTy.isPacked()) {
398 assert(DstBits == SrcTy.getBitWidth() &&
399 "Casting packed to integer of different width");
400 opcode = "bitcast"; // same size, no-op cast
402 assert(SrcTy.isPointer() &&
403 "Casting from a value that is not first-class type");
404 opcode = "ptrtoint"; // ptr -> int
406 } else if (DstTy.isFloatingPoint()) { // Casting to floating pt
407 if (SrcTy.isIntegral()) { // Casting from integral
408 if (SrcTy.isSigned())
409 opcode = "sitofp"; // sint -> FP
411 opcode = "uitofp"; // uint -> FP
412 } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt
413 if (DstBits < SrcBits) {
414 opcode = "fptrunc"; // FP -> smaller FP
415 } else if (DstBits > SrcBits) {
416 opcode = "fpext"; // FP -> larger FP
418 opcode ="bitcast"; // same size, no-op cast
420 } else if (SrcTy.isPacked()) {
421 assert(DstBits == SrcTy.getBitWidth() &&
422 "Casting packed to floating point of different width");
423 opcode = "bitcast"; // same size, no-op cast
425 assert(0 && "Casting pointer or non-first class to float");
427 } else if (DstTy.isPacked()) {
428 if (SrcTy.isPacked()) {
429 assert(DstTy.getBitWidth() == SrcTy.getBitWidth() &&
430 "Casting packed to packed of different widths");
431 opcode = "bitcast"; // packed -> packed
432 } else if (DstTy.getBitWidth() == SrcBits) {
433 opcode = "bitcast"; // float/int -> packed
435 assert(!"Illegal cast to packed (wrong type or size)");
437 } else if (DstTy.isPointer()) {
438 if (SrcTy.isPointer()) {
439 opcode = "bitcast"; // ptr -> ptr
440 } else if (SrcTy.isIntegral()) {
441 opcode = "inttoptr"; // int -> ptr
442 } else if (SrcTy.isFloatingPoint()) { // float/double -> ptr
444 *O << " %upgrade_cast = fptoui " << Source << " to ulong\n";
446 Source = "ulong %upgrade_cast";
448 assert(!"Casting pointer to other than pointer or int");
451 assert(!"Casting to type that is not first-class");
458 /* Enabling traces. */
463 /* Enabling verbose error messages. */
464 #ifdef YYERROR_VERBOSE
465 # undef YYERROR_VERBOSE
466 # define YYERROR_VERBOSE 1
468 # define YYERROR_VERBOSE 0
471 /* Enabling the token table. */
472 #ifndef YYTOKEN_TABLE
473 # define YYTOKEN_TABLE 0
476 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
477 #line 154 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
478 typedef union YYSTYPE {
484 /* Line 196 of yacc.c. */
485 #line 486 "UpgradeParser.tab.c"
486 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
487 # define YYSTYPE_IS_DECLARED 1
488 # define YYSTYPE_IS_TRIVIAL 1
493 /* Copy the second part of user declarations. */
496 /* Line 219 of yacc.c. */
497 #line 498 "UpgradeParser.tab.c"
499 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
500 # define YYSIZE_T __SIZE_TYPE__
502 #if ! defined (YYSIZE_T) && defined (size_t)
503 # define YYSIZE_T size_t
505 #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
506 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
507 # define YYSIZE_T size_t
509 #if ! defined (YYSIZE_T)
510 # define YYSIZE_T unsigned int
516 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
517 # define YY_(msgid) dgettext ("bison-runtime", msgid)
521 # define YY_(msgid) msgid
525 #if ! defined (yyoverflow) || YYERROR_VERBOSE
527 /* The parser invokes alloca or malloc; define the necessary symbols. */
529 # ifdef YYSTACK_USE_ALLOCA
530 # if YYSTACK_USE_ALLOCA
532 # define YYSTACK_ALLOC __builtin_alloca
534 # define YYSTACK_ALLOC alloca
535 # if defined (__STDC__) || defined (__cplusplus)
536 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
537 # define YYINCLUDED_STDLIB_H
543 # ifdef YYSTACK_ALLOC
544 /* Pacify GCC's `empty if-body' warning. */
545 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
546 # ifndef YYSTACK_ALLOC_MAXIMUM
547 /* The OS might guarantee only one guard page at the bottom of the stack,
548 and a page size can be as small as 4096 bytes. So we cannot safely
549 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
550 to allow for a few compiler-allocated temporary stack slots. */
551 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
554 # define YYSTACK_ALLOC YYMALLOC
555 # define YYSTACK_FREE YYFREE
556 # ifndef YYSTACK_ALLOC_MAXIMUM
557 # define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
563 # define YYMALLOC malloc
564 # if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
565 && (defined (__STDC__) || defined (__cplusplus)))
566 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
571 # if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
572 && (defined (__STDC__) || defined (__cplusplus)))
573 void free (void *); /* INFRINGES ON USER NAME SPACE */
580 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
583 #if (! defined (yyoverflow) \
584 && (! defined (__cplusplus) \
585 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
587 /* A type that is properly aligned for any stack member. */
594 /* The size of the maximum gap between one aligned stack and the next. */
595 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
597 /* The size of an array large to enough to hold all stacks, each with
599 # define YYSTACK_BYTES(N) \
600 ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
601 + YYSTACK_GAP_MAXIMUM)
603 /* Copy COUNT objects from FROM to TO. The source and destination do
606 # if defined (__GNUC__) && 1 < __GNUC__
607 # define YYCOPY(To, From, Count) \
608 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
610 # define YYCOPY(To, From, Count) \
614 for (yyi = 0; yyi < (Count); yyi++) \
615 (To)[yyi] = (From)[yyi]; \
621 /* Relocate STACK from its old location to the new one. The
622 local variables YYSIZE and YYSTACKSIZE give the old and new number of
623 elements in the stack, and YYPTR gives the new location of the
624 stack. Advance YYPTR to a properly aligned location for the next
626 # define YYSTACK_RELOCATE(Stack) \
629 YYSIZE_T yynewbytes; \
630 YYCOPY (&yyptr->Stack, Stack, yysize); \
631 Stack = &yyptr->Stack; \
632 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
633 yyptr += yynewbytes / sizeof (*yyptr); \
639 #if defined (__STDC__) || defined (__cplusplus)
640 typedef signed char yysigned_char;
642 typedef short int yysigned_char;
645 /* YYFINAL -- State number of the termination state. */
647 /* YYLAST -- Last index in YYTABLE. */
650 /* YYNTOKENS -- Number of terminals. */
651 #define YYNTOKENS 139
652 /* YYNNTS -- Number of nonterminals. */
654 /* YYNRULES -- Number of rules. */
656 /* YYNRULES -- Number of states. */
657 #define YYNSTATES 522
659 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
661 #define YYMAXUTOK 379
663 #define YYTRANSLATE(YYX) \
664 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
666 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
667 static const unsigned char yytranslate[] =
669 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
670 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
671 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
672 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
673 128, 129, 137, 2, 126, 2, 2, 2, 2, 2,
674 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
675 133, 125, 134, 2, 2, 2, 2, 2, 2, 2,
676 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
677 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
678 2, 130, 127, 132, 2, 2, 2, 2, 2, 138,
679 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
680 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
681 131, 2, 2, 135, 2, 136, 2, 2, 2, 2,
682 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
683 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
684 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
685 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
686 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
687 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
688 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
689 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
690 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
691 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
692 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
693 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
694 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
695 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
696 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
697 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
698 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
699 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
700 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
701 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
702 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
703 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
704 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
705 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
706 115, 116, 117, 118, 119, 120, 121, 122, 123, 124
710 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
712 static const unsigned short int yyprhs[] =
714 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
715 19, 21, 23, 25, 27, 29, 31, 33, 35, 37,
716 39, 41, 43, 45, 47, 49, 51, 53, 55, 57,
717 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
718 79, 81, 83, 85, 87, 89, 91, 93, 95, 97,
719 99, 101, 103, 105, 108, 109, 111, 113, 115, 117,
720 119, 121, 123, 124, 126, 128, 130, 132, 134, 136,
721 139, 140, 141, 144, 145, 149, 152, 153, 155, 156,
722 160, 162, 165, 167, 169, 171, 173, 175, 177, 179,
723 181, 183, 185, 187, 189, 191, 193, 195, 197, 199,
724 201, 203, 205, 208, 213, 219, 225, 229, 232, 235,
725 237, 241, 243, 247, 249, 250, 255, 259, 263, 268,
726 273, 277, 280, 283, 286, 289, 292, 295, 298, 301,
727 304, 307, 314, 320, 329, 336, 343, 350, 357, 364,
728 373, 382, 386, 388, 390, 392, 394, 397, 400, 405,
729 408, 410, 415, 418, 423, 430, 437, 444, 451, 455,
730 460, 461, 463, 465, 467, 471, 475, 479, 483, 487,
731 491, 493, 494, 496, 498, 500, 501, 504, 508, 510,
732 512, 516, 518, 519, 528, 530, 532, 536, 538, 540,
733 544, 545, 547, 549, 553, 554, 556, 558, 560, 562,
734 564, 566, 568, 570, 572, 576, 578, 584, 586, 588,
735 590, 592, 595, 598, 600, 603, 606, 607, 609, 612,
736 615, 619, 629, 639, 648, 663, 665, 667, 674, 680,
737 683, 690, 698, 700, 704, 706, 707, 710, 712, 718,
738 724, 730, 733, 738, 743, 750, 755, 760, 767, 774,
739 777, 785, 787, 790, 791, 793, 794, 798, 805, 809,
743 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
744 static const short int yyrhs[] =
746 171, 0, -1, 19, -1, 20, -1, 17, -1, 18,
747 -1, 78, -1, 79, -1, 80, -1, 81, -1, 82,
748 -1, 83, -1, 84, -1, 85, -1, 86, -1, 87,
749 -1, 88, -1, 89, -1, 90, -1, 91, -1, 92,
750 -1, 93, -1, 94, -1, 95, -1, 104, -1, 105,
751 -1, 106, -1, 107, -1, 113, -1, 114, -1, 115,
752 -1, 116, -1, 117, -1, 118, -1, 119, -1, 120,
753 -1, 121, -1, 122, -1, 123, -1, 124, -1, 112,
754 -1, 11, -1, 9, -1, 7, -1, 5, -1, 12,
755 -1, 10, -1, 8, -1, 6, -1, 147, -1, 148,
756 -1, 13, -1, 14, -1, 179, 125, -1, -1, 42,
757 -1, 43, -1, 44, -1, 48, -1, 45, -1, 46,
758 -1, 47, -1, -1, 65, -1, 66, -1, 67, -1,
759 68, -1, 69, -1, 70, -1, 64, 18, -1, -1,
760 -1, 57, 18, -1, -1, 126, 57, 18, -1, 37,
761 30, -1, -1, 156, -1, -1, 126, 159, 158, -1,
762 156, -1, 57, 18, -1, 162, -1, 3, -1, 164,
763 -1, 3, -1, 164, -1, 4, -1, 5, -1, 6,
764 -1, 7, -1, 8, -1, 9, -1, 10, -1, 11,
765 -1, 12, -1, 13, -1, 14, -1, 15, -1, 16,
766 -1, 163, -1, 193, -1, 127, 18, -1, 161, 128,
767 166, 129, -1, 130, 18, 131, 164, 132, -1, 133,
768 18, 131, 164, 134, -1, 135, 165, 136, -1, 135,
769 136, -1, 164, 137, -1, 164, -1, 165, 126, 164,
770 -1, 165, -1, 165, 126, 40, -1, 40, -1, -1,
771 162, 130, 169, 132, -1, 162, 130, 132, -1, 162,
772 138, 30, -1, 162, 133, 169, 134, -1, 162, 135,
773 169, 136, -1, 162, 135, 136, -1, 162, 22, -1,
774 162, 23, -1, 162, 193, -1, 162, 168, -1, 162,
775 24, -1, 147, 141, -1, 148, 18, -1, 4, 25,
776 -1, 4, 26, -1, 150, 21, -1, 146, 128, 167,
777 39, 162, 129, -1, 101, 128, 167, 207, 129, -1,
778 103, 128, 167, 126, 167, 126, 167, 129, -1, 142,
779 128, 167, 126, 167, 129, -1, 143, 128, 167, 126,
780 167, 129, -1, 144, 128, 167, 126, 167, 129, -1,
781 145, 128, 167, 126, 167, 129, -1, 109, 128, 167,
782 126, 167, 129, -1, 110, 128, 167, 126, 167, 126,
783 167, 129, -1, 111, 128, 167, 126, 167, 126, 167,
784 129, -1, 169, 126, 167, -1, 167, -1, 35, -1,
785 36, -1, 172, -1, 172, 188, -1, 172, 190, -1,
786 172, 62, 61, 174, -1, 172, 31, -1, 173, -1,
787 173, 151, 27, 160, -1, 173, 190, -1, 173, 62,
788 61, 174, -1, 173, 151, 152, 170, 167, 158, -1,
789 173, 151, 50, 170, 162, 158, -1, 173, 151, 45,
790 170, 162, 158, -1, 173, 151, 47, 170, 162, 158,
791 -1, 173, 51, 176, -1, 173, 58, 125, 177, -1,
792 -1, 30, -1, 56, -1, 55, -1, 53, 125, 175,
793 -1, 54, 125, 18, -1, 52, 125, 30, -1, 71,
794 125, 30, -1, 130, 178, 132, -1, 178, 126, 30,
795 -1, 30, -1, -1, 28, -1, 30, -1, 179, -1,
796 -1, 162, 180, -1, 182, 126, 181, -1, 181, -1,
797 182, -1, 182, 126, 40, -1, 40, -1, -1, 153,
798 160, 179, 128, 183, 129, 157, 154, -1, 32, -1,
799 135, -1, 152, 184, 185, -1, 33, -1, 136, -1,
800 186, 196, 187, -1, -1, 45, -1, 47, -1, 34,
801 189, 184, -1, -1, 63, -1, 17, -1, 18, -1,
802 21, -1, 25, -1, 26, -1, 22, -1, 23, -1,
803 24, -1, 133, 169, 134, -1, 168, -1, 61, 191,
804 30, 126, 30, -1, 140, -1, 179, -1, 193, -1,
805 192, -1, 162, 194, -1, 196, 197, -1, 197, -1,
806 198, 199, -1, 198, 201, -1, -1, 29, -1, 72,
807 195, -1, 72, 3, -1, 73, 15, 194, -1, 73,
808 4, 194, 126, 15, 194, 126, 15, 194, -1, 74,
809 149, 194, 126, 15, 194, 130, 200, 132, -1, 74,
810 149, 194, 126, 15, 194, 130, 132, -1, 151, 75,
811 153, 160, 194, 128, 204, 129, 39, 15, 194, 76,
812 15, 194, -1, 76, -1, 77, -1, 200, 149, 192,
813 126, 15, 194, -1, 149, 192, 126, 15, 194, -1,
814 151, 206, -1, 162, 130, 194, 126, 194, 132, -1,
815 202, 126, 130, 194, 126, 194, 132, -1, 195, -1,
816 203, 126, 195, -1, 203, -1, -1, 60, 59, -1,
817 59, -1, 142, 162, 194, 126, 194, -1, 143, 162,
818 194, 126, 194, -1, 144, 162, 194, 126, 194, -1,
819 49, 195, -1, 145, 195, 126, 195, -1, 146, 195,
820 39, 162, -1, 103, 195, 126, 195, 126, 195, -1,
821 108, 195, 126, 162, -1, 109, 195, 126, 195, -1,
822 110, 195, 126, 195, 126, 195, -1, 111, 195, 126,
823 195, 126, 195, -1, 102, 202, -1, 205, 153, 160,
824 194, 128, 204, 129, -1, 209, -1, 126, 203, -1,
825 -1, 38, -1, -1, 96, 162, 155, -1, 96, 162,
826 126, 10, 194, 155, -1, 97, 162, 155, -1, 97,
827 162, 126, 10, 194, 155, -1, 98, 195, -1, 208,
828 99, 162, 194, -1, 208, 100, 195, 126, 162, 194,
829 -1, 101, 162, 194, 207, -1
832 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
833 static const unsigned short int yyrline[] =
835 0, 213, 213, 213, 214, 214, 218, 218, 218, 218,
836 218, 218, 218, 218, 218, 219, 219, 219, 220, 220,
837 220, 220, 220, 220, 221, 221, 221, 221, 222, 222,
838 222, 222, 222, 222, 222, 223, 223, 223, 223, 223,
839 223, 228, 228, 228, 228, 229, 229, 229, 229, 230,
840 230, 231, 231, 234, 238, 243, 243, 243, 243, 243,
841 243, 244, 245, 248, 248, 248, 248, 248, 249, 250,
842 255, 260, 261, 264, 265, 273, 279, 280, 283, 284,
843 293, 294, 307, 307, 308, 308, 309, 313, 313, 313,
844 313, 313, 313, 313, 314, 314, 314, 314, 314, 315,
845 315, 316, 322, 327, 333, 340, 347, 353, 357, 367,
846 370, 378, 379, 384, 387, 397, 403, 408, 414, 420,
847 426, 431, 437, 443, 449, 455, 461, 467, 473, 479,
848 485, 493, 507, 513, 518, 523, 528, 533, 541, 546,
849 551, 561, 566, 571, 571, 581, 586, 589, 594, 598,
850 602, 605, 610, 615, 620, 626, 632, 638, 644, 649,
851 654, 659, 661, 661, 664, 669, 676, 681, 688, 695,
852 700, 701, 709, 709, 710, 710, 712, 719, 723, 727,
853 730, 735, 738, 740, 760, 763, 767, 776, 777, 779,
854 787, 788, 789, 793, 806, 807, 810, 810, 810, 810,
855 810, 810, 810, 811, 812, 817, 818, 827, 827, 830,
856 830, 836, 843, 846, 854, 858, 863, 866, 872, 877,
857 882, 887, 894, 900, 906, 919, 924, 930, 935, 943,
858 950, 956, 964, 965, 973, 974, 978, 983, 986, 991,
859 996, 1001, 1006, 1014, 1028, 1033, 1038, 1043, 1048, 1053,
860 1058, 1067, 1072, 1076, 1080, 1081, 1084, 1091, 1098, 1105,
861 1112, 1117, 1124, 1131
865 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
866 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
867 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
868 static const char *const yytname[] =
870 "$end", "error", "$undefined", "VOID", "BOOL", "SBYTE", "UBYTE",
871 "SHORT", "USHORT", "INT", "UINT", "LONG", "ULONG", "FLOAT", "DOUBLE",
872 "LABEL", "OPAQUE", "ESINT64VAL", "EUINT64VAL", "SINTVAL", "UINTVAL",
873 "FPVAL", "NULL_TOK", "UNDEF", "ZEROINITIALIZER", "TRUETOK", "FALSETOK",
874 "TYPE", "VAR_ID", "LABELSTR", "STRINGCONSTANT", "IMPLEMENTATION",
875 "BEGINTOK", "ENDTOK", "DECLARE", "GLOBAL", "CONSTANT", "SECTION",
876 "VOLATILE", "TO", "DOTDOTDOT", "CONST", "INTERNAL", "LINKONCE", "WEAK",
877 "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "APPENDING", "NOT", "EXTERNAL",
878 "TARGET", "TRIPLE", "ENDIAN", "POINTERSIZE", "LITTLE", "BIG", "ALIGN",
879 "DEPLIBS", "CALL", "TAIL", "ASM_TOK", "MODULE", "SIDEEFFECT", "CC_TOK",
880 "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK", "COLDCC_TOK",
881 "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT", "RET", "BR",
882 "SWITCH", "INVOKE", "UNWIND", "UNREACHABLE", "ADD", "SUB", "MUL", "UDIV",
883 "SDIV", "FDIV", "UREM", "SREM", "FREM", "AND", "OR", "XOR", "SETLE",
884 "SETGE", "SETLT", "SETGT", "SETEQ", "SETNE", "MALLOC", "ALLOCA", "FREE",
885 "LOAD", "STORE", "GETELEMENTPTR", "PHI_TOK", "SELECT", "SHL", "SHR",
886 "ASHR", "LSHR", "VAARG", "EXTRACTELEMENT", "INSERTELEMENT",
887 "SHUFFLEVECTOR", "CAST", "TRUNC", "ZEXT", "SEXT", "FPTRUNC", "FPEXT",
888 "FPTOUI", "FPTOSI", "UITOFP", "SITOFP", "PTRTOINT", "INTTOPTR",
889 "BITCAST", "'='", "','", "'\\\\'", "'('", "')'", "'['", "'x'", "']'",
890 "'<'", "'>'", "'{'", "'}'", "'*'", "'c'", "$accept", "IntVal",
891 "EInt64Val", "ArithmeticOps", "LogicalOps", "SetCondOps", "ShiftOps",
892 "CastOps", "SIntType", "UIntType", "IntType", "FPType", "OptAssign",
893 "OptLinkage", "OptCallingConv", "OptAlign", "OptCAlign", "SectionString",
894 "OptSection", "GlobalVarAttributes", "GlobalVarAttribute", "TypesV",
895 "UpRTypesV", "Types", "PrimType", "UpRTypes", "TypeListI",
896 "ArgTypeListI", "ConstVal", "ConstExpr", "ConstVector", "GlobalType",
897 "Module", "DefinitionList", "ConstPool", "AsmBlock", "BigOrLittle",
898 "TargetDefinition", "LibrariesDefinition", "LibList", "Name", "OptName",
899 "ArgVal", "ArgListH", "ArgList", "FunctionHeaderH", "BEGIN",
900 "FunctionHeader", "END", "Function", "FnDeclareLinkage", "FunctionProto",
901 "OptSideEffect", "ConstValueRef", "SymbolicValueRef", "ValueRef",
902 "ResolvedVal", "BasicBlockList", "BasicBlock", "InstructionList",
903 "BBTerminatorInst", "JumpTable", "Inst", "PHIList", "ValueRefList",
904 "ValueRefListE", "OptTailCall", "InstVal", "IndexList", "OptVolatile",
910 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
912 static const unsigned short int yytoknum[] =
914 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
915 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
916 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
917 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
918 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
919 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
920 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
921 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
922 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
923 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
924 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
925 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
926 375, 376, 377, 378, 379, 61, 44, 92, 40, 41,
927 91, 120, 93, 60, 62, 123, 125, 42, 99
931 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
932 static const unsigned char yyr1[] =
934 0, 139, 140, 140, 141, 141, 142, 142, 142, 142,
935 142, 142, 142, 142, 142, 143, 143, 143, 144, 144,
936 144, 144, 144, 144, 145, 145, 145, 145, 146, 146,
937 146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
938 146, 147, 147, 147, 147, 148, 148, 148, 148, 149,
939 149, 150, 150, 151, 151, 152, 152, 152, 152, 152,
940 152, 152, 152, 153, 153, 153, 153, 153, 153, 153,
941 153, 154, 154, 155, 155, 156, 157, 157, 158, 158,
942 159, 159, 160, 160, 161, 161, 162, 163, 163, 163,
943 163, 163, 163, 163, 163, 163, 163, 163, 163, 164,
944 164, 164, 164, 164, 164, 164, 164, 164, 164, 165,
945 165, 166, 166, 166, 166, 167, 167, 167, 167, 167,
946 167, 167, 167, 167, 167, 167, 167, 167, 167, 167,
947 167, 168, 168, 168, 168, 168, 168, 168, 168, 168,
948 168, 169, 169, 170, 170, 171, 172, 172, 172, 172,
949 172, 173, 173, 173, 173, 173, 173, 173, 173, 173,
950 173, 174, 175, 175, 176, 176, 176, 176, 177, 178,
951 178, 178, 179, 179, 180, 180, 181, 182, 182, 183,
952 183, 183, 183, 184, 185, 185, 186, 187, 187, 188,
953 189, 189, 189, 190, 191, 191, 192, 192, 192, 192,
954 192, 192, 192, 192, 192, 192, 192, 193, 193, 194,
955 194, 195, 196, 196, 197, 198, 198, 198, 199, 199,
956 199, 199, 199, 199, 199, 199, 199, 200, 200, 201,
957 202, 202, 203, 203, 204, 204, 205, 205, 206, 206,
958 206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
959 206, 206, 207, 207, 208, 208, 209, 209, 209, 209,
963 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
964 static const unsigned char yyr2[] =
966 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
967 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
968 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
969 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
970 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
971 1, 1, 1, 2, 0, 1, 1, 1, 1, 1,
972 1, 1, 0, 1, 1, 1, 1, 1, 1, 2,
973 0, 0, 2, 0, 3, 2, 0, 1, 0, 3,
974 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
975 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
976 1, 1, 2, 4, 5, 5, 3, 2, 2, 1,
977 3, 1, 3, 1, 0, 4, 3, 3, 4, 4,
978 3, 2, 2, 2, 2, 2, 2, 2, 2, 2,
979 2, 6, 5, 8, 6, 6, 6, 6, 6, 8,
980 8, 3, 1, 1, 1, 1, 2, 2, 4, 2,
981 1, 4, 2, 4, 6, 6, 6, 6, 3, 4,
982 0, 1, 1, 1, 3, 3, 3, 3, 3, 3,
983 1, 0, 1, 1, 1, 0, 2, 3, 1, 1,
984 3, 1, 0, 8, 1, 1, 3, 1, 1, 3,
985 0, 1, 1, 3, 0, 1, 1, 1, 1, 1,
986 1, 1, 1, 1, 3, 1, 5, 1, 1, 1,
987 1, 2, 2, 1, 2, 2, 0, 1, 2, 2,
988 3, 9, 9, 8, 14, 1, 1, 6, 5, 2,
989 6, 7, 1, 3, 1, 0, 2, 1, 5, 5,
990 5, 2, 4, 4, 6, 4, 4, 6, 6, 2,
991 7, 1, 2, 0, 1, 0, 3, 6, 3, 6,
995 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
996 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
997 means the default is an error. */
998 static const unsigned short int yydefact[] =
1000 160, 0, 62, 150, 1, 149, 190, 55, 56, 57,
1001 59, 60, 61, 58, 0, 70, 216, 146, 147, 172,
1002 173, 0, 0, 0, 62, 0, 152, 191, 192, 70,
1003 0, 0, 63, 64, 65, 66, 67, 68, 0, 0,
1004 217, 216, 213, 54, 0, 0, 0, 0, 158, 0,
1005 0, 0, 0, 0, 0, 0, 53, 193, 161, 148,
1006 69, 83, 87, 88, 89, 90, 91, 92, 93, 94,
1007 95, 96, 97, 98, 99, 2, 3, 0, 0, 0,
1008 0, 207, 0, 0, 82, 100, 86, 208, 101, 184,
1009 185, 186, 187, 188, 189, 212, 0, 0, 0, 225,
1010 226, 255, 214, 215, 0, 0, 0, 0, 171, 159,
1011 153, 151, 143, 144, 0, 0, 0, 0, 102, 0,
1012 0, 85, 107, 109, 0, 0, 114, 108, 219, 0,
1013 218, 0, 0, 44, 48, 43, 47, 42, 46, 41,
1014 45, 49, 50, 0, 254, 0, 237, 0, 70, 6,
1015 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1016 17, 18, 19, 20, 21, 22, 23, 0, 0, 0,
1017 0, 0, 0, 24, 25, 26, 27, 0, 0, 0,
1018 0, 40, 28, 29, 30, 31, 32, 33, 34, 35,
1019 36, 37, 38, 39, 0, 0, 0, 0, 0, 70,
1020 229, 0, 251, 166, 163, 162, 164, 165, 167, 170,
1021 0, 78, 78, 78, 87, 88, 89, 90, 91, 92,
1022 93, 94, 95, 96, 97, 0, 0, 0, 0, 78,
1023 0, 0, 0, 106, 182, 113, 111, 0, 196, 197,
1024 198, 201, 202, 203, 199, 200, 194, 0, 0, 0,
1025 0, 0, 0, 0, 0, 0, 0, 0, 205, 210,
1026 209, 211, 0, 220, 0, 241, 236, 0, 73, 73,
1027 260, 0, 0, 249, 0, 0, 0, 0, 0, 0,
1028 0, 0, 0, 0, 0, 0, 0, 0, 168, 0,
1029 156, 157, 155, 128, 129, 4, 5, 126, 127, 130,
1030 121, 122, 125, 0, 0, 0, 0, 124, 123, 154,
1031 84, 84, 110, 181, 175, 178, 179, 0, 0, 103,
1032 195, 0, 0, 0, 0, 0, 0, 142, 0, 0,
1033 0, 0, 0, 0, 0, 0, 0, 0, 256, 0,
1034 258, 253, 0, 0, 0, 0, 0, 0, 0, 0,
1035 0, 0, 0, 0, 0, 0, 0, 169, 0, 0,
1036 80, 78, 116, 0, 0, 120, 0, 117, 104, 105,
1037 174, 176, 0, 76, 112, 0, 253, 0, 0, 0,
1038 0, 0, 204, 0, 0, 0, 0, 0, 0, 0,
1039 0, 0, 0, 0, 0, 263, 0, 0, 0, 245,
1040 246, 0, 0, 0, 0, 0, 242, 243, 0, 261,
1041 0, 75, 81, 79, 115, 118, 119, 180, 177, 77,
1042 71, 0, 0, 0, 0, 0, 0, 141, 0, 0,
1043 0, 0, 0, 0, 0, 235, 73, 74, 73, 232,
1044 252, 0, 0, 0, 0, 0, 238, 239, 240, 235,
1045 0, 0, 183, 206, 132, 0, 0, 0, 0, 0,
1046 0, 0, 0, 0, 0, 0, 234, 0, 0, 257,
1047 259, 0, 0, 0, 244, 247, 248, 0, 262, 72,
1048 0, 138, 0, 0, 134, 135, 136, 137, 131, 0,
1049 223, 0, 0, 0, 233, 230, 0, 250, 0, 0,
1050 0, 221, 0, 222, 0, 0, 231, 133, 139, 140,
1051 0, 0, 0, 0, 0, 0, 228, 0, 0, 227,
1055 /* YYDEFGOTO[NTERM-NUM]. */
1056 static const short int yydefgoto[] =
1058 -1, 81, 297, 253, 254, 255, 256, 257, 225, 226,
1059 143, 227, 24, 15, 38, 452, 338, 360, 420, 290,
1060 361, 82, 83, 228, 85, 86, 124, 237, 327, 258,
1061 328, 114, 1, 2, 3, 59, 206, 48, 109, 210,
1062 87, 371, 315, 316, 317, 39, 91, 16, 94, 17,
1063 29, 18, 321, 259, 88, 261, 439, 41, 42, 43,
1064 102, 492, 103, 273, 466, 467, 199, 200, 395, 201,
1068 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1070 #define YYPACT_NINF -472
1071 static const short int yypact[] =
1073 -472, 38, 138, 1015, -472, -472, 59, -472, -472, -472,
1074 -472, -472, -472, -472, -2, 80, 35, -472, -472, -472,
1075 -472, -29, -50, 18, 174, -37, -472, -472, -472, 80,
1076 73, 93, -472, -472, -472, -472, -472, -472, 744, -22,
1077 -472, -21, -472, 9, 3, 12, 54, 64, -472, 37,
1078 73, 744, 84, 84, 84, 84, -472, -472, -472, -472,
1079 -472, 62, -472, -472, -472, -472, -472, -472, -472, -472,
1080 -472, -472, -472, -472, -472, -472, -472, 173, 176, 177,
1081 431, -472, 86, 69, -472, -472, -106, -472, -472, -472,
1082 -472, -472, -472, -472, -472, -472, 772, 28, 343, -472,
1083 -472, 1211, -472, -472, 162, 66, 180, 169, 172, -472,
1084 -472, -472, -472, -472, 802, 802, 802, 831, -472, 72,
1085 74, -472, -472, -106, -46, 76, 504, -472, 62, 1011,
1086 -472, 1011, 1011, -472, -472, -472, -472, -472, -472, -472,
1087 -472, -472, -472, 1011, -472, 802, -472, 148, 80, -472,
1088 -472, -472, -472, -472, -472, -472, -472, -472, -472, -472,
1089 -472, -472, -472, -472, -472, -472, -472, 802, 802, 802,
1090 802, 802, 802, -472, -472, -472, -472, 802, 802, 802,
1091 802, -472, -472, -472, -472, -472, -472, -472, -472, -472,
1092 -472, -472, -472, -472, 802, 802, 802, 802, 802, 80,
1093 -472, 24, -472, -472, -472, -472, -472, -472, -472, -472,
1094 -70, 83, 83, 83, 101, 118, 192, 137, 193, 147,
1095 194, 153, 195, 204, 207, 170, 197, 209, 889, 83,
1096 802, 802, 802, -472, 565, -472, 105, 103, -472, -472,
1097 -472, -472, -472, -472, -472, -472, 171, 107, 108, 109,
1098 110, 113, 831, 114, 115, 116, 117, 122, -472, -472,
1099 -472, -472, 127, -472, 128, -472, -472, 744, 129, 130,
1100 -472, 1011, 132, 131, 133, 144, 145, 152, 154, 1011,
1101 1011, 1011, 155, 219, 744, 802, 802, 243, -472, -16,
1102 -472, -472, -472, -472, -472, -472, -472, -472, -472, -472,
1103 -472, -472, -472, 610, 831, 476, 244, -472, -472, -472,
1104 -102, -32, -106, -472, 86, -472, 156, 150, 638, -472,
1105 -472, 253, 831, 831, 831, 831, 831, -472, -90, 831,
1106 831, 831, 831, 831, 269, 272, 1011, 4, -472, 17,
1107 -472, 163, 1011, 161, 802, 802, 802, 802, 802, 166,
1108 167, 178, 802, 802, 1011, 1011, 179, -472, 265, 278,
1109 -472, 83, -472, -39, -71, -472, -35, -472, -472, -472,
1110 -472, -472, 698, 260, -472, 185, 163, 186, 203, 205,
1111 206, 831, -472, 210, 211, 213, 214, 259, 1011, 1011,
1112 175, 1011, 281, 1011, 802, -472, 215, 1011, 216, -472,
1113 -472, 217, 218, 1011, 1011, 1011, -472, -472, 202, -472,
1114 802, -472, -472, -472, -472, -472, -472, -472, -472, -472,
1115 266, 303, 228, 831, 831, 831, 831, -472, 831, 831,
1116 831, 831, 802, 220, 229, 802, 232, -472, 232, -472,
1117 234, 1011, 236, 802, 802, 802, -472, -472, -472, 802,
1118 1011, 317, -472, -472, -472, 240, 238, 245, 247, 246,
1119 248, 249, 250, 251, 359, 42, 234, 252, 325, -472,
1120 -472, 802, 255, 1011, -472, -472, -472, 254, -472, -472,
1121 831, -472, 831, 831, -472, -472, -472, -472, -472, 1011,
1122 -472, 1124, 61, 349, -472, -472, 258, -472, 264, 270,
1123 271, -472, 275, -472, 1124, 383, -472, -472, -472, -472,
1124 387, 277, 1011, 1011, 389, 332, -472, 1011, 397, -472,
1128 /* YYPGOTO[NTERM-NUM]. */
1129 static const short int yypgoto[] =
1131 -472, -472, -472, 312, 314, 315, 321, 326, -97, -96,
1132 -446, -472, 385, 405, -139, -472, -263, 57, -472, -195,
1133 -472, -44, -472, -38, -472, -69, 305, -472, -5, 221,
1134 -209, 55, -472, -472, -472, 382, -472, -472, -472, -472,
1135 2, -472, 81, -472, -472, 419, -472, -472, -472, -472,
1136 -472, 449, -472, -471, -103, -128, -80, -472, 413, -472,
1137 -472, -472, -472, -472, 63, 6, -472, -472, 82, -472,
1141 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1142 positive, shift that token. If negative, reduce the rule which
1143 number is the opposite. If zero, do what YYDEFACT says.
1144 If YYTABLE_NINF, syntax error. */
1145 #define YYTABLE_NINF -146
1146 static const short int yytable[] =
1148 84, 141, 142, 262, 263, 25, 340, 111, 40, 267,
1149 89, 123, 92, 84, 391, 264, 130, 291, 292, 491,
1150 502, 358, -84, 44, 45, 46, 260, 393, 260, 260,
1151 368, 127, 131, 511, 309, 127, 381, 19, 4, 20,
1152 260, 359, 47, 132, 382, 25, 504, 133, 134, 135,
1153 136, 137, 138, 139, 140, 381, 287, 123, 129, 30,
1154 284, 392, 288, 415, 40, 265, 133, 134, 135, 136,
1155 137, 138, 139, 140, 392, 49, 211, 212, 213, 50,
1156 232, 96, 97, 98, 125, 99, 100, 381, 56, 270,
1157 233, 381, 274, 414, 363, 364, 366, 275, 276, 277,
1158 278, 416, 369, 58, 27, 127, 28, 129, 115, 116,
1159 117, 60, 229, 90, 19, 93, 20, 282, 283, 112,
1160 113, 204, 205, 285, 286, 308, 293, 294, 104, 268,
1161 269, 129, 271, 272, 129, -44, -44, 105, -145, 129,
1162 129, 129, 129, 341, 31, 32, 33, 34, 35, 36,
1163 37, 349, 350, 351, -43, -43, 279, 280, 281, 129,
1164 129, 310, 311, 312, -42, -42, 413, 108, 260, 5,
1165 -41, -41, 6, 469, 490, 470, 260, 260, 260, 106,
1166 7, 8, 9, 10, 11, 12, 13, 295, 296, 107,
1167 -85, 118, 203, 503, 119, 120, 314, 126, 207, 208,
1168 14, 51, 209, 230, 234, 231, 356, 266, 390, 289,
1169 -48, -47, -46, -45, 396, 298, 7, 8, 9, 52,
1170 11, 53, 13, 336, 54, -51, 408, 409, -52, 84,
1171 299, 318, 319, 260, 320, 322, 323, 324, 325, 260,
1172 354, 326, 329, 330, 331, 332, 84, 355, 129, 312,
1173 333, 260, 260, 334, 335, 337, 339, 343, 353, 344,
1174 433, 434, 342, 436, 398, 438, 400, 401, 402, 442,
1175 345, 346, 406, 357, 367, 446, 447, 448, 347, 373,
1176 348, 352, 372, 375, 388, 260, 260, 389, 260, 394,
1177 260, 397, 403, 404, 260, 411, 412, 358, 432, 437,
1178 260, 260, 260, 435, 405, 410, 129, 399, 129, 129,
1179 129, 421, 423, 472, 129, 407, 370, 376, 377, 378,
1180 379, 380, 478, 451, 383, 384, 385, 386, 387, 424,
1181 449, 425, 426, 453, 314, 479, 428, 429, 260, 430,
1182 431, 441, 443, 444, 445, 496, 464, 260, 133, 134,
1183 135, 136, 137, 138, 139, 140, 129, 454, 468, 465,
1184 471, 501, 473, 474, 475, 476, 480, 481, 141, 142,
1185 260, 482, 450, 483, 489, 484, 427, 485, 486, 487,
1186 488, 493, 392, 497, 515, 516, 260, 495, 505, 519,
1187 506, 494, 521, 507, 463, 141, 142, 129, 512, 508,
1188 509, 510, 513, 514, 517, 129, 129, 129, 518, 260,
1189 260, 129, 520, 194, 260, 195, 196, 260, 455, 456,
1190 457, 458, 197, 459, 460, 461, 462, 198, 101, 55,
1191 419, 236, 110, 129, 121, 62, 63, 64, 65, 66,
1192 67, 68, 69, 70, 71, 72, 73, 74, 57, 307,
1193 75, 76, 26, 418, 95, 477, 0, 440, 422, 19,
1194 0, 20, 0, 0, 0, 0, 0, 0, 0, 0,
1195 0, 0, 0, 0, 0, 498, 0, 499, 500, 121,
1196 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
1197 224, 73, 74, 0, 0, 75, 76, 0, 0, 0,
1198 0, 0, 0, 0, 19, 0, 20, 121, 62, 63,
1199 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
1200 74, 0, 0, 75, 76, 0, 0, 0, 0, 0,
1201 0, 0, 19, 0, 20, 0, 0, 0, 0, 0,
1202 0, 0, 0, 0, 235, 0, 0, 0, 0, 0,
1203 0, 0, 0, 0, 0, 0, 0, 0, 77, 0,
1204 0, 78, 0, 0, 79, 0, 80, 122, 121, 62,
1205 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
1206 73, 74, 0, 0, 75, 76, 0, 0, 0, 0,
1207 0, 0, 0, 19, 0, 20, 0, 0, 0, 0,
1208 0, 0, 0, 77, 0, 313, 78, 0, 0, 79,
1209 0, 80, 365, 121, 214, 215, 216, 217, 218, 219,
1210 220, 221, 222, 223, 224, 73, 74, 0, 0, 75,
1211 76, 77, 0, 0, 78, 0, 0, 79, 19, 80,
1212 20, 121, 62, 63, 64, 65, 66, 67, 68, 69,
1213 70, 71, 72, 73, 74, 0, 0, 75, 76, 0,
1214 0, 0, 0, 0, 0, 0, 19, 0, 20, 0,
1215 0, 0, 0, 0, 0, 0, 0, 0, 374, 0,
1216 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1217 0, 0, 77, 0, 0, 78, 0, 0, 79, 0,
1218 80, 121, 62, 63, 64, 65, 66, 67, 68, 69,
1219 70, 71, 72, 73, 74, 0, 0, 75, 76, 0,
1220 0, 0, 0, 0, 0, 0, 19, 0, 20, 0,
1221 0, 0, 0, 0, 0, 0, 0, 77, 417, 0,
1222 78, 0, 362, 79, 0, 80, 0, 61, 62, 63,
1223 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
1224 74, 0, 0, 75, 76, 77, 0, 0, 78, 0,
1225 0, 79, 19, 80, 20, 128, 62, 63, 64, 65,
1226 66, 67, 68, 69, 70, 71, 72, 73, 74, 0,
1227 0, 75, 76, 0, 0, 0, 0, 0, 0, 0,
1228 19, 0, 20, 0, 0, 121, 62, 63, 64, 65,
1229 66, 67, 68, 69, 70, 71, 72, 73, 74, 0,
1230 0, 75, 76, 0, 0, 77, 0, 0, 78, 0,
1231 19, 79, 20, 80, 121, 214, 215, 216, 217, 218,
1232 219, 220, 221, 222, 223, 224, 73, 74, 0, 0,
1233 75, 76, 0, 0, 0, 0, 0, 0, 0, 19,
1234 0, 20, 0, 0, 0, 0, 0, 0, 0, 0,
1235 0, 77, 0, 0, 78, 0, 0, 79, 0, 80,
1236 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1237 0, 0, 0, 0, 0, 0, 0, 0, 0, 77,
1238 0, 0, 78, 0, 0, 79, 0, 80, 75, 76,
1239 0, 300, 301, 302, 0, 0, 0, 19, 0, 20,
1240 0, 0, 0, 0, 0, 0, 0, 0, 0, 77,
1241 0, 0, 78, 0, 0, 79, 0, 80, 0, 0,
1242 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1243 0, 0, 0, 0, 0, 0, 0, 0, 77, 0,
1244 0, 78, 0, 0, 79, 0, 80, 149, 150, 151,
1245 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
1246 162, 163, 164, 165, 166, 0, 0, 0, 0, 0,
1247 247, 0, 248, 173, 174, 175, 176, 0, 249, 250,
1248 251, 181, 182, 183, 184, 185, 186, 187, 188, 189,
1249 190, 191, 192, 193, 0, 0, 0, 0, 0, 303,
1250 0, 0, 304, 0, 305, 0, 0, 306, 238, 239,
1251 75, 76, 240, 241, 242, 243, 244, 245, 0, 19,
1252 0, 20, -54, 19, 0, 20, 0, 0, 0, 6,
1253 -54, -54, 0, 0, 0, 0, 0, -54, -54, -54,
1254 -54, -54, -54, -54, 0, -54, 21, 0, 0, 0,
1255 0, 0, 246, 22, 0, 0, 0, 23, 0, 0,
1256 0, 0, 0, 0, 0, 0, 0, 0, 0, 149,
1257 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1258 160, 161, 162, 163, 164, 165, 166, 0, 0, 0,
1259 0, 0, 247, 0, 248, 173, 174, 175, 176, 0,
1260 249, 250, 251, 181, 182, 183, 184, 185, 186, 187,
1261 188, 189, 190, 191, 192, 193, 0, 0, 0, 0,
1262 0, 238, 239, 0, 252, 240, 241, 242, 243, 244,
1263 245, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1264 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1265 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1266 0, 0, 0, 0, 0, 246, 0, 0, 0, 0,
1267 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1268 0, 0, 149, 150, 151, 152, 153, 154, 155, 156,
1269 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
1270 0, 0, 0, 0, 0, 247, 0, 248, 173, 174,
1271 175, 176, 0, 249, 250, 251, 181, 182, 183, 184,
1272 185, 186, 187, 188, 189, 190, 191, 192, 193, 144,
1273 0, 0, 0, 0, 0, 0, 0, 252, 0, 0,
1274 145, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1275 146, 147, 0, 0, 0, 0, 0, 0, 0, 0,
1276 0, 0, 0, 0, 0, 0, 148, 0, 0, 149,
1277 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1278 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
1279 0, 0, 170, 171, 172, 173, 174, 175, 176, 177,
1280 178, 179, 180, 181, 182, 183, 184, 185, 186, 187,
1281 188, 189, 190, 191, 192, 193
1284 static const short int yycheck[] =
1286 38, 98, 98, 131, 132, 3, 269, 51, 29, 148,
1287 32, 80, 33, 51, 10, 143, 96, 212, 213, 465,
1288 491, 37, 128, 52, 53, 54, 129, 10, 131, 132,
1289 132, 137, 4, 504, 229, 137, 126, 28, 0, 30,
1290 143, 57, 71, 15, 134, 43, 492, 5, 6, 7,
1291 8, 9, 10, 11, 12, 126, 126, 126, 96, 61,
1292 199, 57, 132, 134, 29, 145, 5, 6, 7, 8,
1293 9, 10, 11, 12, 57, 125, 114, 115, 116, 61,
1294 126, 72, 73, 74, 82, 76, 77, 126, 125, 169,
1295 136, 126, 172, 132, 303, 304, 305, 177, 178, 179,
1296 180, 136, 134, 30, 45, 137, 47, 145, 53, 54,
1297 55, 18, 117, 135, 28, 136, 30, 197, 198, 35,
1298 36, 55, 56, 99, 100, 228, 25, 26, 125, 167,
1299 168, 169, 170, 171, 172, 17, 18, 125, 0, 177,
1300 178, 179, 180, 271, 64, 65, 66, 67, 68, 69,
1301 70, 279, 280, 281, 17, 18, 194, 195, 196, 197,
1302 198, 230, 231, 232, 17, 18, 361, 130, 271, 31,
1303 17, 18, 34, 436, 132, 438, 279, 280, 281, 125,
1304 42, 43, 44, 45, 46, 47, 48, 17, 18, 125,
1305 128, 18, 30, 132, 18, 18, 234, 128, 18, 30,
1306 62, 27, 30, 131, 128, 131, 286, 59, 336, 126,
1307 18, 18, 18, 18, 342, 18, 42, 43, 44, 45,
1308 46, 47, 48, 267, 50, 21, 354, 355, 21, 267,
1309 21, 126, 129, 336, 63, 128, 128, 128, 128, 342,
1310 284, 128, 128, 128, 128, 128, 284, 285, 286, 318,
1311 128, 354, 355, 126, 126, 126, 126, 126, 39, 126,
1312 388, 389, 130, 391, 344, 393, 346, 347, 348, 397,
1313 126, 126, 352, 30, 30, 403, 404, 405, 126, 129,
1314 126, 126, 126, 30, 15, 388, 389, 15, 391, 126,
1315 393, 130, 126, 126, 397, 30, 18, 37, 39, 18,
1316 403, 404, 405, 128, 126, 126, 344, 345, 346, 347,
1317 348, 126, 126, 441, 352, 353, 314, 322, 323, 324,
1318 325, 326, 450, 57, 329, 330, 331, 332, 333, 126,
1319 128, 126, 126, 30, 372, 18, 126, 126, 441, 126,
1320 126, 126, 126, 126, 126, 473, 126, 450, 5, 6,
1321 7, 8, 9, 10, 11, 12, 394, 129, 126, 130,
1322 126, 489, 126, 443, 444, 445, 126, 129, 465, 465,
1323 473, 126, 410, 126, 15, 129, 381, 129, 129, 129,
1324 129, 129, 57, 129, 512, 513, 489, 132, 39, 517,
1325 132, 471, 520, 129, 432, 492, 492, 435, 15, 129,
1326 129, 126, 15, 126, 15, 443, 444, 445, 76, 512,
1327 513, 449, 15, 101, 517, 101, 101, 520, 423, 424,
1328 425, 426, 101, 428, 429, 430, 431, 101, 43, 24,
1329 373, 126, 50, 471, 3, 4, 5, 6, 7, 8,
1330 9, 10, 11, 12, 13, 14, 15, 16, 29, 228,
1331 19, 20, 3, 372, 41, 449, -1, 394, 376, 28,
1332 -1, 30, -1, -1, -1, -1, -1, -1, -1, -1,
1333 -1, -1, -1, -1, -1, 480, -1, 482, 483, 3,
1334 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1335 14, 15, 16, -1, -1, 19, 20, -1, -1, -1,
1336 -1, -1, -1, -1, 28, -1, 30, 3, 4, 5,
1337 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1338 16, -1, -1, 19, 20, -1, -1, -1, -1, -1,
1339 -1, -1, 28, -1, 30, -1, -1, -1, -1, -1,
1340 -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
1341 -1, -1, -1, -1, -1, -1, -1, -1, 127, -1,
1342 -1, 130, -1, -1, 133, -1, 135, 136, 3, 4,
1343 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1344 15, 16, -1, -1, 19, 20, -1, -1, -1, -1,
1345 -1, -1, -1, 28, -1, 30, -1, -1, -1, -1,
1346 -1, -1, -1, 127, -1, 40, 130, -1, -1, 133,
1347 -1, 135, 136, 3, 4, 5, 6, 7, 8, 9,
1348 10, 11, 12, 13, 14, 15, 16, -1, -1, 19,
1349 20, 127, -1, -1, 130, -1, -1, 133, 28, 135,
1350 30, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1351 12, 13, 14, 15, 16, -1, -1, 19, 20, -1,
1352 -1, -1, -1, -1, -1, -1, 28, -1, 30, -1,
1353 -1, -1, -1, -1, -1, -1, -1, -1, 40, -1,
1354 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1355 -1, -1, 127, -1, -1, 130, -1, -1, 133, -1,
1356 135, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1357 12, 13, 14, 15, 16, -1, -1, 19, 20, -1,
1358 -1, -1, -1, -1, -1, -1, 28, -1, 30, -1,
1359 -1, -1, -1, -1, -1, -1, -1, 127, 40, -1,
1360 130, -1, 132, 133, -1, 135, -1, 3, 4, 5,
1361 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1362 16, -1, -1, 19, 20, 127, -1, -1, 130, -1,
1363 -1, 133, 28, 135, 30, 3, 4, 5, 6, 7,
1364 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
1365 -1, 19, 20, -1, -1, -1, -1, -1, -1, -1,
1366 28, -1, 30, -1, -1, 3, 4, 5, 6, 7,
1367 8, 9, 10, 11, 12, 13, 14, 15, 16, -1,
1368 -1, 19, 20, -1, -1, 127, -1, -1, 130, -1,
1369 28, 133, 30, 135, 3, 4, 5, 6, 7, 8,
1370 9, 10, 11, 12, 13, 14, 15, 16, -1, -1,
1371 19, 20, -1, -1, -1, -1, -1, -1, -1, 28,
1372 -1, 30, -1, -1, -1, -1, -1, -1, -1, -1,
1373 -1, 127, -1, -1, 130, -1, -1, 133, -1, 135,
1374 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1375 -1, -1, -1, -1, -1, -1, -1, -1, -1, 127,
1376 -1, -1, 130, -1, -1, 133, -1, 135, 19, 20,
1377 -1, 22, 23, 24, -1, -1, -1, 28, -1, 30,
1378 -1, -1, -1, -1, -1, -1, -1, -1, -1, 127,
1379 -1, -1, 130, -1, -1, 133, -1, 135, -1, -1,
1380 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1381 -1, -1, -1, -1, -1, -1, -1, -1, 127, -1,
1382 -1, 130, -1, -1, 133, -1, 135, 78, 79, 80,
1383 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
1384 91, 92, 93, 94, 95, -1, -1, -1, -1, -1,
1385 101, -1, 103, 104, 105, 106, 107, -1, 109, 110,
1386 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
1387 121, 122, 123, 124, -1, -1, -1, -1, -1, 130,
1388 -1, -1, 133, -1, 135, -1, -1, 138, 17, 18,
1389 19, 20, 21, 22, 23, 24, 25, 26, -1, 28,
1390 -1, 30, 27, 28, -1, 30, -1, -1, -1, 34,
1391 35, 36, -1, -1, -1, -1, -1, 42, 43, 44,
1392 45, 46, 47, 48, -1, 50, 51, -1, -1, -1,
1393 -1, -1, 61, 58, -1, -1, -1, 62, -1, -1,
1394 -1, -1, -1, -1, -1, -1, -1, -1, -1, 78,
1395 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1396 89, 90, 91, 92, 93, 94, 95, -1, -1, -1,
1397 -1, -1, 101, -1, 103, 104, 105, 106, 107, -1,
1398 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
1399 119, 120, 121, 122, 123, 124, -1, -1, -1, -1,
1400 -1, 17, 18, -1, 133, 21, 22, 23, 24, 25,
1401 26, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1402 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1403 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1404 -1, -1, -1, -1, -1, 61, -1, -1, -1, -1,
1405 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1406 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
1407 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1408 -1, -1, -1, -1, -1, 101, -1, 103, 104, 105,
1409 106, 107, -1, 109, 110, 111, 112, 113, 114, 115,
1410 116, 117, 118, 119, 120, 121, 122, 123, 124, 38,
1411 -1, -1, -1, -1, -1, -1, -1, 133, -1, -1,
1412 49, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1413 59, 60, -1, -1, -1, -1, -1, -1, -1, -1,
1414 -1, -1, -1, -1, -1, -1, 75, -1, -1, 78,
1415 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1416 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
1417 -1, -1, 101, 102, 103, 104, 105, 106, 107, 108,
1418 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
1419 119, 120, 121, 122, 123, 124
1422 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1423 symbol of state STATE-NUM. */
1424 static const unsigned char yystos[] =
1426 0, 171, 172, 173, 0, 31, 34, 42, 43, 44,
1427 45, 46, 47, 48, 62, 152, 186, 188, 190, 28,
1428 30, 51, 58, 62, 151, 179, 190, 45, 47, 189,
1429 61, 64, 65, 66, 67, 68, 69, 70, 153, 184,
1430 29, 196, 197, 198, 52, 53, 54, 71, 176, 125,
1431 61, 27, 45, 47, 50, 152, 125, 184, 30, 174,
1432 18, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1433 12, 13, 14, 15, 16, 19, 20, 127, 130, 133,
1434 135, 140, 160, 161, 162, 163, 164, 179, 193, 32,
1435 135, 185, 33, 136, 187, 197, 72, 73, 74, 76,
1436 77, 151, 199, 201, 125, 125, 125, 125, 130, 177,
1437 174, 160, 35, 36, 170, 170, 170, 170, 18, 18,
1438 18, 3, 136, 164, 165, 179, 128, 137, 3, 162,
1439 195, 4, 15, 5, 6, 7, 8, 9, 10, 11,
1440 12, 147, 148, 149, 38, 49, 59, 60, 75, 78,
1441 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1442 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
1443 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
1444 111, 112, 113, 114, 115, 116, 117, 118, 119, 120,
1445 121, 122, 123, 124, 142, 143, 144, 145, 146, 205,
1446 206, 208, 209, 30, 55, 56, 175, 18, 30, 30,
1447 178, 162, 162, 162, 4, 5, 6, 7, 8, 9,
1448 10, 11, 12, 13, 14, 147, 148, 150, 162, 167,
1449 131, 131, 126, 136, 128, 40, 165, 166, 17, 18,
1450 21, 22, 23, 24, 25, 26, 61, 101, 103, 109,
1451 110, 111, 133, 142, 143, 144, 145, 146, 168, 192,
1452 193, 194, 194, 194, 194, 195, 59, 153, 162, 162,
1453 195, 162, 162, 202, 195, 195, 195, 195, 195, 162,
1454 162, 162, 195, 195, 153, 99, 100, 126, 132, 126,
1455 158, 158, 158, 25, 26, 17, 18, 141, 18, 21,
1456 22, 23, 24, 130, 133, 135, 138, 168, 193, 158,
1457 164, 164, 164, 40, 162, 181, 182, 183, 126, 129,
1458 63, 191, 128, 128, 128, 128, 128, 167, 169, 128,
1459 128, 128, 128, 128, 126, 126, 160, 126, 155, 126,
1460 155, 194, 130, 126, 126, 126, 126, 126, 126, 194,
1461 194, 194, 126, 39, 160, 162, 195, 30, 37, 57,
1462 156, 159, 132, 169, 169, 136, 169, 30, 132, 134,
1463 179, 180, 126, 129, 40, 30, 167, 167, 167, 167,
1464 167, 126, 134, 167, 167, 167, 167, 167, 15, 15,
1465 194, 10, 57, 10, 126, 207, 194, 130, 195, 162,
1466 195, 195, 195, 126, 126, 126, 195, 162, 194, 194,
1467 126, 30, 18, 158, 132, 134, 136, 40, 181, 156,
1468 157, 126, 207, 126, 126, 126, 126, 167, 126, 126,
1469 126, 126, 39, 194, 194, 128, 194, 18, 194, 195,
1470 203, 126, 194, 126, 126, 126, 194, 194, 194, 128,
1471 162, 57, 154, 30, 129, 167, 167, 167, 167, 167,
1472 167, 167, 167, 162, 126, 130, 203, 204, 126, 155,
1473 155, 126, 194, 126, 195, 195, 195, 204, 194, 18,
1474 126, 129, 126, 126, 129, 129, 129, 129, 129, 15,
1475 132, 149, 200, 129, 195, 132, 194, 129, 167, 167,
1476 167, 194, 192, 132, 149, 39, 132, 129, 129, 129,
1477 126, 192, 15, 15, 126, 194, 194, 15, 76, 194,
1481 #define yyerrok (yyerrstatus = 0)
1482 #define yyclearin (yychar = YYEMPTY)
1483 #define YYEMPTY (-2)
1486 #define YYACCEPT goto yyacceptlab
1487 #define YYABORT goto yyabortlab
1488 #define YYERROR goto yyerrorlab
1491 /* Like YYERROR except do call yyerror. This remains here temporarily
1492 to ease the transition to the new meaning of YYERROR, for GCC.
1493 Once GCC version 2 has supplanted version 1, this can go. */
1495 #define YYFAIL goto yyerrlab
1497 #define YYRECOVERING() (!!yyerrstatus)
1499 #define YYBACKUP(Token, Value) \
1501 if (yychar == YYEMPTY && yylen == 1) \
1505 yytoken = YYTRANSLATE (yychar); \
1511 yyerror (YY_("syntax error: cannot back up")); \
1518 #define YYERRCODE 256
1521 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1522 If N is 0, then set CURRENT to the empty location which ends
1523 the previous symbol: RHS[0] (always defined). */
1525 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1526 #ifndef YYLLOC_DEFAULT
1527 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1531 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1532 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1533 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1534 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1538 (Current).first_line = (Current).last_line = \
1539 YYRHSLOC (Rhs, 0).last_line; \
1540 (Current).first_column = (Current).last_column = \
1541 YYRHSLOC (Rhs, 0).last_column; \
1547 /* YY_LOCATION_PRINT -- Print the location on the stream.
1548 This macro was not mandated originally: define only if we know
1549 we won't break user code: when these are the locations we know. */
1551 #ifndef YY_LOCATION_PRINT
1552 # if YYLTYPE_IS_TRIVIAL
1553 # define YY_LOCATION_PRINT(File, Loc) \
1554 fprintf (File, "%d.%d-%d.%d", \
1555 (Loc).first_line, (Loc).first_column, \
1556 (Loc).last_line, (Loc).last_column)
1558 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1563 /* YYLEX -- calling `yylex' with the right arguments. */
1566 # define YYLEX yylex (YYLEX_PARAM)
1568 # define YYLEX yylex ()
1571 /* Enable debugging if requested. */
1575 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1576 # define YYFPRINTF fprintf
1579 # define YYDPRINTF(Args) \
1585 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1589 YYFPRINTF (stderr, "%s ", Title); \
1590 yysymprint (stderr, \
1592 YYFPRINTF (stderr, "\n"); \
1596 /*------------------------------------------------------------------.
1597 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1599 `------------------------------------------------------------------*/
1601 #if defined (__STDC__) || defined (__cplusplus)
1603 yy_stack_print (short int *bottom, short int *top)
1606 yy_stack_print (bottom, top)
1611 YYFPRINTF (stderr, "Stack now");
1612 for (/* Nothing. */; bottom <= top; ++bottom)
1613 YYFPRINTF (stderr, " %d", *bottom);
1614 YYFPRINTF (stderr, "\n");
1617 # define YY_STACK_PRINT(Bottom, Top) \
1620 yy_stack_print ((Bottom), (Top)); \
1624 /*------------------------------------------------.
1625 | Report that the YYRULE is going to be reduced. |
1626 `------------------------------------------------*/
1628 #if defined (__STDC__) || defined (__cplusplus)
1630 yy_reduce_print (int yyrule)
1633 yy_reduce_print (yyrule)
1638 unsigned long int yylno = yyrline[yyrule];
1639 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
1641 /* Print the symbols being reduced, and their result. */
1642 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
1643 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1644 YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
1647 # define YY_REDUCE_PRINT(Rule) \
1650 yy_reduce_print (Rule); \
1653 /* Nonzero means print parse trace. It is left uninitialized so that
1654 multiple parsers can coexist. */
1656 #else /* !YYDEBUG */
1657 # define YYDPRINTF(Args)
1658 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1659 # define YY_STACK_PRINT(Bottom, Top)
1660 # define YY_REDUCE_PRINT(Rule)
1661 #endif /* !YYDEBUG */
1664 /* YYINITDEPTH -- initial size of the parser's stacks. */
1666 # define YYINITDEPTH 200
1669 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1670 if the built-in stack extension method is used).
1672 Do not make this value too large; the results are undefined if
1673 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1674 evaluated with infinite-precision integer arithmetic. */
1677 # define YYMAXDEPTH 10000
1685 # if defined (__GLIBC__) && defined (_STRING_H)
1686 # define yystrlen strlen
1688 /* Return the length of YYSTR. */
1690 # if defined (__STDC__) || defined (__cplusplus)
1691 yystrlen (const char *yystr)
1697 const char *yys = yystr;
1699 while (*yys++ != '\0')
1702 return yys - yystr - 1;
1708 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1709 # define yystpcpy stpcpy
1711 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1714 # if defined (__STDC__) || defined (__cplusplus)
1715 yystpcpy (char *yydest, const char *yysrc)
1717 yystpcpy (yydest, yysrc)
1723 const char *yys = yysrc;
1725 while ((*yyd++ = *yys++) != '\0')
1734 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1735 quotes and backslashes, so that it's suitable for yyerror. The
1736 heuristic is that double-quoting is unnecessary unless the string
1737 contains an apostrophe, a comma, or backslash (other than
1738 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1739 null, do not copy; instead, return the length of what the result
1742 yytnamerr (char *yyres, const char *yystr)
1747 char const *yyp = yystr;
1754 goto do_not_strip_quotes;
1758 goto do_not_strip_quotes;
1771 do_not_strip_quotes: ;
1775 return yystrlen (yystr);
1777 return yystpcpy (yyres, yystr) - yyres;
1781 #endif /* YYERROR_VERBOSE */
1786 /*--------------------------------.
1787 | Print this symbol on YYOUTPUT. |
1788 `--------------------------------*/
1790 #if defined (__STDC__) || defined (__cplusplus)
1792 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
1795 yysymprint (yyoutput, yytype, yyvaluep)
1801 /* Pacify ``unused variable'' warnings. */
1804 if (yytype < YYNTOKENS)
1805 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1807 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1811 if (yytype < YYNTOKENS)
1812 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1819 YYFPRINTF (yyoutput, ")");
1822 #endif /* ! YYDEBUG */
1823 /*-----------------------------------------------.
1824 | Release the memory associated to this symbol. |
1825 `-----------------------------------------------*/
1827 #if defined (__STDC__) || defined (__cplusplus)
1829 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1832 yydestruct (yymsg, yytype, yyvaluep)
1838 /* Pacify ``unused variable'' warnings. */
1843 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1854 /* Prevent warnings from -Wmissing-prototypes. */
1856 #ifdef YYPARSE_PARAM
1857 # if defined (__STDC__) || defined (__cplusplus)
1858 int yyparse (void *YYPARSE_PARAM);
1862 #else /* ! YYPARSE_PARAM */
1863 #if defined (__STDC__) || defined (__cplusplus)
1868 #endif /* ! YYPARSE_PARAM */
1872 /* The look-ahead symbol. */
1875 /* The semantic value of the look-ahead symbol. */
1878 /* Number of syntax errors so far. */
1887 #ifdef YYPARSE_PARAM
1888 # if defined (__STDC__) || defined (__cplusplus)
1889 int yyparse (void *YYPARSE_PARAM)
1891 int yyparse (YYPARSE_PARAM)
1892 void *YYPARSE_PARAM;
1894 #else /* ! YYPARSE_PARAM */
1895 #if defined (__STDC__) || defined (__cplusplus)
1909 /* Number of tokens to shift before error messages enabled. */
1911 /* Look-ahead token as an internal (translated) token number. */
1914 /* Three stacks and their tools:
1915 `yyss': related to states,
1916 `yyvs': related to semantic values,
1917 `yyls': related to locations.
1919 Refer to the stacks thru separate pointers, to allow yyoverflow
1920 to reallocate them elsewhere. */
1922 /* The state stack. */
1923 short int yyssa[YYINITDEPTH];
1924 short int *yyss = yyssa;
1927 /* The semantic value stack. */
1928 YYSTYPE yyvsa[YYINITDEPTH];
1929 YYSTYPE *yyvs = yyvsa;
1934 #define YYPOPSTACK (yyvsp--, yyssp--)
1936 YYSIZE_T yystacksize = YYINITDEPTH;
1938 /* The variables used to return semantic value and location from the
1943 /* When reducing, the number of symbols on the RHS of the reduced
1947 YYDPRINTF ((stderr, "Starting parse\n"));
1952 yychar = YYEMPTY; /* Cause a token to be read. */
1954 /* Initialize stack pointers.
1955 Waste one element of value and location stack
1956 so that they stay on the same level as the state stack.
1957 The wasted elements are never initialized. */
1964 /*------------------------------------------------------------.
1965 | yynewstate -- Push a new state, which is found in yystate. |
1966 `------------------------------------------------------------*/
1968 /* In all cases, when you get here, the value and location stacks
1969 have just been pushed. so pushing a state here evens the stacks.
1976 if (yyss + yystacksize - 1 <= yyssp)
1978 /* Get the current used size of the three stacks, in elements. */
1979 YYSIZE_T yysize = yyssp - yyss + 1;
1983 /* Give user a chance to reallocate the stack. Use copies of
1984 these so that the &'s don't force the real ones into
1986 YYSTYPE *yyvs1 = yyvs;
1987 short int *yyss1 = yyss;
1990 /* Each stack pointer address is followed by the size of the
1991 data in use in that stack, in bytes. This used to be a
1992 conditional around just the two extra args, but that might
1993 be undefined if yyoverflow is a macro. */
1994 yyoverflow (YY_("memory exhausted"),
1995 &yyss1, yysize * sizeof (*yyssp),
1996 &yyvs1, yysize * sizeof (*yyvsp),
2003 #else /* no yyoverflow */
2004 # ifndef YYSTACK_RELOCATE
2005 goto yyexhaustedlab;
2007 /* Extend the stack our own way. */
2008 if (YYMAXDEPTH <= yystacksize)
2009 goto yyexhaustedlab;
2011 if (YYMAXDEPTH < yystacksize)
2012 yystacksize = YYMAXDEPTH;
2015 short int *yyss1 = yyss;
2016 union yyalloc *yyptr =
2017 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2019 goto yyexhaustedlab;
2020 YYSTACK_RELOCATE (yyss);
2021 YYSTACK_RELOCATE (yyvs);
2023 # undef YYSTACK_RELOCATE
2025 YYSTACK_FREE (yyss1);
2028 #endif /* no yyoverflow */
2030 yyssp = yyss + yysize - 1;
2031 yyvsp = yyvs + yysize - 1;
2034 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2035 (unsigned long int) yystacksize));
2037 if (yyss + yystacksize - 1 <= yyssp)
2041 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2050 /* Do appropriate processing given the current state. */
2051 /* Read a look-ahead token if we need one and don't already have one. */
2054 /* First try to decide what to do without reference to look-ahead token. */
2056 yyn = yypact[yystate];
2057 if (yyn == YYPACT_NINF)
2060 /* Not known => get a look-ahead token if don't already have one. */
2062 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
2063 if (yychar == YYEMPTY)
2065 YYDPRINTF ((stderr, "Reading a token: "));
2069 if (yychar <= YYEOF)
2071 yychar = yytoken = YYEOF;
2072 YYDPRINTF ((stderr, "Now at end of input.\n"));
2076 yytoken = YYTRANSLATE (yychar);
2077 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2080 /* If the proper action on seeing token YYTOKEN is to reduce or to
2081 detect an error, take that action. */
2083 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2088 if (yyn == 0 || yyn == YYTABLE_NINF)
2097 /* Shift the look-ahead token. */
2098 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2100 /* Discard the token being shifted unless it is eof. */
2101 if (yychar != YYEOF)
2107 /* Count tokens shifted since error; after three, turn off error
2116 /*-----------------------------------------------------------.
2117 | yydefault -- do the default action for the current state. |
2118 `-----------------------------------------------------------*/
2120 yyn = yydefact[yystate];
2126 /*-----------------------------.
2127 | yyreduce -- Do a reduction. |
2128 `-----------------------------*/
2130 /* yyn is the number of a rule to reduce with. */
2133 /* If YYLEN is nonzero, implement the default value of the action:
2136 Otherwise, the following line sets YYVAL to garbage.
2137 This behavior is undocumented and Bison
2138 users should not rely upon it. Assigning to YYVAL
2139 unconditionally makes the parser a bit smaller, and it avoids a
2140 GCC warning that YYVAL may be used uninitialized. */
2141 yyval = yyvsp[1-yylen];
2144 YY_REDUCE_PRINT (yyn);
2148 #line 234 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2150 *(yyvsp[-1].String) += " = ";
2151 (yyval.String) = (yyvsp[-1].String);
2156 #line 238 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2158 (yyval.String) = new std::string("");
2163 #line 245 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2164 { (yyval.String) = new std::string(""); ;}
2168 #line 250 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2170 *(yyvsp[-1].String) += *(yyvsp[0].String);
2171 delete (yyvsp[0].String);
2172 (yyval.String) = (yyvsp[-1].String);
2177 #line 255 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2178 { (yyval.String) = new std::string(""); ;}
2182 #line 260 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2183 { (yyval.String) = new std::string(); ;}
2187 #line 261 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2188 { *(yyvsp[-1].String) += " " + *(yyvsp[0].String); delete (yyvsp[0].String); (yyval.String) = (yyvsp[-1].String); ;}
2192 #line 264 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2193 { (yyval.String) = new std::string(); ;}
2197 #line 265 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2199 (yyvsp[-1].String)->insert(0, ", ");
2200 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2201 delete (yyvsp[0].String);
2202 (yyval.String) = (yyvsp[-1].String);
2207 #line 273 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2209 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2210 delete (yyvsp[0].String);
2211 (yyval.String) = (yyvsp[-1].String);
2216 #line 279 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2217 { (yyval.String) = new std::string(); ;}
2221 #line 283 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2222 { (yyval.String) = new std::string(); ;}
2226 #line 284 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2228 (yyvsp[-1].String)->insert(0, ", ");
2229 if (!(yyvsp[0].String)->empty())
2230 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2231 delete (yyvsp[0].String);
2232 (yyval.String) = (yyvsp[-1].String);
2237 #line 294 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2239 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2240 delete (yyvsp[0].String);
2241 (yyval.String) = (yyvsp[-1].String);
2246 #line 316 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2248 (yyval.Type).newTy = (yyvsp[0].String); (yyval.Type).oldTy = OpaqueTy;
2253 #line 322 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2254 { // Type UpReference
2255 (yyvsp[0].String)->insert(0, "\\");
2256 (yyval.Type).newTy = (yyvsp[0].String);
2257 (yyval.Type).oldTy = OpaqueTy;
2262 #line 327 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2263 { // Function derived type?
2264 *(yyvsp[-3].Type).newTy += "( " + *(yyvsp[-1].String) + " )";
2265 delete (yyvsp[-1].String);
2266 (yyval.Type).newTy = (yyvsp[-3].Type).newTy;
2267 (yyval.Type).oldTy = FunctionTy;
2272 #line 333 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2273 { // Sized array type?
2274 (yyvsp[-3].String)->insert(0,"[ ");
2275 *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " ]";
2276 delete (yyvsp[-1].Type).newTy;
2277 (yyval.Type).newTy = (yyvsp[-3].String);
2278 (yyval.Type).oldTy = ArrayTy;
2283 #line 340 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2284 { // Packed array type?
2285 (yyvsp[-3].String)->insert(0,"< ");
2286 *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " >";
2287 delete (yyvsp[-1].Type).newTy;
2288 (yyval.Type).newTy = (yyvsp[-3].String);
2289 (yyval.Type).oldTy = PackedTy;
2294 #line 347 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2295 { // Structure type?
2296 (yyvsp[-1].String)->insert(0, "{ ");
2297 *(yyvsp[-1].String) += " }";
2298 (yyval.Type).newTy = (yyvsp[-1].String);
2299 (yyval.Type).oldTy = StructTy;
2304 #line 353 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2305 { // Empty structure type?
2306 (yyval.Type).newTy = new std::string("{}");
2307 (yyval.Type).oldTy = StructTy;
2312 #line 357 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2314 *(yyvsp[-1].Type).newTy += '*';
2315 (yyvsp[-1].Type).oldTy = PointerTy;
2316 (yyval.Type) = (yyvsp[-1].Type);
2321 #line 367 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2323 (yyval.String) = (yyvsp[0].Type).newTy;
2328 #line 370 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2330 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Type).newTy;
2331 delete (yyvsp[0].Type).newTy;
2332 (yyval.String) = (yyvsp[-2].String);
2337 #line 379 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2339 *(yyvsp[-2].String) += ", ...";
2340 delete (yyvsp[0].String);
2341 (yyval.String) = (yyvsp[-2].String);
2346 #line 384 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2348 (yyval.String) = (yyvsp[0].String);
2353 #line 387 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2355 (yyval.String) = new std::string();
2360 #line 397 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2361 { // Nonempty unsized arr
2362 (yyval.Const).type = (yyvsp[-3].Type);
2363 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2364 *(yyval.Const).cnst += " [ " + *(yyvsp[-1].String) + " ]";
2365 delete (yyvsp[-1].String);
2370 #line 403 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2372 (yyval.Const).type = (yyvsp[-2].Type);
2373 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2374 *(yyval.Const).cnst += "[ ]";
2379 #line 408 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2381 (yyval.Const).type = (yyvsp[-2].Type);
2382 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2383 *(yyval.Const).cnst += " c" + *(yyvsp[0].String);
2384 delete (yyvsp[0].String);
2389 #line 414 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2390 { // Nonempty unsized arr
2391 (yyval.Const).type = (yyvsp[-3].Type);
2392 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2393 *(yyval.Const).cnst += " < " + *(yyvsp[-1].String) + " >";
2394 delete (yyvsp[-1].String);
2399 #line 420 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2401 (yyval.Const).type = (yyvsp[-3].Type);
2402 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2403 *(yyval.Const).cnst += " { " + *(yyvsp[-1].String) + " }";
2404 delete (yyvsp[-1].String);
2409 #line 426 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2411 (yyval.Const).type = (yyvsp[-2].Type);
2412 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2413 *(yyval.Const).cnst += " {}";
2418 #line 431 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2420 (yyval.Const).type = (yyvsp[-1].Type);
2421 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2422 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2423 delete (yyvsp[0].String);
2428 #line 437 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2430 (yyval.Const).type = (yyvsp[-1].Type);
2431 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2432 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2433 delete (yyvsp[0].String);
2438 #line 443 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2440 (yyval.Const).type = (yyvsp[-1].Type);
2441 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2442 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2443 delete (yyvsp[0].String);
2448 #line 449 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2450 (yyval.Const).type = (yyvsp[-1].Type);
2451 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2452 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2453 delete (yyvsp[0].String);
2458 #line 455 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2460 (yyval.Const).type = (yyvsp[-1].Type);
2461 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2462 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2463 delete (yyvsp[0].String);
2468 #line 461 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2469 { // integral constants
2470 (yyval.Const).type = (yyvsp[-1].Type);
2471 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2472 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2473 delete (yyvsp[0].String);
2478 #line 467 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2479 { // integral constants
2480 (yyval.Const).type = (yyvsp[-1].Type);
2481 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2482 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2483 delete (yyvsp[0].String);
2488 #line 473 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2489 { // Boolean constants
2490 (yyval.Const).type = (yyvsp[-1].Type);
2491 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2492 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2493 delete (yyvsp[0].String);
2498 #line 479 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2499 { // Boolean constants
2500 (yyval.Const).type = (yyvsp[-1].Type);
2501 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2502 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2503 delete (yyvsp[0].String);
2508 #line 485 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2509 { // Float & Double constants
2510 (yyval.Const).type = (yyvsp[-1].Type);
2511 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2512 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2513 delete (yyvsp[0].String);
2518 #line 493 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2520 // We must infer the cast opcode from the types of the operands.
2521 const char *opcode = (yyvsp[-5].String)->c_str();
2522 std::string source = *(yyvsp[-3].Const).cnst;
2523 if (*(yyvsp[-5].String) == "cast") {
2524 std::string upgrade = getCastUpgrade(source, (yyvsp[-3].Const).type, (yyvsp[-1].Type), true);
2525 opcode = getCastOpcode(source, (yyvsp[-3].Const).type, (yyvsp[-1].Type));
2526 if (!upgrade.empty())
2529 (yyval.String) = new std::string(opcode);
2530 *(yyval.String) += "( " + source + " " + *(yyvsp[-2].String) + " " + *(yyvsp[-1].Type).newTy + ")";
2531 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
2536 #line 507 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2538 *(yyvsp[-4].String) += "(" + *(yyvsp[-2].Const).cnst + " " + *(yyvsp[-1].String) + ")";
2539 (yyval.String) = (yyvsp[-4].String);
2540 (yyvsp[-2].Const).destroy();
2541 delete (yyvsp[-1].String);
2546 #line 513 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2548 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2549 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2550 (yyval.String) = (yyvsp[-7].String);
2555 #line 518 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2557 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2558 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2559 (yyval.String) = (yyvsp[-5].String);
2564 #line 523 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2566 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2567 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2568 (yyval.String) = (yyvsp[-5].String);
2573 #line 528 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2575 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2576 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2577 (yyval.String) = (yyvsp[-5].String);
2582 #line 533 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2584 const char* shiftop = (yyvsp[-5].String)->c_str();
2585 if (*(yyvsp[-5].String) == "shr")
2586 shiftop = ((yyvsp[-3].Const).type.isUnsigned()) ? "lshr" : "ashr";
2587 (yyval.String) = new std::string(shiftop);
2588 *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2589 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2594 #line 541 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2596 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2597 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2598 (yyval.String) = (yyvsp[-5].String);
2603 #line 546 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2605 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2606 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2607 (yyval.String) = (yyvsp[-7].String);
2612 #line 551 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2614 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2615 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2616 (yyval.String) = (yyvsp[-7].String);
2621 #line 561 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2623 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Const).cnst;
2624 (yyvsp[0].Const).destroy();
2625 (yyval.String) = (yyvsp[-2].String);
2630 #line 566 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2631 { (yyval.String) = new std::string(*(yyvsp[0].Const).cnst); (yyvsp[0].Const).destroy(); ;}
2635 #line 581 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2641 #line 586 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2648 #line 589 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2650 *O << *(yyvsp[0].String) << "\n";
2651 delete (yyvsp[0].String);
2657 #line 594 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2659 *O << "module asm " << " " << *(yyvsp[0].String) << "\n";
2665 #line 598 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2667 *O << "implementation\n";
2673 #line 605 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2675 *O << *(yyvsp[-2].String) << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Type).newTy << "\n";
2676 // delete $2; delete $3; $4.destroy();
2682 #line 610 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2683 { // Function prototypes can be in const pool
2684 *O << *(yyvsp[0].String) << "\n";
2685 delete (yyvsp[0].String);
2691 #line 615 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2692 { // Asm blocks can be in the const pool
2693 *O << *(yyvsp[-2].String) << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
2694 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
2700 #line 620 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2702 *O << *(yyvsp[-4].String) << " " << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Const).cnst << " "
2703 << *(yyvsp[0].String) << "\n";
2704 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Const).destroy(); delete (yyvsp[0].String);
2710 #line 626 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2712 *O << *(yyvsp[-4].String) << " " << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy
2713 << " " << *(yyvsp[0].String) << "\n";
2714 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
2720 #line 632 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2722 *O << *(yyvsp[-4].String) << " " << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy
2723 << " " << *(yyvsp[0].String) << "\n";
2724 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
2730 #line 638 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2732 *O << *(yyvsp[-4].String) << " " << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy
2733 << " " << *(yyvsp[0].String) << "\n";
2734 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
2740 #line 644 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2742 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
2743 delete (yyvsp[-1].String); delete (yyvsp[0].String);
2749 #line 649 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2751 *O << *(yyvsp[-2].String) << " = " << *(yyvsp[0].String) << "\n";
2752 delete (yyvsp[-2].String); delete (yyvsp[0].String);
2758 #line 654 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2765 #line 664 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2767 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
2768 delete (yyvsp[0].String);
2769 (yyval.String) = (yyvsp[-2].String);
2774 #line 669 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2776 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
2777 if (*(yyvsp[0].String) == "64")
2779 delete (yyvsp[0].String);
2780 (yyval.String) = (yyvsp[-2].String);
2785 #line 676 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2787 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
2788 delete (yyvsp[0].String);
2789 (yyval.String) = (yyvsp[-2].String);
2794 #line 681 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2796 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
2797 delete (yyvsp[0].String);
2798 (yyval.String) = (yyvsp[-2].String);
2803 #line 688 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2805 (yyvsp[-1].String)->insert(0, "[ ");
2806 *(yyvsp[-1].String) += " ]";
2807 (yyval.String) = (yyvsp[-1].String);
2812 #line 695 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2814 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
2815 delete (yyvsp[0].String);
2816 (yyval.String) = (yyvsp[-2].String);
2821 #line 701 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2823 (yyval.String) = new std::string();
2828 #line 710 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2829 { (yyval.String) = new std::string(); ;}
2833 #line 712 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2835 (yyval.String) = (yyvsp[-1].Type).newTy;
2836 if (!(yyvsp[0].String)->empty())
2837 *(yyval.String) += " " + *(yyvsp[0].String);
2838 delete (yyvsp[0].String);
2843 #line 719 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2845 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
2846 delete (yyvsp[0].String);
2851 #line 723 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2853 (yyval.String) = (yyvsp[0].String);
2858 #line 727 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2860 (yyval.String) = (yyvsp[0].String);
2865 #line 730 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2867 *(yyvsp[-2].String) += ", ...";
2868 (yyval.String) = (yyvsp[-2].String);
2869 delete (yyvsp[0].String);
2874 #line 735 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2876 (yyval.String) = (yyvsp[0].String);
2881 #line 738 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2882 { (yyval.String) = new std::string(); ;}
2886 #line 741 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2888 if (!(yyvsp[-7].String)->empty()) {
2889 *(yyvsp[-7].String) += " ";
2891 *(yyvsp[-7].String) += *(yyvsp[-6].Type).newTy + " " + *(yyvsp[-5].String) + "(" + *(yyvsp[-3].String) + ")";
2892 if (!(yyvsp[-1].String)->empty()) {
2893 *(yyvsp[-7].String) += " " + *(yyvsp[-1].String);
2895 if (!(yyvsp[0].String)->empty()) {
2896 *(yyvsp[-7].String) += " " + *(yyvsp[0].String);
2898 (yyvsp[-6].Type).destroy();
2899 delete (yyvsp[-5].String);
2900 delete (yyvsp[-3].String);
2901 delete (yyvsp[-1].String);
2902 delete (yyvsp[0].String);
2903 (yyval.String) = (yyvsp[-7].String);
2908 #line 760 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2910 (yyval.String) = new std::string("begin");
2915 #line 763 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2917 (yyval.String) = new std::string ("{");
2922 #line 767 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2924 if (!(yyvsp[-2].String)->empty()) {
2925 *O << *(yyvsp[-2].String) << " ";
2927 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
2928 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
2934 #line 776 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2935 { (yyval.String) = new std::string("end"); ;}
2939 #line 777 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2940 { (yyval.String) = new std::string("}"); ;}
2944 #line 779 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2946 if ((yyvsp[-1].String))
2947 *O << *(yyvsp[-1].String);
2948 *O << '\n' << *(yyvsp[0].String) << "\n";
2954 #line 787 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2955 { (yyval.String) = new std::string(); ;}
2959 #line 793 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2961 if (!(yyvsp[-1].String)->empty())
2962 *(yyvsp[-2].String) += " " + *(yyvsp[-1].String);
2963 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
2964 delete (yyvsp[-1].String);
2965 delete (yyvsp[0].String);
2966 (yyval.String) = (yyvsp[-2].String);
2971 #line 806 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2972 { (yyval.String) = new std::string(); ;}
2976 #line 812 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2978 (yyvsp[-1].String)->insert(0, "<");
2979 *(yyvsp[-1].String) += ">";
2980 (yyval.String) = (yyvsp[-1].String);
2985 #line 818 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2987 if (!(yyvsp[-3].String)->empty()) {
2988 *(yyvsp[-4].String) += " " + *(yyvsp[-3].String);
2990 *(yyvsp[-4].String) += " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
2991 delete (yyvsp[-3].String); delete (yyvsp[-2].String); delete (yyvsp[0].String);
2992 (yyval.String) = (yyvsp[-4].String);
2997 #line 836 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2999 (yyval.Value).type = (yyvsp[-1].Type);
3000 (yyval.Value).val = new std::string(*(yyvsp[-1].Type).newTy + " ");
3001 *(yyval.Value).val += *(yyvsp[0].String);
3002 delete (yyvsp[0].String);
3007 #line 843 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3014 #line 846 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3015 { // Do not allow functions with 0 basic blocks
3021 #line 854 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3028 #line 858 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3030 *O << " " << *(yyvsp[0].String) << "\n";
3031 delete (yyvsp[0].String);
3037 #line 863 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3044 #line 866 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3046 *O << *(yyvsp[0].String) << "\n";
3047 delete (yyvsp[0].String);
3053 #line 872 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3054 { // Return with a result...
3055 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Value).val << "\n";
3056 delete (yyvsp[-1].String); (yyvsp[0].Value).destroy();
3062 #line 877 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3063 { // Return with no result...
3064 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Type).newTy << "\n";
3065 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3071 #line 882 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3072 { // Unconditional Branch...
3073 *O << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3074 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3080 #line 887 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3082 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].String) << ", "
3083 << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].String) << ", " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3084 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); delete (yyvsp[-6].String); (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String);
3085 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3091 #line 894 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3093 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].String) << ", " << *(yyvsp[-4].Type).newTy
3094 << " " << *(yyvsp[-3].String) << " [" << *(yyvsp[-1].String) << " ]\n";
3095 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); delete (yyvsp[-6].String); (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); delete (yyvsp[-1].String);
3101 #line 900 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3103 *O << " " << *(yyvsp[-7].String) << " " << *(yyvsp[-6].Type).newTy << " " << *(yyvsp[-5].String) << ", "
3104 << *(yyvsp[-3].Type).newTy << " " << *(yyvsp[-2].String) << "[]\n";
3105 delete (yyvsp[-7].String); (yyvsp[-6].Type).destroy(); delete (yyvsp[-5].String); (yyvsp[-3].Type).destroy(); delete (yyvsp[-2].String);
3111 #line 907 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3114 if (!(yyvsp[-13].String)->empty())
3115 *O << *(yyvsp[-13].String);
3116 *O << *(yyvsp[-12].String) << " " << *(yyvsp[-11].String) << " " << *(yyvsp[-10].Type).newTy << " " << *(yyvsp[-9].String) << " ("
3117 << *(yyvsp[-7].String) << ") " << *(yyvsp[-5].String) << " " << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].String) << " "
3118 << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3119 delete (yyvsp[-13].String); delete (yyvsp[-12].String); delete (yyvsp[-11].String); (yyvsp[-10].Type).destroy(); delete (yyvsp[-9].String); delete (yyvsp[-7].String);
3120 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
3121 delete (yyvsp[0].String);
3127 #line 919 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3129 *O << " " << *(yyvsp[0].String) << "\n";
3130 delete (yyvsp[0].String);
3136 #line 924 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3138 *O << " " << *(yyvsp[0].String) << "\n";
3139 delete (yyvsp[0].String);
3145 #line 930 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3147 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].String) + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].String);
3148 (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3149 (yyval.String) = (yyvsp[-5].String);
3154 #line 935 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3156 (yyvsp[-3].String)->insert(0, *(yyvsp[-4].Type).newTy + " " );
3157 *(yyvsp[-3].String) += ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].String);
3158 (yyvsp[-4].Type).destroy(); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3159 (yyval.String) = (yyvsp[-3].String);
3164 #line 943 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3166 *(yyvsp[-1].String) += *(yyvsp[0].String);
3167 delete (yyvsp[0].String);
3168 (yyval.String) = (yyvsp[-1].String);
3173 #line 950 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3174 { // Used for PHI nodes
3175 (yyvsp[-3].String)->insert(0, *(yyvsp[-5].Type).newTy + "[");
3176 *(yyvsp[-3].String) += "," + *(yyvsp[-1].String) + "]";
3177 (yyvsp[-5].Type).destroy(); delete (yyvsp[-1].String);
3178 (yyval.String) = (yyvsp[-3].String);
3183 #line 956 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3185 *(yyvsp[-6].String) += ", [" + *(yyvsp[-3].String) + "," + *(yyvsp[-1].String) + "]";
3186 delete (yyvsp[-3].String); delete (yyvsp[-1].String);
3187 (yyval.String) = (yyvsp[-6].String);
3192 #line 964 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3193 { (yyval.String) = new std::string(*(yyvsp[0].Value).val); (yyvsp[0].Value).destroy(); ;}
3197 #line 965 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3199 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Value).val;
3200 (yyvsp[0].Value).destroy();
3201 (yyval.String) = (yyvsp[-2].String);
3206 #line 974 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3207 { (yyval.String) = new std::string(); ;}
3211 #line 978 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3213 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3214 delete (yyvsp[0].String);
3215 (yyval.String) = (yyvsp[-1].String);
3220 #line 986 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3222 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
3223 (yyvsp[-3].Type).destroy(); delete (yyvsp[-2].String); delete (yyvsp[0].String);
3224 (yyval.String) = (yyvsp[-4].String);
3229 #line 991 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3231 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
3232 (yyvsp[-3].Type).destroy(); delete (yyvsp[-2].String); delete (yyvsp[0].String);
3233 (yyval.String) = (yyvsp[-4].String);
3238 #line 996 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3240 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
3241 (yyvsp[-3].Type).destroy(); delete (yyvsp[-2].String); delete (yyvsp[0].String);
3242 (yyval.String) = (yyvsp[-4].String);
3247 #line 1001 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3249 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3250 (yyvsp[0].Value).destroy();
3251 (yyval.String) = (yyvsp[-1].String);
3256 #line 1006 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3258 const char* shiftop = (yyvsp[-3].String)->c_str();
3259 if (*(yyvsp[-3].String) == "shr")
3260 shiftop = ((yyvsp[-2].Value).type.isUnsigned()) ? "lshr" : "ashr";
3261 (yyval.String) = new std::string(shiftop);
3262 *(yyval.String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3263 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3268 #line 1014 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3270 const char *opcode = (yyvsp[-3].String)->c_str();
3271 std::string source = *(yyvsp[-2].Value).val;
3272 if (*(yyvsp[-3].String) == "cast") {
3273 std::string upgrade = getCastUpgrade(source, (yyvsp[-2].Value).type, (yyvsp[0].Type), false);
3274 if (!upgrade.empty())
3275 *O << " " << upgrade << "\n";
3276 opcode = getCastOpcode(source, (yyvsp[-2].Value).type, (yyvsp[0].Type));
3278 (yyval.String) = new std::string(opcode);
3279 *(yyval.String) += " " + source + " " + *(yyvsp[-1].String) + " " + *(yyvsp[0].Type).newTy;
3280 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy();
3281 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3286 #line 1028 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3288 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3289 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3290 (yyval.String) = (yyvsp[-5].String);
3295 #line 1033 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3297 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Type).newTy;
3298 (yyvsp[-2].Value).destroy(); (yyvsp[0].Type).destroy();
3299 (yyval.String) = (yyvsp[-3].String);
3304 #line 1038 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3306 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3307 (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3308 (yyval.String) = (yyvsp[-3].String);
3313 #line 1043 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3315 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3316 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3317 (yyval.String) = (yyvsp[-5].String);
3322 #line 1048 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3324 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3325 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3326 (yyval.String) = (yyvsp[-5].String);
3331 #line 1053 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3333 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3334 delete (yyvsp[0].String);
3335 (yyval.String) = (yyvsp[-1].String);
3340 #line 1058 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3342 if (!(yyvsp[-5].String)->empty())
3343 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String);
3344 if (!(yyvsp[-6].String)->empty())
3345 *(yyvsp[-6].String) += " ";
3346 *(yyvsp[-6].String) += *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].String) + "(" + *(yyvsp[-1].String) + ")";
3347 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); delete (yyvsp[-1].String);
3348 (yyval.String) = (yyvsp[-6].String);
3353 #line 1072 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3355 (yyvsp[0].String)->insert(0, ", ");
3356 (yyval.String) = (yyvsp[0].String);
3361 #line 1076 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3362 { (yyval.String) = new std::string(); ;}
3366 #line 1081 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3367 { (yyval.String) = new std::string(); ;}
3371 #line 1084 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3373 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3374 if (!(yyvsp[0].String)->empty())
3375 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3376 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3377 (yyval.String) = (yyvsp[-2].String);
3382 #line 1091 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3384 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].String);
3385 if (!(yyvsp[0].String)->empty())
3386 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3387 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3388 (yyval.String) = (yyvsp[-5].String);
3393 #line 1098 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3395 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3396 if (!(yyvsp[0].String)->empty())
3397 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3398 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3399 (yyval.String) = (yyvsp[-2].String);
3404 #line 1105 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3406 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].String);
3407 if (!(yyvsp[0].String)->empty())
3408 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3409 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3410 (yyval.String) = (yyvsp[-5].String);
3415 #line 1112 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3417 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3418 (yyvsp[0].Value).destroy();
3419 (yyval.String) = (yyvsp[-1].String);
3424 #line 1117 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3426 if (!(yyvsp[-3].String)->empty())
3427 *(yyvsp[-3].String) += " ";
3428 *(yyvsp[-3].String) += *(yyvsp[-2].String) + " " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].String);
3429 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3430 (yyval.String) = (yyvsp[-3].String);
3435 #line 1124 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3437 if (!(yyvsp[-5].String)->empty())
3438 *(yyvsp[-5].String) += " ";
3439 *(yyvsp[-5].String) += *(yyvsp[-4].String) + " " + *(yyvsp[-3].Value).val + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].String);
3440 delete (yyvsp[-4].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3441 (yyval.String) = (yyvsp[-5].String);
3446 #line 1131 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3448 *(yyvsp[-3].String) += *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].String) + " " + *(yyvsp[0].String);
3449 (yyvsp[-2].Type).destroy(); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3450 (yyval.String) = (yyvsp[-3].String);
3458 /* Line 1126 of yacc.c. */
3459 #line 3460 "UpgradeParser.tab.c"
3465 YY_STACK_PRINT (yyss, yyssp);
3470 /* Now `shift' the result of the reduction. Determine what state
3471 that goes to, based on the state we popped back to and the rule
3472 number reduced by. */
3476 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3477 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3478 yystate = yytable[yystate];
3480 yystate = yydefgoto[yyn - YYNTOKENS];
3485 /*------------------------------------.
3486 | yyerrlab -- here on detecting error |
3487 `------------------------------------*/
3489 /* If not already recovering from an error, report this error. */
3494 yyn = yypact[yystate];
3496 if (YYPACT_NINF < yyn && yyn < YYLAST)
3498 int yytype = YYTRANSLATE (yychar);
3499 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3500 YYSIZE_T yysize = yysize0;
3502 int yysize_overflow = 0;
3504 # define YYERROR_VERBOSE_ARGS_MAXIMUM 5
3505 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3509 /* This is so xgettext sees the translatable formats that are
3510 constructed on the fly. */
3511 YY_("syntax error, unexpected %s");
3512 YY_("syntax error, unexpected %s, expecting %s");
3513 YY_("syntax error, unexpected %s, expecting %s or %s");
3514 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3515 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3519 static char const yyunexpected[] = "syntax error, unexpected %s";
3520 static char const yyexpecting[] = ", expecting %s";
3521 static char const yyor[] = " or %s";
3522 char yyformat[sizeof yyunexpected
3523 + sizeof yyexpecting - 1
3524 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3525 * (sizeof yyor - 1))];
3526 char const *yyprefix = yyexpecting;
3528 /* Start YYX at -YYN if negative to avoid negative indexes in
3530 int yyxbegin = yyn < 0 ? -yyn : 0;
3532 /* Stay within bounds of both yycheck and yytname. */
3533 int yychecklim = YYLAST - yyn;
3534 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3537 yyarg[0] = yytname[yytype];
3538 yyfmt = yystpcpy (yyformat, yyunexpected);
3540 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3541 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3543 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3547 yyformat[sizeof yyunexpected - 1] = '\0';
3550 yyarg[yycount++] = yytname[yyx];
3551 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3552 yysize_overflow |= yysize1 < yysize;
3554 yyfmt = yystpcpy (yyfmt, yyprefix);
3558 yyf = YY_(yyformat);
3559 yysize1 = yysize + yystrlen (yyf);
3560 yysize_overflow |= yysize1 < yysize;
3563 if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
3564 yymsg = (char *) YYSTACK_ALLOC (yysize);
3567 /* Avoid sprintf, as that infringes on the user's name space.
3568 Don't have undefined behavior even if the translation
3569 produced a string with the wrong number of "%s"s. */
3572 while ((*yyp = *yyf))
3574 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3576 yyp += yytnamerr (yyp, yyarg[yyi++]);
3586 YYSTACK_FREE (yymsg);
3590 yyerror (YY_("syntax error"));
3591 goto yyexhaustedlab;
3595 #endif /* YYERROR_VERBOSE */
3596 yyerror (YY_("syntax error"));
3601 if (yyerrstatus == 3)
3603 /* If just tried and failed to reuse look-ahead token after an
3604 error, discard it. */
3606 if (yychar <= YYEOF)
3608 /* Return failure if at end of input. */
3609 if (yychar == YYEOF)
3614 yydestruct ("Error: discarding", yytoken, &yylval);
3619 /* Else will try to reuse look-ahead token after shifting the error
3624 /*---------------------------------------------------.
3625 | yyerrorlab -- error raised explicitly by YYERROR. |
3626 `---------------------------------------------------*/
3629 /* Pacify compilers like GCC when the user code never invokes
3630 YYERROR and the label yyerrorlab therefore never appears in user
3641 /*-------------------------------------------------------------.
3642 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3643 `-------------------------------------------------------------*/
3645 yyerrstatus = 3; /* Each real token shifted decrements this. */
3649 yyn = yypact[yystate];
3650 if (yyn != YYPACT_NINF)
3653 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3661 /* Pop the current state because it cannot handle the error token. */
3666 yydestruct ("Error: popping", yystos[yystate], yyvsp);
3669 YY_STACK_PRINT (yyss, yyssp);
3678 /* Shift the error token. */
3679 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3685 /*-------------------------------------.
3686 | yyacceptlab -- YYACCEPT comes here. |
3687 `-------------------------------------*/
3692 /*-----------------------------------.
3693 | yyabortlab -- YYABORT comes here. |
3694 `-----------------------------------*/
3700 /*-------------------------------------------------.
3701 | yyexhaustedlab -- memory exhaustion comes here. |
3702 `-------------------------------------------------*/
3704 yyerror (YY_("memory exhausted"));
3710 if (yychar != YYEOF && yychar != YYEMPTY)
3711 yydestruct ("Cleanup: discarding lookahead",
3713 while (yyssp != yyss)
3715 yydestruct ("Cleanup: popping",
3716 yystos[*yyssp], yyvsp);
3721 YYSTACK_FREE (yyss);
3727 #line 1137 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3730 int yyerror(const char *ErrorMsg) {
3732 = std::string((CurFilename == "-") ? std::string("<stdin>") : CurFilename)
3733 + ":" + llvm::utostr((unsigned) Upgradelineno) + ": ";
3734 std::string errMsg = std::string(ErrorMsg) + "\n" + where + " while reading ";
3735 if (yychar == YYEMPTY || yychar == 0)
3736 errMsg += "end-of-file.";
3738 errMsg += "token: '" + std::string(Upgradetext, Upgradeleng) + "'";
3739 std::cerr << errMsg << '\n';