[llvm-commits] CVS: llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs UpgradeParser.h.cvs UpgradeParser.y UpgradeParser.y.cvs
Chris Lattner
sabre at nondot.org
Mon Feb 12 14:58:54 PST 2007
Changes in directory llvm/tools/llvm-upgrade:
UpgradeParser.cpp.cvs updated: 1.60 -> 1.61
UpgradeParser.h.cvs updated: 1.44 -> 1.45
UpgradeParser.y updated: 1.63 -> 1.64
UpgradeParser.y.cvs updated: 1.59 -> 1.60
---
Log message:
stop using me thods that take a vector
---
Diffs of the changes: (+4627 -3327)
UpgradeParser.cpp.cvs | 7399 ++++++++++++++++++++++++++++----------------------
UpgradeParser.h.cvs | 511 ++-
UpgradeParser.y | 4
UpgradeParser.y.cvs | 4
4 files changed, 4627 insertions(+), 3291 deletions(-)
Index: llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs
diff -u llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs:1.60 llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs:1.61
--- llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs:1.60 Sun Feb 11 15:39:05 2007
+++ llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs Mon Feb 12 16:58:37 2007
@@ -1,167 +1,386 @@
+/* A Bison parser, made by GNU Bison 2.3. */
-/* A Bison parser, made from /Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y
- by GNU Bison version 1.28 */
+/* Skeleton implementation for Bison's Yacc-like parsers in C
-#define YYBISON 1 /* Identify Bison output. */
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "2.3"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Using locations. */
+#define YYLSP_NEEDED 0
+
+/* Substitute the variable and function names. */
#define yyparse Upgradeparse
-#define yylex Upgradelex
+#define yylex Upgradelex
#define yyerror Upgradeerror
-#define yylval Upgradelval
-#define yychar Upgradechar
+#define yylval Upgradelval
+#define yychar Upgradechar
#define yydebug Upgradedebug
#define yynerrs Upgradenerrs
-#define ESINT64VAL 257
-#define EUINT64VAL 258
-#define SINTVAL 259
-#define UINTVAL 260
-#define FPVAL 261
-#define VOID 262
-#define BOOL 263
-#define SBYTE 264
-#define UBYTE 265
-#define SHORT 266
-#define USHORT 267
-#define INT 268
-#define UINT 269
-#define LONG 270
-#define ULONG 271
-#define FLOAT 272
-#define DOUBLE 273
-#define TYPE 274
-#define LABEL 275
-#define VAR_ID 276
-#define LABELSTR 277
-#define STRINGCONSTANT 278
-#define IMPLEMENTATION 279
-#define ZEROINITIALIZER 280
-#define TRUETOK 281
-#define FALSETOK 282
-#define BEGINTOK 283
-#define ENDTOK 284
-#define DECLARE 285
-#define GLOBAL 286
-#define CONSTANT 287
-#define SECTION 288
-#define VOLATILE 289
-#define TO 290
-#define DOTDOTDOT 291
-#define NULL_TOK 292
-#define UNDEF 293
-#define CONST 294
-#define INTERNAL 295
-#define LINKONCE 296
-#define WEAK 297
-#define APPENDING 298
-#define DLLIMPORT 299
-#define DLLEXPORT 300
-#define EXTERN_WEAK 301
-#define OPAQUE 302
-#define NOT 303
-#define EXTERNAL 304
-#define TARGET 305
-#define TRIPLE 306
-#define ENDIAN 307
-#define POINTERSIZE 308
-#define LITTLE 309
-#define BIG 310
-#define ALIGN 311
-#define DEPLIBS 312
-#define CALL 313
-#define TAIL 314
-#define ASM_TOK 315
-#define MODULE 316
-#define SIDEEFFECT 317
-#define CC_TOK 318
-#define CCC_TOK 319
-#define CSRETCC_TOK 320
-#define FASTCC_TOK 321
-#define COLDCC_TOK 322
-#define X86_STDCALLCC_TOK 323
-#define X86_FASTCALLCC_TOK 324
-#define DATALAYOUT 325
-#define RET 326
-#define BR 327
-#define SWITCH 328
-#define INVOKE 329
-#define UNREACHABLE 330
-#define UNWIND 331
-#define EXCEPT 332
-#define ADD 333
-#define SUB 334
-#define MUL 335
-#define DIV 336
-#define UDIV 337
-#define SDIV 338
-#define FDIV 339
-#define REM 340
-#define UREM 341
-#define SREM 342
-#define FREM 343
-#define AND 344
-#define OR 345
-#define XOR 346
-#define SHL 347
-#define SHR 348
-#define ASHR 349
-#define LSHR 350
-#define SETLE 351
-#define SETGE 352
-#define SETLT 353
-#define SETGT 354
-#define SETEQ 355
-#define SETNE 356
-#define ICMP 357
-#define FCMP 358
-#define MALLOC 359
-#define ALLOCA 360
-#define FREE 361
-#define LOAD 362
-#define STORE 363
-#define GETELEMENTPTR 364
-#define PHI_TOK 365
-#define SELECT 366
-#define VAARG 367
-#define EXTRACTELEMENT 368
-#define INSERTELEMENT 369
-#define SHUFFLEVECTOR 370
-#define VAARG_old 371
-#define VANEXT_old 372
-#define EQ 373
-#define NE 374
-#define SLT 375
-#define SGT 376
-#define SLE 377
-#define SGE 378
-#define ULT 379
-#define UGT 380
-#define ULE 381
-#define UGE 382
-#define OEQ 383
-#define ONE 384
-#define OLT 385
-#define OGT 386
-#define OLE 387
-#define OGE 388
-#define ORD 389
-#define UNO 390
-#define UEQ 391
-#define UNE 392
-#define CAST 393
-#define TRUNC 394
-#define ZEXT 395
-#define SEXT 396
-#define FPTRUNC 397
-#define FPEXT 398
-#define FPTOUI 399
-#define FPTOSI 400
-#define UITOFP 401
-#define SITOFP 402
-#define PTRTOINT 403
-#define INTTOPTR 404
-#define BITCAST 405
-#line 14 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ ESINT64VAL = 258,
+ EUINT64VAL = 259,
+ SINTVAL = 260,
+ UINTVAL = 261,
+ FPVAL = 262,
+ VOID = 263,
+ BOOL = 264,
+ SBYTE = 265,
+ UBYTE = 266,
+ SHORT = 267,
+ USHORT = 268,
+ INT = 269,
+ UINT = 270,
+ LONG = 271,
+ ULONG = 272,
+ FLOAT = 273,
+ DOUBLE = 274,
+ TYPE = 275,
+ LABEL = 276,
+ VAR_ID = 277,
+ LABELSTR = 278,
+ STRINGCONSTANT = 279,
+ IMPLEMENTATION = 280,
+ ZEROINITIALIZER = 281,
+ TRUETOK = 282,
+ FALSETOK = 283,
+ BEGINTOK = 284,
+ ENDTOK = 285,
+ DECLARE = 286,
+ GLOBAL = 287,
+ CONSTANT = 288,
+ SECTION = 289,
+ VOLATILE = 290,
+ TO = 291,
+ DOTDOTDOT = 292,
+ NULL_TOK = 293,
+ UNDEF = 294,
+ CONST = 295,
+ INTERNAL = 296,
+ LINKONCE = 297,
+ WEAK = 298,
+ APPENDING = 299,
+ DLLIMPORT = 300,
+ DLLEXPORT = 301,
+ EXTERN_WEAK = 302,
+ OPAQUE = 303,
+ NOT = 304,
+ EXTERNAL = 305,
+ TARGET = 306,
+ TRIPLE = 307,
+ ENDIAN = 308,
+ POINTERSIZE = 309,
+ LITTLE = 310,
+ BIG = 311,
+ ALIGN = 312,
+ DEPLIBS = 313,
+ CALL = 314,
+ TAIL = 315,
+ ASM_TOK = 316,
+ MODULE = 317,
+ SIDEEFFECT = 318,
+ CC_TOK = 319,
+ CCC_TOK = 320,
+ CSRETCC_TOK = 321,
+ FASTCC_TOK = 322,
+ COLDCC_TOK = 323,
+ X86_STDCALLCC_TOK = 324,
+ X86_FASTCALLCC_TOK = 325,
+ DATALAYOUT = 326,
+ RET = 327,
+ BR = 328,
+ SWITCH = 329,
+ INVOKE = 330,
+ UNREACHABLE = 331,
+ UNWIND = 332,
+ EXCEPT = 333,
+ ADD = 334,
+ SUB = 335,
+ MUL = 336,
+ DIV = 337,
+ UDIV = 338,
+ SDIV = 339,
+ FDIV = 340,
+ REM = 341,
+ UREM = 342,
+ SREM = 343,
+ FREM = 344,
+ AND = 345,
+ OR = 346,
+ XOR = 347,
+ SHL = 348,
+ SHR = 349,
+ ASHR = 350,
+ LSHR = 351,
+ SETLE = 352,
+ SETGE = 353,
+ SETLT = 354,
+ SETGT = 355,
+ SETEQ = 356,
+ SETNE = 357,
+ ICMP = 358,
+ FCMP = 359,
+ MALLOC = 360,
+ ALLOCA = 361,
+ FREE = 362,
+ LOAD = 363,
+ STORE = 364,
+ GETELEMENTPTR = 365,
+ PHI_TOK = 366,
+ SELECT = 367,
+ VAARG = 368,
+ EXTRACTELEMENT = 369,
+ INSERTELEMENT = 370,
+ SHUFFLEVECTOR = 371,
+ VAARG_old = 372,
+ VANEXT_old = 373,
+ EQ = 374,
+ NE = 375,
+ SLT = 376,
+ SGT = 377,
+ SLE = 378,
+ SGE = 379,
+ ULT = 380,
+ UGT = 381,
+ ULE = 382,
+ UGE = 383,
+ OEQ = 384,
+ ONE = 385,
+ OLT = 386,
+ OGT = 387,
+ OLE = 388,
+ OGE = 389,
+ ORD = 390,
+ UNO = 391,
+ UEQ = 392,
+ UNE = 393,
+ CAST = 394,
+ TRUNC = 395,
+ ZEXT = 396,
+ SEXT = 397,
+ FPTRUNC = 398,
+ FPEXT = 399,
+ FPTOUI = 400,
+ FPTOSI = 401,
+ UITOFP = 402,
+ SITOFP = 403,
+ PTRTOINT = 404,
+ INTTOPTR = 405,
+ BITCAST = 406
+ };
+#endif
+/* Tokens. */
+#define ESINT64VAL 258
+#define EUINT64VAL 259
+#define SINTVAL 260
+#define UINTVAL 261
+#define FPVAL 262
+#define VOID 263
+#define BOOL 264
+#define SBYTE 265
+#define UBYTE 266
+#define SHORT 267
+#define USHORT 268
+#define INT 269
+#define UINT 270
+#define LONG 271
+#define ULONG 272
+#define FLOAT 273
+#define DOUBLE 274
+#define TYPE 275
+#define LABEL 276
+#define VAR_ID 277
+#define LABELSTR 278
+#define STRINGCONSTANT 279
+#define IMPLEMENTATION 280
+#define ZEROINITIALIZER 281
+#define TRUETOK 282
+#define FALSETOK 283
+#define BEGINTOK 284
+#define ENDTOK 285
+#define DECLARE 286
+#define GLOBAL 287
+#define CONSTANT 288
+#define SECTION 289
+#define VOLATILE 290
+#define TO 291
+#define DOTDOTDOT 292
+#define NULL_TOK 293
+#define UNDEF 294
+#define CONST 295
+#define INTERNAL 296
+#define LINKONCE 297
+#define WEAK 298
+#define APPENDING 299
+#define DLLIMPORT 300
+#define DLLEXPORT 301
+#define EXTERN_WEAK 302
+#define OPAQUE 303
+#define NOT 304
+#define EXTERNAL 305
+#define TARGET 306
+#define TRIPLE 307
+#define ENDIAN 308
+#define POINTERSIZE 309
+#define LITTLE 310
+#define BIG 311
+#define ALIGN 312
+#define DEPLIBS 313
+#define CALL 314
+#define TAIL 315
+#define ASM_TOK 316
+#define MODULE 317
+#define SIDEEFFECT 318
+#define CC_TOK 319
+#define CCC_TOK 320
+#define CSRETCC_TOK 321
+#define FASTCC_TOK 322
+#define COLDCC_TOK 323
+#define X86_STDCALLCC_TOK 324
+#define X86_FASTCALLCC_TOK 325
+#define DATALAYOUT 326
+#define RET 327
+#define BR 328
+#define SWITCH 329
+#define INVOKE 330
+#define UNREACHABLE 331
+#define UNWIND 332
+#define EXCEPT 333
+#define ADD 334
+#define SUB 335
+#define MUL 336
+#define DIV 337
+#define UDIV 338
+#define SDIV 339
+#define FDIV 340
+#define REM 341
+#define UREM 342
+#define SREM 343
+#define FREM 344
+#define AND 345
+#define OR 346
+#define XOR 347
+#define SHL 348
+#define SHR 349
+#define ASHR 350
+#define LSHR 351
+#define SETLE 352
+#define SETGE 353
+#define SETLT 354
+#define SETGT 355
+#define SETEQ 356
+#define SETNE 357
+#define ICMP 358
+#define FCMP 359
+#define MALLOC 360
+#define ALLOCA 361
+#define FREE 362
+#define LOAD 363
+#define STORE 364
+#define GETELEMENTPTR 365
+#define PHI_TOK 366
+#define SELECT 367
+#define VAARG 368
+#define EXTRACTELEMENT 369
+#define INSERTELEMENT 370
+#define SHUFFLEVECTOR 371
+#define VAARG_old 372
+#define VANEXT_old 373
+#define EQ 374
+#define NE 375
+#define SLT 376
+#define SGT 377
+#define SLE 378
+#define SGE 379
+#define ULT 380
+#define UGT 381
+#define ULE 382
+#define UGE 383
+#define OEQ 384
+#define ONE 385
+#define OLT 386
+#define OGT 387
+#define OLE 388
+#define OGE 389
+#define ORD 390
+#define UNO 391
+#define UEQ 392
+#define UNE 393
+#define CAST 394
+#define TRUNC 395
+#define ZEXT 396
+#define SEXT 397
+#define FPTRUNC 398
+#define FPEXT 399
+#define FPTOUI 400
+#define FPTOSI 401
+#define UITOFP 402
+#define SITOFP 403
+#define PTRTOINT 404
+#define INTTOPTR 405
+#define BITCAST 406
+
+
+
+
+/* Copy the first part of user declarations. */
+#line 14 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
#include "UpgradeInternals.h"
#include "llvm/CallingConv.h"
@@ -1438,7 +1657,7 @@
}
const Type *IdxTy =
- GetElementPtrInst::getIndexedType(PTy, VIndices, true);
+ GetElementPtrInst::getIndexedType(PTy, &VIndices[0], VIndices.size(), true);
if (!IdxTy)
error("Index list invalid for constant getelementptr");
return IdxTy;
@@ -1601,8 +1820,29 @@
using namespace llvm;
-#line 1454 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-typedef union {
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+#line 1454 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+{
llvm::Module *ModuleVal;
llvm::Function *FunctionVal;
std::pair<llvm::PATypeInfo, char*> *ArgVal;
@@ -1642,1152 +1882,1835 @@
llvm::ICmpInst::Predicate IPred;
llvm::FCmpInst::Predicate FPred;
llvm::Module::Endianness Endianness;
-} YYSTYPE;
-#include <stdio.h>
-
-#ifndef __cplusplus
-#ifndef __STDC__
-#define const
-#endif
+}
+/* Line 193 of yacc.c. */
+#line 1888 "UpgradeParser.tab.c"
+ YYSTYPE;
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
#endif
-#define YYFINAL 605
-#define YYFLAG -32768
-#define YYNTBASE 166
-
-#define YYTRANSLATE(x) ((unsigned)(x) <= 405 ? yytranslate[x] : 245)
-
-static const short yytranslate[] = { 0,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 155,
- 156, 164, 2, 153, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 160,
- 152, 161, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 157, 154, 159, 2, 2, 2, 2, 2, 165, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 158,
- 2, 2, 162, 2, 163, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
- 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
- 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
- 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
- 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
- 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
- 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
- 147, 148, 149, 150, 151
-};
+/* Copy the second part of user declarations. */
-#if YYDEBUG != 0
-static const short yyprhs[] = { 0,
- 0, 2, 4, 6, 8, 10, 12, 14, 16, 18,
- 20, 22, 24, 26, 28, 30, 32, 34, 36, 38,
- 40, 42, 44, 46, 48, 50, 52, 54, 56, 58,
- 60, 62, 64, 66, 68, 70, 72, 74, 76, 78,
- 80, 82, 84, 86, 88, 90, 92, 94, 96, 98,
- 100, 102, 104, 106, 108, 110, 112, 114, 116, 118,
- 120, 122, 124, 126, 128, 130, 132, 134, 136, 138,
- 140, 142, 144, 146, 148, 150, 152, 154, 156, 158,
- 161, 162, 164, 166, 168, 170, 172, 174, 176, 177,
- 178, 180, 182, 184, 186, 188, 190, 193, 194, 197,
- 198, 202, 205, 206, 208, 209, 213, 215, 218, 220,
- 222, 224, 226, 228, 230, 232, 234, 236, 238, 240,
- 242, 244, 246, 248, 250, 252, 254, 256, 258, 261,
- 266, 272, 278, 282, 285, 291, 296, 299, 301, 305,
- 307, 311, 313, 314, 319, 323, 327, 332, 337, 341,
- 348, 354, 357, 360, 363, 366, 369, 372, 375, 378,
- 381, 384, 391, 397, 406, 413, 420, 427, 435, 443,
- 450, 457, 466, 475, 479, 481, 483, 485, 487, 490,
- 493, 498, 501, 503, 508, 511, 516, 517, 525, 526,
- 534, 535, 543, 544, 552, 556, 561, 562, 564, 566,
- 568, 572, 576, 580, 584, 588, 592, 594, 595, 597,
- 599, 601, 602, 605, 609, 611, 613, 617, 619, 620,
- 629, 631, 633, 637, 639, 641, 644, 645, 647, 649,
- 650, 651, 657, 658, 660, 662, 664, 666, 668, 670,
- 672, 674, 676, 680, 682, 688, 690, 692, 694, 696,
- 699, 702, 705, 709, 712, 713, 715, 717, 719, 722,
- 725, 729, 739, 749, 758, 772, 774, 776, 783, 789,
- 792, 799, 807, 809, 813, 815, 816, 819, 821, 827,
- 833, 839, 846, 853, 856, 861, 866, 873, 878, 883,
- 888, 893, 900, 907, 910, 918, 920, 923, 924, 926,
- 927, 931, 938, 942, 949, 952, 957, 964
-};
-static const short yyrhs[] = { 5,
- 0, 6, 0, 3, 0, 4, 0, 79, 0, 80,
- 0, 81, 0, 82, 0, 83, 0, 84, 0, 85,
- 0, 86, 0, 87, 0, 88, 0, 89, 0, 90,
- 0, 91, 0, 92, 0, 97, 0, 98, 0, 99,
- 0, 100, 0, 101, 0, 102, 0, 119, 0, 120,
- 0, 121, 0, 122, 0, 123, 0, 124, 0, 125,
- 0, 126, 0, 127, 0, 128, 0, 129, 0, 130,
- 0, 131, 0, 132, 0, 133, 0, 134, 0, 135,
- 0, 136, 0, 137, 0, 138, 0, 125, 0, 126,
- 0, 127, 0, 128, 0, 27, 0, 28, 0, 93,
- 0, 94, 0, 95, 0, 96, 0, 140, 0, 141,
- 0, 142, 0, 143, 0, 144, 0, 145, 0, 146,
- 0, 147, 0, 148, 0, 149, 0, 150, 0, 151,
- 0, 139, 0, 16, 0, 14, 0, 12, 0, 10,
- 0, 17, 0, 15, 0, 13, 0, 11, 0, 175,
- 0, 176, 0, 18, 0, 19, 0, 211, 152, 0,
- 0, 41, 0, 42, 0, 43, 0, 44, 0, 45,
- 0, 46, 0, 47, 0, 0, 0, 65, 0, 66,
- 0, 67, 0, 68, 0, 69, 0, 70, 0, 64,
- 4, 0, 0, 57, 4, 0, 0, 153, 57, 4,
- 0, 34, 24, 0, 0, 184, 0, 0, 153, 187,
- 186, 0, 184, 0, 57, 4, 0, 190, 0, 8,
- 0, 192, 0, 8, 0, 192, 0, 9, 0, 10,
- 0, 11, 0, 12, 0, 13, 0, 14, 0, 15,
- 0, 16, 0, 17, 0, 18, 0, 19, 0, 21,
- 0, 191, 0, 48, 0, 227, 0, 154, 4, 0,
- 189, 155, 194, 156, 0, 157, 4, 158, 192, 159,
- 0, 160, 4, 158, 192, 161, 0, 162, 193, 163,
- 0, 162, 163, 0, 160, 162, 193, 163, 161, 0,
- 160, 162, 163, 161, 0, 192, 164, 0, 192, 0,
- 193, 153, 192, 0, 193, 0, 193, 153, 37, 0,
- 37, 0, 0, 190, 157, 197, 159, 0, 190, 157,
- 159, 0, 190, 165, 24, 0, 190, 160, 197, 161,
- 0, 190, 162, 197, 163, 0, 190, 162, 163, 0,
- 190, 160, 162, 197, 163, 161, 0, 190, 160, 162,
- 163, 161, 0, 190, 38, 0, 190, 39, 0, 190,
- 227, 0, 190, 196, 0, 190, 26, 0, 175, 167,
- 0, 176, 4, 0, 9, 27, 0, 9, 28, 0,
- 178, 7, 0, 174, 155, 195, 36, 190, 156, 0,
- 110, 155, 195, 242, 156, 0, 112, 155, 195, 153,
- 195, 153, 195, 156, 0, 168, 155, 195, 153, 195,
- 156, 0, 169, 155, 195, 153, 195, 156, 0, 170,
- 155, 195, 153, 195, 156, 0, 103, 171, 155, 195,
- 153, 195, 156, 0, 104, 172, 155, 195, 153, 195,
- 156, 0, 173, 155, 195, 153, 195, 156, 0, 114,
- 155, 195, 153, 195, 156, 0, 115, 155, 195, 153,
- 195, 153, 195, 156, 0, 116, 155, 195, 153, 195,
- 153, 195, 156, 0, 197, 153, 195, 0, 195, 0,
- 32, 0, 33, 0, 200, 0, 200, 220, 0, 200,
- 222, 0, 200, 62, 61, 206, 0, 200, 25, 0,
- 201, 0, 201, 179, 20, 188, 0, 201, 222, 0,
- 201, 62, 61, 206, 0, 0, 201, 179, 180, 198,
- 195, 202, 186, 0, 0, 201, 179, 50, 198, 190,
- 203, 186, 0, 0, 201, 179, 45, 198, 190, 204,
- 186, 0, 0, 201, 179, 47, 198, 190, 205, 186,
- 0, 201, 51, 208, 0, 201, 58, 152, 209, 0,
- 0, 24, 0, 56, 0, 55, 0, 53, 152, 207,
- 0, 54, 152, 4, 0, 52, 152, 24, 0, 71,
- 152, 24, 0, 157, 210, 159, 0, 210, 153, 24,
- 0, 24, 0, 0, 22, 0, 24, 0, 211, 0,
- 0, 190, 212, 0, 214, 153, 213, 0, 213, 0,
- 214, 0, 214, 153, 37, 0, 37, 0, 0, 181,
- 188, 211, 155, 215, 156, 185, 182, 0, 29, 0,
- 162, 0, 180, 216, 217, 0, 30, 0, 163, 0,
- 230, 219, 0, 0, 45, 0, 47, 0, 0, 0,
- 31, 223, 221, 224, 216, 0, 0, 63, 0, 3,
- 0, 4, 0, 7, 0, 27, 0, 28, 0, 38,
- 0, 39, 0, 26, 0, 160, 197, 161, 0, 196,
- 0, 61, 225, 24, 153, 24, 0, 166, 0, 211,
- 0, 227, 0, 226, 0, 190, 228, 0, 230, 231,
- 0, 218, 231, 0, 232, 179, 234, 0, 232, 236,
- 0, 0, 23, 0, 77, 0, 78, 0, 72, 229,
- 0, 72, 8, 0, 73, 21, 228, 0, 73, 9,
- 228, 153, 21, 228, 153, 21, 228, 0, 74, 177,
- 228, 153, 21, 228, 157, 235, 159, 0, 74, 177,
- 228, 153, 21, 228, 157, 159, 0, 75, 181, 188,
- 228, 155, 239, 156, 36, 21, 228, 233, 21, 228,
- 0, 233, 0, 76, 0, 235, 177, 226, 153, 21,
- 228, 0, 177, 226, 153, 21, 228, 0, 179, 241,
- 0, 190, 157, 228, 153, 228, 159, 0, 237, 153,
- 157, 228, 153, 228, 159, 0, 229, 0, 238, 153,
- 229, 0, 238, 0, 0, 60, 59, 0, 59, 0,
- 168, 190, 228, 153, 228, 0, 169, 190, 228, 153,
- 228, 0, 170, 190, 228, 153, 228, 0, 103, 171,
- 190, 228, 153, 228, 0, 104, 172, 190, 228, 153,
- 228, 0, 49, 229, 0, 173, 229, 153, 229, 0,
- 174, 229, 36, 190, 0, 112, 229, 153, 229, 153,
- 229, 0, 113, 229, 153, 190, 0, 117, 229, 153,
- 190, 0, 118, 229, 153, 190, 0, 114, 229, 153,
- 229, 0, 115, 229, 153, 229, 153, 229, 0, 116,
- 229, 153, 229, 153, 229, 0, 111, 237, 0, 240,
- 181, 188, 228, 155, 239, 156, 0, 244, 0, 153,
- 238, 0, 0, 35, 0, 0, 105, 190, 183, 0,
- 105, 190, 153, 15, 228, 183, 0, 106, 190, 183,
- 0, 106, 190, 153, 15, 228, 183, 0, 107, 229,
- 0, 243, 108, 190, 228, 0, 243, 109, 229, 153,
- 190, 228, 0, 110, 190, 228, 242, 0
-};
+/* Line 216 of yacc.c. */
+#line 1901 "UpgradeParser.tab.c"
+#ifdef short
+# undef short
#endif
-#if YYDEBUG != 0
-static const short yyrline[] = { 0,
- 1594, 1595, 1603, 1604, 1614, 1614, 1614, 1614, 1614, 1614,
- 1614, 1614, 1614, 1614, 1614, 1618, 1618, 1618, 1622, 1622,
- 1622, 1622, 1622, 1622, 1626, 1626, 1627, 1627, 1628, 1628,
- 1629, 1629, 1630, 1630, 1634, 1634, 1635, 1635, 1636, 1636,
- 1637, 1637, 1638, 1638, 1639, 1639, 1640, 1640, 1641, 1642,
- 1645, 1645, 1645, 1645, 1649, 1649, 1649, 1649, 1649, 1649,
- 1649, 1650, 1650, 1650, 1650, 1650, 1650, 1656, 1656, 1656,
- 1656, 1660, 1660, 1660, 1660, 1664, 1664, 1668, 1668, 1673,
- 1676, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1692,
- 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1709, 1710, 1718,
- 1719, 1727, 1736, 1737, 1744, 1745, 1749, 1753, 1769, 1770,
- 1777, 1778, 1785, 1793, 1793, 1793, 1793, 1793, 1793, 1793,
- 1794, 1794, 1794, 1794, 1794, 1799, 1803, 1807, 1812, 1821,
- 1838, 1844, 1857, 1866, 1870, 1881, 1885, 1898, 1902, 1909,
- 1910, 1916, 1923, 1935, 1965, 1978, 2001, 2029, 2051, 2062,
- 2084, 2095, 2104, 2109, 2167, 2174, 2182, 2189, 2196, 2200,
- 2204, 2213, 2228, 2241, 2250, 2278, 2291, 2300, 2306, 2312,
- 2323, 2329, 2335, 2346, 2347, 2356, 2357, 2369, 2378, 2379,
- 2380, 2381, 2382, 2398, 2418, 2420, 2422, 2426, 2429, 2433,
- 2436, 2440, 2443, 2448, 2451, 2453, 2455, 2460, 2474, 2475,
- 2479, 2482, 2490, 2494, 2501, 2505, 2509, 2513, 2521, 2521,
- 2525, 2526, 2530, 2538, 2543, 2551, 2552, 2559, 2566, 2570,
- 2746, 2746, 2750, 2760, 2760, 2764, 2769, 2770, 2771, 2775,
- 2776, 2776, 2788, 2789, 2794, 2795, 2796, 2797, 2798, 2799,
- 2800, 2801, 2802, 2823, 2826, 2841, 2842, 2847, 2847, 2855,
- 2864, 2867, 2876, 2886, 2891, 2900, 2911, 2911, 2914, 2917,
- 2920, 2924, 2930, 2945, 2951, 3007, 3010, 3016, 3026, 3039,
- 3068, 3076, 3084, 3088, 3095, 3096, 3100, 3103, 3109, 3126,
- 3142, 3156, 3168, 3180, 3191, 3209, 3218, 3227, 3234, 3255,
- 3279, 3285, 3291, 3297, 3313, 3391, 3399, 3400, 3404, 3405,
- 3409, 3415, 3421, 3427, 3433, 3440, 3452, 3477
-};
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
#endif
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
-#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
-static const char * const yytname[] = { "$","error","$undefined.","ESINT64VAL",
-"EUINT64VAL","SINTVAL","UINTVAL","FPVAL","VOID","BOOL","SBYTE","UBYTE","SHORT",
-"USHORT","INT","UINT","LONG","ULONG","FLOAT","DOUBLE","TYPE","LABEL","VAR_ID",
-"LABELSTR","STRINGCONSTANT","IMPLEMENTATION","ZEROINITIALIZER","TRUETOK","FALSETOK",
-"BEGINTOK","ENDTOK","DECLARE","GLOBAL","CONSTANT","SECTION","VOLATILE","TO",
-"DOTDOTDOT","NULL_TOK","UNDEF","CONST","INTERNAL","LINKONCE","WEAK","APPENDING",
-"DLLIMPORT","DLLEXPORT","EXTERN_WEAK","OPAQUE","NOT","EXTERNAL","TARGET","TRIPLE",
-"ENDIAN","POINTERSIZE","LITTLE","BIG","ALIGN","DEPLIBS","CALL","TAIL","ASM_TOK",
-"MODULE","SIDEEFFECT","CC_TOK","CCC_TOK","CSRETCC_TOK","FASTCC_TOK","COLDCC_TOK",
-"X86_STDCALLCC_TOK","X86_FASTCALLCC_TOK","DATALAYOUT","RET","BR","SWITCH","INVOKE",
-"UNREACHABLE","UNWIND","EXCEPT","ADD","SUB","MUL","DIV","UDIV","SDIV","FDIV",
-"REM","UREM","SREM","FREM","AND","OR","XOR","SHL","SHR","ASHR","LSHR","SETLE",
-"SETGE","SETLT","SETGT","SETEQ","SETNE","ICMP","FCMP","MALLOC","ALLOCA","FREE",
-"LOAD","STORE","GETELEMENTPTR","PHI_TOK","SELECT","VAARG","EXTRACTELEMENT","INSERTELEMENT",
-"SHUFFLEVECTOR","VAARG_old","VANEXT_old","EQ","NE","SLT","SGT","SLE","SGE","ULT",
-"UGT","ULE","UGE","OEQ","ONE","OLT","OGT","OLE","OGE","ORD","UNO","UEQ","UNE",
-"CAST","TRUNC","ZEXT","SEXT","FPTRUNC","FPEXT","FPTOUI","FPTOSI","UITOFP","SITOFP",
-"PTRTOINT","INTTOPTR","BITCAST","'='","','","'\\\\'","'('","')'","'['","'x'",
-"']'","'<'","'>'","'{'","'}'","'*'","'c'","INTVAL","EINT64VAL","ArithmeticOps",
-"LogicalOps","SetCondOps","IPredicates","FPredicates","ShiftOps","CastOps","SIntType",
-"UIntType","IntType","FPType","OptAssign","OptLinkage","OptCallingConv","OptAlign",
-"OptCAlign","SectionString","OptSection","GlobalVarAttributes","GlobalVarAttribute",
-"TypesV","UpRTypesV","Types","PrimType","UpRTypes","TypeListI","ArgTypeListI",
-"ConstVal","ConstExpr","ConstVector","GlobalType","Module","FunctionList","ConstPool",
-"@1","@2","@3","@4","AsmBlock","BigOrLittle","TargetDefinition","LibrariesDefinition",
-"LibList","Name","OptName","ArgVal","ArgListH","ArgList","FunctionHeaderH","BEGIN",
-"FunctionHeader","END","Function","FnDeclareLinkage","FunctionProto","@5","@6",
-"OptSideEffect","ConstValueRef","SymbolicValueRef","ValueRef","ResolvedVal",
-"BasicBlockList","BasicBlock","InstructionList","Unwind","BBTerminatorInst",
-"JumpTable","Inst","PHIList","ValueRefList","ValueRefListE","OptTailCall","InstVal",
-"IndexList","OptVolatile","MemoryInst", NULL
-};
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
#endif
-static const short yyr1[] = { 0,
- 166, 166, 167, 167, 168, 168, 168, 168, 168, 168,
- 168, 168, 168, 168, 168, 169, 169, 169, 170, 170,
- 170, 170, 170, 170, 171, 171, 171, 171, 171, 171,
- 171, 171, 171, 171, 172, 172, 172, 172, 172, 172,
- 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
- 173, 173, 173, 173, 174, 174, 174, 174, 174, 174,
- 174, 174, 174, 174, 174, 174, 174, 175, 175, 175,
- 175, 176, 176, 176, 176, 177, 177, 178, 178, 179,
- 179, 180, 180, 180, 180, 180, 180, 180, 180, 181,
- 181, 181, 181, 181, 181, 181, 181, 182, 182, 183,
- 183, 184, 185, 185, 186, 186, 187, 187, 188, 188,
- 189, 189, 190, 191, 191, 191, 191, 191, 191, 191,
- 191, 191, 191, 191, 191, 192, 192, 192, 192, 192,
- 192, 192, 192, 192, 192, 192, 192, 193, 193, 194,
- 194, 194, 194, 195, 195, 195, 195, 195, 195, 195,
- 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
- 195, 196, 196, 196, 196, 196, 196, 196, 196, 196,
- 196, 196, 196, 197, 197, 198, 198, 199, 200, 200,
- 200, 200, 200, 201, 201, 201, 202, 201, 203, 201,
- 204, 201, 205, 201, 201, 201, 201, 206, 207, 207,
- 208, 208, 208, 208, 209, 210, 210, 210, 211, 211,
- 212, 212, 213, 214, 214, 215, 215, 215, 215, 216,
- 217, 217, 218, 219, 219, 220, 221, 221, 221, 223,
- 224, 222, 225, 225, 226, 226, 226, 226, 226, 226,
- 226, 226, 226, 226, 226, 227, 227, 228, 228, 229,
- 230, 230, 231, 232, 232, 232, 233, 233, 234, 234,
- 234, 234, 234, 234, 234, 234, 234, 235, 235, 236,
- 237, 237, 238, 238, 239, 239, 240, 240, 241, 241,
- 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
- 241, 241, 241, 241, 241, 241, 242, 242, 243, 243,
- 244, 244, 244, 244, 244, 244, 244, 244
-};
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
-static const short yyr2[] = { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
- 0, 1, 1, 1, 1, 1, 1, 1, 0, 0,
- 1, 1, 1, 1, 1, 1, 2, 0, 2, 0,
- 3, 2, 0, 1, 0, 3, 1, 2, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 4,
- 5, 5, 3, 2, 5, 4, 2, 1, 3, 1,
- 3, 1, 0, 4, 3, 3, 4, 4, 3, 6,
- 5, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 6, 5, 8, 6, 6, 6, 7, 7, 6,
- 6, 8, 8, 3, 1, 1, 1, 1, 2, 2,
- 4, 2, 1, 4, 2, 4, 0, 7, 0, 7,
- 0, 7, 0, 7, 3, 4, 0, 1, 1, 1,
- 3, 3, 3, 3, 3, 3, 1, 0, 1, 1,
- 1, 0, 2, 3, 1, 1, 3, 1, 0, 8,
- 1, 1, 3, 1, 1, 2, 0, 1, 1, 0,
- 0, 5, 0, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 3, 1, 5, 1, 1, 1, 1, 2,
- 2, 2, 3, 2, 0, 1, 1, 1, 2, 2,
- 3, 9, 9, 8, 13, 1, 1, 6, 5, 2,
- 6, 7, 1, 3, 1, 0, 2, 1, 5, 5,
- 5, 6, 6, 2, 4, 4, 6, 4, 4, 4,
- 4, 6, 6, 2, 7, 1, 2, 0, 1, 0,
- 3, 6, 3, 6, 2, 4, 6, 4
-};
+/* Identity function, used to suppress warnings about constant conditions. */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int i)
+#else
+static int
+YYID (i)
+ int i;
+#endif
+{
+ return i;
+}
+#endif
-static const short yydefact[] = { 197,
- 89, 183, 182, 230, 82, 83, 84, 85, 86, 87,
- 88, 0, 90, 255, 179, 180, 255, 209, 210, 0,
- 0, 0, 89, 0, 185, 227, 0, 0, 91, 92,
- 93, 94, 95, 96, 0, 0, 256, 252, 81, 224,
- 225, 226, 251, 0, 0, 0, 0, 195, 0, 0,
- 0, 0, 0, 0, 0, 80, 228, 229, 231, 198,
- 181, 97, 1, 2, 110, 114, 115, 116, 117, 118,
- 119, 120, 121, 122, 123, 124, 125, 127, 0, 0,
- 0, 0, 246, 0, 0, 109, 126, 113, 247, 128,
- 221, 222, 223, 300, 254, 0, 0, 0, 0, 208,
- 196, 186, 184, 176, 177, 0, 0, 0, 0, 90,
- 129, 0, 0, 0, 112, 134, 138, 0, 0, 143,
- 137, 299, 0, 278, 0, 0, 0, 0, 90, 267,
- 257, 258, 5, 6, 7, 8, 9, 10, 11, 12,
- 13, 14, 15, 16, 17, 18, 51, 52, 53, 54,
- 19, 20, 21, 22, 23, 24, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 67, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 0, 0, 0, 0, 0, 266, 253,
- 90, 270, 0, 296, 203, 200, 199, 201, 202, 204,
- 207, 0, 191, 193, 189, 114, 115, 116, 117, 118,
- 119, 120, 121, 122, 123, 124, 0, 0, 0, 0,
- 187, 232, 0, 0, 0, 0, 0, 133, 219, 142,
- 140, 0, 0, 284, 277, 260, 259, 0, 0, 71,
- 75, 70, 74, 69, 73, 68, 72, 76, 77, 0,
- 0, 25, 26, 27, 28, 29, 30, 31, 32, 33,
- 34, 0, 49, 50, 45, 46, 47, 48, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 0, 100,
- 100, 305, 0, 0, 294, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 205, 105, 105, 105, 159, 160, 3, 4, 157,
- 158, 161, 156, 152, 153, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 155, 154, 105, 111, 111, 136, 0, 139, 218,
- 212, 215, 216, 0, 0, 130, 235, 236, 237, 242,
- 238, 239, 240, 241, 233, 0, 244, 249, 248, 250,
- 0, 261, 0, 0, 0, 0, 0, 301, 0, 303,
- 298, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 206, 0,
- 192, 194, 190, 0, 0, 0, 0, 0, 0, 0,
- 145, 175, 0, 0, 0, 149, 0, 146, 0, 0,
- 0, 0, 0, 188, 131, 132, 135, 211, 213, 0,
- 103, 141, 234, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 308, 0, 0, 0, 288, 291,
- 0, 0, 289, 290, 0, 0, 0, 285, 286, 0,
- 306, 0, 0, 0, 107, 105, 0, 0, 298, 0,
- 0, 0, 0, 0, 144, 134, 113, 0, 147, 148,
- 0, 0, 0, 0, 0, 217, 214, 104, 98, 0,
- 243, 0, 0, 276, 0, 0, 100, 101, 100, 273,
- 297, 0, 0, 0, 0, 0, 279, 280, 281, 276,
- 0, 102, 108, 106, 0, 0, 0, 0, 0, 0,
- 0, 174, 151, 0, 0, 0, 0, 0, 0, 0,
- 220, 0, 0, 0, 275, 0, 282, 283, 0, 302,
- 304, 0, 0, 0, 287, 292, 293, 0, 307, 0,
- 0, 163, 0, 0, 0, 0, 150, 0, 0, 0,
- 0, 0, 99, 245, 0, 0, 0, 274, 271, 0,
- 295, 0, 0, 0, 171, 0, 0, 165, 166, 167,
- 170, 162, 0, 264, 0, 0, 0, 272, 168, 169,
- 0, 0, 0, 262, 0, 263, 0, 0, 164, 172,
- 173, 0, 0, 0, 0, 0, 0, 269, 0, 0,
- 268, 265, 0, 0, 0
-};
+#if ! defined yyoverflow || YYERROR_VERBOSE
-static const short yydefgoto[] = { 83,
- 310, 327, 328, 329, 262, 279, 330, 331, 217, 218,
- 250, 219, 23, 13, 35, 521, 368, 455, 479, 391,
- 456, 84, 85, 220, 87, 88, 118, 232, 402, 357,
- 403, 106, 603, 1, 2, 334, 305, 303, 304, 61,
- 198, 48, 101, 202, 89, 419, 342, 343, 344, 36,
- 93, 14, 42, 15, 59, 16, 26, 110, 424, 358,
- 90, 360, 490, 17, 38, 39, 189, 190, 576, 95,
- 285, 525, 526, 191, 192, 435, 193, 194
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined _STDLIB_H \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ yytype_int16 yyss;
+ YYSTYPE yyvs;
+ };
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (YYID (0))
+# endif
+# endif
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack, Stack, yysize); \
+ Stack = &yyptr->Stack; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (YYID (0))
+
+#endif
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 4
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 1762
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 166
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 80
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 309
+/* YYNRULES -- Number of states. */
+#define YYNSTATES 605
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 406
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+static const yytype_uint8 yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 155, 156, 164, 2, 153, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 160, 152, 161, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 157, 154, 159, 2, 2, 2, 2, 2, 165,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 158, 2, 2, 162, 2, 163, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
+ 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
+ 145, 146, 147, 148, 149, 150, 151
};
-static const short yypact[] = {-32768,
- 58, 247,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768, -44, 181, 69,-32768,-32768, 10,-32768,-32768, 16,
- -116, 34, 65, -38,-32768, 112, 118, 144,-32768,-32768,
--32768,-32768,-32768,-32768, 1357, -19,-32768,-32768, 39,-32768,
--32768,-32768,-32768, 6, 12, 20, 23,-32768, 55, 118,
- 1357, 86, 86, 86, 86,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768, 36,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 210, 218,
- 1, 171,-32768, 39, 73,-32768,-32768, -42,-32768,-32768,
--32768,-32768,-32768, 1611,-32768, 215, 83, 236, 219, 233,
--32768,-32768,-32768,-32768,-32768, 1418, 1418, 1418, 1459, 181,
--32768, 84, 100, 737,-32768,-32768, -42, -99, 104, 803,
--32768,-32768, 1418,-32768, 201, 1479, 14, 221, 181,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768, 77, 377, 1418, 1418,
- 1418, 1418, 1418, 1418, 1418, 1418, 1418, 1418, 1418, 1418,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768, 1418, 1418, 1418, 1418, 1418,-32768,-32768,
- 181,-32768, 53,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768, -36,-32768,-32768,-32768, 140, 167, 257, 204, 262,
- 206, 264, 214, 266, 265, 268, 217, 269, 270, 579,
--32768,-32768, 1418, 1418, 115, -96, 1418,-32768, 1199,-32768,
- 128, 126, 920,-32768,-32768, 36,-32768, 920, 920,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 920,
- 1357,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768, 1418,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 1418, 130,
- 142,-32768, 920, 139, 151, 153, 154, 155, 157, 158,
- 164, 165, 920, 920, 920, 166, 284, 1357, 1418, 1418,
- 297,-32768, 169, 169, 169,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768, 77, 377, 168, 172, 174,
- 175, 177, 1240, 1520, 757, 300, 180, 182, 183, 192,
- 193,-32768,-32768, 169, -43, -71,-32768, 190, -42,-32768,
- 39,-32768, 173, 202, 1260,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768, 273, 1459,-32768,-32768,-32768,-32768,
- 209,-32768, 212, 920, 920, 920, -4,-32768, -2,-32768,
- 213, 920, 211, 1418, 1418, 1418, 1418, 1418, 1418, 1418,
- 216, 222, 223, 1418, 1418, 920, 920, 226,-32768, -20,
--32768,-32768,-32768, 225, 227, 1459, 1459, 1459, 1459, 1459,
--32768,-32768, -13, 778, -17,-32768, -69,-32768, 1459, 1459,
- 1459, 1459, 1459,-32768,-32768,-32768,-32768,-32768,-32768, 1301,
- 325,-32768,-32768, 346, -16, 350, 360, 228, 231, 234,
- 920, 382, 920, 1418,-32768, 235, 920, 237,-32768,-32768,
- 238, 239,-32768,-32768, 920, 920, 920,-32768,-32768, 240,
--32768, 1418, 365, 389,-32768, 169, 1459, 1459, 213, 241,
- 243, 245, 248, 1459,-32768, 242, -104, -67,-32768,-32768,
- 249, 253, 263, 272, 364,-32768,-32768,-32768, 358, 274,
--32768, 920, 920, 1418, 920, 920, 276,-32768, 276,-32768,
- 279, 920, 280, 1418, 1418, 1418,-32768,-32768,-32768, 1418,
- 920,-32768,-32768,-32768, 281, 282, 267, 1459, 1459, 1459,
- 1459,-32768,-32768, 278, 1459, 1459, 1459, 1459, 1418, 422,
--32768, 416, 288, 285, 279, 289,-32768,-32768, 390,-32768,
--32768, 1418, 287, 920,-32768,-32768,-32768, 292,-32768, 1459,
- 1459,-32768, 299, 298, 302, 303,-32768, 301, 306, 307,
- 308, 310,-32768,-32768, 432, 15, 435,-32768,-32768, 309,
--32768, 316, 319, 1459,-32768, 1459, 1459,-32768,-32768,-32768,
--32768,-32768, 920,-32768, 1046, 64, 437,-32768,-32768,-32768,
- 326, 329, 331,-32768, 328,-32768, 1046, 920,-32768,-32768,
--32768, 467, 336, 148, 920, 469, 470,-32768, 920, 920,
--32768,-32768, 493, 494,-32768
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
+static const yytype_uint16 yyprhs[] =
+{
+ 0, 0, 3, 5, 7, 9, 11, 13, 15, 17,
+ 19, 21, 23, 25, 27, 29, 31, 33, 35, 37,
+ 39, 41, 43, 45, 47, 49, 51, 53, 55, 57,
+ 59, 61, 63, 65, 67, 69, 71, 73, 75, 77,
+ 79, 81, 83, 85, 87, 89, 91, 93, 95, 97,
+ 99, 101, 103, 105, 107, 109, 111, 113, 115, 117,
+ 119, 121, 123, 125, 127, 129, 131, 133, 135, 137,
+ 139, 141, 143, 145, 147, 149, 151, 153, 155, 157,
+ 159, 161, 164, 165, 167, 169, 171, 173, 175, 177,
+ 179, 180, 181, 183, 185, 187, 189, 191, 193, 196,
+ 197, 200, 201, 205, 208, 209, 211, 212, 216, 218,
+ 221, 223, 225, 227, 229, 231, 233, 235, 237, 239,
+ 241, 243, 245, 247, 249, 251, 253, 255, 257, 259,
+ 261, 264, 269, 275, 281, 285, 288, 294, 299, 302,
+ 304, 308, 310, 314, 316, 317, 322, 326, 330, 335,
+ 340, 344, 351, 357, 360, 363, 366, 369, 372, 375,
+ 378, 381, 384, 387, 394, 400, 409, 416, 423, 430,
+ 438, 446, 453, 460, 469, 478, 482, 484, 486, 488,
+ 490, 493, 496, 501, 504, 506, 511, 514, 519, 520,
+ 528, 529, 537, 538, 546, 547, 555, 559, 564, 565,
+ 567, 569, 571, 575, 579, 583, 587, 591, 595, 597,
+ 598, 600, 602, 604, 605, 608, 612, 614, 616, 620,
+ 622, 623, 632, 634, 636, 640, 642, 644, 647, 648,
+ 650, 652, 653, 654, 660, 661, 663, 665, 667, 669,
+ 671, 673, 675, 677, 679, 683, 685, 691, 693, 695,
+ 697, 699, 702, 705, 708, 712, 715, 716, 718, 720,
+ 722, 725, 728, 732, 742, 752, 761, 775, 777, 779,
+ 786, 792, 795, 802, 810, 812, 816, 818, 819, 822,
+ 824, 830, 836, 842, 849, 856, 859, 864, 869, 876,
+ 881, 886, 891, 896, 903, 910, 913, 921, 923, 926,
+ 927, 929, 930, 934, 941, 945, 952, 955, 960, 967
};
-static const short yypgoto[] = {-32768,
--32768, 401, 402, 404, 200, 203, 405, 423, -126, -125,
- -535,-32768, 479, 496, -109,-32768, -274, 102,-32768, -296,
--32768, -45,-32768, -35,-32768, -58, 27,-32768, -97, 304,
- -306, 101,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 471,
--32768,-32768,-32768,-32768, 13,-32768, 106,-32768,-32768, 412,
--32768,-32768,-32768,-32768,-32768, 525,-32768,-32768,-32768, -553,
- -9, 114, -122,-32768, 511,-32768, -65,-32768,-32768,-32768,
--32768, 96, 31,-32768,-32768, 74,-32768,-32768
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yytype_int16 yyrhs[] =
+{
+ 200, 0, -1, 5, -1, 6, -1, 3, -1, 4,
+ -1, 79, -1, 80, -1, 81, -1, 82, -1, 83,
+ -1, 84, -1, 85, -1, 86, -1, 87, -1, 88,
+ -1, 89, -1, 90, -1, 91, -1, 92, -1, 97,
+ -1, 98, -1, 99, -1, 100, -1, 101, -1, 102,
+ -1, 119, -1, 120, -1, 121, -1, 122, -1, 123,
+ -1, 124, -1, 125, -1, 126, -1, 127, -1, 128,
+ -1, 129, -1, 130, -1, 131, -1, 132, -1, 133,
+ -1, 134, -1, 135, -1, 136, -1, 137, -1, 138,
+ -1, 125, -1, 126, -1, 127, -1, 128, -1, 27,
+ -1, 28, -1, 93, -1, 94, -1, 95, -1, 96,
+ -1, 140, -1, 141, -1, 142, -1, 143, -1, 144,
+ -1, 145, -1, 146, -1, 147, -1, 148, -1, 149,
+ -1, 150, -1, 151, -1, 139, -1, 16, -1, 14,
+ -1, 12, -1, 10, -1, 17, -1, 15, -1, 13,
+ -1, 11, -1, 176, -1, 177, -1, 18, -1, 19,
+ -1, 212, 152, -1, -1, 41, -1, 42, -1, 43,
+ -1, 44, -1, 45, -1, 46, -1, 47, -1, -1,
+ -1, 65, -1, 66, -1, 67, -1, 68, -1, 69,
+ -1, 70, -1, 64, 4, -1, -1, 57, 4, -1,
+ -1, 153, 57, 4, -1, 34, 24, -1, -1, 185,
+ -1, -1, 153, 188, 187, -1, 185, -1, 57, 4,
+ -1, 191, -1, 8, -1, 193, -1, 8, -1, 193,
+ -1, 9, -1, 10, -1, 11, -1, 12, -1, 13,
+ -1, 14, -1, 15, -1, 16, -1, 17, -1, 18,
+ -1, 19, -1, 21, -1, 192, -1, 48, -1, 228,
+ -1, 154, 4, -1, 190, 155, 195, 156, -1, 157,
+ 4, 158, 193, 159, -1, 160, 4, 158, 193, 161,
+ -1, 162, 194, 163, -1, 162, 163, -1, 160, 162,
+ 194, 163, 161, -1, 160, 162, 163, 161, -1, 193,
+ 164, -1, 193, -1, 194, 153, 193, -1, 194, -1,
+ 194, 153, 37, -1, 37, -1, -1, 191, 157, 198,
+ 159, -1, 191, 157, 159, -1, 191, 165, 24, -1,
+ 191, 160, 198, 161, -1, 191, 162, 198, 163, -1,
+ 191, 162, 163, -1, 191, 160, 162, 198, 163, 161,
+ -1, 191, 160, 162, 163, 161, -1, 191, 38, -1,
+ 191, 39, -1, 191, 228, -1, 191, 197, -1, 191,
+ 26, -1, 176, 168, -1, 177, 4, -1, 9, 27,
+ -1, 9, 28, -1, 179, 7, -1, 175, 155, 196,
+ 36, 191, 156, -1, 110, 155, 196, 243, 156, -1,
+ 112, 155, 196, 153, 196, 153, 196, 156, -1, 169,
+ 155, 196, 153, 196, 156, -1, 170, 155, 196, 153,
+ 196, 156, -1, 171, 155, 196, 153, 196, 156, -1,
+ 103, 172, 155, 196, 153, 196, 156, -1, 104, 173,
+ 155, 196, 153, 196, 156, -1, 174, 155, 196, 153,
+ 196, 156, -1, 114, 155, 196, 153, 196, 156, -1,
+ 115, 155, 196, 153, 196, 153, 196, 156, -1, 116,
+ 155, 196, 153, 196, 153, 196, 156, -1, 198, 153,
+ 196, -1, 196, -1, 32, -1, 33, -1, 201, -1,
+ 201, 221, -1, 201, 223, -1, 201, 62, 61, 207,
+ -1, 201, 25, -1, 202, -1, 202, 180, 20, 189,
+ -1, 202, 223, -1, 202, 62, 61, 207, -1, -1,
+ 202, 180, 181, 199, 196, 203, 187, -1, -1, 202,
+ 180, 50, 199, 191, 204, 187, -1, -1, 202, 180,
+ 45, 199, 191, 205, 187, -1, -1, 202, 180, 47,
+ 199, 191, 206, 187, -1, 202, 51, 209, -1, 202,
+ 58, 152, 210, -1, -1, 24, -1, 56, -1, 55,
+ -1, 53, 152, 208, -1, 54, 152, 4, -1, 52,
+ 152, 24, -1, 71, 152, 24, -1, 157, 211, 159,
+ -1, 211, 153, 24, -1, 24, -1, -1, 22, -1,
+ 24, -1, 212, -1, -1, 191, 213, -1, 215, 153,
+ 214, -1, 214, -1, 215, -1, 215, 153, 37, -1,
+ 37, -1, -1, 182, 189, 212, 155, 216, 156, 186,
+ 183, -1, 29, -1, 162, -1, 181, 217, 218, -1,
+ 30, -1, 163, -1, 231, 220, -1, -1, 45, -1,
+ 47, -1, -1, -1, 31, 224, 222, 225, 217, -1,
+ -1, 63, -1, 3, -1, 4, -1, 7, -1, 27,
+ -1, 28, -1, 38, -1, 39, -1, 26, -1, 160,
+ 198, 161, -1, 197, -1, 61, 226, 24, 153, 24,
+ -1, 167, -1, 212, -1, 228, -1, 227, -1, 191,
+ 229, -1, 231, 232, -1, 219, 232, -1, 233, 180,
+ 235, -1, 233, 237, -1, -1, 23, -1, 77, -1,
+ 78, -1, 72, 230, -1, 72, 8, -1, 73, 21,
+ 229, -1, 73, 9, 229, 153, 21, 229, 153, 21,
+ 229, -1, 74, 178, 229, 153, 21, 229, 157, 236,
+ 159, -1, 74, 178, 229, 153, 21, 229, 157, 159,
+ -1, 75, 182, 189, 229, 155, 240, 156, 36, 21,
+ 229, 234, 21, 229, -1, 234, -1, 76, -1, 236,
+ 178, 227, 153, 21, 229, -1, 178, 227, 153, 21,
+ 229, -1, 180, 242, -1, 191, 157, 229, 153, 229,
+ 159, -1, 238, 153, 157, 229, 153, 229, 159, -1,
+ 230, -1, 239, 153, 230, -1, 239, -1, -1, 60,
+ 59, -1, 59, -1, 169, 191, 229, 153, 229, -1,
+ 170, 191, 229, 153, 229, -1, 171, 191, 229, 153,
+ 229, -1, 103, 172, 191, 229, 153, 229, -1, 104,
+ 173, 191, 229, 153, 229, -1, 49, 230, -1, 174,
+ 230, 153, 230, -1, 175, 230, 36, 191, -1, 112,
+ 230, 153, 230, 153, 230, -1, 113, 230, 153, 191,
+ -1, 117, 230, 153, 191, -1, 118, 230, 153, 191,
+ -1, 114, 230, 153, 230, -1, 115, 230, 153, 230,
+ 153, 230, -1, 116, 230, 153, 230, 153, 230, -1,
+ 111, 238, -1, 241, 182, 189, 229, 155, 240, 156,
+ -1, 245, -1, 153, 239, -1, -1, 35, -1, -1,
+ 105, 191, 184, -1, 105, 191, 153, 15, 229, 184,
+ -1, 106, 191, 184, -1, 106, 191, 153, 15, 229,
+ 184, -1, 107, 230, -1, 244, 108, 191, 229, -1,
+ 244, 109, 230, 153, 191, 229, -1, 110, 191, 229,
+ 243, -1
};
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const yytype_uint16 yyrline[] =
+{
+ 0, 1594, 1594, 1595, 1603, 1604, 1614, 1614, 1614, 1614,
+ 1614, 1614, 1614, 1614, 1614, 1614, 1614, 1618, 1618, 1618,
+ 1622, 1622, 1622, 1622, 1622, 1622, 1626, 1626, 1627, 1627,
+ 1628, 1628, 1629, 1629, 1630, 1630, 1634, 1634, 1635, 1635,
+ 1636, 1636, 1637, 1637, 1638, 1638, 1639, 1639, 1640, 1640,
+ 1641, 1642, 1645, 1645, 1645, 1645, 1649, 1649, 1649, 1649,
+ 1649, 1649, 1649, 1650, 1650, 1650, 1650, 1650, 1650, 1656,
+ 1656, 1656, 1656, 1660, 1660, 1660, 1660, 1664, 1664, 1668,
+ 1668, 1673, 1676, 1681, 1682, 1683, 1684, 1685, 1686, 1687,
+ 1688, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1709,
+ 1710, 1718, 1719, 1727, 1736, 1737, 1744, 1745, 1749, 1753,
+ 1769, 1770, 1777, 1778, 1785, 1793, 1793, 1793, 1793, 1793,
+ 1793, 1793, 1794, 1794, 1794, 1794, 1794, 1799, 1803, 1807,
+ 1812, 1821, 1838, 1844, 1857, 1866, 1870, 1881, 1885, 1898,
+ 1902, 1909, 1910, 1916, 1923, 1935, 1965, 1978, 2001, 2029,
+ 2051, 2062, 2084, 2095, 2104, 2109, 2167, 2174, 2182, 2189,
+ 2196, 2200, 2204, 2213, 2228, 2241, 2250, 2278, 2291, 2300,
+ 2306, 2312, 2323, 2329, 2335, 2346, 2347, 2356, 2357, 2369,
+ 2378, 2379, 2380, 2381, 2382, 2398, 2418, 2420, 2422, 2422,
+ 2429, 2429, 2436, 2436, 2443, 2443, 2451, 2453, 2455, 2460,
+ 2474, 2475, 2479, 2482, 2490, 2494, 2501, 2505, 2509, 2513,
+ 2521, 2521, 2525, 2526, 2530, 2538, 2543, 2551, 2552, 2559,
+ 2566, 2570, 2746, 2746, 2750, 2760, 2760, 2764, 2769, 2770,
+ 2771, 2775, 2776, 2775, 2788, 2789, 2794, 2795, 2796, 2797,
+ 2798, 2799, 2800, 2801, 2802, 2823, 2826, 2841, 2842, 2847,
+ 2847, 2855, 2864, 2867, 2876, 2886, 2891, 2900, 2911, 2911,
+ 2914, 2917, 2920, 2924, 2930, 2945, 2951, 3007, 3010, 3016,
+ 3026, 3039, 3068, 3076, 3084, 3088, 3095, 3096, 3100, 3103,
+ 3109, 3126, 3142, 3156, 3168, 3180, 3191, 3209, 3218, 3227,
+ 3234, 3255, 3279, 3285, 3291, 3297, 3313, 3391, 3399, 3400,
+ 3404, 3405, 3409, 3415, 3421, 3427, 3433, 3440, 3452, 3477
+};
+#endif
-#define YYLAST 1762
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "ESINT64VAL", "EUINT64VAL", "SINTVAL",
+ "UINTVAL", "FPVAL", "VOID", "BOOL", "SBYTE", "UBYTE", "SHORT", "USHORT",
+ "INT", "UINT", "LONG", "ULONG", "FLOAT", "DOUBLE", "TYPE", "LABEL",
+ "VAR_ID", "LABELSTR", "STRINGCONSTANT", "IMPLEMENTATION",
+ "ZEROINITIALIZER", "TRUETOK", "FALSETOK", "BEGINTOK", "ENDTOK",
+ "DECLARE", "GLOBAL", "CONSTANT", "SECTION", "VOLATILE", "TO",
+ "DOTDOTDOT", "NULL_TOK", "UNDEF", "CONST", "INTERNAL", "LINKONCE",
+ "WEAK", "APPENDING", "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "OPAQUE",
+ "NOT", "EXTERNAL", "TARGET", "TRIPLE", "ENDIAN", "POINTERSIZE", "LITTLE",
+ "BIG", "ALIGN", "DEPLIBS", "CALL", "TAIL", "ASM_TOK", "MODULE",
+ "SIDEEFFECT", "CC_TOK", "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK",
+ "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT",
+ "RET", "BR", "SWITCH", "INVOKE", "UNREACHABLE", "UNWIND", "EXCEPT",
+ "ADD", "SUB", "MUL", "DIV", "UDIV", "SDIV", "FDIV", "REM", "UREM",
+ "SREM", "FREM", "AND", "OR", "XOR", "SHL", "SHR", "ASHR", "LSHR",
+ "SETLE", "SETGE", "SETLT", "SETGT", "SETEQ", "SETNE", "ICMP", "FCMP",
+ "MALLOC", "ALLOCA", "FREE", "LOAD", "STORE", "GETELEMENTPTR", "PHI_TOK",
+ "SELECT", "VAARG", "EXTRACTELEMENT", "INSERTELEMENT", "SHUFFLEVECTOR",
+ "VAARG_old", "VANEXT_old", "EQ", "NE", "SLT", "SGT", "SLE", "SGE", "ULT",
+ "UGT", "ULE", "UGE", "OEQ", "ONE", "OLT", "OGT", "OLE", "OGE", "ORD",
+ "UNO", "UEQ", "UNE", "CAST", "TRUNC", "ZEXT", "SEXT", "FPTRUNC", "FPEXT",
+ "FPTOUI", "FPTOSI", "UITOFP", "SITOFP", "PTRTOINT", "INTTOPTR",
+ "BITCAST", "'='", "','", "'\\\\'", "'('", "')'", "'['", "'x'", "']'",
+ "'<'", "'>'", "'{'", "'}'", "'*'", "'c'", "$accept", "INTVAL",
+ "EINT64VAL", "ArithmeticOps", "LogicalOps", "SetCondOps", "IPredicates",
+ "FPredicates", "ShiftOps", "CastOps", "SIntType", "UIntType", "IntType",
+ "FPType", "OptAssign", "OptLinkage", "OptCallingConv", "OptAlign",
+ "OptCAlign", "SectionString", "OptSection", "GlobalVarAttributes",
+ "GlobalVarAttribute", "TypesV", "UpRTypesV", "Types", "PrimType",
+ "UpRTypes", "TypeListI", "ArgTypeListI", "ConstVal", "ConstExpr",
+ "ConstVector", "GlobalType", "Module", "FunctionList", "ConstPool", "@1",
+ "@2", "@3", "@4", "AsmBlock", "BigOrLittle", "TargetDefinition",
+ "LibrariesDefinition", "LibList", "Name", "OptName", "ArgVal",
+ "ArgListH", "ArgList", "FunctionHeaderH", "BEGIN", "FunctionHeader",
+ "END", "Function", "FnDeclareLinkage", "FunctionProto", "@5", "@6",
+ "OptSideEffect", "ConstValueRef", "SymbolicValueRef", "ValueRef",
+ "ResolvedVal", "BasicBlockList", "BasicBlock", "InstructionList",
+ "Unwind", "BBTerminatorInst", "JumpTable", "Inst", "PHIList",
+ "ValueRefList", "ValueRefListE", "OptTailCall", "InstVal", "IndexList",
+ "OptVolatile", "MemoryInst", 0
+};
+#endif
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+ token YYLEX-NUM. */
+static const yytype_uint16 yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
+ 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
+ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 61, 44, 92, 40, 41, 91, 120, 93,
+ 60, 62, 123, 125, 42, 99
+};
+# endif
-static const short yytable[] = { 86,
- 234, 248, 249, 237, 113, 103, 370, 392, 393, 91,
- 431, 221, 433, 453, 24, 86, 27, 405, 407, 251,
- 575, 585, 238, 117, 240, 241, 242, 243, 244, 245,
- 246, 247, 37, 593, 239, 49, 454, 414, 282, 40,
- 587, 286, 287, 288, 289, 290, 291, 292, -138, 425,
- -111, 24, 432, 227, 432, 117, 227, -178, -138, 121,
- 18, 117, 19, 228, 296, 297, 338, 44, 45, 46,
- 203, 204, 205, 240, 241, 242, 243, 244, 245, 246,
- 247, 298, 3, 464, 51, 464, 47, 233, 4, 416,
- 233, 37, 121, 470, 50, 514, 119, 468, 5, 6,
- 7, 8, 9, 10, 11, 5, 6, 7, 8, 52,
- 10, 53, -111, 56, 54, 415, 301, 104, 105, 12,
- 121, 121, 302, 280, 281, 233, 283, 284, 233, 233,
- 233, 233, 233, 233, 233, 464, 464, 196, 197, 464,
- 226, 60, 92, 469, 481, 465, 231, 62, 293, 294,
- 295, 233, 233, 107, 108, 109, 57, 96, 58, 504,
- 299, 300, 114, 97, 335, 336, 306, 307, 339, -71,
- -71, 98, 41, 574, 99, 63, 64, 388, 115, 66,
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- -112, 77, 18, 341, 19, 252, 253, 254, 255, 256,
- 257, 258, 259, 260, 261, 364, -70, -70, -69, -69,
- 333, 100, 530, 111, 531, 86, -68, -68, 78, 308,
- 309, 112, 586, 359, 131, 132, 365, 120, 359, 359,
- 240, 241, 242, 243, 244, 245, 246, 247, 195, 199,
- 359, 223, 200, 366, 28, 29, 30, 31, 32, 33,
- 34, 438, 386, 440, 441, 442, 201, 224, 229, 235,
- -75, 448, 86, 387, 233, -74, -81, -73, 18, -72,
- 19, -78, 311, 359, -79, 337, 312, 4, -81, -81,
- 345, 346, 367, 359, 359, 359, 339, -81, -81, -81,
- -81, -81, -81, -81, 369, 372, -81, 20, 459, 460,
- 461, 462, 463, 373, 21, 374, 375, 376, 22, 377,
- 378, 471, 472, 473, 474, 475, 379, 380, 384, 385,
- 389, 390, 396, 408, 79, 420, 397, 80, 398, 399,
- 81, 400, 82, 116, 409, 423, 410, 411, 233, 439,
- 233, 233, 233, 443, 444, 467, 412, 413, 233, 449,
- 417, 361, 362, 418, 359, 359, 359, 421, 453, 505,
- 506, 426, 359, 363, 427, 434, 512, 437, 445, 480,
- 482, 535, 536, 537, 446, 447, 359, 359, 452, 457,
- 483, 458, 484, 485, 341, 488, 486, 492, 502, 494,
- 495, 496, 503, 508, 500, 509, 371, 510, 233, 519,
- 511, 515, 513, 263, 264, 516, 381, 382, 383, 558,
- 543, 544, 545, 546, 520, 517, 501, 548, 549, 550,
- 551, 359, 542, 359, 518, 553, 522, 359, 529, 248,
- 249, 532, 534, 540, 541, 359, 359, 359, 547, 554,
- 555, 556, 562, 563, 557, 559, 432, 561, 233, 248,
- 249, 564, 573, 565, 566, 567, 568, 588, 233, 233,
- 233, 569, 570, 571, 233, 572, 581, 578, 582, 583,
- 577, 579, 359, 359, 580, 359, 359, 428, 429, 430,
- 592, 589, 359, 552, 590, 436, 591, 595, 596, 599,
- 600, 359, 604, 605, 184, 185, 233, 186, 187, 450,
- 451, 265, 266, 267, 268, 269, 270, 271, 272, 273,
- 274, 275, 276, 277, 278, 394, 188, 94, 55, 395,
- 102, 222, 478, 332, 359, 477, 25, 43, 597, 491,
- 538, 0, 507, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 487, 0, 489, 0, 0, 0,
- 493, 0, 0, 0, 0, 0, 0, 0, 497, 498,
- 499, 0, 0, 359, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 359, 0,
- 0, 0, 0, 63, 64, 359, 0, 0, 0, 359,
- 359, 0, 0, 0, 0, 523, 524, 0, 527, 528,
- 18, 0, 19, 0, 313, 533, 0, 0, 0, 0,
- 0, 0, 0, 0, 539, 0, 314, 315, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 560, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 133, 134, 135,
- 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
- 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
- 156, 316, 317, 0, 0, 0, 584, 0, 318, 0,
- 319, 0, 320, 321, 322, 0, 0, 0, 0, 0,
- 0, 594, 0, 0, 0, 0, 0, 0, 598, 0,
- 0, 0, 601, 602, 0, 0, 0, 171, 172, 173,
- 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
- 0, 0, 0, 0, 0, 323, 0, 0, 324, 0,
- 325, 63, 64, 326, 115, 66, 67, 68, 69, 70,
- 71, 72, 73, 74, 75, 76, 0, 77, 18, 0,
- 19, 63, 64, 0, 115, 206, 207, 208, 209, 210,
- 211, 212, 213, 214, 215, 216, 0, 77, 18, 0,
- 19, 0, 63, 64, 78, 115, 206, 207, 208, 209,
- 210, 211, 212, 213, 214, 215, 216, 0, 77, 18,
- 0, 19, 0, 0, 78, 0, 0, 63, 64, 0,
- 115, 66, 67, 68, 69, 70, 71, 72, 73, 74,
- 75, 76, 0, 77, 18, 78, 19, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 230,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 78, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 79, 0, 0, 80, 0, 0, 81, 0, 82, 225,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 79, 0, 0, 80, 0, 0, 81, 0, 82, 406,
- 0, 0, 347, 348, 63, 64, 349, 0, 0, 0,
- 0, 79, 0, 0, 80, 0, 0, 81, 0, 82,
- 466, 18, 0, 19, 0, 350, 351, 352, 0, 0,
- 0, 0, 0, 0, 0, 0, 79, 353, 354, 80,
- 0, 0, 81, 0, 82, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 355, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 133, 134,
- 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
- 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
- 155, 156, 316, 317, 0, 0, 0, 0, 0, 318,
- 0, 319, 0, 320, 321, 322, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 347, 348,
- 0, 0, 349, 0, 0, 0, 0, 0, 171, 172,
- 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
- 183, 350, 351, 352, 0, 0, 0, 0, 0, 356,
- 0, 0, 0, 353, 354, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 355, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 133, 134, 135, 136, 137, 138,
- 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
- 149, 150, 151, 152, 153, 154, 155, 156, 316, 317,
- 0, 0, 0, 0, 0, 318, 0, 319, 0, 320,
- 321, 322, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 171, 172, 173, 174, 175, 176,
- 177, 178, 179, 180, 181, 182, 183, 0, 0, 0,
- 0, 0, 0, 63, 64, 356, 115, 66, 67, 68,
- 69, 70, 71, 72, 73, 74, 75, 76, 0, 77,
- 18, 0, 19, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 340, 0, 0, 0, 0,
- 0, 0, 0, 0, 63, 64, 78, 115, 206, 207,
- 208, 209, 210, 211, 212, 213, 214, 215, 216, 0,
- 77, 18, 0, 19, 63, 64, 0, 115, 66, 67,
- 68, 69, 70, 71, 72, 73, 74, 75, 76, 0,
- 77, 18, 0, 19, 0, 0, 0, 78, 0, 0,
- 0, 0, 0, 0, 0, 0, 422, 0, 0, 0,
- 0, 0, 0, 0, 0, 63, 64, 78, 115, 66,
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
- 0, 77, 18, 0, 19, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 476, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 78, 0,
- 0, 0, 79, 0, 0, 80, 0, 0, 81, 0,
- 82, 63, 64, 0, 65, 66, 67, 68, 69, 70,
- 71, 72, 73, 74, 75, 76, 0, 77, 18, 0,
- 19, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 79, 0, 0, 80, 0, 401, 81,
- 0, 82, 0, 0, 78, 0, 0, 0, 0, 0,
- 0, 0, 0, 79, 0, 0, 80, 0, 0, 81,
- 0, 82, 63, 64, 0, 115, 66, 67, 68, 69,
- 70, 71, 72, 73, 74, 75, 76, 0, 77, 18,
- 0, 19, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 79, 0, 0, 80, 0, 0,
- 81, 0, 82, 63, 64, 78, 115, 206, 207, 208,
- 209, 210, 211, 212, 213, 214, 215, 216, 0, 77,
- 18, 0, 19, 63, 64, 0, 236, 66, 67, 68,
- 69, 70, 71, 72, 73, 74, 75, 76, 0, 77,
- 18, 0, 19, 0, 0, 0, 78, 0, 0, 0,
- 79, 0, 0, 80, 0, 0, 81, 0, 82, 0,
- 0, 0, 0, 0, 63, 64, 78, 115, 206, 207,
- 208, 209, 210, 211, 212, 213, 214, 215, 216, 0,
- 77, 18, 0, 19, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 78, 0, 0,
- 0, 79, 0, 0, 80, 0, 0, 81, 0, 82,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 79, 0, 0, 80, 0, 0, 81, 0,
- 82, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 79, 0, 0, 80, 0, 0, 81, 0,
- 82, 0, 0, 0, 0, 122, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 123,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 124,
- 125, 0, 0, 79, 0, 0, 80, 0, 0, 81,
- 0, 404, 126, 127, 128, 129, 130, 131, 132, 133,
- 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
- 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
- 154, 155, 156, 157, 158, 159, 160, 161, 0, 0,
- 162, 163, 164, 165, 166, 167, 168, 169, 170, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 171,
- 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
- 182, 183
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 166, 167, 167, 168, 168, 169, 169, 169, 169,
+ 169, 169, 169, 169, 169, 169, 169, 170, 170, 170,
+ 171, 171, 171, 171, 171, 171, 172, 172, 172, 172,
+ 172, 172, 172, 172, 172, 172, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 174, 174, 174, 174, 175, 175, 175, 175,
+ 175, 175, 175, 175, 175, 175, 175, 175, 175, 176,
+ 176, 176, 176, 177, 177, 177, 177, 178, 178, 179,
+ 179, 180, 180, 181, 181, 181, 181, 181, 181, 181,
+ 181, 182, 182, 182, 182, 182, 182, 182, 182, 183,
+ 183, 184, 184, 185, 186, 186, 187, 187, 188, 188,
+ 189, 189, 190, 190, 191, 192, 192, 192, 192, 192,
+ 192, 192, 192, 192, 192, 192, 192, 193, 193, 193,
+ 193, 193, 193, 193, 193, 193, 193, 193, 193, 194,
+ 194, 195, 195, 195, 195, 196, 196, 196, 196, 196,
+ 196, 196, 196, 196, 196, 196, 196, 196, 196, 196,
+ 196, 196, 196, 197, 197, 197, 197, 197, 197, 197,
+ 197, 197, 197, 197, 197, 198, 198, 199, 199, 200,
+ 201, 201, 201, 201, 201, 202, 202, 202, 203, 202,
+ 204, 202, 205, 202, 206, 202, 202, 202, 202, 207,
+ 208, 208, 209, 209, 209, 209, 210, 211, 211, 211,
+ 212, 212, 213, 213, 214, 215, 215, 216, 216, 216,
+ 216, 217, 218, 218, 219, 220, 220, 221, 222, 222,
+ 222, 224, 225, 223, 226, 226, 227, 227, 227, 227,
+ 227, 227, 227, 227, 227, 227, 227, 228, 228, 229,
+ 229, 230, 231, 231, 232, 233, 233, 233, 234, 234,
+ 235, 235, 235, 235, 235, 235, 235, 235, 235, 236,
+ 236, 237, 238, 238, 239, 239, 240, 240, 241, 241,
+ 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242, 243, 243,
+ 244, 244, 245, 245, 245, 245, 245, 245, 245, 245
};
-static const short yycheck[] = { 35,
- 123, 128, 128, 126, 4, 51, 281, 304, 305, 29,
- 15, 109, 15, 34, 2, 51, 61, 324, 325, 129,
- 556, 575, 9, 82, 10, 11, 12, 13, 14, 15,
- 16, 17, 23, 587, 21, 152, 57, 334, 161, 30,
- 576, 164, 165, 166, 167, 168, 169, 170, 153, 356,
- 155, 39, 57, 153, 57, 114, 153, 0, 163, 164,
- 22, 120, 24, 163, 187, 188, 163, 52, 53, 54,
- 106, 107, 108, 10, 11, 12, 13, 14, 15, 16,
- 17, 191, 25, 153, 20, 153, 71, 123, 31, 161,
- 126, 23, 164, 163, 61, 163, 84, 404, 41, 42,
- 43, 44, 45, 46, 47, 41, 42, 43, 44, 45,
- 46, 47, 155, 152, 50, 159, 153, 32, 33, 62,
- 164, 164, 159, 159, 160, 161, 162, 163, 164, 165,
- 166, 167, 168, 169, 170, 153, 153, 55, 56, 153,
- 114, 24, 162, 161, 161, 159, 120, 4, 184, 185,
- 186, 187, 188, 53, 54, 55, 45, 152, 47, 456,
- 108, 109, 162, 152, 223, 224, 27, 28, 227, 3,
- 4, 152, 163, 159, 152, 5, 6, 300, 8, 9,
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 155, 21, 22, 229, 24, 119, 120, 121, 122, 123,
- 124, 125, 126, 127, 128, 251, 3, 4, 3, 4,
- 220, 157, 487, 4, 489, 251, 3, 4, 48, 3,
- 4, 4, 159, 233, 77, 78, 262, 155, 238, 239,
- 10, 11, 12, 13, 14, 15, 16, 17, 24, 4,
- 250, 158, 24, 279, 64, 65, 66, 67, 68, 69,
- 70, 374, 298, 376, 377, 378, 24, 158, 155, 59,
- 4, 384, 298, 299, 300, 4, 20, 4, 22, 4,
- 24, 7, 4, 283, 7, 161, 7, 31, 32, 33,
- 153, 156, 153, 293, 294, 295, 345, 41, 42, 43,
- 44, 45, 46, 47, 153, 157, 50, 51, 396, 397,
- 398, 399, 400, 153, 58, 153, 153, 153, 62, 153,
- 153, 409, 410, 411, 412, 413, 153, 153, 153, 36,
- 24, 153, 155, 24, 154, 153, 155, 157, 155, 155,
- 160, 155, 162, 163, 155, 63, 155, 155, 374, 375,
- 376, 377, 378, 379, 380, 404, 155, 155, 384, 385,
- 161, 238, 239, 341, 364, 365, 366, 156, 34, 457,
- 458, 153, 372, 250, 153, 153, 464, 157, 153, 24,
- 21, 494, 495, 496, 153, 153, 386, 387, 153, 155,
- 21, 155, 155, 153, 420, 4, 153, 153, 24, 153,
- 153, 153, 4, 153, 155, 153, 283, 153, 434, 36,
- 153, 153, 161, 27, 28, 153, 293, 294, 295, 532,
- 508, 509, 510, 511, 57, 153, 452, 515, 516, 517,
- 518, 431, 156, 433, 153, 4, 153, 437, 153, 556,
- 556, 153, 153, 153, 153, 445, 446, 447, 161, 24,
- 153, 157, 540, 541, 156, 159, 57, 156, 484, 576,
- 576, 153, 21, 156, 153, 153, 156, 21, 494, 495,
- 496, 156, 156, 156, 500, 156, 564, 159, 566, 567,
- 36, 156, 482, 483, 156, 485, 486, 364, 365, 366,
- 153, 156, 492, 519, 156, 372, 156, 21, 153, 21,
- 21, 501, 0, 0, 94, 94, 532, 94, 94, 386,
- 387, 125, 126, 127, 128, 129, 130, 131, 132, 133,
- 134, 135, 136, 137, 138, 316, 94, 39, 23, 317,
- 50, 110, 421, 220, 534, 420, 2, 17, 594, 434,
- 500, -1, 459, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 431, -1, 433, -1, -1, -1,
- 437, -1, -1, -1, -1, -1, -1, -1, 445, 446,
- 447, -1, -1, 573, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 588, -1,
- -1, -1, -1, 5, 6, 595, -1, -1, -1, 599,
- 600, -1, -1, -1, -1, 482, 483, -1, 485, 486,
- 22, -1, 24, -1, 26, 492, -1, -1, -1, -1,
- -1, -1, -1, -1, 501, -1, 38, 39, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 534, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 79, 80, 81,
- 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
- 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
- 102, 103, 104, -1, -1, -1, 573, -1, 110, -1,
- 112, -1, 114, 115, 116, -1, -1, -1, -1, -1,
- -1, 588, -1, -1, -1, -1, -1, -1, 595, -1,
- -1, -1, 599, 600, -1, -1, -1, 139, 140, 141,
- 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
- -1, -1, -1, -1, -1, 157, -1, -1, 160, -1,
- 162, 5, 6, 165, 8, 9, 10, 11, 12, 13,
- 14, 15, 16, 17, 18, 19, -1, 21, 22, -1,
- 24, 5, 6, -1, 8, 9, 10, 11, 12, 13,
- 14, 15, 16, 17, 18, 19, -1, 21, 22, -1,
- 24, -1, 5, 6, 48, 8, 9, 10, 11, 12,
- 13, 14, 15, 16, 17, 18, 19, -1, 21, 22,
- -1, 24, -1, -1, 48, -1, -1, 5, 6, -1,
- 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
- 18, 19, -1, 21, 22, 48, 24, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 37,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 48, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 154, -1, -1, 157, -1, -1, 160, -1, 162, 163,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 154, -1, -1, 157, -1, -1, 160, -1, 162, 163,
- -1, -1, 3, 4, 5, 6, 7, -1, -1, -1,
- -1, 154, -1, -1, 157, -1, -1, 160, -1, 162,
- 163, 22, -1, 24, -1, 26, 27, 28, -1, -1,
- -1, -1, -1, -1, -1, -1, 154, 38, 39, 157,
- -1, -1, 160, -1, 162, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 61, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 79, 80,
- 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
- 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
- 101, 102, 103, 104, -1, -1, -1, -1, -1, 110,
- -1, 112, -1, 114, 115, 116, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 3, 4,
- -1, -1, 7, -1, -1, -1, -1, -1, 139, 140,
- 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
- 151, 26, 27, 28, -1, -1, -1, -1, -1, 160,
- -1, -1, -1, 38, 39, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 61, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 79, 80, 81, 82, 83, 84,
- 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
- 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
- -1, -1, -1, -1, -1, 110, -1, 112, -1, 114,
- 115, 116, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 139, 140, 141, 142, 143, 144,
- 145, 146, 147, 148, 149, 150, 151, -1, -1, -1,
- -1, -1, -1, 5, 6, 160, 8, 9, 10, 11,
- 12, 13, 14, 15, 16, 17, 18, 19, -1, 21,
- 22, -1, 24, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 37, -1, -1, -1, -1,
- -1, -1, -1, -1, 5, 6, 48, 8, 9, 10,
- 11, 12, 13, 14, 15, 16, 17, 18, 19, -1,
- 21, 22, -1, 24, 5, 6, -1, 8, 9, 10,
- 11, 12, 13, 14, 15, 16, 17, 18, 19, -1,
- 21, 22, -1, 24, -1, -1, -1, 48, -1, -1,
- -1, -1, -1, -1, -1, -1, 37, -1, -1, -1,
- -1, -1, -1, -1, -1, 5, 6, 48, 8, 9,
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- -1, 21, 22, -1, 24, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 37, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 48, -1,
- -1, -1, 154, -1, -1, 157, -1, -1, 160, -1,
- 162, 5, 6, -1, 8, 9, 10, 11, 12, 13,
- 14, 15, 16, 17, 18, 19, -1, 21, 22, -1,
- 24, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 154, -1, -1, 157, -1, 159, 160,
- -1, 162, -1, -1, 48, -1, -1, -1, -1, -1,
- -1, -1, -1, 154, -1, -1, 157, -1, -1, 160,
- -1, 162, 5, 6, -1, 8, 9, 10, 11, 12,
- 13, 14, 15, 16, 17, 18, 19, -1, 21, 22,
- -1, 24, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 154, -1, -1, 157, -1, -1,
- 160, -1, 162, 5, 6, 48, 8, 9, 10, 11,
- 12, 13, 14, 15, 16, 17, 18, 19, -1, 21,
- 22, -1, 24, 5, 6, -1, 8, 9, 10, 11,
- 12, 13, 14, 15, 16, 17, 18, 19, -1, 21,
- 22, -1, 24, -1, -1, -1, 48, -1, -1, -1,
- 154, -1, -1, 157, -1, -1, 160, -1, 162, -1,
- -1, -1, -1, -1, 5, 6, 48, 8, 9, 10,
- 11, 12, 13, 14, 15, 16, 17, 18, 19, -1,
- 21, 22, -1, 24, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 48, -1, -1,
- -1, 154, -1, -1, 157, -1, -1, 160, -1, 162,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 154, -1, -1, 157, -1, -1, 160, -1,
- 162, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 154, -1, -1, 157, -1, -1, 160, -1,
- 162, -1, -1, -1, -1, 35, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 49,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 59,
- 60, -1, -1, 154, -1, -1, 157, -1, -1, 160,
- -1, 162, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
- 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
- 100, 101, 102, 103, 104, 105, 106, 107, -1, -1,
- 110, 111, 112, 113, 114, 115, 116, 117, 118, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 139,
- 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
- 150, 151
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 0, 1, 1, 1, 1, 1, 1, 1,
+ 0, 0, 1, 1, 1, 1, 1, 1, 2, 0,
+ 2, 0, 3, 2, 0, 1, 0, 3, 1, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 4, 5, 5, 3, 2, 5, 4, 2, 1,
+ 3, 1, 3, 1, 0, 4, 3, 3, 4, 4,
+ 3, 6, 5, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 6, 5, 8, 6, 6, 6, 7,
+ 7, 6, 6, 8, 8, 3, 1, 1, 1, 1,
+ 2, 2, 4, 2, 1, 4, 2, 4, 0, 7,
+ 0, 7, 0, 7, 0, 7, 3, 4, 0, 1,
+ 1, 1, 3, 3, 3, 3, 3, 3, 1, 0,
+ 1, 1, 1, 0, 2, 3, 1, 1, 3, 1,
+ 0, 8, 1, 1, 3, 1, 1, 2, 0, 1,
+ 1, 0, 0, 5, 0, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 3, 1, 5, 1, 1, 1,
+ 1, 2, 2, 2, 3, 2, 0, 1, 1, 1,
+ 2, 2, 3, 9, 9, 8, 13, 1, 1, 6,
+ 5, 2, 6, 7, 1, 3, 1, 0, 2, 1,
+ 5, 5, 5, 6, 6, 2, 4, 4, 6, 4,
+ 4, 4, 4, 6, 6, 2, 7, 1, 2, 0,
+ 1, 0, 3, 6, 3, 6, 2, 4, 6, 4
};
-/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/usr/share/bison.simple"
-/* This file comes from bison-1.28. */
-/* Skeleton output parser for bison,
- Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint16 yydefact[] =
+{
+ 198, 0, 90, 184, 1, 183, 231, 83, 84, 85,
+ 86, 87, 88, 89, 0, 91, 256, 180, 181, 256,
+ 210, 211, 0, 0, 0, 90, 0, 186, 228, 0,
+ 0, 92, 93, 94, 95, 96, 97, 0, 0, 257,
+ 253, 82, 225, 226, 227, 252, 0, 0, 0, 0,
+ 196, 0, 0, 0, 0, 0, 0, 0, 81, 229,
+ 230, 232, 199, 182, 98, 2, 3, 111, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,
+ 128, 0, 0, 0, 0, 247, 0, 0, 110, 127,
+ 114, 248, 129, 222, 223, 224, 301, 255, 0, 0,
+ 0, 0, 209, 197, 187, 185, 177, 178, 0, 0,
+ 0, 0, 91, 130, 0, 0, 0, 113, 135, 139,
+ 0, 0, 144, 138, 300, 0, 279, 0, 0, 0,
+ 0, 91, 268, 258, 259, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 52,
+ 53, 54, 55, 20, 21, 22, 23, 24, 25, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 68, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 67, 0, 0, 0, 0,
+ 0, 267, 254, 91, 271, 0, 297, 204, 201, 200,
+ 202, 203, 205, 208, 0, 192, 194, 190, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, 124, 125, 0,
+ 0, 0, 0, 188, 233, 0, 0, 0, 0, 0,
+ 134, 220, 143, 141, 0, 0, 285, 278, 261, 260,
+ 0, 0, 72, 76, 71, 75, 70, 74, 69, 73,
+ 77, 78, 0, 0, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 0, 50, 51, 46, 47, 48,
+ 49, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 0, 101, 101, 306, 0, 0, 295, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 206, 106, 106, 106, 160, 161,
+ 4, 5, 158, 159, 162, 157, 153, 154, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 156, 155, 106, 112, 112, 137,
+ 0, 140, 219, 213, 216, 217, 0, 0, 131, 236,
+ 237, 238, 243, 239, 240, 241, 242, 234, 0, 245,
+ 250, 249, 251, 0, 262, 0, 0, 0, 0, 0,
+ 302, 0, 304, 299, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 207, 0, 193, 195, 191, 0, 0, 0, 0,
+ 0, 0, 0, 146, 176, 0, 0, 0, 150, 0,
+ 147, 0, 0, 0, 0, 0, 189, 132, 133, 136,
+ 212, 214, 0, 104, 142, 235, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 309, 0, 0,
+ 0, 289, 292, 0, 0, 290, 291, 0, 0, 0,
+ 286, 287, 0, 307, 0, 0, 0, 108, 106, 0,
+ 0, 299, 0, 0, 0, 0, 0, 145, 135, 114,
+ 0, 148, 149, 0, 0, 0, 0, 0, 218, 215,
+ 105, 99, 0, 244, 0, 0, 277, 0, 0, 101,
+ 102, 101, 274, 298, 0, 0, 0, 0, 0, 280,
+ 281, 282, 277, 0, 103, 109, 107, 0, 0, 0,
+ 0, 0, 0, 0, 175, 152, 0, 0, 0, 0,
+ 0, 0, 0, 221, 0, 0, 0, 276, 0, 283,
+ 284, 0, 303, 305, 0, 0, 0, 288, 293, 294,
+ 0, 308, 0, 0, 164, 0, 0, 0, 0, 151,
+ 0, 0, 0, 0, 0, 100, 246, 0, 0, 0,
+ 275, 272, 0, 296, 0, 0, 0, 172, 0, 0,
+ 166, 167, 168, 171, 163, 0, 265, 0, 0, 0,
+ 273, 169, 170, 0, 0, 0, 263, 0, 264, 0,
+ 0, 165, 173, 174, 0, 0, 0, 0, 0, 0,
+ 270, 0, 0, 269, 266
+};
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
+{
+ -1, 85, 312, 329, 330, 331, 264, 281, 332, 333,
+ 219, 220, 252, 221, 25, 15, 37, 523, 370, 457,
+ 481, 393, 458, 86, 87, 222, 89, 90, 120, 234,
+ 404, 359, 405, 108, 1, 2, 3, 336, 307, 305,
+ 306, 63, 200, 50, 103, 204, 91, 421, 344, 345,
+ 346, 38, 95, 16, 44, 17, 61, 18, 28, 112,
+ 426, 360, 92, 362, 492, 19, 40, 41, 191, 192,
+ 578, 97, 287, 527, 528, 193, 194, 437, 195, 196
+};
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+#define YYPACT_NINF -555
+static const yytype_int16 yypact[] =
+{
+ -555, 136, 58, 247, -555, -555, -555, -555, -555, -555,
+ -555, -555, -555, -555, 96, 181, 141, -555, -555, -9,
+ -555, -555, 16, 7, 114, 65, 39, -555, 50, 188,
+ 210, -555, -555, -555, -555, -555, -555, 1357, -19, -555,
+ -555, 134, -555, -555, -555, -555, 68, 69, 70, 73,
+ -555, 60, 188, 1357, 4, 4, 4, 4, -555, -555,
+ -555, -555, -555, -555, -555, -555, -555, 63, -555, -555,
+ -555, -555, -555, -555, -555, -555, -555, -555, -555, -555,
+ -555, 222, 224, 1, 171, -555, 134, 84, -555, -555,
+ -103, -555, -555, -555, -555, -555, 1611, -555, 216, 66,
+ 238, 219, 233, -555, -555, -555, -555, -555, 1418, 1418,
+ 1418, 1459, 181, -555, 100, 101, 737, -555, -555, -103,
+ -112, 105, 803, -555, -555, 1418, -555, 202, 1479, 13,
+ 221, 181, -555, -555, -555, -555, -555, -555, -555, -555,
+ -555, -555, -555, -555, -555, -555, -555, -555, -555, -555,
+ -555, -555, -555, -555, -555, -555, -555, -555, -555, 77,
+ 377, 1418, 1418, 1418, 1418, 1418, 1418, 1418, 1418, 1418,
+ 1418, 1418, 1418, -555, -555, -555, -555, -555, -555, -555,
+ -555, -555, -555, -555, -555, -555, 1418, 1418, 1418, 1418,
+ 1418, -555, -555, 181, -555, 33, -555, -555, -555, -555,
+ -555, -555, -555, -555, -15, -555, -555, -555, 36, 158,
+ 262, 164, 264, 167, 266, 169, 268, 269, 270, 204,
+ 271, 274, 579, -555, -555, 1418, 1418, 121, -67, 1418,
+ -555, 1199, -555, 120, 127, 920, -555, -555, 63, -555,
+ 920, 920, -555, -555, -555, -555, -555, -555, -555, -555,
+ -555, -555, 920, 1357, -555, -555, -555, -555, -555, -555,
+ -555, -555, -555, -555, 1418, -555, -555, -555, -555, -555,
+ -555, -555, -555, -555, -555, -555, -555, -555, -555, -555,
+ -555, 1418, 142, 143, -555, 920, 147, 153, 154, 155,
+ 157, 165, 166, 168, 170, 920, 920, 920, 173, 275,
+ 1357, 1418, 1418, 293, -555, 174, 174, 174, -555, -555,
+ -555, -555, -555, -555, -555, -555, -555, -555, 77, 377,
+ 175, 177, 180, 182, 183, 1240, 1520, 757, 296, 192,
+ 193, 199, 203, 207, -555, -555, 174, -45, -71, -555,
+ 161, -103, -555, 134, -555, 176, 209, 1260, -555, -555,
+ -555, -555, -555, -555, -555, -555, -555, 261, 1459, -555,
+ -555, -555, -555, 206, -555, 213, 920, 920, 920, -2,
+ -555, 0, -555, 215, 920, 179, 1418, 1418, 1418, 1418,
+ 1418, 1418, 1418, 217, 218, 223, 1418, 1418, 920, 920,
+ 226, -555, -17, -555, -555, -555, 214, 220, 1459, 1459,
+ 1459, 1459, 1459, -555, -555, -13, 778, -94, -555, -40,
+ -555, 1459, 1459, 1459, 1459, 1459, -555, -555, -555, -555,
+ -555, -555, 1301, 346, -555, -555, 357, -69, 361, 362,
+ 229, 234, 235, 920, 382, 920, 1418, -555, 236, 920,
+ 237, -555, -555, 239, 240, -555, -555, 920, 920, 920,
+ -555, -555, 241, -555, 1418, 367, 390, -555, 174, 1459,
+ 1459, 215, 242, 245, 248, 249, 1459, -555, 254, -16,
+ -8, -555, -555, 250, 253, 263, 272, 364, -555, -555,
+ -555, 366, 273, -555, 920, 920, 1418, 920, 920, 276,
+ -555, 276, -555, 279, 920, 280, 1418, 1418, 1418, -555,
+ -555, -555, 1418, 920, -555, -555, -555, 281, 282, 283,
+ 1459, 1459, 1459, 1459, -555, -555, 284, 1459, 1459, 1459,
+ 1459, 1418, 423, -555, 416, 288, 285, 279, 290, -555,
+ -555, 391, -555, -555, 1418, 294, 920, -555, -555, -555,
+ 291, -555, 1459, 1459, -555, 299, 298, 302, 303, -555,
+ 301, 306, 307, 308, 310, -555, -555, 437, 15, 432,
+ -555, -555, 312, -555, 316, 319, 1459, -555, 1459, 1459,
+ -555, -555, -555, -555, -555, 920, -555, 1046, 64, 460,
+ -555, -555, -555, 326, 329, 331, -555, 335, -555, 1046,
+ 920, -555, -555, -555, 468, 337, 132, 920, 470, 472,
+ -555, 920, 920, -555, -555
+};
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+/* YYPGOTO[NTERM-NUM]. */
+static const yytype_int16 yypgoto[] =
+{
+ -555, -555, -555, 398, 399, 400, 198, 200, 402, 403,
+ -128, -127, -525, -555, 476, 493, -111, -555, -276, 97,
+ -555, -298, -555, -47, -555, -37, -555, -60, -62, -555,
+ -99, 300, -308, 61, -555, -555, -555, -555, -555, -555,
+ -555, 469, -555, -555, -555, -555, 8, -555, 102, -555,
+ -555, 411, -555, -555, -555, -555, -555, 523, -555, -555,
+ -555, -554, -11, 112, -124, -555, 508, -555, -68, -555,
+ -555, -555, -555, 93, 28, -555, -555, 71, -555, -555
+};
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
-
-/* This is the parser code that is written into each bison parser
- when the %semantic_parser declaration is not specified in the grammar.
- It was written by Richard Stallman by simplifying the hairy parser
- used when %semantic_parser is specified. */
-
-#ifndef YYSTACK_USE_ALLOCA
-#ifdef alloca
-#define YYSTACK_USE_ALLOCA
-#else /* alloca not defined */
-#ifdef __GNUC__
-#define YYSTACK_USE_ALLOCA
-#define alloca __builtin_alloca
-#else /* not GNU C. */
-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
-#define YYSTACK_USE_ALLOCA
-#include <alloca.h>
-#else /* not sparc */
-/* We think this test detects Watcom and Microsoft C. */
-/* This used to test MSDOS, but that is a bad idea
- since that symbol is in the user namespace. */
-#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
-#if 0 /* No need for malloc.h, which pollutes the namespace;
- instead, just don't use alloca. */
-#include <malloc.h>
-#endif
-#else /* not MSDOS, or __TURBOC__ */
-#if defined(_AIX)
-/* I don't know what this was needed for, but it pollutes the namespace.
- So I turned it off. rms, 2 May 1997. */
-/* #include <malloc.h> */
- #pragma alloca
-#define YYSTACK_USE_ALLOCA
-#else /* not MSDOS, or __TURBOC__, or _AIX */
-#if 0
-#ifdef __hpux /* haible at ilog.fr says this works for HPUX 9.05 and up,
- and on HPUX 10. Eventually we can turn this on. */
-#define YYSTACK_USE_ALLOCA
-#define alloca __builtin_alloca
-#endif /* __hpux */
-#endif
-#endif /* not _AIX */
-#endif /* not MSDOS, or __TURBOC__ */
-#endif /* not sparc */
-#endif /* not GNU C */
-#endif /* alloca not defined */
-#endif /* YYSTACK_USE_ALLOCA not defined */
+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule which
+ number is the opposite. If zero, do what YYDEFACT says.
+ If YYTABLE_NINF, syntax error. */
+#define YYTABLE_NINF -180
+static const yytype_int16 yytable[] =
+{
+ 88, 236, 250, 251, 239, 115, 105, 372, 394, 395,
+ 93, 26, 223, 433, 39, 435, 88, 455, 407, 409,
+ 253, 42, 240, 587, 119, 242, 243, 244, 245, 246,
+ 247, 248, 249, 577, 241, 595, 106, 107, 416, 284,
+ 456, 229, 288, 289, 290, 291, 292, 293, 294, 26,
+ 427, 230, -112, 589, 228, 434, 119, 434, -179, 466,
+ 233, 123, 119, 308, 309, 298, 299, 471, 46, 47,
+ 48, 205, 206, 207, 242, 243, 244, 245, 246, 247,
+ 248, 249, 300, 5, 466, 53, 229, 49, 235, 6,
+ 418, 235, 483, 123, 121, 59, 340, 60, 470, 7,
+ 8, 9, 10, 11, 12, 13, 7, 8, 9, 10,
+ 54, 12, 55, 466, 417, 56, 109, 110, 111, 123,
+ 14, 198, 199, 472, 282, 283, 235, 285, 286, 235,
+ 235, 235, 235, 235, 235, 235, 4, -139, 303, -112,
+ 466, 301, 302, 94, 304, 466, 467, -139, 123, 295,
+ 296, 297, 235, 235, 43, 516, 20, 29, 21, 51,
+ 506, -72, -72, 116, 39, 337, 338, -71, -71, 341,
+ -70, -70, -69, -69, 576, 52, 65, 66, 390, 117,
+ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 58, 79, 20, 343, 21, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 366, 310, 311, 133,
+ 134, 335, 62, 532, 64, 533, 88, 102, -113, 80,
+ 98, 99, 100, 588, 361, 101, 113, 367, 114, 361,
+ 361, 242, 243, 244, 245, 246, 247, 248, 249, 122,
+ 197, 361, 201, 202, 368, 30, 31, 32, 33, 34,
+ 35, 36, 440, 388, 442, 443, 444, 203, 225, 226,
+ 231, 237, 450, 88, 389, 235, -76, -82, -75, 20,
+ -74, 21, -73, 347, 361, 313, -79, -80, 6, -82,
+ -82, 314, 339, 348, 361, 361, 361, 341, -82, -82,
+ -82, -82, -82, -82, -82, 369, 371, -82, 22, 461,
+ 462, 463, 464, 465, 374, 23, 375, 376, 377, 24,
+ 378, 387, 473, 474, 475, 476, 477, 391, 379, 380,
+ 410, 381, 419, 382, 425, 81, 386, 392, 82, 422,
+ 398, 83, 399, 84, 118, 400, 439, 401, 402, 235,
+ 441, 235, 235, 235, 445, 446, 469, 411, 412, 235,
+ 451, 420, 363, 364, 413, 361, 361, 361, 414, 428,
+ 507, 508, 415, 361, 365, 423, 429, 514, 436, 459,
+ 447, 448, 537, 538, 539, 460, 449, 361, 361, 454,
+ 455, 482, 484, 485, 486, 343, 490, 487, 488, 494,
+ 496, 504, 497, 498, 505, 510, 502, 373, 511, 235,
+ 521, 512, 513, 517, 265, 266, 518, 383, 384, 385,
+ 560, 545, 546, 547, 548, 515, 519, 503, 550, 551,
+ 552, 553, 361, 522, 361, 520, 524, 555, 361, 531,
+ 250, 251, 534, 536, 542, 543, 361, 361, 361, 544,
+ 556, 557, 558, 564, 565, 549, 559, 563, 434, 235,
+ 250, 251, 566, 561, 567, 568, 569, 570, 575, 235,
+ 235, 235, 571, 572, 573, 235, 574, 583, 579, 584,
+ 585, 580, 581, 361, 361, 582, 361, 361, 430, 431,
+ 432, 590, 591, 361, 554, 592, 438, 593, 594, 597,
+ 598, 601, 361, 602, 186, 187, 188, 235, 189, 190,
+ 452, 453, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 396, 96, 57, 397,
+ 480, 104, 334, 224, 479, 361, 27, 45, 599, 493,
+ 540, 0, 509, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 489, 0, 491, 0, 0,
+ 0, 495, 0, 0, 0, 0, 0, 0, 0, 499,
+ 500, 501, 0, 0, 361, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 361,
+ 0, 0, 0, 0, 65, 66, 361, 0, 0, 0,
+ 361, 361, 0, 0, 0, 0, 525, 526, 0, 529,
+ 530, 20, 0, 21, 0, 315, 535, 0, 0, 0,
+ 0, 0, 0, 0, 0, 541, 0, 316, 317, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 562, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 135, 136,
+ 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
+ 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
+ 157, 158, 318, 319, 0, 0, 0, 586, 0, 320,
+ 0, 321, 0, 322, 323, 324, 0, 0, 0, 0,
+ 0, 0, 596, 0, 0, 0, 0, 0, 0, 600,
+ 0, 0, 0, 603, 604, 0, 0, 0, 173, 174,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
+ 185, 0, 0, 0, 0, 0, 325, 0, 0, 326,
+ 0, 327, 65, 66, 328, 117, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 0, 79, 20,
+ 0, 21, 65, 66, 0, 117, 208, 209, 210, 211,
+ 212, 213, 214, 215, 216, 217, 218, 0, 79, 20,
+ 0, 21, 0, 65, 66, 80, 117, 208, 209, 210,
+ 211, 212, 213, 214, 215, 216, 217, 218, 0, 79,
+ 20, 0, 21, 0, 0, 80, 0, 0, 65, 66,
+ 0, 117, 68, 69, 70, 71, 72, 73, 74, 75,
+ 76, 77, 78, 0, 79, 20, 80, 21, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 232, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 80, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 81, 0, 0, 82, 0, 0, 83, 0, 84,
+ 227, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 81, 0, 0, 82, 0, 0, 83, 0, 84,
+ 408, 0, 0, 349, 350, 65, 66, 351, 0, 0,
+ 0, 0, 81, 0, 0, 82, 0, 0, 83, 0,
+ 84, 468, 20, 0, 21, 0, 352, 353, 354, 0,
+ 0, 0, 0, 0, 0, 0, 0, 81, 355, 356,
+ 82, 0, 0, 83, 0, 84, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 357, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 135,
+ 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
+ 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
+ 156, 157, 158, 318, 319, 0, 0, 0, 0, 0,
+ 320, 0, 321, 0, 322, 323, 324, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 349,
+ 350, 0, 0, 351, 0, 0, 0, 0, 0, 173,
+ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ 184, 185, 352, 353, 354, 0, 0, 0, 0, 0,
+ 358, 0, 0, 0, 355, 356, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 357, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 135, 136, 137, 138, 139,
+ 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
+ 150, 151, 152, 153, 154, 155, 156, 157, 158, 318,
+ 319, 0, 0, 0, 0, 0, 320, 0, 321, 0,
+ 322, 323, 324, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 173, 174, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, 184, 185, 0, 0,
+ 0, 0, 0, 0, 65, 66, 358, 117, 68, 69,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 0,
+ 79, 20, 0, 21, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 342, 0, 0, 0,
+ 0, 0, 0, 0, 0, 65, 66, 80, 117, 208,
+ 209, 210, 211, 212, 213, 214, 215, 216, 217, 218,
+ 0, 79, 20, 0, 21, 65, 66, 0, 117, 68,
+ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
+ 0, 79, 20, 0, 21, 0, 0, 0, 80, 0,
+ 0, 0, 0, 0, 0, 0, 0, 424, 0, 0,
+ 0, 0, 0, 0, 0, 0, 65, 66, 80, 117,
+ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ 78, 0, 79, 20, 0, 21, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 478, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,
+ 0, 0, 0, 81, 0, 0, 82, 0, 0, 83,
+ 0, 84, 65, 66, 0, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 0, 79, 20,
+ 0, 21, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 81, 0, 0, 82, 0, 403,
+ 83, 0, 84, 0, 0, 80, 0, 0, 0, 0,
+ 0, 0, 0, 0, 81, 0, 0, 82, 0, 0,
+ 83, 0, 84, 65, 66, 0, 117, 68, 69, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78, 0, 79,
+ 20, 0, 21, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 81, 0, 0, 82, 0,
+ 0, 83, 0, 84, 65, 66, 80, 117, 208, 209,
+ 210, 211, 212, 213, 214, 215, 216, 217, 218, 0,
+ 79, 20, 0, 21, 65, 66, 0, 238, 68, 69,
+ 70, 71, 72, 73, 74, 75, 76, 77, 78, 0,
+ 79, 20, 0, 21, 0, 0, 0, 80, 0, 0,
+ 0, 81, 0, 0, 82, 0, 0, 83, 0, 84,
+ 0, 0, 0, 0, 0, 65, 66, 80, 117, 208,
+ 209, 210, 211, 212, 213, 214, 215, 216, 217, 218,
+ 0, 79, 20, 0, 21, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 80, 0,
+ 0, 0, 81, 0, 0, 82, 0, 0, 83, 0,
+ 84, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 81, 0, 0, 82, 0, 0, 83,
+ 0, 84, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 81, 0, 0, 82, 0, 0, 83,
+ 0, 84, 0, 0, 0, 0, 124, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 125, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 126, 127, 0, 0, 81, 0, 0, 82, 0, 0,
+ 83, 0, 406, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
+ 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
+ 155, 156, 157, 158, 159, 160, 161, 162, 163, 0,
+ 0, 164, 165, 166, 167, 168, 169, 170, 171, 172,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, 184, 185
+};
-#ifdef YYSTACK_USE_ALLOCA
-#define YYSTACK_ALLOC alloca
-#else
-#define YYSTACK_ALLOC malloc
-#endif
+static const yytype_int16 yycheck[] =
+{
+ 37, 125, 130, 130, 128, 4, 53, 283, 306, 307,
+ 29, 3, 111, 15, 23, 15, 53, 34, 326, 327,
+ 131, 30, 9, 577, 84, 10, 11, 12, 13, 14,
+ 15, 16, 17, 558, 21, 589, 32, 33, 336, 163,
+ 57, 153, 166, 167, 168, 169, 170, 171, 172, 41,
+ 358, 163, 155, 578, 116, 57, 116, 57, 0, 153,
+ 122, 164, 122, 27, 28, 189, 190, 161, 52, 53,
+ 54, 108, 109, 110, 10, 11, 12, 13, 14, 15,
+ 16, 17, 193, 25, 153, 20, 153, 71, 125, 31,
+ 161, 128, 161, 164, 86, 45, 163, 47, 406, 41,
+ 42, 43, 44, 45, 46, 47, 41, 42, 43, 44,
+ 45, 46, 47, 153, 159, 50, 55, 56, 57, 164,
+ 62, 55, 56, 163, 161, 162, 163, 164, 165, 166,
+ 167, 168, 169, 170, 171, 172, 0, 153, 153, 155,
+ 153, 108, 109, 162, 159, 153, 159, 163, 164, 186,
+ 187, 188, 189, 190, 163, 163, 22, 61, 24, 152,
+ 458, 3, 4, 162, 23, 225, 226, 3, 4, 229,
+ 3, 4, 3, 4, 159, 61, 5, 6, 302, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 152, 21, 22, 231, 24, 119, 120, 121, 122,
+ 123, 124, 125, 126, 127, 128, 253, 3, 4, 77,
+ 78, 222, 24, 489, 4, 491, 253, 157, 155, 48,
+ 152, 152, 152, 159, 235, 152, 4, 264, 4, 240,
+ 241, 10, 11, 12, 13, 14, 15, 16, 17, 155,
+ 24, 252, 4, 24, 281, 64, 65, 66, 67, 68,
+ 69, 70, 376, 300, 378, 379, 380, 24, 158, 158,
+ 155, 59, 386, 300, 301, 302, 4, 20, 4, 22,
+ 4, 24, 4, 153, 285, 4, 7, 7, 31, 32,
+ 33, 7, 161, 156, 295, 296, 297, 347, 41, 42,
+ 43, 44, 45, 46, 47, 153, 153, 50, 51, 398,
+ 399, 400, 401, 402, 157, 58, 153, 153, 153, 62,
+ 153, 36, 411, 412, 413, 414, 415, 24, 153, 153,
+ 24, 153, 161, 153, 63, 154, 153, 153, 157, 153,
+ 155, 160, 155, 162, 163, 155, 157, 155, 155, 376,
+ 377, 378, 379, 380, 381, 382, 406, 155, 155, 386,
+ 387, 343, 240, 241, 155, 366, 367, 368, 155, 153,
+ 459, 460, 155, 374, 252, 156, 153, 466, 153, 155,
+ 153, 153, 496, 497, 498, 155, 153, 388, 389, 153,
+ 34, 24, 21, 21, 155, 422, 4, 153, 153, 153,
+ 153, 24, 153, 153, 4, 153, 155, 285, 153, 436,
+ 36, 153, 153, 153, 27, 28, 153, 295, 296, 297,
+ 534, 510, 511, 512, 513, 161, 153, 454, 517, 518,
+ 519, 520, 433, 57, 435, 153, 153, 4, 439, 153,
+ 558, 558, 153, 153, 153, 153, 447, 448, 449, 156,
+ 24, 153, 157, 542, 543, 161, 156, 156, 57, 486,
+ 578, 578, 153, 159, 156, 153, 153, 156, 21, 496,
+ 497, 498, 156, 156, 156, 502, 156, 566, 36, 568,
+ 569, 159, 156, 484, 485, 156, 487, 488, 366, 367,
+ 368, 21, 156, 494, 521, 156, 374, 156, 153, 21,
+ 153, 21, 503, 21, 96, 96, 96, 534, 96, 96,
+ 388, 389, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 318, 41, 25, 319,
+ 423, 52, 222, 112, 422, 536, 3, 19, 596, 436,
+ 502, -1, 461, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 433, -1, 435, -1, -1,
+ -1, 439, -1, -1, -1, -1, -1, -1, -1, 447,
+ 448, 449, -1, -1, 575, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 590,
+ -1, -1, -1, -1, 5, 6, 597, -1, -1, -1,
+ 601, 602, -1, -1, -1, -1, 484, 485, -1, 487,
+ 488, 22, -1, 24, -1, 26, 494, -1, -1, -1,
+ -1, -1, -1, -1, -1, 503, -1, 38, 39, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 536, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 79, 80,
+ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
+ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
+ 101, 102, 103, 104, -1, -1, -1, 575, -1, 110,
+ -1, 112, -1, 114, 115, 116, -1, -1, -1, -1,
+ -1, -1, 590, -1, -1, -1, -1, -1, -1, 597,
+ -1, -1, -1, 601, 602, -1, -1, -1, 139, 140,
+ 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
+ 151, -1, -1, -1, -1, -1, 157, -1, -1, 160,
+ -1, 162, 5, 6, 165, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, -1, 21, 22,
+ -1, 24, 5, 6, -1, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, -1, 21, 22,
+ -1, 24, -1, 5, 6, 48, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, -1, 21,
+ 22, -1, 24, -1, -1, 48, -1, -1, 5, 6,
+ -1, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, -1, 21, 22, 48, 24, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 37, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 48, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 154, -1, -1, 157, -1, -1, 160, -1, 162,
+ 163, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 154, -1, -1, 157, -1, -1, 160, -1, 162,
+ 163, -1, -1, 3, 4, 5, 6, 7, -1, -1,
+ -1, -1, 154, -1, -1, 157, -1, -1, 160, -1,
+ 162, 163, 22, -1, 24, -1, 26, 27, 28, -1,
+ -1, -1, -1, -1, -1, -1, -1, 154, 38, 39,
+ 157, -1, -1, 160, -1, 162, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 61, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
+ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
+ 100, 101, 102, 103, 104, -1, -1, -1, -1, -1,
+ 110, -1, 112, -1, 114, 115, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3,
+ 4, -1, -1, 7, -1, -1, -1, -1, -1, 139,
+ 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
+ 150, 151, 26, 27, 28, -1, -1, -1, -1, -1,
+ 160, -1, -1, -1, 38, 39, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 61, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 79, 80, 81, 82, 83,
+ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
+ 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
+ 104, -1, -1, -1, -1, -1, 110, -1, 112, -1,
+ 114, 115, 116, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 139, 140, 141, 142, 143,
+ 144, 145, 146, 147, 148, 149, 150, 151, -1, -1,
+ -1, -1, -1, -1, 5, 6, 160, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, -1,
+ 21, 22, -1, 24, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 37, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5, 6, 48, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ -1, 21, 22, -1, 24, 5, 6, -1, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ -1, 21, 22, -1, 24, -1, -1, -1, 48, -1,
+ -1, -1, -1, -1, -1, -1, -1, 37, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5, 6, 48, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, -1, 21, 22, -1, 24, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 37, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 48,
+ -1, -1, -1, 154, -1, -1, 157, -1, -1, 160,
+ -1, 162, 5, 6, -1, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, -1, 21, 22,
+ -1, 24, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 154, -1, -1, 157, -1, 159,
+ 160, -1, 162, -1, -1, 48, -1, -1, -1, -1,
+ -1, -1, -1, -1, 154, -1, -1, 157, -1, -1,
+ 160, -1, 162, 5, 6, -1, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, -1, 21,
+ 22, -1, 24, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 154, -1, -1, 157, -1,
+ -1, 160, -1, 162, 5, 6, 48, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, -1,
+ 21, 22, -1, 24, 5, 6, -1, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, -1,
+ 21, 22, -1, 24, -1, -1, -1, 48, -1, -1,
+ -1, 154, -1, -1, 157, -1, -1, 160, -1, 162,
+ -1, -1, -1, -1, -1, 5, 6, 48, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ -1, 21, 22, -1, 24, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 48, -1,
+ -1, -1, 154, -1, -1, 157, -1, -1, 160, -1,
+ 162, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 154, -1, -1, 157, -1, -1, 160,
+ -1, 162, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 154, -1, -1, 157, -1, -1, 160,
+ -1, 162, -1, -1, -1, -1, 35, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 49, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 59, 60, -1, -1, 154, -1, -1, 157, -1, -1,
+ 160, -1, 162, 72, 73, 74, 75, 76, 77, 78,
+ 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
+ 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
+ 99, 100, 101, 102, 103, 104, 105, 106, 107, -1,
+ -1, 110, 111, 112, 113, 114, 115, 116, 117, 118,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
+ 149, 150, 151
+};
-/* Note: there must be only one dollar sign in this file.
- It is replaced by the list of actions, each action
- as one case of the switch. */
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint8 yystos[] =
+{
+ 0, 200, 201, 202, 0, 25, 31, 41, 42, 43,
+ 44, 45, 46, 47, 62, 181, 219, 221, 223, 231,
+ 22, 24, 51, 58, 62, 180, 212, 223, 224, 61,
+ 64, 65, 66, 67, 68, 69, 70, 182, 217, 23,
+ 232, 233, 30, 163, 220, 232, 52, 53, 54, 71,
+ 209, 152, 61, 20, 45, 47, 50, 181, 152, 45,
+ 47, 222, 24, 207, 4, 5, 6, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 21,
+ 48, 154, 157, 160, 162, 167, 189, 190, 191, 192,
+ 193, 212, 228, 29, 162, 218, 180, 237, 152, 152,
+ 152, 152, 157, 210, 207, 189, 32, 33, 199, 199,
+ 199, 199, 225, 4, 4, 4, 162, 8, 163, 193,
+ 194, 212, 155, 164, 35, 49, 59, 60, 72, 73,
+ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
+ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
+ 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
+ 104, 105, 106, 107, 110, 111, 112, 113, 114, 115,
+ 116, 117, 118, 139, 140, 141, 142, 143, 144, 145,
+ 146, 147, 148, 149, 150, 151, 169, 170, 171, 174,
+ 175, 234, 235, 241, 242, 244, 245, 24, 55, 56,
+ 208, 4, 24, 24, 211, 191, 191, 191, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 176,
+ 177, 179, 191, 196, 217, 158, 158, 163, 194, 153,
+ 163, 155, 37, 194, 195, 191, 230, 59, 8, 230,
+ 9, 21, 10, 11, 12, 13, 14, 15, 16, 17,
+ 176, 177, 178, 182, 119, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 172, 27, 28, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 138, 173, 191, 191, 230, 191, 191, 238, 230, 230,
+ 230, 230, 230, 230, 230, 191, 191, 191, 230, 230,
+ 182, 108, 109, 153, 159, 205, 206, 204, 27, 28,
+ 3, 4, 168, 4, 7, 26, 38, 39, 103, 104,
+ 110, 112, 114, 115, 116, 157, 160, 162, 165, 169,
+ 170, 171, 174, 175, 197, 228, 203, 193, 193, 161,
+ 163, 193, 37, 191, 214, 215, 216, 153, 156, 3,
+ 4, 7, 26, 27, 28, 38, 39, 61, 160, 197,
+ 227, 228, 229, 229, 229, 229, 189, 191, 191, 153,
+ 184, 153, 184, 229, 157, 153, 153, 153, 153, 153,
+ 153, 153, 153, 229, 229, 229, 153, 36, 189, 191,
+ 230, 24, 153, 187, 187, 187, 172, 173, 155, 155,
+ 155, 155, 155, 159, 196, 198, 162, 198, 163, 198,
+ 24, 155, 155, 155, 155, 155, 187, 159, 161, 161,
+ 212, 213, 153, 156, 37, 63, 226, 198, 153, 153,
+ 229, 229, 229, 15, 57, 15, 153, 243, 229, 157,
+ 230, 191, 230, 230, 230, 191, 191, 153, 153, 153,
+ 230, 191, 229, 229, 153, 34, 57, 185, 188, 155,
+ 155, 196, 196, 196, 196, 196, 153, 159, 163, 193,
+ 198, 161, 163, 196, 196, 196, 196, 196, 37, 214,
+ 185, 186, 24, 161, 21, 21, 155, 153, 153, 229,
+ 4, 229, 230, 239, 153, 229, 153, 153, 153, 229,
+ 229, 229, 155, 191, 24, 4, 187, 196, 196, 243,
+ 153, 153, 153, 153, 196, 161, 163, 153, 153, 153,
+ 153, 36, 57, 183, 153, 229, 229, 239, 240, 229,
+ 229, 153, 184, 184, 153, 229, 153, 230, 230, 230,
+ 240, 229, 153, 153, 156, 196, 196, 196, 196, 161,
+ 196, 196, 196, 196, 191, 4, 24, 153, 157, 156,
+ 230, 159, 229, 156, 196, 196, 153, 156, 153, 153,
+ 156, 156, 156, 156, 156, 21, 159, 178, 236, 36,
+ 159, 156, 156, 196, 196, 196, 229, 227, 159, 178,
+ 21, 156, 156, 156, 153, 227, 229, 21, 153, 234,
+ 229, 21, 21, 229, 229
+};
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY -2
+#define YYEMPTY (-2)
#define YYEOF 0
+
#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrlab1
-/* Like YYERROR except do call yyerror.
- This remains here temporarily to ease the
- transition to the new meaning of YYERROR, for GCC.
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror. This remains here temporarily
+ to ease the transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */
+
#define YYFAIL goto yyerrlab
+
#define YYRECOVERING() (!!yyerrstatus)
-#define YYBACKUP(token, value) \
+
+#define YYBACKUP(Token, Value) \
do \
if (yychar == YYEMPTY && yylen == 1) \
- { yychar = (token), yylval = (value); \
- yychar1 = YYTRANSLATE (yychar); \
- YYPOPSTACK; \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ yytoken = YYTRANSLATE (yychar); \
+ YYPOPSTACK (1); \
goto yybackup; \
} \
else \
- { yyerror ("syntax error: cannot back up"); YYERROR; } \
-while (0)
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+while (YYID (0))
+
#define YYTERROR 1
#define YYERRCODE 256
-#ifndef YYPURE
-#define YYLEX yylex()
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (YYID (N)) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (YYID (0))
#endif
-#ifdef YYPURE
-#ifdef YYLSP_NEEDED
-#ifdef YYLEX_PARAM
-#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
-#else
-#define YYLEX yylex(&yylval, &yylloc)
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
#endif
-#else /* not YYLSP_NEEDED */
+
+
+/* YYLEX -- calling `yylex' with the right arguments. */
+
#ifdef YYLEX_PARAM
-#define YYLEX yylex(&yylval, YYLEX_PARAM)
+# define YYLEX yylex (YYLEX_PARAM)
#else
-#define YYLEX yylex(&yylval)
+# define YYLEX yylex ()
#endif
-#endif /* not YYLSP_NEEDED */
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
#endif
+{
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+ YYUSE (yyoutput);
+# endif
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+}
+
-/* If nonreentrant, generate the variables here */
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+#endif
+{
+ if (yytype < YYNTOKENS)
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-#ifndef YYPURE
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+ YYFPRINTF (yyoutput, ")");
+}
-int yychar; /* the lookahead symbol */
-YYSTYPE yylval; /* the semantic value of the */
- /* lookahead symbol */
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
-#ifdef YYLSP_NEEDED
-YYLTYPE yylloc; /* location data for the lookahead */
- /* symbol */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+#else
+static void
+yy_stack_print (bottom, top)
+ yytype_int16 *bottom;
+ yytype_int16 *top;
#endif
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (; bottom <= top; ++bottom)
+ YYFPRINTF (stderr, " %d", *bottom);
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (YYID (0))
-int yynerrs; /* number of parse errors so far */
-#endif /* not YYPURE */
-#if YYDEBUG != 0
-int yydebug; /* nonzero means print parse trace */
-/* Since this is uninitialized, it does not stop multiple parsers
- from coexisting. */
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
+#else
+static void
+yy_reduce_print (yyvsp, yyrule)
+ YYSTYPE *yyvsp;
+ int yyrule;
#endif
+{
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ fprintf (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ );
+ fprintf (stderr, "\n");
+ }
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyvsp, Rule); \
+} while (YYID (0))
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
-/* YYINITDEPTH indicates the initial size of the parser's stacks */
+/* YYINITDEPTH -- initial size of the parser's stacks. */
#ifndef YYINITDEPTH
-#define YYINITDEPTH 200
+# define YYINITDEPTH 200
#endif
-/* YYMAXDEPTH is the maximum size the stacks can grow to
- (effective only if the built-in stack extension method is used). */
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
-#if YYMAXDEPTH == 0
-#undef YYMAXDEPTH
-#endif
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
#ifndef YYMAXDEPTH
-#define YYMAXDEPTH 10000
+# define YYMAXDEPTH 10000
#endif
+
-/* Define __yy_memcpy. Note that the size argument
- should be passed with type unsigned int, because that is what the non-GCC
- definitions require. With GCC, __builtin_memcpy takes an arg
- of type size_t, but it can handle unsigned int. */
-
-#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
-#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
-#else /* not GNU C or C++ */
-#ifndef __cplusplus
-/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
-static void
-__yy_memcpy (to, from, count)
- char *to;
- char *from;
- unsigned int count;
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined __GLIBC__ && defined _STRING_H
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
+yystrlen (const char *yystr)
+#else
+static YYSIZE_T
+yystrlen (yystr)
+ const char *yystr;
+#endif
+{
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
+ continue;
+ return yylen;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+#else
+static char *
+yystpcpy (yydest, yysrc)
+ char *yydest;
+ const char *yysrc;
+#endif
{
- register char *f = from;
- register char *t = to;
- register int i = count;
+ char *yyd = yydest;
+ const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
- while (i-- > 0)
- *t++ = *f++;
+ return yyd - 1;
}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYSIZE_T yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
-#else /* __cplusplus */
+ if (! yyres)
+ return yystrlen (yystr);
-/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
-static void
-__yy_memcpy (char *to, char *from, unsigned int count)
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into YYRESULT an error message about the unexpected token
+ YYCHAR while in state YYSTATE. Return the number of bytes copied,
+ including the terminating null byte. If YYRESULT is null, do not
+ copy anything; just return the number of bytes that would be
+ copied. As a special case, return 0 if an ordinary "syntax error"
+ message will do. Return YYSIZE_MAXIMUM if overflow occurs during
+ size calculation. */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
{
- register char *t = to;
- register char *f = from;
- register int i = count;
+ int yyn = yypact[yystate];
+
+ if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+ return 0;
+ else
+ {
+ int yytype = YYTRANSLATE (yychar);
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int yyx;
+
+# if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
+ }
+
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
- while (i-- > 0)
- *t++ = *f++;
+ if (yysize_overflow)
+ return YYSIZE_MAXIMUM;
+
+ if (yyresult)
+ {
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yyresult;
+ int yyi = 0;
+ while ((*yyp = *yyf) != '\0')
+ {
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
+ }
+ }
+ return yysize;
+ }
}
+#endif /* YYERROR_VERBOSE */
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep)
+ const char *yymsg;
+ int yytype;
+ YYSTYPE *yyvaluep;
#endif
-#endif
-
-#line 217 "/usr/share/bison.simple"
+{
+ YYUSE (yyvaluep);
-/* The user can define YYPARSE_PARAM as the name of an argument to be passed
- into yyparse. The argument should have type void *.
- It should actually point to an object.
- Grammar actions can access the variable by casting it
- to the proper pointer type. */
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
-#ifdef YYPARSE_PARAM
-#ifdef __cplusplus
-#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL
-#else /* not __cplusplus */
-#define YYPARSE_PARAM_ARG YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
-#endif /* not __cplusplus */
-#else /* not YYPARSE_PARAM */
-#define YYPARSE_PARAM_ARG
-#define YYPARSE_PARAM_DECL
-#endif /* not YYPARSE_PARAM */
+ switch (yytype)
+ {
+
+ default:
+ break;
+ }
+}
+
+
+/* Prevent warnings from -Wmissing-prototypes. */
-/* Prevent warning if -Wstrict-prototypes. */
-#ifdef __GNUC__
#ifdef YYPARSE_PARAM
-int yyparse (void *);
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void *YYPARSE_PARAM);
#else
-int yyparse (void);
+int yyparse ();
#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void);
+#else
+int yyparse ();
#endif
+#endif /* ! YYPARSE_PARAM */
-int
-yyparse(YYPARSE_PARAM_ARG)
- YYPARSE_PARAM_DECL
-{
- register int yystate;
- register int yyn;
- register short *yyssp;
- register YYSTYPE *yyvsp;
- int yyerrstatus; /* number of tokens to shift before error messages enabled */
- int yychar1 = 0; /* lookahead token as an internal (translated) token number */
-
- short yyssa[YYINITDEPTH]; /* the state stack */
- YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
-
- short *yyss = yyssa; /* refer to the stacks thru separate pointers */
- YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
-
-#ifdef YYLSP_NEEDED
- YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
-#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
+
+/* The look-ahead symbol. */
+int yychar;
+
+/* The semantic value of the look-ahead symbol. */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far. */
+int yynerrs;
+
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
#else
-#define YYPOPSTACK (yyvsp--, yyssp--)
+int
+yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void)
+#else
+int
+yyparse ()
- int yystacksize = YYINITDEPTH;
- int yyfree_stacks = 0;
-
-#ifdef YYPURE
- int yychar;
- YYSTYPE yylval;
- int yynerrs;
-#ifdef YYLSP_NEEDED
- YYLTYPE yylloc;
#endif
#endif
+{
+
+ int yystate;
+ int yyn;
+ int yyresult;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+ /* Look-ahead token as an internal (translated) token number. */
+ int yytoken = 0;
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
- YYSTYPE yyval; /* the variable used to return */
- /* semantic values from the action */
- /* routines */
+ /* Three stacks and their tools:
+ `yyss': related to states,
+ `yyvs': related to semantic values,
+ `yyls': related to locations.
- int yylen;
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss = yyssa;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ YYSTYPE *yyvsp;
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Starting parse\n");
-#endif
+
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+
+ YYSIZE_T yystacksize = YYINITDEPTH;
+
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
@@ -2799,718 +3722,741 @@
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
- yyssp = yyss - 1;
+ yyssp = yyss;
yyvsp = yyvs;
-#ifdef YYLSP_NEEDED
- yylsp = yyls;
-#endif
-/* Push a new state, which is found in yystate . */
-/* In all cases, when you get here, the value and location stacks
- have just been pushed. so pushing a state here evens the stacks. */
-yynewstate:
+ goto yysetstate;
- *++yyssp = yystate;
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. So pushing a state here evens the stacks. */
+ yyssp++;
- if (yyssp >= yyss + yystacksize - 1)
- {
- /* Give user a chance to reallocate the stack */
- /* Use copies of these so that the &'s don't force the real ones into memory. */
- YYSTYPE *yyvs1 = yyvs;
- short *yyss1 = yyss;
-#ifdef YYLSP_NEEDED
- YYLTYPE *yyls1 = yyls;
-#endif
+ yysetstate:
+ *yyssp = yystate;
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
/* Get the current used size of the three stacks, in elements. */
- int size = yyssp - yyss + 1;
+ YYSIZE_T yysize = yyssp - yyss + 1;
#ifdef yyoverflow
- /* Each stack pointer address is followed by the size of
- the data in use in that stack, in bytes. */
-#ifdef YYLSP_NEEDED
- /* This used to be a conditional around just the two extra args,
- but that might be undefined if yyoverflow is a macro. */
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yyls1, size * sizeof (*yylsp),
- &yystacksize);
-#else
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yystacksize);
-#endif
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
- yyss = yyss1; yyvs = yyvs1;
-#ifdef YYLSP_NEEDED
- yyls = yyls1;
-#endif
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+# else
/* Extend the stack our own way. */
- if (yystacksize >= YYMAXDEPTH)
- {
- yyerror("parser stack overflow");
- if (yyfree_stacks)
- {
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
-#endif
- }
- return 2;
- }
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
yystacksize *= 2;
- if (yystacksize > YYMAXDEPTH)
+ if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
-#ifndef YYSTACK_USE_ALLOCA
- yyfree_stacks = 1;
-#endif
- yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
- __yy_memcpy ((char *)yyss, (char *)yyss1,
- size * (unsigned int) sizeof (*yyssp));
- yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
- __yy_memcpy ((char *)yyvs, (char *)yyvs1,
- size * (unsigned int) sizeof (*yyvsp));
-#ifdef YYLSP_NEEDED
- yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
- __yy_memcpy ((char *)yyls, (char *)yyls1,
- size * (unsigned int) sizeof (*yylsp));
-#endif
+
+ {
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss);
+ YYSTACK_RELOCATE (yyvs);
+
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
#endif /* no yyoverflow */
- yyssp = yyss + size - 1;
- yyvsp = yyvs + size - 1;
-#ifdef YYLSP_NEEDED
- yylsp = yyls + size - 1;
-#endif
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Stack size increased to %d\n", yystacksize);
-#endif
- if (yyssp >= yyss + yystacksize - 1)
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
YYABORT;
}
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Entering state %d\n", yystate);
-#endif
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
goto yybackup;
- yybackup:
-/* Do appropriate processing given the current state. */
-/* Read a lookahead token if we need one and don't already have one. */
-/* yyresume: */
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
- /* First try to decide what to do without reference to lookahead token. */
+ /* Do appropriate processing given the current state. Read a
+ look-ahead token if we need one and don't already have one. */
+ /* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate];
- if (yyn == YYFLAG)
+ if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a lookahead token if don't already have one. */
-
- /* yychar is either YYEMPTY or YYEOF
- or a valid token in external form. */
+ /* Not known => get a look-ahead token if don't already have one. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY)
{
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Reading a token: ");
-#endif
+ YYDPRINTF ((stderr, "Reading a token: "));
yychar = YYLEX;
}
- /* Convert token to internal form (in yychar1) for indexing tables with */
-
- if (yychar <= 0) /* This means end of input. */
+ if (yychar <= YYEOF)
{
- yychar1 = 0;
- yychar = YYEOF; /* Don't call YYLEX any more */
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Now at end of input.\n");
-#endif
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
}
else
{
- yychar1 = YYTRANSLATE(yychar);
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
- /* Give the individual parser a way to print the precise meaning
- of a token, for further debugging info. */
-#ifdef YYPRINT
- YYPRINT (stderr, yychar, yylval);
-#endif
- fprintf (stderr, ")\n");
- }
-#endif
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
}
- yyn += yychar1;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
goto yydefault;
-
yyn = yytable[yyn];
-
- /* yyn is what to do for this token type in this state.
- Negative => reduce, -yyn is rule number.
- Positive => shift, yyn is new state.
- New state is final state => don't bother to shift,
- just return success.
- 0, or most negative number => error. */
-
- if (yyn < 0)
+ if (yyn <= 0)
{
- if (yyn == YYFLAG)
+ if (yyn == 0 || yyn == YYTABLE_NINF)
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
- else if (yyn == 0)
- goto yyerrlab;
if (yyn == YYFINAL)
YYACCEPT;
- /* Shift the lookahead token. */
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
-#endif
+ /* Shift the look-ahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- /* Discard the token being shifted unless it is eof. */
+ /* Discard the shifted token unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY;
+ yystate = yyn;
*++yyvsp = yylval;
-#ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
-#endif
-
- /* count tokens shifted since error; after three, turn off error status. */
- if (yyerrstatus) yyerrstatus--;
- yystate = yyn;
goto yynewstate;
-/* Do the default action for the current state. */
-yydefault:
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
+ goto yyreduce;
+
-/* Do a reduction. yyn is the number of a rule to reduce with. */
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
yyreduce:
+ /* yyn is the number of a rule to reduce with. */
yylen = yyr2[yyn];
- if (yylen > 0)
- yyval = yyvsp[1-yylen]; /* implement default value of the action */
-#if YYDEBUG != 0
- if (yydebug)
+ /* If YYLEN is nonzero, implement the default value of the action:
+ `$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 3:
+#line 1595 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
{
- int i;
+ if ((yyvsp[(1) - (1)].UIntVal) > (uint32_t)INT32_MAX) // Outside of my range!
+ error("Value too large for type");
+ (yyval.SIntVal) = (int32_t)(yyvsp[(1) - (1)].UIntVal);
+ ;}
+ break;
- fprintf (stderr, "Reducing via rule %d (line %d), ",
- yyn, yyrline[yyn]);
+ case 5:
+#line 1604 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if ((yyvsp[(1) - (1)].UInt64Val) > (uint64_t)INT64_MAX) // Outside of my range!
+ error("Value too large for type");
+ (yyval.SInt64Val) = (int64_t)(yyvsp[(1) - (1)].UInt64Val);
+ ;}
+ break;
- /* Print the symbols being reduced, and their result. */
- for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
- fprintf (stderr, "%s ", yytname[yyrhs[i]]);
- fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
- }
-#endif
+ case 26:
+#line 1626 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.IPred) = ICmpInst::ICMP_EQ; ;}
+ break;
+ case 27:
+#line 1626 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.IPred) = ICmpInst::ICMP_NE; ;}
+ break;
- switch (yyn) {
+ case 28:
+#line 1627 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.IPred) = ICmpInst::ICMP_SLT; ;}
+ break;
-case 2:
-#line 1595 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (yyvsp[0].UIntVal > (uint32_t)INT32_MAX) // Outside of my range!
- error("Value too large for type");
- yyval.SIntVal = (int32_t)yyvsp[0].UIntVal;
- ;
- break;}
-case 4:
-#line 1604 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (yyvsp[0].UInt64Val > (uint64_t)INT64_MAX) // Outside of my range!
- error("Value too large for type");
- yyval.SInt64Val = (int64_t)yyvsp[0].UInt64Val;
- ;
- break;}
-case 25:
-#line 1626 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.IPred = ICmpInst::ICMP_EQ; ;
- break;}
-case 26:
-#line 1626 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.IPred = ICmpInst::ICMP_NE; ;
- break;}
-case 27:
-#line 1627 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.IPred = ICmpInst::ICMP_SLT; ;
- break;}
-case 28:
-#line 1627 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.IPred = ICmpInst::ICMP_SGT; ;
- break;}
-case 29:
-#line 1628 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.IPred = ICmpInst::ICMP_SLE; ;
- break;}
-case 30:
-#line 1628 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.IPred = ICmpInst::ICMP_SGE; ;
- break;}
-case 31:
-#line 1629 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.IPred = ICmpInst::ICMP_ULT; ;
- break;}
-case 32:
-#line 1629 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.IPred = ICmpInst::ICMP_UGT; ;
- break;}
-case 33:
-#line 1630 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.IPred = ICmpInst::ICMP_ULE; ;
- break;}
-case 34:
-#line 1630 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.IPred = ICmpInst::ICMP_UGE; ;
- break;}
-case 35:
-#line 1634 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_OEQ; ;
- break;}
-case 36:
-#line 1634 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_ONE; ;
- break;}
-case 37:
-#line 1635 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_OLT; ;
- break;}
-case 38:
-#line 1635 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_OGT; ;
- break;}
-case 39:
-#line 1636 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_OLE; ;
- break;}
-case 40:
-#line 1636 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_OGE; ;
- break;}
-case 41:
-#line 1637 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_ORD; ;
- break;}
-case 42:
-#line 1637 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_UNO; ;
- break;}
-case 43:
-#line 1638 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_UEQ; ;
- break;}
-case 44:
-#line 1638 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_UNE; ;
- break;}
-case 45:
-#line 1639 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_ULT; ;
- break;}
-case 46:
-#line 1639 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_UGT; ;
- break;}
-case 47:
-#line 1640 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_ULE; ;
- break;}
-case 48:
-#line 1640 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_UGE; ;
- break;}
-case 49:
-#line 1641 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_TRUE; ;
- break;}
-case 50:
-#line 1642 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.FPred = FCmpInst::FCMP_FALSE; ;
- break;}
-case 80:
-#line 1673 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.StrVal = yyvsp[-1].StrVal;
- ;
- break;}
-case 81:
-#line 1676 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.StrVal = 0;
- ;
- break;}
-case 82:
-#line 1681 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Linkage = GlobalValue::InternalLinkage; ;
- break;}
-case 83:
-#line 1682 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Linkage = GlobalValue::LinkOnceLinkage; ;
- break;}
-case 84:
-#line 1683 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Linkage = GlobalValue::WeakLinkage; ;
- break;}
-case 85:
-#line 1684 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Linkage = GlobalValue::AppendingLinkage; ;
- break;}
-case 86:
-#line 1685 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Linkage = GlobalValue::DLLImportLinkage; ;
- break;}
-case 87:
-#line 1686 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Linkage = GlobalValue::DLLExportLinkage; ;
- break;}
-case 88:
-#line 1687 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Linkage = GlobalValue::ExternalWeakLinkage; ;
- break;}
-case 89:
-#line 1688 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Linkage = GlobalValue::ExternalLinkage; ;
- break;}
-case 90:
-#line 1692 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.UIntVal = OldCallingConv::C; ;
- break;}
-case 91:
-#line 1693 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.UIntVal = OldCallingConv::C; ;
- break;}
-case 92:
-#line 1694 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.UIntVal = OldCallingConv::CSRet; ;
- break;}
-case 93:
-#line 1695 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.UIntVal = OldCallingConv::Fast; ;
- break;}
-case 94:
-#line 1696 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.UIntVal = OldCallingConv::Cold; ;
- break;}
-case 95:
-#line 1697 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.UIntVal = OldCallingConv::X86_StdCall; ;
- break;}
-case 96:
-#line 1698 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.UIntVal = OldCallingConv::X86_FastCall; ;
- break;}
-case 97:
-#line 1699 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if ((unsigned)yyvsp[0].UInt64Val != yyvsp[0].UInt64Val)
+ case 29:
+#line 1627 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.IPred) = ICmpInst::ICMP_SGT; ;}
+ break;
+
+ case 30:
+#line 1628 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.IPred) = ICmpInst::ICMP_SLE; ;}
+ break;
+
+ case 31:
+#line 1628 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.IPred) = ICmpInst::ICMP_SGE; ;}
+ break;
+
+ case 32:
+#line 1629 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.IPred) = ICmpInst::ICMP_ULT; ;}
+ break;
+
+ case 33:
+#line 1629 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.IPred) = ICmpInst::ICMP_UGT; ;}
+ break;
+
+ case 34:
+#line 1630 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.IPred) = ICmpInst::ICMP_ULE; ;}
+ break;
+
+ case 35:
+#line 1630 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.IPred) = ICmpInst::ICMP_UGE; ;}
+ break;
+
+ case 36:
+#line 1634 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_OEQ; ;}
+ break;
+
+ case 37:
+#line 1634 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_ONE; ;}
+ break;
+
+ case 38:
+#line 1635 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_OLT; ;}
+ break;
+
+ case 39:
+#line 1635 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_OGT; ;}
+ break;
+
+ case 40:
+#line 1636 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_OLE; ;}
+ break;
+
+ case 41:
+#line 1636 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_OGE; ;}
+ break;
+
+ case 42:
+#line 1637 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_ORD; ;}
+ break;
+
+ case 43:
+#line 1637 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_UNO; ;}
+ break;
+
+ case 44:
+#line 1638 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_UEQ; ;}
+ break;
+
+ case 45:
+#line 1638 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_UNE; ;}
+ break;
+
+ case 46:
+#line 1639 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_ULT; ;}
+ break;
+
+ case 47:
+#line 1639 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_UGT; ;}
+ break;
+
+ case 48:
+#line 1640 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_ULE; ;}
+ break;
+
+ case 49:
+#line 1640 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_UGE; ;}
+ break;
+
+ case 50:
+#line 1641 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_TRUE; ;}
+ break;
+
+ case 51:
+#line 1642 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.FPred) = FCmpInst::FCMP_FALSE; ;}
+ break;
+
+ case 81:
+#line 1673 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.StrVal) = (yyvsp[(1) - (2)].StrVal);
+ ;}
+ break;
+
+ case 82:
+#line 1676 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.StrVal) = 0;
+ ;}
+ break;
+
+ case 83:
+#line 1681 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Linkage) = GlobalValue::InternalLinkage; ;}
+ break;
+
+ case 84:
+#line 1682 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;}
+ break;
+
+ case 85:
+#line 1683 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Linkage) = GlobalValue::WeakLinkage; ;}
+ break;
+
+ case 86:
+#line 1684 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;}
+ break;
+
+ case 87:
+#line 1685 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;}
+ break;
+
+ case 88:
+#line 1686 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;}
+ break;
+
+ case 89:
+#line 1687 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;}
+ break;
+
+ case 90:
+#line 1688 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
+ break;
+
+ case 91:
+#line 1692 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.UIntVal) = OldCallingConv::C; ;}
+ break;
+
+ case 92:
+#line 1693 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.UIntVal) = OldCallingConv::C; ;}
+ break;
+
+ case 93:
+#line 1694 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.UIntVal) = OldCallingConv::CSRet; ;}
+ break;
+
+ case 94:
+#line 1695 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.UIntVal) = OldCallingConv::Fast; ;}
+ break;
+
+ case 95:
+#line 1696 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.UIntVal) = OldCallingConv::Cold; ;}
+ break;
+
+ case 96:
+#line 1697 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.UIntVal) = OldCallingConv::X86_StdCall; ;}
+ break;
+
+ case 97:
+#line 1698 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.UIntVal) = OldCallingConv::X86_FastCall; ;}
+ break;
+
+ case 98:
+#line 1699 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if ((unsigned)(yyvsp[(2) - (2)].UInt64Val) != (yyvsp[(2) - (2)].UInt64Val))
error("Calling conv too large");
- yyval.UIntVal = yyvsp[0].UInt64Val;
- ;
- break;}
-case 98:
-#line 1709 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.UIntVal = 0; ;
- break;}
-case 99:
-#line 1710 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.UIntVal = yyvsp[0].UInt64Val;
- if (yyval.UIntVal != 0 && !isPowerOf2_32(yyval.UIntVal))
+ (yyval.UIntVal) = (yyvsp[(2) - (2)].UInt64Val);
+ ;}
+ break;
+
+ case 99:
+#line 1709 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.UIntVal) = 0; ;}
+ break;
+
+ case 100:
+#line 1710 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.UIntVal) = (yyvsp[(2) - (2)].UInt64Val);
+ if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal)))
error("Alignment must be a power of two");
- ;
- break;}
-case 100:
-#line 1718 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.UIntVal = 0; ;
- break;}
-case 101:
-#line 1719 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.UIntVal = yyvsp[0].UInt64Val;
- if (yyval.UIntVal != 0 && !isPowerOf2_32(yyval.UIntVal))
+ ;}
+ break;
+
+ case 101:
+#line 1718 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.UIntVal) = 0; ;}
+ break;
+
+ case 102:
+#line 1719 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.UIntVal) = (yyvsp[(3) - (3)].UInt64Val);
+ if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal)))
error("Alignment must be a power of two");
- ;
- break;}
-case 102:
-#line 1727 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- for (unsigned i = 0, e = strlen(yyvsp[0].StrVal); i != e; ++i)
- if (yyvsp[0].StrVal[i] == '"' || yyvsp[0].StrVal[i] == '\\')
+ ;}
+ break;
+
+ case 103:
+#line 1727 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ for (unsigned i = 0, e = strlen((yyvsp[(2) - (2)].StrVal)); i != e; ++i)
+ if ((yyvsp[(2) - (2)].StrVal)[i] == '"' || (yyvsp[(2) - (2)].StrVal)[i] == '\\')
error("Invalid character in section name");
- yyval.StrVal = yyvsp[0].StrVal;
- ;
- break;}
-case 103:
-#line 1736 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.StrVal = 0; ;
- break;}
-case 104:
-#line 1737 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.StrVal = yyvsp[0].StrVal; ;
- break;}
-case 105:
-#line 1744 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{;
- break;}
-case 106:
-#line 1745 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{;
- break;}
-case 107:
-#line 1749 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- CurGV->setSection(yyvsp[0].StrVal);
- free(yyvsp[0].StrVal);
- ;
- break;}
-case 108:
-#line 1753 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (yyvsp[0].UInt64Val != 0 && !isPowerOf2_32(yyvsp[0].UInt64Val))
+ (yyval.StrVal) = (yyvsp[(2) - (2)].StrVal);
+ ;}
+ break;
+
+ case 104:
+#line 1736 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.StrVal) = 0; ;}
+ break;
+
+ case 105:
+#line 1737 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.StrVal) = (yyvsp[(1) - (1)].StrVal); ;}
+ break;
+
+ case 106:
+#line 1744 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {;}
+ break;
+
+ case 107:
+#line 1745 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {;}
+ break;
+
+ case 108:
+#line 1749 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ CurGV->setSection((yyvsp[(1) - (1)].StrVal));
+ free((yyvsp[(1) - (1)].StrVal));
+ ;}
+ break;
+
+ case 109:
+#line 1753 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if ((yyvsp[(2) - (2)].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[(2) - (2)].UInt64Val)))
error("Alignment must be a power of two");
- CurGV->setAlignment(yyvsp[0].UInt64Val);
+ CurGV->setAlignment((yyvsp[(2) - (2)].UInt64Val));
- ;
- break;}
-case 110:
-#line 1770 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.TypeVal.PAT = new PATypeHolder(yyvsp[0].PrimType.T);
- yyval.TypeVal.S = Signless;
- ;
- break;}
-case 112:
-#line 1778 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.TypeVal.PAT = new PATypeHolder(yyvsp[0].PrimType.T);
- yyval.TypeVal.S = Signless;
- ;
- break;}
-case 113:
-#line 1785 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ ;}
+ break;
+
+ case 111:
+#line 1770 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.TypeVal).PAT = new PATypeHolder((yyvsp[(1) - (1)].PrimType).T);
+ (yyval.TypeVal).S = Signless;
+ ;}
+ break;
+
+ case 113:
+#line 1778 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.TypeVal).PAT = new PATypeHolder((yyvsp[(1) - (1)].PrimType).T);
+ (yyval.TypeVal).S = Signless;
+ ;}
+ break;
+
+ case 114:
+#line 1785 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
if (!UpRefs.empty())
- error("Invalid upreference in type: " + (*yyvsp[0].TypeVal.PAT)->getDescription());
- yyval.TypeVal = yyvsp[0].TypeVal;
- ;
- break;}
-case 126:
-#line 1799 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.TypeVal.PAT = new PATypeHolder(yyvsp[0].PrimType.T);
- yyval.TypeVal.S = yyvsp[0].PrimType.S;
- ;
- break;}
-case 127:
-#line 1803 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.TypeVal.PAT = new PATypeHolder(OpaqueType::get());
- yyval.TypeVal.S = Signless;
- ;
- break;}
-case 128:
-#line 1807 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Named types are also simple types...
- const Type* tmp = getType(yyvsp[0].ValIDVal);
- yyval.TypeVal.PAT = new PATypeHolder(tmp);
- yyval.TypeVal.S = Signless; // FIXME: what if its signed?
- ;
- break;}
-case 129:
-#line 1812 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Type UpReference
- if (yyvsp[0].UInt64Val > (uint64_t)~0U)
+ error("Invalid upreference in type: " + (*(yyvsp[(1) - (1)].TypeVal).PAT)->getDescription());
+ (yyval.TypeVal) = (yyvsp[(1) - (1)].TypeVal);
+ ;}
+ break;
+
+ case 127:
+#line 1799 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.TypeVal).PAT = new PATypeHolder((yyvsp[(1) - (1)].PrimType).T);
+ (yyval.TypeVal).S = (yyvsp[(1) - (1)].PrimType).S;
+ ;}
+ break;
+
+ case 128:
+#line 1803 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.TypeVal).PAT = new PATypeHolder(OpaqueType::get());
+ (yyval.TypeVal).S = Signless;
+ ;}
+ break;
+
+ case 129:
+#line 1807 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Named types are also simple types...
+ const Type* tmp = getType((yyvsp[(1) - (1)].ValIDVal));
+ (yyval.TypeVal).PAT = new PATypeHolder(tmp);
+ (yyval.TypeVal).S = Signless; // FIXME: what if its signed?
+ ;}
+ break;
+
+ case 130:
+#line 1812 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Type UpReference
+ if ((yyvsp[(2) - (2)].UInt64Val) > (uint64_t)~0U)
error("Value out of range");
OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder
- UpRefs.push_back(UpRefRecord((unsigned)yyvsp[0].UInt64Val, OT)); // Add to vector...
- yyval.TypeVal.PAT = new PATypeHolder(OT);
- yyval.TypeVal.S = Signless;
+ UpRefs.push_back(UpRefRecord((unsigned)(yyvsp[(2) - (2)].UInt64Val), OT)); // Add to vector...
+ (yyval.TypeVal).PAT = new PATypeHolder(OT);
+ (yyval.TypeVal).S = Signless;
UR_OUT("New Upreference!\n");
- ;
- break;}
-case 130:
-#line 1821 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Function derived type?
+ ;}
+ break;
+
+ case 131:
+#line 1821 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Function derived type?
std::vector<const Type*> Params;
- for (std::list<llvm::PATypeInfo>::iterator I = yyvsp[-1].TypeList->begin(),
- E = yyvsp[-1].TypeList->end(); I != E; ++I) {
+ for (std::list<llvm::PATypeInfo>::iterator I = (yyvsp[(3) - (4)].TypeList)->begin(),
+ E = (yyvsp[(3) - (4)].TypeList)->end(); I != E; ++I) {
Params.push_back(I->PAT->get());
}
FunctionType::ParamAttrsList ParamAttrs;
bool isVarArg = Params.size() && Params.back() == Type::VoidTy;
if (isVarArg) Params.pop_back();
- yyval.TypeVal.PAT = new PATypeHolder(
- HandleUpRefs(FunctionType::get(yyvsp[-3].TypeVal.PAT->get(), Params, isVarArg,
+ (yyval.TypeVal).PAT = new PATypeHolder(
+ HandleUpRefs(FunctionType::get((yyvsp[(1) - (4)].TypeVal).PAT->get(), Params, isVarArg,
ParamAttrs)));
- yyval.TypeVal.S = yyvsp[-3].TypeVal.S;
- delete yyvsp[-3].TypeVal.PAT; // Delete the return type handle
- delete yyvsp[-1].TypeList; // Delete the argument list
- ;
- break;}
-case 131:
-#line 1838 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Sized array type?
- yyval.TypeVal.PAT = new PATypeHolder(HandleUpRefs(ArrayType::get(yyvsp[-1].TypeVal.PAT->get(),
- (unsigned)yyvsp[-3].UInt64Val)));
- yyval.TypeVal.S = yyvsp[-1].TypeVal.S;
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 132:
-#line 1844 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Packed array type?
- const llvm::Type* ElemTy = yyvsp[-1].TypeVal.PAT->get();
- if ((unsigned)yyvsp[-3].UInt64Val != yyvsp[-3].UInt64Val)
+ (yyval.TypeVal).S = (yyvsp[(1) - (4)].TypeVal).S;
+ delete (yyvsp[(1) - (4)].TypeVal).PAT; // Delete the return type handle
+ delete (yyvsp[(3) - (4)].TypeList); // Delete the argument list
+ ;}
+ break;
+
+ case 132:
+#line 1838 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Sized array type?
+ (yyval.TypeVal).PAT = new PATypeHolder(HandleUpRefs(ArrayType::get((yyvsp[(4) - (5)].TypeVal).PAT->get(),
+ (unsigned)(yyvsp[(2) - (5)].UInt64Val))));
+ (yyval.TypeVal).S = (yyvsp[(4) - (5)].TypeVal).S;
+ delete (yyvsp[(4) - (5)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 133:
+#line 1844 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Packed array type?
+ const llvm::Type* ElemTy = (yyvsp[(4) - (5)].TypeVal).PAT->get();
+ if ((unsigned)(yyvsp[(2) - (5)].UInt64Val) != (yyvsp[(2) - (5)].UInt64Val))
error("Unsigned result not equal to signed result");
if (!(ElemTy->isInteger() || ElemTy->isFloatingPoint()))
error("Elements of a PackedType must be integer or floating point");
- if (!isPowerOf2_32(yyvsp[-3].UInt64Val))
+ if (!isPowerOf2_32((yyvsp[(2) - (5)].UInt64Val)))
error("PackedType length should be a power of 2");
- yyval.TypeVal.PAT = new PATypeHolder(HandleUpRefs(PackedType::get(ElemTy,
- (unsigned)yyvsp[-3].UInt64Val)));
- yyval.TypeVal.S = yyvsp[-1].TypeVal.S;
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 133:
-#line 1857 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Structure type?
+ (yyval.TypeVal).PAT = new PATypeHolder(HandleUpRefs(PackedType::get(ElemTy,
+ (unsigned)(yyvsp[(2) - (5)].UInt64Val))));
+ (yyval.TypeVal).S = (yyvsp[(4) - (5)].TypeVal).S;
+ delete (yyvsp[(4) - (5)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 134:
+#line 1857 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Structure type?
std::vector<const Type*> Elements;
- for (std::list<llvm::PATypeInfo>::iterator I = yyvsp[-1].TypeList->begin(),
- E = yyvsp[-1].TypeList->end(); I != E; ++I)
+ for (std::list<llvm::PATypeInfo>::iterator I = (yyvsp[(2) - (3)].TypeList)->begin(),
+ E = (yyvsp[(2) - (3)].TypeList)->end(); I != E; ++I)
Elements.push_back(I->PAT->get());
- yyval.TypeVal.PAT = new PATypeHolder(HandleUpRefs(StructType::get(Elements)));
- yyval.TypeVal.S = Signless;
- delete yyvsp[-1].TypeList;
- ;
- break;}
-case 134:
-#line 1866 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Empty structure type?
- yyval.TypeVal.PAT = new PATypeHolder(StructType::get(std::vector<const Type*>()));
- yyval.TypeVal.S = Signless;
- ;
- break;}
-case 135:
-#line 1870 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Packed Structure type?
+ (yyval.TypeVal).PAT = new PATypeHolder(HandleUpRefs(StructType::get(Elements)));
+ (yyval.TypeVal).S = Signless;
+ delete (yyvsp[(2) - (3)].TypeList);
+ ;}
+ break;
+
+ case 135:
+#line 1866 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Empty structure type?
+ (yyval.TypeVal).PAT = new PATypeHolder(StructType::get(std::vector<const Type*>()));
+ (yyval.TypeVal).S = Signless;
+ ;}
+ break;
+
+ case 136:
+#line 1870 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Packed Structure type?
std::vector<const Type*> Elements;
- for (std::list<llvm::PATypeInfo>::iterator I = yyvsp[-2].TypeList->begin(),
- E = yyvsp[-2].TypeList->end(); I != E; ++I) {
+ for (std::list<llvm::PATypeInfo>::iterator I = (yyvsp[(3) - (5)].TypeList)->begin(),
+ E = (yyvsp[(3) - (5)].TypeList)->end(); I != E; ++I) {
Elements.push_back(I->PAT->get());
delete I->PAT;
}
- yyval.TypeVal.PAT = new PATypeHolder(HandleUpRefs(StructType::get(Elements, true)));
- yyval.TypeVal.S = Signless;
- delete yyvsp[-2].TypeList;
- ;
- break;}
-case 136:
-#line 1881 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Empty packed structure type?
- yyval.TypeVal.PAT = new PATypeHolder(StructType::get(std::vector<const Type*>(),true));
- yyval.TypeVal.S = Signless;
- ;
- break;}
-case 137:
-#line 1885 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Pointer type?
- if (yyvsp[-1].TypeVal.PAT->get() == Type::LabelTy)
+ (yyval.TypeVal).PAT = new PATypeHolder(HandleUpRefs(StructType::get(Elements, true)));
+ (yyval.TypeVal).S = Signless;
+ delete (yyvsp[(3) - (5)].TypeList);
+ ;}
+ break;
+
+ case 137:
+#line 1881 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Empty packed structure type?
+ (yyval.TypeVal).PAT = new PATypeHolder(StructType::get(std::vector<const Type*>(),true));
+ (yyval.TypeVal).S = Signless;
+ ;}
+ break;
+
+ case 138:
+#line 1885 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Pointer type?
+ if ((yyvsp[(1) - (2)].TypeVal).PAT->get() == Type::LabelTy)
error("Cannot form a pointer to a basic block");
- yyval.TypeVal.PAT = new PATypeHolder(HandleUpRefs(PointerType::get(yyvsp[-1].TypeVal.PAT->get())));
- yyval.TypeVal.S = yyvsp[-1].TypeVal.S;
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 138:
-#line 1898 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.TypeList = new std::list<PATypeInfo>();
- yyval.TypeList->push_back(yyvsp[0].TypeVal);
- ;
- break;}
-case 139:
-#line 1902 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- (yyval.TypeList=yyvsp[-2].TypeList)->push_back(yyvsp[0].TypeVal);
- ;
- break;}
-case 141:
-#line 1910 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ (yyval.TypeVal).PAT = new PATypeHolder(HandleUpRefs(PointerType::get((yyvsp[(1) - (2)].TypeVal).PAT->get())));
+ (yyval.TypeVal).S = (yyvsp[(1) - (2)].TypeVal).S;
+ delete (yyvsp[(1) - (2)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 139:
+#line 1898 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.TypeList) = new std::list<PATypeInfo>();
+ (yyval.TypeList)->push_back((yyvsp[(1) - (1)].TypeVal));
+ ;}
+ break;
+
+ case 140:
+#line 1902 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ ((yyval.TypeList)=(yyvsp[(1) - (3)].TypeList))->push_back((yyvsp[(3) - (3)].TypeVal));
+ ;}
+ break;
+
+ case 142:
+#line 1910 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
PATypeInfo VoidTI;
VoidTI.PAT = new PATypeHolder(Type::VoidTy);
VoidTI.S = Signless;
- (yyval.TypeList=yyvsp[-2].TypeList)->push_back(VoidTI);
- ;
- break;}
-case 142:
-#line 1916 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.TypeList = new std::list<PATypeInfo>();
+ ((yyval.TypeList)=(yyvsp[(1) - (3)].TypeList))->push_back(VoidTI);
+ ;}
+ break;
+
+ case 143:
+#line 1916 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.TypeList) = new std::list<PATypeInfo>();
PATypeInfo VoidTI;
VoidTI.PAT = new PATypeHolder(Type::VoidTy);
VoidTI.S = Signless;
- yyval.TypeList->push_back(VoidTI);
- ;
- break;}
-case 143:
-#line 1923 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.TypeList = new std::list<PATypeInfo>();
- ;
- break;}
-case 144:
-#line 1935 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Nonempty unsized arr
- const ArrayType *ATy = dyn_cast<ArrayType>(yyvsp[-3].TypeVal.PAT->get());
+ (yyval.TypeList)->push_back(VoidTI);
+ ;}
+ break;
+
+ case 144:
+#line 1923 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.TypeList) = new std::list<PATypeInfo>();
+ ;}
+ break;
+
+ case 145:
+#line 1935 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Nonempty unsized arr
+ const ArrayType *ATy = dyn_cast<ArrayType>((yyvsp[(1) - (4)].TypeVal).PAT->get());
if (ATy == 0)
error("Cannot make array constant with type: '" +
- yyvsp[-3].TypeVal.PAT->get()->getDescription() + "'");
+ (yyvsp[(1) - (4)].TypeVal).PAT->get()->getDescription() + "'");
const Type *ETy = ATy->getElementType();
int NumElements = ATy->getNumElements();
// Verify that we have the correct size...
- if (NumElements != -1 && NumElements != (int)yyvsp[-1].ConstVector->size())
+ if (NumElements != -1 && NumElements != (int)(yyvsp[(3) - (4)].ConstVector)->size())
error("Type mismatch: constant sized array initialized with " +
- utostr(yyvsp[-1].ConstVector->size()) + " arguments, but has size of " +
+ utostr((yyvsp[(3) - (4)].ConstVector)->size()) + " arguments, but has size of " +
itostr(NumElements) + "");
// Verify all elements are correct type!
std::vector<Constant*> Elems;
- for (unsigned i = 0; i < yyvsp[-1].ConstVector->size(); i++) {
- Constant *C = (*yyvsp[-1].ConstVector)[i].C;
+ for (unsigned i = 0; i < (yyvsp[(3) - (4)].ConstVector)->size(); i++) {
+ Constant *C = (*(yyvsp[(3) - (4)].ConstVector))[i].C;
const Type* ValTy = C->getType();
if (ETy != ValTy)
error("Element #" + utostr(i) + " is not of type '" +
@@ -3518,72 +4464,75 @@
ValTy->getDescription() + "'");
Elems.push_back(C);
}
- yyval.ConstVal.C = ConstantArray::get(ATy, Elems);
- yyval.ConstVal.S = yyvsp[-3].TypeVal.S;
- delete yyvsp[-3].TypeVal.PAT;
- delete yyvsp[-1].ConstVector;
- ;
- break;}
-case 145:
-#line 1965 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const ArrayType *ATy = dyn_cast<ArrayType>(yyvsp[-2].TypeVal.PAT->get());
+ (yyval.ConstVal).C = ConstantArray::get(ATy, Elems);
+ (yyval.ConstVal).S = (yyvsp[(1) - (4)].TypeVal).S;
+ delete (yyvsp[(1) - (4)].TypeVal).PAT;
+ delete (yyvsp[(3) - (4)].ConstVector);
+ ;}
+ break;
+
+ case 146:
+#line 1965 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const ArrayType *ATy = dyn_cast<ArrayType>((yyvsp[(1) - (3)].TypeVal).PAT->get());
if (ATy == 0)
error("Cannot make array constant with type: '" +
- yyvsp[-2].TypeVal.PAT->get()->getDescription() + "'");
+ (yyvsp[(1) - (3)].TypeVal).PAT->get()->getDescription() + "'");
int NumElements = ATy->getNumElements();
if (NumElements != -1 && NumElements != 0)
error("Type mismatch: constant sized array initialized with 0"
" arguments, but has size of " + itostr(NumElements) +"");
- yyval.ConstVal.C = ConstantArray::get(ATy, std::vector<Constant*>());
- yyval.ConstVal.S = yyvsp[-2].TypeVal.S;
- delete yyvsp[-2].TypeVal.PAT;
- ;
- break;}
-case 146:
-#line 1978 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const ArrayType *ATy = dyn_cast<ArrayType>(yyvsp[-2].TypeVal.PAT->get());
+ (yyval.ConstVal).C = ConstantArray::get(ATy, std::vector<Constant*>());
+ (yyval.ConstVal).S = (yyvsp[(1) - (3)].TypeVal).S;
+ delete (yyvsp[(1) - (3)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 147:
+#line 1978 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const ArrayType *ATy = dyn_cast<ArrayType>((yyvsp[(1) - (3)].TypeVal).PAT->get());
if (ATy == 0)
error("Cannot make array constant with type: '" +
- yyvsp[-2].TypeVal.PAT->get()->getDescription() + "'");
+ (yyvsp[(1) - (3)].TypeVal).PAT->get()->getDescription() + "'");
int NumElements = ATy->getNumElements();
const Type *ETy = dyn_cast<IntegerType>(ATy->getElementType());
if (!ETy || cast<IntegerType>(ETy)->getBitWidth() != 8)
error("String arrays require type i8, not '" + ETy->getDescription() +
"'");
- char *EndStr = UnEscapeLexed(yyvsp[0].StrVal, true);
- if (NumElements != -1 && NumElements != (EndStr-yyvsp[0].StrVal))
+ char *EndStr = UnEscapeLexed((yyvsp[(3) - (3)].StrVal), true);
+ if (NumElements != -1 && NumElements != (EndStr-(yyvsp[(3) - (3)].StrVal)))
error("Can't build string constant of size " +
- itostr((int)(EndStr-yyvsp[0].StrVal)) + " when array has size " +
+ itostr((int)(EndStr-(yyvsp[(3) - (3)].StrVal))) + " when array has size " +
itostr(NumElements) + "");
std::vector<Constant*> Vals;
- for (char *C = (char *)yyvsp[0].StrVal; C != (char *)EndStr; ++C)
+ for (char *C = (char *)(yyvsp[(3) - (3)].StrVal); C != (char *)EndStr; ++C)
Vals.push_back(ConstantInt::get(ETy, *C));
- free(yyvsp[0].StrVal);
- yyval.ConstVal.C = ConstantArray::get(ATy, Vals);
- yyval.ConstVal.S = yyvsp[-2].TypeVal.S;
- delete yyvsp[-2].TypeVal.PAT;
- ;
- break;}
-case 147:
-#line 2001 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Nonempty unsized arr
- const PackedType *PTy = dyn_cast<PackedType>(yyvsp[-3].TypeVal.PAT->get());
+ free((yyvsp[(3) - (3)].StrVal));
+ (yyval.ConstVal).C = ConstantArray::get(ATy, Vals);
+ (yyval.ConstVal).S = (yyvsp[(1) - (3)].TypeVal).S;
+ delete (yyvsp[(1) - (3)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 148:
+#line 2001 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Nonempty unsized arr
+ const PackedType *PTy = dyn_cast<PackedType>((yyvsp[(1) - (4)].TypeVal).PAT->get());
if (PTy == 0)
error("Cannot make packed constant with type: '" +
- yyvsp[-3].TypeVal.PAT->get()->getDescription() + "'");
+ (yyvsp[(1) - (4)].TypeVal).PAT->get()->getDescription() + "'");
const Type *ETy = PTy->getElementType();
int NumElements = PTy->getNumElements();
// Verify that we have the correct size...
- if (NumElements != -1 && NumElements != (int)yyvsp[-1].ConstVector->size())
+ if (NumElements != -1 && NumElements != (int)(yyvsp[(3) - (4)].ConstVector)->size())
error("Type mismatch: constant sized packed initialized with " +
- utostr(yyvsp[-1].ConstVector->size()) + " arguments, but has size of " +
+ utostr((yyvsp[(3) - (4)].ConstVector)->size()) + " arguments, but has size of " +
itostr(NumElements) + "");
// Verify all elements are correct type!
std::vector<Constant*> Elems;
- for (unsigned i = 0; i < yyvsp[-1].ConstVector->size(); i++) {
- Constant *C = (*yyvsp[-1].ConstVector)[i].C;
+ for (unsigned i = 0; i < (yyvsp[(3) - (4)].ConstVector)->size(); i++) {
+ Constant *C = (*(yyvsp[(3) - (4)].ConstVector))[i].C;
const Type* ValTy = C->getType();
if (ETy != ValTy)
error("Element #" + utostr(i) + " is not of type '" +
@@ -3591,117 +4540,124 @@
ValTy->getDescription() + "'");
Elems.push_back(C);
}
- yyval.ConstVal.C = ConstantPacked::get(PTy, Elems);
- yyval.ConstVal.S = yyvsp[-3].TypeVal.S;
- delete yyvsp[-3].TypeVal.PAT;
- delete yyvsp[-1].ConstVector;
- ;
- break;}
-case 148:
-#line 2029 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const StructType *STy = dyn_cast<StructType>(yyvsp[-3].TypeVal.PAT->get());
+ (yyval.ConstVal).C = ConstantPacked::get(PTy, Elems);
+ (yyval.ConstVal).S = (yyvsp[(1) - (4)].TypeVal).S;
+ delete (yyvsp[(1) - (4)].TypeVal).PAT;
+ delete (yyvsp[(3) - (4)].ConstVector);
+ ;}
+ break;
+
+ case 149:
+#line 2029 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const StructType *STy = dyn_cast<StructType>((yyvsp[(1) - (4)].TypeVal).PAT->get());
if (STy == 0)
error("Cannot make struct constant with type: '" +
- yyvsp[-3].TypeVal.PAT->get()->getDescription() + "'");
- if (yyvsp[-1].ConstVector->size() != STy->getNumContainedTypes())
+ (yyvsp[(1) - (4)].TypeVal).PAT->get()->getDescription() + "'");
+ if ((yyvsp[(3) - (4)].ConstVector)->size() != STy->getNumContainedTypes())
error("Illegal number of initializers for structure type");
// Check to ensure that constants are compatible with the type initializer!
std::vector<Constant*> Fields;
- for (unsigned i = 0, e = yyvsp[-1].ConstVector->size(); i != e; ++i) {
- Constant *C = (*yyvsp[-1].ConstVector)[i].C;
+ for (unsigned i = 0, e = (yyvsp[(3) - (4)].ConstVector)->size(); i != e; ++i) {
+ Constant *C = (*(yyvsp[(3) - (4)].ConstVector))[i].C;
if (C->getType() != STy->getElementType(i))
error("Expected type '" + STy->getElementType(i)->getDescription() +
"' for element #" + utostr(i) + " of structure initializer");
Fields.push_back(C);
}
- yyval.ConstVal.C = ConstantStruct::get(STy, Fields);
- yyval.ConstVal.S = yyvsp[-3].TypeVal.S;
- delete yyvsp[-3].TypeVal.PAT;
- delete yyvsp[-1].ConstVector;
- ;
- break;}
-case 149:
-#line 2051 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const StructType *STy = dyn_cast<StructType>(yyvsp[-2].TypeVal.PAT->get());
+ (yyval.ConstVal).C = ConstantStruct::get(STy, Fields);
+ (yyval.ConstVal).S = (yyvsp[(1) - (4)].TypeVal).S;
+ delete (yyvsp[(1) - (4)].TypeVal).PAT;
+ delete (yyvsp[(3) - (4)].ConstVector);
+ ;}
+ break;
+
+ case 150:
+#line 2051 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const StructType *STy = dyn_cast<StructType>((yyvsp[(1) - (3)].TypeVal).PAT->get());
if (STy == 0)
error("Cannot make struct constant with type: '" +
- yyvsp[-2].TypeVal.PAT->get()->getDescription() + "'");
+ (yyvsp[(1) - (3)].TypeVal).PAT->get()->getDescription() + "'");
if (STy->getNumContainedTypes() != 0)
error("Illegal number of initializers for structure type");
- yyval.ConstVal.C = ConstantStruct::get(STy, std::vector<Constant*>());
- yyval.ConstVal.S = yyvsp[-2].TypeVal.S;
- delete yyvsp[-2].TypeVal.PAT;
- ;
- break;}
-case 150:
-#line 2062 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const StructType *STy = dyn_cast<StructType>(yyvsp[-5].TypeVal.PAT->get());
+ (yyval.ConstVal).C = ConstantStruct::get(STy, std::vector<Constant*>());
+ (yyval.ConstVal).S = (yyvsp[(1) - (3)].TypeVal).S;
+ delete (yyvsp[(1) - (3)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 151:
+#line 2062 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const StructType *STy = dyn_cast<StructType>((yyvsp[(1) - (6)].TypeVal).PAT->get());
if (STy == 0)
error("Cannot make packed struct constant with type: '" +
- yyvsp[-5].TypeVal.PAT->get()->getDescription() + "'");
- if (yyvsp[-2].ConstVector->size() != STy->getNumContainedTypes())
+ (yyvsp[(1) - (6)].TypeVal).PAT->get()->getDescription() + "'");
+ if ((yyvsp[(4) - (6)].ConstVector)->size() != STy->getNumContainedTypes())
error("Illegal number of initializers for packed structure type");
// Check to ensure that constants are compatible with the type initializer!
std::vector<Constant*> Fields;
- for (unsigned i = 0, e = yyvsp[-2].ConstVector->size(); i != e; ++i) {
- Constant *C = (*yyvsp[-2].ConstVector)[i].C;
+ for (unsigned i = 0, e = (yyvsp[(4) - (6)].ConstVector)->size(); i != e; ++i) {
+ Constant *C = (*(yyvsp[(4) - (6)].ConstVector))[i].C;
if (C->getType() != STy->getElementType(i))
error("Expected type '" + STy->getElementType(i)->getDescription() +
"' for element #" + utostr(i) + " of packed struct initializer");
Fields.push_back(C);
}
- yyval.ConstVal.C = ConstantStruct::get(STy, Fields);
- yyval.ConstVal.S = yyvsp[-5].TypeVal.S;
- delete yyvsp[-5].TypeVal.PAT;
- delete yyvsp[-2].ConstVector;
- ;
- break;}
-case 151:
-#line 2084 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const StructType *STy = dyn_cast<StructType>(yyvsp[-4].TypeVal.PAT->get());
+ (yyval.ConstVal).C = ConstantStruct::get(STy, Fields);
+ (yyval.ConstVal).S = (yyvsp[(1) - (6)].TypeVal).S;
+ delete (yyvsp[(1) - (6)].TypeVal).PAT;
+ delete (yyvsp[(4) - (6)].ConstVector);
+ ;}
+ break;
+
+ case 152:
+#line 2084 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const StructType *STy = dyn_cast<StructType>((yyvsp[(1) - (5)].TypeVal).PAT->get());
if (STy == 0)
error("Cannot make packed struct constant with type: '" +
- yyvsp[-4].TypeVal.PAT->get()->getDescription() + "'");
+ (yyvsp[(1) - (5)].TypeVal).PAT->get()->getDescription() + "'");
if (STy->getNumContainedTypes() != 0)
error("Illegal number of initializers for packed structure type");
- yyval.ConstVal.C = ConstantStruct::get(STy, std::vector<Constant*>());
- yyval.ConstVal.S = yyvsp[-4].TypeVal.S;
- delete yyvsp[-4].TypeVal.PAT;
- ;
- break;}
-case 152:
-#line 2095 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const PointerType *PTy = dyn_cast<PointerType>(yyvsp[-1].TypeVal.PAT->get());
+ (yyval.ConstVal).C = ConstantStruct::get(STy, std::vector<Constant*>());
+ (yyval.ConstVal).S = (yyvsp[(1) - (5)].TypeVal).S;
+ delete (yyvsp[(1) - (5)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 153:
+#line 2095 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const PointerType *PTy = dyn_cast<PointerType>((yyvsp[(1) - (2)].TypeVal).PAT->get());
if (PTy == 0)
error("Cannot make null pointer constant with type: '" +
- yyvsp[-1].TypeVal.PAT->get()->getDescription() + "'");
- yyval.ConstVal.C = ConstantPointerNull::get(PTy);
- yyval.ConstVal.S = yyvsp[-1].TypeVal.S;
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 153:
-#line 2104 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.ConstVal.C = UndefValue::get(yyvsp[-1].TypeVal.PAT->get());
- yyval.ConstVal.S = yyvsp[-1].TypeVal.S;
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 154:
-#line 2109 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const PointerType *Ty = dyn_cast<PointerType>(yyvsp[-1].TypeVal.PAT->get());
+ (yyvsp[(1) - (2)].TypeVal).PAT->get()->getDescription() + "'");
+ (yyval.ConstVal).C = ConstantPointerNull::get(PTy);
+ (yyval.ConstVal).S = (yyvsp[(1) - (2)].TypeVal).S;
+ delete (yyvsp[(1) - (2)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 154:
+#line 2104 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.ConstVal).C = UndefValue::get((yyvsp[(1) - (2)].TypeVal).PAT->get());
+ (yyval.ConstVal).S = (yyvsp[(1) - (2)].TypeVal).S;
+ delete (yyvsp[(1) - (2)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 155:
+#line 2109 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const PointerType *Ty = dyn_cast<PointerType>((yyvsp[(1) - (2)].TypeVal).PAT->get());
if (Ty == 0)
error("Global const reference must be a pointer type, not" +
- yyvsp[-1].TypeVal.PAT->get()->getDescription());
+ (yyvsp[(1) - (2)].TypeVal).PAT->get()->getDescription());
// ConstExprs can exist in the body of a function, thus creating
// GlobalValues whenever they refer to a variable. Because we are in
@@ -3712,7 +4668,7 @@
//
Function *SavedCurFn = CurFun.CurrentFunction;
CurFun.CurrentFunction = 0;
- Value *V = getExistingValue(Ty, yyvsp[0].ValIDVal);
+ Value *V = getExistingValue(Ty, (yyvsp[(2) - (2)].ValIDVal));
CurFun.CurrentFunction = SavedCurFn;
// If this is an initializer for a constant pointer, which is referencing a
@@ -3725,14 +4681,14 @@
// First check to see if the forward references value is already created!
PerModuleInfo::GlobalRefsType::iterator I =
- CurModule.GlobalRefs.find(std::make_pair(PT, yyvsp[0].ValIDVal));
+ CurModule.GlobalRefs.find(std::make_pair(PT, (yyvsp[(2) - (2)].ValIDVal)));
if (I != CurModule.GlobalRefs.end()) {
V = I->second; // Placeholder already exists, use it...
- yyvsp[0].ValIDVal.destroy();
+ (yyvsp[(2) - (2)].ValIDVal).destroy();
} else {
std::string Name;
- if (yyvsp[0].ValIDVal.Type == ValID::NameVal) Name = yyvsp[0].ValIDVal.Name;
+ if ((yyvsp[(2) - (2)].ValIDVal).Type == ValID::NameVal) Name = (yyvsp[(2) - (2)].ValIDVal).Name;
// Create the forward referenced global.
GlobalValue *GV;
@@ -3747,141 +4703,152 @@
}
// Keep track of the fact that we have a forward ref to recycle it
- CurModule.GlobalRefs.insert(std::make_pair(std::make_pair(PT, yyvsp[0].ValIDVal), GV));
+ CurModule.GlobalRefs.insert(std::make_pair(std::make_pair(PT, (yyvsp[(2) - (2)].ValIDVal)), GV));
V = GV;
}
}
- yyval.ConstVal.C = cast<GlobalValue>(V);
- yyval.ConstVal.S = yyvsp[-1].TypeVal.S;
- delete yyvsp[-1].TypeVal.PAT; // Free the type handle
- ;
- break;}
-case 155:
-#line 2167 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (yyvsp[-1].TypeVal.PAT->get() != yyvsp[0].ConstVal.C->getType())
+ (yyval.ConstVal).C = cast<GlobalValue>(V);
+ (yyval.ConstVal).S = (yyvsp[(1) - (2)].TypeVal).S;
+ delete (yyvsp[(1) - (2)].TypeVal).PAT; // Free the type handle
+ ;}
+ break;
+
+ case 156:
+#line 2167 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if ((yyvsp[(1) - (2)].TypeVal).PAT->get() != (yyvsp[(2) - (2)].ConstVal).C->getType())
error("Mismatched types for constant expression");
- yyval.ConstVal = yyvsp[0].ConstVal;
- yyval.ConstVal.S = yyvsp[-1].TypeVal.S;
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 156:
-#line 2174 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[-1].TypeVal.PAT->get();
+ (yyval.ConstVal) = (yyvsp[(2) - (2)].ConstVal);
+ (yyval.ConstVal).S = (yyvsp[(1) - (2)].TypeVal).S;
+ delete (yyvsp[(1) - (2)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 157:
+#line 2174 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[(1) - (2)].TypeVal).PAT->get();
if (isa<FunctionType>(Ty) || Ty == Type::LabelTy || isa<OpaqueType>(Ty))
error("Cannot create a null initialized value of this type");
- yyval.ConstVal.C = Constant::getNullValue(Ty);
- yyval.ConstVal.S = yyvsp[-1].TypeVal.S;
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 157:
-#line 2182 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // integral constants
- const Type *Ty = yyvsp[-1].PrimType.T;
- if (!ConstantInt::isValueValidForType(Ty, yyvsp[0].SInt64Val))
+ (yyval.ConstVal).C = Constant::getNullValue(Ty);
+ (yyval.ConstVal).S = (yyvsp[(1) - (2)].TypeVal).S;
+ delete (yyvsp[(1) - (2)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 158:
+#line 2182 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // integral constants
+ const Type *Ty = (yyvsp[(1) - (2)].PrimType).T;
+ if (!ConstantInt::isValueValidForType(Ty, (yyvsp[(2) - (2)].SInt64Val)))
error("Constant value doesn't fit in type");
- yyval.ConstVal.C = ConstantInt::get(Ty, yyvsp[0].SInt64Val);
- yyval.ConstVal.S = Signed;
- ;
- break;}
-case 158:
-#line 2189 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // integral constants
- const Type *Ty = yyvsp[-1].PrimType.T;
- if (!ConstantInt::isValueValidForType(Ty, yyvsp[0].UInt64Val))
+ (yyval.ConstVal).C = ConstantInt::get(Ty, (yyvsp[(2) - (2)].SInt64Val));
+ (yyval.ConstVal).S = Signed;
+ ;}
+ break;
+
+ case 159:
+#line 2189 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // integral constants
+ const Type *Ty = (yyvsp[(1) - (2)].PrimType).T;
+ if (!ConstantInt::isValueValidForType(Ty, (yyvsp[(2) - (2)].UInt64Val)))
error("Constant value doesn't fit in type");
- yyval.ConstVal.C = ConstantInt::get(Ty, yyvsp[0].UInt64Val);
- yyval.ConstVal.S = Unsigned;
- ;
- break;}
-case 159:
-#line 2196 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Boolean constants
- yyval.ConstVal.C = ConstantInt::get(Type::Int1Ty, true);
- yyval.ConstVal.S = Unsigned;
- ;
- break;}
-case 160:
-#line 2200 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Boolean constants
- yyval.ConstVal.C = ConstantInt::get(Type::Int1Ty, false);
- yyval.ConstVal.S = Unsigned;
- ;
- break;}
-case 161:
-#line 2204 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Float & Double constants
- if (!ConstantFP::isValueValidForType(yyvsp[-1].PrimType.T, yyvsp[0].FPVal))
+ (yyval.ConstVal).C = ConstantInt::get(Ty, (yyvsp[(2) - (2)].UInt64Val));
+ (yyval.ConstVal).S = Unsigned;
+ ;}
+ break;
+
+ case 160:
+#line 2196 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Boolean constants
+ (yyval.ConstVal).C = ConstantInt::get(Type::Int1Ty, true);
+ (yyval.ConstVal).S = Unsigned;
+ ;}
+ break;
+
+ case 161:
+#line 2200 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Boolean constants
+ (yyval.ConstVal).C = ConstantInt::get(Type::Int1Ty, false);
+ (yyval.ConstVal).S = Unsigned;
+ ;}
+ break;
+
+ case 162:
+#line 2204 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Float & Double constants
+ if (!ConstantFP::isValueValidForType((yyvsp[(1) - (2)].PrimType).T, (yyvsp[(2) - (2)].FPVal)))
error("Floating point constant invalid for type");
- yyval.ConstVal.C = ConstantFP::get(yyvsp[-1].PrimType.T, yyvsp[0].FPVal);
- yyval.ConstVal.S = Signless;
- ;
- break;}
-case 162:
-#line 2213 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type* SrcTy = yyvsp[-3].ConstVal.C->getType();
- const Type* DstTy = yyvsp[-1].TypeVal.PAT->get();
- Signedness SrcSign = yyvsp[-3].ConstVal.S;
- Signedness DstSign = yyvsp[-1].TypeVal.S;
+ (yyval.ConstVal).C = ConstantFP::get((yyvsp[(1) - (2)].PrimType).T, (yyvsp[(2) - (2)].FPVal));
+ (yyval.ConstVal).S = Signless;
+ ;}
+ break;
+
+ case 163:
+#line 2213 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type* SrcTy = (yyvsp[(3) - (6)].ConstVal).C->getType();
+ const Type* DstTy = (yyvsp[(5) - (6)].TypeVal).PAT->get();
+ Signedness SrcSign = (yyvsp[(3) - (6)].ConstVal).S;
+ Signedness DstSign = (yyvsp[(5) - (6)].TypeVal).S;
if (!SrcTy->isFirstClassType())
error("cast constant expression from a non-primitive type: '" +
SrcTy->getDescription() + "'");
if (!DstTy->isFirstClassType())
error("cast constant expression to a non-primitive type: '" +
DstTy->getDescription() + "'");
- yyval.ConstVal.C = cast<Constant>(getCast(yyvsp[-5].CastOpVal, yyvsp[-3].ConstVal.C, SrcSign, DstTy, DstSign));
- yyval.ConstVal.S = DstSign;
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 163:
-#line 2228 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[-2].ConstVal.C->getType();
+ (yyval.ConstVal).C = cast<Constant>(getCast((yyvsp[(1) - (6)].CastOpVal), (yyvsp[(3) - (6)].ConstVal).C, SrcSign, DstTy, DstSign));
+ (yyval.ConstVal).S = DstSign;
+ delete (yyvsp[(5) - (6)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 164:
+#line 2228 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[(3) - (5)].ConstVal).C->getType();
if (!isa<PointerType>(Ty))
error("GetElementPtr requires a pointer operand");
std::vector<Value*> VIndices;
std::vector<Constant*> CIndices;
- upgradeGEPIndices(yyvsp[-2].ConstVal.C->getType(), yyvsp[-1].ValueList, VIndices, &CIndices);
+ upgradeGEPIndices((yyvsp[(3) - (5)].ConstVal).C->getType(), (yyvsp[(4) - (5)].ValueList), VIndices, &CIndices);
- delete yyvsp[-1].ValueList;
- yyval.ConstVal.C = ConstantExpr::getGetElementPtr(yyvsp[-2].ConstVal.C, CIndices);
- yyval.ConstVal.S = Signless;
- ;
- break;}
-case 164:
-#line 2241 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (!yyvsp[-5].ConstVal.C->getType()->isInteger() ||
- cast<IntegerType>(yyvsp[-5].ConstVal.C->getType())->getBitWidth() != 1)
+ delete (yyvsp[(4) - (5)].ValueList);
+ (yyval.ConstVal).C = ConstantExpr::getGetElementPtr((yyvsp[(3) - (5)].ConstVal).C, CIndices);
+ (yyval.ConstVal).S = Signless;
+ ;}
+ break;
+
+ case 165:
+#line 2241 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if (!(yyvsp[(3) - (8)].ConstVal).C->getType()->isInteger() ||
+ cast<IntegerType>((yyvsp[(3) - (8)].ConstVal).C->getType())->getBitWidth() != 1)
error("Select condition must be bool type");
- if (yyvsp[-3].ConstVal.C->getType() != yyvsp[-1].ConstVal.C->getType())
+ if ((yyvsp[(5) - (8)].ConstVal).C->getType() != (yyvsp[(7) - (8)].ConstVal).C->getType())
error("Select operand types must match");
- yyval.ConstVal.C = ConstantExpr::getSelect(yyvsp[-5].ConstVal.C, yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C);
- yyval.ConstVal.S = Unsigned;
- ;
- break;}
-case 165:
-#line 2250 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[-3].ConstVal.C->getType();
- if (Ty != yyvsp[-1].ConstVal.C->getType())
+ (yyval.ConstVal).C = ConstantExpr::getSelect((yyvsp[(3) - (8)].ConstVal).C, (yyvsp[(5) - (8)].ConstVal).C, (yyvsp[(7) - (8)].ConstVal).C);
+ (yyval.ConstVal).S = Unsigned;
+ ;}
+ break;
+
+ case 166:
+#line 2250 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[(3) - (6)].ConstVal).C->getType();
+ if (Ty != (yyvsp[(5) - (6)].ConstVal).C->getType())
error("Binary operator types must match");
// First, make sure we're dealing with the right opcode by upgrading from
// obsolete versions.
- Instruction::BinaryOps Opcode = getBinaryOp(yyvsp[-5].BinaryOpVal, Ty, yyvsp[-3].ConstVal.S);
+ Instruction::BinaryOps Opcode = getBinaryOp((yyvsp[(1) - (6)].BinaryOpVal), Ty, (yyvsp[(3) - (6)].ConstVal).S);
// HACK: llvm 1.3 and earlier used to emit invalid pointer constant exprs.
// To retain backward compatibility with these early compilers, we emit a
// cast to the appropriate integer type automatically if we are in the
// broken case. See PR424 for more information.
if (!isa<PointerType>(Ty)) {
- yyval.ConstVal.C = ConstantExpr::get(Opcode, yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C);
+ (yyval.ConstVal).C = ConstantExpr::get(Opcode, (yyvsp[(3) - (6)].ConstVal).C, (yyvsp[(5) - (6)].ConstVal).C);
} else {
const Type *IntPtrTy = 0;
switch (CurModule.CurrentModule->getPointerSize()) {
@@ -3889,147 +4856,165 @@
case Module::Pointer64: IntPtrTy = Type::Int64Ty; break;
default: error("invalid pointer binary constant expr");
}
- yyval.ConstVal.C = ConstantExpr::get(Opcode,
- ConstantExpr::getCast(Instruction::PtrToInt, yyvsp[-3].ConstVal.C, IntPtrTy),
- ConstantExpr::getCast(Instruction::PtrToInt, yyvsp[-1].ConstVal.C, IntPtrTy));
- yyval.ConstVal.C = ConstantExpr::getCast(Instruction::IntToPtr, yyval.ConstVal.C, Ty);
- }
- yyval.ConstVal.S = yyvsp[-3].ConstVal.S;
- ;
- break;}
-case 166:
-#line 2278 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type* Ty = yyvsp[-3].ConstVal.C->getType();
- if (Ty != yyvsp[-1].ConstVal.C->getType())
+ (yyval.ConstVal).C = ConstantExpr::get(Opcode,
+ ConstantExpr::getCast(Instruction::PtrToInt, (yyvsp[(3) - (6)].ConstVal).C, IntPtrTy),
+ ConstantExpr::getCast(Instruction::PtrToInt, (yyvsp[(5) - (6)].ConstVal).C, IntPtrTy));
+ (yyval.ConstVal).C = ConstantExpr::getCast(Instruction::IntToPtr, (yyval.ConstVal).C, Ty);
+ }
+ (yyval.ConstVal).S = (yyvsp[(3) - (6)].ConstVal).S;
+ ;}
+ break;
+
+ case 167:
+#line 2278 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type* Ty = (yyvsp[(3) - (6)].ConstVal).C->getType();
+ if (Ty != (yyvsp[(5) - (6)].ConstVal).C->getType())
error("Logical operator types must match");
if (!Ty->isInteger()) {
if (!isa<PackedType>(Ty) ||
!cast<PackedType>(Ty)->getElementType()->isInteger())
error("Logical operator requires integer operands");
}
- Instruction::BinaryOps Opcode = getBinaryOp(yyvsp[-5].BinaryOpVal, Ty, yyvsp[-3].ConstVal.S);
- yyval.ConstVal.C = ConstantExpr::get(Opcode, yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C);
- yyval.ConstVal.S = yyvsp[-3].ConstVal.S;
- ;
- break;}
-case 167:
-#line 2291 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type* Ty = yyvsp[-3].ConstVal.C->getType();
- if (Ty != yyvsp[-1].ConstVal.C->getType())
+ Instruction::BinaryOps Opcode = getBinaryOp((yyvsp[(1) - (6)].BinaryOpVal), Ty, (yyvsp[(3) - (6)].ConstVal).S);
+ (yyval.ConstVal).C = ConstantExpr::get(Opcode, (yyvsp[(3) - (6)].ConstVal).C, (yyvsp[(5) - (6)].ConstVal).C);
+ (yyval.ConstVal).S = (yyvsp[(3) - (6)].ConstVal).S;
+ ;}
+ break;
+
+ case 168:
+#line 2291 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type* Ty = (yyvsp[(3) - (6)].ConstVal).C->getType();
+ if (Ty != (yyvsp[(5) - (6)].ConstVal).C->getType())
error("setcc operand types must match");
unsigned short pred;
- Instruction::OtherOps Opcode = getCompareOp(yyvsp[-5].BinaryOpVal, pred, Ty, yyvsp[-3].ConstVal.S);
- yyval.ConstVal.C = ConstantExpr::getCompare(Opcode, yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C);
- yyval.ConstVal.S = Unsigned;
- ;
- break;}
-case 168:
-#line 2300 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (yyvsp[-3].ConstVal.C->getType() != yyvsp[-1].ConstVal.C->getType())
+ Instruction::OtherOps Opcode = getCompareOp((yyvsp[(1) - (6)].BinaryOpVal), pred, Ty, (yyvsp[(3) - (6)].ConstVal).S);
+ (yyval.ConstVal).C = ConstantExpr::getCompare(Opcode, (yyvsp[(3) - (6)].ConstVal).C, (yyvsp[(5) - (6)].ConstVal).C);
+ (yyval.ConstVal).S = Unsigned;
+ ;}
+ break;
+
+ case 169:
+#line 2300 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if ((yyvsp[(4) - (7)].ConstVal).C->getType() != (yyvsp[(6) - (7)].ConstVal).C->getType())
error("icmp operand types must match");
- yyval.ConstVal.C = ConstantExpr::getCompare(yyvsp[-5].IPred, yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C);
- yyval.ConstVal.S = Unsigned;
- ;
- break;}
-case 169:
-#line 2306 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (yyvsp[-3].ConstVal.C->getType() != yyvsp[-1].ConstVal.C->getType())
+ (yyval.ConstVal).C = ConstantExpr::getCompare((yyvsp[(2) - (7)].IPred), (yyvsp[(4) - (7)].ConstVal).C, (yyvsp[(6) - (7)].ConstVal).C);
+ (yyval.ConstVal).S = Unsigned;
+ ;}
+ break;
+
+ case 170:
+#line 2306 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if ((yyvsp[(4) - (7)].ConstVal).C->getType() != (yyvsp[(6) - (7)].ConstVal).C->getType())
error("fcmp operand types must match");
- yyval.ConstVal.C = ConstantExpr::getCompare(yyvsp[-5].FPred, yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C);
- yyval.ConstVal.S = Unsigned;
- ;
- break;}
-case 170:
-#line 2312 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (!yyvsp[-1].ConstVal.C->getType()->isInteger() ||
- cast<IntegerType>(yyvsp[-1].ConstVal.C->getType())->getBitWidth() != 8)
+ (yyval.ConstVal).C = ConstantExpr::getCompare((yyvsp[(2) - (7)].FPred), (yyvsp[(4) - (7)].ConstVal).C, (yyvsp[(6) - (7)].ConstVal).C);
+ (yyval.ConstVal).S = Unsigned;
+ ;}
+ break;
+
+ case 171:
+#line 2312 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if (!(yyvsp[(5) - (6)].ConstVal).C->getType()->isInteger() ||
+ cast<IntegerType>((yyvsp[(5) - (6)].ConstVal).C->getType())->getBitWidth() != 8)
error("Shift count for shift constant must be unsigned byte");
- const Type* Ty = yyvsp[-3].ConstVal.C->getType();
- if (!yyvsp[-3].ConstVal.C->getType()->isInteger())
+ const Type* Ty = (yyvsp[(3) - (6)].ConstVal).C->getType();
+ if (!(yyvsp[(3) - (6)].ConstVal).C->getType()->isInteger())
error("Shift constant expression requires integer operand");
- Constant *ShiftAmt = ConstantExpr::getZExt(yyvsp[-1].ConstVal.C, Ty);
- yyval.ConstVal.C = ConstantExpr::get(getBinaryOp(yyvsp[-5].BinaryOpVal, Ty, yyvsp[-3].ConstVal.S), yyvsp[-3].ConstVal.C, ShiftAmt);
- yyval.ConstVal.S = yyvsp[-3].ConstVal.S;
- ;
- break;}
-case 171:
-#line 2323 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (!ExtractElementInst::isValidOperands(yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C))
+ Constant *ShiftAmt = ConstantExpr::getZExt((yyvsp[(5) - (6)].ConstVal).C, Ty);
+ (yyval.ConstVal).C = ConstantExpr::get(getBinaryOp((yyvsp[(1) - (6)].BinaryOpVal), Ty, (yyvsp[(3) - (6)].ConstVal).S), (yyvsp[(3) - (6)].ConstVal).C, ShiftAmt);
+ (yyval.ConstVal).S = (yyvsp[(3) - (6)].ConstVal).S;
+ ;}
+ break;
+
+ case 172:
+#line 2323 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if (!ExtractElementInst::isValidOperands((yyvsp[(3) - (6)].ConstVal).C, (yyvsp[(5) - (6)].ConstVal).C))
error("Invalid extractelement operands");
- yyval.ConstVal.C = ConstantExpr::getExtractElement(yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C);
- yyval.ConstVal.S = yyvsp[-3].ConstVal.S;
- ;
- break;}
-case 172:
-#line 2329 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (!InsertElementInst::isValidOperands(yyvsp[-5].ConstVal.C, yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C))
+ (yyval.ConstVal).C = ConstantExpr::getExtractElement((yyvsp[(3) - (6)].ConstVal).C, (yyvsp[(5) - (6)].ConstVal).C);
+ (yyval.ConstVal).S = (yyvsp[(3) - (6)].ConstVal).S;
+ ;}
+ break;
+
+ case 173:
+#line 2329 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if (!InsertElementInst::isValidOperands((yyvsp[(3) - (8)].ConstVal).C, (yyvsp[(5) - (8)].ConstVal).C, (yyvsp[(7) - (8)].ConstVal).C))
error("Invalid insertelement operands");
- yyval.ConstVal.C = ConstantExpr::getInsertElement(yyvsp[-5].ConstVal.C, yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C);
- yyval.ConstVal.S = yyvsp[-5].ConstVal.S;
- ;
- break;}
-case 173:
-#line 2335 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (!ShuffleVectorInst::isValidOperands(yyvsp[-5].ConstVal.C, yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C))
+ (yyval.ConstVal).C = ConstantExpr::getInsertElement((yyvsp[(3) - (8)].ConstVal).C, (yyvsp[(5) - (8)].ConstVal).C, (yyvsp[(7) - (8)].ConstVal).C);
+ (yyval.ConstVal).S = (yyvsp[(3) - (8)].ConstVal).S;
+ ;}
+ break;
+
+ case 174:
+#line 2335 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if (!ShuffleVectorInst::isValidOperands((yyvsp[(3) - (8)].ConstVal).C, (yyvsp[(5) - (8)].ConstVal).C, (yyvsp[(7) - (8)].ConstVal).C))
error("Invalid shufflevector operands");
- yyval.ConstVal.C = ConstantExpr::getShuffleVector(yyvsp[-5].ConstVal.C, yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C);
- yyval.ConstVal.S = yyvsp[-5].ConstVal.S;
- ;
- break;}
-case 174:
-#line 2346 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ (yyval.ConstVector = yyvsp[-2].ConstVector)->push_back(yyvsp[0].ConstVal); ;
- break;}
-case 175:
-#line 2347 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.ConstVector = new std::vector<ConstInfo>();
- yyval.ConstVector->push_back(yyvsp[0].ConstVal);
- ;
- break;}
-case 176:
-#line 2356 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.BoolVal = false; ;
- break;}
-case 177:
-#line 2357 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.BoolVal = true; ;
- break;}
-case 178:
-#line 2369 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.ModuleVal = ParserResult = yyvsp[0].ModuleVal;
+ (yyval.ConstVal).C = ConstantExpr::getShuffleVector((yyvsp[(3) - (8)].ConstVal).C, (yyvsp[(5) - (8)].ConstVal).C, (yyvsp[(7) - (8)].ConstVal).C);
+ (yyval.ConstVal).S = (yyvsp[(3) - (8)].ConstVal).S;
+ ;}
+ break;
+
+ case 175:
+#line 2346 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { ((yyval.ConstVector) = (yyvsp[(1) - (3)].ConstVector))->push_back((yyvsp[(3) - (3)].ConstVal)); ;}
+ break;
+
+ case 176:
+#line 2347 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.ConstVector) = new std::vector<ConstInfo>();
+ (yyval.ConstVector)->push_back((yyvsp[(1) - (1)].ConstVal));
+ ;}
+ break;
+
+ case 177:
+#line 2356 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.BoolVal) = false; ;}
+ break;
+
+ case 178:
+#line 2357 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.BoolVal) = true; ;}
+ break;
+
+ case 179:
+#line 2369 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.ModuleVal) = ParserResult = (yyvsp[(1) - (1)].ModuleVal);
CurModule.ModuleDone();
- ;
- break;}
-case 179:
-#line 2378 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ModuleVal = yyvsp[-1].ModuleVal; CurFun.FunctionDone(); ;
- break;}
-case 180:
-#line 2379 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ModuleVal = yyvsp[-1].ModuleVal; ;
- break;}
-case 181:
-#line 2380 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ModuleVal = yyvsp[-3].ModuleVal; ;
- break;}
-case 182:
-#line 2381 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ModuleVal = yyvsp[-1].ModuleVal; ;
- break;}
-case 183:
-#line 2382 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.ModuleVal = CurModule.CurrentModule;
+ ;}
+ break;
+
+ case 180:
+#line 2378 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ModuleVal) = (yyvsp[(1) - (2)].ModuleVal); CurFun.FunctionDone(); ;}
+ break;
+
+ case 181:
+#line 2379 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ModuleVal) = (yyvsp[(1) - (2)].ModuleVal); ;}
+ break;
+
+ case 182:
+#line 2380 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ModuleVal) = (yyvsp[(1) - (4)].ModuleVal); ;}
+ break;
+
+ case 183:
+#line 2381 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ModuleVal) = (yyvsp[(1) - (2)].ModuleVal); ;}
+ break;
+
+ case 184:
+#line 2382 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.ModuleVal) = CurModule.CurrentModule;
// Emit an error if there are any unresolved types left.
if (!CurModule.LateResolveTypes.empty()) {
const ValID &DID = CurModule.LateResolveTypes.begin()->first;
@@ -4039,11 +5024,12 @@
error("Reference to an undefined type: #" + itostr(DID.Num));
}
}
- ;
- break;}
-case 184:
-#line 2398 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ ;}
+ break;
+
+ case 185:
+#line 2398 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
// Eagerly resolve types. This is not an optimization, this is a
// requirement that is due to the fact that we could have this:
//
@@ -4053,234 +5039,266 @@
// If types are not resolved eagerly, then the two types will not be
// determined to be the same type!
//
- const Type* Ty = yyvsp[0].TypeVal.PAT->get();
- ResolveTypeTo(yyvsp[-2].StrVal, Ty);
+ const Type* Ty = (yyvsp[(4) - (4)].TypeVal).PAT->get();
+ ResolveTypeTo((yyvsp[(2) - (4)].StrVal), Ty);
- if (!setTypeName(Ty, yyvsp[-2].StrVal) && !yyvsp[-2].StrVal) {
+ if (!setTypeName(Ty, (yyvsp[(2) - (4)].StrVal)) && !(yyvsp[(2) - (4)].StrVal)) {
// If this is a named type that is not a redefinition, add it to the slot
// table.
CurModule.Types.push_back(Ty);
}
- delete yyvsp[0].TypeVal.PAT;
- ;
- break;}
-case 185:
-#line 2418 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Function prototypes can be in const pool
- ;
- break;}
-case 186:
-#line 2420 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Asm blocks can be in the const pool
- ;
- break;}
-case 187:
-#line 2422 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (yyvsp[0].ConstVal.C == 0)
+ delete (yyvsp[(4) - (4)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 186:
+#line 2418 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Function prototypes can be in const pool
+ ;}
+ break;
+
+ case 187:
+#line 2420 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Asm blocks can be in the const pool
+ ;}
+ break;
+
+ case 188:
+#line 2422 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if ((yyvsp[(5) - (5)].ConstVal).C == 0)
error("Global value initializer is not a constant");
- CurGV = ParseGlobalVariable(yyvsp[-3].StrVal, yyvsp[-2].Linkage, yyvsp[-1].BoolVal, yyvsp[0].ConstVal.C->getType(), yyvsp[0].ConstVal.C);
- ;
- break;}
-case 188:
-#line 2426 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ CurGV = ParseGlobalVariable((yyvsp[(2) - (5)].StrVal), (yyvsp[(3) - (5)].Linkage), (yyvsp[(4) - (5)].BoolVal), (yyvsp[(5) - (5)].ConstVal).C->getType(), (yyvsp[(5) - (5)].ConstVal).C);
+ ;}
+ break;
+
+ case 189:
+#line 2426 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
CurGV = 0;
- ;
- break;}
-case 189:
-#line 2429 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[0].TypeVal.PAT->get();
- CurGV = ParseGlobalVariable(yyvsp[-3].StrVal, GlobalValue::ExternalLinkage, yyvsp[-1].BoolVal, Ty, 0);
- delete yyvsp[0].TypeVal.PAT;
- ;
- break;}
-case 190:
-#line 2433 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ ;}
+ break;
+
+ case 190:
+#line 2429 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[(5) - (5)].TypeVal).PAT->get();
+ CurGV = ParseGlobalVariable((yyvsp[(2) - (5)].StrVal), GlobalValue::ExternalLinkage, (yyvsp[(4) - (5)].BoolVal), Ty, 0);
+ delete (yyvsp[(5) - (5)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 191:
+#line 2433 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
CurGV = 0;
- ;
- break;}
-case 191:
-#line 2436 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[0].TypeVal.PAT->get();
- CurGV = ParseGlobalVariable(yyvsp[-3].StrVal, GlobalValue::DLLImportLinkage, yyvsp[-1].BoolVal, Ty, 0);
- delete yyvsp[0].TypeVal.PAT;
- ;
- break;}
-case 192:
-#line 2440 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ ;}
+ break;
+
+ case 192:
+#line 2436 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[(5) - (5)].TypeVal).PAT->get();
+ CurGV = ParseGlobalVariable((yyvsp[(2) - (5)].StrVal), GlobalValue::DLLImportLinkage, (yyvsp[(4) - (5)].BoolVal), Ty, 0);
+ delete (yyvsp[(5) - (5)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 193:
+#line 2440 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
CurGV = 0;
- ;
- break;}
-case 193:
-#line 2443 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[0].TypeVal.PAT->get();
+ ;}
+ break;
+
+ case 194:
+#line 2443 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[(5) - (5)].TypeVal).PAT->get();
CurGV =
- ParseGlobalVariable(yyvsp[-3].StrVal, GlobalValue::ExternalWeakLinkage, yyvsp[-1].BoolVal, Ty, 0);
- delete yyvsp[0].TypeVal.PAT;
- ;
- break;}
-case 194:
-#line 2448 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ ParseGlobalVariable((yyvsp[(2) - (5)].StrVal), GlobalValue::ExternalWeakLinkage, (yyvsp[(4) - (5)].BoolVal), Ty, 0);
+ delete (yyvsp[(5) - (5)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 195:
+#line 2448 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
CurGV = 0;
- ;
- break;}
-case 195:
-#line 2451 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- ;
- break;}
-case 196:
-#line 2453 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- ;
- break;}
-case 197:
-#line 2455 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- ;
- break;}
-case 198:
-#line 2460 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ ;}
+ break;
+
+ case 196:
+#line 2451 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ ;}
+ break;
+
+ case 197:
+#line 2453 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ ;}
+ break;
+
+ case 198:
+#line 2455 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ ;}
+ break;
+
+ case 199:
+#line 2460 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm();
- char *EndStr = UnEscapeLexed(yyvsp[0].StrVal, true);
- std::string NewAsm(yyvsp[0].StrVal, EndStr);
- free(yyvsp[0].StrVal);
+ char *EndStr = UnEscapeLexed((yyvsp[(1) - (1)].StrVal), true);
+ std::string NewAsm((yyvsp[(1) - (1)].StrVal), EndStr);
+ free((yyvsp[(1) - (1)].StrVal));
if (AsmSoFar.empty())
CurModule.CurrentModule->setModuleInlineAsm(NewAsm);
else
CurModule.CurrentModule->setModuleInlineAsm(AsmSoFar+"\n"+NewAsm);
- ;
- break;}
-case 199:
-#line 2474 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Endianness = Module::BigEndian; ;
- break;}
-case 200:
-#line 2475 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Endianness = Module::LittleEndian; ;
- break;}
-case 201:
-#line 2479 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- CurModule.setEndianness(yyvsp[0].Endianness);
- ;
- break;}
-case 202:
-#line 2482 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (yyvsp[0].UInt64Val == 32)
+ ;}
+ break;
+
+ case 200:
+#line 2474 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Endianness) = Module::BigEndian; ;}
+ break;
+
+ case 201:
+#line 2475 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Endianness) = Module::LittleEndian; ;}
+ break;
+
+ case 202:
+#line 2479 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ CurModule.setEndianness((yyvsp[(3) - (3)].Endianness));
+ ;}
+ break;
+
+ case 203:
+#line 2482 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if ((yyvsp[(3) - (3)].UInt64Val) == 32)
CurModule.setPointerSize(Module::Pointer32);
- else if (yyvsp[0].UInt64Val == 64)
+ else if ((yyvsp[(3) - (3)].UInt64Val) == 64)
CurModule.setPointerSize(Module::Pointer64);
else
- error("Invalid pointer size: '" + utostr(yyvsp[0].UInt64Val) + "'");
- ;
- break;}
-case 203:
-#line 2490 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- CurModule.CurrentModule->setTargetTriple(yyvsp[0].StrVal);
- free(yyvsp[0].StrVal);
- ;
- break;}
-case 204:
-#line 2494 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- CurModule.CurrentModule->setDataLayout(yyvsp[0].StrVal);
- free(yyvsp[0].StrVal);
- ;
- break;}
-case 206:
-#line 2505 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- CurModule.CurrentModule->addLibrary(yyvsp[0].StrVal);
- free(yyvsp[0].StrVal);
- ;
- break;}
-case 207:
-#line 2509 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- CurModule.CurrentModule->addLibrary(yyvsp[0].StrVal);
- free(yyvsp[0].StrVal);
- ;
- break;}
-case 208:
-#line 2513 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ ;
- break;}
-case 212:
-#line 2526 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.StrVal = 0; ;
- break;}
-case 213:
-#line 2530 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (yyvsp[-1].TypeVal.PAT->get() == Type::VoidTy)
+ error("Invalid pointer size: '" + utostr((yyvsp[(3) - (3)].UInt64Val)) + "'");
+ ;}
+ break;
+
+ case 204:
+#line 2490 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ CurModule.CurrentModule->setTargetTriple((yyvsp[(3) - (3)].StrVal));
+ free((yyvsp[(3) - (3)].StrVal));
+ ;}
+ break;
+
+ case 205:
+#line 2494 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ CurModule.CurrentModule->setDataLayout((yyvsp[(3) - (3)].StrVal));
+ free((yyvsp[(3) - (3)].StrVal));
+ ;}
+ break;
+
+ case 207:
+#line 2505 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ CurModule.CurrentModule->addLibrary((yyvsp[(3) - (3)].StrVal));
+ free((yyvsp[(3) - (3)].StrVal));
+ ;}
+ break;
+
+ case 208:
+#line 2509 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ CurModule.CurrentModule->addLibrary((yyvsp[(1) - (1)].StrVal));
+ free((yyvsp[(1) - (1)].StrVal));
+ ;}
+ break;
+
+ case 209:
+#line 2513 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { ;}
+ break;
+
+ case 213:
+#line 2526 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.StrVal) = 0; ;}
+ break;
+
+ case 214:
+#line 2530 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if ((yyvsp[(1) - (2)].TypeVal).PAT->get() == Type::VoidTy)
error("void typed arguments are invalid");
- yyval.ArgVal = new std::pair<PATypeInfo, char*>(yyvsp[-1].TypeVal, yyvsp[0].StrVal);
- ;
- break;}
-case 214:
-#line 2538 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.ArgList = yyvsp[-2].ArgList;
- yyval.ArgList->push_back(*yyvsp[0].ArgVal);
- delete yyvsp[0].ArgVal;
- ;
- break;}
-case 215:
-#line 2543 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.ArgList = new std::vector<std::pair<PATypeInfo,char*> >();
- yyval.ArgList->push_back(*yyvsp[0].ArgVal);
- delete yyvsp[0].ArgVal;
- ;
- break;}
-case 216:
-#line 2551 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ArgList = yyvsp[0].ArgList; ;
- break;}
-case 217:
-#line 2552 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.ArgList = yyvsp[-2].ArgList;
+ (yyval.ArgVal) = new std::pair<PATypeInfo, char*>((yyvsp[(1) - (2)].TypeVal), (yyvsp[(2) - (2)].StrVal));
+ ;}
+ break;
+
+ case 215:
+#line 2538 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.ArgList) = (yyvsp[(1) - (3)].ArgList);
+ (yyval.ArgList)->push_back(*(yyvsp[(3) - (3)].ArgVal));
+ delete (yyvsp[(3) - (3)].ArgVal);
+ ;}
+ break;
+
+ case 216:
+#line 2543 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.ArgList) = new std::vector<std::pair<PATypeInfo,char*> >();
+ (yyval.ArgList)->push_back(*(yyvsp[(1) - (1)].ArgVal));
+ delete (yyvsp[(1) - (1)].ArgVal);
+ ;}
+ break;
+
+ case 217:
+#line 2551 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ArgList) = (yyvsp[(1) - (1)].ArgList); ;}
+ break;
+
+ case 218:
+#line 2552 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.ArgList) = (yyvsp[(1) - (3)].ArgList);
PATypeInfo VoidTI;
VoidTI.PAT = new PATypeHolder(Type::VoidTy);
VoidTI.S = Signless;
- yyval.ArgList->push_back(std::pair<PATypeInfo, char*>(VoidTI, 0));
- ;
- break;}
-case 218:
-#line 2559 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.ArgList = new std::vector<std::pair<PATypeInfo,char*> >();
+ (yyval.ArgList)->push_back(std::pair<PATypeInfo, char*>(VoidTI, 0));
+ ;}
+ break;
+
+ case 219:
+#line 2559 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.ArgList) = new std::vector<std::pair<PATypeInfo,char*> >();
PATypeInfo VoidTI;
VoidTI.PAT = new PATypeHolder(Type::VoidTy);
VoidTI.S = Signless;
- yyval.ArgList->push_back(std::pair<PATypeInfo, char*>(VoidTI, 0));
- ;
- break;}
-case 219:
-#line 2566 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ArgList = 0; ;
- break;}
-case 220:
-#line 2570 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- UnEscapeLexed(yyvsp[-5].StrVal);
- std::string FunctionName(yyvsp[-5].StrVal);
- free(yyvsp[-5].StrVal); // Free strdup'd memory!
+ (yyval.ArgList)->push_back(std::pair<PATypeInfo, char*>(VoidTI, 0));
+ ;}
+ break;
+
+ case 220:
+#line 2566 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ArgList) = 0; ;}
+ break;
+
+ case 221:
+#line 2570 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ UnEscapeLexed((yyvsp[(3) - (8)].StrVal));
+ std::string FunctionName((yyvsp[(3) - (8)].StrVal));
+ free((yyvsp[(3) - (8)].StrVal)); // Free strdup'd memory!
- const Type* RetTy = yyvsp[-6].TypeVal.PAT->get();
+ const Type* RetTy = (yyvsp[(2) - (8)].TypeVal).PAT->get();
if (!RetTy->isFirstClassType() && RetTy != Type::VoidTy)
error("LLVM functions cannot return aggregate types");
@@ -4295,9 +5313,9 @@
} else if (FunctionName == "llvm.va_copy") {
ParamTyList.push_back(PointerType::get(Type::Int8Ty));
ParamTyList.push_back(PointerType::get(Type::Int8Ty));
- } else if (yyvsp[-3].ArgList) { // If there are arguments...
+ } else if ((yyvsp[(5) - (8)].ArgList)) { // If there are arguments...
for (std::vector<std::pair<PATypeInfo,char*> >::iterator
- I = yyvsp[-3].ArgList->begin(), E = yyvsp[-3].ArgList->end(); I != E; ++I) {
+ I = (yyvsp[(5) - (8)].ArgList)->begin(), E = (yyvsp[(5) - (8)].ArgList)->end(); I != E; ++I) {
const Type *Ty = I->first.PAT->get();
ParamTyList.push_back(Ty);
}
@@ -4310,7 +5328,7 @@
// Convert the CSRet calling convention into the corresponding parameter
// attribute.
FunctionType::ParamAttrsList ParamAttrs;
- if (yyvsp[-7].UIntVal == OldCallingConv::CSRet) {
+ if ((yyvsp[(1) - (8)].UIntVal) == OldCallingConv::CSRet) {
ParamAttrs.push_back(FunctionType::NoAttributeSet); // result
ParamAttrs.push_back(FunctionType::StructRetAttribute); // first arg
}
@@ -4318,7 +5336,7 @@
const FunctionType *FT = FunctionType::get(RetTy, ParamTyList, isVarArg,
ParamAttrs);
const PointerType *PFT = PointerType::get(FT);
- delete yyvsp[-6].TypeVal.PAT;
+ delete (yyvsp[(2) - (8)].TypeVal).PAT;
ValID ID;
if (!FunctionName.empty()) {
@@ -4421,131 +5439,150 @@
// argument to another function.
Fn->setLinkage(CurFun.Linkage);
}
- Fn->setCallingConv(upgradeCallingConv(yyvsp[-7].UIntVal));
- Fn->setAlignment(yyvsp[0].UIntVal);
- if (yyvsp[-1].StrVal) {
- Fn->setSection(yyvsp[-1].StrVal);
- free(yyvsp[-1].StrVal);
+ Fn->setCallingConv(upgradeCallingConv((yyvsp[(1) - (8)].UIntVal)));
+ Fn->setAlignment((yyvsp[(8) - (8)].UIntVal));
+ if ((yyvsp[(7) - (8)].StrVal)) {
+ Fn->setSection((yyvsp[(7) - (8)].StrVal));
+ free((yyvsp[(7) - (8)].StrVal));
}
// Add all of the arguments we parsed to the function...
- if (yyvsp[-3].ArgList) { // Is null if empty...
+ if ((yyvsp[(5) - (8)].ArgList)) { // Is null if empty...
if (isVarArg) { // Nuke the last entry
- assert(yyvsp[-3].ArgList->back().first.PAT->get() == Type::VoidTy &&
- yyvsp[-3].ArgList->back().second == 0 && "Not a varargs marker");
- delete yyvsp[-3].ArgList->back().first.PAT;
- yyvsp[-3].ArgList->pop_back(); // Delete the last entry
+ assert((yyvsp[(5) - (8)].ArgList)->back().first.PAT->get() == Type::VoidTy &&
+ (yyvsp[(5) - (8)].ArgList)->back().second == 0 && "Not a varargs marker");
+ delete (yyvsp[(5) - (8)].ArgList)->back().first.PAT;
+ (yyvsp[(5) - (8)].ArgList)->pop_back(); // Delete the last entry
}
Function::arg_iterator ArgIt = Fn->arg_begin();
Function::arg_iterator ArgEnd = Fn->arg_end();
- std::vector<std::pair<PATypeInfo,char*> >::iterator I = yyvsp[-3].ArgList->begin();
- std::vector<std::pair<PATypeInfo,char*> >::iterator E = yyvsp[-3].ArgList->end();
+ std::vector<std::pair<PATypeInfo,char*> >::iterator I = (yyvsp[(5) - (8)].ArgList)->begin();
+ std::vector<std::pair<PATypeInfo,char*> >::iterator E = (yyvsp[(5) - (8)].ArgList)->end();
for ( ; I != E && ArgIt != ArgEnd; ++I, ++ArgIt) {
delete I->first.PAT; // Delete the typeholder...
setValueName(ArgIt, I->second); // Insert arg into symtab...
InsertValue(ArgIt);
}
- delete yyvsp[-3].ArgList; // We're now done with the argument list
+ delete (yyvsp[(5) - (8)].ArgList); // We're now done with the argument list
}
- ;
- break;}
-case 223:
-#line 2750 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.FunctionVal = CurFun.CurrentFunction;
+ ;}
+ break;
+
+ case 224:
+#line 2750 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.FunctionVal) = CurFun.CurrentFunction;
// Make sure that we keep track of the linkage type even if there was a
// previous "declare".
- yyval.FunctionVal->setLinkage(yyvsp[-2].Linkage);
- ;
- break;}
-case 226:
-#line 2764 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.FunctionVal = yyvsp[-1].FunctionVal;
- ;
- break;}
-case 227:
-#line 2769 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Linkage = GlobalValue::ExternalLinkage; ;
- break;}
-case 228:
-#line 2770 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Linkage = GlobalValue::DLLImportLinkage; ;
- break;}
-case 229:
-#line 2771 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.Linkage = GlobalValue::ExternalWeakLinkage; ;
- break;}
-case 230:
-#line 2775 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ CurFun.isDeclare = true; ;
- break;}
-case 231:
-#line 2776 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ CurFun.Linkage = yyvsp[0].Linkage; ;
- break;}
-case 232:
-#line 2776 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.FunctionVal = CurFun.CurrentFunction;
+ (yyval.FunctionVal)->setLinkage((yyvsp[(1) - (3)].Linkage));
+ ;}
+ break;
+
+ case 227:
+#line 2764 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal);
+ ;}
+ break;
+
+ case 228:
+#line 2769 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;}
+ break;
+
+ case 229:
+#line 2770 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;}
+ break;
+
+ case 230:
+#line 2771 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;}
+ break;
+
+ case 231:
+#line 2775 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { CurFun.isDeclare = true; ;}
+ break;
+
+ case 232:
+#line 2776 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { CurFun.Linkage = (yyvsp[(3) - (3)].Linkage); ;}
+ break;
+
+ case 233:
+#line 2776 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.FunctionVal) = CurFun.CurrentFunction;
CurFun.FunctionDone();
- ;
- break;}
-case 233:
-#line 2788 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.BoolVal = false; ;
- break;}
-case 234:
-#line 2789 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.BoolVal = true; ;
- break;}
-case 235:
-#line 2794 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValIDVal = ValID::create(yyvsp[0].SInt64Val); ;
- break;}
-case 236:
-#line 2795 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValIDVal = ValID::create(yyvsp[0].UInt64Val); ;
- break;}
-case 237:
-#line 2796 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValIDVal = ValID::create(yyvsp[0].FPVal); ;
- break;}
-case 238:
-#line 2797 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValIDVal = ValID::create(ConstantInt::get(Type::Int1Ty, true)); ;
- break;}
-case 239:
-#line 2798 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValIDVal = ValID::create(ConstantInt::get(Type::Int1Ty, false)); ;
- break;}
-case 240:
-#line 2799 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValIDVal = ValID::createNull(); ;
- break;}
-case 241:
-#line 2800 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValIDVal = ValID::createUndef(); ;
- break;}
-case 242:
-#line 2801 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValIDVal = ValID::createZeroInit(); ;
- break;}
-case 243:
-#line 2802 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Nonempty unsized packed vector
- const Type *ETy = (*yyvsp[-1].ConstVector)[0].C->getType();
- int NumElements = yyvsp[-1].ConstVector->size();
+ ;}
+ break;
+
+ case 234:
+#line 2788 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.BoolVal) = false; ;}
+ break;
+
+ case 235:
+#line 2789 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.BoolVal) = true; ;}
+ break;
+
+ case 236:
+#line 2794 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].SInt64Val)); ;}
+ break;
+
+ case 237:
+#line 2795 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].UInt64Val)); ;}
+ break;
+
+ case 238:
+#line 2796 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].FPVal)); ;}
+ break;
+
+ case 239:
+#line 2797 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValIDVal) = ValID::create(ConstantInt::get(Type::Int1Ty, true)); ;}
+ break;
+
+ case 240:
+#line 2798 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValIDVal) = ValID::create(ConstantInt::get(Type::Int1Ty, false)); ;}
+ break;
+
+ case 241:
+#line 2799 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValIDVal) = ValID::createNull(); ;}
+ break;
+
+ case 242:
+#line 2800 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValIDVal) = ValID::createUndef(); ;}
+ break;
+
+ case 243:
+#line 2801 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValIDVal) = ValID::createZeroInit(); ;}
+ break;
+
+ case 244:
+#line 2802 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Nonempty unsized packed vector
+ const Type *ETy = (*(yyvsp[(2) - (3)].ConstVector))[0].C->getType();
+ int NumElements = (yyvsp[(2) - (3)].ConstVector)->size();
PackedType* pt = PackedType::get(ETy, NumElements);
PATypeHolder* PTy = new PATypeHolder(
HandleUpRefs(PackedType::get(ETy, NumElements)));
// Verify all elements are correct type!
std::vector<Constant*> Elems;
- for (unsigned i = 0; i < yyvsp[-1].ConstVector->size(); i++) {
- Constant *C = (*yyvsp[-1].ConstVector)[i].C;
+ for (unsigned i = 0; i < (yyvsp[(2) - (3)].ConstVector)->size(); i++) {
+ Constant *C = (*(yyvsp[(2) - (3)].ConstVector))[i].C;
const Type *CTy = C->getType();
if (ETy != CTy)
error("Element #" + utostr(i) + " is not of type '" +
@@ -4553,193 +5590,211 @@
CTy->getDescription() + "'");
Elems.push_back(C);
}
- yyval.ValIDVal = ValID::create(ConstantPacked::get(pt, Elems));
- delete PTy; delete yyvsp[-1].ConstVector;
- ;
- break;}
-case 244:
-#line 2823 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.ValIDVal = ValID::create(yyvsp[0].ConstVal.C);
- ;
- break;}
-case 245:
-#line 2826 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- char *End = UnEscapeLexed(yyvsp[-2].StrVal, true);
- std::string AsmStr = std::string(yyvsp[-2].StrVal, End);
- End = UnEscapeLexed(yyvsp[0].StrVal, true);
- std::string Constraints = std::string(yyvsp[0].StrVal, End);
- yyval.ValIDVal = ValID::createInlineAsm(AsmStr, Constraints, yyvsp[-3].BoolVal);
- free(yyvsp[-2].StrVal);
- free(yyvsp[0].StrVal);
- ;
- break;}
-case 246:
-#line 2841 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValIDVal = ValID::create(yyvsp[0].SIntVal); ;
- break;}
-case 247:
-#line 2842 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValIDVal = ValID::create(yyvsp[0].StrVal); ;
- break;}
-case 250:
-#line 2855 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[-1].TypeVal.PAT->get();
- yyval.ValueVal.S = yyvsp[-1].TypeVal.S;
- yyval.ValueVal.V = getVal(Ty, yyvsp[0].ValIDVal);
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 251:
-#line 2864 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.FunctionVal = yyvsp[-1].FunctionVal;
- ;
- break;}
-case 252:
-#line 2867 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Do not allow functions with 0 basic blocks
- yyval.FunctionVal = yyvsp[-1].FunctionVal;
- ;
- break;}
-case 253:
-#line 2876 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- setValueName(yyvsp[0].TermInstVal, yyvsp[-1].StrVal);
- InsertValue(yyvsp[0].TermInstVal);
- yyvsp[-2].BasicBlockVal->getInstList().push_back(yyvsp[0].TermInstVal);
- InsertValue(yyvsp[-2].BasicBlockVal);
- yyval.BasicBlockVal = yyvsp[-2].BasicBlockVal;
- ;
- break;}
-case 254:
-#line 2886 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (yyvsp[0].InstVal.I)
- yyvsp[-1].BasicBlockVal->getInstList().push_back(yyvsp[0].InstVal.I);
- yyval.BasicBlockVal = yyvsp[-1].BasicBlockVal;
- ;
- break;}
-case 255:
-#line 2891 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.BasicBlockVal = CurBB = getBBVal(ValID::create((int)CurFun.NextBBNum++), true);
+ (yyval.ValIDVal) = ValID::create(ConstantPacked::get(pt, Elems));
+ delete PTy; delete (yyvsp[(2) - (3)].ConstVector);
+ ;}
+ break;
+
+ case 245:
+#line 2823 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].ConstVal).C);
+ ;}
+ break;
+
+ case 246:
+#line 2826 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ char *End = UnEscapeLexed((yyvsp[(3) - (5)].StrVal), true);
+ std::string AsmStr = std::string((yyvsp[(3) - (5)].StrVal), End);
+ End = UnEscapeLexed((yyvsp[(5) - (5)].StrVal), true);
+ std::string Constraints = std::string((yyvsp[(5) - (5)].StrVal), End);
+ (yyval.ValIDVal) = ValID::createInlineAsm(AsmStr, Constraints, (yyvsp[(2) - (5)].BoolVal));
+ free((yyvsp[(3) - (5)].StrVal));
+ free((yyvsp[(5) - (5)].StrVal));
+ ;}
+ break;
+
+ case 247:
+#line 2841 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].SIntVal)); ;}
+ break;
+
+ case 248:
+#line 2842 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].StrVal)); ;}
+ break;
+
+ case 251:
+#line 2855 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[(1) - (2)].TypeVal).PAT->get();
+ (yyval.ValueVal).S = (yyvsp[(1) - (2)].TypeVal).S;
+ (yyval.ValueVal).V = getVal(Ty, (yyvsp[(2) - (2)].ValIDVal));
+ delete (yyvsp[(1) - (2)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 252:
+#line 2864 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal);
+ ;}
+ break;
+
+ case 253:
+#line 2867 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Do not allow functions with 0 basic blocks
+ (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal);
+ ;}
+ break;
+
+ case 254:
+#line 2876 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ setValueName((yyvsp[(3) - (3)].TermInstVal), (yyvsp[(2) - (3)].StrVal));
+ InsertValue((yyvsp[(3) - (3)].TermInstVal));
+ (yyvsp[(1) - (3)].BasicBlockVal)->getInstList().push_back((yyvsp[(3) - (3)].TermInstVal));
+ InsertValue((yyvsp[(1) - (3)].BasicBlockVal));
+ (yyval.BasicBlockVal) = (yyvsp[(1) - (3)].BasicBlockVal);
+ ;}
+ break;
+
+ case 255:
+#line 2886 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if ((yyvsp[(2) - (2)].InstVal).I)
+ (yyvsp[(1) - (2)].BasicBlockVal)->getInstList().push_back((yyvsp[(2) - (2)].InstVal).I);
+ (yyval.BasicBlockVal) = (yyvsp[(1) - (2)].BasicBlockVal);
+ ;}
+ break;
+
+ case 256:
+#line 2891 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((int)CurFun.NextBBNum++), true);
// Make sure to move the basic block to the correct location in the
// function, instead of leaving it inserted wherever it was first
// referenced.
Function::BasicBlockListType &BBL =
CurFun.CurrentFunction->getBasicBlockList();
- BBL.splice(BBL.end(), BBL, yyval.BasicBlockVal);
- ;
- break;}
-case 256:
-#line 2900 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.BasicBlockVal = CurBB = getBBVal(ValID::create(yyvsp[0].StrVal), true);
+ BBL.splice(BBL.end(), BBL, (yyval.BasicBlockVal));
+ ;}
+ break;
+
+ case 257:
+#line 2900 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((yyvsp[(1) - (1)].StrVal)), true);
// Make sure to move the basic block to the correct location in the
// function, instead of leaving it inserted wherever it was first
// referenced.
Function::BasicBlockListType &BBL =
CurFun.CurrentFunction->getBasicBlockList();
- BBL.splice(BBL.end(), BBL, yyval.BasicBlockVal);
- ;
- break;}
-case 259:
-#line 2914 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Return with a result...
- yyval.TermInstVal = new ReturnInst(yyvsp[0].ValueVal.V);
- ;
- break;}
-case 260:
-#line 2917 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Return with no result...
- yyval.TermInstVal = new ReturnInst();
- ;
- break;}
-case 261:
-#line 2920 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Unconditional Branch...
- BasicBlock* tmpBB = getBBVal(yyvsp[0].ValIDVal);
- yyval.TermInstVal = new BranchInst(tmpBB);
- ;
- break;}
-case 262:
-#line 2924 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- BasicBlock* tmpBBA = getBBVal(yyvsp[-3].ValIDVal);
- BasicBlock* tmpBBB = getBBVal(yyvsp[0].ValIDVal);
- Value* tmpVal = getVal(Type::Int1Ty, yyvsp[-6].ValIDVal);
- yyval.TermInstVal = new BranchInst(tmpBBA, tmpBBB, tmpVal);
- ;
- break;}
-case 263:
-#line 2930 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- Value* tmpVal = getVal(yyvsp[-7].PrimType.T, yyvsp[-6].ValIDVal);
- BasicBlock* tmpBB = getBBVal(yyvsp[-3].ValIDVal);
- SwitchInst *S = new SwitchInst(tmpVal, tmpBB, yyvsp[-1].JumpTable->size());
- yyval.TermInstVal = S;
- std::vector<std::pair<Constant*,BasicBlock*> >::iterator I = yyvsp[-1].JumpTable->begin(),
- E = yyvsp[-1].JumpTable->end();
+ BBL.splice(BBL.end(), BBL, (yyval.BasicBlockVal));
+ ;}
+ break;
+
+ case 260:
+#line 2914 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Return with a result...
+ (yyval.TermInstVal) = new ReturnInst((yyvsp[(2) - (2)].ValueVal).V);
+ ;}
+ break;
+
+ case 261:
+#line 2917 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Return with no result...
+ (yyval.TermInstVal) = new ReturnInst();
+ ;}
+ break;
+
+ case 262:
+#line 2920 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Unconditional Branch...
+ BasicBlock* tmpBB = getBBVal((yyvsp[(3) - (3)].ValIDVal));
+ (yyval.TermInstVal) = new BranchInst(tmpBB);
+ ;}
+ break;
+
+ case 263:
+#line 2924 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ BasicBlock* tmpBBA = getBBVal((yyvsp[(6) - (9)].ValIDVal));
+ BasicBlock* tmpBBB = getBBVal((yyvsp[(9) - (9)].ValIDVal));
+ Value* tmpVal = getVal(Type::Int1Ty, (yyvsp[(3) - (9)].ValIDVal));
+ (yyval.TermInstVal) = new BranchInst(tmpBBA, tmpBBB, tmpVal);
+ ;}
+ break;
+
+ case 264:
+#line 2930 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ Value* tmpVal = getVal((yyvsp[(2) - (9)].PrimType).T, (yyvsp[(3) - (9)].ValIDVal));
+ BasicBlock* tmpBB = getBBVal((yyvsp[(6) - (9)].ValIDVal));
+ SwitchInst *S = new SwitchInst(tmpVal, tmpBB, (yyvsp[(8) - (9)].JumpTable)->size());
+ (yyval.TermInstVal) = S;
+ std::vector<std::pair<Constant*,BasicBlock*> >::iterator I = (yyvsp[(8) - (9)].JumpTable)->begin(),
+ E = (yyvsp[(8) - (9)].JumpTable)->end();
for (; I != E; ++I) {
if (ConstantInt *CI = dyn_cast<ConstantInt>(I->first))
S->addCase(CI, I->second);
else
error("Switch case is constant, but not a simple integer");
}
- delete yyvsp[-1].JumpTable;
- ;
- break;}
-case 264:
-#line 2945 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- Value* tmpVal = getVal(yyvsp[-6].PrimType.T, yyvsp[-5].ValIDVal);
- BasicBlock* tmpBB = getBBVal(yyvsp[-2].ValIDVal);
+ delete (yyvsp[(8) - (9)].JumpTable);
+ ;}
+ break;
+
+ case 265:
+#line 2945 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ Value* tmpVal = getVal((yyvsp[(2) - (8)].PrimType).T, (yyvsp[(3) - (8)].ValIDVal));
+ BasicBlock* tmpBB = getBBVal((yyvsp[(6) - (8)].ValIDVal));
SwitchInst *S = new SwitchInst(tmpVal, tmpBB, 0);
- yyval.TermInstVal = S;
- ;
- break;}
-case 265:
-#line 2952 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ (yyval.TermInstVal) = S;
+ ;}
+ break;
+
+ case 266:
+#line 2952 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
const PointerType *PFTy;
const FunctionType *Ty;
- if (!(PFTy = dyn_cast<PointerType>(yyvsp[-10].TypeVal.PAT->get())) ||
+ if (!(PFTy = dyn_cast<PointerType>((yyvsp[(3) - (13)].TypeVal).PAT->get())) ||
!(Ty = dyn_cast<FunctionType>(PFTy->getElementType()))) {
// Pull out the types of all of the arguments...
std::vector<const Type*> ParamTypes;
- if (yyvsp[-7].ValueList) {
- for (std::vector<ValueInfo>::iterator I = yyvsp[-7].ValueList->begin(), E = yyvsp[-7].ValueList->end();
+ if ((yyvsp[(6) - (13)].ValueList)) {
+ for (std::vector<ValueInfo>::iterator I = (yyvsp[(6) - (13)].ValueList)->begin(), E = (yyvsp[(6) - (13)].ValueList)->end();
I != E; ++I)
ParamTypes.push_back((*I).V->getType());
}
FunctionType::ParamAttrsList ParamAttrs;
- if (yyvsp[-11].UIntVal == OldCallingConv::CSRet) {
+ if ((yyvsp[(2) - (13)].UIntVal) == OldCallingConv::CSRet) {
ParamAttrs.push_back(FunctionType::NoAttributeSet);
ParamAttrs.push_back(FunctionType::StructRetAttribute);
}
bool isVarArg = ParamTypes.size() && ParamTypes.back() == Type::VoidTy;
if (isVarArg) ParamTypes.pop_back();
- Ty = FunctionType::get(yyvsp[-10].TypeVal.PAT->get(), ParamTypes, isVarArg, ParamAttrs);
+ Ty = FunctionType::get((yyvsp[(3) - (13)].TypeVal).PAT->get(), ParamTypes, isVarArg, ParamAttrs);
PFTy = PointerType::get(Ty);
}
- Value *V = getVal(PFTy, yyvsp[-9].ValIDVal); // Get the function we're calling...
- BasicBlock *Normal = getBBVal(yyvsp[-3].ValIDVal);
- BasicBlock *Except = getBBVal(yyvsp[0].ValIDVal);
+ Value *V = getVal(PFTy, (yyvsp[(4) - (13)].ValIDVal)); // Get the function we're calling...
+ BasicBlock *Normal = getBBVal((yyvsp[(10) - (13)].ValIDVal));
+ BasicBlock *Except = getBBVal((yyvsp[(13) - (13)].ValIDVal));
// Create the call node...
- if (!yyvsp[-7].ValueList) { // Has no arguments?
- yyval.TermInstVal = new InvokeInst(V, Normal, Except, std::vector<Value*>());
+ if (!(yyvsp[(6) - (13)].ValueList)) { // Has no arguments?
+ (yyval.TermInstVal) = new InvokeInst(V, Normal, Except, std::vector<Value*>());
} else { // Has arguments?
// Loop through FunctionType's arguments and ensure they are specified
// correctly!
//
FunctionType::param_iterator I = Ty->param_begin();
FunctionType::param_iterator E = Ty->param_end();
- std::vector<ValueInfo>::iterator ArgI = yyvsp[-7].ValueList->begin(), ArgE = yyvsp[-7].ValueList->end();
+ std::vector<ValueInfo>::iterator ArgI = (yyvsp[(6) - (13)].ValueList)->begin(), ArgE = (yyvsp[(6) - (13)].ValueList)->end();
std::vector<Value*> Args;
for (; ArgI != ArgE && I != E; ++ArgI, ++I) {
@@ -4752,59 +5807,64 @@
if (I != E || (ArgI != ArgE && !Ty->isVarArg()))
error("Invalid number of parameters detected");
- yyval.TermInstVal = new InvokeInst(V, Normal, Except, Args);
+ (yyval.TermInstVal) = new InvokeInst(V, Normal, Except, Args);
}
- cast<InvokeInst>(yyval.TermInstVal)->setCallingConv(upgradeCallingConv(yyvsp[-11].UIntVal));
- delete yyvsp[-10].TypeVal.PAT;
- delete yyvsp[-7].ValueList;
- ;
- break;}
-case 266:
-#line 3007 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.TermInstVal = new UnwindInst();
- ;
- break;}
-case 267:
-#line 3010 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.TermInstVal = new UnreachableInst();
- ;
- break;}
-case 268:
-#line 3016 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.JumpTable = yyvsp[-5].JumpTable;
- Constant *V = cast<Constant>(getExistingValue(yyvsp[-4].PrimType.T, yyvsp[-3].ValIDVal));
+ cast<InvokeInst>((yyval.TermInstVal))->setCallingConv(upgradeCallingConv((yyvsp[(2) - (13)].UIntVal)));
+ delete (yyvsp[(3) - (13)].TypeVal).PAT;
+ delete (yyvsp[(6) - (13)].ValueList);
+ ;}
+ break;
+
+ case 267:
+#line 3007 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.TermInstVal) = new UnwindInst();
+ ;}
+ break;
+
+ case 268:
+#line 3010 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.TermInstVal) = new UnreachableInst();
+ ;}
+ break;
+
+ case 269:
+#line 3016 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.JumpTable) = (yyvsp[(1) - (6)].JumpTable);
+ Constant *V = cast<Constant>(getExistingValue((yyvsp[(2) - (6)].PrimType).T, (yyvsp[(3) - (6)].ValIDVal)));
if (V == 0)
error("May only switch on a constant pool value");
- BasicBlock* tmpBB = getBBVal(yyvsp[0].ValIDVal);
- yyval.JumpTable->push_back(std::make_pair(V, tmpBB));
- ;
- break;}
-case 269:
-#line 3026 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.JumpTable = new std::vector<std::pair<Constant*, BasicBlock*> >();
- Constant *V = cast<Constant>(getExistingValue(yyvsp[-4].PrimType.T, yyvsp[-3].ValIDVal));
+ BasicBlock* tmpBB = getBBVal((yyvsp[(6) - (6)].ValIDVal));
+ (yyval.JumpTable)->push_back(std::make_pair(V, tmpBB));
+ ;}
+ break;
+
+ case 270:
+#line 3026 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.JumpTable) = new std::vector<std::pair<Constant*, BasicBlock*> >();
+ Constant *V = cast<Constant>(getExistingValue((yyvsp[(1) - (5)].PrimType).T, (yyvsp[(2) - (5)].ValIDVal)));
if (V == 0)
error("May only switch on a constant pool value");
- BasicBlock* tmpBB = getBBVal(yyvsp[0].ValIDVal);
- yyval.JumpTable->push_back(std::make_pair(V, tmpBB));
- ;
- break;}
-case 270:
-#line 3039 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ BasicBlock* tmpBB = getBBVal((yyvsp[(5) - (5)].ValIDVal));
+ (yyval.JumpTable)->push_back(std::make_pair(V, tmpBB));
+ ;}
+ break;
+
+ case 271:
+#line 3039 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
bool omit = false;
- if (yyvsp[-1].StrVal)
- if (BitCastInst *BCI = dyn_cast<BitCastInst>(yyvsp[0].InstVal.I))
+ if ((yyvsp[(1) - (2)].StrVal))
+ if (BitCastInst *BCI = dyn_cast<BitCastInst>((yyvsp[(2) - (2)].InstVal).I))
if (BCI->getSrcTy() == BCI->getDestTy() &&
- BCI->getOperand(0)->getName() == yyvsp[-1].StrVal)
+ BCI->getOperand(0)->getName() == (yyvsp[(1) - (2)].StrVal))
// This is a useless bit cast causing a name redefinition. It is
// a bit cast from a type to the same type of an operand with the
// same name as the name we would give this instruction. Since this
@@ -4819,225 +5879,243 @@
// The bitcast is clearly useless so we omit it.
omit = true;
if (omit) {
- yyval.InstVal.I = 0;
- yyval.InstVal.S = Signless;
+ (yyval.InstVal).I = 0;
+ (yyval.InstVal).S = Signless;
} else {
- setValueName(yyvsp[0].InstVal.I, yyvsp[-1].StrVal);
- InsertValue(yyvsp[0].InstVal.I);
- yyval.InstVal = yyvsp[0].InstVal;
- }
- ;
- break;}
-case 271:
-#line 3068 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Used for PHI nodes
- yyval.PHIList.P = new std::list<std::pair<Value*, BasicBlock*> >();
- yyval.PHIList.S = yyvsp[-5].TypeVal.S;
- Value* tmpVal = getVal(yyvsp[-5].TypeVal.PAT->get(), yyvsp[-3].ValIDVal);
- BasicBlock* tmpBB = getBBVal(yyvsp[-1].ValIDVal);
- yyval.PHIList.P->push_back(std::make_pair(tmpVal, tmpBB));
- delete yyvsp[-5].TypeVal.PAT;
- ;
- break;}
-case 272:
-#line 3076 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.PHIList = yyvsp[-6].PHIList;
- Value* tmpVal = getVal(yyvsp[-6].PHIList.P->front().first->getType(), yyvsp[-3].ValIDVal);
- BasicBlock* tmpBB = getBBVal(yyvsp[-1].ValIDVal);
- yyvsp[-6].PHIList.P->push_back(std::make_pair(tmpVal, tmpBB));
- ;
- break;}
-case 273:
-#line 3084 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ // Used for call statements, and memory insts...
- yyval.ValueList = new std::vector<ValueInfo>();
- yyval.ValueList->push_back(yyvsp[0].ValueVal);
- ;
- break;}
-case 274:
-#line 3088 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.ValueList = yyvsp[-2].ValueList;
- yyvsp[-2].ValueList->push_back(yyvsp[0].ValueVal);
- ;
- break;}
-case 276:
-#line 3096 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValueList = 0; ;
- break;}
-case 277:
-#line 3100 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.BoolVal = true;
- ;
- break;}
-case 278:
-#line 3103 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.BoolVal = false;
- ;
- break;}
-case 279:
-#line 3109 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type* Ty = yyvsp[-3].TypeVal.PAT->get();
+ setValueName((yyvsp[(2) - (2)].InstVal).I, (yyvsp[(1) - (2)].StrVal));
+ InsertValue((yyvsp[(2) - (2)].InstVal).I);
+ (yyval.InstVal) = (yyvsp[(2) - (2)].InstVal);
+ }
+ ;}
+ break;
+
+ case 272:
+#line 3068 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Used for PHI nodes
+ (yyval.PHIList).P = new std::list<std::pair<Value*, BasicBlock*> >();
+ (yyval.PHIList).S = (yyvsp[(1) - (6)].TypeVal).S;
+ Value* tmpVal = getVal((yyvsp[(1) - (6)].TypeVal).PAT->get(), (yyvsp[(3) - (6)].ValIDVal));
+ BasicBlock* tmpBB = getBBVal((yyvsp[(5) - (6)].ValIDVal));
+ (yyval.PHIList).P->push_back(std::make_pair(tmpVal, tmpBB));
+ delete (yyvsp[(1) - (6)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 273:
+#line 3076 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.PHIList) = (yyvsp[(1) - (7)].PHIList);
+ Value* tmpVal = getVal((yyvsp[(1) - (7)].PHIList).P->front().first->getType(), (yyvsp[(4) - (7)].ValIDVal));
+ BasicBlock* tmpBB = getBBVal((yyvsp[(6) - (7)].ValIDVal));
+ (yyvsp[(1) - (7)].PHIList).P->push_back(std::make_pair(tmpVal, tmpBB));
+ ;}
+ break;
+
+ case 274:
+#line 3084 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { // Used for call statements, and memory insts...
+ (yyval.ValueList) = new std::vector<ValueInfo>();
+ (yyval.ValueList)->push_back((yyvsp[(1) - (1)].ValueVal));
+ ;}
+ break;
+
+ case 275:
+#line 3088 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.ValueList) = (yyvsp[(1) - (3)].ValueList);
+ (yyvsp[(1) - (3)].ValueList)->push_back((yyvsp[(3) - (3)].ValueVal));
+ ;}
+ break;
+
+ case 277:
+#line 3096 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValueList) = 0; ;}
+ break;
+
+ case 278:
+#line 3100 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.BoolVal) = true;
+ ;}
+ break;
+
+ case 279:
+#line 3103 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.BoolVal) = false;
+ ;}
+ break;
+
+ case 280:
+#line 3109 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type* Ty = (yyvsp[(2) - (5)].TypeVal).PAT->get();
if (!Ty->isInteger() && !Ty->isFloatingPoint() && !isa<PackedType>(Ty))
error("Arithmetic operator requires integer, FP, or packed operands");
if (isa<PackedType>(Ty) &&
- (yyvsp[-4].BinaryOpVal == URemOp || yyvsp[-4].BinaryOpVal == SRemOp || yyvsp[-4].BinaryOpVal == FRemOp || yyvsp[-4].BinaryOpVal == RemOp))
+ ((yyvsp[(1) - (5)].BinaryOpVal) == URemOp || (yyvsp[(1) - (5)].BinaryOpVal) == SRemOp || (yyvsp[(1) - (5)].BinaryOpVal) == FRemOp || (yyvsp[(1) - (5)].BinaryOpVal) == RemOp))
error("Remainder not supported on packed types");
// Upgrade the opcode from obsolete versions before we do anything with it.
- Instruction::BinaryOps Opcode = getBinaryOp(yyvsp[-4].BinaryOpVal, Ty, yyvsp[-3].TypeVal.S);
- Value* val1 = getVal(Ty, yyvsp[-2].ValIDVal);
- Value* val2 = getVal(Ty, yyvsp[0].ValIDVal);
- yyval.InstVal.I = BinaryOperator::create(Opcode, val1, val2);
- if (yyval.InstVal.I == 0)
+ Instruction::BinaryOps Opcode = getBinaryOp((yyvsp[(1) - (5)].BinaryOpVal), Ty, (yyvsp[(2) - (5)].TypeVal).S);
+ Value* val1 = getVal(Ty, (yyvsp[(3) - (5)].ValIDVal));
+ Value* val2 = getVal(Ty, (yyvsp[(5) - (5)].ValIDVal));
+ (yyval.InstVal).I = BinaryOperator::create(Opcode, val1, val2);
+ if ((yyval.InstVal).I == 0)
error("binary operator returned null");
- yyval.InstVal.S = yyvsp[-3].TypeVal.S;
- delete yyvsp[-3].TypeVal.PAT;
- ;
- break;}
-case 280:
-#line 3126 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[-3].TypeVal.PAT->get();
+ (yyval.InstVal).S = (yyvsp[(2) - (5)].TypeVal).S;
+ delete (yyvsp[(2) - (5)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 281:
+#line 3126 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[(2) - (5)].TypeVal).PAT->get();
if (!Ty->isInteger()) {
if (!isa<PackedType>(Ty) ||
!cast<PackedType>(Ty)->getElementType()->isInteger())
error("Logical operator requires integral operands");
}
- Instruction::BinaryOps Opcode = getBinaryOp(yyvsp[-4].BinaryOpVal, Ty, yyvsp[-3].TypeVal.S);
- Value* tmpVal1 = getVal(Ty, yyvsp[-2].ValIDVal);
- Value* tmpVal2 = getVal(Ty, yyvsp[0].ValIDVal);
- yyval.InstVal.I = BinaryOperator::create(Opcode, tmpVal1, tmpVal2);
- if (yyval.InstVal.I == 0)
+ Instruction::BinaryOps Opcode = getBinaryOp((yyvsp[(1) - (5)].BinaryOpVal), Ty, (yyvsp[(2) - (5)].TypeVal).S);
+ Value* tmpVal1 = getVal(Ty, (yyvsp[(3) - (5)].ValIDVal));
+ Value* tmpVal2 = getVal(Ty, (yyvsp[(5) - (5)].ValIDVal));
+ (yyval.InstVal).I = BinaryOperator::create(Opcode, tmpVal1, tmpVal2);
+ if ((yyval.InstVal).I == 0)
error("binary operator returned null");
- yyval.InstVal.S = yyvsp[-3].TypeVal.S;
- delete yyvsp[-3].TypeVal.PAT;
- ;
- break;}
-case 281:
-#line 3142 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type* Ty = yyvsp[-3].TypeVal.PAT->get();
+ (yyval.InstVal).S = (yyvsp[(2) - (5)].TypeVal).S;
+ delete (yyvsp[(2) - (5)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 282:
+#line 3142 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type* Ty = (yyvsp[(2) - (5)].TypeVal).PAT->get();
if(isa<PackedType>(Ty))
error("PackedTypes currently not supported in setcc instructions");
unsigned short pred;
- Instruction::OtherOps Opcode = getCompareOp(yyvsp[-4].BinaryOpVal, pred, Ty, yyvsp[-3].TypeVal.S);
- Value* tmpVal1 = getVal(Ty, yyvsp[-2].ValIDVal);
- Value* tmpVal2 = getVal(Ty, yyvsp[0].ValIDVal);
- yyval.InstVal.I = CmpInst::create(Opcode, pred, tmpVal1, tmpVal2);
- if (yyval.InstVal.I == 0)
+ Instruction::OtherOps Opcode = getCompareOp((yyvsp[(1) - (5)].BinaryOpVal), pred, Ty, (yyvsp[(2) - (5)].TypeVal).S);
+ Value* tmpVal1 = getVal(Ty, (yyvsp[(3) - (5)].ValIDVal));
+ Value* tmpVal2 = getVal(Ty, (yyvsp[(5) - (5)].ValIDVal));
+ (yyval.InstVal).I = CmpInst::create(Opcode, pred, tmpVal1, tmpVal2);
+ if ((yyval.InstVal).I == 0)
error("binary operator returned null");
- yyval.InstVal.S = Unsigned;
- delete yyvsp[-3].TypeVal.PAT;
- ;
- break;}
-case 282:
-#line 3156 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[-3].TypeVal.PAT->get();
+ (yyval.InstVal).S = Unsigned;
+ delete (yyvsp[(2) - (5)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 283:
+#line 3156 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[(3) - (6)].TypeVal).PAT->get();
if (isa<PackedType>(Ty))
error("PackedTypes currently not supported in icmp instructions");
else if (!Ty->isInteger() && !isa<PointerType>(Ty))
error("icmp requires integer or pointer typed operands");
- Value* tmpVal1 = getVal(Ty, yyvsp[-2].ValIDVal);
- Value* tmpVal2 = getVal(Ty, yyvsp[0].ValIDVal);
- yyval.InstVal.I = new ICmpInst(yyvsp[-4].IPred, tmpVal1, tmpVal2);
- yyval.InstVal.S = Unsigned;
- delete yyvsp[-3].TypeVal.PAT;
- ;
- break;}
-case 283:
-#line 3168 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[-3].TypeVal.PAT->get();
+ Value* tmpVal1 = getVal(Ty, (yyvsp[(4) - (6)].ValIDVal));
+ Value* tmpVal2 = getVal(Ty, (yyvsp[(6) - (6)].ValIDVal));
+ (yyval.InstVal).I = new ICmpInst((yyvsp[(2) - (6)].IPred), tmpVal1, tmpVal2);
+ (yyval.InstVal).S = Unsigned;
+ delete (yyvsp[(3) - (6)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 284:
+#line 3168 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[(3) - (6)].TypeVal).PAT->get();
if (isa<PackedType>(Ty))
error("PackedTypes currently not supported in fcmp instructions");
else if (!Ty->isFloatingPoint())
error("fcmp instruction requires floating point operands");
- Value* tmpVal1 = getVal(Ty, yyvsp[-2].ValIDVal);
- Value* tmpVal2 = getVal(Ty, yyvsp[0].ValIDVal);
- yyval.InstVal.I = new FCmpInst(yyvsp[-4].FPred, tmpVal1, tmpVal2);
- yyval.InstVal.S = Unsigned;
- delete yyvsp[-3].TypeVal.PAT;
- ;
- break;}
-case 284:
-#line 3180 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ Value* tmpVal1 = getVal(Ty, (yyvsp[(4) - (6)].ValIDVal));
+ Value* tmpVal2 = getVal(Ty, (yyvsp[(6) - (6)].ValIDVal));
+ (yyval.InstVal).I = new FCmpInst((yyvsp[(2) - (6)].FPred), tmpVal1, tmpVal2);
+ (yyval.InstVal).S = Unsigned;
+ delete (yyvsp[(3) - (6)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 285:
+#line 3180 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
warning("Use of obsolete 'not' instruction: Replacing with 'xor");
- const Type *Ty = yyvsp[0].ValueVal.V->getType();
+ const Type *Ty = (yyvsp[(2) - (2)].ValueVal).V->getType();
Value *Ones = ConstantInt::getAllOnesValue(Ty);
if (Ones == 0)
error("Expected integral type for not instruction");
- yyval.InstVal.I = BinaryOperator::create(Instruction::Xor, yyvsp[0].ValueVal.V, Ones);
- if (yyval.InstVal.I == 0)
+ (yyval.InstVal).I = BinaryOperator::create(Instruction::Xor, (yyvsp[(2) - (2)].ValueVal).V, Ones);
+ if ((yyval.InstVal).I == 0)
error("Could not create a xor instruction");
- yyval.InstVal.S = yyvsp[0].ValueVal.S
- ;
- break;}
-case 285:
-#line 3191 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (!yyvsp[0].ValueVal.V->getType()->isInteger() ||
- cast<IntegerType>(yyvsp[0].ValueVal.V->getType())->getBitWidth() != 8)
+ (yyval.InstVal).S = (yyvsp[(2) - (2)].ValueVal).S
+ ;}
+ break;
+
+ case 286:
+#line 3191 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if (!(yyvsp[(4) - (4)].ValueVal).V->getType()->isInteger() ||
+ cast<IntegerType>((yyvsp[(4) - (4)].ValueVal).V->getType())->getBitWidth() != 8)
error("Shift amount must be int8");
- const Type* Ty = yyvsp[-2].ValueVal.V->getType();
+ const Type* Ty = (yyvsp[(2) - (4)].ValueVal).V->getType();
if (!Ty->isInteger())
error("Shift constant expression requires integer operand");
Value* ShiftAmt = 0;
if (cast<IntegerType>(Ty)->getBitWidth() > Type::Int8Ty->getBitWidth())
- if (Constant *C = dyn_cast<Constant>(yyvsp[0].ValueVal.V))
+ if (Constant *C = dyn_cast<Constant>((yyvsp[(4) - (4)].ValueVal).V))
ShiftAmt = ConstantExpr::getZExt(C, Ty);
else
- ShiftAmt = new ZExtInst(yyvsp[0].ValueVal.V, Ty, makeNameUnique("shift"), CurBB);
+ ShiftAmt = new ZExtInst((yyvsp[(4) - (4)].ValueVal).V, Ty, makeNameUnique("shift"), CurBB);
else
- ShiftAmt = yyvsp[0].ValueVal.V;
- yyval.InstVal.I = BinaryOperator::create(getBinaryOp(yyvsp[-3].BinaryOpVal, Ty, yyvsp[-2].ValueVal.S), yyvsp[-2].ValueVal.V, ShiftAmt);
- yyval.InstVal.S = yyvsp[-2].ValueVal.S;
- ;
- break;}
-case 286:
-#line 3209 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *DstTy = yyvsp[0].TypeVal.PAT->get();
+ ShiftAmt = (yyvsp[(4) - (4)].ValueVal).V;
+ (yyval.InstVal).I = BinaryOperator::create(getBinaryOp((yyvsp[(1) - (4)].BinaryOpVal), Ty, (yyvsp[(2) - (4)].ValueVal).S), (yyvsp[(2) - (4)].ValueVal).V, ShiftAmt);
+ (yyval.InstVal).S = (yyvsp[(2) - (4)].ValueVal).S;
+ ;}
+ break;
+
+ case 287:
+#line 3209 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *DstTy = (yyvsp[(4) - (4)].TypeVal).PAT->get();
if (!DstTy->isFirstClassType())
error("cast instruction to a non-primitive type: '" +
DstTy->getDescription() + "'");
- yyval.InstVal.I = cast<Instruction>(getCast(yyvsp[-3].CastOpVal, yyvsp[-2].ValueVal.V, yyvsp[-2].ValueVal.S, DstTy, yyvsp[0].TypeVal.S, true));
- yyval.InstVal.S = yyvsp[0].TypeVal.S;
- delete yyvsp[0].TypeVal.PAT;
- ;
- break;}
-case 287:
-#line 3218 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (!yyvsp[-4].ValueVal.V->getType()->isInteger() ||
- cast<IntegerType>(yyvsp[-4].ValueVal.V->getType())->getBitWidth() != 1)
+ (yyval.InstVal).I = cast<Instruction>(getCast((yyvsp[(1) - (4)].CastOpVal), (yyvsp[(2) - (4)].ValueVal).V, (yyvsp[(2) - (4)].ValueVal).S, DstTy, (yyvsp[(4) - (4)].TypeVal).S, true));
+ (yyval.InstVal).S = (yyvsp[(4) - (4)].TypeVal).S;
+ delete (yyvsp[(4) - (4)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 288:
+#line 3218 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if (!(yyvsp[(2) - (6)].ValueVal).V->getType()->isInteger() ||
+ cast<IntegerType>((yyvsp[(2) - (6)].ValueVal).V->getType())->getBitWidth() != 1)
error("select condition must be bool");
- if (yyvsp[-2].ValueVal.V->getType() != yyvsp[0].ValueVal.V->getType())
+ if ((yyvsp[(4) - (6)].ValueVal).V->getType() != (yyvsp[(6) - (6)].ValueVal).V->getType())
error("select value types should match");
- yyval.InstVal.I = new SelectInst(yyvsp[-4].ValueVal.V, yyvsp[-2].ValueVal.V, yyvsp[0].ValueVal.V);
- yyval.InstVal.S = yyvsp[-4].ValueVal.S;
- ;
- break;}
-case 288:
-#line 3227 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[0].TypeVal.PAT->get();
+ (yyval.InstVal).I = new SelectInst((yyvsp[(2) - (6)].ValueVal).V, (yyvsp[(4) - (6)].ValueVal).V, (yyvsp[(6) - (6)].ValueVal).V);
+ (yyval.InstVal).S = (yyvsp[(2) - (6)].ValueVal).S;
+ ;}
+ break;
+
+ case 289:
+#line 3227 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[(4) - (4)].TypeVal).PAT->get();
NewVarArgs = true;
- yyval.InstVal.I = new VAArgInst(yyvsp[-2].ValueVal.V, Ty);
- yyval.InstVal.S = yyvsp[0].TypeVal.S;
- delete yyvsp[0].TypeVal.PAT;
- ;
- break;}
-case 289:
-#line 3234 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type* ArgTy = yyvsp[-2].ValueVal.V->getType();
- const Type* DstTy = yyvsp[0].TypeVal.PAT->get();
+ (yyval.InstVal).I = new VAArgInst((yyvsp[(2) - (4)].ValueVal).V, Ty);
+ (yyval.InstVal).S = (yyvsp[(4) - (4)].TypeVal).S;
+ delete (yyvsp[(4) - (4)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 290:
+#line 3234 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type* ArgTy = (yyvsp[(2) - (4)].ValueVal).V->getType();
+ const Type* DstTy = (yyvsp[(4) - (4)].TypeVal).PAT->get();
ObsoleteVarArgs = true;
Function* NF = cast<Function>(CurModule.CurrentModule->
getOrInsertFunction("llvm.va_copy", ArgTy, ArgTy, (Type *)0));
@@ -5049,19 +6127,20 @@
//b = vaarg foo, t
AllocaInst* foo = new AllocaInst(ArgTy, 0, "vaarg.fix");
CurBB->getInstList().push_back(foo);
- CallInst* bar = new CallInst(NF, yyvsp[-2].ValueVal.V);
+ CallInst* bar = new CallInst(NF, (yyvsp[(2) - (4)].ValueVal).V);
CurBB->getInstList().push_back(bar);
CurBB->getInstList().push_back(new StoreInst(bar, foo));
- yyval.InstVal.I = new VAArgInst(foo, DstTy);
- yyval.InstVal.S = yyvsp[0].TypeVal.S;
- delete yyvsp[0].TypeVal.PAT;
- ;
- break;}
-case 290:
-#line 3255 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type* ArgTy = yyvsp[-2].ValueVal.V->getType();
- const Type* DstTy = yyvsp[0].TypeVal.PAT->get();
+ (yyval.InstVal).I = new VAArgInst(foo, DstTy);
+ (yyval.InstVal).S = (yyvsp[(4) - (4)].TypeVal).S;
+ delete (yyvsp[(4) - (4)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 291:
+#line 3255 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type* ArgTy = (yyvsp[(2) - (4)].ValueVal).V->getType();
+ const Type* DstTy = (yyvsp[(4) - (4)].TypeVal).PAT->get();
ObsoleteVarArgs = true;
Function* NF = cast<Function>(CurModule.CurrentModule->
getOrInsertFunction("llvm.va_copy", ArgTy, ArgTy, (Type *)0));
@@ -5074,88 +6153,93 @@
//b = load foo
AllocaInst* foo = new AllocaInst(ArgTy, 0, "vanext.fix");
CurBB->getInstList().push_back(foo);
- CallInst* bar = new CallInst(NF, yyvsp[-2].ValueVal.V);
+ CallInst* bar = new CallInst(NF, (yyvsp[(2) - (4)].ValueVal).V);
CurBB->getInstList().push_back(bar);
CurBB->getInstList().push_back(new StoreInst(bar, foo));
Instruction* tmp = new VAArgInst(foo, DstTy);
CurBB->getInstList().push_back(tmp);
- yyval.InstVal.I = new LoadInst(foo);
- yyval.InstVal.S = yyvsp[0].TypeVal.S;
- delete yyvsp[0].TypeVal.PAT;
- ;
- break;}
-case 291:
-#line 3279 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (!ExtractElementInst::isValidOperands(yyvsp[-2].ValueVal.V, yyvsp[0].ValueVal.V))
+ (yyval.InstVal).I = new LoadInst(foo);
+ (yyval.InstVal).S = (yyvsp[(4) - (4)].TypeVal).S;
+ delete (yyvsp[(4) - (4)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 292:
+#line 3279 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if (!ExtractElementInst::isValidOperands((yyvsp[(2) - (4)].ValueVal).V, (yyvsp[(4) - (4)].ValueVal).V))
error("Invalid extractelement operands");
- yyval.InstVal.I = new ExtractElementInst(yyvsp[-2].ValueVal.V, yyvsp[0].ValueVal.V);
- yyval.InstVal.S = yyvsp[-2].ValueVal.S;
- ;
- break;}
-case 292:
-#line 3285 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (!InsertElementInst::isValidOperands(yyvsp[-4].ValueVal.V, yyvsp[-2].ValueVal.V, yyvsp[0].ValueVal.V))
+ (yyval.InstVal).I = new ExtractElementInst((yyvsp[(2) - (4)].ValueVal).V, (yyvsp[(4) - (4)].ValueVal).V);
+ (yyval.InstVal).S = (yyvsp[(2) - (4)].ValueVal).S;
+ ;}
+ break;
+
+ case 293:
+#line 3285 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if (!InsertElementInst::isValidOperands((yyvsp[(2) - (6)].ValueVal).V, (yyvsp[(4) - (6)].ValueVal).V, (yyvsp[(6) - (6)].ValueVal).V))
error("Invalid insertelement operands");
- yyval.InstVal.I = new InsertElementInst(yyvsp[-4].ValueVal.V, yyvsp[-2].ValueVal.V, yyvsp[0].ValueVal.V);
- yyval.InstVal.S = yyvsp[-4].ValueVal.S;
- ;
- break;}
-case 293:
-#line 3291 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- if (!ShuffleVectorInst::isValidOperands(yyvsp[-4].ValueVal.V, yyvsp[-2].ValueVal.V, yyvsp[0].ValueVal.V))
+ (yyval.InstVal).I = new InsertElementInst((yyvsp[(2) - (6)].ValueVal).V, (yyvsp[(4) - (6)].ValueVal).V, (yyvsp[(6) - (6)].ValueVal).V);
+ (yyval.InstVal).S = (yyvsp[(2) - (6)].ValueVal).S;
+ ;}
+ break;
+
+ case 294:
+#line 3291 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ if (!ShuffleVectorInst::isValidOperands((yyvsp[(2) - (6)].ValueVal).V, (yyvsp[(4) - (6)].ValueVal).V, (yyvsp[(6) - (6)].ValueVal).V))
error("Invalid shufflevector operands");
- yyval.InstVal.I = new ShuffleVectorInst(yyvsp[-4].ValueVal.V, yyvsp[-2].ValueVal.V, yyvsp[0].ValueVal.V);
- yyval.InstVal.S = yyvsp[-4].ValueVal.S;
- ;
- break;}
-case 294:
-#line 3297 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[0].PHIList.P->front().first->getType();
+ (yyval.InstVal).I = new ShuffleVectorInst((yyvsp[(2) - (6)].ValueVal).V, (yyvsp[(4) - (6)].ValueVal).V, (yyvsp[(6) - (6)].ValueVal).V);
+ (yyval.InstVal).S = (yyvsp[(2) - (6)].ValueVal).S;
+ ;}
+ break;
+
+ case 295:
+#line 3297 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[(2) - (2)].PHIList).P->front().first->getType();
if (!Ty->isFirstClassType())
error("PHI node operands must be of first class type");
PHINode *PHI = new PHINode(Ty);
- PHI->reserveOperandSpace(yyvsp[0].PHIList.P->size());
- while (yyvsp[0].PHIList.P->begin() != yyvsp[0].PHIList.P->end()) {
- if (yyvsp[0].PHIList.P->front().first->getType() != Ty)
+ PHI->reserveOperandSpace((yyvsp[(2) - (2)].PHIList).P->size());
+ while ((yyvsp[(2) - (2)].PHIList).P->begin() != (yyvsp[(2) - (2)].PHIList).P->end()) {
+ if ((yyvsp[(2) - (2)].PHIList).P->front().first->getType() != Ty)
error("All elements of a PHI node must be of the same type");
- PHI->addIncoming(yyvsp[0].PHIList.P->front().first, yyvsp[0].PHIList.P->front().second);
- yyvsp[0].PHIList.P->pop_front();
+ PHI->addIncoming((yyvsp[(2) - (2)].PHIList).P->front().first, (yyvsp[(2) - (2)].PHIList).P->front().second);
+ (yyvsp[(2) - (2)].PHIList).P->pop_front();
}
- yyval.InstVal.I = PHI;
- yyval.InstVal.S = yyvsp[0].PHIList.S;
- delete yyvsp[0].PHIList.P; // Free the list...
- ;
- break;}
-case 295:
-#line 3313 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
+ (yyval.InstVal).I = PHI;
+ (yyval.InstVal).S = (yyvsp[(2) - (2)].PHIList).S;
+ delete (yyvsp[(2) - (2)].PHIList).P; // Free the list...
+ ;}
+ break;
+
+ case 296:
+#line 3313 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
// Handle the short call syntax
const PointerType *PFTy;
const FunctionType *FTy;
- if (!(PFTy = dyn_cast<PointerType>(yyvsp[-4].TypeVal.PAT->get())) ||
+ if (!(PFTy = dyn_cast<PointerType>((yyvsp[(3) - (7)].TypeVal).PAT->get())) ||
!(FTy = dyn_cast<FunctionType>(PFTy->getElementType()))) {
// Pull out the types of all of the arguments...
std::vector<const Type*> ParamTypes;
- if (yyvsp[-1].ValueList) {
- for (std::vector<ValueInfo>::iterator I = yyvsp[-1].ValueList->begin(), E = yyvsp[-1].ValueList->end();
+ if ((yyvsp[(6) - (7)].ValueList)) {
+ for (std::vector<ValueInfo>::iterator I = (yyvsp[(6) - (7)].ValueList)->begin(), E = (yyvsp[(6) - (7)].ValueList)->end();
I != E; ++I)
ParamTypes.push_back((*I).V->getType());
}
FunctionType::ParamAttrsList ParamAttrs;
- if (yyvsp[-5].UIntVal == OldCallingConv::CSRet) {
+ if ((yyvsp[(2) - (7)].UIntVal) == OldCallingConv::CSRet) {
ParamAttrs.push_back(FunctionType::NoAttributeSet);
ParamAttrs.push_back(FunctionType::StructRetAttribute);
}
bool isVarArg = ParamTypes.size() && ParamTypes.back() == Type::VoidTy;
if (isVarArg) ParamTypes.pop_back();
- const Type *RetTy = yyvsp[-4].TypeVal.PAT->get();
+ const Type *RetTy = (yyvsp[(3) - (7)].TypeVal).PAT->get();
if (!RetTy->isFirstClassType() && RetTy != Type::VoidTy)
error("Functions cannot return aggregate types");
@@ -5165,21 +6249,21 @@
// First upgrade any intrinsic calls.
std::vector<Value*> Args;
- if (yyvsp[-1].ValueList)
- for (unsigned i = 0, e = yyvsp[-1].ValueList->size(); i < e; ++i)
- Args.push_back((*yyvsp[-1].ValueList)[i].V);
- Instruction *Inst = upgradeIntrinsicCall(FTy, yyvsp[-3].ValIDVal, Args);
+ if ((yyvsp[(6) - (7)].ValueList))
+ for (unsigned i = 0, e = (yyvsp[(6) - (7)].ValueList)->size(); i < e; ++i)
+ Args.push_back((*(yyvsp[(6) - (7)].ValueList))[i].V);
+ Instruction *Inst = upgradeIntrinsicCall(FTy, (yyvsp[(4) - (7)].ValIDVal), Args);
// If we got an upgraded intrinsic
if (Inst) {
- yyval.InstVal.I = Inst;
- yyval.InstVal.S = Signless;
+ (yyval.InstVal).I = Inst;
+ (yyval.InstVal).S = Signless;
} else {
// Get the function we're calling
- Value *V = getVal(PFTy, yyvsp[-3].ValIDVal);
+ Value *V = getVal(PFTy, (yyvsp[(4) - (7)].ValIDVal));
// Check the argument values match
- if (!yyvsp[-1].ValueList) { // Has no arguments?
+ if (!(yyvsp[(6) - (7)].ValueList)) { // Has no arguments?
// Make sure no arguments is a good thing!
if (FTy->getNumParams() != 0)
error("No arguments passed to a function that expects arguments");
@@ -5189,7 +6273,7 @@
//
FunctionType::param_iterator I = FTy->param_begin();
FunctionType::param_iterator E = FTy->param_end();
- std::vector<ValueInfo>::iterator ArgI = yyvsp[-1].ValueList->begin(), ArgE = yyvsp[-1].ValueList->end();
+ std::vector<ValueInfo>::iterator ArgI = (yyvsp[(6) - (7)].ValueList)->begin(), ArgE = (yyvsp[(6) - (7)].ValueList)->end();
for (; ArgI != ArgE && I != E; ++ArgI, ++I)
if ((*ArgI).V->getType() != *I)
@@ -5202,112 +6286,124 @@
// Create the call instruction
CallInst *CI = new CallInst(V, Args);
- CI->setTailCall(yyvsp[-6].BoolVal);
- CI->setCallingConv(upgradeCallingConv(yyvsp[-5].UIntVal));
- yyval.InstVal.I = CI;
- yyval.InstVal.S = yyvsp[-4].TypeVal.S;
- }
- delete yyvsp[-4].TypeVal.PAT;
- delete yyvsp[-1].ValueList;
- ;
- break;}
-case 296:
-#line 3391 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- yyval.InstVal = yyvsp[0].InstVal;
- ;
- break;}
-case 297:
-#line 3399 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValueList = yyvsp[0].ValueList; ;
- break;}
-case 298:
-#line 3400 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.ValueList = new std::vector<ValueInfo>(); ;
- break;}
-case 299:
-#line 3404 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.BoolVal = true; ;
- break;}
-case 300:
-#line 3405 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{ yyval.BoolVal = false; ;
- break;}
-case 301:
-#line 3409 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[-1].TypeVal.PAT->get();
- yyval.InstVal.S = yyvsp[-1].TypeVal.S;
- yyval.InstVal.I = new MallocInst(Ty, 0, yyvsp[0].UIntVal);
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 302:
-#line 3415 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[-4].TypeVal.PAT->get();
- yyval.InstVal.S = yyvsp[-4].TypeVal.S;
- yyval.InstVal.I = new MallocInst(Ty, getVal(yyvsp[-2].PrimType.T, yyvsp[-1].ValIDVal), yyvsp[0].UIntVal);
- delete yyvsp[-4].TypeVal.PAT;
- ;
- break;}
-case 303:
-#line 3421 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[-1].TypeVal.PAT->get();
- yyval.InstVal.S = yyvsp[-1].TypeVal.S;
- yyval.InstVal.I = new AllocaInst(Ty, 0, yyvsp[0].UIntVal);
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 304:
-#line 3427 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *Ty = yyvsp[-4].TypeVal.PAT->get();
- yyval.InstVal.S = yyvsp[-4].TypeVal.S;
- yyval.InstVal.I = new AllocaInst(Ty, getVal(yyvsp[-2].PrimType.T, yyvsp[-1].ValIDVal), yyvsp[0].UIntVal);
- delete yyvsp[-4].TypeVal.PAT;
- ;
- break;}
-case 305:
-#line 3433 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type *PTy = yyvsp[0].ValueVal.V->getType();
+ CI->setTailCall((yyvsp[(1) - (7)].BoolVal));
+ CI->setCallingConv(upgradeCallingConv((yyvsp[(2) - (7)].UIntVal)));
+ (yyval.InstVal).I = CI;
+ (yyval.InstVal).S = (yyvsp[(3) - (7)].TypeVal).S;
+ }
+ delete (yyvsp[(3) - (7)].TypeVal).PAT;
+ delete (yyvsp[(6) - (7)].ValueList);
+ ;}
+ break;
+
+ case 297:
+#line 3391 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ (yyval.InstVal) = (yyvsp[(1) - (1)].InstVal);
+ ;}
+ break;
+
+ case 298:
+#line 3399 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValueList) = (yyvsp[(2) - (2)].ValueList); ;}
+ break;
+
+ case 299:
+#line 3400 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.ValueList) = new std::vector<ValueInfo>(); ;}
+ break;
+
+ case 300:
+#line 3404 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.BoolVal) = true; ;}
+ break;
+
+ case 301:
+#line 3405 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ { (yyval.BoolVal) = false; ;}
+ break;
+
+ case 302:
+#line 3409 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[(2) - (3)].TypeVal).PAT->get();
+ (yyval.InstVal).S = (yyvsp[(2) - (3)].TypeVal).S;
+ (yyval.InstVal).I = new MallocInst(Ty, 0, (yyvsp[(3) - (3)].UIntVal));
+ delete (yyvsp[(2) - (3)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 303:
+#line 3415 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[(2) - (6)].TypeVal).PAT->get();
+ (yyval.InstVal).S = (yyvsp[(2) - (6)].TypeVal).S;
+ (yyval.InstVal).I = new MallocInst(Ty, getVal((yyvsp[(4) - (6)].PrimType).T, (yyvsp[(5) - (6)].ValIDVal)), (yyvsp[(6) - (6)].UIntVal));
+ delete (yyvsp[(2) - (6)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 304:
+#line 3421 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[(2) - (3)].TypeVal).PAT->get();
+ (yyval.InstVal).S = (yyvsp[(2) - (3)].TypeVal).S;
+ (yyval.InstVal).I = new AllocaInst(Ty, 0, (yyvsp[(3) - (3)].UIntVal));
+ delete (yyvsp[(2) - (3)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 305:
+#line 3427 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *Ty = (yyvsp[(2) - (6)].TypeVal).PAT->get();
+ (yyval.InstVal).S = (yyvsp[(2) - (6)].TypeVal).S;
+ (yyval.InstVal).I = new AllocaInst(Ty, getVal((yyvsp[(4) - (6)].PrimType).T, (yyvsp[(5) - (6)].ValIDVal)), (yyvsp[(6) - (6)].UIntVal));
+ delete (yyvsp[(2) - (6)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 306:
+#line 3433 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type *PTy = (yyvsp[(2) - (2)].ValueVal).V->getType();
if (!isa<PointerType>(PTy))
error("Trying to free nonpointer type '" + PTy->getDescription() + "'");
- yyval.InstVal.I = new FreeInst(yyvsp[0].ValueVal.V);
- yyval.InstVal.S = Signless;
- ;
- break;}
-case 306:
-#line 3440 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type* Ty = yyvsp[-1].TypeVal.PAT->get();
- yyval.InstVal.S = yyvsp[-1].TypeVal.S;
+ (yyval.InstVal).I = new FreeInst((yyvsp[(2) - (2)].ValueVal).V);
+ (yyval.InstVal).S = Signless;
+ ;}
+ break;
+
+ case 307:
+#line 3440 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type* Ty = (yyvsp[(3) - (4)].TypeVal).PAT->get();
+ (yyval.InstVal).S = (yyvsp[(3) - (4)].TypeVal).S;
if (!isa<PointerType>(Ty))
error("Can't load from nonpointer type: " + Ty->getDescription());
if (!cast<PointerType>(Ty)->getElementType()->isFirstClassType())
error("Can't load from pointer of non-first-class type: " +
Ty->getDescription());
- Value* tmpVal = getVal(Ty, yyvsp[0].ValIDVal);
- yyval.InstVal.I = new LoadInst(tmpVal, "", yyvsp[-3].BoolVal);
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 307:
-#line 3452 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const PointerType *PTy = dyn_cast<PointerType>(yyvsp[-1].TypeVal.PAT->get());
+ Value* tmpVal = getVal(Ty, (yyvsp[(4) - (4)].ValIDVal));
+ (yyval.InstVal).I = new LoadInst(tmpVal, "", (yyvsp[(1) - (4)].BoolVal));
+ delete (yyvsp[(3) - (4)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 308:
+#line 3452 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const PointerType *PTy = dyn_cast<PointerType>((yyvsp[(5) - (6)].TypeVal).PAT->get());
if (!PTy)
error("Can't store to a nonpointer type: " +
- yyvsp[-1].TypeVal.PAT->get()->getDescription());
+ (yyvsp[(5) - (6)].TypeVal).PAT->get()->getDescription());
const Type *ElTy = PTy->getElementType();
- Value *StoreVal = yyvsp[-3].ValueVal.V;
- Value* tmpVal = getVal(PTy, yyvsp[0].ValIDVal);
- if (ElTy != yyvsp[-3].ValueVal.V->getType()) {
- StoreVal = handleSRetFuncTypeMerge(yyvsp[-3].ValueVal.V, ElTy);
+ Value *StoreVal = (yyvsp[(3) - (6)].ValueVal).V;
+ Value* tmpVal = getVal(PTy, (yyvsp[(6) - (6)].ValIDVal));
+ if (ElTy != (yyvsp[(3) - (6)].ValueVal).V->getType()) {
+ StoreVal = handleSRetFuncTypeMerge((yyvsp[(3) - (6)].ValueVal).V, ElTy);
if (!StoreVal)
- error("Can't store '" + yyvsp[-3].ValueVal.V->getType()->getDescription() +
+ error("Can't store '" + (yyvsp[(3) - (6)].ValueVal).V->getType()->getDescription() +
"' into space of type '" + ElTy->getDescription() + "'");
else {
PTy = PointerType::get(StoreVal->getType());
@@ -5317,251 +6413,247 @@
tmpVal = new BitCastInst(tmpVal, PTy, "upgrd.cast", CurBB);
}
}
- yyval.InstVal.I = new StoreInst(StoreVal, tmpVal, yyvsp[-5].BoolVal);
- yyval.InstVal.S = Signless;
- delete yyvsp[-1].TypeVal.PAT;
- ;
- break;}
-case 308:
-#line 3477 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
-{
- const Type* Ty = yyvsp[-2].TypeVal.PAT->get();
+ (yyval.InstVal).I = new StoreInst(StoreVal, tmpVal, (yyvsp[(1) - (6)].BoolVal));
+ (yyval.InstVal).S = Signless;
+ delete (yyvsp[(5) - (6)].TypeVal).PAT;
+ ;}
+ break;
+
+ case 309:
+#line 3477 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+ {
+ const Type* Ty = (yyvsp[(2) - (4)].TypeVal).PAT->get();
if (!isa<PointerType>(Ty))
error("getelementptr insn requires pointer operand");
std::vector<Value*> VIndices;
- upgradeGEPIndices(Ty, yyvsp[0].ValueList, VIndices);
+ upgradeGEPIndices(Ty, (yyvsp[(4) - (4)].ValueList), VIndices);
- Value* tmpVal = getVal(Ty, yyvsp[-1].ValIDVal);
- yyval.InstVal.I = new GetElementPtrInst(tmpVal, VIndices);
- yyval.InstVal.S = Signless;
- delete yyvsp[-2].TypeVal.PAT;
- delete yyvsp[0].ValueList;
- ;
- break;}
-}
- /* the action file gets copied in in place of this dollarsign */
-#line 543 "/usr/share/bison.simple"
-
- yyvsp -= yylen;
- yyssp -= yylen;
-#ifdef YYLSP_NEEDED
- yylsp -= yylen;
-#endif
+ Value* tmpVal = getVal(Ty, (yyvsp[(3) - (4)].ValIDVal));
+ (yyval.InstVal).I = new GetElementPtrInst(tmpVal, &VIndices[0], VIndices.size());
+ (yyval.InstVal).S = Signless;
+ delete (yyvsp[(2) - (4)].TypeVal).PAT;
+ delete (yyvsp[(4) - (4)].ValueList);
+ ;}
+ break;
-#if YYDEBUG != 0
- if (yydebug)
- {
- short *ssp1 = yyss - 1;
- fprintf (stderr, "state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
-#endif
+
+/* Line 1267 of yacc.c. */
+#line 6443 "UpgradeParser.tab.c"
+ default: break;
+ }
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval;
-#ifdef YYLSP_NEEDED
- yylsp++;
- if (yylen == 0)
- {
- yylsp->first_line = yylloc.first_line;
- yylsp->first_column = yylloc.first_column;
- yylsp->last_line = (yylsp-1)->last_line;
- yylsp->last_column = (yylsp-1)->last_column;
- yylsp->text = 0;
- }
- else
- {
- yylsp->last_line = (yylsp+yylen-1)->last_line;
- yylsp->last_column = (yylsp+yylen-1)->last_column;
- }
-#endif
- /* Now "shift" the result of the reduction.
- Determine what state that goes to,
- based on the state we popped back to
- and the rule number reduced by. */
+ /* Now `shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
yyn = yyr1[yyn];
- yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
- if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
- yystate = yydefgoto[yyn - YYNTBASE];
+ yystate = yydefgoto[yyn - YYNTOKENS];
goto yynewstate;
-yyerrlab: /* here on detecting error */
- if (! yyerrstatus)
- /* If not already recovering from an error, report this error. */
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
{
++yynerrs;
-
-#ifdef YYERROR_VERBOSE
- yyn = yypact[yystate];
-
- if (yyn > YYFLAG && yyn < YYLAST)
- {
- int size = 0;
- char *msg;
- int x, count;
-
- count = 0;
- /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- size += strlen(yytname[x]) + 15, count++;
- msg = (char *) malloc(size + 15);
- if (msg != 0)
- {
- strcpy(msg, "parse error");
-
- if (count < 5)
- {
- count = 0;
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- {
- strcat(msg, count == 0 ? ", expecting `" : " or `");
- strcat(msg, yytname[x]);
- strcat(msg, "'");
- count++;
- }
- }
- yyerror(msg);
- free(msg);
- }
- else
- yyerror ("parse error; also virtual memory exceeded");
- }
- else
-#endif /* YYERROR_VERBOSE */
- yyerror("parse error");
+#if ! YYERROR_VERBOSE
+ yyerror (YY_("syntax error"));
+#else
+ {
+ YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+ if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+ {
+ YYSIZE_T yyalloc = 2 * yysize;
+ if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+ yyalloc = YYSTACK_ALLOC_MAXIMUM;
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+ if (yymsg)
+ yymsg_alloc = yyalloc;
+ else
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ }
+ }
+
+ if (0 < yysize && yysize <= yymsg_alloc)
+ {
+ (void) yysyntax_error (yymsg, yystate, yychar);
+ yyerror (yymsg);
+ }
+ else
+ {
+ yyerror (YY_("syntax error"));
+ if (yysize != 0)
+ goto yyexhaustedlab;
+ }
+ }
+#endif
}
- goto yyerrlab1;
-yyerrlab1: /* here on error raised explicitly by an action */
+
if (yyerrstatus == 3)
{
- /* if just tried and failed to reuse lookahead token after an error, discard it. */
-
- /* return failure if at end of input */
- if (yychar == YYEOF)
- YYABORT;
+ /* If just tried and failed to reuse look-ahead token after an
+ error, discard it. */
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
-#endif
-
- yychar = YYEMPTY;
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
}
- /* Else will try to reuse lookahead token
- after shifting the error token. */
-
- yyerrstatus = 3; /* Each real token shifted decrements this */
-
- goto yyerrhandle;
+ /* Else will try to reuse look-ahead token after shifting the error
+ token. */
+ goto yyerrlab1;
-yyerrdefault: /* current state does not do anything special for the error token. */
-#if 0
- /* This is wrong; only states that explicitly want error tokens
- should shift them. */
- yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
- if (yyn) goto yydefault;
-#endif
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (/*CONSTCOND*/ 0)
+ goto yyerrorlab;
+
+ /* Do not reclaim the symbols of the rule which action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
-yyerrpop: /* pop the current state because it cannot handle the error token */
- if (yyssp == yyss) YYABORT;
- yyvsp--;
- yystate = *--yyssp;
-#ifdef YYLSP_NEEDED
- yylsp--;
-#endif
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
-#if YYDEBUG != 0
- if (yydebug)
+ for (;;)
{
- short *ssp1 = yyss - 1;
- fprintf (stderr, "Error: state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
-#endif
-
-yyerrhandle:
+ yyn = yypact[yystate];
+ if (yyn != YYPACT_NINF)
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yyerrdefault;
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
- yyn += YYTERROR;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
- goto yyerrdefault;
- yyn = yytable[yyn];
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrpop;
- yyn = -yyn;
- goto yyreduce;
+ yydestruct ("Error: popping",
+ yystos[yystate], yyvsp);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
}
- else if (yyn == 0)
- goto yyerrpop;
if (yyn == YYFINAL)
YYACCEPT;
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting error token, ");
-#endif
-
*++yyvsp = yylval;
-#ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
-#endif
+
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
yystate = yyn;
goto yynewstate;
- yyacceptlab:
- /* YYACCEPT comes here. */
- if (yyfree_stacks)
- {
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
-#endif
- }
- return 0;
- yyabortlab:
- /* YYABORT comes here. */
- if (yyfree_stacks)
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+#ifndef yyoverflow
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+yyreturn:
+ if (yychar != YYEOF && yychar != YYEMPTY)
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ /* Do not reclaim the symbols of the rule which action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
{
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK (1);
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
#endif
- }
- return 1;
+ /* Make sure YYID is used. */
+ return YYID (yyresult);
}
-#line 3493 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y"
+
+
+#line 3493 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
int yyerror(const char *ErrorMsg) {
@@ -5594,3 +6686,4 @@
yyerror(ErrorMsg.c_str());
}
+
Index: llvm/tools/llvm-upgrade/UpgradeParser.h.cvs
diff -u llvm/tools/llvm-upgrade/UpgradeParser.h.cvs:1.44 llvm/tools/llvm-upgrade/UpgradeParser.h.cvs:1.45
--- llvm/tools/llvm-upgrade/UpgradeParser.h.cvs:1.44 Sun Feb 11 15:39:05 2007
+++ llvm/tools/llvm-upgrade/UpgradeParser.h.cvs Mon Feb 12 16:58:38 2007
@@ -1,4 +1,353 @@
-typedef union {
+/* A Bison parser, made by GNU Bison 2.3. */
+
+/* Skeleton interface for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ ESINT64VAL = 258,
+ EUINT64VAL = 259,
+ SINTVAL = 260,
+ UINTVAL = 261,
+ FPVAL = 262,
+ VOID = 263,
+ BOOL = 264,
+ SBYTE = 265,
+ UBYTE = 266,
+ SHORT = 267,
+ USHORT = 268,
+ INT = 269,
+ UINT = 270,
+ LONG = 271,
+ ULONG = 272,
+ FLOAT = 273,
+ DOUBLE = 274,
+ TYPE = 275,
+ LABEL = 276,
+ VAR_ID = 277,
+ LABELSTR = 278,
+ STRINGCONSTANT = 279,
+ IMPLEMENTATION = 280,
+ ZEROINITIALIZER = 281,
+ TRUETOK = 282,
+ FALSETOK = 283,
+ BEGINTOK = 284,
+ ENDTOK = 285,
+ DECLARE = 286,
+ GLOBAL = 287,
+ CONSTANT = 288,
+ SECTION = 289,
+ VOLATILE = 290,
+ TO = 291,
+ DOTDOTDOT = 292,
+ NULL_TOK = 293,
+ UNDEF = 294,
+ CONST = 295,
+ INTERNAL = 296,
+ LINKONCE = 297,
+ WEAK = 298,
+ APPENDING = 299,
+ DLLIMPORT = 300,
+ DLLEXPORT = 301,
+ EXTERN_WEAK = 302,
+ OPAQUE = 303,
+ NOT = 304,
+ EXTERNAL = 305,
+ TARGET = 306,
+ TRIPLE = 307,
+ ENDIAN = 308,
+ POINTERSIZE = 309,
+ LITTLE = 310,
+ BIG = 311,
+ ALIGN = 312,
+ DEPLIBS = 313,
+ CALL = 314,
+ TAIL = 315,
+ ASM_TOK = 316,
+ MODULE = 317,
+ SIDEEFFECT = 318,
+ CC_TOK = 319,
+ CCC_TOK = 320,
+ CSRETCC_TOK = 321,
+ FASTCC_TOK = 322,
+ COLDCC_TOK = 323,
+ X86_STDCALLCC_TOK = 324,
+ X86_FASTCALLCC_TOK = 325,
+ DATALAYOUT = 326,
+ RET = 327,
+ BR = 328,
+ SWITCH = 329,
+ INVOKE = 330,
+ UNREACHABLE = 331,
+ UNWIND = 332,
+ EXCEPT = 333,
+ ADD = 334,
+ SUB = 335,
+ MUL = 336,
+ DIV = 337,
+ UDIV = 338,
+ SDIV = 339,
+ FDIV = 340,
+ REM = 341,
+ UREM = 342,
+ SREM = 343,
+ FREM = 344,
+ AND = 345,
+ OR = 346,
+ XOR = 347,
+ SHL = 348,
+ SHR = 349,
+ ASHR = 350,
+ LSHR = 351,
+ SETLE = 352,
+ SETGE = 353,
+ SETLT = 354,
+ SETGT = 355,
+ SETEQ = 356,
+ SETNE = 357,
+ ICMP = 358,
+ FCMP = 359,
+ MALLOC = 360,
+ ALLOCA = 361,
+ FREE = 362,
+ LOAD = 363,
+ STORE = 364,
+ GETELEMENTPTR = 365,
+ PHI_TOK = 366,
+ SELECT = 367,
+ VAARG = 368,
+ EXTRACTELEMENT = 369,
+ INSERTELEMENT = 370,
+ SHUFFLEVECTOR = 371,
+ VAARG_old = 372,
+ VANEXT_old = 373,
+ EQ = 374,
+ NE = 375,
+ SLT = 376,
+ SGT = 377,
+ SLE = 378,
+ SGE = 379,
+ ULT = 380,
+ UGT = 381,
+ ULE = 382,
+ UGE = 383,
+ OEQ = 384,
+ ONE = 385,
+ OLT = 386,
+ OGT = 387,
+ OLE = 388,
+ OGE = 389,
+ ORD = 390,
+ UNO = 391,
+ UEQ = 392,
+ UNE = 393,
+ CAST = 394,
+ TRUNC = 395,
+ ZEXT = 396,
+ SEXT = 397,
+ FPTRUNC = 398,
+ FPEXT = 399,
+ FPTOUI = 400,
+ FPTOSI = 401,
+ UITOFP = 402,
+ SITOFP = 403,
+ PTRTOINT = 404,
+ INTTOPTR = 405,
+ BITCAST = 406
+ };
+#endif
+/* Tokens. */
+#define ESINT64VAL 258
+#define EUINT64VAL 259
+#define SINTVAL 260
+#define UINTVAL 261
+#define FPVAL 262
+#define VOID 263
+#define BOOL 264
+#define SBYTE 265
+#define UBYTE 266
+#define SHORT 267
+#define USHORT 268
+#define INT 269
+#define UINT 270
+#define LONG 271
+#define ULONG 272
+#define FLOAT 273
+#define DOUBLE 274
+#define TYPE 275
+#define LABEL 276
+#define VAR_ID 277
+#define LABELSTR 278
+#define STRINGCONSTANT 279
+#define IMPLEMENTATION 280
+#define ZEROINITIALIZER 281
+#define TRUETOK 282
+#define FALSETOK 283
+#define BEGINTOK 284
+#define ENDTOK 285
+#define DECLARE 286
+#define GLOBAL 287
+#define CONSTANT 288
+#define SECTION 289
+#define VOLATILE 290
+#define TO 291
+#define DOTDOTDOT 292
+#define NULL_TOK 293
+#define UNDEF 294
+#define CONST 295
+#define INTERNAL 296
+#define LINKONCE 297
+#define WEAK 298
+#define APPENDING 299
+#define DLLIMPORT 300
+#define DLLEXPORT 301
+#define EXTERN_WEAK 302
+#define OPAQUE 303
+#define NOT 304
+#define EXTERNAL 305
+#define TARGET 306
+#define TRIPLE 307
+#define ENDIAN 308
+#define POINTERSIZE 309
+#define LITTLE 310
+#define BIG 311
+#define ALIGN 312
+#define DEPLIBS 313
+#define CALL 314
+#define TAIL 315
+#define ASM_TOK 316
+#define MODULE 317
+#define SIDEEFFECT 318
+#define CC_TOK 319
+#define CCC_TOK 320
+#define CSRETCC_TOK 321
+#define FASTCC_TOK 322
+#define COLDCC_TOK 323
+#define X86_STDCALLCC_TOK 324
+#define X86_FASTCALLCC_TOK 325
+#define DATALAYOUT 326
+#define RET 327
+#define BR 328
+#define SWITCH 329
+#define INVOKE 330
+#define UNREACHABLE 331
+#define UNWIND 332
+#define EXCEPT 333
+#define ADD 334
+#define SUB 335
+#define MUL 336
+#define DIV 337
+#define UDIV 338
+#define SDIV 339
+#define FDIV 340
+#define REM 341
+#define UREM 342
+#define SREM 343
+#define FREM 344
+#define AND 345
+#define OR 346
+#define XOR 347
+#define SHL 348
+#define SHR 349
+#define ASHR 350
+#define LSHR 351
+#define SETLE 352
+#define SETGE 353
+#define SETLT 354
+#define SETGT 355
+#define SETEQ 356
+#define SETNE 357
+#define ICMP 358
+#define FCMP 359
+#define MALLOC 360
+#define ALLOCA 361
+#define FREE 362
+#define LOAD 363
+#define STORE 364
+#define GETELEMENTPTR 365
+#define PHI_TOK 366
+#define SELECT 367
+#define VAARG 368
+#define EXTRACTELEMENT 369
+#define INSERTELEMENT 370
+#define SHUFFLEVECTOR 371
+#define VAARG_old 372
+#define VANEXT_old 373
+#define EQ 374
+#define NE 375
+#define SLT 376
+#define SGT 377
+#define SLE 378
+#define SGE 379
+#define ULT 380
+#define UGT 381
+#define ULE 382
+#define UGE 383
+#define OEQ 384
+#define ONE 385
+#define OLT 386
+#define OGT 387
+#define OLE 388
+#define OGE 389
+#define ORD 390
+#define UNO 391
+#define UEQ 392
+#define UNE 393
+#define CAST 394
+#define TRUNC 395
+#define ZEXT 396
+#define SEXT 397
+#define FPTRUNC 398
+#define FPEXT 399
+#define FPTOUI 400
+#define FPTOSI 401
+#define UITOFP 402
+#define SITOFP 403
+#define PTRTOINT 404
+#define INTTOPTR 405
+#define BITCAST 406
+
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+#line 1454 "/Users/sabre/llvm/tools/llvm-upgrade/UpgradeParser.y"
+{
llvm::Module *ModuleVal;
llvm::Function *FunctionVal;
std::pair<llvm::PATypeInfo, char*> *ArgVal;
@@ -38,156 +387,14 @@
llvm::ICmpInst::Predicate IPred;
llvm::FCmpInst::Predicate FPred;
llvm::Module::Endianness Endianness;
-} YYSTYPE;
-#define ESINT64VAL 257
-#define EUINT64VAL 258
-#define SINTVAL 259
-#define UINTVAL 260
-#define FPVAL 261
-#define VOID 262
-#define BOOL 263
-#define SBYTE 264
-#define UBYTE 265
-#define SHORT 266
-#define USHORT 267
-#define INT 268
-#define UINT 269
-#define LONG 270
-#define ULONG 271
-#define FLOAT 272
-#define DOUBLE 273
-#define TYPE 274
-#define LABEL 275
-#define VAR_ID 276
-#define LABELSTR 277
-#define STRINGCONSTANT 278
-#define IMPLEMENTATION 279
-#define ZEROINITIALIZER 280
-#define TRUETOK 281
-#define FALSETOK 282
-#define BEGINTOK 283
-#define ENDTOK 284
-#define DECLARE 285
-#define GLOBAL 286
-#define CONSTANT 287
-#define SECTION 288
-#define VOLATILE 289
-#define TO 290
-#define DOTDOTDOT 291
-#define NULL_TOK 292
-#define UNDEF 293
-#define CONST 294
-#define INTERNAL 295
-#define LINKONCE 296
-#define WEAK 297
-#define APPENDING 298
-#define DLLIMPORT 299
-#define DLLEXPORT 300
-#define EXTERN_WEAK 301
-#define OPAQUE 302
-#define NOT 303
-#define EXTERNAL 304
-#define TARGET 305
-#define TRIPLE 306
-#define ENDIAN 307
-#define POINTERSIZE 308
-#define LITTLE 309
-#define BIG 310
-#define ALIGN 311
-#define DEPLIBS 312
-#define CALL 313
-#define TAIL 314
-#define ASM_TOK 315
-#define MODULE 316
-#define SIDEEFFECT 317
-#define CC_TOK 318
-#define CCC_TOK 319
-#define CSRETCC_TOK 320
-#define FASTCC_TOK 321
-#define COLDCC_TOK 322
-#define X86_STDCALLCC_TOK 323
-#define X86_FASTCALLCC_TOK 324
-#define DATALAYOUT 325
-#define RET 326
-#define BR 327
-#define SWITCH 328
-#define INVOKE 329
-#define UNREACHABLE 330
-#define UNWIND 331
-#define EXCEPT 332
-#define ADD 333
-#define SUB 334
-#define MUL 335
-#define DIV 336
-#define UDIV 337
-#define SDIV 338
-#define FDIV 339
-#define REM 340
-#define UREM 341
-#define SREM 342
-#define FREM 343
-#define AND 344
-#define OR 345
-#define XOR 346
-#define SHL 347
-#define SHR 348
-#define ASHR 349
-#define LSHR 350
-#define SETLE 351
-#define SETGE 352
-#define SETLT 353
-#define SETGT 354
-#define SETEQ 355
-#define SETNE 356
-#define ICMP 357
-#define FCMP 358
-#define MALLOC 359
-#define ALLOCA 360
-#define FREE 361
-#define LOAD 362
-#define STORE 363
-#define GETELEMENTPTR 364
-#define PHI_TOK 365
-#define SELECT 366
-#define VAARG 367
-#define EXTRACTELEMENT 368
-#define INSERTELEMENT 369
-#define SHUFFLEVECTOR 370
-#define VAARG_old 371
-#define VANEXT_old 372
-#define EQ 373
-#define NE 374
-#define SLT 375
-#define SGT 376
-#define SLE 377
-#define SGE 378
-#define ULT 379
-#define UGT 380
-#define ULE 381
-#define UGE 382
-#define OEQ 383
-#define ONE 384
-#define OLT 385
-#define OGT 386
-#define OLE 387
-#define OGE 388
-#define ORD 389
-#define UNO 390
-#define UEQ 391
-#define UNE 392
-#define CAST 393
-#define TRUNC 394
-#define ZEXT 395
-#define SEXT 396
-#define FPTRUNC 397
-#define FPEXT 398
-#define FPTOUI 399
-#define FPTOSI 400
-#define UITOFP 401
-#define SITOFP 402
-#define PTRTOINT 403
-#define INTTOPTR 404
-#define BITCAST 405
-
+}
+/* Line 1529 of yacc.c. */
+#line 393 "UpgradeParser.tab.h"
+ YYSTYPE;
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
extern YYSTYPE Upgradelval;
+
Index: llvm/tools/llvm-upgrade/UpgradeParser.y
diff -u llvm/tools/llvm-upgrade/UpgradeParser.y:1.63 llvm/tools/llvm-upgrade/UpgradeParser.y:1.64
--- llvm/tools/llvm-upgrade/UpgradeParser.y:1.63 Sun Feb 11 15:38:38 2007
+++ llvm/tools/llvm-upgrade/UpgradeParser.y Mon Feb 12 16:58:38 2007
@@ -1287,7 +1287,7 @@
}
const Type *IdxTy =
- GetElementPtrInst::getIndexedType(PTy, VIndices, true);
+ GetElementPtrInst::getIndexedType(PTy, &VIndices[0], VIndices.size(), true);
if (!IdxTy)
error("Index list invalid for constant getelementptr");
return IdxTy;
@@ -3483,7 +3483,7 @@
upgradeGEPIndices(Ty, $4, VIndices);
Value* tmpVal = getVal(Ty, $3);
- $$.I = new GetElementPtrInst(tmpVal, VIndices);
+ $$.I = new GetElementPtrInst(tmpVal, &VIndices[0], VIndices.size());
$$.S = Signless;
delete $2.PAT;
delete $4;
Index: llvm/tools/llvm-upgrade/UpgradeParser.y.cvs
diff -u llvm/tools/llvm-upgrade/UpgradeParser.y.cvs:1.59 llvm/tools/llvm-upgrade/UpgradeParser.y.cvs:1.60
--- llvm/tools/llvm-upgrade/UpgradeParser.y.cvs:1.59 Sun Feb 11 15:39:05 2007
+++ llvm/tools/llvm-upgrade/UpgradeParser.y.cvs Mon Feb 12 16:58:38 2007
@@ -1287,7 +1287,7 @@
}
const Type *IdxTy =
- GetElementPtrInst::getIndexedType(PTy, VIndices, true);
+ GetElementPtrInst::getIndexedType(PTy, &VIndices[0], VIndices.size(), true);
if (!IdxTy)
error("Index list invalid for constant getelementptr");
return IdxTy;
@@ -3483,7 +3483,7 @@
upgradeGEPIndices(Ty, $4, VIndices);
Value* tmpVal = getVal(Ty, $3);
- $$.I = new GetElementPtrInst(tmpVal, VIndices);
+ $$.I = new GetElementPtrInst(tmpVal, &VIndices[0], VIndices.size());
$$.S = Signless;
delete $2.PAT;
delete $4;
More information about the llvm-commits
mailing list