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, 576, 579, 580, 582, 585, 588, 592, 602, 612,
684 621, 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, 137, 185, -1, 184, 187, -1, -1,
751 29, -1, 72, 181, -1, 72, 13, -1, 73, 25,
752 180, -1, 73, 14, 180, 113, 25, 180, 113, 25,
753 180, -1, 74, 135, 180, 113, 25, 180, 117, 186,
754 119, -1, 74, 135, 180, 113, 25, 180, 117, 119,
755 -1, 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, 222, 223, 228, 229, 232,
785 233, 241, 247, 248, 251, 252, 261, 262, 275, 275,
786 276, 276, 277, 281, 281, 281, 281, 281, 281, 281,
787 282, 282, 282, 282, 282, 283, 283, 284, 290, 295,
788 301, 308, 315, 321, 325, 335, 338, 346, 347, 352,
789 355, 365, 371, 376, 382, 388, 394, 399, 405, 411,
790 417, 423, 429, 435, 441, 447, 453, 461, 468, 474,
791 479, 484, 489, 494, 499, 504, 509, 519, 524, 529,
792 529, 539, 544, 547, 552, 556, 560, 563, 568, 573,
793 578, 584, 590, 596, 602, 607, 612, 617, 619, 619,
794 622, 627, 634, 639, 646, 653, 658, 659, 667, 667,
795 668, 668, 670, 677, 681, 685, 688, 693, 696, 698,
796 718, 721, 725, 734, 735, 737, 745, 746, 747, 751,
797 764, 765, 768, 769, 770, 771, 772, 773, 774, 775,
798 776, 781, 782, 791, 791, 794, 794, 800, 807, 809,
799 816, 820, 825, 828, 834, 839, 844, 849, 856, 862,
800 868, 877, 882, 888, 893, 901, 908, 914, 922, 923,
801 931, 932, 936, 941, 944, 949, 954, 959, 964, 969,
802 976, 981, 986, 991, 996, 1001, 1006, 1015, 1020, 1024,
803 1028, 1029, 1032, 1039, 1046, 1053, 1060, 1065, 1072, 1079
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 3, 2, 0, 1, 2, 2, 3, 9, 9, 8,
923 13, 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, 241, 201, 0, 0,
944 0, 0, 157, 145, 139, 137, 129, 130, 0, 0,
945 0, 0, 88, 0, 0, 71, 93, 95, 0, 0,
946 100, 94, 240, 0, 223, 0, 0, 0, 0, 56,
947 211, 212, 6, 7, 8, 9, 10, 11, 12, 13,
948 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
949 0, 0, 0, 0, 0, 0, 24, 25, 26, 0,
950 0, 0, 0, 0, 0, 0, 0, 0, 200, 56,
951 215, 0, 237, 152, 149, 148, 150, 151, 153, 156,
952 0, 64, 64, 64, 73, 74, 75, 76, 77, 78,
953 79, 80, 81, 82, 83, 0, 0, 0, 0, 64,
954 0, 0, 0, 92, 168, 99, 97, 0, 0, 227,
955 222, 205, 204, 0, 0, 30, 34, 29, 33, 28,
956 32, 27, 31, 35, 36, 0, 0, 59, 59, 246,
957 0, 0, 235, 0, 0, 0, 0, 0, 0, 0,
958 0, 0, 0, 0, 0, 0, 0, 154, 0, 142,
959 143, 141, 114, 115, 4, 5, 112, 113, 116, 107,
960 108, 111, 0, 0, 0, 0, 0, 0, 0, 0,
961 0, 0, 0, 0, 0, 0, 110, 109, 140, 70,
962 70, 96, 167, 161, 164, 165, 0, 0, 89, 182,
963 183, 184, 185, 186, 187, 188, 189, 180, 0, 191,
964 196, 195, 197, 0, 206, 0, 0, 0, 242, 0,
965 244, 239, 0, 0, 0, 0, 0, 0, 0, 0,
966 0, 0, 0, 0, 0, 0, 0, 155, 0, 0,
967 66, 64, 0, 0, 0, 0, 0, 0, 102, 128,
968 0, 0, 106, 0, 103, 0, 0, 0, 0, 90,
969 91, 160, 162, 0, 62, 98, 181, 0, 0, 0,
970 0, 0, 0, 0, 0, 0, 249, 0, 0, 0,
971 231, 232, 0, 0, 229, 0, 0, 0, 228, 0,
972 247, 0, 61, 67, 65, 239, 0, 0, 0, 0,
973 0, 0, 101, 104, 105, 0, 0, 0, 0, 166,
974 163, 63, 57, 0, 190, 0, 0, 221, 59, 60,
975 59, 218, 238, 0, 0, 0, 0, 0, 224, 225,
976 226, 221, 0, 0, 0, 0, 0, 0, 0, 127,
977 0, 0, 0, 0, 0, 169, 0, 0, 0, 220,
978 0, 0, 243, 245, 0, 0, 0, 230, 233, 234,
979 0, 248, 118, 0, 0, 0, 0, 0, 0, 0,
980 0, 0, 58, 192, 0, 0, 0, 219, 216, 0,
981 236, 0, 124, 0, 0, 117, 120, 121, 122, 123,
982 0, 209, 0, 0, 0, 217, 0, 0, 0, 207,
983 0, 208, 0, 0, 119, 125, 126, 0, 0, 0,
984 0, 0, 0, 214, 0, 0, 213, 210
987 /* YYDEFGOTO[NTERM-NUM]. */
988 static const short int yydefgoto[] =
990 -1, 81, 256, 272, 273, 274, 275, 195, 196, 225,
991 197, 24, 15, 38, 435, 308, 330, 402, 249, 331,
992 82, 83, 198, 85, 86, 118, 207, 339, 299, 340,
993 108, 1, 2, 3, 59, 176, 48, 103, 180, 87,
994 352, 284, 285, 286, 39, 91, 16, 94, 17, 29,
995 18, 357, 300, 88, 302, 411, 41, 42, 43, 168,
996 483, 97, 232, 439, 440, 169, 170, 366, 171, 172
999 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1001 #define YYPACT_NINF -403
1002 static const short int yypact[] =
1004 -403, 26, 210, 114, -403, -403, 106, -403, -403, -403,
1005 -403, -403, -403, -403, -49, 201, 53, -403, -403, -403,
1006 -403, 15, -5, 59, 31, 42, -403, -403, -403, 201,
1007 113, 167, -403, -403, -403, -403, -403, -403, 920, 11,
1008 -403, 9, -403, 140, 72, 74, 79, 85, -403, 87,
1009 113, 920, 104, 104, 104, 104, -403, -403, -403, -403,
1010 -403, -403, -403, 94, -403, -403, -403, -403, -403, -403,
1011 -403, -403, -403, -403, -403, -403, -403, 226, 227, 229,
1012 408, -403, 140, 120, -403, -403, -59, -403, -403, -403,
1013 -403, -403, -403, -403, -403, -403, 1082, -403, 204, 119,
1014 232, 213, 215, -403, -403, -403, -403, -403, 974, 974,
1015 974, 1002, -403, 128, 131, -403, -403, -59, -72, 135,
1016 78, -403, -403, 974, -403, 192, 1030, 41, 196, 201,
1017 -403, -403, -403, -403, -403, -403, -403, -403, -403, -403,
1018 -403, -403, -403, -403, -403, -403, -403, -403, -403, -403,
1019 974, 974, 974, 974, 974, 974, -403, -403, -403, 974,
1020 974, 974, 974, 974, 974, 974, 974, 974, -403, 201,
1021 -403, 81, -403, -403, -403, -403, -403, -403, -403, -403,
1022 50, 147, 147, 147, 169, 179, 257, 186, 258, 190,
1023 259, 216, 278, 277, 279, 219, 283, 281, 559, 147,
1024 974, 974, 974, -403, 446, -403, 176, 175, 684, -403,
1025 -403, 94, -403, 684, 684, -403, -403, -403, -403, -403,
1026 -403, -403, -403, -403, -403, 684, 920, 180, 181, -403,
1027 684, 182, 183, 184, 185, 191, 193, 194, 253, 684,
1028 684, 684, 195, 920, 974, 974, 265, -403, 2, -403,
1029 -403, -403, -403, -403, -403, -403, -403, -403, -403, -403,
1030 -403, -403, 188, 197, 198, 199, 205, 206, 838, 1002,
1031 588, 275, 211, 217, 218, 220, -403, -403, -403, 28,
1032 -64, -59, -403, 140, -403, 221, 212, 864, -403, -403,
1033 -403, -403, -403, -403, -403, -403, -403, 246, 1002, -403,
1034 -403, -403, -403, 223, -403, 224, 684, 4, -403, 5,
1035 -403, 228, 684, 214, 974, 974, 974, 974, 974, 974,
1036 231, 234, 235, 974, 684, 684, 236, -403, 280, 307,
1037 -403, 147, 1002, 1002, 1002, 1002, 1002, 1002, -403, -403,
1038 54, 24, -403, -60, -403, 1002, 1002, 1002, 1002, -403,
1039 -403, -403, -403, 892, 293, -403, -403, 312, 25, 320,
1040 325, 237, 684, 347, 684, 974, -403, 240, 684, 241,
1041 -403, -403, 242, 247, -403, 684, 684, 684, -403, 249,
1042 -403, 974, -403, -403, -403, 228, 248, 254, 255, 260,
1043 323, 1002, -403, -403, -403, 261, 262, 263, 267, -403,
1044 -403, -403, 313, 268, -403, 684, 684, 974, 269, -403,
1045 269, -403, 271, 684, 272, 974, 974, 974, -403, -403,
1046 -403, 974, 684, 256, 1002, 1002, 1002, 1002, 974, -403,
1047 1002, 1002, 1002, 1002, 367, -403, 356, 274, 276, 271,
1048 273, 331, -403, -403, 974, 282, 684, -403, -403, -403,
1049 284, -403, -403, 286, 288, 292, 294, 296, 299, 300,
1050 304, 319, -403, -403, 369, 0, 358, -403, -403, 318,
1051 -403, 1002, -403, 1002, 1002, -403, -403, -403, -403, -403,
1052 684, -403, 730, 12, 370, -403, 326, 327, 328, -403,
1053 332, -403, 730, 684, -403, -403, -403, 416, 333, 372,
1054 684, 424, 425, -403, 684, 684, -403, -403
1057 /* YYPGOTO[NTERM-NUM]. */
1058 static const short int yypgoto[] =
1060 -403, -403, -403, 357, 359, 361, 362, -127, -126, -378,
1061 -403, 411, 449, -120, -403, -223, 121, -403, -176, -403,
1062 -47, -403, -38, -403, -66, 363, -403, -108, 287, -234,
1063 56, -403, -403, -403, 427, -403, -403, -403, -403, 7,
1064 -403, 125, -403, -403, 450, -403, -403, -403, -403, -403,
1065 478, -403, -402, 34, 178, -115, -403, 441, -403, -403,
1066 -403, -403, -403, 122, 67, -403, -403, 107, -403, -403
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, 223, 224, 199, 105, 310, 250, 251, 209, 226,
1077 25, 212, 30, 84, 117, 215, 216, 217, 218, 219,
1078 220, 221, 222, 278, 362, 364, 4, 215, 216, 217,
1079 218, 219, 220, 221, 222, 341, 343, 229, 40, 328,
1080 233, 202, 92, 89, 234, 235, 236, 237, 238, 243,
1081 25, 203, 242, 391, 117, 213, -70, 350, 51, 329,
1082 121, 363, 363, 394, 358, 121, 214, 44, 45, 46,
1083 181, 182, 183, 7, 8, 9, 52, 11, 53, 13,
1084 490, 54, 40, 61, 62, 208, 47, 482, 208, 119,
1085 498, 115, 64, 65, 66, 67, 68, 69, 70, 71,
1086 72, 73, 74, 75, 76, 492, 19, 49, 20, 109,
1087 110, 111, 227, 228, 208, 230, 231, 208, 205, 481,
1088 50, 208, 208, 208, 208, 208, 239, 240, 241, 208,
1089 326, 491, 93, 90, 279, 280, 281, 391, 391, 106,
1090 107, -40, 19, 58, 20, 393, 404, 349, 6, -40,
1091 -40, 27, 121, 28, 56, 384, -40, -40, -40, -40,
1092 -40, -40, -40, 246, -40, 21, 283, 391, 19, 247,
1093 20, 60, 22, 392, 174, 175, 23, 252, 253, 306,
1094 244, 245, -30, -30, 98, 442, 99, 443, 84, -29,
1095 -29, 100, 77, -28, -28, 78, 324, 101, 79, 369,
1096 80, 371, 372, 373, 102, 84, 325, 208, 378, -71,
1097 -131, 215, 216, 217, 218, 219, 220, 221, 222, -27,
1098 -27, 281, 254, 255, 385, 386, 387, 388, 389, 390,
1099 112, 113, 277, 114, 173, 120, 177, 395, 396, 397,
1100 398, 5, 301, 178, 6, 179, 200, 301, 301, 201,
1101 204, 210, 7, 8, 9, 10, 11, 12, 13, 301,
1102 248, -34, -33, -32, 301, 31, 32, 33, 34, 35,
1103 36, 37, 14, 301, 301, 301, 208, 370, 208, 208,
1104 208, 374, -31, 429, -37, 208, -38, 257, 258, 287,
1105 351, 288, 319, 307, 309, 327, 313, 314, 315, 312,
1106 447, 448, 449, 332, 316, 344, 317, 318, 323, 356,
1107 382, 383, 333, 334, 335, 283, 453, 454, 455, 456,
1108 336, 337, 458, 459, 460, 461, 345, 208, 354, 467,
1109 328, 368, 346, 347, 353, 348, 359, 360, 223, 224,
1110 301, 365, 403, 422, 375, 405, 301, 376, 377, 381,
1111 406, 409, 407, 413, 415, 416, 223, 224, 301, 301,
1112 417, 424, 428, 486, 421, 487, 488, 425, 426, 208,
1113 434, 462, 452, 427, 430, 431, 432, 208, 208, 208,
1114 433, 436, 441, 208, 444, 446, 463, 464, 363, 466,
1115 457, 303, 304, 465, 480, 493, 301, 484, 301, 471,
1116 470, 468, 301, 305, 472, 473, 208, 474, 311, 301,
1117 301, 301, 475, 61, 62, 476, 477, 320, 321, 322,
1118 478, 115, 64, 65, 66, 67, 68, 69, 70, 71,
1119 72, 73, 74, 75, 76, 479, 19, 485, 20, 301,
1120 301, 500, 494, 495, 496, 497, 501, 301, 502, 504,
1121 505, 61, 62, 164, 96, 165, 301, 166, 167, 115,
1122 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
1123 74, 75, 76, 55, 19, 401, 20, 104, 400, 57,
1124 301, 26, 95, 206, 361, 276, 282, 412, 450, 0,
1125 367, 0, 423, 0, 0, 0, 0, 0, 0, 0,
1126 0, 0, 379, 380, 0, 0, 0, 0, 0, 0,
1127 0, 0, 0, 0, 301, 0, 0, 0, 0, 0,
1128 0, 0, 77, 0, 0, 78, 0, 301, 79, 0,
1129 80, 116, 0, 0, 301, 0, 0, 0, 301, 301,
1130 408, 0, 410, 0, 0, 0, 414, 0, 0, 0,
1131 0, 0, 0, 418, 419, 420, 0, 0, 0, 0,
1132 77, 0, 0, 78, 61, 62, 79, 0, 80, 259,
1133 260, 261, 0, 0, 0, 0, 0, 0, 0, 0,
1134 0, 0, 0, 437, 438, 0, 0, 19, 0, 20,
1135 0, 445, 0, 61, 62, 0, 0, 0, 0, 0,
1136 451, 115, 184, 185, 186, 187, 188, 189, 190, 191,
1137 192, 193, 194, 75, 76, 0, 19, 0, 20, 0,
1138 0, 0, 0, 0, 469, 0, 0, 0, 0, 0,
1139 0, 0, 0, 0, 0, 0, 0, 132, 133, 134,
1140 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
1141 145, 146, 147, 148, 149, 0, 0, 0, 489, 0,
1142 262, 0, 263, 156, 157, 158, 0, 264, 265, 266,
1143 267, 499, 0, 0, 0, 0, 268, 0, 503, 269,
1144 0, 270, 506, 507, 271, 0, 0, 289, 290, 61,
1145 62, 291, 292, 293, 294, 295, 296, 0, 0, 0,
1146 0, 0, 77, 0, 0, 78, 0, 0, 79, 0,
1147 80, 342, 19, 0, 20, 0, 0, 0, 0, 0,
1148 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1149 0, 0, 0, 289, 290, 0, 0, 291, 292, 293,
1150 294, 295, 296, 0, 0, 297, 0, 0, 0, 0,
1151 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1152 0, 0, 132, 133, 134, 135, 136, 137, 138, 139,
1153 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
1154 0, 0, 0, 0, 0, 262, 0, 263, 156, 157,
1155 158, 297, 264, 265, 266, 267, 0, 0, 0, 0,
1156 0, 0, 0, 0, 298, 0, 0, 0, 132, 133,
1157 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1158 144, 145, 146, 147, 148, 149, 0, 0, 0, 0,
1159 0, 262, 0, 263, 156, 157, 158, 0, 264, 265,
1160 266, 267, 0, 61, 62, 0, 0, 0, 0, 0,
1161 298, 115, 184, 185, 186, 187, 188, 189, 190, 191,
1162 192, 193, 194, 75, 76, 0, 19, 0, 20, 61,
1163 62, 0, 0, 0, 0, 0, 0, 115, 64, 65,
1164 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
1165 76, 0, 19, 0, 20, 0, 0, 61, 62, 0,
1166 0, 0, 0, 0, 355, 115, 64, 65, 66, 67,
1167 68, 69, 70, 71, 72, 73, 74, 75, 76, 0,
1168 19, 0, 20, 0, 0, 61, 62, 0, 0, 0,
1169 0, 0, 399, 63, 64, 65, 66, 67, 68, 69,
1170 70, 71, 72, 73, 74, 75, 76, 0, 19, 0,
1171 20, 0, 77, 0, 0, 78, 0, 338, 79, 0,
1172 80, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1173 0, 0, 0, 0, 0, 0, 0, 0, 77, 61,
1174 62, 78, 0, 0, 79, 0, 80, 115, 64, 65,
1175 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
1176 76, 0, 19, 0, 20, 0, 77, 61, 62, 78,
1177 0, 0, 79, 0, 80, 115, 184, 185, 186, 187,
1178 188, 189, 190, 191, 192, 193, 194, 75, 76, 0,
1179 19, 0, 20, 0, 77, 61, 62, 78, 0, 0,
1180 79, 0, 80, 211, 64, 65, 66, 67, 68, 69,
1181 70, 71, 72, 73, 74, 75, 76, 0, 19, 0,
1182 20, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1183 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1184 0, 0, 0, 0, 0, 0, 0, 0, 77, 0,
1185 0, 78, 0, 0, 79, 0, 80, 0, 0, 0,
1186 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1187 0, 0, 0, 0, 0, 0, 77, 0, 0, 78,
1188 122, 0, 79, 0, 80, 0, 0, 0, 0, 0,
1189 0, 123, 0, 0, 0, 0, 0, 0, 0, 0,
1190 0, 124, 125, 0, 77, 0, 0, 78, 0, 0,
1191 79, 0, 80, 0, 126, 127, 128, 129, 130, 131,
1192 132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
1193 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
1194 152, 0, 0, 153, 154, 155, 156, 157, 158, 159,
1198 static const short int yycheck[] =
1200 38, 128, 128, 111, 51, 228, 182, 183, 123, 129,
1201 3, 126, 61, 51, 80, 15, 16, 17, 18, 19,
1202 20, 21, 22, 199, 20, 20, 0, 15, 16, 17,
1203 18, 19, 20, 21, 22, 269, 270, 152, 29, 37,
1204 155, 113, 33, 32, 159, 160, 161, 162, 163, 169,
1205 43, 123, 167, 113, 120, 14, 115, 121, 27, 57,
1206 124, 57, 57, 123, 298, 124, 25, 52, 53, 54,
1207 108, 109, 110, 42, 43, 44, 45, 46, 47, 48,
1208 482, 50, 29, 5, 6, 123, 71, 465, 126, 82,
1209 492, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1210 22, 23, 24, 25, 26, 483, 28, 112, 30, 53,
1211 54, 55, 150, 151, 152, 153, 154, 155, 40, 119,
1212 61, 159, 160, 161, 162, 163, 164, 165, 166, 167,
1213 245, 119, 123, 122, 200, 201, 202, 113, 113, 35,
1214 36, 27, 28, 30, 30, 121, 121, 119, 34, 35,
1215 36, 45, 124, 47, 112, 331, 42, 43, 44, 45,
1216 46, 47, 48, 113, 50, 51, 204, 113, 28, 119,
1217 30, 4, 58, 119, 55, 56, 62, 8, 9, 226,
1218 99, 100, 3, 4, 112, 408, 112, 410, 226, 3,
1219 4, 112, 114, 3, 4, 117, 243, 112, 120, 314,
1220 122, 316, 317, 318, 117, 243, 244, 245, 323, 115,
1221 0, 15, 16, 17, 18, 19, 20, 21, 22, 3,
1222 4, 287, 3, 4, 332, 333, 334, 335, 336, 337,
1223 4, 4, 198, 4, 30, 115, 4, 345, 346, 347,
1224 348, 31, 208, 30, 34, 30, 118, 213, 214, 118,
1225 115, 59, 42, 43, 44, 45, 46, 47, 48, 225,
1226 113, 4, 4, 4, 230, 64, 65, 66, 67, 68,
1227 69, 70, 62, 239, 240, 241, 314, 315, 316, 317,
1228 318, 319, 4, 391, 7, 323, 7, 4, 7, 113,
1229 283, 116, 39, 113, 113, 30, 113, 113, 113, 117,
1230 415, 416, 417, 115, 113, 30, 113, 113, 113, 63,
1231 30, 4, 115, 115, 115, 353, 424, 425, 426, 427,
1232 115, 115, 430, 431, 432, 433, 115, 365, 116, 444,
1233 37, 117, 115, 115, 113, 115, 113, 113, 465, 465,
1234 306, 113, 30, 381, 113, 25, 312, 113, 113, 113,
1235 25, 4, 115, 113, 113, 113, 483, 483, 324, 325,
1236 113, 113, 39, 471, 115, 473, 474, 113, 113, 407,
1237 57, 4, 116, 113, 113, 113, 113, 415, 416, 417,
1238 113, 113, 113, 421, 113, 113, 30, 113, 57, 116,
1239 428, 213, 214, 117, 25, 25, 362, 39, 364, 113,
1240 116, 119, 368, 225, 116, 113, 444, 113, 230, 375,
1241 376, 377, 116, 5, 6, 116, 116, 239, 240, 241,
1242 116, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1243 22, 23, 24, 25, 26, 116, 28, 119, 30, 405,
1244 406, 25, 116, 116, 116, 113, 113, 413, 76, 25,
1245 25, 5, 6, 96, 43, 96, 422, 96, 96, 13,
1246 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
1247 24, 25, 26, 24, 28, 354, 30, 50, 353, 29,
1248 446, 3, 41, 120, 306, 198, 40, 365, 421, -1,
1249 312, -1, 385, -1, -1, -1, -1, -1, -1, -1,
1250 -1, -1, 324, 325, -1, -1, -1, -1, -1, -1,
1251 -1, -1, -1, -1, 480, -1, -1, -1, -1, -1,
1252 -1, -1, 114, -1, -1, 117, -1, 493, 120, -1,
1253 122, 123, -1, -1, 500, -1, -1, -1, 504, 505,
1254 362, -1, 364, -1, -1, -1, 368, -1, -1, -1,
1255 -1, -1, -1, 375, 376, 377, -1, -1, -1, -1,
1256 114, -1, -1, 117, 5, 6, 120, -1, 122, 10,
1257 11, 12, -1, -1, -1, -1, -1, -1, -1, -1,
1258 -1, -1, -1, 405, 406, -1, -1, 28, -1, 30,
1259 -1, 413, -1, 5, 6, -1, -1, -1, -1, -1,
1260 422, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1261 22, 23, 24, 25, 26, -1, 28, -1, 30, -1,
1262 -1, -1, -1, -1, 446, -1, -1, -1, -1, -1,
1263 -1, -1, -1, -1, -1, -1, -1, 78, 79, 80,
1264 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
1265 91, 92, 93, 94, 95, -1, -1, -1, 480, -1,
1266 101, -1, 103, 104, 105, 106, -1, 108, 109, 110,
1267 111, 493, -1, -1, -1, -1, 117, -1, 500, 120,
1268 -1, 122, 504, 505, 125, -1, -1, 3, 4, 5,
1269 6, 7, 8, 9, 10, 11, 12, -1, -1, -1,
1270 -1, -1, 114, -1, -1, 117, -1, -1, 120, -1,
1271 122, 123, 28, -1, 30, -1, -1, -1, -1, -1,
1272 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1273 -1, -1, -1, 3, 4, -1, -1, 7, 8, 9,
1274 10, 11, 12, -1, -1, 61, -1, -1, -1, -1,
1275 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1276 -1, -1, 78, 79, 80, 81, 82, 83, 84, 85,
1277 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1278 -1, -1, -1, -1, -1, 101, -1, 103, 104, 105,
1279 106, 61, 108, 109, 110, 111, -1, -1, -1, -1,
1280 -1, -1, -1, -1, 120, -1, -1, -1, 78, 79,
1281 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
1282 90, 91, 92, 93, 94, 95, -1, -1, -1, -1,
1283 -1, 101, -1, 103, 104, 105, 106, -1, 108, 109,
1284 110, 111, -1, 5, 6, -1, -1, -1, -1, -1,
1285 120, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1286 22, 23, 24, 25, 26, -1, 28, -1, 30, 5,
1287 6, -1, -1, -1, -1, -1, -1, 13, 14, 15,
1288 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1289 26, -1, 28, -1, 30, -1, -1, 5, 6, -1,
1290 -1, -1, -1, -1, 40, 13, 14, 15, 16, 17,
1291 18, 19, 20, 21, 22, 23, 24, 25, 26, -1,
1292 28, -1, 30, -1, -1, 5, 6, -1, -1, -1,
1293 -1, -1, 40, 13, 14, 15, 16, 17, 18, 19,
1294 20, 21, 22, 23, 24, 25, 26, -1, 28, -1,
1295 30, -1, 114, -1, -1, 117, -1, 119, 120, -1,
1296 122, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1297 -1, -1, -1, -1, -1, -1, -1, -1, 114, 5,
1298 6, 117, -1, -1, 120, -1, 122, 13, 14, 15,
1299 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
1300 26, -1, 28, -1, 30, -1, 114, 5, 6, 117,
1301 -1, -1, 120, -1, 122, 13, 14, 15, 16, 17,
1302 18, 19, 20, 21, 22, 23, 24, 25, 26, -1,
1303 28, -1, 30, -1, 114, 5, 6, 117, -1, -1,
1304 120, -1, 122, 13, 14, 15, 16, 17, 18, 19,
1305 20, 21, 22, 23, 24, 25, 26, -1, 28, -1,
1306 30, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1307 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1308 -1, -1, -1, -1, -1, -1, -1, -1, 114, -1,
1309 -1, 117, -1, -1, 120, -1, 122, -1, -1, -1,
1310 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1311 -1, -1, -1, -1, -1, -1, 114, -1, -1, 117,
1312 38, -1, 120, -1, 122, -1, -1, -1, -1, -1,
1313 -1, 49, -1, -1, -1, -1, -1, -1, -1, -1,
1314 -1, 59, 60, -1, 114, -1, -1, 117, -1, -1,
1315 120, -1, 122, -1, 72, 73, 74, 75, 76, 77,
1316 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
1317 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
1318 98, -1, -1, 101, 102, 103, 104, 105, 106, 107,
1322 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1323 symbol of state STATE-NUM. */
1324 static const unsigned char yystos[] =
1326 0, 157, 158, 159, 0, 31, 34, 42, 43, 44,
1327 45, 46, 47, 48, 62, 138, 172, 174, 176, 28,
1328 30, 51, 58, 62, 137, 165, 176, 45, 47, 175,
1329 61, 64, 65, 66, 67, 68, 69, 70, 139, 170,
1330 29, 182, 183, 184, 52, 53, 54, 71, 162, 112,
1331 61, 27, 45, 47, 50, 138, 112, 170, 30, 160,
1332 4, 5, 6, 13, 14, 15, 16, 17, 18, 19,
1333 20, 21, 22, 23, 24, 25, 26, 114, 117, 120,
1334 122, 127, 146, 147, 148, 149, 150, 165, 179, 32,
1335 122, 171, 33, 123, 173, 183, 137, 187, 112, 112,
1336 112, 112, 117, 163, 160, 146, 35, 36, 156, 156,
1337 156, 156, 4, 4, 4, 13, 123, 150, 151, 165,
1338 115, 124, 38, 49, 59, 60, 72, 73, 74, 75,
1339 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
1340 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1341 96, 97, 98, 101, 102, 103, 104, 105, 106, 107,
1342 108, 109, 110, 111, 129, 130, 131, 132, 185, 191,
1343 192, 194, 195, 30, 55, 56, 161, 4, 30, 30,
1344 164, 148, 148, 148, 14, 15, 16, 17, 18, 19,
1345 20, 21, 22, 23, 24, 133, 134, 136, 148, 153,
1346 118, 118, 113, 123, 115, 40, 151, 152, 148, 181,
1347 59, 13, 181, 14, 25, 15, 16, 17, 18, 19,
1348 20, 21, 22, 133, 134, 135, 139, 148, 148, 181,
1349 148, 148, 188, 181, 181, 181, 181, 181, 181, 148,
1350 148, 148, 181, 139, 99, 100, 113, 119, 113, 144,
1351 144, 144, 8, 9, 3, 4, 128, 4, 7, 10,
1352 11, 12, 101, 103, 108, 109, 110, 111, 117, 120,
1353 122, 125, 129, 130, 131, 132, 154, 179, 144, 150,
1354 150, 150, 40, 148, 167, 168, 169, 113, 116, 3,
1355 4, 7, 8, 9, 10, 11, 12, 61, 120, 154,
1356 178, 179, 180, 180, 180, 180, 146, 113, 141, 113,
1357 141, 180, 117, 113, 113, 113, 113, 113, 113, 39,
1358 180, 180, 180, 113, 146, 148, 181, 30, 37, 57,
1359 142, 145, 115, 115, 115, 115, 115, 115, 119, 153,
1360 155, 155, 123, 155, 30, 115, 115, 115, 115, 119,
1361 121, 165, 166, 113, 116, 40, 63, 177, 155, 113,
1362 113, 180, 20, 57, 20, 113, 193, 180, 117, 181,
1363 148, 181, 181, 181, 148, 113, 113, 113, 181, 180,
1364 180, 113, 30, 4, 144, 153, 153, 153, 153, 153,
1365 153, 113, 119, 121, 123, 153, 153, 153, 153, 40,
1366 167, 142, 143, 30, 121, 25, 25, 115, 180, 4,
1367 180, 181, 189, 113, 180, 113, 113, 113, 180, 180,
1368 180, 115, 148, 193, 113, 113, 113, 113, 39, 153,
1369 113, 113, 113, 113, 57, 140, 113, 180, 180, 189,
1370 190, 113, 141, 141, 113, 180, 113, 181, 181, 181,
1371 190, 180, 116, 153, 153, 153, 153, 148, 153, 153,
1372 153, 153, 4, 30, 113, 117, 116, 181, 119, 180,
1373 116, 113, 116, 113, 113, 116, 116, 116, 116, 116,
1374 25, 119, 135, 186, 39, 119, 153, 153, 153, 180,
1375 178, 119, 135, 25, 116, 116, 116, 113, 178, 180,
1376 25, 113, 76, 180, 25, 25, 180, 180
1379 #define yyerrok (yyerrstatus = 0)
1380 #define yyclearin (yychar = YYEMPTY)
1381 #define YYEMPTY (-2)
1384 #define YYACCEPT goto yyacceptlab
1385 #define YYABORT goto yyabortlab
1386 #define YYERROR goto yyerrorlab
1389 /* Like YYERROR except do call yyerror. This remains here temporarily
1390 to ease the transition to the new meaning of YYERROR, for GCC.
1391 Once GCC version 2 has supplanted version 1, this can go. */
1393 #define YYFAIL goto yyerrlab
1395 #define YYRECOVERING() (!!yyerrstatus)
1397 #define YYBACKUP(Token, Value) \
1399 if (yychar == YYEMPTY && yylen == 1) \
1403 yytoken = YYTRANSLATE (yychar); \
1409 yyerror (YY_("syntax error: cannot back up")); \
1416 #define YYERRCODE 256
1419 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1420 If N is 0, then set CURRENT to the empty location which ends
1421 the previous symbol: RHS[0] (always defined). */
1423 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1424 #ifndef YYLLOC_DEFAULT
1425 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1429 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1430 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1431 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1432 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1436 (Current).first_line = (Current).last_line = \
1437 YYRHSLOC (Rhs, 0).last_line; \
1438 (Current).first_column = (Current).last_column = \
1439 YYRHSLOC (Rhs, 0).last_column; \
1445 /* YY_LOCATION_PRINT -- Print the location on the stream.
1446 This macro was not mandated originally: define only if we know
1447 we won't break user code: when these are the locations we know. */
1449 #ifndef YY_LOCATION_PRINT
1450 # if YYLTYPE_IS_TRIVIAL
1451 # define YY_LOCATION_PRINT(File, Loc) \
1452 fprintf (File, "%d.%d-%d.%d", \
1453 (Loc).first_line, (Loc).first_column, \
1454 (Loc).last_line, (Loc).last_column)
1456 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1461 /* YYLEX -- calling `yylex' with the right arguments. */
1464 # define YYLEX yylex (YYLEX_PARAM)
1466 # define YYLEX yylex ()
1469 /* Enable debugging if requested. */
1473 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1474 # define YYFPRINTF fprintf
1477 # define YYDPRINTF(Args) \
1483 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1487 YYFPRINTF (stderr, "%s ", Title); \
1488 yysymprint (stderr, \
1490 YYFPRINTF (stderr, "\n"); \
1494 /*------------------------------------------------------------------.
1495 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1497 `------------------------------------------------------------------*/
1499 #if defined (__STDC__) || defined (__cplusplus)
1501 yy_stack_print (short int *bottom, short int *top)
1504 yy_stack_print (bottom, top)
1509 YYFPRINTF (stderr, "Stack now");
1510 for (/* Nothing. */; bottom <= top; ++bottom)
1511 YYFPRINTF (stderr, " %d", *bottom);
1512 YYFPRINTF (stderr, "\n");
1515 # define YY_STACK_PRINT(Bottom, Top) \
1518 yy_stack_print ((Bottom), (Top)); \
1522 /*------------------------------------------------.
1523 | Report that the YYRULE is going to be reduced. |
1524 `------------------------------------------------*/
1526 #if defined (__STDC__) || defined (__cplusplus)
1528 yy_reduce_print (int yyrule)
1531 yy_reduce_print (yyrule)
1536 unsigned long int yylno = yyrline[yyrule];
1537 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
1539 /* Print the symbols being reduced, and their result. */
1540 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
1541 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1542 YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
1545 # define YY_REDUCE_PRINT(Rule) \
1548 yy_reduce_print (Rule); \
1551 /* Nonzero means print parse trace. It is left uninitialized so that
1552 multiple parsers can coexist. */
1554 #else /* !YYDEBUG */
1555 # define YYDPRINTF(Args)
1556 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1557 # define YY_STACK_PRINT(Bottom, Top)
1558 # define YY_REDUCE_PRINT(Rule)
1559 #endif /* !YYDEBUG */
1562 /* YYINITDEPTH -- initial size of the parser's stacks. */
1564 # define YYINITDEPTH 200
1567 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1568 if the built-in stack extension method is used).
1570 Do not make this value too large; the results are undefined if
1571 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1572 evaluated with infinite-precision integer arithmetic. */
1575 # define YYMAXDEPTH 10000
1583 # if defined (__GLIBC__) && defined (_STRING_H)
1584 # define yystrlen strlen
1586 /* Return the length of YYSTR. */
1588 # if defined (__STDC__) || defined (__cplusplus)
1589 yystrlen (const char *yystr)
1595 const char *yys = yystr;
1597 while (*yys++ != '\0')
1600 return yys - yystr - 1;
1606 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1607 # define yystpcpy stpcpy
1609 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1612 # if defined (__STDC__) || defined (__cplusplus)
1613 yystpcpy (char *yydest, const char *yysrc)
1615 yystpcpy (yydest, yysrc)
1621 const char *yys = yysrc;
1623 while ((*yyd++ = *yys++) != '\0')
1632 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1633 quotes and backslashes, so that it's suitable for yyerror. The
1634 heuristic is that double-quoting is unnecessary unless the string
1635 contains an apostrophe, a comma, or backslash (other than
1636 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1637 null, do not copy; instead, return the length of what the result
1640 yytnamerr (char *yyres, const char *yystr)
1645 char const *yyp = yystr;
1652 goto do_not_strip_quotes;
1656 goto do_not_strip_quotes;
1669 do_not_strip_quotes: ;
1673 return yystrlen (yystr);
1675 return yystpcpy (yyres, yystr) - yyres;
1679 #endif /* YYERROR_VERBOSE */
1684 /*--------------------------------.
1685 | Print this symbol on YYOUTPUT. |
1686 `--------------------------------*/
1688 #if defined (__STDC__) || defined (__cplusplus)
1690 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
1693 yysymprint (yyoutput, yytype, yyvaluep)
1699 /* Pacify ``unused variable'' warnings. */
1702 if (yytype < YYNTOKENS)
1703 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1705 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1709 if (yytype < YYNTOKENS)
1710 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1717 YYFPRINTF (yyoutput, ")");
1720 #endif /* ! YYDEBUG */
1721 /*-----------------------------------------------.
1722 | Release the memory associated to this symbol. |
1723 `-----------------------------------------------*/
1725 #if defined (__STDC__) || defined (__cplusplus)
1727 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1730 yydestruct (yymsg, yytype, yyvaluep)
1736 /* Pacify ``unused variable'' warnings. */
1741 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1752 /* Prevent warnings from -Wmissing-prototypes. */
1754 #ifdef YYPARSE_PARAM
1755 # if defined (__STDC__) || defined (__cplusplus)
1756 int yyparse (void *YYPARSE_PARAM);
1760 #else /* ! YYPARSE_PARAM */
1761 #if defined (__STDC__) || defined (__cplusplus)
1766 #endif /* ! YYPARSE_PARAM */
1770 /* The look-ahead symbol. */
1773 /* The semantic value of the look-ahead symbol. */
1776 /* Number of syntax errors so far. */
1785 #ifdef YYPARSE_PARAM
1786 # if defined (__STDC__) || defined (__cplusplus)
1787 int yyparse (void *YYPARSE_PARAM)
1789 int yyparse (YYPARSE_PARAM)
1790 void *YYPARSE_PARAM;
1792 #else /* ! YYPARSE_PARAM */
1793 #if defined (__STDC__) || defined (__cplusplus)
1807 /* Number of tokens to shift before error messages enabled. */
1809 /* Look-ahead token as an internal (translated) token number. */
1812 /* Three stacks and their tools:
1813 `yyss': related to states,
1814 `yyvs': related to semantic values,
1815 `yyls': related to locations.
1817 Refer to the stacks thru separate pointers, to allow yyoverflow
1818 to reallocate them elsewhere. */
1820 /* The state stack. */
1821 short int yyssa[YYINITDEPTH];
1822 short int *yyss = yyssa;
1825 /* The semantic value stack. */
1826 YYSTYPE yyvsa[YYINITDEPTH];
1827 YYSTYPE *yyvs = yyvsa;
1832 #define YYPOPSTACK (yyvsp--, yyssp--)
1834 YYSIZE_T yystacksize = YYINITDEPTH;
1836 /* The variables used to return semantic value and location from the
1841 /* When reducing, the number of symbols on the RHS of the reduced
1845 YYDPRINTF ((stderr, "Starting parse\n"));
1850 yychar = YYEMPTY; /* Cause a token to be read. */
1852 /* Initialize stack pointers.
1853 Waste one element of value and location stack
1854 so that they stay on the same level as the state stack.
1855 The wasted elements are never initialized. */
1862 /*------------------------------------------------------------.
1863 | yynewstate -- Push a new state, which is found in yystate. |
1864 `------------------------------------------------------------*/
1866 /* In all cases, when you get here, the value and location stacks
1867 have just been pushed. so pushing a state here evens the stacks.
1874 if (yyss + yystacksize - 1 <= yyssp)
1876 /* Get the current used size of the three stacks, in elements. */
1877 YYSIZE_T yysize = yyssp - yyss + 1;
1881 /* Give user a chance to reallocate the stack. Use copies of
1882 these so that the &'s don't force the real ones into
1884 YYSTYPE *yyvs1 = yyvs;
1885 short int *yyss1 = yyss;
1888 /* Each stack pointer address is followed by the size of the
1889 data in use in that stack, in bytes. This used to be a
1890 conditional around just the two extra args, but that might
1891 be undefined if yyoverflow is a macro. */
1892 yyoverflow (YY_("memory exhausted"),
1893 &yyss1, yysize * sizeof (*yyssp),
1894 &yyvs1, yysize * sizeof (*yyvsp),
1901 #else /* no yyoverflow */
1902 # ifndef YYSTACK_RELOCATE
1903 goto yyexhaustedlab;
1905 /* Extend the stack our own way. */
1906 if (YYMAXDEPTH <= yystacksize)
1907 goto yyexhaustedlab;
1909 if (YYMAXDEPTH < yystacksize)
1910 yystacksize = YYMAXDEPTH;
1913 short int *yyss1 = yyss;
1914 union yyalloc *yyptr =
1915 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1917 goto yyexhaustedlab;
1918 YYSTACK_RELOCATE (yyss);
1919 YYSTACK_RELOCATE (yyvs);
1921 # undef YYSTACK_RELOCATE
1923 YYSTACK_FREE (yyss1);
1926 #endif /* no yyoverflow */
1928 yyssp = yyss + yysize - 1;
1929 yyvsp = yyvs + yysize - 1;
1932 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1933 (unsigned long int) yystacksize));
1935 if (yyss + yystacksize - 1 <= yyssp)
1939 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1948 /* Do appropriate processing given the current state. */
1949 /* Read a look-ahead token if we need one and don't already have one. */
1952 /* First try to decide what to do without reference to look-ahead token. */
1954 yyn = yypact[yystate];
1955 if (yyn == YYPACT_NINF)
1958 /* Not known => get a look-ahead token if don't already have one. */
1960 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1961 if (yychar == YYEMPTY)
1963 YYDPRINTF ((stderr, "Reading a token: "));
1967 if (yychar <= YYEOF)
1969 yychar = yytoken = YYEOF;
1970 YYDPRINTF ((stderr, "Now at end of input.\n"));
1974 yytoken = YYTRANSLATE (yychar);
1975 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1978 /* If the proper action on seeing token YYTOKEN is to reduce or to
1979 detect an error, take that action. */
1981 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1986 if (yyn == 0 || yyn == YYTABLE_NINF)
1995 /* Shift the look-ahead token. */
1996 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1998 /* Discard the token being shifted unless it is eof. */
1999 if (yychar != YYEOF)
2005 /* Count tokens shifted since error; after three, turn off error
2014 /*-----------------------------------------------------------.
2015 | yydefault -- do the default action for the current state. |
2016 `-----------------------------------------------------------*/
2018 yyn = yydefact[yystate];
2024 /*-----------------------------.
2025 | yyreduce -- Do a reduction. |
2026 `-----------------------------*/
2028 /* yyn is the number of a rule to reduce with. */
2031 /* If YYLEN is nonzero, implement the default value of the action:
2034 Otherwise, the following line sets YYVAL to garbage.
2035 This behavior is undocumented and Bison
2036 users should not rely upon it. Assigning to YYVAL
2037 unconditionally makes the parser a bit smaller, and it avoids a
2038 GCC warning that YYVAL may be used uninitialized. */
2039 yyval = yyvsp[1-yylen];
2042 YY_REDUCE_PRINT (yyn);
2046 #line 207 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2048 *(yyvsp[-1].String) += " = ";
2049 (yyval.String) = (yyvsp[-1].String);
2054 #line 211 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2056 (yyval.String) = new std::string("");
2061 #line 218 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2062 { (yyval.String) = new std::string(""); ;}
2066 #line 223 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2067 { (yyval.String) = new std::string(""); ;}
2071 #line 228 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2072 { (yyval.String) = new std::string(); ;}
2076 #line 229 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2077 { *(yyvsp[-1].String) += " " + *(yyvsp[0].Const).cnst; delete (yyvsp[0].Const).cnst; (yyval.String) = (yyvsp[-1].String); ;}
2081 #line 232 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2082 { (yyval.String) = new std::string(); ;}
2086 #line 233 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2088 (yyvsp[-1].String)->insert(0, ", ");
2089 *(yyvsp[-1].String) += " " + *(yyvsp[0].Const).cnst;
2090 delete (yyvsp[0].Const).cnst;
2091 (yyval.String) = (yyvsp[-1].String);
2096 #line 241 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2098 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2099 delete (yyvsp[0].String);
2100 (yyval.String) = (yyvsp[-1].String);
2105 #line 247 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2106 { (yyval.String) = new std::string(); ;}
2110 #line 251 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2111 { (yyval.String) = new std::string(); ;}
2115 #line 252 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2117 (yyvsp[-1].String)->insert(0, ", ");
2118 if (!(yyvsp[0].String)->empty())
2119 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2120 delete (yyvsp[0].String);
2121 (yyval.String) = (yyvsp[-1].String);
2126 #line 262 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2128 *(yyvsp[-1].String) += " " + *(yyvsp[0].Const).cnst;
2129 delete (yyvsp[0].Const).cnst;
2130 (yyval.String) = (yyvsp[-1].String);
2135 #line 284 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2137 (yyval.Type).newTy = (yyvsp[0].String); (yyval.Type).oldTy = OpaqueTy;
2142 #line 290 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2143 { // Type UpReference
2144 (yyvsp[0].Const).cnst->insert(0, "\\");
2145 (yyval.Type).newTy = (yyvsp[0].Const).cnst;
2146 (yyval.Type).oldTy = OpaqueTy;
2151 #line 295 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2152 { // Function derived type?
2153 *(yyvsp[-3].Type).newTy += "( " + *(yyvsp[-1].String) + " )";
2154 delete (yyvsp[-1].String);
2155 (yyval.Type).newTy = (yyvsp[-3].Type).newTy;
2156 (yyval.Type).oldTy = FunctionTy;
2161 #line 301 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2162 { // Sized array type?
2163 (yyvsp[-3].Const).cnst->insert(0,"[ ");
2164 *(yyvsp[-3].Const).cnst += " x " + *(yyvsp[-1].Type).newTy + " ]";
2165 delete (yyvsp[-1].Type).newTy;
2166 (yyval.Type).newTy = (yyvsp[-3].Const).cnst;
2167 (yyval.Type).oldTy = ArrayTy;
2172 #line 308 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2173 { // Packed array type?
2174 (yyvsp[-3].Const).cnst->insert(0,"< ");
2175 *(yyvsp[-3].Const).cnst += " x " + *(yyvsp[-1].Type).newTy + " >";
2176 delete (yyvsp[-1].Type).newTy;
2177 (yyval.Type).newTy = (yyvsp[-3].Const).cnst;
2178 (yyval.Type).oldTy = PackedTy;
2183 #line 315 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2184 { // Structure type?
2185 (yyvsp[-1].String)->insert(0, "{ ");
2186 *(yyvsp[-1].String) += " }";
2187 (yyval.Type).newTy = (yyvsp[-1].String);
2188 (yyval.Type).oldTy = StructTy;
2193 #line 321 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2194 { // Empty structure type?
2195 (yyval.Type).newTy = new std::string("{ }");
2196 (yyval.Type).oldTy = StructTy;
2201 #line 325 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2203 *(yyvsp[-1].Type).newTy += '*';
2204 (yyvsp[-1].Type).oldTy = PointerTy;
2205 (yyval.Type) = (yyvsp[-1].Type);
2210 #line 335 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2212 (yyval.String) = (yyvsp[0].Type).newTy;
2217 #line 338 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2219 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Type).newTy;
2220 delete (yyvsp[0].Type).newTy;
2221 (yyval.String) = (yyvsp[-2].String);
2226 #line 347 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2228 *(yyvsp[-2].String) += ", ...";
2229 delete (yyvsp[0].String);
2230 (yyval.String) = (yyvsp[-2].String);
2235 #line 352 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2237 (yyval.String) = (yyvsp[0].String);
2242 #line 355 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2244 (yyval.String) = new std::string();
2249 #line 365 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2250 { // Nonempty unsized arr
2251 (yyval.Const).type = (yyvsp[-3].Type);
2252 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2253 *(yyval.Const).cnst += " [ " + *(yyvsp[-1].String) + " ]";
2254 delete (yyvsp[-1].String);
2259 #line 371 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2261 (yyval.Const).type = (yyvsp[-2].Type);
2262 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2263 *(yyval.Const).cnst += "[ ]";
2268 #line 376 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2270 (yyval.Const).type = (yyvsp[-2].Type);
2271 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2272 *(yyval.Const).cnst += " c" + *(yyvsp[0].String);
2273 delete (yyvsp[0].String);
2278 #line 382 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2279 { // Nonempty unsized arr
2280 (yyval.Const).type = (yyvsp[-3].Type);
2281 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2282 *(yyval.Const).cnst += " < " + *(yyvsp[-1].String) + " >";
2283 delete (yyvsp[-1].String);
2288 #line 388 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2290 (yyval.Const).type = (yyvsp[-3].Type);
2291 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2292 *(yyval.Const).cnst += " { " + *(yyvsp[-1].String) + " }";
2293 delete (yyvsp[-1].String);
2298 #line 394 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2300 (yyval.Const).type = (yyvsp[-2].Type);
2301 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2302 *(yyval.Const).cnst += " [ ]";
2307 #line 399 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2309 (yyval.Const).type = (yyvsp[-1].Type);
2310 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2311 *(yyval.Const).cnst += " " + *(yyvsp[0].Const).cnst;
2312 (yyvsp[0].Const).destroy();
2317 #line 405 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2319 (yyval.Const).type = (yyvsp[-1].Type);
2320 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2321 *(yyval.Const).cnst += " " + *(yyvsp[0].Const).cnst;
2322 (yyvsp[0].Const).destroy();
2327 #line 411 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2329 (yyval.Const).type = (yyvsp[-1].Type);
2330 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2331 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2332 delete (yyvsp[0].String);
2337 #line 417 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2339 (yyval.Const).type = (yyvsp[-1].Type);
2340 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2341 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2342 delete (yyvsp[0].String);
2347 #line 423 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2349 (yyval.Const).type = (yyvsp[-1].Type);
2350 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2351 *(yyval.Const).cnst += " " + *(yyvsp[0].Const).cnst;
2352 (yyvsp[0].Const).destroy();
2357 #line 429 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2358 { // integral constants
2359 (yyval.Const).type = (yyvsp[-1].Type);
2360 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2361 *(yyval.Const).cnst += " " + *(yyvsp[0].Const).cnst;
2362 (yyvsp[0].Const).destroy();
2367 #line 435 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2368 { // integral constants
2369 (yyval.Const).type = (yyvsp[-1].Type);
2370 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2371 *(yyval.Const).cnst += " " + *(yyvsp[0].Const).cnst;
2372 (yyvsp[0].Const).destroy();
2377 #line 441 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2378 { // Boolean constants
2379 (yyval.Const).type = (yyvsp[-1].Type);
2380 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2381 *(yyval.Const).cnst += " " + *(yyvsp[0].Const).cnst;
2382 (yyvsp[0].Const).destroy();
2387 #line 447 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2388 { // Boolean constants
2389 (yyval.Const).type = (yyvsp[-1].Type);
2390 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2391 *(yyval.Const).cnst += " " + *(yyvsp[0].Const).cnst;
2392 (yyvsp[0].Const).destroy();
2397 #line 453 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2398 { // Float & Double constants
2399 (yyval.Const).type = (yyvsp[-1].Type);
2400 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2401 *(yyval.Const).cnst += " " + *(yyvsp[0].Const).cnst;
2402 (yyvsp[0].Const).destroy();
2407 #line 461 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2409 // We must infer the cast opcode from the types of the operands.
2410 const char *opcode = getCastOpcode((yyvsp[-3].Const).type, (yyvsp[-1].Type));
2411 (yyval.String) = new std::string(opcode);
2412 *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + " " + *(yyvsp[-2].String) + " " + *(yyvsp[-1].Type).newTy + ")";
2413 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
2418 #line 468 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2420 *(yyvsp[-4].String) += "(" + *(yyvsp[-2].Const).cnst + " " + *(yyvsp[-1].String) + ")";
2421 (yyval.String) = (yyvsp[-4].String);
2422 (yyvsp[-2].Const).destroy();
2423 delete (yyvsp[-1].String);
2428 #line 474 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2430 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2431 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2432 (yyval.String) = (yyvsp[-7].String);
2437 #line 479 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2439 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2440 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2441 (yyval.String) = (yyvsp[-5].String);
2446 #line 484 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2448 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2449 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2450 (yyval.String) = (yyvsp[-5].String);
2455 #line 489 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2457 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2458 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2459 (yyval.String) = (yyvsp[-5].String);
2464 #line 494 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2466 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2467 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2468 (yyval.String) = (yyvsp[-5].String);
2473 #line 499 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2475 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2476 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2477 (yyval.String) = (yyvsp[-5].String);
2482 #line 504 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2484 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2485 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2486 (yyval.String) = (yyvsp[-7].String);
2491 #line 509 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2493 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2494 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2495 (yyval.String) = (yyvsp[-7].String);
2500 #line 519 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2502 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Const).cnst;
2503 (yyvsp[0].Const).destroy();
2504 (yyval.String) = (yyvsp[-2].String);
2509 #line 524 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2510 { (yyval.String) = new std::string(*(yyvsp[0].Const).cnst); (yyvsp[0].Const).destroy(); ;}
2514 #line 539 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2520 #line 544 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2527 #line 547 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2529 *O << *(yyvsp[0].String) << "\n";
2530 delete (yyvsp[0].String);
2536 #line 552 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2538 *O << "module asm " << " " << *(yyvsp[0].String) << "\n";
2544 #line 556 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2546 *O << "implementation\n";
2552 #line 563 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2554 *O << *(yyvsp[-2].String) << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Type).newTy << "\n";
2555 // delete $2; delete $3; $4.destroy();
2561 #line 568 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2562 { // Function prototypes can be in const pool
2563 *O << *(yyvsp[0].String) << "\n";
2564 delete (yyvsp[0].String);
2570 #line 573 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2571 { // Asm blocks can be in the const pool
2572 *O << *(yyvsp[-2].String) << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
2573 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
2579 #line 578 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2581 *O << *(yyvsp[-4].String) << " " << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Const).cnst << " "
2582 << *(yyvsp[0].String) << "\n";
2583 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Const).destroy(); delete (yyvsp[0].String);
2589 #line 584 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2591 *O << *(yyvsp[-4].String) << " " << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy
2592 << " " << *(yyvsp[0].String) << "\n";
2593 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
2599 #line 590 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2601 *O << *(yyvsp[-4].String) << " " << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy
2602 << " " << *(yyvsp[0].String) << "\n";
2603 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
2609 #line 596 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2611 *O << *(yyvsp[-4].String) << " " << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy
2612 << " " << *(yyvsp[0].String) << "\n";
2613 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
2619 #line 602 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2621 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
2622 delete (yyvsp[-1].String); delete (yyvsp[0].String);
2628 #line 607 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2630 *O << *(yyvsp[-2].String) << " = " << *(yyvsp[0].String) << "\n";
2631 delete (yyvsp[-2].String); delete (yyvsp[0].String);
2637 #line 612 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2644 #line 622 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2646 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
2647 delete (yyvsp[0].String);
2648 (yyval.String) = (yyvsp[-2].String);
2653 #line 627 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2655 *(yyvsp[-2].String) += " = " + *(yyvsp[0].Const).cnst;
2656 if (*(yyvsp[0].Const).cnst == "64")
2658 (yyvsp[0].Const).destroy();
2659 (yyval.String) = (yyvsp[-2].String);
2664 #line 634 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2666 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
2667 delete (yyvsp[0].String);
2668 (yyval.String) = (yyvsp[-2].String);
2673 #line 639 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2675 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
2676 delete (yyvsp[0].String);
2677 (yyval.String) = (yyvsp[-2].String);
2682 #line 646 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2684 (yyvsp[-1].String)->insert(0, "[ ");
2685 *(yyvsp[-1].String) += " ]";
2686 (yyval.String) = (yyvsp[-1].String);
2691 #line 653 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2693 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
2694 delete (yyvsp[0].String);
2695 (yyval.String) = (yyvsp[-2].String);
2700 #line 659 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2702 (yyval.String) = new std::string();
2707 #line 668 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2708 { (yyval.String) = new std::string(); ;}
2712 #line 670 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2714 (yyval.String) = (yyvsp[-1].Type).newTy;
2715 if (!(yyvsp[0].String)->empty())
2716 *(yyval.String) += " " + *(yyvsp[0].String);
2717 delete (yyvsp[0].String);
2722 #line 677 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2724 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
2725 delete (yyvsp[0].String);
2730 #line 681 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2732 (yyval.String) = (yyvsp[0].String);
2737 #line 685 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2739 (yyval.String) = (yyvsp[0].String);
2744 #line 688 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2746 *(yyvsp[-2].String) += ", ...";
2747 (yyval.String) = (yyvsp[-2].String);
2748 delete (yyvsp[0].String);
2753 #line 693 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2755 (yyval.String) = (yyvsp[0].String);
2760 #line 696 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2761 { (yyval.String) = new std::string(); ;}
2765 #line 699 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2767 if (!(yyvsp[-7].String)->empty()) {
2768 *(yyvsp[-7].String) += " ";
2770 *(yyvsp[-7].String) += *(yyvsp[-6].Type).newTy + " " + *(yyvsp[-5].String) + "(" + *(yyvsp[-3].String) + ")";
2771 if (!(yyvsp[-1].String)->empty()) {
2772 *(yyvsp[-7].String) += " " + *(yyvsp[-1].String);
2774 if (!(yyvsp[0].String)->empty()) {
2775 *(yyvsp[-7].String) += " " + *(yyvsp[0].String);
2777 (yyvsp[-6].Type).destroy();
2778 delete (yyvsp[-5].String);
2779 delete (yyvsp[-3].String);
2780 delete (yyvsp[-1].String);
2781 delete (yyvsp[0].String);
2782 (yyval.String) = (yyvsp[-7].String);
2787 #line 718 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2789 (yyval.String) = new std::string("begin");
2794 #line 721 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2796 (yyval.String) = new std::string ("{");
2801 #line 725 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2803 if (!(yyvsp[-2].String)->empty()) {
2804 *O << *(yyvsp[-2].String) << " ";
2806 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
2807 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
2813 #line 734 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2814 { (yyval.String) = new std::string("end"); ;}
2818 #line 735 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2819 { (yyval.String) = new std::string("}"); ;}
2823 #line 737 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2825 if ((yyvsp[-1].String))
2826 *O << *(yyvsp[-1].String);
2827 *O << '\n' << *(yyvsp[0].String) << "\n";
2833 #line 745 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2834 { (yyval.String) = new std::string(); ;}
2838 #line 751 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2840 if (!(yyvsp[-1].String)->empty())
2841 *(yyvsp[-2].String) += " " + *(yyvsp[-1].String);
2842 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
2843 delete (yyvsp[-1].String);
2844 delete (yyvsp[0].String);
2845 (yyval.String) = (yyvsp[-2].String);
2850 #line 764 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2851 { (yyval.String) = new std::string(); ;}
2855 #line 768 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2856 { (yyval.String) = (yyvsp[0].Const).cnst; ;}
2860 #line 769 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2861 { (yyval.String) = (yyvsp[0].Const).cnst; ;}
2865 #line 770 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2866 { (yyval.String) = (yyvsp[0].Const).cnst; ;}
2870 #line 771 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2871 { (yyval.String) = (yyvsp[0].Const).cnst; ;}
2875 #line 772 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2876 { (yyval.String) = (yyvsp[0].Const).cnst; ;}
2880 #line 773 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2881 { (yyval.String) = (yyvsp[0].Const).cnst; ;}
2885 #line 774 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2886 { (yyval.String) = (yyvsp[0].Const).cnst; ;}
2890 #line 775 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2891 { (yyval.String) = (yyvsp[0].Const).cnst; ;}
2895 #line 776 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2897 (yyvsp[-1].String)->insert(0, "<");
2898 *(yyvsp[-1].String) += ">";
2899 (yyval.String) = (yyvsp[-1].String);
2904 #line 782 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2906 if (!(yyvsp[-3].String)->empty()) {
2907 *(yyvsp[-4].String) += " " + *(yyvsp[-3].String);
2909 *(yyvsp[-4].String) += " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
2910 delete (yyvsp[-3].String); delete (yyvsp[-2].String); delete (yyvsp[0].String);
2911 (yyval.String) = (yyvsp[-4].String);
2916 #line 791 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2917 { (yyval.String) = (yyvsp[0].Const).cnst; ;}
2921 #line 800 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2923 (yyval.Value).type = (yyvsp[-1].Type);
2924 (yyval.Value).val = new std::string(*(yyvsp[-1].Type).newTy + " ");
2925 *(yyval.Value).val += *(yyvsp[0].String);
2926 delete (yyvsp[0].String);
2931 #line 807 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2937 #line 809 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2938 { // Do not allow functions with 0 basic blocks
2943 #line 816 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2945 *O << *(yyvsp[-1].String) ;
2950 #line 820 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2952 *O << " " << *(yyvsp[0].String) << "\n";
2953 delete (yyvsp[0].String);
2959 #line 825 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2966 #line 828 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2968 *O << *(yyvsp[0].String) << "\n";
2969 delete (yyvsp[0].String);
2975 #line 834 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2976 { // Return with a result...
2977 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Value).val << "\n";
2978 delete (yyvsp[-1].String); (yyvsp[0].Value).destroy();
2984 #line 839 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2985 { // Return with no result...
2986 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Type).newTy << "\n";
2987 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
2993 #line 844 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2994 { // Unconditional Branch...
2995 *O << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
2996 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3002 #line 849 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3004 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].String) << ", "
3005 << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].String) << ", " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3006 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); delete (yyvsp[-6].String); (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String);
3007 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3013 #line 856 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3015 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].String) << ", " << *(yyvsp[-4].Type).newTy
3016 << " " << *(yyvsp[-3].String) << " [" << *(yyvsp[-1].String) << " ]\n";
3017 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); delete (yyvsp[-6].String); (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); delete (yyvsp[-1].String);
3023 #line 862 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3025 *O << " " << *(yyvsp[-7].String) << " " << *(yyvsp[-6].Type).newTy << " " << *(yyvsp[-5].String) << ", "
3026 << *(yyvsp[-3].Type).newTy << " " << *(yyvsp[-2].String) << "[]\n";
3027 delete (yyvsp[-7].String); (yyvsp[-6].Type).destroy(); delete (yyvsp[-5].String); (yyvsp[-3].Type).destroy(); delete (yyvsp[-2].String);
3033 #line 869 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3035 *O << " " << *(yyvsp[-12].String) << " " << *(yyvsp[-11].String) << " " << *(yyvsp[-10].Type).newTy << " " << *(yyvsp[-9].String) << " ("
3036 << *(yyvsp[-7].String) << ") " << *(yyvsp[-5].String) << " " << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].String) << " "
3037 << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3038 delete (yyvsp[-12].String); delete (yyvsp[-11].String); (yyvsp[-10].Type).destroy(); delete (yyvsp[-9].String); delete (yyvsp[-7].String); delete (yyvsp[-5].String);
3039 (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3045 #line 877 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3047 *O << " " << *(yyvsp[0].String) << "\n";
3048 delete (yyvsp[0].String);
3054 #line 882 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3056 *O << " " << *(yyvsp[0].String) << "\n";
3057 delete (yyvsp[0].String);
3063 #line 888 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3065 *(yyvsp[-5].String) += *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].String) + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].String);
3066 (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3067 (yyval.String) = (yyvsp[-5].String);
3072 #line 893 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3074 (yyvsp[-3].String)->insert(0, *(yyvsp[-4].Type).newTy + " " );
3075 *(yyvsp[-3].String) += ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].String);
3076 (yyvsp[-4].Type).destroy(); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3077 (yyval.String) = (yyvsp[-3].String);
3082 #line 901 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3084 *(yyvsp[-1].String) += *(yyvsp[0].String);
3085 delete (yyvsp[0].String);
3086 (yyval.String) = (yyvsp[-1].String);
3091 #line 908 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3092 { // Used for PHI nodes
3093 (yyvsp[-3].String)->insert(0, *(yyvsp[-5].Type).newTy + "[");
3094 *(yyvsp[-3].String) += "," + *(yyvsp[-1].String) + "]";
3095 (yyvsp[-5].Type).destroy(); delete (yyvsp[-1].String);
3096 (yyval.String) = (yyvsp[-3].String);
3101 #line 914 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3103 *(yyvsp[-6].String) += ", [" + *(yyvsp[-3].String) + "," + *(yyvsp[-1].String) + "]";
3104 delete (yyvsp[-3].String); delete (yyvsp[-1].String);
3105 (yyval.String) = (yyvsp[-6].String);
3110 #line 922 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3111 { (yyval.String) = new std::string(*(yyvsp[0].Value).val); (yyvsp[0].Value).destroy(); ;}
3115 #line 923 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3117 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Value).val;
3118 (yyvsp[0].Value).destroy();
3119 (yyval.String) = (yyvsp[-2].String);
3124 #line 932 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3125 { (yyval.String) = new std::string(); ;}
3129 #line 936 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3131 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3132 delete (yyvsp[0].String);
3133 (yyval.String) = (yyvsp[-1].String);
3138 #line 944 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3140 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
3141 (yyvsp[-3].Type).destroy(); delete (yyvsp[-2].String); delete (yyvsp[0].String);
3142 (yyval.String) = (yyvsp[-4].String);
3147 #line 949 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3149 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
3150 (yyvsp[-3].Type).destroy(); delete (yyvsp[-2].String); delete (yyvsp[0].String);
3151 (yyval.String) = (yyvsp[-4].String);
3156 #line 954 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3158 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
3159 (yyvsp[-3].Type).destroy(); delete (yyvsp[-2].String); delete (yyvsp[0].String);
3160 (yyval.String) = (yyvsp[-4].String);
3165 #line 959 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3167 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3168 (yyvsp[0].Value).destroy();
3169 (yyval.String) = (yyvsp[-1].String);
3174 #line 964 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3176 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3177 (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3178 (yyval.String) = (yyvsp[-3].String);
3183 #line 969 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3185 const char *opcode = getCastOpcode((yyvsp[-2].Value).type, (yyvsp[0].Type));
3186 (yyval.String) = new std::string(opcode);
3187 *(yyval.String) += *(yyvsp[-2].Value).val + " " + *(yyvsp[-1].String) + " " + *(yyvsp[0].Type).newTy;
3188 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy();
3189 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3194 #line 976 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3196 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3197 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3198 (yyval.String) = (yyvsp[-5].String);
3203 #line 981 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3205 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Type).newTy;
3206 (yyvsp[-2].Value).destroy(); (yyvsp[0].Type).destroy();
3207 (yyval.String) = (yyvsp[-3].String);
3212 #line 986 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3214 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3215 (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3216 (yyval.String) = (yyvsp[-3].String);
3221 #line 991 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3223 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3224 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3225 (yyval.String) = (yyvsp[-5].String);
3230 #line 996 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3232 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3233 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3234 (yyval.String) = (yyvsp[-5].String);
3239 #line 1001 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3241 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3242 delete (yyvsp[0].String);
3243 (yyval.String) = (yyvsp[-1].String);
3248 #line 1006 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3250 if (!(yyvsp[-5].String)->empty())
3251 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String);
3252 if (!(yyvsp[-6].String)->empty())
3253 *(yyvsp[-6].String) += " ";
3254 *(yyvsp[-6].String) += *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].String) + "(" + *(yyvsp[-1].String) + ")";
3255 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); delete (yyvsp[-1].String);
3256 (yyval.String) = (yyvsp[-6].String);
3261 #line 1020 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3263 (yyvsp[0].String)->insert(0, ", ");
3264 (yyval.String) = (yyvsp[0].String);
3269 #line 1024 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3270 { (yyval.String) = new std::string(); ;}
3274 #line 1029 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3275 { (yyval.String) = new std::string(); ;}
3279 #line 1032 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3281 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3282 if (!(yyvsp[0].String)->empty())
3283 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3284 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3285 (yyval.String) = (yyvsp[-2].String);
3290 #line 1039 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3292 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].String);
3293 if (!(yyvsp[0].String)->empty())
3294 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3295 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3296 (yyval.String) = (yyvsp[-5].String);
3301 #line 1046 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3303 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3304 if (!(yyvsp[0].String)->empty())
3305 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3306 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3307 (yyval.String) = (yyvsp[-2].String);
3312 #line 1053 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3314 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].String);
3315 if (!(yyvsp[0].String)->empty())
3316 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3317 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3318 (yyval.String) = (yyvsp[-5].String);
3323 #line 1060 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3325 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3326 (yyvsp[0].Value).destroy();
3327 (yyval.String) = (yyvsp[-1].String);
3332 #line 1065 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3334 if (!(yyvsp[-3].String)->empty())
3335 *(yyvsp[-3].String) += " ";
3336 *(yyvsp[-3].String) += *(yyvsp[-2].String) + " " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].String);
3337 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3338 (yyval.String) = (yyvsp[-3].String);
3343 #line 1072 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3345 if (!(yyvsp[-5].String)->empty())
3346 *(yyvsp[-5].String) += " ";
3347 *(yyvsp[-5].String) += *(yyvsp[-4].String) + " " + *(yyvsp[-3].Value).val + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].String);
3348 delete (yyvsp[-4].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3349 (yyval.String) = (yyvsp[-5].String);
3354 #line 1079 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3356 *(yyvsp[-3].String) += *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].String) + " " + *(yyvsp[0].String);
3357 (yyvsp[-2].Type).destroy(); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3358 (yyval.String) = (yyvsp[-3].String);
3366 /* Line 1126 of yacc.c. */
3367 #line 3368 "UpgradeParser.tab.c"
3373 YY_STACK_PRINT (yyss, yyssp);
3378 /* Now `shift' the result of the reduction. Determine what state
3379 that goes to, based on the state we popped back to and the rule
3380 number reduced by. */
3384 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3385 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3386 yystate = yytable[yystate];
3388 yystate = yydefgoto[yyn - YYNTOKENS];
3393 /*------------------------------------.
3394 | yyerrlab -- here on detecting error |
3395 `------------------------------------*/
3397 /* If not already recovering from an error, report this error. */
3402 yyn = yypact[yystate];
3404 if (YYPACT_NINF < yyn && yyn < YYLAST)
3406 int yytype = YYTRANSLATE (yychar);
3407 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3408 YYSIZE_T yysize = yysize0;
3410 int yysize_overflow = 0;
3412 # define YYERROR_VERBOSE_ARGS_MAXIMUM 5
3413 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3417 /* This is so xgettext sees the translatable formats that are
3418 constructed on the fly. */
3419 YY_("syntax error, unexpected %s");
3420 YY_("syntax error, unexpected %s, expecting %s");
3421 YY_("syntax error, unexpected %s, expecting %s or %s");
3422 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3423 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3427 static char const yyunexpected[] = "syntax error, unexpected %s";
3428 static char const yyexpecting[] = ", expecting %s";
3429 static char const yyor[] = " or %s";
3430 char yyformat[sizeof yyunexpected
3431 + sizeof yyexpecting - 1
3432 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3433 * (sizeof yyor - 1))];
3434 char const *yyprefix = yyexpecting;
3436 /* Start YYX at -YYN if negative to avoid negative indexes in
3438 int yyxbegin = yyn < 0 ? -yyn : 0;
3440 /* Stay within bounds of both yycheck and yytname. */
3441 int yychecklim = YYLAST - yyn;
3442 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3445 yyarg[0] = yytname[yytype];
3446 yyfmt = yystpcpy (yyformat, yyunexpected);
3448 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3449 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3451 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3455 yyformat[sizeof yyunexpected - 1] = '\0';
3458 yyarg[yycount++] = yytname[yyx];
3459 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3460 yysize_overflow |= yysize1 < yysize;
3462 yyfmt = yystpcpy (yyfmt, yyprefix);
3466 yyf = YY_(yyformat);
3467 yysize1 = yysize + yystrlen (yyf);
3468 yysize_overflow |= yysize1 < yysize;
3471 if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
3472 yymsg = (char *) YYSTACK_ALLOC (yysize);
3475 /* Avoid sprintf, as that infringes on the user's name space.
3476 Don't have undefined behavior even if the translation
3477 produced a string with the wrong number of "%s"s. */
3480 while ((*yyp = *yyf))
3482 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3484 yyp += yytnamerr (yyp, yyarg[yyi++]);
3494 YYSTACK_FREE (yymsg);
3498 yyerror (YY_("syntax error"));
3499 goto yyexhaustedlab;
3503 #endif /* YYERROR_VERBOSE */
3504 yyerror (YY_("syntax error"));
3509 if (yyerrstatus == 3)
3511 /* If just tried and failed to reuse look-ahead token after an
3512 error, discard it. */
3514 if (yychar <= YYEOF)
3516 /* Return failure if at end of input. */
3517 if (yychar == YYEOF)
3522 yydestruct ("Error: discarding", yytoken, &yylval);
3527 /* Else will try to reuse look-ahead token after shifting the error
3532 /*---------------------------------------------------.
3533 | yyerrorlab -- error raised explicitly by YYERROR. |
3534 `---------------------------------------------------*/
3537 /* Pacify compilers like GCC when the user code never invokes
3538 YYERROR and the label yyerrorlab therefore never appears in user
3549 /*-------------------------------------------------------------.
3550 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3551 `-------------------------------------------------------------*/
3553 yyerrstatus = 3; /* Each real token shifted decrements this. */
3557 yyn = yypact[yystate];
3558 if (yyn != YYPACT_NINF)
3561 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3569 /* Pop the current state because it cannot handle the error token. */
3574 yydestruct ("Error: popping", yystos[yystate], yyvsp);
3577 YY_STACK_PRINT (yyss, yyssp);
3586 /* Shift the error token. */
3587 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3593 /*-------------------------------------.
3594 | yyacceptlab -- YYACCEPT comes here. |
3595 `-------------------------------------*/
3600 /*-----------------------------------.
3601 | yyabortlab -- YYABORT comes here. |
3602 `-----------------------------------*/
3608 /*-------------------------------------------------.
3609 | yyexhaustedlab -- memory exhaustion comes here. |
3610 `-------------------------------------------------*/
3612 yyerror (YY_("memory exhausted"));
3618 if (yychar != YYEOF && yychar != YYEMPTY)
3619 yydestruct ("Cleanup: discarding lookahead",
3621 while (yyssp != yyss)
3623 yydestruct ("Cleanup: popping",
3624 yystos[*yyssp], yyvsp);
3629 YYSTACK_FREE (yyss);
3635 #line 1085 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3638 int yyerror(const char *ErrorMsg) {
3640 = std::string((CurFilename == "-") ? std::string("<stdin>") : CurFilename)
3641 + ":" + llvm::utostr((unsigned) Upgradelineno) + ": ";
3642 std::string errMsg = std::string(ErrorMsg) + "\n" + where + " while reading ";
3643 if (yychar == YYEMPTY || yychar == 0)
3644 errMsg += "end-of-file.";
3646 errMsg += "token: '" + std::string(Upgradetext, Upgradeleng) + "'";
3647 std::cerr << errMsg << '\n';