blob: 9df712ef5954bc92cca6bc7d8798aa0dae2ec715 [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,
Dale Johannesen280e7bc2008-05-14 20:13:36 +000088 COMMON = 304,
89 OPAQUE = 305,
90 EXTERNAL = 306,
91 TARGET = 307,
92 TRIPLE = 308,
93 ALIGN = 309,
94 ADDRSPACE = 310,
95 DEPLIBS = 311,
96 CALL = 312,
97 TAIL = 313,
98 ASM_TOK = 314,
99 MODULE = 315,
100 SIDEEFFECT = 316,
101 CC_TOK = 317,
102 CCC_TOK = 318,
103 FASTCC_TOK = 319,
104 COLDCC_TOK = 320,
105 X86_STDCALLCC_TOK = 321,
106 X86_FASTCALLCC_TOK = 322,
Dale Johannesenf4581482008-09-26 19:32:34 +0000107 DATALAYOUT = 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 VICMP = 347,
132 VFCMP = 348,
133 EQ = 349,
134 NE = 350,
135 SLT = 351,
136 SGT = 352,
137 SLE = 353,
138 SGE = 354,
139 ULT = 355,
140 UGT = 356,
141 ULE = 357,
142 UGE = 358,
143 OEQ = 359,
144 ONE = 360,
145 OLT = 361,
146 OGT = 362,
147 OLE = 363,
148 OGE = 364,
149 ORD = 365,
150 UNO = 366,
151 UEQ = 367,
152 UNE = 368,
153 MALLOC = 369,
154 ALLOCA = 370,
155 FREE = 371,
156 LOAD = 372,
157 STORE = 373,
158 GETELEMENTPTR = 374,
159 TRUNC = 375,
160 ZEXT = 376,
161 SEXT = 377,
162 FPTRUNC = 378,
163 FPEXT = 379,
164 BITCAST = 380,
165 UITOFP = 381,
166 SITOFP = 382,
167 FPTOUI = 383,
168 FPTOSI = 384,
169 INTTOPTR = 385,
170 PTRTOINT = 386,
171 PHI_TOK = 387,
172 SELECT = 388,
173 VAARG = 389,
174 EXTRACTELEMENT = 390,
175 INSERTELEMENT = 391,
176 SHUFFLEVECTOR = 392,
177 GETRESULT = 393,
178 EXTRACTVALUE = 394,
179 INSERTVALUE = 395,
180 SIGNEXT = 396,
181 ZEROEXT = 397,
182 NORETURN = 398,
183 INREG = 399,
184 SRET = 400,
185 NOUNWIND = 401,
186 NOALIAS = 402,
Nick Lewyckye2c0e0f2008-12-15 07:31:07 +0000187 NOCAPTURE = 403,
188 BYVAL = 404,
Dale Johannesenf4581482008-09-26 19:32:34 +0000189 READNONE = 405,
190 READONLY = 406,
191 GC = 407,
Devang Patel008cd3e2008-09-26 23:51:19 +0000192 OPTSIZE = 408,
193 NOINLINE = 409,
194 ALWAYSINLINE = 410,
Bill Wendling60f02fc2008-11-13 01:03:00 +0000195 SSP = 411,
196 SSPREQ = 412,
Nick Lewyckye2c0e0f2008-12-15 07:31:07 +0000197 NEST = 413,
198 DEFAULT = 414,
199 HIDDEN = 415,
200 PROTECTED = 416
Dan Gohman54392c12008-04-19 00:24:39 +0000201 };
202#endif
203/* Tokens. */
204#define ESINT64VAL 258
205#define EUINT64VAL 259
206#define ESAPINTVAL 260
207#define EUAPINTVAL 261
208#define LOCALVAL_ID 262
209#define GLOBALVAL_ID 263
210#define FPVAL 264
211#define VOID 265
212#define INTTYPE 266
213#define FLOAT 267
214#define DOUBLE 268
215#define X86_FP80 269
216#define FP128 270
217#define PPC_FP128 271
218#define LABEL 272
219#define TYPE 273
220#define LOCALVAR 274
221#define GLOBALVAR 275
222#define LABELSTR 276
223#define STRINGCONSTANT 277
224#define ATSTRINGCONSTANT 278
225#define PCTSTRINGCONSTANT 279
226#define ZEROINITIALIZER 280
227#define TRUETOK 281
228#define FALSETOK 282
229#define BEGINTOK 283
230#define ENDTOK 284
231#define DECLARE 285
232#define DEFINE 286
233#define GLOBAL 287
234#define CONSTANT 288
235#define SECTION 289
236#define ALIAS 290
237#define VOLATILE 291
238#define THREAD_LOCAL 292
239#define TO 293
240#define DOTDOTDOT 294
241#define NULL_TOK 295
242#define UNDEF 296
243#define INTERNAL 297
244#define LINKONCE 298
245#define WEAK 299
246#define APPENDING 300
247#define DLLIMPORT 301
248#define DLLEXPORT 302
249#define EXTERN_WEAK 303
Dale Johannesen280e7bc2008-05-14 20:13:36 +0000250#define COMMON 304
251#define OPAQUE 305
252#define EXTERNAL 306
253#define TARGET 307
254#define TRIPLE 308
255#define ALIGN 309
256#define ADDRSPACE 310
257#define DEPLIBS 311
258#define CALL 312
259#define TAIL 313
260#define ASM_TOK 314
261#define MODULE 315
262#define SIDEEFFECT 316
263#define CC_TOK 317
264#define CCC_TOK 318
265#define FASTCC_TOK 319
266#define COLDCC_TOK 320
267#define X86_STDCALLCC_TOK 321
268#define X86_FASTCALLCC_TOK 322
Dale Johannesenf4581482008-09-26 19:32:34 +0000269#define DATALAYOUT 323
270#define RET 324
271#define BR 325
272#define SWITCH 326
273#define INVOKE 327
274#define UNWIND 328
275#define UNREACHABLE 329
276#define ADD 330
277#define SUB 331
278#define MUL 332
279#define UDIV 333
280#define SDIV 334
281#define FDIV 335
282#define UREM 336
283#define SREM 337
284#define FREM 338
285#define AND 339
286#define OR 340
287#define XOR 341
288#define SHL 342
289#define LSHR 343
290#define ASHR 344
291#define ICMP 345
292#define FCMP 346
293#define VICMP 347
294#define VFCMP 348
295#define EQ 349
296#define NE 350
297#define SLT 351
298#define SGT 352
299#define SLE 353
300#define SGE 354
301#define ULT 355
302#define UGT 356
303#define ULE 357
304#define UGE 358
305#define OEQ 359
306#define ONE 360
307#define OLT 361
308#define OGT 362
309#define OLE 363
310#define OGE 364
311#define ORD 365
312#define UNO 366
313#define UEQ 367
314#define UNE 368
315#define MALLOC 369
316#define ALLOCA 370
317#define FREE 371
318#define LOAD 372
319#define STORE 373
320#define GETELEMENTPTR 374
321#define TRUNC 375
322#define ZEXT 376
323#define SEXT 377
324#define FPTRUNC 378
325#define FPEXT 379
326#define BITCAST 380
327#define UITOFP 381
328#define SITOFP 382
329#define FPTOUI 383
330#define FPTOSI 384
331#define INTTOPTR 385
332#define PTRTOINT 386
333#define PHI_TOK 387
334#define SELECT 388
335#define VAARG 389
336#define EXTRACTELEMENT 390
337#define INSERTELEMENT 391
338#define SHUFFLEVECTOR 392
339#define GETRESULT 393
340#define EXTRACTVALUE 394
341#define INSERTVALUE 395
342#define SIGNEXT 396
343#define ZEROEXT 397
344#define NORETURN 398
345#define INREG 399
346#define SRET 400
347#define NOUNWIND 401
348#define NOALIAS 402
Nick Lewyckye2c0e0f2008-12-15 07:31:07 +0000349#define NOCAPTURE 403
350#define BYVAL 404
Dale Johannesenf4581482008-09-26 19:32:34 +0000351#define READNONE 405
352#define READONLY 406
353#define GC 407
Devang Patel008cd3e2008-09-26 23:51:19 +0000354#define OPTSIZE 408
355#define NOINLINE 409
356#define ALWAYSINLINE 410
Bill Wendling60f02fc2008-11-13 01:03:00 +0000357#define SSP 411
358#define SSPREQ 412
Nick Lewyckye2c0e0f2008-12-15 07:31:07 +0000359#define NEST 413
360#define DEFAULT 414
361#define HIDDEN 415
362#define PROTECTED 416
Dan Gohman54392c12008-04-19 00:24:39 +0000363
364
365
366
367#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
368typedef union YYSTYPE
Nick Lewyckye2c0e0f2008-12-15 07:31:07 +0000369#line 986 "/home/nicholas/llvm-commit/lib/AsmParser/llvmAsmParser.y"
Dan Gohman54392c12008-04-19 00:24:39 +0000370{
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000371 llvm::Module *ModuleVal;
372 llvm::Function *FunctionVal;
373 llvm::BasicBlock *BasicBlockVal;
374 llvm::TerminatorInst *TermInstVal;
375 llvm::Instruction *InstVal;
376 llvm::Constant *ConstVal;
377
378 const llvm::Type *PrimType;
379 std::list<llvm::PATypeHolder> *TypeList;
380 llvm::PATypeHolder *TypeVal;
381 llvm::Value *ValueVal;
382 std::vector<llvm::Value*> *ValueList;
Dan Gohmane5febe42008-05-31 00:58:22 +0000383 std::vector<unsigned> *ConstantList;
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000384 llvm::ArgListType *ArgList;
385 llvm::TypeWithAttrs TypeWithAttrs;
386 llvm::TypeWithAttrsList *TypeWithAttrsList;
Dale Johannesencfb19e62007-11-05 21:20:28 +0000387 llvm::ParamList *ParamList;
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000388
389 // Represent the RHS of PHI node
390 std::list<std::pair<llvm::Value*,
391 llvm::BasicBlock*> > *PHIList;
392 std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;
393 std::vector<llvm::Constant*> *ConstVector;
394
395 llvm::GlobalValue::LinkageTypes Linkage;
396 llvm::GlobalValue::VisibilityTypes Visibility;
Devang Pateld222f862008-09-25 21:00:45 +0000397 llvm::Attributes Attributes;
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000398 llvm::APInt *APIntVal;
399 int64_t SInt64Val;
400 uint64_t UInt64Val;
401 int SIntVal;
402 unsigned UIntVal;
Dale Johannesenb9de9f02007-09-06 18:13:44 +0000403 llvm::APFloat *FPVal;
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000404 bool BoolVal;
405
406 std::string *StrVal; // This memory must be deleted
407 llvm::ValID ValIDVal;
408
409 llvm::Instruction::BinaryOps BinaryOpVal;
410 llvm::Instruction::TermOps TermOpVal;
411 llvm::Instruction::MemoryOps MemOpVal;
412 llvm::Instruction::CastOps CastOpVal;
413 llvm::Instruction::OtherOps OtherOpVal;
414 llvm::ICmpInst::Predicate IPredicate;
415 llvm::FCmpInst::Predicate FPredicate;
Dan Gohman54392c12008-04-19 00:24:39 +0000416}
Nick Lewyckye2c0e0f2008-12-15 07:31:07 +0000417/* Line 1489 of yacc.c. */
418#line 419 "llvmAsmParser.tab.h"
Dan Gohman54392c12008-04-19 00:24:39 +0000419 YYSTYPE;
420# define yystype YYSTYPE /* obsolescent; will be withdrawn */
421# define YYSTYPE_IS_DECLARED 1
422# define YYSTYPE_IS_TRIVIAL 1
423#endif
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000424
425extern YYSTYPE llvmAsmlval;
Dan Gohman54392c12008-04-19 00:24:39 +0000426