aboutsummaryrefslogtreecommitdiff
path: root/lib/AsmParser/llvmAsmParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AsmParser/llvmAsmParser.cpp')
-rw-r--r--lib/AsmParser/llvmAsmParser.cpp4787
1 files changed, 2714 insertions, 2073 deletions
diff --git a/lib/AsmParser/llvmAsmParser.cpp b/lib/AsmParser/llvmAsmParser.cpp
index 72fd1ebe9e..45bcc6f617 100644
--- a/lib/AsmParser/llvmAsmParser.cpp
+++ b/lib/AsmParser/llvmAsmParser.cpp
@@ -1,118 +1,270 @@
+/* A Bison parser, made by GNU Bison 1.875c. */
-/* A Bison parser, made from /Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y
- by GNU Bison version 1.28 */
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-#define YYBISON 1 /* Identify Bison output. */
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* Written by Richard Stallman by simplifying the original so called
+ ``semantic'' parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Using locations. */
+#define YYLSP_NEEDED 0
+
+/* If NAME_PREFIX is specified substitute the variables and functions
+ names. */
#define yyparse llvmAsmparse
-#define yylex llvmAsmlex
+#define yylex llvmAsmlex
#define yyerror llvmAsmerror
-#define yylval llvmAsmlval
-#define yychar llvmAsmchar
+#define yylval llvmAsmlval
+#define yychar llvmAsmchar
#define yydebug llvmAsmdebug
#define yynerrs llvmAsmnerrs
-#define ESINT64VAL 257
-#define EUINT64VAL 258
-#define SINTVAL 259
-#define UINTVAL 260
-#define FPVAL 261
-#define VOID 262
-#define BOOL 263
-#define SBYTE 264
-#define UBYTE 265
-#define SHORT 266
-#define USHORT 267
-#define INT 268
-#define UINT 269
-#define LONG 270
-#define ULONG 271
-#define FLOAT 272
-#define DOUBLE 273
-#define TYPE 274
-#define LABEL 275
-#define VAR_ID 276
-#define LABELSTR 277
-#define STRINGCONSTANT 278
-#define IMPLEMENTATION 279
-#define ZEROINITIALIZER 280
-#define TRUETOK 281
-#define FALSETOK 282
-#define BEGINTOK 283
-#define ENDTOK 284
-#define DECLARE 285
-#define GLOBAL 286
-#define CONSTANT 287
-#define SECTION 288
-#define VOLATILE 289
-#define TO 290
-#define DOTDOTDOT 291
-#define NULL_TOK 292
-#define UNDEF 293
-#define CONST 294
-#define INTERNAL 295
-#define LINKONCE 296
-#define WEAK 297
-#define APPENDING 298
-#define OPAQUE 299
-#define NOT 300
-#define EXTERNAL 301
-#define TARGET 302
-#define TRIPLE 303
-#define ENDIAN 304
-#define POINTERSIZE 305
-#define LITTLE 306
-#define BIG 307
-#define ALIGN 308
-#define DEPLIBS 309
-#define CALL 310
-#define TAIL 311
-#define CC_TOK 312
-#define CCC_TOK 313
-#define FASTCC_TOK 314
-#define COLDCC_TOK 315
-#define RET 316
-#define BR 317
-#define SWITCH 318
-#define INVOKE 319
-#define UNWIND 320
-#define UNREACHABLE 321
-#define ADD 322
-#define SUB 323
-#define MUL 324
-#define DIV 325
-#define REM 326
-#define AND 327
-#define OR 328
-#define XOR 329
-#define SETLE 330
-#define SETGE 331
-#define SETLT 332
-#define SETGT 333
-#define SETEQ 334
-#define SETNE 335
-#define MALLOC 336
-#define ALLOCA 337
-#define FREE 338
-#define LOAD 339
-#define STORE 340
-#define GETELEMENTPTR 341
-#define PHI_TOK 342
-#define CAST 343
-#define SELECT 344
-#define SHL 345
-#define SHR 346
-#define VAARG 347
-#define EXTRACTELEMENT 348
-#define VAARG_old 349
-#define VANEXT_old 350
-
-#line 14 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y"
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ ESINT64VAL = 258,
+ EUINT64VAL = 259,
+ SINTVAL = 260,
+ UINTVAL = 261,
+ FPVAL = 262,
+ VOID = 263,
+ BOOL = 264,
+ SBYTE = 265,
+ UBYTE = 266,
+ SHORT = 267,
+ USHORT = 268,
+ INT = 269,
+ UINT = 270,
+ LONG = 271,
+ ULONG = 272,
+ FLOAT = 273,
+ DOUBLE = 274,
+ TYPE = 275,
+ LABEL = 276,
+ VAR_ID = 277,
+ LABELSTR = 278,
+ STRINGCONSTANT = 279,
+ IMPLEMENTATION = 280,
+ ZEROINITIALIZER = 281,
+ TRUETOK = 282,
+ FALSETOK = 283,
+ BEGINTOK = 284,
+ ENDTOK = 285,
+ DECLARE = 286,
+ GLOBAL = 287,
+ CONSTANT = 288,
+ SECTION = 289,
+ VOLATILE = 290,
+ TO = 291,
+ DOTDOTDOT = 292,
+ NULL_TOK = 293,
+ UNDEF = 294,
+ CONST = 295,
+ INTERNAL = 296,
+ LINKONCE = 297,
+ WEAK = 298,
+ APPENDING = 299,
+ OPAQUE = 300,
+ NOT = 301,
+ EXTERNAL = 302,
+ TARGET = 303,
+ TRIPLE = 304,
+ ENDIAN = 305,
+ POINTERSIZE = 306,
+ LITTLE = 307,
+ BIG = 308,
+ ALIGN = 309,
+ DEPLIBS = 310,
+ CALL = 311,
+ TAIL = 312,
+ CC_TOK = 313,
+ CCC_TOK = 314,
+ FASTCC_TOK = 315,
+ COLDCC_TOK = 316,
+ RET = 317,
+ BR = 318,
+ SWITCH = 319,
+ INVOKE = 320,
+ UNWIND = 321,
+ UNREACHABLE = 322,
+ ADD = 323,
+ SUB = 324,
+ MUL = 325,
+ DIV = 326,
+ REM = 327,
+ AND = 328,
+ OR = 329,
+ XOR = 330,
+ SETLE = 331,
+ SETGE = 332,
+ SETLT = 333,
+ SETGT = 334,
+ SETEQ = 335,
+ SETNE = 336,
+ MALLOC = 337,
+ ALLOCA = 338,
+ FREE = 339,
+ LOAD = 340,
+ STORE = 341,
+ GETELEMENTPTR = 342,
+ PHI_TOK = 343,
+ CAST = 344,
+ SELECT = 345,
+ SHL = 346,
+ SHR = 347,
+ VAARG = 348,
+ EXTRACTELEMENT = 349,
+ VAARG_old = 350,
+ VANEXT_old = 351
+ };
+#endif
+#define ESINT64VAL 258
+#define EUINT64VAL 259
+#define SINTVAL 260
+#define UINTVAL 261
+#define FPVAL 262
+#define VOID 263
+#define BOOL 264
+#define SBYTE 265
+#define UBYTE 266
+#define SHORT 267
+#define USHORT 268
+#define INT 269
+#define UINT 270
+#define LONG 271
+#define ULONG 272
+#define FLOAT 273
+#define DOUBLE 274
+#define TYPE 275
+#define LABEL 276
+#define VAR_ID 277
+#define LABELSTR 278
+#define STRINGCONSTANT 279
+#define IMPLEMENTATION 280
+#define ZEROINITIALIZER 281
+#define TRUETOK 282
+#define FALSETOK 283
+#define BEGINTOK 284
+#define ENDTOK 285
+#define DECLARE 286
+#define GLOBAL 287
+#define CONSTANT 288
+#define SECTION 289
+#define VOLATILE 290
+#define TO 291
+#define DOTDOTDOT 292
+#define NULL_TOK 293
+#define UNDEF 294
+#define CONST 295
+#define INTERNAL 296
+#define LINKONCE 297
+#define WEAK 298
+#define APPENDING 299
+#define OPAQUE 300
+#define NOT 301
+#define EXTERNAL 302
+#define TARGET 303
+#define TRIPLE 304
+#define ENDIAN 305
+#define POINTERSIZE 306
+#define LITTLE 307
+#define BIG 308
+#define ALIGN 309
+#define DEPLIBS 310
+#define CALL 311
+#define TAIL 312
+#define CC_TOK 313
+#define CCC_TOK 314
+#define FASTCC_TOK 315
+#define COLDCC_TOK 316
+#define RET 317
+#define BR 318
+#define SWITCH 319
+#define INVOKE 320
+#define UNWIND 321
+#define UNREACHABLE 322
+#define ADD 323
+#define SUB 324
+#define MUL 325
+#define DIV 326
+#define REM 327
+#define AND 328
+#define OR 329
+#define XOR 330
+#define SETLE 331
+#define SETGE 332
+#define SETLT 333
+#define SETGT 334
+#define SETEQ 335
+#define SETNE 336
+#define MALLOC 337
+#define ALLOCA 338
+#define FREE 339
+#define LOAD 340
+#define STORE 341
+#define GETELEMENTPTR 342
+#define PHI_TOK 343
+#define CAST 344
+#define SELECT 345
+#define SHL 346
+#define SHR 347
+#define VAARG 348
+#define EXTRACTELEMENT 349
+#define VAARG_old 350
+#define VANEXT_old 351
+
+
+
+
+/* Copy the first part of user declarations. */
+#line 14 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y"
#include "ParserInternals.h"
#include "llvm/CallingConv.h"
#include "llvm/Instructions.h"
#include "llvm/Module.h"
#include "llvm/SymbolTable.h"
+#include "llvm/Assembly/AutoUpgrade.h"
#include "llvm/Support/GetElementPtrTypeIterator.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/MathExtras.h"
@@ -200,12 +352,16 @@ static struct PerModuleInfo {
ThrowException(UndefinedReferences);
}
+ // Rename any overloaded intrinsic functions.
+ for (Module::iterator FI = CurrentModule->begin(), FE =
+ CurrentModule->end(); FI != FE; ++FI)
+ UpgradeIntrinsicFunction(&(*FI));
+
Values.clear(); // Clear out function local definitions
Types.clear();
CurrentModule = 0;
}
-
// GetForwardRefForGlobal - Check to see if there is a forward reference
// for this global. If so, remove it from the GlobalRefs map and return it.
// If not, just return null.
@@ -965,8 +1121,23 @@ Module *llvm::RunVMAsmParser(const char * AsmString, Module * M) {
}
-#line 873 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y"
-typedef union {
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+#line 878 "/proj/llvm/llvm2/lib/AsmParser/llvmAsmParser.y"
+typedef union YYSTYPE {
llvm::Module *ModuleVal;
llvm::Function *FunctionVal;
std::pair<llvm::PATypeHolder*, char*> *ArgVal;
@@ -1005,944 +1176,1286 @@ typedef union {
llvm::Instruction::OtherOps OtherOpVal;
llvm::Module::Endianness Endianness;
} YYSTYPE;
-#include <stdio.h>
-
-#ifndef __cplusplus
-#ifndef __STDC__
-#define const
-#endif
+/* Line 191 of yacc.c. */
+#line 1181 "llvmAsmParser.tab.c"
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
#endif
-#define YYFINAL 454
-#define YYFLAG -32768
-#define YYNTBASE 111
-
-#define YYTRANSLATE(x) ((unsigned)(x) <= 350 ? yytranslate[x] : 180)
-
-static const char yytranslate[] = { 0,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 100,
- 101, 109, 2, 98, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 105,
- 97, 106, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 102, 99, 104, 2, 2, 2, 2, 2, 110, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 103,
- 2, 2, 107, 2, 108, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
- 87, 88, 89, 90, 91, 92, 93, 94, 95, 96
-};
+/* Copy the second part of user declarations. */
-#if YYDEBUG != 0
-static const short yyprhs[] = { 0,
- 0, 2, 4, 6, 8, 10, 12, 14, 16, 18,
- 20, 22, 24, 26, 28, 30, 32, 34, 36, 38,
- 40, 42, 44, 46, 48, 50, 52, 54, 56, 58,
- 60, 62, 64, 67, 68, 70, 72, 74, 76, 77,
- 78, 80, 82, 84, 87, 88, 91, 92, 96, 99,
- 100, 102, 103, 107, 109, 112, 114, 116, 118, 120,
- 122, 124, 126, 128, 130, 132, 134, 136, 138, 140,
- 142, 144, 146, 148, 150, 152, 154, 157, 162, 168,
- 174, 178, 181, 184, 186, 190, 192, 196, 198, 199,
- 204, 208, 212, 217, 222, 226, 229, 232, 235, 238,
- 241, 244, 247, 250, 253, 256, 263, 269, 278, 285,
- 292, 299, 306, 313, 317, 319, 321, 323, 325, 328,
- 331, 334, 336, 341, 344, 345, 353, 354, 362, 366,
- 371, 372, 374, 376, 380, 384, 388, 392, 396, 398,
- 399, 401, 403, 405, 406, 409, 413, 415, 417, 421,
- 423, 424, 433, 435, 437, 441, 443, 445, 448, 449,
- 453, 455, 457, 459, 461, 463, 465, 467, 469, 473,
- 475, 477, 479, 481, 483, 486, 489, 492, 496, 499,
- 500, 502, 505, 508, 512, 522, 532, 541, 555, 557,
- 559, 566, 572, 575, 582, 590, 592, 596, 598, 599,
- 602, 604, 610, 616, 622, 625, 630, 635, 642, 647,
- 652, 657, 662, 665, 673, 675, 678, 679, 681, 682,
- 686, 693, 697, 704, 707, 712, 719
-};
-static const short yyrhs[] = { 5,
- 0, 6, 0, 3, 0, 4, 0, 68, 0, 69,
- 0, 70, 0, 71, 0, 72, 0, 73, 0, 74,
- 0, 75, 0, 76, 0, 77, 0, 78, 0, 79,
- 0, 80, 0, 81, 0, 91, 0, 92, 0, 16,
- 0, 14, 0, 12, 0, 10, 0, 17, 0, 15,
- 0, 13, 0, 11, 0, 117, 0, 118, 0, 18,
- 0, 19, 0, 150, 97, 0, 0, 41, 0, 42,
- 0, 43, 0, 44, 0, 0, 0, 59, 0, 60,
- 0, 61, 0, 58, 4, 0, 0, 54, 4, 0,
- 0, 98, 54, 4, 0, 34, 24, 0, 0, 126,
- 0, 0, 98, 129, 128, 0, 126, 0, 54, 4,
- 0, 132, 0, 8, 0, 134, 0, 8, 0, 134,
- 0, 9, 0, 10, 0, 11, 0, 12, 0, 13,
- 0, 14, 0, 15, 0, 16, 0, 17, 0, 18,
- 0, 19, 0, 20, 0, 21, 0, 45, 0, 133,
- 0, 163, 0, 99, 4, 0, 131, 100, 136, 101,
- 0, 102, 4, 103, 134, 104, 0, 105, 4, 103,
- 134, 106, 0, 107, 135, 108, 0, 107, 108, 0,
- 134, 109, 0, 134, 0, 135, 98, 134, 0, 135,
- 0, 135, 98, 37, 0, 37, 0, 0, 132, 102,
- 139, 104, 0, 132, 102, 104, 0, 132, 110, 24,
- 0, 132, 105, 139, 106, 0, 132, 107, 139, 108,
- 0, 132, 107, 108, 0, 132, 38, 0, 132, 39,
- 0, 132, 163, 0, 132, 138, 0, 132, 26, 0,
- 117, 112, 0, 118, 4, 0, 9, 27, 0, 9,
- 28, 0, 120, 7, 0, 89, 100, 137, 36, 132,
- 101, 0, 87, 100, 137, 177, 101, 0, 90, 100,
- 137, 98, 137, 98, 137, 101, 0, 113, 100, 137,
- 98, 137, 101, 0, 114, 100, 137, 98, 137, 101,
- 0, 115, 100, 137, 98, 137, 101, 0, 116, 100,
- 137, 98, 137, 101, 0, 94, 100, 137, 98, 137,
- 101, 0, 139, 98, 137, 0, 137, 0, 32, 0,
- 33, 0, 142, 0, 142, 159, 0, 142, 160, 0,
- 142, 25, 0, 143, 0, 143, 121, 20, 130, 0,
- 143, 160, 0, 0, 143, 121, 122, 140, 137, 144,
- 128, 0, 0, 143, 121, 47, 140, 132, 145, 128,
- 0, 143, 48, 147, 0, 143, 55, 97, 148, 0,
- 0, 53, 0, 52, 0, 50, 97, 146, 0, 51,
- 97, 4, 0, 49, 97, 24, 0, 102, 149, 104,
- 0, 149, 98, 24, 0, 24, 0, 0, 22, 0,
- 24, 0, 150, 0, 0, 132, 151, 0, 153, 98,
- 152, 0, 152, 0, 153, 0, 153, 98, 37, 0,
- 37, 0, 0, 123, 130, 150, 100, 154, 101, 127,
- 124, 0, 29, 0, 107, 0, 122, 155, 156, 0,
- 30, 0, 108, 0, 166, 158, 0, 0, 31, 161,
- 155, 0, 3, 0, 4, 0, 7, 0, 27, 0,
- 28, 0, 38, 0, 39, 0, 26, 0, 105, 139,
- 106, 0, 138, 0, 111, 0, 150, 0, 163, 0,
- 162, 0, 132, 164, 0, 166, 167, 0, 157, 167,
- 0, 168, 121, 169, 0, 168, 171, 0, 0, 23,
- 0, 62, 165, 0, 62, 8, 0, 63, 21, 164,
- 0, 63, 9, 164, 98, 21, 164, 98, 21, 164,
- 0, 64, 119, 164, 98, 21, 164, 102, 170, 104,
- 0, 64, 119, 164, 98, 21, 164, 102, 104, 0,
- 65, 123, 130, 164, 100, 174, 101, 36, 21, 164,
- 66, 21, 164, 0, 66, 0, 67, 0, 170, 119,
- 162, 98, 21, 164, 0, 119, 162, 98, 21, 164,
- 0, 121, 176, 0, 132, 102, 164, 98, 164, 104,
- 0, 172, 98, 102, 164, 98, 164, 104, 0, 165,
- 0, 173, 98, 165, 0, 173, 0, 0, 57, 56,
- 0, 56, 0, 113, 132, 164, 98, 164, 0, 114,
- 132, 164, 98, 164, 0, 115, 132, 164, 98, 164,
- 0, 46, 165, 0, 116, 165, 98, 165, 0, 89,
- 165, 36, 132, 0, 90, 165, 98, 165, 98, 165,
- 0, 93, 165, 98, 132, 0, 95, 165, 98, 132,
- 0, 96, 165, 98, 132, 0, 94, 165, 98, 165,
- 0, 88, 172, 0, 175, 123, 130, 164, 100, 174,
- 101, 0, 179, 0, 98, 173, 0, 0, 35, 0,
- 0, 82, 132, 125, 0, 82, 132, 98, 15, 164,
- 125, 0, 83, 132, 125, 0, 83, 132, 98, 15,
- 164, 125, 0, 84, 165, 0, 178, 85, 132, 164,
- 0, 178, 86, 165, 98, 132, 164, 0, 87, 132,
- 164, 177, 0
-};
+/* Line 214 of yacc.c. */
+#line 1193 "llvmAsmParser.tab.c"
-#endif
+#if ! defined (yyoverflow) || YYERROR_VERBOSE
-#if YYDEBUG != 0
-static const short yyrline[] = { 0,
- 991, 992, 999, 1000, 1009, 1009, 1009, 1009, 1009, 1010,
- 1010, 1010, 1011, 1011, 1011, 1011, 1011, 1011, 1013, 1013,
- 1017, 1017, 1017, 1017, 1018, 1018, 1018, 1018, 1019, 1019,
- 1020, 1020, 1023, 1026, 1030, 1030, 1031, 1032, 1033, 1036,
- 1036, 1037, 1038, 1039, 1048, 1048, 1054, 1054, 1062, 1069,
- 1069, 1075, 1075, 1077, 1081, 1094, 1094, 1095, 1095, 1097,
- 1106, 1106, 1106, 1106, 1106, 1106, 1106, 1107, 1107, 1107,
- 1107, 1107, 1107, 1108, 1111, 1114, 1120, 1127, 1139, 1143,
- 1154, 1163, 1166, 1174, 1178, 1183, 1184, 1187, 1190, 1200,
- 1225, 1238, 1266, 1291, 1311, 1323, 1332, 1336, 1395, 1401,
- 1409, 1414, 1419, 1422, 1425, 1432, 1442, 1473, 1480, 1501,
- 1511, 1516, 1523, 1533, 1536, 1543, 1543, 1553, 1560, 1564,
- 1567, 1570, 1583, 1603, 1605, 1608, 1611, 1615, 1618, 1620,
- 1622, 1627, 1628, 1630, 1633, 1641, 1646, 1648, 1652, 1656,
- 1664, 1664, 1665, 1665, 1667, 1673, 1678, 1684, 1687, 1692,
- 1696, 1700, 1786, 1786, 1788, 1796, 1796, 1798, 1802, 1802,
- 1811, 1814, 1817, 1820, 1823, 1826, 1829, 1832, 1835, 1859,
- 1866, 1869, 1874, 1874, 1880, 1884, 1887, 1895, 1904, 1908,
- 1918, 1929, 1932, 1935, 1938, 1941, 1955, 1959, 2012, 2015,
- 2021, 2029, 2039, 2046, 2051, 2058, 2062, 2068, 2068, 2070,
- 2073, 2079, 2091, 2102, 2112, 2124, 2131, 2138, 2145, 2150,
- 2169, 2191, 2199, 2213, 2270, 2276, 2278, 2282, 2285, 2291,
- 2295, 2299, 2303, 2307, 2314, 2324, 2337
-};
-#endif
+# ifndef YYFREE
+# define YYFREE free
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# endif
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# define YYSTACK_ALLOC alloca
+# endif
+# else
+# if defined (alloca) || defined (_ALLOCA_H)
+# define YYSTACK_ALLOC alloca
+# else
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# else
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# endif
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# endif
+#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
+
+
+#if (! defined (yyoverflow) \
+ && (! defined (__cplusplus) \
+ || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ short yyss;
+ YYSTYPE yyvs;
+ };
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined (__GNUC__) && 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ register YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack, Stack, yysize); \
+ Stack = &yyptr->Stack; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
-#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
-
-static const char * const yytname[] = { "$","error","$undefined.","ESINT64VAL",
-"EUINT64VAL","SINTVAL","UINTVAL","FPVAL","VOID","BOOL","SBYTE","UBYTE","SHORT",
-"USHORT","INT","UINT","LONG","ULONG","FLOAT","DOUBLE","TYPE","LABEL","VAR_ID",
-"LABELSTR","STRINGCONSTANT","IMPLEMENTATION","ZEROINITIALIZER","TRUETOK","FALSETOK",
-"BEGINTOK","ENDTOK","DECLARE","GLOBAL","CONSTANT","SECTION","VOLATILE","TO",
-"DOTDOTDOT","NULL_TOK","UNDEF","CONST","INTERNAL","LINKONCE","WEAK","APPENDING",
-"OPAQUE","NOT","EXTERNAL","TARGET","TRIPLE","ENDIAN","POINTERSIZE","LITTLE",
-"BIG","ALIGN","DEPLIBS","CALL","TAIL","CC_TOK","CCC_TOK","FASTCC_TOK","COLDCC_TOK",
-"RET","BR","SWITCH","INVOKE","UNWIND","UNREACHABLE","ADD","SUB","MUL","DIV",
-"REM","AND","OR","XOR","SETLE","SETGE","SETLT","SETGT","SETEQ","SETNE","MALLOC",
-"ALLOCA","FREE","LOAD","STORE","GETELEMENTPTR","PHI_TOK","CAST","SELECT","SHL",
-"SHR","VAARG","EXTRACTELEMENT","VAARG_old","VANEXT_old","'='","','","'\\\\'",
-"'('","')'","'['","'x'","']'","'<'","'>'","'{'","'}'","'*'","'c'","INTVAL","EINT64VAL",
-"ArithmeticOps","LogicalOps","SetCondOps","ShiftOps","SIntType","UIntType","IntType",
-"FPType","OptAssign","OptLinkage","OptCallingConv","OptAlign","OptCAlign","SectionString",
-"OptSection","GlobalVarAttributes","GlobalVarAttribute","TypesV","UpRTypesV",
-"Types","PrimType","UpRTypes","TypeListI","ArgTypeListI","ConstVal","ConstExpr",
-"ConstVector","GlobalType","Module","FunctionList","ConstPool","@1","@2","BigOrLittle",
-"TargetDefinition","LibrariesDefinition","LibList","Name","OptName","ArgVal",
-"ArgListH","ArgList","FunctionHeaderH","BEGIN","FunctionHeader","END","Function",
-"FunctionProto","@3","ConstValueRef","SymbolicValueRef","ValueRef","ResolvedVal",
-"BasicBlockList","BasicBlock","InstructionList","BBTerminatorInst","JumpTable",
-"Inst","PHIList","ValueRefList","ValueRefListE","OptTailCall","InstVal","IndexList",
-"OptVolatile","MemoryInst", NULL
-};
#endif
-static const short yyr1[] = { 0,
- 111, 111, 112, 112, 113, 113, 113, 113, 113, 114,
- 114, 114, 115, 115, 115, 115, 115, 115, 116, 116,
- 117, 117, 117, 117, 118, 118, 118, 118, 119, 119,
- 120, 120, 121, 121, 122, 122, 122, 122, 122, 123,
- 123, 123, 123, 123, 124, 124, 125, 125, 126, 127,
- 127, 128, 128, 129, 129, 130, 130, 131, 131, 132,
- 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
- 133, 133, 133, 134, 134, 134, 134, 134, 134, 134,
- 134, 134, 134, 135, 135, 136, 136, 136, 136, 137,
- 137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
- 137, 137, 137, 137, 137, 138, 138, 138, 138, 138,
- 138, 138, 138, 139, 139, 140, 140, 141, 142, 142,
- 142, 142, 143, 143, 144, 143, 145, 143, 143, 143,
- 143, 146, 146, 147, 147, 147, 148, 149, 149, 149,
- 150, 150, 151, 151, 152, 153, 153, 154, 154, 154,
- 154, 155, 156, 156, 157, 158, 158, 159, 161, 160,
- 162, 162, 162, 162, 162, 162, 162, 162, 162, 162,
- 163, 163, 164, 164, 165, 166, 166, 167, 168, 168,
- 168, 169, 169, 169, 169, 169, 169, 169, 169, 169,
- 170, 170, 171, 172, 172, 173, 173, 174, 174, 175,
- 175, 176, 176, 176, 176, 176, 176, 176, 176, 176,
- 176, 176, 176, 176, 176, 177, 177, 178, 178, 179,
- 179, 179, 179, 179, 179, 179, 179
+#if defined (__STDC__) || defined (__cplusplus)
+ typedef signed char yysigned_char;
+#else
+ typedef short yysigned_char;
+#endif
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 4
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 1236
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 111
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 70
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 228
+/* YYNRULES -- Number of states. */
+#define YYNSTATES 454
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 351
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+static const unsigned char yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 100, 101, 109, 2, 98, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 105, 97, 106, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 102, 99, 104, 2, 2, 2, 2, 2, 110,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 103, 2, 2, 107, 2, 108, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
+ 95, 96
};
-static const short yyr2[] = { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 2, 0, 1, 1, 1, 1, 0, 0,
- 1, 1, 1, 2, 0, 2, 0, 3, 2, 0,
- 1, 0, 3, 1, 2, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 2, 4, 5, 5,
- 3, 2, 2, 1, 3, 1, 3, 1, 0, 4,
- 3, 3, 4, 4, 3, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 6, 5, 8, 6, 6,
- 6, 6, 6, 3, 1, 1, 1, 1, 2, 2,
- 2, 1, 4, 2, 0, 7, 0, 7, 3, 4,
- 0, 1, 1, 3, 3, 3, 3, 3, 1, 0,
- 1, 1, 1, 0, 2, 3, 1, 1, 3, 1,
- 0, 8, 1, 1, 3, 1, 1, 2, 0, 3,
- 1, 1, 1, 1, 1, 1, 1, 1, 3, 1,
- 1, 1, 1, 1, 2, 2, 2, 3, 2, 0,
- 1, 2, 2, 3, 9, 9, 8, 13, 1, 1,
- 6, 5, 2, 6, 7, 1, 3, 1, 0, 2,
- 1, 5, 5, 5, 2, 4, 4, 6, 4, 4,
- 4, 4, 2, 7, 1, 2, 0, 1, 0, 3,
- 6, 3, 6, 2, 4, 6, 4
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
+static const unsigned short yyprhs[] =
+{
+ 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
+ 19, 21, 23, 25, 27, 29, 31, 33, 35, 37,
+ 39, 41, 43, 45, 47, 49, 51, 53, 55, 57,
+ 59, 61, 63, 65, 67, 70, 71, 73, 75, 77,
+ 79, 80, 81, 83, 85, 87, 90, 91, 94, 95,
+ 99, 102, 103, 105, 106, 110, 112, 115, 117, 119,
+ 121, 123, 125, 127, 129, 131, 133, 135, 137, 139,
+ 141, 143, 145, 147, 149, 151, 153, 155, 157, 160,
+ 165, 171, 177, 181, 184, 187, 189, 193, 195, 199,
+ 201, 202, 207, 211, 215, 220, 225, 229, 232, 235,
+ 238, 241, 244, 247, 250, 253, 256, 259, 266, 272,
+ 281, 288, 295, 302, 309, 316, 320, 322, 324, 326,
+ 328, 331, 334, 337, 339, 344, 347, 348, 356, 357,
+ 365, 369, 374, 375, 377, 379, 383, 387, 391, 395,
+ 399, 401, 402, 404, 406, 408, 409, 412, 416, 418,
+ 420, 424, 426, 427, 436, 438, 440, 444, 446, 448,
+ 451, 452, 456, 458, 460, 462, 464, 466, 468, 470,
+ 472, 476, 478, 480, 482, 484, 486, 489, 492, 495,
+ 499, 502, 503, 505, 508, 511, 515, 525, 535, 544,
+ 558, 560, 562, 569, 575, 578, 585, 593, 595, 599,
+ 601, 602, 605, 607, 613, 619, 625, 628, 633, 638,
+ 645, 650, 655, 660, 665, 668, 676, 678, 681, 682,
+ 684, 685, 689, 696, 700, 707, 710, 715, 722
};
-static const short yydefact[] = { 131,
- 39, 122, 121, 159, 35, 36, 37, 38, 40, 180,
- 119, 120, 180, 141, 142, 0, 0, 39, 0, 124,
- 40, 0, 41, 42, 43, 0, 0, 181, 177, 34,
- 156, 157, 158, 176, 0, 0, 0, 129, 0, 0,
- 0, 0, 33, 160, 44, 1, 2, 57, 61, 62,
- 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
- 73, 74, 0, 0, 0, 0, 171, 0, 0, 56,
- 75, 60, 172, 76, 153, 154, 155, 219, 179, 0,
- 0, 0, 140, 130, 123, 116, 117, 0, 0, 77,
- 0, 0, 59, 82, 84, 0, 0, 89, 83, 218,
- 0, 201, 0, 0, 0, 0, 40, 189, 190, 5,
- 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 0, 0, 0, 0, 0, 0, 0,
- 19, 20, 0, 0, 0, 0, 0, 0, 0, 0,
- 178, 40, 193, 0, 215, 136, 133, 132, 134, 135,
- 139, 0, 127, 61, 62, 63, 64, 65, 66, 67,
- 68, 69, 70, 71, 0, 0, 0, 0, 125, 0,
- 0, 0, 81, 151, 88, 86, 0, 0, 205, 200,
- 183, 182, 0, 0, 24, 28, 23, 27, 22, 26,
- 21, 25, 29, 30, 0, 0, 47, 47, 224, 0,
- 0, 213, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 137, 52, 103, 104,
- 3, 4, 101, 102, 105, 100, 96, 97, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 99, 98, 52, 58, 58, 85, 150, 144, 147, 148,
- 0, 0, 78, 161, 162, 163, 168, 164, 165, 166,
- 167, 0, 170, 174, 173, 175, 0, 184, 0, 0,
- 0, 220, 0, 222, 217, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 138, 0, 128, 0, 0, 0, 0, 91, 115, 0,
- 0, 95, 0, 92, 0, 0, 0, 0, 126, 79,
- 80, 143, 145, 0, 50, 87, 0, 0, 0, 0,
- 0, 0, 0, 0, 227, 0, 0, 207, 0, 209,
- 212, 210, 211, 0, 0, 0, 206, 0, 225, 0,
- 0, 0, 54, 52, 217, 0, 0, 0, 0, 90,
- 93, 94, 0, 0, 0, 0, 149, 146, 51, 45,
- 169, 0, 0, 199, 47, 48, 47, 196, 216, 0,
- 0, 0, 202, 203, 204, 199, 0, 49, 55, 53,