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