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