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