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