blob: d0c8572e079e375d8be6772d8de6744e74c77566 [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,
113 REM = 339,
114 AND = 340,
115 OR = 341,
116 XOR = 342,
117 SETLE = 343,
118 SETGE = 344,
119 SETLT = 345,
120 SETGT = 346,
121 SETEQ = 347,
122 SETNE = 348,
123 MALLOC = 349,
124 ALLOCA = 350,
125 FREE = 351,
126 LOAD = 352,
127 STORE = 353,
128 GETELEMENTPTR = 354,
129 PHI_TOK = 355,
130 CAST = 356,
131 SELECT = 357,
132 SHL = 358,
133 SHR = 359,
134 VAARG = 360,
135 EXTRACTELEMENT = 361,
136 INSERTELEMENT = 362,
137 SHUFFLEVECTOR = 363,
138 VAARG_old = 364,
139 VANEXT_old = 365
Reid Spencer21be8652006-10-22 07:03:43 +0000140 };
141#endif
142/* Tokens. */
143#define ESINT64VAL 258
144#define EUINT64VAL 259
145#define SINTVAL 260
146#define UINTVAL 261
147#define FPVAL 262
148#define VOID 263
149#define BOOL 264
150#define SBYTE 265
151#define UBYTE 266
152#define SHORT 267
153#define USHORT 268
154#define INT 269
155#define UINT 270
156#define LONG 271
157#define ULONG 272
158#define FLOAT 273
159#define DOUBLE 274
160#define TYPE 275
161#define LABEL 276
162#define VAR_ID 277
163#define LABELSTR 278
164#define STRINGCONSTANT 279
165#define IMPLEMENTATION 280
166#define ZEROINITIALIZER 281
167#define TRUETOK 282
168#define FALSETOK 283
169#define BEGINTOK 284
170#define ENDTOK 285
171#define DECLARE 286
172#define GLOBAL 287
173#define CONSTANT 288
174#define SECTION 289
175#define VOLATILE 290
176#define TO 291
177#define DOTDOTDOT 292
178#define NULL_TOK 293
179#define UNDEF 294
180#define CONST 295
181#define INTERNAL 296
182#define LINKONCE 297
183#define WEAK 298
184#define APPENDING 299
185#define DLLIMPORT 300
186#define DLLEXPORT 301
187#define EXTERN_WEAK 302
188#define OPAQUE 303
189#define NOT 304
190#define EXTERNAL 305
191#define TARGET 306
192#define TRIPLE 307
193#define ENDIAN 308
194#define POINTERSIZE 309
195#define LITTLE 310
196#define BIG 311
197#define ALIGN 312
198#define DEPLIBS 313
199#define CALL 314
200#define TAIL 315
201#define ASM_TOK 316
202#define MODULE 317
203#define SIDEEFFECT 318
204#define CC_TOK 319
205#define CCC_TOK 320
206#define CSRETCC_TOK 321
207#define FASTCC_TOK 322
208#define COLDCC_TOK 323
209#define X86_STDCALLCC_TOK 324
210#define X86_FASTCALLCC_TOK 325
211#define DATALAYOUT 326
212#define RET 327
213#define BR 328
214#define SWITCH 329
215#define INVOKE 330
216#define UNWIND 331
217#define UNREACHABLE 332
218#define ADD 333
219#define SUB 334
220#define MUL 335
Reid Spencer1628cec2006-10-26 06:15:43 +0000221#define UDIV 336
222#define SDIV 337
223#define FDIV 338
224#define REM 339
225#define AND 340
226#define OR 341
227#define XOR 342
228#define SETLE 343
229#define SETGE 344
230#define SETLT 345
231#define SETGT 346
232#define SETEQ 347
233#define SETNE 348
234#define MALLOC 349
235#define ALLOCA 350
236#define FREE 351
237#define LOAD 352
238#define STORE 353
239#define GETELEMENTPTR 354
240#define PHI_TOK 355
241#define CAST 356
242#define SELECT 357
243#define SHL 358
244#define SHR 359
245#define VAARG 360
246#define EXTRACTELEMENT 361
247#define INSERTELEMENT 362
248#define SHUFFLEVECTOR 363
249#define VAARG_old 364
250#define VANEXT_old 365
Reid Spencer21be8652006-10-22 07:03:43 +0000251
252
253
254
255#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
Reid Spencer1628cec2006-10-26 06:15:43 +0000256#line 1011 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y"
Reid Spencer21be8652006-10-22 07:03:43 +0000257typedef union YYSTYPE {
Reid Spencer68a24bd2005-08-27 18:50:39 +0000258 llvm::Module *ModuleVal;
259 llvm::Function *FunctionVal;
260 std::pair<llvm::PATypeHolder*, char*> *ArgVal;
261 llvm::BasicBlock *BasicBlockVal;
262 llvm::TerminatorInst *TermInstVal;
263 llvm::Instruction *InstVal;
264 llvm::Constant *ConstVal;
265
266 const llvm::Type *PrimType;
267 llvm::PATypeHolder *TypeVal;
268 llvm::Value *ValueVal;
269
270 std::vector<std::pair<llvm::PATypeHolder*,char*> > *ArgList;
271 std::vector<llvm::Value*> *ValueList;
272 std::list<llvm::PATypeHolder> *TypeList;
273 // Represent the RHS of PHI node
274 std::list<std::pair<llvm::Value*,
275 llvm::BasicBlock*> > *PHIList;
276 std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;
277 std::vector<llvm::Constant*> *ConstVector;
278
279 llvm::GlobalValue::LinkageTypes Linkage;
280 int64_t SInt64Val;
281 uint64_t UInt64Val;
282 int SIntVal;
283 unsigned UIntVal;
284 double FPVal;
285 bool BoolVal;
286
287 char *StrVal; // This memory is strdup'd!
Reid Spencer1628cec2006-10-26 06:15:43 +0000288 llvm::ValID ValIDVal; // strdup'd memory maybe!
Reid Spencer68a24bd2005-08-27 18:50:39 +0000289
Reid Spencer1628cec2006-10-26 06:15:43 +0000290 BinaryOpInfo BinaryOpVal;
291 TermOpInfo TermOpVal;
292 MemOpInfo MemOpVal;
293 OtherOpInfo OtherOpVal;
294 llvm::Module::Endianness Endianness;
Reid Spencer5b7e7532006-09-28 19:28:24 +0000295} YYSTYPE;
Reid Spencer21be8652006-10-22 07:03:43 +0000296/* Line 1447 of yacc.c. */
Reid Spencer1628cec2006-10-26 06:15:43 +0000297#line 298 "llvmAsmParser.tab.h"
Reid Spencer21be8652006-10-22 07:03:43 +0000298# define yystype YYSTYPE /* obsolescent; will be withdrawn */
299# define YYSTYPE_IS_DECLARED 1
300# define YYSTYPE_IS_TRIVIAL 1
301#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +0000302
303extern YYSTYPE llvmAsmlval;
Reid Spencer21be8652006-10-22 07:03:43 +0000304
305
306