blob: a7d291a77f68516e1fc1e14ded5930fe74097cc4 [file] [log] [blame]
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +00001/* 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,
108 RET = 324,
109 BR = 325,
110 SWITCH = 326,
111 INVOKE = 327,
112 UNWIND = 328,
113 UNREACHABLE = 329,
114 ADD = 330,
115 SUB = 331,
116 MUL = 332,
117 DIV = 333,
118 REM = 334,
119 AND = 335,
120 OR = 336,
121 XOR = 337,
122 SETLE = 338,
123 SETGE = 339,
124 SETLT = 340,
125 SETGT = 341,
126 SETEQ = 342,
127 SETNE = 343,
128 MALLOC = 344,
129 ALLOCA = 345,
130 FREE = 346,
131 LOAD = 347,
132 STORE = 348,
133 GETELEMENTPTR = 349,
134 PHI_TOK = 350,
135 CAST = 351,
136 SELECT = 352,
137 SHL = 353,
138 SHR = 354,
139 VAARG = 355,
140 EXTRACTELEMENT = 356,
141 INSERTELEMENT = 357,
142 SHUFFLEVECTOR = 358,
143 VAARG_old = 359,
144 VANEXT_old = 360
145 };
146#endif
147/* Tokens. */
148#define ESINT64VAL 258
149#define EUINT64VAL 259
150#define SINTVAL 260
151#define UINTVAL 261
152#define FPVAL 262
153#define VOID 263
154#define BOOL 264
155#define SBYTE 265
156#define UBYTE 266
157#define SHORT 267
158#define USHORT 268
159#define INT 269
160#define UINT 270
161#define LONG 271
162#define ULONG 272
163#define FLOAT 273
164#define DOUBLE 274
165#define TYPE 275
166#define LABEL 276
167#define VAR_ID 277
168#define LABELSTR 278
169#define STRINGCONSTANT 279
170#define IMPLEMENTATION 280
171#define ZEROINITIALIZER 281
172#define TRUETOK 282
173#define FALSETOK 283
174#define BEGINTOK 284
175#define ENDTOK 285
176#define DECLARE 286
177#define GLOBAL 287
178#define CONSTANT 288
179#define SECTION 289
180#define VOLATILE 290
181#define TO 291
182#define DOTDOTDOT 292
183#define NULL_TOK 293
184#define UNDEF 294
185#define CONST 295
186#define INTERNAL 296
187#define LINKONCE 297
188#define WEAK 298
189#define APPENDING 299
190#define DLLIMPORT 300
191#define DLLEXPORT 301
192#define EXTERN_WEAK 302
193#define OPAQUE 303
194#define NOT 304
195#define EXTERNAL 305
196#define TARGET 306
197#define TRIPLE 307
198#define ENDIAN 308
199#define POINTERSIZE 309
200#define LITTLE 310
201#define BIG 311
202#define ALIGN 312
203#define DEPLIBS 313
204#define CALL 314
205#define TAIL 315
206#define ASM_TOK 316
207#define MODULE 317
208#define SIDEEFFECT 318
209#define CC_TOK 319
210#define CCC_TOK 320
211#define CSRETCC_TOK 321
212#define FASTCC_TOK 322
213#define COLDCC_TOK 323
214#define RET 324
215#define BR 325
216#define SWITCH 326
217#define INVOKE 327
218#define UNWIND 328
219#define UNREACHABLE 329
220#define ADD 330
221#define SUB 331
222#define MUL 332
223#define DIV 333
224#define REM 334
225#define AND 335
226#define OR 336
227#define XOR 337
228#define SETLE 338
229#define SETGE 339
230#define SETLT 340
231#define SETGT 341
232#define SETEQ 342
233#define SETNE 343
234#define MALLOC 344
235#define ALLOCA 345
236#define FREE 346
237#define LOAD 347
238#define STORE 348
239#define GETELEMENTPTR 349
240#define PHI_TOK 350
241#define CAST 351
242#define SELECT 352
243#define SHL 353
244#define SHR 354
245#define VAARG 355
246#define EXTRACTELEMENT 356
247#define INSERTELEMENT 357
248#define SHUFFLEVECTOR 358
249#define VAARG_old 359
250#define VANEXT_old 360
251
252
253
254
255#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
256typedef union YYSTYPE
257#line 913 "/home/asl/proj/llvm/src/lib/AsmParser/llvmAsmParser.y"
258{
Reid Spencer68a24bd2005-08-27 18:50:39 +0000259 llvm::Module *ModuleVal;
260 llvm::Function *FunctionVal;
261 std::pair<llvm::PATypeHolder*, char*> *ArgVal;
262 llvm::BasicBlock *BasicBlockVal;
263 llvm::TerminatorInst *TermInstVal;
264 llvm::Instruction *InstVal;
265 llvm::Constant *ConstVal;
266
267 const llvm::Type *PrimType;
268 llvm::PATypeHolder *TypeVal;
269 llvm::Value *ValueVal;
270
271 std::vector<std::pair<llvm::PATypeHolder*,char*> > *ArgList;
272 std::vector<llvm::Value*> *ValueList;
273 std::list<llvm::PATypeHolder> *TypeList;
274 // Represent the RHS of PHI node
275 std::list<std::pair<llvm::Value*,
276 llvm::BasicBlock*> > *PHIList;
277 std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;
278 std::vector<llvm::Constant*> *ConstVector;
279
280 llvm::GlobalValue::LinkageTypes Linkage;
281 int64_t SInt64Val;
282 uint64_t UInt64Val;
283 int SIntVal;
284 unsigned UIntVal;
285 double FPVal;
286 bool BoolVal;
287
288 char *StrVal; // This memory is strdup'd!
289 llvm::ValID ValIDVal; // strdup'd memory maybe!
290
291 llvm::Instruction::BinaryOps BinaryOpVal;
292 llvm::Instruction::TermOps TermOpVal;
293 llvm::Instruction::MemoryOps MemOpVal;
294 llvm::Instruction::OtherOps OtherOpVal;
295 llvm::Module::Endianness Endianness;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000296}
297/* Line 1528 of yacc.c. */
298#line 299 "llvmAsmParser.tab.h"
299 YYSTYPE;
300# define yystype YYSTYPE /* obsolescent; will be withdrawn */
301# define YYSTYPE_IS_DECLARED 1
302# define YYSTYPE_IS_TRIVIAL 1
303#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +0000304
305extern YYSTYPE llvmAsmlval;
Anton Korobeynikov43e3aad2006-09-14 18:25:26 +0000306