blob: e8be3f16cd432d051ef00a9618a8764db9eb3c03 [file] [log] [blame]
Reid Spencered951ea2007-05-19 07:22:10 +00001/* A Bison parser, made by GNU Bison 2.1. */
2
3/* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA. */
20
21/* As a special exception, when this file is copied by Bison into a
22 Bison output file, you may use that output file without restriction.
23 This special exception was added by the Free Software Foundation
24 in version 1.24 of Bison. */
25
26/* Tokens. */
27#ifndef YYTOKENTYPE
28# define YYTOKENTYPE
29 /* Put the tokens into the symbol table, so that GDB and other debuggers
30 know about them. */
31 enum yytokentype {
32 ESINT64VAL = 258,
33 EUINT64VAL = 259,
34 ESAPINTVAL = 260,
35 EUAPINTVAL = 261,
36 LOCALVAL_ID = 262,
37 GLOBALVAL_ID = 263,
38 FPVAL = 264,
39 VOID = 265,
40 INTTYPE = 266,
41 FLOAT = 267,
42 DOUBLE = 268,
43 LABEL = 269,
44 TYPE = 270,
45 LOCALVAR = 271,
46 GLOBALVAR = 272,
47 LABELSTR = 273,
48 STRINGCONSTANT = 274,
49 ATSTRINGCONSTANT = 275,
50 PCTSTRINGCONSTANT = 276,
51 ZEROINITIALIZER = 277,
52 TRUETOK = 278,
53 FALSETOK = 279,
54 BEGINTOK = 280,
55 ENDTOK = 281,
56 DECLARE = 282,
57 DEFINE = 283,
58 GLOBAL = 284,
59 CONSTANT = 285,
60 SECTION = 286,
61 ALIAS = 287,
62 VOLATILE = 288,
63 THREAD_LOCAL = 289,
64 TO = 290,
65 DOTDOTDOT = 291,
66 NULL_TOK = 292,
67 UNDEF = 293,
68 INTERNAL = 294,
69 LINKONCE = 295,
70 WEAK = 296,
71 APPENDING = 297,
72 DLLIMPORT = 298,
73 DLLEXPORT = 299,
74 EXTERN_WEAK = 300,
75 OPAQUE = 301,
76 EXTERNAL = 302,
77 TARGET = 303,
78 TRIPLE = 304,
79 ALIGN = 305,
80 DEPLIBS = 306,
81 CALL = 307,
82 TAIL = 308,
83 ASM_TOK = 309,
84 MODULE = 310,
85 SIDEEFFECT = 311,
86 CC_TOK = 312,
87 CCC_TOK = 313,
88 FASTCC_TOK = 314,
89 COLDCC_TOK = 315,
90 X86_STDCALLCC_TOK = 316,
91 X86_FASTCALLCC_TOK = 317,
92 DATALAYOUT = 318,
93 RET = 319,
94 BR = 320,
95 SWITCH = 321,
96 INVOKE = 322,
97 UNWIND = 323,
98 UNREACHABLE = 324,
99 ADD = 325,
100 SUB = 326,
101 MUL = 327,
102 UDIV = 328,
103 SDIV = 329,
104 FDIV = 330,
105 UREM = 331,
106 SREM = 332,
107 FREM = 333,
108 AND = 334,
109 OR = 335,
110 XOR = 336,
111 SHL = 337,
112 LSHR = 338,
113 ASHR = 339,
114 ICMP = 340,
115 FCMP = 341,
116 EQ = 342,
117 NE = 343,
118 SLT = 344,
119 SGT = 345,
120 SLE = 346,
121 SGE = 347,
122 ULT = 348,
123 UGT = 349,
124 ULE = 350,
125 UGE = 351,
126 OEQ = 352,
127 ONE = 353,
128 OLT = 354,
129 OGT = 355,
130 OLE = 356,
131 OGE = 357,
132 ORD = 358,
133 UNO = 359,
134 UEQ = 360,
135 UNE = 361,
136 MALLOC = 362,
137 ALLOCA = 363,
138 FREE = 364,
139 LOAD = 365,
140 STORE = 366,
141 GETELEMENTPTR = 367,
142 TRUNC = 368,
143 ZEXT = 369,
144 SEXT = 370,
145 FPTRUNC = 371,
146 FPEXT = 372,
147 BITCAST = 373,
148 UITOFP = 374,
149 SITOFP = 375,
150 FPTOUI = 376,
151 FPTOSI = 377,
152 INTTOPTR = 378,
153 PTRTOINT = 379,
154 PHI_TOK = 380,
155 SELECT = 381,
156 VAARG = 382,
157 EXTRACTELEMENT = 383,
158 INSERTELEMENT = 384,
159 SHUFFLEVECTOR = 385,
160 NORETURN = 386,
161 INREG = 387,
162 SRET = 388,
163 NOUNWIND = 389,
164 DEFAULT = 390,
165 HIDDEN = 391,
166 PROTECTED = 392
167 };
168#endif
169/* Tokens. */
170#define ESINT64VAL 258
171#define EUINT64VAL 259
172#define ESAPINTVAL 260
173#define EUAPINTVAL 261
174#define LOCALVAL_ID 262
175#define GLOBALVAL_ID 263
176#define FPVAL 264
177#define VOID 265
178#define INTTYPE 266
179#define FLOAT 267
180#define DOUBLE 268
181#define LABEL 269
182#define TYPE 270
183#define LOCALVAR 271
184#define GLOBALVAR 272
185#define LABELSTR 273
186#define STRINGCONSTANT 274
187#define ATSTRINGCONSTANT 275
188#define PCTSTRINGCONSTANT 276
189#define ZEROINITIALIZER 277
190#define TRUETOK 278
191#define FALSETOK 279
192#define BEGINTOK 280
193#define ENDTOK 281
194#define DECLARE 282
195#define DEFINE 283
196#define GLOBAL 284
197#define CONSTANT 285
198#define SECTION 286
199#define ALIAS 287
200#define VOLATILE 288
201#define THREAD_LOCAL 289
202#define TO 290
203#define DOTDOTDOT 291
204#define NULL_TOK 292
205#define UNDEF 293
206#define INTERNAL 294
207#define LINKONCE 295
208#define WEAK 296
209#define APPENDING 297
210#define DLLIMPORT 298
211#define DLLEXPORT 299
212#define EXTERN_WEAK 300
213#define OPAQUE 301
214#define EXTERNAL 302
215#define TARGET 303
216#define TRIPLE 304
217#define ALIGN 305
218#define DEPLIBS 306
219#define CALL 307
220#define TAIL 308
221#define ASM_TOK 309
222#define MODULE 310
223#define SIDEEFFECT 311
224#define CC_TOK 312
225#define CCC_TOK 313
226#define FASTCC_TOK 314
227#define COLDCC_TOK 315
228#define X86_STDCALLCC_TOK 316
229#define X86_FASTCALLCC_TOK 317
230#define DATALAYOUT 318
231#define RET 319
232#define BR 320
233#define SWITCH 321
234#define INVOKE 322
235#define UNWIND 323
236#define UNREACHABLE 324
237#define ADD 325
238#define SUB 326
239#define MUL 327
240#define UDIV 328
241#define SDIV 329
242#define FDIV 330
243#define UREM 331
244#define SREM 332
245#define FREM 333
246#define AND 334
247#define OR 335
248#define XOR 336
249#define SHL 337
250#define LSHR 338
251#define ASHR 339
252#define ICMP 340
253#define FCMP 341
254#define EQ 342
255#define NE 343
256#define SLT 344
257#define SGT 345
258#define SLE 346
259#define SGE 347
260#define ULT 348
261#define UGT 349
262#define ULE 350
263#define UGE 351
264#define OEQ 352
265#define ONE 353
266#define OLT 354
267#define OGT 355
268#define OLE 356
269#define OGE 357
270#define ORD 358
271#define UNO 359
272#define UEQ 360
273#define UNE 361
274#define MALLOC 362
275#define ALLOCA 363
276#define FREE 364
277#define LOAD 365
278#define STORE 366
279#define GETELEMENTPTR 367
280#define TRUNC 368
281#define ZEXT 369
282#define SEXT 370
283#define FPTRUNC 371
284#define FPEXT 372
285#define BITCAST 373
286#define UITOFP 374
287#define SITOFP 375
288#define FPTOUI 376
289#define FPTOSI 377
290#define INTTOPTR 378
291#define PTRTOINT 379
292#define PHI_TOK 380
293#define SELECT 381
294#define VAARG 382
295#define EXTRACTELEMENT 383
296#define INSERTELEMENT 384
297#define SHUFFLEVECTOR 385
298#define NORETURN 386
299#define INREG 387
300#define SRET 388
301#define NOUNWIND 389
302#define DEFAULT 390
303#define HIDDEN 391
304#define PROTECTED 392
305
306
307
308
309#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
Reid Spencer0a8a16b2007-05-22 18:52:55 +0000310#line 957 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
Reid Spencered951ea2007-05-19 07:22:10 +0000311typedef union YYSTYPE {
Reid Spencer68a24bd2005-08-27 18:50:39 +0000312 llvm::Module *ModuleVal;
313 llvm::Function *FunctionVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000314 llvm::BasicBlock *BasicBlockVal;
315 llvm::TerminatorInst *TermInstVal;
316 llvm::Instruction *InstVal;
Reid Spencera132e042006-12-03 05:46:11 +0000317 llvm::Constant *ConstVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000318
Reid Spencera132e042006-12-03 05:46:11 +0000319 const llvm::Type *PrimType;
Reid Spencer14310612006-12-31 05:40:51 +0000320 std::list<llvm::PATypeHolder> *TypeList;
Reid Spencera132e042006-12-03 05:46:11 +0000321 llvm::PATypeHolder *TypeVal;
322 llvm::Value *ValueVal;
Reid Spencera132e042006-12-03 05:46:11 +0000323 std::vector<llvm::Value*> *ValueList;
Reid Spencer14310612006-12-31 05:40:51 +0000324 llvm::ArgListType *ArgList;
325 llvm::TypeWithAttrs TypeWithAttrs;
326 llvm::TypeWithAttrsList *TypeWithAttrsList;
327 llvm::ValueRefList *ValueRefList;
328
Reid Spencer68a24bd2005-08-27 18:50:39 +0000329 // Represent the RHS of PHI node
Reid Spencera132e042006-12-03 05:46:11 +0000330 std::list<std::pair<llvm::Value*,
331 llvm::BasicBlock*> > *PHIList;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000332 std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;
Reid Spencera132e042006-12-03 05:46:11 +0000333 std::vector<llvm::Constant*> *ConstVector;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000334
335 llvm::GlobalValue::LinkageTypes Linkage;
Anton Korobeynikov178a3522007-01-12 19:22:51 +0000336 llvm::GlobalValue::VisibilityTypes Visibility;
Reid Spencer7b5d4662007-04-09 06:16:21 +0000337 uint16_t ParamAttrs;
Reid Spencer38c91a92007-02-28 02:24:54 +0000338 llvm::APInt *APIntVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000339 int64_t SInt64Val;
340 uint64_t UInt64Val;
341 int SIntVal;
342 unsigned UIntVal;
343 double FPVal;
344 bool BoolVal;
345
Reid Spencer0a8a16b2007-05-22 18:52:55 +0000346 std::string *StrVal; // This memory must be deleted
347 llvm::ValID ValIDVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000348
Reid Spencera132e042006-12-03 05:46:11 +0000349 llvm::Instruction::BinaryOps BinaryOpVal;
350 llvm::Instruction::TermOps TermOpVal;
351 llvm::Instruction::MemoryOps MemOpVal;
352 llvm::Instruction::CastOps CastOpVal;
353 llvm::Instruction::OtherOps OtherOpVal;
Reid Spencera132e042006-12-03 05:46:11 +0000354 llvm::ICmpInst::Predicate IPredicate;
355 llvm::FCmpInst::Predicate FPredicate;
Chris Lattner39b2e8b2007-05-04 04:01:37 +0000356} YYSTYPE;
Reid Spencered951ea2007-05-19 07:22:10 +0000357/* Line 1447 of yacc.c. */
358#line 359 "llvmAsmParser.tab.h"
359# define yystype YYSTYPE /* obsolescent; will be withdrawn */
360# define YYSTYPE_IS_DECLARED 1
361# define YYSTYPE_IS_TRIVIAL 1
362#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +0000363
364extern YYSTYPE llvmAsmlval;
Reid Spencered951ea2007-05-19 07:22:10 +0000365
366
367