blob: 8a37c08661b773fbdd6cfa411e6b4deeaa9fd74a [file] [log] [blame]
Dan Gohmanf4423b12008-04-19 00:24:39 +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 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 X86_FP80 = 269,
54 FP128 = 270,
55 PPC_FP128 = 271,
56 LABEL = 272,
57 TYPE = 273,
58 LOCALVAR = 274,
59 GLOBALVAR = 275,
60 LABELSTR = 276,
61 STRINGCONSTANT = 277,
62 ATSTRINGCONSTANT = 278,
63 PCTSTRINGCONSTANT = 279,
64 ZEROINITIALIZER = 280,
65 TRUETOK = 281,
66 FALSETOK = 282,
67 BEGINTOK = 283,
68 ENDTOK = 284,
69 DECLARE = 285,
70 DEFINE = 286,
71 GLOBAL = 287,
72 CONSTANT = 288,
73 SECTION = 289,
74 ALIAS = 290,
75 VOLATILE = 291,
76 THREAD_LOCAL = 292,
77 TO = 293,
78 DOTDOTDOT = 294,
79 NULL_TOK = 295,
80 UNDEF = 296,
81 INTERNAL = 297,
82 LINKONCE = 298,
83 WEAK = 299,
84 APPENDING = 300,
85 DLLIMPORT = 301,
86 DLLEXPORT = 302,
87 EXTERN_WEAK = 303,
Dale Johannesenc7071cc2008-05-14 20:13:36 +000088 COMMON = 304,
89 OPAQUE = 305,
90 EXTERNAL = 306,
91 TARGET = 307,
92 TRIPLE = 308,
93 ALIGN = 309,
94 ADDRSPACE = 310,
95 DEPLIBS = 311,
96 CALL = 312,
97 TAIL = 313,
98 ASM_TOK = 314,
99 MODULE = 315,
100 SIDEEFFECT = 316,
101 CC_TOK = 317,
102 CCC_TOK = 318,
103 FASTCC_TOK = 319,
104 COLDCC_TOK = 320,
105 X86_STDCALLCC_TOK = 321,
106 X86_FASTCALLCC_TOK = 322,
107 DATALAYOUT = 323,
108 RET = 324,
109 BR = 325,
110 SWITCH = 326,
111 INVOKE = 327,
112 UNWIND = 328,
113 UNREACHABLE = 329,
114 ADD = 330,
115 SUB = 331,
116 MUL = 332,
117 UDIV = 333,
118 SDIV = 334,
119 FDIV = 335,
120 UREM = 336,
121 SREM = 337,
122 FREM = 338,
123 AND = 339,
124 OR = 340,
125 XOR = 341,
126 SHL = 342,
127 LSHR = 343,
128 ASHR = 344,
129 ICMP = 345,
130 FCMP = 346,
131 VICMP = 347,
132 VFCMP = 348,
133 EQ = 349,
134 NE = 350,
135 SLT = 351,
136 SGT = 352,
137 SLE = 353,
138 SGE = 354,
139 ULT = 355,
140 UGT = 356,
141 ULE = 357,
142 UGE = 358,
143 OEQ = 359,
144 ONE = 360,
145 OLT = 361,
146 OGT = 362,
147 OLE = 363,
148 OGE = 364,
149 ORD = 365,
150 UNO = 366,
151 UEQ = 367,
152 UNE = 368,
153 MALLOC = 369,
154 ALLOCA = 370,
155 FREE = 371,
156 LOAD = 372,
157 STORE = 373,
158 GETELEMENTPTR = 374,
159 TRUNC = 375,
160 ZEXT = 376,
161 SEXT = 377,
162 FPTRUNC = 378,
163 FPEXT = 379,
164 BITCAST = 380,
165 UITOFP = 381,
166 SITOFP = 382,
167 FPTOUI = 383,
168 FPTOSI = 384,
169 INTTOPTR = 385,
170 PTRTOINT = 386,
171 PHI_TOK = 387,
172 SELECT = 388,
173 VAARG = 389,
174 EXTRACTELEMENT = 390,
175 INSERTELEMENT = 391,
176 SHUFFLEVECTOR = 392,
177 GETRESULT = 393,
178 SIGNEXT = 394,
179 ZEROEXT = 395,
180 NORETURN = 396,
181 INREG = 397,
182 SRET = 398,
183 NOUNWIND = 399,
184 NOALIAS = 400,
185 BYVAL = 401,
186 NEST = 402,
187 READNONE = 403,
188 READONLY = 404,
189 GC = 405,
190 DEFAULT = 406,
191 HIDDEN = 407,
192 PROTECTED = 408
Dan Gohmanf4423b12008-04-19 00:24:39 +0000193 };
194#endif
195/* Tokens. */
196#define ESINT64VAL 258
197#define EUINT64VAL 259
198#define ESAPINTVAL 260
199#define EUAPINTVAL 261
200#define LOCALVAL_ID 262
201#define GLOBALVAL_ID 263
202#define FPVAL 264
203#define VOID 265
204#define INTTYPE 266
205#define FLOAT 267
206#define DOUBLE 268
207#define X86_FP80 269
208#define FP128 270
209#define PPC_FP128 271
210#define LABEL 272
211#define TYPE 273
212#define LOCALVAR 274
213#define GLOBALVAR 275
214#define LABELSTR 276
215#define STRINGCONSTANT 277
216#define ATSTRINGCONSTANT 278
217#define PCTSTRINGCONSTANT 279
218#define ZEROINITIALIZER 280
219#define TRUETOK 281
220#define FALSETOK 282
221#define BEGINTOK 283
222#define ENDTOK 284
223#define DECLARE 285
224#define DEFINE 286
225#define GLOBAL 287
226#define CONSTANT 288
227#define SECTION 289
228#define ALIAS 290
229#define VOLATILE 291
230#define THREAD_LOCAL 292
231#define TO 293
232#define DOTDOTDOT 294
233#define NULL_TOK 295
234#define UNDEF 296
235#define INTERNAL 297
236#define LINKONCE 298
237#define WEAK 299
238#define APPENDING 300
239#define DLLIMPORT 301
240#define DLLEXPORT 302
241#define EXTERN_WEAK 303
Dale Johannesenc7071cc2008-05-14 20:13:36 +0000242#define COMMON 304
243#define OPAQUE 305
244#define EXTERNAL 306
245#define TARGET 307
246#define TRIPLE 308
247#define ALIGN 309
248#define ADDRSPACE 310
249#define DEPLIBS 311
250#define CALL 312
251#define TAIL 313
252#define ASM_TOK 314
253#define MODULE 315
254#define SIDEEFFECT 316
255#define CC_TOK 317
256#define CCC_TOK 318
257#define FASTCC_TOK 319
258#define COLDCC_TOK 320
259#define X86_STDCALLCC_TOK 321
260#define X86_FASTCALLCC_TOK 322
261#define DATALAYOUT 323
262#define RET 324
263#define BR 325
264#define SWITCH 326
265#define INVOKE 327
266#define UNWIND 328
267#define UNREACHABLE 329
268#define ADD 330
269#define SUB 331
270#define MUL 332
271#define UDIV 333
272#define SDIV 334
273#define FDIV 335
274#define UREM 336
275#define SREM 337
276#define FREM 338
277#define AND 339
278#define OR 340
279#define XOR 341
280#define SHL 342
281#define LSHR 343
282#define ASHR 344
283#define ICMP 345
284#define FCMP 346
285#define VICMP 347
286#define VFCMP 348
287#define EQ 349
288#define NE 350
289#define SLT 351
290#define SGT 352
291#define SLE 353
292#define SGE 354
293#define ULT 355
294#define UGT 356
295#define ULE 357
296#define UGE 358
297#define OEQ 359
298#define ONE 360
299#define OLT 361
300#define OGT 362
301#define OLE 363
302#define OGE 364
303#define ORD 365
304#define UNO 366
305#define UEQ 367
306#define UNE 368
307#define MALLOC 369
308#define ALLOCA 370
309#define FREE 371
310#define LOAD 372
311#define STORE 373
312#define GETELEMENTPTR 374
313#define TRUNC 375
314#define ZEXT 376
315#define SEXT 377
316#define FPTRUNC 378
317#define FPEXT 379
318#define BITCAST 380
319#define UITOFP 381
320#define SITOFP 382
321#define FPTOUI 383
322#define FPTOSI 384
323#define INTTOPTR 385
324#define PTRTOINT 386
325#define PHI_TOK 387
326#define SELECT 388
327#define VAARG 389
328#define EXTRACTELEMENT 390
329#define INSERTELEMENT 391
330#define SHUFFLEVECTOR 392
331#define GETRESULT 393
332#define SIGNEXT 394
333#define ZEROEXT 395
334#define NORETURN 396
335#define INREG 397
336#define SRET 398
337#define NOUNWIND 399
338#define NOALIAS 400
339#define BYVAL 401
340#define NEST 402
341#define READNONE 403
342#define READONLY 404
343#define GC 405
344#define DEFAULT 406
345#define HIDDEN 407
346#define PROTECTED 408
Dan Gohmanf4423b12008-04-19 00:24:39 +0000347
348
349
350
351#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
352typedef union YYSTYPE
Gordon Henriksen83eaae12008-05-19 05:47:10 +0000353#line 949 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y"
Dan Gohmanf4423b12008-04-19 00:24:39 +0000354{
Reid Spencer68a24bd2005-08-27 18:50:39 +0000355 llvm::Module *ModuleVal;
356 llvm::Function *FunctionVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000357 llvm::BasicBlock *BasicBlockVal;
358 llvm::TerminatorInst *TermInstVal;
359 llvm::Instruction *InstVal;
Reid Spencera132e042006-12-03 05:46:11 +0000360 llvm::Constant *ConstVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000361
Reid Spencera132e042006-12-03 05:46:11 +0000362 const llvm::Type *PrimType;
Reid Spencer14310612006-12-31 05:40:51 +0000363 std::list<llvm::PATypeHolder> *TypeList;
Reid Spencera132e042006-12-03 05:46:11 +0000364 llvm::PATypeHolder *TypeVal;
365 llvm::Value *ValueVal;
Reid Spencera132e042006-12-03 05:46:11 +0000366 std::vector<llvm::Value*> *ValueList;
Reid Spencer14310612006-12-31 05:40:51 +0000367 llvm::ArgListType *ArgList;
368 llvm::TypeWithAttrs TypeWithAttrs;
369 llvm::TypeWithAttrsList *TypeWithAttrsList;
Dale Johanneseneb57ea72007-11-05 21:20:28 +0000370 llvm::ParamList *ParamList;
Reid Spencer14310612006-12-31 05:40:51 +0000371
Reid Spencer68a24bd2005-08-27 18:50:39 +0000372 // Represent the RHS of PHI node
Reid Spencera132e042006-12-03 05:46:11 +0000373 std::list<std::pair<llvm::Value*,
374 llvm::BasicBlock*> > *PHIList;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000375 std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;
Reid Spencera132e042006-12-03 05:46:11 +0000376 std::vector<llvm::Constant*> *ConstVector;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000377
378 llvm::GlobalValue::LinkageTypes Linkage;
Anton Korobeynikov178a3522007-01-12 19:22:51 +0000379 llvm::GlobalValue::VisibilityTypes Visibility;
Dale Johannesen222ebf72008-02-19 21:40:51 +0000380 llvm::ParameterAttributes ParamAttrs;
Reid Spencer38c91a92007-02-28 02:24:54 +0000381 llvm::APInt *APIntVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000382 int64_t SInt64Val;
383 uint64_t UInt64Val;
384 int SIntVal;
385 unsigned UIntVal;
Dale Johannesen43421b32007-09-06 18:13:44 +0000386 llvm::APFloat *FPVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000387 bool BoolVal;
388
Reid Spencer0a8a16b2007-05-22 18:52:55 +0000389 std::string *StrVal; // This memory must be deleted
390 llvm::ValID ValIDVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000391
Reid Spencera132e042006-12-03 05:46:11 +0000392 llvm::Instruction::BinaryOps BinaryOpVal;
393 llvm::Instruction::TermOps TermOpVal;
394 llvm::Instruction::MemoryOps MemOpVal;
395 llvm::Instruction::CastOps CastOpVal;
396 llvm::Instruction::OtherOps OtherOpVal;
Reid Spencera132e042006-12-03 05:46:11 +0000397 llvm::ICmpInst::Predicate IPredicate;
398 llvm::FCmpInst::Predicate FPredicate;
Dan Gohmanf4423b12008-04-19 00:24:39 +0000399}
400/* Line 1529 of yacc.c. */
Dale Johannesenc7071cc2008-05-14 20:13:36 +0000401#line 402 "llvmAsmParser.tab.h"
Dan Gohmanf4423b12008-04-19 00:24:39 +0000402 YYSTYPE;
403# define yystype YYSTYPE /* obsolescent; will be withdrawn */
404# define YYSTYPE_IS_DECLARED 1
405# define YYSTYPE_IS_TRIVIAL 1
406#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +0000407
408extern YYSTYPE llvmAsmlval;
Dan Gohmanf4423b12008-04-19 00:24:39 +0000409