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