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