LLVM API Documentation

llvmAsmParser.h

Go to the documentation of this file.
00001 /* A Bison parser, made by GNU Bison 2.3.  */
00002 
00003 /* Skeleton interface for Bison's Yacc-like parsers in C
00004 
00005    Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
00006    Free Software Foundation, Inc.
00007 
00008    This program is free software; you can redistribute it and/or modify
00009    it under the terms of the GNU General Public License as published by
00010    the Free Software Foundation; either version 2, or (at your option)
00011    any later version.
00012 
00013    This program is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016    GNU General Public License for more details.
00017 
00018    You should have received a copy of the GNU General Public License
00019    along with this program; if not, write to the Free Software
00020    Foundation, Inc., 51 Franklin Street, Fifth Floor,
00021    Boston, MA 02110-1301, USA.  */
00022 
00023 /* As a special exception, you may create a larger work that contains
00024    part or all of the Bison parser skeleton and distribute that work
00025    under terms of your choice, so long as that work isn't itself a
00026    parser generator using the skeleton or a modified version thereof
00027    as a parser skeleton.  Alternatively, if you modify or redistribute
00028    the parser skeleton itself, you may (at your option) remove this
00029    special exception, which will cause the skeleton and the resulting
00030    Bison output files to be licensed under the GNU General Public
00031    License without this special exception.
00032 
00033    This special exception was added by the Free Software Foundation in
00034    version 2.2 of Bison.  */
00035 
00036 /* Tokens.  */
00037 #ifndef YYTOKENTYPE
00038 # define YYTOKENTYPE
00039    /* Put the tokens into the symbol table, so that GDB and other debuggers
00040       know about them.  */
00041    enum yytokentype {
00042      ESINT64VAL = 258,
00043      EUINT64VAL = 259,
00044      SINTVAL = 260,
00045      UINTVAL = 261,
00046      FPVAL = 262,
00047      VOID = 263,
00048      BOOL = 264,
00049      SBYTE = 265,
00050      UBYTE = 266,
00051      SHORT = 267,
00052      USHORT = 268,
00053      INT = 269,
00054      UINT = 270,
00055      LONG = 271,
00056      ULONG = 272,
00057      FLOAT = 273,
00058      DOUBLE = 274,
00059      TYPE = 275,
00060      LABEL = 276,
00061      VAR_ID = 277,
00062      LABELSTR = 278,
00063      STRINGCONSTANT = 279,
00064      IMPLEMENTATION = 280,
00065      ZEROINITIALIZER = 281,
00066      TRUETOK = 282,
00067      FALSETOK = 283,
00068      BEGINTOK = 284,
00069      ENDTOK = 285,
00070      DECLARE = 286,
00071      GLOBAL = 287,
00072      CONSTANT = 288,
00073      SECTION = 289,
00074      VOLATILE = 290,
00075      TO = 291,
00076      DOTDOTDOT = 292,
00077      NULL_TOK = 293,
00078      UNDEF = 294,
00079      CONST = 295,
00080      INTERNAL = 296,
00081      LINKONCE = 297,
00082      WEAK = 298,
00083      APPENDING = 299,
00084      OPAQUE = 300,
00085      NOT = 301,
00086      EXTERNAL = 302,
00087      TARGET = 303,
00088      TRIPLE = 304,
00089      ENDIAN = 305,
00090      POINTERSIZE = 306,
00091      LITTLE = 307,
00092      BIG = 308,
00093      ALIGN = 309,
00094      DEPLIBS = 310,
00095      CALL = 311,
00096      TAIL = 312,
00097      ASM_TOK = 313,
00098      MODULE = 314,
00099      SIDEEFFECT = 315,
00100      CC_TOK = 316,
00101      CCC_TOK = 317,
00102      FASTCC_TOK = 318,
00103      COLDCC_TOK = 319,
00104      RET = 320,
00105      BR = 321,
00106      SWITCH = 322,
00107      INVOKE = 323,
00108      UNWIND = 324,
00109      UNREACHABLE = 325,
00110      ADD = 326,
00111      SUB = 327,
00112      MUL = 328,
00113      DIV = 329,
00114      REM = 330,
00115      AND = 331,
00116      OR = 332,
00117      XOR = 333,
00118      SETLE = 334,
00119      SETGE = 335,
00120      SETLT = 336,
00121      SETGT = 337,
00122      SETEQ = 338,
00123      SETNE = 339,
00124      MALLOC = 340,
00125      ALLOCA = 341,
00126      FREE = 342,
00127      LOAD = 343,
00128      STORE = 344,
00129      GETELEMENTPTR = 345,
00130      PHI_TOK = 346,
00131      CAST = 347,
00132      SELECT = 348,
00133      SHL = 349,
00134      SHR = 350,
00135      VAARG = 351,
00136      EXTRACTELEMENT = 352,
00137      INSERTELEMENT = 353,
00138      SHUFFLEVECTOR = 354,
00139      VAARG_old = 355,
00140      VANEXT_old = 356
00141    };
00142 #endif
00143 /* Tokens.  */
00144 #define ESINT64VAL 258
00145 #define EUINT64VAL 259
00146 #define SINTVAL 260
00147 #define UINTVAL 261
00148 #define FPVAL 262
00149 #define VOID 263
00150 #define BOOL 264
00151 #define SBYTE 265
00152 #define UBYTE 266
00153 #define SHORT 267
00154 #define USHORT 268
00155 #define INT 269
00156 #define UINT 270
00157 #define LONG 271
00158 #define ULONG 272
00159 #define FLOAT 273
00160 #define DOUBLE 274
00161 #define TYPE 275
00162 #define LABEL 276
00163 #define VAR_ID 277
00164 #define LABELSTR 278
00165 #define STRINGCONSTANT 279
00166 #define IMPLEMENTATION 280
00167 #define ZEROINITIALIZER 281
00168 #define TRUETOK 282
00169 #define FALSETOK 283
00170 #define BEGINTOK 284
00171 #define ENDTOK 285
00172 #define DECLARE 286
00173 #define GLOBAL 287
00174 #define CONSTANT 288
00175 #define SECTION 289
00176 #define VOLATILE 290
00177 #define TO 291
00178 #define DOTDOTDOT 292
00179 #define NULL_TOK 293
00180 #define UNDEF 294
00181 #define CONST 295
00182 #define INTERNAL 296
00183 #define LINKONCE 297
00184 #define WEAK 298
00185 #define APPENDING 299
00186 #define OPAQUE 300
00187 #define NOT 301
00188 #define EXTERNAL 302
00189 #define TARGET 303
00190 #define TRIPLE 304
00191 #define ENDIAN 305
00192 #define POINTERSIZE 306
00193 #define LITTLE 307
00194 #define BIG 308
00195 #define ALIGN 309
00196 #define DEPLIBS 310
00197 #define CALL 311
00198 #define TAIL 312
00199 #define ASM_TOK 313
00200 #define MODULE 314
00201 #define SIDEEFFECT 315
00202 #define CC_TOK 316
00203 #define CCC_TOK 317
00204 #define FASTCC_TOK 318
00205 #define COLDCC_TOK 319
00206 #define RET 320
00207 #define BR 321
00208 #define SWITCH 322
00209 #define INVOKE 323
00210 #define UNWIND 324
00211 #define UNREACHABLE 325
00212 #define ADD 326
00213 #define SUB 327
00214 #define MUL 328
00215 #define DIV 329
00216 #define REM 330
00217 #define AND 331
00218 #define OR 332
00219 #define XOR 333
00220 #define SETLE 334
00221 #define SETGE 335
00222 #define SETLT 336
00223 #define SETGT 337
00224 #define SETEQ 338
00225 #define SETNE 339
00226 #define MALLOC 340
00227 #define ALLOCA 341
00228 #define FREE 342
00229 #define LOAD 343
00230 #define STORE 344
00231 #define GETELEMENTPTR 345
00232 #define PHI_TOK 346
00233 #define CAST 347
00234 #define SELECT 348
00235 #define SHL 349
00236 #define SHR 350
00237 #define VAARG 351
00238 #define EXTRACTELEMENT 352
00239 #define INSERTELEMENT 353
00240 #define SHUFFLEVECTOR 354
00241 #define VAARG_old 355
00242 #define VANEXT_old 356
00243 
00244 
00245 
00246 
00247 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
00248 typedef union YYSTYPE
00249 #line 890 "/build/buildd/llvm-1.7/llvm/lib/AsmParser/llvmAsmParser.y"
00250 {
00251   llvm::Module                           *ModuleVal;
00252   llvm::Function                         *FunctionVal;
00253   std::pair<llvm::PATypeHolder*, char*>  *ArgVal;
00254   llvm::BasicBlock                       *BasicBlockVal;
00255   llvm::TerminatorInst                   *TermInstVal;
00256   llvm::Instruction                      *InstVal;
00257   llvm::Constant                         *ConstVal;
00258 
00259   const llvm::Type                       *PrimType;
00260   llvm::PATypeHolder                     *TypeVal;
00261   llvm::Value                            *ValueVal;
00262 
00263   std::vector<std::pair<llvm::PATypeHolder*,char*> > *ArgList;
00264   std::vector<llvm::Value*>              *ValueList;
00265   std::list<llvm::PATypeHolder>          *TypeList;
00266   // Represent the RHS of PHI node
00267   std::list<std::pair<llvm::Value*,
00268                       llvm::BasicBlock*> > *PHIList;
00269   std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;
00270   std::vector<llvm::Constant*>           *ConstVector;
00271 
00272   llvm::GlobalValue::LinkageTypes         Linkage;
00273   int64_t                           SInt64Val;
00274   uint64_t                          UInt64Val;
00275   int                               SIntVal;
00276   unsigned                          UIntVal;
00277   double                            FPVal;
00278   bool                              BoolVal;
00279 
00280   char                             *StrVal;   // This memory is strdup'd!
00281   llvm::ValID                             ValIDVal; // strdup'd memory maybe!
00282 
00283   llvm::Instruction::BinaryOps            BinaryOpVal;
00284   llvm::Instruction::TermOps              TermOpVal;
00285   llvm::Instruction::MemoryOps            MemOpVal;
00286   llvm::Instruction::OtherOps             OtherOpVal;
00287   llvm::Module::Endianness                Endianness;
00288 }
00289 /* Line 1529 of yacc.c.  */
00290 #line 291 "llvmAsmParser.tab.h"
00291   YYSTYPE;
00292 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
00293 # define YYSTYPE_IS_DECLARED 1
00294 # define YYSTYPE_IS_TRIVIAL 1
00295 #endif
00296 
00297 extern YYSTYPE llvmAsmlval;
00298