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