blob: f6e464848e7e6667ce9c30865433f6beb1d68ff6 [file] [log] [blame]
Chris Lattner4ee451d2007-12-29 20:36:04 +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 ESAPINTVAL = 260,
45 EUAPINTVAL = 261,
46 LOCALVAL_ID = 262,
47 GLOBALVAL_ID = 263,
48 FPVAL = 264,
49 VOID = 265,
50 INTTYPE = 266,
51 FLOAT = 267,
52 DOUBLE = 268,
53 X86_FP80 = 269,
54 FP128 = 270,
55 PPC_FP128 = 271,
56 LABEL = 272,
57 TYPE = 273,
58 LOCALVAR = 274,
59 GLOBALVAR = 275,
60 LABELSTR = 276,
61 STRINGCONSTANT = 277,
62 ATSTRINGCONSTANT = 278,
63 PCTSTRINGCONSTANT = 279,
64 ZEROINITIALIZER = 280,
65 TRUETOK = 281,
66 FALSETOK = 282,
67 BEGINTOK = 283,
68 ENDTOK = 284,
69 DECLARE = 285,
70 DEFINE = 286,
71 GLOBAL = 287,
72 CONSTANT = 288,
73 SECTION = 289,
74 ALIAS = 290,
75 VOLATILE = 291,
76 THREAD_LOCAL = 292,
77 TO = 293,
78 DOTDOTDOT = 294,
79 NULL_TOK = 295,
80 UNDEF = 296,
81 INTERNAL = 297,
82 LINKONCE = 298,
83 WEAK = 299,
84 APPENDING = 300,
85 DLLIMPORT = 301,
86 DLLEXPORT = 302,
87 EXTERN_WEAK = 303,
88 OPAQUE = 304,
89 EXTERNAL = 305,
90 TARGET = 306,
91 TRIPLE = 307,
92 ALIGN = 308,
93 ADDRSPACE = 309,
94 DEPLIBS = 310,
95 CALL = 311,
96 TAIL = 312,
97 ASM_TOK = 313,
98 MODULE = 314,
99 SIDEEFFECT = 315,
100 CC_TOK = 316,
101 CCC_TOK = 317,
102 FASTCC_TOK = 318,
103 COLDCC_TOK = 319,
104 X86_STDCALLCC_TOK = 320,
105 X86_FASTCALLCC_TOK = 321,
106 DATALAYOUT = 322,
107 RET = 323,
108 BR = 324,
109 SWITCH = 325,
110 INVOKE = 326,
111 UNWIND = 327,
112 UNREACHABLE = 328,
113 ADD = 329,
114 SUB = 330,
115 MUL = 331,
116 UDIV = 332,
117 SDIV = 333,
118 FDIV = 334,
119 UREM = 335,
120 SREM = 336,
121 FREM = 337,
122 AND = 338,
123 OR = 339,
124 XOR = 340,
125 SHL = 341,
126 LSHR = 342,
127 ASHR = 343,
128 ICMP = 344,
129 FCMP = 345,
130 EQ = 346,
131 NE = 347,
132 SLT = 348,
133 SGT = 349,
134 SLE = 350,
135 SGE = 351,
136 ULT = 352,
137 UGT = 353,
138 ULE = 354,
139 UGE = 355,
140 OEQ = 356,
141 ONE = 357,
142 OLT = 358,
143 OGT = 359,
144 OLE = 360,
145 OGE = 361,
146 ORD = 362,
147 UNO = 363,
148 UEQ = 364,
149 UNE = 365,
150 MALLOC = 366,
151 ALLOCA = 367,
152 FREE = 368,
153 LOAD = 369,
154 STORE = 370,
155 GETELEMENTPTR = 371,
156 TRUNC = 372,
157 ZEXT = 373,
158 SEXT = 374,
159 FPTRUNC = 375,
160 FPEXT = 376,
161 BITCAST = 377,
162 UITOFP = 378,
163 SITOFP = 379,
164 FPTOUI = 380,
165 FPTOSI = 381,
166 INTTOPTR = 382,
167 PTRTOINT = 383,
168 PHI_TOK = 384,
169 SELECT = 385,
170 VAARG = 386,
171 EXTRACTELEMENT = 387,
172 INSERTELEMENT = 388,
173 SHUFFLEVECTOR = 389,
174 SIGNEXT = 390,
175 ZEROEXT = 391,
176 NORETURN = 392,
177 INREG = 393,
178 SRET = 394,
179 NOUNWIND = 395,
180 NOALIAS = 396,
181 BYVAL = 397,
182 NEST = 398,
183 READNONE = 399,
184 READONLY = 400,
185 GC = 401,
186 DEFAULT = 402,
187 HIDDEN = 403,
188 PROTECTED = 404
189 };
190#endif
191/* Tokens. */
192#define ESINT64VAL 258
193#define EUINT64VAL 259
194#define ESAPINTVAL 260
195#define EUAPINTVAL 261
196#define LOCALVAL_ID 262
197#define GLOBALVAL_ID 263
198#define FPVAL 264
199#define VOID 265
200#define INTTYPE 266
201#define FLOAT 267
202#define DOUBLE 268
203#define X86_FP80 269
204#define FP128 270
205#define PPC_FP128 271
206#define LABEL 272
207#define TYPE 273
208#define LOCALVAR 274
209#define GLOBALVAR 275
210#define LABELSTR 276
211#define STRINGCONSTANT 277
212#define ATSTRINGCONSTANT 278
213#define PCTSTRINGCONSTANT 279
214#define ZEROINITIALIZER 280
215#define TRUETOK 281
216#define FALSETOK 282
217#define BEGINTOK 283
218#define ENDTOK 284
219#define DECLARE 285
220#define DEFINE 286
221#define GLOBAL 287
222#define CONSTANT 288
223#define SECTION 289
224#define ALIAS 290
225#define VOLATILE 291
226#define THREAD_LOCAL 292
227#define TO 293
228#define DOTDOTDOT 294
229#define NULL_TOK 295
230#define UNDEF 296
231#define INTERNAL 297
232#define LINKONCE 298
233#define WEAK 299
234#define APPENDING 300
235#define DLLIMPORT 301
236#define DLLEXPORT 302
237#define EXTERN_WEAK 303
238#define OPAQUE 304
239#define EXTERNAL 305
240#define TARGET 306
241#define TRIPLE 307
242#define ALIGN 308
243#define ADDRSPACE 309
244#define DEPLIBS 310
245#define CALL 311
246#define TAIL 312
247#define ASM_TOK 313
248#define MODULE 314
249#define SIDEEFFECT 315
250#define CC_TOK 316
251#define CCC_TOK 317
252#define FASTCC_TOK 318
253#define COLDCC_TOK 319
254#define X86_STDCALLCC_TOK 320
255#define X86_FASTCALLCC_TOK 321
256#define DATALAYOUT 322
257#define RET 323
258#define BR 324
259#define SWITCH 325
260#define INVOKE 326
261#define UNWIND 327
262#define UNREACHABLE 328
263#define ADD 329
264#define SUB 330
265#define MUL 331
266#define UDIV 332
267#define SDIV 333
268#define FDIV 334
269#define UREM 335
270#define SREM 336
271#define FREM 337
272#define AND 338
273#define OR 339
274#define XOR 340
275#define SHL 341
276#define LSHR 342
277#define ASHR 343
278#define ICMP 344
279#define FCMP 345
280#define EQ 346
281#define NE 347
282#define SLT 348
283#define SGT 349
284#define SLE 350
285#define SGE 351
286#define ULT 352
287#define UGT 353
288#define ULE 354
289#define UGE 355
290#define OEQ 356
291#define ONE 357
292#define OLT 358
293#define OGT 359
294#define OLE 360
295#define OGE 361
296#define ORD 362
297#define UNO 363
298#define UEQ 364
299#define UNE 365
300#define MALLOC 366
301#define ALLOCA 367
302#define FREE 368
303#define LOAD 369
304#define STORE 370
305#define GETELEMENTPTR 371
306#define TRUNC 372
307#define ZEXT 373
308#define SEXT 374
309#define FPTRUNC 375
310#define FPEXT 376
311#define BITCAST 377
312#define UITOFP 378
313#define SITOFP 379
314#define FPTOUI 380
315#define FPTOSI 381
316#define INTTOPTR 382
317#define PTRTOINT 383
318#define PHI_TOK 384
319#define SELECT 385
320#define VAARG 386
321#define EXTRACTELEMENT 387
322#define INSERTELEMENT 388
323#define SHUFFLEVECTOR 389
324#define SIGNEXT 390
325#define ZEROEXT 391
326#define NORETURN 392
327#define INREG 393
328#define SRET 394
329#define NOUNWIND 395
330#define NOALIAS 396
331#define BYVAL 397
332#define NEST 398
333#define READNONE 399
334#define READONLY 400
335#define GC 401
336#define DEFAULT 402
337#define HIDDEN 403
338#define PROTECTED 404
339
340
341
342
343#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
344typedef union YYSTYPE
345#line 947 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y"
346{
Reid Spencer68a24bd2005-08-27 18:50:39 +0000347 llvm::Module *ModuleVal;
348 llvm::Function *FunctionVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000349 llvm::BasicBlock *BasicBlockVal;
350 llvm::TerminatorInst *TermInstVal;
351 llvm::Instruction *InstVal;
Reid Spencera132e042006-12-03 05:46:11 +0000352 llvm::Constant *ConstVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000353
Reid Spencera132e042006-12-03 05:46:11 +0000354 const llvm::Type *PrimType;
Reid Spencer14310612006-12-31 05:40:51 +0000355 std::list<llvm::PATypeHolder> *TypeList;
Reid Spencera132e042006-12-03 05:46:11 +0000356 llvm::PATypeHolder *TypeVal;
357 llvm::Value *ValueVal;
Reid Spencera132e042006-12-03 05:46:11 +0000358 std::vector<llvm::Value*> *ValueList;
Reid Spencer14310612006-12-31 05:40:51 +0000359 llvm::ArgListType *ArgList;
360 llvm::TypeWithAttrs TypeWithAttrs;
361 llvm::TypeWithAttrsList *TypeWithAttrsList;
Dale Johanneseneb57ea72007-11-05 21:20:28 +0000362 llvm::ParamList *ParamList;
Reid Spencer14310612006-12-31 05:40:51 +0000363
Reid Spencer68a24bd2005-08-27 18:50:39 +0000364 // Represent the RHS of PHI node
Reid Spencera132e042006-12-03 05:46:11 +0000365 std::list<std::pair<llvm::Value*,
366 llvm::BasicBlock*> > *PHIList;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000367 std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;
Reid Spencera132e042006-12-03 05:46:11 +0000368 std::vector<llvm::Constant*> *ConstVector;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000369
370 llvm::GlobalValue::LinkageTypes Linkage;
Anton Korobeynikov178a3522007-01-12 19:22:51 +0000371 llvm::GlobalValue::VisibilityTypes Visibility;
Reid Spencer7b5d4662007-04-09 06:16:21 +0000372 uint16_t ParamAttrs;
Reid Spencer38c91a92007-02-28 02:24:54 +0000373 llvm::APInt *APIntVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000374 int64_t SInt64Val;
375 uint64_t UInt64Val;
376 int SIntVal;
377 unsigned UIntVal;
Dale Johannesen43421b32007-09-06 18:13:44 +0000378 llvm::APFloat *FPVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000379 bool BoolVal;
380
Reid Spencer0a8a16b2007-05-22 18:52:55 +0000381 std::string *StrVal; // This memory must be deleted
382 llvm::ValID ValIDVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000383
Reid Spencera132e042006-12-03 05:46:11 +0000384 llvm::Instruction::BinaryOps BinaryOpVal;
385 llvm::Instruction::TermOps TermOpVal;
386 llvm::Instruction::MemoryOps MemOpVal;
387 llvm::Instruction::CastOps CastOpVal;
388 llvm::Instruction::OtherOps OtherOpVal;
Reid Spencera132e042006-12-03 05:46:11 +0000389 llvm::ICmpInst::Predicate IPredicate;
390 llvm::FCmpInst::Predicate FPredicate;
Chris Lattner4ee451d2007-12-29 20:36:04 +0000391}
392/* Line 1529 of yacc.c. */
393#line 394 "llvmAsmParser.tab.h"
394 YYSTYPE;
395# define yystype YYSTYPE /* obsolescent; will be withdrawn */
396# define YYSTYPE_IS_DECLARED 1
397# define YYSTYPE_IS_TRIVIAL 1
398#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +0000399
400extern YYSTYPE llvmAsmlval;
Chris Lattner4ee451d2007-12-29 20:36:04 +0000401