1 /* A Bison parser, made by GNU Bison 2.1. */
3 /* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA. */
21 /* As a special exception, when this file is copied by Bison into a
22 Bison output file, you may use that output file without restriction.
23 This special exception was added by the Free Software Foundation
24 in version 1.24 of Bison. */
26 /* Written by Richard Stallman by simplifying the original so called
27 ``semantic'' parser. */
29 /* All symbols defined below should begin with yy or YY, to avoid
30 infringing on user name space. This should be done even for local
31 variables, as they might otherwise be expanded by user macros.
32 There are some unavoidable exceptions within include files to
33 define necessary library symbols; they are noted "INFRINGES ON
34 USER NAME SPACE" below. */
36 /* Identify Bison output. */
40 #define YYBISON_VERSION "2.1"
43 #define YYSKELETON_NAME "yacc.c"
48 /* Using locations. */
49 #define YYLSP_NEEDED 0
51 /* Substitute the variable and function names. */
52 #define yyparse Upgradeparse
53 #define yylex Upgradelex
54 #define yyerror Upgradeerror
55 #define yylval Upgradelval
56 #define yychar Upgradechar
57 #define yydebug Upgradedebug
58 #define yynerrs Upgradenerrs
64 /* Put the tokens into the symbol table, so that GDB and other debuggers
88 ZEROINITIALIZER = 279,
133 X86_STDCALLCC_TOK = 324,
134 X86_FASTCALLCC_TOK = 325,
173 EXTRACTELEMENT = 364,
194 #define ESINT64VAL 272
195 #define EUINT64VAL 273
201 #define ZEROINITIALIZER 279
207 #define STRINGCONSTANT 285
208 #define IMPLEMENTATION 286
217 #define DOTDOTDOT 295
222 #define DLLIMPORT 300
223 #define DLLEXPORT 301
224 #define EXTERN_WEAK 302
225 #define APPENDING 303
231 #define POINTERSIZE 309
240 #define SIDEEFFECT 318
243 #define CSRETCC_TOK 321
244 #define FASTCC_TOK 322
245 #define COLDCC_TOK 323
246 #define X86_STDCALLCC_TOK 324
247 #define X86_FASTCALLCC_TOK 325
248 #define DATALAYOUT 326
254 #define UNREACHABLE 332
278 #define GETELEMENTPTR 356
286 #define EXTRACTELEMENT 364
287 #define INSERTELEMENT 365
288 #define SHUFFLEVECTOR 366
294 /* Copy the first part of user declarations. */
295 #line 14 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
297 #include "ParserInternals.h"
298 #include <llvm/ADT/StringExtras.h>
304 #define YYERROR_VERBOSE 1
305 #define YYINCLUDED_STDLIB_H
308 int yylex(); // declaration" of xxx warnings.
312 static std::string CurFilename;
313 static std::ostream *O = 0;
314 std::istream* LexInput = 0;
315 unsigned SizeOfPointer = 32;
317 void UpgradeAssembly(const std::string &infile, std::istream& in,
318 std::ostream &out, bool debug)
321 CurFilename = infile;
327 std::cerr << "Parse failed.\n";
332 const char* getCastOpcode(TypeInfo& SrcTy, TypeInfo&DstTy) {
333 unsigned SrcBits = SrcTy.getBitWidth();
334 unsigned DstBits = DstTy.getBitWidth();
335 const char* opcode = "bitcast";
336 // Run through the possibilities ...
337 if (DstTy.isIntegral()) { // Casting to integral
338 if (SrcTy.isIntegral()) { // Casting from integral
339 if (DstBits < SrcBits)
341 else if (DstBits > SrcBits) { // its an extension
342 if (SrcTy.isSigned())
343 opcode ="sext"; // signed -> SEXT
345 opcode = "zext"; // unsigned -> ZEXT
347 opcode = "bitcast"; // Same size, No-op cast
349 } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt
350 if (DstTy.isSigned())
351 opcode = "fptosi"; // FP -> sint
353 opcode = "fptoui"; // FP -> uint
354 } else if (SrcTy.isPacked()) {
355 assert(DstBits == SrcTy.getBitWidth() &&
356 "Casting packed to integer of different width");
357 opcode = "bitcast"; // same size, no-op cast
359 assert(SrcTy.isPointer() &&
360 "Casting from a value that is not first-class type");
361 opcode = "ptrtoint"; // ptr -> int
363 } else if (DstTy.isFloatingPoint()) { // Casting to floating pt
364 if (SrcTy.isIntegral()) { // Casting from integral
365 if (SrcTy.isSigned())
366 opcode = "sitofp"; // sint -> FP
368 opcode = "uitofp"; // uint -> FP
369 } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt
370 if (DstBits < SrcBits) {
371 opcode = "fptrunc"; // FP -> smaller FP
372 } else if (DstBits > SrcBits) {
373 opcode = "fpext"; // FP -> larger FP
375 opcode ="bitcast"; // same size, no-op cast
377 } else if (SrcTy.isPacked()) {
378 assert(DstBits == SrcTy.getBitWidth() &&
379 "Casting packed to floating point of different width");
380 opcode = "bitcast"; // same size, no-op cast
382 assert(0 && "Casting pointer or non-first class to float");
384 } else if (DstTy.isPacked()) {
385 if (SrcTy.isPacked()) {
386 assert(DstTy.getBitWidth() == SrcTy.getBitWidth() &&
387 "Casting packed to packed of different widths");
388 opcode = "bitcast"; // packed -> packed
389 } else if (DstTy.getBitWidth() == SrcBits) {
390 opcode = "bitcast"; // float/int -> packed
392 assert(!"Illegal cast to packed (wrong type or size)");
394 } else if (DstTy.isPointer()) {
395 if (SrcTy.isPointer()) {
396 opcode = "bitcast"; // ptr -> ptr
397 } else if (SrcTy.isIntegral()) {
398 opcode = "inttoptr"; // int -> ptr
400 assert(!"Casting pointer to other than pointer or int");
403 assert(!"Casting to type that is not first-class");
410 /* Enabling traces. */
415 /* Enabling verbose error messages. */
416 #ifdef YYERROR_VERBOSE
417 # undef YYERROR_VERBOSE
418 # define YYERROR_VERBOSE 1
420 # define YYERROR_VERBOSE 0
423 /* Enabling the token table. */
424 #ifndef YYTOKEN_TABLE
425 # define YYTOKEN_TABLE 0
428 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
429 #line 130 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
430 typedef union YYSTYPE {
436 /* Line 196 of yacc.c. */
437 #line 438 "UpgradeParser.tab.c"
438 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
439 # define YYSTYPE_IS_DECLARED 1
440 # define YYSTYPE_IS_TRIVIAL 1
445 /* Copy the second part of user declarations. */
448 /* Line 219 of yacc.c. */
449 #line 450 "UpgradeParser.tab.c"
451 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
452 # define YYSIZE_T __SIZE_TYPE__
454 #if ! defined (YYSIZE_T) && defined (size_t)
455 # define YYSIZE_T size_t
457 #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
458 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
459 # define YYSIZE_T size_t
461 #if ! defined (YYSIZE_T)
462 # define YYSIZE_T unsigned int
468 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
469 # define YY_(msgid) dgettext ("bison-runtime", msgid)
473 # define YY_(msgid) msgid
477 #if ! defined (yyoverflow) || YYERROR_VERBOSE
479 /* The parser invokes alloca or malloc; define the necessary symbols. */
481 # ifdef YYSTACK_USE_ALLOCA
482 # if YYSTACK_USE_ALLOCA
484 # define YYSTACK_ALLOC __builtin_alloca
486 # define YYSTACK_ALLOC alloca
487 # if defined (__STDC__) || defined (__cplusplus)
488 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
489 # define YYINCLUDED_STDLIB_H
495 # ifdef YYSTACK_ALLOC
496 /* Pacify GCC's `empty if-body' warning. */
497 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
498 # ifndef YYSTACK_ALLOC_MAXIMUM
499 /* The OS might guarantee only one guard page at the bottom of the stack,
500 and a page size can be as small as 4096 bytes. So we cannot safely
501 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
502 to allow for a few compiler-allocated temporary stack slots. */
503 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
506 # define YYSTACK_ALLOC YYMALLOC
507 # define YYSTACK_FREE YYFREE
508 # ifndef YYSTACK_ALLOC_MAXIMUM
509 # define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
515 # define YYMALLOC malloc
516 # if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
517 && (defined (__STDC__) || defined (__cplusplus)))
518 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
523 # if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
524 && (defined (__STDC__) || defined (__cplusplus)))
525 void free (void *); /* INFRINGES ON USER NAME SPACE */
532 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
535 #if (! defined (yyoverflow) \
536 && (! defined (__cplusplus) \
537 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
539 /* A type that is properly aligned for any stack member. */
546 /* The size of the maximum gap between one aligned stack and the next. */
547 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
549 /* The size of an array large to enough to hold all stacks, each with
551 # define YYSTACK_BYTES(N) \
552 ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
553 + YYSTACK_GAP_MAXIMUM)
555 /* Copy COUNT objects from FROM to TO. The source and destination do
558 # if defined (__GNUC__) && 1 < __GNUC__
559 # define YYCOPY(To, From, Count) \
560 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
562 # define YYCOPY(To, From, Count) \
566 for (yyi = 0; yyi < (Count); yyi++) \
567 (To)[yyi] = (From)[yyi]; \
573 /* Relocate STACK from its old location to the new one. The
574 local variables YYSIZE and YYSTACKSIZE give the old and new number of
575 elements in the stack, and YYPTR gives the new location of the
576 stack. Advance YYPTR to a properly aligned location for the next
578 # define YYSTACK_RELOCATE(Stack) \
581 YYSIZE_T yynewbytes; \
582 YYCOPY (&yyptr->Stack, Stack, yysize); \
583 Stack = &yyptr->Stack; \
584 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
585 yyptr += yynewbytes / sizeof (*yyptr); \
591 #if defined (__STDC__) || defined (__cplusplus)
592 typedef signed char yysigned_char;
594 typedef short int yysigned_char;
597 /* YYFINAL -- State number of the termination state. */
599 /* YYLAST -- Last index in YYTABLE. */
602 /* YYNTOKENS -- Number of terminals. */
603 #define YYNTOKENS 127
604 /* YYNNTS -- Number of nonterminals. */
606 /* YYNRULES -- Number of rules. */
608 /* YYNRULES -- Number of states. */
609 #define YYNSTATES 509
611 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
613 #define YYMAXUTOK 367
615 #define YYTRANSLATE(YYX) \
616 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
618 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
619 static const unsigned char yytranslate[] =
621 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
622 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
623 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
624 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
625 116, 117, 125, 2, 114, 2, 2, 2, 2, 2,
626 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
627 121, 113, 122, 2, 2, 2, 2, 2, 2, 2,
628 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
629 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
630 2, 118, 115, 120, 2, 2, 2, 2, 2, 126,
631 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
632 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
633 119, 2, 2, 123, 2, 124, 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, 2, 2, 2, 2,
645 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
646 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
647 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
648 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
649 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
650 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
651 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
652 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
653 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
654 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
655 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
656 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
657 105, 106, 107, 108, 109, 110, 111, 112
661 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
663 static const unsigned short int yyprhs[] =
665 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
666 19, 21, 23, 25, 27, 29, 31, 33, 35, 37,
667 39, 41, 43, 45, 47, 49, 51, 53, 55, 57,
668 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
669 79, 82, 83, 85, 87, 89, 91, 93, 95, 97,
670 98, 100, 102, 104, 106, 108, 110, 113, 114, 115,
671 118, 119, 123, 126, 127, 129, 130, 134, 136, 139,
672 141, 143, 145, 147, 149, 151, 153, 155, 157, 159,
673 161, 163, 165, 167, 169, 171, 173, 175, 177, 179,
674 182, 187, 193, 199, 203, 206, 209, 211, 215, 217,
675 221, 223, 224, 229, 233, 237, 242, 247, 251, 254,
676 257, 260, 263, 266, 269, 272, 275, 278, 281, 288,
677 294, 303, 310, 317, 324, 331, 338, 347, 356, 360,
678 362, 364, 366, 368, 371, 374, 379, 382, 384, 389,
679 392, 397, 404, 411, 418, 425, 429, 434, 435, 437,
680 439, 441, 445, 449, 453, 457, 461, 465, 467, 468,
681 470, 472, 474, 475, 478, 482, 484, 486, 490, 492,
682 493, 502, 504, 506, 510, 512, 514, 518, 519, 521,
683 523, 527, 528, 530, 532, 534, 536, 538, 540, 542,
684 544, 546, 550, 552, 558, 560, 562, 564, 566, 569,
685 572, 574, 577, 580, 581, 583, 586, 589, 593, 603,
686 613, 622, 637, 639, 641, 648, 654, 657, 664, 672,
687 674, 678, 680, 681, 684, 686, 692, 698, 704, 707,
688 712, 717, 724, 729, 734, 741, 748, 751, 759, 761,
689 764, 765, 767, 768, 772, 779, 783, 790, 793, 798,
693 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
694 static const short int yyrhs[] =
696 158, 0, -1, 19, -1, 20, -1, 17, -1, 18,
697 -1, 78, -1, 79, -1, 80, -1, 81, -1, 82,
698 -1, 83, -1, 84, -1, 85, -1, 86, -1, 87,
699 -1, 88, -1, 89, -1, 90, -1, 91, -1, 92,
700 -1, 93, -1, 94, -1, 95, -1, 104, -1, 105,
701 -1, 106, -1, 107, -1, 11, -1, 9, -1, 7,
702 -1, 5, -1, 12, -1, 10, -1, 8, -1, 6,
703 -1, 134, -1, 135, -1, 13, -1, 14, -1, 166,
704 113, -1, -1, 42, -1, 43, -1, 44, -1, 48,
705 -1, 45, -1, 46, -1, 47, -1, -1, 65, -1,
706 66, -1, 67, -1, 68, -1, 69, -1, 70, -1,
707 64, 18, -1, -1, -1, 57, 18, -1, -1, 114,
708 57, 18, -1, 37, 30, -1, -1, 143, -1, -1,
709 114, 146, 145, -1, 143, -1, 57, 18, -1, 149,
710 -1, 3, -1, 151, -1, 3, -1, 151, -1, 4,
711 -1, 5, -1, 6, -1, 7, -1, 8, -1, 9,
712 -1, 10, -1, 11, -1, 12, -1, 13, -1, 14,
713 -1, 15, -1, 16, -1, 150, -1, 180, -1, 115,
714 18, -1, 148, 116, 153, 117, -1, 118, 18, 119,
715 151, 120, -1, 121, 18, 119, 151, 122, -1, 123,
716 152, 124, -1, 123, 124, -1, 151, 125, -1, 151,
717 -1, 152, 114, 151, -1, 152, -1, 152, 114, 40,
718 -1, 40, -1, -1, 149, 118, 156, 120, -1, 149,
719 118, 120, -1, 149, 126, 30, -1, 149, 121, 156,
720 122, -1, 149, 123, 156, 124, -1, 149, 123, 124,
721 -1, 149, 22, -1, 149, 23, -1, 149, 180, -1,
722 149, 155, -1, 149, 24, -1, 134, 129, -1, 135,
723 18, -1, 4, 25, -1, 4, 26, -1, 137, 21,
724 -1, 112, 116, 154, 39, 149, 117, -1, 101, 116,
725 154, 194, 117, -1, 103, 116, 154, 114, 154, 114,
726 154, 117, -1, 130, 116, 154, 114, 154, 117, -1,
727 131, 116, 154, 114, 154, 117, -1, 132, 116, 154,
728 114, 154, 117, -1, 133, 116, 154, 114, 154, 117,
729 -1, 109, 116, 154, 114, 154, 117, -1, 110, 116,
730 154, 114, 154, 114, 154, 117, -1, 111, 116, 154,
731 114, 154, 114, 154, 117, -1, 156, 114, 154, -1,
732 154, -1, 35, -1, 36, -1, 159, -1, 159, 175,
733 -1, 159, 177, -1, 159, 62, 61, 161, -1, 159,
734 31, -1, 160, -1, 160, 138, 27, 147, -1, 160,
735 177, -1, 160, 62, 61, 161, -1, 160, 138, 139,
736 157, 154, 145, -1, 160, 138, 50, 157, 149, 145,
737 -1, 160, 138, 45, 157, 149, 145, -1, 160, 138,
738 47, 157, 149, 145, -1, 160, 51, 163, -1, 160,
739 58, 113, 164, -1, -1, 30, -1, 56, -1, 55,
740 -1, 53, 113, 162, -1, 54, 113, 18, -1, 52,
741 113, 30, -1, 71, 113, 30, -1, 118, 165, 120,
742 -1, 165, 114, 30, -1, 30, -1, -1, 28, -1,
743 30, -1, 166, -1, -1, 149, 167, -1, 169, 114,
744 168, -1, 168, -1, 169, -1, 169, 114, 40, -1,
745 40, -1, -1, 140, 147, 166, 116, 170, 117, 144,
746 141, -1, 32, -1, 123, -1, 139, 171, 172, -1,
747 33, -1, 124, -1, 173, 183, 174, -1, -1, 45,
748 -1, 47, -1, 34, 176, 171, -1, -1, 63, -1,
749 17, -1, 18, -1, 21, -1, 25, -1, 26, -1,
750 22, -1, 23, -1, 24, -1, 121, 156, 122, -1,
751 155, -1, 61, 178, 30, 114, 30, -1, 128, -1,
752 166, -1, 180, -1, 179, -1, 149, 181, -1, 183,
753 184, -1, 184, -1, 185, 186, -1, 185, 188, -1,
754 -1, 29, -1, 72, 182, -1, 72, 3, -1, 73,
755 15, 181, -1, 73, 4, 181, 114, 15, 181, 114,
756 15, 181, -1, 74, 136, 181, 114, 15, 181, 118,
757 187, 120, -1, 74, 136, 181, 114, 15, 181, 118,
758 120, -1, 138, 75, 140, 147, 181, 116, 191, 117,
759 39, 15, 181, 76, 15, 181, -1, 76, -1, 77,
760 -1, 187, 136, 179, 114, 15, 181, -1, 136, 179,
761 114, 15, 181, -1, 138, 193, -1, 149, 118, 181,
762 114, 181, 120, -1, 189, 114, 118, 181, 114, 181,
763 120, -1, 182, -1, 190, 114, 182, -1, 190, -1,
764 -1, 60, 59, -1, 59, -1, 130, 149, 181, 114,
765 181, -1, 131, 149, 181, 114, 181, -1, 132, 149,
766 181, 114, 181, -1, 49, 182, -1, 133, 182, 114,
767 182, -1, 112, 182, 39, 149, -1, 103, 182, 114,
768 182, 114, 182, -1, 108, 182, 114, 149, -1, 109,
769 182, 114, 182, -1, 110, 182, 114, 182, 114, 182,
770 -1, 111, 182, 114, 182, 114, 182, -1, 102, 189,
771 -1, 192, 140, 147, 181, 116, 191, 117, -1, 196,
772 -1, 114, 190, -1, -1, 38, -1, -1, 96, 149,
773 142, -1, 96, 149, 114, 10, 181, 142, -1, 97,
774 149, 142, -1, 97, 149, 114, 10, 181, 142, -1,
775 98, 182, -1, 195, 99, 149, 181, -1, 195, 100,
776 182, 114, 149, 181, -1, 101, 149, 181, 194, -1
779 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
780 static const unsigned short int yyrline[] =
782 0, 188, 188, 188, 189, 189, 193, 193, 193, 193,
783 193, 193, 193, 193, 193, 194, 194, 194, 195, 195,
784 195, 195, 195, 195, 196, 196, 196, 196, 200, 200,
785 200, 200, 201, 201, 201, 201, 202, 202, 203, 203,
786 206, 210, 215, 215, 215, 215, 215, 215, 216, 217,
787 220, 220, 220, 220, 220, 221, 222, 227, 232, 233,
788 236, 237, 245, 251, 252, 255, 256, 265, 266, 279,
789 279, 280, 280, 281, 285, 285, 285, 285, 285, 285,
790 285, 286, 286, 286, 286, 286, 287, 287, 288, 294,
791 299, 305, 312, 319, 325, 329, 339, 342, 350, 351,
792 356, 359, 369, 375, 380, 386, 392, 398, 403, 409,
793 415, 421, 427, 433, 439, 445, 451, 457, 465, 472,
794 478, 483, 488, 493, 498, 506, 511, 516, 526, 531,
795 536, 536, 546, 551, 554, 559, 563, 567, 570, 575,
796 580, 585, 591, 597, 603, 609, 614, 619, 624, 626,
797 626, 629, 634, 641, 646, 653, 660, 665, 666, 674,
798 674, 675, 675, 677, 684, 688, 692, 695, 700, 703,
799 705, 725, 728, 732, 741, 742, 744, 752, 753, 754,
800 758, 771, 772, 775, 775, 775, 775, 775, 775, 775,
801 776, 777, 782, 783, 792, 792, 795, 795, 801, 808,
802 811, 819, 823, 828, 831, 837, 842, 847, 852, 859,
803 865, 871, 884, 889, 895, 900, 908, 915, 921, 929,
804 930, 938, 939, 943, 948, 951, 956, 961, 966, 971,
805 979, 986, 991, 996, 1001, 1006, 1011, 1016, 1025, 1030,
806 1034, 1038, 1039, 1042, 1049, 1056, 1063, 1070, 1075, 1082,
811 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
812 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
813 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
814 static const char *const yytname[] =
816 "$end", "error", "$undefined", "VOID", "BOOL", "SBYTE", "UBYTE",
817 "SHORT", "USHORT", "INT", "UINT", "LONG", "ULONG", "FLOAT", "DOUBLE",
818 "LABEL", "OPAQUE", "ESINT64VAL", "EUINT64VAL", "SINTVAL", "UINTVAL",
819 "FPVAL", "NULL_TOK", "UNDEF", "ZEROINITIALIZER", "TRUETOK", "FALSETOK",
820 "TYPE", "VAR_ID", "LABELSTR", "STRINGCONSTANT", "IMPLEMENTATION",
821 "BEGINTOK", "ENDTOK", "DECLARE", "GLOBAL", "CONSTANT", "SECTION",
822 "VOLATILE", "TO", "DOTDOTDOT", "CONST", "INTERNAL", "LINKONCE", "WEAK",
823 "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "APPENDING", "NOT", "EXTERNAL",
824 "TARGET", "TRIPLE", "ENDIAN", "POINTERSIZE", "LITTLE", "BIG", "ALIGN",
825 "DEPLIBS", "CALL", "TAIL", "ASM_TOK", "MODULE", "SIDEEFFECT", "CC_TOK",
826 "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK", "COLDCC_TOK",
827 "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT", "RET", "BR",
828 "SWITCH", "INVOKE", "UNWIND", "UNREACHABLE", "ADD", "SUB", "MUL", "UDIV",
829 "SDIV", "FDIV", "UREM", "SREM", "FREM", "AND", "OR", "XOR", "SETLE",
830 "SETGE", "SETLT", "SETGT", "SETEQ", "SETNE", "MALLOC", "ALLOCA", "FREE",
831 "LOAD", "STORE", "GETELEMENTPTR", "PHI_TOK", "SELECT", "SHL", "SHR",
832 "ASHR", "LSHR", "VAARG", "EXTRACTELEMENT", "INSERTELEMENT",
833 "SHUFFLEVECTOR", "CAST", "'='", "','", "'\\\\'", "'('", "')'", "'['",
834 "'x'", "']'", "'<'", "'>'", "'{'", "'}'", "'*'", "'c'", "$accept",
835 "IntVal", "EInt64Val", "ArithmeticOps", "LogicalOps", "SetCondOps",
836 "ShiftOps", "SIntType", "UIntType", "IntType", "FPType", "OptAssign",
837 "OptLinkage", "OptCallingConv", "OptAlign", "OptCAlign", "SectionString",
838 "OptSection", "GlobalVarAttributes", "GlobalVarAttribute", "TypesV",
839 "UpRTypesV", "Types", "PrimType", "UpRTypes", "TypeListI",
840 "ArgTypeListI", "ConstVal", "ConstExpr", "ConstVector", "GlobalType",
841 "Module", "DefinitionList", "ConstPool", "AsmBlock", "BigOrLittle",
842 "TargetDefinition", "LibrariesDefinition", "LibList", "Name", "OptName",
843 "ArgVal", "ArgListH", "ArgList", "FunctionHeaderH", "BEGIN",
844 "FunctionHeader", "END", "Function", "FnDeclareLinkage", "FunctionProto",
845 "OptSideEffect", "ConstValueRef", "SymbolicValueRef", "ValueRef",
846 "ResolvedVal", "BasicBlockList", "BasicBlock", "InstructionList",
847 "BBTerminatorInst", "JumpTable", "Inst", "PHIList", "ValueRefList",
848 "ValueRefListE", "OptTailCall", "InstVal", "IndexList", "OptVolatile",
854 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
856 static const unsigned short int yytoknum[] =
858 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
859 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
860 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
861 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
862 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
863 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
864 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
865 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
866 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
867 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
868 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
869 365, 366, 367, 61, 44, 92, 40, 41, 91, 120,
870 93, 60, 62, 123, 125, 42, 99
874 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
875 static const unsigned char yyr1[] =
877 0, 127, 128, 128, 129, 129, 130, 130, 130, 130,
878 130, 130, 130, 130, 130, 131, 131, 131, 132, 132,
879 132, 132, 132, 132, 133, 133, 133, 133, 134, 134,
880 134, 134, 135, 135, 135, 135, 136, 136, 137, 137,
881 138, 138, 139, 139, 139, 139, 139, 139, 139, 139,
882 140, 140, 140, 140, 140, 140, 140, 140, 141, 141,
883 142, 142, 143, 144, 144, 145, 145, 146, 146, 147,
884 147, 148, 148, 149, 150, 150, 150, 150, 150, 150,
885 150, 150, 150, 150, 150, 150, 151, 151, 151, 151,
886 151, 151, 151, 151, 151, 151, 152, 152, 153, 153,
887 153, 153, 154, 154, 154, 154, 154, 154, 154, 154,
888 154, 154, 154, 154, 154, 154, 154, 154, 155, 155,
889 155, 155, 155, 155, 155, 155, 155, 155, 156, 156,
890 157, 157, 158, 159, 159, 159, 159, 159, 160, 160,
891 160, 160, 160, 160, 160, 160, 160, 160, 161, 162,
892 162, 163, 163, 163, 163, 164, 165, 165, 165, 166,
893 166, 167, 167, 168, 169, 169, 170, 170, 170, 170,
894 171, 172, 172, 173, 174, 174, 175, 176, 176, 176,
895 177, 178, 178, 179, 179, 179, 179, 179, 179, 179,
896 179, 179, 179, 179, 180, 180, 181, 181, 182, 183,
897 183, 184, 185, 185, 185, 186, 186, 186, 186, 186,
898 186, 186, 186, 186, 187, 187, 188, 189, 189, 190,
899 190, 191, 191, 192, 192, 193, 193, 193, 193, 193,
900 193, 193, 193, 193, 193, 193, 193, 193, 193, 194,
901 194, 195, 195, 196, 196, 196, 196, 196, 196, 196,
905 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
906 static const unsigned char yyr2[] =
908 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
909 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
910 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
911 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
912 2, 0, 1, 1, 1, 1, 1, 1, 1, 0,
913 1, 1, 1, 1, 1, 1, 2, 0, 0, 2,
914 0, 3, 2, 0, 1, 0, 3, 1, 2, 1,
915 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
916 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
917 4, 5, 5, 3, 2, 2, 1, 3, 1, 3,
918 1, 0, 4, 3, 3, 4, 4, 3, 2, 2,
919 2, 2, 2, 2, 2, 2, 2, 2, 6, 5,
920 8, 6, 6, 6, 6, 6, 8, 8, 3, 1,
921 1, 1, 1, 2, 2, 4, 2, 1, 4, 2,
922 4, 6, 6, 6, 6, 3, 4, 0, 1, 1,
923 1, 3, 3, 3, 3, 3, 3, 1, 0, 1,
924 1, 1, 0, 2, 3, 1, 1, 3, 1, 0,
925 8, 1, 1, 3, 1, 1, 3, 0, 1, 1,
926 3, 0, 1, 1, 1, 1, 1, 1, 1, 1,
927 1, 3, 1, 5, 1, 1, 1, 1, 2, 2,
928 1, 2, 2, 0, 1, 2, 2, 3, 9, 9,
929 8, 14, 1, 1, 6, 5, 2, 6, 7, 1,
930 3, 1, 0, 2, 1, 5, 5, 5, 2, 4,
931 4, 6, 4, 4, 6, 6, 2, 7, 1, 2,
932 0, 1, 0, 3, 6, 3, 6, 2, 4, 6,
936 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
937 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
938 means the default is an error. */
939 static const unsigned char yydefact[] =
941 147, 0, 49, 137, 1, 136, 177, 42, 43, 44,
942 46, 47, 48, 45, 0, 57, 203, 133, 134, 159,
943 160, 0, 0, 0, 49, 0, 139, 178, 179, 57,
944 0, 0, 50, 51, 52, 53, 54, 55, 0, 0,
945 204, 203, 200, 41, 0, 0, 0, 0, 145, 0,
946 0, 0, 0, 0, 0, 0, 40, 180, 148, 135,
947 56, 70, 74, 75, 76, 77, 78, 79, 80, 81,
948 82, 83, 84, 85, 86, 2, 3, 0, 0, 0,
949 0, 194, 0, 0, 69, 87, 73, 195, 88, 171,
950 172, 173, 174, 175, 176, 199, 0, 0, 0, 212,
951 213, 242, 201, 202, 0, 0, 0, 0, 158, 146,
952 140, 138, 130, 131, 0, 0, 0, 0, 89, 0,
953 0, 72, 94, 96, 0, 0, 101, 95, 206, 0,
954 205, 0, 0, 31, 35, 30, 34, 29, 33, 28,
955 32, 36, 37, 0, 241, 0, 224, 0, 57, 6,
956 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
957 17, 18, 19, 20, 21, 22, 23, 0, 0, 0,
958 0, 0, 0, 24, 25, 26, 27, 0, 0, 0,
959 0, 0, 0, 0, 0, 0, 57, 216, 0, 238,
960 153, 150, 149, 151, 152, 154, 157, 0, 65, 65,
961 65, 74, 75, 76, 77, 78, 79, 80, 81, 82,
962 83, 84, 0, 0, 0, 0, 65, 0, 0, 0,
963 93, 169, 100, 98, 0, 183, 184, 185, 188, 189,
964 190, 186, 187, 181, 0, 0, 0, 0, 0, 0,
965 0, 0, 0, 0, 0, 192, 197, 196, 198, 0,
966 207, 0, 228, 223, 0, 60, 60, 247, 0, 0,
967 236, 0, 0, 0, 0, 0, 0, 0, 0, 0,
968 0, 0, 0, 0, 0, 155, 0, 143, 144, 142,
969 115, 116, 4, 5, 113, 114, 117, 108, 109, 112,
970 0, 0, 0, 0, 111, 110, 141, 71, 71, 97,
971 168, 162, 165, 166, 0, 0, 90, 182, 0, 0,
972 0, 0, 0, 0, 0, 129, 0, 0, 0, 0,
973 0, 0, 0, 0, 0, 243, 0, 245, 240, 0,
974 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
975 0, 0, 0, 0, 156, 0, 0, 67, 65, 103,
976 0, 0, 107, 0, 104, 91, 92, 161, 163, 0,
977 63, 99, 0, 240, 0, 0, 0, 0, 0, 0,
978 191, 0, 0, 0, 0, 0, 0, 0, 0, 0,
979 0, 0, 250, 0, 0, 0, 232, 233, 0, 0,
980 230, 0, 0, 0, 229, 0, 248, 0, 62, 68,
981 66, 102, 105, 106, 167, 164, 64, 58, 0, 0,
982 0, 0, 0, 0, 0, 128, 0, 0, 0, 0,
983 0, 0, 222, 60, 61, 60, 219, 239, 0, 0,
984 0, 0, 0, 225, 226, 227, 222, 0, 0, 170,
985 193, 119, 0, 0, 0, 0, 0, 0, 0, 0,
986 0, 0, 0, 221, 0, 0, 244, 246, 0, 0,
987 0, 231, 234, 235, 0, 249, 59, 0, 125, 0,
988 0, 118, 121, 122, 123, 124, 0, 210, 0, 0,
989 0, 220, 217, 0, 237, 0, 0, 0, 208, 0,
990 209, 0, 0, 218, 120, 126, 127, 0, 0, 0,
991 0, 0, 0, 215, 0, 0, 214, 0, 211
994 /* YYDEFGOTO[NTERM-NUM]. */
995 static const short int yydefgoto[] =
997 -1, 81, 284, 241, 242, 243, 244, 212, 213, 143,
998 214, 24, 15, 38, 439, 325, 347, 407, 277, 348,
999 82, 83, 215, 85, 86, 124, 224, 315, 245, 316,
1000 114, 1, 2, 3, 59, 193, 48, 109, 197, 87,
1001 358, 302, 303, 304, 39, 91, 16, 94, 17, 29,
1002 18, 308, 246, 88, 248, 426, 41, 42, 43, 102,
1003 479, 103, 260, 453, 454, 186, 187, 382, 188, 189
1006 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1008 #define YYPACT_NINF -462
1009 static const short int yypact[] =
1011 -462, 20, 223, 382, -462, -462, 74, -462, -462, -462,
1012 -462, -462, -462, -462, -37, 262, 13, -462, -462, -462,
1013 -462, 64, -82, 9, -9, -15, -462, -462, -462, 262,
1014 79, 110, -462, -462, -462, -462, -462, -462, 688, -17,
1015 -462, -19, -462, -5, 38, 40, 50, 59, -462, 57,
1016 79, 688, 132, 132, 132, 132, -462, -462, -462, -462,
1017 -462, 66, -462, -462, -462, -462, -462, -462, -462, -462,
1018 -462, -462, -462, -462, -462, -462, -462, 173, 184, 193,
1019 469, -462, 108, 103, -462, -462, -3, -462, -462, -462,
1020 -462, -462, -462, -462, -462, -462, 717, 17, 235, -462,
1021 -462, 1038, -462, -462, 191, 114, 204, 194, 195, -462,
1022 -462, -462, -462, -462, 745, 745, 745, 774, -462, 109,
1023 111, -462, -462, -3, -13, 113, 80, -462, 66, 932,
1024 -462, 932, 932, -462, -462, -462, -462, -462, -462, -462,
1025 -462, -462, -462, 932, -462, 745, -462, 178, 262, -462,
1026 -462, -462, -462, -462, -462, -462, -462, -462, -462, -462,
1027 -462, -462, -462, -462, -462, -462, -462, 745, 745, 745,
1028 745, 745, 745, -462, -462, -462, -462, 745, 745, 745,
1029 745, 745, 745, 745, 745, 745, 262, -462, 78, -462,
1030 -462, -462, -462, -462, -462, -462, -462, -40, 117, 117,
1031 117, 155, 172, 214, 176, 230, 179, 231, 182, 232,
1032 234, 237, 200, 233, 238, 822, 117, 745, 745, 745,
1033 -462, 527, -462, 139, 143, -462, -462, -462, -462, -462,
1034 -462, -462, -462, 211, 140, 160, 162, 163, 166, 167,
1035 774, 168, 170, 171, 175, -462, -462, -462, -462, 185,
1036 -462, 186, -462, -462, 688, 189, 190, -462, 932, 174,
1037 196, 201, 202, 205, 206, 208, 270, 932, 932, 932,
1038 210, 688, 745, 745, 288, -462, 16, -462, -462, -462,
1039 -462, -462, -462, -462, -462, -462, -462, -462, -462, -462,
1040 566, 774, 499, 303, -462, -462, -462, -23, 2, -3,
1041 -462, 108, -462, 225, 220, 596, -462, -462, 314, 774,
1042 774, 774, 774, 774, 774, -462, -95, 774, 774, 774,
1043 774, 330, 331, 932, -2, -462, -1, -462, 236, 932,
1044 240, 745, 745, 745, 745, 745, 745, 239, 246, 247,
1045 745, 932, 932, 249, -462, 318, 333, -462, 117, -462,
1046 -39, 1, -462, -10, -462, -462, -462, -462, -462, 648,
1047 312, -462, 252, 236, 253, 254, 257, 261, 313, 774,
1048 -462, 263, 265, 266, 267, 932, 932, 272, 932, 336,
1049 932, 745, -462, 275, 932, 276, -462, -462, 277, 281,
1050 -462, 932, 932, 932, -462, 283, -462, 745, -462, -462,
1051 -462, -462, -462, -462, -462, -462, -462, 343, 372, 286,
1052 774, 774, 774, 774, 745, -462, 774, 774, 774, 774,
1053 291, 289, 745, 292, -462, 292, -462, 294, 932, 297,
1054 745, 745, 745, -462, -462, -462, 745, 932, 395, -462,
1055 -462, -462, 300, 298, 305, 307, 306, 317, 319, 324,
1056 325, 420, 39, 294, 326, 388, -462, -462, 745, 327,
1057 932, -462, -462, -462, 329, -462, -462, 774, -462, 774,
1058 774, -462, -462, -462, -462, -462, 932, -462, 979, 54,
1059 409, -462, -462, 332, -462, 334, 338, 339, -462, 335,
1060 -462, 979, 435, -462, -462, -462, -462, 438, 344, 932,
1061 932, 442, 383, -462, 932, 445, -462, 932, -462
1064 /* YYPGOTO[NTERM-NUM]. */
1065 static const short int yypgoto[] =
1067 -462, -462, -462, 360, 361, 362, 363, -97, -96, -400,
1068 -462, 423, 443, -132, -462, -252, 126, -462, -194, -462,
1069 -44, -462, -38, -462, -69, 342, -462, -105, 256, -134,
1070 107, -462, -462, -462, 419, -462, -462, -462, -462, 0,
1071 -462, 128, -462, -462, 461, -462, -462, -462, -462, -462,
1072 488, -462, -461, -103, -6, 7, -462, 451, -462, -462,
1073 -462, -462, -462, 115, 81, -462, -462, 137, -462, -462
1076 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1077 positive, shift that token. If negative, reduce the rule which
1078 number is the opposite. If zero, do what YYDEFACT says.
1079 If YYTABLE_NINF, syntax error. */
1080 #define YYTABLE_NINF -133
1081 static const short int yytable[] =
1083 84, 141, 142, 25, 327, 278, 279, 111, 378, 380,
1084 40, 123, 216, 84, 92, 89, 254, 489, 51, 369,
1085 4, 131, 296, 19, 30, 20, 247, 370, 247, 247,
1086 498, 49, 132, 7, 8, 9, 52, 11, 53, 13,
1087 247, 54, 40, 25, 133, 134, 135, 136, 137, 138,
1088 139, 140, 478, 345, 271, 379, 379, 123, 129, 133,
1089 134, 135, 136, 137, 138, 139, 140, 96, 97, 98,
1090 50, 99, 100, 346, 274, 369, 198, 199, 200, 491,
1091 275, 401, 125, 121, 62, 63, 64, 65, 66, 67,
1092 68, 69, 70, 71, 72, 73, 74, 355, 56, 75,
1093 76, 219, 127, 130, 369, 93, 90, 129, 19, 58,
1094 20, 220, 295, -71, 403, 369, 44, 45, 46, 27,
1095 222, 28, 127, 402, 356, 249, 250, 127, 60, 255,
1096 256, 129, 258, 259, 129, 47, 19, 251, 20, 129,
1097 129, 129, 129, 129, 267, 268, 269, 129, 297, 298,
1098 299, 104, 252, 105, 400, 247, 350, 351, 353, 477,
1099 115, 116, 117, 106, 247, 247, 247, 112, 113, 191,
1100 192, 456, 107, 457, 490, 108, 257, 272, 273, 261,
1101 280, 281, -72, 301, 262, 263, 264, 265, 266, -31,
1102 -31, 118, 270, -30, -30, 77, -29, -29, 78, -28,
1103 -28, 79, 119, 80, 363, 364, 365, 366, 367, 368,
1104 323, 120, 371, 372, 373, 374, 84, 282, 283, 126,
1105 247, 190, 194, -132, 195, 196, 247, 341, 217, 221,
1106 218, 276, -35, 84, 342, 129, 299, 253, 247, 247,
1107 133, 134, 135, 136, 137, 138, 139, 140, -34, -33,
1108 -32, 285, 328, 305, 5, -38, 309, 6, -39, 286,
1109 306, 337, 338, 339, 415, 7, 8, 9, 10, 11,
1110 12, 13, 247, 247, 307, 247, 310, 247, 311, 312,
1111 343, 247, 313, 314, 317, 14, 318, 319, 247, 247,
1112 247, 320, 329, 129, 386, 129, 129, 129, 390, 321,
1113 322, 357, 129, 324, 326, 442, 443, 444, 445, 336,
1114 330, 447, 448, 449, 450, 331, 332, 377, 344, 333,
1115 334, 301, 335, 383, 340, 247, 31, 32, 33, 34,
1116 35, 36, 37, 354, 247, 395, 396, 360, 385, 359,
1117 387, 388, 389, 129, 362, 375, 376, 394, 398, 345,
1118 381, 399, 414, 391, 424, 141, 142, 247, 384, 437,
1119 392, 393, 485, 397, 486, 487, 408, 410, 411, 420,
1120 421, 412, 423, 247, 425, 413, 446, 416, 429, 417,
1121 418, 419, 141, 142, 129, 433, 434, 435, 422, 428,
1122 430, 431, 129, 129, 129, 432, 247, 247, 129, 436,
1123 438, 247, 440, 441, 247, 451, 455, 452, 458, -41,
1124 19, 460, 20, 466, 467, 468, 6, -41, -41, 469,
1125 129, 470, 459, 471, -41, -41, -41, -41, -41, -41,
1126 -41, 465, -41, 21, 472, 476, 473, 461, 462, 463,
1127 22, 474, 475, 480, 23, 379, 484, 482, 492, 497,
1128 499, 494, 493, 500, 483, 495, 496, 504, 501, 505,
1129 507, 182, 183, 184, 185, 481, 101, 55, 223, 110,
1130 488, 294, 121, 62, 63, 64, 65, 66, 67, 68,
1131 69, 70, 71, 72, 73, 74, 406, 405, 75, 76,
1132 57, 26, 95, 502, 503, 0, 427, 19, 506, 20,
1133 409, 508, 121, 201, 202, 203, 204, 205, 206, 207,
1134 208, 209, 210, 211, 73, 74, 0, 464, 75, 76,
1135 0, 0, 0, 0, 0, 0, 0, 19, 0, 20,
1136 121, 62, 63, 64, 65, 66, 67, 68, 69, 70,
1137 71, 72, 73, 74, 0, 0, 75, 76, 0, 0,
1138 0, 0, 0, 0, 0, 19, 0, 20, 0, 0,
1139 0, 0, 0, 0, 0, 0, 0, 300, 0, 121,
1140 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
1141 211, 73, 74, 0, 77, 75, 76, 78, 0, 0,
1142 79, 0, 80, 122, 19, 0, 20, 0, 0, 121,
1143 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
1144 72, 73, 74, 0, 77, 75, 76, 78, 0, 0,
1145 79, 0, 80, 352, 19, 0, 20, 0, 0, 0,
1146 0, 0, 0, 0, 0, 0, 361, 0, 0, 0,
1147 0, 0, 77, 0, 0, 78, 0, 0, 79, 0,
1148 80, 121, 62, 63, 64, 65, 66, 67, 68, 69,
1149 70, 71, 72, 73, 74, 0, 0, 75, 76, 0,
1150 0, 0, 0, 0, 0, 0, 19, 0, 20, 0,
1151 0, 77, 0, 0, 78, 0, 349, 79, 404, 80,
1152 0, 61, 62, 63, 64, 65, 66, 67, 68, 69,
1153 70, 71, 72, 73, 74, 0, 0, 75, 76, 0,
1154 0, 77, 0, 0, 78, 0, 19, 79, 20, 80,
1155 128, 62, 63, 64, 65, 66, 67, 68, 69, 70,
1156 71, 72, 73, 74, 0, 0, 75, 76, 0, 0,
1157 0, 0, 0, 0, 0, 19, 0, 20, 121, 62,
1158 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
1159 73, 74, 0, 77, 75, 76, 78, 0, 0, 79,
1160 0, 80, 0, 19, 0, 20, 0, 121, 201, 202,
1161 203, 204, 205, 206, 207, 208, 209, 210, 211, 73,
1162 74, 0, 0, 75, 76, 0, 0, 0, 0, 0,
1163 0, 0, 19, 77, 20, 0, 78, 0, 0, 79,
1164 0, 80, 0, 0, 0, 0, 0, 0, 0, 0,
1165 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1166 0, 0, 77, 0, 0, 78, 0, 0, 79, 0,
1167 80, 75, 76, 0, 287, 288, 289, 0, 0, 0,
1168 19, 0, 20, 0, 0, 0, 0, 0, 0, 0,
1169 77, 0, 0, 78, 0, 0, 79, 0, 80, 0,
1170 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1171 0, 0, 0, 0, 0, 0, 0, 0, 0, 77,
1172 0, 0, 78, 0, 0, 79, 0, 80, 0, 0,
1173 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
1174 159, 160, 161, 162, 163, 164, 165, 166, 0, 0,
1175 0, 0, 0, 234, 0, 235, 173, 174, 175, 176,
1176 0, 236, 237, 238, 239, 0, 0, 0, 0, 0,
1177 290, 0, 0, 291, 0, 292, 0, 0, 293, 225,
1178 226, 75, 76, 227, 228, 229, 230, 231, 232, 0,
1179 19, 0, 20, 0, 0, 0, 0, 0, 0, 0,
1180 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1181 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1182 0, 0, 0, 233, 0, 0, 225, 226, 0, 0,
1183 227, 228, 229, 230, 231, 232, 0, 0, 0, 0,
1184 149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
1185 159, 160, 161, 162, 163, 164, 165, 166, 0, 0,
1186 0, 0, 0, 234, 0, 235, 173, 174, 175, 176,
1187 233, 236, 237, 238, 239, 0, 0, 0, 0, 0,
1188 0, 0, 0, 240, 0, 0, 0, 149, 150, 151,
1189 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
1190 162, 163, 164, 165, 166, 0, 144, 0, 0, 0,
1191 234, 0, 235, 173, 174, 175, 176, 145, 236, 237,
1192 238, 239, 0, 0, 0, 0, 0, 146, 147, 0,
1193 240, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1194 0, 0, 0, 148, 0, 0, 149, 150, 151, 152,
1195 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
1196 163, 164, 165, 166, 167, 168, 169, 0, 0, 170,
1197 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
1201 static const short int yycheck[] =
1203 38, 98, 98, 3, 256, 199, 200, 51, 10, 10,
1204 29, 80, 117, 51, 33, 32, 148, 478, 27, 114,
1205 0, 4, 216, 28, 61, 30, 129, 122, 131, 132,
1206 491, 113, 15, 42, 43, 44, 45, 46, 47, 48,
1207 143, 50, 29, 43, 5, 6, 7, 8, 9, 10,
1208 11, 12, 452, 37, 186, 57, 57, 126, 96, 5,
1209 6, 7, 8, 9, 10, 11, 12, 72, 73, 74,
1210 61, 76, 77, 57, 114, 114, 114, 115, 116, 479,
1211 120, 120, 82, 3, 4, 5, 6, 7, 8, 9,
1212 10, 11, 12, 13, 14, 15, 16, 120, 113, 19,
1213 20, 114, 125, 96, 114, 124, 123, 145, 28, 30,
1214 30, 124, 215, 116, 124, 114, 52, 53, 54, 45,
1215 40, 47, 125, 122, 122, 131, 132, 125, 18, 167,
1216 168, 169, 170, 171, 172, 71, 28, 143, 30, 177,
1217 178, 179, 180, 181, 182, 183, 184, 185, 217, 218,
1218 219, 113, 145, 113, 348, 258, 290, 291, 292, 120,
1219 53, 54, 55, 113, 267, 268, 269, 35, 36, 55,
1220 56, 423, 113, 425, 120, 118, 169, 99, 100, 172,
1221 25, 26, 116, 221, 177, 178, 179, 180, 181, 17,
1222 18, 18, 185, 17, 18, 115, 17, 18, 118, 17,
1223 18, 121, 18, 123, 309, 310, 311, 312, 313, 314,
1224 254, 18, 317, 318, 319, 320, 254, 17, 18, 116,
1225 323, 30, 18, 0, 30, 30, 329, 271, 119, 116,
1226 119, 114, 18, 271, 272, 273, 305, 59, 341, 342,
1227 5, 6, 7, 8, 9, 10, 11, 12, 18, 18,
1228 18, 18, 258, 114, 31, 21, 116, 34, 21, 21,
1229 117, 267, 268, 269, 369, 42, 43, 44, 45, 46,
1230 47, 48, 375, 376, 63, 378, 116, 380, 116, 116,
1231 273, 384, 116, 116, 116, 62, 116, 116, 391, 392,
1232 393, 116, 118, 331, 332, 333, 334, 335, 336, 114,
1233 114, 301, 340, 114, 114, 410, 411, 412, 413, 39,
1234 114, 416, 417, 418, 419, 114, 114, 323, 30, 114,
1235 114, 359, 114, 329, 114, 428, 64, 65, 66, 67,
1236 68, 69, 70, 30, 437, 341, 342, 117, 331, 114,
1237 333, 334, 335, 381, 30, 15, 15, 340, 30, 37,
1238 114, 18, 39, 114, 18, 452, 452, 460, 118, 397,
1239 114, 114, 467, 114, 469, 470, 114, 114, 114, 375,
1240 376, 114, 378, 476, 380, 114, 414, 114, 384, 114,
1241 114, 114, 479, 479, 422, 391, 392, 393, 116, 114,
1242 114, 114, 430, 431, 432, 114, 499, 500, 436, 116,
1243 57, 504, 30, 117, 507, 114, 114, 118, 114, 27,
1244 28, 114, 30, 18, 114, 117, 34, 35, 36, 114,
1245 458, 114, 428, 117, 42, 43, 44, 45, 46, 47,
1246 48, 437, 50, 51, 117, 15, 117, 430, 431, 432,
1247 58, 117, 117, 117, 62, 57, 117, 120, 39, 114,
1248 15, 117, 120, 15, 460, 117, 117, 15, 114, 76,
1249 15, 101, 101, 101, 101, 458, 43, 24, 126, 50,
1250 476, 215, 3, 4, 5, 6, 7, 8, 9, 10,
1251 11, 12, 13, 14, 15, 16, 360, 359, 19, 20,
1252 29, 3, 41, 499, 500, -1, 381, 28, 504, 30,
1253 363, 507, 3, 4, 5, 6, 7, 8, 9, 10,
1254 11, 12, 13, 14, 15, 16, -1, 436, 19, 20,
1255 -1, -1, -1, -1, -1, -1, -1, 28, -1, 30,
1256 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1257 13, 14, 15, 16, -1, -1, 19, 20, -1, -1,
1258 -1, -1, -1, -1, -1, 28, -1, 30, -1, -1,
1259 -1, -1, -1, -1, -1, -1, -1, 40, -1, 3,
1260 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1261 14, 15, 16, -1, 115, 19, 20, 118, -1, -1,
1262 121, -1, 123, 124, 28, -1, 30, -1, -1, 3,
1263 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
1264 14, 15, 16, -1, 115, 19, 20, 118, -1, -1,
1265 121, -1, 123, 124, 28, -1, 30, -1, -1, -1,
1266 -1, -1, -1, -1, -1, -1, 40, -1, -1, -1,
1267 -1, -1, 115, -1, -1, 118, -1, -1, 121, -1,
1268 123, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1269 12, 13, 14, 15, 16, -1, -1, 19, 20, -1,
1270 -1, -1, -1, -1, -1, -1, 28, -1, 30, -1,
1271 -1, 115, -1, -1, 118, -1, 120, 121, 40, 123,
1272 -1, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1273 12, 13, 14, 15, 16, -1, -1, 19, 20, -1,
1274 -1, 115, -1, -1, 118, -1, 28, 121, 30, 123,
1275 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1276 13, 14, 15, 16, -1, -1, 19, 20, -1, -1,
1277 -1, -1, -1, -1, -1, 28, -1, 30, 3, 4,
1278 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1279 15, 16, -1, 115, 19, 20, 118, -1, -1, 121,
1280 -1, 123, -1, 28, -1, 30, -1, 3, 4, 5,
1281 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1282 16, -1, -1, 19, 20, -1, -1, -1, -1, -1,
1283 -1, -1, 28, 115, 30, -1, 118, -1, -1, 121,
1284 -1, 123, -1, -1, -1, -1, -1, -1, -1, -1,
1285 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1286 -1, -1, 115, -1, -1, 118, -1, -1, 121, -1,
1287 123, 19, 20, -1, 22, 23, 24, -1, -1, -1,
1288 28, -1, 30, -1, -1, -1, -1, -1, -1, -1,
1289 115, -1, -1, 118, -1, -1, 121, -1, 123, -1,
1290 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1291 -1, -1, -1, -1, -1, -1, -1, -1, -1, 115,
1292 -1, -1, 118, -1, -1, 121, -1, 123, -1, -1,
1293 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
1294 88, 89, 90, 91, 92, 93, 94, 95, -1, -1,
1295 -1, -1, -1, 101, -1, 103, 104, 105, 106, 107,
1296 -1, 109, 110, 111, 112, -1, -1, -1, -1, -1,
1297 118, -1, -1, 121, -1, 123, -1, -1, 126, 17,
1298 18, 19, 20, 21, 22, 23, 24, 25, 26, -1,
1299 28, -1, 30, -1, -1, -1, -1, -1, -1, -1,
1300 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1301 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1302 -1, -1, -1, 61, -1, -1, 17, 18, -1, -1,
1303 21, 22, 23, 24, 25, 26, -1, -1, -1, -1,
1304 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
1305 88, 89, 90, 91, 92, 93, 94, 95, -1, -1,
1306 -1, -1, -1, 101, -1, 103, 104, 105, 106, 107,
1307 61, 109, 110, 111, 112, -1, -1, -1, -1, -1,
1308 -1, -1, -1, 121, -1, -1, -1, 78, 79, 80,
1309 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
1310 91, 92, 93, 94, 95, -1, 38, -1, -1, -1,
1311 101, -1, 103, 104, 105, 106, 107, 49, 109, 110,
1312 111, 112, -1, -1, -1, -1, -1, 59, 60, -1,
1313 121, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1314 -1, -1, -1, 75, -1, -1, 78, 79, 80, 81,
1315 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
1316 92, 93, 94, 95, 96, 97, 98, -1, -1, 101,
1317 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1321 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1322 symbol of state STATE-NUM. */
1323 static const unsigned char yystos[] =
1325 0, 158, 159, 160, 0, 31, 34, 42, 43, 44,
1326 45, 46, 47, 48, 62, 139, 173, 175, 177, 28,
1327 30, 51, 58, 62, 138, 166, 177, 45, 47, 176,
1328 61, 64, 65, 66, 67, 68, 69, 70, 140, 171,
1329 29, 183, 184, 185, 52, 53, 54, 71, 163, 113,
1330 61, 27, 45, 47, 50, 139, 113, 171, 30, 161,
1331 18, 3, 4, 5, 6, 7, 8, 9, 10, 11,
1332 12, 13, 14, 15, 16, 19, 20, 115, 118, 121,
1333 123, 128, 147, 148, 149, 150, 151, 166, 180, 32,
1334 123, 172, 33, 124, 174, 184, 72, 73, 74, 76,
1335 77, 138, 186, 188, 113, 113, 113, 113, 118, 164,
1336 161, 147, 35, 36, 157, 157, 157, 157, 18, 18,
1337 18, 3, 124, 151, 152, 166, 116, 125, 3, 149,
1338 182, 4, 15, 5, 6, 7, 8, 9, 10, 11,
1339 12, 134, 135, 136, 38, 49, 59, 60, 75, 78,
1340 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
1341 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
1342 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
1343 111, 112, 130, 131, 132, 133, 192, 193, 195, 196,
1344 30, 55, 56, 162, 18, 30, 30, 165, 149, 149,
1345 149, 4, 5, 6, 7, 8, 9, 10, 11, 12,
1346 13, 14, 134, 135, 137, 149, 154, 119, 119, 114,
1347 124, 116, 40, 152, 153, 17, 18, 21, 22, 23,
1348 24, 25, 26, 61, 101, 103, 109, 110, 111, 112,
1349 121, 130, 131, 132, 133, 155, 179, 180, 181, 181,
1350 181, 181, 182, 59, 140, 149, 149, 182, 149, 149,
1351 189, 182, 182, 182, 182, 182, 182, 149, 149, 149,
1352 182, 140, 99, 100, 114, 120, 114, 145, 145, 145,
1353 25, 26, 17, 18, 129, 18, 21, 22, 23, 24,
1354 118, 121, 123, 126, 155, 180, 145, 151, 151, 151,
1355 40, 149, 168, 169, 170, 114, 117, 63, 178, 116,
1356 116, 116, 116, 116, 116, 154, 156, 116, 116, 116,
1357 116, 114, 114, 147, 114, 142, 114, 142, 181, 118,
1358 114, 114, 114, 114, 114, 114, 39, 181, 181, 181,
1359 114, 147, 149, 182, 30, 37, 57, 143, 146, 120,
1360 156, 156, 124, 156, 30, 120, 122, 166, 167, 114,
1361 117, 40, 30, 154, 154, 154, 154, 154, 154, 114,
1362 122, 154, 154, 154, 154, 15, 15, 181, 10, 57,
1363 10, 114, 194, 181, 118, 182, 149, 182, 182, 182,
1364 149, 114, 114, 114, 182, 181, 181, 114, 30, 18,
1365 145, 120, 122, 124, 40, 168, 143, 144, 114, 194,
1366 114, 114, 114, 114, 39, 154, 114, 114, 114, 114,
1367 181, 181, 116, 181, 18, 181, 182, 190, 114, 181,
1368 114, 114, 114, 181, 181, 181, 116, 149, 57, 141,
1369 30, 117, 154, 154, 154, 154, 149, 154, 154, 154,
1370 154, 114, 118, 190, 191, 114, 142, 142, 114, 181,
1371 114, 182, 182, 182, 191, 181, 18, 114, 117, 114,
1372 114, 117, 117, 117, 117, 117, 15, 120, 136, 187,
1373 117, 182, 120, 181, 117, 154, 154, 154, 181, 179,
1374 120, 136, 39, 120, 117, 117, 117, 114, 179, 15,
1375 15, 114, 181, 181, 15, 76, 181, 15, 181
1378 #define yyerrok (yyerrstatus = 0)
1379 #define yyclearin (yychar = YYEMPTY)
1380 #define YYEMPTY (-2)
1383 #define YYACCEPT goto yyacceptlab
1384 #define YYABORT goto yyabortlab
1385 #define YYERROR goto yyerrorlab
1388 /* Like YYERROR except do call yyerror. This remains here temporarily
1389 to ease the transition to the new meaning of YYERROR, for GCC.
1390 Once GCC version 2 has supplanted version 1, this can go. */
1392 #define YYFAIL goto yyerrlab
1394 #define YYRECOVERING() (!!yyerrstatus)
1396 #define YYBACKUP(Token, Value) \
1398 if (yychar == YYEMPTY && yylen == 1) \
1402 yytoken = YYTRANSLATE (yychar); \
1408 yyerror (YY_("syntax error: cannot back up")); \
1415 #define YYERRCODE 256
1418 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1419 If N is 0, then set CURRENT to the empty location which ends
1420 the previous symbol: RHS[0] (always defined). */
1422 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1423 #ifndef YYLLOC_DEFAULT
1424 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1428 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1429 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1430 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1431 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1435 (Current).first_line = (Current).last_line = \
1436 YYRHSLOC (Rhs, 0).last_line; \
1437 (Current).first_column = (Current).last_column = \
1438 YYRHSLOC (Rhs, 0).last_column; \
1444 /* YY_LOCATION_PRINT -- Print the location on the stream.
1445 This macro was not mandated originally: define only if we know
1446 we won't break user code: when these are the locations we know. */
1448 #ifndef YY_LOCATION_PRINT
1449 # if YYLTYPE_IS_TRIVIAL
1450 # define YY_LOCATION_PRINT(File, Loc) \
1451 fprintf (File, "%d.%d-%d.%d", \
1452 (Loc).first_line, (Loc).first_column, \
1453 (Loc).last_line, (Loc).last_column)
1455 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1460 /* YYLEX -- calling `yylex' with the right arguments. */
1463 # define YYLEX yylex (YYLEX_PARAM)
1465 # define YYLEX yylex ()
1468 /* Enable debugging if requested. */
1472 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1473 # define YYFPRINTF fprintf
1476 # define YYDPRINTF(Args) \
1482 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1486 YYFPRINTF (stderr, "%s ", Title); \
1487 yysymprint (stderr, \
1489 YYFPRINTF (stderr, "\n"); \
1493 /*------------------------------------------------------------------.
1494 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1496 `------------------------------------------------------------------*/
1498 #if defined (__STDC__) || defined (__cplusplus)
1500 yy_stack_print (short int *bottom, short int *top)
1503 yy_stack_print (bottom, top)
1508 YYFPRINTF (stderr, "Stack now");
1509 for (/* Nothing. */; bottom <= top; ++bottom)
1510 YYFPRINTF (stderr, " %d", *bottom);
1511 YYFPRINTF (stderr, "\n");
1514 # define YY_STACK_PRINT(Bottom, Top) \
1517 yy_stack_print ((Bottom), (Top)); \
1521 /*------------------------------------------------.
1522 | Report that the YYRULE is going to be reduced. |
1523 `------------------------------------------------*/
1525 #if defined (__STDC__) || defined (__cplusplus)
1527 yy_reduce_print (int yyrule)
1530 yy_reduce_print (yyrule)
1535 unsigned long int yylno = yyrline[yyrule];
1536 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
1538 /* Print the symbols being reduced, and their result. */
1539 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
1540 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1541 YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
1544 # define YY_REDUCE_PRINT(Rule) \
1547 yy_reduce_print (Rule); \
1550 /* Nonzero means print parse trace. It is left uninitialized so that
1551 multiple parsers can coexist. */
1553 #else /* !YYDEBUG */
1554 # define YYDPRINTF(Args)
1555 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1556 # define YY_STACK_PRINT(Bottom, Top)
1557 # define YY_REDUCE_PRINT(Rule)
1558 #endif /* !YYDEBUG */
1561 /* YYINITDEPTH -- initial size of the parser's stacks. */
1563 # define YYINITDEPTH 200
1566 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1567 if the built-in stack extension method is used).
1569 Do not make this value too large; the results are undefined if
1570 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1571 evaluated with infinite-precision integer arithmetic. */
1574 # define YYMAXDEPTH 10000
1582 # if defined (__GLIBC__) && defined (_STRING_H)
1583 # define yystrlen strlen
1585 /* Return the length of YYSTR. */
1587 # if defined (__STDC__) || defined (__cplusplus)
1588 yystrlen (const char *yystr)
1594 const char *yys = yystr;
1596 while (*yys++ != '\0')
1599 return yys - yystr - 1;
1605 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1606 # define yystpcpy stpcpy
1608 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1611 # if defined (__STDC__) || defined (__cplusplus)
1612 yystpcpy (char *yydest, const char *yysrc)
1614 yystpcpy (yydest, yysrc)
1620 const char *yys = yysrc;
1622 while ((*yyd++ = *yys++) != '\0')
1631 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1632 quotes and backslashes, so that it's suitable for yyerror. The
1633 heuristic is that double-quoting is unnecessary unless the string
1634 contains an apostrophe, a comma, or backslash (other than
1635 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1636 null, do not copy; instead, return the length of what the result
1639 yytnamerr (char *yyres, const char *yystr)
1644 char const *yyp = yystr;
1651 goto do_not_strip_quotes;
1655 goto do_not_strip_quotes;
1668 do_not_strip_quotes: ;
1672 return yystrlen (yystr);
1674 return yystpcpy (yyres, yystr) - yyres;
1678 #endif /* YYERROR_VERBOSE */
1683 /*--------------------------------.
1684 | Print this symbol on YYOUTPUT. |
1685 `--------------------------------*/
1687 #if defined (__STDC__) || defined (__cplusplus)
1689 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
1692 yysymprint (yyoutput, yytype, yyvaluep)
1698 /* Pacify ``unused variable'' warnings. */
1701 if (yytype < YYNTOKENS)
1702 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1704 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1708 if (yytype < YYNTOKENS)
1709 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1716 YYFPRINTF (yyoutput, ")");
1719 #endif /* ! YYDEBUG */
1720 /*-----------------------------------------------.
1721 | Release the memory associated to this symbol. |
1722 `-----------------------------------------------*/
1724 #if defined (__STDC__) || defined (__cplusplus)
1726 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1729 yydestruct (yymsg, yytype, yyvaluep)
1735 /* Pacify ``unused variable'' warnings. */
1740 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1751 /* Prevent warnings from -Wmissing-prototypes. */
1753 #ifdef YYPARSE_PARAM
1754 # if defined (__STDC__) || defined (__cplusplus)
1755 int yyparse (void *YYPARSE_PARAM);
1759 #else /* ! YYPARSE_PARAM */
1760 #if defined (__STDC__) || defined (__cplusplus)
1765 #endif /* ! YYPARSE_PARAM */
1769 /* The look-ahead symbol. */
1772 /* The semantic value of the look-ahead symbol. */
1775 /* Number of syntax errors so far. */
1784 #ifdef YYPARSE_PARAM
1785 # if defined (__STDC__) || defined (__cplusplus)
1786 int yyparse (void *YYPARSE_PARAM)
1788 int yyparse (YYPARSE_PARAM)
1789 void *YYPARSE_PARAM;
1791 #else /* ! YYPARSE_PARAM */
1792 #if defined (__STDC__) || defined (__cplusplus)
1806 /* Number of tokens to shift before error messages enabled. */
1808 /* Look-ahead token as an internal (translated) token number. */
1811 /* Three stacks and their tools:
1812 `yyss': related to states,
1813 `yyvs': related to semantic values,
1814 `yyls': related to locations.
1816 Refer to the stacks thru separate pointers, to allow yyoverflow
1817 to reallocate them elsewhere. */
1819 /* The state stack. */
1820 short int yyssa[YYINITDEPTH];
1821 short int *yyss = yyssa;
1824 /* The semantic value stack. */
1825 YYSTYPE yyvsa[YYINITDEPTH];
1826 YYSTYPE *yyvs = yyvsa;
1831 #define YYPOPSTACK (yyvsp--, yyssp--)
1833 YYSIZE_T yystacksize = YYINITDEPTH;
1835 /* The variables used to return semantic value and location from the
1840 /* When reducing, the number of symbols on the RHS of the reduced
1844 YYDPRINTF ((stderr, "Starting parse\n"));
1849 yychar = YYEMPTY; /* Cause a token to be read. */
1851 /* Initialize stack pointers.
1852 Waste one element of value and location stack
1853 so that they stay on the same level as the state stack.
1854 The wasted elements are never initialized. */
1861 /*------------------------------------------------------------.
1862 | yynewstate -- Push a new state, which is found in yystate. |
1863 `------------------------------------------------------------*/
1865 /* In all cases, when you get here, the value and location stacks
1866 have just been pushed. so pushing a state here evens the stacks.
1873 if (yyss + yystacksize - 1 <= yyssp)
1875 /* Get the current used size of the three stacks, in elements. */
1876 YYSIZE_T yysize = yyssp - yyss + 1;
1880 /* Give user a chance to reallocate the stack. Use copies of
1881 these so that the &'s don't force the real ones into
1883 YYSTYPE *yyvs1 = yyvs;
1884 short int *yyss1 = yyss;
1887 /* Each stack pointer address is followed by the size of the
1888 data in use in that stack, in bytes. This used to be a
1889 conditional around just the two extra args, but that might
1890 be undefined if yyoverflow is a macro. */
1891 yyoverflow (YY_("memory exhausted"),
1892 &yyss1, yysize * sizeof (*yyssp),
1893 &yyvs1, yysize * sizeof (*yyvsp),
1900 #else /* no yyoverflow */
1901 # ifndef YYSTACK_RELOCATE
1902 goto yyexhaustedlab;
1904 /* Extend the stack our own way. */
1905 if (YYMAXDEPTH <= yystacksize)
1906 goto yyexhaustedlab;
1908 if (YYMAXDEPTH < yystacksize)
1909 yystacksize = YYMAXDEPTH;
1912 short int *yyss1 = yyss;
1913 union yyalloc *yyptr =
1914 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1916 goto yyexhaustedlab;
1917 YYSTACK_RELOCATE (yyss);
1918 YYSTACK_RELOCATE (yyvs);
1920 # undef YYSTACK_RELOCATE
1922 YYSTACK_FREE (yyss1);
1925 #endif /* no yyoverflow */
1927 yyssp = yyss + yysize - 1;
1928 yyvsp = yyvs + yysize - 1;
1931 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1932 (unsigned long int) yystacksize));
1934 if (yyss + yystacksize - 1 <= yyssp)
1938 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1947 /* Do appropriate processing given the current state. */
1948 /* Read a look-ahead token if we need one and don't already have one. */
1951 /* First try to decide what to do without reference to look-ahead token. */
1953 yyn = yypact[yystate];
1954 if (yyn == YYPACT_NINF)
1957 /* Not known => get a look-ahead token if don't already have one. */
1959 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1960 if (yychar == YYEMPTY)
1962 YYDPRINTF ((stderr, "Reading a token: "));
1966 if (yychar <= YYEOF)
1968 yychar = yytoken = YYEOF;
1969 YYDPRINTF ((stderr, "Now at end of input.\n"));
1973 yytoken = YYTRANSLATE (yychar);
1974 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1977 /* If the proper action on seeing token YYTOKEN is to reduce or to
1978 detect an error, take that action. */
1980 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1985 if (yyn == 0 || yyn == YYTABLE_NINF)
1994 /* Shift the look-ahead token. */
1995 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1997 /* Discard the token being shifted unless it is eof. */
1998 if (yychar != YYEOF)
2004 /* Count tokens shifted since error; after three, turn off error
2013 /*-----------------------------------------------------------.
2014 | yydefault -- do the default action for the current state. |
2015 `-----------------------------------------------------------*/
2017 yyn = yydefact[yystate];
2023 /*-----------------------------.
2024 | yyreduce -- Do a reduction. |
2025 `-----------------------------*/
2027 /* yyn is the number of a rule to reduce with. */
2030 /* If YYLEN is nonzero, implement the default value of the action:
2033 Otherwise, the following line sets YYVAL to garbage.
2034 This behavior is undocumented and Bison
2035 users should not rely upon it. Assigning to YYVAL
2036 unconditionally makes the parser a bit smaller, and it avoids a
2037 GCC warning that YYVAL may be used uninitialized. */
2038 yyval = yyvsp[1-yylen];
2041 YY_REDUCE_PRINT (yyn);
2045 #line 206 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2047 *(yyvsp[-1].String) += " = ";
2048 (yyval.String) = (yyvsp[-1].String);
2053 #line 210 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2055 (yyval.String) = new std::string("");
2060 #line 217 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2061 { (yyval.String) = new std::string(""); ;}
2065 #line 222 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2067 *(yyvsp[-1].String) += *(yyvsp[0].String);
2068 delete (yyvsp[0].String);
2069 (yyval.String) = (yyvsp[-1].String);
2074 #line 227 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2075 { (yyval.String) = new std::string(""); ;}
2079 #line 232 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2080 { (yyval.String) = new std::string(); ;}
2084 #line 233 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2085 { *(yyvsp[-1].String) += " " + *(yyvsp[0].String); delete (yyvsp[0].String); (yyval.String) = (yyvsp[-1].String); ;}
2089 #line 236 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2090 { (yyval.String) = new std::string(); ;}
2094 #line 237 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2096 (yyvsp[-1].String)->insert(0, ", ");
2097 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2098 delete (yyvsp[0].String);
2099 (yyval.String) = (yyvsp[-1].String);
2104 #line 245 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2106 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2107 delete (yyvsp[0].String);
2108 (yyval.String) = (yyvsp[-1].String);
2113 #line 251 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2114 { (yyval.String) = new std::string(); ;}
2118 #line 255 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2119 { (yyval.String) = new std::string(); ;}
2123 #line 256 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2125 (yyvsp[-1].String)->insert(0, ", ");
2126 if (!(yyvsp[0].String)->empty())
2127 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2128 delete (yyvsp[0].String);
2129 (yyval.String) = (yyvsp[-1].String);
2134 #line 266 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2136 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
2137 delete (yyvsp[0].String);
2138 (yyval.String) = (yyvsp[-1].String);
2143 #line 288 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2145 (yyval.Type).newTy = (yyvsp[0].String); (yyval.Type).oldTy = OpaqueTy;
2150 #line 294 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2151 { // Type UpReference
2152 (yyvsp[0].String)->insert(0, "\\");
2153 (yyval.Type).newTy = (yyvsp[0].String);
2154 (yyval.Type).oldTy = OpaqueTy;
2159 #line 299 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2160 { // Function derived type?
2161 *(yyvsp[-3].Type).newTy += "( " + *(yyvsp[-1].String) + " )";
2162 delete (yyvsp[-1].String);
2163 (yyval.Type).newTy = (yyvsp[-3].Type).newTy;
2164 (yyval.Type).oldTy = FunctionTy;
2169 #line 305 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2170 { // Sized array type?
2171 (yyvsp[-3].String)->insert(0,"[ ");
2172 *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " ]";
2173 delete (yyvsp[-1].Type).newTy;
2174 (yyval.Type).newTy = (yyvsp[-3].String);
2175 (yyval.Type).oldTy = ArrayTy;
2180 #line 312 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2181 { // Packed array type?
2182 (yyvsp[-3].String)->insert(0,"< ");
2183 *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " >";
2184 delete (yyvsp[-1].Type).newTy;
2185 (yyval.Type).newTy = (yyvsp[-3].String);
2186 (yyval.Type).oldTy = PackedTy;
2191 #line 319 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2192 { // Structure type?
2193 (yyvsp[-1].String)->insert(0, "{ ");
2194 *(yyvsp[-1].String) += " }";
2195 (yyval.Type).newTy = (yyvsp[-1].String);
2196 (yyval.Type).oldTy = StructTy;
2201 #line 325 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2202 { // Empty structure type?
2203 (yyval.Type).newTy = new std::string("{ }");
2204 (yyval.Type).oldTy = StructTy;
2209 #line 329 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2211 *(yyvsp[-1].Type).newTy += '*';
2212 (yyvsp[-1].Type).oldTy = PointerTy;
2213 (yyval.Type) = (yyvsp[-1].Type);
2218 #line 339 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2220 (yyval.String) = (yyvsp[0].Type).newTy;
2225 #line 342 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2227 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Type).newTy;
2228 delete (yyvsp[0].Type).newTy;
2229 (yyval.String) = (yyvsp[-2].String);
2234 #line 351 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2236 *(yyvsp[-2].String) += ", ...";
2237 delete (yyvsp[0].String);
2238 (yyval.String) = (yyvsp[-2].String);
2243 #line 356 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2245 (yyval.String) = (yyvsp[0].String);
2250 #line 359 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2252 (yyval.String) = new std::string();
2257 #line 369 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2258 { // Nonempty unsized arr
2259 (yyval.Const).type = (yyvsp[-3].Type);
2260 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2261 *(yyval.Const).cnst += " [ " + *(yyvsp[-1].String) + " ]";
2262 delete (yyvsp[-1].String);
2267 #line 375 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2269 (yyval.Const).type = (yyvsp[-2].Type);
2270 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2271 *(yyval.Const).cnst += "[ ]";
2276 #line 380 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2278 (yyval.Const).type = (yyvsp[-2].Type);
2279 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2280 *(yyval.Const).cnst += " c" + *(yyvsp[0].String);
2281 delete (yyvsp[0].String);
2286 #line 386 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2287 { // Nonempty unsized arr
2288 (yyval.Const).type = (yyvsp[-3].Type);
2289 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2290 *(yyval.Const).cnst += " < " + *(yyvsp[-1].String) + " >";
2291 delete (yyvsp[-1].String);
2296 #line 392 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2298 (yyval.Const).type = (yyvsp[-3].Type);
2299 (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy);
2300 *(yyval.Const).cnst += " { " + *(yyvsp[-1].String) + " }";
2301 delete (yyvsp[-1].String);
2306 #line 398 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2308 (yyval.Const).type = (yyvsp[-2].Type);
2309 (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy);
2310 *(yyval.Const).cnst += " [ ]";
2315 #line 403 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2317 (yyval.Const).type = (yyvsp[-1].Type);
2318 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2319 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2320 delete (yyvsp[0].String);
2325 #line 409 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2327 (yyval.Const).type = (yyvsp[-1].Type);
2328 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2329 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2330 delete (yyvsp[0].String);
2335 #line 415 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2337 (yyval.Const).type = (yyvsp[-1].Type);
2338 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2339 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2340 delete (yyvsp[0].String);
2345 #line 421 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2347 (yyval.Const).type = (yyvsp[-1].Type);
2348 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2349 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2350 delete (yyvsp[0].String);
2355 #line 427 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2357 (yyval.Const).type = (yyvsp[-1].Type);
2358 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2359 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2360 delete (yyvsp[0].String);
2365 #line 433 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2366 { // integral constants
2367 (yyval.Const).type = (yyvsp[-1].Type);
2368 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2369 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2370 delete (yyvsp[0].String);
2375 #line 439 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2376 { // integral constants
2377 (yyval.Const).type = (yyvsp[-1].Type);
2378 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2379 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2380 delete (yyvsp[0].String);
2385 #line 445 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2386 { // Boolean constants
2387 (yyval.Const).type = (yyvsp[-1].Type);
2388 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2389 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2390 delete (yyvsp[0].String);
2395 #line 451 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2396 { // Boolean constants
2397 (yyval.Const).type = (yyvsp[-1].Type);
2398 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2399 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2400 delete (yyvsp[0].String);
2405 #line 457 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2406 { // Float & Double constants
2407 (yyval.Const).type = (yyvsp[-1].Type);
2408 (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy);
2409 *(yyval.Const).cnst += " " + *(yyvsp[0].String);
2410 delete (yyvsp[0].String);
2415 #line 465 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2417 // We must infer the cast opcode from the types of the operands.
2418 const char *opcode = getCastOpcode((yyvsp[-3].Const).type, (yyvsp[-1].Type));
2419 (yyval.String) = new std::string(opcode);
2420 *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + " " + *(yyvsp[-2].String) + " " + *(yyvsp[-1].Type).newTy + ")";
2421 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
2426 #line 472 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2428 *(yyvsp[-4].String) += "(" + *(yyvsp[-2].Const).cnst + " " + *(yyvsp[-1].String) + ")";
2429 (yyval.String) = (yyvsp[-4].String);
2430 (yyvsp[-2].Const).destroy();
2431 delete (yyvsp[-1].String);
2436 #line 478 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2438 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2439 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2440 (yyval.String) = (yyvsp[-7].String);
2445 #line 483 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2447 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2448 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2449 (yyval.String) = (yyvsp[-5].String);
2454 #line 488 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2456 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2457 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2458 (yyval.String) = (yyvsp[-5].String);
2463 #line 493 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2465 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2466 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2467 (yyval.String) = (yyvsp[-5].String);
2472 #line 498 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2474 const char* shiftop = (yyvsp[-5].String)->c_str();
2475 if (*(yyvsp[-5].String) == "shr")
2476 shiftop = ((yyvsp[-3].Const).type.isUnsigned()) ? "lshr" : "ashr";
2477 (yyval.String) = new std::string(shiftop);
2478 *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2479 delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2484 #line 506 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2486 *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2487 (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2488 (yyval.String) = (yyvsp[-5].String);
2493 #line 511 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2495 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2496 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2497 (yyval.String) = (yyvsp[-7].String);
2502 #line 516 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2504 *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")";
2505 (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy();
2506 (yyval.String) = (yyvsp[-7].String);
2511 #line 526 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2513 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Const).cnst;
2514 (yyvsp[0].Const).destroy();
2515 (yyval.String) = (yyvsp[-2].String);
2520 #line 531 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2521 { (yyval.String) = new std::string(*(yyvsp[0].Const).cnst); (yyvsp[0].Const).destroy(); ;}
2525 #line 546 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2531 #line 551 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2538 #line 554 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2540 *O << *(yyvsp[0].String) << "\n";
2541 delete (yyvsp[0].String);
2547 #line 559 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2549 *O << "module asm " << " " << *(yyvsp[0].String) << "\n";
2555 #line 563 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2557 *O << "implementation\n";
2563 #line 570 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2565 *O << *(yyvsp[-2].String) << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Type).newTy << "\n";
2566 // delete $2; delete $3; $4.destroy();
2572 #line 575 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2573 { // Function prototypes can be in const pool
2574 *O << *(yyvsp[0].String) << "\n";
2575 delete (yyvsp[0].String);
2581 #line 580 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2582 { // Asm blocks can be in the const pool
2583 *O << *(yyvsp[-2].String) << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
2584 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
2590 #line 585 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2592 *O << *(yyvsp[-4].String) << " " << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Const).cnst << " "
2593 << *(yyvsp[0].String) << "\n";
2594 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Const).destroy(); delete (yyvsp[0].String);
2600 #line 591 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2602 *O << *(yyvsp[-4].String) << " " << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy
2603 << " " << *(yyvsp[0].String) << "\n";
2604 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
2610 #line 597 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2612 *O << *(yyvsp[-4].String) << " " << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy
2613 << " " << *(yyvsp[0].String) << "\n";
2614 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
2620 #line 603 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2622 *O << *(yyvsp[-4].String) << " " << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy
2623 << " " << *(yyvsp[0].String) << "\n";
2624 delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
2630 #line 609 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2632 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
2633 delete (yyvsp[-1].String); delete (yyvsp[0].String);
2639 #line 614 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2641 *O << *(yyvsp[-2].String) << " = " << *(yyvsp[0].String) << "\n";
2642 delete (yyvsp[-2].String); delete (yyvsp[0].String);
2648 #line 619 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2655 #line 629 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2657 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
2658 delete (yyvsp[0].String);
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 if (*(yyvsp[0].String) == "64")
2669 delete (yyvsp[0].String);
2670 (yyval.String) = (yyvsp[-2].String);
2675 #line 641 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2677 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
2678 delete (yyvsp[0].String);
2679 (yyval.String) = (yyvsp[-2].String);
2684 #line 646 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2686 *(yyvsp[-2].String) += " = " + *(yyvsp[0].String);
2687 delete (yyvsp[0].String);
2688 (yyval.String) = (yyvsp[-2].String);
2693 #line 653 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2695 (yyvsp[-1].String)->insert(0, "[ ");
2696 *(yyvsp[-1].String) += " ]";
2697 (yyval.String) = (yyvsp[-1].String);
2702 #line 660 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2704 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
2705 delete (yyvsp[0].String);
2706 (yyval.String) = (yyvsp[-2].String);
2711 #line 666 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2713 (yyval.String) = new std::string();
2718 #line 675 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2719 { (yyval.String) = new std::string(); ;}
2723 #line 677 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2725 (yyval.String) = (yyvsp[-1].Type).newTy;
2726 if (!(yyvsp[0].String)->empty())
2727 *(yyval.String) += " " + *(yyvsp[0].String);
2728 delete (yyvsp[0].String);
2733 #line 684 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2735 *(yyvsp[-2].String) += ", " + *(yyvsp[0].String);
2736 delete (yyvsp[0].String);
2741 #line 688 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2743 (yyval.String) = (yyvsp[0].String);
2748 #line 692 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2750 (yyval.String) = (yyvsp[0].String);
2755 #line 695 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2757 *(yyvsp[-2].String) += ", ...";
2758 (yyval.String) = (yyvsp[-2].String);
2759 delete (yyvsp[0].String);
2764 #line 700 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2766 (yyval.String) = (yyvsp[0].String);
2771 #line 703 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2772 { (yyval.String) = new std::string(); ;}
2776 #line 706 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2778 if (!(yyvsp[-7].String)->empty()) {
2779 *(yyvsp[-7].String) += " ";
2781 *(yyvsp[-7].String) += *(yyvsp[-6].Type).newTy + " " + *(yyvsp[-5].String) + "(" + *(yyvsp[-3].String) + ")";
2782 if (!(yyvsp[-1].String)->empty()) {
2783 *(yyvsp[-7].String) += " " + *(yyvsp[-1].String);
2785 if (!(yyvsp[0].String)->empty()) {
2786 *(yyvsp[-7].String) += " " + *(yyvsp[0].String);
2788 (yyvsp[-6].Type).destroy();
2789 delete (yyvsp[-5].String);
2790 delete (yyvsp[-3].String);
2791 delete (yyvsp[-1].String);
2792 delete (yyvsp[0].String);
2793 (yyval.String) = (yyvsp[-7].String);
2798 #line 725 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2800 (yyval.String) = new std::string("begin");
2805 #line 728 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2807 (yyval.String) = new std::string ("{");
2812 #line 732 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2814 if (!(yyvsp[-2].String)->empty()) {
2815 *O << *(yyvsp[-2].String) << " ";
2817 *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n";
2818 delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String);
2824 #line 741 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2825 { (yyval.String) = new std::string("end"); ;}
2829 #line 742 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2830 { (yyval.String) = new std::string("}"); ;}
2834 #line 744 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2836 if ((yyvsp[-1].String))
2837 *O << *(yyvsp[-1].String);
2838 *O << '\n' << *(yyvsp[0].String) << "\n";
2844 #line 752 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2845 { (yyval.String) = new std::string(); ;}
2849 #line 758 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2851 if (!(yyvsp[-1].String)->empty())
2852 *(yyvsp[-2].String) += " " + *(yyvsp[-1].String);
2853 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
2854 delete (yyvsp[-1].String);
2855 delete (yyvsp[0].String);
2856 (yyval.String) = (yyvsp[-2].String);
2861 #line 771 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2862 { (yyval.String) = new std::string(); ;}
2866 #line 777 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2868 (yyvsp[-1].String)->insert(0, "<");
2869 *(yyvsp[-1].String) += ">";
2870 (yyval.String) = (yyvsp[-1].String);
2875 #line 783 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2877 if (!(yyvsp[-3].String)->empty()) {
2878 *(yyvsp[-4].String) += " " + *(yyvsp[-3].String);
2880 *(yyvsp[-4].String) += " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
2881 delete (yyvsp[-3].String); delete (yyvsp[-2].String); delete (yyvsp[0].String);
2882 (yyval.String) = (yyvsp[-4].String);
2887 #line 801 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2889 (yyval.Value).type = (yyvsp[-1].Type);
2890 (yyval.Value).val = new std::string(*(yyvsp[-1].Type).newTy + " ");
2891 *(yyval.Value).val += *(yyvsp[0].String);
2892 delete (yyvsp[0].String);
2897 #line 808 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2904 #line 811 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2905 { // Do not allow functions with 0 basic blocks
2911 #line 819 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2918 #line 823 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2920 *O << " " << *(yyvsp[0].String) << "\n";
2921 delete (yyvsp[0].String);
2927 #line 828 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2934 #line 831 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2936 *O << *(yyvsp[0].String) << "\n";
2937 delete (yyvsp[0].String);
2943 #line 837 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2944 { // Return with a result...
2945 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Value).val << "\n";
2946 delete (yyvsp[-1].String); (yyvsp[0].Value).destroy();
2952 #line 842 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2953 { // Return with no result...
2954 *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Type).newTy << "\n";
2955 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
2961 #line 847 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2962 { // Unconditional Branch...
2963 *O << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
2964 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
2970 #line 852 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2972 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].String) << ", "
2973 << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].String) << ", " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
2974 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); delete (yyvsp[-6].String); (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String);
2975 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
2981 #line 859 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2983 *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].String) << ", " << *(yyvsp[-4].Type).newTy
2984 << " " << *(yyvsp[-3].String) << " [" << *(yyvsp[-1].String) << " ]\n";
2985 delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); delete (yyvsp[-6].String); (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); delete (yyvsp[-1].String);
2991 #line 865 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
2993 *O << " " << *(yyvsp[-7].String) << " " << *(yyvsp[-6].Type).newTy << " " << *(yyvsp[-5].String) << ", "
2994 << *(yyvsp[-3].Type).newTy << " " << *(yyvsp[-2].String) << "[]\n";
2995 delete (yyvsp[-7].String); (yyvsp[-6].Type).destroy(); delete (yyvsp[-5].String); (yyvsp[-3].Type).destroy(); delete (yyvsp[-2].String);
3001 #line 872 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3004 if (!(yyvsp[-13].String)->empty())
3005 *O << *(yyvsp[-13].String);
3006 *O << *(yyvsp[-12].String) << " " << *(yyvsp[-11].String) << " " << *(yyvsp[-10].Type).newTy << " " << *(yyvsp[-9].String) << " ("
3007 << *(yyvsp[-7].String) << ") " << *(yyvsp[-5].String) << " " << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].String) << " "
3008 << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n";
3009 delete (yyvsp[-13].String); delete (yyvsp[-12].String); delete (yyvsp[-11].String); (yyvsp[-10].Type).destroy(); delete (yyvsp[-9].String); delete (yyvsp[-7].String);
3010 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy();
3011 delete (yyvsp[0].String);
3017 #line 884 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3019 *O << " " << *(yyvsp[0].String) << "\n";
3020 delete (yyvsp[0].String);
3026 #line 889 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3028 *O << " " << *(yyvsp[0].String) << "\n";
3029 delete (yyvsp[0].String);
3035 #line 895 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3037 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].String) + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].String);
3038 (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3039 (yyval.String) = (yyvsp[-5].String);
3044 #line 900 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3046 (yyvsp[-3].String)->insert(0, *(yyvsp[-4].Type).newTy + " " );
3047 *(yyvsp[-3].String) += ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].String);
3048 (yyvsp[-4].Type).destroy(); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3049 (yyval.String) = (yyvsp[-3].String);
3054 #line 908 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3056 *(yyvsp[-1].String) += *(yyvsp[0].String);
3057 delete (yyvsp[0].String);
3058 (yyval.String) = (yyvsp[-1].String);
3063 #line 915 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3064 { // Used for PHI nodes
3065 (yyvsp[-3].String)->insert(0, *(yyvsp[-5].Type).newTy + "[");
3066 *(yyvsp[-3].String) += "," + *(yyvsp[-1].String) + "]";
3067 (yyvsp[-5].Type).destroy(); delete (yyvsp[-1].String);
3068 (yyval.String) = (yyvsp[-3].String);
3073 #line 921 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3075 *(yyvsp[-6].String) += ", [" + *(yyvsp[-3].String) + "," + *(yyvsp[-1].String) + "]";
3076 delete (yyvsp[-3].String); delete (yyvsp[-1].String);
3077 (yyval.String) = (yyvsp[-6].String);
3082 #line 929 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3083 { (yyval.String) = new std::string(*(yyvsp[0].Value).val); (yyvsp[0].Value).destroy(); ;}
3087 #line 930 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3089 *(yyvsp[-2].String) += ", " + *(yyvsp[0].Value).val;
3090 (yyvsp[0].Value).destroy();
3091 (yyval.String) = (yyvsp[-2].String);
3096 #line 939 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3097 { (yyval.String) = new std::string(); ;}
3101 #line 943 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3103 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3104 delete (yyvsp[0].String);
3105 (yyval.String) = (yyvsp[-1].String);
3110 #line 951 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3112 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
3113 (yyvsp[-3].Type).destroy(); delete (yyvsp[-2].String); delete (yyvsp[0].String);
3114 (yyval.String) = (yyvsp[-4].String);
3119 #line 956 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3121 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
3122 (yyvsp[-3].Type).destroy(); delete (yyvsp[-2].String); delete (yyvsp[0].String);
3123 (yyval.String) = (yyvsp[-4].String);
3128 #line 961 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3130 *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String);
3131 (yyvsp[-3].Type).destroy(); delete (yyvsp[-2].String); delete (yyvsp[0].String);
3132 (yyval.String) = (yyvsp[-4].String);
3137 #line 966 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3139 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3140 (yyvsp[0].Value).destroy();
3141 (yyval.String) = (yyvsp[-1].String);
3146 #line 971 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3148 const char* shiftop = (yyvsp[-3].String)->c_str();
3149 if (*(yyvsp[-3].String) == "shr")
3150 shiftop = ((yyvsp[-2].Value).type.isUnsigned()) ? "lshr" : "ashr";
3151 (yyval.String) = new std::string(shiftop);
3152 *(yyval.String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3153 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3158 #line 979 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3160 const char *opcode = getCastOpcode((yyvsp[-2].Value).type, (yyvsp[0].Type));
3161 (yyval.String) = new std::string(opcode);
3162 *(yyval.String) += *(yyvsp[-2].Value).val + " " + *(yyvsp[-1].String) + " " + *(yyvsp[0].Type).newTy;
3163 delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy();
3164 delete (yyvsp[-1].String); (yyvsp[0].Type).destroy();
3169 #line 986 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3171 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3172 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3173 (yyval.String) = (yyvsp[-5].String);
3178 #line 991 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3180 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Type).newTy;
3181 (yyvsp[-2].Value).destroy(); (yyvsp[0].Type).destroy();
3182 (yyval.String) = (yyvsp[-3].String);
3187 #line 996 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3189 *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3190 (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3191 (yyval.String) = (yyvsp[-3].String);
3196 #line 1001 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3198 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3199 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3200 (yyval.String) = (yyvsp[-5].String);
3205 #line 1006 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3207 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val;
3208 (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy();
3209 (yyval.String) = (yyvsp[-5].String);
3214 #line 1011 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3216 *(yyvsp[-1].String) += " " + *(yyvsp[0].String);
3217 delete (yyvsp[0].String);
3218 (yyval.String) = (yyvsp[-1].String);
3223 #line 1016 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3225 if (!(yyvsp[-5].String)->empty())
3226 *(yyvsp[-6].String) += " " + *(yyvsp[-5].String);
3227 if (!(yyvsp[-6].String)->empty())
3228 *(yyvsp[-6].String) += " ";
3229 *(yyvsp[-6].String) += *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].String) + "(" + *(yyvsp[-1].String) + ")";
3230 delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); delete (yyvsp[-1].String);
3231 (yyval.String) = (yyvsp[-6].String);
3236 #line 1030 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3238 (yyvsp[0].String)->insert(0, ", ");
3239 (yyval.String) = (yyvsp[0].String);
3244 #line 1034 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3245 { (yyval.String) = new std::string(); ;}
3249 #line 1039 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3250 { (yyval.String) = new std::string(); ;}
3254 #line 1042 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3256 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3257 if (!(yyvsp[0].String)->empty())
3258 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3259 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3260 (yyval.String) = (yyvsp[-2].String);
3265 #line 1049 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3267 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].String);
3268 if (!(yyvsp[0].String)->empty())
3269 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3270 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3271 (yyval.String) = (yyvsp[-5].String);
3276 #line 1056 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3278 *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy;
3279 if (!(yyvsp[0].String)->empty())
3280 *(yyvsp[-2].String) += " " + *(yyvsp[0].String);
3281 (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3282 (yyval.String) = (yyvsp[-2].String);
3287 #line 1063 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3289 *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].String);
3290 if (!(yyvsp[0].String)->empty())
3291 *(yyvsp[-5].String) += " " + *(yyvsp[0].String);
3292 (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3293 (yyval.String) = (yyvsp[-5].String);
3298 #line 1070 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3300 *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val;
3301 (yyvsp[0].Value).destroy();
3302 (yyval.String) = (yyvsp[-1].String);
3307 #line 1075 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3309 if (!(yyvsp[-3].String)->empty())
3310 *(yyvsp[-3].String) += " ";
3311 *(yyvsp[-3].String) += *(yyvsp[-2].String) + " " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].String);
3312 delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3313 (yyval.String) = (yyvsp[-3].String);
3318 #line 1082 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3320 if (!(yyvsp[-5].String)->empty())
3321 *(yyvsp[-5].String) += " ";
3322 *(yyvsp[-5].String) += *(yyvsp[-4].String) + " " + *(yyvsp[-3].Value).val + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].String);
3323 delete (yyvsp[-4].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String);
3324 (yyval.String) = (yyvsp[-5].String);
3329 #line 1089 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3331 *(yyvsp[-3].String) += *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].String) + " " + *(yyvsp[0].String);
3332 (yyvsp[-2].Type).destroy(); delete (yyvsp[-1].String); delete (yyvsp[0].String);
3333 (yyval.String) = (yyvsp[-3].String);
3341 /* Line 1126 of yacc.c. */
3342 #line 3343 "UpgradeParser.tab.c"
3348 YY_STACK_PRINT (yyss, yyssp);
3353 /* Now `shift' the result of the reduction. Determine what state
3354 that goes to, based on the state we popped back to and the rule
3355 number reduced by. */
3359 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3360 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3361 yystate = yytable[yystate];
3363 yystate = yydefgoto[yyn - YYNTOKENS];
3368 /*------------------------------------.
3369 | yyerrlab -- here on detecting error |
3370 `------------------------------------*/
3372 /* If not already recovering from an error, report this error. */
3377 yyn = yypact[yystate];
3379 if (YYPACT_NINF < yyn && yyn < YYLAST)
3381 int yytype = YYTRANSLATE (yychar);
3382 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
3383 YYSIZE_T yysize = yysize0;
3385 int yysize_overflow = 0;
3387 # define YYERROR_VERBOSE_ARGS_MAXIMUM 5
3388 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
3392 /* This is so xgettext sees the translatable formats that are
3393 constructed on the fly. */
3394 YY_("syntax error, unexpected %s");
3395 YY_("syntax error, unexpected %s, expecting %s");
3396 YY_("syntax error, unexpected %s, expecting %s or %s");
3397 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
3398 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
3402 static char const yyunexpected[] = "syntax error, unexpected %s";
3403 static char const yyexpecting[] = ", expecting %s";
3404 static char const yyor[] = " or %s";
3405 char yyformat[sizeof yyunexpected
3406 + sizeof yyexpecting - 1
3407 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
3408 * (sizeof yyor - 1))];
3409 char const *yyprefix = yyexpecting;
3411 /* Start YYX at -YYN if negative to avoid negative indexes in
3413 int yyxbegin = yyn < 0 ? -yyn : 0;
3415 /* Stay within bounds of both yycheck and yytname. */
3416 int yychecklim = YYLAST - yyn;
3417 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
3420 yyarg[0] = yytname[yytype];
3421 yyfmt = yystpcpy (yyformat, yyunexpected);
3423 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
3424 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
3426 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
3430 yyformat[sizeof yyunexpected - 1] = '\0';
3433 yyarg[yycount++] = yytname[yyx];
3434 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
3435 yysize_overflow |= yysize1 < yysize;
3437 yyfmt = yystpcpy (yyfmt, yyprefix);
3441 yyf = YY_(yyformat);
3442 yysize1 = yysize + yystrlen (yyf);
3443 yysize_overflow |= yysize1 < yysize;
3446 if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
3447 yymsg = (char *) YYSTACK_ALLOC (yysize);
3450 /* Avoid sprintf, as that infringes on the user's name space.
3451 Don't have undefined behavior even if the translation
3452 produced a string with the wrong number of "%s"s. */
3455 while ((*yyp = *yyf))
3457 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
3459 yyp += yytnamerr (yyp, yyarg[yyi++]);
3469 YYSTACK_FREE (yymsg);
3473 yyerror (YY_("syntax error"));
3474 goto yyexhaustedlab;
3478 #endif /* YYERROR_VERBOSE */
3479 yyerror (YY_("syntax error"));
3484 if (yyerrstatus == 3)
3486 /* If just tried and failed to reuse look-ahead token after an
3487 error, discard it. */
3489 if (yychar <= YYEOF)
3491 /* Return failure if at end of input. */
3492 if (yychar == YYEOF)
3497 yydestruct ("Error: discarding", yytoken, &yylval);
3502 /* Else will try to reuse look-ahead token after shifting the error
3507 /*---------------------------------------------------.
3508 | yyerrorlab -- error raised explicitly by YYERROR. |
3509 `---------------------------------------------------*/
3512 /* Pacify compilers like GCC when the user code never invokes
3513 YYERROR and the label yyerrorlab therefore never appears in user
3524 /*-------------------------------------------------------------.
3525 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3526 `-------------------------------------------------------------*/
3528 yyerrstatus = 3; /* Each real token shifted decrements this. */
3532 yyn = yypact[yystate];
3533 if (yyn != YYPACT_NINF)
3536 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3544 /* Pop the current state because it cannot handle the error token. */
3549 yydestruct ("Error: popping", yystos[yystate], yyvsp);
3552 YY_STACK_PRINT (yyss, yyssp);
3561 /* Shift the error token. */
3562 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3568 /*-------------------------------------.
3569 | yyacceptlab -- YYACCEPT comes here. |
3570 `-------------------------------------*/
3575 /*-----------------------------------.
3576 | yyabortlab -- YYABORT comes here. |
3577 `-----------------------------------*/
3583 /*-------------------------------------------------.
3584 | yyexhaustedlab -- memory exhaustion comes here. |
3585 `-------------------------------------------------*/
3587 yyerror (YY_("memory exhausted"));
3593 if (yychar != YYEOF && yychar != YYEMPTY)
3594 yydestruct ("Cleanup: discarding lookahead",
3596 while (yyssp != yyss)
3598 yydestruct ("Cleanup: popping",
3599 yystos[*yyssp], yyvsp);
3604 YYSTACK_FREE (yyss);
3610 #line 1095 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y"
3613 int yyerror(const char *ErrorMsg) {
3615 = std::string((CurFilename == "-") ? std::string("<stdin>") : CurFilename)
3616 + ":" + llvm::utostr((unsigned) Upgradelineno) + ": ";
3617 std::string errMsg = std::string(ErrorMsg) + "\n" + where + " while reading ";
3618 if (yychar == YYEMPTY || yychar == 0)
3619 errMsg += "end-of-file.";
3621 errMsg += "token: '" + std::string(Upgradetext, Upgradeleng) + "'";
3622 std::cerr << errMsg << '\n';