blob: 24c92b5c2b23d7d92cc3fceba15943a501d81f83 [file] [log] [blame]
Andrew Lenharth6353e052006-12-08 18:07:09 +00001/* A Bison parser, made by GNU Bison 1.875c. */
Reid Spencer3822ff52006-11-08 06:47:33 +00002
Andrew Lenharth6353e052006-12-08 18:07:09 +00003/* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Reid Spencer3822ff52006-11-08 06:47:33 +00005
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
Andrew Lenharth6353e052006-12-08 18:07:09 +000018 Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
Reid Spencer3822ff52006-11-08 06:47:33 +000020
Andrew Lenharth6353e052006-12-08 18:07:09 +000021/* 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. */
Reid Spencer3822ff52006-11-08 06:47:33 +000025
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 UDIV = 336,
111 SDIV = 337,
112 FDIV = 338,
113 UREM = 339,
114 SREM = 340,
115 FREM = 341,
116 AND = 342,
117 OR = 343,
118 XOR = 344,
119 SETLE = 345,
120 SETGE = 346,
121 SETLT = 347,
122 SETGT = 348,
123 SETEQ = 349,
124 SETNE = 350,
Reid Spencera132e042006-12-03 05:46:11 +0000125 ICMP = 351,
126 FCMP = 352,
127 EQ = 353,
128 NE = 354,
129 SLT = 355,
130 SGT = 356,
131 SLE = 357,
132 SGE = 358,
133 ULT = 359,
134 UGT = 360,
135 ULE = 361,
136 UGE = 362,
Reid Spencer6e18b7d2006-12-03 06:59:29 +0000137 OEQ = 363,
138 ONE = 364,
139 OLT = 365,
140 OGT = 366,
141 OLE = 367,
142 OGE = 368,
Reid Spencera132e042006-12-03 05:46:11 +0000143 ORD = 369,
144 UNO = 370,
Reid Spencer6e18b7d2006-12-03 06:59:29 +0000145 UEQ = 371,
146 UNE = 372,
147 MALLOC = 373,
148 ALLOCA = 374,
149 FREE = 375,
150 LOAD = 376,
151 STORE = 377,
152 GETELEMENTPTR = 378,
153 TRUNC = 379,
154 ZEXT = 380,
155 SEXT = 381,
156 FPTRUNC = 382,
157 FPEXT = 383,
158 BITCAST = 384,
159 UITOFP = 385,
160 SITOFP = 386,
161 FPTOUI = 387,
162 FPTOSI = 388,
163 INTTOPTR = 389,
164 PTRTOINT = 390,
165 PHI_TOK = 391,
166 SELECT = 392,
167 SHL = 393,
168 LSHR = 394,
169 ASHR = 395,
170 VAARG = 396,
171 EXTRACTELEMENT = 397,
172 INSERTELEMENT = 398,
Reid Spencercd42c582006-12-05 23:29:42 +0000173 SHUFFLEVECTOR = 399
Reid Spencer3822ff52006-11-08 06:47:33 +0000174 };
175#endif
Reid Spencer3822ff52006-11-08 06:47:33 +0000176#define ESINT64VAL 258
177#define EUINT64VAL 259
178#define SINTVAL 260
179#define UINTVAL 261
180#define FPVAL 262
181#define VOID 263
182#define BOOL 264
183#define SBYTE 265
184#define UBYTE 266
185#define SHORT 267
186#define USHORT 268
187#define INT 269
188#define UINT 270
189#define LONG 271
190#define ULONG 272
191#define FLOAT 273
192#define DOUBLE 274
193#define TYPE 275
194#define LABEL 276
195#define VAR_ID 277
196#define LABELSTR 278
197#define STRINGCONSTANT 279
198#define IMPLEMENTATION 280
199#define ZEROINITIALIZER 281
200#define TRUETOK 282
201#define FALSETOK 283
202#define BEGINTOK 284
203#define ENDTOK 285
204#define DECLARE 286
205#define GLOBAL 287
206#define CONSTANT 288
207#define SECTION 289
208#define VOLATILE 290
209#define TO 291
210#define DOTDOTDOT 292
211#define NULL_TOK 293
212#define UNDEF 294
213#define CONST 295
214#define INTERNAL 296
215#define LINKONCE 297
216#define WEAK 298
217#define APPENDING 299
218#define DLLIMPORT 300
219#define DLLEXPORT 301
220#define EXTERN_WEAK 302
221#define OPAQUE 303
222#define NOT 304
223#define EXTERNAL 305
224#define TARGET 306
225#define TRIPLE 307
226#define ENDIAN 308
227#define POINTERSIZE 309
228#define LITTLE 310
229#define BIG 311
230#define ALIGN 312
231#define DEPLIBS 313
232#define CALL 314
233#define TAIL 315
234#define ASM_TOK 316
235#define MODULE 317
236#define SIDEEFFECT 318
237#define CC_TOK 319
238#define CCC_TOK 320
239#define CSRETCC_TOK 321
240#define FASTCC_TOK 322
241#define COLDCC_TOK 323
242#define X86_STDCALLCC_TOK 324
243#define X86_FASTCALLCC_TOK 325
244#define DATALAYOUT 326
245#define RET 327
246#define BR 328
247#define SWITCH 329
248#define INVOKE 330
249#define UNWIND 331
250#define UNREACHABLE 332
251#define ADD 333
252#define SUB 334
253#define MUL 335
254#define UDIV 336
255#define SDIV 337
256#define FDIV 338
257#define UREM 339
258#define SREM 340
259#define FREM 341
260#define AND 342
261#define OR 343
262#define XOR 344
263#define SETLE 345
264#define SETGE 346
265#define SETLT 347
266#define SETGT 348
267#define SETEQ 349
268#define SETNE 350
Reid Spencera132e042006-12-03 05:46:11 +0000269#define ICMP 351
270#define FCMP 352
271#define EQ 353
272#define NE 354
273#define SLT 355
274#define SGT 356
275#define SLE 357
276#define SGE 358
277#define ULT 359
278#define UGT 360
279#define ULE 361
280#define UGE 362
Reid Spencer6e18b7d2006-12-03 06:59:29 +0000281#define OEQ 363
282#define ONE 364
283#define OLT 365
284#define OGT 366
285#define OLE 367
286#define OGE 368
Reid Spencera132e042006-12-03 05:46:11 +0000287#define ORD 369
288#define UNO 370
Reid Spencer6e18b7d2006-12-03 06:59:29 +0000289#define UEQ 371
290#define UNE 372
291#define MALLOC 373
292#define ALLOCA 374
293#define FREE 375
294#define LOAD 376
295#define STORE 377
296#define GETELEMENTPTR 378
297#define TRUNC 379
298#define ZEXT 380
299#define SEXT 381
300#define FPTRUNC 382
301#define FPEXT 383
302#define BITCAST 384
303#define UITOFP 385
304#define SITOFP 386
305#define FPTOUI 387
306#define FPTOSI 388
307#define INTTOPTR 389
308#define PTRTOINT 390
309#define PHI_TOK 391
310#define SELECT 392
311#define SHL 393
312#define LSHR 394
313#define ASHR 395
314#define VAARG 396
315#define EXTRACTELEMENT 397
316#define INSERTELEMENT 398
317#define SHUFFLEVECTOR 399
Reid Spencer3822ff52006-11-08 06:47:33 +0000318
319
320
321
Andrew Lenharth6353e052006-12-08 18:07:09 +0000322#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
323#line 855 "/home/vadve/alenhar2/llvm.old/lib/AsmParser/llvmAsmParser.y"
324typedef union YYSTYPE {
Reid Spencer68a24bd2005-08-27 18:50:39 +0000325 llvm::Module *ModuleVal;
326 llvm::Function *FunctionVal;
Reid Spencera132e042006-12-03 05:46:11 +0000327 std::pair<llvm::PATypeHolder*, char*> *ArgVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000328 llvm::BasicBlock *BasicBlockVal;
329 llvm::TerminatorInst *TermInstVal;
330 llvm::Instruction *InstVal;
Reid Spencera132e042006-12-03 05:46:11 +0000331 llvm::Constant *ConstVal;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000332
Reid Spencera132e042006-12-03 05:46:11 +0000333 const llvm::Type *PrimType;
334 llvm::PATypeHolder *TypeVal;
335 llvm::Value *ValueVal;
336
337 std::vector<std::pair<llvm::PATypeHolder*,char*> > *ArgList;
338 std::vector<llvm::Value*> *ValueList;
339 std::list<llvm::PATypeHolder> *TypeList;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000340 // Represent the RHS of PHI node
Reid Spencera132e042006-12-03 05:46:11 +0000341 std::list<std::pair<llvm::Value*,
342 llvm::BasicBlock*> > *PHIList;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000343 std::vector<std::pair<llvm::Constant*, llvm::BasicBlock*> > *JumpTable;
Reid Spencera132e042006-12-03 05:46:11 +0000344 std::vector<llvm::Constant*> *ConstVector;
Reid Spencer68a24bd2005-08-27 18:50:39 +0000345
346 llvm::GlobalValue::LinkageTypes Linkage;
347 int64_t SInt64Val;
348 uint64_t UInt64Val;
349 int SIntVal;
350 unsigned UIntVal;
351 double FPVal;
352 bool BoolVal;
353
354 char *StrVal; // This memory is strdup'd!
Reid Spencer1628cec2006-10-26 06:15:43 +0000355 llvm::ValID ValIDVal; // strdup'd memory maybe!
Reid Spencer68a24bd2005-08-27 18:50:39 +0000356
Reid Spencera132e042006-12-03 05:46:11 +0000357 llvm::Instruction::BinaryOps BinaryOpVal;
358 llvm::Instruction::TermOps TermOpVal;
359 llvm::Instruction::MemoryOps MemOpVal;
360 llvm::Instruction::CastOps CastOpVal;
361 llvm::Instruction::OtherOps OtherOpVal;
Reid Spencer1628cec2006-10-26 06:15:43 +0000362 llvm::Module::Endianness Endianness;
Reid Spencera132e042006-12-03 05:46:11 +0000363 llvm::ICmpInst::Predicate IPredicate;
364 llvm::FCmpInst::Predicate FPredicate;
Andrew Lenharth6353e052006-12-08 18:07:09 +0000365} YYSTYPE;
366/* Line 1275 of yacc.c. */
367#line 368 "llvmAsmParser.tab.h"
Reid Spencer3822ff52006-11-08 06:47:33 +0000368# define yystype YYSTYPE /* obsolescent; will be withdrawn */
369# define YYSTYPE_IS_DECLARED 1
370# define YYSTYPE_IS_TRIVIAL 1
371#endif
Reid Spencer68a24bd2005-08-27 18:50:39 +0000372
373extern YYSTYPE llvmAsmlval;
Reid Spencer3822ff52006-11-08 06:47:33 +0000374
Andrew Lenharth6353e052006-12-08 18:07:09 +0000375
376