blob: bd861e5ca6c4780e9938672d8df6e2053ef007b2 [file] [log] [blame]
Jeff Cohen930c0fe2007-04-29 14:43:31 +00001/* A Bison parser, made from /usr/home/jeffc/llvm/lib/AsmParser/llvmAsmParser.y, by GNU bison 1.75. */
Anton Korobeynikov38e09802007-04-28 13:48:45 +00002
Reid Spencer9c9b63a2007-04-28 16:07:31 +00003/* Skeleton parser for Yacc-like parsing with Bison,
Jeff Cohen930c0fe2007-04-29 14:43:31 +00004 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
Anton Korobeynikov38e09802007-04-28 13:48:45 +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
Jeff Cohen930c0fe2007-04-29 14:43:31 +000018 Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
Anton Korobeynikov38e09802007-04-28 13:48:45 +000020
Reid Spencer9c9b63a2007-04-28 16:07:31 +000021/* 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. */
Anton Korobeynikov38e09802007-04-28 13:48:45 +000025
Jeff Cohen930c0fe2007-04-29 14:43:31 +000026#ifndef BISON_LLVMASMPARSER_TAB_H
27# define BISON_LLVMASMPARSER_TAB_H
28
Anton Korobeynikov38e09802007-04-28 13:48:45 +000029/* Tokens. */
30#ifndef YYTOKENTYPE
31# define YYTOKENTYPE
32 /* Put the tokens into the symbol table, so that GDB and other debuggers
33 know about them. */
34 enum yytokentype {
35 ESINT64VAL = 258,
36 EUINT64VAL = 259,
37 ESAPINTVAL = 260,
38 EUAPINTVAL = 261,
39 LOCALVAL_ID = 262,
40 GLOBALVAL_ID = 263,
41 FPVAL = 264,
42 VOID = 265,
43 INTTYPE = 266,
44 FLOAT = 267,
45 DOUBLE = 268,
46 LABEL = 269,
47 TYPE = 270,
48 LOCALVAR = 271,
49 GLOBALVAR = 272,
50 LABELSTR = 273,
51 STRINGCONSTANT = 274,
52 ATSTRINGCONSTANT = 275,
53 ZEROINITIALIZER = 276,
54 TRUETOK = 277,
55 FALSETOK = 278,
56 BEGINTOK = 279,
57 ENDTOK = 280,
58 DECLARE = 281,
59 DEFINE = 282,
60 GLOBAL = 283,
61 CONSTANT = 284,
62 SECTION = 285,
63 ALIAS = 286,
64 VOLATILE = 287,
65 THREAD_LOCAL = 288,
66 TO = 289,
67 DOTDOTDOT = 290,
68 NULL_TOK = 291,
69 UNDEF = 292,
70 INTERNAL = 293,
71 LINKONCE = 294,
72 WEAK = 295,
73 APPENDING = 296,
74 DLLIMPORT = 297,
75 DLLEXPORT = 298,
76 EXTERN_WEAK = 299,
77 OPAQUE = 300,
78 EXTERNAL = 301,
79 TARGET = 302,
80 TRIPLE = 303,
81 ALIGN = 304,
82 DEPLIBS = 305,
83 CALL = 306,
84 TAIL = 307,
85 ASM_TOK = 308,
86 MODULE = 309,
87 SIDEEFFECT = 310,
88 CC_TOK = 311,
89 CCC_TOK = 312,
90 FASTCC_TOK = 313,
91 COLDCC_TOK = 314,
92 X86_STDCALLCC_TOK = 315,
93 X86_FASTCALLCC_TOK = 316,
94 DATALAYOUT = 317,
95 RET = 318,
96 BR = 319,
97 SWITCH = 320,
98 INVOKE = 321,
99 UNWIND = 322,
100 UNREACHABLE = 323,
101 ADD = 324,
102 SUB = 325,
103 MUL = 326,
104 UDIV = 327,
105 SDIV = 328,
106 FDIV = 329,
107 UREM = 330,
108 SREM = 331,
109 FREM = 332,
110 AND = 333,
111 OR = 334,
112 XOR = 335,
113 SHL = 336,
114 LSHR = 337,
115 ASHR = 338,
116 ICMP = 339,
117 FCMP = 340,
118 EQ = 341,
119 NE = 342,
120 SLT = 343,
121 SGT = 344,
122 SLE = 345,
123 SGE = 346,
124 ULT = 347,
125 UGT = 348,
126 ULE = 349,
127 UGE = 350,
128 OEQ = 351,
129 ONE = 352,
130 OLT = 353,
131 OGT = 354,
132 OLE = 355,
133 OGE = 356,
134 ORD = 357,
135 UNO = 358,
136 UEQ = 359,
137 UNE = 360,
138 MALLOC = 361,
139 ALLOCA = 362,
140 FREE = 363,
141 LOAD = 364,
142 STORE = 365,
143 GETELEMENTPTR = 366,
144 TRUNC = 367,
145 ZEXT = 368,
146 SEXT = 369,
147 FPTRUNC = 370,
148 FPEXT = 371,
149 BITCAST = 372,
150 UITOFP = 373,
151 SITOFP = 374,
152 FPTOUI = 375,
153 FPTOSI = 376,
154 INTTOPTR = 377,
155 PTRTOINT = 378,
156 PHI_TOK = 379,
157 SELECT = 380,
158 VAARG = 381,
159 EXTRACTELEMENT = 382,
160 INSERTELEMENT = 383,
161 SHUFFLEVECTOR = 384,
162 NORETURN = 385,
163 INREG = 386,
164 SRET = 387,
165 NOUNWIND = 388,
166 DEFAULT = 389,
167 HIDDEN = 390
168 };
169#endif
Anton Korobeynikov38e09802007-04-28 13:48:45 +0000170#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 ZEROINITIALIZER 276
189#define TRUETOK 277
190#define FALSETOK 278
191#define BEGINTOK 279
192#define ENDTOK 280
193#define DECLARE 281
194#define DEFINE 282
195#define GLOBAL 283
196#define CONSTANT 284
197#define SECTION 285
198#define ALIAS 286
199#define VOLATILE 287
200#define THREAD_LOCAL 288
201#define TO 289
202#define DOTDOTDOT 290
203#define NULL_TOK 291
204#define UNDEF 292
205#define INTERNAL 293
206#define LINKONCE 294
207#define WEAK 295
208#define APPENDING 296
209#define DLLIMPORT 297
210#define DLLEXPORT 298
211#define EXTERN_WEAK 299
212#define OPAQUE 300
213#define EXTERNAL 301
214#define TARGET 302
215#define TRIPLE 303
216#define ALIGN 304
217#define DEPLIBS 305
218#define CALL 306
219#define TAIL 307
220#define ASM_TOK 308
221#define MODULE 309
222#define SIDEEFFECT 310
223#define CC_TOK 311
224#define CCC_TOK 312
225#define FASTCC_TOK 313
226#define COLDCC_TOK 314
227#define X86_STDCALLCC_TOK 315
228#define X86_FASTCALLCC_TOK 316
229#define DATALAYOUT 317
230#define RET 318
231#define BR 319
232#define SWITCH 320
233#define INVOKE 321
234#define UNWIND 322
235#define UNREACHABLE 323
236#define ADD 324
237#define SUB 325
238#define MUL 326
239#define UDIV 327
240#define SDIV 328
241#define FDIV 329
242#define UREM 330
243#define SREM 331
244#define FREM 332
245#define AND 333
246#define OR 334
247#define XOR 335
248#define SHL 336
249#define LSHR 337
250#define ASHR 338
251#define ICMP 339
252#define FCMP 340
253#define EQ 341
254#define NE 342
255#define SLT 343
256#define SGT 344
257#define SLE 345
258#define SGE 346
259#define ULT 347
260#define UGT 348
261#define ULE 349
262#define UGE 350
263#define OEQ 351
264#define ONE 352
265#define OLT 353
266#define OGT 354
267#define OLE 355
268#define OGE 356
269#define ORD 357
270#define UNO 358
271#define UEQ 359
272#define UNE 360
273#define MALLOC 361
274#define ALLOCA 362
275#define FREE 363
276#define LOAD 364
277#define STORE 365
278#define GETELEMENTPTR 366
279#define TRUNC 367
280#define ZEXT 368
281#define SEXT 369
282#define FPTRUNC 370
283#define FPEXT 371
284#define BITCAST 372
285#define UITOFP 373
286#define SITOFP 374
287#define FPTOUI 375
288#define FPTOSI 376
289#define INTTOPTR 377
290#define PTRTOINT 378
291#define PHI_TOK 379
292#define SELECT 380
293#define VAARG 381
294#define EXTRACTELEMENT 382
295#define INSERTELEMENT 383
296#define SHUFFLEVECTOR 384
297#define NORETURN 385
298#define INREG 386
299#define SRET 387
300#define NOUNWIND 388
301#define DEFAULT 389
302#define HIDDEN 390
303
304
305
306
Jeff Cohen930c0fe2007-04-29 14:43:31 +0000307#ifndef YYSTYPE
308#line 955 "/usr/home/jeffc/llvm/lib/AsmParser/llvmAsmParser.y"
309typedef union {
Reid Spencer68a24bd2005-08-27 18:50:39 +0000310 llvm::Module *ModuleVal;
311 llvm::Function *FunctionVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000312 llvm::BasicBlock *BasicBlockVal;
313 llvm::TerminatorInst *TermInstVal;
314 llvm::Instruction *InstVal;
Reid Spencera132e042006-12-03 05:46:11 +0000315 llvm::Constant *ConstVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000316
Reid Spencera132e042006-12-03 05:46:11 +0000317 const llvm::Type *PrimType;
Reid Spencer14310612006-12-31 05:40:51 +0000318 std::list<llvm::PATypeHolder> *TypeList;
Reid Spencera132e042006-12-03 05:46:11 +0000319 llvm::PATypeHolder *TypeVal;
320 llvm::Value *ValueVal;
Reid Spencera132e042006-12-03 05:46:11 +0000321 std::vector<llvm::Value*> *ValueList;
Reid Spencer14310612006-12-31 05:40:51 +0000322 llvm::ArgListType *ArgList;
323 llvm::TypeWithAttrs TypeWithAttrs;
324 llvm::TypeWithAttrsList *TypeWithAttrsList;
325 llvm::ValueRefList *ValueRefList;
326
Reid Spencer68a24bd2005-08-27 18:50:39 +0000327 // Represent the RHS of PHI node
Reid Spencera132e042006-12-03 05:46:11 +0000328 std::list<std::pair<llvm::Value*,
329 llvm::BasicBlock*> > *PHIList;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000330 std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;
Reid Spencera132e042006-12-03 05:46:11 +0000331 std::vector<llvm::Constant*> *ConstVector;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000332
333 llvm::GlobalValue::LinkageTypes Linkage;
Anton Korobeynikov178a3522007-01-12 19:22:51 +0000334 llvm::GlobalValue::VisibilityTypes Visibility;
Reid Spencer7b5d4662007-04-09 06:16:21 +0000335 uint16_t ParamAttrs;
Reid Spencer38c91a92007-02-28 02:24:54 +0000336 llvm::APInt *APIntVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000337 int64_t SInt64Val;
338 uint64_t UInt64Val;
339 int SIntVal;
340 unsigned UIntVal;
341 double FPVal;
342 bool BoolVal;
343
344 char *StrVal; // This memory is strdup'd!
Reid Spencer1628cec2006-10-26 06:15:43 +0000345 llvm::ValID ValIDVal; // strdup'd memory maybe!
Reid Spencer68a24bd2005-08-27 18:50:39 +0000346
Reid Spencera132e042006-12-03 05:46:11 +0000347 llvm::Instruction::BinaryOps BinaryOpVal;
348 llvm::Instruction::TermOps TermOpVal;
349 llvm::Instruction::MemoryOps MemOpVal;
350 llvm::Instruction::CastOps CastOpVal;
351 llvm::Instruction::OtherOps OtherOpVal;
Reid Spencera132e042006-12-03 05:46:11 +0000352 llvm::ICmpInst::Predicate IPredicate;
353 llvm::FCmpInst::Predicate FPredicate;
Jeff Cohen930c0fe2007-04-29 14:43:31 +0000354} yystype;
355/* Line 1237 of /usr/local/share/bison/yacc.c. */
356#line 357 "llvmAsmParser.tab.h"
357# define YYSTYPE yystype
Anton Korobeynikov38e09802007-04-28 13:48:45 +0000358#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +0000359
360extern YYSTYPE llvmAsmlval;
Anton Korobeynikov38e09802007-04-28 13:48:45 +0000361
Reid Spencer9c9b63a2007-04-28 16:07:31 +0000362
Jeff Cohen930c0fe2007-04-29 14:43:31 +0000363#endif /* not BISON_LLVMASMPARSER_TAB_H */
Reid Spencer9c9b63a2007-04-28 16:07:31 +0000364