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