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