blob: a70c2605ae2b8d1a9cfe8efb50b649bd25abbb41 [file] [log] [blame]
Reid Spencer21be8652006-10-22 07:03:43 +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 SINTVAL = 260,
35 UINTVAL = 261,
36 FPVAL = 262,
37 VOID = 263,
38 BOOL = 264,
39 SBYTE = 265,
40 UBYTE = 266,
41 SHORT = 267,
42 USHORT = 268,
43 INT = 269,
44 UINT = 270,
45 LONG = 271,
46 ULONG = 272,
47 FLOAT = 273,
48 DOUBLE = 274,
49 TYPE = 275,
50 LABEL = 276,
51 VAR_ID = 277,
52 LABELSTR = 278,
53 STRINGCONSTANT = 279,
54 IMPLEMENTATION = 280,
55 ZEROINITIALIZER = 281,
56 TRUETOK = 282,
57 FALSETOK = 283,
58 BEGINTOK = 284,
59 ENDTOK = 285,
60 DECLARE = 286,
61 GLOBAL = 287,
62 CONSTANT = 288,
63 SECTION = 289,
64 VOLATILE = 290,
65 TO = 291,
66 DOTDOTDOT = 292,
67 NULL_TOK = 293,
68 UNDEF = 294,
69 CONST = 295,
70 INTERNAL = 296,
71 LINKONCE = 297,
72 WEAK = 298,
73 APPENDING = 299,
74 DLLIMPORT = 300,
75 DLLEXPORT = 301,
76 EXTERN_WEAK = 302,
77 OPAQUE = 303,
78 NOT = 304,
79 EXTERNAL = 305,
80 TARGET = 306,
81 TRIPLE = 307,
82 ENDIAN = 308,
83 POINTERSIZE = 309,
84 LITTLE = 310,
85 BIG = 311,
86 ALIGN = 312,
87 DEPLIBS = 313,
88 CALL = 314,
89 TAIL = 315,
90 ASM_TOK = 316,
91 MODULE = 317,
92 SIDEEFFECT = 318,
93 CC_TOK = 319,
94 CCC_TOK = 320,
95 CSRETCC_TOK = 321,
96 FASTCC_TOK = 322,
97 COLDCC_TOK = 323,
98 X86_STDCALLCC_TOK = 324,
99 X86_FASTCALLCC_TOK = 325,
100 DATALAYOUT = 326,
101 RET = 327,
102 BR = 328,
103 SWITCH = 329,
104 INVOKE = 330,
105 UNWIND = 331,
106 UNREACHABLE = 332,
107 ADD = 333,
108 SUB = 334,
109 MUL = 335,
Reid Spencer1628cec2006-10-26 06:15:43 +0000110 UDIV = 336,
111 SDIV = 337,
112 FDIV = 338,
Reid Spencer3ed469c2006-11-02 20:25:50 +0000113 UREM = 339,
114 SREM = 340,
115 FREM = 341,
116 AND = 342,
117 OR = 343,
118 XOR = 344,
119 SETLE = 345,
120 SETGE = 346,
121 SETLT = 347,
122 SETGT = 348,
123 SETEQ = 349,
124 SETNE = 350,
125 MALLOC = 351,
126 ALLOCA = 352,
127 FREE = 353,
128 LOAD = 354,
129 STORE = 355,
130 GETELEMENTPTR = 356,
131 PHI_TOK = 357,
132 CAST = 358,
133 SELECT = 359,
134 SHL = 360,
135 SHR = 361,
136 VAARG = 362,
137 EXTRACTELEMENT = 363,
138 INSERTELEMENT = 364,
139 SHUFFLEVECTOR = 365,
140 VAARG_old = 366,
141 VANEXT_old = 367
Reid Spencer21be8652006-10-22 07:03:43 +0000142 };
143#endif
144/* Tokens. */
145#define ESINT64VAL 258
146#define EUINT64VAL 259
147#define SINTVAL 260
148#define UINTVAL 261
149#define FPVAL 262
150#define VOID 263
151#define BOOL 264
152#define SBYTE 265
153#define UBYTE 266
154#define SHORT 267
155#define USHORT 268
156#define INT 269
157#define UINT 270
158#define LONG 271
159#define ULONG 272
160#define FLOAT 273
161#define DOUBLE 274
162#define TYPE 275
163#define LABEL 276
164#define VAR_ID 277
165#define LABELSTR 278
166#define STRINGCONSTANT 279
167#define IMPLEMENTATION 280
168#define ZEROINITIALIZER 281
169#define TRUETOK 282
170#define FALSETOK 283
171#define BEGINTOK 284
172#define ENDTOK 285
173#define DECLARE 286
174#define GLOBAL 287
175#define CONSTANT 288
176#define SECTION 289
177#define VOLATILE 290
178#define TO 291
179#define DOTDOTDOT 292
180#define NULL_TOK 293
181#define UNDEF 294
182#define CONST 295
183#define INTERNAL 296
184#define LINKONCE 297
185#define WEAK 298
186#define APPENDING 299
187#define DLLIMPORT 300
188#define DLLEXPORT 301
189#define EXTERN_WEAK 302
190#define OPAQUE 303
191#define NOT 304
192#define EXTERNAL 305
193#define TARGET 306
194#define TRIPLE 307
195#define ENDIAN 308
196#define POINTERSIZE 309
197#define LITTLE 310
198#define BIG 311
199#define ALIGN 312
200#define DEPLIBS 313
201#define CALL 314
202#define TAIL 315
203#define ASM_TOK 316
204#define MODULE 317
205#define SIDEEFFECT 318
206#define CC_TOK 319
207#define CCC_TOK 320
208#define CSRETCC_TOK 321
209#define FASTCC_TOK 322
210#define COLDCC_TOK 323
211#define X86_STDCALLCC_TOK 324
212#define X86_FASTCALLCC_TOK 325
213#define DATALAYOUT 326
214#define RET 327
215#define BR 328
216#define SWITCH 329
217#define INVOKE 330
218#define UNWIND 331
219#define UNREACHABLE 332
220#define ADD 333
221#define SUB 334
222#define MUL 335
Reid Spencer1628cec2006-10-26 06:15:43 +0000223#define UDIV 336
224#define SDIV 337
225#define FDIV 338
Reid Spencer3ed469c2006-11-02 20:25:50 +0000226#define UREM 339
227#define SREM 340
228#define FREM 341
229#define AND 342
230#define OR 343
231#define XOR 344
232#define SETLE 345
233#define SETGE 346
234#define SETLT 347
235#define SETGT 348
236#define SETEQ 349
237#define SETNE 350
238#define MALLOC 351
239#define ALLOCA 352
240#define FREE 353
241#define LOAD 354
242#define STORE 355
243#define GETELEMENTPTR 356
244#define PHI_TOK 357
245#define CAST 358
246#define SELECT 359
247#define SHL 360
248#define SHR 361
249#define VAARG 362
250#define EXTRACTELEMENT 363
251#define INSERTELEMENT 364
252#define SHUFFLEVECTOR 365
253#define VAARG_old 366
254#define VANEXT_old 367
Reid Spencer21be8652006-10-22 07:03:43 +0000255
256
257
258
259#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
Reid Spencer3ed469c2006-11-02 20:25:50 +0000260#line 1016 "/proj/llvm/llvm-4/lib/AsmParser/llvmAsmParser.y"
Reid Spencer21be8652006-10-22 07:03:43 +0000261typedef union YYSTYPE {
Reid Spencer68a24bd2005-08-27 18:50:39 +0000262 llvm::Module *ModuleVal;
263 llvm::Function *FunctionVal;
264 std::pair<llvm::PATypeHolder*, char*> *ArgVal;
265 llvm::BasicBlock *BasicBlockVal;
266 llvm::TerminatorInst *TermInstVal;
267 llvm::Instruction *InstVal;
268 llvm::Constant *ConstVal;
269
270 const llvm::Type *PrimType;
271 llvm::PATypeHolder *TypeVal;
272 llvm::Value *ValueVal;
273
274 std::vector<std::pair<llvm::PATypeHolder*,char*> > *ArgList;
275 std::vector<llvm::Value*> *ValueList;
276 std::list<llvm::PATypeHolder> *TypeList;
277 // Represent the RHS of PHI node
278 std::list<std::pair<llvm::Value*,
279 llvm::BasicBlock*> > *PHIList;
280 std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;
281 std::vector<llvm::Constant*> *ConstVector;
282
283 llvm::GlobalValue::LinkageTypes Linkage;
284 int64_t SInt64Val;
285 uint64_t UInt64Val;
286 int SIntVal;
287 unsigned UIntVal;
288 double FPVal;
289 bool BoolVal;
290
291 char *StrVal; // This memory is strdup'd!
Reid Spencer1628cec2006-10-26 06:15:43 +0000292 llvm::ValID ValIDVal; // strdup'd memory maybe!
Reid Spencer68a24bd2005-08-27 18:50:39 +0000293
Reid Spencer1628cec2006-10-26 06:15:43 +0000294 BinaryOpInfo BinaryOpVal;
295 TermOpInfo TermOpVal;
296 MemOpInfo MemOpVal;
297 OtherOpInfo OtherOpVal;
298 llvm::Module::Endianness Endianness;
Reid Spencer5b7e7532006-09-28 19:28:24 +0000299} YYSTYPE;
Reid Spencer21be8652006-10-22 07:03:43 +0000300/* Line 1447 of yacc.c. */
Reid Spencer3ed469c2006-11-02 20:25:50 +0000301#line 302 "llvmAsmParser.tab.h"
Reid Spencer21be8652006-10-22 07:03:43 +0000302# define yystype YYSTYPE /* obsolescent; will be withdrawn */
303# define YYSTYPE_IS_DECLARED 1
304# define YYSTYPE_IS_TRIVIAL 1
305#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +0000306
307extern YYSTYPE llvmAsmlval;
Reid Spencer21be8652006-10-22 07:03:43 +0000308
309
310