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