Reid Spencer | 3822ff5 | 2006-11-08 06:47:33 +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 | SINTVAL = 260, |
| 35 | UINTVAL = 261, |
| 36 | FPVAL = 262, |
| 37 | VOID = 263, |
| 38 | BOOL = 264, |
| 39 | SBYTE = 265, |
| 40 | UBYTE = 266, |
| 41 | SHORT = 267, |
| 42 | USHORT = 268, |
| 43 | INT = 269, |
| 44 | UINT = 270, |
| 45 | LONG = 271, |
| 46 | ULONG = 272, |
| 47 | FLOAT = 273, |
| 48 | DOUBLE = 274, |
| 49 | TYPE = 275, |
| 50 | LABEL = 276, |
| 51 | VAR_ID = 277, |
| 52 | LABELSTR = 278, |
| 53 | STRINGCONSTANT = 279, |
| 54 | IMPLEMENTATION = 280, |
| 55 | ZEROINITIALIZER = 281, |
| 56 | TRUETOK = 282, |
| 57 | FALSETOK = 283, |
| 58 | BEGINTOK = 284, |
| 59 | ENDTOK = 285, |
| 60 | DECLARE = 286, |
| 61 | GLOBAL = 287, |
| 62 | CONSTANT = 288, |
| 63 | SECTION = 289, |
| 64 | VOLATILE = 290, |
| 65 | TO = 291, |
| 66 | DOTDOTDOT = 292, |
| 67 | NULL_TOK = 293, |
| 68 | UNDEF = 294, |
| 69 | CONST = 295, |
| 70 | INTERNAL = 296, |
| 71 | LINKONCE = 297, |
| 72 | WEAK = 298, |
| 73 | APPENDING = 299, |
| 74 | DLLIMPORT = 300, |
| 75 | DLLEXPORT = 301, |
| 76 | EXTERN_WEAK = 302, |
| 77 | OPAQUE = 303, |
| 78 | NOT = 304, |
| 79 | EXTERNAL = 305, |
| 80 | TARGET = 306, |
| 81 | TRIPLE = 307, |
| 82 | ENDIAN = 308, |
| 83 | POINTERSIZE = 309, |
| 84 | LITTLE = 310, |
| 85 | BIG = 311, |
| 86 | ALIGN = 312, |
| 87 | DEPLIBS = 313, |
| 88 | CALL = 314, |
| 89 | TAIL = 315, |
| 90 | ASM_TOK = 316, |
| 91 | MODULE = 317, |
| 92 | SIDEEFFECT = 318, |
| 93 | CC_TOK = 319, |
| 94 | CCC_TOK = 320, |
| 95 | CSRETCC_TOK = 321, |
| 96 | FASTCC_TOK = 322, |
| 97 | COLDCC_TOK = 323, |
| 98 | X86_STDCALLCC_TOK = 324, |
| 99 | X86_FASTCALLCC_TOK = 325, |
| 100 | DATALAYOUT = 326, |
| 101 | RET = 327, |
| 102 | BR = 328, |
| 103 | SWITCH = 329, |
| 104 | INVOKE = 330, |
| 105 | UNWIND = 331, |
| 106 | UNREACHABLE = 332, |
| 107 | ADD = 333, |
| 108 | SUB = 334, |
| 109 | MUL = 335, |
| 110 | UDIV = 336, |
| 111 | SDIV = 337, |
| 112 | FDIV = 338, |
| 113 | UREM = 339, |
| 114 | SREM = 340, |
| 115 | FREM = 341, |
| 116 | AND = 342, |
| 117 | OR = 343, |
| 118 | XOR = 344, |
| 119 | SETLE = 345, |
| 120 | SETGE = 346, |
| 121 | SETLT = 347, |
| 122 | SETGT = 348, |
| 123 | SETEQ = 349, |
| 124 | SETNE = 350, |
| 125 | MALLOC = 351, |
| 126 | ALLOCA = 352, |
| 127 | FREE = 353, |
| 128 | LOAD = 354, |
| 129 | STORE = 355, |
| 130 | GETELEMENTPTR = 356, |
| 131 | PHI_TOK = 357, |
| 132 | CAST = 358, |
| 133 | SELECT = 359, |
| 134 | SHL = 360, |
| 135 | LSHR = 361, |
| 136 | ASHR = 362, |
| 137 | VAARG = 363, |
| 138 | EXTRACTELEMENT = 364, |
| 139 | INSERTELEMENT = 365, |
| 140 | SHUFFLEVECTOR = 366, |
| 141 | VAARG_old = 367, |
| 142 | VANEXT_old = 368 |
| 143 | }; |
| 144 | #endif |
| 145 | /* Tokens. */ |
| 146 | #define ESINT64VAL 258 |
| 147 | #define EUINT64VAL 259 |
| 148 | #define SINTVAL 260 |
| 149 | #define UINTVAL 261 |
| 150 | #define FPVAL 262 |
| 151 | #define VOID 263 |
| 152 | #define BOOL 264 |
| 153 | #define SBYTE 265 |
| 154 | #define UBYTE 266 |
| 155 | #define SHORT 267 |
| 156 | #define USHORT 268 |
| 157 | #define INT 269 |
| 158 | #define UINT 270 |
| 159 | #define LONG 271 |
| 160 | #define ULONG 272 |
| 161 | #define FLOAT 273 |
| 162 | #define DOUBLE 274 |
| 163 | #define TYPE 275 |
| 164 | #define LABEL 276 |
| 165 | #define VAR_ID 277 |
| 166 | #define LABELSTR 278 |
| 167 | #define STRINGCONSTANT 279 |
| 168 | #define IMPLEMENTATION 280 |
| 169 | #define ZEROINITIALIZER 281 |
| 170 | #define TRUETOK 282 |
| 171 | #define FALSETOK 283 |
| 172 | #define BEGINTOK 284 |
| 173 | #define ENDTOK 285 |
| 174 | #define DECLARE 286 |
| 175 | #define GLOBAL 287 |
| 176 | #define CONSTANT 288 |
| 177 | #define SECTION 289 |
| 178 | #define VOLATILE 290 |
| 179 | #define TO 291 |
| 180 | #define DOTDOTDOT 292 |
| 181 | #define NULL_TOK 293 |
| 182 | #define UNDEF 294 |
| 183 | #define CONST 295 |
| 184 | #define INTERNAL 296 |
| 185 | #define LINKONCE 297 |
| 186 | #define WEAK 298 |
| 187 | #define APPENDING 299 |
| 188 | #define DLLIMPORT 300 |
| 189 | #define DLLEXPORT 301 |
| 190 | #define EXTERN_WEAK 302 |
| 191 | #define OPAQUE 303 |
| 192 | #define NOT 304 |
| 193 | #define EXTERNAL 305 |
| 194 | #define TARGET 306 |
| 195 | #define TRIPLE 307 |
| 196 | #define ENDIAN 308 |
| 197 | #define POINTERSIZE 309 |
| 198 | #define LITTLE 310 |
| 199 | #define BIG 311 |
| 200 | #define ALIGN 312 |
| 201 | #define DEPLIBS 313 |
| 202 | #define CALL 314 |
| 203 | #define TAIL 315 |
| 204 | #define ASM_TOK 316 |
| 205 | #define MODULE 317 |
| 206 | #define SIDEEFFECT 318 |
| 207 | #define CC_TOK 319 |
| 208 | #define CCC_TOK 320 |
| 209 | #define CSRETCC_TOK 321 |
| 210 | #define FASTCC_TOK 322 |
| 211 | #define COLDCC_TOK 323 |
| 212 | #define X86_STDCALLCC_TOK 324 |
| 213 | #define X86_FASTCALLCC_TOK 325 |
| 214 | #define DATALAYOUT 326 |
| 215 | #define RET 327 |
| 216 | #define BR 328 |
| 217 | #define SWITCH 329 |
| 218 | #define INVOKE 330 |
| 219 | #define UNWIND 331 |
| 220 | #define UNREACHABLE 332 |
| 221 | #define ADD 333 |
| 222 | #define SUB 334 |
| 223 | #define MUL 335 |
| 224 | #define UDIV 336 |
| 225 | #define SDIV 337 |
| 226 | #define FDIV 338 |
| 227 | #define UREM 339 |
| 228 | #define SREM 340 |
| 229 | #define FREM 341 |
| 230 | #define AND 342 |
| 231 | #define OR 343 |
| 232 | #define XOR 344 |
| 233 | #define SETLE 345 |
| 234 | #define SETGE 346 |
| 235 | #define SETLT 347 |
| 236 | #define SETGT 348 |
| 237 | #define SETEQ 349 |
| 238 | #define SETNE 350 |
| 239 | #define MALLOC 351 |
| 240 | #define ALLOCA 352 |
| 241 | #define FREE 353 |
| 242 | #define LOAD 354 |
| 243 | #define STORE 355 |
| 244 | #define GETELEMENTPTR 356 |
| 245 | #define PHI_TOK 357 |
| 246 | #define CAST 358 |
| 247 | #define SELECT 359 |
| 248 | #define SHL 360 |
| 249 | #define LSHR 361 |
| 250 | #define ASHR 362 |
| 251 | #define VAARG 363 |
| 252 | #define EXTRACTELEMENT 364 |
| 253 | #define INSERTELEMENT 365 |
| 254 | #define SHUFFLEVECTOR 366 |
| 255 | #define VAARG_old 367 |
| 256 | #define VANEXT_old 368 |
| 257 | |
| 258 | |
| 259 | |
| 260 | |
| 261 | #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) |
| 262 | #line 1040 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" |
| 263 | typedef union YYSTYPE { |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 264 | llvm::Module *ModuleVal; |
| 265 | llvm::Function *FunctionVal; |
| 266 | std::pair<llvm::PATypeHolder*, char*> *ArgVal; |
| 267 | llvm::BasicBlock *BasicBlockVal; |
| 268 | llvm::TerminatorInst *TermInstVal; |
| 269 | llvm::Instruction *InstVal; |
| 270 | llvm::Constant *ConstVal; |
| 271 | |
| 272 | const llvm::Type *PrimType; |
| 273 | llvm::PATypeHolder *TypeVal; |
| 274 | llvm::Value *ValueVal; |
| 275 | |
| 276 | std::vector<std::pair<llvm::PATypeHolder*,char*> > *ArgList; |
| 277 | std::vector<llvm::Value*> *ValueList; |
| 278 | std::list<llvm::PATypeHolder> *TypeList; |
| 279 | // Represent the RHS of PHI node |
| 280 | std::list<std::pair<llvm::Value*, |
| 281 | llvm::BasicBlock*> > *PHIList; |
| 282 | std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable; |
| 283 | std::vector<llvm::Constant*> *ConstVector; |
| 284 | |
| 285 | llvm::GlobalValue::LinkageTypes Linkage; |
| 286 | int64_t SInt64Val; |
| 287 | uint64_t UInt64Val; |
| 288 | int SIntVal; |
| 289 | unsigned UIntVal; |
| 290 | double FPVal; |
| 291 | bool BoolVal; |
| 292 | |
| 293 | char *StrVal; // This memory is strdup'd! |
Reid Spencer | 1628cec | 2006-10-26 06:15:43 +0000 | [diff] [blame] | 294 | llvm::ValID ValIDVal; // strdup'd memory maybe! |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 295 | |
Reid Spencer | 1628cec | 2006-10-26 06:15:43 +0000 | [diff] [blame] | 296 | BinaryOpInfo BinaryOpVal; |
| 297 | TermOpInfo TermOpVal; |
| 298 | MemOpInfo MemOpVal; |
| 299 | OtherOpInfo OtherOpVal; |
| 300 | llvm::Module::Endianness Endianness; |
Reid Spencer | 5b7e753 | 2006-09-28 19:28:24 +0000 | [diff] [blame] | 301 | } YYSTYPE; |
Reid Spencer | 3822ff5 | 2006-11-08 06:47:33 +0000 | [diff] [blame^] | 302 | /* Line 1447 of yacc.c. */ |
| 303 | #line 304 "llvmAsmParser.tab.h" |
| 304 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
| 305 | # define YYSTYPE_IS_DECLARED 1 |
| 306 | # define YYSTYPE_IS_TRIVIAL 1 |
| 307 | #endif |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 308 | |
| 309 | extern YYSTYPE llvmAsmlval; |
Reid Spencer | 3822ff5 | 2006-11-08 06:47:33 +0000 | [diff] [blame^] | 310 | |
| 311 | |
| 312 | |