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