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      CSRETCC_TOK = 318,
00103      FASTCC_TOK = 319,
00104      COLDCC_TOK = 320,
00105      RET = 321,
00106      BR = 322,
00107      SWITCH = 323,
00108      INVOKE = 324,
00109      UNWIND = 325,
00110      UNREACHABLE = 326,
00111      ADD = 327,
00112      SUB = 328,
00113      MUL = 329,
00114      DIV = 330,
00115      REM = 331,
00116      AND = 332,
00117      OR = 333,
00118      XOR = 334,
00119      SETLE = 335,
00120      SETGE = 336,
00121      SETLT = 337,
00122      SETGT = 338,
00123      SETEQ = 339,
00124      SETNE = 340,
00125      MALLOC = 341,
00126      ALLOCA = 342,
00127      FREE = 343,
00128      LOAD = 344,
00129      STORE = 345,
00130      GETELEMENTPTR = 346,
00131      PHI_TOK = 347,
00132      CAST = 348,
00133      SELECT = 349,
00134      SHL = 350,
00135      SHR = 351,
00136      VAARG = 352,
00137      EXTRACTELEMENT = 353,
00138      INSERTELEMENT = 354,
00139      SHUFFLEVECTOR = 355,
00140      VAARG_old = 356,
00141      VANEXT_old = 357
00142    };
00143 #endif
00144 /* Tokens.  */
00145 #define ESINT64VAL 258
00146 #define EUINT64VAL 259
00147 #define SINTVAL 260
00148 #define UINTVAL 261
00149 #define FPVAL 262
00150 #define VOID 263
00151 #define BOOL 264
00152 #define SBYTE 265
00153 #define UBYTE 266
00154 #define SHORT 267
00155 #define USHORT 268
00156 #define INT 269
00157 #define UINT 270
00158 #define LONG 271
00159 #define ULONG 272
00160 #define FLOAT 273
00161 #define DOUBLE 274
00162 #define TYPE 275
00163 #define LABEL 276
00164 #define VAR_ID 277
00165 #define LABELSTR 278
00166 #define STRINGCONSTANT 279
00167 #define IMPLEMENTATION 280
00168 #define ZEROINITIALIZER 281
00169 #define TRUETOK 282
00170 #define FALSETOK 283
00171 #define BEGINTOK 284
00172 #define ENDTOK 285
00173 #define DECLARE 286
00174 #define GLOBAL 287
00175 #define CONSTANT 288
00176 #define SECTION 289
00177 #define VOLATILE 290
00178 #define TO 291
00179 #define DOTDOTDOT 292
00180 #define NULL_TOK 293
00181 #define UNDEF 294
00182 #define CONST 295
00183 #define INTERNAL 296
00184 #define LINKONCE 297
00185 #define WEAK 298
00186 #define APPENDING 299
00187 #define OPAQUE 300
00188 #define NOT 301
00189 #define EXTERNAL 302
00190 #define TARGET 303
00191 #define TRIPLE 304
00192 #define ENDIAN 305
00193 #define POINTERSIZE 306
00194 #define LITTLE 307
00195 #define BIG 308
00196 #define ALIGN 309
00197 #define DEPLIBS 310
00198 #define CALL 311
00199 #define TAIL 312
00200 #define ASM_TOK 313
00201 #define MODULE 314
00202 #define SIDEEFFECT 315
00203 #define CC_TOK 316
00204 #define CCC_TOK 317
00205 #define CSRETCC_TOK 318
00206 #define FASTCC_TOK 319
00207 #define COLDCC_TOK 320
00208 #define RET 321
00209 #define BR 322
00210 #define SWITCH 323
00211 #define INVOKE 324
00212 #define UNWIND 325
00213 #define UNREACHABLE 326
00214 #define ADD 327
00215 #define SUB 328
00216 #define MUL 329
00217 #define DIV 330
00218 #define REM 331
00219 #define AND 332
00220 #define OR 333
00221 #define XOR 334
00222 #define SETLE 335
00223 #define SETGE 336
00224 #define SETLT 337
00225 #define SETGT 338
00226 #define SETEQ 339
00227 #define SETNE 340
00228 #define MALLOC 341
00229 #define ALLOCA 342
00230 #define FREE 343
00231 #define LOAD 344
00232 #define STORE 345
00233 #define GETELEMENTPTR 346
00234 #define PHI_TOK 347
00235 #define CAST 348
00236 #define SELECT 349
00237 #define SHL 350
00238 #define SHR 351
00239 #define VAARG 352
00240 #define EXTRACTELEMENT 353
00241 #define INSERTELEMENT 354
00242 #define SHUFFLEVECTOR 355
00243 #define VAARG_old 356
00244 #define VANEXT_old 357
00245 
00246 
00247 
00248 
00249 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
00250 typedef union YYSTYPE
00251 #line 890 "/build/buildd/llvm-1.8b/llvm/lib/AsmParser/llvmAsmParser.y"
00252 {
00253   llvm::Module                           *ModuleVal;
00254   llvm::Function                         *FunctionVal;
00255   std::pair<llvm::PATypeHolder*, char*>  *ArgVal;
00256   llvm::BasicBlock                       *BasicBlockVal;
00257   llvm::TerminatorInst                   *TermInstVal;
00258   llvm::Instruction                      *InstVal;
00259   llvm::Constant                         *ConstVal;
00260 
00261   const llvm::Type                       *PrimType;
00262   llvm::PATypeHolder                     *TypeVal;
00263   llvm::Value                            *ValueVal;
00264 
00265   std::vector<std::pair<llvm::PATypeHolder*,char*> > *ArgList;
00266   std::vector<llvm::Value*>              *ValueList;
00267   std::list<llvm::PATypeHolder>          *TypeList;
00268   // Represent the RHS of PHI node
00269   std::list<std::pair<llvm::Value*,
00270                       llvm::BasicBlock*> > *PHIList;
00271   std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;
00272   std::vector<llvm::Constant*>           *ConstVector;
00273 
00274   llvm::GlobalValue::LinkageTypes         Linkage;
00275   int64_t                           SInt64Val;
00276   uint64_t                          UInt64Val;
00277   int                               SIntVal;
00278   unsigned                          UIntVal;
00279   double                            FPVal;
00280   bool                              BoolVal;
00281 
00282   char                             *StrVal;   // This memory is strdup'd!
00283   llvm::ValID                             ValIDVal; // strdup'd memory maybe!
00284 
00285   llvm::Instruction::BinaryOps            BinaryOpVal;
00286   llvm::Instruction::TermOps              TermOpVal;
00287   llvm::Instruction::MemoryOps            MemOpVal;
00288   llvm::Instruction::OtherOps             OtherOpVal;
00289   llvm::Module::Endianness                Endianness;
00290 }
00291 /* Line 1529 of yacc.c.  */
00292 #line 293 "llvmAsmParser.tab.h"
00293   YYSTYPE;
00294 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
00295 # define YYSTYPE_IS_DECLARED 1
00296 # define YYSTYPE_IS_TRIVIAL 1
00297 #endif
00298 
00299 extern YYSTYPE llvmAsmlval;
00300