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