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
76 ZEROINITIALIZER = 267,
133 X86_STDCALLCC_TOK = 324,
134 X86_FASTCALLCC_TOK = 325,
172 EXTRACTELEMENT = 363,
179 #define ESINT64VAL 258
180 #define EUINT64VAL 259
188 #define ZEROINITIALIZER 267
206 #define STRINGCONSTANT 285
207 #define IMPLEMENTATION 286
216 #define DOTDOTDOT 295
221 #define DLLIMPORT 300
222 #define DLLEXPORT 301
223 #define EXTERN_WEAK 302
224 #define APPENDING 303
230 #define POINTERSIZE 309
239 #define SIDEEFFECT 318
242 #define CSRETCC_TOK 321
243 #define FASTCC_TOK 322
244 #define COLDCC_TOK 323
245 #define X86_STDCALLCC_TOK 324
246 #define X86_FASTCALLCC_TOK 325
247 #define DATALAYOUT 326
253 #define UNREACHABLE 332
277 #define GETELEMENTPTR 356
284 #define EXTRACTELEMENT 363
285 #define INSERTELEMENT 364
286 #define SHUFFLEVECTOR 365
292 /* Copy the first part of user declarations. */
293 #line 14 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
295 #include "ParserInternals.h"
296 #include <llvm/ADT/StringExtras.h>
302 #define YYERROR_VERBOSE 1
303 #define YYINCLUDED_STDLIB_H
306 int yylex(); // declaration" of xxx warnings.
310 static std::string CurFilename;
311 static std::ostream *O = 0;
312 std::istream* LexInput = 0;
313 unsigned SizeOfPointer = 32;
315 void UpgradeAssembly(const std::string &infile, std::istream& in,
316 std::ostream &out, bool debug)
319 CurFilename = infile;
325 std::cerr << "Parse failed.\n";
330 const char* getCastOpcode(TypeInfo& SrcTy, TypeInfo&DstTy) {
331 unsigned SrcBits = SrcTy.getBitWidth();
332 unsigned DstBits = DstTy.getBitWidth();
333 const char* opcode = "bitcast";
334 // Run through the possibilities ...
335 if (DstTy.isIntegral()) { // Casting to integral
336 if (SrcTy.isIntegral()) { // Casting from integral
337 if (DstBits < SrcBits)
339 else if (DstBits > SrcBits) { // its an extension
340 if (SrcTy.isSigned())
341 opcode ="sext"; // signed -> SEXT
343 opcode = "zext"; // unsigned -> ZEXT
345 opcode = "bitcast"; // Same size, No-op cast
347 } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt
348 if (DstTy.isSigned())
349 opcode = "fptosi"; // FP -> sint
351 opcode = "fptoui"; // FP -> uint
352 } else if (SrcTy.isPacked()) {
353 assert(DstBits == SrcTy.getBitWidth() &&
354 "Casting packed to integer of different width");
355 opcode = "bitcast"; // same size, no-op cast
357 assert(SrcTy.isPointer() &&
358 "Casting from a value that is not first-class type");
359 opcode = "ptrtoint"; // ptr -> int
361 } else if (DstTy.isFloatingPoint()) { // Casting to floating pt
362 if (SrcTy.isIntegral()) { // Casting from integral
363 if (SrcTy.isSigned())
364 opcode = "sitofp"; // sint -> FP
366 opcode = "uitofp"; // uint -> FP
367 } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt
368 if (DstBits < SrcBits) {
369 opcode = "fptrunc"; // FP -> smaller FP
370 } else if (DstBits > SrcBits) {
371 opcode = "fpext"; // FP -> larger FP
373 opcode ="bitcast"; // same size, no-op cast
375 } else if (SrcTy.isPacked()) {
376 assert(DstBits == SrcTy.getBitWidth() &&
377 "Casting packed to floating point of different width");
378 opcode = "bitcast"; // same size, no-op cast
380 assert(0 && "Casting pointer or non-first class to float");
382 } else if (DstTy.isPacked()) {
383 if (SrcTy.isPacked()) {
384 assert(DstTy.getBitWidth() == SrcTy.getBitWidth() &&
385 "Casting packed to packed of different widths");
386 opcode = "bitcast"; // packed -> packed
387 } else if (DstTy.getBitWidth() == SrcBits) {
388 opcode = "bitcast"; // float/int -> packed
390 assert(!"Illegal cast to packed (wrong type or size)");
392 } else if (DstTy.isPointer()) {
393 if (SrcTy.isPointer()) {
394 opcode = "bitcast"; // ptr -> ptr
395 } else if (SrcTy.isIntegral()) {
396 opcode = "inttoptr"; // int -> ptr
398 assert(!"Casting pointer to other than pointer or int");
401 assert(!"Casting to type that is not first-class");
408 /* Enabling traces. */
413 /* Enabling verbose error messages. */
414 #ifdef YYERROR_VERBOSE
415 # undef YYERROR_VERBOSE
416 # define YYERROR_VERBOSE 1
418 # define YYERROR_VERBOSE 0
421 /* Enabling the token table. */
422 #ifndef YYTOKEN_TABLE
423 # define YYTOKEN_TABLE 0
426 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
427 #line 130 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
428 typedef union YYSTYPE {
434 /* Line 196 of yacc.c. */
435 #line 436 "UpgradeParser.tab.c"
436 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
437 # define YYSTYPE_IS_DECLARED 1
438 # define YYSTYPE_IS_TRIVIAL 1
443 /* Copy the second part of user declarations. */
446 /* Line 219 of yacc.c. */
447 #line 448 "UpgradeParser.tab.c"
449 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
450 # define YYSIZE_T __SIZE_TYPE__
452 #if ! defined (YYSIZE_T) && defined (size_t)
453 # define YYSIZE_T size_t
455 #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
456 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
457 # define YYSIZE_T size_t
459 #if ! defined (YYSIZE_T)
460 # define YYSIZE_T unsigned int
466 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
467 # define YY_(msgid) dgettext ("bison-runtime", msgid)
471 # define YY_(msgid) msgid
475 #if ! defined (yyoverflow) || YYERROR_VERBOSE
477 /* The parser invokes alloca or malloc; define the necessary symbols. */
479 # ifdef YYSTACK_USE_ALLOCA
480 # if YYSTACK_USE_ALLOCA
482 # define YYSTACK_ALLOC __builtin_alloca
484 # define YYSTACK_ALLOC alloca
485 # if defined (__STDC__) || defined (__cplusplus)
486 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
487 # define YYINCLUDED_STDLIB_H
493 # ifdef YYSTACK_ALLOC
494 /* Pacify GCC's `empty if-body' warning. */
495 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
496 # ifndef YYSTACK_ALLOC_MAXIMUM
497 /* The OS might guarantee only one guard page at the bottom of the stack,
498 and a page size can be as small as 4096 bytes. So we cannot safely
499 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
500 to allow for a few compiler-allocated temporary stack slots. */
501 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
504 # define YYSTACK_ALLOC YYMALLOC
505 # define YYSTACK_FREE YYFREE
506 # ifndef YYSTACK_ALLOC_MAXIMUM
507 # define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
513 # define YYMALLOC malloc
514 # if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
515 && (defined (__STDC__) || defined (__cplusplus)))
516 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
521 # if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
522 && (defined (__STDC__) || defined (__cplusplus)))
523 void free (void *); /* INFRINGES ON USER NAME SPACE */
530 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
533 #if (! defined (yyoverflow) \
534 && (! defined (__cplusplus) \
535 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
537 /* A type that is properly aligned for any stack member. */
544 /* The size of the maximum gap between one aligned stack and the next. */
545 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
547 /* The size of an array large to enough to hold all stacks, each with
549 # define YYSTACK_BYTES(N) \
550 ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
551 + YYSTACK_GAP_MAXIMUM)
553 /* Copy COUNT objects from FROM to TO. The source and destination do
556 # if defined (__GNUC__) && 1 < __GNUC__
557 # define YYCOPY(To, From, Count) \
558 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
560 # define YYCOPY(To, From, Count) \
564 for (yyi = 0; yyi < (Count); yyi++) \
565 (To)[yyi] = (From)[yyi]; \
571 /* Relocate STACK from its old location to the new one. The
572 local variables YYSIZE and YYSTACKSIZE give the old and new number of
573 elements in the stack, and YYPTR gives the new location of the
574 stack. Advance YYPTR to a properly aligned location for the next
576 # define YYSTACK_RELOCATE(Stack) \
579 YYSIZE_T yynewbytes; \
580 YYCOPY (&yyptr->Stack, Stack, yysize); \
581 Stack = &yyptr->Stack; \
582 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
583 yyptr += yynewbytes / sizeof (*yyptr); \
589 #if defined (__STDC__) || defined (__cplusplus)
590 typedef signed char yysigned_char;
592 typedef short int yysigned_char;
595 /* YYFINAL -- State number of the termination state. */
597 /* YYLAST -- Last index in YYTABLE. */
600 /* YYNTOKENS -- Number of terminals. */
601 #define YYNTOKENS 126
602 /* YYNNTS -- Number of nonterminals. */
604 /* YYNRULES -- Number of rules. */
606 /* YYNRULES -- Number of states. */
607 #define YYNSTATES 508
609 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
611 #define YYMAXUTOK 366
613 #define YYTRANSLATE(YYX) \
614 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
616 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
617 static const unsigned char yytranslate[] =
619 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
620 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
621 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
622 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
623 115, 116, 124, 2, 113, 2, 2, 2, 2, 2,
624 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
625 120, 112, 121, 2, 2, 2, 2, 2, 2, 2,
626 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
627 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
628 2, 117, 114, 119, 2, 2, 2, 2, 2, 125,
629 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
630 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
631 118, 2, 2, 122, 2, 123, 2, 2, 2, 2,
632 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
633 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
634 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
635 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
636 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
637 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
638 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
639 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
640 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
641 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
642 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
643 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
644 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
645 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
646 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
647 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
648 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
649 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
650 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
651 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
652 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
653 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
654 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
655 105, 106, 107, 108, 109, 110, 111
659 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
661 static const unsigned short int yyprhs[] =
663 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
664 19, 21, 23, 25, 27, 29, 31, 33, 35, 37,
665 39, 41, 43, 45, 47, 49, 51, 53, 55, 57,
666 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
667 80, 81, 83, 85, 87, 89, 91, 93, 95, 96,
668 98, 100, 102, 104, 106, 108, 111, 112, 113, 116,
669 117, 121, 124, 125, 127, 128, 132, 134, 137, 139,
670 141, 143, 145, 147, 149, 151, 153, 155, 157, 159,
671 161, 163, 165, 167, 169, 171, 173, 175, 177, 180,
672 185, 191, 197, 201, 204, 207, 209, 213, 215, 219,
673 221, 222, 227, 231, 235, 240, 245, 249, 252, 255,
674 258, 261, 264, 267, 270, 273, 276, 279, 286, 292,
675 301, 308, 315, 322, 329, 336, 345, 354, 358, 360,
676 362, 364, 366, 369, 372, 377, 380, 382, 387, 390,
677 395, 402, 409, 416, 423, 427, 432, 433, 435, 437,
678 439, 443, 447, 451, 455, 459, 463, 465, 466, 468,
679 470, 472, 473, 476, 480, 482, 484, 488, 490, 491,
680 500, 502, 504, 508, 510, 512, 516, 517, 519, 521,
681 525, 526, 528, 530, 532, 534, 536, 538, 540, 542,
682 544, 548, 550, 556, 558, 560, 562, 564, 567, 570,
683 572, 575, 578, 579, 581, 584, 587, 591, 601, 611,
684 620, 635, 637, 639, 646, 652, 655, 662, 670, 672,
685 676, 678, 679, 682, 684, 690, 696, 702, 705, 710,
686 715, 722, 727, 732, 739, 746, 749, 757, 759, 762,
687 763, 765, 766, 770, 777, 781, 788, 791, 796, 803
690 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
691 static const short int yyrhs[] =
693 157, 0, -1, 5, -1, 6, -1, 3, -1, 4,
694 -1, 78, -1, 79, -1, 80, -1, 81, -1, 82,
695 -1, 83, -1, 84, -1, 85, -1, 86, -1, 87,
696 -1, 88, -1, 89, -1, 90, -1, 91, -1, 92,
697 -1, 93, -1, 94, -1, 95, -1, 104, -1, 105,
698 -1, 106, -1, 21, -1, 19, -1, 17, -1, 15,
699 -1, 22, -1, 20, -1, 18, -1, 16, -1, 133,
700 -1, 134, -1, 23, -1, 24, -1, 165, 112, -1,
701 -1, 42, -1, 43, -1, 44, -1, 48, -1, 45,
702 -1, 46, -1, 47, -1, -1, 65, -1, 66, -1,
703 67, -1, 68, -1, 69, -1, 70, -1, 64, 4,
704 -1, -1, -1, 57, 4, -1, -1, 113, 57, 4,
705 -1, 37, 30, -1, -1, 142, -1, -1, 113, 145,
706 144, -1, 142, -1, 57, 4, -1, 148, -1, 13,
707 -1, 150, -1, 13, -1, 150, -1, 14, -1, 15,
708 -1, 16, -1, 17, -1, 18, -1, 19, -1, 20,
709 -1, 21, -1, 22, -1, 23, -1, 24, -1, 25,
710 -1, 26, -1, 149, -1, 179, -1, 114, 4, -1,
711 147, 115, 152, 116, -1, 117, 4, 118, 150, 119,
712 -1, 120, 4, 118, 150, 121, -1, 122, 151, 123,
713 -1, 122, 123, -1, 150, 124, -1, 150, -1, 151,
714 113, 150, -1, 151, -1, 151, 113, 40, -1, 40,
715 -1, -1, 148, 117, 155, 119, -1, 148, 117, 119,
716 -1, 148, 125, 30, -1, 148, 120, 155, 121, -1,
717 148, 122, 155, 123, -1, 148, 122, 123, -1, 148,
718 10, -1, 148, 11, -1, 148, 179, -1, 148, 154,
719 -1, 148, 12, -1, 133, 128, -1, 134, 4, -1,
720 14, 8, -1, 14, 9, -1, 136, 7, -1, 111,
721 115, 153, 39, 148, 116, -1, 101, 115, 153, 193,
722 116, -1, 103, 115, 153, 113, 153, 113, 153, 116,
723 -1, 129, 115, 153, 113, 153, 116, -1, 130, 115,
724 153, 113, 153, 116, -1, 131, 115, 153, 113, 153,
725 116, -1, 132, 115, 153, 113, 153, 116, -1, 108,
726 115, 153, 113, 153, 116, -1, 109, 115, 153, 113,
727 153, 113, 153, 116, -1, 110, 115, 153, 113, 153,
728 113, 153, 116, -1, 155, 113, 153, -1, 153, -1,
729 35, -1, 36, -1, 158, -1, 158, 174, -1, 158,
730 176, -1, 158, 62, 61, 160, -1, 158, 31, -1,
731 159, -1, 159, 137, 27, 146, -1, 159, 176, -1,
732 159, 62, 61, 160, -1, 159, 137, 138, 156, 153,
733 144, -1, 159, 137, 50, 156, 148, 144, -1, 159,
734 137, 45, 156, 148, 144, -1, 159, 137, 47, 156,
735 148, 144, -1, 159, 51, 162, -1, 159, 58, 112,
736 163, -1, -1, 30, -1, 56, -1, 55, -1, 53,
737 112, 161, -1, 54, 112, 4, -1, 52, 112, 30,
738 -1, 71, 112, 30, -1, 117, 164, 119, -1, 164,
739 113, 30, -1, 30, -1, -1, 28, -1, 30, -1,
740 165, -1, -1, 148, 166, -1, 168, 113, 167, -1,
741 167, -1, 168, -1, 168, 113, 40, -1, 40, -1,
742 -1, 139, 146, 165, 115, 169, 116, 143, 140, -1,
743 32, -1, 122, -1, 138, 170, 171, -1, 33, -1,
744 123, -1, 172, 182, 173, -1, -1, 45, -1, 47,
745 -1, 34, 175, 170, -1, -1, 63, -1, 3, -1,
746 4, -1, 7, -1, 8, -1, 9, -1, 10, -1,
747 11, -1, 12, -1, 120, 155, 121, -1, 154, -1,
748 61, 177, 30, 113, 30, -1, 127, -1, 165, -1,
749 179, -1, 178, -1, 148, 180, -1, 182, 183, -1,
750 183, -1, 184, 185, -1, 184, 187, -1, -1, 29,
751 -1, 72, 181, -1, 72, 13, -1, 73, 25, 180,
752 -1, 73, 14, 180, 113, 25, 180, 113, 25, 180,
753 -1, 74, 135, 180, 113, 25, 180, 117, 186, 119,
754 -1, 74, 135, 180, 113, 25, 180, 117, 119, -1,
755 137, 75, 139, 146, 180, 115, 190, 116, 39, 25,
756 180, 76, 25, 180, -1, 76, -1, 77, -1, 186,
757 135, 178, 113, 25, 180, -1, 135, 178, 113, 25,
758 180, -1, 137, 192, -1, 148, 117, 180, 113, 180,
759 119, -1, 188, 113, 117, 180, 113, 180, 119, -1,
760 181, -1, 189, 113, 181, -1, 189, -1, -1, 60,
761 59, -1, 59, -1, 129, 148, 180, 113, 180, -1,
762 130, 148, 180, 113, 180, -1, 131, 148, 180, 113,
763 180, -1, 49, 181, -1, 132, 181, 113, 181, -1,
764 111, 181, 39, 148, -1, 103, 181, 113, 181, 113,
765 181, -1, 107, 181, 113, 148, -1, 108, 181, 113,
766 181, -1, 109, 181, 113, 181, 113, 181, -1, 110,
767 181, 113, 181, 113, 181, -1, 102, 188, -1, 191,
768 139, 146, 180, 115, 190, 116, -1, 195, -1, 113,
769 189, -1, -1, 38, -1, -1, 96, 148, 141, -1,
770 96, 148, 113, 20, 180, 141, -1, 97, 148, 141,
771 -1, 97, 148, 113, 20, 180, 141, -1, 98, 181,
772 -1, 194, 99, 148, 180, -1, 194, 100, 181, 113,
773 148, 180, -1, 101, 148, 180, 193, -1
776 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
777 static const unsigned short int yyrline[] =
779 0, 189, 189, 189, 190, 190, 194, 194, 194, 194,
780 194, 194, 194, 194, 194, 195, 195, 195, 196, 196,
781 196, 196, 196, 196, 197, 197, 197, 201, 201, 201,
782 201, 202, 202, 202, 202, 203, 203, 204, 204, 207,
783 211, 216, 216, 216, 216, 216, 216, 217, 218, 221,
784 221, 221, 221, 221, 222, 223, 228, 233, 234, 237,
785 238, 246, 252, 253, 256, 257, 266, 267, 280, 280,
786 281, 281, 282, 286, 286, 286, 286, 286, 286, 286,
787 287, 287, 287, 287, 287, 288, 288, 289, 295, 300,
788 306, 313, 320, 326, 330, 340, 343, 351, 352, 357,
789 360, 370, 376, 381, 387, 393, 399, 404, 410, 416,
790 422, 428, 434, 440, 446, 452, 458, 466, 473, 479,
791 484, 489, 494, 499, 504, 509, 514, 524, 529, 534,
792 534, 544, 549, 552, 557, 561, 565, 568, 573, 578,
793 583, 589, 595, 601, 607, 612, 617, 622, 624, 624,
794 627, 632, 639, 644, 651, 658, 663, 664, 672, 672,
795 673, 673, 675, 682, 686, 690, 693, 698, 701, 703,
796 723, 726, 730, 739, 740, 742, 750, 751, 752, 756,
797 769, 770, 773, 774, 775, 776, 777, 778, 779, 780,
798 781, 786, 787, 796, 796, 799, 799, 805, 812, 814,
799 821, 825, 830, 833, 839, 844, 849, 854, 861, 867,
800 873, 886, 891, 897, 902, 910, 917, 923, 931, 932,
801 940, 941, 945, 950, 953, 958, 963, 968, 973, 978,
802 985, 990, 995, 1000, 1005, 1010, 1015, 1024, 1029, 1033,
803 1037, 1038, 1041, 1048, 1055, 1062, 1069, 1074, 1081, 1088
807 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
808 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
809 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
810 static const char *const yytname[] =
812 "$end", "error", "$undefined", "ESINT64VAL", "EUINT64VAL", "SINTVAL",
813 "UINTVAL", "FPVAL", "TRUETOK", "FALSETOK", "NULL_TOK", "UNDEF",
814 "ZEROINITIALIZER", "VOID", "BOOL", "SBYTE", "UBYTE", "SHORT", "USHORT",
815 "INT", "UINT", "LONG", "ULONG", "FLOAT", "DOUBLE", "LABEL", "OPAQUE",
816 "TYPE", "VAR_ID", "LABELSTR", "STRINGCONSTANT", "IMPLEMENTATION",
817 "BEGINTOK", "ENDTOK", "DECLARE", "GLOBAL", "CONSTANT", "SECTION",
818 "VOLATILE", "TO", "DOTDOTDOT", "CONST", "INTERNAL", "LINKONCE", "WEAK",
819 "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "APPENDING", "NOT", "EXTERNAL",
820 "TARGET", "TRIPLE", "ENDIAN", "POINTERSIZE", "LITTLE", "BIG", "ALIGN",
821 "DEPLIBS", "CALL", "TAIL", "ASM_TOK", "MODULE", "SIDEEFFECT", "CC_TOK",
822 "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK", "COLDCC_TOK",
823 "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT", "RET", "BR",
824 "SWITCH", "INVOKE", "UNWIND", "UNREACHABLE", "ADD", "SUB", "MUL", "UDIV",
825 "SDIV", "FDIV", "UREM", "SREM", "FREM", "AND", "OR", "XOR", "SETLE",
826 "SETGE", "SETLT", "SETGT", "SETEQ", "SETNE", "MALLOC", "ALLOCA", "FREE",
827 "LOAD", "STORE", "GETELEMENTPTR", "PHI_TOK", "SELECT", "SHL", "LSHR",
828 "ASHR", "VAARG", "EXTRACTELEMENT", "INSERTELEMENT", "SHUFFLEVECTOR",
829 "CAST", "'='", "','", "'\\\\'", "'('", "')'", "'['", "'x'", "']'", "'<'",
830 "'>'", "'{'", "'}'", "'*'", "'c'", "$accept", "IntVal", "EInt64Val",
831 "ArithmeticOps", "LogicalOps", "SetCondOps", "ShiftOps", "SIntType",
832 "UIntType", "IntType", "FPType", "OptAssign", "OptLinkage",
833 "OptCallingConv", "OptAlign", "OptCAlign", "SectionString", "OptSection",
834 "GlobalVarAttributes", "GlobalVarAttribute", "TypesV", "UpRTypesV",
835 "Types", "PrimType", "UpRTypes", "TypeListI", "ArgTypeListI", "ConstVal",
836 "ConstExpr", "ConstVector", "GlobalType", "Module", "DefinitionList",
837 "ConstPool", "AsmBlock", "BigOrLittle", "TargetDefinition",
838 "LibrariesDefinition", "LibList", "Name", "OptName", "ArgVal",
839 "ArgListH", "ArgList", "FunctionHeaderH", "BEGIN", "FunctionHeader",
840 "END", "Function", "FnDeclareLinkage", "FunctionProto", "OptSideEffect",
841 "ConstValueRef", "SymbolicValueRef", "ValueRef", "ResolvedVal",
842 "BasicBlockList", "BasicBlock", "InstructionList", "BBTerminatorInst",
843 "JumpTable", "Inst", "PHIList", "ValueRefList", "ValueRefListE",
844 "OptTailCall", "InstVal", "IndexList", "OptVolatile", "MemoryInst", 0
849 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
851 static const unsigned short int yytoknum[] =
853 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
854 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
855 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
856 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
857 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
858 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
859 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
860 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
861 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
862 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
863 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
864 365, 366, 61, 44, 92, 40, 41, 91, 120, 93,
865 60, 62, 123, 125, 42, 99
869 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
870 static const unsigned char yyr1[] =
872 0, 126, 127, 127, 128, 128, 129, 129, 129, 129,
873 129, 129, 129, 129, 129, 130, 130, 130, 131, 131,
874 131, 131, 131, 131, 132, 132, 132, 133, 133, 133,
875 133, 134, 134, 134, 134, 135, 135, 136, 136, 137,
876 137, 138, 138, 138, 138, 138, 138, 138, 138, 139,
877 139, 139, 139, 139, 139, 139, 139, 140, 140, 141,
878 141, 142, 143, 143, 144, 144, 145, 145, 146, 146,
879 147, 147, 148, 149, 149, 149, 149, 149, 149, 149,
880 149, 149, 149, 149, 149, 150, 150, 150, 150, 150,
881 150, 150, 150, 150, 150, 151, 151, 152, 152, 152,
882 152, 153, 153, 153, 153, 153, 153, 153, 153, 153,
883 153, 153, 153, 153, 153, 153, 153, 154, 154, 154,
884 154, 154, 154, 154, 154, 154, 154, 155, 155, 156,
885 156, 157, 158, 158, 158, 158, 158, 159, 159, 159,
886 159, 159, 159, 159, 159, 159, 159, 160, 161, 161,
887 162, 162, 162, 162, 163, 164, 164, 164, 165, 165,
888 166, 166, 167, 168, 168, 169, 169, 169, 169, 170,
889 171, 171, 172, 173, 173, 174, 175, 175, 175, 176,
890 177, 177, 178, 178, 178, 178, 178, 178, 178, 178,
891 178, 178, 178, 179, 179, 180, 180, 181, 182, 182,
892 183, 184, 184, 184, 185, 185, 185, 185, 185, 185,
893 185, 185, 185, 186, 186, 187, 188, 188, 189, 189,
894 190, 190, 191, 191, 192, 192, 192, 192, 192, 192,
895 192, 192, 192, 192, 192, 192, 192, 192, 193, 193,
896 194, 194, 195, 195, 195, 195, 195, 195, 195, 195
899 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
900 static const unsigned char yyr2[] =
902 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
903 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
904 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
905 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
906 0, 1, 1, 1, 1, 1, 1, 1, 0, 1,
907 1, 1, 1, 1, 1, 2, 0, 0, 2, 0,
908 3, 2, 0, 1, 0, 3, 1, 2, 1, 1,
909 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
910 1, 1, 1, 1, 1, 1, 1, 1, 2, 4,
911 5, 5, 3, 2, 2, 1, 3, 1, 3, 1,
912 0, 4, 3, 3, 4, 4, 3, 2, 2, 2,
913 2, 2, 2, 2, 2, 2, 2, 6, 5, 8,
914 6, 6, 6, 6, 6, 8, 8, 3, 1, 1,
915 1, 1, 2, 2, 4, 2, 1, 4, 2, 4,
916 6, 6, 6, 6, 3, 4, 0, 1, 1, 1,
917 3, 3, 3, 3, 3, 3, 1, 0, 1, 1,
918 1, 0, 2, 3, 1, 1, 3, 1, 0, 8,
919 1, 1, 3, 1, 1, 3, 0, 1, 1, 3,
920 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
921 3, 1, 5, 1, 1, 1, 1, 2, 2, 1,
922 2, 2, 0, 1, 2, 2, 3, 9, 9, 8,
923 14, 1, 1, 6, 5, 2, 6, 7, 1, 3,
924 1, 0, 2, 1, 5, 5, 5, 2, 4, 4,
925 6, 4, 4, 6, 6, 2, 7, 1, 2, 0,
926 1, 0, 3, 6, 3, 6, 2, 4, 6, 4
929 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
930 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
931 means the default is an error. */
932 static const unsigned char yydefact[] =
934 146, 0, 48, 136, 1, 135, 176, 41, 42, 43,
935 45, 46, 47, 44, 0, 56, 202, 132, 133, 158,
936 159, 0, 0, 0, 48, 0, 138, 177, 178, 56,
937 0, 0, 49, 50, 51, 52, 53, 54, 0, 0,
938 203, 202, 199, 40, 0, 0, 0, 0, 144, 0,
939 0, 0, 0, 0, 0, 0, 39, 179, 147, 134,
940 55, 2, 3, 69, 73, 74, 75, 76, 77, 78,
941 79, 80, 81, 82, 83, 84, 85, 0, 0, 0,
942 0, 193, 0, 0, 68, 86, 72, 194, 87, 170,
943 171, 172, 173, 174, 175, 198, 0, 0, 0, 211,
944 212, 241, 200, 201, 0, 0, 0, 0, 157, 145,
945 139, 137, 129, 130, 0, 0, 0, 0, 88, 0,
946 0, 71, 93, 95, 0, 0, 100, 94, 205, 0,
947 204, 0, 0, 30, 34, 29, 33, 28, 32, 27,
948 31, 35, 36, 0, 240, 0, 223, 0, 56, 6,
949 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
950 17, 18, 19, 20, 21, 22, 23, 0, 0, 0,
951 0, 0, 0, 24, 25, 26, 0, 0, 0, 0,
952 0, 0, 0, 0, 0, 56, 215, 0, 237, 152,
953 149, 148, 150, 151, 153, 156, 0, 64, 64, 64,
954 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
955 83, 0, 0, 0, 0, 64, 0, 0, 0, 92,
956 168, 99, 97, 0, 182, 183, 184, 185, 186, 187,
957 188, 189, 180, 0, 0, 0, 0, 0, 0, 0,
958 0, 0, 0, 0, 191, 196, 195, 197, 0, 206,
959 0, 227, 222, 0, 59, 59, 246, 0, 0, 235,
960 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
961 0, 0, 0, 0, 154, 0, 142, 143, 141, 114,
962 115, 4, 5, 112, 113, 116, 107, 108, 111, 0,
963 0, 0, 0, 110, 109, 140, 70, 70, 96, 167,
964 161, 164, 165, 0, 0, 89, 181, 0, 0, 0,
965 0, 0, 0, 0, 128, 0, 0, 0, 0, 0,
966 0, 0, 0, 0, 242, 0, 244, 239, 0, 0,
967 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
968 0, 0, 0, 155, 0, 0, 66, 64, 102, 0,
969 0, 106, 0, 103, 90, 91, 160, 162, 0, 62,
970 98, 0, 239, 0, 0, 0, 0, 0, 0, 190,
971 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
972 0, 249, 0, 0, 0, 231, 232, 0, 0, 229,
973 0, 0, 0, 228, 0, 247, 0, 61, 67, 65,
974 101, 104, 105, 166, 163, 63, 57, 0, 0, 0,
975 0, 0, 0, 0, 127, 0, 0, 0, 0, 0,
976 0, 221, 59, 60, 59, 218, 238, 0, 0, 0,
977 0, 0, 224, 225, 226, 221, 0, 0, 169, 192,
978 118, 0, 0, 0, 0, 0, 0, 0, 0, 0,
979 0, 0, 220, 0, 0, 243, 245, 0, 0, 0,
980 230, 233, 234, 0, 248, 58, 0, 124, 0, 0,
981 117, 120, 121, 122, 123, 0, 209, 0, 0, 0,
982 219, 216, 0, 236, 0, 0, 0, 207, 0, 208,
983 0, 0, 217, 119, 125, 126, 0, 0, 0, 0,
984 0, 0, 214, 0, 0, 213, 0, 210
987 /* YYDEFGOTO[NTERM-NUM]. */
988 static const short int yydefgoto[] =
990 -1, 81, 283, 240, 241, 242, 243, 211, 212, 143,
991 213, 24, 15, 38, 438, 324, 346, 406, 276, 347,
992 82, 83, 214, 85, 86, 124, 223, 314, 244, 315,
993 114, 1, 2, 3, 59, 192, 48, 109, 196, 87,
994 357, 301, 302, 303, 39, 91, 16, 94, 17, 29,
995 18, 307, 245, 88, 247, 425, 41, 42, 43, 102,
996 478, 103, 259, 452, 453, 185, 186, 381, 187, 188
999 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1001 #define YYPACT_NINF -439
1002 static const short int yypact[] =
1004 -439, 63, 22, 577, -439, -439, 2, -439, -439, -439,
1005 -439, -439, -439, -439, 37, 188, 72, -439, -439, -439,
1006 -439, 21, -8, 45, 150, 9, -439, -439, -439, 188,
1007 94, 132, -439, -439, -439, -439, -439, -439, 883, -27,
1008 -439, -23, -439, 14, 41, 50, 56, 57, -439, 53,
1009 94, 883, 74, 74, 74, 74, -439, -439, -439, -439,
1010 -439, -439, -439, 59, -439, -439, -439, -439, -439, -439,
1011 -439, -439, -439, -439, -439, -439, -439, 168, 171, 174,
1012 457, -439, 66, 65, -439, -439, -53, -439, -439, -439,
1013 -439, -439, -439, -439, -439, -439, 935, 34, 224, -439,
1014 -439, 1039, -439, -439, 151, 64, 184, 159, 160, -439,
1015 -439, -439, -439, -439, 965, 965, 965, 993, -439, 81,
1016 83, -439, -439, -53, -72, 87, 742, -439, 59, 588,
1017 -439, 588, 588, -439, -439, -439, -439, -439, -439, -439,
1018 -439, -439, -439, 588, -439, 965, -439, 158, 188, -439,
1019 -439, -439, -439, -439, -439, -439, -439, -439, -439, -439,
1020 -439, -439, -439, -439, -439, -439, -439, 965, 965, 965,
1021 965, 965, 965, -439, -439, -439, 965, 965, 965, 965,
1022 965, 965, 965, 965, 965, 188, -439, 23, -439, -439,
1023 -439, -439, -439, -439, -439, -439, -34, 97, 97, 97,
1024 119, 147, 212, 152, 214, 155, 216, 157, 217, 215,
1025 220, 163, 219, 221, 429, 97, 965, 965, 965, -439,
1026 770, -439, 111, 113, -439, -439, -439, -439, -439, -439,
1027 -439, -439, 167, 116, 121, 133, 134, 135, 144, 993,
1028 149, 153, 154, 162, -439, -439, -439, -439, 165, -439,
1029 169, -439, -439, 883, 170, 172, -439, 588, 130, 173,
1030 177, 178, 185, 186, 189, 226, 588, 588, 588, 190,
1031 883, 965, 965, 236, -439, -7, -439, -439, -439, -439,
1032 -439, -439, -439, -439, -439, -439, -439, -439, -439, 798,
1033 993, 542, 237, -439, -439, -439, -22, -16, -53, -439,
1034 66, -439, 195, 193, 825, -439, -439, 240, 993, 993,
1035 993, 993, 993, 993, -439, -41, 993, 993, 993, 993,
1036 248, 250, 588, 3, -439, 4, -439, 201, 588, 164,
1037 965, 965, 965, 965, 965, 965, 202, 204, 205, 965,
1038 588, 588, 206, -439, 254, 317, -439, 97, -439, -20,
1039 -32, -439, -68, -439, -439, -439, -439, -439, 855, 286,
1040 -439, 213, 201, 218, 223, 225, 230, 288, 993, -439,
1041 231, 232, 234, 235, 588, 588, 210, 588, 324, 588,
1042 965, -439, 238, 588, 239, -439, -439, 244, 246, -439,
1043 588, 588, 588, -439, 245, -439, 965, -439, -439, -439,
1044 -439, -439, -439, -439, -439, -439, 272, 300, 233, 993,
1045 993, 993, 993, 965, -439, 993, 993, 993, 993, 249,
1046 253, 965, 252, -439, 252, -439, 261, 588, 263, 965,
1047 965, 965, -439, -439, -439, 965, 588, 328, -439, -439,
1048 -439, 265, 251, 266, 267, 271, 273, 274, 278, 282,
1049 325, -1, 261, 283, 296, -439, -439, 965, 247, 588,
1050 -439, -439, -439, 285, -439, -439, 993, -439, 993, 993,
1051 -439, -439, -439, -439, -439, 588, -439, 634, 16, 349,
1052 -439, -439, 287, -439, 289, 291, 292, -439, 297, -439,
1053 634, 377, -439, -439, -439, -439, 379, 298, 588, 588,
1054 384, 336, -439, 588, 388, -439, 588, -439
1057 /* YYPGOTO[NTERM-NUM]. */
1058 static const short int yypgoto[] =
1060 -439, -439, -439, 313, 314, 315, 316, -97, -96, -424,
1061 -439, 375, 396, -102, -439, -251, 67, -439, -190, -439,
1062 -44, -439, -38, -439, -69, 299, -439, -105, 208, -177,
1063 62, -439, -439, -439, 373, -439, -439, -439, -439, 0,
1064 -439, 69, -439, -439, 395, -439, -439, -439, -439, -439,
1065 425, -439, -438, -103, -6, 7, -439, 390, -439, -439,
1066 -439, -439, -439, 49, -3, -439, -439, 71, -439, -439
1069 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1070 positive, shift that token. If negative, reduce the rule which
1071 number is the opposite. If zero, do what YYDEFACT says.
1072 If YYTABLE_NINF, syntax error. */
1073 #define YYTABLE_NINF -132
1074 static const short int yytable[] =
1076 84, 141, 142, 25, 326, 89, 40, 111, 277, 278,
1077 92, 123, 215, 84, 133, 134, 135, 136, 137, 138,
1078 139, 140, -131, 377, 379, 295, 246, 477, 246, 246,
1079 344, 133, 134, 135, 136, 137, 138, 139, 140, 488,
1080 246, 218, 19, 25, 20, 368, 253, 27, 131, 28,
1081 345, 219, 497, 5, 490, 402, 6, 123, 129, 132,
1082 378, 378, -70, 4, 7, 8, 9, 10, 11, 12,
1083 13, 127, 368, 44, 45, 46, 197, 198, 199, 273,
1084 369, 368, 125, 270, 14, 274, 96, 97, 98, 401,
1085 99, 100, 47, 368, 19, 90, 20, 354, 30, 400,
1086 93, 40, 127, 130, 49, 355, 50, 129, 127, 112,
1087 113, 294, 349, 350, 352, 115, 116, 117, 476, 190,
1088 191, 56, 271, 272, 58, 248, 249, 279, 280, 254,
1089 255, 129, 257, 258, 129, 489, 60, 250, 129, 129,
1090 129, 129, 129, 266, 267, 268, 129, 296, 297, 298,
1091 -30, -30, 251, 104, 246, -29, -29, 399, -28, -28,
1092 -27, -27, 105, 246, 246, 246, 281, 282, 106, 107,
1093 108, 455, 118, 456, -71, 119, 256, 51, 120, 260,
1094 126, 189, 300, 261, 262, 263, 264, 265, 193, 194,
1095 195, 269, 7, 8, 9, 52, 11, 53, 13, 216,
1096 54, 217, 220, 362, 363, 364, 365, 366, 367, 322,
1097 275, 370, 371, 372, 373, 84, -34, 252, -33, 246,
1098 -32, -31, -37, 284, 304, 246, 340, -38, 285, 305,
1099 306, 308, 84, 341, 129, 298, 309, 246, 246, 133,
1100 134, 135, 136, 137, 138, 139, 140, 328, 310, 311,
1101 312, 327, 31, 32, 33, 34, 35, 36, 37, 313,
1102 336, 337, 338, 414, 316, 335, 343, 353, 317, 318,
1103 361, 246, 246, 374, 246, 375, 246, 319, 320, 342,
1104 246, 383, 321, 323, 397, 325, 329, 246, 246, 246,
1105 330, 331, 129, 385, 129, 129, 129, 389, 332, 333,
1106 356, 129, 334, 339, 441, 442, 443, 444, 358, 359,
1107 446, 447, 448, 449, 380, 390, 376, 391, 392, 396,
1108 300, 398, 382, 344, 246, 421, 407, 413, 423, 437,
1109 439, 409, 465, 246, 394, 395, 410, 384, 411, 386,
1110 387, 388, 129, 412, 415, 416, 393, 417, 418, 440,
1111 475, 427, 429, 378, 141, 142, 246, 430, 436, 431,
1112 435, 484, 450, 485, 486, 454, 481, 467, 419, 420,
1113 451, 422, 246, 424, 457, 445, 459, 428, 466, 468,
1114 469, 141, 142, 129, 432, 433, 434, 470, 491, 471,
1115 472, 129, 129, 129, 473, 246, 246, 129, 474, 479,
1116 246, 483, 498, 246, 499, 493, 492, 494, 495, 503,
1117 496, 500, 504, 506, 181, 182, 183, 184, 101, 129,
1118 55, 458, 293, 110, 57, 222, 405, 404, 26, 426,
1119 464, 95, 463, 408, 61, 62, 460, 461, 462, 286,
1120 287, 288, 0, 0, 0, 0, 0, 0, 0, 0,
1121 0, 0, 0, 482, 0, 0, 0, 19, 0, 20,
1122 0, 0, 61, 62, 480, 0, 0, 0, 0, 487,
1123 121, 64, 65, 66, 67, 68, 69, 70, 71, 72,
1124 73, 74, 75, 76, 0, 19, 0, 20, 0, 0,
1125 0, 0, 501, 502, 0, 0, 0, 505, 0, 0,
1126 507, 0, 0, 0, 0, 0, 0, 149, 150, 151,
1127 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
1128 162, 163, 164, 165, 166, 0, 0, 0, 0, 0,
1129 233, 0, 234, 173, 174, 175, 0, 235, 236, 237,
1130 238, 0, 0, 0, 0, 0, 289, 61, 62, 290,
1131 0, 291, 0, 0, 292, 121, 200, 201, 202, 203,
1132 204, 205, 206, 207, 208, 209, 210, 75, 76, 0,
1133 19, 77, 20, 0, 78, 0, 0, 79, 0, 80,
1134 122, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1135 0, 224, 225, 61, 62, 226, 227, 228, 229, 230,
1136 231, 0, 0, 0, -40, 19, 0, 20, 0, 0,
1137 0, 6, -40, -40, 0, 0, 19, 0, 20, -40,
1138 -40, -40, -40, -40, -40, -40, 0, -40, 21, 0,
1139 0, 0, 0, 0, 0, 22, 0, 224, 225, 23,
1140 0, 226, 227, 228, 229, 230, 231, 0, 0, 232,
1141 0, 0, 0, 0, 0, 0, 77, 0, 0, 78,
1142 0, 0, 79, 0, 80, 351, 149, 150, 151, 152,
1143 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
1144 163, 164, 165, 166, 0, 0, 0, 0, 0, 233,
1145 0, 234, 173, 174, 175, 232, 235, 236, 237, 238,
1146 0, 0, 0, 0, 0, 0, 0, 0, 239, 0,
1147 0, 0, 149, 150, 151, 152, 153, 154, 155, 156,
1148 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
1149 0, 0, 0, 0, 0, 233, 0, 234, 173, 174,
1150 175, 0, 235, 236, 237, 238, 0, 61, 62, 0,
1151 0, 0, 0, 0, 239, 121, 64, 65, 66, 67,
1152 68, 69, 70, 71, 72, 73, 74, 75, 76, 0,
1153 19, 0, 20, 0, 0, 61, 62, 0, 0, 0,
1154 0, 0, 221, 121, 64, 65, 66, 67, 68, 69,
1155 70, 71, 72, 73, 74, 75, 76, 0, 19, 0,
1156 20, 0, 0, 61, 62, 0, 0, 0, 0, 0,
1157 299, 121, 200, 201, 202, 203, 204, 205, 206, 207,
1158 208, 209, 210, 75, 76, 0, 19, 0, 20, 0,
1159 61, 62, 0, 0, 0, 0, 0, 0, 121, 64,
1160 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1161 75, 76, 0, 19, 0, 20, 77, 0, 0, 78,
1162 61, 62, 79, 0, 80, 360, 0, 0, 121, 64,
1163 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1164 75, 76, 0, 19, 77, 20, 0, 78, 61, 62,
1165 79, 0, 80, 0, 0, 403, 63, 64, 65, 66,
1166 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
1167 0, 19, 77, 20, 0, 78, 0, 348, 79, 0,
1168 80, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1169 0, 0, 0, 0, 0, 0, 0, 0, 0, 77,
1170 61, 62, 78, 0, 0, 79, 0, 80, 128, 64,
1171 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1172 75, 76, 0, 19, 0, 20, 0, 0, 0, 77,
1173 61, 62, 78, 0, 0, 79, 0, 80, 121, 64,
1174 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1175 75, 76, 0, 19, 0, 20, 0, 77, 61, 62,
1176 78, 0, 0, 79, 0, 80, 121, 200, 201, 202,
1177 203, 204, 205, 206, 207, 208, 209, 210, 75, 76,
1178 0, 19, 0, 20, 0, 0, 0, 0, 0, 0,
1179 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1180 0, 0, 0, 0, 0, 0, 0, 0, 0, 77,
1181 0, 0, 78, 0, 0, 79, 0, 80, 0, 0,
1182 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1183 0, 0, 0, 0, 0, 0, 0, 144, 0, 77,
1184 0, 0, 78, 0, 0, 79, 0, 80, 145, 0,
1185 0, 0, 0, 0, 0, 0, 0, 0, 146, 147,
1186 0, 0, 0, 0, 0, 0, 0, 77, 0, 0,
1187 78, 0, 0, 79, 148, 80, 0, 149, 150, 151,
1188 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
1189 162, 163, 164, 165, 166, 167, 168, 169, 0, 0,
1190 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
1194 static const short int yycheck[] =
1196 38, 98, 98, 3, 255, 32, 29, 51, 198, 199,
1197 33, 80, 117, 51, 15, 16, 17, 18, 19, 20,
1198 21, 22, 0, 20, 20, 215, 129, 451, 131, 132,
1199 37, 15, 16, 17, 18, 19, 20, 21, 22, 477,
1200 143, 113, 28, 43, 30, 113, 148, 45, 14, 47,
1201 57, 123, 490, 31, 478, 123, 34, 126, 96, 25,
1202 57, 57, 115, 0, 42, 43, 44, 45, 46, 47,
1203 48, 124, 113, 52, 53, 54, 114, 115, 116, 113,
1204 121, 113, 82, 185, 62, 119, 72, 73, 74, 121,
1205 76, 77, 71, 113, 28, 122, 30, 119, 61, 119,
1206 123, 29, 124, 96, 112, 121, 61, 145, 124, 35,
1207 36, 214, 289, 290, 291, 53, 54, 55, 119, 55,
1208 56, 112, 99, 100, 30, 131, 132, 8, 9, 167,
1209 168, 169, 170, 171, 172, 119, 4, 143, 176, 177,
1210 178, 179, 180, 181, 182, 183, 184, 216, 217, 218,
1211 3, 4, 145, 112, 257, 3, 4, 347, 3, 4,
1212 3, 4, 112, 266, 267, 268, 3, 4, 112, 112,
1213 117, 422, 4, 424, 115, 4, 169, 27, 4, 172,
1214 115, 30, 220, 176, 177, 178, 179, 180, 4, 30,
1215 30, 184, 42, 43, 44, 45, 46, 47, 48, 118,
1216 50, 118, 115, 308, 309, 310, 311, 312, 313, 253,
1217 113, 316, 317, 318, 319, 253, 4, 59, 4, 322,
1218 4, 4, 7, 4, 113, 328, 270, 7, 7, 116,
1219 63, 115, 270, 271, 272, 304, 115, 340, 341, 15,
1220 16, 17, 18, 19, 20, 21, 22, 117, 115, 115,
1221 115, 257, 64, 65, 66, 67, 68, 69, 70, 115,
1222 266, 267, 268, 368, 115, 39, 30, 30, 115, 115,
1223 30, 374, 375, 25, 377, 25, 379, 115, 113, 272,
1224 383, 117, 113, 113, 30, 113, 113, 390, 391, 392,
1225 113, 113, 330, 331, 332, 333, 334, 335, 113, 113,
1226 300, 339, 113, 113, 409, 410, 411, 412, 113, 116,
1227 415, 416, 417, 418, 113, 113, 322, 113, 113, 113,
1228 358, 4, 328, 37, 427, 115, 113, 39, 4, 57,
1229 30, 113, 4, 436, 340, 341, 113, 330, 113, 332,
1230 333, 334, 380, 113, 113, 113, 339, 113, 113, 116,
1231 25, 113, 113, 57, 451, 451, 459, 113, 396, 113,
1232 115, 466, 113, 468, 469, 113, 119, 116, 374, 375,
1233 117, 377, 475, 379, 113, 413, 113, 383, 113, 113,
1234 113, 478, 478, 421, 390, 391, 392, 116, 39, 116,
1235 116, 429, 430, 431, 116, 498, 499, 435, 116, 116,
1236 503, 116, 25, 506, 25, 116, 119, 116, 116, 25,
1237 113, 113, 76, 25, 101, 101, 101, 101, 43, 457,
1238 24, 427, 214, 50, 29, 126, 359, 358, 3, 380,
1239 436, 41, 435, 362, 5, 6, 429, 430, 431, 10,
1240 11, 12, -1, -1, -1, -1, -1, -1, -1, -1,
1241 -1, -1, -1, 459, -1, -1, -1, 28, -1, 30,
1242 -1, -1, 5, 6, 457, -1, -1, -1, -1, 475,
1243 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1244 23, 24, 25, 26, -1, 28, -1, 30, -1, -1,
1245 -1, -1, 498, 499, -1, -1, -1, 503, -1, -1,
1246 506, -1, -1, -1, -1, -1, -1, 78, 79, 80,
1247 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
1248 91, 92, 93, 94, 95, -1, -1, -1, -1, -1,
1249 101, -1, 103, 104, 105, 106, -1, 108, 109, 110,
1250 111, -1, -1, -1, -1, -1, 117, 5, 6, 120,
1251 -1, 122, -1, -1, 125, 13, 14, 15, 16, 17,
1252 18, 19, 20, 21, 22, 23, 24, 25, 26, -1,
1253 28, 114, 30, -1, 117, -1, -1, 120, -1, 122,
1254 123, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1255 -1, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1256 12, -1, -1, -1, 27, 28, -1, 30, -1, -1,
1257 -1, 34, 35, 36, -1, -1, 28, -1, 30, 42,
1258 43, 44, 45, 46, 47, 48, -1, 50, 51, -1,
1259 -1, -1, -1, -1, -1, 58, -1, 3, 4, 62,
1260 -1, 7, 8, 9, 10, 11, 12, -1, -1, 61,
1261 -1, -1, -1, -1, -1, -1, 114, -1, -1, 117,
1262 -1, -1, 120, -1, 122, 123, 78, 79, 80, 81,
1263 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
1264 92, 93, 94, 95, -1, -1, -1, -1, -1, 101,
1265 -1, 103, 104, 105, 106, 61, 108, 109, 110, 111,
1266 -1, -1, -1, -1, -1, -1, -1, -1, 120, -1,
1267 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
1268 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1269 -1, -1, -1, -1, -1, 101, -1, 103, 104, 105,
1270 106, -1, 108, 109, 110, 111, -1, 5, 6, -1,
1271 -1, -1, -1, -1, 120, 13, 14, 15, 16, 17,
1272 18, 19, 20, 21, 22, 23, 24, 25, 26, -1,
1273 28, -1, 30, -1, -1, 5, 6, -1, -1, -1,
1274 -1, -1, 40, 13, 14, 15, 16, 17, 18, 19,
1275 20, 21, 22, 23, 24, 25, 26, -1, 28, -1,
1276 30, -1, -1, 5, 6, -1, -1, -1, -1, -1,
1277 40, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1278 22, 23, 24, 25, 26, -1, 28, -1, 30, -1,
1279 5, 6, -1, -1, -1, -1, -1, -1, 13, 14,
1280 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1281 25, 26, -1, 28, -1, 30, 114, -1, -1, 117,
1282 5, 6, 120, -1, 122, 40, -1, -1, 13, 14,
1283 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1284 25, 26, -1, 28, 114, 30, -1, 117, 5, 6,
1285 120, -1, 122, -1, -1, 40, 13, 14, 15, 16,
1286 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1287 -1, 28, 114, 30, -1, 117, -1, 119, 120, -1,
1288 122, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1289 -1, -1, -1, -1, -1, -1, -1, -1, -1, 114,
1290 5, 6, 117, -1, -1, 120, -1, 122, 13, 14,
1291 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1292 25, 26, -1, 28, -1, 30, -1, -1, -1, 114,
1293 5, 6, 117, -1, -1, 120, -1, 122, 13, 14,
1294 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1295 25, 26, -1, 28, -1, 30, -1, 114, 5, 6,
1296 117, -1, -1, 120, -1, 122, 13, 14, 15, 16,
1297 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1298 -1, 28, -1, 30, -1, -1, -1, -1, -1, -1,
1299 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1300 -1, -1, -1, -1, -1, -1, -1, -1, -1, 114,
1301 -1, -1, 117, -1, -1, 120, -1, 122, -1, -1,
1302 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1303 -1, -1, -1, -1, -1, -1, -1, 38, -1, 114,
1304 -1, -1, 117, -1, -1, 120, -1, 122, 49, -1,
1305 -1, -1, -1, -1, -1, -1, -1, -1, 59, 60,
1306 -1, -1, -1, -1, -1, -1, -1, 114, -1, -1,
1307 117, -1, -1, 120, 75, 122, -1, 78, 79, 80,
1308 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
1309 91, 92, 93, 94, 95, 96, 97, 98, -1, -1,
1310 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
1314 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1315 symbol of state STATE-NUM. */
1316 static const unsigned char yystos[] =
1318 0, 157, 158, 159, 0, 31, 34, 42, 43, 44,
1319 45, 46, 47, 48, 62, 138, 172, 174, 176, 28,
1320 30, 51, 58, 62, 137, 165, 176, 45, 47, 175,
1321 61, 64, 65, 66, 67, 68, 69, 70, 139, 170,
1322 29, 182, 183, 184, 52, 53, 54, 71, 162, 112,
1323 61, 27, 45, 47, 50, 138, 112, 170, 30, 160,
1324 4, 5, 6, 13, 14, 15, 16, 17, 18, 19,
1325 20, 21, 22, 23, 24, 25, 26, 114, 117, 120,
1326 122, 127, 146, 147, 148, 149, 150, 165, 179, 32,
1327 122, 171, 33, 123, 173, 183, 72, 73, 74, 76,
1328 77, 137, 185, 187, 112, 112, 112, 112, 117, 163,
1329 160, 146, 35, 36, 156, 156, 156, 156, 4, 4,
1330 4, 13, 123, 150, 151, 165, 115, 124, 13, 148,
1331 181, 14, 25, 15, 16, 17, 18, 19, 20, 21,
1332 22, 133, 134, 135, 38, 49, 59, 60, 75, 78,
1333 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1334 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
1335 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
1336 111, 129, 130, 131, 132, 191, 192, 194, 195, 30,
1337 55, 56, 161, 4, 30, 30, 164, 148, 148, 148,
1338 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1339 24, 133, 134, 136, 148, 153, 118, 118, 113, 123,
1340 115, 40, 151, 152, 3, 4, 7, 8, 9, 10,
1341 11, 12, 61, 101, 103, 108, 109, 110, 111, 120,
1342 129, 130, 131, 132, 154, 178, 179, 180, 180, 180,
1343 180, 181, 59, 139, 148, 148, 181, 148, 148, 188,
1344 181, 181, 181, 181, 181, 181, 148, 148, 148, 181,
1345 139, 99, 100, 113, 119, 113, 144, 144, 144, 8,
1346 9, 3, 4, 128, 4, 7, 10, 11, 12, 117,
1347 120, 122, 125, 154, 179, 144, 150, 150, 150, 40,
1348 148, 167, 168, 169, 113, 116, 63, 177, 115, 115,
1349 115, 115, 115, 115, 153, 155, 115, 115, 115, 115,
1350 113, 113, 146, 113, 141, 113, 141, 180, 117, 113,
1351 113, 113, 113, 113, 113, 39, 180, 180, 180, 113,
1352 146, 148, 181, 30, 37, 57, 142, 145, 119, 155,
1353 155, 123, 155, 30, 119, 121, 165, 166, 113, 116,
1354 40, 30, 153, 153, 153, 153, 153, 153, 113, 121,
1355 153, 153, 153, 153, 25, 25, 180, 20, 57, 20,
1356 113, 193, 180, 117, 181, 148, 181, 181, 181, 148,
1357 113, 113, 113, 181, 180, 180, 113, 30, 4, 144,
1358 119, 121, 123, 40, 167, 142, 143, 113, 193, 113,
1359 113, 113, 113, 39, 153, 113, 113, 113, 113, 180,
1360 180, 115, 180, 4, 180, 181, 189, 113, 180, 113,
1361 113, 113, 180, 180, 180, 115, 148, 57, 140, 30,
1362 116, 153, 153, 153, 153, 148, 153, 153, 153, 153,
1363 113, 117, 189, 190, 113, 141, 141, 113, 180, 113,
1364 181, 181, 181, 190, 180, 4, 113, 116, 113, 113,
1365 116, 116, 116, 116, 116, 25, 119, 135, 186, 116,
1366 181, 119, 180, 116, 153, 153, 153, 180, 178, 119,
1367 135, 39, 119, 116, 116, 116, 113, 178, 25, 25,
1368 113, 180, 180, 25, 76, 180, 25, 180
1371 #define yyerrok (yyerrstatus = 0)
1372 #define yyclearin (yychar = YYEMPTY)
1373 #define YYEMPTY (-2)
1376 #define YYACCEPT goto yyacceptlab
1377 #define YYABORT goto yyabortlab
1378 #define YYERROR goto yyerrorlab
1381 /* Like YYERROR except do call yyerror. This remains here temporarily
1382 to ease the transition to the new meaning of YYERROR, for GCC.
1383 Once GCC version 2 has supplanted version 1, this can go. */
1385 #define YYFAIL goto yyerrlab
1387 #define YYRECOVERING() (!!yyerrstatus)
1389 #define YYBACKUP(Token, Value) \
1391 if (yychar == YYEMPTY && yylen == 1) \
1395 yytoken = YYTRANSLATE (yychar); \
1401 yyerror (YY_("syntax error: cannot back up")); \
1408 #define YYERRCODE 256
1411 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1412 If N is 0, then set CURRENT to the empty location which ends
1413 the previous symbol: RHS[0] (always defined). */
1415 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1416 #ifndef YYLLOC_DEFAULT
1417 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1421 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1422 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1423 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1424 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1428 (Current).first_line = (Current).last_line = \
1429 YYRHSLOC (Rhs, 0).last_line; \
1430 (Current).first_column = (Current).last_column = \
1431 YYRHSLOC (Rhs, 0).last_column; \
1437 /* YY_LOCATION_PRINT -- Print the location on the stream.
1438 This macro was not mandated originally: define only if we know
1439 we won't break user code: when these are the locations we know. */
1441 #ifndef YY_LOCATION_PRINT
1442 # if YYLTYPE_IS_TRIVIAL
1443 # define YY_LOCATION_PRINT(File, Loc) \
1444 fprintf (File, "%d.%d-%d.%d", \
1445 (Loc).first_line, (Loc).first_column, \
1446 (Loc).last_line, (Loc).last_column)
1448 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1453 /* YYLEX -- calling `yylex' with the right arguments. */
1456 # define YYLEX yylex (YYLEX_PARAM)
1458 # define YYLEX yylex ()
1461 /* Enable debugging if requested. */
1465 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1466 # define YYFPRINTF fprintf
1469 # define YYDPRINTF(Args) \
1475 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1479 YYFPRINTF (stderr, "%s ", Title); \
1480 yysymprint (stderr, \
1482 YYFPRINTF (stderr, "\n"); \
1486 /*------------------------------------------------------------------.
1487 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1489 `------------------------------------------------------------------*/
1491 #if defined (__STDC__) || defined (__cplusplus)
1493 yy_stack_print (short int *bottom, short int *top)
1496 yy_stack_print (bottom, top)
1501 YYFPRINTF (stderr, "Stack now");
1502 for (/* Nothing. */; bottom <= top; ++bottom)
1503 YYFPRINTF (stderr, " %d", *bottom);
1504 YYFPRINTF (stderr, "\n");
1507 # define YY_STACK_PRINT(Bottom, Top) \
1510 yy_stack_print ((Bottom), (Top)); \
1514 /*------------------------------------------------.
1515 | Report that the YYRULE is going to be reduced. |
1516 `------------------------------------------------*/
1518 #if defined (__STDC__) || defined (__cplusplus)
1520 yy_reduce_print (int yyrule)
1523 yy_reduce_print (yyrule)
1528 unsigned long int yylno = yyrline[yyrule];
1529 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
1531 /* Print the symbols being reduced, and their result. */
1532 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
1533 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1534 YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
1537 # define YY_REDUCE_PRINT(Rule) \
1540 yy_reduce_print (Rule); \
1543 /* Nonzero means print parse trace. It is left uninitialized so that
1544 multiple parsers can coexist. */
1546 #else /* !YYDEBUG */
1547 # define YYDPRINTF(Args)
1548 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1549 # define YY_STACK_PRINT(Bottom, Top)
1550 # define YY_REDUCE_PRINT(Rule)
1551 #endif /* !YYDEBUG */
1554 /* YYINITDEPTH -- initial size of the parser's stacks. */
1556 # define YYINITDEPTH 200
1559 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1560 if the built-in stack extension method is used).
1562 Do not make this value too large; the results are undefined if
1563 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1564 evaluated with infinite-precision integer arithmetic. */
1567 # define YYMAXDEPTH 10000
1575 # if defined (__GLIBC__) && defined (_STRING_H)
1576 # define yystrlen strlen
1578 /* Return the length of YYSTR. */
1580 # if defined (__STDC__) || defined (__cplusplus)
1581 yystrlen (const char *yystr)
1587 const char *yys = yystr;
1589 while (*yys++ != '\0')
1592 return yys - yystr - 1;
1598 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1599 # define yystpcpy stpcpy
1601 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1604 # if defined (__STDC__) || defined (__cplusplus)
1605 yystpcpy (char *yydest, const char *yysrc)
1607 yystpcpy (yydest, yysrc)
1613 const char *yys = yysrc;
1615 while ((*yyd++ = *yys++) != '\0')
1624 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1625 quotes and backslashes, so that it's suitable for yyerror. The
1626 heuristic is that double-quoting is unnecessary unless the string
1627 contains an apostrophe, a comma, or backslash (other than
1628 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1629 null, do not copy; instead, return the length of what the result
1632 yytnamerr (char *yyres, const char *yystr)
1637 char const *yyp = yystr;
1644 goto do_not_strip_quotes;
1648 goto do_not_strip_quotes;
1661 do_not_strip_quotes: ;
1665 return yystrlen (yystr);
1667 return yystpcpy (yyres, yystr) - yyres;
1671 #endif /* YYERROR_VERBOSE */
1676 /*--------------------------------.
1677 | Print this symbol on YYOUTPUT. |
1678 `--------------------------------*/
1680 #if defined (__STDC__) || defined (__cplusplus)
1682 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
1685 yysymprint (yyoutput, yytype, yyvaluep)
1691 /* Pacify ``unused variable'' warnings. */
1694 if (yytype < YYNTOKENS)
1695 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1697 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1701 if (yytype < YYNTOKENS)
1702 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1709 YYFPRINTF (yyoutput, ")");
1712 #endif /* ! YYDEBUG */
1713 /*-----------------------------------------------.
1714 | Release the memory associated to this symbol. |
1715 `-----------------------------------------------*/
1717 #if defined (__STDC__) || defined (__cplusplus)
1719 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1722 yydestruct (yymsg, yytype, yyvaluep)
1728 /* Pacify ``unused variable'' warnings. */
1733 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1744 /* Prevent warnings from -Wmissing-prototypes. */
1746 #ifdef YYPARSE_PARAM
1747 # if defined (__STDC__) || defined (__cplusplus)
1748 int yyparse (void *YYPARSE_PARAM);
1752 #else /* ! YYPARSE_PARAM */
1753 #if defined (__STDC__) || defined (__cplusplus)
1758 #endif /* ! YYPARSE_PARAM */
1762 /* The look-ahead symbol. */
1765 /* The semantic value of the look-ahead symbol. */
1768 /* Number of syntax errors so far. */
1777 #ifdef YYPARSE_PARAM
1778 # if defined (__STDC__) || defined (__cplusplus)
1779 int yyparse (void *YYPARSE_PARAM)
1781 int yyparse (YYPARSE_PARAM)
1782 void *YYPARSE_PARAM;
1784 #else /* ! YYPARSE_PARAM */
1785 #if defined (__STDC__) || defined (__cplusplus)
1799 /* Number of tokens to shift before error messages enabled. */
1801 /* Look-ahead token as an internal (translated) token number. */
1804 /* Three stacks and their tools:
1805 `yyss': related to states,
1806 `yyvs': related to semantic values,
1807 `yyls': related to locations.
1809 Refer to the stacks thru separate pointers, to allow yyoverflow
1810 to reallocate them elsewhere. */
1812 /* The state stack. */
1813 short int yyssa[YYINITDEPTH];
1814 short int *yyss = yyssa;
1817 /* The semantic value stack. */
1818 YYSTYPE yyvsa[YYINITDEPTH];
1819 YYSTYPE *yyvs = yyvsa;
1824 #define YYPOPSTACK (yyvsp--, yyssp--)
1826 YYSIZE_T yystacksize = YYINITDEPTH;
1828 /* The variables used to return semantic value and location from the
1833 /* When reducing, the number of symbols on the RHS of the reduced
1837 YYDPRINTF ((stderr, "Starting parse\n"));
1842 yychar = YYEMPTY; /* Cause a token to be read. */
1844 /* Initialize stack pointers.
1845 Waste one element of value and location stack
1846 so that they stay on the same level as the state stack.
1847 The wasted elements are never initialized. */
1854 /*------------------------------------------------------------.
1855 | yynewstate -- Push a new state, which is found in yystate. |
1856 `------------------------------------------------------------*/
1858 /* In all cases, when you get here, the value and location stacks
1859 have just been pushed. so pushing a state here evens the stacks.
1866 if (yyss + yystacksize - 1 <= yyssp)
1868 /* Get the current used size of the three stacks, in elements. */
1869 YYSIZE_T yysize = yyssp - yyss + 1;
1873 /* Give user a chance to reallocate the stack. Use copies of
1874 these so that the &'s don't force the real ones into
1876 YYSTYPE *yyvs1 = yyvs;
1877 short int *yyss1 = yyss;
1880 /* Each stack pointer address is followed by the size of the
1881 data in use in that stack, in bytes. This used to be a
1882 conditional around just the two extra args, but that might
1883 be undefined if yyoverflow is a macro. */
1884 yyoverflow (YY_("memory exhausted"),
1885 &yyss1, yysize * sizeof (*yyssp),
1886 &yyvs1, yysize * sizeof (*yyvsp),
1893 #else /* no yyoverflow */
1894 # ifndef YYSTACK_RELOCATE
1895 goto yyexhaustedlab;
1897 /* Extend the stack our own way. */
1898 if (YYMAXDEPTH <= yystacksize)
1899 goto yyexhaustedlab;
1901 if (YYMAXDEPTH < yystacksize)
1902 yystacksize = YYMAXDEPTH;
1905 short int *yyss1 = yyss;
1906 union yyalloc *yyptr =
1907 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1909 goto yyexhaustedlab;
1910 YYSTACK_RELOCATE (yyss);
1911 YYSTACK_RELOCATE (yyvs);
1913 # undef YYSTACK_RELOCATE
1915 YYSTACK_FREE (yyss1);
1918 #endif /* no yyoverflow */
1920 yyssp = yyss + yysize - 1;
1921 yyvsp = yyvs + yysize - 1;
1924 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1925 (unsigned long int) yystacksize));
1927 if (yyss + yystacksize - 1 <= yyssp)
1931 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1940 /* Do appropriate processing given the current state. */
1941 /* Read a look-ahead token if we need one and don't already have one. */
1944 /* First try to decide what to do without reference to look-ahead token. */
1946 yyn = yypact[yystate];
1947 if (yyn == YYPACT_NINF)
1950 /* Not known => get a look-ahead token if don't already have one. */
1952 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1953 if (yychar == YYEMPTY)
1955 YYDPRINTF ((stderr, "Reading a token: "));
1959 if (yychar <= YYEOF)
1961 yychar = yytoken = YYEOF;
1962 YYDPRINTF ((stderr, "Now at end of input.\n"));
1966 yytoken = YYTRANSLATE (yychar);
1967 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1970 /* If the proper action on seeing token YYTOKEN is to reduce or to
1971 detect an error, take that action. */
1973 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1978 if (yyn == 0 || yyn == YYTABLE_NINF)
1987 /* Shift the look-ahead token. */
1988 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1990 /* Discard the token being shifted unless it is eof. */
1991 if (yychar != YYEOF)
1997 /* Count tokens shifted since error; after three, turn off error
2006 /*-----------------------------------------------------------.
2007 | yydefault -- do the default action for the current state. |
2008 `-----------------------------------------------------------*/
2010 yyn = yydefact[yystate];
2016 /*-----------------------------.
2017 | yyreduce -- Do a reduction. |
2018 `-----------------------------*/
2020 /* yyn is the number of a rule to reduce with. */
2023 /* If YYLEN is nonzero, implement the default value of the action:
2026 Otherwise, the following line sets YYVAL to garbage.
2027 This behavior is undocumented and Bison
2028 users should not rely upon it. Assigning to YYVAL
2029 unconditionally makes the parser a bit smaller, and it avoids a
2030 GCC warning that YYVAL may be used uninitialized. */
2031 yyval = yyvsp[1-yylen];
2034 YY_REDUCE_PRINT (yyn);
2038 #line 207 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2040 *(yyvsp[-1].String) += " = ";
2041 (yyval.String) = (yyvsp[-1].String);
2046 #line 211 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2048 (yyval.String) = new std::string("");
2053 #line 218 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2054 { (yyval.String) = new std::string(""); ;}
2058 #line 223 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2060 *(yyvsp[-1].String) += *(yyvsp[0].Const).cnst;
2061 (yyvsp[0].Const).destroy();
2062 (yyval.String) = (yyvsp[-1].String);
2067 #line 228 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2068 { (yyval.String) = new std::string(""); ;}
2072 #line 233 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2073 { (yyval.String) = new std::string(); ;}
2077 #line 234 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2078 { *(yyvsp[-1].String) += " " + *(yyvsp[0].Const).cnst; delete (yyvsp[0].Const).cnst; (yyval.String) = (yyvsp[-1].String); ;}
2082 #line 237 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2083 { (yyval.String) = new std::string(); ;}
2087 #line 238 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2089 (yyvsp[-1].String)->insert(0, ", ");
2090 *(yyvsp[-1].String) += " " + *(yyvsp[0].Const).cnst;
2091 delete (yyvsp[0].Const).cnst;
2092 (yyval.String) = (yyvsp[-1].String);
2097 #line 246 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2099 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2100 delete (yyvsp[0].String);
2101 (yyval.String) = (yyvsp[-1].String);
2106 #line 252 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2107 { (yyval.String) = new std::string(); ;}
2111 #line 256 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2112 { (yyval.String) = new std::string(); ;}
2116 #line 257 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2118 (yyvsp[-1].String)->insert(0, ", ");
2119 if (!(yyvsp[0].String)->empty())
2120 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2121 delete (yyvsp[0].String);
2122 (yyval.String) = (yyvsp[-1].String);
2127 #line 267 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2129 *(yyvsp[-1].String) += " " + *(yyvsp[0].Const).cnst;
2130 delete (yyvsp[0].Const).cnst;
2131 (yyval.String) = (yyvsp[-1].String);
2136 #line 289 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2138 (yyval.Type).newTy = (yyvsp[0].String); (yyval.Type).oldTy = OpaqueTy;
2143 #line 295 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2144 { // Type UpReference
2145 (yyvsp[0].Const).cnst->insert(0, "\\");
2146 (yyval.Type).newTy = (yyvsp[0].Const).cnst;
2147 (yyval.Type).oldTy = OpaqueTy;
2152 #line 300 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2153 { // Function derived type?
2154 *(yyvsp[-3].Type).newTy += "( " + *(yyvsp[-1].String) + " )";
2155 delete (yyvsp[-1].String);
2156 (yyval.Type).newTy = (yyvsp[-3].Type).newTy;
2157 (yyval.Type).oldTy = FunctionTy;
2162 #line 306 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2163 { // Sized array type?
2164 (yyvsp[-3].Const).cnst->insert(0,"[ ");
2165 *(yyvsp[-3].Const).cnst += " x " + *(yyvsp[-1].Type).newTy + " ]";
2166 delete (yyvsp[-1].Type).newTy;
2167 (yyval.Type).newTy = (yyvsp[-3].Const).cnst;
2168 (yyval.Type).oldTy = ArrayTy;
2173 #line 313 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2174 { // Packed array type?
2175 (yyvsp[-3].Const).cnst->insert(0,"< ");
2176 *(yyvsp[-3].Const).cnst += " x " + *(yyvsp[-1].Type).newTy + " >";
2177 delete (yyvsp[-1].Type).newTy;
2178 (yyval.Type).newTy = (yyvsp[-3].Const).cnst;
2179 (yyval.Type).oldTy = PackedTy;
2184 #line 320 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2185 { // Structure type?
2186 (yyvsp[-1].String)->insert(0, "{ ");
2187 *(yyvsp[-1].String) += " }";
2188 (yyval.Type).newTy = (yyvsp[-1].String);
2189 (yyval.Type).oldTy = StructTy;
2194 #line 326 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2195 { // Empty structure type?
2196 (yyval.Type).newTy = new std::string("{ }");
2197 (yyval.Type).oldTy = StructTy;
2202 #line 330 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2204 *(yyvsp[-1].Type).newTy += '*';
2205 (yyvsp[-1].Type).oldTy = PointerTy;
2206 (yyval.Type) = (yyvsp[-1].Type);
2211 #line 340 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2213 (yyval.String) = (yyvsp[0].Type).newTy;
2218 #line 343 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2220 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Type).newTy;
2221 delete (yyvsp[0].Type).newTy;
2222 (yyval.String) = (yyvsp[-2].String);
2227 #line 352 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2229 *(yyvsp[-2].String) += ", ...";
2230 delete (yyvsp[0].String);
2231 (yyval.String) = (yyvsp[-2].String);
2236 #line 357 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2238 (yyval.String) = (yyvsp[0].String);
2243 #line 360 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2245 (yyval.String) = new std::string();
2250 #line 370 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2251 { // Nonempty unsized arr
2252 (yyval.Const).type = (yyvsp[-3].Type);
2253 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2254 *(yyval.Const).cnst += " [ " + *(yyvsp[-1].String) + " ]";
2255 delete (yyvsp[-1].String);
2260 #line 376 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2262 (yyval.Const).type = (yyvsp[-2].Type);
2263 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2264 *(yyval.Const).cnst += "[ ]";
2269 #line 381 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2271 (yyval.Const).type = (yyvsp[-2].Type);
2272 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2273 *(yyval.Const).cnst += " c" + *(yyvsp[0].String);
2274 delete (yyvsp[0].String);
2279 #line 387 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2280 { // Nonempty unsized arr
2281 (yyval.Const).type = (yyvsp[-3].Type);
2282 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2283 *(yyval.Const).cnst += " < " + *(yyvsp[-1].String) + " >";
2284 delete (yyvsp[-1].String);
2289 #line 393 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2291 (yyval.Const).type = (yyvsp[-3].Type);
2292 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2293 *(yyval.Const).cnst += " { " + *(yyvsp[-1].String) + " }";
2294 delete (yyvsp[-1].String);
2299 #line 399 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2301 (yyval.Const).type = (yyvsp[-2].Type);
2302 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2303 *(yyval.Const).cnst += " [ ]";
2308 #line 404 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2310 (yyval.Const).type = (yyvsp[-1].Type);
2311 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2312 *(yyval.Const).cnst += " " + *(yyvsp[0].Const).cnst;
2313 (yyvsp[0].Const).destroy();
2318 #line 410 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2320 (yyval.Const).type = (yyvsp[-1].Type);
2321 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2322 *(yyval.Const).cnst += " " + *(yyvsp[0].Const).cnst;
2323 (yyvsp[0].Const).destroy();
2328 #line 416 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2330 (yyval.Const).type = (yyvsp[-1].Type);
2331 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2332 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2333 delete (yyvsp[0].String);
2338 #line 422 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2340 (yyval.Const).type = (yyvsp[-1].Type);
2341 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2342 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2343 delete (yyvsp[0].String);
2348 #line 428 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2350 (yyval.Const).type = (yyvsp[-1].Type);
2351 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2352 *(yyval.Const).cnst += " " + *(yyvsp[0].Const).cnst;
2353 (yyvsp[0].Const).destroy();
2358 #line 434 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2359 { // integral constants
2360 (yyval.Const).type = (yyvsp[-1].Type);
2361 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2362 *(yyval.Const).cnst += " " + *(yyvsp[0].Const).cnst;
2363 (yyvsp[0].Const).destroy();
2368 #line 440 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2369 { // integral constants
2370 (yyval.Const).type = (yyvsp[-1].Type);
2371 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2372 *(yyval.Const).cnst += " " + *(yyvsp[0].Const).cnst;
2373 (yyvsp[0].Const).destroy();
2378 #line 446 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2379 { // Boolean constants
2380 (yyval.Const).type = (yyvsp[-1].Type);
2381 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2382 *(yyval.Const).cnst += " " + *(yyvsp[0].Const).cnst;
2383 (yyvsp[0].Const).destroy();
2388 #line 452 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2389 { // Boolean constants
2390 (yyval.Const).type = (yyvsp[-1].Type);
2391 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2392 *(yyval.Const).cnst += " " + *(yyvsp[0].Const).cnst;
2393 (yyvsp[0].Const).destroy();
2398 #line 458 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2399 { // Float & Double constants
2400 (yyval.Const).type = (yyvsp[-1].Type);
2401 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2402 *(yyval.Const).cnst += " " + *(yyvsp[0].Const).cnst;
2403 (yyvsp[0].Const).destroy();
2408 #line 466 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2410 // We must infer the cast opcode from the types of the operands.
2411 const char *opcode = getCastOpcode((yyvsp[-3].Const).type, (yyvsp[-1].Type));
2412 (yyval.String) = new std::string(opcode);
2413 *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + " " + *(yyvsp[-2].String) + " " + *(yyvsp[-1].Type).newTy + ")";
2414 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
2419 #line 473 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2421 *(yyvsp[-4].String) += "(" + *(yyvsp[-2].Const).cnst + " " + *(yyvsp[-1].String) + ")";
2422 (yyval.String) = (yyvsp[-4].String);
2423 (yyvsp[-2].Const).destroy();
2424 delete (yyvsp[-1].String);
2429 #line 479 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2431 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2432 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2433 (yyval.String) = (yyvsp[-7].String);
2438 #line 484 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2440 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2441 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2442 (yyval.String) = (yyvsp[-5].String);
2447 #line 489 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2449 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2450 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2451 (yyval.String) = (yyvsp[-5].String);
2456 #line 494 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2458 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2459 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2460 (yyval.String) = (yyvsp[-5].String);
2465 #line 499 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2467 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2468 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2469 (yyval.String) = (yyvsp[-5].String);
2474 #line 504 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2476 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2477 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2478 (yyval.String) = (yyvsp[-5].String);
2483 #line 509 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2485 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2486 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2487 (yyval.String) = (yyvsp[-7].String);
2492 #line 514 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2494 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2495 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2496 (yyval.String) = (yyvsp[-7].String);
2501 #line 524 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2503 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Const).cnst;
2504 (yyvsp[0].Const).destroy();
2505 (yyval.String) = (yyvsp[-2].String);
2510 #line 529 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2511 { (yyval.String) = new std::string(*(yyvsp[0].Const).cnst); (yyvsp[0].Const).destroy(); ;}
2515 #line 544 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2521 #line 549 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2528 #line 552 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2530 *O << *(yyvsp[0].String) << "\n";
2531 delete (yyvsp[0].String);
2537 #line 557 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2539 *O << "module asm " << " " << *(yyvsp[0].String) << "\n";
2545 #line 561 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2547 *O << "implementation\n";
2553 #line 568 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2555 *O << *(yyvsp[-2].String) << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Type).newTy << "\n";
2556 // delete $2; delete $3; $4.destroy();
2562 #line 573 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2563 { // Function prototypes can be in const pool
2564 *O << *(yyvsp[0].String) << "\n";
2565 delete (yyvsp[0].String);
2571 #line 578 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2572 { // Asm blocks can be in the const pool
2573 *O << *(yyvsp[-2].String) << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
2574 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
2580 #line 583 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2582 *O << *(yyvsp[-4].String) << " " << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Const).cnst << " "
2583 << *(yyvsp[0].String) << "\n";
2584 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Const).destroy(); delete (yyvsp[0].String);
2590 #line 589 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2592 *O << *(yyvsp[-4].String) << " " << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy
2593 << " " << *(yyvsp[0].String) << "\n";
2594 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
2600 #line 595 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2602 *O << *(yyvsp[-4].String) << " " << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy
2603 << " " << *(yyvsp[0].String) << "\n";
2604 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
2610 #line 601 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2612 *O << *(yyvsp[-4].String) << " " << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy
2613 << " " << *(yyvsp[0].String) << "\n";
2614 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
2620 #line 607 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2622 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
2623 delete (yyvsp[-1].String); delete (yyvsp[0].String);
2629 #line 612 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2631 *O << *(yyvsp[-2].String) << " = " << *(yyvsp[0].String) << "\n";
2632 delete (yyvsp[-2].String); delete (yyvsp[0].String);
2638 #line 617 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2645 #line 627 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2647 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
2648 delete (yyvsp[0].String);
2649 (yyval.String) = (yyvsp[-2].String);
2654 #line 632 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2656 *(yyvsp[-2].String) += " = " + *(yyvsp[0].Const).cnst;
2657 if (*(yyvsp[0].Const).cnst == "64")
2659 (yyvsp[0].Const).destroy();
2660 (yyval.String) = (yyvsp[-2].String);
2665 #line 639 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2667 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
2668 delete (yyvsp[0].String);
2669 (yyval.String) = (yyvsp[-2].String);
2674 #line 644 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2676 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
2677 delete (yyvsp[0].String);
2678 (yyval.String) = (yyvsp[-2].String);
2683 #line 651 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2685 (yyvsp[-1].String)->insert(0, "[ ");
2686 *(yyvsp[-1].String) += " ]";
2687 (yyval.String) = (yyvsp[-1].String);
2692 #line 658 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2694 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
2695 delete (yyvsp[0].String);
2696 (yyval.String) = (yyvsp[-2].String);
2701 #line 664 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2703 (yyval.String) = new std::string();
2708 #line 673 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2709 { (yyval.String) = new std::string(); ;}
2713 #line 675 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2715 (yyval.String) = (yyvsp[-1].Type).newTy;
2716 if (!(yyvsp[0].String)->empty())
2717 *(yyval.String) += " " + *(yyvsp[0].String);
2718 delete (yyvsp[0].String);
2723 #line 682 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2725 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
2726 delete (yyvsp[0].String);
2731 #line 686 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2733 (yyval.String) = (yyvsp[0].String);
2738 #line 690 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2740 (yyval.String) = (yyvsp[0].String);
2745 #line 693 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2747 *(yyvsp[-2].String) += ", ...";
2748 (yyval.String) = (yyvsp[-2].String);
2749 delete (yyvsp[0].String);
2754 #line 698 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2756 (yyval.String) = (yyvsp[0].String);
2761 #line 701 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2762 { (yyval.String) = new std::string(); ;}
2766 #line 704 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2768 if (!(yyvsp[-7].String)->empty()) {
2769 *(yyvsp[-7].String) += " ";
2771 *(yyvsp[-7].String) += *(yyvsp[-6].Type).newTy + " " + *(yyvsp[-5].String) + "(" + *(yyvsp[-3].String) + ")";
2772 if (!(yyvsp[-1].String)->empty()) {
2773 *(yyvsp[-7].String) += " " + *(yyvsp[-1].String);
2775 if (!(yyvsp[0].String)->empty()) {
2776 *(yyvsp[-7].String) += " " + *(yyvsp[0].String);
2778 (yyvsp[-6].Type).destroy();
2779 delete (yyvsp[-5].String);
2780 delete (yyvsp[-3].String);
2781 delete (yyvsp[-1].String);
2782 delete (yyvsp[0].String);
2783 (yyval.String) = (yyvsp[-7].String);
2788 #line 723 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2790 (yyval.String) = new std::string("begin");
2795 #line 726 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2797 (yyval.String) = new std::string ("{");
2802 #line 730 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2804 if (!(yyvsp[-2].String)->empty()) {
2805 *O << *(yyvsp[-2].String) << " ";
2807 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
2808 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
2814 #line 739 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2815 { (yyval.String) = new std::string("end"); ;}
2819 #line 740 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2820 { (yyval.String) = new std::string("}"); ;}
2824 #line 742 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2826 if ((yyvsp[-1].String))
2827 *O << *(yyvsp[-1].String);
2828 *O << '\n' << *(yyvsp[0].String) << "\n";
2834 #line 750 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2835 { (yyval.String) = new std::string(); ;}
2839 #line 756 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2841 if (!(yyvsp[-1].String)->empty())
2842 *(yyvsp[-2].String) += " " + *(yyvsp[-1].String);
2843 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
2844 delete (yyvsp[-1].String);
2845 delete (yyvsp[0].String);
2846 (yyval.String) = (yyvsp[-2].String);
2851 #line 769 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2852 { (yyval.String) = new std::string(); ;}
2856 #line 773 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2857 { (yyval.String) = (yyvsp[0].Const).cnst; ;}
2861 #line 774 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2862 { (yyval.String) = (yyvsp[0].Const).cnst; ;}
2866 #line 775 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2867 { (yyval.String) = (yyvsp[0].Const).cnst; ;}
2871 #line 776 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2872 { (yyval.String) = (yyvsp[0].Const).cnst; ;}
2876 #line 777 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2877 { (yyval.String) = (yyvsp[0].Const).cnst; ;}
2881 #line 778 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2882 { (yyval.String) = (yyvsp[0].Const).cnst; ;}
2886 #line 779 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2887 { (yyval.String) = (yyvsp[0].Const).cnst; ;}
2891 #line 780 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2892 { (yyval.String) = (yyvsp[0].Const).cnst; ;}
2896 #line 781 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2898 (yyvsp[-1].String)->insert(0, "<");
2899 *(yyvsp[-1].String) += ">";
2900 (yyval.String) = (yyvsp[-1].String);
2905 #line 787 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2907 if (!(yyvsp[-3].String)->empty()) {
2908 *(yyvsp[-4].String) += " " + *(yyvsp[-3].String);
2910 *(yyvsp[-4].String) += " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
2911 delete (yyvsp[-3].String); delete (yyvsp[-2].String); delete (yyvsp[0].String);
2912 (yyval.String) = (yyvsp[-4].String);
2917 #line 796 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2918 { (yyval.String) = (yyvsp[0].Const).cnst; ;}
2922 #line 805 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2924 (yyval.Value).type = (yyvsp[-1].Type);
2925 (yyval.Value).val = new std::string(*(yyvsp[-1].Type).newTy + " ");
2926 *(yyval.Value).val += *(yyvsp[0].String);
2927 delete (yyvsp[0].String);
2932 #line 812 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2938 #line 814 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2939 { // Do not allow functions with 0 basic blocks
2944 #line 821 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2946 *O << *(yyvsp[0].String) ;
2951 #line 825 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2953 *O << " " << *(yyvsp[0].String) << "\n";
2954 delete (yyvsp[0].String);
2960 #line 830 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2967 #line 833 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2969 *O << *(yyvsp[0].String) << "\n";
2970 delete (yyvsp[0].String);
2976 #line 839 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2977 { // Return with a result...
2978 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Value).val << "\n";
2979 delete (yyvsp[-1].String); (yyvsp[0].Value).destroy();
2985 #line 844 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2986 { // Return with no result...
2987 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Type).newTy << "\n";
2988 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
2994 #line 849 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2995 { // Unconditional Branch...
2996 *O << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
2997 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3003 #line 854 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3005 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].String) << ", "
3006 << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].String) << ", " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3007 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); delete (yyvsp[-6].String); (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String);
3008 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3014 #line 861 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3016 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].String) << ", " << *(yyvsp[-4].Type).newTy
3017 << " " << *(yyvsp[-3].String) << " [" << *(yyvsp[-1].String) << " ]\n";
3018 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); delete (yyvsp[-6].String); (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); delete (yyvsp[-1].String);
3024 #line 867 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3026 *O << " " << *(yyvsp[-7].String) << " " << *(yyvsp[-6].Type).newTy << " " << *(yyvsp[-5].String) << ", "
3027 << *(yyvsp[-3].Type).newTy << " " << *(yyvsp[-2].String) << "[]\n";
3028 delete (yyvsp[-7].String); (yyvsp[-6].Type).destroy(); delete (yyvsp[-5].String); (yyvsp[-3].Type).destroy(); delete (yyvsp[-2].String);
3034 #line 874 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3037 if (!(yyvsp[-13].String)->empty())
3038 *O << *(yyvsp[-13].String);
3039 *O << *(yyvsp[-12].String) << " " << *(yyvsp[-11].String) << " " << *(yyvsp[-10].Type).newTy << " " << *(yyvsp[-9].String) << " ("
3040 << *(yyvsp[-7].String) << ") " << *(yyvsp[-5].String) << " " << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].String) << " "
3041 << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3042 delete (yyvsp[-13].String); delete (yyvsp[-12].String); delete (yyvsp[-11].String); (yyvsp[-10].Type).destroy(); delete (yyvsp[-9].String); delete (yyvsp[-7].String);
3043 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
3044 delete (yyvsp[0].String);
3050 #line 886 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3052 *O << " " << *(yyvsp[0].String) << "\n";
3053 delete (yyvsp[0].String);
3059 #line 891 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3061 *O << " " << *(yyvsp[0].String) << "\n";
3062 delete (yyvsp[0].String);
3068 #line 897 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3070 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].String) + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].String);
3071 (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3072 (yyval.String) = (yyvsp[-5].String);
3077 #line 902 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3079 (yyvsp[-3].String)->insert(0, *(yyvsp[-4].Type).newTy + " " );
3080 *(yyvsp[-3].String) += ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].String);
3081 (yyvsp[-4].Type).destroy(); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3082 (yyval.String) = (yyvsp[-3].String);
3087 #line 910 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3089 *(yyvsp[-1].String) += *(yyvsp[0].String);
3090 delete (yyvsp[0].String);
3091 (yyval.String) = (yyvsp[-1].String);
3096 #line 917 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3097 { // Used for PHI nodes
3098 (yyvsp[-3].String)->insert(0, *(yyvsp[-5].Type).newTy + "[");
3099 *(yyvsp[-3].String) += "," + *(yyvsp[-1].String) + "]";
3100 (yyvsp[-5].Type).destroy(); delete (yyvsp[-1].String);
3101 (yyval.String) = (yyvsp[-3].String);
3106 #line 923 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3108 *(yyvsp[-6].String) += ", [" + *(yyvsp[-3].String) + "," + *(yyvsp[-1].String) + "]";
3109 delete (yyvsp[-3].String); delete (yyvsp[-1].String);
3110 (yyval.String) = (yyvsp[-6].String);
3115 #line 931 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3116 { (yyval.String) = new std::string(*(yyvsp[0].Value).val); (yyvsp[0].Value).destroy(); ;}
3120 #line 932 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3122 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Value).val;
3123 (yyvsp[0].Value).destroy();
3124 (yyval.String) = (yyvsp[-2].String);
3129 #line 941 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3130 { (yyval.String) = new std::string(); ;}
3134 #line 945 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3136 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3137 delete (yyvsp[0].String);
3138 (yyval.String) = (yyvsp[-1].String);
3143 #line 953 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3145 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
3146 (yyvsp[-3].Type).destroy(); delete (yyvsp[-2].String); delete (yyvsp[0].String);
3147 (yyval.String) = (yyvsp[-4].String);
3152 #line 958 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3154 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
3155 (yyvsp[-3].Type).destroy(); delete (yyvsp[-2].String); delete (yyvsp[0].String);
3156 (yyval.String) = (yyvsp[-4].String);
3161 #line 963 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3163 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
3164 (yyvsp[-3].Type).destroy(); delete (yyvsp[-2].String); delete (yyvsp[0].String);
3165 (yyval.String) = (yyvsp[-4].String);
3170 #line 968 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3172 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3173 (yyvsp[0].Value).destroy();
3174 (yyval.String) = (yyvsp[-1].String);
3179 #line 973 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3181 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3182 (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3183 (yyval.String) = (yyvsp[-3].String);
3188 #line 978 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3190 const char *opcode = getCastOpcode((yyvsp[-2].Value).type, (yyvsp[0].Type));
3191 (yyval.String) = new std::string(opcode);
3192 *(yyval.String) += *(yyvsp[-2].Value).val + " " + *(yyvsp[-1].String) + " " + *(yyvsp[0].Type).newTy;
3193 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy();
3194 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3199 #line 985 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3201 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3202 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3203 (yyval.String) = (yyvsp[-5].String);
3208 #line 990 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3210 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Type).newTy;
3211 (yyvsp[-2].Value).destroy(); (yyvsp[0].Type).destroy();
3212 (yyval.String) = (yyvsp[-3].String);
3217 #line 995 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3219 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3220 (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3221 (yyval.String) = (yyvsp[-3].String);
3226 #line 1000 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3228 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3229 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3230 (yyval.String) = (yyvsp[-5].String);
3235 #line 1005 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3237 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3238 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3239 (yyval.String) = (yyvsp[-5].String);
3244 #line 1010 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3246 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3247 delete (yyvsp[0].String);
3248 (yyval.String) = (yyvsp[-1].String);
3253 #line 1015 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3255 if (!(yyvsp[-5].String)->empty())
3256 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String);
3257 if (!(yyvsp[-6].String)->empty())
3258 *(yyvsp[-6].String) += " ";
3259 *(yyvsp[-6].String) += *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].String) + "(" + *(yyvsp[-1].String) + ")";
3260 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); delete (yyvsp[-1].String);
3261 (yyval.String) = (yyvsp[-6].String);
3266 #line 1029 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3268 (yyvsp[0].String)->insert(0, ", ");
3269 (yyval.String) = (yyvsp[0].String);
3274 #line 1033 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3275 { (yyval.String) = new std::string(); ;}
3279 #line 1038 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3280 { (yyval.String) = new std::string(); ;}
3284 #line 1041 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3286 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3287 if (!(yyvsp[0].String)->empty())
3288 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3289 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3290 (yyval.String) = (yyvsp[-2].String);
3295 #line 1048 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3297 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].String);
3298 if (!(yyvsp[0].String)->empty())
3299 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3300 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3301 (yyval.String) = (yyvsp[-5].String);
3306 #line 1055 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3308 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3309 if (!(yyvsp[0].String)->empty())
3310 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3311 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3312 (yyval.String) = (yyvsp[-2].String);
3317 #line 1062 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3319 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].String);
3320 if (!(yyvsp[0].String)->empty())
3321 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3322 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3323 (yyval.String) = (yyvsp[-5].String);
3328 #line 1069 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3330 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3331 (yyvsp[0].Value).destroy();
3332 (yyval.String) = (yyvsp[-1].String);
3337 #line 1074 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3339 if (!(yyvsp[-3].String)->empty())
3340 *(yyvsp[-3].String) += " ";
3341 *(yyvsp[-3].String) += *(yyvsp[-2].String) + " " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].String);
3342 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3343 (yyval.String) = (yyvsp[-3].String);
3348 #line 1081 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3350 if (!(yyvsp[-5].String)->empty())
3351 *(yyvsp[-5].String) += " ";
3352 *(yyvsp[-5].String) += *(yyvsp[-4].String) + " " + *(yyvsp[-3].Value).val + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].String);
3353 delete (yyvsp[-4].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3354 (yyval.String) = (yyvsp[-5].String);
3359 #line 1088 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3361 *(yyvsp[-3].String) += *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].String) + " " + *(yyvsp[0].String);
3362 (yyvsp[-2].Type).destroy(); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3363 (yyval.String) = (yyvsp[-3].String);
3371 /* Line 1126 of yacc.c. */
3372 #line 3373 "UpgradeParser.tab.c"
3378 YY_STACK_PRINT (yyss, yyssp);
3383 /* Now `shift' the result of the reduction. Determine what state
3384 that goes to, based on the state we popped back to and the rule
3385 number reduced by. */
3389 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3390 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3391 yystate = yytable[yystate];
3393 yystate = yydefgoto[yyn - YYNTOKENS];
3398 /*------------------------------------.
3399 | yyerrlab -- here on detecting error |
3400 `------------------------------------*/
3402 /* If not already recovering from an error, report this error. */
3407 yyn = yypact[yystate];
3409 if (YYPACT_NINF < yyn && yyn < YYLAST)
3411 int yytype = YYTRANSLATE (yychar);
3412 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3413 YYSIZE_T yysize = yysize0;
3415 int yysize_overflow = 0;
3417 # define YYERROR_VERBOSE_ARGS_MAXIMUM 5
3418 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3422 /* This is so xgettext sees the translatable formats that are
3423 constructed on the fly. */
3424 YY_("syntax error, unexpected %s");
3425 YY_("syntax error, unexpected %s, expecting %s");
3426 YY_("syntax error, unexpected %s, expecting %s or %s");
3427 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3428 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3432 static char const yyunexpected[] = "syntax error, unexpected %s";
3433 static char const yyexpecting[] = ", expecting %s";
3434 static char const yyor[] = " or %s";
3435 char yyformat[sizeof yyunexpected
3436 + sizeof yyexpecting - 1
3437 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3438 * (sizeof yyor - 1))];
3439 char const *yyprefix = yyexpecting;
3441 /* Start YYX at -YYN if negative to avoid negative indexes in
3443 int yyxbegin = yyn < 0 ? -yyn : 0;
3445 /* Stay within bounds of both yycheck and yytname. */
3446 int yychecklim = YYLAST - yyn;
3447 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3450 yyarg[0] = yytname[yytype];
3451 yyfmt = yystpcpy (yyformat, yyunexpected);
3453 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3454 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3456 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3460 yyformat[sizeof yyunexpected - 1] = '\0';
3463 yyarg[yycount++] = yytname[yyx];
3464 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3465 yysize_overflow |= yysize1 < yysize;
3467 yyfmt = yystpcpy (yyfmt, yyprefix);
3471 yyf = YY_(yyformat);
3472 yysize1 = yysize + yystrlen (yyf);
3473 yysize_overflow |= yysize1 < yysize;
3476 if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
3477 yymsg = (char *) YYSTACK_ALLOC (yysize);
3480 /* Avoid sprintf, as that infringes on the user's name space.
3481 Don't have undefined behavior even if the translation
3482 produced a string with the wrong number of "%s"s. */
3485 while ((*yyp = *yyf))
3487 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3489 yyp += yytnamerr (yyp, yyarg[yyi++]);
3499 YYSTACK_FREE (yymsg);
3503 yyerror (YY_("syntax error"));
3504 goto yyexhaustedlab;
3508 #endif /* YYERROR_VERBOSE */
3509 yyerror (YY_("syntax error"));
3514 if (yyerrstatus == 3)
3516 /* If just tried and failed to reuse look-ahead token after an
3517 error, discard it. */
3519 if (yychar <= YYEOF)
3521 /* Return failure if at end of input. */
3522 if (yychar == YYEOF)
3527 yydestruct ("Error: discarding", yytoken, &yylval);
3532 /* Else will try to reuse look-ahead token after shifting the error
3537 /*---------------------------------------------------.
3538 | yyerrorlab -- error raised explicitly by YYERROR. |
3539 `---------------------------------------------------*/
3542 /* Pacify compilers like GCC when the user code never invokes
3543 YYERROR and the label yyerrorlab therefore never appears in user
3554 /*-------------------------------------------------------------.
3555 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3556 `-------------------------------------------------------------*/
3558 yyerrstatus = 3; /* Each real token shifted decrements this. */
3562 yyn = yypact[yystate];
3563 if (yyn != YYPACT_NINF)
3566 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3574 /* Pop the current state because it cannot handle the error token. */
3579 yydestruct ("Error: popping", yystos[yystate], yyvsp);
3582 YY_STACK_PRINT (yyss, yyssp);
3591 /* Shift the error token. */
3592 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3598 /*-------------------------------------.
3599 | yyacceptlab -- YYACCEPT comes here. |
3600 `-------------------------------------*/
3605 /*-----------------------------------.
3606 | yyabortlab -- YYABORT comes here. |
3607 `-----------------------------------*/
3613 /*-------------------------------------------------.
3614 | yyexhaustedlab -- memory exhaustion comes here. |
3615 `-------------------------------------------------*/
3617 yyerror (YY_("memory exhausted"));
3623 if (yychar != YYEOF && yychar != YYEMPTY)
3624 yydestruct ("Cleanup: discarding lookahead",
3626 while (yyssp != yyss)
3628 yydestruct ("Cleanup: popping",
3629 yystos[*yyssp], yyvsp);
3634 YYSTACK_FREE (yyss);
3640 #line 1094 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3643 int yyerror(const char *ErrorMsg) {
3645 = std::string((CurFilename == "-") ? std::string("<stdin>") : CurFilename)
3646 + ":" + llvm::utostr((unsigned) Upgradelineno) + ": ";
3647 std::string errMsg = std::string(ErrorMsg) + "\n" + where + " while reading ";
3648 if (yychar == YYEMPTY || yychar == 0)
3649 errMsg += "end-of-file.";
3651 errMsg += "token: '" + std::string(Upgradetext, Upgradeleng) + "'";
3652 std::cerr << errMsg << '\n';