blob: feb3ff6d30c96b2063babdb00f761096759bfce7 [file] [log] [blame]
David Greene5fd22a82007-09-04 18:46:50 +00001/* A Bison parser, made by GNU Bison 1.875c. */
2
3/* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
20
21/* As a special exception, when this file is copied by Bison into a
22 Bison output file, you may use that output file without restriction.
23 This special exception was added by the Free Software Foundation
24 in version 1.24 of Bison. */
25
26/* Tokens. */
27#ifndef YYTOKENTYPE
28# define YYTOKENTYPE
29 /* Put the tokens into the symbol table, so that GDB and other debuggers
30 know about them. */
31 enum yytokentype {
32 ESINT64VAL = 258,
33 EUINT64VAL = 259,
34 ESAPINTVAL = 260,
35 EUAPINTVAL = 261,
36 LOCALVAL_ID = 262,
37 GLOBALVAL_ID = 263,
38 FPVAL = 264,
39 VOID = 265,
40 INTTYPE = 266,
41 FLOAT = 267,
42 DOUBLE = 268,
43 X86_FP80 = 269,
44 FP128 = 270,
45 PPC_FP128 = 271,
46 LABEL = 272,
47 TYPE = 273,
48 LOCALVAR = 274,
49 GLOBALVAR = 275,
50 LABELSTR = 276,
51 STRINGCONSTANT = 277,
52 ATSTRINGCONSTANT = 278,
53 PCTSTRINGCONSTANT = 279,
54 ZEROINITIALIZER = 280,
55 TRUETOK = 281,
56 FALSETOK = 282,
57 BEGINTOK = 283,
58 ENDTOK = 284,
59 DECLARE = 285,
60 DEFINE = 286,
61 GLOBAL = 287,
62 CONSTANT = 288,
63 SECTION = 289,
64 ALIAS = 290,
65 VOLATILE = 291,
66 THREAD_LOCAL = 292,
67 TO = 293,
68 DOTDOTDOT = 294,
69 NULL_TOK = 295,
70 UNDEF = 296,
71 INTERNAL = 297,
72 LINKONCE = 298,
73 WEAK = 299,
74 APPENDING = 300,
75 DLLIMPORT = 301,
76 DLLEXPORT = 302,
77 EXTERN_WEAK = 303,
78 OPAQUE = 304,
79 EXTERNAL = 305,
80 TARGET = 306,
81 TRIPLE = 307,
82 ALIGN = 308,
83 DEPLIBS = 309,
84 CALL = 310,
85 TAIL = 311,
86 ASM_TOK = 312,
87 MODULE = 313,
88 SIDEEFFECT = 314,
89 CC_TOK = 315,
90 CCC_TOK = 316,
91 FASTCC_TOK = 317,
92 COLDCC_TOK = 318,
93 X86_STDCALLCC_TOK = 319,
94 X86_FASTCALLCC_TOK = 320,
95 DATALAYOUT = 321,
96 RET = 322,
97 BR = 323,
98 SWITCH = 324,
99 INVOKE = 325,
100 UNWIND = 326,
101 UNREACHABLE = 327,
102 ADD = 328,
103 SUB = 329,
104 MUL = 330,
105 UDIV = 331,
106 SDIV = 332,
107 FDIV = 333,
108 UREM = 334,
109 SREM = 335,
110 FREM = 336,
111 AND = 337,
112 OR = 338,
113 XOR = 339,
114 SHL = 340,
115 LSHR = 341,
116 ASHR = 342,
117 ICMP = 343,
118 FCMP = 344,
119 EQ = 345,
120 NE = 346,
121 SLT = 347,
122 SGT = 348,
123 SLE = 349,
124 SGE = 350,
125 ULT = 351,
126 UGT = 352,
127 ULE = 353,
128 UGE = 354,
129 OEQ = 355,
130 ONE = 356,
131 OLT = 357,
132 OGT = 358,
133 OLE = 359,
134 OGE = 360,
135 ORD = 361,
136 UNO = 362,
137 UEQ = 363,
138 UNE = 364,
139 MALLOC = 365,
140 ALLOCA = 366,
141 FREE = 367,
142 LOAD = 368,
143 STORE = 369,
144 GETELEMENTPTR = 370,
145 TRUNC = 371,
146 ZEXT = 372,
147 SEXT = 373,
148 FPTRUNC = 374,
149 FPEXT = 375,
150 BITCAST = 376,
151 UITOFP = 377,
152 SITOFP = 378,
153 FPTOUI = 379,
154 FPTOSI = 380,
155 INTTOPTR = 381,
156 PTRTOINT = 382,
157 PHI_TOK = 383,
158 SELECT = 384,
159 VAARG = 385,
160 EXTRACTELEMENT = 386,
161 INSERTELEMENT = 387,
162 SHUFFLEVECTOR = 388,
163 SIGNEXT = 389,
164 ZEROEXT = 390,
165 NORETURN = 391,
166 INREG = 392,
167 SRET = 393,
168 NOUNWIND = 394,
169 NOALIAS = 395,
170 BYVAL = 396,
171 NEST = 397,
172 DEFAULT = 398,
173 HIDDEN = 399,
174 PROTECTED = 400
175 };
176#endif
177#define ESINT64VAL 258
178#define EUINT64VAL 259
179#define ESAPINTVAL 260
180#define EUAPINTVAL 261
181#define LOCALVAL_ID 262
182#define GLOBALVAL_ID 263
183#define FPVAL 264
184#define VOID 265
185#define INTTYPE 266
186#define FLOAT 267
187#define DOUBLE 268
188#define X86_FP80 269
189#define FP128 270
190#define PPC_FP128 271
191#define LABEL 272
192#define TYPE 273
193#define LOCALVAR 274
194#define GLOBALVAR 275
195#define LABELSTR 276
196#define STRINGCONSTANT 277
197#define ATSTRINGCONSTANT 278
198#define PCTSTRINGCONSTANT 279
199#define ZEROINITIALIZER 280
200#define TRUETOK 281
201#define FALSETOK 282
202#define BEGINTOK 283
203#define ENDTOK 284
204#define DECLARE 285
205#define DEFINE 286
206#define GLOBAL 287
207#define CONSTANT 288
208#define SECTION 289
209#define ALIAS 290
210#define VOLATILE 291
211#define THREAD_LOCAL 292
212#define TO 293
213#define DOTDOTDOT 294
214#define NULL_TOK 295
215#define UNDEF 296
216#define INTERNAL 297
217#define LINKONCE 298
218#define WEAK 299
219#define APPENDING 300
220#define DLLIMPORT 301
221#define DLLEXPORT 302
222#define EXTERN_WEAK 303
223#define OPAQUE 304
224#define EXTERNAL 305
225#define TARGET 306
226#define TRIPLE 307
227#define ALIGN 308
228#define DEPLIBS 309
229#define CALL 310
230#define TAIL 311
231#define ASM_TOK 312
232#define MODULE 313
233#define SIDEEFFECT 314
234#define CC_TOK 315
235#define CCC_TOK 316
236#define FASTCC_TOK 317
237#define COLDCC_TOK 318
238#define X86_STDCALLCC_TOK 319
239#define X86_FASTCALLCC_TOK 320
240#define DATALAYOUT 321
241#define RET 322
242#define BR 323
243#define SWITCH 324
244#define INVOKE 325
245#define UNWIND 326
246#define UNREACHABLE 327
247#define ADD 328
248#define SUB 329
249#define MUL 330
250#define UDIV 331
251#define SDIV 332
252#define FDIV 333
253#define UREM 334
254#define SREM 335
255#define FREM 336
256#define AND 337
257#define OR 338
258#define XOR 339
259#define SHL 340
260#define LSHR 341
261#define ASHR 342
262#define ICMP 343
263#define FCMP 344
264#define EQ 345
265#define NE 346
266#define SLT 347
267#define SGT 348
268#define SLE 349
269#define SGE 350
270#define ULT 351
271#define UGT 352
272#define ULE 353
273#define UGE 354
274#define OEQ 355
275#define ONE 356
276#define OLT 357
277#define OGT 358
278#define OLE 359
279#define OGE 360
280#define ORD 361
281#define UNO 362
282#define UEQ 363
283#define UNE 364
284#define MALLOC 365
285#define ALLOCA 366
286#define FREE 367
287#define LOAD 368
288#define STORE 369
289#define GETELEMENTPTR 370
290#define TRUNC 371
291#define ZEXT 372
292#define SEXT 373
293#define FPTRUNC 374
294#define FPEXT 375
295#define BITCAST 376
296#define UITOFP 377
297#define SITOFP 378
298#define FPTOUI 379
299#define FPTOSI 380
300#define INTTOPTR 381
301#define PTRTOINT 382
302#define PHI_TOK 383
303#define SELECT 384
304#define VAARG 385
305#define EXTRACTELEMENT 386
306#define INSERTELEMENT 387
307#define SHUFFLEVECTOR 388
308#define SIGNEXT 389
309#define ZEROEXT 390
310#define NORETURN 391
311#define INREG 392
312#define SRET 393
313#define NOUNWIND 394
314#define NOALIAS 395
315#define BYVAL 396
316#define NEST 397
317#define DEFAULT 398
318#define HIDDEN 399
319#define PROTECTED 400
320
321
322
323
324#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
325#line 963 "/users/dag/projects/cascade/llvm.modified/lib/AsmParser/llvmAsmParser.y"
326typedef union YYSTYPE {
Reid Spencer68a24bd2005-08-27 18:50:39 +0000327 llvm::Module *ModuleVal;
328 llvm::Function *FunctionVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000329 llvm::BasicBlock *BasicBlockVal;
330 llvm::TerminatorInst *TermInstVal;
331 llvm::Instruction *InstVal;
Reid Spencera132e042006-12-03 05:46:11 +0000332 llvm::Constant *ConstVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000333
Reid Spencera132e042006-12-03 05:46:11 +0000334 const llvm::Type *PrimType;
Reid Spencer14310612006-12-31 05:40:51 +0000335 std::list<llvm::PATypeHolder> *TypeList;
Reid Spencera132e042006-12-03 05:46:11 +0000336 llvm::PATypeHolder *TypeVal;
337 llvm::Value *ValueVal;
Reid Spencera132e042006-12-03 05:46:11 +0000338 std::vector<llvm::Value*> *ValueList;
Reid Spencer14310612006-12-31 05:40:51 +0000339 llvm::ArgListType *ArgList;
340 llvm::TypeWithAttrs TypeWithAttrs;
341 llvm::TypeWithAttrsList *TypeWithAttrsList;
342 llvm::ValueRefList *ValueRefList;
343
Reid Spencer68a24bd2005-08-27 18:50:39 +0000344 // Represent the RHS of PHI node
Reid Spencera132e042006-12-03 05:46:11 +0000345 std::list<std::pair<llvm::Value*,
346 llvm::BasicBlock*> > *PHIList;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000347 std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;
Reid Spencera132e042006-12-03 05:46:11 +0000348 std::vector<llvm::Constant*> *ConstVector;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000349
350 llvm::GlobalValue::LinkageTypes Linkage;
Anton Korobeynikov178a3522007-01-12 19:22:51 +0000351 llvm::GlobalValue::VisibilityTypes Visibility;
Reid Spencer7b5d4662007-04-09 06:16:21 +0000352 uint16_t ParamAttrs;
Reid Spencer38c91a92007-02-28 02:24:54 +0000353 llvm::APInt *APIntVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000354 int64_t SInt64Val;
355 uint64_t UInt64Val;
356 int SIntVal;
357 unsigned UIntVal;
Dale Johannesen43421b32007-09-06 18:13:44 +0000358 llvm::APFloat *FPVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000359 bool BoolVal;
360
Reid Spencer0a8a16b2007-05-22 18:52:55 +0000361 std::string *StrVal; // This memory must be deleted
362 llvm::ValID ValIDVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000363
Reid Spencera132e042006-12-03 05:46:11 +0000364 llvm::Instruction::BinaryOps BinaryOpVal;
365 llvm::Instruction::TermOps TermOpVal;
366 llvm::Instruction::MemoryOps MemOpVal;
367 llvm::Instruction::CastOps CastOpVal;
368 llvm::Instruction::OtherOps OtherOpVal;
Reid Spencera132e042006-12-03 05:46:11 +0000369 llvm::ICmpInst::Predicate IPredicate;
370 llvm::FCmpInst::Predicate FPredicate;
Chris Lattner0275cff2007-08-06 21:00:46 +0000371} YYSTYPE;
David Greene5fd22a82007-09-04 18:46:50 +0000372/* Line 1268 of yacc.c. */
373#line 374 "llvmAsmParser.tab.h"
374# define yystype YYSTYPE /* obsolescent; will be withdrawn */
375# define YYSTYPE_IS_DECLARED 1
376# define YYSTYPE_IS_TRIVIAL 1
377#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +0000378
379extern YYSTYPE llvmAsmlval;
David Greene5fd22a82007-09-04 18:46:50 +0000380
381
382