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