blob: 44d0fefbf9908412d898d65729b05aa685c15066 [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,
Devang Pateld4980812008-09-02 20:52:40 +0000193 FNNOTE = 409,
194 INLINE = 410,
195 ALWAYS = 411,
196 NEVER = 412,
197 OPTIMIZEFORSIZE = 413,
198 DEFAULT = 414,
199 HIDDEN = 415,
200 PROTECTED = 416
Dan Gohmanf4423b12008-04-19 00:24:39 +0000201 };
202#endif
203/* Tokens. */
204#define ESINT64VAL 258
205#define EUINT64VAL 259
206#define ESAPINTVAL 260
207#define EUAPINTVAL 261
208#define LOCALVAL_ID 262
209#define GLOBALVAL_ID 263
210#define FPVAL 264
211#define VOID 265
212#define INTTYPE 266
213#define FLOAT 267
214#define DOUBLE 268
215#define X86_FP80 269
216#define FP128 270
217#define PPC_FP128 271
218#define LABEL 272
219#define TYPE 273
220#define LOCALVAR 274
221#define GLOBALVAR 275
222#define LABELSTR 276
223#define STRINGCONSTANT 277
224#define ATSTRINGCONSTANT 278
225#define PCTSTRINGCONSTANT 279
226#define ZEROINITIALIZER 280
227#define TRUETOK 281
228#define FALSETOK 282
229#define BEGINTOK 283
230#define ENDTOK 284
231#define DECLARE 285
232#define DEFINE 286
233#define GLOBAL 287
234#define CONSTANT 288
235#define SECTION 289
236#define ALIAS 290
237#define VOLATILE 291
238#define THREAD_LOCAL 292
239#define TO 293
240#define DOTDOTDOT 294
241#define NULL_TOK 295
242#define UNDEF 296
243#define INTERNAL 297
244#define LINKONCE 298
245#define WEAK 299
246#define APPENDING 300
247#define DLLIMPORT 301
248#define DLLEXPORT 302
249#define EXTERN_WEAK 303
Dale Johannesenc7071cc2008-05-14 20:13:36 +0000250#define COMMON 304
251#define OPAQUE 305
252#define EXTERNAL 306
253#define TARGET 307
254#define TRIPLE 308
255#define ALIGN 309
256#define ADDRSPACE 310
257#define DEPLIBS 311
258#define CALL 312
259#define TAIL 313
260#define ASM_TOK 314
261#define MODULE 315
262#define SIDEEFFECT 316
263#define CC_TOK 317
264#define CCC_TOK 318
265#define FASTCC_TOK 319
266#define COLDCC_TOK 320
267#define X86_STDCALLCC_TOK 321
268#define X86_FASTCALLCC_TOK 322
Dale Johannesen20ab78b2008-08-13 18:41:46 +0000269#define X86_SSECALLCC_TOK 323
270#define DATALAYOUT 324
271#define RET 325
272#define BR 326
273#define SWITCH 327
274#define INVOKE 328
275#define UNWIND 329
276#define UNREACHABLE 330
277#define ADD 331
278#define SUB 332
279#define MUL 333
280#define UDIV 334
281#define SDIV 335
282#define FDIV 336
283#define UREM 337
284#define SREM 338
285#define FREM 339
286#define AND 340
287#define OR 341
288#define XOR 342
289#define SHL 343
290#define LSHR 344
291#define ASHR 345
292#define ICMP 346
293#define FCMP 347
294#define VICMP 348
295#define VFCMP 349
296#define EQ 350
297#define NE 351
298#define SLT 352
299#define SGT 353
300#define SLE 354
301#define SGE 355
302#define ULT 356
303#define UGT 357
304#define ULE 358
305#define UGE 359
306#define OEQ 360
307#define ONE 361
308#define OLT 362
309#define OGT 363
310#define OLE 364
311#define OGE 365
312#define ORD 366
313#define UNO 367
314#define UEQ 368
315#define UNE 369
316#define MALLOC 370
317#define ALLOCA 371
318#define FREE 372
319#define LOAD 373
320#define STORE 374
321#define GETELEMENTPTR 375
322#define TRUNC 376
323#define ZEXT 377
324#define SEXT 378
325#define FPTRUNC 379
326#define FPEXT 380
327#define BITCAST 381
328#define UITOFP 382
329#define SITOFP 383
330#define FPTOUI 384
331#define FPTOSI 385
332#define INTTOPTR 386
333#define PTRTOINT 387
334#define PHI_TOK 388
335#define SELECT 389
336#define VAARG 390
337#define EXTRACTELEMENT 391
338#define INSERTELEMENT 392
339#define SHUFFLEVECTOR 393
340#define GETRESULT 394
341#define EXTRACTVALUE 395
342#define INSERTVALUE 396
343#define SIGNEXT 397
344#define ZEROEXT 398
345#define NORETURN 399
346#define INREG 400
347#define SRET 401
348#define NOUNWIND 402
349#define NOALIAS 403
350#define BYVAL 404
351#define NEST 405
352#define READNONE 406
353#define READONLY 407
354#define GC 408
Devang Pateld4980812008-09-02 20:52:40 +0000355#define FNNOTE 409
356#define INLINE 410
357#define ALWAYS 411
358#define NEVER 412
359#define OPTIMIZEFORSIZE 413
360#define DEFAULT 414
361#define HIDDEN 415
362#define PROTECTED 416
Dan Gohmanf4423b12008-04-19 00:24:39 +0000363
364
365
366
367#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
368typedef union YYSTYPE
Devang Patel05988662008-09-25 21:00:45 +0000369#line 970 "/Volumes/Nanpura/mainline/llvm/lib/AsmParser/llvmAsmParser.y"
Dan Gohmanf4423b12008-04-19 00:24:39 +0000370{
Reid Spencer68a24bd2005-08-27 18:50:39 +0000371 llvm::Module *ModuleVal;
372 llvm::Function *FunctionVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000373 llvm::BasicBlock *BasicBlockVal;
374 llvm::TerminatorInst *TermInstVal;
375 llvm::Instruction *InstVal;
Reid Spencera132e042006-12-03 05:46:11 +0000376 llvm::Constant *ConstVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000377
Reid Spencera132e042006-12-03 05:46:11 +0000378 const llvm::Type *PrimType;
Reid Spencer14310612006-12-31 05:40:51 +0000379 std::list<llvm::PATypeHolder> *TypeList;
Reid Spencera132e042006-12-03 05:46:11 +0000380 llvm::PATypeHolder *TypeVal;
381 llvm::Value *ValueVal;
Reid Spencera132e042006-12-03 05:46:11 +0000382 std::vector<llvm::Value*> *ValueList;
Dan Gohman81a0c0b2008-05-31 00:58:22 +0000383 std::vector<unsigned> *ConstantList;
Reid Spencer14310612006-12-31 05:40:51 +0000384 llvm::ArgListType *ArgList;
385 llvm::TypeWithAttrs TypeWithAttrs;
386 llvm::TypeWithAttrsList *TypeWithAttrsList;
Dale Johanneseneb57ea72007-11-05 21:20:28 +0000387 llvm::ParamList *ParamList;
Reid Spencer14310612006-12-31 05:40:51 +0000388
Reid Spencer68a24bd2005-08-27 18:50:39 +0000389 // Represent the RHS of PHI node
Reid Spencera132e042006-12-03 05:46:11 +0000390 std::list<std::pair<llvm::Value*,
391 llvm::BasicBlock*> > *PHIList;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000392 std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;
Reid Spencera132e042006-12-03 05:46:11 +0000393 std::vector<llvm::Constant*> *ConstVector;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000394
395 llvm::GlobalValue::LinkageTypes Linkage;
Anton Korobeynikov178a3522007-01-12 19:22:51 +0000396 llvm::GlobalValue::VisibilityTypes Visibility;
Devang Patel05988662008-09-25 21:00:45 +0000397 llvm::Attributes Attributes;
Reid Spencer38c91a92007-02-28 02:24:54 +0000398 llvm::APInt *APIntVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000399 int64_t SInt64Val;
400 uint64_t UInt64Val;
401 int SIntVal;
402 unsigned UIntVal;
Dale Johannesen43421b32007-09-06 18:13:44 +0000403 llvm::APFloat *FPVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000404 bool BoolVal;
405
Reid Spencer0a8a16b2007-05-22 18:52:55 +0000406 std::string *StrVal; // This memory must be deleted
407 llvm::ValID ValIDVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000408
Reid Spencera132e042006-12-03 05:46:11 +0000409 llvm::Instruction::BinaryOps BinaryOpVal;
410 llvm::Instruction::TermOps TermOpVal;
411 llvm::Instruction::MemoryOps MemOpVal;
412 llvm::Instruction::CastOps CastOpVal;
413 llvm::Instruction::OtherOps OtherOpVal;
Reid Spencera132e042006-12-03 05:46:11 +0000414 llvm::ICmpInst::Predicate IPredicate;
415 llvm::FCmpInst::Predicate FPredicate;
Dan Gohmanf4423b12008-04-19 00:24:39 +0000416}
Dan Gohman180c1692008-06-23 18:43:26 +0000417/* Line 1529 of yacc.c. */
Devang Patel2d2255d2008-09-23 23:25:44 +0000418#line 419 "llvmAsmParser.tab.h"
Dan Gohmanf4423b12008-04-19 00:24:39 +0000419 YYSTYPE;
420# define yystype YYSTYPE /* obsolescent; will be withdrawn */
421# define YYSTYPE_IS_DECLARED 1
422# define YYSTYPE_IS_TRIVIAL 1
423#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +0000424
425extern YYSTYPE llvmAsmlval;
Dan Gohmanf4423b12008-04-19 00:24:39 +0000426