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