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