blob: 1426eaf80b64da9821de4beead22c9f4a938d660 [file] [log] [blame]
Reid Spencer5cbf9852007-01-30 20:08:39 +00001/* A Bison parser, made by GNU Bison 2.1. */
Reid Spencerb0fcf8f2007-01-17 02:48:45 +00002
Reid Spencer5cbf9852007-01-30 20:08:39 +00003/* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Reid Spencerb0fcf8f2007-01-17 02:48:45 +00005
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
Reid Spencer41dff5e2007-01-26 08:05:27 +000018 Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA. */
Reid Spencerb0fcf8f2007-01-17 02:48:45 +000020
Reid Spencer5cbf9852007-01-30 20:08:39 +000021/* 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. */
Reid Spencerb0fcf8f2007-01-17 02:48:45 +000025
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,
Reid Spencer41dff5e2007-01-26 08:05:27 +000034 LOCALVAL_ID = 260,
35 GLOBALVAL_ID = 261,
Reid Spencerb0fcf8f2007-01-17 02:48:45 +000036 FPVAL = 262,
37 VOID = 263,
38 INTTYPE = 264,
39 FLOAT = 265,
40 DOUBLE = 266,
41 LABEL = 267,
42 TYPE = 268,
Reid Spencer41dff5e2007-01-26 08:05:27 +000043 LOCALVAR = 269,
44 GLOBALVAR = 270,
45 LABELSTR = 271,
46 STRINGCONSTANT = 272,
47 ATSTRINGCONSTANT = 273,
48 IMPLEMENTATION = 274,
49 ZEROINITIALIZER = 275,
50 TRUETOK = 276,
51 FALSETOK = 277,
52 BEGINTOK = 278,
53 ENDTOK = 279,
54 DECLARE = 280,
55 DEFINE = 281,
56 GLOBAL = 282,
57 CONSTANT = 283,
58 SECTION = 284,
59 VOLATILE = 285,
60 TO = 286,
61 DOTDOTDOT = 287,
62 NULL_TOK = 288,
63 UNDEF = 289,
64 INTERNAL = 290,
65 LINKONCE = 291,
66 WEAK = 292,
67 APPENDING = 293,
68 DLLIMPORT = 294,
69 DLLEXPORT = 295,
70 EXTERN_WEAK = 296,
71 OPAQUE = 297,
72 EXTERNAL = 298,
73 TARGET = 299,
74 TRIPLE = 300,
75 ALIGN = 301,
76 DEPLIBS = 302,
77 CALL = 303,
78 TAIL = 304,
79 ASM_TOK = 305,
80 MODULE = 306,
81 SIDEEFFECT = 307,
82 CC_TOK = 308,
83 CCC_TOK = 309,
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +000084 FASTCC_TOK = 310,
85 COLDCC_TOK = 311,
86 X86_STDCALLCC_TOK = 312,
87 X86_FASTCALLCC_TOK = 313,
88 DATALAYOUT = 314,
89 RET = 315,
90 BR = 316,
91 SWITCH = 317,
92 INVOKE = 318,
93 UNWIND = 319,
94 UNREACHABLE = 320,
95 ADD = 321,
96 SUB = 322,
97 MUL = 323,
98 UDIV = 324,
99 SDIV = 325,
100 FDIV = 326,
101 UREM = 327,
102 SREM = 328,
103 FREM = 329,
104 AND = 330,
105 OR = 331,
106 XOR = 332,
107 ICMP = 333,
108 FCMP = 334,
109 EQ = 335,
110 NE = 336,
111 SLT = 337,
112 SGT = 338,
113 SLE = 339,
114 SGE = 340,
115 ULT = 341,
116 UGT = 342,
117 ULE = 343,
118 UGE = 344,
119 OEQ = 345,
120 ONE = 346,
121 OLT = 347,
122 OGT = 348,
123 OLE = 349,
124 OGE = 350,
125 ORD = 351,
126 UNO = 352,
127 UEQ = 353,
128 UNE = 354,
129 MALLOC = 355,
130 ALLOCA = 356,
131 FREE = 357,
132 LOAD = 358,
133 STORE = 359,
134 GETELEMENTPTR = 360,
135 TRUNC = 361,
136 ZEXT = 362,
137 SEXT = 363,
138 FPTRUNC = 364,
139 FPEXT = 365,
140 BITCAST = 366,
141 UITOFP = 367,
142 SITOFP = 368,
143 FPTOUI = 369,
144 FPTOSI = 370,
145 INTTOPTR = 371,
146 PTRTOINT = 372,
147 PHI_TOK = 373,
148 SELECT = 374,
149 SHL = 375,
150 LSHR = 376,
151 ASHR = 377,
152 VAARG = 378,
153 EXTRACTELEMENT = 379,
154 INSERTELEMENT = 380,
155 SHUFFLEVECTOR = 381,
156 NORETURN = 382,
157 INREG = 383,
158 SRET = 384,
159 DEFAULT = 385,
160 HIDDEN = 386
Reid Spencerb0fcf8f2007-01-17 02:48:45 +0000161 };
162#endif
Reid Spencer41dff5e2007-01-26 08:05:27 +0000163/* Tokens. */
Reid Spencerb0fcf8f2007-01-17 02:48:45 +0000164#define ESINT64VAL 258
165#define EUINT64VAL 259
Reid Spencer41dff5e2007-01-26 08:05:27 +0000166#define LOCALVAL_ID 260
167#define GLOBALVAL_ID 261
Reid Spencerb0fcf8f2007-01-17 02:48:45 +0000168#define FPVAL 262
169#define VOID 263
170#define INTTYPE 264
171#define FLOAT 265
172#define DOUBLE 266
173#define LABEL 267
174#define TYPE 268
Reid Spencer41dff5e2007-01-26 08:05:27 +0000175#define LOCALVAR 269
176#define GLOBALVAR 270
177#define LABELSTR 271
178#define STRINGCONSTANT 272
179#define ATSTRINGCONSTANT 273
180#define IMPLEMENTATION 274
181#define ZEROINITIALIZER 275
182#define TRUETOK 276
183#define FALSETOK 277
184#define BEGINTOK 278
185#define ENDTOK 279
186#define DECLARE 280
187#define DEFINE 281
188#define GLOBAL 282
189#define CONSTANT 283
190#define SECTION 284
191#define VOLATILE 285
192#define TO 286
193#define DOTDOTDOT 287
194#define NULL_TOK 288
195#define UNDEF 289
196#define INTERNAL 290
197#define LINKONCE 291
198#define WEAK 292
199#define APPENDING 293
200#define DLLIMPORT 294
201#define DLLEXPORT 295
202#define EXTERN_WEAK 296
203#define OPAQUE 297
204#define EXTERNAL 298
205#define TARGET 299
206#define TRIPLE 300
207#define ALIGN 301
208#define DEPLIBS 302
209#define CALL 303
210#define TAIL 304
211#define ASM_TOK 305
212#define MODULE 306
213#define SIDEEFFECT 307
214#define CC_TOK 308
215#define CCC_TOK 309
Anton Korobeynikov9adeaa22007-01-28 13:37:39 +0000216#define FASTCC_TOK 310
217#define COLDCC_TOK 311
218#define X86_STDCALLCC_TOK 312
219#define X86_FASTCALLCC_TOK 313
220#define DATALAYOUT 314
221#define RET 315
222#define BR 316
223#define SWITCH 317
224#define INVOKE 318
225#define UNWIND 319
226#define UNREACHABLE 320
227#define ADD 321
228#define SUB 322
229#define MUL 323
230#define UDIV 324
231#define SDIV 325
232#define FDIV 326
233#define UREM 327
234#define SREM 328
235#define FREM 329
236#define AND 330
237#define OR 331
238#define XOR 332
239#define ICMP 333
240#define FCMP 334
241#define EQ 335
242#define NE 336
243#define SLT 337
244#define SGT 338
245#define SLE 339
246#define SGE 340
247#define ULT 341
248#define UGT 342
249#define ULE 343
250#define UGE 344
251#define OEQ 345
252#define ONE 346
253#define OLT 347
254#define OGT 348
255#define OLE 349
256#define OGE 350
257#define ORD 351
258#define UNO 352
259#define UEQ 353
260#define UNE 354
261#define MALLOC 355
262#define ALLOCA 356
263#define FREE 357
264#define LOAD 358
265#define STORE 359
266#define GETELEMENTPTR 360
267#define TRUNC 361
268#define ZEXT 362
269#define SEXT 363
270#define FPTRUNC 364
271#define FPEXT 365
272#define BITCAST 366
273#define UITOFP 367
274#define SITOFP 368
275#define FPTOUI 369
276#define FPTOSI 370
277#define INTTOPTR 371
278#define PTRTOINT 372
279#define PHI_TOK 373
280#define SELECT 374
281#define SHL 375
282#define LSHR 376
283#define ASHR 377
284#define VAARG 378
285#define EXTRACTELEMENT 379
286#define INSERTELEMENT 380
287#define SHUFFLEVECTOR 381
288#define NORETURN 382
289#define INREG 383
290#define SRET 384
291#define DEFAULT 385
292#define HIDDEN 386
Reid Spencerb0fcf8f2007-01-17 02:48:45 +0000293
294
295
296
Reid Spencer5cbf9852007-01-30 20:08:39 +0000297#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
298#line 885 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y"
299typedef union YYSTYPE {
Reid Spencer68a24bd2005-08-27 18:50:39 +0000300 llvm::Module *ModuleVal;
301 llvm::Function *FunctionVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000302 llvm::BasicBlock *BasicBlockVal;
303 llvm::TerminatorInst *TermInstVal;
304 llvm::Instruction *InstVal;
Reid Spencera132e042006-12-03 05:46:11 +0000305 llvm::Constant *ConstVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000306
Reid Spencera132e042006-12-03 05:46:11 +0000307 const llvm::Type *PrimType;
Reid Spencer14310612006-12-31 05:40:51 +0000308 std::list<llvm::PATypeHolder> *TypeList;
Reid Spencera132e042006-12-03 05:46:11 +0000309 llvm::PATypeHolder *TypeVal;
310 llvm::Value *ValueVal;
Reid Spencera132e042006-12-03 05:46:11 +0000311 std::vector<llvm::Value*> *ValueList;
Reid Spencer14310612006-12-31 05:40:51 +0000312 llvm::ArgListType *ArgList;
313 llvm::TypeWithAttrs TypeWithAttrs;
314 llvm::TypeWithAttrsList *TypeWithAttrsList;
315 llvm::ValueRefList *ValueRefList;
316
Reid Spencer68a24bd2005-08-27 18:50:39 +0000317 // Represent the RHS of PHI node
Reid Spencera132e042006-12-03 05:46:11 +0000318 std::list<std::pair<llvm::Value*,
319 llvm::BasicBlock*> > *PHIList;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000320 std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;
Reid Spencera132e042006-12-03 05:46:11 +0000321 std::vector<llvm::Constant*> *ConstVector;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000322
323 llvm::GlobalValue::LinkageTypes Linkage;
Anton Korobeynikov178a3522007-01-12 19:22:51 +0000324 llvm::GlobalValue::VisibilityTypes Visibility;
Reid Spencer14310612006-12-31 05:40:51 +0000325 llvm::FunctionType::ParameterAttributes ParamAttrs;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000326 int64_t SInt64Val;
327 uint64_t UInt64Val;
328 int SIntVal;
329 unsigned UIntVal;
330 double FPVal;
331 bool BoolVal;
332
333 char *StrVal; // This memory is strdup'd!
Reid Spencer1628cec2006-10-26 06:15:43 +0000334 llvm::ValID ValIDVal; // strdup'd memory maybe!
Reid Spencer68a24bd2005-08-27 18:50:39 +0000335
Reid Spencera132e042006-12-03 05:46:11 +0000336 llvm::Instruction::BinaryOps BinaryOpVal;
337 llvm::Instruction::TermOps TermOpVal;
338 llvm::Instruction::MemoryOps MemOpVal;
339 llvm::Instruction::CastOps CastOpVal;
340 llvm::Instruction::OtherOps OtherOpVal;
Reid Spencera132e042006-12-03 05:46:11 +0000341 llvm::ICmpInst::Predicate IPredicate;
342 llvm::FCmpInst::Predicate FPredicate;
Reid Spencer5cbf9852007-01-30 20:08:39 +0000343} YYSTYPE;
344/* Line 1447 of yacc.c. */
345#line 346 "llvmAsmParser.tab.h"
Reid Spencer41dff5e2007-01-26 08:05:27 +0000346# define yystype YYSTYPE /* obsolescent; will be withdrawn */
347# define YYSTYPE_IS_DECLARED 1
348# define YYSTYPE_IS_TRIVIAL 1
Reid Spencerb0fcf8f2007-01-17 02:48:45 +0000349#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +0000350
351extern YYSTYPE llvmAsmlval;
Reid Spencerb0fcf8f2007-01-17 02:48:45 +0000352
Reid Spencer5cbf9852007-01-30 20:08:39 +0000353
354