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