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.cpp2202
1 files changed, 2202 insertions, 0 deletions
diff --git a/lib/AsmParser/llvmAsmParser.cpp b/lib/AsmParser/llvmAsmParser.cpp
new file mode 100644
index 0000000000..e79f1bf5f6
--- /dev/null
+++ b/lib/AsmParser/llvmAsmParser.cpp
@@ -0,0 +1,2202 @@
+
+/* A Bison parser, made from llvmAsmParser.y
+ by GNU Bison version 1.28 */
+
+#define YYBISON 1 /* Identify Bison output. */
+
+#define yyparse llvmAsmparse
+#define yylex llvmAsmlex
+#define yyerror llvmAsmerror
+#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 VOID 261
+#define BOOL 262
+#define SBYTE 263
+#define UBYTE 264
+#define SHORT 265
+#define USHORT 266
+#define INT 267
+#define UINT 268
+#define LONG 269
+#define ULONG 270
+#define FLOAT 271
+#define DOUBLE 272
+#define STRING 273
+#define TYPE 274
+#define LABEL 275
+#define VAR_ID 276
+#define LABELSTR 277
+#define STRINGCONSTANT 278
+#define IMPLEMENTATION 279
+#define TRUE 280
+#define FALSE 281
+#define BEGINTOK 282
+#define END 283
+#define DECLARE 284
+#define PHI 285
+#define CALL 286
+#define RET 287
+#define BR 288
+#define SWITCH 289
+#define NEG 290
+#define NOT 291
+#define TOINT 292
+#define TOUINT 293
+#define ADD 294
+#define SUB 295
+#define MUL 296
+#define DIV 297
+#define REM 298
+#define SETLE 299
+#define SETGE 300
+#define SETLT 301
+#define SETGT 302
+#define SETEQ 303
+#define SETNE 304
+#define MALLOC 305
+#define ALLOCA 306
+#define FREE 307
+#define LOAD 308
+#define STORE 309
+#define GETFIELD 310
+#define PUTFIELD 311
+
+#line 13 "llvmAsmParser.y"
+
+#include "ParserInternals.h"
+#include "llvm/BasicBlock.h"
+#include "llvm/Method.h"
+#include "llvm/SymbolTable.h"
+#include "llvm/Module.h"
+#include "llvm/Type.h"
+#include "llvm/DerivedTypes.h"
+#include "llvm/Assembly/Parser.h"
+#include "llvm/ConstantPool.h"
+#include "llvm/iTerminators.h"
+#include "llvm/iMemory.h"
+#include <list>
+#include <utility> // Get definition of pair class
+#include <stdio.h> // This embarasment is due to our flex lexer...
+
+int yyerror(char *ErrorMsg); // Forward declarations to prevent "implicit
+int yylex(); // declaration" of xxx warnings.
+int yyparse();
+
+static Module *ParserResult;
+const ToolCommandLine *CurOptions = 0;
+
+// This contains info used when building the body of a method. It is destroyed
+// when the method is completed.
+//
+typedef vector<Value *> ValueList; // Numbered defs
+static void ResolveDefinitions(vector<ValueList> &LateResolvers);
+
+static struct PerModuleInfo {
+ Module *CurrentModule;
+ vector<ValueList> Values; // Module level numbered definitions
+ vector<ValueList> LateResolveValues;
+
+ void ModuleDone() {
+ // If we could not resolve some blocks at parsing time (forward branches)
+ // resolve the branches now...
+ ResolveDefinitions(LateResolveValues);
+
+ Values.clear(); // Clear out method local definitions
+ CurrentModule = 0;
+ }
+} CurModule;
+
+static struct PerMethodInfo {
+ Method *CurrentMethod; // Pointer to current method being created
+
+ vector<ValueList> Values; // Keep track of numbered definitions
+ vector<ValueList> LateResolveValues;
+
+ inline PerMethodInfo() {
+ CurrentMethod = 0;
+ }
+
+ inline ~PerMethodInfo() {}
+
+ inline void MethodStart(Method *M) {
+ CurrentMethod = M;
+ }
+
+ void MethodDone() {
+ // If we could not resolve some blocks at parsing time (forward branches)
+ // resolve the branches now...
+ ResolveDefinitions(LateResolveValues);
+
+ Values.clear(); // Clear out method local definitions
+ CurrentMethod = 0;
+ }
+} CurMeth; // Info for the current method...
+
+
+//===----------------------------------------------------------------------===//
+// Code to handle definitions of all the types
+//===----------------------------------------------------------------------===//
+
+static void InsertValue(Value *D, vector<ValueList> &ValueTab = CurMeth.Values) {
+ if (!D->hasName()) { // Is this a numbered definition?
+ unsigned type = D->getType()->getUniqueID();
+ if (ValueTab.size() <= type)
+ ValueTab.resize(type+1, ValueList());
+ //printf("Values[%d][%d] = %d\n", type, ValueTab[type].size(), D);
+ ValueTab[type].push_back(D);
+ }
+}
+
+static Value *getVal(const Type *Type, ValID &D,
+ bool DoNotImprovise = false) {
+ switch (D.Type) {
+ case 0: { // Is it a numbered definition?
+ unsigned type = Type->getUniqueID();
+ unsigned Num = (unsigned)D.Num;
+
+ // Module constants occupy the lowest numbered slots...
+ if (type < CurModule.Values.size()) {
+ if (Num < CurModule.Values[type].size())
+ return CurModule.Values[type][Num];
+
+ Num -= CurModule.Values[type].size();
+ }
+
+ // Make sure that our type is within bounds
+ if (CurMeth.Values.size() <= type)
+ break;
+
+ // Check that the number is within bounds...
+ if (CurMeth.Values[type].size() <= Num)
+ break;
+
+ return CurMeth.Values[type][Num];
+ }
+ case 1: { // Is it a named definition?
+ string Name(D.Name);
+ SymbolTable *SymTab = 0;
+ if (CurMeth.CurrentMethod)
+ SymTab = CurMeth.CurrentMethod->getSymbolTable();
+ Value *N = SymTab ? SymTab->lookup(Type, Name) : 0;
+
+ if (N == 0) {
+ SymTab = CurModule.CurrentModule->getSymbolTable();
+ if (SymTab)
+ N = SymTab->lookup(Type, Name);
+ if (N == 0) break;
+ }
+
+ D.destroy(); // Free old strdup'd memory...
+ return N;
+ }
+
+ case 2: // Is it a constant pool reference??
+ case 3: // Is it an unsigned const pool reference?
+ case 4:{ // Is it a string const pool reference?
+ ConstPoolVal *CPV = 0;
+
+ // Check to make sure that "Type" is an integral type, and that our
+ // value will fit into the specified type...
+ switch (D.Type) {
+ case 2:
+ if (Type == Type::BoolTy) { // Special handling for boolean data
+ CPV = new ConstPoolBool(D.ConstPool64 != 0);
+ } else {
+ if (!ConstPoolSInt::isValueValidForType(Type, D.ConstPool64))
+ ThrowException("Symbolic constant pool reference is invalid!");
+ CPV = new ConstPoolSInt(Type, D.ConstPool64);
+ }
+ break;
+ case 3:
+ if (!ConstPoolUInt::isValueValidForType(Type, D.UConstPool64)) {
+ if (!ConstPoolSInt::isValueValidForType(Type, D.ConstPool64)) {
+ ThrowException("Symbolic constant pool reference is invalid!");
+ } else { // This is really a signed reference. Transmogrify.
+ CPV = new ConstPoolSInt(Type, D.ConstPool64);
+ }
+ } else {
+ CPV = new ConstPoolUInt(Type, D.UConstPool64);
+ }
+ break;
+ case 4:
+ cerr << "FIXME: TODO: String constants [sbyte] not implemented yet!\n";
+ abort();
+ //CPV = new ConstPoolString(D.Name);
+ D.destroy(); // Free the string memory
+ break;
+ }
+ assert(CPV && "How did we escape creating a constant??");
+
+ // Scan through the constant table and see if we already have loaded this
+ // constant.
+ //
+ ConstantPool &CP = CurMeth.CurrentMethod ?
+ CurMeth.CurrentMethod->getConstantPool() :
+ CurModule.CurrentModule->getConstantPool();
+ ConstPoolVal *C = CP.find(CPV); // Already have this constant?
+ if (C) {
+ delete CPV; // Didn't need this after all, oh well.
+ return C; // Yup, we already have one, recycle it!
+ }
+ CP.insert(CPV);
+
+ // Success, everything is kosher. Lets go!
+ return CPV;
+ } // End of case 2,3,4
+ } // End of switch
+
+
+ // If we reached here, we referenced either a symbol that we don't know about
+ // or an id number that hasn't been read yet. We may be referencing something
+ // forward, so just create an entry to be resolved later and get to it...
+ //
+ if (DoNotImprovise) return 0; // Do we just want a null to be returned?
+
+ // TODO: Attempt to coallecse nodes that are the same with previous ones.
+ Value *d = 0;
+ switch (Type->getPrimitiveID()) {
+ case Type::LabelTyID: d = new BBPlaceHolder(Type, D); break;
+ case Type::MethodTyID:
+ d = new MethPlaceHolder(Type, D);
+ InsertValue(d, CurModule.LateResolveValues);
+ return d;
+//case Type::ClassTyID: d = new ClassPlaceHolder(Type, D); break;
+ default: d = new DefPlaceHolder(Type, D); break;
+ }
+
+ assert(d != 0 && "How did we not make something?");
+ InsertValue(d, CurMeth.LateResolveValues);
+ return d;
+}
+
+
+//===----------------------------------------------------------------------===//
+// Code to handle forward references in instructions
+//===----------------------------------------------------------------------===//
+//
+// This code handles the late binding needed with statements that reference
+// values not defined yet... for example, a forward branch, or the PHI node for
+// a loop body.
+//
+// This keeps a table (CurMeth.LateResolveValues) of all such forward references
+// and back patchs after we are done.
+//
+
+// ResolveDefinitions - If we could not resolve some defs at parsing
+// time (forward branches, phi functions for loops, etc...) resolve the
+// defs now...
+//
+static void ResolveDefinitions(vector<ValueList> &LateResolvers) {
+ // Loop over LateResolveDefs fixing up stuff that couldn't be resolved
+ for (unsigned ty = 0; ty < LateResolvers.size(); ty++) {
+ while (!LateResolvers[ty].empty()) {
+ Value *V = LateResolvers[ty].back();
+ LateResolvers[ty].pop_back();
+ ValID &DID = getValIDFromPlaceHolder(V);
+
+ Value *TheRealValue = getVal(Type::getUniqueIDType(ty), DID, true);
+
+ if (TheRealValue == 0 && DID.Type == 1)
+ ThrowException("Reference to an invalid definition: '" +DID.getName() +
+ "' of type '" + V->getType()->getName() + "'");
+ else if (TheRealValue == 0)
+ ThrowException("Reference to an invalid definition: #" +itostr(DID.Num)+
+ " of type '" + V->getType()->getName() + "'");
+
+ V->replaceAllUsesWith(TheRealValue);
+ assert(V->use_empty());
+ delete V;
+ }
+ }
+
+ LateResolvers.clear();
+}
+
+// addConstValToConstantPool - This code is used to insert a constant into the
+// current constant pool. This is designed to make maximal (but not more than
+// possible) reuse (merging) of constants in the constant pool. This means that
+// multiple references to %4, for example will all get merged.
+//
+static ConstPoolVal *addConstValToConstantPool(ConstPoolVal *C) {
+ vector<ValueList> &ValTab = CurMeth.CurrentMethod ?
+ CurMeth.Values : CurModule.Values;
+ ConstantPool &CP = CurMeth.CurrentMethod ?
+ CurMeth.CurrentMethod->getConstantPool() :
+ CurModule.CurrentModule->getConstantPool();
+
+ if (ConstPoolVal *CPV = CP.find(C)) {
+ // Constant already in constant pool. Try to merge the two constants
+ if (CPV->hasName() && !C->hasName()) {
+ // Merge the two values, we inherit the existing CPV's name.
+ // InsertValue requires that the value have no name to insert correctly
+ // (because we want to fill the slot this constant would have filled)
+ //
+ string Name = CPV->getName();
+ CPV->setName("");
+ InsertValue(CPV, ValTab);
+ CPV->setName(Name);
+ delete C;
+ return CPV;
+ } else if (!CPV->hasName() && C->hasName()) {
+ // If we have a name on this value and there isn't one in the const
+ // pool val already, propogate it.
+ //
+ CPV->setName(C->getName());
+ delete C; // Sorry, you're toast
+ return CPV;
+ } else if (CPV->hasName() && C->hasName()) {
+ // Both values have distinct names. We cannot merge them.
+ CP.insert(C);
+ InsertValue(C, ValTab);
+ return C;
+ } else if (!CPV->hasName() && !C->hasName()) {
+ // Neither value has a name, trivially merge them.
+ InsertValue(CPV, ValTab);
+ delete C;
+ return CPV;
+ }
+
+ assert(0 && "Not reached!");
+ return 0;
+ } else { // No duplication of value.
+ CP.insert(C);
+ InsertValue(C, ValTab);
+ return C;
+ }
+}
+
+//===----------------------------------------------------------------------===//
+// RunVMAsmParser - Define an interface to this parser
+//===----------------------------------------------------------------------===//
+//
+Module *RunVMAsmParser(const ToolCommandLine &Opts, FILE *F) {
+ llvmAsmin = F;
+ CurOptions = &Opts;
+ llvmAsmlineno = 1; // Reset the current line number...
+
+ CurModule.CurrentModule = new Module(); // Allocate a new module to read
+ yyparse(); // Parse the file.
+ Module *Result = ParserResult;
+ CurOptions = 0;
+ llvmAsmin = stdin; // F is about to go away, don't use it anymore...
+ ParserResult = 0;
+
+ return Result;
+}
+
+
+#line 337 "llvmAsmParser.y"
+typedef union {
+ Module *ModuleVal;
+ Method *MethodVal;
+ MethodArgument *MethArgVal;
+ BasicBlock *BasicBlockVal;
+ TerminatorInst *TermInstVal;
+ Instruction *InstVal;
+ ConstPoolVal *ConstVal;
+ const Type *TypeVal;
+
+ list<MethodArgument*> *MethodArgList;
+ list<Value*> *ValueList;
+ list<const Type*> *TypeList;
+ list<pair<ConstPoolVal*, BasicBlock*> > *JumpTable;
+ vector<ConstPoolVal*> *ConstVector;
+
+ int64_t SInt64Val;
+ uint64_t UInt64Val;
+ int SIntVal;
+ unsigned UIntVal;
+
+ char *StrVal; // This memory is allocated by strdup!
+ ValID ValIDVal; // May contain memory allocated by strdup
+
+ Instruction::UnaryOps UnaryOpVal;
+ Instruction::BinaryOps BinaryOpVal;
+ Instruction::TermOps TermOpVal;
+ Instruction::MemoryOps MemOpVal;
+} YYSTYPE;
+#include <stdio.h>
+
+#ifndef __cplusplus
+#ifndef __STDC__
+#define const
+#endif
+#endif
+
+
+
+#define YYFINAL 220
+#define YYFLAG -32768
+#define YYNTBASE 68
+
+#define YYTRANSLATE(x) ((unsigned)(x) <= 311 ? yytranslate[x] : 103)
+
+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, 65,
+ 66, 67, 2, 64, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 58, 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,
+ 59, 2, 60, 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, 61,
+ 2, 2, 62, 2, 63, 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
+};
+
+#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, 66, 68, 70, 72, 74, 76, 78,
+ 80, 82, 84, 86, 88, 90, 93, 94, 97, 100,
+ 103, 106, 109, 112, 119, 125, 134, 142, 149, 154,
+ 158, 160, 164, 165, 167, 170, 173, 175, 176, 179,
+ 183, 185, 187, 188, 194, 198, 201, 203, 205, 207,
+ 209, 211, 213, 215, 217, 219, 224, 228, 232, 238,
+ 242, 245, 248, 250, 254, 257, 260, 263, 267, 270,
+ 271, 275, 278, 282, 292, 302, 309, 315, 318, 321,
+ 325, 327, 328, 334, 338, 341, 348, 350, 353, 359,
+ 362, 368
+};
+
+static const short yyrhs[] = { 5,
+ 0, 6, 0, 3, 0, 4, 0, 8, 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, 70, 0, 7, 0, 36,
+ 0, 37, 0, 38, 0, 39, 0, 40, 0, 41,
+ 0, 42, 0, 43, 0, 44, 0, 45, 0, 46,
+ 0, 47, 0, 48, 0, 49, 0, 50, 0, 15,
+ 0, 13, 0, 11, 0, 9, 0, 16, 0, 14,
+ 0, 12, 0, 10, 0, 74, 0, 75, 0, 22,
+ 58, 0, 0, 74, 69, 0, 75, 4, 0, 8,
+ 26, 0, 8, 27, 0, 19, 24, 0, 20, 70,
+ 0, 59, 70, 60, 59, 79, 60, 0, 59, 70,
+ 60, 59, 60, 0, 59, 4, 61, 70, 60, 59,
+ 79, 60, 0, 59, 4, 61, 70, 60, 59, 60,
+ 0, 62, 92, 63, 62, 79, 63, 0, 62, 63,
+ 62, 63, 0, 79, 64, 78, 0, 78, 0, 80,
+ 77, 78, 0, 0, 82, 0, 82, 89, 0, 80,
+ 25, 0, 22, 0, 0, 70, 83, 0, 84, 64,
+ 85, 0, 84, 0, 85, 0, 0, 71, 24, 65,
+ 86, 66, 0, 87, 80, 28, 0, 93, 29, 0,
+ 3, 0, 4, 0, 26, 0, 27, 0, 24, 0,
+ 68, 0, 22, 0, 90, 0, 91, 0, 71, 65,
+ 92, 66, 0, 71, 65, 66, 0, 59, 70, 60,
+ 0, 59, 4, 61, 70, 60, 0, 62, 92, 63,
+ 0, 62, 63, 0, 70, 67, 0, 70, 0, 92,
+ 64, 70, 0, 93, 94, 0, 88, 94, 0, 95,
+ 96, 0, 23, 95, 96, 0, 95, 98, 0, 0,
+ 33, 70, 91, 0, 33, 7, 0, 34, 21, 91,
+ 0, 34, 8, 91, 64, 21, 91, 64, 21, 91,
+ 0, 35, 76, 91, 64, 21, 91, 59, 97, 60,
+ 0, 97, 76, 90, 64, 21, 91, 0, 76, 90,
+ 64, 21, 91, 0, 77, 101, 0, 70, 91, 0,
+ 99, 64, 91, 0, 99, 0, 0, 73, 70, 91,
+ 64, 91, 0, 72, 70, 91, 0, 31, 99, 0,
+ 32, 70, 91, 65, 100, 66, 0, 102, 0, 51,
+ 70, 0, 51, 70, 64, 14, 91, 0, 52, 70,
+ 0, 52, 70, 64, 14, 91, 0, 53, 70, 91,
+ 0
+};
+
+#endif
+
+#if YYDEBUG != 0
+static const short yyrline[] = { 0,
+ 433, 434, 441, 442, 453, 453, 453, 453, 453, 453,
+ 453, 454, 454, 454, 454, 454, 454, 454, 457, 457,
+ 462, 462, 462, 462, 463, 463, 463, 463, 463, 464,
+ 464, 464, 464, 464, 464, 468, 468, 468, 468, 469,
+ 469, 469, 469, 470, 470, 472, 475, 479, 484, 489,
+ 492, 495, 501, 504, 517, 521, 539, 546, 554, 568,
+ 571, 577, 585, 596, 601, 606, 615, 615, 617, 625,
+ 629, 634, 637, 641, 668, 672, 681, 684, 687, 690,
+ 693, 698, 701, 704, 711, 719, 724, 728, 731, 734,
+ 739, 742, 747, 751, 756, 760, 769, 774, 783, 787,
+ 791, 794, 797, 800, 805, 816, 824, 834, 842, 846,
+ 852, 852, 854, 859, 864, 873, 910, 914, 919, 929,
+ 934, 944
+};
+#endif
+
+
+#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
+
+static const char * const yytname[] = { "$","error","$undefined.","ESINT64VAL",
+"EUINT64VAL","SINTVAL","UINTVAL","VOID","BOOL","SBYTE","UBYTE","SHORT","USHORT",
+"INT","UINT","LONG","ULONG","FLOAT","DOUBLE","STRING","TYPE","LABEL","VAR_ID",
+"LABELSTR","STRINGCONSTANT","IMPLEMENTATION","TRUE","FALSE","BEGINTOK","END",
+"DECLARE","PHI","CALL","RET","BR","SWITCH","NEG","NOT","TOINT","TOUINT","ADD",
+"SUB","MUL","DIV","REM","SETLE","SETGE","SETLT","SETGT","SETEQ","SETNE","MALLOC",
+"ALLOCA","FREE","LOAD","STORE","GETFIELD","PUTFIELD","'='","'['","']'","'x'",
+"'{'","'}'","','","'('","')'","'*'","INTVAL","EINT64VAL","Types","TypesV","UnaryOps",
+"BinaryOps","SIntType","UIntType","IntType","OptAssign","ConstVal","ConstVector",
+"ConstPool","Module","MethodList","OptVAR_ID","ArgVal","ArgListH","ArgList",
+"MethodHeaderH","MethodHeader","Method","ConstValueRef","ValueRef","TypeList",
+"BasicBlockList","BasicBlock","InstructionList","BBTerminatorInst","JumpTable",
+"Inst","ValueRefList","ValueRefListE","InstVal","MemoryInst", NULL
+};
+#endif
+
+static const short yyr1[] = { 0,
+ 68, 68, 69, 69, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 71, 71,
+ 72, 72, 72, 72, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 74, 74, 74, 74, 75,
+ 75, 75, 75, 76, 76, 77, 77, 78, 78, 78,
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 79,
+ 79, 80, 80, 81, 82, 82, 83, 83, 84, 85,
+ 85, 86, 86, 87, 88, 89, 90, 90, 90, 90,
+ 90, 91, 91, 91, 70, 70, 70, 70, 70, 70,
+ 70, 70, 92, 92, 93, 93, 94, 94, 95, 95,
+ 96, 96, 96, 96, 96, 97, 97, 98, 99, 99,
+ 100, 100, 101, 101, 101, 101, 101, 102, 102, 102,
+ 102, 102
+};
+
+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, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 2, 0, 2, 2, 2,
+ 2, 2, 2, 6, 5, 8, 7, 6, 4, 3,
+ 1, 3, 0, 1, 2, 2, 1, 0, 2, 3,
+ 1, 1, 0, 5, 3, 2, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 4, 3, 3, 5, 3,
+ 2, 2, 1, 3, 2, 2, 2, 3, 2, 0,
+ 3, 2, 3, 9, 9, 6, 5, 2, 2, 3,
+ 1, 0, 5, 3, 2, 6, 1, 2, 5, 2,
+ 5, 3
+};
+
+static const short yydefact[] = { 63,
+ 47, 64, 0, 66, 0, 77, 78, 1, 2, 20,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 83, 81, 79, 80, 0, 0,
+ 82, 19, 0, 63, 100, 65, 84, 85, 100, 46,
+ 0, 39, 43, 38, 42, 37, 41, 36, 40, 0,
+ 0, 0, 0, 0, 0, 62, 78, 19, 0, 91,
+ 93, 0, 92, 0, 0, 47, 100, 96, 47, 76,
+ 95, 50, 51, 52, 53, 78, 19, 0, 0, 3,
+ 4, 48, 49, 0, 88, 90, 0, 73, 87, 0,
+ 75, 47, 0, 0, 0, 0, 97, 99, 0, 0,
+ 0, 0, 19, 94, 68, 71, 72, 0, 86, 98,
+ 102, 19, 0, 0, 44, 45, 0, 0, 0, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 0, 0, 0, 0, 0, 108,
+ 117, 19, 0, 59, 0, 89, 67, 69, 0, 74,
+ 101, 0, 103, 0, 19, 115, 19, 118, 120, 19,
+ 19, 19, 0, 55, 61, 0, 0, 70, 0, 0,
+ 109, 0, 0, 0, 0, 122, 114, 0, 0, 54,
+ 0, 58, 0, 0, 110, 112, 0, 0, 0, 57,
+ 0, 60, 0, 0, 111, 0, 119, 121, 113, 56,
+ 0, 0, 116, 0, 0, 0, 104, 0, 105, 0,
+ 0, 0, 0, 0, 107, 0, 106, 0, 0, 0
+};
+
+static const short yydefgoto[] = { 31,
+ 82, 61, 59, 138, 139, 54, 55, 117, 5, 165,
+ 166, 1, 218, 2, 148, 106, 107, 108, 34, 35,
+ 36, 37, 38, 62, 39, 68, 69, 97, 206, 98,
+ 156, 196, 140, 141
+};
+
+static const short yypact[] = {-32768,
+ 59, 295, -23,-32768, 435,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 320, 209,
+-32768, -21, -20,-32768, 38,-32768,-32768,-32768, 83,-32768,
+ 66,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 77,
+ 295, 380, 234, 206, 122,-32768, 107, 29, 108,-32768,
+ 167, 6,-32768, 111, 145, 101,-32768,-32768, 45,-32768,
+-32768,-32768,-32768,-32768, 167, 142, 44, 121, 81,-32768,
+-32768,-32768,-32768, 295,-32768,-32768, 295, 295,-32768, 193,
+-32768, 45, 405, 1, 264, 149,-32768,-32768, 295, 205,
+ 202, 204, 58, 167, 10, 203,-32768, 215,-32768,-32768,
+ 217, 7, 116, 116,-32768,-32768, 116, 295, 295,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768, 295, 295, 295, 295, 295,-32768,
+-32768, 72, 28,-32768, 435,-32768,-32768,-32768, 295,-32768,
+-32768, 219,-32768, 220, 7, 221, 7, -59, 141, 7,
+ 7, 7, 210,-32768,-32768, 110, 199,-32768, 249, 265,
+-32768, 116, 222, 274, 275,-32768,-32768, 226, 43,-32768,
+ 435,-32768, 116, 116,-32768, 295, 116, 116, 116,-32768,
+ 115,-32768, 227, 233, 221, 228,-32768,-32768,-32768,-32768,
+ 297, 264,-32768, 116, 104, 5,-32768, 231,-32768, 104,
+ 299, 279, 116, 324,-32768, 116,-32768, 348, 349,-32768
+};
+
+static const short yypgoto[] = {-32768,
+-32768, -2, 350,-32768,-32768, -93, -92, -24, -62, -4,
+ -119, 316,-32768,-32768,-32768,-32768, 207,-32768,-32768,-32768,
+-32768, -64, -89, 11,-32768, 312, 286, 263,-32768,-32768,
+ 172,-32768,-32768,-32768
+};
+
+
+#define YYLAST 497
+
+
+static const short yytable[] = { 32,
+ 56, 115, 116, 64, 174, -19, 96, 63, 113, 6,
+ 7, 8, 9, 42, 43, 44, 45, 46, 47, 48,
+ 49, 114, 151, 152, 153, 167, 58, 154, 25, 96,
+ 26, 147, 27, 28, 40, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 65, 63, 50, 51, 75, 77,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 191,
+ 67, 50, 51, 79, 209, 171, 3, 173, 86, 87,
+ 176, 177, 178, 63, -19, 90, 63, 93, 94, 95,
+ 3, 103, 185, 4, 104, 105, 52, 164, 85, 53,
+ 112, 72, 73, 193, 194, 63, 142, 197, 198, 199,
+ 74, 52, 190, 100, 53, 67, 6, 7, 115, 116,
+ 63, 70, 115, 116, 207, 155, 157, 146, 6, 7,
+ 8, 9, 3, 215, 63, 83, 217, 26, 91, 27,
+ 28, 163, 158, 159, 160, 161, 162, 25, 63, 26,
+ 208, 27, 28, 102, 87, 212, 105, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 84, 26, 180,
+ 27, 28, 65, 181, 200, 88, 192, 205, 181, 118,
+ 119, 210, 101, 155, 120, 121, 122, 123, 124, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, 99, 29, 175, -19, 30, 63, 80, 81,
+ 89, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, -19, 26, 63, 27, 28, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 87, 26, 109, 27,
+ 28, 182, 181, 143, 144, 145, 149, 29, 179, 183,
+ 30, 60, 42, 43, 44, 45, 46, 47, 48, 49,
+ 150, -20, 169, 170, 172, 184, 186, 187, 188, 189,
+ 201, 202, 29, 203, 211, 30, 78, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 204, 26, 213,
+ 27, 28, 6, 57, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 214, 26, 216, 27, 28, 219, 220, 66,
+ 71, 33, 92, 29, 110, 168, 30, 195, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 29, 0,
+ 0, 30, 6, 76, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 0, 26, 0, 27, 28, 6, 7, 8,
+ 9, 111, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 0, 26, 0,
+ 27, 28, 0, 0, 0, 0, 0, 0, 29, 0,
+ 0, 30, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 0, 0, 50, 51, 0, 0, 0, 0, 0,
+ 0, 0, 0, 29, 0, 0, 30, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 52, 0, 0, 53
+};
+
+static const short yycheck[] = { 2,
+ 5, 95, 95, 24, 64, 65, 69, 67, 8, 3,
+ 4, 5, 6, 9, 10, 11, 12, 13, 14, 15,
+ 16, 21, 112, 113, 114, 145, 29, 117, 22, 92,
+ 24, 22, 26, 27, 58, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 65, 67, 19, 20, 51, 52,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 179,
+ 23, 19, 20, 53, 60, 155, 22, 157, 63, 64,
+ 160, 161, 162, 67, 65, 65, 67, 33, 34, 35,
+ 22, 84, 172, 25, 87, 88, 59, 60, 60, 62,
+ 93, 26, 27, 183, 184, 67, 99, 187, 188, 189,
+ 24, 59, 60, 60, 62, 23, 3, 4, 202, 202,
+ 67, 29, 206, 206, 204, 118, 119, 60, 3, 4,
+ 5, 6, 22, 213, 67, 4, 216, 24, 28, 26,
+ 27, 60, 135, 136, 137, 138, 139, 22, 67, 24,
+ 205, 26, 27, 63, 64, 210, 149, 3, 4, 5,
+ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 61, 24, 60,
+ 26, 27, 65, 64, 60, 65, 181, 202, 64, 31,
+ 32, 206, 62, 186, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 53, 61, 59, 64, 65, 62, 67, 3, 4,
+ 66, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 65, 24, 67, 26, 27, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 64, 24, 66, 26,
+ 27, 63, 64, 59, 63, 62, 64, 59, 59, 21,
+ 62, 63, 9, 10, 11, 12, 13, 14, 15, 16,
+ 66, 65, 64, 64, 64, 21, 65, 14, 14, 64,
+ 64, 59, 59, 66, 64, 62, 63, 3, 4, 5,
+ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 21, 24, 21,
+ 26, 27, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 64, 24, 21, 26, 27, 0, 0, 34,
+ 39, 2, 67, 59, 92, 149, 62, 186, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 59, -1,
+ -1, 62, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, -1, 24, -1, 26, 27, 3, 4, 5,
+ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, -1, 24, -1,
+ 26, 27, -1, -1, -1, -1, -1, -1, 59, -1,
+ -1, 62, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, -1, -1, 19, 20, -1, -1, -1, -1, -1,
+ -1, -1, -1, 59, -1, -1, 62, -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, 59, -1, -1, 62
+};
+/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
+#line 3 "/usr/dcs/software/supported/encap/bison-1.28/share/bison.simple"
+/* This file comes from bison-1.28. */
+
+/* Skeleton output parser for bison,
+ Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
+
+ 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. */
+
+/* This is the parser code that is written into each bison parser
+ when the %semantic_parser declaration is not specified in the grammar.
+ It was written by Richard Stallman by simplifying the hairy parser
+ used when %semantic_parser is specified. */
+
+#ifndef YYSTACK_USE_ALLOCA
+#ifdef alloca
+#define YYSTACK_USE_ALLOCA
+#else /* alloca not defined */
+#ifdef __GNUC__
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#else /* not GNU C. */
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
+#define YYSTACK_USE_ALLOCA
+#include <alloca.h>
+#else /* not sparc */
+/* We think this test detects Watcom and Microsoft C. */
+/* This used to test MSDOS, but that is a bad idea
+ since that symbol is in the user namespace. */
+#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
+#if 0 /* No need for malloc.h, which pollutes the namespace;
+ instead, just don't use alloca. */
+#include <malloc.h>
+#endif
+#else /* not MSDOS, or __TURBOC__ */
+#if defined(_AIX)
+/* I don't know what this was needed for, but it pollutes the namespace.
+ So I turned it off. rms, 2 May 1997. */
+/* #include <malloc.h> */
+ #pragma alloca
+#define YYSTACK_USE_ALLOCA
+#else /* not MSDOS, or __TURBOC__, or _AIX */
+#if 0
+#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
+ and on HPUX 10. Eventually we can turn this on. */
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#endif /* __hpux */
+#endif
+#endif /* not _AIX */
+#endif /* not MSDOS, or __TURBOC__ */
+#endif /* not sparc */
+#endif /* not GNU C */
+#endif /* alloca not defined */
+#endif /* YYSTACK_USE_ALLOCA not defined */
+
+#ifdef YYSTACK_USE_ALLOCA
+#define YYSTACK_ALLOC alloca
+#else
+#define YYSTACK_ALLOC malloc
+#endif
+
+/* Note: there must be only one dollar sign in this file.
+ It is replaced by the list of actions, each action
+ as one case of the switch. */
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY -2
+#define YYEOF 0
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrlab1
+/* Like YYERROR except do call yyerror.
+ This remains here temporarily to ease the
+ transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go.