blob: b7923591ab1ff869959dff1e79548dd6ea0e354d [file] [log] [blame]
David Greene718fda32007-08-01 03:59:32 +00001/* A Bison parser, made by GNU Bison 1.875c. */
Reid Spencerb8f85052007-07-31 03:50:36 +00002
3/* Skeleton parser for Yacc-like parsing with Bison,
David Greene718fda32007-08-01 03:59:32 +00004 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Reid Spencerb8f85052007-07-31 03:50:36 +00005
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
David Greene718fda32007-08-01 03:59:32 +000018 Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
Reid Spencerb8f85052007-07-31 03:50:36 +000020
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 SIGNEXT = 386,
161 ZEROEXT = 387,
162 NORETURN = 388,
163 INREG = 389,
164 SRET = 390,
165 NOUNWIND = 391,
166 NOALIAS = 392,
167 BYVAL = 393,
168 NEST = 394,
169 DEFAULT = 395,
170 HIDDEN = 396,
171 PROTECTED = 397
172 };
173#endif
Reid Spencerb8f85052007-07-31 03:50:36 +0000174#define ESINT64VAL 258
175#define EUINT64VAL 259
176#define ESAPINTVAL 260
177#define EUAPINTVAL 261
178#define LOCALVAL_ID 262
179#define GLOBALVAL_ID 263
180#define FPVAL 264
181#define VOID 265
182#define INTTYPE 266
183#define FLOAT 267
184#define DOUBLE 268
185#define LABEL 269
186#define TYPE 270
187#define LOCALVAR 271
188#define GLOBALVAR 272
189#define LABELSTR 273
190#define STRINGCONSTANT 274
191#define ATSTRINGCONSTANT 275
192#define PCTSTRINGCONSTANT 276
193#define ZEROINITIALIZER 277
194#define TRUETOK 278
195#define FALSETOK 279
196#define BEGINTOK 280
197#define ENDTOK 281
198#define DECLARE 282
199#define DEFINE 283
200#define GLOBAL 284
201#define CONSTANT 285
202#define SECTION 286
203#define ALIAS 287
204#define VOLATILE 288
205#define THREAD_LOCAL 289
206#define TO 290
207#define DOTDOTDOT 291
208#define NULL_TOK 292
209#define UNDEF 293
210#define INTERNAL 294
211#define LINKONCE 295
212#define WEAK 296
213#define APPENDING 297
214#define DLLIMPORT 298
215#define DLLEXPORT 299
216#define EXTERN_WEAK 300
217#define OPAQUE 301
218#define EXTERNAL 302
219#define TARGET 303
220#define TRIPLE 304
221#define ALIGN 305
222#define DEPLIBS 306
223#define CALL 307
224#define TAIL 308
225#define ASM_TOK 309
226#define MODULE 310
227#define SIDEEFFECT 311
228#define CC_TOK 312
229#define CCC_TOK 313
230#define FASTCC_TOK 314
231#define COLDCC_TOK 315
232#define X86_STDCALLCC_TOK 316
233#define X86_FASTCALLCC_TOK 317
234#define DATALAYOUT 318
235#define RET 319
236#define BR 320
237#define SWITCH 321
238#define INVOKE 322
239#define UNWIND 323
240#define UNREACHABLE 324
241#define ADD 325
242#define SUB 326
243#define MUL 327
244#define UDIV 328
245#define SDIV 329
246#define FDIV 330
247#define UREM 331
248#define SREM 332
249#define FREM 333
250#define AND 334
251#define OR 335
252#define XOR 336
253#define SHL 337
254#define LSHR 338
255#define ASHR 339
256#define ICMP 340
257#define FCMP 341
258#define EQ 342
259#define NE 343
260#define SLT 344
261#define SGT 345
262#define SLE 346
263#define SGE 347
264#define ULT 348
265#define UGT 349
266#define ULE 350
267#define UGE 351
268#define OEQ 352
269#define ONE 353
270#define OLT 354
271#define OGT 355
272#define OLE 356
273#define OGE 357
274#define ORD 358
275#define UNO 359
276#define UEQ 360
277#define UNE 361
278#define MALLOC 362
279#define ALLOCA 363
280#define FREE 364
281#define LOAD 365
282#define STORE 366
283#define GETELEMENTPTR 367
284#define TRUNC 368
285#define ZEXT 369
286#define SEXT 370
287#define FPTRUNC 371
288#define FPEXT 372
289#define BITCAST 373
290#define UITOFP 374
291#define SITOFP 375
292#define FPTOUI 376
293#define FPTOSI 377
294#define INTTOPTR 378
295#define PTRTOINT 379
296#define PHI_TOK 380
297#define SELECT 381
298#define VAARG 382
299#define EXTRACTELEMENT 383
300#define INSERTELEMENT 384
301#define SHUFFLEVECTOR 385
302#define SIGNEXT 386
303#define ZEROEXT 387
304#define NORETURN 388
305#define INREG 389
306#define SRET 390
307#define NOUNWIND 391
308#define NOALIAS 392
309#define BYVAL 393
310#define NEST 394
311#define DEFAULT 395
312#define HIDDEN 396
313#define PROTECTED 397
314
315
316
317
318#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
David Greene718fda32007-08-01 03:59:32 +0000319#line 957 "/users/dag/projects/cascade/llvm.modified/lib/AsmParser/llvmAsmParser.y"
Reid Spencerb8f85052007-07-31 03:50:36 +0000320typedef union YYSTYPE {
Reid Spencer68a24bd2005-08-27 18:50:39 +0000321 llvm::Module *ModuleVal;
322 llvm::Function *FunctionVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000323 llvm::BasicBlock *BasicBlockVal;
324 llvm::TerminatorInst *TermInstVal;
325 llvm::Instruction *InstVal;
Reid Spencera132e042006-12-03 05:46:11 +0000326 llvm::Constant *ConstVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000327
Reid Spencera132e042006-12-03 05:46:11 +0000328 const llvm::Type *PrimType;
Reid Spencer14310612006-12-31 05:40:51 +0000329 std::list<llvm::PATypeHolder> *TypeList;
Reid Spencera132e042006-12-03 05:46:11 +0000330 llvm::PATypeHolder *TypeVal;
331 llvm::Value *ValueVal;
Reid Spencera132e042006-12-03 05:46:11 +0000332 std::vector<llvm::Value*> *ValueList;
Reid Spencer14310612006-12-31 05:40:51 +0000333 llvm::ArgListType *ArgList;
334 llvm::TypeWithAttrs TypeWithAttrs;
335 llvm::TypeWithAttrsList *TypeWithAttrsList;
336 llvm::ValueRefList *ValueRefList;
337
Reid Spencer68a24bd2005-08-27 18:50:39 +0000338 // Represent the RHS of PHI node
Reid Spencera132e042006-12-03 05:46:11 +0000339 std::list<std::pair<llvm::Value*,
340 llvm::BasicBlock*> > *PHIList;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000341 std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;
Reid Spencera132e042006-12-03 05:46:11 +0000342 std::vector<llvm::Constant*> *ConstVector;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000343
344 llvm::GlobalValue::LinkageTypes Linkage;
Anton Korobeynikov178a3522007-01-12 19:22:51 +0000345 llvm::GlobalValue::VisibilityTypes Visibility;
Reid Spencer7b5d4662007-04-09 06:16:21 +0000346 uint16_t ParamAttrs;
Reid Spencer38c91a92007-02-28 02:24:54 +0000347 llvm::APInt *APIntVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000348 int64_t SInt64Val;
349 uint64_t UInt64Val;
350 int SIntVal;
351 unsigned UIntVal;
352 double FPVal;
353 bool BoolVal;
354
Reid Spencer0a8a16b2007-05-22 18:52:55 +0000355 std::string *StrVal; // This memory must be deleted
356 llvm::ValID ValIDVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000357
Reid Spencera132e042006-12-03 05:46:11 +0000358 llvm::Instruction::BinaryOps BinaryOpVal;
359 llvm::Instruction::TermOps TermOpVal;
360 llvm::Instruction::MemoryOps MemOpVal;
361 llvm::Instruction::CastOps CastOpVal;
362 llvm::Instruction::OtherOps OtherOpVal;
Reid Spencera132e042006-12-03 05:46:11 +0000363 llvm::ICmpInst::Predicate IPredicate;
364 llvm::FCmpInst::Predicate FPredicate;
Chris Lattner39b2e8b2007-05-04 04:01:37 +0000365} YYSTYPE;
David Greene718fda32007-08-01 03:59:32 +0000366/* Line 1268 of yacc.c. */
367#line 368 "llvmAsmParser.tab.h"
Reid Spencerb8f85052007-07-31 03:50:36 +0000368# define yystype YYSTYPE /* obsolescent; will be withdrawn */
369# define YYSTYPE_IS_DECLARED 1
370# define YYSTYPE_IS_TRIVIAL 1
371#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +0000372
373extern YYSTYPE llvmAsmlval;
Reid Spencerb8f85052007-07-31 03:50:36 +0000374
375
376