blob: 598682b22ffc2f4fe664a3f521e32d7ba0e1ee3d [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,
187 BYVAL = 403,
188 NEST = 404,
189 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,
197 DEFAULT = 413,
198 HIDDEN = 414,
199 PROTECTED = 415
Dan Gohman54392c12008-04-19 00:24:39 +0000200 };
201#endif
202/* Tokens. */
203#define ESINT64VAL 258
204#define EUINT64VAL 259
205#define ESAPINTVAL 260
206#define EUAPINTVAL 261
207#define LOCALVAL_ID 262
208#define GLOBALVAL_ID 263
209#define FPVAL 264
210#define VOID 265
211#define INTTYPE 266
212#define FLOAT 267
213#define DOUBLE 268
214#define X86_FP80 269
215#define FP128 270
216#define PPC_FP128 271
217#define LABEL 272
218#define TYPE 273
219#define LOCALVAR 274
220#define GLOBALVAR 275
221#define LABELSTR 276
222#define STRINGCONSTANT 277
223#define ATSTRINGCONSTANT 278
224#define PCTSTRINGCONSTANT 279
225#define ZEROINITIALIZER 280
226#define TRUETOK 281
227#define FALSETOK 282
228#define BEGINTOK 283
229#define ENDTOK 284
230#define DECLARE 285
231#define DEFINE 286
232#define GLOBAL 287
233#define CONSTANT 288
234#define SECTION 289
235#define ALIAS 290
236#define VOLATILE 291
237#define THREAD_LOCAL 292
238#define TO 293
239#define DOTDOTDOT 294
240#define NULL_TOK 295
241#define UNDEF 296
242#define INTERNAL 297
243#define LINKONCE 298
244#define WEAK 299
245#define APPENDING 300
246#define DLLIMPORT 301
247#define DLLEXPORT 302
248#define EXTERN_WEAK 303
Dale Johannesen280e7bc2008-05-14 20:13:36 +0000249#define COMMON 304
250#define OPAQUE 305
251#define EXTERNAL 306
252#define TARGET 307
253#define TRIPLE 308
254#define ALIGN 309
255#define ADDRSPACE 310
256#define DEPLIBS 311
257#define CALL 312
258#define TAIL 313
259#define ASM_TOK 314
260#define MODULE 315
261#define SIDEEFFECT 316
262#define CC_TOK 317
263#define CCC_TOK 318
264#define FASTCC_TOK 319
265#define COLDCC_TOK 320
266#define X86_STDCALLCC_TOK 321
267#define X86_FASTCALLCC_TOK 322
Dale Johannesenf4581482008-09-26 19:32:34 +0000268#define DATALAYOUT 323
269#define RET 324
270#define BR 325
271#define SWITCH 326
272#define INVOKE 327
273#define UNWIND 328
274#define UNREACHABLE 329
275#define ADD 330
276#define SUB 331
277#define MUL 332
278#define UDIV 333
279#define SDIV 334
280#define FDIV 335
281#define UREM 336
282#define SREM 337
283#define FREM 338
284#define AND 339
285#define OR 340
286#define XOR 341
287#define SHL 342
288#define LSHR 343
289#define ASHR 344
290#define ICMP 345
291#define FCMP 346
292#define VICMP 347
293#define VFCMP 348
294#define EQ 349
295#define NE 350
296#define SLT 351
297#define SGT 352
298#define SLE 353
299#define SGE 354
300#define ULT 355
301#define UGT 356
302#define ULE 357
303#define UGE 358
304#define OEQ 359
305#define ONE 360
306#define OLT 361
307#define OGT 362
308#define OLE 363
309#define OGE 364
310#define ORD 365
311#define UNO 366
312#define UEQ 367
313#define UNE 368
314#define MALLOC 369
315#define ALLOCA 370
316#define FREE 371
317#define LOAD 372
318#define STORE 373
319#define GETELEMENTPTR 374
320#define TRUNC 375
321#define ZEXT 376
322#define SEXT 377
323#define FPTRUNC 378
324#define FPEXT 379
325#define BITCAST 380
326#define UITOFP 381
327#define SITOFP 382
328#define FPTOUI 383
329#define FPTOSI 384
330#define INTTOPTR 385
331#define PTRTOINT 386
332#define PHI_TOK 387
333#define SELECT 388
334#define VAARG 389
335#define EXTRACTELEMENT 390
336#define INSERTELEMENT 391
337#define SHUFFLEVECTOR 392
338#define GETRESULT 393
339#define EXTRACTVALUE 394
340#define INSERTVALUE 395
341#define SIGNEXT 396
342#define ZEROEXT 397
343#define NORETURN 398
344#define INREG 399
345#define SRET 400
346#define NOUNWIND 401
347#define NOALIAS 402
348#define BYVAL 403
349#define NEST 404
350#define READNONE 405
351#define READONLY 406
352#define GC 407
Devang Patel008cd3e2008-09-26 23:51:19 +0000353#define OPTSIZE 408
354#define NOINLINE 409
355#define ALWAYSINLINE 410
Bill Wendling60f02fc2008-11-13 01:03:00 +0000356#define SSP 411
357#define SSPREQ 412
358#define DEFAULT 413
359#define HIDDEN 414
360#define PROTECTED 415
Dan Gohman54392c12008-04-19 00:24:39 +0000361
362
363
364
365#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
366typedef union YYSTYPE
Bill Wendling60f02fc2008-11-13 01:03:00 +0000367#line 986 "/Volumes/Gir/devel/llvm/llvm.src/lib/AsmParser/llvmAsmParser.y"
Dan Gohman54392c12008-04-19 00:24:39 +0000368{
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000369 llvm::Module *ModuleVal;
370 llvm::Function *FunctionVal;
371 llvm::BasicBlock *BasicBlockVal;
372 llvm::TerminatorInst *TermInstVal;
373 llvm::Instruction *InstVal;
374 llvm::Constant *ConstVal;
375
376 const llvm::Type *PrimType;
377 std::list<llvm::PATypeHolder> *TypeList;
378 llvm::PATypeHolder *TypeVal;
379 llvm::Value *ValueVal;
380 std::vector<llvm::Value*> *ValueList;
Dan Gohmane5febe42008-05-31 00:58:22 +0000381 std::vector<unsigned> *ConstantList;
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000382 llvm::ArgListType *ArgList;
383 llvm::TypeWithAttrs TypeWithAttrs;
384 llvm::TypeWithAttrsList *TypeWithAttrsList;
Dale Johannesencfb19e62007-11-05 21:20:28 +0000385 llvm::ParamList *ParamList;
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000386
387 // Represent the RHS of PHI node
388 std::list<std::pair<llvm::Value*,
389 llvm::BasicBlock*> > *PHIList;
390 std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;
391 std::vector<llvm::Constant*> *ConstVector;
392
393 llvm::GlobalValue::LinkageTypes Linkage;
394 llvm::GlobalValue::VisibilityTypes Visibility;
Devang Pateld222f862008-09-25 21:00:45 +0000395 llvm::Attributes Attributes;
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000396 llvm::APInt *APIntVal;
397 int64_t SInt64Val;
398 uint64_t UInt64Val;
399 int SIntVal;
400 unsigned UIntVal;
Dale Johannesenb9de9f02007-09-06 18:13:44 +0000401 llvm::APFloat *FPVal;
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000402 bool BoolVal;
403
404 std::string *StrVal; // This memory must be deleted
405 llvm::ValID ValIDVal;
406
407 llvm::Instruction::BinaryOps BinaryOpVal;
408 llvm::Instruction::TermOps TermOpVal;
409 llvm::Instruction::MemoryOps MemOpVal;
410 llvm::Instruction::CastOps CastOpVal;
411 llvm::Instruction::OtherOps OtherOpVal;
412 llvm::ICmpInst::Predicate IPredicate;
413 llvm::FCmpInst::Predicate FPredicate;
Dan Gohman54392c12008-04-19 00:24:39 +0000414}
Bill Wendling60f02fc2008-11-13 01:03:00 +0000415/* Line 1529 of yacc.c. */
416#line 417 "llvmAsmParser.tab.h"
Dan Gohman54392c12008-04-19 00:24:39 +0000417 YYSTYPE;
418# define yystype YYSTYPE /* obsolescent; will be withdrawn */
419# define YYSTYPE_IS_DECLARED 1
420# define YYSTYPE_IS_TRIVIAL 1
421#endif
Dan Gohmanf17a25c2007-07-18 16:29:46 +0000422
423extern YYSTYPE llvmAsmlval;
Dan Gohman54392c12008-04-19 00:24:39 +0000424