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 | /* Written by Richard Stallman by simplifying the original so called |
| 27 | ``semantic'' parser. */ |
| 28 | |
| 29 | /* All symbols defined below should begin with yy or YY, to avoid |
| 30 | infringing on user name space. This should be done even for local |
| 31 | variables, as they might otherwise be expanded by user macros. |
| 32 | There are some unavoidable exceptions within include files to |
| 33 | define necessary library symbols; they are noted "INFRINGES ON |
| 34 | USER NAME SPACE" below. */ |
| 35 | |
| 36 | /* Identify Bison output. */ |
| 37 | #define YYBISON 1 |
| 38 | |
| 39 | /* Bison version. */ |
| 40 | #define YYBISON_VERSION "2.1" |
| 41 | |
| 42 | /* Skeleton name. */ |
| 43 | #define YYSKELETON_NAME "yacc.c" |
| 44 | |
| 45 | /* Pure parsers. */ |
| 46 | #define YYPURE 0 |
| 47 | |
| 48 | /* Using locations. */ |
| 49 | #define YYLSP_NEEDED 0 |
| 50 | |
| 51 | /* Substitute the variable and function names. */ |
| 52 | #define yyparse Upgradeparse |
| 53 | #define yylex Upgradelex |
| 54 | #define yyerror Upgradeerror |
| 55 | #define yylval Upgradelval |
| 56 | #define yychar Upgradechar |
| 57 | #define yydebug Upgradedebug |
| 58 | #define yynerrs Upgradenerrs |
| 59 | |
| 60 | |
| 61 | /* Tokens. */ |
| 62 | #ifndef YYTOKENTYPE |
| 63 | # define YYTOKENTYPE |
| 64 | /* Put the tokens into the symbol table, so that GDB and other debuggers |
| 65 | know about them. */ |
| 66 | enum yytokentype { |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 67 | VOID = 258, |
| 68 | BOOL = 259, |
| 69 | SBYTE = 260, |
| 70 | UBYTE = 261, |
| 71 | SHORT = 262, |
| 72 | USHORT = 263, |
| 73 | INT = 264, |
| 74 | UINT = 265, |
| 75 | LONG = 266, |
| 76 | ULONG = 267, |
| 77 | FLOAT = 268, |
| 78 | DOUBLE = 269, |
| 79 | LABEL = 270, |
| 80 | OPAQUE = 271, |
| 81 | ESINT64VAL = 272, |
| 82 | EUINT64VAL = 273, |
| 83 | SINTVAL = 274, |
| 84 | UINTVAL = 275, |
| 85 | FPVAL = 276, |
| 86 | NULL_TOK = 277, |
| 87 | UNDEF = 278, |
| 88 | ZEROINITIALIZER = 279, |
| 89 | TRUETOK = 280, |
| 90 | FALSETOK = 281, |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 91 | TYPE = 282, |
| 92 | VAR_ID = 283, |
| 93 | LABELSTR = 284, |
| 94 | STRINGCONSTANT = 285, |
| 95 | IMPLEMENTATION = 286, |
| 96 | BEGINTOK = 287, |
| 97 | ENDTOK = 288, |
| 98 | DECLARE = 289, |
| 99 | GLOBAL = 290, |
| 100 | CONSTANT = 291, |
| 101 | SECTION = 292, |
| 102 | VOLATILE = 293, |
| 103 | TO = 294, |
| 104 | DOTDOTDOT = 295, |
| 105 | CONST = 296, |
| 106 | INTERNAL = 297, |
| 107 | LINKONCE = 298, |
| 108 | WEAK = 299, |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 109 | DLLIMPORT = 300, |
| 110 | DLLEXPORT = 301, |
| 111 | EXTERN_WEAK = 302, |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 112 | APPENDING = 303, |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 113 | NOT = 304, |
| 114 | EXTERNAL = 305, |
| 115 | TARGET = 306, |
| 116 | TRIPLE = 307, |
| 117 | ENDIAN = 308, |
| 118 | POINTERSIZE = 309, |
| 119 | LITTLE = 310, |
| 120 | BIG = 311, |
| 121 | ALIGN = 312, |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 122 | UNINITIALIZED = 313, |
| 123 | DEPLIBS = 314, |
| 124 | CALL = 315, |
| 125 | TAIL = 316, |
| 126 | ASM_TOK = 317, |
| 127 | MODULE = 318, |
| 128 | SIDEEFFECT = 319, |
| 129 | CC_TOK = 320, |
| 130 | CCC_TOK = 321, |
| 131 | CSRETCC_TOK = 322, |
| 132 | FASTCC_TOK = 323, |
| 133 | COLDCC_TOK = 324, |
| 134 | X86_STDCALLCC_TOK = 325, |
| 135 | X86_FASTCALLCC_TOK = 326, |
| 136 | DATALAYOUT = 327, |
| 137 | RET = 328, |
| 138 | BR = 329, |
| 139 | SWITCH = 330, |
| 140 | INVOKE = 331, |
| 141 | EXCEPT = 332, |
| 142 | UNWIND = 333, |
| 143 | UNREACHABLE = 334, |
| 144 | ADD = 335, |
| 145 | SUB = 336, |
| 146 | MUL = 337, |
| 147 | DIV = 338, |
| 148 | UDIV = 339, |
| 149 | SDIV = 340, |
| 150 | FDIV = 341, |
| 151 | REM = 342, |
| 152 | UREM = 343, |
| 153 | SREM = 344, |
| 154 | FREM = 345, |
| 155 | AND = 346, |
| 156 | OR = 347, |
| 157 | XOR = 348, |
| 158 | SETLE = 349, |
| 159 | SETGE = 350, |
| 160 | SETLT = 351, |
| 161 | SETGT = 352, |
| 162 | SETEQ = 353, |
| 163 | SETNE = 354, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 164 | ICMP = 355, |
| 165 | FCMP = 356, |
| 166 | EQ = 357, |
| 167 | NE = 358, |
| 168 | SLT = 359, |
| 169 | SGT = 360, |
| 170 | SLE = 361, |
| 171 | SGE = 362, |
| 172 | OEQ = 363, |
| 173 | ONE = 364, |
| 174 | OLT = 365, |
| 175 | OGT = 366, |
| 176 | OLE = 367, |
| 177 | OGE = 368, |
| 178 | ORD = 369, |
| 179 | UNO = 370, |
| 180 | UEQ = 371, |
| 181 | UNE = 372, |
| 182 | ULT = 373, |
| 183 | UGT = 374, |
| 184 | ULE = 375, |
| 185 | UGE = 376, |
| 186 | MALLOC = 377, |
| 187 | ALLOCA = 378, |
| 188 | FREE = 379, |
| 189 | LOAD = 380, |
| 190 | STORE = 381, |
| 191 | GETELEMENTPTR = 382, |
| 192 | PHI_TOK = 383, |
| 193 | SELECT = 384, |
| 194 | SHL = 385, |
| 195 | SHR = 386, |
| 196 | ASHR = 387, |
| 197 | LSHR = 388, |
| 198 | VAARG = 389, |
| 199 | EXTRACTELEMENT = 390, |
| 200 | INSERTELEMENT = 391, |
| 201 | SHUFFLEVECTOR = 392, |
| 202 | CAST = 393, |
| 203 | TRUNC = 394, |
| 204 | ZEXT = 395, |
| 205 | SEXT = 396, |
| 206 | FPTRUNC = 397, |
| 207 | FPEXT = 398, |
| 208 | FPTOUI = 399, |
| 209 | FPTOSI = 400, |
| 210 | UITOFP = 401, |
| 211 | SITOFP = 402, |
| 212 | PTRTOINT = 403, |
| 213 | INTTOPTR = 404, |
| 214 | BITCAST = 405 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 215 | }; |
| 216 | #endif |
| 217 | /* Tokens. */ |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 218 | #define VOID 258 |
| 219 | #define BOOL 259 |
| 220 | #define SBYTE 260 |
| 221 | #define UBYTE 261 |
| 222 | #define SHORT 262 |
| 223 | #define USHORT 263 |
| 224 | #define INT 264 |
| 225 | #define UINT 265 |
| 226 | #define LONG 266 |
| 227 | #define ULONG 267 |
| 228 | #define FLOAT 268 |
| 229 | #define DOUBLE 269 |
| 230 | #define LABEL 270 |
| 231 | #define OPAQUE 271 |
| 232 | #define ESINT64VAL 272 |
| 233 | #define EUINT64VAL 273 |
| 234 | #define SINTVAL 274 |
| 235 | #define UINTVAL 275 |
| 236 | #define FPVAL 276 |
| 237 | #define NULL_TOK 277 |
| 238 | #define UNDEF 278 |
| 239 | #define ZEROINITIALIZER 279 |
| 240 | #define TRUETOK 280 |
| 241 | #define FALSETOK 281 |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 242 | #define TYPE 282 |
| 243 | #define VAR_ID 283 |
| 244 | #define LABELSTR 284 |
| 245 | #define STRINGCONSTANT 285 |
| 246 | #define IMPLEMENTATION 286 |
| 247 | #define BEGINTOK 287 |
| 248 | #define ENDTOK 288 |
| 249 | #define DECLARE 289 |
| 250 | #define GLOBAL 290 |
| 251 | #define CONSTANT 291 |
| 252 | #define SECTION 292 |
| 253 | #define VOLATILE 293 |
| 254 | #define TO 294 |
| 255 | #define DOTDOTDOT 295 |
| 256 | #define CONST 296 |
| 257 | #define INTERNAL 297 |
| 258 | #define LINKONCE 298 |
| 259 | #define WEAK 299 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 260 | #define DLLIMPORT 300 |
| 261 | #define DLLEXPORT 301 |
| 262 | #define EXTERN_WEAK 302 |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 263 | #define APPENDING 303 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 264 | #define NOT 304 |
| 265 | #define EXTERNAL 305 |
| 266 | #define TARGET 306 |
| 267 | #define TRIPLE 307 |
| 268 | #define ENDIAN 308 |
| 269 | #define POINTERSIZE 309 |
| 270 | #define LITTLE 310 |
| 271 | #define BIG 311 |
| 272 | #define ALIGN 312 |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 273 | #define UNINITIALIZED 313 |
| 274 | #define DEPLIBS 314 |
| 275 | #define CALL 315 |
| 276 | #define TAIL 316 |
| 277 | #define ASM_TOK 317 |
| 278 | #define MODULE 318 |
| 279 | #define SIDEEFFECT 319 |
| 280 | #define CC_TOK 320 |
| 281 | #define CCC_TOK 321 |
| 282 | #define CSRETCC_TOK 322 |
| 283 | #define FASTCC_TOK 323 |
| 284 | #define COLDCC_TOK 324 |
| 285 | #define X86_STDCALLCC_TOK 325 |
| 286 | #define X86_FASTCALLCC_TOK 326 |
| 287 | #define DATALAYOUT 327 |
| 288 | #define RET 328 |
| 289 | #define BR 329 |
| 290 | #define SWITCH 330 |
| 291 | #define INVOKE 331 |
| 292 | #define EXCEPT 332 |
| 293 | #define UNWIND 333 |
| 294 | #define UNREACHABLE 334 |
| 295 | #define ADD 335 |
| 296 | #define SUB 336 |
| 297 | #define MUL 337 |
| 298 | #define DIV 338 |
| 299 | #define UDIV 339 |
| 300 | #define SDIV 340 |
| 301 | #define FDIV 341 |
| 302 | #define REM 342 |
| 303 | #define UREM 343 |
| 304 | #define SREM 344 |
| 305 | #define FREM 345 |
| 306 | #define AND 346 |
| 307 | #define OR 347 |
| 308 | #define XOR 348 |
| 309 | #define SETLE 349 |
| 310 | #define SETGE 350 |
| 311 | #define SETLT 351 |
| 312 | #define SETGT 352 |
| 313 | #define SETEQ 353 |
| 314 | #define SETNE 354 |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 315 | #define ICMP 355 |
| 316 | #define FCMP 356 |
| 317 | #define EQ 357 |
| 318 | #define NE 358 |
| 319 | #define SLT 359 |
| 320 | #define SGT 360 |
| 321 | #define SLE 361 |
| 322 | #define SGE 362 |
| 323 | #define OEQ 363 |
| 324 | #define ONE 364 |
| 325 | #define OLT 365 |
| 326 | #define OGT 366 |
| 327 | #define OLE 367 |
| 328 | #define OGE 368 |
| 329 | #define ORD 369 |
| 330 | #define UNO 370 |
| 331 | #define UEQ 371 |
| 332 | #define UNE 372 |
| 333 | #define ULT 373 |
| 334 | #define UGT 374 |
| 335 | #define ULE 375 |
| 336 | #define UGE 376 |
| 337 | #define MALLOC 377 |
| 338 | #define ALLOCA 378 |
| 339 | #define FREE 379 |
| 340 | #define LOAD 380 |
| 341 | #define STORE 381 |
| 342 | #define GETELEMENTPTR 382 |
| 343 | #define PHI_TOK 383 |
| 344 | #define SELECT 384 |
| 345 | #define SHL 385 |
| 346 | #define SHR 386 |
| 347 | #define ASHR 387 |
| 348 | #define LSHR 388 |
| 349 | #define VAARG 389 |
| 350 | #define EXTRACTELEMENT 390 |
| 351 | #define INSERTELEMENT 391 |
| 352 | #define SHUFFLEVECTOR 392 |
| 353 | #define CAST 393 |
| 354 | #define TRUNC 394 |
| 355 | #define ZEXT 395 |
| 356 | #define SEXT 396 |
| 357 | #define FPTRUNC 397 |
| 358 | #define FPEXT 398 |
| 359 | #define FPTOUI 399 |
| 360 | #define FPTOSI 400 |
| 361 | #define UITOFP 401 |
| 362 | #define SITOFP 402 |
| 363 | #define PTRTOINT 403 |
| 364 | #define INTTOPTR 404 |
| 365 | #define BITCAST 405 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 366 | |
| 367 | |
| 368 | |
| 369 | |
| 370 | /* Copy the first part of user declarations. */ |
| 371 | #line 14 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
| 372 | |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 373 | #include "ParserInternals.h" |
| 374 | #include <llvm/ADT/StringExtras.h> |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 375 | #include <algorithm> |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 376 | #include <map> |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 377 | #include <utility> |
| 378 | #include <iostream> |
| 379 | |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 380 | #define YYERROR_VERBOSE 1 |
Reid Spencer | 96839be | 2006-11-30 16:50:26 +0000 | [diff] [blame] | 381 | #define YYINCLUDED_STDLIB_H |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 382 | #define YYDEBUG 1 |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 383 | #define UPGRADE_SETCOND_OPS 1 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 384 | |
| 385 | int yylex(); // declaration" of xxx warnings. |
| 386 | int yyparse(); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 387 | extern int yydebug; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 388 | |
| 389 | static std::string CurFilename; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 390 | static std::ostream *O = 0; |
Reid Spencer | 96839be | 2006-11-30 16:50:26 +0000 | [diff] [blame] | 391 | std::istream* LexInput = 0; |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 392 | unsigned SizeOfPointer = 32; |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 393 | static uint64_t unique = 1; |
Reid Spencer | 96839be | 2006-11-30 16:50:26 +0000 | [diff] [blame] | 394 | |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 395 | typedef std::vector<TypeInfo> TypeVector; |
| 396 | static TypeVector EnumeratedTypes; |
| 397 | typedef std::map<std::string,TypeInfo> TypeMap; |
| 398 | static TypeMap NamedTypes; |
| 399 | |
Reid Spencer | f848365 | 2006-12-02 15:16:01 +0000 | [diff] [blame] | 400 | void destroy(ValueList* VL) { |
| 401 | while (!VL->empty()) { |
| 402 | ValueInfo& VI = VL->back(); |
| 403 | VI.destroy(); |
| 404 | VL->pop_back(); |
| 405 | } |
| 406 | delete VL; |
| 407 | } |
| 408 | |
Reid Spencer | 96839be | 2006-11-30 16:50:26 +0000 | [diff] [blame] | 409 | void UpgradeAssembly(const std::string &infile, std::istream& in, |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 410 | std::ostream &out, bool debug) |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 411 | { |
| 412 | Upgradelineno = 1; |
| 413 | CurFilename = infile; |
Reid Spencer | 96839be | 2006-11-30 16:50:26 +0000 | [diff] [blame] | 414 | LexInput = ∈ |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 415 | yydebug = debug; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 416 | O = &out; |
| 417 | |
| 418 | if (yyparse()) { |
| 419 | std::cerr << "Parse failed.\n"; |
| 420 | exit(1); |
| 421 | } |
| 422 | } |
| 423 | |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 424 | static void ResolveType(TypeInfo& Ty) { |
| 425 | if (Ty.oldTy == UnresolvedTy) { |
| 426 | TypeMap::iterator I = NamedTypes.find(*Ty.newTy); |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 427 | if (I != NamedTypes.end()) { |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 428 | Ty.oldTy = I->second.oldTy; |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 429 | Ty.elemTy = I->second.elemTy; |
| 430 | } else { |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 431 | std::string msg("Can't resolve type: "); |
| 432 | msg += *Ty.newTy; |
| 433 | yyerror(msg.c_str()); |
Reid Spencer | 280d801 | 2006-12-01 23:40:53 +0000 | [diff] [blame] | 434 | } |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 435 | } else if (Ty.oldTy == NumericTy) { |
| 436 | unsigned ref = atoi(&((Ty.newTy->c_str())[1])); // Skip the '\\' |
| 437 | if (ref < EnumeratedTypes.size()) { |
| 438 | Ty.oldTy = EnumeratedTypes[ref].oldTy; |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 439 | Ty.elemTy = EnumeratedTypes[ref].elemTy; |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 440 | } else { |
| 441 | std::string msg("Can't resolve type: "); |
| 442 | msg += *Ty.newTy; |
| 443 | yyerror(msg.c_str()); |
| 444 | } |
Reid Spencer | 280d801 | 2006-12-01 23:40:53 +0000 | [diff] [blame] | 445 | } |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 446 | // otherwise its already resolved. |
Reid Spencer | 280d801 | 2006-12-01 23:40:53 +0000 | [diff] [blame] | 447 | } |
| 448 | |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 449 | static const char* getCastOpcode( |
| 450 | std::string& Source, const TypeInfo& SrcTy, const TypeInfo& DstTy) |
| 451 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 452 | unsigned SrcBits = SrcTy.getBitWidth(); |
| 453 | unsigned DstBits = DstTy.getBitWidth(); |
| 454 | const char* opcode = "bitcast"; |
| 455 | // Run through the possibilities ... |
| 456 | if (DstTy.isIntegral()) { // Casting to integral |
| 457 | if (SrcTy.isIntegral()) { // Casting from integral |
| 458 | if (DstBits < SrcBits) |
| 459 | opcode = "trunc"; |
| 460 | else if (DstBits > SrcBits) { // its an extension |
| 461 | if (SrcTy.isSigned()) |
| 462 | opcode ="sext"; // signed -> SEXT |
| 463 | else |
| 464 | opcode = "zext"; // unsigned -> ZEXT |
| 465 | } else { |
| 466 | opcode = "bitcast"; // Same size, No-op cast |
| 467 | } |
| 468 | } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt |
| 469 | if (DstTy.isSigned()) |
| 470 | opcode = "fptosi"; // FP -> sint |
| 471 | else |
| 472 | opcode = "fptoui"; // FP -> uint |
| 473 | } else if (SrcTy.isPacked()) { |
| 474 | assert(DstBits == SrcTy.getBitWidth() && |
| 475 | "Casting packed to integer of different width"); |
| 476 | opcode = "bitcast"; // same size, no-op cast |
| 477 | } else { |
| 478 | assert(SrcTy.isPointer() && |
| 479 | "Casting from a value that is not first-class type"); |
| 480 | opcode = "ptrtoint"; // ptr -> int |
| 481 | } |
| 482 | } else if (DstTy.isFloatingPoint()) { // Casting to floating pt |
| 483 | if (SrcTy.isIntegral()) { // Casting from integral |
| 484 | if (SrcTy.isSigned()) |
| 485 | opcode = "sitofp"; // sint -> FP |
| 486 | else |
| 487 | opcode = "uitofp"; // uint -> FP |
| 488 | } else if (SrcTy.isFloatingPoint()) { // Casting from floating pt |
| 489 | if (DstBits < SrcBits) { |
| 490 | opcode = "fptrunc"; // FP -> smaller FP |
| 491 | } else if (DstBits > SrcBits) { |
| 492 | opcode = "fpext"; // FP -> larger FP |
| 493 | } else { |
| 494 | opcode ="bitcast"; // same size, no-op cast |
| 495 | } |
| 496 | } else if (SrcTy.isPacked()) { |
| 497 | assert(DstBits == SrcTy.getBitWidth() && |
| 498 | "Casting packed to floating point of different width"); |
| 499 | opcode = "bitcast"; // same size, no-op cast |
| 500 | } else { |
| 501 | assert(0 && "Casting pointer or non-first class to float"); |
| 502 | } |
| 503 | } else if (DstTy.isPacked()) { |
| 504 | if (SrcTy.isPacked()) { |
| 505 | assert(DstTy.getBitWidth() == SrcTy.getBitWidth() && |
| 506 | "Casting packed to packed of different widths"); |
| 507 | opcode = "bitcast"; // packed -> packed |
| 508 | } else if (DstTy.getBitWidth() == SrcBits) { |
| 509 | opcode = "bitcast"; // float/int -> packed |
| 510 | } else { |
| 511 | assert(!"Illegal cast to packed (wrong type or size)"); |
| 512 | } |
| 513 | } else if (DstTy.isPointer()) { |
| 514 | if (SrcTy.isPointer()) { |
| 515 | opcode = "bitcast"; // ptr -> ptr |
| 516 | } else if (SrcTy.isIntegral()) { |
| 517 | opcode = "inttoptr"; // int -> ptr |
| 518 | } else { |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 519 | assert(!"Casting invalid type to pointer"); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 520 | } |
| 521 | } else { |
| 522 | assert(!"Casting to type that is not first-class"); |
| 523 | } |
| 524 | return opcode; |
| 525 | } |
| 526 | |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 527 | static std::string getCastUpgrade( |
| 528 | const std::string& Src, TypeInfo& SrcTy, TypeInfo& DstTy, bool isConst) |
| 529 | { |
| 530 | std::string Result; |
| 531 | std::string Source = Src; |
| 532 | if (SrcTy.isFloatingPoint() && DstTy.isPointer()) { |
| 533 | // fp -> ptr cast is no longer supported but we must upgrade this |
| 534 | // by doing a double cast: fp -> int -> ptr |
| 535 | if (isConst) |
| 536 | Source = "ulong fptoui(" + Source + " to ulong)"; |
| 537 | else { |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 538 | *O << " %cast_upgrade" << unique << " = fptoui " << Source |
| 539 | << " to ulong\n"; |
| 540 | Source = "ulong %cast_upgrade" + llvm::utostr(unique); |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 541 | } |
| 542 | // Update the SrcTy for the getCastOpcode call below |
| 543 | SrcTy.destroy(); |
| 544 | SrcTy.newTy = new std::string("ulong"); |
| 545 | SrcTy.oldTy = ULongTy; |
| 546 | } else if (DstTy.oldTy == BoolTy) { |
| 547 | // cast ptr %x to bool was previously defined as setne ptr %x, null |
| 548 | // The ptrtoint semantic is to truncate, not compare so we must retain |
| 549 | // the original intent by replace the cast with a setne |
| 550 | const char* comparator = SrcTy.isPointer() ? ", null" : |
| 551 | (SrcTy.isFloatingPoint() ? ", 0.0" : ", 0"); |
| 552 | if (isConst) |
| 553 | Result = "setne (" + Source + comparator + ")"; |
| 554 | else |
| 555 | Result = "setne " + Source + comparator; |
| 556 | return Result; // skip cast processing below |
| 557 | } |
| 558 | ResolveType(SrcTy); |
| 559 | ResolveType(DstTy); |
| 560 | std::string Opcode(getCastOpcode(Source, SrcTy, DstTy)); |
| 561 | if (isConst) |
| 562 | Result += Opcode + "( " + Source + " to " + *DstTy.newTy + ")"; |
| 563 | else |
| 564 | Result += Opcode + " " + Source + " to " + *DstTy.newTy; |
| 565 | return Result; |
| 566 | } |
| 567 | |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 568 | const char* getDivRemOpcode(const std::string& opcode, const TypeInfo& TI) { |
| 569 | const char* op = opcode.c_str(); |
| 570 | TypeInfo Ty = TI; |
| 571 | ResolveType(Ty); |
| 572 | if (Ty.isPacked()) |
| 573 | Ty.oldTy = Ty.getElementType(); |
| 574 | if (opcode == "div") |
| 575 | if (Ty.isFloatingPoint()) |
| 576 | op = "fdiv"; |
| 577 | else if (Ty.isUnsigned()) |
| 578 | op = "udiv"; |
| 579 | else if (Ty.isSigned()) |
| 580 | op = "sdiv"; |
| 581 | else |
| 582 | yyerror("Invalid type for div instruction"); |
| 583 | else if (opcode == "rem") |
| 584 | if (Ty.isFloatingPoint()) |
| 585 | op = "frem"; |
| 586 | else if (Ty.isUnsigned()) |
| 587 | op = "urem"; |
| 588 | else if (Ty.isSigned()) |
| 589 | op = "srem"; |
| 590 | else |
| 591 | yyerror("Invalid type for rem instruction"); |
| 592 | return op; |
| 593 | } |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 594 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 595 | std::string |
| 596 | getCompareOp(const std::string& setcc, const TypeInfo& TI) { |
| 597 | assert(setcc.length() == 5); |
| 598 | char cc1 = setcc[3]; |
| 599 | char cc2 = setcc[4]; |
| 600 | assert(cc1 == 'e' || cc1 == 'n' || cc1 == 'l' || cc1 == 'g'); |
| 601 | assert(cc2 == 'q' || cc2 == 'e' || cc2 == 'e' || cc2 == 't'); |
| 602 | std::string result("xcmp xxx"); |
| 603 | result[6] = cc1; |
| 604 | result[7] = cc2; |
| 605 | if (TI.isFloatingPoint()) { |
| 606 | result[0] = 'f'; |
| 607 | result[5] = 'o'; // FIXME: Always map to ordered comparison ? |
| 608 | } else if (TI.isIntegral() || TI.isPointer()) { |
| 609 | result[0] = 'i'; |
| 610 | if ((cc1 == 'e' && cc2 == 'q') || (cc1 == 'n' && cc2 == 'e')) |
| 611 | result.erase(5,1); |
| 612 | else if (TI.isSigned()) |
| 613 | result[5] = 's'; |
| 614 | else if (TI.isUnsigned() || TI.isPointer()) |
| 615 | result[5] = 'u'; |
| 616 | else |
| 617 | yyerror("Invalid integral type for setcc"); |
| 618 | } |
| 619 | return result; |
| 620 | } |
| 621 | |
| 622 | |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 623 | |
| 624 | /* Enabling traces. */ |
| 625 | #ifndef YYDEBUG |
| 626 | # define YYDEBUG 0 |
| 627 | #endif |
| 628 | |
| 629 | /* Enabling verbose error messages. */ |
| 630 | #ifdef YYERROR_VERBOSE |
| 631 | # undef YYERROR_VERBOSE |
| 632 | # define YYERROR_VERBOSE 1 |
| 633 | #else |
| 634 | # define YYERROR_VERBOSE 0 |
| 635 | #endif |
| 636 | |
| 637 | /* Enabling the token table. */ |
| 638 | #ifndef YYTOKEN_TABLE |
| 639 | # define YYTOKEN_TABLE 0 |
| 640 | #endif |
| 641 | |
| 642 | #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 643 | #line 268 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 644 | typedef union YYSTYPE { |
| 645 | std::string* String; |
| 646 | TypeInfo Type; |
| 647 | ValueInfo Value; |
| 648 | ConstInfo Const; |
Reid Spencer | f848365 | 2006-12-02 15:16:01 +0000 | [diff] [blame] | 649 | ValueList* ValList; |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 650 | } YYSTYPE; |
| 651 | /* Line 196 of yacc.c. */ |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 652 | #line 653 "UpgradeParser.tab.c" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 653 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
| 654 | # define YYSTYPE_IS_DECLARED 1 |
| 655 | # define YYSTYPE_IS_TRIVIAL 1 |
| 656 | #endif |
| 657 | |
| 658 | |
| 659 | |
| 660 | /* Copy the second part of user declarations. */ |
| 661 | |
| 662 | |
| 663 | /* Line 219 of yacc.c. */ |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 664 | #line 665 "UpgradeParser.tab.c" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 665 | |
| 666 | #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) |
| 667 | # define YYSIZE_T __SIZE_TYPE__ |
| 668 | #endif |
| 669 | #if ! defined (YYSIZE_T) && defined (size_t) |
| 670 | # define YYSIZE_T size_t |
| 671 | #endif |
| 672 | #if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus)) |
| 673 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
| 674 | # define YYSIZE_T size_t |
| 675 | #endif |
| 676 | #if ! defined (YYSIZE_T) |
| 677 | # define YYSIZE_T unsigned int |
| 678 | #endif |
| 679 | |
| 680 | #ifndef YY_ |
| 681 | # if YYENABLE_NLS |
| 682 | # if ENABLE_NLS |
| 683 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
| 684 | # define YY_(msgid) dgettext ("bison-runtime", msgid) |
| 685 | # endif |
| 686 | # endif |
| 687 | # ifndef YY_ |
| 688 | # define YY_(msgid) msgid |
| 689 | # endif |
| 690 | #endif |
| 691 | |
| 692 | #if ! defined (yyoverflow) || YYERROR_VERBOSE |
| 693 | |
| 694 | /* The parser invokes alloca or malloc; define the necessary symbols. */ |
| 695 | |
| 696 | # ifdef YYSTACK_USE_ALLOCA |
| 697 | # if YYSTACK_USE_ALLOCA |
| 698 | # ifdef __GNUC__ |
| 699 | # define YYSTACK_ALLOC __builtin_alloca |
| 700 | # else |
| 701 | # define YYSTACK_ALLOC alloca |
| 702 | # if defined (__STDC__) || defined (__cplusplus) |
| 703 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
| 704 | # define YYINCLUDED_STDLIB_H |
| 705 | # endif |
| 706 | # endif |
| 707 | # endif |
| 708 | # endif |
| 709 | |
| 710 | # ifdef YYSTACK_ALLOC |
| 711 | /* Pacify GCC's `empty if-body' warning. */ |
| 712 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) |
| 713 | # ifndef YYSTACK_ALLOC_MAXIMUM |
| 714 | /* The OS might guarantee only one guard page at the bottom of the stack, |
| 715 | and a page size can be as small as 4096 bytes. So we cannot safely |
| 716 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
| 717 | to allow for a few compiler-allocated temporary stack slots. */ |
| 718 | # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */ |
| 719 | # endif |
| 720 | # else |
| 721 | # define YYSTACK_ALLOC YYMALLOC |
| 722 | # define YYSTACK_FREE YYFREE |
| 723 | # ifndef YYSTACK_ALLOC_MAXIMUM |
| 724 | # define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1) |
| 725 | # endif |
| 726 | # ifdef __cplusplus |
| 727 | extern "C" { |
| 728 | # endif |
| 729 | # ifndef YYMALLOC |
| 730 | # define YYMALLOC malloc |
| 731 | # if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \ |
| 732 | && (defined (__STDC__) || defined (__cplusplus))) |
| 733 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
| 734 | # endif |
| 735 | # endif |
| 736 | # ifndef YYFREE |
| 737 | # define YYFREE free |
| 738 | # if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \ |
| 739 | && (defined (__STDC__) || defined (__cplusplus))) |
| 740 | void free (void *); /* INFRINGES ON USER NAME SPACE */ |
| 741 | # endif |
| 742 | # endif |
| 743 | # ifdef __cplusplus |
| 744 | } |
| 745 | # endif |
| 746 | # endif |
| 747 | #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ |
| 748 | |
| 749 | |
| 750 | #if (! defined (yyoverflow) \ |
| 751 | && (! defined (__cplusplus) \ |
| 752 | || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) |
| 753 | |
| 754 | /* A type that is properly aligned for any stack member. */ |
| 755 | union yyalloc |
| 756 | { |
| 757 | short int yyss; |
| 758 | YYSTYPE yyvs; |
| 759 | }; |
| 760 | |
| 761 | /* The size of the maximum gap between one aligned stack and the next. */ |
| 762 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
| 763 | |
| 764 | /* The size of an array large to enough to hold all stacks, each with |
| 765 | N elements. */ |
| 766 | # define YYSTACK_BYTES(N) \ |
| 767 | ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ |
| 768 | + YYSTACK_GAP_MAXIMUM) |
| 769 | |
| 770 | /* Copy COUNT objects from FROM to TO. The source and destination do |
| 771 | not overlap. */ |
| 772 | # ifndef YYCOPY |
| 773 | # if defined (__GNUC__) && 1 < __GNUC__ |
| 774 | # define YYCOPY(To, From, Count) \ |
| 775 | __builtin_memcpy (To, From, (Count) * sizeof (*(From))) |
| 776 | # else |
| 777 | # define YYCOPY(To, From, Count) \ |
| 778 | do \ |
| 779 | { \ |
| 780 | YYSIZE_T yyi; \ |
| 781 | for (yyi = 0; yyi < (Count); yyi++) \ |
| 782 | (To)[yyi] = (From)[yyi]; \ |
| 783 | } \ |
| 784 | while (0) |
| 785 | # endif |
| 786 | # endif |
| 787 | |
| 788 | /* Relocate STACK from its old location to the new one. The |
| 789 | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
| 790 | elements in the stack, and YYPTR gives the new location of the |
| 791 | stack. Advance YYPTR to a properly aligned location for the next |
| 792 | stack. */ |
| 793 | # define YYSTACK_RELOCATE(Stack) \ |
| 794 | do \ |
| 795 | { \ |
| 796 | YYSIZE_T yynewbytes; \ |
| 797 | YYCOPY (&yyptr->Stack, Stack, yysize); \ |
| 798 | Stack = &yyptr->Stack; \ |
| 799 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
| 800 | yyptr += yynewbytes / sizeof (*yyptr); \ |
| 801 | } \ |
| 802 | while (0) |
| 803 | |
| 804 | #endif |
| 805 | |
| 806 | #if defined (__STDC__) || defined (__cplusplus) |
| 807 | typedef signed char yysigned_char; |
| 808 | #else |
| 809 | typedef short int yysigned_char; |
| 810 | #endif |
| 811 | |
| 812 | /* YYFINAL -- State number of the termination state. */ |
| 813 | #define YYFINAL 4 |
| 814 | /* YYLAST -- Last index in YYTABLE. */ |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 815 | #define YYLAST 1464 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 816 | |
| 817 | /* YYNTOKENS -- Number of terminals. */ |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 818 | #define YYNTOKENS 165 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 819 | /* YYNNTS -- Number of nonterminals. */ |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 820 | #define YYNNTS 75 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 821 | /* YYNRULES -- Number of rules. */ |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 822 | #define YYNRULES 293 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 823 | /* YYNRULES -- Number of states. */ |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 824 | #define YYNSTATES 564 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 825 | |
| 826 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
| 827 | #define YYUNDEFTOK 2 |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 828 | #define YYMAXUTOK 405 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 829 | |
| 830 | #define YYTRANSLATE(YYX) \ |
| 831 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
| 832 | |
| 833 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
| 834 | static const unsigned char yytranslate[] = |
| 835 | { |
| 836 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 837 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 838 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 839 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 840 | 154, 155, 163, 2, 152, 2, 2, 2, 2, 2, |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 841 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 842 | 159, 151, 160, 2, 2, 2, 2, 2, 2, 2, |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 843 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 844 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 845 | 2, 156, 153, 158, 2, 2, 2, 2, 2, 164, |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 846 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 847 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 848 | 157, 2, 2, 161, 2, 162, 2, 2, 2, 2, |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 849 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 850 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 851 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 852 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 853 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 854 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 855 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 856 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 857 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 858 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 859 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 860 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 861 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
| 862 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
| 863 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
| 864 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
| 865 | 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, |
| 866 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
| 867 | 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, |
| 868 | 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, |
| 869 | 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, |
| 870 | 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, |
| 871 | 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 872 | 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 873 | 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 874 | 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, |
| 875 | 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, |
| 876 | 145, 146, 147, 148, 149, 150 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 877 | }; |
| 878 | |
| 879 | #if YYDEBUG |
| 880 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
| 881 | YYRHS. */ |
| 882 | static const unsigned short int yyprhs[] = |
| 883 | { |
| 884 | 0, 0, 3, 5, 7, 9, 11, 13, 15, 17, |
| 885 | 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, |
| 886 | 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, |
| 887 | 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 888 | 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 889 | 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, |
| 890 | 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, |
| 891 | 139, 141, 143, 145, 147, 149, 151, 153, 156, 157, |
| 892 | 159, 161, 163, 165, 167, 169, 171, 172, 174, 176, |
| 893 | 178, 180, 182, 184, 187, 188, 189, 192, 193, 197, |
| 894 | 200, 201, 203, 204, 208, 210, 213, 215, 217, 219, |
| 895 | 221, 223, 225, 227, 229, 231, 233, 235, 237, 239, |
| 896 | 241, 243, 245, 247, 249, 251, 253, 256, 261, 267, |
| 897 | 273, 277, 280, 283, 285, 289, 291, 295, 297, 298, |
| 898 | 303, 307, 311, 316, 321, 325, 328, 331, 334, 337, |
| 899 | 340, 343, 346, 349, 352, 355, 362, 368, 377, 384, |
| 900 | 391, 398, 406, 413, 420, 429, 438, 442, 444, 446, |
| 901 | 448, 450, 453, 456, 461, 464, 466, 468, 470, 475, |
| 902 | 478, 483, 490, 497, 504, 511, 515, 520, 521, 523, |
| 903 | 525, 527, 531, 535, 539, 543, 547, 551, 553, 554, |
| 904 | 556, 558, 560, 561, 564, 568, 570, 572, 576, 578, |
| 905 | 579, 588, 590, 592, 596, 598, 600, 604, 605, 607, |
| 906 | 609, 613, 614, 616, 618, 620, 622, 624, 626, 628, |
| 907 | 630, 632, 636, 638, 644, 646, 648, 650, 652, 655, |
| 908 | 658, 660, 663, 666, 667, 669, 671, 673, 676, 679, |
| 909 | 683, 693, 703, 712, 727, 729, 731, 738, 744, 747, |
| 910 | 754, 762, 764, 768, 770, 771, 774, 776, 782, 788, |
| 911 | 794, 802, 805, 810, 815, 822, 827, 832, 839, 846, |
| 912 | 849, 857, 859, 862, 863, 865, 866, 870, 877, 881, |
| 913 | 888, 891, 896, 903 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 914 | }; |
| 915 | |
| 916 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
| 917 | static const short int yyrhs[] = |
| 918 | { |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 919 | 199, 0, -1, 19, -1, 20, -1, 17, -1, 18, |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 920 | -1, 80, -1, 81, -1, 82, -1, 83, -1, 84, |
| 921 | -1, 85, -1, 86, -1, 87, -1, 88, -1, 89, |
| 922 | -1, 90, -1, 91, -1, 92, -1, 93, -1, 94, |
| 923 | -1, 95, -1, 96, -1, 97, -1, 98, -1, 99, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 924 | -1, 100, -1, 101, -1, 102, -1, 103, -1, 104, |
| 925 | -1, 105, -1, 106, -1, 107, -1, 118, -1, 119, |
| 926 | -1, 120, -1, 121, -1, 108, -1, 109, -1, 110, |
| 927 | -1, 111, -1, 112, -1, 113, -1, 114, -1, 115, |
| 928 | -1, 116, -1, 117, -1, 130, -1, 131, -1, 132, |
| 929 | -1, 133, -1, 139, -1, 140, -1, 141, -1, 142, |
| 930 | -1, 143, -1, 144, -1, 145, -1, 146, -1, 147, |
| 931 | -1, 148, -1, 149, -1, 150, -1, 138, -1, 11, |
| 932 | -1, 9, -1, 7, -1, 5, -1, 12, -1, 10, |
| 933 | -1, 8, -1, 6, -1, 175, -1, 176, -1, 13, |
| 934 | -1, 14, -1, 208, 151, -1, -1, 42, -1, 43, |
| 935 | -1, 44, -1, 48, -1, 45, -1, 46, -1, 47, |
| 936 | -1, -1, 66, -1, 67, -1, 68, -1, 69, -1, |
| 937 | 70, -1, 71, -1, 65, 18, -1, -1, -1, 57, |
| 938 | 18, -1, -1, 152, 57, 18, -1, 37, 30, -1, |
| 939 | -1, 184, -1, -1, 152, 187, 186, -1, 184, -1, |
| 940 | 57, 18, -1, 190, -1, 3, -1, 192, -1, 3, |
| 941 | -1, 192, -1, 4, -1, 5, -1, 6, -1, 7, |
| 942 | -1, 8, -1, 9, -1, 10, -1, 11, -1, 12, |
| 943 | -1, 13, -1, 14, -1, 15, -1, 16, -1, 222, |
| 944 | -1, 191, -1, 153, 18, -1, 189, 154, 194, 155, |
| 945 | -1, 156, 18, 157, 192, 158, -1, 159, 18, 157, |
| 946 | 192, 160, -1, 161, 193, 162, -1, 161, 162, -1, |
| 947 | 192, 163, -1, 192, -1, 193, 152, 192, -1, 193, |
| 948 | -1, 193, 152, 40, -1, 40, -1, -1, 190, 156, |
| 949 | 197, 158, -1, 190, 156, 158, -1, 190, 164, 30, |
| 950 | -1, 190, 159, 197, 160, -1, 190, 161, 197, 162, |
| 951 | -1, 190, 161, 162, -1, 190, 22, -1, 190, 23, |
| 952 | -1, 190, 222, -1, 190, 196, -1, 190, 24, -1, |
| 953 | 175, 167, -1, 176, 18, -1, 4, 25, -1, 4, |
| 954 | 26, -1, 178, 21, -1, 174, 154, 195, 39, 190, |
| 955 | 155, -1, 127, 154, 195, 237, 155, -1, 129, 154, |
| 956 | 195, 152, 195, 152, 195, 155, -1, 168, 154, 195, |
| 957 | 152, 195, 155, -1, 169, 154, 195, 152, 195, 155, |
| 958 | -1, 170, 154, 195, 152, 195, 155, -1, 171, 172, |
| 959 | 154, 195, 152, 195, 155, -1, 173, 154, 195, 152, |
| 960 | 195, 155, -1, 135, 154, 195, 152, 195, 155, -1, |
| 961 | 136, 154, 195, 152, 195, 152, 195, 155, -1, 137, |
| 962 | 154, 195, 152, 195, 152, 195, 155, -1, 197, 152, |
| 963 | 195, -1, 195, -1, 35, -1, 36, -1, 200, -1, |
| 964 | 200, 217, -1, 200, 219, -1, 200, 63, 62, 203, |
| 965 | -1, 200, 31, -1, 202, -1, 50, -1, 58, -1, |
| 966 | 202, 179, 27, 188, -1, 202, 219, -1, 202, 63, |
| 967 | 62, 203, -1, 202, 179, 180, 198, 195, 186, -1, |
| 968 | 202, 179, 201, 198, 190, 186, -1, 202, 179, 45, |
| 969 | 198, 190, 186, -1, 202, 179, 47, 198, 190, 186, |
| 970 | -1, 202, 51, 205, -1, 202, 59, 151, 206, -1, |
| 971 | -1, 30, -1, 56, -1, 55, -1, 53, 151, 204, |
| 972 | -1, 54, 151, 18, -1, 52, 151, 30, -1, 72, |
| 973 | 151, 30, -1, 156, 207, 158, -1, 207, 152, 30, |
| 974 | -1, 30, -1, -1, 28, -1, 30, -1, 208, -1, |
| 975 | -1, 190, 209, -1, 211, 152, 210, -1, 210, -1, |
| 976 | 211, -1, 211, 152, 40, -1, 40, -1, -1, 181, |
| 977 | 188, 208, 154, 212, 155, 185, 182, -1, 32, -1, |
| 978 | 161, -1, 180, 213, 214, -1, 33, -1, 162, -1, |
| 979 | 215, 225, 216, -1, -1, 45, -1, 47, -1, 34, |
| 980 | 218, 213, -1, -1, 64, -1, 17, -1, 18, -1, |
| 981 | 21, -1, 25, -1, 26, -1, 22, -1, 23, -1, |
| 982 | 24, -1, 159, 197, 160, -1, 196, -1, 62, 220, |
| 983 | 30, 152, 30, -1, 166, -1, 208, -1, 222, -1, |
| 984 | 221, -1, 190, 223, -1, 225, 226, -1, 226, -1, |
| 985 | 227, 229, -1, 227, 231, -1, -1, 29, -1, 78, |
| 986 | -1, 77, -1, 73, 224, -1, 73, 3, -1, 74, |
| 987 | 15, 223, -1, 74, 4, 223, 152, 15, 223, 152, |
| 988 | 15, 223, -1, 75, 177, 223, 152, 15, 223, 156, |
| 989 | 230, 158, -1, 75, 177, 223, 152, 15, 223, 156, |
| 990 | 158, -1, 179, 76, 181, 188, 223, 154, 234, 155, |
| 991 | 39, 15, 223, 228, 15, 223, -1, 228, -1, 79, |
| 992 | -1, 230, 177, 221, 152, 15, 223, -1, 177, 221, |
| 993 | 152, 15, 223, -1, 179, 236, -1, 190, 156, 223, |
| 994 | 152, 223, 158, -1, 232, 152, 156, 223, 152, 223, |
| 995 | 158, -1, 224, -1, 233, 152, 224, -1, 233, -1, |
| 996 | -1, 61, 60, -1, 60, -1, 168, 190, 223, 152, |
| 997 | 223, -1, 169, 190, 223, 152, 223, -1, 170, 190, |
| 998 | 223, 152, 223, -1, 171, 172, 190, 223, 152, 223, |
| 999 | 155, -1, 49, 224, -1, 173, 224, 152, 224, -1, |
| 1000 | 174, 224, 39, 190, -1, 129, 224, 152, 224, 152, |
| 1001 | 224, -1, 134, 224, 152, 190, -1, 135, 224, 152, |
| 1002 | 224, -1, 136, 224, 152, 224, 152, 224, -1, 137, |
| 1003 | 224, 152, 224, 152, 224, -1, 128, 232, -1, 235, |
| 1004 | 181, 188, 223, 154, 234, 155, -1, 239, -1, 152, |
| 1005 | 233, -1, -1, 38, -1, -1, 122, 190, 183, -1, |
| 1006 | 122, 190, 152, 10, 223, 183, -1, 123, 190, 183, |
| 1007 | -1, 123, 190, 152, 10, 223, 183, -1, 124, 224, |
| 1008 | -1, 238, 125, 190, 223, -1, 238, 126, 224, 152, |
| 1009 | 190, 223, -1, 127, 190, 223, 237, -1 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1010 | }; |
| 1011 | |
| 1012 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
| 1013 | static const unsigned short int yyrline[] = |
| 1014 | { |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1015 | 0, 331, 331, 331, 332, 332, 336, 336, 336, 336, |
| 1016 | 336, 336, 336, 337, 337, 337, 337, 338, 338, 338, |
| 1017 | 339, 339, 339, 339, 339, 339, 340, 340, 341, 341, |
| 1018 | 341, 341, 341, 341, 341, 341, 341, 341, 342, 342, |
| 1019 | 342, 342, 342, 342, 342, 342, 342, 342, 343, 343, |
| 1020 | 343, 343, 344, 344, 344, 344, 344, 344, 344, 345, |
| 1021 | 345, 345, 345, 345, 345, 350, 350, 350, 350, 351, |
| 1022 | 351, 351, 351, 352, 352, 353, 353, 356, 359, 364, |
| 1023 | 364, 364, 364, 364, 364, 365, 366, 369, 369, 369, |
| 1024 | 369, 369, 370, 371, 376, 381, 382, 385, 386, 394, |
| 1025 | 400, 401, 404, 405, 414, 415, 428, 428, 429, 429, |
| 1026 | 430, 434, 434, 434, 434, 434, 434, 434, 435, 435, |
| 1027 | 435, 435, 435, 437, 441, 445, 448, 453, 459, 467, |
| 1028 | 475, 481, 485, 496, 499, 507, 508, 513, 516, 526, |
| 1029 | 532, 537, 543, 549, 555, 560, 566, 572, 578, 584, |
| 1030 | 590, 596, 602, 608, 614, 622, 636, 648, 653, 659, |
| 1031 | 664, 672, 677, 685, 690, 695, 705, 710, 715, 715, |
| 1032 | 725, 730, 733, 738, 742, 746, 748, 748, 751, 763, |
| 1033 | 768, 773, 780, 787, 794, 801, 806, 811, 816, 818, |
| 1034 | 818, 821, 826, 833, 838, 845, 852, 857, 858, 866, |
| 1035 | 866, 867, 867, 869, 876, 880, 884, 887, 892, 895, |
| 1036 | 897, 917, 918, 920, 929, 930, 932, 940, 941, 942, |
| 1037 | 946, 959, 960, 963, 963, 963, 963, 963, 963, 963, |
| 1038 | 964, 965, 970, 971, 980, 980, 984, 990, 1001, 1007, |
| 1039 | 1010, 1018, 1022, 1027, 1030, 1036, 1036, 1038, 1043, 1048, |
| 1040 | 1053, 1061, 1068, 1074, 1094, 1099, 1105, 1110, 1118, 1127, |
| 1041 | 1134, 1142, 1146, 1153, 1154, 1158, 1163, 1166, 1172, 1177, |
| 1042 | 1185, 1190, 1195, 1203, 1217, 1222, 1227, 1232, 1237, 1242, |
| 1043 | 1247, 1264, 1269, 1270, 1274, 1275, 1278, 1285, 1292, 1299, |
| 1044 | 1306, 1311, 1318, 1325 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1045 | }; |
| 1046 | #endif |
| 1047 | |
| 1048 | #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE |
| 1049 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
| 1050 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
| 1051 | static const char *const yytname[] = |
| 1052 | { |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 1053 | "$end", "error", "$undefined", "VOID", "BOOL", "SBYTE", "UBYTE", |
| 1054 | "SHORT", "USHORT", "INT", "UINT", "LONG", "ULONG", "FLOAT", "DOUBLE", |
| 1055 | "LABEL", "OPAQUE", "ESINT64VAL", "EUINT64VAL", "SINTVAL", "UINTVAL", |
| 1056 | "FPVAL", "NULL_TOK", "UNDEF", "ZEROINITIALIZER", "TRUETOK", "FALSETOK", |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 1057 | "TYPE", "VAR_ID", "LABELSTR", "STRINGCONSTANT", "IMPLEMENTATION", |
| 1058 | "BEGINTOK", "ENDTOK", "DECLARE", "GLOBAL", "CONSTANT", "SECTION", |
| 1059 | "VOLATILE", "TO", "DOTDOTDOT", "CONST", "INTERNAL", "LINKONCE", "WEAK", |
| 1060 | "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "APPENDING", "NOT", "EXTERNAL", |
| 1061 | "TARGET", "TRIPLE", "ENDIAN", "POINTERSIZE", "LITTLE", "BIG", "ALIGN", |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 1062 | "UNINITIALIZED", "DEPLIBS", "CALL", "TAIL", "ASM_TOK", "MODULE", |
| 1063 | "SIDEEFFECT", "CC_TOK", "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK", |
| 1064 | "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT", |
| 1065 | "RET", "BR", "SWITCH", "INVOKE", "EXCEPT", "UNWIND", "UNREACHABLE", |
| 1066 | "ADD", "SUB", "MUL", "DIV", "UDIV", "SDIV", "FDIV", "REM", "UREM", |
| 1067 | "SREM", "FREM", "AND", "OR", "XOR", "SETLE", "SETGE", "SETLT", "SETGT", |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1068 | "SETEQ", "SETNE", "ICMP", "FCMP", "EQ", "NE", "SLT", "SGT", "SLE", "SGE", |
| 1069 | "OEQ", "ONE", "OLT", "OGT", "OLE", "OGE", "ORD", "UNO", "UEQ", "UNE", |
| 1070 | "ULT", "UGT", "ULE", "UGE", "MALLOC", "ALLOCA", "FREE", "LOAD", "STORE", |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 1071 | "GETELEMENTPTR", "PHI_TOK", "SELECT", "SHL", "SHR", "ASHR", "LSHR", |
| 1072 | "VAARG", "EXTRACTELEMENT", "INSERTELEMENT", "SHUFFLEVECTOR", "CAST", |
| 1073 | "TRUNC", "ZEXT", "SEXT", "FPTRUNC", "FPEXT", "FPTOUI", "FPTOSI", |
| 1074 | "UITOFP", "SITOFP", "PTRTOINT", "INTTOPTR", "BITCAST", "'='", "','", |
| 1075 | "'\\\\'", "'('", "')'", "'['", "'x'", "']'", "'<'", "'>'", "'{'", "'}'", |
| 1076 | "'*'", "'c'", "$accept", "IntVal", "EInt64Val", "ArithmeticOps", |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1077 | "LogicalOps", "SetCondOps", "CompareOps", "Predicates", "ShiftOps", |
| 1078 | "CastOps", "SIntType", "UIntType", "IntType", "FPType", "OptAssign", |
| 1079 | "OptLinkage", "OptCallingConv", "OptAlign", "OptCAlign", "SectionString", |
| 1080 | "OptSection", "GlobalVarAttributes", "GlobalVarAttribute", "TypesV", |
| 1081 | "UpRTypesV", "Types", "PrimType", "UpRTypes", "TypeListI", |
| 1082 | "ArgTypeListI", "ConstVal", "ConstExpr", "ConstVector", "GlobalType", |
| 1083 | "Module", "DefinitionList", "External", "ConstPool", "AsmBlock", |
| 1084 | "BigOrLittle", "TargetDefinition", "LibrariesDefinition", "LibList", |
| 1085 | "Name", "OptName", "ArgVal", "ArgListH", "ArgList", "FunctionHeaderH", |
| 1086 | "BEGIN", "FunctionHeader", "END", "Function", "FnDeclareLinkage", |
| 1087 | "FunctionProto", "OptSideEffect", "ConstValueRef", "SymbolicValueRef", |
| 1088 | "ValueRef", "ResolvedVal", "BasicBlockList", "BasicBlock", |
| 1089 | "InstructionList", "Unwind", "BBTerminatorInst", "JumpTable", "Inst", |
| 1090 | "PHIList", "ValueRefList", "ValueRefListE", "OptTailCall", "InstVal", |
| 1091 | "IndexList", "OptVolatile", "MemoryInst", 0 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1092 | }; |
| 1093 | #endif |
| 1094 | |
| 1095 | # ifdef YYPRINT |
| 1096 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to |
| 1097 | token YYLEX-NUM. */ |
| 1098 | static const unsigned short int yytoknum[] = |
| 1099 | { |
| 1100 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
| 1101 | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, |
| 1102 | 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, |
| 1103 | 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, |
| 1104 | 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, |
| 1105 | 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, |
| 1106 | 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, |
| 1107 | 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, |
| 1108 | 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, |
| 1109 | 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, |
| 1110 | 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 1111 | 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1112 | 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, |
| 1113 | 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, |
| 1114 | 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, |
| 1115 | 405, 61, 44, 92, 40, 41, 91, 120, 93, 60, |
| 1116 | 62, 123, 125, 42, 99 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1117 | }; |
| 1118 | # endif |
| 1119 | |
| 1120 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
| 1121 | static const unsigned char yyr1[] = |
| 1122 | { |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1123 | 0, 165, 166, 166, 167, 167, 168, 168, 168, 168, |
| 1124 | 168, 168, 168, 168, 168, 168, 168, 169, 169, 169, |
| 1125 | 170, 170, 170, 170, 170, 170, 171, 171, 172, 172, |
| 1126 | 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, |
| 1127 | 172, 172, 172, 172, 172, 172, 172, 172, 173, 173, |
| 1128 | 173, 173, 174, 174, 174, 174, 174, 174, 174, 174, |
| 1129 | 174, 174, 174, 174, 174, 175, 175, 175, 175, 176, |
| 1130 | 176, 176, 176, 177, 177, 178, 178, 179, 179, 180, |
| 1131 | 180, 180, 180, 180, 180, 180, 180, 181, 181, 181, |
| 1132 | 181, 181, 181, 181, 181, 182, 182, 183, 183, 184, |
| 1133 | 185, 185, 186, 186, 187, 187, 188, 188, 189, 189, |
| 1134 | 190, 191, 191, 191, 191, 191, 191, 191, 191, 191, |
| 1135 | 191, 191, 191, 192, 192, 192, 192, 192, 192, 192, |
| 1136 | 192, 192, 192, 193, 193, 194, 194, 194, 194, 195, |
| 1137 | 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, |
| 1138 | 195, 195, 195, 195, 195, 196, 196, 196, 196, 196, |
| 1139 | 196, 196, 196, 196, 196, 196, 197, 197, 198, 198, |
| 1140 | 199, 200, 200, 200, 200, 200, 201, 201, 202, 202, |
| 1141 | 202, 202, 202, 202, 202, 202, 202, 202, 203, 204, |
| 1142 | 204, 205, 205, 205, 205, 206, 207, 207, 207, 208, |
| 1143 | 208, 209, 209, 210, 211, 211, 212, 212, 212, 212, |
| 1144 | 213, 214, 214, 215, 216, 216, 217, 218, 218, 218, |
| 1145 | 219, 220, 220, 221, 221, 221, 221, 221, 221, 221, |
| 1146 | 221, 221, 221, 221, 222, 222, 223, 223, 224, 225, |
| 1147 | 225, 226, 227, 227, 227, 228, 228, 229, 229, 229, |
| 1148 | 229, 229, 229, 229, 229, 229, 230, 230, 231, 232, |
| 1149 | 232, 233, 233, 234, 234, 235, 235, 236, 236, 236, |
| 1150 | 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, |
| 1151 | 236, 236, 237, 237, 238, 238, 239, 239, 239, 239, |
| 1152 | 239, 239, 239, 239 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1153 | }; |
| 1154 | |
| 1155 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
| 1156 | static const unsigned char yyr2[] = |
| 1157 | { |
| 1158 | 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1159 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1160 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1161 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
Reid Spencer | f7bde22 | 2006-12-01 22:26:37 +0000 | [diff] [blame] | 1162 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 1163 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1164 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1165 | 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, |
| 1166 | 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, |
| 1167 | 1, 1, 1, 2, 0, 0, 2, 0, 3, 2, |
| 1168 | 0, 1, 0, 3, 1, 2, 1, 1, 1, 1, |
| 1169 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1170 | 1, 1, 1, 1, 1, 1, 2, 4, 5, 5, |
| 1171 | 3, 2, 2, 1, 3, 1, 3, 1, 0, 4, |
| 1172 | 3, 3, 4, 4, 3, 2, 2, 2, 2, 2, |
| 1173 | 2, 2, 2, 2, 2, 6, 5, 8, 6, 6, |
| 1174 | 6, 7, 6, 6, 8, 8, 3, 1, 1, 1, |
| 1175 | 1, 2, 2, 4, 2, 1, 1, 1, 4, 2, |
| 1176 | 4, 6, 6, 6, 6, 3, 4, 0, 1, 1, |
| 1177 | 1, 3, 3, 3, 3, 3, 3, 1, 0, 1, |
| 1178 | 1, 1, 0, 2, 3, 1, 1, 3, 1, 0, |
| 1179 | 8, 1, 1, 3, 1, 1, 3, 0, 1, 1, |
| 1180 | 3, 0, 1, 1, 1, 1, 1, 1, 1, 1, |
| 1181 | 1, 3, 1, 5, 1, 1, 1, 1, 2, 2, |
| 1182 | 1, 2, 2, 0, 1, 1, 1, 2, 2, 3, |
| 1183 | 9, 9, 8, 14, 1, 1, 6, 5, 2, 6, |
| 1184 | 7, 1, 3, 1, 0, 2, 1, 5, 5, 5, |
| 1185 | 7, 2, 4, 4, 6, 4, 4, 6, 6, 2, |
| 1186 | 7, 1, 2, 0, 1, 0, 3, 6, 3, 6, |
| 1187 | 2, 4, 6, 4 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1188 | }; |
| 1189 | |
| 1190 | /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state |
| 1191 | STATE-NUM when YYTABLE doesn't specify something else to do. Zero |
| 1192 | means the default is an error. */ |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 1193 | static const unsigned short int yydefact[] = |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1194 | { |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1195 | 187, 0, 86, 175, 1, 174, 217, 79, 80, 81, |
| 1196 | 83, 84, 85, 82, 0, 94, 243, 171, 172, 199, |
| 1197 | 200, 0, 0, 0, 86, 0, 179, 218, 219, 94, |
| 1198 | 0, 0, 87, 88, 89, 90, 91, 92, 0, 0, |
| 1199 | 244, 243, 240, 78, 0, 0, 0, 0, 185, 0, |
| 1200 | 0, 0, 0, 0, 176, 177, 0, 0, 77, 220, |
| 1201 | 188, 173, 93, 107, 111, 112, 113, 114, 115, 116, |
| 1202 | 117, 118, 119, 120, 121, 122, 123, 2, 3, 0, |
| 1203 | 0, 0, 0, 234, 0, 0, 106, 125, 110, 235, |
| 1204 | 124, 211, 212, 213, 214, 215, 216, 239, 0, 0, |
| 1205 | 0, 246, 245, 255, 285, 254, 241, 242, 0, 0, |
| 1206 | 0, 0, 198, 186, 180, 178, 168, 169, 0, 0, |
| 1207 | 0, 0, 126, 0, 0, 109, 131, 133, 0, 0, |
| 1208 | 138, 132, 248, 0, 247, 0, 0, 68, 72, 67, |
| 1209 | 71, 66, 70, 65, 69, 73, 74, 0, 284, 0, |
| 1210 | 266, 0, 94, 6, 7, 8, 9, 10, 11, 12, |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 1211 | 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1212 | 23, 24, 25, 26, 27, 0, 0, 0, 0, 0, |
| 1213 | 0, 48, 49, 50, 51, 0, 0, 0, 0, 64, |
| 1214 | 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, |
| 1215 | 62, 63, 0, 0, 0, 0, 0, 0, 94, 258, |
| 1216 | 0, 281, 193, 190, 189, 191, 192, 194, 197, 0, |
| 1217 | 102, 102, 111, 112, 113, 114, 115, 116, 117, 118, |
| 1218 | 119, 120, 121, 0, 0, 0, 0, 102, 102, 0, |
| 1219 | 0, 0, 130, 209, 137, 135, 0, 223, 224, 225, |
| 1220 | 228, 229, 230, 226, 227, 221, 0, 0, 0, 0, |
| 1221 | 0, 0, 0, 0, 0, 0, 0, 0, 232, 237, |
| 1222 | 236, 238, 0, 249, 0, 271, 265, 0, 97, 97, |
| 1223 | 290, 0, 0, 279, 0, 0, 0, 0, 0, 0, |
| 1224 | 0, 0, 28, 29, 30, 31, 32, 33, 38, 39, |
| 1225 | 40, 41, 42, 43, 44, 45, 46, 47, 34, 35, |
| 1226 | 36, 37, 0, 0, 0, 0, 0, 0, 0, 195, |
| 1227 | 0, 183, 184, 152, 153, 4, 5, 150, 151, 154, |
| 1228 | 145, 146, 149, 0, 0, 0, 0, 148, 147, 181, |
| 1229 | 182, 108, 108, 134, 208, 202, 205, 206, 0, 0, |
| 1230 | 127, 222, 0, 0, 0, 0, 0, 0, 167, 0, |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 1231 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1232 | 286, 0, 288, 283, 0, 0, 0, 0, 0, 0, |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 1233 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1234 | 196, 0, 0, 104, 102, 140, 0, 0, 144, 0, |
| 1235 | 141, 128, 129, 201, 203, 0, 100, 136, 0, 283, |
| 1236 | 0, 0, 0, 0, 0, 231, 0, 0, 0, 0, |
| 1237 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 293, |
| 1238 | 0, 0, 0, 275, 276, 0, 0, 0, 0, 0, |
| 1239 | 0, 272, 273, 0, 291, 0, 99, 105, 103, 139, |
| 1240 | 142, 143, 207, 204, 101, 95, 0, 0, 0, 0, |
| 1241 | 0, 0, 166, 0, 0, 0, 0, 0, 0, 0, |
| 1242 | 0, 264, 97, 98, 97, 261, 282, 0, 0, 0, |
| 1243 | 0, 0, 267, 268, 269, 0, 264, 0, 0, 210, |
| 1244 | 233, 156, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1245 | 0, 0, 0, 0, 263, 0, 0, 287, 289, 0, |
| 1246 | 0, 0, 274, 277, 278, 0, 0, 292, 96, 0, |
| 1247 | 163, 0, 0, 158, 159, 160, 0, 162, 155, 0, |
| 1248 | 252, 0, 0, 0, 262, 259, 0, 270, 280, 0, |
| 1249 | 0, 0, 161, 250, 0, 251, 0, 0, 260, 157, |
| 1250 | 164, 165, 0, 0, 0, 0, 0, 0, 257, 0, |
| 1251 | 0, 256, 0, 253 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1252 | }; |
| 1253 | |
| 1254 | /* YYDEFGOTO[NTERM-NUM]. */ |
| 1255 | static const short int yydefgoto[] = |
| 1256 | { |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1257 | -1, 83, 327, 262, 263, 264, 265, 312, 266, 267, |
| 1258 | 233, 234, 147, 235, 24, 15, 38, 489, 370, 393, |
| 1259 | 455, 321, 394, 84, 85, 236, 87, 88, 128, 246, |
| 1260 | 358, 268, 359, 118, 1, 2, 57, 3, 61, 215, |
| 1261 | 48, 113, 219, 89, 404, 346, 347, 348, 39, 93, |
| 1262 | 16, 96, 17, 29, 18, 352, 269, 90, 271, 475, |
| 1263 | 41, 42, 43, 105, 106, 532, 107, 283, 504, 505, |
| 1264 | 208, 209, 429, 210, 211 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1265 | }; |
| 1266 | |
| 1267 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
| 1268 | STATE-NUM. */ |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1269 | #define YYPACT_NINF -507 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1270 | static const short int yypact[] = |
| 1271 | { |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1272 | -507, 31, 62, 973, -507, -507, -18, -507, -507, -507, |
| 1273 | -507, -507, -507, -507, -3, 124, 43, -507, -507, -507, |
| 1274 | -507, -33, -60, 25, 177, -37, -507, -507, -507, 124, |
| 1275 | 102, 128, -507, -507, -507, -507, -507, -507, 800, -25, |
| 1276 | -507, -17, -507, 49, 12, 16, 26, 29, -507, 28, |
| 1277 | 102, 800, 7, 7, -507, -507, 7, 7, -507, -507, |
| 1278 | -507, -507, -507, 42, -507, -507, -507, -507, -507, -507, |
| 1279 | -507, -507, -507, -507, -507, -507, -507, -507, -507, 163, |
| 1280 | 164, 165, 469, -507, 27, 47, -507, -507, -109, -507, |
| 1281 | -507, -507, -507, -507, -507, -507, -507, -507, 837, 20, |
| 1282 | 146, -507, -507, -507, 1314, -507, -507, -507, 155, 19, |
| 1283 | 179, 172, 173, -507, -507, -507, -507, -507, 882, 882, |
| 1284 | 921, 882, -507, 50, 51, -507, -507, -109, -126, 52, |
| 1285 | 564, -507, 42, 1112, -507, 1112, 1112, -507, -507, -507, |
| 1286 | -507, -507, -507, -507, -507, -507, -507, 1112, -507, 882, |
| 1287 | -507, 149, 124, -507, -507, -507, -507, -507, -507, -507, |
| 1288 | -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, |
| 1289 | -507, -507, -507, -507, -507, 882, 882, 882, 882, 882, |
| 1290 | 882, -507, -507, -507, -507, 882, 882, 882, 882, -507, |
| 1291 | -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, |
| 1292 | -507, -507, 882, 882, 882, 860, 882, 882, 124, -507, |
| 1293 | -5, -507, -507, -507, -507, -507, -507, -507, -507, -64, |
| 1294 | 58, 58, 77, 117, 193, 126, 194, 142, 195, 144, |
| 1295 | 198, 197, 207, 153, 213, 211, 964, 58, 58, 882, |
| 1296 | 882, 882, -507, 640, -507, 81, 82, -507, -507, -507, |
| 1297 | -507, -507, -507, -507, -507, 170, 84, 86, 87, 88, |
| 1298 | 89, 921, 90, 91, 92, 860, 93, 94, -507, -507, |
| 1299 | -507, -507, 97, -507, 104, -507, -507, 800, 105, 109, |
| 1300 | -507, 1112, 80, 112, 114, 115, 118, 120, 121, 1112, |
| 1301 | 1112, 1112, -507, -507, -507, -507, -507, -507, -507, -507, |
| 1302 | -507, -507, -507, -507, -507, -507, -507, -507, -507, -507, |
| 1303 | -507, -507, 882, 123, 230, 800, 882, 882, 220, -507, |
| 1304 | -23, -507, -507, -507, -507, -507, -507, -507, -507, -507, |
| 1305 | -507, -507, -507, 678, 921, 516, 246, -507, -507, -507, |
| 1306 | -507, -73, -48, -109, -507, 27, -507, 131, 125, 723, |
| 1307 | -507, -507, 256, 921, 921, 921, 921, 921, -507, -76, |
| 1308 | 921, 921, 921, 133, 921, 921, 274, 278, 1112, -1, |
| 1309 | -507, 1, -507, 143, 1112, 138, 882, 882, 882, 882, |
| 1310 | 882, 147, 148, 150, 1112, 882, 882, 1112, 1112, 151, |
| 1311 | -507, 266, 280, -507, 58, -507, -57, -74, -507, -124, |
| 1312 | -507, -507, -507, -507, -507, 762, 264, -507, 152, 143, |
| 1313 | 154, 156, 157, 158, 921, -507, 159, 161, 162, 921, |
| 1314 | 166, 268, 1112, 1112, 167, 1112, 287, 1112, 882, -507, |
| 1315 | 171, 1112, 174, -507, -507, 175, 178, 1112, 1112, 1112, |
| 1316 | 180, -507, -507, 183, -507, 882, -507, -507, -507, -507, |
| 1317 | -507, -507, -507, -507, -507, 258, 286, 176, 921, 921, |
| 1318 | 921, 921, -507, 921, 921, 921, 181, 921, 882, 192, |
| 1319 | 169, 882, 199, -507, 199, -507, 200, 1112, 201, 882, |
| 1320 | 882, 882, -507, -507, -507, 1112, 882, 1112, 311, -507, |
| 1321 | -507, -507, 202, 190, 203, 212, 191, 216, 217, 921, |
| 1322 | 218, 221, 334, 41, 200, 222, 293, -507, -507, 882, |
| 1323 | 208, 1112, -507, -507, -507, 223, 224, -507, -507, 921, |
| 1324 | -507, 921, 921, -507, -507, -507, 225, -507, -507, 1112, |
| 1325 | -507, 1201, 59, 336, -507, -507, 227, -507, -507, 226, |
| 1326 | 228, 231, -507, -507, 235, -507, 1201, 373, -507, -507, |
| 1327 | -507, -507, 374, 242, 1112, 1112, 380, 98, -507, 1112, |
| 1328 | 381, -507, 1112, -507 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1329 | }; |
| 1330 | |
| 1331 | /* YYPGOTO[NTERM-NUM]. */ |
| 1332 | static const short int yypgoto[] = |
| 1333 | { |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1334 | -507, -507, -507, 294, 295, 296, 297, 137, 299, 300, |
| 1335 | -98, -97, -495, -507, 366, 386, -135, -507, -274, 5, |
| 1336 | -507, -215, -507, -47, -507, -38, -507, -67, 282, -507, |
| 1337 | -102, 182, -204, 60, -507, -507, -507, -507, 363, -507, |
| 1338 | -507, -507, -507, -2, -507, 9, -507, -507, 387, -507, |
| 1339 | -507, -507, -507, -507, 412, -507, -506, -103, 79, -88, |
| 1340 | -507, 382, -507, -133, -507, -507, -507, -507, -6, -61, |
| 1341 | -507, -507, 18, -507, -507 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1342 | }; |
| 1343 | |
| 1344 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
| 1345 | positive, shift that token. If negative, reduce the rule which |
| 1346 | number is the opposite. If zero, do what YYDEFACT says. |
| 1347 | If YYTABLE_NINF, syntax error. */ |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1348 | #define YYTABLE_NINF -171 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1349 | static const short int yytable[] = |
| 1350 | { |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1351 | 86, 25, 145, 146, 115, 372, 322, 91, 531, 425, |
| 1352 | 134, 427, 40, 86, 391, 127, 94, 277, 237, 44, |
| 1353 | 45, 46, 339, 340, 135, 544, 241, 27, 414, 28, |
| 1354 | 270, 4, 270, 270, 392, 136, 242, 546, 451, 47, |
| 1355 | 553, 25, 116, 117, 270, -108, 137, 138, 139, 140, |
| 1356 | 141, 142, 143, 144, 131, 19, 426, 20, 426, 30, |
| 1357 | 133, 275, -170, 127, 137, 138, 139, 140, 141, 142, |
| 1358 | 143, 144, 40, 315, 213, 214, 414, 19, 414, 20, |
| 1359 | 220, 221, 129, 238, 415, 401, 450, 50, 318, 280, |
| 1360 | 131, 49, 284, 5, 319, 414, 6, 285, 286, 287, |
| 1361 | 288, 449, 323, 324, 7, 8, 9, 10, 11, 12, |
| 1362 | 13, 133, 402, 119, 58, 131, 120, 121, 313, 314, |
| 1363 | 316, 317, 98, 99, 100, 14, 101, 102, 103, 396, |
| 1364 | 397, 399, 60, 338, -68, -68, 92, 278, 279, 133, |
| 1365 | 281, 282, 133, -67, -67, 95, 62, 133, 133, 133, |
| 1366 | 133, 137, 138, 139, 140, 141, 142, 143, 144, -66, |
| 1367 | -66, -65, -65, 108, 289, 290, 291, 109, 133, 133, |
| 1368 | 325, 326, 341, 342, 343, 101, 102, 110, 270, 448, |
| 1369 | 111, 122, 123, 124, 112, 212, 270, 270, 270, 31, |
| 1370 | 32, 33, 34, 35, 36, 37, -109, 216, 507, 530, |
| 1371 | 508, 130, 217, 218, 51, 345, 243, 239, 240, 276, |
| 1372 | 320, -72, -71, -70, 272, 273, -69, 545, -75, 7, |
| 1373 | 8, 9, 52, 11, 53, 13, 274, 54, -76, 389, |
| 1374 | 368, 328, 329, 349, 351, 55, 374, 350, 353, 86, |
| 1375 | 354, 355, 356, 357, 360, 361, 362, 364, 365, 366, |
| 1376 | 390, 409, 410, 411, 412, 413, 367, 369, 416, 417, |
| 1377 | 418, 371, 420, 421, 375, 270, 376, 377, 387, 386, |
| 1378 | 378, 270, 379, 380, 384, 385, 400, 86, 388, 133, |
| 1379 | 406, 270, 343, 405, 270, 270, 408, 419, 432, 422, |
| 1380 | 434, 435, 436, 423, 431, 428, 446, 441, 447, 437, |
| 1381 | 438, 391, 439, 445, 456, 473, 458, 468, 459, 460, |
| 1382 | 461, 463, 462, 464, 465, 488, 490, 466, 467, 270, |
| 1383 | 270, 471, 270, 477, 270, 503, 479, 480, 270, 518, |
| 1384 | 481, 491, 485, 499, 270, 270, 270, 486, 133, 433, |
| 1385 | 133, 133, 133, 403, 502, 520, 523, 133, 442, 529, |
| 1386 | 426, 506, 509, 511, 519, 521, 492, 493, 494, 495, |
| 1387 | 373, 496, 497, 498, 522, 500, 535, 345, 381, 382, |
| 1388 | 383, 524, 525, 527, 270, 547, 528, 533, 537, 538, |
| 1389 | 542, 549, 270, 550, 270, 548, 551, 552, 554, 555, |
| 1390 | 133, 512, 513, 514, 556, 559, 562, 526, 202, 203, |
| 1391 | 204, 205, 363, 206, 207, 145, 146, 487, 270, 104, |
| 1392 | 56, 454, 245, 114, 453, 26, 59, 539, 337, 540, |
| 1393 | 541, 534, 476, 97, 560, 516, 270, 457, 0, 0, |
| 1394 | 501, 0, 0, 133, 145, 146, 0, 0, 0, 0, |
| 1395 | 0, 133, 133, 133, 0, 0, 0, 424, 133, 0, |
| 1396 | 0, 270, 270, 430, 0, 0, 270, 0, 0, 270, |
| 1397 | 0, 0, 0, 440, 0, 0, 443, 444, 0, 0, |
| 1398 | 0, 133, 125, 64, 65, 66, 67, 68, 69, 70, |
| 1399 | 71, 72, 73, 74, 75, 76, 0, 0, 77, 78, |
| 1400 | 0, 0, 0, 0, 0, 0, 0, 19, 0, 20, |
| 1401 | 0, 469, 470, 0, 472, 0, 474, 0, 0, 0, |
| 1402 | 478, 0, 0, 0, 0, 0, 482, 483, 484, 125, |
| 1403 | 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, |
| 1404 | 232, 75, 76, 0, 0, 77, 78, 0, 0, 0, |
| 1405 | 0, 0, 0, 0, 19, 0, 20, 0, 0, 0, |
| 1406 | 0, 0, 0, 0, 0, 0, 510, 0, 0, 0, |
| 1407 | 0, 0, 0, 0, 515, 0, 517, 125, 64, 65, |
| 1408 | 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, |
| 1409 | 76, 0, 0, 77, 78, 0, 0, 0, 0, 0, |
| 1410 | 536, 0, 19, 0, 20, 0, 0, 0, 0, 0, |
| 1411 | 0, 0, 0, 0, 244, 0, 0, 0, 543, 0, |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 1412 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1413 | 0, 0, 79, 0, 0, 80, 0, 0, 81, 0, |
| 1414 | 82, 126, 0, 557, 558, 0, 0, 0, 561, 0, |
| 1415 | 0, 563, 0, 125, 64, 65, 66, 67, 68, 69, |
| 1416 | 70, 71, 72, 73, 74, 75, 76, 0, 0, 77, |
| 1417 | 78, 0, 0, 0, 0, 0, 0, 0, 19, 79, |
| 1418 | 20, 0, 80, 0, 0, 81, 0, 82, 398, 0, |
| 1419 | 344, 125, 222, 223, 224, 225, 226, 227, 228, 229, |
| 1420 | 230, 231, 232, 75, 76, 0, 0, 77, 78, 0, |
| 1421 | 0, 0, 0, 0, 0, 0, 19, 0, 20, 0, |
| 1422 | 0, 0, 0, 0, 0, 0, 0, 79, 0, 0, |
| 1423 | 80, 0, 0, 81, 0, 82, 125, 64, 65, 66, |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 1424 | 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, |
| 1425 | 0, 0, 77, 78, 0, 0, 0, 0, 0, 0, |
| 1426 | 0, 19, 0, 20, 0, 0, 0, 0, 0, 0, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1427 | 0, 0, 0, 407, 0, 125, 64, 65, 66, 67, |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 1428 | 68, 69, 70, 71, 72, 73, 74, 75, 76, 0, |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 1429 | 0, 77, 78, 0, 0, 0, 0, 0, 0, 0, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1430 | 19, 0, 20, 79, 0, 0, 80, 0, 0, 81, |
| 1431 | 0, 82, 452, 63, 64, 65, 66, 67, 68, 69, |
| 1432 | 70, 71, 72, 73, 74, 75, 76, 0, 0, 77, |
| 1433 | 78, 0, 0, 0, 0, 0, 0, 0, 19, 0, |
| 1434 | 20, 79, 0, 0, 80, 0, 395, 81, 0, 82, |
| 1435 | 132, 64, 65, 66, 67, 68, 69, 70, 71, 72, |
| 1436 | 73, 74, 75, 76, 0, 0, 77, 78, 0, 0, |
| 1437 | 0, 0, 0, 0, 0, 19, 0, 20, 0, 0, |
| 1438 | 0, 0, 0, 0, 0, 0, 79, 0, 0, 80, |
| 1439 | 0, 0, 81, 0, 82, 125, 64, 65, 66, 67, |
| 1440 | 68, 69, 70, 71, 72, 73, 74, 75, 76, 0, |
| 1441 | 0, 77, 78, 0, 0, 0, 0, 0, 0, 0, |
| 1442 | 19, 0, 20, 0, 0, 79, 0, 0, 80, 0, |
| 1443 | 0, 81, 0, 82, 125, 222, 223, 224, 225, 226, |
| 1444 | 227, 228, 229, 230, 231, 232, 75, 76, 0, 0, |
| 1445 | 77, 78, 0, 0, 0, 0, 0, 0, 0, 19, |
| 1446 | 0, 20, 0, 79, 0, 0, 80, 0, 0, 81, |
| 1447 | 0, 82, 292, 293, 294, 295, 296, 297, 298, 299, |
| 1448 | 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, |
| 1449 | 310, 311, 0, 77, 78, 0, 330, 331, 332, 0, |
| 1450 | 79, 0, 19, 80, 20, 0, 81, 0, 82, 0, |
| 1451 | -78, 19, 0, 20, 0, 0, 0, 6, -78, -78, |
| 1452 | 0, 0, 0, 0, 0, -78, -78, -78, -78, -78, |
| 1453 | -78, -78, 0, -78, 21, 0, 0, 0, 0, 0, |
| 1454 | 0, -78, 22, 0, 0, 79, 23, 0, 80, 0, |
| 1455 | 0, 81, 0, 82, 153, 154, 155, 156, 157, 158, |
| 1456 | 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, |
| 1457 | 169, 170, 171, 172, 173, 174, 0, 0, 0, 0, |
| 1458 | 0, 0, 0, 0, 79, 0, 0, 80, 0, 0, |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 1459 | 81, 0, 82, 0, 0, 0, 0, 0, 0, 0, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1460 | 0, 256, 0, 257, 181, 182, 183, 184, 0, 258, |
| 1461 | 259, 260, 189, 190, 191, 192, 193, 194, 195, 196, |
| 1462 | 197, 198, 199, 200, 201, 0, 0, 0, 0, 0, |
| 1463 | 333, 0, 0, 334, 0, 335, 0, 0, 336, 247, |
| 1464 | 248, 77, 78, 249, 250, 251, 252, 253, 254, 0, |
| 1465 | 19, 0, 20, 0, 0, 0, 0, 0, 0, 0, |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 1466 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1467 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1468 | 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, |
| 1469 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1470 | 0, 0, 153, 154, 155, 156, 157, 158, 159, 160, |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 1471 | 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1472 | 171, 172, 173, 174, 0, 0, 0, 0, 247, 248, |
| 1473 | 0, 0, 249, 250, 251, 252, 253, 254, 0, 0, |
| 1474 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 256, |
| 1475 | 0, 257, 181, 182, 183, 184, 0, 258, 259, 260, |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 1476 | 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1477 | 199, 200, 201, 255, 0, 0, 0, 0, 0, 0, |
| 1478 | 0, 261, 0, 0, 0, 0, 0, 0, 0, 0, |
| 1479 | 0, 153, 154, 155, 156, 157, 158, 159, 160, 161, |
| 1480 | 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, |
| 1481 | 172, 173, 174, 0, 0, 0, 0, 0, 0, 0, |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 1482 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1483 | 0, 0, 0, 0, 0, 0, 0, 0, 256, 0, |
| 1484 | 257, 181, 182, 183, 184, 0, 258, 259, 260, 189, |
| 1485 | 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, |
| 1486 | 200, 201, 148, 0, 0, 0, 0, 0, 0, 0, |
| 1487 | 261, 0, 0, 149, 0, 0, 0, 0, 0, 0, |
| 1488 | 0, 0, 0, 0, 150, 151, 0, 0, 0, 0, |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 1489 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1490 | 152, 0, 0, 0, 153, 154, 155, 156, 157, 158, |
| 1491 | 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, |
| 1492 | 169, 170, 171, 172, 173, 174, 0, 0, 0, 0, |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 1493 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1494 | 0, 0, 0, 0, 0, 0, 175, 176, 177, 0, |
| 1495 | 0, 178, 179, 180, 181, 182, 183, 184, 185, 186, |
| 1496 | 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, |
| 1497 | 197, 198, 199, 200, 201 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1498 | }; |
| 1499 | |
| 1500 | static const short int yycheck[] = |
| 1501 | { |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1502 | 38, 3, 100, 100, 51, 279, 221, 32, 503, 10, |
| 1503 | 98, 10, 29, 51, 37, 82, 33, 152, 120, 52, |
| 1504 | 53, 54, 237, 238, 4, 531, 152, 45, 152, 47, |
| 1505 | 133, 0, 135, 136, 57, 15, 162, 532, 162, 72, |
| 1506 | 546, 43, 35, 36, 147, 154, 5, 6, 7, 8, |
| 1507 | 9, 10, 11, 12, 163, 28, 57, 30, 57, 62, |
| 1508 | 98, 149, 0, 130, 5, 6, 7, 8, 9, 10, |
| 1509 | 11, 12, 29, 208, 55, 56, 152, 28, 152, 30, |
| 1510 | 118, 119, 84, 121, 160, 158, 160, 62, 152, 177, |
| 1511 | 163, 151, 180, 31, 158, 152, 34, 185, 186, 187, |
| 1512 | 188, 158, 25, 26, 42, 43, 44, 45, 46, 47, |
| 1513 | 48, 149, 160, 53, 151, 163, 56, 57, 206, 207, |
| 1514 | 125, 126, 73, 74, 75, 63, 77, 78, 79, 333, |
| 1515 | 334, 335, 30, 236, 17, 18, 161, 175, 176, 177, |
| 1516 | 178, 179, 180, 17, 18, 162, 18, 185, 186, 187, |
| 1517 | 188, 5, 6, 7, 8, 9, 10, 11, 12, 17, |
| 1518 | 18, 17, 18, 151, 202, 203, 204, 151, 206, 207, |
| 1519 | 17, 18, 239, 240, 241, 77, 78, 151, 281, 394, |
| 1520 | 151, 18, 18, 18, 156, 30, 289, 290, 291, 65, |
| 1521 | 66, 67, 68, 69, 70, 71, 154, 18, 472, 158, |
| 1522 | 474, 154, 30, 30, 27, 243, 154, 157, 157, 60, |
| 1523 | 152, 18, 18, 18, 135, 136, 18, 158, 21, 42, |
| 1524 | 43, 44, 45, 46, 47, 48, 147, 50, 21, 317, |
| 1525 | 277, 18, 21, 152, 64, 58, 156, 155, 154, 277, |
| 1526 | 154, 154, 154, 154, 154, 154, 154, 154, 154, 152, |
| 1527 | 30, 353, 354, 355, 356, 357, 152, 152, 360, 361, |
| 1528 | 362, 152, 364, 365, 152, 368, 152, 152, 315, 39, |
| 1529 | 152, 374, 152, 152, 312, 152, 30, 315, 316, 317, |
| 1530 | 155, 384, 349, 152, 387, 388, 30, 154, 376, 15, |
| 1531 | 378, 379, 380, 15, 156, 152, 30, 385, 18, 152, |
| 1532 | 152, 37, 152, 152, 152, 18, 152, 39, 152, 152, |
| 1533 | 152, 152, 414, 152, 152, 57, 30, 419, 152, 422, |
| 1534 | 423, 154, 425, 152, 427, 156, 152, 152, 431, 18, |
| 1535 | 152, 155, 152, 152, 437, 438, 439, 154, 376, 377, |
| 1536 | 378, 379, 380, 345, 152, 155, 155, 385, 386, 15, |
| 1537 | 57, 152, 152, 152, 152, 152, 458, 459, 460, 461, |
| 1538 | 281, 463, 464, 465, 152, 467, 158, 405, 289, 290, |
| 1539 | 291, 155, 155, 155, 477, 39, 155, 155, 155, 155, |
| 1540 | 155, 155, 485, 155, 487, 158, 155, 152, 15, 15, |
| 1541 | 428, 479, 480, 481, 152, 15, 15, 499, 104, 104, |
| 1542 | 104, 104, 265, 104, 104, 503, 503, 445, 511, 43, |
| 1543 | 24, 406, 130, 50, 405, 3, 29, 519, 236, 521, |
| 1544 | 522, 509, 428, 41, 557, 486, 529, 409, -1, -1, |
| 1545 | 468, -1, -1, 471, 532, 532, -1, -1, -1, -1, |
| 1546 | -1, 479, 480, 481, -1, -1, -1, 368, 486, -1, |
| 1547 | -1, 554, 555, 374, -1, -1, 559, -1, -1, 562, |
| 1548 | -1, -1, -1, 384, -1, -1, 387, 388, -1, -1, |
| 1549 | -1, 509, 3, 4, 5, 6, 7, 8, 9, 10, |
| 1550 | 11, 12, 13, 14, 15, 16, -1, -1, 19, 20, |
| 1551 | -1, -1, -1, -1, -1, -1, -1, 28, -1, 30, |
| 1552 | -1, 422, 423, -1, 425, -1, 427, -1, -1, -1, |
| 1553 | 431, -1, -1, -1, -1, -1, 437, 438, 439, 3, |
| 1554 | 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, |
| 1555 | 14, 15, 16, -1, -1, 19, 20, -1, -1, -1, |
| 1556 | -1, -1, -1, -1, 28, -1, 30, -1, -1, -1, |
| 1557 | -1, -1, -1, -1, -1, -1, 477, -1, -1, -1, |
| 1558 | -1, -1, -1, -1, 485, -1, 487, 3, 4, 5, |
| 1559 | 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, |
| 1560 | 16, -1, -1, 19, 20, -1, -1, -1, -1, -1, |
| 1561 | 511, -1, 28, -1, 30, -1, -1, -1, -1, -1, |
| 1562 | -1, -1, -1, -1, 40, -1, -1, -1, 529, -1, |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 1563 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1564 | -1, -1, 153, -1, -1, 156, -1, -1, 159, -1, |
| 1565 | 161, 162, -1, 554, 555, -1, -1, -1, 559, -1, |
| 1566 | -1, 562, -1, 3, 4, 5, 6, 7, 8, 9, |
| 1567 | 10, 11, 12, 13, 14, 15, 16, -1, -1, 19, |
| 1568 | 20, -1, -1, -1, -1, -1, -1, -1, 28, 153, |
| 1569 | 30, -1, 156, -1, -1, 159, -1, 161, 162, -1, |
| 1570 | 40, 3, 4, 5, 6, 7, 8, 9, 10, 11, |
| 1571 | 12, 13, 14, 15, 16, -1, -1, 19, 20, -1, |
| 1572 | -1, -1, -1, -1, -1, -1, 28, -1, 30, -1, |
| 1573 | -1, -1, -1, -1, -1, -1, -1, 153, -1, -1, |
| 1574 | 156, -1, -1, 159, -1, 161, 3, 4, 5, 6, |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 1575 | 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, |
| 1576 | -1, -1, 19, 20, -1, -1, -1, -1, -1, -1, |
| 1577 | -1, 28, -1, 30, -1, -1, -1, -1, -1, -1, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1578 | -1, -1, -1, 40, -1, 3, 4, 5, 6, 7, |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 1579 | 8, 9, 10, 11, 12, 13, 14, 15, 16, -1, |
| 1580 | -1, 19, 20, -1, -1, -1, -1, -1, -1, -1, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1581 | 28, -1, 30, 153, -1, -1, 156, -1, -1, 159, |
| 1582 | -1, 161, 40, 3, 4, 5, 6, 7, 8, 9, |
| 1583 | 10, 11, 12, 13, 14, 15, 16, -1, -1, 19, |
| 1584 | 20, -1, -1, -1, -1, -1, -1, -1, 28, -1, |
| 1585 | 30, 153, -1, -1, 156, -1, 158, 159, -1, 161, |
| 1586 | 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, |
| 1587 | 13, 14, 15, 16, -1, -1, 19, 20, -1, -1, |
| 1588 | -1, -1, -1, -1, -1, 28, -1, 30, -1, -1, |
| 1589 | -1, -1, -1, -1, -1, -1, 153, -1, -1, 156, |
| 1590 | -1, -1, 159, -1, 161, 3, 4, 5, 6, 7, |
| 1591 | 8, 9, 10, 11, 12, 13, 14, 15, 16, -1, |
| 1592 | -1, 19, 20, -1, -1, -1, -1, -1, -1, -1, |
| 1593 | 28, -1, 30, -1, -1, 153, -1, -1, 156, -1, |
| 1594 | -1, 159, -1, 161, 3, 4, 5, 6, 7, 8, |
| 1595 | 9, 10, 11, 12, 13, 14, 15, 16, -1, -1, |
| 1596 | 19, 20, -1, -1, -1, -1, -1, -1, -1, 28, |
| 1597 | -1, 30, -1, 153, -1, -1, 156, -1, -1, 159, |
| 1598 | -1, 161, 102, 103, 104, 105, 106, 107, 108, 109, |
| 1599 | 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, |
| 1600 | 120, 121, -1, 19, 20, -1, 22, 23, 24, -1, |
| 1601 | 153, -1, 28, 156, 30, -1, 159, -1, 161, -1, |
| 1602 | 27, 28, -1, 30, -1, -1, -1, 34, 35, 36, |
| 1603 | -1, -1, -1, -1, -1, 42, 43, 44, 45, 46, |
| 1604 | 47, 48, -1, 50, 51, -1, -1, -1, -1, -1, |
| 1605 | -1, 58, 59, -1, -1, 153, 63, -1, 156, -1, |
| 1606 | -1, 159, -1, 161, 80, 81, 82, 83, 84, 85, |
| 1607 | 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, |
| 1608 | 96, 97, 98, 99, 100, 101, -1, -1, -1, -1, |
| 1609 | -1, -1, -1, -1, 153, -1, -1, 156, -1, -1, |
| 1610 | 159, -1, 161, -1, -1, -1, -1, -1, -1, -1, |
| 1611 | -1, 127, -1, 129, 130, 131, 132, 133, -1, 135, |
| 1612 | 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, |
| 1613 | 146, 147, 148, 149, 150, -1, -1, -1, -1, -1, |
| 1614 | 156, -1, -1, 159, -1, 161, -1, -1, 164, 17, |
| 1615 | 18, 19, 20, 21, 22, 23, 24, 25, 26, -1, |
| 1616 | 28, -1, 30, -1, -1, -1, -1, -1, -1, -1, |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 1617 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1618 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1619 | -1, -1, -1, -1, 62, -1, -1, -1, -1, -1, |
| 1620 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1621 | -1, -1, 80, 81, 82, 83, 84, 85, 86, 87, |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 1622 | 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1623 | 98, 99, 100, 101, -1, -1, -1, -1, 17, 18, |
| 1624 | -1, -1, 21, 22, 23, 24, 25, 26, -1, -1, |
| 1625 | -1, -1, -1, -1, -1, -1, -1, -1, -1, 127, |
| 1626 | -1, 129, 130, 131, 132, 133, -1, 135, 136, 137, |
| 1627 | 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, |
| 1628 | 148, 149, 150, 62, -1, -1, -1, -1, -1, -1, |
| 1629 | -1, 159, -1, -1, -1, -1, -1, -1, -1, -1, |
| 1630 | -1, 80, 81, 82, 83, 84, 85, 86, 87, 88, |
| 1631 | 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, |
| 1632 | 99, 100, 101, -1, -1, -1, -1, -1, -1, -1, |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 1633 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1634 | -1, -1, -1, -1, -1, -1, -1, -1, 127, -1, |
| 1635 | 129, 130, 131, 132, 133, -1, 135, 136, 137, 138, |
| 1636 | 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, |
| 1637 | 149, 150, 38, -1, -1, -1, -1, -1, -1, -1, |
| 1638 | 159, -1, -1, 49, -1, -1, -1, -1, -1, -1, |
| 1639 | -1, -1, -1, -1, 60, 61, -1, -1, -1, -1, |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 1640 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1641 | 76, -1, -1, -1, 80, 81, 82, 83, 84, 85, |
| 1642 | 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, |
| 1643 | 96, 97, 98, 99, 100, 101, -1, -1, -1, -1, |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 1644 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1645 | -1, -1, -1, -1, -1, -1, 122, 123, 124, -1, |
| 1646 | -1, 127, 128, 129, 130, 131, 132, 133, 134, 135, |
| 1647 | 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, |
| 1648 | 146, 147, 148, 149, 150 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1649 | }; |
| 1650 | |
| 1651 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
| 1652 | symbol of state STATE-NUM. */ |
| 1653 | static const unsigned char yystos[] = |
| 1654 | { |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1655 | 0, 199, 200, 202, 0, 31, 34, 42, 43, 44, |
| 1656 | 45, 46, 47, 48, 63, 180, 215, 217, 219, 28, |
| 1657 | 30, 51, 59, 63, 179, 208, 219, 45, 47, 218, |
| 1658 | 62, 65, 66, 67, 68, 69, 70, 71, 181, 213, |
| 1659 | 29, 225, 226, 227, 52, 53, 54, 72, 205, 151, |
| 1660 | 62, 27, 45, 47, 50, 58, 180, 201, 151, 213, |
| 1661 | 30, 203, 18, 3, 4, 5, 6, 7, 8, 9, |
| 1662 | 10, 11, 12, 13, 14, 15, 16, 19, 20, 153, |
| 1663 | 156, 159, 161, 166, 188, 189, 190, 191, 192, 208, |
| 1664 | 222, 32, 161, 214, 33, 162, 216, 226, 73, 74, |
| 1665 | 75, 77, 78, 79, 179, 228, 229, 231, 151, 151, |
| 1666 | 151, 151, 156, 206, 203, 188, 35, 36, 198, 198, |
| 1667 | 198, 198, 18, 18, 18, 3, 162, 192, 193, 208, |
| 1668 | 154, 163, 3, 190, 224, 4, 15, 5, 6, 7, |
| 1669 | 8, 9, 10, 11, 12, 175, 176, 177, 38, 49, |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 1670 | 60, 61, 76, 80, 81, 82, 83, 84, 85, 86, |
| 1671 | 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 1672 | 97, 98, 99, 100, 101, 122, 123, 124, 127, 128, |
| 1673 | 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, |
| 1674 | 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, |
| 1675 | 149, 150, 168, 169, 170, 171, 173, 174, 235, 236, |
| 1676 | 238, 239, 30, 55, 56, 204, 18, 30, 30, 207, |
| 1677 | 190, 190, 4, 5, 6, 7, 8, 9, 10, 11, |
| 1678 | 12, 13, 14, 175, 176, 178, 190, 195, 190, 157, |
| 1679 | 157, 152, 162, 154, 40, 193, 194, 17, 18, 21, |
| 1680 | 22, 23, 24, 25, 26, 62, 127, 129, 135, 136, |
| 1681 | 137, 159, 168, 169, 170, 171, 173, 174, 196, 221, |
| 1682 | 222, 223, 223, 223, 223, 224, 60, 181, 190, 190, |
| 1683 | 224, 190, 190, 232, 224, 224, 224, 224, 224, 190, |
| 1684 | 190, 190, 102, 103, 104, 105, 106, 107, 108, 109, |
| 1685 | 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, |
| 1686 | 120, 121, 172, 224, 224, 181, 125, 126, 152, 158, |
| 1687 | 152, 186, 186, 25, 26, 17, 18, 167, 18, 21, |
| 1688 | 22, 23, 24, 156, 159, 161, 164, 196, 222, 186, |
| 1689 | 186, 192, 192, 192, 40, 190, 210, 211, 212, 152, |
| 1690 | 155, 64, 220, 154, 154, 154, 154, 154, 195, 197, |
| 1691 | 154, 154, 154, 172, 154, 154, 152, 152, 188, 152, |
| 1692 | 183, 152, 183, 223, 156, 152, 152, 152, 152, 152, |
| 1693 | 152, 223, 223, 223, 190, 152, 39, 188, 190, 224, |
| 1694 | 30, 37, 57, 184, 187, 158, 197, 197, 162, 197, |
| 1695 | 30, 158, 160, 208, 209, 152, 155, 40, 30, 195, |
| 1696 | 195, 195, 195, 195, 152, 160, 195, 195, 195, 154, |
| 1697 | 195, 195, 15, 15, 223, 10, 57, 10, 152, 237, |
| 1698 | 223, 156, 224, 190, 224, 224, 224, 152, 152, 152, |
| 1699 | 223, 224, 190, 223, 223, 152, 30, 18, 186, 158, |
| 1700 | 160, 162, 40, 210, 184, 185, 152, 237, 152, 152, |
| 1701 | 152, 152, 195, 152, 152, 152, 195, 152, 39, 223, |
| 1702 | 223, 154, 223, 18, 223, 224, 233, 152, 223, 152, |
| 1703 | 152, 152, 223, 223, 223, 152, 154, 190, 57, 182, |
| 1704 | 30, 155, 195, 195, 195, 195, 195, 195, 195, 152, |
| 1705 | 195, 190, 152, 156, 233, 234, 152, 183, 183, 152, |
| 1706 | 223, 152, 224, 224, 224, 223, 234, 223, 18, 152, |
| 1707 | 155, 152, 152, 155, 155, 155, 195, 155, 155, 15, |
| 1708 | 158, 177, 230, 155, 224, 158, 223, 155, 155, 195, |
| 1709 | 195, 195, 155, 223, 221, 158, 177, 39, 158, 155, |
| 1710 | 155, 155, 152, 221, 15, 15, 152, 223, 223, 15, |
| 1711 | 228, 223, 15, 223 |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 1712 | }; |
| 1713 | |
| 1714 | #define yyerrok (yyerrstatus = 0) |
| 1715 | #define yyclearin (yychar = YYEMPTY) |
| 1716 | #define YYEMPTY (-2) |
| 1717 | #define YYEOF 0 |
| 1718 | |
| 1719 | #define YYACCEPT goto yyacceptlab |
| 1720 | #define YYABORT goto yyabortlab |
| 1721 | #define YYERROR goto yyerrorlab |
| 1722 | |
| 1723 | |
| 1724 | /* Like YYERROR except do call yyerror. This remains here temporarily |
| 1725 | to ease the transition to the new meaning of YYERROR, for GCC. |
| 1726 | Once GCC version 2 has supplanted version 1, this can go. */ |
| 1727 | |
| 1728 | #define YYFAIL goto yyerrlab |
| 1729 | |
| 1730 | #define YYRECOVERING() (!!yyerrstatus) |
| 1731 | |
| 1732 | #define YYBACKUP(Token, Value) \ |
| 1733 | do \ |
| 1734 | if (yychar == YYEMPTY && yylen == 1) \ |
| 1735 | { \ |
| 1736 | yychar = (Token); \ |
| 1737 | yylval = (Value); \ |
| 1738 | yytoken = YYTRANSLATE (yychar); \ |
| 1739 | YYPOPSTACK; \ |
| 1740 | goto yybackup; \ |
| 1741 | } \ |
| 1742 | else \ |
| 1743 | { \ |
| 1744 | yyerror (YY_("syntax error: cannot back up")); \ |
| 1745 | YYERROR; \ |
| 1746 | } \ |
| 1747 | while (0) |
| 1748 | |
| 1749 | |
| 1750 | #define YYTERROR 1 |
| 1751 | #define YYERRCODE 256 |
| 1752 | |
| 1753 | |
| 1754 | /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. |
| 1755 | If N is 0, then set CURRENT to the empty location which ends |
| 1756 | the previous symbol: RHS[0] (always defined). */ |
| 1757 | |
| 1758 | #define YYRHSLOC(Rhs, K) ((Rhs)[K]) |
| 1759 | #ifndef YYLLOC_DEFAULT |
| 1760 | # define YYLLOC_DEFAULT(Current, Rhs, N) \ |
| 1761 | do \ |
| 1762 | if (N) \ |
| 1763 | { \ |
| 1764 | (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ |
| 1765 | (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ |
| 1766 | (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ |
| 1767 | (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ |
| 1768 | } \ |
| 1769 | else \ |
| 1770 | { \ |
| 1771 | (Current).first_line = (Current).last_line = \ |
| 1772 | YYRHSLOC (Rhs, 0).last_line; \ |
| 1773 | (Current).first_column = (Current).last_column = \ |
| 1774 | YYRHSLOC (Rhs, 0).last_column; \ |
| 1775 | } \ |
| 1776 | while (0) |
| 1777 | #endif |
| 1778 | |
| 1779 | |
| 1780 | /* YY_LOCATION_PRINT -- Print the location on the stream. |
| 1781 | This macro was not mandated originally: define only if we know |
| 1782 | we won't break user code: when these are the locations we know. */ |
| 1783 | |
| 1784 | #ifndef YY_LOCATION_PRINT |
| 1785 | # if YYLTYPE_IS_TRIVIAL |
| 1786 | # define YY_LOCATION_PRINT(File, Loc) \ |
| 1787 | fprintf (File, "%d.%d-%d.%d", \ |
| 1788 | (Loc).first_line, (Loc).first_column, \ |
| 1789 | (Loc).last_line, (Loc).last_column) |
| 1790 | # else |
| 1791 | # define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
| 1792 | # endif |
| 1793 | #endif |
| 1794 | |
| 1795 | |
| 1796 | /* YYLEX -- calling `yylex' with the right arguments. */ |
| 1797 | |
| 1798 | #ifdef YYLEX_PARAM |
| 1799 | # define YYLEX yylex (YYLEX_PARAM) |
| 1800 | #else |
| 1801 | # define YYLEX yylex () |
| 1802 | #endif |
| 1803 | |
| 1804 | /* Enable debugging if requested. */ |
| 1805 | #if YYDEBUG |
| 1806 | |
| 1807 | # ifndef YYFPRINTF |
| 1808 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
| 1809 | # define YYFPRINTF fprintf |
| 1810 | # endif |
| 1811 | |
| 1812 | # define YYDPRINTF(Args) \ |
| 1813 | do { \ |
| 1814 | if (yydebug) \ |
| 1815 | YYFPRINTF Args; \ |
| 1816 | } while (0) |
| 1817 | |
| 1818 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
| 1819 | do { \ |
| 1820 | if (yydebug) \ |
| 1821 | { \ |
| 1822 | YYFPRINTF (stderr, "%s ", Title); \ |
| 1823 | yysymprint (stderr, \ |
| 1824 | Type, Value); \ |
| 1825 | YYFPRINTF (stderr, "\n"); \ |
| 1826 | } \ |
| 1827 | } while (0) |
| 1828 | |
| 1829 | /*------------------------------------------------------------------. |
| 1830 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
| 1831 | | TOP (included). | |
| 1832 | `------------------------------------------------------------------*/ |
| 1833 | |
| 1834 | #if defined (__STDC__) || defined (__cplusplus) |
| 1835 | static void |
| 1836 | yy_stack_print (short int *bottom, short int *top) |
| 1837 | #else |
| 1838 | static void |
| 1839 | yy_stack_print (bottom, top) |
| 1840 | short int *bottom; |
| 1841 | short int *top; |
| 1842 | #endif |
| 1843 | { |
| 1844 | YYFPRINTF (stderr, "Stack now"); |
| 1845 | for (/* Nothing. */; bottom <= top; ++bottom) |
| 1846 | YYFPRINTF (stderr, " %d", *bottom); |
| 1847 | YYFPRINTF (stderr, "\n"); |
| 1848 | } |
| 1849 | |
| 1850 | # define YY_STACK_PRINT(Bottom, Top) \ |
| 1851 | do { \ |
| 1852 | if (yydebug) \ |
| 1853 | yy_stack_print ((Bottom), (Top)); \ |
| 1854 | } while (0) |
| 1855 | |
| 1856 | |
| 1857 | /*------------------------------------------------. |
| 1858 | | Report that the YYRULE is going to be reduced. | |
| 1859 | `------------------------------------------------*/ |
| 1860 | |
| 1861 | #if defined (__STDC__) || defined (__cplusplus) |
| 1862 | static void |
| 1863 | yy_reduce_print (int yyrule) |
| 1864 | #else |
| 1865 | static void |
| 1866 | yy_reduce_print (yyrule) |
| 1867 | int yyrule; |
| 1868 | #endif |
| 1869 | { |
| 1870 | int yyi; |
| 1871 | unsigned long int yylno = yyrline[yyrule]; |
| 1872 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ", |
| 1873 | yyrule - 1, yylno); |
| 1874 | /* Print the symbols being reduced, and their result. */ |
| 1875 | for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) |
| 1876 | YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); |
| 1877 | YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]); |
| 1878 | } |
| 1879 | |
| 1880 | # define YY_REDUCE_PRINT(Rule) \ |
| 1881 | do { \ |
| 1882 | if (yydebug) \ |
| 1883 | yy_reduce_print (Rule); \ |
| 1884 | } while (0) |
| 1885 | |
| 1886 | /* Nonzero means print parse trace. It is left uninitialized so that |
| 1887 | multiple parsers can coexist. */ |
| 1888 | int yydebug; |
| 1889 | #else /* !YYDEBUG */ |
| 1890 | # define YYDPRINTF(Args) |
| 1891 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
| 1892 | # define YY_STACK_PRINT(Bottom, Top) |
| 1893 | # define YY_REDUCE_PRINT(Rule) |
| 1894 | #endif /* !YYDEBUG */ |
| 1895 | |
| 1896 | |
| 1897 | /* YYINITDEPTH -- initial size of the parser's stacks. */ |
| 1898 | #ifndef YYINITDEPTH |
| 1899 | # define YYINITDEPTH 200 |
| 1900 | #endif |
| 1901 | |
| 1902 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
| 1903 | if the built-in stack extension method is used). |
| 1904 | |
| 1905 | Do not make this value too large; the results are undefined if |
| 1906 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
| 1907 | evaluated with infinite-precision integer arithmetic. */ |
| 1908 | |
| 1909 | #ifndef YYMAXDEPTH |
| 1910 | # define YYMAXDEPTH 10000 |
| 1911 | #endif |
| 1912 | |
| 1913 | |
| 1914 | |
| 1915 | #if YYERROR_VERBOSE |
| 1916 | |
| 1917 | # ifndef yystrlen |
| 1918 | # if defined (__GLIBC__) && defined (_STRING_H) |
| 1919 | # define yystrlen strlen |
| 1920 | # else |
| 1921 | /* Return the length of YYSTR. */ |
| 1922 | static YYSIZE_T |
| 1923 | # if defined (__STDC__) || defined (__cplusplus) |
| 1924 | yystrlen (const char *yystr) |
| 1925 | # else |
| 1926 | yystrlen (yystr) |
| 1927 | const char *yystr; |
| 1928 | # endif |
| 1929 | { |
| 1930 | const char *yys = yystr; |
| 1931 | |
| 1932 | while (*yys++ != '\0') |
| 1933 | continue; |
| 1934 | |
| 1935 | return yys - yystr - 1; |
| 1936 | } |
| 1937 | # endif |
| 1938 | # endif |
| 1939 | |
| 1940 | # ifndef yystpcpy |
| 1941 | # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) |
| 1942 | # define yystpcpy stpcpy |
| 1943 | # else |
| 1944 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
| 1945 | YYDEST. */ |
| 1946 | static char * |
| 1947 | # if defined (__STDC__) || defined (__cplusplus) |
| 1948 | yystpcpy (char *yydest, const char *yysrc) |
| 1949 | # else |
| 1950 | yystpcpy (yydest, yysrc) |
| 1951 | char *yydest; |
| 1952 | const char *yysrc; |
| 1953 | # endif |
| 1954 | { |
| 1955 | char *yyd = yydest; |
| 1956 | const char *yys = yysrc; |
| 1957 | |
| 1958 | while ((*yyd++ = *yys++) != '\0') |
| 1959 | continue; |
| 1960 | |
| 1961 | return yyd - 1; |
| 1962 | } |
| 1963 | # endif |
| 1964 | # endif |
| 1965 | |
| 1966 | # ifndef yytnamerr |
| 1967 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
| 1968 | quotes and backslashes, so that it's suitable for yyerror. The |
| 1969 | heuristic is that double-quoting is unnecessary unless the string |
| 1970 | contains an apostrophe, a comma, or backslash (other than |
| 1971 | backslash-backslash). YYSTR is taken from yytname. If YYRES is |
| 1972 | null, do not copy; instead, return the length of what the result |
| 1973 | would have been. */ |
| 1974 | static YYSIZE_T |
| 1975 | yytnamerr (char *yyres, const char *yystr) |
| 1976 | { |
| 1977 | if (*yystr == '"') |
| 1978 | { |
| 1979 | size_t yyn = 0; |
| 1980 | char const *yyp = yystr; |
| 1981 | |
| 1982 | for (;;) |
| 1983 | switch (*++yyp) |
| 1984 | { |
| 1985 | case '\'': |
| 1986 | case ',': |
| 1987 | goto do_not_strip_quotes; |
| 1988 | |
| 1989 | case '\\': |
| 1990 | if (*++yyp != '\\') |
| 1991 | goto do_not_strip_quotes; |
| 1992 | /* Fall through. */ |
| 1993 | default: |
| 1994 | if (yyres) |
| 1995 | yyres[yyn] = *yyp; |
| 1996 | yyn++; |
| 1997 | break; |
| 1998 | |
| 1999 | case '"': |
| 2000 | if (yyres) |
| 2001 | yyres[yyn] = '\0'; |
| 2002 | return yyn; |
| 2003 | } |
| 2004 | do_not_strip_quotes: ; |
| 2005 | } |
| 2006 | |
| 2007 | if (! yyres) |
| 2008 | return yystrlen (yystr); |
| 2009 | |
| 2010 | return yystpcpy (yyres, yystr) - yyres; |
| 2011 | } |
| 2012 | # endif |
| 2013 | |
| 2014 | #endif /* YYERROR_VERBOSE */ |
| 2015 | |
| 2016 | |
| 2017 | |
| 2018 | #if YYDEBUG |
| 2019 | /*--------------------------------. |
| 2020 | | Print this symbol on YYOUTPUT. | |
| 2021 | `--------------------------------*/ |
| 2022 | |
| 2023 | #if defined (__STDC__) || defined (__cplusplus) |
| 2024 | static void |
| 2025 | yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) |
| 2026 | #else |
| 2027 | static void |
| 2028 | yysymprint (yyoutput, yytype, yyvaluep) |
| 2029 | FILE *yyoutput; |
| 2030 | int yytype; |
| 2031 | YYSTYPE *yyvaluep; |
| 2032 | #endif |
| 2033 | { |
| 2034 | /* Pacify ``unused variable'' warnings. */ |
| 2035 | (void) yyvaluep; |
| 2036 | |
| 2037 | if (yytype < YYNTOKENS) |
| 2038 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); |
| 2039 | else |
| 2040 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); |
| 2041 | |
| 2042 | |
| 2043 | # ifdef YYPRINT |
| 2044 | if (yytype < YYNTOKENS) |
| 2045 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
| 2046 | # endif |
| 2047 | switch (yytype) |
| 2048 | { |
| 2049 | default: |
| 2050 | break; |
| 2051 | } |
| 2052 | YYFPRINTF (yyoutput, ")"); |
| 2053 | } |
| 2054 | |
| 2055 | #endif /* ! YYDEBUG */ |
| 2056 | /*-----------------------------------------------. |
| 2057 | | Release the memory associated to this symbol. | |
| 2058 | `-----------------------------------------------*/ |
| 2059 | |
| 2060 | #if defined (__STDC__) || defined (__cplusplus) |
| 2061 | static void |
| 2062 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) |
| 2063 | #else |
| 2064 | static void |
| 2065 | yydestruct (yymsg, yytype, yyvaluep) |
| 2066 | const char *yymsg; |
| 2067 | int yytype; |
| 2068 | YYSTYPE *yyvaluep; |
| 2069 | #endif |
| 2070 | { |
| 2071 | /* Pacify ``unused variable'' warnings. */ |
| 2072 | (void) yyvaluep; |
| 2073 | |
| 2074 | if (!yymsg) |
| 2075 | yymsg = "Deleting"; |
| 2076 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
| 2077 | |
| 2078 | switch (yytype) |
| 2079 | { |
| 2080 | |
| 2081 | default: |
| 2082 | break; |
| 2083 | } |
| 2084 | } |
| 2085 | |
| 2086 | |
| 2087 | /* Prevent warnings from -Wmissing-prototypes. */ |
| 2088 | |
| 2089 | #ifdef YYPARSE_PARAM |
| 2090 | # if defined (__STDC__) || defined (__cplusplus) |
| 2091 | int yyparse (void *YYPARSE_PARAM); |
| 2092 | # else |
| 2093 | int yyparse (); |
| 2094 | # endif |
| 2095 | #else /* ! YYPARSE_PARAM */ |
| 2096 | #if defined (__STDC__) || defined (__cplusplus) |
| 2097 | int yyparse (void); |
| 2098 | #else |
| 2099 | int yyparse (); |
| 2100 | #endif |
| 2101 | #endif /* ! YYPARSE_PARAM */ |
| 2102 | |
| 2103 | |
| 2104 | |
| 2105 | /* The look-ahead symbol. */ |
| 2106 | int yychar; |
| 2107 | |
| 2108 | /* The semantic value of the look-ahead symbol. */ |
| 2109 | YYSTYPE yylval; |
| 2110 | |
| 2111 | /* Number of syntax errors so far. */ |
| 2112 | int yynerrs; |
| 2113 | |
| 2114 | |
| 2115 | |
| 2116 | /*----------. |
| 2117 | | yyparse. | |
| 2118 | `----------*/ |
| 2119 | |
| 2120 | #ifdef YYPARSE_PARAM |
| 2121 | # if defined (__STDC__) || defined (__cplusplus) |
| 2122 | int yyparse (void *YYPARSE_PARAM) |
| 2123 | # else |
| 2124 | int yyparse (YYPARSE_PARAM) |
| 2125 | void *YYPARSE_PARAM; |
| 2126 | # endif |
| 2127 | #else /* ! YYPARSE_PARAM */ |
| 2128 | #if defined (__STDC__) || defined (__cplusplus) |
| 2129 | int |
| 2130 | yyparse (void) |
| 2131 | #else |
| 2132 | int |
| 2133 | yyparse () |
| 2134 | |
| 2135 | #endif |
| 2136 | #endif |
| 2137 | { |
| 2138 | |
| 2139 | int yystate; |
| 2140 | int yyn; |
| 2141 | int yyresult; |
| 2142 | /* Number of tokens to shift before error messages enabled. */ |
| 2143 | int yyerrstatus; |
| 2144 | /* Look-ahead token as an internal (translated) token number. */ |
| 2145 | int yytoken = 0; |
| 2146 | |
| 2147 | /* Three stacks and their tools: |
| 2148 | `yyss': related to states, |
| 2149 | `yyvs': related to semantic values, |
| 2150 | `yyls': related to locations. |
| 2151 | |
| 2152 | Refer to the stacks thru separate pointers, to allow yyoverflow |
| 2153 | to reallocate them elsewhere. */ |
| 2154 | |
| 2155 | /* The state stack. */ |
| 2156 | short int yyssa[YYINITDEPTH]; |
| 2157 | short int *yyss = yyssa; |
| 2158 | short int *yyssp; |
| 2159 | |
| 2160 | /* The semantic value stack. */ |
| 2161 | YYSTYPE yyvsa[YYINITDEPTH]; |
| 2162 | YYSTYPE *yyvs = yyvsa; |
| 2163 | YYSTYPE *yyvsp; |
| 2164 | |
| 2165 | |
| 2166 | |
| 2167 | #define YYPOPSTACK (yyvsp--, yyssp--) |
| 2168 | |
| 2169 | YYSIZE_T yystacksize = YYINITDEPTH; |
| 2170 | |
| 2171 | /* The variables used to return semantic value and location from the |
| 2172 | action routines. */ |
| 2173 | YYSTYPE yyval; |
| 2174 | |
| 2175 | |
| 2176 | /* When reducing, the number of symbols on the RHS of the reduced |
| 2177 | rule. */ |
| 2178 | int yylen; |
| 2179 | |
| 2180 | YYDPRINTF ((stderr, "Starting parse\n")); |
| 2181 | |
| 2182 | yystate = 0; |
| 2183 | yyerrstatus = 0; |
| 2184 | yynerrs = 0; |
| 2185 | yychar = YYEMPTY; /* Cause a token to be read. */ |
| 2186 | |
| 2187 | /* Initialize stack pointers. |
| 2188 | Waste one element of value and location stack |
| 2189 | so that they stay on the same level as the state stack. |
| 2190 | The wasted elements are never initialized. */ |
| 2191 | |
| 2192 | yyssp = yyss; |
| 2193 | yyvsp = yyvs; |
| 2194 | |
| 2195 | goto yysetstate; |
| 2196 | |
| 2197 | /*------------------------------------------------------------. |
| 2198 | | yynewstate -- Push a new state, which is found in yystate. | |
| 2199 | `------------------------------------------------------------*/ |
| 2200 | yynewstate: |
| 2201 | /* In all cases, when you get here, the value and location stacks |
| 2202 | have just been pushed. so pushing a state here evens the stacks. |
| 2203 | */ |
| 2204 | yyssp++; |
| 2205 | |
| 2206 | yysetstate: |
| 2207 | *yyssp = yystate; |
| 2208 | |
| 2209 | if (yyss + yystacksize - 1 <= yyssp) |
| 2210 | { |
| 2211 | /* Get the current used size of the three stacks, in elements. */ |
| 2212 | YYSIZE_T yysize = yyssp - yyss + 1; |
| 2213 | |
| 2214 | #ifdef yyoverflow |
| 2215 | { |
| 2216 | /* Give user a chance to reallocate the stack. Use copies of |
| 2217 | these so that the &'s don't force the real ones into |
| 2218 | memory. */ |
| 2219 | YYSTYPE *yyvs1 = yyvs; |
| 2220 | short int *yyss1 = yyss; |
| 2221 | |
| 2222 | |
| 2223 | /* Each stack pointer address is followed by the size of the |
| 2224 | data in use in that stack, in bytes. This used to be a |
| 2225 | conditional around just the two extra args, but that might |
| 2226 | be undefined if yyoverflow is a macro. */ |
| 2227 | yyoverflow (YY_("memory exhausted"), |
| 2228 | &yyss1, yysize * sizeof (*yyssp), |
| 2229 | &yyvs1, yysize * sizeof (*yyvsp), |
| 2230 | |
| 2231 | &yystacksize); |
| 2232 | |
| 2233 | yyss = yyss1; |
| 2234 | yyvs = yyvs1; |
| 2235 | } |
| 2236 | #else /* no yyoverflow */ |
| 2237 | # ifndef YYSTACK_RELOCATE |
| 2238 | goto yyexhaustedlab; |
| 2239 | # else |
| 2240 | /* Extend the stack our own way. */ |
| 2241 | if (YYMAXDEPTH <= yystacksize) |
| 2242 | goto yyexhaustedlab; |
| 2243 | yystacksize *= 2; |
| 2244 | if (YYMAXDEPTH < yystacksize) |
| 2245 | yystacksize = YYMAXDEPTH; |
| 2246 | |
| 2247 | { |
| 2248 | short int *yyss1 = yyss; |
| 2249 | union yyalloc *yyptr = |
| 2250 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
| 2251 | if (! yyptr) |
| 2252 | goto yyexhaustedlab; |
| 2253 | YYSTACK_RELOCATE (yyss); |
| 2254 | YYSTACK_RELOCATE (yyvs); |
| 2255 | |
| 2256 | # undef YYSTACK_RELOCATE |
| 2257 | if (yyss1 != yyssa) |
| 2258 | YYSTACK_FREE (yyss1); |
| 2259 | } |
| 2260 | # endif |
| 2261 | #endif /* no yyoverflow */ |
| 2262 | |
| 2263 | yyssp = yyss + yysize - 1; |
| 2264 | yyvsp = yyvs + yysize - 1; |
| 2265 | |
| 2266 | |
| 2267 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
| 2268 | (unsigned long int) yystacksize)); |
| 2269 | |
| 2270 | if (yyss + yystacksize - 1 <= yyssp) |
| 2271 | YYABORT; |
| 2272 | } |
| 2273 | |
| 2274 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
| 2275 | |
| 2276 | goto yybackup; |
| 2277 | |
| 2278 | /*-----------. |
| 2279 | | yybackup. | |
| 2280 | `-----------*/ |
| 2281 | yybackup: |
| 2282 | |
| 2283 | /* Do appropriate processing given the current state. */ |
| 2284 | /* Read a look-ahead token if we need one and don't already have one. */ |
| 2285 | /* yyresume: */ |
| 2286 | |
| 2287 | /* First try to decide what to do without reference to look-ahead token. */ |
| 2288 | |
| 2289 | yyn = yypact[yystate]; |
| 2290 | if (yyn == YYPACT_NINF) |
| 2291 | goto yydefault; |
| 2292 | |
| 2293 | /* Not known => get a look-ahead token if don't already have one. */ |
| 2294 | |
| 2295 | /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ |
| 2296 | if (yychar == YYEMPTY) |
| 2297 | { |
| 2298 | YYDPRINTF ((stderr, "Reading a token: ")); |
| 2299 | yychar = YYLEX; |
| 2300 | } |
| 2301 | |
| 2302 | if (yychar <= YYEOF) |
| 2303 | { |
| 2304 | yychar = yytoken = YYEOF; |
| 2305 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
| 2306 | } |
| 2307 | else |
| 2308 | { |
| 2309 | yytoken = YYTRANSLATE (yychar); |
| 2310 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
| 2311 | } |
| 2312 | |
| 2313 | /* If the proper action on seeing token YYTOKEN is to reduce or to |
| 2314 | detect an error, take that action. */ |
| 2315 | yyn += yytoken; |
| 2316 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
| 2317 | goto yydefault; |
| 2318 | yyn = yytable[yyn]; |
| 2319 | if (yyn <= 0) |
| 2320 | { |
| 2321 | if (yyn == 0 || yyn == YYTABLE_NINF) |
| 2322 | goto yyerrlab; |
| 2323 | yyn = -yyn; |
| 2324 | goto yyreduce; |
| 2325 | } |
| 2326 | |
| 2327 | if (yyn == YYFINAL) |
| 2328 | YYACCEPT; |
| 2329 | |
| 2330 | /* Shift the look-ahead token. */ |
| 2331 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
| 2332 | |
| 2333 | /* Discard the token being shifted unless it is eof. */ |
| 2334 | if (yychar != YYEOF) |
| 2335 | yychar = YYEMPTY; |
| 2336 | |
| 2337 | *++yyvsp = yylval; |
| 2338 | |
| 2339 | |
| 2340 | /* Count tokens shifted since error; after three, turn off error |
| 2341 | status. */ |
| 2342 | if (yyerrstatus) |
| 2343 | yyerrstatus--; |
| 2344 | |
| 2345 | yystate = yyn; |
| 2346 | goto yynewstate; |
| 2347 | |
| 2348 | |
| 2349 | /*-----------------------------------------------------------. |
| 2350 | | yydefault -- do the default action for the current state. | |
| 2351 | `-----------------------------------------------------------*/ |
| 2352 | yydefault: |
| 2353 | yyn = yydefact[yystate]; |
| 2354 | if (yyn == 0) |
| 2355 | goto yyerrlab; |
| 2356 | goto yyreduce; |
| 2357 | |
| 2358 | |
| 2359 | /*-----------------------------. |
| 2360 | | yyreduce -- Do a reduction. | |
| 2361 | `-----------------------------*/ |
| 2362 | yyreduce: |
| 2363 | /* yyn is the number of a rule to reduce with. */ |
| 2364 | yylen = yyr2[yyn]; |
| 2365 | |
| 2366 | /* If YYLEN is nonzero, implement the default value of the action: |
| 2367 | `$$ = $1'. |
| 2368 | |
| 2369 | Otherwise, the following line sets YYVAL to garbage. |
| 2370 | This behavior is undocumented and Bison |
| 2371 | users should not rely upon it. Assigning to YYVAL |
| 2372 | unconditionally makes the parser a bit smaller, and it avoids a |
| 2373 | GCC warning that YYVAL may be used uninitialized. */ |
| 2374 | yyval = yyvsp[1-yylen]; |
| 2375 | |
| 2376 | |
| 2377 | YY_REDUCE_PRINT (yyn); |
| 2378 | switch (yyn) |
| 2379 | { |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2380 | case 77: |
| 2381 | #line 356 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2382 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2383 | (yyval.String) = (yyvsp[-1].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2384 | ;} |
| 2385 | break; |
| 2386 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2387 | case 78: |
| 2388 | #line 359 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2389 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2390 | (yyval.String) = new std::string(""); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2391 | ;} |
| 2392 | break; |
| 2393 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2394 | case 86: |
| 2395 | #line 366 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2396 | { (yyval.String) = new std::string(""); ;} |
| 2397 | break; |
| 2398 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2399 | case 93: |
| 2400 | #line 371 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 16244f4 | 2006-12-01 21:10:07 +0000 | [diff] [blame] | 2401 | { |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 2402 | *(yyvsp[-1].String) += *(yyvsp[0].String); |
| 2403 | delete (yyvsp[0].String); |
Reid Spencer | 16244f4 | 2006-12-01 21:10:07 +0000 | [diff] [blame] | 2404 | (yyval.String) = (yyvsp[-1].String); |
| 2405 | ;} |
| 2406 | break; |
| 2407 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2408 | case 94: |
| 2409 | #line 376 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2410 | { (yyval.String) = new std::string(""); ;} |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2411 | break; |
| 2412 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2413 | case 95: |
| 2414 | #line 381 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 2415 | { (yyval.String) = new std::string(); ;} |
| 2416 | break; |
| 2417 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2418 | case 96: |
| 2419 | #line 382 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2420 | { *(yyvsp[-1].String) += " " + *(yyvsp[0].String); delete (yyvsp[0].String); (yyval.String) = (yyvsp[-1].String); ;} |
| 2421 | break; |
| 2422 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2423 | case 97: |
| 2424 | #line 385 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2425 | { (yyval.String) = new std::string(); ;} |
| 2426 | break; |
| 2427 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2428 | case 98: |
| 2429 | #line 386 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2430 | { |
| 2431 | (yyvsp[-1].String)->insert(0, ", "); |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 2432 | *(yyvsp[-1].String) += " " + *(yyvsp[0].String); |
| 2433 | delete (yyvsp[0].String); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2434 | (yyval.String) = (yyvsp[-1].String); |
| 2435 | ;} |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2436 | break; |
| 2437 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2438 | case 99: |
| 2439 | #line 394 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2440 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2441 | *(yyvsp[-1].String) += " " + *(yyvsp[0].String); |
| 2442 | delete (yyvsp[0].String); |
| 2443 | (yyval.String) = (yyvsp[-1].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2444 | ;} |
| 2445 | break; |
| 2446 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2447 | case 100: |
| 2448 | #line 400 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 2449 | { (yyval.String) = new std::string(); ;} |
| 2450 | break; |
| 2451 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2452 | case 102: |
| 2453 | #line 404 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2454 | { (yyval.String) = new std::string(); ;} |
| 2455 | break; |
| 2456 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2457 | case 103: |
| 2458 | #line 405 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2459 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2460 | (yyvsp[-1].String)->insert(0, ", "); |
| 2461 | if (!(yyvsp[0].String)->empty()) |
| 2462 | *(yyvsp[-1].String) += " " + *(yyvsp[0].String); |
| 2463 | delete (yyvsp[0].String); |
| 2464 | (yyval.String) = (yyvsp[-1].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2465 | ;} |
| 2466 | break; |
| 2467 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2468 | case 105: |
| 2469 | #line 415 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2470 | { |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 2471 | *(yyvsp[-1].String) += " " + *(yyvsp[0].String); |
| 2472 | delete (yyvsp[0].String); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2473 | (yyval.String) = (yyvsp[-1].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2474 | ;} |
| 2475 | break; |
| 2476 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2477 | case 123: |
| 2478 | #line 437 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2479 | { |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 2480 | (yyval.Type).newTy = (yyvsp[0].String); |
| 2481 | (yyval.Type).oldTy = OpaqueTy; |
| 2482 | ;} |
| 2483 | break; |
| 2484 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2485 | case 124: |
| 2486 | #line 441 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 2487 | { |
| 2488 | (yyval.Type).newTy = (yyvsp[0].String); |
| 2489 | (yyval.Type).oldTy = UnresolvedTy; |
| 2490 | ;} |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2491 | break; |
| 2492 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2493 | case 125: |
| 2494 | #line 445 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2495 | { |
| 2496 | (yyval.Type) = (yyvsp[0].Type); |
| 2497 | ;} |
| 2498 | break; |
| 2499 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2500 | case 126: |
| 2501 | #line 448 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2502 | { // Type UpReference |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 2503 | (yyvsp[0].String)->insert(0, "\\"); |
| 2504 | (yyval.Type).newTy = (yyvsp[0].String); |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 2505 | (yyval.Type).oldTy = NumericTy; |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2506 | ;} |
| 2507 | break; |
| 2508 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2509 | case 127: |
| 2510 | #line 453 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2511 | { // Function derived type? |
| 2512 | *(yyvsp[-3].Type).newTy += "( " + *(yyvsp[-1].String) + " )"; |
| 2513 | delete (yyvsp[-1].String); |
| 2514 | (yyval.Type).newTy = (yyvsp[-3].Type).newTy; |
| 2515 | (yyval.Type).oldTy = FunctionTy; |
| 2516 | ;} |
| 2517 | break; |
| 2518 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2519 | case 128: |
| 2520 | #line 459 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2521 | { // Sized array type? |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 2522 | (yyvsp[-3].String)->insert(0,"[ "); |
| 2523 | *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " ]"; |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2524 | delete (yyvsp[-1].Type).newTy; |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 2525 | (yyval.Type).newTy = (yyvsp[-3].String); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2526 | (yyval.Type).oldTy = ArrayTy; |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2527 | (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2528 | ;} |
| 2529 | break; |
| 2530 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2531 | case 129: |
| 2532 | #line 467 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2533 | { // Packed array type? |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 2534 | (yyvsp[-3].String)->insert(0,"< "); |
| 2535 | *(yyvsp[-3].String) += " x " + *(yyvsp[-1].Type).newTy + " >"; |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2536 | delete (yyvsp[-1].Type).newTy; |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 2537 | (yyval.Type).newTy = (yyvsp[-3].String); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2538 | (yyval.Type).oldTy = PackedTy; |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2539 | (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2540 | ;} |
| 2541 | break; |
| 2542 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2543 | case 130: |
| 2544 | #line 475 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2545 | { // Structure type? |
| 2546 | (yyvsp[-1].String)->insert(0, "{ "); |
| 2547 | *(yyvsp[-1].String) += " }"; |
| 2548 | (yyval.Type).newTy = (yyvsp[-1].String); |
| 2549 | (yyval.Type).oldTy = StructTy; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2550 | ;} |
| 2551 | break; |
| 2552 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2553 | case 131: |
| 2554 | #line 481 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2555 | { // Empty structure type? |
Reid Spencer | 0b7e507 | 2006-12-01 22:42:01 +0000 | [diff] [blame] | 2556 | (yyval.Type).newTy = new std::string("{}"); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2557 | (yyval.Type).oldTy = StructTy; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2558 | ;} |
| 2559 | break; |
| 2560 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2561 | case 132: |
| 2562 | #line 485 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2563 | { // Pointer type? |
| 2564 | *(yyvsp[-1].Type).newTy += '*'; |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2565 | (yyval.Type).elemTy = (yyvsp[-1].Type).oldTy; |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2566 | (yyvsp[-1].Type).oldTy = PointerTy; |
| 2567 | (yyval.Type) = (yyvsp[-1].Type); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2568 | ;} |
| 2569 | break; |
| 2570 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2571 | case 133: |
| 2572 | #line 496 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2573 | { |
| 2574 | (yyval.String) = (yyvsp[0].Type).newTy; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2575 | ;} |
| 2576 | break; |
| 2577 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2578 | case 134: |
| 2579 | #line 499 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2580 | { |
| 2581 | *(yyvsp[-2].String) += ", " + *(yyvsp[0].Type).newTy; |
| 2582 | delete (yyvsp[0].Type).newTy; |
| 2583 | (yyval.String) = (yyvsp[-2].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2584 | ;} |
| 2585 | break; |
| 2586 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2587 | case 136: |
| 2588 | #line 508 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2589 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2590 | *(yyvsp[-2].String) += ", ..."; |
| 2591 | delete (yyvsp[0].String); |
| 2592 | (yyval.String) = (yyvsp[-2].String); |
| 2593 | ;} |
| 2594 | break; |
| 2595 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2596 | case 137: |
| 2597 | #line 513 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2598 | { |
| 2599 | (yyval.String) = (yyvsp[0].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2600 | ;} |
| 2601 | break; |
| 2602 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2603 | case 138: |
| 2604 | #line 516 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2605 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2606 | (yyval.String) = new std::string(); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2607 | ;} |
| 2608 | break; |
| 2609 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2610 | case 139: |
| 2611 | #line 526 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2612 | { // Nonempty unsized arr |
| 2613 | (yyval.Const).type = (yyvsp[-3].Type); |
| 2614 | (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy); |
| 2615 | *(yyval.Const).cnst += " [ " + *(yyvsp[-1].String) + " ]"; |
| 2616 | delete (yyvsp[-1].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2617 | ;} |
| 2618 | break; |
| 2619 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2620 | case 140: |
| 2621 | #line 532 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2622 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2623 | (yyval.Const).type = (yyvsp[-2].Type); |
| 2624 | (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy); |
| 2625 | *(yyval.Const).cnst += "[ ]"; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2626 | ;} |
| 2627 | break; |
| 2628 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2629 | case 141: |
| 2630 | #line 537 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2631 | { |
| 2632 | (yyval.Const).type = (yyvsp[-2].Type); |
| 2633 | (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy); |
| 2634 | *(yyval.Const).cnst += " c" + *(yyvsp[0].String); |
| 2635 | delete (yyvsp[0].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2636 | ;} |
| 2637 | break; |
| 2638 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2639 | case 142: |
| 2640 | #line 543 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2641 | { // Nonempty unsized arr |
| 2642 | (yyval.Const).type = (yyvsp[-3].Type); |
| 2643 | (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy); |
| 2644 | *(yyval.Const).cnst += " < " + *(yyvsp[-1].String) + " >"; |
| 2645 | delete (yyvsp[-1].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2646 | ;} |
| 2647 | break; |
| 2648 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2649 | case 143: |
| 2650 | #line 549 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2651 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2652 | (yyval.Const).type = (yyvsp[-3].Type); |
| 2653 | (yyval.Const).cnst = new std::string(*(yyvsp[-3].Type).newTy); |
| 2654 | *(yyval.Const).cnst += " { " + *(yyvsp[-1].String) + " }"; |
| 2655 | delete (yyvsp[-1].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2656 | ;} |
| 2657 | break; |
| 2658 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2659 | case 144: |
| 2660 | #line 555 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2661 | { |
| 2662 | (yyval.Const).type = (yyvsp[-2].Type); |
| 2663 | (yyval.Const).cnst = new std::string(*(yyvsp[-2].Type).newTy); |
Reid Spencer | 0b7e507 | 2006-12-01 22:42:01 +0000 | [diff] [blame] | 2664 | *(yyval.Const).cnst += " {}"; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2665 | ;} |
| 2666 | break; |
| 2667 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2668 | case 145: |
| 2669 | #line 560 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2670 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2671 | (yyval.Const).type = (yyvsp[-1].Type); |
| 2672 | (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy); |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 2673 | *(yyval.Const).cnst += " " + *(yyvsp[0].String); |
| 2674 | delete (yyvsp[0].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2675 | ;} |
| 2676 | break; |
| 2677 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2678 | case 146: |
| 2679 | #line 566 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2680 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2681 | (yyval.Const).type = (yyvsp[-1].Type); |
| 2682 | (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy); |
| 2683 | *(yyval.Const).cnst += " " + *(yyvsp[0].String); |
| 2684 | delete (yyvsp[0].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2685 | ;} |
| 2686 | break; |
| 2687 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2688 | case 147: |
| 2689 | #line 572 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2690 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2691 | (yyval.Const).type = (yyvsp[-1].Type); |
| 2692 | (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy); |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 2693 | *(yyval.Const).cnst += " " + *(yyvsp[0].String); |
| 2694 | delete (yyvsp[0].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2695 | ;} |
| 2696 | break; |
| 2697 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2698 | case 148: |
| 2699 | #line 578 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2700 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2701 | (yyval.Const).type = (yyvsp[-1].Type); |
| 2702 | (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy); |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 2703 | *(yyval.Const).cnst += " " + *(yyvsp[0].String); |
| 2704 | delete (yyvsp[0].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2705 | ;} |
| 2706 | break; |
| 2707 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2708 | case 149: |
| 2709 | #line 584 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2710 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2711 | (yyval.Const).type = (yyvsp[-1].Type); |
| 2712 | (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy); |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 2713 | *(yyval.Const).cnst += " " + *(yyvsp[0].String); |
| 2714 | delete (yyvsp[0].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2715 | ;} |
| 2716 | break; |
| 2717 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2718 | case 150: |
| 2719 | #line 590 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2720 | { // integral constants |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2721 | (yyval.Const).type = (yyvsp[-1].Type); |
| 2722 | (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy); |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 2723 | *(yyval.Const).cnst += " " + *(yyvsp[0].String); |
| 2724 | delete (yyvsp[0].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2725 | ;} |
| 2726 | break; |
| 2727 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2728 | case 151: |
| 2729 | #line 596 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2730 | { // integral constants |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2731 | (yyval.Const).type = (yyvsp[-1].Type); |
| 2732 | (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy); |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 2733 | *(yyval.Const).cnst += " " + *(yyvsp[0].String); |
| 2734 | delete (yyvsp[0].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2735 | ;} |
| 2736 | break; |
| 2737 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2738 | case 152: |
| 2739 | #line 602 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2740 | { // Boolean constants |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2741 | (yyval.Const).type = (yyvsp[-1].Type); |
| 2742 | (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy); |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 2743 | *(yyval.Const).cnst += " " + *(yyvsp[0].String); |
| 2744 | delete (yyvsp[0].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2745 | ;} |
| 2746 | break; |
| 2747 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2748 | case 153: |
| 2749 | #line 608 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2750 | { // Boolean constants |
| 2751 | (yyval.Const).type = (yyvsp[-1].Type); |
| 2752 | (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy); |
| 2753 | *(yyval.Const).cnst += " " + *(yyvsp[0].String); |
| 2754 | delete (yyvsp[0].String); |
| 2755 | ;} |
| 2756 | break; |
| 2757 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2758 | case 154: |
| 2759 | #line 614 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2760 | { // Float & Double constants |
| 2761 | (yyval.Const).type = (yyvsp[-1].Type); |
| 2762 | (yyval.Const).cnst = new std::string(*(yyvsp[-1].Type).newTy); |
| 2763 | *(yyval.Const).cnst += " " + *(yyvsp[0].String); |
| 2764 | delete (yyvsp[0].String); |
| 2765 | ;} |
| 2766 | break; |
| 2767 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2768 | case 155: |
| 2769 | #line 622 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2770 | { |
Reid Spencer | 280d801 | 2006-12-01 23:40:53 +0000 | [diff] [blame] | 2771 | std::string source = *(yyvsp[-3].Const).cnst; |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 2772 | TypeInfo DstTy = (yyvsp[-1].Type); |
| 2773 | ResolveType(DstTy); |
Reid Spencer | 280d801 | 2006-12-01 23:40:53 +0000 | [diff] [blame] | 2774 | if (*(yyvsp[-5].String) == "cast") { |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 2775 | // Call getCastUpgrade to upgrade the old cast |
| 2776 | (yyval.String) = new std::string(getCastUpgrade(source, (yyvsp[-3].Const).type, (yyvsp[-1].Type), true)); |
| 2777 | } else { |
| 2778 | // Nothing to upgrade, just create the cast constant expr |
| 2779 | (yyval.String) = new std::string(*(yyvsp[-5].String)); |
| 2780 | *(yyval.String) += "( " + source + " to " + *(yyvsp[-1].Type).newTy + ")"; |
Reid Spencer | 280d801 | 2006-12-01 23:40:53 +0000 | [diff] [blame] | 2781 | } |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2782 | delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2783 | ;} |
| 2784 | break; |
| 2785 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2786 | case 156: |
| 2787 | #line 636 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2788 | { |
Reid Spencer | f848365 | 2006-12-02 15:16:01 +0000 | [diff] [blame] | 2789 | *(yyvsp[-4].String) += "(" + *(yyvsp[-2].Const).cnst; |
| 2790 | for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) { |
| 2791 | ValueInfo& VI = (*(yyvsp[-1].ValList))[i]; |
| 2792 | *(yyvsp[-4].String) += ", " + *VI.val; |
| 2793 | VI.destroy(); |
| 2794 | } |
| 2795 | *(yyvsp[-4].String) += ")"; |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2796 | (yyval.String) = (yyvsp[-4].String); |
| 2797 | (yyvsp[-2].Const).destroy(); |
Reid Spencer | f848365 | 2006-12-02 15:16:01 +0000 | [diff] [blame] | 2798 | delete (yyvsp[-1].ValList); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2799 | ;} |
| 2800 | break; |
| 2801 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2802 | case 157: |
| 2803 | #line 648 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2804 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2805 | *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")"; |
| 2806 | (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy(); |
| 2807 | (yyval.String) = (yyvsp[-7].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2808 | ;} |
| 2809 | break; |
| 2810 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2811 | case 158: |
| 2812 | #line 653 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2813 | { |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2814 | const char* op = getDivRemOpcode(*(yyvsp[-5].String), (yyvsp[-3].Const).type); |
| 2815 | (yyval.String) = new std::string(op); |
| 2816 | *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")"; |
| 2817 | delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy(); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2818 | ;} |
| 2819 | break; |
| 2820 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2821 | case 159: |
| 2822 | #line 659 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2823 | { |
| 2824 | *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")"; |
| 2825 | (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy(); |
| 2826 | (yyval.String) = (yyvsp[-5].String); |
| 2827 | ;} |
| 2828 | break; |
| 2829 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2830 | case 160: |
| 2831 | #line 664 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2832 | { |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2833 | #if UPGRADE_SETCOND_OPS |
| 2834 | *(yyvsp[-5].String) = getCompareOp(*(yyvsp[-5].String), (yyvsp[-3].Const).type); |
| 2835 | #endif |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2836 | *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")"; |
| 2837 | (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy(); |
| 2838 | (yyval.String) = (yyvsp[-5].String); |
| 2839 | ;} |
| 2840 | break; |
| 2841 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2842 | case 161: |
| 2843 | #line 672 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
| 2844 | { |
| 2845 | *(yyvsp[-6].String) += "(" + *(yyvsp[-5].String) + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")"; |
| 2846 | delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy(); |
| 2847 | (yyval.String) = (yyvsp[-6].String); |
| 2848 | ;} |
| 2849 | break; |
| 2850 | |
| 2851 | case 162: |
| 2852 | #line 677 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2853 | { |
Reid Spencer | f7bde22 | 2006-12-01 22:26:37 +0000 | [diff] [blame] | 2854 | const char* shiftop = (yyvsp[-5].String)->c_str(); |
| 2855 | if (*(yyvsp[-5].String) == "shr") |
| 2856 | shiftop = ((yyvsp[-3].Const).type.isUnsigned()) ? "lshr" : "ashr"; |
| 2857 | (yyval.String) = new std::string(shiftop); |
| 2858 | *(yyval.String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")"; |
| 2859 | delete (yyvsp[-5].String); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy(); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2860 | ;} |
| 2861 | break; |
| 2862 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2863 | case 163: |
| 2864 | #line 685 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2865 | { |
Reid Spencer | f7bde22 | 2006-12-01 22:26:37 +0000 | [diff] [blame] | 2866 | *(yyvsp[-5].String) += "(" + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")"; |
| 2867 | (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy(); |
| 2868 | (yyval.String) = (yyvsp[-5].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2869 | ;} |
| 2870 | break; |
| 2871 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2872 | case 164: |
| 2873 | #line 690 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2874 | { |
| 2875 | *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")"; |
| 2876 | (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy(); |
| 2877 | (yyval.String) = (yyvsp[-7].String); |
| 2878 | ;} |
| 2879 | break; |
| 2880 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2881 | case 165: |
| 2882 | #line 695 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2883 | { |
| 2884 | *(yyvsp[-7].String) += "(" + *(yyvsp[-5].Const).cnst + "," + *(yyvsp[-3].Const).cnst + "," + *(yyvsp[-1].Const).cnst + ")"; |
| 2885 | (yyvsp[-5].Const).destroy(); (yyvsp[-3].Const).destroy(); (yyvsp[-1].Const).destroy(); |
| 2886 | (yyval.String) = (yyvsp[-7].String); |
| 2887 | ;} |
| 2888 | break; |
| 2889 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2890 | case 166: |
| 2891 | #line 705 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2892 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2893 | *(yyvsp[-2].String) += ", " + *(yyvsp[0].Const).cnst; |
| 2894 | (yyvsp[0].Const).destroy(); |
| 2895 | (yyval.String) = (yyvsp[-2].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2896 | ;} |
| 2897 | break; |
| 2898 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2899 | case 167: |
| 2900 | #line 710 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2901 | { (yyval.String) = new std::string(*(yyvsp[0].Const).cnst); (yyvsp[0].Const).destroy(); ;} |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2902 | break; |
| 2903 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2904 | case 170: |
| 2905 | #line 725 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2906 | { |
| 2907 | ;} |
| 2908 | break; |
| 2909 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2910 | case 171: |
| 2911 | #line 730 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2912 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2913 | (yyval.String) = 0; |
| 2914 | ;} |
| 2915 | break; |
| 2916 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2917 | case 172: |
| 2918 | #line 733 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2919 | { |
| 2920 | *O << *(yyvsp[0].String) << "\n"; |
| 2921 | delete (yyvsp[0].String); |
| 2922 | (yyval.String) = 0; |
| 2923 | ;} |
| 2924 | break; |
| 2925 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2926 | case 173: |
| 2927 | #line 738 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2928 | { |
| 2929 | *O << "module asm " << " " << *(yyvsp[0].String) << "\n"; |
Reid Spencer | d154b57 | 2006-12-01 20:36:40 +0000 | [diff] [blame] | 2930 | (yyval.String) = 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2931 | ;} |
| 2932 | break; |
| 2933 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2934 | case 174: |
| 2935 | #line 742 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2936 | { |
Reid Spencer | d154b57 | 2006-12-01 20:36:40 +0000 | [diff] [blame] | 2937 | *O << "implementation\n"; |
| 2938 | (yyval.String) = 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2939 | ;} |
| 2940 | break; |
| 2941 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2942 | case 175: |
| 2943 | #line 746 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 2944 | { (yyval.String) = 0; ;} |
| 2945 | break; |
| 2946 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2947 | case 177: |
| 2948 | #line 748 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2949 | { (yyval.String) = (yyvsp[0].String); *(yyval.String) = "external"; ;} |
| 2950 | break; |
| 2951 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2952 | case 178: |
| 2953 | #line 751 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2954 | { |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 2955 | EnumeratedTypes.push_back((yyvsp[0].Type)); |
| 2956 | if (!(yyvsp[-2].String)->empty()) { |
| 2957 | NamedTypes[*(yyvsp[-2].String)].newTy = new std::string(*(yyvsp[0].Type).newTy); |
| 2958 | NamedTypes[*(yyvsp[-2].String)].oldTy = (yyvsp[0].Type).oldTy; |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 2959 | NamedTypes[*(yyvsp[-2].String)].elemTy = (yyvsp[0].Type).elemTy; |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 2960 | *O << *(yyvsp[-2].String) << " = "; |
| 2961 | } |
| 2962 | *O << "type " << *(yyvsp[0].Type).newTy << "\n"; |
| 2963 | delete (yyvsp[-2].String); delete (yyvsp[-1].String); (yyvsp[0].Type).destroy(); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2964 | (yyval.String) = 0; |
| 2965 | ;} |
| 2966 | break; |
| 2967 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2968 | case 179: |
| 2969 | #line 763 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2970 | { // Function prototypes can be in const pool |
| 2971 | *O << *(yyvsp[0].String) << "\n"; |
| 2972 | delete (yyvsp[0].String); |
| 2973 | (yyval.String) = 0; |
| 2974 | ;} |
| 2975 | break; |
| 2976 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2977 | case 180: |
| 2978 | #line 768 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2979 | { // Asm blocks can be in the const pool |
| 2980 | *O << *(yyvsp[-2].String) << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n"; |
| 2981 | delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String); |
| 2982 | (yyval.String) = 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2983 | ;} |
| 2984 | break; |
| 2985 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2986 | case 181: |
| 2987 | #line 773 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2988 | { |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 2989 | if (!(yyvsp[-4].String)->empty()) |
| 2990 | *O << *(yyvsp[-4].String) << " = "; |
| 2991 | *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Const).cnst << " " << *(yyvsp[0].String) << "\n"; |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 2992 | delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Const).destroy(); delete (yyvsp[0].String); |
| 2993 | (yyval.String) = 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2994 | ;} |
| 2995 | break; |
| 2996 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 2997 | case 182: |
| 2998 | #line 780 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 2999 | { |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 3000 | if (!(yyvsp[-4].String)->empty()) |
| 3001 | *O << *(yyvsp[-4].String) << " = "; |
| 3002 | *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n"; |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3003 | delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String); |
| 3004 | (yyval.String) = 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3005 | ;} |
| 3006 | break; |
| 3007 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3008 | case 183: |
| 3009 | #line 787 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | f7bde22 | 2006-12-01 22:26:37 +0000 | [diff] [blame] | 3010 | { |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 3011 | if (!(yyvsp[-4].String)->empty()) |
| 3012 | *O << *(yyvsp[-4].String) << " = "; |
| 3013 | *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n"; |
Reid Spencer | f7bde22 | 2006-12-01 22:26:37 +0000 | [diff] [blame] | 3014 | delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String); |
| 3015 | (yyval.String) = 0; |
| 3016 | ;} |
| 3017 | break; |
| 3018 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3019 | case 184: |
| 3020 | #line 794 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 3021 | { |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 3022 | if (!(yyvsp[-4].String)->empty()) |
| 3023 | *O << *(yyvsp[-4].String) << " = "; |
| 3024 | *O << *(yyvsp[-3].String) << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].String) << "\n"; |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 3025 | delete (yyvsp[-4].String); delete (yyvsp[-3].String); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String); |
| 3026 | (yyval.String) = 0; |
| 3027 | ;} |
| 3028 | break; |
| 3029 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3030 | case 185: |
| 3031 | #line 801 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3032 | { |
| 3033 | *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n"; |
| 3034 | delete (yyvsp[-1].String); delete (yyvsp[0].String); |
| 3035 | (yyval.String) = 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3036 | ;} |
| 3037 | break; |
| 3038 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3039 | case 186: |
| 3040 | #line 806 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3041 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3042 | *O << *(yyvsp[-2].String) << " = " << *(yyvsp[0].String) << "\n"; |
| 3043 | delete (yyvsp[-2].String); delete (yyvsp[0].String); |
| 3044 | (yyval.String) = 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3045 | ;} |
| 3046 | break; |
| 3047 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3048 | case 187: |
| 3049 | #line 811 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3050 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3051 | (yyval.String) = 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3052 | ;} |
| 3053 | break; |
| 3054 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3055 | case 191: |
| 3056 | #line 821 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3057 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3058 | *(yyvsp[-2].String) += " = " + *(yyvsp[0].String); |
| 3059 | delete (yyvsp[0].String); |
| 3060 | (yyval.String) = (yyvsp[-2].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3061 | ;} |
| 3062 | break; |
| 3063 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3064 | case 192: |
| 3065 | #line 826 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3066 | { |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 3067 | *(yyvsp[-2].String) += " = " + *(yyvsp[0].String); |
| 3068 | if (*(yyvsp[0].String) == "64") |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3069 | SizeOfPointer = 64; |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 3070 | delete (yyvsp[0].String); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3071 | (yyval.String) = (yyvsp[-2].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3072 | ;} |
| 3073 | break; |
| 3074 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3075 | case 193: |
| 3076 | #line 833 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 16244f4 | 2006-12-01 21:10:07 +0000 | [diff] [blame] | 3077 | { |
| 3078 | *(yyvsp[-2].String) += " = " + *(yyvsp[0].String); |
| 3079 | delete (yyvsp[0].String); |
| 3080 | (yyval.String) = (yyvsp[-2].String); |
| 3081 | ;} |
| 3082 | break; |
| 3083 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3084 | case 194: |
| 3085 | #line 838 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | f7bde22 | 2006-12-01 22:26:37 +0000 | [diff] [blame] | 3086 | { |
| 3087 | *(yyvsp[-2].String) += " = " + *(yyvsp[0].String); |
| 3088 | delete (yyvsp[0].String); |
| 3089 | (yyval.String) = (yyvsp[-2].String); |
| 3090 | ;} |
| 3091 | break; |
| 3092 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3093 | case 195: |
| 3094 | #line 845 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3095 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3096 | (yyvsp[-1].String)->insert(0, "[ "); |
| 3097 | *(yyvsp[-1].String) += " ]"; |
| 3098 | (yyval.String) = (yyvsp[-1].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3099 | ;} |
| 3100 | break; |
| 3101 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3102 | case 196: |
| 3103 | #line 852 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3104 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3105 | *(yyvsp[-2].String) += ", " + *(yyvsp[0].String); |
| 3106 | delete (yyvsp[0].String); |
| 3107 | (yyval.String) = (yyvsp[-2].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3108 | ;} |
| 3109 | break; |
| 3110 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3111 | case 198: |
| 3112 | #line 858 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3113 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3114 | (yyval.String) = new std::string(); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3115 | ;} |
| 3116 | break; |
| 3117 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3118 | case 202: |
| 3119 | #line 867 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3120 | { (yyval.String) = new std::string(); ;} |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3121 | break; |
| 3122 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3123 | case 203: |
| 3124 | #line 869 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3125 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3126 | (yyval.String) = (yyvsp[-1].Type).newTy; |
| 3127 | if (!(yyvsp[0].String)->empty()) |
| 3128 | *(yyval.String) += " " + *(yyvsp[0].String); |
| 3129 | delete (yyvsp[0].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3130 | ;} |
| 3131 | break; |
| 3132 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3133 | case 204: |
| 3134 | #line 876 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3135 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3136 | *(yyvsp[-2].String) += ", " + *(yyvsp[0].String); |
| 3137 | delete (yyvsp[0].String); |
| 3138 | ;} |
| 3139 | break; |
| 3140 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3141 | case 205: |
| 3142 | #line 880 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3143 | { |
| 3144 | (yyval.String) = (yyvsp[0].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3145 | ;} |
| 3146 | break; |
| 3147 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3148 | case 206: |
| 3149 | #line 884 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3150 | { |
Reid Spencer | f7bde22 | 2006-12-01 22:26:37 +0000 | [diff] [blame] | 3151 | (yyval.String) = (yyvsp[0].String); |
| 3152 | ;} |
| 3153 | break; |
| 3154 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3155 | case 207: |
| 3156 | #line 887 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | f7bde22 | 2006-12-01 22:26:37 +0000 | [diff] [blame] | 3157 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3158 | *(yyvsp[-2].String) += ", ..."; |
| 3159 | (yyval.String) = (yyvsp[-2].String); |
| 3160 | delete (yyvsp[0].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3161 | ;} |
| 3162 | break; |
| 3163 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3164 | case 208: |
| 3165 | #line 892 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3166 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3167 | (yyval.String) = (yyvsp[0].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3168 | ;} |
| 3169 | break; |
| 3170 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3171 | case 209: |
| 3172 | #line 895 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | d154b57 | 2006-12-01 20:36:40 +0000 | [diff] [blame] | 3173 | { (yyval.String) = new std::string(); ;} |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3174 | break; |
| 3175 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3176 | case 210: |
| 3177 | #line 898 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3178 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3179 | if (!(yyvsp[-7].String)->empty()) { |
| 3180 | *(yyvsp[-7].String) += " "; |
| 3181 | } |
| 3182 | *(yyvsp[-7].String) += *(yyvsp[-6].Type).newTy + " " + *(yyvsp[-5].String) + "(" + *(yyvsp[-3].String) + ")"; |
| 3183 | if (!(yyvsp[-1].String)->empty()) { |
| 3184 | *(yyvsp[-7].String) += " " + *(yyvsp[-1].String); |
| 3185 | } |
| 3186 | if (!(yyvsp[0].String)->empty()) { |
| 3187 | *(yyvsp[-7].String) += " " + *(yyvsp[0].String); |
| 3188 | } |
| 3189 | (yyvsp[-6].Type).destroy(); |
| 3190 | delete (yyvsp[-5].String); |
| 3191 | delete (yyvsp[-3].String); |
| 3192 | delete (yyvsp[-1].String); |
| 3193 | delete (yyvsp[0].String); |
| 3194 | (yyval.String) = (yyvsp[-7].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3195 | ;} |
| 3196 | break; |
| 3197 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3198 | case 211: |
| 3199 | #line 917 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 3200 | { (yyval.String) = new std::string("{"); delete (yyvsp[0].String); ;} |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3201 | break; |
| 3202 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3203 | case 212: |
| 3204 | #line 918 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 3205 | { (yyval.String) = new std::string ("{"); ;} |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3206 | break; |
| 3207 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3208 | case 213: |
| 3209 | #line 920 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3210 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3211 | if (!(yyvsp[-2].String)->empty()) { |
| 3212 | *O << *(yyvsp[-2].String) << " "; |
| 3213 | } |
| 3214 | *O << *(yyvsp[-1].String) << " " << *(yyvsp[0].String) << "\n"; |
| 3215 | delete (yyvsp[-2].String); delete (yyvsp[-1].String); delete (yyvsp[0].String); |
| 3216 | (yyval.String) = 0; |
| 3217 | ;} |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3218 | break; |
| 3219 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3220 | case 214: |
| 3221 | #line 929 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 3222 | { (yyval.String) = new std::string("}"); delete (yyvsp[0].String); ;} |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3223 | break; |
| 3224 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3225 | case 215: |
| 3226 | #line 930 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3227 | { (yyval.String) = new std::string("}"); ;} |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3228 | break; |
| 3229 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3230 | case 216: |
| 3231 | #line 932 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3232 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3233 | if ((yyvsp[-1].String)) |
| 3234 | *O << *(yyvsp[-1].String); |
| 3235 | *O << '\n' << *(yyvsp[0].String) << "\n"; |
| 3236 | (yyval.String) = 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3237 | ;} |
| 3238 | break; |
| 3239 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3240 | case 217: |
| 3241 | #line 940 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3242 | { (yyval.String) = new std::string(); ;} |
| 3243 | break; |
| 3244 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3245 | case 220: |
| 3246 | #line 946 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3247 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3248 | if (!(yyvsp[-1].String)->empty()) |
| 3249 | *(yyvsp[-2].String) += " " + *(yyvsp[-1].String); |
| 3250 | *(yyvsp[-2].String) += " " + *(yyvsp[0].String); |
| 3251 | delete (yyvsp[-1].String); |
| 3252 | delete (yyvsp[0].String); |
| 3253 | (yyval.String) = (yyvsp[-2].String); |
| 3254 | ;} |
| 3255 | break; |
| 3256 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3257 | case 221: |
| 3258 | #line 959 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | d154b57 | 2006-12-01 20:36:40 +0000 | [diff] [blame] | 3259 | { (yyval.String) = new std::string(); ;} |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3260 | break; |
| 3261 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3262 | case 231: |
| 3263 | #line 965 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3264 | { |
| 3265 | (yyvsp[-1].String)->insert(0, "<"); |
| 3266 | *(yyvsp[-1].String) += ">"; |
| 3267 | (yyval.String) = (yyvsp[-1].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3268 | ;} |
| 3269 | break; |
| 3270 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3271 | case 233: |
| 3272 | #line 971 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3273 | { |
| 3274 | if (!(yyvsp[-3].String)->empty()) { |
| 3275 | *(yyvsp[-4].String) += " " + *(yyvsp[-3].String); |
| 3276 | } |
| 3277 | *(yyvsp[-4].String) += " " + *(yyvsp[-2].String) + ", " + *(yyvsp[0].String); |
| 3278 | delete (yyvsp[-3].String); delete (yyvsp[-2].String); delete (yyvsp[0].String); |
| 3279 | (yyval.String) = (yyvsp[-4].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3280 | ;} |
| 3281 | break; |
| 3282 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3283 | case 236: |
| 3284 | #line 984 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3285 | { |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3286 | (yyval.Value).val = (yyvsp[0].String); |
| 3287 | (yyval.Value).constant = false; |
| 3288 | (yyval.Value).type.newTy = 0; |
| 3289 | (yyval.Value).type.oldTy = UnresolvedTy; |
| 3290 | ;} |
| 3291 | break; |
| 3292 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3293 | case 237: |
| 3294 | #line 990 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3295 | { |
| 3296 | (yyval.Value).val = (yyvsp[0].String); |
| 3297 | (yyval.Value).constant = true; |
| 3298 | (yyval.Value).type.newTy = 0; |
| 3299 | (yyval.Value).type.oldTy = UnresolvedTy; |
| 3300 | ;} |
| 3301 | break; |
| 3302 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3303 | case 238: |
| 3304 | #line 1001 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3305 | { |
| 3306 | (yyval.Value) = (yyvsp[0].Value); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3307 | (yyval.Value).type = (yyvsp[-1].Type); |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3308 | (yyval.Value).val->insert(0, *(yyvsp[-1].Type).newTy + " "); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3309 | ;} |
| 3310 | break; |
| 3311 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3312 | case 239: |
| 3313 | #line 1007 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | f7bde22 | 2006-12-01 22:26:37 +0000 | [diff] [blame] | 3314 | { |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 3315 | (yyval.String) = 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3316 | ;} |
| 3317 | break; |
| 3318 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3319 | case 240: |
| 3320 | #line 1010 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | f7bde22 | 2006-12-01 22:26:37 +0000 | [diff] [blame] | 3321 | { // Do not allow functions with 0 basic blocks |
Reid Spencer | f2d5532 | 2006-12-01 21:52:30 +0000 | [diff] [blame] | 3322 | (yyval.String) = 0; |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3323 | ;} |
| 3324 | break; |
| 3325 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3326 | case 241: |
| 3327 | #line 1018 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | f7bde22 | 2006-12-01 22:26:37 +0000 | [diff] [blame] | 3328 | { |
| 3329 | (yyval.String) = 0; |
| 3330 | ;} |
| 3331 | break; |
| 3332 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3333 | case 242: |
| 3334 | #line 1022 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3335 | { |
| 3336 | *O << " " << *(yyvsp[0].String) << "\n"; |
| 3337 | delete (yyvsp[0].String); |
| 3338 | (yyval.String) = 0; |
| 3339 | ;} |
| 3340 | break; |
| 3341 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3342 | case 243: |
| 3343 | #line 1027 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3344 | { |
| 3345 | (yyval.String) = 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3346 | ;} |
| 3347 | break; |
| 3348 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3349 | case 244: |
| 3350 | #line 1030 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3351 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3352 | *O << *(yyvsp[0].String) << "\n"; |
| 3353 | delete (yyvsp[0].String); |
| 3354 | (yyval.String) = 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3355 | ;} |
| 3356 | break; |
| 3357 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3358 | case 246: |
| 3359 | #line 1036 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 3360 | { (yyval.String) = (yyvsp[0].String); *(yyval.String) = "unwind"; ;} |
| 3361 | break; |
| 3362 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3363 | case 247: |
| 3364 | #line 1038 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3365 | { // Return with a result... |
| 3366 | *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Value).val << "\n"; |
| 3367 | delete (yyvsp[-1].String); (yyvsp[0].Value).destroy(); |
| 3368 | (yyval.String) = 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3369 | ;} |
| 3370 | break; |
| 3371 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3372 | case 248: |
| 3373 | #line 1043 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3374 | { // Return with no result... |
| 3375 | *O << " " << *(yyvsp[-1].String) << " " << *(yyvsp[0].Type).newTy << "\n"; |
| 3376 | delete (yyvsp[-1].String); (yyvsp[0].Type).destroy(); |
| 3377 | (yyval.String) = 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3378 | ;} |
| 3379 | break; |
| 3380 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3381 | case 249: |
| 3382 | #line 1048 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3383 | { // Unconditional Branch... |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3384 | *O << " " << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].Value).val << "\n"; |
| 3385 | delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy(); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3386 | (yyval.String) = 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3387 | ;} |
| 3388 | break; |
| 3389 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3390 | case 250: |
| 3391 | #line 1053 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3392 | { |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3393 | *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", " |
| 3394 | << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << ", " << *(yyvsp[-1].Type).newTy << " " |
| 3395 | << *(yyvsp[0].Value).val << "\n"; |
| 3396 | delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); (yyvsp[-6].Value).destroy(); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); |
| 3397 | (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy(); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3398 | (yyval.String) = 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3399 | ;} |
| 3400 | break; |
| 3401 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3402 | case 251: |
| 3403 | #line 1061 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3404 | { |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3405 | *O << " " << *(yyvsp[-8].String) << " " << *(yyvsp[-7].Type).newTy << " " << *(yyvsp[-6].Value).val << ", " |
| 3406 | << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << " [" << *(yyvsp[-1].String) << " ]\n"; |
| 3407 | delete (yyvsp[-8].String); (yyvsp[-7].Type).destroy(); (yyvsp[-6].Value).destroy(); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); |
| 3408 | delete (yyvsp[-1].String); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3409 | (yyval.String) = 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3410 | ;} |
| 3411 | break; |
| 3412 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3413 | case 252: |
| 3414 | #line 1068 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3415 | { |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3416 | *O << " " << *(yyvsp[-7].String) << " " << *(yyvsp[-6].Type).newTy << " " << *(yyvsp[-5].Value).val << ", " |
| 3417 | << *(yyvsp[-3].Type).newTy << " " << *(yyvsp[-2].Value).val << "[]\n"; |
| 3418 | delete (yyvsp[-7].String); (yyvsp[-6].Type).destroy(); (yyvsp[-5].Value).destroy(); (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3419 | (yyval.String) = 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3420 | ;} |
| 3421 | break; |
| 3422 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3423 | case 253: |
| 3424 | #line 1075 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3425 | { |
Reid Spencer | 16244f4 | 2006-12-01 21:10:07 +0000 | [diff] [blame] | 3426 | *O << " "; |
| 3427 | if (!(yyvsp[-13].String)->empty()) |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 3428 | *O << *(yyvsp[-13].String) << " = "; |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3429 | *O << *(yyvsp[-12].String) << " " << *(yyvsp[-11].String) << " " << *(yyvsp[-10].Type).newTy << " " << *(yyvsp[-9].Value).val << " ("; |
Reid Spencer | f848365 | 2006-12-02 15:16:01 +0000 | [diff] [blame] | 3430 | for (unsigned i = 0; i < (yyvsp[-7].ValList)->size(); ++i) { |
| 3431 | ValueInfo& VI = (*(yyvsp[-7].ValList))[i]; |
| 3432 | *O << *VI.val; |
| 3433 | if (i+1 < (yyvsp[-7].ValList)->size()) |
| 3434 | *O << ", "; |
| 3435 | VI.destroy(); |
| 3436 | } |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3437 | *O << ") " << *(yyvsp[-5].String) << " " << *(yyvsp[-4].Type).newTy << " " << *(yyvsp[-3].Value).val << " " |
| 3438 | << *(yyvsp[-2].String) << " " << *(yyvsp[-1].Type).newTy << " " << *(yyvsp[0].Value).val << "\n"; |
| 3439 | delete (yyvsp[-13].String); delete (yyvsp[-12].String); delete (yyvsp[-11].String); (yyvsp[-10].Type).destroy(); (yyvsp[-9].Value).destroy(); delete (yyvsp[-7].ValList); |
| 3440 | delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); |
| 3441 | (yyvsp[0].Value).destroy(); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3442 | (yyval.String) = 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3443 | ;} |
| 3444 | break; |
| 3445 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3446 | case 254: |
| 3447 | #line 1094 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3448 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3449 | *O << " " << *(yyvsp[0].String) << "\n"; |
| 3450 | delete (yyvsp[0].String); |
| 3451 | (yyval.String) = 0; |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3452 | ;} |
| 3453 | break; |
| 3454 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3455 | case 255: |
| 3456 | #line 1099 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3457 | { |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 3458 | *O << " " << *(yyvsp[0].String) << "\n"; |
| 3459 | delete (yyvsp[0].String); |
| 3460 | (yyval.String) = 0; |
| 3461 | ;} |
| 3462 | break; |
| 3463 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3464 | case 256: |
| 3465 | #line 1105 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | fcb5df8 | 2006-12-01 22:34:43 +0000 | [diff] [blame] | 3466 | { |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3467 | *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].String) + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val; |
| 3468 | (yyvsp[-4].Type).destroy(); delete (yyvsp[-3].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy(); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3469 | (yyval.String) = (yyvsp[-5].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3470 | ;} |
| 3471 | break; |
| 3472 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3473 | case 257: |
| 3474 | #line 1110 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3475 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3476 | (yyvsp[-3].String)->insert(0, *(yyvsp[-4].Type).newTy + " " ); |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3477 | *(yyvsp[-3].String) += ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val; |
| 3478 | (yyvsp[-4].Type).destroy(); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy(); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3479 | (yyval.String) = (yyvsp[-3].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3480 | ;} |
| 3481 | break; |
| 3482 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3483 | case 258: |
| 3484 | #line 1118 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3485 | { |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 3486 | if (!(yyvsp[-1].String)->empty()) |
| 3487 | *(yyvsp[-1].String) += " = "; |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3488 | *(yyvsp[-1].String) += *(yyvsp[0].String); |
| 3489 | delete (yyvsp[0].String); |
| 3490 | (yyval.String) = (yyvsp[-1].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3491 | ;} |
| 3492 | break; |
| 3493 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3494 | case 259: |
| 3495 | #line 1127 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3496 | { // Used for PHI nodes |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3497 | (yyvsp[-3].Value).val->insert(0, *(yyvsp[-5].Type).newTy + "["); |
| 3498 | *(yyvsp[-3].Value).val += "," + *(yyvsp[-1].Value).val + "]"; |
| 3499 | (yyvsp[-5].Type).destroy(); (yyvsp[-1].Value).destroy(); |
| 3500 | (yyval.String) = new std::string(*(yyvsp[-3].Value).val); |
| 3501 | (yyvsp[-3].Value).destroy(); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3502 | ;} |
| 3503 | break; |
| 3504 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3505 | case 260: |
| 3506 | #line 1134 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3507 | { |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3508 | *(yyvsp[-6].String) += ", [" + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + "]"; |
| 3509 | (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy(); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3510 | (yyval.String) = (yyvsp[-6].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3511 | ;} |
| 3512 | break; |
| 3513 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3514 | case 261: |
| 3515 | #line 1142 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | f848365 | 2006-12-02 15:16:01 +0000 | [diff] [blame] | 3516 | { |
| 3517 | (yyval.ValList) = new ValueList(); |
| 3518 | (yyval.ValList)->push_back((yyvsp[0].Value)); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3519 | ;} |
| 3520 | break; |
| 3521 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3522 | case 262: |
| 3523 | #line 1146 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | f848365 | 2006-12-02 15:16:01 +0000 | [diff] [blame] | 3524 | { |
| 3525 | (yyvsp[-2].ValList)->push_back((yyvsp[0].Value)); |
| 3526 | (yyval.ValList) = (yyvsp[-2].ValList); |
| 3527 | ;} |
| 3528 | break; |
| 3529 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3530 | case 263: |
| 3531 | #line 1153 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | f848365 | 2006-12-02 15:16:01 +0000 | [diff] [blame] | 3532 | { (yyval.ValList) = (yyvsp[0].ValList); ;} |
| 3533 | break; |
| 3534 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3535 | case 264: |
| 3536 | #line 1154 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | f848365 | 2006-12-02 15:16:01 +0000 | [diff] [blame] | 3537 | { (yyval.ValList) = new ValueList(); ;} |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3538 | break; |
| 3539 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3540 | case 265: |
| 3541 | #line 1158 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3542 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3543 | *(yyvsp[-1].String) += " " + *(yyvsp[0].String); |
| 3544 | delete (yyvsp[0].String); |
| 3545 | (yyval.String) = (yyvsp[-1].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3546 | ;} |
| 3547 | break; |
| 3548 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3549 | case 267: |
| 3550 | #line 1166 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | 7872074 | 2006-12-02 20:21:22 +0000 | [diff] [blame] | 3551 | { |
| 3552 | const char* op = getDivRemOpcode(*(yyvsp[-4].String), (yyvsp[-3].Type)); |
| 3553 | (yyval.String) = new std::string(op); |
| 3554 | *(yyval.String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val; |
| 3555 | delete (yyvsp[-4].String); (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy(); |
| 3556 | ;} |
| 3557 | break; |
| 3558 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3559 | case 268: |
| 3560 | #line 1172 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3561 | { |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3562 | *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val; |
| 3563 | (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy(); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3564 | (yyval.String) = (yyvsp[-4].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3565 | ;} |
| 3566 | break; |
| 3567 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3568 | case 269: |
| 3569 | #line 1177 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3570 | { |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3571 | #if UPGRADE_SETCOND_OPS |
| 3572 | *(yyvsp[-4].String) = getCompareOp(*(yyvsp[-4].String), (yyvsp[-3].Type)); |
| 3573 | #endif |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3574 | *(yyvsp[-4].String) += " " + *(yyvsp[-3].Type).newTy + " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val; |
| 3575 | (yyvsp[-3].Type).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy(); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3576 | (yyval.String) = (yyvsp[-4].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3577 | ;} |
| 3578 | break; |
| 3579 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3580 | case 270: |
| 3581 | #line 1185 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
| 3582 | { |
| 3583 | *(yyvsp[-6].String) += " " + *(yyvsp[-5].String) + " " + *(yyvsp[-3].Value).val + "," + *(yyvsp[-1].Value).val + ")"; |
| 3584 | delete (yyvsp[-5].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Value).destroy(); |
| 3585 | (yyval.String) = (yyvsp[-6].String); |
| 3586 | ;} |
| 3587 | break; |
| 3588 | |
| 3589 | case 271: |
| 3590 | #line 1190 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3591 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3592 | *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val; |
| 3593 | (yyvsp[0].Value).destroy(); |
| 3594 | (yyval.String) = (yyvsp[-1].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3595 | ;} |
| 3596 | break; |
| 3597 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3598 | case 272: |
| 3599 | #line 1195 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3600 | { |
Reid Spencer | f7bde22 | 2006-12-01 22:26:37 +0000 | [diff] [blame] | 3601 | const char* shiftop = (yyvsp[-3].String)->c_str(); |
| 3602 | if (*(yyvsp[-3].String) == "shr") |
| 3603 | shiftop = ((yyvsp[-2].Value).type.isUnsigned()) ? "lshr" : "ashr"; |
| 3604 | (yyval.String) = new std::string(shiftop); |
| 3605 | *(yyval.String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val; |
| 3606 | delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy(); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3607 | ;} |
| 3608 | break; |
| 3609 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3610 | case 273: |
| 3611 | #line 1203 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3612 | { |
Reid Spencer | 280d801 | 2006-12-01 23:40:53 +0000 | [diff] [blame] | 3613 | std::string source = *(yyvsp[-2].Value).val; |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 3614 | TypeInfo SrcTy = (yyvsp[-2].Value).type; |
| 3615 | TypeInfo DstTy = (yyvsp[0].Type); |
| 3616 | ResolveType(DstTy); |
| 3617 | (yyval.String) = new std::string(); |
Reid Spencer | 280d801 | 2006-12-01 23:40:53 +0000 | [diff] [blame] | 3618 | if (*(yyvsp[-3].String) == "cast") { |
Reid Spencer | a50d596 | 2006-12-02 04:11:07 +0000 | [diff] [blame] | 3619 | *(yyval.String) += getCastUpgrade(source, SrcTy, DstTy, false); |
| 3620 | } else { |
| 3621 | *(yyval.String) += *(yyvsp[-3].String) + " " + source + " to " + *DstTy.newTy; |
Reid Spencer | 280d801 | 2006-12-01 23:40:53 +0000 | [diff] [blame] | 3622 | } |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3623 | delete (yyvsp[-3].String); (yyvsp[-2].Value).destroy(); |
| 3624 | delete (yyvsp[-1].String); (yyvsp[0].Type).destroy(); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3625 | ;} |
| 3626 | break; |
| 3627 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3628 | case 274: |
| 3629 | #line 1217 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3630 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3631 | *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val; |
| 3632 | (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy(); |
| 3633 | (yyval.String) = (yyvsp[-5].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3634 | ;} |
| 3635 | break; |
| 3636 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3637 | case 275: |
| 3638 | #line 1222 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3639 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3640 | *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Type).newTy; |
| 3641 | (yyvsp[-2].Value).destroy(); (yyvsp[0].Type).destroy(); |
| 3642 | (yyval.String) = (yyvsp[-3].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3643 | ;} |
| 3644 | break; |
| 3645 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3646 | case 276: |
| 3647 | #line 1227 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3648 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3649 | *(yyvsp[-3].String) += " " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val; |
| 3650 | (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy(); |
| 3651 | (yyval.String) = (yyvsp[-3].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3652 | ;} |
| 3653 | break; |
| 3654 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3655 | case 277: |
| 3656 | #line 1232 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3657 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3658 | *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val; |
| 3659 | (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy(); |
| 3660 | (yyval.String) = (yyvsp[-5].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3661 | ;} |
| 3662 | break; |
| 3663 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3664 | case 278: |
| 3665 | #line 1237 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | f7bde22 | 2006-12-01 22:26:37 +0000 | [diff] [blame] | 3666 | { |
| 3667 | *(yyvsp[-5].String) += " " + *(yyvsp[-4].Value).val + ", " + *(yyvsp[-2].Value).val + ", " + *(yyvsp[0].Value).val; |
| 3668 | (yyvsp[-4].Value).destroy(); (yyvsp[-2].Value).destroy(); (yyvsp[0].Value).destroy(); |
| 3669 | (yyval.String) = (yyvsp[-5].String); |
| 3670 | ;} |
| 3671 | break; |
| 3672 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3673 | case 279: |
| 3674 | #line 1242 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3675 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3676 | *(yyvsp[-1].String) += " " + *(yyvsp[0].String); |
| 3677 | delete (yyvsp[0].String); |
| 3678 | (yyval.String) = (yyvsp[-1].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3679 | ;} |
| 3680 | break; |
| 3681 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3682 | case 280: |
| 3683 | #line 1247 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3684 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3685 | if (!(yyvsp[-5].String)->empty()) |
| 3686 | *(yyvsp[-6].String) += " " + *(yyvsp[-5].String); |
| 3687 | if (!(yyvsp[-6].String)->empty()) |
| 3688 | *(yyvsp[-6].String) += " "; |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3689 | *(yyvsp[-6].String) += *(yyvsp[-4].Type).newTy + " " + *(yyvsp[-3].Value).val + "("; |
Reid Spencer | f848365 | 2006-12-02 15:16:01 +0000 | [diff] [blame] | 3690 | for (unsigned i = 0; i < (yyvsp[-1].ValList)->size(); ++i) { |
| 3691 | ValueInfo& VI = (*(yyvsp[-1].ValList))[i]; |
| 3692 | *(yyvsp[-6].String) += *VI.val; |
| 3693 | if (i+1 < (yyvsp[-1].ValList)->size()) |
| 3694 | *(yyvsp[-6].String) += ", "; |
| 3695 | VI.destroy(); |
| 3696 | } |
| 3697 | *(yyvsp[-6].String) += ")"; |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3698 | delete (yyvsp[-5].String); (yyvsp[-4].Type).destroy(); (yyvsp[-3].Value).destroy(); delete (yyvsp[-1].ValList); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3699 | (yyval.String) = (yyvsp[-6].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3700 | ;} |
| 3701 | break; |
| 3702 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3703 | case 282: |
| 3704 | #line 1269 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | f848365 | 2006-12-02 15:16:01 +0000 | [diff] [blame] | 3705 | { (yyval.ValList) = (yyvsp[0].ValList); ;} |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3706 | break; |
| 3707 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3708 | case 283: |
| 3709 | #line 1270 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | f848365 | 2006-12-02 15:16:01 +0000 | [diff] [blame] | 3710 | { (yyval.ValList) = new ValueList(); ;} |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3711 | break; |
| 3712 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3713 | case 285: |
| 3714 | #line 1275 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3715 | { (yyval.String) = new std::string(); ;} |
| 3716 | break; |
| 3717 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3718 | case 286: |
| 3719 | #line 1278 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3720 | { |
| 3721 | *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy; |
| 3722 | if (!(yyvsp[0].String)->empty()) |
| 3723 | *(yyvsp[-2].String) += " " + *(yyvsp[0].String); |
| 3724 | (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String); |
| 3725 | (yyval.String) = (yyvsp[-2].String); |
| 3726 | ;} |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3727 | break; |
| 3728 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3729 | case 287: |
| 3730 | #line 1285 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3731 | { |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3732 | *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val; |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3733 | if (!(yyvsp[0].String)->empty()) |
| 3734 | *(yyvsp[-5].String) += " " + *(yyvsp[0].String); |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3735 | (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].String); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3736 | (yyval.String) = (yyvsp[-5].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3737 | ;} |
| 3738 | break; |
| 3739 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3740 | case 288: |
| 3741 | #line 1292 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | f7bde22 | 2006-12-01 22:26:37 +0000 | [diff] [blame] | 3742 | { |
| 3743 | *(yyvsp[-2].String) += " " + *(yyvsp[-1].Type).newTy; |
| 3744 | if (!(yyvsp[0].String)->empty()) |
| 3745 | *(yyvsp[-2].String) += " " + *(yyvsp[0].String); |
| 3746 | (yyvsp[-1].Type).destroy(); delete (yyvsp[0].String); |
| 3747 | (yyval.String) = (yyvsp[-2].String); |
| 3748 | ;} |
| 3749 | break; |
| 3750 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3751 | case 289: |
| 3752 | #line 1299 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | f7bde22 | 2006-12-01 22:26:37 +0000 | [diff] [blame] | 3753 | { |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3754 | *(yyvsp[-5].String) += " " + *(yyvsp[-4].Type).newTy + ", " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val; |
Reid Spencer | f7bde22 | 2006-12-01 22:26:37 +0000 | [diff] [blame] | 3755 | if (!(yyvsp[0].String)->empty()) |
| 3756 | *(yyvsp[-5].String) += " " + *(yyvsp[0].String); |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3757 | (yyvsp[-4].Type).destroy(); (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].String); |
Reid Spencer | f7bde22 | 2006-12-01 22:26:37 +0000 | [diff] [blame] | 3758 | (yyval.String) = (yyvsp[-5].String); |
| 3759 | ;} |
| 3760 | break; |
| 3761 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3762 | case 290: |
| 3763 | #line 1306 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3764 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3765 | *(yyvsp[-1].String) += " " + *(yyvsp[0].Value).val; |
| 3766 | (yyvsp[0].Value).destroy(); |
| 3767 | (yyval.String) = (yyvsp[-1].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3768 | ;} |
| 3769 | break; |
| 3770 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3771 | case 291: |
| 3772 | #line 1311 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3773 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3774 | if (!(yyvsp[-3].String)->empty()) |
| 3775 | *(yyvsp[-3].String) += " "; |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3776 | *(yyvsp[-3].String) += *(yyvsp[-2].String) + " " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val; |
| 3777 | delete (yyvsp[-2].String); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy(); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3778 | (yyval.String) = (yyvsp[-3].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3779 | ;} |
| 3780 | break; |
| 3781 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3782 | case 292: |
| 3783 | #line 1318 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3784 | { |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3785 | if (!(yyvsp[-5].String)->empty()) |
| 3786 | *(yyvsp[-5].String) += " "; |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3787 | *(yyvsp[-5].String) += *(yyvsp[-4].String) + " " + *(yyvsp[-3].Value).val + ", " + *(yyvsp[-1].Type).newTy + " " + *(yyvsp[0].Value).val; |
| 3788 | delete (yyvsp[-4].String); (yyvsp[-3].Value).destroy(); (yyvsp[-1].Type).destroy(); (yyvsp[0].Value).destroy(); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3789 | (yyval.String) = (yyvsp[-5].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3790 | ;} |
| 3791 | break; |
| 3792 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3793 | case 293: |
| 3794 | #line 1325 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3795 | { |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3796 | // Upgrade the indices |
| 3797 | for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) { |
| 3798 | ValueInfo& VI = (*(yyvsp[0].ValList))[i]; |
| 3799 | if (VI.type.isUnsigned() && !VI.isConstant() && |
| 3800 | VI.type.getBitWidth() < 64) { |
| 3801 | std::string* old = VI.val; |
| 3802 | *O << " %gep_upgrade" << unique << " = zext " << *old |
| 3803 | << " to ulong\n"; |
| 3804 | VI.val = new std::string("ulong %gep_upgrade" + llvm::utostr(unique++)); |
| 3805 | VI.type.oldTy = ULongTy; |
| 3806 | delete old; |
| 3807 | } |
| 3808 | } |
| 3809 | *(yyvsp[-3].String) += " " + *(yyvsp[-2].Type).newTy + " " + *(yyvsp[-1].Value).val; |
Reid Spencer | f848365 | 2006-12-02 15:16:01 +0000 | [diff] [blame] | 3810 | for (unsigned i = 0; i < (yyvsp[0].ValList)->size(); ++i) { |
| 3811 | ValueInfo& VI = (*(yyvsp[0].ValList))[i]; |
| 3812 | *(yyvsp[-3].String) += ", " + *VI.val; |
| 3813 | VI.destroy(); |
| 3814 | } |
Reid Spencer | f459d39 | 2006-12-02 16:19:52 +0000 | [diff] [blame] | 3815 | (yyvsp[-2].Type).destroy(); (yyvsp[-1].Value).destroy(); delete (yyvsp[0].ValList); |
Reid Spencer | e77e35e | 2006-12-01 20:26:20 +0000 | [diff] [blame] | 3816 | (yyval.String) = (yyvsp[-3].String); |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3817 | ;} |
| 3818 | break; |
| 3819 | |
| 3820 | |
| 3821 | default: break; |
| 3822 | } |
| 3823 | |
| 3824 | /* Line 1126 of yacc.c. */ |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 3825 | #line 3826 "UpgradeParser.tab.c" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 3826 | |
| 3827 | yyvsp -= yylen; |
| 3828 | yyssp -= yylen; |
| 3829 | |
| 3830 | |
| 3831 | YY_STACK_PRINT (yyss, yyssp); |
| 3832 | |
| 3833 | *++yyvsp = yyval; |
| 3834 | |
| 3835 | |
| 3836 | /* Now `shift' the result of the reduction. Determine what state |
| 3837 | that goes to, based on the state we popped back to and the rule |
| 3838 | number reduced by. */ |
| 3839 | |
| 3840 | yyn = yyr1[yyn]; |
| 3841 | |
| 3842 | yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
| 3843 | if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
| 3844 | yystate = yytable[yystate]; |
| 3845 | else |
| 3846 | yystate = yydefgoto[yyn - YYNTOKENS]; |
| 3847 | |
| 3848 | goto yynewstate; |
| 3849 | |
| 3850 | |
| 3851 | /*------------------------------------. |
| 3852 | | yyerrlab -- here on detecting error | |
| 3853 | `------------------------------------*/ |
| 3854 | yyerrlab: |
| 3855 | /* If not already recovering from an error, report this error. */ |
| 3856 | if (!yyerrstatus) |
| 3857 | { |
| 3858 | ++yynerrs; |
| 3859 | #if YYERROR_VERBOSE |
| 3860 | yyn = yypact[yystate]; |
| 3861 | |
| 3862 | if (YYPACT_NINF < yyn && yyn < YYLAST) |
| 3863 | { |
| 3864 | int yytype = YYTRANSLATE (yychar); |
| 3865 | YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); |
| 3866 | YYSIZE_T yysize = yysize0; |
| 3867 | YYSIZE_T yysize1; |
| 3868 | int yysize_overflow = 0; |
| 3869 | char *yymsg = 0; |
| 3870 | # define YYERROR_VERBOSE_ARGS_MAXIMUM 5 |
| 3871 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
| 3872 | int yyx; |
| 3873 | |
| 3874 | #if 0 |
| 3875 | /* This is so xgettext sees the translatable formats that are |
| 3876 | constructed on the fly. */ |
| 3877 | YY_("syntax error, unexpected %s"); |
| 3878 | YY_("syntax error, unexpected %s, expecting %s"); |
| 3879 | YY_("syntax error, unexpected %s, expecting %s or %s"); |
| 3880 | YY_("syntax error, unexpected %s, expecting %s or %s or %s"); |
| 3881 | YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); |
| 3882 | #endif |
| 3883 | char *yyfmt; |
| 3884 | char const *yyf; |
| 3885 | static char const yyunexpected[] = "syntax error, unexpected %s"; |
| 3886 | static char const yyexpecting[] = ", expecting %s"; |
| 3887 | static char const yyor[] = " or %s"; |
| 3888 | char yyformat[sizeof yyunexpected |
| 3889 | + sizeof yyexpecting - 1 |
| 3890 | + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) |
| 3891 | * (sizeof yyor - 1))]; |
| 3892 | char const *yyprefix = yyexpecting; |
| 3893 | |
| 3894 | /* Start YYX at -YYN if negative to avoid negative indexes in |
| 3895 | YYCHECK. */ |
| 3896 | int yyxbegin = yyn < 0 ? -yyn : 0; |
| 3897 | |
| 3898 | /* Stay within bounds of both yycheck and yytname. */ |
| 3899 | int yychecklim = YYLAST - yyn; |
| 3900 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
| 3901 | int yycount = 1; |
| 3902 | |
| 3903 | yyarg[0] = yytname[yytype]; |
| 3904 | yyfmt = yystpcpy (yyformat, yyunexpected); |
| 3905 | |
| 3906 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
| 3907 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
| 3908 | { |
| 3909 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
| 3910 | { |
| 3911 | yycount = 1; |
| 3912 | yysize = yysize0; |
| 3913 | yyformat[sizeof yyunexpected - 1] = '\0'; |
| 3914 | break; |
| 3915 | } |
| 3916 | yyarg[yycount++] = yytname[yyx]; |
| 3917 | yysize1 = yysize + yytnamerr (0, yytname[yyx]); |
| 3918 | yysize_overflow |= yysize1 < yysize; |
| 3919 | yysize = yysize1; |
| 3920 | yyfmt = yystpcpy (yyfmt, yyprefix); |
| 3921 | yyprefix = yyor; |
| 3922 | } |
| 3923 | |
| 3924 | yyf = YY_(yyformat); |
| 3925 | yysize1 = yysize + yystrlen (yyf); |
| 3926 | yysize_overflow |= yysize1 < yysize; |
| 3927 | yysize = yysize1; |
| 3928 | |
| 3929 | if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM) |
| 3930 | yymsg = (char *) YYSTACK_ALLOC (yysize); |
| 3931 | if (yymsg) |
| 3932 | { |
| 3933 | /* Avoid sprintf, as that infringes on the user's name space. |
| 3934 | Don't have undefined behavior even if the translation |
| 3935 | produced a string with the wrong number of "%s"s. */ |
| 3936 | char *yyp = yymsg; |
| 3937 | int yyi = 0; |
| 3938 | while ((*yyp = *yyf)) |
| 3939 | { |
| 3940 | if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) |
| 3941 | { |
| 3942 | yyp += yytnamerr (yyp, yyarg[yyi++]); |
| 3943 | yyf += 2; |
| 3944 | } |
| 3945 | else |
| 3946 | { |
| 3947 | yyp++; |
| 3948 | yyf++; |
| 3949 | } |
| 3950 | } |
| 3951 | yyerror (yymsg); |
| 3952 | YYSTACK_FREE (yymsg); |
| 3953 | } |
| 3954 | else |
| 3955 | { |
| 3956 | yyerror (YY_("syntax error")); |
| 3957 | goto yyexhaustedlab; |
| 3958 | } |
| 3959 | } |
| 3960 | else |
| 3961 | #endif /* YYERROR_VERBOSE */ |
| 3962 | yyerror (YY_("syntax error")); |
| 3963 | } |
| 3964 | |
| 3965 | |
| 3966 | |
| 3967 | if (yyerrstatus == 3) |
| 3968 | { |
| 3969 | /* If just tried and failed to reuse look-ahead token after an |
| 3970 | error, discard it. */ |
| 3971 | |
| 3972 | if (yychar <= YYEOF) |
| 3973 | { |
| 3974 | /* Return failure if at end of input. */ |
| 3975 | if (yychar == YYEOF) |
| 3976 | YYABORT; |
| 3977 | } |
| 3978 | else |
| 3979 | { |
| 3980 | yydestruct ("Error: discarding", yytoken, &yylval); |
| 3981 | yychar = YYEMPTY; |
| 3982 | } |
| 3983 | } |
| 3984 | |
| 3985 | /* Else will try to reuse look-ahead token after shifting the error |
| 3986 | token. */ |
| 3987 | goto yyerrlab1; |
| 3988 | |
| 3989 | |
| 3990 | /*---------------------------------------------------. |
| 3991 | | yyerrorlab -- error raised explicitly by YYERROR. | |
| 3992 | `---------------------------------------------------*/ |
| 3993 | yyerrorlab: |
| 3994 | |
| 3995 | /* Pacify compilers like GCC when the user code never invokes |
| 3996 | YYERROR and the label yyerrorlab therefore never appears in user |
| 3997 | code. */ |
| 3998 | if (0) |
| 3999 | goto yyerrorlab; |
| 4000 | |
| 4001 | yyvsp -= yylen; |
| 4002 | yyssp -= yylen; |
| 4003 | yystate = *yyssp; |
| 4004 | goto yyerrlab1; |
| 4005 | |
| 4006 | |
| 4007 | /*-------------------------------------------------------------. |
| 4008 | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
| 4009 | `-------------------------------------------------------------*/ |
| 4010 | yyerrlab1: |
| 4011 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
| 4012 | |
| 4013 | for (;;) |
| 4014 | { |
| 4015 | yyn = yypact[yystate]; |
| 4016 | if (yyn != YYPACT_NINF) |
| 4017 | { |
| 4018 | yyn += YYTERROR; |
| 4019 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
| 4020 | { |
| 4021 | yyn = yytable[yyn]; |
| 4022 | if (0 < yyn) |
| 4023 | break; |
| 4024 | } |
| 4025 | } |
| 4026 | |
| 4027 | /* Pop the current state because it cannot handle the error token. */ |
| 4028 | if (yyssp == yyss) |
| 4029 | YYABORT; |
| 4030 | |
| 4031 | |
| 4032 | yydestruct ("Error: popping", yystos[yystate], yyvsp); |
| 4033 | YYPOPSTACK; |
| 4034 | yystate = *yyssp; |
| 4035 | YY_STACK_PRINT (yyss, yyssp); |
| 4036 | } |
| 4037 | |
| 4038 | if (yyn == YYFINAL) |
| 4039 | YYACCEPT; |
| 4040 | |
| 4041 | *++yyvsp = yylval; |
| 4042 | |
| 4043 | |
| 4044 | /* Shift the error token. */ |
| 4045 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
| 4046 | |
| 4047 | yystate = yyn; |
| 4048 | goto yynewstate; |
| 4049 | |
| 4050 | |
| 4051 | /*-------------------------------------. |
| 4052 | | yyacceptlab -- YYACCEPT comes here. | |
| 4053 | `-------------------------------------*/ |
| 4054 | yyacceptlab: |
| 4055 | yyresult = 0; |
| 4056 | goto yyreturn; |
| 4057 | |
| 4058 | /*-----------------------------------. |
| 4059 | | yyabortlab -- YYABORT comes here. | |
| 4060 | `-----------------------------------*/ |
| 4061 | yyabortlab: |
| 4062 | yyresult = 1; |
| 4063 | goto yyreturn; |
| 4064 | |
| 4065 | #ifndef yyoverflow |
| 4066 | /*-------------------------------------------------. |
| 4067 | | yyexhaustedlab -- memory exhaustion comes here. | |
| 4068 | `-------------------------------------------------*/ |
| 4069 | yyexhaustedlab: |
| 4070 | yyerror (YY_("memory exhausted")); |
| 4071 | yyresult = 2; |
| 4072 | /* Fall through. */ |
| 4073 | #endif |
| 4074 | |
| 4075 | yyreturn: |
| 4076 | if (yychar != YYEOF && yychar != YYEMPTY) |
| 4077 | yydestruct ("Cleanup: discarding lookahead", |
| 4078 | yytoken, &yylval); |
| 4079 | while (yyssp != yyss) |
| 4080 | { |
| 4081 | yydestruct ("Cleanup: popping", |
| 4082 | yystos[*yyssp], yyvsp); |
| 4083 | YYPOPSTACK; |
| 4084 | } |
| 4085 | #ifndef yyoverflow |
| 4086 | if (yyss != yyssa) |
| 4087 | YYSTACK_FREE (yyss); |
| 4088 | #endif |
| 4089 | return yyresult; |
| 4090 | } |
| 4091 | |
| 4092 | |
Reid Spencer | 229e936 | 2006-12-02 22:14:11 +0000 | [diff] [blame^] | 4093 | #line 1349 "/proj/llvm/llvm-4/tools/llvm-upgrade/UpgradeParser.y" |
Reid Spencer | e7c3c60 | 2006-11-30 06:36:44 +0000 | [diff] [blame] | 4094 | |
| 4095 | |
| 4096 | int yyerror(const char *ErrorMsg) { |
| 4097 | std::string where |
| 4098 | = std::string((CurFilename == "-") ? std::string("<stdin>") : CurFilename) |
| 4099 | + ":" + llvm::utostr((unsigned) Upgradelineno) + ": "; |
| 4100 | std::string errMsg = std::string(ErrorMsg) + "\n" + where + " while reading "; |
| 4101 | if (yychar == YYEMPTY || yychar == 0) |
| 4102 | errMsg += "end-of-file."; |
| 4103 | else |
| 4104 | errMsg += "token: '" + std::string(Upgradetext, Upgradeleng) + "'"; |
| 4105 | std::cerr << errMsg << '\n'; |
| 4106 | exit(1); |
| 4107 | } |
| 4108 | |