Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1 | /* 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 { |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 32 | VOID = 258, |
| 33 | BOOL = 259, |
| 34 | SBYTE = 260, |
| 35 | UBYTE = 261, |
| 36 | SHORT = 262, |
| 37 | USHORT = 263, |
| 38 | INT = 264, |
| 39 | UINT = 265, |
| 40 | LONG = 266, |
| 41 | ULONG = 267, |
| 42 | FLOAT = 268, |
| 43 | DOUBLE = 269, |
| 44 | LABEL = 270, |
| 45 | OPAQUE = 271, |
| 46 | ESINT64VAL = 272, |
| 47 | EUINT64VAL = 273, |
| 48 | SINTVAL = 274, |
| 49 | UINTVAL = 275, |
| 50 | FPVAL = 276, |
| 51 | NULL_TOK = 277, |
| 52 | UNDEF = 278, |
| 53 | ZEROINITIALIZER = 279, |
| 54 | TRUETOK = 280, |
| 55 | FALSETOK = 281, |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 56 | TYPE = 282, |
| 57 | VAR_ID = 283, |
| 58 | LABELSTR = 284, |
| 59 | STRINGCONSTANT = 285, |
| 60 | IMPLEMENTATION = 286, |
| 61 | BEGINTOK = 287, |
| 62 | ENDTOK = 288, |
| 63 | DECLARE = 289, |
| 64 | GLOBAL = 290, |
| 65 | CONSTANT = 291, |
| 66 | SECTION = 292, |
| 67 | VOLATILE = 293, |
| 68 | TO = 294, |
| 69 | DOTDOTDOT = 295, |
| 70 | CONST = 296, |
| 71 | INTERNAL = 297, |
| 72 | LINKONCE = 298, |
| 73 | WEAK = 299, |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 74 | DLLIMPORT = 300, |
| 75 | DLLEXPORT = 301, |
| 76 | EXTERN_WEAK = 302, |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 77 | APPENDING = 303, |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 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, |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 87 | UNINITIALIZED = 313, |
| 88 | DEPLIBS = 314, |
| 89 | CALL = 315, |
| 90 | TAIL = 316, |
| 91 | ASM_TOK = 317, |
| 92 | MODULE = 318, |
| 93 | SIDEEFFECT = 319, |
| 94 | CC_TOK = 320, |
| 95 | CCC_TOK = 321, |
| 96 | CSRETCC_TOK = 322, |
| 97 | FASTCC_TOK = 323, |
| 98 | COLDCC_TOK = 324, |
| 99 | X86_STDCALLCC_TOK = 325, |
| 100 | X86_FASTCALLCC_TOK = 326, |
| 101 | DATALAYOUT = 327, |
| 102 | RET = 328, |
| 103 | BR = 329, |
| 104 | SWITCH = 330, |
| 105 | INVOKE = 331, |
| 106 | EXCEPT = 332, |
| 107 | UNWIND = 333, |
| 108 | UNREACHABLE = 334, |
| 109 | ADD = 335, |
| 110 | SUB = 336, |
| 111 | MUL = 337, |
| 112 | DIV = 338, |
| 113 | UDIV = 339, |
| 114 | SDIV = 340, |
| 115 | FDIV = 341, |
| 116 | REM = 342, |
| 117 | UREM = 343, |
| 118 | SREM = 344, |
| 119 | FREM = 345, |
| 120 | AND = 346, |
| 121 | OR = 347, |
| 122 | XOR = 348, |
| 123 | SETLE = 349, |
| 124 | SETGE = 350, |
| 125 | SETLT = 351, |
| 126 | SETGT = 352, |
| 127 | SETEQ = 353, |
| 128 | SETNE = 354, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 129 | ICMP = 355, |
| 130 | FCMP = 356, |
| 131 | EQ = 357, |
| 132 | NE = 358, |
| 133 | SLT = 359, |
| 134 | SGT = 360, |
| 135 | SLE = 361, |
| 136 | SGE = 362, |
| 137 | OEQ = 363, |
| 138 | ONE = 364, |
| 139 | OLT = 365, |
| 140 | OGT = 366, |
| 141 | OLE = 367, |
| 142 | OGE = 368, |
| 143 | ORD = 369, |
| 144 | UNO = 370, |
| 145 | UEQ = 371, |
| 146 | UNE = 372, |
| 147 | ULT = 373, |
| 148 | UGT = 374, |
| 149 | ULE = 375, |
| 150 | UGE = 376, |
| 151 | MALLOC = 377, |
| 152 | ALLOCA = 378, |
| 153 | FREE = 379, |
| 154 | LOAD = 380, |
| 155 | STORE = 381, |
| 156 | GETELEMENTPTR = 382, |
| 157 | PHI_TOK = 383, |
| 158 | SELECT = 384, |
| 159 | SHL = 385, |
| 160 | SHR = 386, |
| 161 | ASHR = 387, |
| 162 | LSHR = 388, |
| 163 | VAARG = 389, |
| 164 | EXTRACTELEMENT = 390, |
| 165 | INSERTELEMENT = 391, |
| 166 | SHUFFLEVECTOR = 392, |
| 167 | CAST = 393, |
| 168 | TRUNC = 394, |
| 169 | ZEXT = 395, |
| 170 | SEXT = 396, |
| 171 | FPTRUNC = 397, |
| 172 | FPEXT = 398, |
| 173 | FPTOUI = 399, |
| 174 | FPTOSI = 400, |
| 175 | UITOFP = 401, |
| 176 | SITOFP = 402, |
| 177 | PTRTOINT = 403, |
| 178 | INTTOPTR = 404, |
| 179 | BITCAST = 405 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 180 | }; |
| 181 | #endif |
| 182 | /* Tokens. */ |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 183 | #define VOID 258 |
| 184 | #define BOOL 259 |
| 185 | #define SBYTE 260 |
| 186 | #define UBYTE 261 |
| 187 | #define SHORT 262 |
| 188 | #define USHORT 263 |
| 189 | #define INT 264 |
| 190 | #define UINT 265 |
| 191 | #define LONG 266 |
| 192 | #define ULONG 267 |
| 193 | #define FLOAT 268 |
| 194 | #define DOUBLE 269 |
| 195 | #define LABEL 270 |
| 196 | #define OPAQUE 271 |
| 197 | #define ESINT64VAL 272 |
| 198 | #define EUINT64VAL 273 |
| 199 | #define SINTVAL 274 |
| 200 | #define UINTVAL 275 |
| 201 | #define FPVAL 276 |
| 202 | #define NULL_TOK 277 |
| 203 | #define UNDEF 278 |
| 204 | #define ZEROINITIALIZER 279 |
| 205 | #define TRUETOK 280 |
| 206 | #define FALSETOK 281 |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 207 | #define TYPE 282 |
| 208 | #define VAR_ID 283 |
| 209 | #define LABELSTR 284 |
| 210 | #define STRINGCONSTANT 285 |
| 211 | #define IMPLEMENTATION 286 |
| 212 | #define BEGINTOK 287 |
| 213 | #define ENDTOK 288 |
| 214 | #define DECLARE 289 |
| 215 | #define GLOBAL 290 |
| 216 | #define CONSTANT 291 |
| 217 | #define SECTION 292 |
| 218 | #define VOLATILE 293 |
| 219 | #define TO 294 |
| 220 | #define DOTDOTDOT 295 |
| 221 | #define CONST 296 |
| 222 | #define INTERNAL 297 |
| 223 | #define LINKONCE 298 |
| 224 | #define WEAK 299 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 225 | #define DLLIMPORT 300 |
| 226 | #define DLLEXPORT 301 |
| 227 | #define EXTERN_WEAK 302 |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 228 | #define APPENDING 303 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 229 | #define NOT 304 |
| 230 | #define EXTERNAL 305 |
| 231 | #define TARGET 306 |
| 232 | #define TRIPLE 307 |
| 233 | #define ENDIAN 308 |
| 234 | #define POINTERSIZE 309 |
| 235 | #define LITTLE 310 |
| 236 | #define BIG 311 |
| 237 | #define ALIGN 312 |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 238 | #define UNINITIALIZED 313 |
| 239 | #define DEPLIBS 314 |
| 240 | #define CALL 315 |
| 241 | #define TAIL 316 |
| 242 | #define ASM_TOK 317 |
| 243 | #define MODULE 318 |
| 244 | #define SIDEEFFECT 319 |
| 245 | #define CC_TOK 320 |
| 246 | #define CCC_TOK 321 |
| 247 | #define CSRETCC_TOK 322 |
| 248 | #define FASTCC_TOK 323 |
| 249 | #define COLDCC_TOK 324 |
| 250 | #define X86_STDCALLCC_TOK 325 |
| 251 | #define X86_FASTCALLCC_TOK 326 |
| 252 | #define DATALAYOUT 327 |
| 253 | #define RET 328 |
| 254 | #define BR 329 |
| 255 | #define SWITCH 330 |
| 256 | #define INVOKE 331 |
| 257 | #define EXCEPT 332 |
| 258 | #define UNWIND 333 |
| 259 | #define UNREACHABLE 334 |
| 260 | #define ADD 335 |
| 261 | #define SUB 336 |
| 262 | #define MUL 337 |
| 263 | #define DIV 338 |
| 264 | #define UDIV 339 |
| 265 | #define SDIV 340 |
| 266 | #define FDIV 341 |
| 267 | #define REM 342 |
| 268 | #define UREM 343 |
| 269 | #define SREM 344 |
| 270 | #define FREM 345 |
| 271 | #define AND 346 |
| 272 | #define OR 347 |
| 273 | #define XOR 348 |
| 274 | #define SETLE 349 |
| 275 | #define SETGE 350 |
| 276 | #define SETLT 351 |
| 277 | #define SETGT 352 |
| 278 | #define SETEQ 353 |
| 279 | #define SETNE 354 |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 280 | #define ICMP 355 |
| 281 | #define FCMP 356 |
| 282 | #define EQ 357 |
| 283 | #define NE 358 |
| 284 | #define SLT 359 |
| 285 | #define SGT 360 |
| 286 | #define SLE 361 |
| 287 | #define SGE 362 |
| 288 | #define OEQ 363 |
| 289 | #define ONE 364 |
| 290 | #define OLT 365 |
| 291 | #define OGT 366 |
| 292 | #define OLE 367 |
| 293 | #define OGE 368 |
| 294 | #define ORD 369 |
| 295 | #define UNO 370 |
| 296 | #define UEQ 371 |
| 297 | #define UNE 372 |
| 298 | #define ULT 373 |
| 299 | #define UGT 374 |
| 300 | #define ULE 375 |
| 301 | #define UGE 376 |
| 302 | #define MALLOC 377 |
| 303 | #define ALLOCA 378 |
| 304 | #define FREE 379 |
| 305 | #define LOAD 380 |
| 306 | #define STORE 381 |
| 307 | #define GETELEMENTPTR 382 |
| 308 | #define PHI_TOK 383 |
| 309 | #define SELECT 384 |
| 310 | #define SHL 385 |
| 311 | #define SHR 386 |
| 312 | #define ASHR 387 |
| 313 | #define LSHR 388 |
| 314 | #define VAARG 389 |
| 315 | #define EXTRACTELEMENT 390 |
| 316 | #define INSERTELEMENT 391 |
| 317 | #define SHUFFLEVECTOR 392 |
| 318 | #define CAST 393 |
| 319 | #define TRUNC 394 |
| 320 | #define ZEXT 395 |
| 321 | #define SEXT 396 |
| 322 | #define FPTRUNC 397 |
| 323 | #define FPEXT 398 |
| 324 | #define FPTOUI 399 |
| 325 | #define FPTOSI 400 |
| 326 | #define UITOFP 401 |
| 327 | #define SITOFP 402 |
| 328 | #define PTRTOINT 403 |
| 329 | #define INTTOPTR 404 |
| 330 | #define BITCAST 405 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 331 | |
| 332 | |
| 333 | |
| 334 | |
| 335 | #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) |
Reid Spencer | e4d87aa | 2006-12-23 06:05:41 +0000 | [diff] [blame] | 336 | #line 275 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 337 | typedef union YYSTYPE { |
| 338 | std::string* String; |
| 339 | TypeInfo Type; |
| 340 | ValueInfo Value; |
| 341 | ConstInfo Const; |
Reid Spencer | f848365 | 2006-12-02 15:16:01 +0000 | [diff] [blame] | 342 | ValueList* ValList; |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 343 | } YYSTYPE; |
| 344 | /* Line 1447 of yacc.c. */ |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame] | 345 | #line 346 "UpgradeParser.tab.h" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 346 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
| 347 | # define YYSTYPE_IS_DECLARED 1 |
| 348 | # define YYSTYPE_IS_TRIVIAL 1 |
| 349 | #endif |
| 350 | |
| 351 | extern YYSTYPE Upgradelval; |
| 352 | |
| 353 | |
| 354 | |