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