Anton Korobeynikov | 43e3aad | 2006-09-14 18:25:26 +0000 | [diff] [blame] | 1 | /* A Bison parser, made by GNU Bison 2.2. */ |
| 2 | |
| 3 | /* Skeleton interface for Bison's Yacc-like parsers in C |
| 4 | |
| 5 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 |
| 6 | Free Software Foundation, Inc. |
| 7 | |
| 8 | This program is free software; you can redistribute it and/or modify |
| 9 | it under the terms of the GNU General Public License as published by |
| 10 | the Free Software Foundation; either version 2, or (at your option) |
| 11 | any later version. |
| 12 | |
| 13 | This program is distributed in the hope that it will be useful, |
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | GNU General Public License for more details. |
| 17 | |
| 18 | You should have received a copy of the GNU General Public License |
| 19 | along with this program; if not, write to the Free Software |
| 20 | Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 21 | Boston, MA 02110-1301, USA. */ |
| 22 | |
| 23 | /* As a special exception, you may create a larger work that contains |
| 24 | part or all of the Bison parser skeleton and distribute that work |
| 25 | under terms of your choice, so long as that work isn't itself a |
| 26 | parser generator using the skeleton or a modified version thereof |
| 27 | as a parser skeleton. Alternatively, if you modify or redistribute |
| 28 | the parser skeleton itself, you may (at your option) remove this |
| 29 | special exception, which will cause the skeleton and the resulting |
| 30 | Bison output files to be licensed under the GNU General Public |
| 31 | License without this special exception. |
| 32 | |
| 33 | This special exception was added by the Free Software Foundation in |
| 34 | version 2.2 of Bison. */ |
| 35 | |
| 36 | /* Tokens. */ |
| 37 | #ifndef YYTOKENTYPE |
| 38 | # define YYTOKENTYPE |
| 39 | /* Put the tokens into the symbol table, so that GDB and other debuggers |
| 40 | know about them. */ |
| 41 | enum yytokentype { |
| 42 | ESINT64VAL = 258, |
| 43 | EUINT64VAL = 259, |
| 44 | SINTVAL = 260, |
| 45 | UINTVAL = 261, |
| 46 | FPVAL = 262, |
| 47 | VOID = 263, |
| 48 | BOOL = 264, |
| 49 | SBYTE = 265, |
| 50 | UBYTE = 266, |
| 51 | SHORT = 267, |
| 52 | USHORT = 268, |
| 53 | INT = 269, |
| 54 | UINT = 270, |
| 55 | LONG = 271, |
| 56 | ULONG = 272, |
| 57 | FLOAT = 273, |
| 58 | DOUBLE = 274, |
| 59 | TYPE = 275, |
| 60 | LABEL = 276, |
| 61 | VAR_ID = 277, |
| 62 | LABELSTR = 278, |
| 63 | STRINGCONSTANT = 279, |
| 64 | IMPLEMENTATION = 280, |
| 65 | ZEROINITIALIZER = 281, |
| 66 | TRUETOK = 282, |
| 67 | FALSETOK = 283, |
| 68 | BEGINTOK = 284, |
| 69 | ENDTOK = 285, |
| 70 | DECLARE = 286, |
| 71 | GLOBAL = 287, |
| 72 | CONSTANT = 288, |
| 73 | SECTION = 289, |
| 74 | VOLATILE = 290, |
| 75 | TO = 291, |
| 76 | DOTDOTDOT = 292, |
| 77 | NULL_TOK = 293, |
| 78 | UNDEF = 294, |
| 79 | CONST = 295, |
| 80 | INTERNAL = 296, |
| 81 | LINKONCE = 297, |
| 82 | WEAK = 298, |
| 83 | APPENDING = 299, |
| 84 | DLLIMPORT = 300, |
| 85 | DLLEXPORT = 301, |
| 86 | EXTERN_WEAK = 302, |
| 87 | OPAQUE = 303, |
| 88 | NOT = 304, |
| 89 | EXTERNAL = 305, |
| 90 | TARGET = 306, |
| 91 | TRIPLE = 307, |
| 92 | ENDIAN = 308, |
| 93 | POINTERSIZE = 309, |
| 94 | LITTLE = 310, |
| 95 | BIG = 311, |
| 96 | ALIGN = 312, |
| 97 | DEPLIBS = 313, |
| 98 | CALL = 314, |
| 99 | TAIL = 315, |
| 100 | ASM_TOK = 316, |
| 101 | MODULE = 317, |
| 102 | SIDEEFFECT = 318, |
| 103 | CC_TOK = 319, |
| 104 | CCC_TOK = 320, |
| 105 | CSRETCC_TOK = 321, |
| 106 | FASTCC_TOK = 322, |
| 107 | COLDCC_TOK = 323, |
Anton Korobeynikov | bcb9770 | 2006-09-17 20:25:45 +0000 | [diff] [blame] | 108 | X86_STDCALLCC_TOK = 324, |
| 109 | X86_FASTCALLCC_TOK = 325, |
| 110 | RET = 326, |
| 111 | BR = 327, |
| 112 | SWITCH = 328, |
| 113 | INVOKE = 329, |
| 114 | UNWIND = 330, |
| 115 | UNREACHABLE = 331, |
| 116 | ADD = 332, |
| 117 | SUB = 333, |
| 118 | MUL = 334, |
| 119 | DIV = 335, |
| 120 | REM = 336, |
| 121 | AND = 337, |
| 122 | OR = 338, |
| 123 | XOR = 339, |
| 124 | SETLE = 340, |
| 125 | SETGE = 341, |
| 126 | SETLT = 342, |
| 127 | SETGT = 343, |
| 128 | SETEQ = 344, |
| 129 | SETNE = 345, |
| 130 | MALLOC = 346, |
| 131 | ALLOCA = 347, |
| 132 | FREE = 348, |
| 133 | LOAD = 349, |
| 134 | STORE = 350, |
| 135 | GETELEMENTPTR = 351, |
| 136 | PHI_TOK = 352, |
| 137 | CAST = 353, |
| 138 | SELECT = 354, |
| 139 | SHL = 355, |
| 140 | SHR = 356, |
| 141 | VAARG = 357, |
| 142 | EXTRACTELEMENT = 358, |
| 143 | INSERTELEMENT = 359, |
| 144 | SHUFFLEVECTOR = 360, |
| 145 | VAARG_old = 361, |
| 146 | VANEXT_old = 362 |
Anton Korobeynikov | 43e3aad | 2006-09-14 18:25:26 +0000 | [diff] [blame] | 147 | }; |
| 148 | #endif |
| 149 | /* Tokens. */ |
| 150 | #define ESINT64VAL 258 |
| 151 | #define EUINT64VAL 259 |
| 152 | #define SINTVAL 260 |
| 153 | #define UINTVAL 261 |
| 154 | #define FPVAL 262 |
| 155 | #define VOID 263 |
| 156 | #define BOOL 264 |
| 157 | #define SBYTE 265 |
| 158 | #define UBYTE 266 |
| 159 | #define SHORT 267 |
| 160 | #define USHORT 268 |
| 161 | #define INT 269 |
| 162 | #define UINT 270 |
| 163 | #define LONG 271 |
| 164 | #define ULONG 272 |
| 165 | #define FLOAT 273 |
| 166 | #define DOUBLE 274 |
| 167 | #define TYPE 275 |
| 168 | #define LABEL 276 |
| 169 | #define VAR_ID 277 |
| 170 | #define LABELSTR 278 |
| 171 | #define STRINGCONSTANT 279 |
| 172 | #define IMPLEMENTATION 280 |
| 173 | #define ZEROINITIALIZER 281 |
| 174 | #define TRUETOK 282 |
| 175 | #define FALSETOK 283 |
| 176 | #define BEGINTOK 284 |
| 177 | #define ENDTOK 285 |
| 178 | #define DECLARE 286 |
| 179 | #define GLOBAL 287 |
| 180 | #define CONSTANT 288 |
| 181 | #define SECTION 289 |
| 182 | #define VOLATILE 290 |
| 183 | #define TO 291 |
| 184 | #define DOTDOTDOT 292 |
| 185 | #define NULL_TOK 293 |
| 186 | #define UNDEF 294 |
| 187 | #define CONST 295 |
| 188 | #define INTERNAL 296 |
| 189 | #define LINKONCE 297 |
| 190 | #define WEAK 298 |
| 191 | #define APPENDING 299 |
| 192 | #define DLLIMPORT 300 |
| 193 | #define DLLEXPORT 301 |
| 194 | #define EXTERN_WEAK 302 |
| 195 | #define OPAQUE 303 |
| 196 | #define NOT 304 |
| 197 | #define EXTERNAL 305 |
| 198 | #define TARGET 306 |
| 199 | #define TRIPLE 307 |
| 200 | #define ENDIAN 308 |
| 201 | #define POINTERSIZE 309 |
| 202 | #define LITTLE 310 |
| 203 | #define BIG 311 |
| 204 | #define ALIGN 312 |
| 205 | #define DEPLIBS 313 |
| 206 | #define CALL 314 |
| 207 | #define TAIL 315 |
| 208 | #define ASM_TOK 316 |
| 209 | #define MODULE 317 |
| 210 | #define SIDEEFFECT 318 |
| 211 | #define CC_TOK 319 |
| 212 | #define CCC_TOK 320 |
| 213 | #define CSRETCC_TOK 321 |
| 214 | #define FASTCC_TOK 322 |
| 215 | #define COLDCC_TOK 323 |
Anton Korobeynikov | bcb9770 | 2006-09-17 20:25:45 +0000 | [diff] [blame] | 216 | #define X86_STDCALLCC_TOK 324 |
| 217 | #define X86_FASTCALLCC_TOK 325 |
| 218 | #define RET 326 |
| 219 | #define BR 327 |
| 220 | #define SWITCH 328 |
| 221 | #define INVOKE 329 |
| 222 | #define UNWIND 330 |
| 223 | #define UNREACHABLE 331 |
| 224 | #define ADD 332 |
| 225 | #define SUB 333 |
| 226 | #define MUL 334 |
| 227 | #define DIV 335 |
| 228 | #define REM 336 |
| 229 | #define AND 337 |
| 230 | #define OR 338 |
| 231 | #define XOR 339 |
| 232 | #define SETLE 340 |
| 233 | #define SETGE 341 |
| 234 | #define SETLT 342 |
| 235 | #define SETGT 343 |
| 236 | #define SETEQ 344 |
| 237 | #define SETNE 345 |
| 238 | #define MALLOC 346 |
| 239 | #define ALLOCA 347 |
| 240 | #define FREE 348 |
| 241 | #define LOAD 349 |
| 242 | #define STORE 350 |
| 243 | #define GETELEMENTPTR 351 |
| 244 | #define PHI_TOK 352 |
| 245 | #define CAST 353 |
| 246 | #define SELECT 354 |
| 247 | #define SHL 355 |
| 248 | #define SHR 356 |
| 249 | #define VAARG 357 |
| 250 | #define EXTRACTELEMENT 358 |
| 251 | #define INSERTELEMENT 359 |
| 252 | #define SHUFFLEVECTOR 360 |
| 253 | #define VAARG_old 361 |
| 254 | #define VANEXT_old 362 |
Anton Korobeynikov | 43e3aad | 2006-09-14 18:25:26 +0000 | [diff] [blame] | 255 | |
| 256 | |
| 257 | |
| 258 | |
| 259 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
| 260 | typedef union YYSTYPE |
| 261 | #line 913 "/home/asl/proj/llvm/src/lib/AsmParser/llvmAsmParser.y" |
| 262 | { |
Reid Spencer | 68a24bd | 2005-08-27 18:50:39 +0000 | [diff] [blame] | 263 | llvm::Module *ModuleVal; |
| 264 | llvm::Function *FunctionVal; |
| 265 | std::pair<llvm::PATypeHolder*, char*> *ArgVal; |
| 266 | llvm::BasicBlock *BasicBlockVal; |
| 267 | llvm::TerminatorInst *TermInstVal; |
| 268 | llvm::Instruction *InstVal; |
| 269 | llvm::Constant *ConstVal; |
| 270 | |
| 271 | const llvm::Type *PrimType; |
| 272 | llvm::PATypeHolder *TypeVal; |
| 273 | llvm::Value *ValueVal; |
| 274 | |
| 275 | std::vector<std::pair<llvm::PATypeHolder*,char*> > *ArgList; |
| 276 | std::vector<llvm::Value*> *ValueList; |
| 277 | std::list<llvm::PATypeHolder> *TypeList; |
| 278 | // Represent the RHS of PHI node |
| 279 | std::list<std::pair<llvm::Value*, |
| 280 | llvm::BasicBlock*> > *PHIList; |
| 281 | std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable; |
| 282 | std::vector<llvm::Constant*> *ConstVector; |
| 283 | |
| 284 | llvm::GlobalValue::LinkageTypes Linkage; |
| 285 | int64_t SInt64Val; |
| 286 | uint64_t UInt64Val; |
| 287 | int SIntVal; |
| 288 | unsigned UIntVal; |
| 289 | double FPVal; |
| 290 | bool BoolVal; |
| 291 | |
| 292 | char *StrVal; // This memory is strdup'd! |
| 293 | llvm::ValID ValIDVal; // strdup'd memory maybe! |
| 294 | |
| 295 | llvm::Instruction::BinaryOps BinaryOpVal; |
| 296 | llvm::Instruction::TermOps TermOpVal; |
| 297 | llvm::Instruction::MemoryOps MemOpVal; |
| 298 | llvm::Instruction::OtherOps OtherOpVal; |
| 299 | llvm::Module::Endianness Endianness; |
Anton Korobeynikov | 43e3aad | 2006-09-14 18:25:26 +0000 | [diff] [blame] | 300 | } |
| 301 | /* Line 1528 of yacc.c. */ |
Anton Korobeynikov | bcb9770 | 2006-09-17 20:25:45 +0000 | [diff] [blame] | 302 | #line 303 "llvmAsmParser.tab.h" |
Anton Korobeynikov | 43e3aad | 2006-09-14 18:25:26 +0000 | [diff] [blame] | 303 | YYSTYPE; |
| 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; |
Anton Korobeynikov | 43e3aad | 2006-09-14 18:25:26 +0000 | [diff] [blame] | 310 | |