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