Reid Spencer | 38c91a9 | 2007-02-28 02:24:54 +0000 | [diff] [blame] | 1 | /* A Bison parser, made by GNU Bison 2.1. */ |
| 2 | |
| 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. |
| 5 | |
| 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) |
| 9 | any later version. |
| 10 | |
| 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. |
| 15 | |
| 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. */ |
| 20 | |
| 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. */ |
| 25 | |
| 26 | /* Tokens. */ |
| 27 | #ifndef YYTOKENTYPE |
| 28 | # define YYTOKENTYPE |
| 29 | /* Put the tokens into the symbol table, so that GDB and other debuggers |
| 30 | know about them. */ |
| 31 | enum yytokentype { |
| 32 | ESINT64VAL = 258, |
| 33 | EUINT64VAL = 259, |
| 34 | ESAPINTVAL = 260, |
| 35 | EUAPINTVAL = 261, |
| 36 | LOCALVAL_ID = 262, |
| 37 | GLOBALVAL_ID = 263, |
| 38 | FPVAL = 264, |
| 39 | VOID = 265, |
| 40 | INTTYPE = 266, |
| 41 | FLOAT = 267, |
| 42 | DOUBLE = 268, |
| 43 | LABEL = 269, |
| 44 | TYPE = 270, |
| 45 | LOCALVAR = 271, |
| 46 | GLOBALVAR = 272, |
| 47 | LABELSTR = 273, |
| 48 | STRINGCONSTANT = 274, |
| 49 | ATSTRINGCONSTANT = 275, |
Reid Spencer | 3025dfd | 2007-03-29 18:50:01 +0000 | [diff] [blame] | 50 | IMPLEMENTATION = 276, |
Reid Spencer | 38c91a9 | 2007-02-28 02:24:54 +0000 | [diff] [blame] | 51 | ZEROINITIALIZER = 277, |
| 52 | TRUETOK = 278, |
| 53 | FALSETOK = 279, |
| 54 | BEGINTOK = 280, |
| 55 | ENDTOK = 281, |
| 56 | DECLARE = 282, |
| 57 | DEFINE = 283, |
| 58 | GLOBAL = 284, |
| 59 | CONSTANT = 285, |
| 60 | SECTION = 286, |
| 61 | VOLATILE = 287, |
| 62 | TO = 288, |
| 63 | DOTDOTDOT = 289, |
| 64 | NULL_TOK = 290, |
| 65 | UNDEF = 291, |
| 66 | INTERNAL = 292, |
| 67 | LINKONCE = 293, |
| 68 | WEAK = 294, |
| 69 | APPENDING = 295, |
| 70 | DLLIMPORT = 296, |
| 71 | DLLEXPORT = 297, |
| 72 | EXTERN_WEAK = 298, |
| 73 | OPAQUE = 299, |
| 74 | EXTERNAL = 300, |
| 75 | TARGET = 301, |
| 76 | TRIPLE = 302, |
| 77 | ALIGN = 303, |
| 78 | DEPLIBS = 304, |
| 79 | CALL = 305, |
| 80 | TAIL = 306, |
| 81 | ASM_TOK = 307, |
| 82 | MODULE = 308, |
| 83 | SIDEEFFECT = 309, |
| 84 | CC_TOK = 310, |
| 85 | CCC_TOK = 311, |
| 86 | FASTCC_TOK = 312, |
| 87 | COLDCC_TOK = 313, |
| 88 | X86_STDCALLCC_TOK = 314, |
| 89 | X86_FASTCALLCC_TOK = 315, |
| 90 | DATALAYOUT = 316, |
| 91 | RET = 317, |
| 92 | BR = 318, |
| 93 | SWITCH = 319, |
| 94 | INVOKE = 320, |
| 95 | UNWIND = 321, |
| 96 | UNREACHABLE = 322, |
| 97 | ADD = 323, |
| 98 | SUB = 324, |
| 99 | MUL = 325, |
| 100 | UDIV = 326, |
| 101 | SDIV = 327, |
| 102 | FDIV = 328, |
| 103 | UREM = 329, |
| 104 | SREM = 330, |
| 105 | FREM = 331, |
| 106 | AND = 332, |
| 107 | OR = 333, |
| 108 | XOR = 334, |
| 109 | SHL = 335, |
| 110 | LSHR = 336, |
| 111 | ASHR = 337, |
| 112 | ICMP = 338, |
| 113 | FCMP = 339, |
| 114 | EQ = 340, |
| 115 | NE = 341, |
| 116 | SLT = 342, |
| 117 | SGT = 343, |
| 118 | SLE = 344, |
| 119 | SGE = 345, |
| 120 | ULT = 346, |
| 121 | UGT = 347, |
| 122 | ULE = 348, |
| 123 | UGE = 349, |
| 124 | OEQ = 350, |
| 125 | ONE = 351, |
| 126 | OLT = 352, |
| 127 | OGT = 353, |
| 128 | OLE = 354, |
| 129 | OGE = 355, |
| 130 | ORD = 356, |
| 131 | UNO = 357, |
| 132 | UEQ = 358, |
| 133 | UNE = 359, |
| 134 | MALLOC = 360, |
| 135 | ALLOCA = 361, |
| 136 | FREE = 362, |
| 137 | LOAD = 363, |
| 138 | STORE = 364, |
| 139 | GETELEMENTPTR = 365, |
| 140 | TRUNC = 366, |
| 141 | ZEXT = 367, |
| 142 | SEXT = 368, |
| 143 | FPTRUNC = 369, |
| 144 | FPEXT = 370, |
| 145 | BITCAST = 371, |
| 146 | UITOFP = 372, |
| 147 | SITOFP = 373, |
| 148 | FPTOUI = 374, |
| 149 | FPTOSI = 375, |
| 150 | INTTOPTR = 376, |
| 151 | PTRTOINT = 377, |
| 152 | PHI_TOK = 378, |
| 153 | SELECT = 379, |
| 154 | VAARG = 380, |
| 155 | EXTRACTELEMENT = 381, |
| 156 | INSERTELEMENT = 382, |
| 157 | SHUFFLEVECTOR = 383, |
| 158 | NORETURN = 384, |
| 159 | INREG = 385, |
| 160 | SRET = 386, |
Reid Spencer | 67d8ed9 | 2007-03-22 02:14:08 +0000 | [diff] [blame] | 161 | NOUNWIND = 387, |
| 162 | DEFAULT = 388, |
| 163 | HIDDEN = 389 |
Reid Spencer | 38c91a9 | 2007-02-28 02:24:54 +0000 | [diff] [blame] | 164 | }; |
| 165 | #endif |
| 166 | /* Tokens. */ |
| 167 | #define ESINT64VAL 258 |
| 168 | #define EUINT64VAL 259 |
| 169 | #define ESAPINTVAL 260 |
| 170 | #define EUAPINTVAL 261 |
| 171 | #define LOCALVAL_ID 262 |
| 172 | #define GLOBALVAL_ID 263 |
| 173 | #define FPVAL 264 |
| 174 | #define VOID 265 |
| 175 | #define INTTYPE 266 |
| 176 | #define FLOAT 267 |
| 177 | #define DOUBLE 268 |
| 178 | #define LABEL 269 |
| 179 | #define TYPE 270 |
| 180 | #define LOCALVAR 271 |
| 181 | #define GLOBALVAR 272 |
| 182 | #define LABELSTR 273 |
| 183 | #define STRINGCONSTANT 274 |
| 184 | #define ATSTRINGCONSTANT 275 |
Reid Spencer | 3025dfd | 2007-03-29 18:50:01 +0000 | [diff] [blame] | 185 | #define IMPLEMENTATION 276 |
Reid Spencer | 38c91a9 | 2007-02-28 02:24:54 +0000 | [diff] [blame] | 186 | #define ZEROINITIALIZER 277 |
| 187 | #define TRUETOK 278 |
| 188 | #define FALSETOK 279 |
| 189 | #define BEGINTOK 280 |
| 190 | #define ENDTOK 281 |
| 191 | #define DECLARE 282 |
| 192 | #define DEFINE 283 |
| 193 | #define GLOBAL 284 |
| 194 | #define CONSTANT 285 |
| 195 | #define SECTION 286 |
| 196 | #define VOLATILE 287 |
| 197 | #define TO 288 |
| 198 | #define DOTDOTDOT 289 |
| 199 | #define NULL_TOK 290 |
| 200 | #define UNDEF 291 |
| 201 | #define INTERNAL 292 |
| 202 | #define LINKONCE 293 |
| 203 | #define WEAK 294 |
| 204 | #define APPENDING 295 |
| 205 | #define DLLIMPORT 296 |
| 206 | #define DLLEXPORT 297 |
| 207 | #define EXTERN_WEAK 298 |
| 208 | #define OPAQUE 299 |
| 209 | #define EXTERNAL 300 |
| 210 | #define TARGET 301 |
| 211 | #define TRIPLE 302 |
| 212 | #define ALIGN 303 |
| 213 | #define DEPLIBS 304 |
| 214 | #define CALL 305 |
| 215 | #define TAIL 306 |
| 216 | #define ASM_TOK 307 |
| 217 | #define MODULE 308 |
| 218 | #define SIDEEFFECT 309 |
| 219 | #define CC_TOK 310 |
| 220 | #define CCC_TOK 311 |
| 221 | #define FASTCC_TOK 312 |
| 222 | #define COLDCC_TOK 313 |
| 223 | #define X86_STDCALLCC_TOK 314 |
| 224 | #define X86_FASTCALLCC_TOK 315 |
| 225 | #define DATALAYOUT 316 |
| 226 | #define RET 317 |
| 227 | #define BR 318 |
| 228 | #define SWITCH 319 |
| 229 | #define INVOKE 320 |
| 230 | #define UNWIND 321 |
| 231 | #define UNREACHABLE 322 |
| 232 | #define ADD 323 |
| 233 | #define SUB 324 |
| 234 | #define MUL 325 |
| 235 | #define UDIV 326 |
| 236 | #define SDIV 327 |
| 237 | #define FDIV 328 |
| 238 | #define UREM 329 |
| 239 | #define SREM 330 |
| 240 | #define FREM 331 |
| 241 | #define AND 332 |
| 242 | #define OR 333 |
| 243 | #define XOR 334 |
| 244 | #define SHL 335 |
| 245 | #define LSHR 336 |
| 246 | #define ASHR 337 |
| 247 | #define ICMP 338 |
| 248 | #define FCMP 339 |
| 249 | #define EQ 340 |
| 250 | #define NE 341 |
| 251 | #define SLT 342 |
| 252 | #define SGT 343 |
| 253 | #define SLE 344 |
| 254 | #define SGE 345 |
| 255 | #define ULT 346 |
| 256 | #define UGT 347 |
| 257 | #define ULE 348 |
| 258 | #define UGE 349 |
| 259 | #define OEQ 350 |
| 260 | #define ONE 351 |
| 261 | #define OLT 352 |
| 262 | #define OGT 353 |
| 263 | #define OLE 354 |
| 264 | #define OGE 355 |
| 265 | #define ORD 356 |
| 266 | #define UNO 357 |
| 267 | #define UEQ 358 |
| 268 | #define UNE 359 |
| 269 | #define MALLOC 360 |
| 270 | #define ALLOCA 361 |
| 271 | #define FREE 362 |
| 272 | #define LOAD 363 |
| 273 | #define STORE 364 |
| 274 | #define GETELEMENTPTR 365 |
| 275 | #define TRUNC 366 |
| 276 | #define ZEXT 367 |
| 277 | #define SEXT 368 |
| 278 | #define FPTRUNC 369 |
| 279 | #define FPEXT 370 |
| 280 | #define BITCAST 371 |
| 281 | #define UITOFP 372 |
| 282 | #define SITOFP 373 |
| 283 | #define FPTOUI 374 |
| 284 | #define FPTOSI 375 |
| 285 | #define INTTOPTR 376 |
| 286 | #define PTRTOINT 377 |
| 287 | #define PHI_TOK 378 |
| 288 | #define SELECT 379 |
| 289 | #define VAARG 380 |
| 290 | #define EXTRACTELEMENT 381 |
| 291 | #define INSERTELEMENT 382 |
| 292 | #define SHUFFLEVECTOR 383 |
| 293 | #define NORETURN 384 |
| 294 | #define INREG 385 |
| 295 | #define SRET 386 |
Reid Spencer | 67d8ed9 | 2007-03-22 02:14:08 +0000 | [diff] [blame] | 296 | #define NOUNWIND 387 |
| 297 | #define DEFAULT 388 |
| 298 | #define HIDDEN 389 |
Reid Spencer | 38c91a9 | 2007-02-28 02:24:54 +0000 | [diff] [blame] | 299 | |
| 300 | |
| 301 | |
| 302 | |
| 303 | #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) |
Reid Spencer | 66728ef | 2007-03-20 01:13:36 +0000 | [diff] [blame] | 304 | #line 939 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" |
Reid Spencer | 38c91a9 | 2007-02-28 02:24:54 +0000 | [diff] [blame] | 305 | typedef union YYSTYPE { |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 306 | llvm::Module *ModuleVal; |
| 307 | llvm::Function *FunctionVal; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 308 | llvm::BasicBlock *BasicBlockVal; |
| 309 | llvm::TerminatorInst *TermInstVal; |
| 310 | llvm::Instruction *InstVal; |
Reid Spencer | a132e04 | 2006-12-03 05:46:11 +0000 | [diff] [blame] | 311 | llvm::Constant *ConstVal; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 312 | |
Reid Spencer | a132e04 | 2006-12-03 05:46:11 +0000 | [diff] [blame] | 313 | const llvm::Type *PrimType; |
Reid Spencer | 1431061 | 2006-12-31 05:40:51 +0000 | [diff] [blame] | 314 | std::list<llvm::PATypeHolder> *TypeList; |
Reid Spencer | a132e04 | 2006-12-03 05:46:11 +0000 | [diff] [blame] | 315 | llvm::PATypeHolder *TypeVal; |
| 316 | llvm::Value *ValueVal; |
Reid Spencer | a132e04 | 2006-12-03 05:46:11 +0000 | [diff] [blame] | 317 | std::vector<llvm::Value*> *ValueList; |
Reid Spencer | 1431061 | 2006-12-31 05:40:51 +0000 | [diff] [blame] | 318 | llvm::ArgListType *ArgList; |
| 319 | llvm::TypeWithAttrs TypeWithAttrs; |
| 320 | llvm::TypeWithAttrsList *TypeWithAttrsList; |
| 321 | llvm::ValueRefList *ValueRefList; |
| 322 | |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 323 | // Represent the RHS of PHI node |
Reid Spencer | a132e04 | 2006-12-03 05:46:11 +0000 | [diff] [blame] | 324 | std::list<std::pair<llvm::Value*, |
| 325 | llvm::BasicBlock*> > *PHIList; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 326 | std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable; |
Reid Spencer | a132e04 | 2006-12-03 05:46:11 +0000 | [diff] [blame] | 327 | std::vector<llvm::Constant*> *ConstVector; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 328 | |
| 329 | llvm::GlobalValue::LinkageTypes Linkage; |
Anton Korobeynikov | 178a352 | 2007-01-12 19:22:51 +0000 | [diff] [blame] | 330 | llvm::GlobalValue::VisibilityTypes Visibility; |
Reid Spencer | 1431061 | 2006-12-31 05:40:51 +0000 | [diff] [blame] | 331 | llvm::FunctionType::ParameterAttributes ParamAttrs; |
Reid Spencer | 38c91a9 | 2007-02-28 02:24:54 +0000 | [diff] [blame] | 332 | llvm::APInt *APIntVal; |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 333 | int64_t SInt64Val; |
| 334 | uint64_t UInt64Val; |
| 335 | int SIntVal; |
| 336 | unsigned UIntVal; |
| 337 | double FPVal; |
| 338 | bool BoolVal; |
| 339 | |
| 340 | char *StrVal; // This memory is strdup'd! |
Reid Spencer | 1628cec | 2006-10-26 06:15:43 +0000 | [diff] [blame] | 341 | llvm::ValID ValIDVal; // strdup'd memory maybe! |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 342 | |
Reid Spencer | a132e04 | 2006-12-03 05:46:11 +0000 | [diff] [blame] | 343 | llvm::Instruction::BinaryOps BinaryOpVal; |
| 344 | llvm::Instruction::TermOps TermOpVal; |
| 345 | llvm::Instruction::MemoryOps MemOpVal; |
| 346 | llvm::Instruction::CastOps CastOpVal; |
| 347 | llvm::Instruction::OtherOps OtherOpVal; |
Reid Spencer | a132e04 | 2006-12-03 05:46:11 +0000 | [diff] [blame] | 348 | llvm::ICmpInst::Predicate IPredicate; |
| 349 | llvm::FCmpInst::Predicate FPredicate; |
Chris Lattner | 9d2fda6 | 2007-02-13 05:53:56 +0000 | [diff] [blame] | 350 | } YYSTYPE; |
Reid Spencer | 38c91a9 | 2007-02-28 02:24:54 +0000 | [diff] [blame] | 351 | /* Line 1447 of yacc.c. */ |
Reid Spencer | 67d8ed9 | 2007-03-22 02:14:08 +0000 | [diff] [blame] | 352 | #line 353 "llvmAsmParser.tab.h" |
Reid Spencer | 38c91a9 | 2007-02-28 02:24:54 +0000 | [diff] [blame] | 353 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
| 354 | # define YYSTYPE_IS_DECLARED 1 |
| 355 | # define YYSTYPE_IS_TRIVIAL 1 |
| 356 | #endif |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 357 | |
| 358 | extern YYSTYPE llvmAsmlval; |
Reid Spencer | 38c91a9 | 2007-02-28 02:24:54 +0000 | [diff] [blame] | 359 | |
| 360 | |
| 361 | |