From 8adde28039ce95c9ba64af6491cf3cde3238c6f8 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 11 Feb 2007 21:40:10 +0000 Subject: [PATCH] regenerate git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34188 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AsmParser/llvmAsmParser.cpp.cvs | 7009 +++++++++------------ lib/AsmParser/llvmAsmParser.h.cvs | 439 +- lib/AsmParser/llvmAsmParser.y.cvs | 1 + tools/llvm-upgrade/UpgradeParser.cpp.cvs | 7298 ++++++++++------------ tools/llvm-upgrade/UpgradeParser.h.cvs | 499 +- tools/llvm-upgrade/UpgradeParser.y.cvs | 1 + 6 files changed, 6523 insertions(+), 8724 deletions(-) diff --git a/lib/AsmParser/llvmAsmParser.cpp.cvs b/lib/AsmParser/llvmAsmParser.cpp.cvs index b34c534eaa9..23a280ecb25 100644 --- a/lib/AsmParser/llvmAsmParser.cpp.cvs +++ b/lib/AsmParser/llvmAsmParser.cpp.cvs @@ -1,336 +1,147 @@ -/* A Bison parser, made by GNU Bison 2.1. */ -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* A Bison parser, made from /Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y + by GNU Bison version 1.28 */ - 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. +#define YYBISON 1 /* Identify Bison output. */ - 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, 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. */ - -/* 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.1" - -/* 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 llvmAsmparse -#define yylex llvmAsmlex +#define yylex llvmAsmlex #define yyerror llvmAsmerror -#define yylval llvmAsmlval -#define yychar llvmAsmchar +#define yylval llvmAsmlval +#define yychar llvmAsmchar #define yydebug llvmAsmdebug #define yynerrs llvmAsmnerrs +#define ESINT64VAL 257 +#define EUINT64VAL 258 +#define LOCALVAL_ID 259 +#define GLOBALVAL_ID 260 +#define FPVAL 261 +#define VOID 262 +#define INTTYPE 263 +#define FLOAT 264 +#define DOUBLE 265 +#define LABEL 266 +#define TYPE 267 +#define LOCALVAR 268 +#define GLOBALVAR 269 +#define LABELSTR 270 +#define STRINGCONSTANT 271 +#define ATSTRINGCONSTANT 272 +#define IMPLEMENTATION 273 +#define ZEROINITIALIZER 274 +#define TRUETOK 275 +#define FALSETOK 276 +#define BEGINTOK 277 +#define ENDTOK 278 +#define DECLARE 279 +#define DEFINE 280 +#define GLOBAL 281 +#define CONSTANT 282 +#define SECTION 283 +#define VOLATILE 284 +#define TO 285 +#define DOTDOTDOT 286 +#define NULL_TOK 287 +#define UNDEF 288 +#define INTERNAL 289 +#define LINKONCE 290 +#define WEAK 291 +#define APPENDING 292 +#define DLLIMPORT 293 +#define DLLEXPORT 294 +#define EXTERN_WEAK 295 +#define OPAQUE 296 +#define EXTERNAL 297 +#define TARGET 298 +#define TRIPLE 299 +#define ALIGN 300 +#define DEPLIBS 301 +#define CALL 302 +#define TAIL 303 +#define ASM_TOK 304 +#define MODULE 305 +#define SIDEEFFECT 306 +#define CC_TOK 307 +#define CCC_TOK 308 +#define FASTCC_TOK 309 +#define COLDCC_TOK 310 +#define X86_STDCALLCC_TOK 311 +#define X86_FASTCALLCC_TOK 312 +#define DATALAYOUT 313 +#define RET 314 +#define BR 315 +#define SWITCH 316 +#define INVOKE 317 +#define UNWIND 318 +#define UNREACHABLE 319 +#define ADD 320 +#define SUB 321 +#define MUL 322 +#define UDIV 323 +#define SDIV 324 +#define FDIV 325 +#define UREM 326 +#define SREM 327 +#define FREM 328 +#define AND 329 +#define OR 330 +#define XOR 331 +#define SHL 332 +#define LSHR 333 +#define ASHR 334 +#define ICMP 335 +#define FCMP 336 +#define EQ 337 +#define NE 338 +#define SLT 339 +#define SGT 340 +#define SLE 341 +#define SGE 342 +#define ULT 343 +#define UGT 344 +#define ULE 345 +#define UGE 346 +#define OEQ 347 +#define ONE 348 +#define OLT 349 +#define OGT 350 +#define OLE 351 +#define OGE 352 +#define ORD 353 +#define UNO 354 +#define UEQ 355 +#define UNE 356 +#define MALLOC 357 +#define ALLOCA 358 +#define FREE 359 +#define LOAD 360 +#define STORE 361 +#define GETELEMENTPTR 362 +#define TRUNC 363 +#define ZEXT 364 +#define SEXT 365 +#define FPTRUNC 366 +#define FPEXT 367 +#define BITCAST 368 +#define UITOFP 369 +#define SITOFP 370 +#define FPTOUI 371 +#define FPTOSI 372 +#define INTTOPTR 373 +#define PTRTOINT 374 +#define PHI_TOK 375 +#define SELECT 376 +#define VAARG 377 +#define EXTRACTELEMENT 378 +#define INSERTELEMENT 379 +#define SHUFFLEVECTOR 380 +#define NORETURN 381 +#define INREG 382 +#define SRET 383 +#define DEFAULT 384 +#define HIDDEN 385 - -/* 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, - LOCALVAL_ID = 260, - GLOBALVAL_ID = 261, - FPVAL = 262, - VOID = 263, - INTTYPE = 264, - FLOAT = 265, - DOUBLE = 266, - LABEL = 267, - TYPE = 268, - LOCALVAR = 269, - GLOBALVAR = 270, - LABELSTR = 271, - STRINGCONSTANT = 272, - ATSTRINGCONSTANT = 273, - IMPLEMENTATION = 274, - ZEROINITIALIZER = 275, - TRUETOK = 276, - FALSETOK = 277, - BEGINTOK = 278, - ENDTOK = 279, - DECLARE = 280, - DEFINE = 281, - GLOBAL = 282, - CONSTANT = 283, - SECTION = 284, - VOLATILE = 285, - TO = 286, - DOTDOTDOT = 287, - NULL_TOK = 288, - UNDEF = 289, - INTERNAL = 290, - LINKONCE = 291, - WEAK = 292, - APPENDING = 293, - DLLIMPORT = 294, - DLLEXPORT = 295, - EXTERN_WEAK = 296, - OPAQUE = 297, - EXTERNAL = 298, - TARGET = 299, - TRIPLE = 300, - ALIGN = 301, - DEPLIBS = 302, - CALL = 303, - TAIL = 304, - ASM_TOK = 305, - MODULE = 306, - SIDEEFFECT = 307, - CC_TOK = 308, - CCC_TOK = 309, - FASTCC_TOK = 310, - COLDCC_TOK = 311, - X86_STDCALLCC_TOK = 312, - X86_FASTCALLCC_TOK = 313, - DATALAYOUT = 314, - RET = 315, - BR = 316, - SWITCH = 317, - INVOKE = 318, - UNWIND = 319, - UNREACHABLE = 320, - ADD = 321, - SUB = 322, - MUL = 323, - UDIV = 324, - SDIV = 325, - FDIV = 326, - UREM = 327, - SREM = 328, - FREM = 329, - AND = 330, - OR = 331, - XOR = 332, - SHL = 333, - LSHR = 334, - ASHR = 335, - ICMP = 336, - FCMP = 337, - EQ = 338, - NE = 339, - SLT = 340, - SGT = 341, - SLE = 342, - SGE = 343, - ULT = 344, - UGT = 345, - ULE = 346, - UGE = 347, - OEQ = 348, - ONE = 349, - OLT = 350, - OGT = 351, - OLE = 352, - OGE = 353, - ORD = 354, - UNO = 355, - UEQ = 356, - UNE = 357, - MALLOC = 358, - ALLOCA = 359, - FREE = 360, - LOAD = 361, - STORE = 362, - GETELEMENTPTR = 363, - TRUNC = 364, - ZEXT = 365, - SEXT = 366, - FPTRUNC = 367, - FPEXT = 368, - BITCAST = 369, - UITOFP = 370, - SITOFP = 371, - FPTOUI = 372, - FPTOSI = 373, - INTTOPTR = 374, - PTRTOINT = 375, - PHI_TOK = 376, - SELECT = 377, - VAARG = 378, - EXTRACTELEMENT = 379, - INSERTELEMENT = 380, - SHUFFLEVECTOR = 381, - NORETURN = 382, - INREG = 383, - SRET = 384, - DEFAULT = 385, - HIDDEN = 386 - }; -#endif -/* Tokens. */ -#define ESINT64VAL 258 -#define EUINT64VAL 259 -#define LOCALVAL_ID 260 -#define GLOBALVAL_ID 261 -#define FPVAL 262 -#define VOID 263 -#define INTTYPE 264 -#define FLOAT 265 -#define DOUBLE 266 -#define LABEL 267 -#define TYPE 268 -#define LOCALVAR 269 -#define GLOBALVAR 270 -#define LABELSTR 271 -#define STRINGCONSTANT 272 -#define ATSTRINGCONSTANT 273 -#define IMPLEMENTATION 274 -#define ZEROINITIALIZER 275 -#define TRUETOK 276 -#define FALSETOK 277 -#define BEGINTOK 278 -#define ENDTOK 279 -#define DECLARE 280 -#define DEFINE 281 -#define GLOBAL 282 -#define CONSTANT 283 -#define SECTION 284 -#define VOLATILE 285 -#define TO 286 -#define DOTDOTDOT 287 -#define NULL_TOK 288 -#define UNDEF 289 -#define INTERNAL 290 -#define LINKONCE 291 -#define WEAK 292 -#define APPENDING 293 -#define DLLIMPORT 294 -#define DLLEXPORT 295 -#define EXTERN_WEAK 296 -#define OPAQUE 297 -#define EXTERNAL 298 -#define TARGET 299 -#define TRIPLE 300 -#define ALIGN 301 -#define DEPLIBS 302 -#define CALL 303 -#define TAIL 304 -#define ASM_TOK 305 -#define MODULE 306 -#define SIDEEFFECT 307 -#define CC_TOK 308 -#define CCC_TOK 309 -#define FASTCC_TOK 310 -#define COLDCC_TOK 311 -#define X86_STDCALLCC_TOK 312 -#define X86_FASTCALLCC_TOK 313 -#define DATALAYOUT 314 -#define RET 315 -#define BR 316 -#define SWITCH 317 -#define INVOKE 318 -#define UNWIND 319 -#define UNREACHABLE 320 -#define ADD 321 -#define SUB 322 -#define MUL 323 -#define UDIV 324 -#define SDIV 325 -#define FDIV 326 -#define UREM 327 -#define SREM 328 -#define FREM 329 -#define AND 330 -#define OR 331 -#define XOR 332 -#define SHL 333 -#define LSHR 334 -#define ASHR 335 -#define ICMP 336 -#define FCMP 337 -#define EQ 338 -#define NE 339 -#define SLT 340 -#define SGT 341 -#define SLE 342 -#define SGE 343 -#define ULT 344 -#define UGT 345 -#define ULE 346 -#define UGE 347 -#define OEQ 348 -#define ONE 349 -#define OLT 350 -#define OGT 351 -#define OLE 352 -#define OGE 353 -#define ORD 354 -#define UNO 355 -#define UEQ 356 -#define UNE 357 -#define MALLOC 358 -#define ALLOCA 359 -#define FREE 360 -#define LOAD 361 -#define STORE 362 -#define GETELEMENTPTR 363 -#define TRUNC 364 -#define ZEXT 365 -#define SEXT 366 -#define FPTRUNC 367 -#define FPEXT 368 -#define BITCAST 369 -#define UITOFP 370 -#define SITOFP 371 -#define FPTOUI 372 -#define FPTOSI 373 -#define INTTOPTR 374 -#define PTRTOINT 375 -#define PHI_TOK 376 -#define SELECT 377 -#define VAARG 378 -#define EXTRACTELEMENT 379 -#define INSERTELEMENT 380 -#define SHUFFLEVECTOR 381 -#define NORETURN 382 -#define INREG 383 -#define SRET 384 -#define DEFAULT 385 -#define HIDDEN 386 - - - - -/* Copy the first part of user declarations. */ -#line 14 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" +#line 14 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" #include "ParserInternals.h" #include "llvm/CallingConv.h" @@ -346,6 +157,7 @@ #include "llvm/Support/Streams.h" #include #include +#include #include #ifndef NDEBUG #define YYDEBUG 1 @@ -1216,28 +1028,8 @@ Module *llvm::RunVMAsmParser(const char * AsmString, Module * M) { } - -/* 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) -#line 900 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" -typedef union YYSTYPE { +#line 901 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +typedef union { llvm::Module *ModuleVal; llvm::Function *FunctionVal; llvm::BasicBlock *BasicBlockVal; @@ -1282,1519 +1074,1061 @@ typedef union YYSTYPE { llvm::ICmpInst::Predicate IPredicate; llvm::FCmpInst::Predicate FPredicate; } YYSTYPE; -/* Line 196 of yacc.c. */ -#line 1287 "llvmAsmParser.tab.c" -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 +#include + +#ifndef __cplusplus +#ifndef __STDC__ +#define const +#endif #endif -/* Copy the second part of user declarations. */ +#define YYFINAL 557 +#define YYFLAG -32768 +#define YYNTBASE 146 +#define YYTRANSLATE(x) ((unsigned)(x) <= 385 ? yytranslate[x] : 223) -/* Line 219 of yacc.c. */ -#line 1299 "llvmAsmParser.tab.c" +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, 136, + 137, 134, 2, 133, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 141, + 132, 142, 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, + 138, 135, 140, 2, 2, 2, 2, 2, 145, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 139, + 2, 2, 143, 2, 144, 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 +}; -#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -# define YYSIZE_T __SIZE_TYPE__ -#endif -#if ! defined (YYSIZE_T) && defined (size_t) -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus)) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) -# define YYSIZE_T unsigned int -#endif +#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, + 119, 122, 123, 125, 127, 130, 131, 133, 135, 137, + 139, 141, 143, 145, 147, 148, 150, 151, 153, 155, + 156, 158, 160, 162, 164, 165, 167, 169, 171, 173, + 175, 178, 180, 182, 184, 186, 187, 190, 192, 194, + 195, 198, 199, 202, 203, 207, 210, 211, 213, 214, + 218, 220, 223, 225, 227, 229, 231, 233, 235, 238, + 240, 243, 249, 255, 261, 267, 271, 274, 280, 285, + 288, 290, 292, 294, 298, 300, 304, 306, 307, 309, + 313, 318, 322, 326, 331, 336, 340, 347, 353, 356, + 359, 362, 365, 368, 371, 374, 377, 380, 383, 390, + 396, 405, 412, 419, 427, 435, 442, 451, 460, 464, + 466, 468, 470, 472, 473, 475, 478, 479, 483, 484, + 488, 492, 494, 498, 502, 503, 510, 511, 519, 520, + 528, 531, 535, 537, 541, 545, 549, 553, 555, 556, + 562, 566, 568, 572, 574, 575, 585, 587, 589, 594, + 596, 598, 601, 605, 606, 608, 610, 612, 614, 616, + 618, 620, 622, 624, 628, 630, 636, 638, 640, 642, + 644, 646, 648, 651, 654, 657, 661, 664, 665, 667, + 670, 673, 677, 687, 697, 706, 721, 723, 725, 732, + 738, 741, 748, 756, 760, 766, 767, 768, 772, 775, + 777, 783, 789, 796, 803, 808, 815, 820, 825, 832, + 839, 842, 851, 853, 855, 856, 860, 867, 871, 878, + 881, 886, 893 +}; -#ifndef YY_ -# if YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid -# endif -#endif - -#if ! defined (yyoverflow) || YYERROR_VERBOSE - -/* 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 -# else -# define YYSTACK_ALLOC alloca -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYINCLUDED_STDLIB_H -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (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 2005 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1) -# endif -# ifdef __cplusplus -extern "C" { -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \ - && (defined (__STDC__) || defined (__cplusplus))) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \ - && (defined (__STDC__) || defined (__cplusplus))) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifdef __cplusplus -} -# 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 -{ - short int 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 (short int) + 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 (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 (0) +static const short yyrhs[] = { 66, + 0, 67, 0, 68, 0, 69, 0, 70, 0, 71, + 0, 72, 0, 73, 0, 74, 0, 78, 0, 79, + 0, 80, 0, 75, 0, 76, 0, 77, 0, 109, + 0, 110, 0, 111, 0, 112, 0, 113, 0, 114, + 0, 115, 0, 116, 0, 117, 0, 118, 0, 119, + 0, 120, 0, 83, 0, 84, 0, 85, 0, 86, + 0, 87, 0, 88, 0, 89, 0, 90, 0, 91, + 0, 92, 0, 93, 0, 94, 0, 95, 0, 96, + 0, 97, 0, 98, 0, 99, 0, 100, 0, 101, + 0, 102, 0, 89, 0, 90, 0, 91, 0, 92, + 0, 21, 0, 22, 0, 9, 0, 10, 0, 11, + 0, 14, 0, 17, 0, 153, 0, 0, 153, 132, + 0, 0, 15, 0, 18, 0, 156, 132, 0, 0, + 35, 0, 37, 0, 36, 0, 38, 0, 40, 0, + 39, 0, 41, 0, 43, 0, 0, 131, 0, 0, + 39, 0, 41, 0, 0, 35, 0, 36, 0, 37, + 0, 40, 0, 0, 54, 0, 55, 0, 56, 0, + 57, 0, 58, 0, 53, 4, 0, 110, 0, 111, + 0, 128, 0, 129, 0, 0, 165, 164, 0, 127, + 0, 164, 0, 0, 167, 166, 0, 0, 46, 4, + 0, 0, 133, 46, 4, 0, 29, 17, 0, 0, + 170, 0, 0, 133, 173, 172, 0, 170, 0, 46, + 4, 0, 9, 0, 10, 0, 11, 0, 12, 0, + 42, 0, 174, 0, 175, 134, 0, 207, 0, 135, + 4, 0, 175, 136, 179, 137, 167, 0, 8, 136, + 179, 137, 167, 0, 138, 4, 139, 175, 140, 0, + 141, 4, 139, 175, 142, 0, 143, 180, 144, 0, + 143, 144, 0, 141, 143, 180, 144, 142, 0, 141, + 143, 144, 142, 0, 175, 165, 0, 175, 0, 8, + 0, 176, 0, 178, 133, 176, 0, 178, 0, 178, + 133, 32, 0, 32, 0, 0, 175, 0, 180, 133, + 175, 0, 175, 138, 183, 140, 0, 175, 138, 140, + 0, 175, 145, 17, 0, 175, 141, 183, 142, 0, + 175, 143, 183, 144, 0, 175, 143, 144, 0, 175, + 141, 143, 183, 144, 142, 0, 175, 141, 143, 144, + 142, 0, 175, 33, 0, 175, 34, 0, 175, 207, + 0, 175, 182, 0, 175, 20, 0, 151, 3, 0, + 151, 4, 0, 9, 21, 0, 9, 22, 0, 152, + 7, 0, 148, 136, 181, 31, 175, 137, 0, 108, + 136, 181, 218, 137, 0, 122, 136, 181, 133, 181, + 133, 181, 137, 0, 146, 136, 181, 133, 181, 137, + 0, 147, 136, 181, 133, 181, 137, 0, 81, 149, + 136, 181, 133, 181, 137, 0, 82, 150, 136, 181, + 133, 181, 137, 0, 124, 136, 181, 133, 181, 137, + 0, 125, 136, 181, 133, 181, 133, 181, 137, 0, + 126, 136, 181, 133, 181, 133, 181, 137, 0, 183, + 133, 181, 0, 181, 0, 27, 0, 28, 0, 186, + 0, 0, 187, 0, 186, 187, 0, 0, 26, 188, + 203, 0, 0, 25, 189, 204, 0, 51, 50, 193, + 0, 19, 0, 155, 13, 175, 0, 155, 13, 8, + 0, 0, 157, 160, 184, 181, 190, 172, 0, 0, + 157, 158, 160, 184, 181, 191, 172, 0, 0, 157, + 159, 160, 184, 175, 192, 172, 0, 44, 194, 0, + 47, 132, 195, 0, 17, 0, 45, 132, 17, 0, + 59, 132, 17, 0, 138, 196, 140, 0, 196, 133, + 17, 0, 17, 0, 0, 197, 133, 175, 165, 154, + 0, 175, 165, 154, 0, 197, 0, 197, 133, 32, + 0, 32, 0, 0, 163, 177, 156, 136, 198, 137, + 167, 171, 168, 0, 23, 0, 143, 0, 162, 160, + 199, 200, 0, 24, 0, 144, 0, 210, 202, 0, + 161, 160, 199, 0, 0, 52, 0, 3, 0, 4, + 0, 7, 0, 21, 0, 22, 0, 33, 0, 34, + 0, 20, 0, 141, 183, 142, 0, 182, 0, 50, + 205, 17, 133, 17, 0, 5, 0, 6, 0, 153, + 0, 156, 0, 207, 0, 206, 0, 175, 208, 0, + 210, 211, 0, 201, 211, 0, 212, 155, 213, 0, + 212, 215, 0, 0, 16, 0, 60, 209, 0, 60, + 8, 0, 61, 12, 208, 0, 61, 9, 208, 133, + 12, 208, 133, 12, 208, 0, 62, 151, 208, 133, + 12, 208, 138, 214, 140, 0, 62, 151, 208, 133, + 12, 208, 138, 140, 0, 63, 163, 177, 208, 136, + 217, 137, 167, 31, 12, 208, 64, 12, 208, 0, + 64, 0, 65, 0, 214, 151, 206, 133, 12, 208, + 0, 151, 206, 133, 12, 208, 0, 155, 220, 0, + 175, 138, 208, 133, 208, 140, 0, 216, 133, 138, + 208, 133, 208, 140, 0, 175, 208, 165, 0, 217, + 133, 175, 208, 165, 0, 0, 0, 218, 133, 209, + 0, 49, 48, 0, 48, 0, 146, 175, 208, 133, + 208, 0, 147, 175, 208, 133, 208, 0, 81, 149, + 175, 208, 133, 208, 0, 82, 150, 175, 208, 133, + 208, 0, 148, 209, 31, 175, 0, 122, 209, 133, + 209, 133, 209, 0, 123, 209, 133, 175, 0, 124, + 209, 133, 209, 0, 125, 209, 133, 209, 133, 209, + 0, 126, 209, 133, 209, 133, 209, 0, 121, 216, + 0, 219, 163, 177, 208, 136, 217, 137, 167, 0, + 222, 0, 30, 0, 0, 103, 175, 169, 0, 103, + 175, 133, 9, 208, 169, 0, 104, 175, 169, 0, + 104, 175, 133, 9, 208, 169, 0, 105, 209, 0, + 221, 106, 175, 208, 0, 221, 107, 209, 133, 175, + 208, 0, 108, 175, 208, 218, 0 +}; #endif -#if defined (__STDC__) || defined (__cplusplus) - typedef signed char yysigned_char; +#if YYDEBUG != 0 +static const short yyrline[] = { 0, + 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1048, 1049, + 1049, 1049, 1049, 1049, 1049, 1050, 1050, 1050, 1050, 1050, + 1050, 1050, 1051, 1051, 1051, 1051, 1051, 1054, 1054, 1055, + 1055, 1056, 1056, 1057, 1057, 1058, 1058, 1062, 1062, 1063, + 1063, 1064, 1064, 1065, 1065, 1066, 1066, 1067, 1067, 1068, + 1068, 1069, 1070, 1075, 1076, 1076, 1078, 1078, 1079, 1079, + 1083, 1087, 1092, 1092, 1094, 1098, 1104, 1105, 1106, 1107, + 1108, 1112, 1113, 1114, 1118, 1119, 1123, 1124, 1125, 1129, + 1130, 1131, 1132, 1133, 1136, 1136, 1137, 1138, 1139, 1140, + 1141, 1149, 1150, 1151, 1152, 1155, 1156, 1161, 1162, 1165, + 1166, 1173, 1173, 1180, 1180, 1189, 1197, 1197, 1203, 1203, + 1205, 1210, 1223, 1223, 1223, 1223, 1226, 1230, 1234, 1241, + 1246, 1254, 1272, 1290, 1295, 1307, 1317, 1321, 1331, 1338, + 1345, 1352, 1357, 1362, 1369, 1370, 1377, 1384, 1392, 1397, + 1408, 1436, 1452, 1481, 1509, 1534, 1553, 1578, 1597, 1609, + 1616, 1682, 1692, 1702, 1708, 1714, 1719, 1724, 1732, 1744, + 1765, 1773, 1779, 1790, 1795, 1800, 1806, 1812, 1821, 1825, + 1833, 1833, 1844, 1849, 1857, 1858, 1862, 1862, 1866, 1866, + 1869, 1872, 1884, 1908, 1919, 1926, 1929, 1934, 1937, 1943, + 1947, 1950, 1956, 1969, 1973, 1978, 1980, 1985, 1990, 1999, + 2009, 2020, 2024, 2033, 2042, 2047, 2159, 2159, 2161, 2170, + 2170, 2172, 2177, 2189, 2193, 2198, 2202, 2206, 2210, 2214, + 2218, 2222, 2226, 2230, 2255, 2259, 2273, 2277, 2281, 2285, + 2291, 2291, 2297, 2306, 2310, 2319, 2329, 2338, 2350, 2363, + 2367, 2371, 2376, 2386, 2405, 2414, 2481, 2485, 2492, 2503, + 2516, 2526, 2537, 2547, 2555, 2563, 2566, 2567, 2574, 2578, + 2583, 2604, 2621, 2634, 2647, 2659, 2667, 2674, 2680, 2686, + 2692, 2707, 2771, 2776, 2780, 2787, 2794, 2802, 2809, 2817, + 2825, 2839, 2856 +}; +#endif + + +#if YYDEBUG != 0 || defined (YYERROR_VERBOSE) + +static const char * const yytname[] = { "$","error","$undefined.","ESINT64VAL", +"EUINT64VAL","LOCALVAL_ID","GLOBALVAL_ID","FPVAL","VOID","INTTYPE","FLOAT","DOUBLE", +"LABEL","TYPE","LOCALVAR","GLOBALVAR","LABELSTR","STRINGCONSTANT","ATSTRINGCONSTANT", +"IMPLEMENTATION","ZEROINITIALIZER","TRUETOK","FALSETOK","BEGINTOK","ENDTOK", +"DECLARE","DEFINE","GLOBAL","CONSTANT","SECTION","VOLATILE","TO","DOTDOTDOT", +"NULL_TOK","UNDEF","INTERNAL","LINKONCE","WEAK","APPENDING","DLLIMPORT","DLLEXPORT", +"EXTERN_WEAK","OPAQUE","EXTERNAL","TARGET","TRIPLE","ALIGN","DEPLIBS","CALL", +"TAIL","ASM_TOK","MODULE","SIDEEFFECT","CC_TOK","CCC_TOK","FASTCC_TOK","COLDCC_TOK", +"X86_STDCALLCC_TOK","X86_FASTCALLCC_TOK","DATALAYOUT","RET","BR","SWITCH","INVOKE", +"UNWIND","UNREACHABLE","ADD","SUB","MUL","UDIV","SDIV","FDIV","UREM","SREM", +"FREM","AND","OR","XOR","SHL","LSHR","ASHR","ICMP","FCMP","EQ","NE","SLT","SGT", +"SLE","SGE","ULT","UGT","ULE","UGE","OEQ","ONE","OLT","OGT","OLE","OGE","ORD", +"UNO","UEQ","UNE","MALLOC","ALLOCA","FREE","LOAD","STORE","GETELEMENTPTR","TRUNC", +"ZEXT","SEXT","FPTRUNC","FPEXT","BITCAST","UITOFP","SITOFP","FPTOUI","FPTOSI", +"INTTOPTR","PTRTOINT","PHI_TOK","SELECT","VAARG","EXTRACTELEMENT","INSERTELEMENT", +"SHUFFLEVECTOR","NORETURN","INREG","SRET","DEFAULT","HIDDEN","'='","','","'*'", +"'\\\\'","'('","')'","'['","'x'","']'","'<'","'>'","'{'","'}'","'c'","ArithmeticOps", +"LogicalOps","CastOps","IPredicates","FPredicates","IntType","FPType","LocalName", +"OptLocalName","OptLocalAssign","GlobalName","OptGlobalAssign","GVInternalLinkage", +"GVExternalLinkage","GVVisibilityStyle","FunctionDeclareLinkage","FunctionDefineLinkage", +"OptCallingConv","ParamAttr","OptParamAttrs","FuncAttr","OptFuncAttrs","OptAlign", +"OptCAlign","SectionString","OptSection","GlobalVarAttributes","GlobalVarAttribute", +"PrimType","Types","ArgType","ResultTypes","ArgTypeList","ArgTypeListI","TypeListI", +"ConstVal","ConstExpr","ConstVector","GlobalType","Module","DefinitionList", +"Definition","@1","@2","@3","@4","@5","AsmBlock","TargetDefinition","LibrariesDefinition", +"LibList","ArgListH","ArgList","FunctionHeaderH","BEGIN","FunctionHeader","END", +"Function","FunctionProto","OptSideEffect","ConstValueRef","SymbolicValueRef", +"ValueRef","ResolvedVal","BasicBlockList","BasicBlock","InstructionList","BBTerminatorInst", +"JumpTable","Inst","PHIList","ValueRefList","IndexList","OptTailCall","InstVal", +"OptVolatile","MemoryInst", NULL +}; +#endif + +static const short yyr1[] = { 0, + 146, 146, 146, 146, 146, 146, 146, 146, 146, 147, + 147, 147, 147, 147, 147, 148, 148, 148, 148, 148, + 148, 148, 148, 148, 148, 148, 148, 149, 149, 149, + 149, 149, 149, 149, 149, 149, 149, 150, 150, 150, + 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, + 150, 150, 150, 151, 152, 152, 153, 153, 154, 154, + 155, 155, 156, 156, 157, 157, 158, 158, 158, 158, + 158, 159, 159, 159, 160, 160, 161, 161, 161, 162, + 162, 162, 162, 162, 163, 163, 163, 163, 163, 163, + 163, 164, 164, 164, 164, 165, 165, 166, 166, 167, + 167, 168, 168, 169, 169, 170, 171, 171, 172, 172, + 173, 173, 174, 174, 174, 174, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 175, 175, 175, 175, 176, + 177, 177, 178, 178, 179, 179, 179, 179, 180, 180, + 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, + 181, 181, 181, 181, 181, 181, 181, 181, 182, 182, + 182, 182, 182, 182, 182, 182, 182, 182, 183, 183, + 184, 184, 185, 185, 186, 186, 188, 187, 189, 187, + 187, 187, 187, 187, 190, 187, 191, 187, 192, 187, + 187, 187, 193, 194, 194, 195, 196, 196, 196, 197, + 197, 198, 198, 198, 198, 199, 200, 200, 201, 202, + 202, 203, 204, 205, 205, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 206, 206, 207, 207, 207, 207, + 208, 208, 209, 210, 210, 211, 212, 212, 212, 213, + 213, 213, 213, 213, 213, 213, 213, 213, 214, 214, + 215, 216, 216, 217, 217, 217, 218, 218, 219, 219, + 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + 220, 220, 220, 221, 221, 222, 222, 222, 222, 222, + 222, 222, 222 +}; + +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, 0, + 2, 0, 1, 1, 2, 0, 1, 1, 1, 1, + 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, + 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, + 2, 1, 1, 1, 1, 0, 2, 1, 1, 0, + 2, 0, 2, 0, 3, 2, 0, 1, 0, 3, + 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, + 2, 5, 5, 5, 5, 3, 2, 5, 4, 2, + 1, 1, 1, 3, 1, 3, 1, 0, 1, 3, + 4, 3, 3, 4, 4, 3, 6, 5, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 6, 5, + 8, 6, 6, 7, 7, 6, 8, 8, 3, 1, + 1, 1, 1, 0, 1, 2, 0, 3, 0, 3, + 3, 1, 3, 3, 0, 6, 0, 7, 0, 7, + 2, 3, 1, 3, 3, 3, 3, 1, 0, 5, + 3, 1, 3, 1, 0, 9, 1, 1, 4, 1, + 1, 2, 3, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 3, 1, 5, 1, 1, 1, 1, + 1, 1, 2, 2, 2, 3, 2, 0, 1, 2, + 2, 3, 9, 9, 8, 14, 1, 1, 6, 5, + 2, 6, 7, 3, 5, 0, 0, 3, 2, 1, + 5, 5, 6, 6, 4, 6, 4, 4, 6, 6, + 2, 8, 1, 1, 0, 3, 6, 3, 6, 2, + 4, 6, 4 +}; + +static const short yydefact[] = { 66, + 57, 63, 58, 64, 182, 179, 177, 0, 0, 0, + 0, 0, 0, 75, 66, 175, 77, 80, 0, 0, + 191, 0, 0, 61, 0, 65, 67, 69, 68, 70, + 72, 71, 73, 74, 76, 75, 75, 0, 176, 78, + 79, 75, 180, 81, 82, 83, 84, 75, 238, 178, + 238, 0, 0, 199, 192, 193, 181, 227, 228, 184, + 113, 114, 115, 116, 117, 0, 0, 0, 0, 229, + 230, 118, 183, 120, 0, 0, 171, 172, 0, 85, + 85, 239, 235, 62, 210, 211, 212, 234, 194, 195, + 198, 0, 138, 121, 0, 0, 0, 0, 127, 139, + 0, 119, 138, 0, 0, 113, 114, 115, 0, 0, + 0, 185, 0, 86, 87, 88, 89, 90, 0, 213, + 0, 275, 237, 0, 196, 137, 96, 133, 135, 0, + 0, 0, 0, 0, 0, 126, 0, 187, 189, 156, + 157, 154, 155, 158, 153, 149, 150, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 13, 14, 15, 10, + 11, 12, 0, 0, 0, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 152, 151, + 109, 91, 132, 131, 0, 207, 208, 209, 274, 260, + 0, 0, 0, 0, 85, 247, 248, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 236, 85, 251, 0, 273, 197, 130, 0, + 100, 0, 0, 129, 0, 140, 100, 109, 109, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 0, + 52, 53, 48, 49, 50, 51, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 0, 0, 0, 0, + 0, 0, 142, 170, 0, 0, 0, 146, 0, 143, + 0, 0, 0, 0, 186, 0, 259, 241, 0, 240, + 0, 0, 54, 0, 0, 0, 0, 104, 104, 280, + 0, 0, 271, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 92, 93, 94, 95, 97, 136, + 134, 123, 124, 125, 128, 122, 188, 190, 0, 0, + 257, 0, 0, 0, 0, 0, 141, 127, 139, 0, + 144, 145, 0, 0, 0, 0, 0, 111, 109, 205, + 216, 217, 218, 223, 219, 220, 221, 222, 214, 0, + 225, 232, 231, 233, 0, 242, 0, 0, 0, 0, + 0, 276, 0, 278, 257, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 98, 99, + 101, 0, 0, 0, 0, 0, 0, 0, 169, 148, + 0, 0, 0, 0, 106, 112, 110, 204, 96, 202, + 0, 215, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 283, 0, 0, 0, 267, 268, 0, 0, + 0, 0, 265, 0, 281, 0, 0, 0, 0, 160, + 0, 0, 0, 0, 147, 0, 0, 0, 60, 0, + 100, 0, 224, 0, 0, 256, 0, 0, 104, 105, + 104, 0, 0, 0, 0, 0, 261, 262, 256, 0, + 0, 0, 258, 0, 166, 0, 0, 162, 163, 159, + 59, 201, 203, 96, 107, 0, 0, 0, 0, 0, + 263, 264, 0, 277, 279, 0, 0, 266, 269, 270, + 0, 282, 164, 165, 0, 0, 0, 60, 108, 102, + 226, 0, 0, 96, 0, 100, 252, 0, 100, 161, + 167, 168, 200, 0, 206, 0, 245, 0, 0, 254, + 0, 0, 253, 272, 103, 243, 0, 244, 0, 96, + 0, 0, 0, 255, 0, 0, 0, 0, 250, 0, + 0, 249, 0, 246, 0, 0, 0 +}; + +static const short yydefgoto[] = { 186, + 187, 188, 250, 267, 109, 110, 70, 482, 12, 71, + 14, 36, 37, 38, 42, 48, 119, 319, 229, 391, + 322, 525, 372, 348, 510, 285, 349, 72, 111, 128, + 195, 129, 130, 101, 274, 361, 275, 79, 555, 15, + 16, 18, 17, 191, 238, 239, 57, 21, 55, 92, + 410, 411, 120, 198, 49, 87, 50, 43, 413, 362, + 74, 364, 290, 51, 83, 84, 223, 529, 123, 303, + 490, 394, 224, 225, 226, 227 +}; + +static const short yypact[] = { 438, +-32768,-32768,-32768,-32768,-32768,-32768,-32768, 27, -119, -29, + -84, 43, -57, -6, 525,-32768, 195, 140, -38, -27, +-32768, -39, 112,-32768, 828,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768, 32, 32, 227,-32768,-32768, +-32768, 32,-32768,-32768,-32768,-32768,-32768, 32, 119,-32768, + -2, 188, 210, 213,-32768,-32768,-32768,-32768,-32768, 49, +-32768,-32768,-32768,-32768,-32768, 214, 245, 5, 104,-32768, +-32768,-32768, 110,-32768, 227, 227,-32768,-32768, 1043, 154, + 154,-32768,-32768, 109,-32768,-32768,-32768,-32768,-32768,-32768, +-32768, -89, 1085,-32768, 125, 139, 122, 49,-32768, 110, + -55,-32768, 1085, 1043, 1188, 46, 249, 272, 266, 273, + 589,-32768, 279,-32768,-32768,-32768,-32768,-32768, 1204,-32768, + 2, 1327,-32768, 268,-32768,-32768, 110,-32768, 153, 150, + 1188, 1188, 149, -53, 1188,-32768, 155,-32768, 110,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768, 494, 943, 157,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768, 158, 159, 163, + 164, 790, 1226, 495, 284, 166, 167, 169,-32768,-32768, + 173,-32768, 49, 110, 28,-32768,-32768,-32768,-32768,-32768, + 262, 1243, 142, 302, 154,-32768,-32768, 494, 943, 1188, + 1188, 1188, 1188, 1188, 1188, 1188, 1188, 1188, 1188, 1188, + 1188, 1188,-32768, 154,-32768, 168,-32768,-32768, -58, 1124, +-32768, 25, 16,-32768, 170, 110,-32768, 173, 173,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 177, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768, 181, 1043, 1043, 1043, + 1043, 1043,-32768,-32768, 20, 668, -40,-32768, -48,-32768, + 1043, 1043, 1043, 18,-32768, 182,-32768, 49, 747,-32768, + 872, 872,-32768, 872, 1204, 1188, 1188, 99, 117,-32768, + 747, 33, 186, 187, 191, 192, 198, 200, 747, 747, + 290, 1204, 1188, 1188,-32768,-32768,-32768,-32768,-32768,-32768, +-32768, -87,-32768,-32768,-32768, -87,-32768,-32768, 1043, 1043, +-32768, 203, 204, 205, 209, 1043,-32768, 202, 589, -43, +-32768,-32768, 216, 218, 312, 328, 342,-32768, 173, 1140, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 295, 1043, +-32768,-32768,-32768,-32768, 219,-32768, 229, 872, 747, 747, + 8,-32768, 17,-32768,-32768, 872, 225, 1188, 1188, 1188, + 1188, 1188, 231, 232, 1188, 872, 747, 233,-32768,-32768, +-32768, 234, 235, -33, 1043, 1043, 1043, 1043,-32768,-32768, + 230, 1043, 1043, 1188,-32768,-32768,-32768,-32768, 110, 238, + 236,-32768, 357, -36, 363, 364, 241, 246, 248, 872, + 374, 872, 251, 254, 872, 255, 110,-32768, 256, 258, + 872, 872, 110, 260,-32768, 1188, 1043, 1043, 1188,-32768, + 261, 263, 264, 270,-32768, 267, 276, 47, 130, 1159, +-32768, 274,-32768, 872, 872, 1188, 872, 872, 281,-32768, + 281, 872, 283, 1188, 1188, 1188,-32768,-32768, 1188, 747, + 282, 285,-32768, 1043,-32768, 1043, 1043,-32768,-32768,-32768, +-32768,-32768,-32768, 110, 45, 382, 287, 280, 747, -13, +-32768,-32768, 355,-32768,-32768, 265, 872,-32768,-32768,-32768, + 29,-32768,-32768,-32768, 286, 291, 292, 130,-32768, 375, +-32768, 412, 1,-32768, 1188,-32768,-32768, 293,-32768,-32768, +-32768,-32768,-32768, 423,-32768, 872,-32768, 996, 9, -58, + 747, 212,-32768, -87,-32768,-32768, 297,-32768, 996,-32768, + 419, 422, 303, -58, 872, 872, 425, 371,-32768, 872, + 427,-32768, 872,-32768, 443, 444,-32768 +}; + +static const short yypgoto[] = { 324, + 325, 326, 242, 252, -197,-32768, 0, -50, 376, 4, +-32768,-32768,-32768, 40,-32768,-32768, -167, -306, -397,-32768, + -235,-32768, -291, -23,-32768, -211,-32768,-32768, -24, 237, + -229,-32768, 362, 369, -68, -108, -178, 201,-32768,-32768, + 453,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768, 391,-32768,-32768,-32768,-32768,-32768,-32768, -436, + -72, 101, -157,-32768, 424,-32768,-32768,-32768,-32768,-32768, + 7, 105,-32768,-32768,-32768,-32768 +}; + + +#define YYLAST 1453 + + +static const short yytable[] = { 11, + 73, 326, 189, 13, 277, 279, 294, 374, 96, 293, + 112, 449, 22, 82, 11, 390, 420, 293, 13, 390, + 23, 85, 315, 316, 196, 422, 327, 328, 27, 28, + 29, 30, 31, 32, 33, 138, 34, 295, 190, 389, + 317, 318, 2, 124, 100, 4, 346, 24, -54, -54, + 125, 315, 316, 421, 300, 25, 312, 304, 305, 306, + 307, 308, 421, 347, 311, 368, 140, 141, 127, 317, + 318, 19, 100, 346, 26, 75, 76, 135, 127, 135, + 139, 80, 386, 11, 336, 20, 508, 81, 136, 336, + 235, 537, 336, 52, 194, 342, 336, 340, 54, 439, + 401, 341, 543, 440, 53, 453, 232, 233, 58, 59, + 236, 98, 61, 62, 63, 64, 530, 1, 2, 515, + 3, 4, 1, 516, 35, 3, 58, 59, 56, 98, + 61, 62, 63, 64, 82, 1, 2, 407, 3, 4, + 527, 86, 544, 1, 197, 65, 3, 97, 538, 102, + 291, 103, 336, 292, 315, 316, 388, 324, 102, 337, + 103, 515, 35, 65, 323, 519, 102, 494, 103, 495, + 376, 389, 317, 318, 44, 45, 46, 289, 390, 47, + 102, 414, 103, 480, 93, 298, 299, 289, 301, 302, + 289, 289, 289, 289, 289, 309, 310, 289, 286, 331, + 332, 333, 334, 335, 89, 127, 113, 114, 115, 116, + 117, 118, 343, 344, 345, 485, 363, 94, 363, 363, + 426, 363, 428, 429, 430, 390, 90, 390, 363, 91, + 189, 371, 102, 40, 103, 41, 363, 363, 66, 315, + 316, 67, 541, 102, 68, 103, 69, 99, 95, 373, + 102, 339, 103, 77, 78, -55, 66, 317, 318, 67, + 392, 393, 68, 131, 69, 133, 190, 399, 142, 143, + 194, 369, 370, 313, 314, 104, 105, 132, -56, 144, + 532, 473, 192, 534, 228, 230, 231, 194, 387, 289, + 234, 237, 268, 269, 270, 363, 363, 363, 271, 272, + 280, 281, 282, 363, 283, 284, 498, 499, 500, 287, + 293, 325, 329, 363, 363, 528, 330, 350, 377, 378, + 385, 315, 316, 379, 380, 409, 441, 442, 443, 444, + 381, 539, 382, 446, 447, 395, 396, 397, 389, 317, + 318, 398, 404, 400, 405, 406, 412, 363, 402, 363, + 403, 415, 363, 289, 427, 289, 289, 289, 363, 363, + 433, 416, 425, 431, 432, 436, 437, 438, 471, 472, + 450, 445, 451, 452, 454, 455, 456, 460, 457, 448, + 458, 363, 363, 439, 363, 363, 462, 464, 465, 363, + 466, 365, 366, 474, 367, 469, 476, 363, 511, 475, + 421, 375, 477, 478, 517, 505, 486, 506, 507, 383, + 384, 470, 479, 493, 289, 497, 363, 513, 503, 512, + 524, 504, 520, 526, 363, 484, 535, 521, 522, 542, + 545, 489, 533, 546, 551, 547, 550, -174, 553, 289, + 289, 289, 556, 557, 489, 220, 221, 222, 481, 296, + -62, 1, 2, 363, 3, 4, 5, 523, 363, 122, + 297, 509, 6, 7, 137, 134, 321, 39, 417, 418, + 419, 121, 363, 363, 88, 501, 424, 363, 0, 423, + 363, 8, 0, 0, 9, 0, 434, 435, 10, 0, + 531, 0, 0, 0, 0, 0, 0, 0, 0, 58, + 59, 0, 98, 106, 107, 108, 64, 481, 1, 2, + 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, + 459, 0, 461, 0, -173, 463, 0, 0, 0, 0, + 0, 467, 468, 0, 0, 0, 65, -62, 1, 2, + 0, 3, 4, 5, 0, 0, 0, 0, 0, 6, + 7, 0, 0, 0, 487, 488, 0, 491, 492, 0, + 0, 0, 496, 0, 0, 0, 0, 0, 8, 0, + 502, 9, 0, 0, 0, 10, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 0, 0, 0, 514, + 0, 0, 0, 58, 59, 0, 0, 518, 0, 0, + 0, 0, 1, 2, 0, 3, 4, 0, 145, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 146, 147, 0, 0, 0, 536, 0, 0, 66, + 0, 540, 67, 0, 0, 68, 0, 69, 278, 0, + 0, 0, 0, 0, 0, 548, 549, 0, 0, 0, + 552, 0, 0, 554, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 0, 58, 59, 0, 98, 106, 107, 108, 64, + 0, 1, 2, 0, 3, 4, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 65, + 178, 0, 179, 180, 181, 0, 0, 0, 0, 0, + 0, 0, 102, 0, 103, 0, 182, 0, 0, 183, + 0, 184, 0, 185, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 351, + 352, 58, 59, 353, 0, 0, 0, 0, 0, 0, + 1, 2, 0, 3, 4, 0, 354, 355, 356, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 357, + 358, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 58, 59, 359, 98, 106, 107, + 108, 64, 66, 1, 2, 67, 3, 4, 68, 0, + 69, 338, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 0, + 0, 65, 58, 59, 0, 60, 61, 62, 63, 64, + 0, 1, 2, 0, 3, 4, 0, 0, 0, 0, + 0, 0, 0, 0, 165, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 0, 178, 65, + 179, 180, 181, 0, 351, 352, 58, 59, 353, 0, + 102, 0, 103, 0, 0, 1, 2, 360, 3, 4, + 0, 354, 355, 356, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 357, 358, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 359, 0, 0, 66, 0, 0, 67, 0, 273, + 68, 0, 69, 0, 0, 0, 0, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 0, 0, 0, 0, 0, 0, + 0, 0, 66, 251, 252, 67, 0, 0, 68, 0, + 69, 0, 0, 0, 0, 0, 0, 0, 0, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 0, 178, 0, 179, 180, 181, 351, 352, + 0, 0, 353, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 360, 0, 0, 354, 355, 356, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 357, 358, + 0, 253, 254, 255, 256, 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, 359, 0, 58, 59, 0, + 98, 106, 107, 108, 64, 0, 1, 2, 0, 3, + 4, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 0, 0, + 0, 0, 0, 0, 65, 0, 0, 0, 0, 58, + 59, 0, 98, 61, 62, 63, 64, 0, 1, 2, + 0, 3, 4, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 126, 178, 0, 179, + 180, 181, 0, 0, 0, 0, 65, 0, 58, 59, + 0, 98, 61, 62, 63, 64, 360, 1, 2, 0, + 3, 4, 0, 0, 58, 59, 0, 98, 61, 62, + 63, 64, 0, 1, 2, 320, 3, 4, 0, 0, + 0, 0, 0, 58, 59, 65, 98, 61, 62, 63, + 64, 408, 1, 2, 0, 3, 4, 66, 0, 0, + 67, 65, 0, 68, 0, 69, 0, 0, 0, 0, + 483, 0, 58, 59, 0, 98, 61, 62, 63, 64, + 65, 1, 2, 0, 3, 4, 0, 0, 58, 59, + 0, 193, 61, 62, 63, 64, 0, 1, 2, 66, + 3, 4, 67, 0, 0, 68, 0, 69, 0, 65, + 58, 59, 0, 98, 106, 107, 108, 64, 0, 1, + 2, 0, 3, 4, 0, 65, 0, 58, 59, 0, + 288, 61, 62, 63, 64, 0, 1, 2, 66, 3, + 4, 67, 0, 0, 68, 0, 69, 65, 0, 0, + 0, 0, 0, 0, 66, 0, 0, 67, 0, 0, + 68, 0, 69, 0, 65, 0, 0, 0, 0, 0, + 0, 0, 0, 66, 0, 0, 67, 0, 0, 68, + 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 66, 0, 0, 67, 0, 0, 68, 0, + 69, 0, 0, 0, 0, 0, 0, 0, 66, 0, + 0, 67, 0, 0, 68, 0, 69, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 199, 0, 0, 0, + 66, 0, 0, 67, 0, 0, 68, 0, 276, 0, + 0, 0, 0, 0, 200, 201, 0, 66, 0, 0, + 67, 0, 0, 68, 0, 69, 202, 203, 204, 205, + 206, 207, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 208, 209, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 210, + 211, 212, 0, 0, 213, 166, 167, 168, 169, 170, + 171, 172, 173, 174, 175, 176, 177, 214, 215, 216, + 217, 218, 219 +}; + +static const short yycheck[] = { 0, + 25, 237, 111, 0, 183, 184, 204, 299, 4, 9, + 79, 409, 132, 16, 15, 322, 9, 9, 15, 326, + 50, 24, 110, 111, 23, 9, 238, 239, 35, 36, + 37, 38, 39, 40, 41, 104, 43, 205, 111, 127, + 128, 129, 15, 133, 69, 18, 29, 132, 3, 4, + 140, 110, 111, 46, 212, 13, 224, 215, 216, 217, + 218, 219, 46, 46, 222, 295, 21, 22, 93, 128, + 129, 45, 97, 29, 132, 36, 37, 133, 103, 133, + 105, 42, 312, 84, 133, 59, 484, 48, 144, 133, + 144, 528, 133, 132, 119, 144, 133, 276, 138, 133, + 144, 142, 539, 137, 132, 142, 131, 132, 5, 6, + 135, 8, 9, 10, 11, 12, 514, 14, 15, 133, + 17, 18, 14, 137, 131, 17, 5, 6, 17, 8, + 9, 10, 11, 12, 16, 14, 15, 349, 17, 18, + 140, 144, 540, 14, 143, 42, 17, 143, 140, 134, + 9, 136, 133, 12, 110, 111, 314, 142, 134, 140, + 136, 133, 131, 42, 140, 137, 134, 459, 136, 461, + 138, 127, 128, 129, 35, 36, 37, 202, 485, 40, + 134, 360, 136, 137, 136, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 195, 268, + 269, 270, 271, 272, 17, 230, 53, 54, 55, 56, + 57, 58, 281, 282, 283, 451, 289, 4, 291, 292, + 378, 294, 380, 381, 382, 532, 17, 534, 301, 17, + 339, 133, 134, 39, 136, 41, 309, 310, 135, 110, + 111, 138, 31, 134, 141, 136, 143, 144, 4, 133, + 134, 276, 136, 27, 28, 7, 135, 128, 129, 138, + 329, 330, 141, 139, 143, 144, 339, 336, 3, 4, + 295, 296, 297, 106, 107, 75, 76, 139, 7, 7, + 516, 439, 4, 519, 17, 133, 137, 312, 313, 314, + 142, 137, 136, 136, 136, 368, 369, 370, 136, 136, + 17, 136, 136, 376, 136, 133, 464, 465, 466, 48, + 9, 142, 136, 386, 387, 513, 136, 136, 133, 133, + 31, 110, 111, 133, 133, 350, 395, 396, 397, 398, + 133, 529, 133, 402, 403, 133, 133, 133, 127, 128, + 129, 133, 31, 142, 17, 4, 52, 420, 133, 422, + 133, 133, 425, 378, 379, 380, 381, 382, 431, 432, + 385, 133, 138, 133, 133, 133, 133, 133, 437, 438, + 133, 142, 137, 17, 12, 12, 136, 4, 133, 404, + 133, 454, 455, 133, 457, 458, 133, 133, 133, 462, + 133, 291, 292, 133, 294, 136, 133, 470, 17, 137, + 46, 301, 133, 137, 140, 474, 133, 476, 477, 309, + 310, 436, 137, 133, 439, 133, 489, 138, 137, 133, + 46, 137, 137, 12, 497, 450, 4, 137, 137, 133, + 12, 456, 140, 12, 64, 133, 12, 0, 12, 464, + 465, 466, 0, 0, 469, 122, 122, 122, 449, 208, + 13, 14, 15, 526, 17, 18, 19, 508, 531, 84, + 209, 485, 25, 26, 103, 97, 230, 15, 368, 369, + 370, 81, 545, 546, 51, 469, 376, 550, -1, 375, + 553, 44, -1, -1, 47, -1, 386, 387, 51, -1, + 515, -1, -1, -1, -1, -1, -1, -1, -1, 5, + 6, -1, 8, 9, 10, 11, 12, 508, 14, 15, + -1, 17, 18, -1, -1, -1, -1, -1, -1, -1, + 420, -1, 422, -1, 0, 425, -1, -1, -1, -1, + -1, 431, 432, -1, -1, -1, 42, 13, 14, 15, + -1, 17, 18, 19, -1, -1, -1, -1, -1, 25, + 26, -1, -1, -1, 454, 455, -1, 457, 458, -1, + -1, -1, 462, -1, -1, -1, -1, -1, 44, -1, + 470, 47, -1, -1, -1, 51, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, -1, -1, -1, 489, + -1, -1, -1, 5, 6, -1, -1, 497, -1, -1, + -1, -1, 14, 15, -1, 17, 18, -1, 20, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 33, 34, -1, -1, -1, 526, -1, -1, 135, + -1, 531, 138, -1, -1, 141, -1, 143, 144, -1, + -1, -1, -1, -1, -1, 545, 546, -1, -1, -1, + 550, -1, -1, 553, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, -1, 5, 6, -1, 8, 9, 10, 11, 12, + -1, 14, 15, -1, 17, 18, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 42, + 122, -1, 124, 125, 126, -1, -1, -1, -1, -1, + -1, -1, 134, -1, 136, -1, 138, -1, -1, 141, + -1, 143, -1, 145, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, + 4, 5, 6, 7, -1, -1, -1, -1, -1, -1, + 14, 15, -1, 17, 18, -1, 20, 21, 22, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, + 34, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 5, 6, 50, 8, 9, 10, + 11, 12, 135, 14, 15, 138, 17, 18, 141, -1, + 143, 144, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, -1, + -1, 42, 5, 6, -1, 8, 9, 10, 11, 12, + -1, 14, 15, -1, 17, 18, -1, -1, -1, -1, + -1, -1, -1, -1, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, -1, 122, 42, + 124, 125, 126, -1, 3, 4, 5, 6, 7, -1, + 134, -1, 136, -1, -1, 14, 15, 141, 17, 18, + -1, 20, 21, 22, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 33, 34, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 50, -1, -1, 135, -1, -1, 138, -1, 140, + 141, -1, 143, -1, -1, -1, -1, 66, 67, 68, + 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, + 79, 80, 81, 82, -1, -1, -1, -1, -1, -1, + -1, -1, 135, 21, 22, 138, -1, -1, 141, -1, + 143, -1, -1, -1, -1, -1, -1, -1, -1, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, -1, 122, -1, 124, 125, 126, 3, 4, + -1, -1, 7, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 141, -1, -1, 20, 21, 22, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 33, 34, + -1, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 50, -1, 5, 6, -1, + 8, 9, 10, 11, 12, -1, 14, 15, -1, 17, + 18, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, -1, -1, + -1, -1, -1, -1, 42, -1, -1, -1, -1, 5, + 6, -1, 8, 9, 10, 11, 12, -1, 14, 15, + -1, 17, 18, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 32, 122, -1, 124, + 125, 126, -1, -1, -1, -1, 42, -1, 5, 6, + -1, 8, 9, 10, 11, 12, 141, 14, 15, -1, + 17, 18, -1, -1, 5, 6, -1, 8, 9, 10, + 11, 12, -1, 14, 15, 32, 17, 18, -1, -1, + -1, -1, -1, 5, 6, 42, 8, 9, 10, 11, + 12, 32, 14, 15, -1, 17, 18, 135, -1, -1, + 138, 42, -1, 141, -1, 143, -1, -1, -1, -1, + 32, -1, 5, 6, -1, 8, 9, 10, 11, 12, + 42, 14, 15, -1, 17, 18, -1, -1, 5, 6, + -1, 8, 9, 10, 11, 12, -1, 14, 15, 135, + 17, 18, 138, -1, -1, 141, -1, 143, -1, 42, + 5, 6, -1, 8, 9, 10, 11, 12, -1, 14, + 15, -1, 17, 18, -1, 42, -1, 5, 6, -1, + 8, 9, 10, 11, 12, -1, 14, 15, 135, 17, + 18, 138, -1, -1, 141, -1, 143, 42, -1, -1, + -1, -1, -1, -1, 135, -1, -1, 138, -1, -1, + 141, -1, 143, -1, 42, -1, -1, -1, -1, -1, + -1, -1, -1, 135, -1, -1, 138, -1, -1, 141, + -1, 143, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 135, -1, -1, 138, -1, -1, 141, -1, + 143, -1, -1, -1, -1, -1, -1, -1, 135, -1, + -1, 138, -1, -1, 141, -1, 143, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 30, -1, -1, -1, + 135, -1, -1, 138, -1, -1, 141, -1, 143, -1, + -1, -1, -1, -1, 48, 49, -1, 135, -1, -1, + 138, -1, -1, 141, -1, 143, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 103, + 104, 105, -1, -1, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126 +}; +/* -*-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. + + 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., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* 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 +#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 +#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 */ + #pragma alloca +#define YYSTACK_USE_ALLOCA +#else /* not MSDOS, or __TURBOC__, or _AIX */ +#if 0 +#ifdef __hpux /* haible@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 */ + +#ifdef YYSTACK_USE_ALLOCA +#define YYSTACK_ALLOC alloca #else - typedef short int yysigned_char; +#define YYSTACK_ALLOC malloc #endif -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 40 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1439 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 146 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 78 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 284 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 557 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 386 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const unsigned char 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, - 136, 137, 134, 2, 133, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 141, 132, 142, 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, 138, 135, 140, 2, 2, 2, 2, 2, 145, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 139, 2, 2, 143, 2, 144, 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 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const unsigned short int 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, 122, 125, 126, 128, 130, 133, 134, 136, - 138, 140, 142, 144, 146, 148, 150, 151, 153, 154, - 156, 158, 159, 161, 163, 165, 167, 168, 170, 172, - 174, 176, 178, 181, 183, 185, 187, 189, 190, 193, - 195, 197, 198, 201, 202, 205, 206, 210, 213, 214, - 216, 217, 221, 223, 226, 228, 230, 232, 234, 236, - 238, 241, 243, 246, 252, 258, 264, 270, 274, 277, - 283, 288, 291, 293, 295, 297, 301, 303, 307, 309, - 310, 312, 316, 321, 325, 329, 334, 339, 343, 350, - 356, 359, 362, 365, 368, 371, 374, 377, 380, 383, - 386, 393, 399, 408, 415, 422, 430, 438, 445, 454, - 463, 467, 469, 471, 473, 475, 476, 478, 481, 482, - 486, 487, 491, 495, 497, 501, 505, 506, 513, 514, - 522, 523, 531, 534, 538, 540, 544, 548, 552, 556, - 558, 559, 565, 569, 571, 575, 577, 578, 588, 590, - 592, 597, 599, 601, 604, 608, 609, 611, 613, 615, - 617, 619, 621, 623, 625, 627, 631, 633, 639, 641, - 643, 645, 647, 649, 651, 654, 657, 660, 664, 667, - 668, 670, 673, 676, 680, 690, 700, 709, 724, 726, - 728, 735, 741, 744, 751, 759, 763, 769, 770, 771, - 775, 778, 780, 786, 792, 799, 806, 811, 818, 823, - 828, 835, 842, 845, 854, 856, 858, 859, 863, 870, - 874, 881, 884, 889, 896 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const short int yyrhs[] = -{ - 186, 0, -1, 66, -1, 67, -1, 68, -1, 69, - -1, 70, -1, 71, -1, 72, -1, 73, -1, 74, - -1, 78, -1, 79, -1, 80, -1, 75, -1, 76, - -1, 77, -1, 109, -1, 110, -1, 111, -1, 112, - -1, 113, -1, 114, -1, 115, -1, 116, -1, 117, - -1, 118, -1, 119, -1, 120, -1, 83, -1, 84, - -1, 85, -1, 86, -1, 87, -1, 88, -1, 89, - -1, 90, -1, 91, -1, 92, -1, 93, -1, 94, - -1, 95, -1, 96, -1, 97, -1, 98, -1, 99, - -1, 100, -1, 101, -1, 102, -1, 89, -1, 90, - -1, 91, -1, 92, -1, 21, -1, 22, -1, 9, - -1, 10, -1, 11, -1, 14, -1, 17, -1, 154, - -1, -1, 154, 132, -1, -1, 15, -1, 18, -1, - 157, 132, -1, -1, 35, -1, 37, -1, 36, -1, - 38, -1, 40, -1, 39, -1, 41, -1, 43, -1, - -1, 131, -1, -1, 39, -1, 41, -1, -1, 35, - -1, 36, -1, 37, -1, 40, -1, -1, 54, -1, - 55, -1, 56, -1, 57, -1, 58, -1, 53, 4, - -1, 110, -1, 111, -1, 128, -1, 129, -1, -1, - 166, 165, -1, 127, -1, 165, -1, -1, 168, 167, - -1, -1, 46, 4, -1, -1, 133, 46, 4, -1, - 29, 17, -1, -1, 171, -1, -1, 133, 174, 173, - -1, 171, -1, 46, 4, -1, 9, -1, 10, -1, - 11, -1, 12, -1, 42, -1, 175, -1, 176, 134, - -1, 208, -1, 135, 4, -1, 176, 136, 180, 137, - 168, -1, 8, 136, 180, 137, 168, -1, 138, 4, - 139, 176, 140, -1, 141, 4, 139, 176, 142, -1, - 143, 181, 144, -1, 143, 144, -1, 141, 143, 181, - 144, 142, -1, 141, 143, 144, 142, -1, 176, 166, - -1, 176, -1, 8, -1, 177, -1, 179, 133, 177, - -1, 179, -1, 179, 133, 32, -1, 32, -1, -1, - 176, -1, 181, 133, 176, -1, 176, 138, 184, 140, - -1, 176, 138, 140, -1, 176, 145, 17, -1, 176, - 141, 184, 142, -1, 176, 143, 184, 144, -1, 176, - 143, 144, -1, 176, 141, 143, 184, 144, 142, -1, - 176, 141, 143, 144, 142, -1, 176, 33, -1, 176, - 34, -1, 176, 208, -1, 176, 183, -1, 176, 20, - -1, 152, 3, -1, 152, 4, -1, 9, 21, -1, - 9, 22, -1, 153, 7, -1, 149, 136, 182, 31, - 176, 137, -1, 108, 136, 182, 219, 137, -1, 122, - 136, 182, 133, 182, 133, 182, 137, -1, 147, 136, - 182, 133, 182, 137, -1, 148, 136, 182, 133, 182, - 137, -1, 81, 150, 136, 182, 133, 182, 137, -1, - 82, 151, 136, 182, 133, 182, 137, -1, 124, 136, - 182, 133, 182, 137, -1, 125, 136, 182, 133, 182, - 133, 182, 137, -1, 126, 136, 182, 133, 182, 133, - 182, 137, -1, 184, 133, 182, -1, 182, -1, 27, - -1, 28, -1, 187, -1, -1, 188, -1, 187, 188, - -1, -1, 26, 189, 204, -1, -1, 25, 190, 205, - -1, 51, 50, 194, -1, 19, -1, 156, 13, 176, - -1, 156, 13, 8, -1, -1, 158, 161, 185, 182, - 191, 173, -1, -1, 158, 159, 161, 185, 182, 192, - 173, -1, -1, 158, 160, 161, 185, 176, 193, 173, - -1, 44, 195, -1, 47, 132, 196, -1, 17, -1, - 45, 132, 17, -1, 59, 132, 17, -1, 138, 197, - 140, -1, 197, 133, 17, -1, 17, -1, -1, 198, - 133, 176, 166, 155, -1, 176, 166, 155, -1, 198, - -1, 198, 133, 32, -1, 32, -1, -1, 164, 178, - 157, 136, 199, 137, 168, 172, 169, -1, 23, -1, - 143, -1, 163, 161, 200, 201, -1, 24, -1, 144, - -1, 211, 203, -1, 162, 161, 200, -1, -1, 52, - -1, 3, -1, 4, -1, 7, -1, 21, -1, 22, - -1, 33, -1, 34, -1, 20, -1, 141, 184, 142, - -1, 183, -1, 50, 206, 17, 133, 17, -1, 5, - -1, 6, -1, 154, -1, 157, -1, 208, -1, 207, - -1, 176, 209, -1, 211, 212, -1, 202, 212, -1, - 213, 156, 214, -1, 213, 216, -1, -1, 16, -1, - 60, 210, -1, 60, 8, -1, 61, 12, 209, -1, - 61, 9, 209, 133, 12, 209, 133, 12, 209, -1, - 62, 152, 209, 133, 12, 209, 138, 215, 140, -1, - 62, 152, 209, 133, 12, 209, 138, 140, -1, 63, - 164, 178, 209, 136, 218, 137, 168, 31, 12, 209, - 64, 12, 209, -1, 64, -1, 65, -1, 215, 152, - 207, 133, 12, 209, -1, 152, 207, 133, 12, 209, - -1, 156, 221, -1, 176, 138, 209, 133, 209, 140, - -1, 217, 133, 138, 209, 133, 209, 140, -1, 176, - 209, 166, -1, 218, 133, 176, 209, 166, -1, -1, - -1, 219, 133, 210, -1, 49, 48, -1, 48, -1, - 147, 176, 209, 133, 209, -1, 148, 176, 209, 133, - 209, -1, 81, 150, 176, 209, 133, 209, -1, 82, - 151, 176, 209, 133, 209, -1, 149, 210, 31, 176, - -1, 122, 210, 133, 210, 133, 210, -1, 123, 210, - 133, 176, -1, 124, 210, 133, 210, -1, 125, 210, - 133, 210, 133, 210, -1, 126, 210, 133, 210, 133, - 210, -1, 121, 217, -1, 220, 164, 178, 209, 136, - 218, 137, 168, -1, 223, -1, 30, -1, -1, 103, - 176, 170, -1, 103, 176, 133, 9, 209, 170, -1, - 104, 176, 170, -1, 104, 176, 133, 9, 209, 170, - -1, 105, 210, -1, 222, 106, 176, 209, -1, 222, - 107, 210, 133, 176, 209, -1, 108, 176, 209, 219, - -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const unsigned short int yyrline[] = -{ - 0, 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047, - 1047, 1048, 1048, 1048, 1048, 1048, 1048, 1049, 1049, 1049, - 1049, 1049, 1049, 1050, 1050, 1050, 1050, 1050, 1050, 1053, - 1053, 1054, 1054, 1055, 1055, 1056, 1056, 1057, 1057, 1061, - 1061, 1062, 1062, 1063, 1063, 1064, 1064, 1065, 1065, 1066, - 1066, 1067, 1067, 1068, 1069, 1074, 1075, 1075, 1077, 1077, - 1078, 1078, 1082, 1086, 1091, 1091, 1093, 1097, 1103, 1104, - 1105, 1106, 1107, 1111, 1112, 1113, 1117, 1118, 1122, 1123, - 1124, 1128, 1129, 1130, 1131, 1132, 1135, 1136, 1137, 1138, - 1139, 1140, 1141, 1148, 1149, 1150, 1151, 1154, 1155, 1160, - 1161, 1164, 1165, 1172, 1173, 1179, 1180, 1188, 1196, 1197, - 1202, 1203, 1204, 1209, 1222, 1222, 1222, 1222, 1225, 1229, - 1233, 1240, 1245, 1253, 1271, 1289, 1294, 1306, 1316, 1320, - 1330, 1337, 1344, 1351, 1356, 1361, 1368, 1369, 1376, 1383, - 1391, 1396, 1407, 1435, 1451, 1480, 1508, 1533, 1552, 1577, - 1596, 1608, 1615, 1681, 1691, 1701, 1707, 1713, 1718, 1723, - 1731, 1743, 1764, 1772, 1778, 1789, 1794, 1799, 1805, 1811, - 1820, 1824, 1832, 1832, 1843, 1848, 1856, 1857, 1861, 1861, - 1865, 1865, 1868, 1871, 1883, 1907, 1918, 1918, 1928, 1928, - 1936, 1936, 1946, 1949, 1955, 1968, 1972, 1977, 1979, 1984, - 1989, 1998, 2008, 2019, 2023, 2032, 2041, 2046, 2158, 2158, - 2160, 2169, 2169, 2171, 2176, 2188, 2192, 2197, 2201, 2205, - 2209, 2213, 2217, 2221, 2225, 2229, 2254, 2258, 2272, 2276, - 2280, 2284, 2290, 2290, 2296, 2305, 2309, 2318, 2328, 2337, - 2349, 2362, 2366, 2370, 2375, 2385, 2404, 2413, 2480, 2484, - 2491, 2502, 2515, 2525, 2536, 2546, 2554, 2562, 2565, 2566, - 2573, 2577, 2582, 2603, 2620, 2633, 2646, 2658, 2666, 2673, - 2679, 2685, 2691, 2706, 2770, 2775, 2779, 2786, 2793, 2801, - 2808, 2816, 2824, 2838, 2855 -}; -#endif - -#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", - "LOCALVAL_ID", "GLOBALVAL_ID", "FPVAL", "VOID", "INTTYPE", "FLOAT", - "DOUBLE", "LABEL", "TYPE", "LOCALVAR", "GLOBALVAR", "LABELSTR", - "STRINGCONSTANT", "ATSTRINGCONSTANT", "IMPLEMENTATION", - "ZEROINITIALIZER", "TRUETOK", "FALSETOK", "BEGINTOK", "ENDTOK", - "DECLARE", "DEFINE", "GLOBAL", "CONSTANT", "SECTION", "VOLATILE", "TO", - "DOTDOTDOT", "NULL_TOK", "UNDEF", "INTERNAL", "LINKONCE", "WEAK", - "APPENDING", "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "OPAQUE", - "EXTERNAL", "TARGET", "TRIPLE", "ALIGN", "DEPLIBS", "CALL", "TAIL", - "ASM_TOK", "MODULE", "SIDEEFFECT", "CC_TOK", "CCC_TOK", "FASTCC_TOK", - "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT", - "RET", "BR", "SWITCH", "INVOKE", "UNWIND", "UNREACHABLE", "ADD", "SUB", - "MUL", "UDIV", "SDIV", "FDIV", "UREM", "SREM", "FREM", "AND", "OR", - "XOR", "SHL", "LSHR", "ASHR", "ICMP", "FCMP", "EQ", "NE", "SLT", "SGT", - "SLE", "SGE", "ULT", "UGT", "ULE", "UGE", "OEQ", "ONE", "OLT", "OGT", - "OLE", "OGE", "ORD", "UNO", "UEQ", "UNE", "MALLOC", "ALLOCA", "FREE", - "LOAD", "STORE", "GETELEMENTPTR", "TRUNC", "ZEXT", "SEXT", "FPTRUNC", - "FPEXT", "BITCAST", "UITOFP", "SITOFP", "FPTOUI", "FPTOSI", "INTTOPTR", - "PTRTOINT", "PHI_TOK", "SELECT", "VAARG", "EXTRACTELEMENT", - "INSERTELEMENT", "SHUFFLEVECTOR", "NORETURN", "INREG", "SRET", "DEFAULT", - "HIDDEN", "'='", "','", "'*'", "'\\\\'", "'('", "')'", "'['", "'x'", - "']'", "'<'", "'>'", "'{'", "'}'", "'c'", "$accept", "ArithmeticOps", - "LogicalOps", "CastOps", "IPredicates", "FPredicates", "IntType", - "FPType", "LocalName", "OptLocalName", "OptLocalAssign", "GlobalName", - "OptGlobalAssign", "GVInternalLinkage", "GVExternalLinkage", - "GVVisibilityStyle", "FunctionDeclareLinkage", "FunctionDefineLinkage", - "OptCallingConv", "ParamAttr", "OptParamAttrs", "FuncAttr", - "OptFuncAttrs", "OptAlign", "OptCAlign", "SectionString", "OptSection", - "GlobalVarAttributes", "GlobalVarAttribute", "PrimType", "Types", - "ArgType", "ResultTypes", "ArgTypeList", "ArgTypeListI", "TypeListI", - "ConstVal", "ConstExpr", "ConstVector", "GlobalType", "Module", - "DefinitionList", "Definition", "@1", "@2", "@3", "@4", "@5", "AsmBlock", - "TargetDefinition", "LibrariesDefinition", "LibList", "ArgListH", - "ArgList", "FunctionHeaderH", "BEGIN", "FunctionHeader", "END", - "Function", "FunctionProto", "OptSideEffect", "ConstValueRef", - "SymbolicValueRef", "ValueRef", "ResolvedVal", "BasicBlockList", - "BasicBlock", "InstructionList", "BBTerminatorInst", "JumpTable", "Inst", - "PHIList", "ValueRefList", "IndexList", "OptTailCall", "InstVal", - "OptVolatile", "MemoryInst", 0 -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const unsigned short int 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, 61, 44, 42, 92, 40, 41, 91, 120, - 93, 60, 62, 123, 125, 99 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const unsigned char yyr1[] = -{ - 0, 146, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 148, 148, 148, 148, 148, 148, 149, 149, 149, - 149, 149, 149, 149, 149, 149, 149, 149, 149, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 151, - 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 152, 153, 153, 154, 154, - 155, 155, 156, 156, 157, 157, 158, 158, 159, 159, - 159, 159, 159, 160, 160, 160, 161, 161, 162, 162, - 162, 163, 163, 163, 163, 163, 164, 164, 164, 164, - 164, 164, 164, 165, 165, 165, 165, 166, 166, 167, - 167, 168, 168, 169, 169, 170, 170, 171, 172, 172, - 173, 173, 174, 174, 175, 175, 175, 175, 176, 176, - 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, - 176, 177, 178, 178, 179, 179, 180, 180, 180, 180, - 181, 181, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, - 184, 184, 185, 185, 186, 186, 187, 187, 189, 188, - 190, 188, 188, 188, 188, 188, 191, 188, 192, 188, - 193, 188, 188, 188, 194, 195, 195, 196, 197, 197, - 197, 198, 198, 199, 199, 199, 199, 200, 201, 201, - 202, 203, 203, 204, 205, 206, 206, 207, 207, 207, - 207, 207, 207, 207, 207, 207, 207, 207, 208, 208, - 208, 208, 209, 209, 210, 211, 211, 212, 213, 213, - 213, 214, 214, 214, 214, 214, 214, 214, 214, 214, - 215, 215, 216, 217, 217, 218, 218, 218, 219, 219, - 220, 220, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 222, 222, 223, 223, 223, - 223, 223, 223, 223, 223 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const unsigned char 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, 0, 2, 0, 1, 1, 2, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, - 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, - 1, 1, 2, 1, 1, 1, 1, 0, 2, 1, - 1, 0, 2, 0, 2, 0, 3, 2, 0, 1, - 0, 3, 1, 2, 1, 1, 1, 1, 1, 1, - 2, 1, 2, 5, 5, 5, 5, 3, 2, 5, - 4, 2, 1, 1, 1, 3, 1, 3, 1, 0, - 1, 3, 4, 3, 3, 4, 4, 3, 6, 5, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 6, 5, 8, 6, 6, 7, 7, 6, 8, 8, - 3, 1, 1, 1, 1, 0, 1, 2, 0, 3, - 0, 3, 3, 1, 3, 3, 0, 6, 0, 7, - 0, 7, 2, 3, 1, 3, 3, 3, 3, 1, - 0, 5, 3, 1, 3, 1, 0, 9, 1, 1, - 4, 1, 1, 2, 3, 0, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 1, 5, 1, 1, - 1, 1, 1, 1, 2, 2, 2, 3, 2, 0, - 1, 2, 2, 3, 9, 9, 8, 14, 1, 1, - 6, 5, 2, 6, 7, 3, 5, 0, 0, 3, - 2, 1, 5, 5, 6, 6, 4, 6, 4, 4, - 6, 6, 2, 8, 1, 1, 0, 3, 6, 3, - 6, 2, 4, 6, 4 -}; - -/* 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 unsigned short int yydefact[] = -{ - 67, 58, 64, 59, 65, 183, 180, 178, 0, 0, - 0, 0, 0, 0, 76, 0, 67, 176, 78, 81, - 0, 0, 192, 0, 0, 62, 0, 66, 68, 70, - 69, 71, 73, 72, 74, 75, 77, 76, 76, 0, - 1, 177, 79, 80, 76, 181, 82, 83, 84, 85, - 76, 239, 179, 239, 0, 0, 200, 193, 194, 182, - 228, 229, 185, 114, 115, 116, 117, 118, 0, 0, - 0, 0, 230, 231, 119, 184, 121, 0, 0, 172, - 173, 0, 86, 86, 240, 236, 63, 211, 212, 213, - 235, 195, 196, 199, 0, 139, 122, 0, 0, 0, - 0, 128, 140, 0, 120, 139, 0, 0, 114, 115, - 116, 0, 0, 0, 186, 0, 87, 88, 89, 90, - 91, 0, 214, 0, 276, 238, 0, 197, 138, 97, - 134, 136, 0, 0, 0, 0, 0, 0, 127, 0, - 188, 190, 157, 158, 155, 156, 159, 154, 150, 151, - 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, - 15, 16, 11, 12, 13, 0, 0, 0, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 153, 152, 110, 92, 133, 132, 0, 208, 209, - 210, 275, 261, 0, 0, 0, 0, 86, 248, 249, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 237, 86, 252, 0, 274, - 198, 131, 0, 101, 0, 0, 130, 0, 141, 101, - 110, 110, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 0, 53, 54, 49, 50, 51, 52, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 0, - 0, 0, 0, 0, 0, 143, 171, 0, 0, 0, - 147, 0, 144, 0, 0, 0, 0, 187, 0, 260, - 242, 0, 241, 0, 0, 55, 0, 0, 0, 0, - 105, 105, 281, 0, 0, 272, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 93, 94, 95, - 96, 98, 137, 135, 124, 125, 126, 129, 123, 189, - 191, 0, 0, 258, 0, 0, 0, 0, 0, 142, - 128, 140, 0, 145, 146, 0, 0, 0, 0, 0, - 112, 110, 206, 217, 218, 219, 224, 220, 221, 222, - 223, 215, 0, 226, 233, 232, 234, 0, 243, 0, - 0, 0, 0, 0, 277, 0, 279, 258, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 99, 100, 102, 0, 0, 0, 0, 0, 0, - 0, 170, 149, 0, 0, 0, 0, 107, 113, 111, - 205, 97, 203, 0, 216, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 284, 0, 0, 0, 268, - 269, 0, 0, 0, 0, 266, 0, 282, 0, 0, - 0, 0, 161, 0, 0, 0, 0, 148, 0, 0, - 0, 61, 0, 101, 0, 225, 0, 0, 257, 0, - 0, 105, 106, 105, 0, 0, 0, 0, 0, 262, - 263, 257, 0, 0, 0, 259, 0, 167, 0, 0, - 163, 164, 160, 60, 202, 204, 97, 108, 0, 0, - 0, 0, 0, 264, 265, 0, 278, 280, 0, 0, - 267, 270, 271, 0, 283, 165, 166, 0, 0, 0, - 61, 109, 103, 227, 0, 0, 97, 0, 101, 253, - 0, 101, 162, 168, 169, 201, 0, 207, 0, 246, - 0, 0, 255, 0, 0, 254, 273, 104, 244, 0, - 245, 0, 97, 0, 0, 0, 256, 0, 0, 0, - 0, 251, 0, 0, 250, 0, 247 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const short int yydefgoto[] = -{ - -1, 188, 189, 190, 252, 269, 111, 112, 72, 484, - 12, 73, 14, 37, 38, 39, 44, 50, 121, 321, - 231, 393, 324, 527, 374, 350, 512, 287, 351, 74, - 113, 130, 197, 131, 132, 103, 276, 363, 277, 81, - 15, 16, 17, 19, 18, 193, 240, 241, 59, 22, - 57, 94, 412, 413, 122, 200, 51, 89, 52, 45, - 415, 364, 76, 366, 292, 53, 85, 86, 225, 531, - 125, 305, 492, 396, 226, 227, 228, 229 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -399 -static const short int yypact[] = -{ - 406, -399, -399, -399, -399, -399, -399, -399, -26, -114, - -16, -53, 92, -11, 54, 136, 526, -399, 247, 173, - 43, 49, -399, 62, 194, -399, 814, -399, -399, -399, - -399, -399, -399, -399, -399, -399, -399, 134, 134, 99, - -399, -399, -399, -399, 134, -399, -399, -399, -399, -399, - 134, 212, -399, -1, 219, 225, 253, -399, -399, -399, - -399, -399, 135, -399, -399, -399, -399, -399, 271, 275, - 3, 33, -399, -399, -399, 160, -399, 99, 99, -399, - -399, 1029, 287, 287, -399, -399, 220, -399, -399, -399, - -399, -399, -399, -399, 20, 1071, -399, 141, 148, 105, - 135, -399, 160, -75, -399, 1071, 1029, 1174, 32, 286, - 293, 151, 294, 590, -399, 298, -399, -399, -399, -399, - -399, 1190, -399, -13, 1313, -399, 289, -399, -399, 160, - -399, 170, 167, 1174, 1174, 165, -68, 1174, -399, 174, - -399, 160, -399, -399, -399, -399, -399, -399, -399, -399, - -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, - -399, -399, -399, -399, -399, 495, 591, 176, -399, -399, - -399, -399, -399, -399, -399, -399, -399, -399, -399, -399, - 177, 178, 182, 183, 776, 1212, 123, 305, 187, 188, - 189, -399, -399, 193, -399, 135, 160, 266, -399, -399, - -399, -399, -399, 284, 1229, 283, 325, 287, -399, -399, - 495, 591, 1174, 1174, 1174, 1174, 1174, 1174, 1174, 1174, - 1174, 1174, 1174, 1174, 1174, -399, 287, -399, 144, -399, - -399, -4, 1110, -399, -63, -110, -399, 204, 160, -399, - 193, 193, -399, -399, -399, -399, -399, -399, -399, -399, - -399, -399, 211, -399, -399, -399, -399, -399, -399, -399, - -399, -399, -399, -399, -399, -399, -399, -399, -399, 214, - 1029, 1029, 1029, 1029, 1029, -399, -399, 79, 494, -111, - -399, -66, -399, 1029, 1029, 1029, 39, -399, 216, -399, - 135, 733, -399, 858, 858, -399, 858, 1190, 1174, 1174, - 50, 111, -399, 733, 97, 215, 230, 231, 232, 233, - 234, 733, 733, 322, 1190, 1174, 1174, -399, -399, -399, - -399, -399, -399, -399, -27, -399, -399, -399, -27, -399, - -399, 1029, 1029, -399, 235, 236, 239, 240, 1029, -399, - 237, 590, 26, -399, -399, 241, 242, 345, 360, 374, - -399, 193, 1126, -399, -399, -399, -399, -399, -399, -399, - -399, 328, 1029, -399, -399, -399, -399, 249, -399, 252, - 858, 733, 733, 11, -399, 18, -399, -399, 858, 250, - 1174, 1174, 1174, 1174, 1174, 256, 257, 1174, 858, 733, - 259, -399, -399, -399, 262, 264, -34, 1029, 1029, 1029, - 1029, -399, -399, 258, 1029, 1029, 1174, -399, -399, -399, - -399, 160, 265, 267, -399, 384, -61, 390, 393, 272, - 281, 282, 858, 413, 858, 295, 296, 858, 297, 160, - -399, 301, 302, 858, 858, 160, 300, -399, 1174, 1029, - 1029, 1174, -399, 304, 285, 306, 307, -399, 308, 310, - 118, 38, 1145, -399, 311, -399, 858, 858, 1174, 858, - 858, 315, -399, 315, 858, 316, 1174, 1174, 1174, -399, - -399, 1174, 733, 317, 319, -399, 1029, -399, 1029, 1029, - -399, -399, -399, -399, -399, -399, 160, 149, 421, 326, - 314, 733, 19, -399, -399, 412, -399, -399, 321, 858, - -399, -399, -399, 36, -399, -399, -399, 327, 329, 330, - 38, -399, 416, -399, 451, 2, -399, 1174, -399, -399, - 333, -399, -399, -399, -399, -399, 461, -399, 858, -399, - 982, 5, -4, 733, 210, -399, -27, -399, -399, 335, - -399, 982, -399, 457, 464, 344, -4, 858, 858, 468, - 417, -399, 858, 471, -399, 858, -399 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const short int yypgoto[] = -{ - -399, 361, 362, 363, 274, 279, -198, -399, 0, -19, - 407, 9, -399, -399, -399, 113, -399, -399, -177, -307, - -398, -399, -236, -399, -299, 7, -399, -212, -399, -399, - -25, 263, -210, -399, 391, 398, -69, -109, -180, 179, - -399, -399, 482, -399, -399, -399, -399, -399, -399, -399, - -399, -399, -399, -399, 418, -399, -399, -399, -399, -399, - -399, -369, -73, 100, -158, -399, 454, -399, -399, -399, - -399, -399, 42, 137, -399, -399, -399, -399 -}; - -/* 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 -176 -static const short int yytable[] = -{ - 11, 75, 376, 328, 191, 279, 281, 98, 296, 13, - 198, 295, 114, 451, 295, 84, 11, 392, 23, 20, - 422, 392, 338, 87, 104, 13, 105, 424, 329, 330, - 297, 343, 326, 21, 24, -55, -55, 140, 60, 61, - 192, 100, 63, 64, 65, 66, 102, 1, 2, 314, - 3, 4, 1, 142, 143, 3, 302, 423, 137, 306, - 307, 308, 309, 310, 423, 137, 313, 338, 348, 138, - 129, 104, 338, 105, 102, 67, 237, 325, 344, 25, - 129, 455, 141, 317, 318, 349, 11, 370, 510, 28, - 29, 30, 31, 32, 33, 34, 196, 35, 342, 441, - 391, 319, 320, 442, 388, 26, 317, 318, 234, 235, - 60, 61, 238, 100, 63, 64, 65, 66, 532, 1, - 2, 27, 3, 4, 319, 320, 79, 80, 60, 61, - 199, 100, 108, 109, 110, 66, 40, 1, 2, 409, - 3, 4, 529, 88, 546, 540, 99, 67, 317, 318, - 77, 78, 517, 126, 144, 145, 518, 82, 390, 338, - 127, 539, 496, 83, 497, 67, 319, 320, 68, 517, - 403, 69, 545, 521, 70, 54, 71, 101, 348, 291, - 392, 55, 416, 373, 104, 36, 105, 300, 301, 291, - 303, 304, 291, 291, 291, 291, 291, 311, 312, 291, - 56, 333, 334, 335, 336, 337, 288, 129, 46, 47, - 48, 58, 338, 49, 345, 346, 347, 487, 365, 339, - 365, 365, 428, 365, 430, 431, 432, 392, 84, 392, - 365, 104, 191, 105, 1, 378, 91, 3, 365, 365, - 68, 543, 92, 69, 375, 104, 70, 105, 71, 135, - 315, 316, 104, 341, 105, 482, 106, 107, 68, 317, - 318, 69, 394, 395, 70, 36, 71, 280, 192, 401, - 93, 95, 196, 371, 372, 96, 391, 319, 320, 97, - 133, 2, 534, 475, 4, 536, 42, 134, 43, 196, - 389, 291, 293, -56, 104, 294, 105, 365, 365, 365, - -57, 146, 194, 232, 233, 365, 230, 236, 500, 501, - 502, 239, 270, 271, 272, 365, 365, 530, 273, 274, - 317, 318, 282, 283, 284, 285, 286, 411, 443, 444, - 445, 446, 289, 541, 295, 448, 449, 391, 319, 320, - 115, 116, 117, 118, 119, 120, 327, 331, 379, 365, - 332, 365, 352, 387, 365, 291, 429, 291, 291, 291, - 365, 365, 435, 380, 381, 382, 383, 384, 397, 398, - 473, 474, 399, 400, 404, 405, 406, 407, 408, 402, - 414, 450, 417, 365, 365, 418, 365, 365, 427, 433, - 434, 365, 438, 367, 368, 439, 369, 440, 452, 365, - 447, 454, 456, 377, 453, 457, -175, 507, 458, 508, - 509, 385, 386, 472, 459, 460, 291, 462, 365, -63, - 1, 2, 477, 3, 4, 5, 365, 486, 441, 464, - 466, 6, 7, 491, 467, 468, 471, 476, 513, 478, - 479, 291, 291, 291, 488, 480, 491, 481, 495, 499, - 8, 483, 515, 9, 505, 365, 506, 10, 423, 514, - 365, 519, 526, 528, 522, 537, 523, 524, 544, 547, - 419, 420, 421, 535, 365, 365, 548, 549, 426, 365, - 552, 553, 365, 555, 298, 222, 223, 224, 436, 437, - 299, 525, 533, 124, 511, 323, 139, 136, 41, 60, - 61, 123, 100, 108, 109, 110, 66, 90, 1, 2, - 483, 3, 4, 503, 425, 0, 0, 0, 0, 0, - 0, 0, 461, 0, 463, 0, -174, 465, 0, 0, - 0, 0, 0, 469, 470, 0, 67, 0, 0, -63, - 1, 2, 0, 3, 4, 5, 0, 0, 0, 0, - 0, 6, 7, 0, 0, 0, 489, 490, 0, 493, - 494, 0, 0, 0, 498, 0, 0, 0, 0, 0, - 8, 0, 504, 9, 0, 0, 0, 10, 242, 243, - 244, 245, 246, 247, 248, 249, 250, 251, 0, 0, - 0, 516, 0, 0, 0, 60, 61, 0, 0, 520, - 0, 0, 0, 0, 1, 2, 0, 3, 4, 0, - 147, 0, 253, 254, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 148, 149, 0, 0, 0, 538, 68, - 0, 0, 69, 542, 0, 70, 0, 71, 340, 0, - 0, 0, 0, 0, 0, 0, 0, 550, 551, 0, - 0, 0, 554, 0, 0, 556, 150, 151, 152, 153, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 0, 0, 0, 0, 0, 0, 0, - 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 0, 0, 0, 0, 167, 168, - 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 179, 0, 180, 0, 181, 182, 183, 0, 0, 0, - 0, 0, 0, 0, 104, 0, 105, 0, 184, 0, - 0, 185, 0, 186, 0, 187, 353, 354, 60, 61, - 355, 0, 0, 0, 0, 0, 0, 1, 2, 0, - 3, 4, 0, 356, 357, 358, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 359, 360, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 60, 61, 361, 100, 108, 109, 110, 66, 0, - 1, 2, 0, 3, 4, 0, 0, 0, 0, 150, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 161, 162, 163, 164, 165, 166, 0, 0, 67, 60, - 61, 0, 62, 63, 64, 65, 66, 0, 1, 2, - 0, 3, 4, 0, 0, 0, 0, 0, 0, 0, - 0, 167, 168, 169, 170, 171, 172, 173, 174, 175, - 176, 177, 178, 179, 0, 180, 67, 181, 182, 183, - 0, 353, 354, 60, 61, 355, 0, 104, 0, 105, - 0, 0, 1, 2, 362, 3, 4, 0, 356, 357, - 358, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 359, 360, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 361, 0, - 0, 68, 0, 0, 69, 0, 275, 70, 0, 71, - 0, 0, 0, 0, 150, 151, 152, 153, 154, 155, - 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, - 166, 0, 0, 0, 0, 0, 0, 0, 0, 68, - 0, 0, 69, 0, 0, 70, 0, 71, 0, 0, - 0, 0, 0, 0, 0, 0, 167, 168, 169, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 179, 0, - 180, 0, 181, 182, 183, 353, 354, 0, 0, 355, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, - 0, 0, 356, 357, 358, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 359, 360, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 361, 0, 60, 61, 0, 100, 108, 109, - 110, 66, 0, 1, 2, 0, 3, 4, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, 0, 0, 0, 0, 0, - 0, 67, 0, 0, 0, 0, 60, 61, 0, 100, - 63, 64, 65, 66, 0, 1, 2, 0, 3, 4, - 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, - 177, 178, 179, 128, 180, 0, 181, 182, 183, 0, - 0, 0, 0, 67, 0, 60, 61, 0, 100, 63, - 64, 65, 66, 362, 1, 2, 0, 3, 4, 0, - 0, 60, 61, 0, 100, 63, 64, 65, 66, 0, - 1, 2, 322, 3, 4, 0, 0, 0, 0, 0, - 60, 61, 67, 100, 63, 64, 65, 66, 410, 1, - 2, 0, 3, 4, 68, 0, 0, 69, 67, 0, - 70, 0, 71, 0, 0, 0, 0, 485, 0, 60, - 61, 0, 100, 63, 64, 65, 66, 67, 1, 2, - 0, 3, 4, 0, 0, 60, 61, 0, 195, 63, - 64, 65, 66, 0, 1, 2, 68, 3, 4, 69, - 0, 0, 70, 0, 71, 0, 67, 60, 61, 0, - 100, 108, 109, 110, 66, 0, 1, 2, 0, 3, - 4, 0, 67, 0, 60, 61, 0, 290, 63, 64, - 65, 66, 0, 1, 2, 68, 3, 4, 69, 0, - 0, 70, 0, 71, 67, 0, 0, 0, 0, 0, - 0, 68, 0, 0, 69, 0, 0, 70, 0, 71, - 0, 67, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 0, 0, 69, 0, 0, 70, 0, 71, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, - 0, 0, 69, 0, 0, 70, 0, 71, 0, 0, - 0, 0, 0, 0, 0, 68, 0, 0, 69, 0, - 0, 70, 0, 71, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 201, 0, 0, 0, 68, 0, 0, - 69, 0, 0, 70, 0, 278, 0, 0, 0, 0, - 0, 202, 203, 0, 68, 0, 0, 69, 0, 0, - 70, 0, 71, 204, 205, 206, 207, 208, 209, 150, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 161, 162, 163, 164, 210, 211, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 212, 213, 214, 0, - 0, 215, 168, 169, 170, 171, 172, 173, 174, 175, - 176, 177, 178, 179, 216, 217, 218, 219, 220, 221 -}; - -static const short int yycheck[] = -{ - 0, 26, 301, 239, 113, 185, 186, 4, 206, 0, - 23, 9, 81, 411, 9, 16, 16, 324, 132, 45, - 9, 328, 133, 24, 134, 16, 136, 9, 240, 241, - 207, 142, 142, 59, 50, 3, 4, 106, 5, 6, - 113, 8, 9, 10, 11, 12, 71, 14, 15, 226, - 17, 18, 14, 21, 22, 17, 214, 46, 133, 217, - 218, 219, 220, 221, 46, 133, 224, 133, 29, 144, - 95, 134, 133, 136, 99, 42, 144, 140, 144, 132, - 105, 142, 107, 110, 111, 46, 86, 297, 486, 35, - 36, 37, 38, 39, 40, 41, 121, 43, 278, 133, - 127, 128, 129, 137, 314, 13, 110, 111, 133, 134, - 5, 6, 137, 8, 9, 10, 11, 12, 516, 14, - 15, 132, 17, 18, 128, 129, 27, 28, 5, 6, - 143, 8, 9, 10, 11, 12, 0, 14, 15, 351, - 17, 18, 140, 144, 542, 140, 143, 42, 110, 111, - 37, 38, 133, 133, 3, 4, 137, 44, 316, 133, - 140, 530, 461, 50, 463, 42, 128, 129, 135, 133, - 144, 138, 541, 137, 141, 132, 143, 144, 29, 204, - 487, 132, 362, 133, 134, 131, 136, 212, 213, 214, - 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, - 138, 270, 271, 272, 273, 274, 197, 232, 35, 36, - 37, 17, 133, 40, 283, 284, 285, 453, 291, 140, - 293, 294, 380, 296, 382, 383, 384, 534, 16, 536, - 303, 134, 341, 136, 14, 138, 17, 17, 311, 312, - 135, 31, 17, 138, 133, 134, 141, 136, 143, 144, - 106, 107, 134, 278, 136, 137, 77, 78, 135, 110, - 111, 138, 331, 332, 141, 131, 143, 144, 341, 338, - 17, 136, 297, 298, 299, 4, 127, 128, 129, 4, - 139, 15, 518, 441, 18, 521, 39, 139, 41, 314, - 315, 316, 9, 7, 134, 12, 136, 370, 371, 372, - 7, 7, 4, 133, 137, 378, 17, 142, 466, 467, - 468, 137, 136, 136, 136, 388, 389, 515, 136, 136, - 110, 111, 17, 136, 136, 136, 133, 352, 397, 398, - 399, 400, 48, 531, 9, 404, 405, 127, 128, 129, - 53, 54, 55, 56, 57, 58, 142, 136, 133, 422, - 136, 424, 136, 31, 427, 380, 381, 382, 383, 384, - 433, 434, 387, 133, 133, 133, 133, 133, 133, 133, - 439, 440, 133, 133, 133, 133, 31, 17, 4, 142, - 52, 406, 133, 456, 457, 133, 459, 460, 138, 133, - 133, 464, 133, 293, 294, 133, 296, 133, 133, 472, - 142, 17, 12, 303, 137, 12, 0, 476, 136, 478, - 479, 311, 312, 438, 133, 133, 441, 4, 491, 13, - 14, 15, 137, 17, 18, 19, 499, 452, 133, 133, - 133, 25, 26, 458, 133, 133, 136, 133, 17, 133, - 133, 466, 467, 468, 133, 137, 471, 137, 133, 133, - 44, 451, 138, 47, 137, 528, 137, 51, 46, 133, - 533, 140, 46, 12, 137, 4, 137, 137, 133, 12, - 370, 371, 372, 140, 547, 548, 12, 133, 378, 552, - 12, 64, 555, 12, 210, 124, 124, 124, 388, 389, - 211, 510, 517, 86, 487, 232, 105, 99, 16, 5, - 6, 83, 8, 9, 10, 11, 12, 53, 14, 15, - 510, 17, 18, 471, 377, -1, -1, -1, -1, -1, - -1, -1, 422, -1, 424, -1, 0, 427, -1, -1, - -1, -1, -1, 433, 434, -1, 42, -1, -1, 13, - 14, 15, -1, 17, 18, 19, -1, -1, -1, -1, - -1, 25, 26, -1, -1, -1, 456, 457, -1, 459, - 460, -1, -1, -1, 464, -1, -1, -1, -1, -1, - 44, -1, 472, 47, -1, -1, -1, 51, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, -1, -1, - -1, 491, -1, -1, -1, 5, 6, -1, -1, 499, - -1, -1, -1, -1, 14, 15, -1, 17, 18, -1, - 20, -1, 21, 22, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 33, 34, -1, -1, -1, 528, 135, - -1, -1, 138, 533, -1, 141, -1, 143, 144, -1, - -1, -1, -1, -1, -1, -1, -1, 547, 548, -1, - -1, -1, 552, -1, -1, 555, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, -1, -1, -1, -1, -1, -1, -1, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, -1, -1, -1, -1, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, - 120, -1, 122, -1, 124, 125, 126, -1, -1, -1, - -1, -1, -1, -1, 134, -1, 136, -1, 138, -1, - -1, 141, -1, 143, -1, 145, 3, 4, 5, 6, - 7, -1, -1, -1, -1, -1, -1, 14, 15, -1, - 17, 18, -1, 20, 21, 22, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 33, 34, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 5, 6, 50, 8, 9, 10, 11, 12, -1, - 14, 15, -1, 17, 18, -1, -1, -1, -1, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, -1, -1, 42, 5, - 6, -1, 8, 9, 10, 11, 12, -1, 14, 15, - -1, 17, 18, -1, -1, -1, -1, -1, -1, -1, - -1, 108, 109, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, -1, 122, 42, 124, 125, 126, - -1, 3, 4, 5, 6, 7, -1, 134, -1, 136, - -1, -1, 14, 15, 141, 17, 18, -1, 20, 21, - 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 33, 34, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 50, -1, - -1, 135, -1, -1, 138, -1, 140, 141, -1, 143, - -1, -1, -1, -1, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, -1, -1, -1, -1, -1, -1, -1, -1, 135, - -1, -1, 138, -1, -1, 141, -1, 143, -1, -1, - -1, -1, -1, -1, -1, -1, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, -1, - 122, -1, 124, 125, 126, 3, 4, -1, -1, 7, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 141, - -1, -1, 20, 21, 22, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 33, 34, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 50, -1, 5, 6, -1, 8, 9, 10, - 11, 12, -1, 14, 15, -1, 17, 18, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, -1, -1, -1, -1, -1, - -1, 42, -1, -1, -1, -1, 5, 6, -1, 8, - 9, 10, 11, 12, -1, 14, 15, -1, 17, 18, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 32, 122, -1, 124, 125, 126, -1, - -1, -1, -1, 42, -1, 5, 6, -1, 8, 9, - 10, 11, 12, 141, 14, 15, -1, 17, 18, -1, - -1, 5, 6, -1, 8, 9, 10, 11, 12, -1, - 14, 15, 32, 17, 18, -1, -1, -1, -1, -1, - 5, 6, 42, 8, 9, 10, 11, 12, 32, 14, - 15, -1, 17, 18, 135, -1, -1, 138, 42, -1, - 141, -1, 143, -1, -1, -1, -1, 32, -1, 5, - 6, -1, 8, 9, 10, 11, 12, 42, 14, 15, - -1, 17, 18, -1, -1, 5, 6, -1, 8, 9, - 10, 11, 12, -1, 14, 15, 135, 17, 18, 138, - -1, -1, 141, -1, 143, -1, 42, 5, 6, -1, - 8, 9, 10, 11, 12, -1, 14, 15, -1, 17, - 18, -1, 42, -1, 5, 6, -1, 8, 9, 10, - 11, 12, -1, 14, 15, 135, 17, 18, 138, -1, - -1, 141, -1, 143, 42, -1, -1, -1, -1, -1, - -1, 135, -1, -1, 138, -1, -1, 141, -1, 143, - -1, 42, -1, -1, -1, -1, -1, -1, -1, -1, - 135, -1, -1, 138, -1, -1, 141, -1, 143, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 135, - -1, -1, 138, -1, -1, 141, -1, 143, -1, -1, - -1, -1, -1, -1, -1, 135, -1, -1, 138, -1, - -1, 141, -1, 143, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 30, -1, -1, -1, 135, -1, -1, - 138, -1, -1, 141, -1, 143, -1, -1, -1, -1, - -1, 48, 49, -1, 135, -1, -1, 138, -1, -1, - 141, -1, 143, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 103, 104, 105, -1, - -1, 108, 109, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const unsigned char yystos[] = -{ - 0, 14, 15, 17, 18, 19, 25, 26, 44, 47, - 51, 154, 156, 157, 158, 186, 187, 188, 190, 189, - 45, 59, 195, 132, 50, 132, 13, 132, 35, 36, - 37, 38, 39, 40, 41, 43, 131, 159, 160, 161, - 0, 188, 39, 41, 162, 205, 35, 36, 37, 40, - 163, 202, 204, 211, 132, 132, 138, 196, 17, 194, - 5, 6, 8, 9, 10, 11, 12, 42, 135, 138, - 141, 143, 154, 157, 175, 176, 208, 161, 161, 27, - 28, 185, 161, 161, 16, 212, 213, 24, 144, 203, - 212, 17, 17, 17, 197, 136, 4, 4, 4, 143, - 8, 144, 176, 181, 134, 136, 185, 185, 9, 10, - 11, 152, 153, 176, 182, 53, 54, 55, 56, 57, - 58, 164, 200, 200, 156, 216, 133, 140, 32, 176, - 177, 179, 180, 139, 139, 144, 181, 133, 144, 180, - 182, 176, 21, 22, 3, 4, 7, 20, 33, 34, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 122, 124, 125, 126, 138, 141, 143, 145, 147, 148, - 149, 183, 208, 191, 4, 8, 176, 178, 23, 143, - 201, 30, 48, 49, 60, 61, 62, 63, 64, 65, - 81, 82, 103, 104, 105, 108, 121, 122, 123, 124, - 125, 126, 147, 148, 149, 214, 220, 221, 222, 223, - 17, 166, 133, 137, 176, 176, 142, 144, 176, 137, - 192, 193, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 150, 21, 22, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 151, - 136, 136, 136, 136, 136, 140, 182, 184, 143, 184, - 144, 184, 17, 136, 136, 136, 133, 173, 157, 48, - 8, 176, 210, 9, 12, 9, 152, 164, 150, 151, - 176, 176, 210, 176, 176, 217, 210, 210, 210, 210, - 210, 176, 176, 210, 164, 106, 107, 110, 111, 128, - 129, 165, 32, 177, 168, 140, 142, 142, 168, 173, - 173, 136, 136, 182, 182, 182, 182, 182, 133, 140, - 144, 176, 184, 142, 144, 182, 182, 182, 29, 46, - 171, 174, 136, 3, 4, 7, 20, 21, 22, 33, - 34, 50, 141, 183, 207, 208, 209, 209, 209, 209, - 178, 176, 176, 133, 170, 133, 170, 209, 138, 133, - 133, 133, 133, 133, 133, 209, 209, 31, 178, 176, - 210, 127, 165, 167, 182, 182, 219, 133, 133, 133, - 133, 182, 142, 144, 133, 133, 31, 17, 4, 173, - 32, 176, 198, 199, 52, 206, 184, 133, 133, 209, - 209, 209, 9, 46, 9, 219, 209, 138, 210, 176, - 210, 210, 210, 133, 133, 176, 209, 209, 133, 133, - 133, 133, 137, 182, 182, 182, 182, 142, 182, 182, - 176, 166, 133, 137, 17, 142, 12, 12, 136, 133, - 133, 209, 4, 209, 133, 209, 133, 133, 133, 209, - 209, 136, 176, 182, 182, 210, 133, 137, 133, 133, - 137, 137, 137, 154, 155, 32, 176, 168, 133, 209, - 209, 176, 218, 209, 209, 133, 170, 170, 209, 133, - 210, 210, 210, 218, 209, 137, 137, 182, 182, 182, - 166, 171, 172, 17, 133, 138, 209, 133, 137, 140, - 209, 137, 137, 137, 137, 155, 46, 169, 12, 140, - 152, 215, 166, 176, 168, 140, 168, 4, 209, 207, - 140, 152, 209, 31, 133, 207, 166, 12, 12, 133, - 209, 209, 12, 64, 209, 12, 209 -}; +/* 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. */ #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 yyerrorlab - - -/* 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 yyerrlab1 +/* 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); \ - yytoken = YYTRANSLATE (yychar); \ + { yychar = (token), yylval = (value); \ + yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ + { yyerror ("syntax error: cannot back up"); YYERROR; } \ while (0) - #define YYTERROR 1 #define YYERRCODE 256 - -/* 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 (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 (0) +#ifndef YYPURE +#define YYLEX yylex() #endif - -/* 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 - - -/* YYLEX -- calling `yylex' with the right arguments. */ - +#ifdef YYPURE +#ifdef YYLSP_NEEDED #ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) +#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) #else -# define YYLEX yylex () +#define YYLEX yylex(&yylval, &yylloc) +#endif +#else /* not YYLSP_NEEDED */ +#ifdef YYLEX_PARAM +#define YYLEX yylex(&yylval, YYLEX_PARAM) +#else +#define YYLEX yylex(&yylval) +#endif +#endif /* not YYLSP_NEEDED */ #endif -/* Enable debugging if requested. */ -#if YYDEBUG +/* If nonreentrant, generate the variables here */ -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif +#ifndef YYPURE -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) +int yychar; /* the lookahead symbol */ +YYSTYPE yylval; /* the semantic value of the */ + /* lookahead symbol */ -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yy_stack_print (short int *bottom, short int *top) -#else -static void -yy_stack_print (bottom, top) - short int *bottom; - short int *top; +#ifdef YYLSP_NEEDED +YYLTYPE yylloc; /* location data for the lookahead */ + /* symbol */ #endif -{ - YYFPRINTF (stderr, "Stack now"); - for (/* Nothing. */; 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 (0) +int yynerrs; /* number of parse errors so far */ +#endif /* not YYPURE */ - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yy_reduce_print (int yyrule) -#else -static void -yy_reduce_print (yyrule) - int yyrule; +#if YYDEBUG != 0 +int yydebug; /* nonzero means print parse trace */ +/* Since this is uninitialized, it does not stop multiple parsers + from coexisting. */ #endif -{ - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ", - yyrule - 1, yylno); - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]); -} -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (Rule); \ -} while (0) +/* YYINITDEPTH indicates the initial size of the parser's stacks */ -/* 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 -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -# define YYINITDEPTH 200 +#define YYINITDEPTH 200 #endif -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). +/* YYMAXDEPTH is the maximum size the stacks can grow to + (effective only if the built-in stack extension method is used). */ - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ +#if YYMAXDEPTH == 0 +#undef YYMAXDEPTH +#endif #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 YYERROR_VERBOSE +#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 -# ifndef yystrlen -# if defined (__GLIBC__) && defined (_STRING_H) -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -# if defined (__STDC__) || defined (__cplusplus) -yystrlen (const char *yystr) -# else -yystrlen (yystr) - const char *yystr; -# endif -{ - const char *yys = yystr; - - while (*yys++ != '\0') - continue; - - return yys - yystr - 1; -} -# 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. */ -static char * -# if defined (__STDC__) || defined (__cplusplus) -yystpcpy (char *yydest, const char *yysrc) -# else -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -# endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - 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 == '"') - { - size_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: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -#endif /* YYERROR_VERBOSE */ - - - -#if YYDEBUG -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) +/* This is the most reliable way to avoid incompatibilities + in available built-in functions on various systems. */ static void -yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) -#else +__yy_memcpy (to, from, count) + char *to; + char *from; + unsigned int count; +{ + register char *f = from; + register char *t = to; + register int i = count; + + while (i-- > 0) + *t++ = *f++; +} + +#else /* __cplusplus */ + +/* This is the most reliable way to avoid incompatibilities + in available built-in functions on various systems. */ static void -yysymprint (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE *yyvaluep; +__yy_memcpy (char *to, char *from, unsigned int count) +{ + register char *t = to; + register char *f = from; + register int i = count; + + while (i-- > 0) + *t++ = *f++; +} + #endif -{ - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - switch (yytype) - { - default: - break; - } - YYFPRINTF (yyoutput, ")"); -} - -#endif /* ! YYDEBUG */ -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -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 -{ - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { - - default: - break; - } -} +#line 217 "/usr/share/bison.simple" -/* Prevent warnings from -Wmissing-prototypes. */ +/* 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. */ #ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM); -# else -int yyparse (); -# endif -#else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) +#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 */ + +/* Prevent warning if -Wstrict-prototypes. */ +#ifdef __GNUC__ +#ifdef YYPARSE_PARAM +int yyparse (void *); +#else int yyparse (void); -#else -int yyparse (); #endif -#endif /* ! YYPARSE_PARAM */ +#endif - - -/* 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 (__cplusplus) -int yyparse (void *YYPARSE_PARAM) -# else -int yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -# endif -#else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) int -yyparse (void) -#else -int -yyparse () - -#endif -#endif +yyparse(YYPARSE_PARAM_ARG) + YYPARSE_PARAM_DECL { - - 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; + 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 */ - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - short int yyssa[YYINITDEPTH]; - short int *yyss = yyssa; - short int *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; + 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--) +#else #define YYPOPSTACK (yyvsp--, yyssp--) +#endif - YYSIZE_T yystacksize = YYINITDEPTH; + int yystacksize = YYINITDEPTH; + int yyfree_stacks = 0; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; +#ifdef YYPURE + int yychar; + YYSTYPE yylval; + int yynerrs; +#ifdef YYLSP_NEEDED + YYLTYPE yylloc; +#endif +#endif + YYSTYPE yyval; /* the variable used to return */ + /* semantic values from the action */ + /* routines */ - /* When reducing, the number of symbols on the RHS of the reduced - rule. */ int yylen; - YYDPRINTF ((stderr, "Starting parse\n")); +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Starting parse\n"); +#endif yystate = 0; yyerrstatus = 0; @@ -2806,675 +2140,644 @@ yyparse () so that they stay on the same level as the state stack. The wasted elements are never initialized. */ - yyssp = yyss; + yyssp = yyss - 1; yyvsp = yyvs; +#ifdef YYLSP_NEEDED + yylsp = yyls; +#endif - goto yysetstate; +/* 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: -/*------------------------------------------------------------. -| 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++; + *++yyssp = yystate; - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= 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 + /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; + int size = yyssp - yyss + 1; #ifdef yyoverflow - { - /* 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 int *yyss1 = yyss; + /* 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 - - /* 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), - - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } + yyss = yyss1; yyvs = yyvs1; +#ifdef YYLSP_NEEDED + yyls = yyls1; +#endif #else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + if (yystacksize >= YYMAXDEPTH) + { + yyerror("parser stack overflow"); + if (yyfree_stacks) + { + free (yyss); + free (yyvs); +#ifdef YYLSP_NEEDED + free (yyls); +#endif + } + return 2; + } yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) + if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; - - { - short int *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 +#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 #endif /* no yyoverflow */ - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; + yyssp = yyss + size - 1; + yyvsp = yyvs + size - 1; +#ifdef YYLSP_NEEDED + yylsp = yyls + size - 1; +#endif +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Stack size increased to %d\n", yystacksize); +#endif - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) + if (yyssp >= yyss + yystacksize - 1) YYABORT; } - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Entering state %d\n", yystate); +#endif goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: + yybackup: /* Do appropriate processing given the current state. */ -/* Read a look-ahead token if we need one and don't already have one. */ +/* Read a lookahead token if we need one and don't already have one. */ /* yyresume: */ - /* First try to decide what to do without reference to look-ahead token. */ + /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) + if (yyn == YYFLAG) goto yydefault; - /* Not known => get a look-ahead token if don't already have one. */ + /* 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. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { - YYDPRINTF ((stderr, "Reading a token: ")); +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Reading a token: "); +#endif yychar = YYLEX; } - if (yychar <= YYEOF) + /* Convert token to internal form (in yychar1) for indexing tables with */ + + if (yychar <= 0) /* This means end of input. */ { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); + yychar1 = 0; + yychar = YYEOF; /* Don't call YYLEX any more */ + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Now at end of input.\n"); +#endif } else { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + 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 } - /* 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) + yyn += yychar1; + if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; + yyn = yytable[yyn]; - if (yyn <= 0) + + /* 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 || yyn == YYTABLE_NINF) + if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } + else if (yyn == 0) + goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; - /* Shift the look-ahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + /* Shift the lookahead token. */ + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); +#endif /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; +#ifdef YYLSP_NEEDED + *++yylsp = yylloc; +#endif - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; + /* count tokens shifted since error; after three, turn off error status. */ + if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ +/* Do the default action for the current state. */ yydefault: + yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; - goto yyreduce; - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ +/* Do a reduction. yyn is the number of a rule to reduce with. */ 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 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) +#if YYDEBUG != 0 + if (yydebug) { - case 29: -#line 1053 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.IPredicate) = ICmpInst::ICMP_EQ; ;} - break; + int i; - case 30: -#line 1053 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.IPredicate) = ICmpInst::ICMP_NE; ;} - break; + fprintf (stderr, "Reducing via rule %d (line %d), ", + yyn, yyrline[yyn]); - case 31: -#line 1054 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.IPredicate) = ICmpInst::ICMP_SLT; ;} - 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 32: -#line 1054 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.IPredicate) = ICmpInst::ICMP_SGT; ;} - break; - case 33: -#line 1055 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.IPredicate) = ICmpInst::ICMP_SLE; ;} - break; + switch (yyn) { - case 34: -#line 1055 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.IPredicate) = ICmpInst::ICMP_SGE; ;} - break; - - case 35: -#line 1056 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.IPredicate) = ICmpInst::ICMP_ULT; ;} - break; - - case 36: -#line 1056 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.IPredicate) = ICmpInst::ICMP_UGT; ;} - break; - - case 37: -#line 1057 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.IPredicate) = ICmpInst::ICMP_ULE; ;} - break; - - case 38: -#line 1057 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.IPredicate) = ICmpInst::ICMP_UGE; ;} - break; - - case 39: -#line 1061 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.FPredicate) = FCmpInst::FCMP_OEQ; ;} - break; - - case 40: -#line 1061 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.FPredicate) = FCmpInst::FCMP_ONE; ;} - break; - - case 41: -#line 1062 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.FPredicate) = FCmpInst::FCMP_OLT; ;} - break; - - case 42: -#line 1062 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.FPredicate) = FCmpInst::FCMP_OGT; ;} - break; - - case 43: -#line 1063 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.FPredicate) = FCmpInst::FCMP_OLE; ;} - break; - - case 44: -#line 1063 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.FPredicate) = FCmpInst::FCMP_OGE; ;} - break; - - case 45: -#line 1064 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.FPredicate) = FCmpInst::FCMP_ORD; ;} - break; - - case 46: -#line 1064 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.FPredicate) = FCmpInst::FCMP_UNO; ;} - break; - - case 47: -#line 1065 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.FPredicate) = FCmpInst::FCMP_UEQ; ;} - break; - - case 48: -#line 1065 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.FPredicate) = FCmpInst::FCMP_UNE; ;} - break; - - case 49: -#line 1066 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.FPredicate) = FCmpInst::FCMP_ULT; ;} - break; - - case 50: -#line 1066 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.FPredicate) = FCmpInst::FCMP_UGT; ;} - break; - - case 51: -#line 1067 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.FPredicate) = FCmpInst::FCMP_ULE; ;} - break; - - case 52: -#line 1067 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.FPredicate) = FCmpInst::FCMP_UGE; ;} - break; - - case 53: -#line 1068 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.FPredicate) = FCmpInst::FCMP_TRUE; ;} - break; - - case 54: -#line 1069 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.FPredicate) = FCmpInst::FCMP_FALSE; ;} - break; - - case 61: -#line 1078 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.StrVal) = 0; ;} - break; - - case 62: -#line 1082 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.StrVal) = (yyvsp[-1].StrVal); +case 28: +#line 1054 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.IPredicate = ICmpInst::ICMP_EQ; ; + break;} +case 29: +#line 1054 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.IPredicate = ICmpInst::ICMP_NE; ; + break;} +case 30: +#line 1055 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.IPredicate = ICmpInst::ICMP_SLT; ; + break;} +case 31: +#line 1055 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.IPredicate = ICmpInst::ICMP_SGT; ; + break;} +case 32: +#line 1056 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.IPredicate = ICmpInst::ICMP_SLE; ; + break;} +case 33: +#line 1056 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.IPredicate = ICmpInst::ICMP_SGE; ; + break;} +case 34: +#line 1057 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.IPredicate = ICmpInst::ICMP_ULT; ; + break;} +case 35: +#line 1057 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.IPredicate = ICmpInst::ICMP_UGT; ; + break;} +case 36: +#line 1058 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.IPredicate = ICmpInst::ICMP_ULE; ; + break;} +case 37: +#line 1058 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.IPredicate = ICmpInst::ICMP_UGE; ; + break;} +case 38: +#line 1062 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.FPredicate = FCmpInst::FCMP_OEQ; ; + break;} +case 39: +#line 1062 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.FPredicate = FCmpInst::FCMP_ONE; ; + break;} +case 40: +#line 1063 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.FPredicate = FCmpInst::FCMP_OLT; ; + break;} +case 41: +#line 1063 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.FPredicate = FCmpInst::FCMP_OGT; ; + break;} +case 42: +#line 1064 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.FPredicate = FCmpInst::FCMP_OLE; ; + break;} +case 43: +#line 1064 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.FPredicate = FCmpInst::FCMP_OGE; ; + break;} +case 44: +#line 1065 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.FPredicate = FCmpInst::FCMP_ORD; ; + break;} +case 45: +#line 1065 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.FPredicate = FCmpInst::FCMP_UNO; ; + break;} +case 46: +#line 1066 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.FPredicate = FCmpInst::FCMP_UEQ; ; + break;} +case 47: +#line 1066 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.FPredicate = FCmpInst::FCMP_UNE; ; + break;} +case 48: +#line 1067 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.FPredicate = FCmpInst::FCMP_ULT; ; + break;} +case 49: +#line 1067 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.FPredicate = FCmpInst::FCMP_UGT; ; + break;} +case 50: +#line 1068 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.FPredicate = FCmpInst::FCMP_ULE; ; + break;} +case 51: +#line 1068 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.FPredicate = FCmpInst::FCMP_UGE; ; + break;} +case 52: +#line 1069 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.FPredicate = FCmpInst::FCMP_TRUE; ; + break;} +case 53: +#line 1070 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.FPredicate = FCmpInst::FCMP_FALSE; ; + break;} +case 60: +#line 1079 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.StrVal = 0; ; + break;} +case 61: +#line 1083 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.StrVal = yyvsp[-1].StrVal; CHECK_FOR_ERROR - ;} - break; - - case 63: -#line 1086 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.StrVal) = 0; + ; + break;} +case 62: +#line 1087 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.StrVal = 0; CHECK_FOR_ERROR - ;} - break; - - case 66: -#line 1093 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.StrVal) = (yyvsp[-1].StrVal); + ; + break;} +case 65: +#line 1094 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.StrVal = yyvsp[-1].StrVal; CHECK_FOR_ERROR - ;} - break; - - case 67: -#line 1097 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.StrVal) = 0; + ; + break;} +case 66: +#line 1098 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.StrVal = 0; CHECK_FOR_ERROR - ;} - break; - - case 68: -#line 1103 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} - break; - - case 69: -#line 1104 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} - break; - - case 70: -#line 1105 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} - break; - - case 71: -#line 1106 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;} - break; - - case 72: -#line 1107 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} - break; - - case 73: -#line 1111 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} - break; - - case 74: -#line 1112 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} - break; - - case 75: -#line 1113 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} - break; - - case 76: -#line 1117 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.Visibility) = GlobalValue::DefaultVisibility; ;} - break; - - case 77: -#line 1118 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.Visibility) = GlobalValue::HiddenVisibility; ;} - break; - - case 78: -#line 1122 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} - break; - - case 79: -#line 1123 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} - break; - - case 80: -#line 1124 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} - break; - - case 81: -#line 1128 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} - break; - - case 82: -#line 1129 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} - break; - - case 83: -#line 1130 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} - break; - - case 84: -#line 1131 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} - break; - - case 85: -#line 1132 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} - break; - - case 86: -#line 1135 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.UIntVal) = CallingConv::C; ;} - break; - - case 87: -#line 1136 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.UIntVal) = CallingConv::C; ;} - break; - - case 88: -#line 1137 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.UIntVal) = CallingConv::Fast; ;} - break; - - case 89: -#line 1138 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.UIntVal) = CallingConv::Cold; ;} - break; - - case 90: -#line 1139 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.UIntVal) = CallingConv::X86_StdCall; ;} - break; - - case 91: -#line 1140 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.UIntVal) = CallingConv::X86_FastCall; ;} - break; - - case 92: -#line 1141 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - if ((unsigned)(yyvsp[0].UInt64Val) != (yyvsp[0].UInt64Val)) + ; + break;} +case 67: +#line 1104 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Linkage = GlobalValue::InternalLinkage; ; + break;} +case 68: +#line 1105 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Linkage = GlobalValue::WeakLinkage; ; + break;} +case 69: +#line 1106 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Linkage = GlobalValue::LinkOnceLinkage; ; + break;} +case 70: +#line 1107 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Linkage = GlobalValue::AppendingLinkage; ; + break;} +case 71: +#line 1108 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Linkage = GlobalValue::DLLExportLinkage; ; + break;} +case 72: +#line 1112 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Linkage = GlobalValue::DLLImportLinkage; ; + break;} +case 73: +#line 1113 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Linkage = GlobalValue::ExternalWeakLinkage; ; + break;} +case 74: +#line 1114 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Linkage = GlobalValue::ExternalLinkage; ; + break;} +case 75: +#line 1118 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Visibility = GlobalValue::DefaultVisibility; ; + break;} +case 76: +#line 1119 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Visibility = GlobalValue::HiddenVisibility; ; + break;} +case 77: +#line 1123 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Linkage = GlobalValue::ExternalLinkage; ; + break;} +case 78: +#line 1124 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Linkage = GlobalValue::DLLImportLinkage; ; + break;} +case 79: +#line 1125 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Linkage = GlobalValue::ExternalWeakLinkage; ; + break;} +case 80: +#line 1129 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Linkage = GlobalValue::ExternalLinkage; ; + break;} +case 81: +#line 1130 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Linkage = GlobalValue::InternalLinkage; ; + break;} +case 82: +#line 1131 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Linkage = GlobalValue::LinkOnceLinkage; ; + break;} +case 83: +#line 1132 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Linkage = GlobalValue::WeakLinkage; ; + break;} +case 84: +#line 1133 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.Linkage = GlobalValue::DLLExportLinkage; ; + break;} +case 85: +#line 1136 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.UIntVal = CallingConv::C; ; + break;} +case 86: +#line 1137 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.UIntVal = CallingConv::C; ; + break;} +case 87: +#line 1138 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.UIntVal = CallingConv::Fast; ; + break;} +case 88: +#line 1139 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.UIntVal = CallingConv::Cold; ; + break;} +case 89: +#line 1140 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.UIntVal = CallingConv::X86_StdCall; ; + break;} +case 90: +#line 1141 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.UIntVal = CallingConv::X86_FastCall; ; + break;} +case 91: +#line 1142 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + if ((unsigned)yyvsp[0].UInt64Val != yyvsp[0].UInt64Val) GEN_ERROR("Calling conv too large"); - (yyval.UIntVal) = (yyvsp[0].UInt64Val); + yyval.UIntVal = yyvsp[0].UInt64Val; CHECK_FOR_ERROR - ;} - break; - - case 93: -#line 1148 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.ParamAttrs) = FunctionType::ZExtAttribute; ;} - break; - - case 94: -#line 1149 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.ParamAttrs) = FunctionType::SExtAttribute; ;} - break; - - case 95: -#line 1150 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.ParamAttrs) = FunctionType::InRegAttribute; ;} - break; - - case 96: -#line 1151 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.ParamAttrs) = FunctionType::StructRetAttribute; ;} - break; - - case 97: -#line 1154 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.ParamAttrs) = FunctionType::NoAttributeSet; ;} - break; - - case 98: -#line 1155 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.ParamAttrs) = FunctionType::ParameterAttributes((yyvsp[-1].ParamAttrs) | (yyvsp[0].ParamAttrs)); - ;} - break; - - case 99: -#line 1160 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.ParamAttrs) = FunctionType::NoReturnAttribute; ;} - break; - - case 101: -#line 1164 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.ParamAttrs) = FunctionType::NoAttributeSet; ;} - break; - - case 102: -#line 1165 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.ParamAttrs) = FunctionType::ParameterAttributes((yyvsp[-1].ParamAttrs) | (yyvsp[0].ParamAttrs)); - ;} - break; - - case 103: -#line 1172 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.UIntVal) = 0; ;} - break; - - case 104: -#line 1173 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.UIntVal) = (yyvsp[0].UInt64Val); - if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) + ; + break;} +case 92: +#line 1149 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ParamAttrs = FunctionType::ZExtAttribute; ; + break;} +case 93: +#line 1150 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ParamAttrs = FunctionType::SExtAttribute; ; + break;} +case 94: +#line 1151 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ParamAttrs = FunctionType::InRegAttribute; ; + break;} +case 95: +#line 1152 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ParamAttrs = FunctionType::StructRetAttribute; ; + break;} +case 96: +#line 1155 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ParamAttrs = FunctionType::NoAttributeSet; ; + break;} +case 97: +#line 1156 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.ParamAttrs = FunctionType::ParameterAttributes(yyvsp[-1].ParamAttrs | yyvsp[0].ParamAttrs); + ; + break;} +case 98: +#line 1161 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ParamAttrs = FunctionType::NoReturnAttribute; ; + break;} +case 100: +#line 1165 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ParamAttrs = FunctionType::NoAttributeSet; ; + break;} +case 101: +#line 1166 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.ParamAttrs = FunctionType::ParameterAttributes(yyvsp[-1].ParamAttrs | yyvsp[0].ParamAttrs); + ; + break;} +case 102: +#line 1173 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.UIntVal = 0; ; + break;} +case 103: +#line 1174 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.UIntVal = yyvsp[0].UInt64Val; + if (yyval.UIntVal != 0 && !isPowerOf2_32(yyval.UIntVal)) GEN_ERROR("Alignment must be a power of two"); CHECK_FOR_ERROR -;} - break; - - case 105: -#line 1179 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.UIntVal) = 0; ;} - break; - - case 106: -#line 1180 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.UIntVal) = (yyvsp[0].UInt64Val); - if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) +; + break;} +case 104: +#line 1180 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.UIntVal = 0; ; + break;} +case 105: +#line 1181 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.UIntVal = yyvsp[0].UInt64Val; + if (yyval.UIntVal != 0 && !isPowerOf2_32(yyval.UIntVal)) GEN_ERROR("Alignment must be a power of two"); CHECK_FOR_ERROR -;} - break; - - case 107: -#line 1188 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - for (unsigned i = 0, e = strlen((yyvsp[0].StrVal)); i != e; ++i) - if ((yyvsp[0].StrVal)[i] == '"' || (yyvsp[0].StrVal)[i] == '\\') +; + break;} +case 106: +#line 1189 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + for (unsigned i = 0, e = strlen(yyvsp[0].StrVal); i != e; ++i) + if (yyvsp[0].StrVal[i] == '"' || yyvsp[0].StrVal[i] == '\\') GEN_ERROR("Invalid character in section name"); - (yyval.StrVal) = (yyvsp[0].StrVal); + yyval.StrVal = yyvsp[0].StrVal; CHECK_FOR_ERROR -;} - break; - - case 108: -#line 1196 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.StrVal) = 0; ;} - break; - - case 109: -#line 1197 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.StrVal) = (yyvsp[0].StrVal); ;} - break; - - case 110: -#line 1202 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - {;} - break; - - case 111: -#line 1203 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - {;} - break; - - case 112: -#line 1204 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - CurGV->setSection((yyvsp[0].StrVal)); - free((yyvsp[0].StrVal)); +; + break;} +case 107: +#line 1197 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.StrVal = 0; ; + break;} +case 108: +#line 1198 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.StrVal = yyvsp[0].StrVal; ; + break;} +case 109: +#line 1203 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{; + break;} +case 110: +#line 1204 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{; + break;} +case 111: +#line 1205 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + CurGV->setSection(yyvsp[0].StrVal); + free(yyvsp[0].StrVal); CHECK_FOR_ERROR - ;} - break; - - case 113: -#line 1209 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - if ((yyvsp[0].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[0].UInt64Val))) + ; + break;} +case 112: +#line 1210 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + if (yyvsp[0].UInt64Val != 0 && !isPowerOf2_32(yyvsp[0].UInt64Val)) GEN_ERROR("Alignment must be a power of two"); - CurGV->setAlignment((yyvsp[0].UInt64Val)); + CurGV->setAlignment(yyvsp[0].UInt64Val); CHECK_FOR_ERROR - ;} - break; - - case 118: -#line 1225 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.TypeVal) = new PATypeHolder(OpaqueType::get()); + ; + break;} +case 117: +#line 1226 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.TypeVal = new PATypeHolder(OpaqueType::get()); CHECK_FOR_ERROR - ;} - break; - - case 119: -#line 1229 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.TypeVal) = new PATypeHolder((yyvsp[0].PrimType)); + ; + break;} +case 118: +#line 1230 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.TypeVal = new PATypeHolder(yyvsp[0].PrimType); CHECK_FOR_ERROR - ;} - break; - - case 120: -#line 1233 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Pointer type? - if (*(yyvsp[-1].TypeVal) == Type::LabelTy) + ; + break;} +case 119: +#line 1234 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Pointer type? + if (*yyvsp[-1].TypeVal == Type::LabelTy) GEN_ERROR("Cannot form a pointer to a basic block"); - (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(PointerType::get(*(yyvsp[-1].TypeVal)))); - delete (yyvsp[-1].TypeVal); + yyval.TypeVal = new PATypeHolder(HandleUpRefs(PointerType::get(*yyvsp[-1].TypeVal))); + delete yyvsp[-1].TypeVal; CHECK_FOR_ERROR - ;} - break; - - case 121: -#line 1240 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Named types are also simple types... - const Type* tmp = getTypeVal((yyvsp[0].ValIDVal)); + ; + break;} +case 120: +#line 1241 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Named types are also simple types... + const Type* tmp = getTypeVal(yyvsp[0].ValIDVal); CHECK_FOR_ERROR - (yyval.TypeVal) = new PATypeHolder(tmp); - ;} - break; - - case 122: -#line 1245 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Type UpReference - if ((yyvsp[0].UInt64Val) > (uint64_t)~0U) GEN_ERROR("Value out of range"); + yyval.TypeVal = new PATypeHolder(tmp); + ; + break;} +case 121: +#line 1246 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Type UpReference + if (yyvsp[0].UInt64Val > (uint64_t)~0U) GEN_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) = new PATypeHolder(OT); + UpRefs.push_back(UpRefRecord((unsigned)yyvsp[0].UInt64Val, OT)); // Add to vector... + yyval.TypeVal = new PATypeHolder(OT); UR_OUT("New Upreference!\n"); CHECK_FOR_ERROR - ;} - break; - - case 123: -#line 1253 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 122: +#line 1254 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ std::vector Params; std::vector Attrs; - Attrs.push_back((yyvsp[0].ParamAttrs)); - for (TypeWithAttrsList::iterator I=(yyvsp[-2].TypeWithAttrsList)->begin(), E=(yyvsp[-2].TypeWithAttrsList)->end(); I != E; ++I) { + Attrs.push_back(yyvsp[0].ParamAttrs); + for (TypeWithAttrsList::iterator I=yyvsp[-2].TypeWithAttrsList->begin(), E=yyvsp[-2].TypeWithAttrsList->end(); I != E; ++I) { Params.push_back(I->Ty->get()); if (I->Ty->get() != Type::VoidTy) Attrs.push_back(I->Attrs); @@ -3482,21 +2785,20 @@ yyreduce: bool isVarArg = Params.size() && Params.back() == Type::VoidTy; if (isVarArg) Params.pop_back(); - FunctionType *FT = FunctionType::get(*(yyvsp[-4].TypeVal), Params, isVarArg, Attrs); - delete (yyvsp[-2].TypeWithAttrsList); // Delete the argument list - delete (yyvsp[-4].TypeVal); // Delete the return type handle - (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(FT)); + FunctionType *FT = FunctionType::get(*yyvsp[-4].TypeVal, Params, isVarArg, Attrs); + delete yyvsp[-2].TypeWithAttrsList; // Delete the argument list + delete yyvsp[-4].TypeVal; // Delete the return type handle + yyval.TypeVal = new PATypeHolder(HandleUpRefs(FT)); CHECK_FOR_ERROR - ;} - break; - - case 124: -#line 1271 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 123: +#line 1272 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ std::vector Params; std::vector Attrs; - Attrs.push_back((yyvsp[0].ParamAttrs)); - for (TypeWithAttrsList::iterator I=(yyvsp[-2].TypeWithAttrsList)->begin(), E=(yyvsp[-2].TypeWithAttrsList)->end(); I != E; ++I) { + Attrs.push_back(yyvsp[0].ParamAttrs); + for (TypeWithAttrsList::iterator I=yyvsp[-2].TypeWithAttrsList->begin(), E=yyvsp[-2].TypeWithAttrsList->end(); I != E; ++I) { Params.push_back(I->Ty->get()); if (I->Ty->get() != Type::VoidTy) Attrs.push_back(I->Attrs); @@ -3504,303 +2806,282 @@ yyreduce: bool isVarArg = Params.size() && Params.back() == Type::VoidTy; if (isVarArg) Params.pop_back(); - FunctionType *FT = FunctionType::get((yyvsp[-4].PrimType), Params, isVarArg, Attrs); - delete (yyvsp[-2].TypeWithAttrsList); // Delete the argument list - (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(FT)); + FunctionType *FT = FunctionType::get(yyvsp[-4].PrimType, Params, isVarArg, Attrs); + delete yyvsp[-2].TypeWithAttrsList; // Delete the argument list + yyval.TypeVal = new PATypeHolder(HandleUpRefs(FT)); CHECK_FOR_ERROR - ;} - break; - - case 125: -#line 1289 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Sized array type? - (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(ArrayType::get(*(yyvsp[-1].TypeVal), (unsigned)(yyvsp[-3].UInt64Val)))); - delete (yyvsp[-1].TypeVal); + ; + break;} +case 124: +#line 1290 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Sized array type? + yyval.TypeVal = new PATypeHolder(HandleUpRefs(ArrayType::get(*yyvsp[-1].TypeVal, (unsigned)yyvsp[-3].UInt64Val))); + delete yyvsp[-1].TypeVal; CHECK_FOR_ERROR - ;} - break; - - case 126: -#line 1294 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Packed array type? - const llvm::Type* ElemTy = (yyvsp[-1].TypeVal)->get(); - if ((unsigned)(yyvsp[-3].UInt64Val) != (yyvsp[-3].UInt64Val)) + ; + break;} +case 125: +#line 1295 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Packed array type? + const llvm::Type* ElemTy = yyvsp[-1].TypeVal->get(); + if ((unsigned)yyvsp[-3].UInt64Val != yyvsp[-3].UInt64Val) GEN_ERROR("Unsigned result not equal to signed result"); if (!ElemTy->isFloatingPoint() && !ElemTy->isInteger()) GEN_ERROR("Element type of a PackedType must be primitive"); - if (!isPowerOf2_32((yyvsp[-3].UInt64Val))) + if (!isPowerOf2_32(yyvsp[-3].UInt64Val)) GEN_ERROR("Vector length should be a power of 2"); - (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(PackedType::get(*(yyvsp[-1].TypeVal), (unsigned)(yyvsp[-3].UInt64Val)))); - delete (yyvsp[-1].TypeVal); + yyval.TypeVal = new PATypeHolder(HandleUpRefs(PackedType::get(*yyvsp[-1].TypeVal, (unsigned)yyvsp[-3].UInt64Val))); + delete yyvsp[-1].TypeVal; CHECK_FOR_ERROR - ;} - break; - - case 127: -#line 1306 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Structure type? + ; + break;} +case 126: +#line 1307 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Structure type? std::vector Elements; - for (std::list::iterator I = (yyvsp[-1].TypeList)->begin(), - E = (yyvsp[-1].TypeList)->end(); I != E; ++I) + for (std::list::iterator I = yyvsp[-1].TypeList->begin(), + E = yyvsp[-1].TypeList->end(); I != E; ++I) Elements.push_back(*I); - (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(StructType::get(Elements))); - delete (yyvsp[-1].TypeList); + yyval.TypeVal = new PATypeHolder(HandleUpRefs(StructType::get(Elements))); + delete yyvsp[-1].TypeList; CHECK_FOR_ERROR - ;} - break; - - case 128: -#line 1316 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Empty structure type? - (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector())); + ; + break;} +case 127: +#line 1317 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Empty structure type? + yyval.TypeVal = new PATypeHolder(StructType::get(std::vector())); CHECK_FOR_ERROR - ;} - break; - - case 129: -#line 1320 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 128: +#line 1321 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ std::vector Elements; - for (std::list::iterator I = (yyvsp[-2].TypeList)->begin(), - E = (yyvsp[-2].TypeList)->end(); I != E; ++I) + for (std::list::iterator I = yyvsp[-2].TypeList->begin(), + E = yyvsp[-2].TypeList->end(); I != E; ++I) Elements.push_back(*I); - (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(StructType::get(Elements, true))); - delete (yyvsp[-2].TypeList); + yyval.TypeVal = new PATypeHolder(HandleUpRefs(StructType::get(Elements, true))); + delete yyvsp[-2].TypeList; CHECK_FOR_ERROR - ;} - break; - - case 130: -#line 1330 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Empty structure type? - (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector(), true)); + ; + break;} +case 129: +#line 1331 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Empty structure type? + yyval.TypeVal = new PATypeHolder(StructType::get(std::vector(), true)); CHECK_FOR_ERROR - ;} - break; - - case 131: -#line 1337 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.TypeWithAttrs).Ty = (yyvsp[-1].TypeVal); - (yyval.TypeWithAttrs).Attrs = (yyvsp[0].ParamAttrs); - ;} - break; - - case 132: -#line 1344 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 130: +#line 1338 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.TypeWithAttrs.Ty = yyvsp[-1].TypeVal; + yyval.TypeWithAttrs.Attrs = yyvsp[0].ParamAttrs; + ; + break;} +case 131: +#line 1345 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription()); - if (!(*(yyvsp[0].TypeVal))->isFirstClassType()) + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription()); + if (!(*yyvsp[0].TypeVal)->isFirstClassType()) GEN_ERROR("LLVM functions cannot return aggregate types"); - (yyval.TypeVal) = (yyvsp[0].TypeVal); - ;} - break; - - case 133: -#line 1351 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.TypeVal) = new PATypeHolder(Type::VoidTy); - ;} - break; - - case 134: -#line 1356 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.TypeWithAttrsList) = new TypeWithAttrsList(); - (yyval.TypeWithAttrsList)->push_back((yyvsp[0].TypeWithAttrs)); + yyval.TypeVal = yyvsp[0].TypeVal; + ; + break;} +case 132: +#line 1352 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.TypeVal = new PATypeHolder(Type::VoidTy); + ; + break;} +case 133: +#line 1357 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.TypeWithAttrsList = new TypeWithAttrsList(); + yyval.TypeWithAttrsList->push_back(yyvsp[0].TypeWithAttrs); CHECK_FOR_ERROR - ;} - break; - - case 135: -#line 1361 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - ((yyval.TypeWithAttrsList)=(yyvsp[-2].TypeWithAttrsList))->push_back((yyvsp[0].TypeWithAttrs)); + ; + break;} +case 134: +#line 1362 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + (yyval.TypeWithAttrsList=yyvsp[-2].TypeWithAttrsList)->push_back(yyvsp[0].TypeWithAttrs); CHECK_FOR_ERROR - ;} - break; - - case 137: -#line 1369 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.TypeWithAttrsList)=(yyvsp[-2].TypeWithAttrsList); + ; + break;} +case 136: +#line 1370 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.TypeWithAttrsList=yyvsp[-2].TypeWithAttrsList; TypeWithAttrs TWA; TWA.Attrs = FunctionType::NoAttributeSet; TWA.Ty = new PATypeHolder(Type::VoidTy); - (yyval.TypeWithAttrsList)->push_back(TWA); + yyval.TypeWithAttrsList->push_back(TWA); CHECK_FOR_ERROR - ;} - break; - - case 138: -#line 1376 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.TypeWithAttrsList) = new TypeWithAttrsList; + ; + break;} +case 137: +#line 1377 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.TypeWithAttrsList = new TypeWithAttrsList; TypeWithAttrs TWA; TWA.Attrs = FunctionType::NoAttributeSet; TWA.Ty = new PATypeHolder(Type::VoidTy); - (yyval.TypeWithAttrsList)->push_back(TWA); + yyval.TypeWithAttrsList->push_back(TWA); CHECK_FOR_ERROR - ;} - break; - - case 139: -#line 1383 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.TypeWithAttrsList) = new TypeWithAttrsList(); + ; + break;} +case 138: +#line 1384 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.TypeWithAttrsList = new TypeWithAttrsList(); CHECK_FOR_ERROR - ;} - break; - - case 140: -#line 1391 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.TypeList) = new std::list(); - (yyval.TypeList)->push_back(*(yyvsp[0].TypeVal)); delete (yyvsp[0].TypeVal); + ; + break;} +case 139: +#line 1392 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.TypeList = new std::list(); + yyval.TypeList->push_back(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; CHECK_FOR_ERROR - ;} - break; - - case 141: -#line 1396 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - ((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back(*(yyvsp[0].TypeVal)); delete (yyvsp[0].TypeVal); + ; + break;} +case 140: +#line 1397 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + (yyval.TypeList=yyvsp[-2].TypeList)->push_back(*yyvsp[0].TypeVal); delete yyvsp[0].TypeVal; CHECK_FOR_ERROR - ;} - break; - - case 142: -#line 1407 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Nonempty unsized arr + ; + break;} +case 141: +#line 1408 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Nonempty unsized arr if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription()); - const ArrayType *ATy = dyn_cast((yyvsp[-3].TypeVal)->get()); + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-3].TypeVal)->getDescription()); + const ArrayType *ATy = dyn_cast(yyvsp[-3].TypeVal->get()); if (ATy == 0) GEN_ERROR("Cannot make array constant with type: '" + - (*(yyvsp[-3].TypeVal))->getDescription() + "'"); + (*yyvsp[-3].TypeVal)->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[-1].ConstVector->size()) GEN_ERROR("Type mismatch: constant sized array initialized with " + - utostr((yyvsp[-1].ConstVector)->size()) + " arguments, but has size of " + + utostr(yyvsp[-1].ConstVector->size()) + " arguments, but has size of " + itostr(NumElements) + ""); // Verify all elements are correct type! - for (unsigned i = 0; i < (yyvsp[-1].ConstVector)->size(); i++) { - if (ETy != (*(yyvsp[-1].ConstVector))[i]->getType()) + for (unsigned i = 0; i < yyvsp[-1].ConstVector->size(); i++) { + if (ETy != (*yyvsp[-1].ConstVector)[i]->getType()) GEN_ERROR("Element #" + utostr(i) + " is not of type '" + ETy->getDescription() +"' as required!\nIt is of type '"+ - (*(yyvsp[-1].ConstVector))[i]->getType()->getDescription() + "'."); + (*yyvsp[-1].ConstVector)[i]->getType()->getDescription() + "'."); } - (yyval.ConstVal) = ConstantArray::get(ATy, *(yyvsp[-1].ConstVector)); - delete (yyvsp[-3].TypeVal); delete (yyvsp[-1].ConstVector); + yyval.ConstVal = ConstantArray::get(ATy, *yyvsp[-1].ConstVector); + delete yyvsp[-3].TypeVal; delete yyvsp[-1].ConstVector; CHECK_FOR_ERROR - ;} - break; - - case 143: -#line 1435 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 142: +#line 1436 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription()); - const ArrayType *ATy = dyn_cast((yyvsp[-2].TypeVal)->get()); + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription()); + const ArrayType *ATy = dyn_cast(yyvsp[-2].TypeVal->get()); if (ATy == 0) GEN_ERROR("Cannot make array constant with type: '" + - (*(yyvsp[-2].TypeVal))->getDescription() + "'"); + (*yyvsp[-2].TypeVal)->getDescription() + "'"); int NumElements = ATy->getNumElements(); if (NumElements != -1 && NumElements != 0) GEN_ERROR("Type mismatch: constant sized array initialized with 0" " arguments, but has size of " + itostr(NumElements) +""); - (yyval.ConstVal) = ConstantArray::get(ATy, std::vector()); - delete (yyvsp[-2].TypeVal); + yyval.ConstVal = ConstantArray::get(ATy, std::vector()); + delete yyvsp[-2].TypeVal; CHECK_FOR_ERROR - ;} - break; - - case 144: -#line 1451 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 143: +#line 1452 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription()); - const ArrayType *ATy = dyn_cast((yyvsp[-2].TypeVal)->get()); + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription()); + const ArrayType *ATy = dyn_cast(yyvsp[-2].TypeVal->get()); if (ATy == 0) GEN_ERROR("Cannot make array constant with type: '" + - (*(yyvsp[-2].TypeVal))->getDescription() + "'"); + (*yyvsp[-2].TypeVal)->getDescription() + "'"); int NumElements = ATy->getNumElements(); const Type *ETy = ATy->getElementType(); - char *EndStr = UnEscapeLexed((yyvsp[0].StrVal), true); - if (NumElements != -1 && NumElements != (EndStr-(yyvsp[0].StrVal))) + char *EndStr = UnEscapeLexed(yyvsp[0].StrVal, true); + if (NumElements != -1 && NumElements != (EndStr-yyvsp[0].StrVal)) GEN_ERROR("Can't build string constant of size " + - itostr((int)(EndStr-(yyvsp[0].StrVal))) + + itostr((int)(EndStr-yyvsp[0].StrVal)) + " when array has size " + itostr(NumElements) + ""); std::vector Vals; if (ETy == Type::Int8Ty) { - for (unsigned char *C = (unsigned char *)(yyvsp[0].StrVal); + for (unsigned char *C = (unsigned char *)yyvsp[0].StrVal; C != (unsigned char*)EndStr; ++C) Vals.push_back(ConstantInt::get(ETy, *C)); } else { - free((yyvsp[0].StrVal)); + free(yyvsp[0].StrVal); GEN_ERROR("Cannot build string arrays of non byte sized elements"); } - free((yyvsp[0].StrVal)); - (yyval.ConstVal) = ConstantArray::get(ATy, Vals); - delete (yyvsp[-2].TypeVal); + free(yyvsp[0].StrVal); + yyval.ConstVal = ConstantArray::get(ATy, Vals); + delete yyvsp[-2].TypeVal; CHECK_FOR_ERROR - ;} - break; - - case 145: -#line 1480 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Nonempty unsized arr + ; + break;} +case 144: +#line 1481 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Nonempty unsized arr if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription()); - const PackedType *PTy = dyn_cast((yyvsp[-3].TypeVal)->get()); + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-3].TypeVal)->getDescription()); + const PackedType *PTy = dyn_cast(yyvsp[-3].TypeVal->get()); if (PTy == 0) GEN_ERROR("Cannot make packed constant with type: '" + - (*(yyvsp[-3].TypeVal))->getDescription() + "'"); + (*yyvsp[-3].TypeVal)->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[-1].ConstVector->size()) GEN_ERROR("Type mismatch: constant sized packed initialized with " + - utostr((yyvsp[-1].ConstVector)->size()) + " arguments, but has size of " + + utostr(yyvsp[-1].ConstVector->size()) + " arguments, but has size of " + itostr(NumElements) + ""); // Verify all elements are correct type! - for (unsigned i = 0; i < (yyvsp[-1].ConstVector)->size(); i++) { - if (ETy != (*(yyvsp[-1].ConstVector))[i]->getType()) + for (unsigned i = 0; i < yyvsp[-1].ConstVector->size(); i++) { + if (ETy != (*yyvsp[-1].ConstVector)[i]->getType()) GEN_ERROR("Element #" + utostr(i) + " is not of type '" + ETy->getDescription() +"' as required!\nIt is of type '"+ - (*(yyvsp[-1].ConstVector))[i]->getType()->getDescription() + "'."); + (*yyvsp[-1].ConstVector)[i]->getType()->getDescription() + "'."); } - (yyval.ConstVal) = ConstantPacked::get(PTy, *(yyvsp[-1].ConstVector)); - delete (yyvsp[-3].TypeVal); delete (yyvsp[-1].ConstVector); + yyval.ConstVal = ConstantPacked::get(PTy, *yyvsp[-1].ConstVector); + delete yyvsp[-3].TypeVal; delete yyvsp[-1].ConstVector; CHECK_FOR_ERROR - ;} - break; - - case 146: -#line 1508 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - const StructType *STy = dyn_cast((yyvsp[-3].TypeVal)->get()); + ; + break;} +case 145: +#line 1509 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + const StructType *STy = dyn_cast(yyvsp[-3].TypeVal->get()); if (STy == 0) GEN_ERROR("Cannot make struct constant with type: '" + - (*(yyvsp[-3].TypeVal))->getDescription() + "'"); + (*yyvsp[-3].TypeVal)->getDescription() + "'"); - if ((yyvsp[-1].ConstVector)->size() != STy->getNumContainedTypes()) + if (yyvsp[-1].ConstVector->size() != STy->getNumContainedTypes()) GEN_ERROR("Illegal number of initializers for structure type"); // Check to ensure that constants are compatible with the type initializer! - for (unsigned i = 0, e = (yyvsp[-1].ConstVector)->size(); i != e; ++i) - if ((*(yyvsp[-1].ConstVector))[i]->getType() != STy->getElementType(i)) + for (unsigned i = 0, e = yyvsp[-1].ConstVector->size(); i != e; ++i) + if ((*yyvsp[-1].ConstVector)[i]->getType() != STy->getElementType(i)) GEN_ERROR("Expected type '" + STy->getElementType(i)->getDescription() + "' for element #" + utostr(i) + @@ -3810,21 +3091,20 @@ yyreduce: if (STy->isPacked()) GEN_ERROR("Unpacked Initializer to packed type '" + STy->getDescription() + "'"); - (yyval.ConstVal) = ConstantStruct::get(STy, *(yyvsp[-1].ConstVector)); - delete (yyvsp[-3].TypeVal); delete (yyvsp[-1].ConstVector); + yyval.ConstVal = ConstantStruct::get(STy, *yyvsp[-1].ConstVector); + delete yyvsp[-3].TypeVal; delete yyvsp[-1].ConstVector; CHECK_FOR_ERROR - ;} - break; - - case 147: -#line 1533 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 146: +#line 1534 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription()); - const StructType *STy = dyn_cast((yyvsp[-2].TypeVal)->get()); + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription()); + const StructType *STy = dyn_cast(yyvsp[-2].TypeVal->get()); if (STy == 0) GEN_ERROR("Cannot make struct constant with type: '" + - (*(yyvsp[-2].TypeVal))->getDescription() + "'"); + (*yyvsp[-2].TypeVal)->getDescription() + "'"); if (STy->getNumContainedTypes() != 0) GEN_ERROR("Illegal number of initializers for structure type"); @@ -3833,26 +3113,25 @@ yyreduce: if (STy->isPacked()) GEN_ERROR("Unpacked Initializer to packed type '" + STy->getDescription() + "'"); - (yyval.ConstVal) = ConstantStruct::get(STy, std::vector()); - delete (yyvsp[-2].TypeVal); + yyval.ConstVal = ConstantStruct::get(STy, std::vector()); + delete yyvsp[-2].TypeVal; CHECK_FOR_ERROR - ;} - break; - - case 148: -#line 1552 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - const StructType *STy = dyn_cast((yyvsp[-5].TypeVal)->get()); + ; + break;} +case 147: +#line 1553 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + const StructType *STy = dyn_cast(yyvsp[-5].TypeVal->get()); if (STy == 0) GEN_ERROR("Cannot make struct constant with type: '" + - (*(yyvsp[-5].TypeVal))->getDescription() + "'"); + (*yyvsp[-5].TypeVal)->getDescription() + "'"); - if ((yyvsp[-2].ConstVector)->size() != STy->getNumContainedTypes()) + if (yyvsp[-2].ConstVector->size() != STy->getNumContainedTypes()) GEN_ERROR("Illegal number of initializers for structure type"); // Check to ensure that constants are compatible with the type initializer! - for (unsigned i = 0, e = (yyvsp[-2].ConstVector)->size(); i != e; ++i) - if ((*(yyvsp[-2].ConstVector))[i]->getType() != STy->getElementType(i)) + for (unsigned i = 0, e = yyvsp[-2].ConstVector->size(); i != e; ++i) + if ((*yyvsp[-2].ConstVector)[i]->getType() != STy->getElementType(i)) GEN_ERROR("Expected type '" + STy->getElementType(i)->getDescription() + "' for element #" + utostr(i) + @@ -3862,21 +3141,20 @@ yyreduce: if (!STy->isPacked()) GEN_ERROR("Packed Initializer to unpacked type '" + STy->getDescription() + "'"); - (yyval.ConstVal) = ConstantStruct::get(STy, *(yyvsp[-2].ConstVector)); - delete (yyvsp[-5].TypeVal); delete (yyvsp[-2].ConstVector); + yyval.ConstVal = ConstantStruct::get(STy, *yyvsp[-2].ConstVector); + delete yyvsp[-5].TypeVal; delete yyvsp[-2].ConstVector; CHECK_FOR_ERROR - ;} - break; - - case 149: -#line 1577 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 148: +#line 1578 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-4].TypeVal))->getDescription()); - const StructType *STy = dyn_cast((yyvsp[-4].TypeVal)->get()); + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-4].TypeVal)->getDescription()); + const StructType *STy = dyn_cast(yyvsp[-4].TypeVal->get()); if (STy == 0) GEN_ERROR("Cannot make struct constant with type: '" + - (*(yyvsp[-4].TypeVal))->getDescription() + "'"); + (*yyvsp[-4].TypeVal)->getDescription() + "'"); if (STy->getNumContainedTypes() != 0) GEN_ERROR("Illegal number of initializers for structure type"); @@ -3885,45 +3163,42 @@ yyreduce: if (!STy->isPacked()) GEN_ERROR("Packed Initializer to unpacked type '" + STy->getDescription() + "'"); - (yyval.ConstVal) = ConstantStruct::get(STy, std::vector()); - delete (yyvsp[-4].TypeVal); + yyval.ConstVal = ConstantStruct::get(STy, std::vector()); + delete yyvsp[-4].TypeVal; CHECK_FOR_ERROR - ;} - break; - - case 150: -#line 1596 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 149: +#line 1597 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); - const PointerType *PTy = dyn_cast((yyvsp[-1].TypeVal)->get()); + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription()); + const PointerType *PTy = dyn_cast(yyvsp[-1].TypeVal->get()); if (PTy == 0) GEN_ERROR("Cannot make null pointer constant with type: '" + - (*(yyvsp[-1].TypeVal))->getDescription() + "'"); + (*yyvsp[-1].TypeVal)->getDescription() + "'"); - (yyval.ConstVal) = ConstantPointerNull::get(PTy); - delete (yyvsp[-1].TypeVal); + yyval.ConstVal = ConstantPointerNull::get(PTy); + delete yyvsp[-1].TypeVal; CHECK_FOR_ERROR - ;} - break; - - case 151: -#line 1608 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 150: +#line 1609 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); - (yyval.ConstVal) = UndefValue::get((yyvsp[-1].TypeVal)->get()); - delete (yyvsp[-1].TypeVal); + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription()); + yyval.ConstVal = UndefValue::get(yyvsp[-1].TypeVal->get()); + delete yyvsp[-1].TypeVal; CHECK_FOR_ERROR - ;} - break; - - case 152: -#line 1615 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 151: +#line 1616 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); - const PointerType *Ty = dyn_cast((yyvsp[-1].TypeVal)->get()); + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription()); + const PointerType *Ty = dyn_cast(yyvsp[-1].TypeVal->get()); if (Ty == 0) GEN_ERROR("Global const reference must be a pointer type"); @@ -3937,7 +3212,7 @@ yyreduce: Function *SavedCurFn = CurFun.CurrentFunction; CurFun.CurrentFunction = 0; - Value *V = getValNonImprovising(Ty, (yyvsp[0].ValIDVal)); + Value *V = getValNonImprovising(Ty, yyvsp[0].ValIDVal); CHECK_FOR_ERROR CurFun.CurrentFunction = SavedCurFn; @@ -3952,16 +3227,16 @@ yyreduce: // 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[0].ValIDVal)); if (I != CurModule.GlobalRefs.end()) { V = I->second; // Placeholder already exists, use it... - (yyvsp[0].ValIDVal).destroy(); + yyvsp[0].ValIDVal.destroy(); } else { std::string Name; - if ((yyvsp[0].ValIDVal).Type == ValID::GlobalName) - Name = (yyvsp[0].ValIDVal).Name; - else if ((yyvsp[0].ValIDVal).Type != ValID::GlobalID) + if (yyvsp[0].ValIDVal.Type == ValID::GlobalName) + Name = yyvsp[0].ValIDVal.Name; + else if (yyvsp[0].ValIDVal.Type != ValID::GlobalID) GEN_ERROR("Invalid reference to global"); // Create the forward referenced global. @@ -3977,299 +3252,270 @@ yyreduce: } // 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[0].ValIDVal), GV)); V = GV; } } - (yyval.ConstVal) = cast(V); - delete (yyvsp[-1].TypeVal); // Free the type handle + yyval.ConstVal = cast(V); + delete yyvsp[-1].TypeVal; // Free the type handle CHECK_FOR_ERROR - ;} - break; - - case 153: -#line 1681 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 152: +#line 1682 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); - if ((yyvsp[-1].TypeVal)->get() != (yyvsp[0].ConstVal)->getType()) + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription()); + if (yyvsp[-1].TypeVal->get() != yyvsp[0].ConstVal->getType()) GEN_ERROR("Mismatched types for constant expression: " + - (*(yyvsp[-1].TypeVal))->getDescription() + " and " + (yyvsp[0].ConstVal)->getType()->getDescription()); - (yyval.ConstVal) = (yyvsp[0].ConstVal); - delete (yyvsp[-1].TypeVal); + (*yyvsp[-1].TypeVal)->getDescription() + " and " + yyvsp[0].ConstVal->getType()->getDescription()); + yyval.ConstVal = yyvsp[0].ConstVal; + delete yyvsp[-1].TypeVal; CHECK_FOR_ERROR - ;} - break; - - case 154: -#line 1691 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 153: +#line 1692 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); - const Type *Ty = (yyvsp[-1].TypeVal)->get(); + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription()); + const Type *Ty = yyvsp[-1].TypeVal->get(); if (isa(Ty) || Ty == Type::LabelTy || isa(Ty)) GEN_ERROR("Cannot create a null initialized value of this type"); - (yyval.ConstVal) = Constant::getNullValue(Ty); - delete (yyvsp[-1].TypeVal); + yyval.ConstVal = Constant::getNullValue(Ty); + delete yyvsp[-1].TypeVal; CHECK_FOR_ERROR - ;} - break; - - case 155: -#line 1701 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // integral constants - if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].SInt64Val))) + ; + break;} +case 154: +#line 1702 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // integral constants + if (!ConstantInt::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].SInt64Val)) GEN_ERROR("Constant value doesn't fit in type"); - (yyval.ConstVal) = ConstantInt::get((yyvsp[-1].PrimType), (yyvsp[0].SInt64Val)); + yyval.ConstVal = ConstantInt::get(yyvsp[-1].PrimType, yyvsp[0].SInt64Val); CHECK_FOR_ERROR - ;} - break; - - case 156: -#line 1707 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // integral constants - if (!ConstantInt::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].UInt64Val))) + ; + break;} +case 155: +#line 1708 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // integral constants + if (!ConstantInt::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].UInt64Val)) GEN_ERROR("Constant value doesn't fit in type"); - (yyval.ConstVal) = ConstantInt::get((yyvsp[-1].PrimType), (yyvsp[0].UInt64Val)); + yyval.ConstVal = ConstantInt::get(yyvsp[-1].PrimType, yyvsp[0].UInt64Val); CHECK_FOR_ERROR - ;} - break; - - case 157: -#line 1713 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Boolean constants - assert(cast((yyvsp[-1].PrimType))->getBitWidth() == 1 && "Not Bool?"); - (yyval.ConstVal) = ConstantInt::getTrue(); + ; + break;} +case 156: +#line 1714 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Boolean constants + assert(cast(yyvsp[-1].PrimType)->getBitWidth() == 1 && "Not Bool?"); + yyval.ConstVal = ConstantInt::getTrue(); CHECK_FOR_ERROR - ;} - break; - - case 158: -#line 1718 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Boolean constants - assert(cast((yyvsp[-1].PrimType))->getBitWidth() == 1 && "Not Bool?"); - (yyval.ConstVal) = ConstantInt::getFalse(); + ; + break;} +case 157: +#line 1719 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Boolean constants + assert(cast(yyvsp[-1].PrimType)->getBitWidth() == 1 && "Not Bool?"); + yyval.ConstVal = ConstantInt::getFalse(); CHECK_FOR_ERROR - ;} - break; - - case 159: -#line 1723 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Float & Double constants - if (!ConstantFP::isValueValidForType((yyvsp[-1].PrimType), (yyvsp[0].FPVal))) + ; + break;} +case 158: +#line 1724 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Float & Double constants + if (!ConstantFP::isValueValidForType(yyvsp[-1].PrimType, yyvsp[0].FPVal)) GEN_ERROR("Floating point constant invalid for type"); - (yyval.ConstVal) = ConstantFP::get((yyvsp[-1].PrimType), (yyvsp[0].FPVal)); + yyval.ConstVal = ConstantFP::get(yyvsp[-1].PrimType, yyvsp[0].FPVal); CHECK_FOR_ERROR - ;} - break; - - case 160: -#line 1731 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 159: +#line 1732 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); - Constant *Val = (yyvsp[-3].ConstVal); - const Type *DestTy = (yyvsp[-1].TypeVal)->get(); - if (!CastInst::castIsValid((yyvsp[-5].CastOpVal), (yyvsp[-3].ConstVal), DestTy)) + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription()); + Constant *Val = yyvsp[-3].ConstVal; + const Type *DestTy = yyvsp[-1].TypeVal->get(); + if (!CastInst::castIsValid(yyvsp[-5].CastOpVal, yyvsp[-3].ConstVal, DestTy)) GEN_ERROR("invalid cast opcode for cast from '" + Val->getType()->getDescription() + "' to '" + DestTy->getDescription() + "'"); - (yyval.ConstVal) = ConstantExpr::getCast((yyvsp[-5].CastOpVal), (yyvsp[-3].ConstVal), DestTy); - delete (yyvsp[-1].TypeVal); - ;} - break; - - case 161: -#line 1743 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - if (!isa((yyvsp[-2].ConstVal)->getType())) + yyval.ConstVal = ConstantExpr::getCast(yyvsp[-5].CastOpVal, yyvsp[-3].ConstVal, DestTy); + delete yyvsp[-1].TypeVal; + ; + break;} +case 160: +#line 1744 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + if (!isa(yyvsp[-2].ConstVal->getType())) GEN_ERROR("GetElementPtr requires a pointer operand"); const Type *IdxTy = - GetElementPtrInst::getIndexedType((yyvsp[-2].ConstVal)->getType(), *(yyvsp[-1].ValueList), true); + GetElementPtrInst::getIndexedType(yyvsp[-2].ConstVal->getType(), *yyvsp[-1].ValueList, true); if (!IdxTy) GEN_ERROR("Index list invalid for constant getelementptr"); SmallVector IdxVec; - for (unsigned i = 0, e = (yyvsp[-1].ValueList)->size(); i != e; ++i) - if (Constant *C = dyn_cast((*(yyvsp[-1].ValueList))[i])) + for (unsigned i = 0, e = yyvsp[-1].ValueList->size(); i != e; ++i) + if (Constant *C = dyn_cast((*yyvsp[-1].ValueList)[i])) IdxVec.push_back(C); else GEN_ERROR("Indices to constant getelementptr must be constants"); - delete (yyvsp[-1].ValueList); + delete yyvsp[-1].ValueList; - (yyval.ConstVal) = ConstantExpr::getGetElementPtr((yyvsp[-2].ConstVal), &IdxVec[0], IdxVec.size()); + yyval.ConstVal = ConstantExpr::getGetElementPtr(yyvsp[-2].ConstVal, &IdxVec[0], IdxVec.size()); CHECK_FOR_ERROR - ;} - break; - - case 162: -#line 1764 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - if ((yyvsp[-5].ConstVal)->getType() != Type::Int1Ty) + ; + break;} +case 161: +#line 1765 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + if (yyvsp[-5].ConstVal->getType() != Type::Int1Ty) GEN_ERROR("Select condition must be of boolean type"); - if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) + if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) GEN_ERROR("Select operand types must match"); - (yyval.ConstVal) = ConstantExpr::getSelect((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); + yyval.ConstVal = ConstantExpr::getSelect(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); CHECK_FOR_ERROR - ;} - break; - - case 163: -#line 1772 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) + ; + break;} +case 162: +#line 1773 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) GEN_ERROR("Binary operator types must match"); CHECK_FOR_ERROR; - (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); - ;} - break; - - case 164: -#line 1778 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) + yyval.ConstVal = ConstantExpr::get(yyvsp[-5].BinaryOpVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); + ; + break;} +case 163: +#line 1779 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) GEN_ERROR("Logical operator types must match"); - if (!(yyvsp[-3].ConstVal)->getType()->isInteger()) { - if (Instruction::isShift((yyvsp[-5].BinaryOpVal)) || !isa((yyvsp[-3].ConstVal)->getType()) || - !cast((yyvsp[-3].ConstVal)->getType())->getElementType()->isInteger()) + if (!yyvsp[-3].ConstVal->getType()->isInteger()) { + if (Instruction::isShift(yyvsp[-5].BinaryOpVal) || !isa(yyvsp[-3].ConstVal->getType()) || + !cast(yyvsp[-3].ConstVal->getType())->getElementType()->isInteger()) GEN_ERROR("Logical operator requires integral operands"); } - (yyval.ConstVal) = ConstantExpr::get((yyvsp[-5].BinaryOpVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); + yyval.ConstVal = ConstantExpr::get(yyvsp[-5].BinaryOpVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); CHECK_FOR_ERROR - ;} - break; - - case 165: -#line 1789 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) + ; + break;} +case 164: +#line 1790 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) GEN_ERROR("icmp operand types must match"); - (yyval.ConstVal) = ConstantExpr::getICmp((yyvsp[-5].IPredicate), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); - ;} - break; - - case 166: -#line 1794 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - if ((yyvsp[-3].ConstVal)->getType() != (yyvsp[-1].ConstVal)->getType()) + yyval.ConstVal = ConstantExpr::getICmp(yyvsp[-5].IPredicate, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); + ; + break;} +case 165: +#line 1795 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType()) GEN_ERROR("fcmp operand types must match"); - (yyval.ConstVal) = ConstantExpr::getFCmp((yyvsp[-5].FPredicate), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); - ;} - break; - - case 167: -#line 1799 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - if (!ExtractElementInst::isValidOperands((yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) + yyval.ConstVal = ConstantExpr::getFCmp(yyvsp[-5].FPredicate, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); + ; + break;} +case 166: +#line 1800 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + if (!ExtractElementInst::isValidOperands(yyvsp[-3].ConstVal, yyvsp[-1].ConstVal)) GEN_ERROR("Invalid extractelement operands"); - (yyval.ConstVal) = ConstantExpr::getExtractElement((yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); + yyval.ConstVal = ConstantExpr::getExtractElement(yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); CHECK_FOR_ERROR - ;} - break; - - case 168: -#line 1805 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - if (!InsertElementInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) + ; + break;} +case 167: +#line 1806 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + if (!InsertElementInst::isValidOperands(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal)) GEN_ERROR("Invalid insertelement operands"); - (yyval.ConstVal) = ConstantExpr::getInsertElement((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); + yyval.ConstVal = ConstantExpr::getInsertElement(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); CHECK_FOR_ERROR - ;} - break; - - case 169: -#line 1811 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - if (!ShuffleVectorInst::isValidOperands((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal))) + ; + break;} +case 168: +#line 1812 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + if (!ShuffleVectorInst::isValidOperands(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal)) GEN_ERROR("Invalid shufflevector operands"); - (yyval.ConstVal) = ConstantExpr::getShuffleVector((yyvsp[-5].ConstVal), (yyvsp[-3].ConstVal), (yyvsp[-1].ConstVal)); + yyval.ConstVal = ConstantExpr::getShuffleVector(yyvsp[-5].ConstVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal); CHECK_FOR_ERROR - ;} - break; - - case 170: -#line 1820 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - ((yyval.ConstVector) = (yyvsp[-2].ConstVector))->push_back((yyvsp[0].ConstVal)); + ; + break;} +case 169: +#line 1821 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + (yyval.ConstVector = yyvsp[-2].ConstVector)->push_back(yyvsp[0].ConstVal); CHECK_FOR_ERROR - ;} - break; - - case 171: -#line 1824 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.ConstVector) = new std::vector(); - (yyval.ConstVector)->push_back((yyvsp[0].ConstVal)); + ; + break;} +case 170: +#line 1825 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.ConstVector = new std::vector(); + yyval.ConstVector->push_back(yyvsp[0].ConstVal); CHECK_FOR_ERROR - ;} - break; - - case 172: -#line 1832 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.BoolVal) = false; ;} - break; - - case 173: -#line 1832 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.BoolVal) = true; ;} - break; - - case 174: -#line 1843 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule; + ; + break;} +case 171: +#line 1833 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.BoolVal = false; ; + break;} +case 172: +#line 1833 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.BoolVal = true; ; + break;} +case 173: +#line 1844 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.ModuleVal = ParserResult = CurModule.CurrentModule; CurModule.ModuleDone(); CHECK_FOR_ERROR; - ;} - break; - - case 175: -#line 1848 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule; + ; + break;} +case 174: +#line 1849 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.ModuleVal = ParserResult = CurModule.CurrentModule; CurModule.ModuleDone(); CHECK_FOR_ERROR; - ;} - break; - - case 178: -#line 1861 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { CurFun.isDeclare = false; ;} - break; - - case 179: -#line 1861 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 177: +#line 1862 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ CurFun.isDeclare = false; ; + break;} +case 178: +#line 1862 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ CurFun.FunctionDone(); CHECK_FOR_ERROR - ;} - break; - - case 180: -#line 1865 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { CurFun.isDeclare = true; ;} - break; - - case 181: -#line 1865 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 179: +#line 1866 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ CurFun.isDeclare = true; ; + break;} +case 180: +#line 1866 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ CHECK_FOR_ERROR - ;} - break; - - case 182: -#line 1868 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 181: +#line 1869 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ CHECK_FOR_ERROR - ;} - break; - - case 183: -#line 1871 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 182: +#line 1872 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Emit an error if there are any unresolved types left. if (!CurModule.LateResolveTypes.empty()) { const ValID &DID = CurModule.LateResolveTypes.begin()->first; @@ -4280,14 +3526,13 @@ yyreduce: } } CHECK_FOR_ERROR - ;} - break; - - case 184: -#line 1883 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 183: +#line 1884 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription()); + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription()); // Eagerly resolve types. This is not an optimization, this is a // requirement that is due to the fact that we could have this: // @@ -4297,248 +3542,226 @@ yyreduce: // If types are not resolved eagerly, then the two types will not be // determined to be the same type! // - ResolveTypeTo((yyvsp[-2].StrVal), *(yyvsp[0].TypeVal)); + ResolveTypeTo(yyvsp[-2].StrVal, *yyvsp[0].TypeVal); - if (!setTypeName(*(yyvsp[0].TypeVal), (yyvsp[-2].StrVal)) && !(yyvsp[-2].StrVal)) { + if (!setTypeName(*yyvsp[0].TypeVal, yyvsp[-2].StrVal) && !yyvsp[-2].StrVal) { CHECK_FOR_ERROR // If this is a named type that is not a redefinition, add it to the slot // table. - CurModule.Types.push_back(*(yyvsp[0].TypeVal)); + CurModule.Types.push_back(*yyvsp[0].TypeVal); } - delete (yyvsp[0].TypeVal); + delete yyvsp[0].TypeVal; CHECK_FOR_ERROR - ;} - break; + ; + break;} +case 184: +#line 1908 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + ResolveTypeTo(yyvsp[-2].StrVal, yyvsp[0].PrimType); - case 185: -#line 1907 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - ResolveTypeTo((yyvsp[-2].StrVal), (yyvsp[0].PrimType)); - - if (!setTypeName((yyvsp[0].PrimType), (yyvsp[-2].StrVal)) && !(yyvsp[-2].StrVal)) { + if (!setTypeName(yyvsp[0].PrimType, yyvsp[-2].StrVal) && !yyvsp[-2].StrVal) { CHECK_FOR_ERROR // If this is a named type that is not a redefinition, add it to the slot // table. - CurModule.Types.push_back((yyvsp[0].PrimType)); + CurModule.Types.push_back(yyvsp[0].PrimType); } CHECK_FOR_ERROR - ;} - break; - - case 186: -#line 1918 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 185: +#line 1919 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ /* "Externally Visible" Linkage */ - if ((yyvsp[0].ConstVal) == 0) + if (yyvsp[0].ConstVal == 0) GEN_ERROR("Global value initializer is not a constant"); - CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::ExternalLinkage, - (yyvsp[-2].Visibility), (yyvsp[-1].BoolVal), (yyvsp[0].ConstVal)->getType(), (yyvsp[0].ConstVal)); + CurGV = ParseGlobalVariable(yyvsp[-3].StrVal, GlobalValue::ExternalLinkage, + yyvsp[-2].Visibility, yyvsp[-1].BoolVal, yyvsp[0].ConstVal->getType(), yyvsp[0].ConstVal); CHECK_FOR_ERROR - ;} - break; - - case 187: -#line 1925 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 186: +#line 1926 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ CurGV = 0; - ;} - break; - - case 188: -#line 1928 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - if ((yyvsp[0].ConstVal) == 0) + ; + break;} +case 187: +#line 1929 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + if (yyvsp[0].ConstVal == 0) GEN_ERROR("Global value initializer is not a constant"); - CurGV = ParseGlobalVariable((yyvsp[-4].StrVal), (yyvsp[-3].Linkage), (yyvsp[-2].Visibility), (yyvsp[-1].BoolVal), (yyvsp[0].ConstVal)->getType(), (yyvsp[0].ConstVal)); + CurGV = ParseGlobalVariable(yyvsp[-4].StrVal, yyvsp[-3].Linkage, yyvsp[-2].Visibility, yyvsp[-1].BoolVal, yyvsp[0].ConstVal->getType(), yyvsp[0].ConstVal); CHECK_FOR_ERROR - ;} - break; - - case 189: -#line 1933 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 188: +#line 1934 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ CurGV = 0; - ;} - break; - - case 190: -#line 1936 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 189: +#line 1937 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription()); - CurGV = ParseGlobalVariable((yyvsp[-4].StrVal), (yyvsp[-3].Linkage), (yyvsp[-2].Visibility), (yyvsp[-1].BoolVal), *(yyvsp[0].TypeVal), 0); + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription()); + CurGV = ParseGlobalVariable(yyvsp[-4].StrVal, yyvsp[-3].Linkage, yyvsp[-2].Visibility, yyvsp[-1].BoolVal, *yyvsp[0].TypeVal, 0); CHECK_FOR_ERROR - delete (yyvsp[0].TypeVal); - ;} - break; - - case 191: -#line 1942 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + delete yyvsp[0].TypeVal; + ; + break;} +case 190: +#line 1943 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ CurGV = 0; CHECK_FOR_ERROR - ;} - break; - - case 192: -#line 1946 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 191: +#line 1947 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ CHECK_FOR_ERROR - ;} - break; - - case 193: -#line 1949 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 192: +#line 1950 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ CHECK_FOR_ERROR - ;} - break; - - case 194: -#line 1955 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 193: +#line 1956 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.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[0].StrVal, true); + std::string NewAsm(yyvsp[0].StrVal, EndStr); + free(yyvsp[0].StrVal); if (AsmSoFar.empty()) CurModule.CurrentModule->setModuleInlineAsm(NewAsm); else CurModule.CurrentModule->setModuleInlineAsm(AsmSoFar+"\n"+NewAsm); CHECK_FOR_ERROR -;} - break; - - case 195: -#line 1968 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - CurModule.CurrentModule->setTargetTriple((yyvsp[0].StrVal)); - free((yyvsp[0].StrVal)); - ;} - break; - - case 196: -#line 1972 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - CurModule.CurrentModule->setDataLayout((yyvsp[0].StrVal)); - free((yyvsp[0].StrVal)); - ;} - break; - - case 198: -#line 1979 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); - free((yyvsp[0].StrVal)); +; + break;} +case 194: +#line 1969 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + CurModule.CurrentModule->setTargetTriple(yyvsp[0].StrVal); + free(yyvsp[0].StrVal); + ; + break;} +case 195: +#line 1973 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + CurModule.CurrentModule->setDataLayout(yyvsp[0].StrVal); + free(yyvsp[0].StrVal); + ; + break;} +case 197: +#line 1980 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + CurModule.CurrentModule->addLibrary(yyvsp[0].StrVal); + free(yyvsp[0].StrVal); CHECK_FOR_ERROR - ;} - break; - - case 199: -#line 1984 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); - free((yyvsp[0].StrVal)); + ; + break;} +case 198: +#line 1985 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + CurModule.CurrentModule->addLibrary(yyvsp[0].StrVal); + free(yyvsp[0].StrVal); CHECK_FOR_ERROR - ;} - break; - - case 200: -#line 1989 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 199: +#line 1990 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ CHECK_FOR_ERROR - ;} - break; - - case 201: -#line 1998 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 200: +#line 1999 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription()); - if (*(yyvsp[-2].TypeVal) == Type::VoidTy) + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription()); + if (*yyvsp[-2].TypeVal == Type::VoidTy) GEN_ERROR("void typed arguments are invalid"); - ArgListEntry E; E.Attrs = (yyvsp[-1].ParamAttrs); E.Ty = (yyvsp[-2].TypeVal); E.Name = (yyvsp[0].StrVal); - (yyval.ArgList) = (yyvsp[-4].ArgList); - (yyvsp[-4].ArgList)->push_back(E); + ArgListEntry E; E.Attrs = yyvsp[-1].ParamAttrs; E.Ty = yyvsp[-2].TypeVal; E.Name = yyvsp[0].StrVal; + yyval.ArgList = yyvsp[-4].ArgList; + yyvsp[-4].ArgList->push_back(E); CHECK_FOR_ERROR - ;} - break; - - case 202: -#line 2008 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 201: +#line 2009 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription()); - if (*(yyvsp[-2].TypeVal) == Type::VoidTy) + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription()); + if (*yyvsp[-2].TypeVal == Type::VoidTy) GEN_ERROR("void typed arguments are invalid"); - ArgListEntry E; E.Attrs = (yyvsp[-1].ParamAttrs); E.Ty = (yyvsp[-2].TypeVal); E.Name = (yyvsp[0].StrVal); - (yyval.ArgList) = new ArgListType; - (yyval.ArgList)->push_back(E); + ArgListEntry E; E.Attrs = yyvsp[-1].ParamAttrs; E.Ty = yyvsp[-2].TypeVal; E.Name = yyvsp[0].StrVal; + yyval.ArgList = new ArgListType; + yyval.ArgList->push_back(E); CHECK_FOR_ERROR - ;} - break; - - case 203: -#line 2019 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.ArgList) = (yyvsp[0].ArgList); + ; + break;} +case 202: +#line 2020 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.ArgList = yyvsp[0].ArgList; CHECK_FOR_ERROR - ;} - break; - - case 204: -#line 2023 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.ArgList) = (yyvsp[-2].ArgList); + ; + break;} +case 203: +#line 2024 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.ArgList = yyvsp[-2].ArgList; struct ArgListEntry E; E.Ty = new PATypeHolder(Type::VoidTy); E.Name = 0; E.Attrs = FunctionType::NoAttributeSet; - (yyval.ArgList)->push_back(E); + yyval.ArgList->push_back(E); CHECK_FOR_ERROR - ;} - break; - - case 205: -#line 2032 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.ArgList) = new ArgListType; + ; + break;} +case 204: +#line 2033 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.ArgList = new ArgListType; struct ArgListEntry E; E.Ty = new PATypeHolder(Type::VoidTy); E.Name = 0; E.Attrs = FunctionType::NoAttributeSet; - (yyval.ArgList)->push_back(E); + yyval.ArgList->push_back(E); CHECK_FOR_ERROR - ;} - break; - - case 206: -#line 2041 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.ArgList) = 0; + ; + break;} +case 205: +#line 2042 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.ArgList = 0; CHECK_FOR_ERROR - ;} - break; - - case 207: -#line 2047 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - UnEscapeLexed((yyvsp[-6].StrVal)); - std::string FunctionName((yyvsp[-6].StrVal)); - free((yyvsp[-6].StrVal)); // Free strdup'd memory! + ; + break;} +case 206: +#line 2048 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + UnEscapeLexed(yyvsp[-6].StrVal); + std::string FunctionName(yyvsp[-6].StrVal); + free(yyvsp[-6].StrVal); // Free strdup'd memory! // Check the function result for abstractness if this is a define. We should // have no abstract types at this point - if (!CurFun.isDeclare && CurModule.TypeIsUnresolved((yyvsp[-7].TypeVal))) - GEN_ERROR("Reference to abstract result: "+ (yyvsp[-7].TypeVal)->get()->getDescription()); + if (!CurFun.isDeclare && CurModule.TypeIsUnresolved(yyvsp[-7].TypeVal)) + GEN_ERROR("Reference to abstract result: "+ yyvsp[-7].TypeVal->get()->getDescription()); std::vector ParamTypeList; std::vector ParamAttrs; - ParamAttrs.push_back((yyvsp[-2].ParamAttrs)); - if ((yyvsp[-4].ArgList)) { // If there are arguments... - for (ArgListType::iterator I = (yyvsp[-4].ArgList)->begin(); I != (yyvsp[-4].ArgList)->end(); ++I) { + ParamAttrs.push_back(yyvsp[-2].ParamAttrs); + if (yyvsp[-4].ArgList) { // If there are arguments... + for (ArgListType::iterator I = yyvsp[-4].ArgList->begin(); I != yyvsp[-4].ArgList->end(); ++I) { const Type* Ty = I->Ty->get(); if (!CurFun.isDeclare && CurModule.TypeIsUnresolved(I->Ty)) GEN_ERROR("Reference to abstract argument: " + Ty->getDescription()); @@ -4551,10 +3774,10 @@ yyreduce: bool isVarArg = ParamTypeList.size() && ParamTypeList.back() == Type::VoidTy; if (isVarArg) ParamTypeList.pop_back(); - FunctionType *FT = FunctionType::get(*(yyvsp[-7].TypeVal), ParamTypeList, isVarArg, + FunctionType *FT = FunctionType::get(*yyvsp[-7].TypeVal, ParamTypeList, isVarArg, ParamAttrs); const PointerType *PFT = PointerType::get(FT); - delete (yyvsp[-7].TypeVal); + delete yyvsp[-7].TypeVal; ValID ID; if (!FunctionName.empty()) { @@ -4603,26 +3826,26 @@ yyreduce: Fn->setLinkage(CurFun.Linkage); Fn->setVisibility(CurFun.Visibility); } - Fn->setCallingConv((yyvsp[-8].UIntVal)); - Fn->setAlignment((yyvsp[0].UIntVal)); - if ((yyvsp[-1].StrVal)) { - Fn->setSection((yyvsp[-1].StrVal)); - free((yyvsp[-1].StrVal)); + Fn->setCallingConv(yyvsp[-8].UIntVal); + Fn->setAlignment(yyvsp[0].UIntVal); + if (yyvsp[-1].StrVal) { + Fn->setSection(yyvsp[-1].StrVal); + free(yyvsp[-1].StrVal); } // Add all of the arguments we parsed to the function... - if ((yyvsp[-4].ArgList)) { // Is null if empty... + if (yyvsp[-4].ArgList) { // Is null if empty... if (isVarArg) { // Nuke the last entry - assert((yyvsp[-4].ArgList)->back().Ty->get() == Type::VoidTy && (yyvsp[-4].ArgList)->back().Name == 0 && + assert(yyvsp[-4].ArgList->back().Ty->get() == Type::VoidTy && yyvsp[-4].ArgList->back().Name == 0 && "Not a varargs marker!"); - delete (yyvsp[-4].ArgList)->back().Ty; - (yyvsp[-4].ArgList)->pop_back(); // Delete the last entry + delete yyvsp[-4].ArgList->back().Ty; + yyvsp[-4].ArgList->pop_back(); // Delete the last entry } Function::arg_iterator ArgIt = Fn->arg_begin(); Function::arg_iterator ArgEnd = Fn->arg_end(); unsigned Idx = 1; - for (ArgListType::iterator I = (yyvsp[-4].ArgList)->begin(); - I != (yyvsp[-4].ArgList)->end() && ArgIt != ArgEnd; ++I, ++ArgIt) { + for (ArgListType::iterator I = yyvsp[-4].ArgList->begin(); + I != yyvsp[-4].ArgList->end() && ArgIt != ArgEnd; ++I, ++ArgIt) { delete I->Ty; // Delete the typeholder... setValueName(ArgIt, I->Name); // Insert arg into symtab... CHECK_FOR_ERROR @@ -4630,128 +3853,114 @@ yyreduce: Idx++; } - delete (yyvsp[-4].ArgList); // We're now done with the argument list + delete yyvsp[-4].ArgList; // We're now done with the argument list } CHECK_FOR_ERROR -;} - break; - - case 210: -#line 2160 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.FunctionVal) = CurFun.CurrentFunction; +; + break;} +case 209: +#line 2161 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.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[-3].Linkage)); - (yyval.FunctionVal)->setVisibility((yyvsp[-2].Visibility)); -;} - break; - - case 213: -#line 2171 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); + yyval.FunctionVal->setLinkage(yyvsp[-3].Linkage); + yyval.FunctionVal->setVisibility(yyvsp[-2].Visibility); +; + break;} +case 212: +#line 2172 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.FunctionVal = yyvsp[-1].FunctionVal; CHECK_FOR_ERROR -;} - break; - - case 214: -#line 2176 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - CurFun.CurrentFunction->setLinkage((yyvsp[-2].Linkage)); - CurFun.CurrentFunction->setVisibility((yyvsp[-1].Visibility)); - (yyval.FunctionVal) = CurFun.CurrentFunction; +; + break;} +case 213: +#line 2177 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + CurFun.CurrentFunction->setLinkage(yyvsp[-2].Linkage); + CurFun.CurrentFunction->setVisibility(yyvsp[-1].Visibility); + yyval.FunctionVal = CurFun.CurrentFunction; CurFun.FunctionDone(); CHECK_FOR_ERROR - ;} - break; - - case 215: -#line 2188 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.BoolVal) = false; + ; + break;} +case 214: +#line 2189 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.BoolVal = false; CHECK_FOR_ERROR - ;} - break; - - case 216: -#line 2192 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.BoolVal) = true; + ; + break;} +case 215: +#line 2193 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.BoolVal = true; CHECK_FOR_ERROR - ;} - break; - - case 217: -#line 2197 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // A reference to a direct constant - (yyval.ValIDVal) = ValID::create((yyvsp[0].SInt64Val)); + ; + break;} +case 216: +#line 2198 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // A reference to a direct constant + yyval.ValIDVal = ValID::create(yyvsp[0].SInt64Val); CHECK_FOR_ERROR - ;} - break; - - case 218: -#line 2201 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.ValIDVal) = ValID::create((yyvsp[0].UInt64Val)); + ; + break;} +case 217: +#line 2202 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.ValIDVal = ValID::create(yyvsp[0].UInt64Val); CHECK_FOR_ERROR - ;} - break; - - case 219: -#line 2205 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Perhaps it's an FP constant? - (yyval.ValIDVal) = ValID::create((yyvsp[0].FPVal)); + ; + break;} +case 218: +#line 2206 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Perhaps it's an FP constant? + yyval.ValIDVal = ValID::create(yyvsp[0].FPVal); CHECK_FOR_ERROR - ;} - break; - - case 220: -#line 2209 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.ValIDVal) = ValID::create(ConstantInt::getTrue()); + ; + break;} +case 219: +#line 2210 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.ValIDVal = ValID::create(ConstantInt::getTrue()); CHECK_FOR_ERROR - ;} - break; - - case 221: -#line 2213 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.ValIDVal) = ValID::create(ConstantInt::getFalse()); + ; + break;} +case 220: +#line 2214 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.ValIDVal = ValID::create(ConstantInt::getFalse()); CHECK_FOR_ERROR - ;} - break; - - case 222: -#line 2217 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.ValIDVal) = ValID::createNull(); + ; + break;} +case 221: +#line 2218 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.ValIDVal = ValID::createNull(); CHECK_FOR_ERROR - ;} - break; - - case 223: -#line 2221 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.ValIDVal) = ValID::createUndef(); + ; + break;} +case 222: +#line 2222 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.ValIDVal = ValID::createUndef(); CHECK_FOR_ERROR - ;} - break; - - case 224: -#line 2225 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // A vector zero constant. - (yyval.ValIDVal) = ValID::createZeroInit(); + ; + break;} +case 223: +#line 2226 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // A vector zero constant. + yyval.ValIDVal = ValID::createZeroInit(); CHECK_FOR_ERROR - ;} - break; - - case 225: -#line 2229 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Nonempty unsized packed vector - const Type *ETy = (*(yyvsp[-1].ConstVector))[0]->getType(); - int NumElements = (yyvsp[-1].ConstVector)->size(); + ; + break;} +case 224: +#line 2230 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Nonempty unsized packed vector + const Type *ETy = (*yyvsp[-1].ConstVector)[0]->getType(); + int NumElements = yyvsp[-1].ConstVector->size(); PackedType* pt = PackedType::get(ETy, NumElements); PATypeHolder* PTy = new PATypeHolder( @@ -4763,130 +3972,118 @@ yyreduce: ); // Verify all elements are correct type! - for (unsigned i = 0; i < (yyvsp[-1].ConstVector)->size(); i++) { - if (ETy != (*(yyvsp[-1].ConstVector))[i]->getType()) + for (unsigned i = 0; i < yyvsp[-1].ConstVector->size(); i++) { + if (ETy != (*yyvsp[-1].ConstVector)[i]->getType()) GEN_ERROR("Element #" + utostr(i) + " is not of type '" + ETy->getDescription() +"' as required!\nIt is of type '" + - (*(yyvsp[-1].ConstVector))[i]->getType()->getDescription() + "'."); + (*yyvsp[-1].ConstVector)[i]->getType()->getDescription() + "'."); } - (yyval.ValIDVal) = ValID::create(ConstantPacked::get(pt, *(yyvsp[-1].ConstVector))); - delete PTy; delete (yyvsp[-1].ConstVector); + yyval.ValIDVal = ValID::create(ConstantPacked::get(pt, *yyvsp[-1].ConstVector)); + delete PTy; delete yyvsp[-1].ConstVector; CHECK_FOR_ERROR - ;} - break; - - case 226: -#line 2254 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.ValIDVal) = ValID::create((yyvsp[0].ConstVal)); + ; + break;} +case 225: +#line 2255 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.ValIDVal = ValID::create(yyvsp[0].ConstVal); CHECK_FOR_ERROR - ;} - break; - - case 227: -#line 2258 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.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 226: +#line 2259 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.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); CHECK_FOR_ERROR - ;} - break; - - case 228: -#line 2272 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Is it an integer reference...? - (yyval.ValIDVal) = ValID::createLocalID((yyvsp[0].UIntVal)); + ; + break;} +case 227: +#line 2273 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Is it an integer reference...? + yyval.ValIDVal = ValID::createLocalID(yyvsp[0].UIntVal); CHECK_FOR_ERROR - ;} - break; - - case 229: -#line 2276 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.ValIDVal) = ValID::createGlobalID((yyvsp[0].UIntVal)); + ; + break;} +case 228: +#line 2277 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.ValIDVal = ValID::createGlobalID(yyvsp[0].UIntVal); CHECK_FOR_ERROR - ;} - break; - - case 230: -#line 2280 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Is it a named reference...? - (yyval.ValIDVal) = ValID::createLocalName((yyvsp[0].StrVal)); + ; + break;} +case 229: +#line 2281 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Is it a named reference...? + yyval.ValIDVal = ValID::createLocalName(yyvsp[0].StrVal); CHECK_FOR_ERROR - ;} - break; - - case 231: -#line 2284 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Is it a named reference...? - (yyval.ValIDVal) = ValID::createGlobalName((yyvsp[0].StrVal)); + ; + break;} +case 230: +#line 2285 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Is it a named reference...? + yyval.ValIDVal = ValID::createGlobalName(yyvsp[0].StrVal); CHECK_FOR_ERROR - ;} - break; - - case 234: -#line 2296 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 233: +#line 2297 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); - (yyval.ValueVal) = getVal(*(yyvsp[-1].TypeVal), (yyvsp[0].ValIDVal)); - delete (yyvsp[-1].TypeVal); + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription()); + yyval.ValueVal = getVal(*yyvsp[-1].TypeVal, yyvsp[0].ValIDVal); + delete yyvsp[-1].TypeVal; CHECK_FOR_ERROR - ;} - break; - - case 235: -#line 2305 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); + ; + break;} +case 234: +#line 2306 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.FunctionVal = yyvsp[-1].FunctionVal; CHECK_FOR_ERROR - ;} - break; - - case 236: -#line 2309 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Do not allow functions with 0 basic blocks - (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); + ; + break;} +case 235: +#line 2310 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Do not allow functions with 0 basic blocks + yyval.FunctionVal = yyvsp[-1].FunctionVal; CHECK_FOR_ERROR - ;} - break; - - case 237: -#line 2318 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - setValueName((yyvsp[0].TermInstVal), (yyvsp[-1].StrVal)); + ; + break;} +case 236: +#line 2319 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + setValueName(yyvsp[0].TermInstVal, yyvsp[-1].StrVal); CHECK_FOR_ERROR - InsertValue((yyvsp[0].TermInstVal)); - (yyvsp[-2].BasicBlockVal)->getInstList().push_back((yyvsp[0].TermInstVal)); - InsertValue((yyvsp[-2].BasicBlockVal)); - (yyval.BasicBlockVal) = (yyvsp[-2].BasicBlockVal); + InsertValue(yyvsp[0].TermInstVal); + yyvsp[-2].BasicBlockVal->getInstList().push_back(yyvsp[0].TermInstVal); + InsertValue(yyvsp[-2].BasicBlockVal); + yyval.BasicBlockVal = yyvsp[-2].BasicBlockVal; CHECK_FOR_ERROR - ;} - break; - - case 238: -#line 2328 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - if (CastInst *CI1 = dyn_cast((yyvsp[0].InstVal))) + ; + break;} +case 237: +#line 2329 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + if (CastInst *CI1 = dyn_cast(yyvsp[0].InstVal)) if (CastInst *CI2 = dyn_cast(CI1->getOperand(0))) if (CI2->getParent() == 0) - (yyvsp[-1].BasicBlockVal)->getInstList().push_back(CI2); - (yyvsp[-1].BasicBlockVal)->getInstList().push_back((yyvsp[0].InstVal)); - (yyval.BasicBlockVal) = (yyvsp[-1].BasicBlockVal); + yyvsp[-1].BasicBlockVal->getInstList().push_back(CI2); + yyvsp[-1].BasicBlockVal->getInstList().push_back(yyvsp[0].InstVal); + yyval.BasicBlockVal = yyvsp[-1].BasicBlockVal; CHECK_FOR_ERROR - ;} - break; - - case 239: -#line 2337 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.BasicBlockVal) = getBBVal(ValID::createLocalID(CurFun.NextBBNum++), true); + ; + break;} +case 238: +#line 2338 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.BasicBlockVal = getBBVal(ValID::createLocalID(CurFun.NextBBNum++), true); CHECK_FOR_ERROR // Make sure to move the basic block to the correct location in the @@ -4894,15 +4091,14 @@ yyreduce: // referenced. Function::BasicBlockListType &BBL = CurFun.CurrentFunction->getBasicBlockList(); - BBL.splice(BBL.end(), BBL, (yyval.BasicBlockVal)); + BBL.splice(BBL.end(), BBL, yyval.BasicBlockVal); CHECK_FOR_ERROR - ;} - break; - - case 240: -#line 2349 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.BasicBlockVal) = getBBVal(ValID::createLocalName((yyvsp[0].StrVal)), true); + ; + break;} +case 239: +#line 2350 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.BasicBlockVal = getBBVal(ValID::createLocalName(yyvsp[0].StrVal), true); CHECK_FOR_ERROR // Make sure to move the basic block to the correct location in the @@ -4910,100 +4106,93 @@ yyreduce: // referenced. Function::BasicBlockListType &BBL = CurFun.CurrentFunction->getBasicBlockList(); - BBL.splice(BBL.end(), BBL, (yyval.BasicBlockVal)); + BBL.splice(BBL.end(), BBL, yyval.BasicBlockVal); CHECK_FOR_ERROR - ;} - break; + ; + break;} +case 240: +#line 2363 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Return with a result... + yyval.TermInstVal = new ReturnInst(yyvsp[0].ValueVal); + CHECK_FOR_ERROR + ; + break;} +case 241: +#line 2367 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Return with no result... + yyval.TermInstVal = new ReturnInst(); + CHECK_FOR_ERROR + ; + break;} +case 242: +#line 2371 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Unconditional Branch... + BasicBlock* tmpBB = getBBVal(yyvsp[0].ValIDVal); + CHECK_FOR_ERROR + yyval.TermInstVal = new BranchInst(tmpBB); + ; + break;} +case 243: +#line 2376 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + assert(cast(yyvsp[-7].PrimType)->getBitWidth() == 1 && "Not Bool?"); + BasicBlock* tmpBBA = getBBVal(yyvsp[-3].ValIDVal); + CHECK_FOR_ERROR + BasicBlock* tmpBBB = getBBVal(yyvsp[0].ValIDVal); + CHECK_FOR_ERROR + Value* tmpVal = getVal(Type::Int1Ty, yyvsp[-6].ValIDVal); + CHECK_FOR_ERROR + yyval.TermInstVal = new BranchInst(tmpBBA, tmpBBB, tmpVal); + ; + break;} +case 244: +#line 2386 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + Value* tmpVal = getVal(yyvsp[-7].PrimType, yyvsp[-6].ValIDVal); + CHECK_FOR_ERROR + BasicBlock* tmpBB = getBBVal(yyvsp[-3].ValIDVal); + CHECK_FOR_ERROR + SwitchInst *S = new SwitchInst(tmpVal, tmpBB, yyvsp[-1].JumpTable->size()); + yyval.TermInstVal = S; - case 241: -#line 2362 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Return with a result... - (yyval.TermInstVal) = new ReturnInst((yyvsp[0].ValueVal)); - CHECK_FOR_ERROR - ;} - break; - - case 242: -#line 2366 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Return with no result... - (yyval.TermInstVal) = new ReturnInst(); - CHECK_FOR_ERROR - ;} - break; - - case 243: -#line 2370 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Unconditional Branch... - BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal)); - CHECK_FOR_ERROR - (yyval.TermInstVal) = new BranchInst(tmpBB); - ;} - break; - - case 244: -#line 2375 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - assert(cast((yyvsp[-7].PrimType))->getBitWidth() == 1 && "Not Bool?"); - BasicBlock* tmpBBA = getBBVal((yyvsp[-3].ValIDVal)); - CHECK_FOR_ERROR - BasicBlock* tmpBBB = getBBVal((yyvsp[0].ValIDVal)); - CHECK_FOR_ERROR - Value* tmpVal = getVal(Type::Int1Ty, (yyvsp[-6].ValIDVal)); - CHECK_FOR_ERROR - (yyval.TermInstVal) = new BranchInst(tmpBBA, tmpBBB, tmpVal); - ;} - break; - - case 245: -#line 2385 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - Value* tmpVal = getVal((yyvsp[-7].PrimType), (yyvsp[-6].ValIDVal)); - CHECK_FOR_ERROR - BasicBlock* tmpBB = getBBVal((yyvsp[-3].ValIDVal)); - CHECK_FOR_ERROR - SwitchInst *S = new SwitchInst(tmpVal, tmpBB, (yyvsp[-1].JumpTable)->size()); - (yyval.TermInstVal) = S; - - std::vector >::iterator I = (yyvsp[-1].JumpTable)->begin(), - E = (yyvsp[-1].JumpTable)->end(); + std::vector >::iterator I = yyvsp[-1].JumpTable->begin(), + E = yyvsp[-1].JumpTable->end(); for (; I != E; ++I) { if (ConstantInt *CI = dyn_cast(I->first)) S->addCase(CI, I->second); else GEN_ERROR("Switch case is constant, but not a simple integer"); } - delete (yyvsp[-1].JumpTable); + delete yyvsp[-1].JumpTable; CHECK_FOR_ERROR - ;} - break; - - case 246: -#line 2404 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - Value* tmpVal = getVal((yyvsp[-6].PrimType), (yyvsp[-5].ValIDVal)); + ; + break;} +case 245: +#line 2405 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + Value* tmpVal = getVal(yyvsp[-6].PrimType, yyvsp[-5].ValIDVal); CHECK_FOR_ERROR - BasicBlock* tmpBB = getBBVal((yyvsp[-2].ValIDVal)); + BasicBlock* tmpBB = getBBVal(yyvsp[-2].ValIDVal); CHECK_FOR_ERROR SwitchInst *S = new SwitchInst(tmpVal, tmpBB, 0); - (yyval.TermInstVal) = S; + yyval.TermInstVal = S; CHECK_FOR_ERROR - ;} - break; - - case 247: -#line 2414 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 246: +#line 2415 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Handle the short syntax const PointerType *PFTy = 0; const FunctionType *Ty = 0; - if (!(PFTy = dyn_cast((yyvsp[-11].TypeVal)->get())) || + if (!(PFTy = dyn_cast(yyvsp[-11].TypeVal->get())) || !(Ty = dyn_cast(PFTy->getElementType()))) { // Pull out the types of all of the arguments... std::vector ParamTypes; FunctionType::ParamAttrsList ParamAttrs; - ParamAttrs.push_back((yyvsp[-6].ParamAttrs)); - for (ValueRefList::iterator I = (yyvsp[-8].ValueRefList)->begin(), E = (yyvsp[-8].ValueRefList)->end(); I != E; ++I) { + ParamAttrs.push_back(yyvsp[-6].ParamAttrs); + for (ValueRefList::iterator I = yyvsp[-8].ValueRefList->begin(), E = yyvsp[-8].ValueRefList->end(); I != E; ++I) { const Type *Ty = I->Val->getType(); if (Ty == Type::VoidTy) GEN_ERROR("Short call syntax cannot be used with varargs"); @@ -5011,20 +4200,20 @@ yyreduce: ParamAttrs.push_back(I->Attrs); } - Ty = FunctionType::get((yyvsp[-11].TypeVal)->get(), ParamTypes, false, ParamAttrs); + Ty = FunctionType::get(yyvsp[-11].TypeVal->get(), ParamTypes, false, ParamAttrs); PFTy = PointerType::get(Ty); } - Value *V = getVal(PFTy, (yyvsp[-10].ValIDVal)); // Get the function we're calling... + Value *V = getVal(PFTy, yyvsp[-10].ValIDVal); // Get the function we're calling... CHECK_FOR_ERROR - BasicBlock *Normal = getBBVal((yyvsp[-3].ValIDVal)); + BasicBlock *Normal = getBBVal(yyvsp[-3].ValIDVal); CHECK_FOR_ERROR - BasicBlock *Except = getBBVal((yyvsp[0].ValIDVal)); + BasicBlock *Except = getBBVal(yyvsp[0].ValIDVal); CHECK_FOR_ERROR // Check the arguments ValueList Args; - if ((yyvsp[-8].ValueRefList)->empty()) { // Has no arguments? + if (yyvsp[-8].ValueRefList->empty()) { // Has no arguments? // Make sure no arguments is a good thing! if (Ty->getNumParams() != 0) GEN_ERROR("No arguments passed to a function that " @@ -5034,7 +4223,7 @@ yyreduce: // correctly! FunctionType::param_iterator I = Ty->param_begin(); FunctionType::param_iterator E = Ty->param_end(); - ValueRefList::iterator ArgI = (yyvsp[-8].ValueRefList)->begin(), ArgE = (yyvsp[-8].ValueRefList)->end(); + ValueRefList::iterator ArgI = yyvsp[-8].ValueRefList->begin(), ArgE = yyvsp[-8].ValueRefList->end(); for (; ArgI != ArgE && I != E; ++ArgI, ++I) { if (ArgI->Val->getType() != *I) @@ -5053,340 +4242,314 @@ yyreduce: // Create the InvokeInst InvokeInst *II = new InvokeInst(V, Normal, Except, Args); - II->setCallingConv((yyvsp[-12].UIntVal)); - (yyval.TermInstVal) = II; - delete (yyvsp[-8].ValueRefList); + II->setCallingConv(yyvsp[-12].UIntVal); + yyval.TermInstVal = II; + delete yyvsp[-8].ValueRefList; CHECK_FOR_ERROR - ;} - break; - - case 248: -#line 2480 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.TermInstVal) = new UnwindInst(); + ; + break;} +case 247: +#line 2481 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.TermInstVal = new UnwindInst(); CHECK_FOR_ERROR - ;} - break; - - case 249: -#line 2484 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.TermInstVal) = new UnreachableInst(); + ; + break;} +case 248: +#line 2485 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.TermInstVal = new UnreachableInst(); CHECK_FOR_ERROR - ;} - break; - - case 250: -#line 2491 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.JumpTable) = (yyvsp[-5].JumpTable); - Constant *V = cast(getValNonImprovising((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal))); + ; + break;} +case 249: +#line 2492 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.JumpTable = yyvsp[-5].JumpTable; + Constant *V = cast(getValNonImprovising(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal)); CHECK_FOR_ERROR if (V == 0) GEN_ERROR("May only switch on a constant pool value"); - BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal)); + BasicBlock* tmpBB = getBBVal(yyvsp[0].ValIDVal); CHECK_FOR_ERROR - (yyval.JumpTable)->push_back(std::make_pair(V, tmpBB)); - ;} - break; - - case 251: -#line 2502 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.JumpTable) = new std::vector >(); - Constant *V = cast(getValNonImprovising((yyvsp[-4].PrimType), (yyvsp[-3].ValIDVal))); + yyval.JumpTable->push_back(std::make_pair(V, tmpBB)); + ; + break;} +case 250: +#line 2503 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.JumpTable = new std::vector >(); + Constant *V = cast(getValNonImprovising(yyvsp[-4].PrimType, yyvsp[-3].ValIDVal)); CHECK_FOR_ERROR if (V == 0) GEN_ERROR("May only switch on a constant pool value"); - BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal)); + BasicBlock* tmpBB = getBBVal(yyvsp[0].ValIDVal); CHECK_FOR_ERROR - (yyval.JumpTable)->push_back(std::make_pair(V, tmpBB)); - ;} - break; - - case 252: -#line 2515 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + yyval.JumpTable->push_back(std::make_pair(V, tmpBB)); + ; + break;} +case 251: +#line 2516 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Is this definition named?? if so, assign the name... - setValueName((yyvsp[0].InstVal), (yyvsp[-1].StrVal)); + setValueName(yyvsp[0].InstVal, yyvsp[-1].StrVal); CHECK_FOR_ERROR - InsertValue((yyvsp[0].InstVal)); - (yyval.InstVal) = (yyvsp[0].InstVal); + InsertValue(yyvsp[0].InstVal); + yyval.InstVal = yyvsp[0].InstVal; CHECK_FOR_ERROR - ;} - break; - - case 253: -#line 2525 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { // Used for PHI nodes + ; + break;} +case 252: +#line 2526 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Used for PHI nodes if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-5].TypeVal))->getDescription()); - (yyval.PHIList) = new std::list >(); - Value* tmpVal = getVal(*(yyvsp[-5].TypeVal), (yyvsp[-3].ValIDVal)); + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-5].TypeVal)->getDescription()); + yyval.PHIList = new std::list >(); + Value* tmpVal = getVal(*yyvsp[-5].TypeVal, yyvsp[-3].ValIDVal); CHECK_FOR_ERROR - BasicBlock* tmpBB = getBBVal((yyvsp[-1].ValIDVal)); + BasicBlock* tmpBB = getBBVal(yyvsp[-1].ValIDVal); CHECK_FOR_ERROR - (yyval.PHIList)->push_back(std::make_pair(tmpVal, tmpBB)); - delete (yyvsp[-5].TypeVal); - ;} - break; - - case 254: -#line 2536 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.PHIList) = (yyvsp[-6].PHIList); - Value* tmpVal = getVal((yyvsp[-6].PHIList)->front().first->getType(), (yyvsp[-3].ValIDVal)); + yyval.PHIList->push_back(std::make_pair(tmpVal, tmpBB)); + delete yyvsp[-5].TypeVal; + ; + break;} +case 253: +#line 2537 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.PHIList = yyvsp[-6].PHIList; + Value* tmpVal = getVal(yyvsp[-6].PHIList->front().first->getType(), yyvsp[-3].ValIDVal); CHECK_FOR_ERROR - BasicBlock* tmpBB = getBBVal((yyvsp[-1].ValIDVal)); + BasicBlock* tmpBB = getBBVal(yyvsp[-1].ValIDVal); CHECK_FOR_ERROR - (yyvsp[-6].PHIList)->push_back(std::make_pair(tmpVal, tmpBB)); - ;} - break; - - case 255: -#line 2546 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + yyvsp[-6].PHIList->push_back(std::make_pair(tmpVal, tmpBB)); + ; + break;} +case 254: +#line 2547 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription()); + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription()); // Used for call and invoke instructions - (yyval.ValueRefList) = new ValueRefList(); - ValueRefListEntry E; E.Attrs = (yyvsp[0].ParamAttrs); E.Val = getVal((yyvsp[-2].TypeVal)->get(), (yyvsp[-1].ValIDVal)); - (yyval.ValueRefList)->push_back(E); - ;} - break; - - case 256: -#line 2554 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + yyval.ValueRefList = new ValueRefList(); + ValueRefListEntry E; E.Attrs = yyvsp[0].ParamAttrs; E.Val = getVal(yyvsp[-2].TypeVal->get(), yyvsp[-1].ValIDVal); + yyval.ValueRefList->push_back(E); + ; + break;} +case 255: +#line 2555 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription()); - (yyval.ValueRefList) = (yyvsp[-4].ValueRefList); - ValueRefListEntry E; E.Attrs = (yyvsp[0].ParamAttrs); E.Val = getVal((yyvsp[-2].TypeVal)->get(), (yyvsp[-1].ValIDVal)); - (yyval.ValueRefList)->push_back(E); + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription()); + yyval.ValueRefList = yyvsp[-4].ValueRefList; + ValueRefListEntry E; E.Attrs = yyvsp[0].ParamAttrs; E.Val = getVal(yyvsp[-2].TypeVal->get(), yyvsp[-1].ValIDVal); + yyval.ValueRefList->push_back(E); CHECK_FOR_ERROR - ;} - break; - - case 257: -#line 2562 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.ValueRefList) = new ValueRefList(); ;} - break; - - case 258: -#line 2565 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { (yyval.ValueList) = new std::vector(); ;} - break; - - case 259: -#line 2566 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.ValueList) = (yyvsp[-2].ValueList); - (yyval.ValueList)->push_back((yyvsp[0].ValueVal)); + ; + break;} +case 256: +#line 2563 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ValueRefList = new ValueRefList(); ; + break;} +case 257: +#line 2566 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ yyval.ValueList = new std::vector(); ; + break;} +case 258: +#line 2567 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.ValueList = yyvsp[-2].ValueList; + yyval.ValueList->push_back(yyvsp[0].ValueVal); CHECK_FOR_ERROR - ;} - break; - - case 260: -#line 2573 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.BoolVal) = true; + ; + break;} +case 259: +#line 2574 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.BoolVal = true; CHECK_FOR_ERROR - ;} - break; - - case 261: -#line 2577 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.BoolVal) = false; + ; + break;} +case 260: +#line 2578 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.BoolVal = false; CHECK_FOR_ERROR - ;} - break; - - case 262: -#line 2582 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 261: +#line 2583 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription()); - if (!(*(yyvsp[-3].TypeVal))->isInteger() && !(*(yyvsp[-3].TypeVal))->isFloatingPoint() && - !isa((*(yyvsp[-3].TypeVal)).get())) + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-3].TypeVal)->getDescription()); + if (!(*yyvsp[-3].TypeVal)->isInteger() && !(*yyvsp[-3].TypeVal)->isFloatingPoint() && + !isa((*yyvsp[-3].TypeVal).get())) GEN_ERROR( "Arithmetic operator requires integer, FP, or packed operands"); - if (isa((*(yyvsp[-3].TypeVal)).get()) && - ((yyvsp[-4].BinaryOpVal) == Instruction::URem || - (yyvsp[-4].BinaryOpVal) == Instruction::SRem || - (yyvsp[-4].BinaryOpVal) == Instruction::FRem)) + if (isa((*yyvsp[-3].TypeVal).get()) && + (yyvsp[-4].BinaryOpVal == Instruction::URem || + yyvsp[-4].BinaryOpVal == Instruction::SRem || + yyvsp[-4].BinaryOpVal == Instruction::FRem)) GEN_ERROR("Remainder not supported on packed types"); - Value* val1 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[-2].ValIDVal)); + Value* val1 = getVal(*yyvsp[-3].TypeVal, yyvsp[-2].ValIDVal); CHECK_FOR_ERROR - Value* val2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal)); + Value* val2 = getVal(*yyvsp[-3].TypeVal, yyvsp[0].ValIDVal); CHECK_FOR_ERROR - (yyval.InstVal) = BinaryOperator::create((yyvsp[-4].BinaryOpVal), val1, val2); - if ((yyval.InstVal) == 0) + yyval.InstVal = BinaryOperator::create(yyvsp[-4].BinaryOpVal, val1, val2); + if (yyval.InstVal == 0) GEN_ERROR("binary operator returned null"); - delete (yyvsp[-3].TypeVal); - ;} - break; - - case 263: -#line 2603 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + delete yyvsp[-3].TypeVal; + ; + break;} +case 262: +#line 2604 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription()); - if (!(*(yyvsp[-3].TypeVal))->isInteger()) { - if (Instruction::isShift((yyvsp[-4].BinaryOpVal)) || !isa((yyvsp[-3].TypeVal)->get()) || - !cast((yyvsp[-3].TypeVal)->get())->getElementType()->isInteger()) + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-3].TypeVal)->getDescription()); + if (!(*yyvsp[-3].TypeVal)->isInteger()) { + if (Instruction::isShift(yyvsp[-4].BinaryOpVal) || !isa(yyvsp[-3].TypeVal->get()) || + !cast(yyvsp[-3].TypeVal->get())->getElementType()->isInteger()) GEN_ERROR("Logical operator requires integral operands"); } - Value* tmpVal1 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[-2].ValIDVal)); + Value* tmpVal1 = getVal(*yyvsp[-3].TypeVal, yyvsp[-2].ValIDVal); CHECK_FOR_ERROR - Value* tmpVal2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal)); + Value* tmpVal2 = getVal(*yyvsp[-3].TypeVal, yyvsp[0].ValIDVal); CHECK_FOR_ERROR - (yyval.InstVal) = BinaryOperator::create((yyvsp[-4].BinaryOpVal), tmpVal1, tmpVal2); - if ((yyval.InstVal) == 0) + yyval.InstVal = BinaryOperator::create(yyvsp[-4].BinaryOpVal, tmpVal1, tmpVal2); + if (yyval.InstVal == 0) GEN_ERROR("binary operator returned null"); - delete (yyvsp[-3].TypeVal); - ;} - break; - - case 264: -#line 2620 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + delete yyvsp[-3].TypeVal; + ; + break;} +case 263: +#line 2621 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription()); - if (isa((*(yyvsp[-3].TypeVal)).get())) + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-3].TypeVal)->getDescription()); + if (isa((*yyvsp[-3].TypeVal).get())) GEN_ERROR("Packed types not supported by icmp instruction"); - Value* tmpVal1 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[-2].ValIDVal)); + Value* tmpVal1 = getVal(*yyvsp[-3].TypeVal, yyvsp[-2].ValIDVal); CHECK_FOR_ERROR - Value* tmpVal2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal)); + Value* tmpVal2 = getVal(*yyvsp[-3].TypeVal, yyvsp[0].ValIDVal); CHECK_FOR_ERROR - (yyval.InstVal) = CmpInst::create((yyvsp[-5].OtherOpVal), (yyvsp[-4].IPredicate), tmpVal1, tmpVal2); - if ((yyval.InstVal) == 0) + yyval.InstVal = CmpInst::create(yyvsp[-5].OtherOpVal, yyvsp[-4].IPredicate, tmpVal1, tmpVal2); + if (yyval.InstVal == 0) GEN_ERROR("icmp operator returned null"); - ;} - break; - - case 265: -#line 2633 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 264: +#line 2634 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-3].TypeVal))->getDescription()); - if (isa((*(yyvsp[-3].TypeVal)).get())) + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-3].TypeVal)->getDescription()); + if (isa((*yyvsp[-3].TypeVal).get())) GEN_ERROR("Packed types not supported by fcmp instruction"); - Value* tmpVal1 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[-2].ValIDVal)); + Value* tmpVal1 = getVal(*yyvsp[-3].TypeVal, yyvsp[-2].ValIDVal); CHECK_FOR_ERROR - Value* tmpVal2 = getVal(*(yyvsp[-3].TypeVal), (yyvsp[0].ValIDVal)); + Value* tmpVal2 = getVal(*yyvsp[-3].TypeVal, yyvsp[0].ValIDVal); CHECK_FOR_ERROR - (yyval.InstVal) = CmpInst::create((yyvsp[-5].OtherOpVal), (yyvsp[-4].FPredicate), tmpVal1, tmpVal2); - if ((yyval.InstVal) == 0) + yyval.InstVal = CmpInst::create(yyvsp[-5].OtherOpVal, yyvsp[-4].FPredicate, tmpVal1, tmpVal2); + if (yyval.InstVal == 0) GEN_ERROR("fcmp operator returned null"); - ;} - break; - - case 266: -#line 2646 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 265: +#line 2647 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription()); - Value* Val = (yyvsp[-2].ValueVal); - const Type* DestTy = (yyvsp[0].TypeVal)->get(); - if (!CastInst::castIsValid((yyvsp[-3].CastOpVal), Val, DestTy)) + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription()); + Value* Val = yyvsp[-2].ValueVal; + const Type* DestTy = yyvsp[0].TypeVal->get(); + if (!CastInst::castIsValid(yyvsp[-3].CastOpVal, Val, DestTy)) GEN_ERROR("invalid cast opcode for cast from '" + Val->getType()->getDescription() + "' to '" + DestTy->getDescription() + "'"); - (yyval.InstVal) = CastInst::create((yyvsp[-3].CastOpVal), Val, DestTy); - delete (yyvsp[0].TypeVal); - ;} - break; - - case 267: -#line 2658 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - if ((yyvsp[-4].ValueVal)->getType() != Type::Int1Ty) + yyval.InstVal = CastInst::create(yyvsp[-3].CastOpVal, Val, DestTy); + delete yyvsp[0].TypeVal; + ; + break;} +case 266: +#line 2659 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + if (yyvsp[-4].ValueVal->getType() != Type::Int1Ty) GEN_ERROR("select condition must be boolean"); - if ((yyvsp[-2].ValueVal)->getType() != (yyvsp[0].ValueVal)->getType()) + if (yyvsp[-2].ValueVal->getType() != yyvsp[0].ValueVal->getType()) GEN_ERROR("select value types should match"); - (yyval.InstVal) = new SelectInst((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)); + yyval.InstVal = new SelectInst(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal); CHECK_FOR_ERROR - ;} - break; - - case 268: -#line 2666 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 267: +#line 2667 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[0].TypeVal))->getDescription()); - (yyval.InstVal) = new VAArgInst((yyvsp[-2].ValueVal), *(yyvsp[0].TypeVal)); - delete (yyvsp[0].TypeVal); + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[0].TypeVal)->getDescription()); + yyval.InstVal = new VAArgInst(yyvsp[-2].ValueVal, *yyvsp[0].TypeVal); + delete yyvsp[0].TypeVal; CHECK_FOR_ERROR - ;} - break; - - case 269: -#line 2673 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - if (!ExtractElementInst::isValidOperands((yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) + ; + break;} +case 268: +#line 2674 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + if (!ExtractElementInst::isValidOperands(yyvsp[-2].ValueVal, yyvsp[0].ValueVal)) GEN_ERROR("Invalid extractelement operands"); - (yyval.InstVal) = new ExtractElementInst((yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)); + yyval.InstVal = new ExtractElementInst(yyvsp[-2].ValueVal, yyvsp[0].ValueVal); CHECK_FOR_ERROR - ;} - break; - - case 270: -#line 2679 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - if (!InsertElementInst::isValidOperands((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) + ; + break;} +case 269: +#line 2680 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + if (!InsertElementInst::isValidOperands(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal)) GEN_ERROR("Invalid insertelement operands"); - (yyval.InstVal) = new InsertElementInst((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)); + yyval.InstVal = new InsertElementInst(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal); CHECK_FOR_ERROR - ;} - break; - - case 271: -#line 2685 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - if (!ShuffleVectorInst::isValidOperands((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal))) + ; + break;} +case 270: +#line 2686 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + if (!ShuffleVectorInst::isValidOperands(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal)) GEN_ERROR("Invalid shufflevector operands"); - (yyval.InstVal) = new ShuffleVectorInst((yyvsp[-4].ValueVal), (yyvsp[-2].ValueVal), (yyvsp[0].ValueVal)); + yyval.InstVal = new ShuffleVectorInst(yyvsp[-4].ValueVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal); CHECK_FOR_ERROR - ;} - break; - - case 272: -#line 2691 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - const Type *Ty = (yyvsp[0].PHIList)->front().first->getType(); + ; + break;} +case 271: +#line 2692 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + const Type *Ty = yyvsp[0].PHIList->front().first->getType(); if (!Ty->isFirstClassType()) GEN_ERROR("PHI node operands must be of first class type"); - (yyval.InstVal) = new PHINode(Ty); - ((PHINode*)(yyval.InstVal))->reserveOperandSpace((yyvsp[0].PHIList)->size()); - while ((yyvsp[0].PHIList)->begin() != (yyvsp[0].PHIList)->end()) { - if ((yyvsp[0].PHIList)->front().first->getType() != Ty) + yyval.InstVal = new PHINode(Ty); + ((PHINode*)yyval.InstVal)->reserveOperandSpace(yyvsp[0].PHIList->size()); + while (yyvsp[0].PHIList->begin() != yyvsp[0].PHIList->end()) { + if (yyvsp[0].PHIList->front().first->getType() != Ty) GEN_ERROR("All elements of a PHI node must be of the same type"); - cast((yyval.InstVal))->addIncoming((yyvsp[0].PHIList)->front().first, (yyvsp[0].PHIList)->front().second); - (yyvsp[0].PHIList)->pop_front(); + cast(yyval.InstVal)->addIncoming(yyvsp[0].PHIList->front().first, yyvsp[0].PHIList->front().second); + yyvsp[0].PHIList->pop_front(); } - delete (yyvsp[0].PHIList); // Free the list... + delete yyvsp[0].PHIList; // Free the list... CHECK_FOR_ERROR - ;} - break; - - case 273: -#line 2707 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 272: +#line 2708 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ // Handle the short syntax const PointerType *PFTy = 0; const FunctionType *Ty = 0; - if (!(PFTy = dyn_cast((yyvsp[-5].TypeVal)->get())) || + if (!(PFTy = dyn_cast(yyvsp[-5].TypeVal->get())) || !(Ty = dyn_cast(PFTy->getElementType()))) { // Pull out the types of all of the arguments... std::vector ParamTypes; FunctionType::ParamAttrsList ParamAttrs; - ParamAttrs.push_back((yyvsp[0].ParamAttrs)); - for (ValueRefList::iterator I = (yyvsp[-2].ValueRefList)->begin(), E = (yyvsp[-2].ValueRefList)->end(); I != E; ++I) { + ParamAttrs.push_back(yyvsp[0].ParamAttrs); + for (ValueRefList::iterator I = yyvsp[-2].ValueRefList->begin(), E = yyvsp[-2].ValueRefList->end(); I != E; ++I) { const Type *Ty = I->Val->getType(); if (Ty == Type::VoidTy) GEN_ERROR("Short call syntax cannot be used with varargs"); @@ -5394,16 +4557,16 @@ yyreduce: ParamAttrs.push_back(I->Attrs); } - Ty = FunctionType::get((yyvsp[-5].TypeVal)->get(), ParamTypes, false, ParamAttrs); + Ty = FunctionType::get(yyvsp[-5].TypeVal->get(), ParamTypes, false, ParamAttrs); PFTy = PointerType::get(Ty); } - Value *V = getVal(PFTy, (yyvsp[-4].ValIDVal)); // Get the function we're calling... + Value *V = getVal(PFTy, yyvsp[-4].ValIDVal); // Get the function we're calling... CHECK_FOR_ERROR // Check the arguments ValueList Args; - if ((yyvsp[-2].ValueRefList)->empty()) { // Has no arguments? + if (yyvsp[-2].ValueRefList->empty()) { // Has no arguments? // Make sure no arguments is a good thing! if (Ty->getNumParams() != 0) GEN_ERROR("No arguments passed to a function that " @@ -5414,7 +4577,7 @@ yyreduce: // FunctionType::param_iterator I = Ty->param_begin(); FunctionType::param_iterator E = Ty->param_end(); - ValueRefList::iterator ArgI = (yyvsp[-2].ValueRefList)->begin(), ArgE = (yyvsp[-2].ValueRefList)->end(); + ValueRefList::iterator ArgI = yyvsp[-2].ValueRefList->begin(), ArgE = yyvsp[-2].ValueRefList->end(); for (; ArgI != ArgE && I != E; ++ArgI, ++I) { if (ArgI->Val->getType() != *I) @@ -5431,428 +4594,365 @@ yyreduce: } // Create the call node CallInst *CI = new CallInst(V, Args); - CI->setTailCall((yyvsp[-7].BoolVal)); - CI->setCallingConv((yyvsp[-6].UIntVal)); - (yyval.InstVal) = CI; - delete (yyvsp[-2].ValueRefList); - delete (yyvsp[-5].TypeVal); + CI->setTailCall(yyvsp[-7].BoolVal); + CI->setCallingConv(yyvsp[-6].UIntVal); + yyval.InstVal = CI; + delete yyvsp[-2].ValueRefList; + delete yyvsp[-5].TypeVal; CHECK_FOR_ERROR - ;} - break; - - case 274: -#line 2770 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.InstVal) = (yyvsp[0].InstVal); + ; + break;} +case 273: +#line 2771 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.InstVal = yyvsp[0].InstVal; CHECK_FOR_ERROR - ;} - break; - - case 275: -#line 2775 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.BoolVal) = true; + ; + break;} +case 274: +#line 2776 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.BoolVal = true; CHECK_FOR_ERROR - ;} - break; - - case 276: -#line 2779 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - (yyval.BoolVal) = false; + ; + break;} +case 275: +#line 2780 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + yyval.BoolVal = false; CHECK_FOR_ERROR - ;} - break; - - case 277: -#line 2786 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 276: +#line 2787 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); - (yyval.InstVal) = new MallocInst(*(yyvsp[-1].TypeVal), 0, (yyvsp[0].UIntVal)); - delete (yyvsp[-1].TypeVal); + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription()); + yyval.InstVal = new MallocInst(*yyvsp[-1].TypeVal, 0, yyvsp[0].UIntVal); + delete yyvsp[-1].TypeVal; CHECK_FOR_ERROR - ;} - break; - - case 278: -#line 2793 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 277: +#line 2794 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-4].TypeVal))->getDescription()); - Value* tmpVal = getVal((yyvsp[-2].PrimType), (yyvsp[-1].ValIDVal)); + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-4].TypeVal)->getDescription()); + Value* tmpVal = getVal(yyvsp[-2].PrimType, yyvsp[-1].ValIDVal); CHECK_FOR_ERROR - (yyval.InstVal) = new MallocInst(*(yyvsp[-4].TypeVal), tmpVal, (yyvsp[0].UIntVal)); - delete (yyvsp[-4].TypeVal); - ;} - break; - - case 279: -#line 2801 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + yyval.InstVal = new MallocInst(*yyvsp[-4].TypeVal, tmpVal, yyvsp[0].UIntVal); + delete yyvsp[-4].TypeVal; + ; + break;} +case 278: +#line 2802 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); - (yyval.InstVal) = new AllocaInst(*(yyvsp[-1].TypeVal), 0, (yyvsp[0].UIntVal)); - delete (yyvsp[-1].TypeVal); + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription()); + yyval.InstVal = new AllocaInst(*yyvsp[-1].TypeVal, 0, yyvsp[0].UIntVal); + delete yyvsp[-1].TypeVal; CHECK_FOR_ERROR - ;} - break; - - case 280: -#line 2808 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 279: +#line 2809 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-4].TypeVal))->getDescription()); - Value* tmpVal = getVal((yyvsp[-2].PrimType), (yyvsp[-1].ValIDVal)); + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-4].TypeVal)->getDescription()); + Value* tmpVal = getVal(yyvsp[-2].PrimType, yyvsp[-1].ValIDVal); CHECK_FOR_ERROR - (yyval.InstVal) = new AllocaInst(*(yyvsp[-4].TypeVal), tmpVal, (yyvsp[0].UIntVal)); - delete (yyvsp[-4].TypeVal); - ;} - break; - - case 281: -#line 2816 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { - if (!isa((yyvsp[0].ValueVal)->getType())) + yyval.InstVal = new AllocaInst(*yyvsp[-4].TypeVal, tmpVal, yyvsp[0].UIntVal); + delete yyvsp[-4].TypeVal; + ; + break;} +case 280: +#line 2817 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ + if (!isa(yyvsp[0].ValueVal->getType())) GEN_ERROR("Trying to free nonpointer type " + - (yyvsp[0].ValueVal)->getType()->getDescription() + ""); - (yyval.InstVal) = new FreeInst((yyvsp[0].ValueVal)); + yyvsp[0].ValueVal->getType()->getDescription() + ""); + yyval.InstVal = new FreeInst(yyvsp[0].ValueVal); CHECK_FOR_ERROR - ;} - break; - - case 282: -#line 2824 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + ; + break;} +case 281: +#line 2825 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); - if (!isa((yyvsp[-1].TypeVal)->get())) + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription()); + if (!isa(yyvsp[-1].TypeVal->get())) GEN_ERROR("Can't load from nonpointer type: " + - (*(yyvsp[-1].TypeVal))->getDescription()); - if (!cast((yyvsp[-1].TypeVal)->get())->getElementType()->isFirstClassType()) + (*yyvsp[-1].TypeVal)->getDescription()); + if (!cast(yyvsp[-1].TypeVal->get())->getElementType()->isFirstClassType()) GEN_ERROR("Can't load from pointer of non-first-class type: " + - (*(yyvsp[-1].TypeVal))->getDescription()); - Value* tmpVal = getVal(*(yyvsp[-1].TypeVal), (yyvsp[0].ValIDVal)); + (*yyvsp[-1].TypeVal)->getDescription()); + Value* tmpVal = getVal(*yyvsp[-1].TypeVal, yyvsp[0].ValIDVal); CHECK_FOR_ERROR - (yyval.InstVal) = new LoadInst(tmpVal, "", (yyvsp[-3].BoolVal)); - delete (yyvsp[-1].TypeVal); - ;} - break; - - case 283: -#line 2838 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + yyval.InstVal = new LoadInst(tmpVal, "", yyvsp[-3].BoolVal); + delete yyvsp[-1].TypeVal; + ; + break;} +case 282: +#line 2839 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-1].TypeVal))->getDescription()); - const PointerType *PT = dyn_cast((yyvsp[-1].TypeVal)->get()); + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-1].TypeVal)->getDescription()); + const PointerType *PT = dyn_cast(yyvsp[-1].TypeVal->get()); if (!PT) GEN_ERROR("Can't store to a nonpointer type: " + - (*(yyvsp[-1].TypeVal))->getDescription()); + (*yyvsp[-1].TypeVal)->getDescription()); const Type *ElTy = PT->getElementType(); - if (ElTy != (yyvsp[-3].ValueVal)->getType()) - GEN_ERROR("Can't store '" + (yyvsp[-3].ValueVal)->getType()->getDescription() + + if (ElTy != yyvsp[-3].ValueVal->getType()) + GEN_ERROR("Can't store '" + yyvsp[-3].ValueVal->getType()->getDescription() + "' into space of type '" + ElTy->getDescription() + "'"); - Value* tmpVal = getVal(*(yyvsp[-1].TypeVal), (yyvsp[0].ValIDVal)); + Value* tmpVal = getVal(*yyvsp[-1].TypeVal, yyvsp[0].ValIDVal); CHECK_FOR_ERROR - (yyval.InstVal) = new StoreInst((yyvsp[-3].ValueVal), tmpVal, (yyvsp[-5].BoolVal)); - delete (yyvsp[-1].TypeVal); - ;} - break; - - case 284: -#line 2855 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" - { + yyval.InstVal = new StoreInst(yyvsp[-3].ValueVal, tmpVal, yyvsp[-5].BoolVal); + delete yyvsp[-1].TypeVal; + ; + break;} +case 283: +#line 2856 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +{ if (!UpRefs.empty()) - GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[-2].TypeVal))->getDescription()); - if (!isa((yyvsp[-2].TypeVal)->get())) + GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-2].TypeVal)->getDescription()); + if (!isa(yyvsp[-2].TypeVal->get())) GEN_ERROR("getelementptr insn requires pointer operand"); - if (!GetElementPtrInst::getIndexedType(*(yyvsp[-2].TypeVal), *(yyvsp[0].ValueList), true)) + if (!GetElementPtrInst::getIndexedType(*yyvsp[-2].TypeVal, *yyvsp[0].ValueList, true)) GEN_ERROR("Invalid getelementptr indices for type '" + - (*(yyvsp[-2].TypeVal))->getDescription()+ "'"); - Value* tmpVal = getVal(*(yyvsp[-2].TypeVal), (yyvsp[-1].ValIDVal)); + (*yyvsp[-2].TypeVal)->getDescription()+ "'"); + Value* tmpVal = getVal(*yyvsp[-2].TypeVal, yyvsp[-1].ValIDVal); CHECK_FOR_ERROR - (yyval.InstVal) = new GetElementPtrInst(tmpVal, *(yyvsp[0].ValueList)); - delete (yyvsp[-2].TypeVal); - delete (yyvsp[0].ValueList); - ;} - break; - - - default: break; - } - -/* Line 1126 of yacc.c. */ -#line 5588 "llvmAsmParser.tab.c" + yyval.InstVal = new GetElementPtrInst(tmpVal, *yyvsp[0].ValueList); + delete yyvsp[-2].TypeVal; + 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 - - YY_STACK_PRINT (yyss, yyssp); +#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 *++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 - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yypgoto[yyn - YYNTBASE] + *yyssp; + if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else - yystate = yydefgoto[yyn - YYNTOKENS]; + yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; +yyerrlab: /* here on detecting error */ -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) + if (! yyerrstatus) + /* If not already recovering from an error, report this error. */ { ++yynerrs; -#if YYERROR_VERBOSE + +#ifdef YYERROR_VERBOSE yyn = yypact[yystate]; - if (YYPACT_NINF < yyn && yyn < YYLAST) + if (yyn > YYFLAG && yyn < YYLAST) { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - char *yymsg = 0; -# define YYERROR_VERBOSE_ARGS_MAXIMUM 5 - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; + int size = 0; + char *msg; + int x, count; -#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; - 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; - - if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM) - yymsg = (char *) YYSTACK_ALLOC (yysize); - if (yymsg) + 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) { - /* 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 = yymsg; - int yyi = 0; - while ((*yyp = *yyf)) + strcpy(msg, "parse error"); + + if (count < 5) { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } + 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 (yymsg); - YYSTACK_FREE (yymsg); + yyerror(msg); + free(msg); } else - { - yyerror (YY_("syntax error")); - goto yyexhaustedlab; - } + yyerror ("parse error; also virtual memory exceeded"); } else #endif /* YYERROR_VERBOSE */ - yyerror (YY_("syntax error")); + yyerror("parse error"); } - + goto yyerrlab1; +yyerrlab1: /* here on error raised explicitly by an action */ if (yyerrstatus == 3) { - /* If just tried and failed to reuse look-ahead token after an - error, discard it. */ + /* if just tried and failed to reuse lookahead token after an error, discard it. */ - 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 look-ahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| 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 (0) - goto yyerrorlab; - -yyvsp -= yylen; - yyssp -= yylen; - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) + /* return failure if at end of input */ + if (yychar == YYEOF) YYABORT; +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); +#endif - yydestruct ("Error: popping", yystos[yystate], yyvsp); - YYPOPSTACK; - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); + yychar = YYEMPTY; } + /* Else will try to reuse lookahead token + after shifting the error token. */ + + yyerrstatus = 3; /* Each real token shifted decrements this */ + + goto yyerrhandle; + +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 + +yyerrpop: /* pop the current state because it cannot handle the error token */ + + if (yyssp == yyss) YYABORT; + yyvsp--; + yystate = *--yyssp; +#ifdef YYLSP_NEEDED + yylsp--; +#endif + +#if YYDEBUG != 0 + if (yydebug) + { + 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 == YYFLAG) + goto yyerrdefault; + + 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; + } + else if (yyn == 0) + goto yyerrpop; + if (yyn == YYFINAL) YYACCEPT; +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Shifting error token, "); +#endif + *++yyvsp = yylval; - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); +#ifdef YYLSP_NEEDED + *++yylsp = yylloc; +#endif yystate = yyn; goto yynewstate; - -/*-------------------------------------. -| 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); - while (yyssp != yyss) + yyacceptlab: + /* YYACCEPT comes here. */ + if (yyfree_stacks) { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); - YYPOPSTACK; - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); + free (yyss); + free (yyvs); +#ifdef YYLSP_NEEDED + free (yyls); #endif - return yyresult; + } + return 0; + + yyabortlab: + /* YYABORT comes here. */ + if (yyfree_stacks) + { + free (yyss); + free (yyvs); +#ifdef YYLSP_NEEDED + free (yyls); +#endif + } + return 1; } - - -#line 2872 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" +#line 2873 "/Users/sabre/cvs/llvm/lib/AsmParser/llvmAsmParser.y" // common code from the two 'RunVMAsmParser' functions @@ -5901,4 +5001,3 @@ int yyerror(const char *ErrorMsg) { GenerateError(errMsg); return 0; } - diff --git a/lib/AsmParser/llvmAsmParser.h.cvs b/lib/AsmParser/llvmAsmParser.h.cvs index fa6e8af8d54..bf20cd54226 100644 --- a/lib/AsmParser/llvmAsmParser.h.cvs +++ b/lib/AsmParser/llvmAsmParser.h.cvs @@ -1,302 +1,4 @@ -/* A Bison parser, made by GNU Bison 2.1. */ - -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 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, 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. */ - -/* 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, - LOCALVAL_ID = 260, - GLOBALVAL_ID = 261, - FPVAL = 262, - VOID = 263, - INTTYPE = 264, - FLOAT = 265, - DOUBLE = 266, - LABEL = 267, - TYPE = 268, - LOCALVAR = 269, - GLOBALVAR = 270, - LABELSTR = 271, - STRINGCONSTANT = 272, - ATSTRINGCONSTANT = 273, - IMPLEMENTATION = 274, - ZEROINITIALIZER = 275, - TRUETOK = 276, - FALSETOK = 277, - BEGINTOK = 278, - ENDTOK = 279, - DECLARE = 280, - DEFINE = 281, - GLOBAL = 282, - CONSTANT = 283, - SECTION = 284, - VOLATILE = 285, - TO = 286, - DOTDOTDOT = 287, - NULL_TOK = 288, - UNDEF = 289, - INTERNAL = 290, - LINKONCE = 291, - WEAK = 292, - APPENDING = 293, - DLLIMPORT = 294, - DLLEXPORT = 295, - EXTERN_WEAK = 296, - OPAQUE = 297, - EXTERNAL = 298, - TARGET = 299, - TRIPLE = 300, - ALIGN = 301, - DEPLIBS = 302, - CALL = 303, - TAIL = 304, - ASM_TOK = 305, - MODULE = 306, - SIDEEFFECT = 307, - CC_TOK = 308, - CCC_TOK = 309, - FASTCC_TOK = 310, - COLDCC_TOK = 311, - X86_STDCALLCC_TOK = 312, - X86_FASTCALLCC_TOK = 313, - DATALAYOUT = 314, - RET = 315, - BR = 316, - SWITCH = 317, - INVOKE = 318, - UNWIND = 319, - UNREACHABLE = 320, - ADD = 321, - SUB = 322, - MUL = 323, - UDIV = 324, - SDIV = 325, - FDIV = 326, - UREM = 327, - SREM = 328, - FREM = 329, - AND = 330, - OR = 331, - XOR = 332, - SHL = 333, - LSHR = 334, - ASHR = 335, - ICMP = 336, - FCMP = 337, - EQ = 338, - NE = 339, - SLT = 340, - SGT = 341, - SLE = 342, - SGE = 343, - ULT = 344, - UGT = 345, - ULE = 346, - UGE = 347, - OEQ = 348, - ONE = 349, - OLT = 350, - OGT = 351, - OLE = 352, - OGE = 353, - ORD = 354, - UNO = 355, - UEQ = 356, - UNE = 357, - MALLOC = 358, - ALLOCA = 359, - FREE = 360, - LOAD = 361, - STORE = 362, - GETELEMENTPTR = 363, - TRUNC = 364, - ZEXT = 365, - SEXT = 366, - FPTRUNC = 367, - FPEXT = 368, - BITCAST = 369, - UITOFP = 370, - SITOFP = 371, - FPTOUI = 372, - FPTOSI = 373, - INTTOPTR = 374, - PTRTOINT = 375, - PHI_TOK = 376, - SELECT = 377, - VAARG = 378, - EXTRACTELEMENT = 379, - INSERTELEMENT = 380, - SHUFFLEVECTOR = 381, - NORETURN = 382, - INREG = 383, - SRET = 384, - DEFAULT = 385, - HIDDEN = 386 - }; -#endif -/* Tokens. */ -#define ESINT64VAL 258 -#define EUINT64VAL 259 -#define LOCALVAL_ID 260 -#define GLOBALVAL_ID 261 -#define FPVAL 262 -#define VOID 263 -#define INTTYPE 264 -#define FLOAT 265 -#define DOUBLE 266 -#define LABEL 267 -#define TYPE 268 -#define LOCALVAR 269 -#define GLOBALVAR 270 -#define LABELSTR 271 -#define STRINGCONSTANT 272 -#define ATSTRINGCONSTANT 273 -#define IMPLEMENTATION 274 -#define ZEROINITIALIZER 275 -#define TRUETOK 276 -#define FALSETOK 277 -#define BEGINTOK 278 -#define ENDTOK 279 -#define DECLARE 280 -#define DEFINE 281 -#define GLOBAL 282 -#define CONSTANT 283 -#define SECTION 284 -#define VOLATILE 285 -#define TO 286 -#define DOTDOTDOT 287 -#define NULL_TOK 288 -#define UNDEF 289 -#define INTERNAL 290 -#define LINKONCE 291 -#define WEAK 292 -#define APPENDING 293 -#define DLLIMPORT 294 -#define DLLEXPORT 295 -#define EXTERN_WEAK 296 -#define OPAQUE 297 -#define EXTERNAL 298 -#define TARGET 299 -#define TRIPLE 300 -#define ALIGN 301 -#define DEPLIBS 302 -#define CALL 303 -#define TAIL 304 -#define ASM_TOK 305 -#define MODULE 306 -#define SIDEEFFECT 307 -#define CC_TOK 308 -#define CCC_TOK 309 -#define FASTCC_TOK 310 -#define COLDCC_TOK 311 -#define X86_STDCALLCC_TOK 312 -#define X86_FASTCALLCC_TOK 313 -#define DATALAYOUT 314 -#define RET 315 -#define BR 316 -#define SWITCH 317 -#define INVOKE 318 -#define UNWIND 319 -#define UNREACHABLE 320 -#define ADD 321 -#define SUB 322 -#define MUL 323 -#define UDIV 324 -#define SDIV 325 -#define FDIV 326 -#define UREM 327 -#define SREM 328 -#define FREM 329 -#define AND 330 -#define OR 331 -#define XOR 332 -#define SHL 333 -#define LSHR 334 -#define ASHR 335 -#define ICMP 336 -#define FCMP 337 -#define EQ 338 -#define NE 339 -#define SLT 340 -#define SGT 341 -#define SLE 342 -#define SGE 343 -#define ULT 344 -#define UGT 345 -#define ULE 346 -#define UGE 347 -#define OEQ 348 -#define ONE 349 -#define OLT 350 -#define OGT 351 -#define OLE 352 -#define OGE 353 -#define ORD 354 -#define UNO 355 -#define UEQ 356 -#define UNE 357 -#define MALLOC 358 -#define ALLOCA 359 -#define FREE 360 -#define LOAD 361 -#define STORE 362 -#define GETELEMENTPTR 363 -#define TRUNC 364 -#define ZEXT 365 -#define SEXT 366 -#define FPTRUNC 367 -#define FPEXT 368 -#define BITCAST 369 -#define UITOFP 370 -#define SITOFP 371 -#define FPTOUI 372 -#define FPTOSI 373 -#define INTTOPTR 374 -#define PTRTOINT 375 -#define PHI_TOK 376 -#define SELECT 377 -#define VAARG 378 -#define EXTRACTELEMENT 379 -#define INSERTELEMENT 380 -#define SHUFFLEVECTOR 381 -#define NORETURN 382 -#define INREG 383 -#define SRET 384 -#define DEFAULT 385 -#define HIDDEN 386 - - - - -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 900 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" -typedef union YYSTYPE { +typedef union { llvm::Module *ModuleVal; llvm::Function *FunctionVal; llvm::BasicBlock *BasicBlockVal; @@ -341,14 +43,135 @@ typedef union YYSTYPE { llvm::ICmpInst::Predicate IPredicate; llvm::FCmpInst::Predicate FPredicate; } YYSTYPE; -/* Line 1447 of yacc.c. */ -#line 346 "llvmAsmParser.tab.h" -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 -#endif +#define ESINT64VAL 257 +#define EUINT64VAL 258 +#define LOCALVAL_ID 259 +#define GLOBALVAL_ID 260 +#define FPVAL 261 +#define VOID 262 +#define INTTYPE 263 +#define FLOAT 264 +#define DOUBLE 265 +#define LABEL 266 +#define TYPE 267 +#define LOCALVAR 268 +#define GLOBALVAR 269 +#define LABELSTR 270 +#define STRINGCONSTANT 271 +#define ATSTRINGCONSTANT 272 +#define IMPLEMENTATION 273 +#define ZEROINITIALIZER 274 +#define TRUETOK 275 +#define FALSETOK 276 +#define BEGINTOK 277 +#define ENDTOK 278 +#define DECLARE 279 +#define DEFINE 280 +#define GLOBAL 281 +#define CONSTANT 282 +#define SECTION 283 +#define VOLATILE 284 +#define TO 285 +#define DOTDOTDOT 286 +#define NULL_TOK 287 +#define UNDEF 288 +#define INTERNAL 289 +#define LINKONCE 290 +#define WEAK 291 +#define APPENDING 292 +#define DLLIMPORT 293 +#define DLLEXPORT 294 +#define EXTERN_WEAK 295 +#define OPAQUE 296 +#define EXTERNAL 297 +#define TARGET 298 +#define TRIPLE 299 +#define ALIGN 300 +#define DEPLIBS 301 +#define CALL 302 +#define TAIL 303 +#define ASM_TOK 304 +#define MODULE 305 +#define SIDEEFFECT 306 +#define CC_TOK 307 +#define CCC_TOK 308 +#define FASTCC_TOK 309 +#define COLDCC_TOK 310 +#define X86_STDCALLCC_TOK 311 +#define X86_FASTCALLCC_TOK 312 +#define DATALAYOUT 313 +#define RET 314 +#define BR 315 +#define SWITCH 316 +#define INVOKE 317 +#define UNWIND 318 +#define UNREACHABLE 319 +#define ADD 320 +#define SUB 321 +#define MUL 322 +#define UDIV 323 +#define SDIV 324 +#define FDIV 325 +#define UREM 326 +#define SREM 327 +#define FREM 328 +#define AND 329 +#define OR 330 +#define XOR 331 +#define SHL 332 +#define LSHR 333 +#define ASHR 334 +#define ICMP 335 +#define FCMP 336 +#define EQ 337 +#define NE 338 +#define SLT 339 +#define SGT 340 +#define SLE 341 +#define SGE 342 +#define ULT 343 +#define UGT 344 +#define ULE 345 +#define UGE 346 +#define OEQ 347 +#define ONE 348 +#define OLT 349 +#define OGT 350 +#define OLE 351 +#define OGE 352 +#define ORD 353 +#define UNO 354 +#define UEQ 355 +#define UNE 356 +#define MALLOC 357 +#define ALLOCA 358 +#define FREE 359 +#define LOAD 360 +#define STORE 361 +#define GETELEMENTPTR 362 +#define TRUNC 363 +#define ZEXT 364 +#define SEXT 365 +#define FPTRUNC 366 +#define FPEXT 367 +#define BITCAST 368 +#define UITOFP 369 +#define SITOFP 370 +#define FPTOUI 371 +#define FPTOSI 372 +#define INTTOPTR 373 +#define PTRTOINT 374 +#define PHI_TOK 375 +#define SELECT 376 +#define VAARG 377 +#define EXTRACTELEMENT 378 +#define INSERTELEMENT 379 +#define SHUFFLEVECTOR 380 +#define NORETURN 381 +#define INREG 382 +#define SRET 383 +#define DEFAULT 384 +#define HIDDEN 385 + extern YYSTYPE llvmAsmlval; - - - diff --git a/lib/AsmParser/llvmAsmParser.y.cvs b/lib/AsmParser/llvmAsmParser.y.cvs index 24b0abfdd34..585579b6ef2 100644 --- a/lib/AsmParser/llvmAsmParser.y.cvs +++ b/lib/AsmParser/llvmAsmParser.y.cvs @@ -26,6 +26,7 @@ #include "llvm/Support/Streams.h" #include #include +#include #include #ifndef NDEBUG #define YYDEBUG 1 diff --git a/tools/llvm-upgrade/UpgradeParser.cpp.cvs b/tools/llvm-upgrade/UpgradeParser.cpp.cvs index c93b7e9a465..a1e8cf24b6f 100644 --- a/tools/llvm-upgrade/UpgradeParser.cpp.cvs +++ b/tools/llvm-upgrade/UpgradeParser.cpp.cvs @@ -1,376 +1,167 @@ -/* A Bison parser, made by GNU Bison 2.1. */ -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* A Bison parser, made from /Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y + by GNU Bison version 1.28 */ - 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. +#define YYBISON 1 /* Identify Bison output. */ - 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, 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. */ - -/* 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.1" - -/* 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 - -/* 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 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" +#line 14 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y" #include "UpgradeInternals.h" #include "llvm/CallingConv.h" @@ -383,6 +174,7 @@ #include "llvm/Support/MathExtras.h" #include #include +#include #include #include @@ -1809,28 +1601,8 @@ Module* UpgradeAssembly(const std::string &infile, std::istream& in, using namespace llvm; - -/* 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) -#line 1453 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" -typedef union YYSTYPE { +#line 1454 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y" +typedef union { llvm::Module *ModuleVal; llvm::Function *FunctionVal; std::pair *ArgVal; @@ -1871,1620 +1643,1151 @@ typedef union YYSTYPE { llvm::FCmpInst::Predicate FPred; llvm::Module::Endianness Endianness; } YYSTYPE; -/* Line 196 of yacc.c. */ -#line 1876 "UpgradeParser.tab.c" -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 +#include + +#ifndef __cplusplus +#ifndef __STDC__ +#define const +#endif #endif -/* Copy the second part of user declarations. */ +#define YYFINAL 605 +#define YYFLAG -32768 +#define YYNTBASE 166 +#define YYTRANSLATE(x) ((unsigned)(x) <= 405 ? yytranslate[x] : 245) -/* Line 219 of yacc.c. */ -#line 1888 "UpgradeParser.tab.c" +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 +}; -#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -# define YYSIZE_T __SIZE_TYPE__ -#endif -#if ! defined (YYSIZE_T) && defined (size_t) -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus)) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) -# define YYSIZE_T unsigned int -#endif +#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 +}; -#ifndef YY_ -# if YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid -# endif -#endif - -#if ! defined (yyoverflow) || YYERROR_VERBOSE - -/* 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 -# else -# define YYSTACK_ALLOC alloca -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYINCLUDED_STDLIB_H -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (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 2005 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1) -# endif -# ifdef __cplusplus -extern "C" { -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \ - && (defined (__STDC__) || defined (__cplusplus))) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \ - && (defined (__STDC__) || defined (__cplusplus))) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifdef __cplusplus -} -# 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 -{ - short int 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 (short int) + 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 (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 (0) +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 +}; #endif -#if defined (__STDC__) || defined (__cplusplus) - typedef signed char yysigned_char; +#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 +}; +#endif + + +#if YYDEBUG != 0 || defined (YYERROR_VERBOSE) + +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 +}; +#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 +}; + +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 +}; + +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 +}; + +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 +}; + +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 +}; + +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 +}; + + +#define YYLAST 1762 + + +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 +}; + +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 +}; +/* -*-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. + + 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., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* 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 +#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 +#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 */ + #pragma alloca +#define YYSTACK_USE_ALLOCA +#else /* not MSDOS, or __TURBOC__, or _AIX */ +#if 0 +#ifdef __hpux /* haible@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 */ + +#ifdef YYSTACK_USE_ALLOCA +#define YYSTACK_ALLOC alloca #else - typedef short int yysigned_char; +#define YYSTACK_ALLOC malloc #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 unsigned char 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 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const unsigned short int 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 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const short int 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 unsigned short int yyrline[] = -{ - 0, 1593, 1593, 1594, 1602, 1603, 1613, 1613, 1613, 1613, - 1613, 1613, 1613, 1613, 1613, 1613, 1613, 1617, 1617, 1617, - 1621, 1621, 1621, 1621, 1621, 1621, 1625, 1625, 1626, 1626, - 1627, 1627, 1628, 1628, 1629, 1629, 1633, 1633, 1634, 1634, - 1635, 1635, 1636, 1636, 1637, 1637, 1638, 1638, 1639, 1639, - 1640, 1641, 1644, 1644, 1644, 1644, 1648, 1648, 1648, 1648, - 1648, 1648, 1648, 1649, 1649, 1649, 1649, 1649, 1649, 1655, - 1655, 1655, 1655, 1659, 1659, 1659, 1659, 1663, 1663, 1667, - 1667, 1672, 1675, 1680, 1681, 1682, 1683, 1684, 1685, 1686, - 1687, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1708, - 1709, 1717, 1718, 1726, 1735, 1736, 1743, 1744, 1748, 1752, - 1768, 1769, 1776, 1777, 1784, 1792, 1792, 1792, 1792, 1792, - 1792, 1792, 1793, 1793, 1793, 1793, 1793, 1798, 1802, 1806, - 1811, 1820, 1837, 1843, 1856, 1865, 1869, 1880, 1884, 1897, - 1901, 1908, 1909, 1915, 1922, 1934, 1964, 1977, 2000, 2028, - 2050, 2061, 2083, 2094, 2103, 2108, 2166, 2173, 2181, 2188, - 2195, 2199, 2203, 2212, 2227, 2240, 2249, 2277, 2290, 2299, - 2305, 2311, 2322, 2328, 2334, 2345, 2346, 2355, 2356, 2368, - 2377, 2378, 2379, 2380, 2381, 2397, 2417, 2419, 2421, 2421, - 2428, 2428, 2435, 2435, 2442, 2442, 2450, 2452, 2454, 2459, - 2473, 2474, 2478, 2481, 2489, 2493, 2500, 2504, 2508, 2512, - 2520, 2520, 2524, 2525, 2529, 2537, 2542, 2550, 2551, 2558, - 2565, 2569, 2745, 2745, 2749, 2759, 2759, 2763, 2768, 2769, - 2770, 2774, 2775, 2774, 2787, 2788, 2793, 2794, 2795, 2796, - 2797, 2798, 2799, 2800, 2801, 2822, 2825, 2840, 2841, 2846, - 2846, 2854, 2863, 2866, 2875, 2885, 2890, 2899, 2910, 2910, - 2913, 2916, 2919, 2923, 2929, 2944, 2950, 3006, 3009, 3015, - 3025, 3038, 3067, 3075, 3083, 3087, 3094, 3095, 3099, 3102, - 3108, 3125, 3141, 3155, 3167, 3179, 3190, 3208, 3217, 3226, - 3233, 3254, 3278, 3284, 3290, 3296, 3312, 3390, 3398, 3399, - 3403, 3404, 3408, 3414, 3420, 3426, 3432, 3439, 3451, 3476 -}; -#endif - -#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 unsigned short int 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 - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const unsigned char 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 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const unsigned char 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 -}; - -/* 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 unsigned short int 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 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const short int 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 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -555 -static const short int 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 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const short int 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 -}; - -/* 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 short int 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 -}; - -static const short int 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 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const unsigned char 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 -}; +/* 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. */ #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 yyerrorlab - - -/* 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 yyerrlab1 +/* 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); \ - yytoken = YYTRANSLATE (yychar); \ + { yychar = (token), yylval = (value); \ + yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ + { yyerror ("syntax error: cannot back up"); YYERROR; } \ while (0) - #define YYTERROR 1 #define YYERRCODE 256 - -/* 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 (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 (0) +#ifndef YYPURE +#define YYLEX yylex() #endif - -/* 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 - - -/* YYLEX -- calling `yylex' with the right arguments. */ - +#ifdef YYPURE +#ifdef YYLSP_NEEDED #ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) +#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) #else -# define YYLEX yylex () +#define YYLEX yylex(&yylval, &yylloc) +#endif +#else /* not YYLSP_NEEDED */ +#ifdef YYLEX_PARAM +#define YYLEX yylex(&yylval, YYLEX_PARAM) +#else +#define YYLEX yylex(&yylval) +#endif +#endif /* not YYLSP_NEEDED */ #endif -/* Enable debugging if requested. */ -#if YYDEBUG +/* If nonreentrant, generate the variables here */ -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif +#ifndef YYPURE -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) +int yychar; /* the lookahead symbol */ +YYSTYPE yylval; /* the semantic value of the */ + /* lookahead symbol */ -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yy_stack_print (short int *bottom, short int *top) -#else -static void -yy_stack_print (bottom, top) - short int *bottom; - short int *top; +#ifdef YYLSP_NEEDED +YYLTYPE yylloc; /* location data for the lookahead */ + /* symbol */ #endif -{ - YYFPRINTF (stderr, "Stack now"); - for (/* Nothing. */; 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 (0) +int yynerrs; /* number of parse errors so far */ +#endif /* not YYPURE */ - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yy_reduce_print (int yyrule) -#else -static void -yy_reduce_print (yyrule) - int yyrule; +#if YYDEBUG != 0 +int yydebug; /* nonzero means print parse trace */ +/* Since this is uninitialized, it does not stop multiple parsers + from coexisting. */ #endif -{ - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ", - yyrule - 1, yylno); - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]); -} -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (Rule); \ -} while (0) +/* YYINITDEPTH indicates the initial size of the parser's stacks */ -/* 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 -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH -# define YYINITDEPTH 200 +#define YYINITDEPTH 200 #endif -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). +/* YYMAXDEPTH is the maximum size the stacks can grow to + (effective only if the built-in stack extension method is used). */ - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ +#if YYMAXDEPTH == 0 +#undef YYMAXDEPTH +#endif #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 YYERROR_VERBOSE +#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 -# ifndef yystrlen -# if defined (__GLIBC__) && defined (_STRING_H) -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -# if defined (__STDC__) || defined (__cplusplus) -yystrlen (const char *yystr) -# else -yystrlen (yystr) - const char *yystr; -# endif -{ - const char *yys = yystr; - - while (*yys++ != '\0') - continue; - - return yys - yystr - 1; -} -# 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. */ -static char * -# if defined (__STDC__) || defined (__cplusplus) -yystpcpy (char *yydest, const char *yysrc) -# else -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -# endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - 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 == '"') - { - size_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: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -#endif /* YYERROR_VERBOSE */ - - - -#if YYDEBUG -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) +/* This is the most reliable way to avoid incompatibilities + in available built-in functions on various systems. */ static void -yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) -#else +__yy_memcpy (to, from, count) + char *to; + char *from; + unsigned int count; +{ + register char *f = from; + register char *t = to; + register int i = count; + + while (i-- > 0) + *t++ = *f++; +} + +#else /* __cplusplus */ + +/* This is the most reliable way to avoid incompatibilities + in available built-in functions on various systems. */ static void -yysymprint (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE *yyvaluep; +__yy_memcpy (char *to, char *from, unsigned int count) +{ + register char *t = to; + register char *f = from; + register int i = count; + + while (i-- > 0) + *t++ = *f++; +} + #endif -{ - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - switch (yytype) - { - default: - break; - } - YYFPRINTF (yyoutput, ")"); -} - -#endif /* ! YYDEBUG */ -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -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 -{ - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { - - default: - break; - } -} +#line 217 "/usr/share/bison.simple" -/* Prevent warnings from -Wmissing-prototypes. */ +/* 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. */ #ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM); -# else -int yyparse (); -# endif -#else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) +#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 */ + +/* Prevent warning if -Wstrict-prototypes. */ +#ifdef __GNUC__ +#ifdef YYPARSE_PARAM +int yyparse (void *); +#else int yyparse (void); -#else -int yyparse (); #endif -#endif /* ! YYPARSE_PARAM */ +#endif - - -/* 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 (__cplusplus) -int yyparse (void *YYPARSE_PARAM) -# else -int yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -# endif -#else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) int -yyparse (void) -#else -int -yyparse () - -#endif -#endif +yyparse(YYPARSE_PARAM_ARG) + YYPARSE_PARAM_DECL { - - 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; + 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 */ - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - short int yyssa[YYINITDEPTH]; - short int *yyss = yyssa; - short int *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; + 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--) +#else #define YYPOPSTACK (yyvsp--, yyssp--) +#endif - YYSIZE_T yystacksize = YYINITDEPTH; + int yystacksize = YYINITDEPTH; + int yyfree_stacks = 0; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; +#ifdef YYPURE + int yychar; + YYSTYPE yylval; + int yynerrs; +#ifdef YYLSP_NEEDED + YYLTYPE yylloc; +#endif +#endif + YYSTYPE yyval; /* the variable used to return */ + /* semantic values from the action */ + /* routines */ - /* When reducing, the number of symbols on the RHS of the reduced - rule. */ int yylen; - YYDPRINTF ((stderr, "Starting parse\n")); +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Starting parse\n"); +#endif yystate = 0; yyerrstatus = 0; @@ -3496,745 +2799,718 @@ yyparse () so that they stay on the same level as the state stack. The wasted elements are never initialized. */ - yyssp = yyss; + yyssp = yyss - 1; yyvsp = yyvs; +#ifdef YYLSP_NEEDED + yylsp = yyls; +#endif - goto yysetstate; +/* 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: -/*------------------------------------------------------------. -| 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++; + *++yyssp = yystate; - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= 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 + /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; + int size = yyssp - yyss + 1; #ifdef yyoverflow - { - /* 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 int *yyss1 = yyss; + /* 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 - - /* 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), - - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } + yyss = yyss1; yyvs = yyvs1; +#ifdef YYLSP_NEEDED + yyls = yyls1; +#endif #else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + if (yystacksize >= YYMAXDEPTH) + { + yyerror("parser stack overflow"); + if (yyfree_stacks) + { + free (yyss); + free (yyvs); +#ifdef YYLSP_NEEDED + free (yyls); +#endif + } + return 2; + } yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) + if (yystacksize > YYMAXDEPTH) yystacksize = YYMAXDEPTH; - - { - short int *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 +#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 #endif /* no yyoverflow */ - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; + yyssp = yyss + size - 1; + yyvsp = yyvs + size - 1; +#ifdef YYLSP_NEEDED + yylsp = yyls + size - 1; +#endif +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Stack size increased to %d\n", yystacksize); +#endif - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) + if (yyssp >= yyss + yystacksize - 1) YYABORT; } - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Entering state %d\n", yystate); +#endif goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: + yybackup: /* Do appropriate processing given the current state. */ -/* Read a look-ahead token if we need one and don't already have one. */ +/* Read a lookahead token if we need one and don't already have one. */ /* yyresume: */ - /* First try to decide what to do without reference to look-ahead token. */ + /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) + if (yyn == YYFLAG) goto yydefault; - /* Not known => get a look-ahead token if don't already have one. */ + /* 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. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ if (yychar == YYEMPTY) { - YYDPRINTF ((stderr, "Reading a token: ")); +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Reading a token: "); +#endif yychar = YYLEX; } - if (yychar <= YYEOF) + /* Convert token to internal form (in yychar1) for indexing tables with */ + + if (yychar <= 0) /* This means end of input. */ { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); + yychar1 = 0; + yychar = YYEOF; /* Don't call YYLEX any more */ + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Now at end of input.\n"); +#endif } else { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + 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 } - /* 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) + yyn += yychar1; + if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) goto yydefault; + yyn = yytable[yyn]; - if (yyn <= 0) + + /* 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 || yyn == YYTABLE_NINF) + if (yyn == YYFLAG) goto yyerrlab; yyn = -yyn; goto yyreduce; } + else if (yyn == 0) + goto yyerrlab; if (yyn == YYFINAL) YYACCEPT; - /* Shift the look-ahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + /* Shift the lookahead token. */ + +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); +#endif /* Discard the token being shifted unless it is eof. */ if (yychar != YYEOF) yychar = YYEMPTY; *++yyvsp = yylval; +#ifdef YYLSP_NEEDED + *++yylsp = yylloc; +#endif - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; + /* count tokens shifted since error; after three, turn off error status. */ + if (yyerrstatus) yyerrstatus--; yystate = yyn; goto yynewstate; - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ +/* Do the default action for the current state. */ yydefault: + yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; - goto yyreduce; - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ +/* Do a reduction. yyn is the number of a rule to reduce with. */ 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 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) +#if YYDEBUG != 0 + if (yydebug) { - case 3: -#line 1594 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - if ((yyvsp[0].UIntVal) > (uint32_t)INT32_MAX) // Outside of my range! + int i; + + fprintf (stderr, "Reducing via rule %d (line %d), ", + yyn, yyrline[yyn]); + + /* 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 + + + switch (yyn) { + +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 5: -#line 1603 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - if ((yyvsp[0].UInt64Val) > (uint64_t)INT64_MAX) // Outside of my range! + 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 26: -#line 1625 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.IPred) = ICmpInst::ICMP_EQ; ;} - break; - - case 27: -#line 1625 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.IPred) = ICmpInst::ICMP_NE; ;} - break; - - case 28: -#line 1626 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.IPred) = ICmpInst::ICMP_SLT; ;} - break; - - case 29: -#line 1626 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.IPred) = ICmpInst::ICMP_SGT; ;} - break; - - case 30: -#line 1627 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.IPred) = ICmpInst::ICMP_SLE; ;} - break; - - case 31: -#line 1627 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.IPred) = ICmpInst::ICMP_SGE; ;} - break; - - case 32: -#line 1628 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.IPred) = ICmpInst::ICMP_ULT; ;} - break; - - case 33: -#line 1628 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.IPred) = ICmpInst::ICMP_UGT; ;} - break; - - case 34: -#line 1629 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.IPred) = ICmpInst::ICMP_ULE; ;} - break; - - case 35: -#line 1629 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.IPred) = ICmpInst::ICMP_UGE; ;} - break; - - case 36: -#line 1633 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.FPred) = FCmpInst::FCMP_OEQ; ;} - break; - - case 37: -#line 1633 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.FPred) = FCmpInst::FCMP_ONE; ;} - break; - - case 38: -#line 1634 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.FPred) = FCmpInst::FCMP_OLT; ;} - break; - - case 39: -#line 1634 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.FPred) = FCmpInst::FCMP_OGT; ;} - break; - - case 40: -#line 1635 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.FPred) = FCmpInst::FCMP_OLE; ;} - break; - - case 41: -#line 1635 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.FPred) = FCmpInst::FCMP_OGE; ;} - break; - - case 42: -#line 1636 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.FPred) = FCmpInst::FCMP_ORD; ;} - break; - - case 43: -#line 1636 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.FPred) = FCmpInst::FCMP_UNO; ;} - break; - - case 44: -#line 1637 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.FPred) = FCmpInst::FCMP_UEQ; ;} - break; - - case 45: -#line 1637 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.FPred) = FCmpInst::FCMP_UNE; ;} - break; - - case 46: -#line 1638 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.FPred) = FCmpInst::FCMP_ULT; ;} - break; - - case 47: -#line 1638 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.FPred) = FCmpInst::FCMP_UGT; ;} - break; - - case 48: -#line 1639 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.FPred) = FCmpInst::FCMP_ULE; ;} - break; - - case 49: -#line 1639 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.FPred) = FCmpInst::FCMP_UGE; ;} - break; - - case 50: -#line 1640 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.FPred) = FCmpInst::FCMP_TRUE; ;} - break; - - case 51: -#line 1641 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.FPred) = FCmpInst::FCMP_FALSE; ;} - break; - - case 81: -#line 1672 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.StrVal) = (yyvsp[-1].StrVal); - ;} - break; - - case 82: -#line 1675 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.StrVal) = 0; - ;} - break; - - case 83: -#line 1680 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} - break; - - case 84: -#line 1681 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} - break; - - case 85: -#line 1682 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} - break; - - case 86: -#line 1683 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;} - break; - - case 87: -#line 1684 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} - break; - - case 88: -#line 1685 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} - break; - - case 89: -#line 1686 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} - break; - - case 90: -#line 1687 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} - break; - - case 91: -#line 1691 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.UIntVal) = OldCallingConv::C; ;} - break; - - case 92: -#line 1692 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.UIntVal) = OldCallingConv::C; ;} - break; - - case 93: -#line 1693 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.UIntVal) = OldCallingConv::CSRet; ;} - break; - - case 94: -#line 1694 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.UIntVal) = OldCallingConv::Fast; ;} - break; - - case 95: -#line 1695 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.UIntVal) = OldCallingConv::Cold; ;} - break; - - case 96: -#line 1696 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.UIntVal) = OldCallingConv::X86_StdCall; ;} - break; - - case 97: -#line 1697 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.UIntVal) = OldCallingConv::X86_FastCall; ;} - break; - - case 98: -#line 1698 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - if ((unsigned)(yyvsp[0].UInt64Val) != (yyvsp[0].UInt64Val)) + 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) error("Calling conv too large"); - (yyval.UIntVal) = (yyvsp[0].UInt64Val); - ;} - break; - - case 99: -#line 1708 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.UIntVal) = 0; ;} - break; - - case 100: -#line 1709 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.UIntVal) = (yyvsp[0].UInt64Val); - if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) + 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)) error("Alignment must be a power of two"); - ;} - break; - - case 101: -#line 1717 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.UIntVal) = 0; ;} - break; - - case 102: -#line 1718 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.UIntVal) = (yyvsp[0].UInt64Val); - if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) + ; + 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)) error("Alignment must be a power of two"); - ;} - break; - - case 103: -#line 1726 "/proj/llvm/llvm-3/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 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] == '\\') error("Invalid character in section name"); - (yyval.StrVal) = (yyvsp[0].StrVal); - ;} - break; - - case 104: -#line 1735 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.StrVal) = 0; ;} - break; - - case 105: -#line 1736 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.StrVal) = (yyvsp[0].StrVal); ;} - break; - - case 106: -#line 1743 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - {;} - break; - - case 107: -#line 1744 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - {;} - break; - - case 108: -#line 1748 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - CurGV->setSection((yyvsp[0].StrVal)); - free((yyvsp[0].StrVal)); - ;} - break; - - case 109: -#line 1752 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - if ((yyvsp[0].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[0].UInt64Val))) + 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)) error("Alignment must be a power of two"); - CurGV->setAlignment((yyvsp[0].UInt64Val)); + CurGV->setAlignment(yyvsp[0].UInt64Val); - ;} - break; - - case 111: -#line 1769 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.TypeVal).PAT = new PATypeHolder((yyvsp[0].PrimType).T); - (yyval.TypeVal).S = Signless; - ;} - break; - - case 113: -#line 1777 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.TypeVal).PAT = new PATypeHolder((yyvsp[0].PrimType).T); - (yyval.TypeVal).S = Signless; - ;} - break; - - case 114: -#line 1784 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { + ; + 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" +{ if (!UpRefs.empty()) - error("Invalid upreference in type: " + (*(yyvsp[0].TypeVal).PAT)->getDescription()); - (yyval.TypeVal) = (yyvsp[0].TypeVal); - ;} - break; - - case 127: -#line 1798 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.TypeVal).PAT = new PATypeHolder((yyvsp[0].PrimType).T); - (yyval.TypeVal).S = (yyvsp[0].PrimType).S; - ;} - break; - - case 128: -#line 1802 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.TypeVal).PAT = new PATypeHolder(OpaqueType::get()); - (yyval.TypeVal).S = Signless; - ;} - break; - - case 129: -#line 1806 "/proj/llvm/llvm-3/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 130: -#line 1811 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { // Type UpReference - if ((yyvsp[0].UInt64Val) > (uint64_t)~0U) + 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("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[0].UInt64Val, OT)); // Add to vector... + yyval.TypeVal.PAT = new PATypeHolder(OT); + yyval.TypeVal.S = Signless; UR_OUT("New Upreference!\n"); - ;} - break; - - case 131: -#line 1820 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { // Function derived type? + ; + break;} +case 130: +#line 1821 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y" +{ // Function derived type? std::vector Params; - for (std::list::iterator I = (yyvsp[-1].TypeList)->begin(), - E = (yyvsp[-1].TypeList)->end(); I != E; ++I) { + for (std::list::iterator I = yyvsp[-1].TypeList->begin(), + E = yyvsp[-1].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[-3].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 132: -#line 1837 "/proj/llvm/llvm-3/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 133: -#line 1843 "/proj/llvm/llvm-3/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[-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) 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[-3].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 134: -#line 1856 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { // Structure type? + 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? std::vector Elements; - for (std::list::iterator I = (yyvsp[-1].TypeList)->begin(), - E = (yyvsp[-1].TypeList)->end(); I != E; ++I) + for (std::list::iterator I = yyvsp[-1].TypeList->begin(), + E = yyvsp[-1].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 135: -#line 1865 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { // Empty structure type? - (yyval.TypeVal).PAT = new PATypeHolder(StructType::get(std::vector())); - (yyval.TypeVal).S = Signless; - ;} - break; - - case 136: -#line 1869 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { // Packed Structure type? + 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())); + yyval.TypeVal.S = Signless; + ; + break;} +case 135: +#line 1870 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y" +{ // Packed Structure type? std::vector Elements; - for (std::list::iterator I = (yyvsp[-2].TypeList)->begin(), - E = (yyvsp[-2].TypeList)->end(); I != E; ++I) { + for (std::list::iterator I = yyvsp[-2].TypeList->begin(), + E = yyvsp[-2].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 137: -#line 1880 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { // Empty packed structure type? - (yyval.TypeVal).PAT = new PATypeHolder(StructType::get(std::vector(),true)); - (yyval.TypeVal).S = Signless; - ;} - break; - - case 138: -#line 1884 "/proj/llvm/llvm-3/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[-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(),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) 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 139: -#line 1897 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.TypeList) = new std::list(); - (yyval.TypeList)->push_back((yyvsp[0].TypeVal)); - ;} - break; - - case 140: -#line 1901 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - ((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back((yyvsp[0].TypeVal)); - ;} - break; - - case 142: -#line 1909 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { + 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(); + 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" +{ PATypeInfo VoidTI; VoidTI.PAT = new PATypeHolder(Type::VoidTy); VoidTI.S = Signless; - ((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back(VoidTI); - ;} - break; - - case 143: -#line 1915 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.TypeList) = new std::list(); + (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 VoidTI; VoidTI.PAT = new PATypeHolder(Type::VoidTy); VoidTI.S = Signless; - (yyval.TypeList)->push_back(VoidTI); - ;} - break; - - case 144: -#line 1922 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.TypeList) = new std::list(); - ;} - break; - - case 145: -#line 1934 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { // Nonempty unsized arr - const ArrayType *ATy = dyn_cast((yyvsp[-3].TypeVal).PAT->get()); + yyval.TypeList->push_back(VoidTI); + ; + break;} +case 143: +#line 1923 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y" +{ + yyval.TypeList = new std::list(); + ; + break;} +case 144: +#line 1935 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y" +{ // Nonempty unsized arr + const ArrayType *ATy = dyn_cast(yyvsp[-3].TypeVal.PAT->get()); if (ATy == 0) error("Cannot make array constant with type: '" + - (yyvsp[-3].TypeVal).PAT->get()->getDescription() + "'"); + yyvsp[-3].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[-1].ConstVector->size()) error("Type mismatch: constant sized array initialized with " + - utostr((yyvsp[-1].ConstVector)->size()) + " arguments, but has size of " + + utostr(yyvsp[-1].ConstVector->size()) + " arguments, but has size of " + itostr(NumElements) + ""); // Verify all elements are correct type! std::vector Elems; - for (unsigned i = 0; i < (yyvsp[-1].ConstVector)->size(); i++) { - Constant *C = (*(yyvsp[-1].ConstVector))[i].C; + for (unsigned i = 0; i < yyvsp[-1].ConstVector->size(); i++) { + Constant *C = (*yyvsp[-1].ConstVector)[i].C; const Type* ValTy = C->getType(); if (ETy != ValTy) error("Element #" + utostr(i) + " is not of type '" + @@ -4242,75 +3518,72 @@ yyreduce: 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 146: -#line 1964 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const ArrayType *ATy = dyn_cast((yyvsp[-2].TypeVal).PAT->get()); + 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(yyvsp[-2].TypeVal.PAT->get()); if (ATy == 0) error("Cannot make array constant with type: '" + - (yyvsp[-2].TypeVal).PAT->get()->getDescription() + "'"); + yyvsp[-2].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()); - (yyval.ConstVal).S = (yyvsp[-2].TypeVal).S; - delete (yyvsp[-2].TypeVal).PAT; - ;} - break; - - case 147: -#line 1977 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const ArrayType *ATy = dyn_cast((yyvsp[-2].TypeVal).PAT->get()); + yyval.ConstVal.C = ConstantArray::get(ATy, std::vector()); + 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(yyvsp[-2].TypeVal.PAT->get()); if (ATy == 0) error("Cannot make array constant with type: '" + - (yyvsp[-2].TypeVal).PAT->get()->getDescription() + "'"); + yyvsp[-2].TypeVal.PAT->get()->getDescription() + "'"); int NumElements = ATy->getNumElements(); const Type *ETy = dyn_cast(ATy->getElementType()); if (!ETy || cast(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[0].StrVal, true); + if (NumElements != -1 && NumElements != (EndStr-yyvsp[0].StrVal)) error("Can't build string constant of size " + - itostr((int)(EndStr-(yyvsp[0].StrVal))) + " when array has size " + + itostr((int)(EndStr-yyvsp[0].StrVal)) + " when array has size " + itostr(NumElements) + ""); std::vector Vals; - for (char *C = (char *)(yyvsp[0].StrVal); C != (char *)EndStr; ++C) + for (char *C = (char *)yyvsp[0].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 148: -#line 2000 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { // Nonempty unsized arr - const PackedType *PTy = dyn_cast((yyvsp[-3].TypeVal).PAT->get()); + 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(yyvsp[-3].TypeVal.PAT->get()); if (PTy == 0) error("Cannot make packed constant with type: '" + - (yyvsp[-3].TypeVal).PAT->get()->getDescription() + "'"); + yyvsp[-3].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[-1].ConstVector->size()) error("Type mismatch: constant sized packed initialized with " + - utostr((yyvsp[-1].ConstVector)->size()) + " arguments, but has size of " + + utostr(yyvsp[-1].ConstVector->size()) + " arguments, but has size of " + itostr(NumElements) + ""); // Verify all elements are correct type! std::vector Elems; - for (unsigned i = 0; i < (yyvsp[-1].ConstVector)->size(); i++) { - Constant *C = (*(yyvsp[-1].ConstVector))[i].C; + for (unsigned i = 0; i < yyvsp[-1].ConstVector->size(); i++) { + Constant *C = (*yyvsp[-1].ConstVector)[i].C; const Type* ValTy = C->getType(); if (ETy != ValTy) error("Element #" + utostr(i) + " is not of type '" + @@ -4318,124 +3591,117 @@ yyreduce: 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 149: -#line 2028 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const StructType *STy = dyn_cast((yyvsp[-3].TypeVal).PAT->get()); + 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(yyvsp[-3].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[-3].TypeVal.PAT->get()->getDescription() + "'"); + if (yyvsp[-1].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 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[-1].ConstVector->size(); i != e; ++i) { + Constant *C = (*yyvsp[-1].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 150: -#line 2050 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const StructType *STy = dyn_cast((yyvsp[-2].TypeVal).PAT->get()); + 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(yyvsp[-2].TypeVal.PAT->get()); if (STy == 0) error("Cannot make struct constant with type: '" + - (yyvsp[-2].TypeVal).PAT->get()->getDescription() + "'"); + yyvsp[-2].TypeVal.PAT->get()->getDescription() + "'"); if (STy->getNumContainedTypes() != 0) error("Illegal number of initializers for structure type"); - (yyval.ConstVal).C = ConstantStruct::get(STy, std::vector()); - (yyval.ConstVal).S = (yyvsp[-2].TypeVal).S; - delete (yyvsp[-2].TypeVal).PAT; - ;} - break; - - case 151: -#line 2061 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const StructType *STy = dyn_cast((yyvsp[-5].TypeVal).PAT->get()); + yyval.ConstVal.C = ConstantStruct::get(STy, std::vector()); + 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(yyvsp[-5].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[-5].TypeVal.PAT->get()->getDescription() + "'"); + if (yyvsp[-2].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 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[-2].ConstVector->size(); i != e; ++i) { + Constant *C = (*yyvsp[-2].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 152: -#line 2083 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const StructType *STy = dyn_cast((yyvsp[-4].TypeVal).PAT->get()); + 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(yyvsp[-4].TypeVal.PAT->get()); if (STy == 0) error("Cannot make packed struct constant with type: '" + - (yyvsp[-4].TypeVal).PAT->get()->getDescription() + "'"); + yyvsp[-4].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()); - (yyval.ConstVal).S = (yyvsp[-4].TypeVal).S; - delete (yyvsp[-4].TypeVal).PAT; - ;} - break; - - case 153: -#line 2094 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const PointerType *PTy = dyn_cast((yyvsp[-1].TypeVal).PAT->get()); + yyval.ConstVal.C = ConstantStruct::get(STy, std::vector()); + 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(yyvsp[-1].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 154: -#line 2103 "/proj/llvm/llvm-3/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 155: -#line 2108 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const PointerType *Ty = dyn_cast((yyvsp[-1].TypeVal).PAT->get()); + 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(yyvsp[-1].TypeVal.PAT->get()); if (Ty == 0) error("Global const reference must be a pointer type, not" + - (yyvsp[-1].TypeVal).PAT->get()->getDescription()); + yyvsp[-1].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 @@ -4446,7 +3712,7 @@ yyreduce: // Function *SavedCurFn = CurFun.CurrentFunction; CurFun.CurrentFunction = 0; - Value *V = getExistingValue(Ty, (yyvsp[0].ValIDVal)); + Value *V = getExistingValue(Ty, yyvsp[0].ValIDVal); CurFun.CurrentFunction = SavedCurFn; // If this is an initializer for a constant pointer, which is referencing a @@ -4459,14 +3725,14 @@ yyreduce: // 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[0].ValIDVal)); if (I != CurModule.GlobalRefs.end()) { V = I->second; // Placeholder already exists, use it... - (yyvsp[0].ValIDVal).destroy(); + yyvsp[0].ValIDVal.destroy(); } else { std::string Name; - if ((yyvsp[0].ValIDVal).Type == ValID::NameVal) Name = (yyvsp[0].ValIDVal).Name; + if (yyvsp[0].ValIDVal.Type == ValID::NameVal) Name = yyvsp[0].ValIDVal.Name; // Create the forward referenced global. GlobalValue *GV; @@ -4481,152 +3747,141 @@ yyreduce: } // 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[0].ValIDVal), GV)); V = GV; } } - (yyval.ConstVal).C = cast(V); - (yyval.ConstVal).S = (yyvsp[-1].TypeVal).S; - delete (yyvsp[-1].TypeVal).PAT; // Free the type handle - ;} - break; - - case 156: -#line 2166 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - if ((yyvsp[-1].TypeVal).PAT->get() != (yyvsp[0].ConstVal).C->getType()) + yyval.ConstVal.C = cast(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()) 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 157: -#line 2173 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const Type *Ty = (yyvsp[-1].TypeVal).PAT->get(); + 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(); if (isa(Ty) || Ty == Type::LabelTy || isa(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 158: -#line 2181 "/proj/llvm/llvm-3/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].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)) error("Constant value doesn't fit in type"); - (yyval.ConstVal).C = ConstantInt::get(Ty, (yyvsp[0].SInt64Val)); - (yyval.ConstVal).S = Signed; - ;} - break; - - case 159: -#line 2188 "/proj/llvm/llvm-3/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[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)) error("Constant value doesn't fit in type"); - (yyval.ConstVal).C = ConstantInt::get(Ty, (yyvsp[0].UInt64Val)); - (yyval.ConstVal).S = Unsigned; - ;} - break; - - case 160: -#line 2195 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { // Boolean constants - (yyval.ConstVal).C = ConstantInt::get(Type::Int1Ty, true); - (yyval.ConstVal).S = Unsigned; - ;} - break; - - case 161: -#line 2199 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { // Boolean constants - (yyval.ConstVal).C = ConstantInt::get(Type::Int1Ty, false); - (yyval.ConstVal).S = Unsigned; - ;} - break; - - case 162: -#line 2203 "/proj/llvm/llvm-3/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[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)) 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 163: -#line 2212 "/proj/llvm/llvm-3/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].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; 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(getCast((yyvsp[-5].CastOpVal), (yyvsp[-3].ConstVal).C, SrcSign, DstTy, DstSign)); - (yyval.ConstVal).S = DstSign; - delete (yyvsp[-1].TypeVal).PAT; - ;} - break; - - case 164: -#line 2227 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const Type *Ty = (yyvsp[-2].ConstVal).C->getType(); + yyval.ConstVal.C = cast(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(); if (!isa(Ty)) error("GetElementPtr requires a pointer operand"); std::vector VIndices; std::vector CIndices; - upgradeGEPIndices((yyvsp[-2].ConstVal).C->getType(), (yyvsp[-1].ValueList), VIndices, &CIndices); + upgradeGEPIndices(yyvsp[-2].ConstVal.C->getType(), yyvsp[-1].ValueList, VIndices, &CIndices); - delete (yyvsp[-1].ValueList); - (yyval.ConstVal).C = ConstantExpr::getGetElementPtr((yyvsp[-2].ConstVal).C, CIndices); - (yyval.ConstVal).S = Signless; - ;} - break; - - case 165: -#line 2240 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - if (!(yyvsp[-5].ConstVal).C->getType()->isInteger() || - cast((yyvsp[-5].ConstVal).C->getType())->getBitWidth() != 1) + 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(yyvsp[-5].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[-3].ConstVal.C->getType() != yyvsp[-1].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 166: -#line 2249 "/proj/llvm/llvm-3/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[-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()) 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[-5].BinaryOpVal, Ty, yyvsp[-3].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(Ty)) { - (yyval.ConstVal).C = ConstantExpr::get(Opcode, (yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C); + yyval.ConstVal.C = ConstantExpr::get(Opcode, yyvsp[-3].ConstVal.C, yyvsp[-1].ConstVal.C); } else { const Type *IntPtrTy = 0; switch (CurModule.CurrentModule->getPointerSize()) { @@ -4634,165 +3889,147 @@ yyreduce: 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.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 167: -#line 2277 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const Type* Ty = (yyvsp[-3].ConstVal).C->getType(); - if (Ty != (yyvsp[-1].ConstVal).C->getType()) + 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()) error("Logical operator types must match"); if (!Ty->isInteger()) { if (!isa(Ty) || !cast(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 168: -#line 2290 "/proj/llvm/llvm-3/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[-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()) 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 169: -#line 2299 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - if ((yyvsp[-3].ConstVal).C->getType() != (yyvsp[-1].ConstVal).C->getType()) + 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()) 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 170: -#line 2305 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - if ((yyvsp[-3].ConstVal).C->getType() != (yyvsp[-1].ConstVal).C->getType()) + 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()) 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 171: -#line 2311 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - if (!(yyvsp[-1].ConstVal).C->getType()->isInteger() || - cast((yyvsp[-1].ConstVal).C->getType())->getBitWidth() != 8) + 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(yyvsp[-1].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].ConstVal.C->getType(); + if (!yyvsp[-3].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 172: -#line 2322 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - if (!ExtractElementInst::isValidOperands((yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C)) + 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)) 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 173: -#line 2328 "/proj/llvm/llvm-3/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].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)) 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 174: -#line 2334 "/proj/llvm/llvm-3/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[-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)) 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 175: -#line 2345 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { ((yyval.ConstVector) = (yyvsp[-2].ConstVector))->push_back((yyvsp[0].ConstVal)); ;} - break; - - case 176: -#line 2346 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.ConstVector) = new std::vector(); - (yyval.ConstVector)->push_back((yyvsp[0].ConstVal)); - ;} - break; - - case 177: -#line 2355 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.BoolVal) = false; ;} - break; - - case 178: -#line 2356 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.BoolVal) = true; ;} - break; - - case 179: -#line 2368 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.ModuleVal) = ParserResult = (yyvsp[0].ModuleVal); + 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(); + 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; CurModule.ModuleDone(); - ;} - break; - - case 180: -#line 2377 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); CurFun.FunctionDone(); ;} - break; - - case 181: -#line 2378 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); ;} - break; - - case 182: -#line 2379 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.ModuleVal) = (yyvsp[-3].ModuleVal); ;} - break; - - case 183: -#line 2380 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); ;} - break; - - case 184: -#line 2381 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.ModuleVal) = CurModule.CurrentModule; + ; + 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; // Emit an error if there are any unresolved types left. if (!CurModule.LateResolveTypes.empty()) { const ValID &DID = CurModule.LateResolveTypes.begin()->first; @@ -4802,12 +4039,11 @@ yyreduce: error("Reference to an undefined type: #" + itostr(DID.Num)); } } - ;} - break; - - case 185: -#line 2397 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { + ; + break;} +case 184: +#line 2398 "/Users/sabre/cvs/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: // @@ -4817,266 +4053,234 @@ yyreduce: // 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[0].TypeVal.PAT->get(); + ResolveTypeTo(yyvsp[-2].StrVal, Ty); - if (!setTypeName(Ty, (yyvsp[-2].StrVal)) && !(yyvsp[-2].StrVal)) { + if (!setTypeName(Ty, yyvsp[-2].StrVal) && !yyvsp[-2].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 186: -#line 2417 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { // Function prototypes can be in const pool - ;} - break; - - case 187: -#line 2419 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { // Asm blocks can be in the const pool - ;} - break; - - case 188: -#line 2421 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - if ((yyvsp[0].ConstVal).C == 0) + 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) 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 189: -#line 2425 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { + 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 = 0; - ;} - break; - - case 190: -#line 2428 "/proj/llvm/llvm-3/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 191: -#line 2432 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { + ; + 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" +{ CurGV = 0; - ;} - break; - - case 192: -#line 2435 "/proj/llvm/llvm-3/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 193: -#line 2439 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { + ; + 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" +{ CurGV = 0; - ;} - break; - - case 194: -#line 2442 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const Type *Ty = (yyvsp[0].TypeVal).PAT->get(); + ; + break;} +case 193: +#line 2443 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y" +{ + const Type *Ty = yyvsp[0].TypeVal.PAT->get(); CurGV = - ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::ExternalWeakLinkage, (yyvsp[-1].BoolVal), Ty, 0); - delete (yyvsp[0].TypeVal).PAT; - ;} - break; - - case 195: -#line 2447 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { + 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" +{ CurGV = 0; - ;} - break; - - case 196: -#line 2450 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - ;} - break; - - case 197: -#line 2452 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - ;} - break; - - case 198: -#line 2454 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - ;} - break; - - case 199: -#line 2459 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { + ; + 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" +{ 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[0].StrVal, true); + std::string NewAsm(yyvsp[0].StrVal, EndStr); + free(yyvsp[0].StrVal); if (AsmSoFar.empty()) CurModule.CurrentModule->setModuleInlineAsm(NewAsm); else CurModule.CurrentModule->setModuleInlineAsm(AsmSoFar+"\n"+NewAsm); - ;} - break; - - case 200: -#line 2473 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.Endianness) = Module::BigEndian; ;} - break; - - case 201: -#line 2474 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.Endianness) = Module::LittleEndian; ;} - break; - - case 202: -#line 2478 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - CurModule.setEndianness((yyvsp[0].Endianness)); - ;} - break; - - case 203: -#line 2481 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - if ((yyvsp[0].UInt64Val) == 32) + ; + 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) CurModule.setPointerSize(Module::Pointer32); - else if ((yyvsp[0].UInt64Val) == 64) + else if (yyvsp[0].UInt64Val == 64) CurModule.setPointerSize(Module::Pointer64); else - error("Invalid pointer size: '" + utostr((yyvsp[0].UInt64Val)) + "'"); - ;} - break; - - case 204: -#line 2489 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - CurModule.CurrentModule->setTargetTriple((yyvsp[0].StrVal)); - free((yyvsp[0].StrVal)); - ;} - break; - - case 205: -#line 2493 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - CurModule.CurrentModule->setDataLayout((yyvsp[0].StrVal)); - free((yyvsp[0].StrVal)); - ;} - break; - - case 207: -#line 2504 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); - free((yyvsp[0].StrVal)); - ;} - break; - - case 208: -#line 2508 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); - free((yyvsp[0].StrVal)); - ;} - break; - - case 209: -#line 2512 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { ;} - break; - - case 213: -#line 2525 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.StrVal) = 0; ;} - break; - - case 214: -#line 2529 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - if ((yyvsp[-1].TypeVal).PAT->get() == Type::VoidTy) + 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("void typed arguments are invalid"); - (yyval.ArgVal) = new std::pair((yyvsp[-1].TypeVal), (yyvsp[0].StrVal)); - ;} - break; - - case 215: -#line 2537 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.ArgList) = (yyvsp[-2].ArgList); - (yyval.ArgList)->push_back(*(yyvsp[0].ArgVal)); - delete (yyvsp[0].ArgVal); - ;} - break; - - case 216: -#line 2542 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.ArgList) = new std::vector >(); - (yyval.ArgList)->push_back(*(yyvsp[0].ArgVal)); - delete (yyvsp[0].ArgVal); - ;} - break; - - case 217: -#line 2550 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.ArgList) = (yyvsp[0].ArgList); ;} - break; - - case 218: -#line 2551 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.ArgList) = (yyvsp[-2].ArgList); + yyval.ArgVal = new std::pair(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 >(); + 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; PATypeInfo VoidTI; VoidTI.PAT = new PATypeHolder(Type::VoidTy); VoidTI.S = Signless; - (yyval.ArgList)->push_back(std::pair(VoidTI, 0)); - ;} - break; - - case 219: -#line 2558 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.ArgList) = new std::vector >(); + yyval.ArgList->push_back(std::pair(VoidTI, 0)); + ; + break;} +case 218: +#line 2559 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y" +{ + yyval.ArgList = new std::vector >(); PATypeInfo VoidTI; VoidTI.PAT = new PATypeHolder(Type::VoidTy); VoidTI.S = Signless; - (yyval.ArgList)->push_back(std::pair(VoidTI, 0)); - ;} - break; + yyval.ArgList->push_back(std::pair(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! - case 220: -#line 2565 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.ArgList) = 0; ;} - break; - - case 221: -#line 2569 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - UnEscapeLexed((yyvsp[-5].StrVal)); - std::string FunctionName((yyvsp[-5].StrVal)); - free((yyvsp[-5].StrVal)); // Free strdup'd memory! - - const Type* RetTy = (yyvsp[-6].TypeVal).PAT->get(); + const Type* RetTy = yyvsp[-6].TypeVal.PAT->get(); if (!RetTy->isFirstClassType() && RetTy != Type::VoidTy) error("LLVM functions cannot return aggregate types"); @@ -5091,9 +4295,9 @@ yyreduce: } 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[-3].ArgList) { // If there are arguments... for (std::vector >::iterator - I = (yyvsp[-3].ArgList)->begin(), E = (yyvsp[-3].ArgList)->end(); I != E; ++I) { + I = yyvsp[-3].ArgList->begin(), E = yyvsp[-3].ArgList->end(); I != E; ++I) { const Type *Ty = I->first.PAT->get(); ParamTyList.push_back(Ty); } @@ -5106,7 +4310,7 @@ yyreduce: // Convert the CSRet calling convention into the corresponding parameter // attribute. FunctionType::ParamAttrsList ParamAttrs; - if ((yyvsp[-7].UIntVal) == OldCallingConv::CSRet) { + if (yyvsp[-7].UIntVal == OldCallingConv::CSRet) { ParamAttrs.push_back(FunctionType::NoAttributeSet); // result ParamAttrs.push_back(FunctionType::StructRetAttribute); // first arg } @@ -5114,7 +4318,7 @@ yyreduce: const FunctionType *FT = FunctionType::get(RetTy, ParamTyList, isVarArg, ParamAttrs); const PointerType *PFT = PointerType::get(FT); - delete (yyvsp[-6].TypeVal).PAT; + delete yyvsp[-6].TypeVal.PAT; ValID ID; if (!FunctionName.empty()) { @@ -5217,150 +4421,131 @@ yyreduce: // 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[-7].UIntVal)); + Fn->setAlignment(yyvsp[0].UIntVal); + if (yyvsp[-1].StrVal) { + Fn->setSection(yyvsp[-1].StrVal); + free(yyvsp[-1].StrVal); } // Add all of the arguments we parsed to the function... - if ((yyvsp[-3].ArgList)) { // Is null if empty... + if (yyvsp[-3].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[-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 } Function::arg_iterator ArgIt = Fn->arg_begin(); Function::arg_iterator ArgEnd = Fn->arg_end(); - std::vector >::iterator I = (yyvsp[-3].ArgList)->begin(); - std::vector >::iterator E = (yyvsp[-3].ArgList)->end(); + std::vector >::iterator I = yyvsp[-3].ArgList->begin(); + std::vector >::iterator E = yyvsp[-3].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[-3].ArgList; // We're now done with the argument list } - ;} - break; - - case 224: -#line 2749 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.FunctionVal) = CurFun.CurrentFunction; + ; + break;} +case 223: +#line 2750 "/Users/sabre/cvs/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 227: -#line 2763 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); - ;} - break; - - case 228: -#line 2768 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} - break; - - case 229: -#line 2769 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} - break; - - case 230: -#line 2770 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} - break; - - case 231: -#line 2774 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { CurFun.isDeclare = true; ;} - break; - - case 232: -#line 2775 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { CurFun.Linkage = (yyvsp[0].Linkage); ;} - break; - - case 233: -#line 2775 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.FunctionVal) = CurFun.CurrentFunction; + 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; CurFun.FunctionDone(); - ;} - break; - - case 234: -#line 2787 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.BoolVal) = false; ;} - break; - - case 235: -#line 2788 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.BoolVal) = true; ;} - break; - - case 236: -#line 2793 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.ValIDVal) = ValID::create((yyvsp[0].SInt64Val)); ;} - break; - - case 237: -#line 2794 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.ValIDVal) = ValID::create((yyvsp[0].UInt64Val)); ;} - break; - - case 238: -#line 2795 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.ValIDVal) = ValID::create((yyvsp[0].FPVal)); ;} - break; - - case 239: -#line 2796 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.ValIDVal) = ValID::create(ConstantInt::get(Type::Int1Ty, true)); ;} - break; - - case 240: -#line 2797 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.ValIDVal) = ValID::create(ConstantInt::get(Type::Int1Ty, false)); ;} - break; - - case 241: -#line 2798 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.ValIDVal) = ValID::createNull(); ;} - break; - - case 242: -#line 2799 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.ValIDVal) = ValID::createUndef(); ;} - break; - - case 243: -#line 2800 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.ValIDVal) = ValID::createZeroInit(); ;} - break; - - case 244: -#line 2801 "/proj/llvm/llvm-3/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 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(); PackedType* pt = PackedType::get(ETy, NumElements); PATypeHolder* PTy = new PATypeHolder( HandleUpRefs(PackedType::get(ETy, NumElements))); // Verify all elements are correct type! std::vector Elems; - for (unsigned i = 0; i < (yyvsp[-1].ConstVector)->size(); i++) { - Constant *C = (*(yyvsp[-1].ConstVector))[i].C; + for (unsigned i = 0; i < yyvsp[-1].ConstVector->size(); i++) { + Constant *C = (*yyvsp[-1].ConstVector)[i].C; const Type *CTy = C->getType(); if (ETy != CTy) error("Element #" + utostr(i) + " is not of type '" + @@ -5368,211 +4553,193 @@ yyreduce: CTy->getDescription() + "'"); Elems.push_back(C); } - (yyval.ValIDVal) = ValID::create(ConstantPacked::get(pt, Elems)); - delete PTy; delete (yyvsp[-1].ConstVector); - ;} - break; - - case 245: -#line 2822 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.ValIDVal) = ValID::create((yyvsp[0].ConstVal).C); - ;} - break; - - case 246: -#line 2825 "/proj/llvm/llvm-3/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 247: -#line 2840 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.ValIDVal) = ValID::create((yyvsp[0].SIntVal)); ;} - break; - - case 248: -#line 2841 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.ValIDVal) = ValID::create((yyvsp[0].StrVal)); ;} - break; - - case 251: -#line 2854 "/proj/llvm/llvm-3/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 252: -#line 2863 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); - ;} - break; - - case 253: -#line 2866 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { // Do not allow functions with 0 basic blocks - (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); - ;} - break; - - case 254: -#line 2875 "/proj/llvm/llvm-3/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 255: -#line 2885 "/proj/llvm/llvm-3/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 256: -#line 2890 "/proj/llvm/llvm-3/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[-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); // 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 257: -#line 2899 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((yyvsp[0].StrVal)), true); + 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); // 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 260: -#line 2913 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { // Return with a result... - (yyval.TermInstVal) = new ReturnInst((yyvsp[0].ValueVal).V); - ;} - break; - - case 261: -#line 2916 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { // Return with no result... - (yyval.TermInstVal) = new ReturnInst(); - ;} - break; - - case 262: -#line 2919 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { // Unconditional Branch... - BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal)); - (yyval.TermInstVal) = new BranchInst(tmpBB); - ;} - break; - - case 263: -#line 2923 "/proj/llvm/llvm-3/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 264: -#line 2929 "/proj/llvm/llvm-3/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 >::iterator I = (yyvsp[-1].JumpTable)->begin(), - E = (yyvsp[-1].JumpTable)->end(); + 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 >::iterator I = yyvsp[-1].JumpTable->begin(), + E = yyvsp[-1].JumpTable->end(); for (; I != E; ++I) { if (ConstantInt *CI = dyn_cast(I->first)) S->addCase(CI, I->second); else error("Switch case is constant, but not a simple integer"); } - delete (yyvsp[-1].JumpTable); - ;} - break; - - case 265: -#line 2944 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - Value* tmpVal = getVal((yyvsp[-6].PrimType).T, (yyvsp[-5].ValIDVal)); - BasicBlock* tmpBB = getBBVal((yyvsp[-2].ValIDVal)); + 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); SwitchInst *S = new SwitchInst(tmpVal, tmpBB, 0); - (yyval.TermInstVal) = S; - ;} - break; - - case 266: -#line 2951 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { + yyval.TermInstVal = S; + ; + break;} +case 265: +#line 2952 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y" +{ const PointerType *PFTy; const FunctionType *Ty; - if (!(PFTy = dyn_cast((yyvsp[-10].TypeVal).PAT->get())) || + if (!(PFTy = dyn_cast(yyvsp[-10].TypeVal.PAT->get())) || !(Ty = dyn_cast(PFTy->getElementType()))) { // Pull out the types of all of the arguments... std::vector ParamTypes; - if ((yyvsp[-7].ValueList)) { - for (std::vector::iterator I = (yyvsp[-7].ValueList)->begin(), E = (yyvsp[-7].ValueList)->end(); + if (yyvsp[-7].ValueList) { + for (std::vector::iterator I = yyvsp[-7].ValueList->begin(), E = yyvsp[-7].ValueList->end(); I != E; ++I) ParamTypes.push_back((*I).V->getType()); } FunctionType::ParamAttrsList ParamAttrs; - if ((yyvsp[-11].UIntVal) == OldCallingConv::CSRet) { + if (yyvsp[-11].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[-10].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[-9].ValIDVal); // Get the function we're calling... + BasicBlock *Normal = getBBVal(yyvsp[-3].ValIDVal); + BasicBlock *Except = getBBVal(yyvsp[0].ValIDVal); // Create the call node... - if (!(yyvsp[-7].ValueList)) { // Has no arguments? - (yyval.TermInstVal) = new InvokeInst(V, Normal, Except, std::vector()); + if (!yyvsp[-7].ValueList) { // Has no arguments? + yyval.TermInstVal = new InvokeInst(V, Normal, Except, std::vector()); } 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::iterator ArgI = (yyvsp[-7].ValueList)->begin(), ArgE = (yyvsp[-7].ValueList)->end(); + std::vector::iterator ArgI = yyvsp[-7].ValueList->begin(), ArgE = yyvsp[-7].ValueList->end(); std::vector Args; for (; ArgI != ArgE && I != E; ++ArgI, ++I) { @@ -5585,64 +4752,59 @@ yyreduce: 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((yyval.TermInstVal))->setCallingConv(upgradeCallingConv((yyvsp[-11].UIntVal))); - delete (yyvsp[-10].TypeVal).PAT; - delete (yyvsp[-7].ValueList); - ;} - break; - - case 267: -#line 3006 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.TermInstVal) = new UnwindInst(); - ;} - break; - - case 268: -#line 3009 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.TermInstVal) = new UnreachableInst(); - ;} - break; - - case 269: -#line 3015 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.JumpTable) = (yyvsp[-5].JumpTable); - Constant *V = cast(getExistingValue((yyvsp[-4].PrimType).T, (yyvsp[-3].ValIDVal))); + cast(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(getExistingValue(yyvsp[-4].PrimType.T, yyvsp[-3].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 3025 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.JumpTable) = new std::vector >(); - Constant *V = cast(getExistingValue((yyvsp[-4].PrimType).T, (yyvsp[-3].ValIDVal))); + 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 >(); + Constant *V = cast(getExistingValue(yyvsp[-4].PrimType.T, yyvsp[-3].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 271: -#line 3038 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { + 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" +{ bool omit = false; - if ((yyvsp[-1].StrVal)) - if (BitCastInst *BCI = dyn_cast((yyvsp[0].InstVal).I)) + if (yyvsp[-1].StrVal) + if (BitCastInst *BCI = dyn_cast(yyvsp[0].InstVal.I)) if (BCI->getSrcTy() == BCI->getDestTy() && - BCI->getOperand(0)->getName() == (yyvsp[-1].StrVal)) + BCI->getOperand(0)->getName() == yyvsp[-1].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 @@ -5657,243 +4819,225 @@ yyreduce: // 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); + setValueName(yyvsp[0].InstVal.I, yyvsp[-1].StrVal); + InsertValue(yyvsp[0].InstVal.I); + yyval.InstVal = yyvsp[0].InstVal; } - ;} - break; - - case 272: -#line 3067 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { // Used for PHI nodes - (yyval.PHIList).P = new std::list >(); - (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 273: -#line 3075 "/proj/llvm/llvm-3/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 274: -#line 3083 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { // Used for call statements, and memory insts... - (yyval.ValueList) = new std::vector(); - (yyval.ValueList)->push_back((yyvsp[0].ValueVal)); - ;} - break; - - case 275: -#line 3087 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.ValueList) = (yyvsp[-2].ValueList); - (yyvsp[-2].ValueList)->push_back((yyvsp[0].ValueVal)); - ;} - break; - - case 277: -#line 3095 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.ValueList) = 0; ;} - break; - - case 278: -#line 3099 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.BoolVal) = true; - ;} - break; - - case 279: -#line 3102 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.BoolVal) = false; - ;} - break; - - case 280: -#line 3108 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const Type* Ty = (yyvsp[-3].TypeVal).PAT->get(); + ; + break;} +case 271: +#line 3068 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y" +{ // Used for PHI nodes + yyval.PHIList.P = new std::list >(); + 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(); + 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(); if (!Ty->isInteger() && !Ty->isFloatingPoint() && !isa(Ty)) error("Arithmetic operator requires integer, FP, or packed operands"); if (isa(Ty) && - ((yyvsp[-4].BinaryOpVal) == URemOp || (yyvsp[-4].BinaryOpVal) == SRemOp || (yyvsp[-4].BinaryOpVal) == FRemOp || (yyvsp[-4].BinaryOpVal) == RemOp)) + (yyvsp[-4].BinaryOpVal == URemOp || yyvsp[-4].BinaryOpVal == SRemOp || yyvsp[-4].BinaryOpVal == FRemOp || yyvsp[-4].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[-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) error("binary operator returned null"); - (yyval.InstVal).S = (yyvsp[-3].TypeVal).S; - delete (yyvsp[-3].TypeVal).PAT; - ;} - break; - - case 281: -#line 3125 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const Type *Ty = (yyvsp[-3].TypeVal).PAT->get(); + 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(); if (!Ty->isInteger()) { if (!isa(Ty) || !cast(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[-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) error("binary operator returned null"); - (yyval.InstVal).S = (yyvsp[-3].TypeVal).S; - delete (yyvsp[-3].TypeVal).PAT; - ;} - break; - - case 282: -#line 3141 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const Type* Ty = (yyvsp[-3].TypeVal).PAT->get(); + 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(); if(isa(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[-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) error("binary operator returned null"); - (yyval.InstVal).S = Unsigned; - delete (yyvsp[-3].TypeVal).PAT; - ;} - break; - - case 283: -#line 3155 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const Type *Ty = (yyvsp[-3].TypeVal).PAT->get(); + 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(); if (isa(Ty)) error("PackedTypes currently not supported in icmp instructions"); else if (!Ty->isInteger() && !isa(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 284: -#line 3167 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const Type *Ty = (yyvsp[-3].TypeVal).PAT->get(); + 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(); if (isa(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 285: -#line 3179 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { + 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" +{ warning("Use of obsolete 'not' instruction: Replacing with 'xor"); - const Type *Ty = (yyvsp[0].ValueVal).V->getType(); + const Type *Ty = yyvsp[0].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[0].ValueVal.V, Ones); + if (yyval.InstVal.I == 0) error("Could not create a xor instruction"); - (yyval.InstVal).S = (yyvsp[0].ValueVal).S - ;} - break; - - case 286: -#line 3190 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - if (!(yyvsp[0].ValueVal).V->getType()->isInteger() || - cast((yyvsp[0].ValueVal).V->getType())->getBitWidth() != 8) + 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(yyvsp[0].ValueVal.V->getType())->getBitWidth() != 8) error("Shift amount must be int8"); - const Type* Ty = (yyvsp[-2].ValueVal).V->getType(); + const Type* Ty = yyvsp[-2].ValueVal.V->getType(); if (!Ty->isInteger()) error("Shift constant expression requires integer operand"); Value* ShiftAmt = 0; if (cast(Ty)->getBitWidth() > Type::Int8Ty->getBitWidth()) - if (Constant *C = dyn_cast((yyvsp[0].ValueVal).V)) + if (Constant *C = dyn_cast(yyvsp[0].ValueVal.V)) ShiftAmt = ConstantExpr::getZExt(C, Ty); else - ShiftAmt = new ZExtInst((yyvsp[0].ValueVal).V, Ty, makeNameUnique("shift"), CurBB); + ShiftAmt = new ZExtInst(yyvsp[0].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 287: -#line 3208 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const Type *DstTy = (yyvsp[0].TypeVal).PAT->get(); + 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(); if (!DstTy->isFirstClassType()) error("cast instruction to a non-primitive type: '" + DstTy->getDescription() + "'"); - (yyval.InstVal).I = cast(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 288: -#line 3217 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - if (!(yyvsp[-4].ValueVal).V->getType()->isInteger() || - cast((yyvsp[-4].ValueVal).V->getType())->getBitWidth() != 1) + yyval.InstVal.I = cast(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(yyvsp[-4].ValueVal.V->getType())->getBitWidth() != 1) error("select condition must be bool"); - if ((yyvsp[-2].ValueVal).V->getType() != (yyvsp[0].ValueVal).V->getType()) + if (yyvsp[-2].ValueVal.V->getType() != yyvsp[0].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 289: -#line 3226 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const Type *Ty = (yyvsp[0].TypeVal).PAT->get(); + 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(); 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 290: -#line 3233 "/proj/llvm/llvm-3/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].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(); ObsoleteVarArgs = true; Function* NF = cast(CurModule.CurrentModule-> getOrInsertFunction("llvm.va_copy", ArgTy, ArgTy, (Type *)0)); @@ -5905,20 +5049,19 @@ yyreduce: //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].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 291: -#line 3254 "/proj/llvm/llvm-3/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[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(); ObsoleteVarArgs = true; Function* NF = cast(CurModule.CurrentModule-> getOrInsertFunction("llvm.va_copy", ArgTy, ArgTy, (Type *)0)); @@ -5931,93 +5074,88 @@ yyreduce: //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].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 292: -#line 3278 "/proj/llvm/llvm-3/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[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)) 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 293: -#line 3284 "/proj/llvm/llvm-3/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].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)) 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 294: -#line 3290 "/proj/llvm/llvm-3/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[-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)) 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 295: -#line 3296 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const Type *Ty = (yyvsp[0].PHIList).P->front().first->getType(); + 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(); 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[0].PHIList.P->size()); + while (yyvsp[0].PHIList.P->begin() != yyvsp[0].PHIList.P->end()) { + if (yyvsp[0].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[0].PHIList.P->front().first, yyvsp[0].PHIList.P->front().second); + yyvsp[0].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 296: -#line 3312 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { + 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" +{ // Handle the short call syntax const PointerType *PFTy; const FunctionType *FTy; - if (!(PFTy = dyn_cast((yyvsp[-4].TypeVal).PAT->get())) || + if (!(PFTy = dyn_cast(yyvsp[-4].TypeVal.PAT->get())) || !(FTy = dyn_cast(PFTy->getElementType()))) { // Pull out the types of all of the arguments... std::vector ParamTypes; - if ((yyvsp[-1].ValueList)) { - for (std::vector::iterator I = (yyvsp[-1].ValueList)->begin(), E = (yyvsp[-1].ValueList)->end(); + if (yyvsp[-1].ValueList) { + for (std::vector::iterator I = yyvsp[-1].ValueList->begin(), E = yyvsp[-1].ValueList->end(); I != E; ++I) ParamTypes.push_back((*I).V->getType()); } FunctionType::ParamAttrsList ParamAttrs; - if ((yyvsp[-5].UIntVal) == OldCallingConv::CSRet) { + if (yyvsp[-5].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[-4].TypeVal.PAT->get(); if (!RetTy->isFirstClassType() && RetTy != Type::VoidTy) error("Functions cannot return aggregate types"); @@ -6027,21 +5165,21 @@ yyreduce: // First upgrade any intrinsic calls. std::vector 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[-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 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[-3].ValIDVal); // Check the argument values match - if (!(yyvsp[-1].ValueList)) { // Has no arguments? + if (!yyvsp[-1].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"); @@ -6051,7 +5189,7 @@ yyreduce: // FunctionType::param_iterator I = FTy->param_begin(); FunctionType::param_iterator E = FTy->param_end(); - std::vector::iterator ArgI = (yyvsp[-1].ValueList)->begin(), ArgE = (yyvsp[-1].ValueList)->end(); + std::vector::iterator ArgI = yyvsp[-1].ValueList->begin(), ArgE = yyvsp[-1].ValueList->end(); for (; ArgI != ArgE && I != E; ++ArgI, ++I) if ((*ArgI).V->getType() != *I) @@ -6064,124 +5202,112 @@ yyreduce: // 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; + 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 297: -#line 3390 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - (yyval.InstVal) = (yyvsp[0].InstVal); - ;} - break; - - case 298: -#line 3398 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.ValueList) = (yyvsp[0].ValueList); ;} - break; - - case 299: -#line 3399 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.ValueList) = new std::vector(); ;} - break; - - case 300: -#line 3403 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.BoolVal) = true; ;} - break; - - case 301: -#line 3404 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { (yyval.BoolVal) = false; ;} - break; - - case 302: -#line 3408 "/proj/llvm/llvm-3/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 303: -#line 3414 "/proj/llvm/llvm-3/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 304: -#line 3420 "/proj/llvm/llvm-3/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 305: -#line 3426 "/proj/llvm/llvm-3/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 306: -#line 3432 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const Type *PTy = (yyvsp[0].ValueVal).V->getType(); + 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(); ; + 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(); if (!isa(PTy)) error("Trying to free nonpointer type '" + PTy->getDescription() + "'"); - (yyval.InstVal).I = new FreeInst((yyvsp[0].ValueVal).V); - (yyval.InstVal).S = Signless; - ;} - break; - - case 307: -#line 3439 "/proj/llvm/llvm-3/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[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; if (!isa(Ty)) error("Can't load from nonpointer type: " + Ty->getDescription()); if (!cast(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 308: -#line 3451 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const PointerType *PTy = dyn_cast((yyvsp[-1].TypeVal).PAT->get()); + 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(yyvsp[-1].TypeVal.PAT->get()); if (!PTy) error("Can't store to a nonpointer type: " + - (yyvsp[-1].TypeVal).PAT->get()->getDescription()); + yyvsp[-1].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].ValueVal.V; + Value* tmpVal = getVal(PTy, yyvsp[0].ValIDVal); + if (ElTy != yyvsp[-3].ValueVal.V->getType()) { + StoreVal = handleSRetFuncTypeMerge(yyvsp[-3].ValueVal.V, ElTy); if (!StoreVal) - error("Can't store '" + (yyvsp[-3].ValueVal).V->getType()->getDescription() + + error("Can't store '" + yyvsp[-3].ValueVal.V->getType()->getDescription() + "' into space of type '" + ElTy->getDescription() + "'"); else { PTy = PointerType::get(StoreVal->getType()); @@ -6191,304 +5317,251 @@ yyreduce: 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 309: -#line 3476 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" - { - const Type* Ty = (yyvsp[-2].TypeVal).PAT->get(); + 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(); if (!isa(Ty)) error("getelementptr insn requires pointer operand"); std::vector VIndices; - upgradeGEPIndices(Ty, (yyvsp[0].ValueList), VIndices); + upgradeGEPIndices(Ty, yyvsp[0].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; - - - default: break; - } - -/* Line 1126 of yacc.c. */ -#line 6224 "UpgradeParser.tab.c" + 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 - - YY_STACK_PRINT (yyss, yyssp); +#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 *++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 - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yypgoto[yyn - YYNTBASE] + *yyssp; + if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else - yystate = yydefgoto[yyn - YYNTOKENS]; + yystate = yydefgoto[yyn - YYNTBASE]; goto yynewstate; +yyerrlab: /* here on detecting error */ -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) + if (! yyerrstatus) + /* If not already recovering from an error, report this error. */ { ++yynerrs; -#if YYERROR_VERBOSE + +#ifdef YYERROR_VERBOSE yyn = yypact[yystate]; - if (YYPACT_NINF < yyn && yyn < YYLAST) + if (yyn > YYFLAG && yyn < YYLAST) { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - char *yymsg = 0; -# define YYERROR_VERBOSE_ARGS_MAXIMUM 5 - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; + int size = 0; + char *msg; + int x, count; -#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; - 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; - - if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM) - yymsg = (char *) YYSTACK_ALLOC (yysize); - if (yymsg) + 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) { - /* 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 = yymsg; - int yyi = 0; - while ((*yyp = *yyf)) + strcpy(msg, "parse error"); + + if (count < 5) { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } + 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 (yymsg); - YYSTACK_FREE (yymsg); + yyerror(msg); + free(msg); } else - { - yyerror (YY_("syntax error")); - goto yyexhaustedlab; - } + yyerror ("parse error; also virtual memory exceeded"); } else #endif /* YYERROR_VERBOSE */ - yyerror (YY_("syntax error")); + yyerror("parse error"); } - + goto yyerrlab1; +yyerrlab1: /* here on error raised explicitly by an action */ if (yyerrstatus == 3) { - /* If just tried and failed to reuse look-ahead token after an - error, discard it. */ + /* if just tried and failed to reuse lookahead token after an error, discard it. */ - 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 look-ahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| 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 (0) - goto yyerrorlab; - -yyvsp -= yylen; - yyssp -= yylen; - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) + /* return failure if at end of input */ + if (yychar == YYEOF) YYABORT; +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); +#endif - yydestruct ("Error: popping", yystos[yystate], yyvsp); - YYPOPSTACK; - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); + yychar = YYEMPTY; } + /* Else will try to reuse lookahead token + after shifting the error token. */ + + yyerrstatus = 3; /* Each real token shifted decrements this */ + + goto yyerrhandle; + +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 + +yyerrpop: /* pop the current state because it cannot handle the error token */ + + if (yyssp == yyss) YYABORT; + yyvsp--; + yystate = *--yyssp; +#ifdef YYLSP_NEEDED + yylsp--; +#endif + +#if YYDEBUG != 0 + if (yydebug) + { + 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 == YYFLAG) + goto yyerrdefault; + + 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; + } + else if (yyn == 0) + goto yyerrpop; + if (yyn == YYFINAL) YYACCEPT; +#if YYDEBUG != 0 + if (yydebug) + fprintf(stderr, "Shifting error token, "); +#endif + *++yyvsp = yylval; - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); +#ifdef YYLSP_NEEDED + *++yylsp = yylloc; +#endif yystate = yyn; goto yynewstate; - -/*-------------------------------------. -| 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); - while (yyssp != yyss) + yyacceptlab: + /* YYACCEPT comes here. */ + if (yyfree_stacks) { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); - YYPOPSTACK; - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); + free (yyss); + free (yyvs); +#ifdef YYLSP_NEEDED + free (yyls); #endif - return yyresult; + } + return 0; + + yyabortlab: + /* YYABORT comes here. */ + if (yyfree_stacks) + { + free (yyss); + free (yyvs); +#ifdef YYLSP_NEEDED + free (yyls); +#endif + } + return 1; } - - -#line 3492 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" +#line 3493 "/Users/sabre/cvs/llvm/tools/llvm-upgrade/UpgradeParser.y" int yyerror(const char *ErrorMsg) { @@ -6521,4 +5594,3 @@ void error(const std::string& ErrorMsg, int LineNo) { yyerror(ErrorMsg.c_str()); } - diff --git a/tools/llvm-upgrade/UpgradeParser.h.cvs b/tools/llvm-upgrade/UpgradeParser.h.cvs index 3233335bf76..45d332666df 100644 --- a/tools/llvm-upgrade/UpgradeParser.h.cvs +++ b/tools/llvm-upgrade/UpgradeParser.h.cvs @@ -1,342 +1,4 @@ -/* A Bison parser, made by GNU Bison 2.1. */ - -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 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, 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. */ - -/* 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) -#line 1453 "/proj/llvm/llvm-3/tools/llvm-upgrade/UpgradeParser.y" -typedef union YYSTYPE { +typedef union { llvm::Module *ModuleVal; llvm::Function *FunctionVal; std::pair *ArgVal; @@ -377,14 +39,155 @@ typedef union YYSTYPE { llvm::FCmpInst::Predicate FPred; llvm::Module::Endianness Endianness; } YYSTYPE; -/* Line 1447 of yacc.c. */ -#line 382 "UpgradeParser.tab.h" -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 -#endif +#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 + extern YYSTYPE Upgradelval; - - - diff --git a/tools/llvm-upgrade/UpgradeParser.y.cvs b/tools/llvm-upgrade/UpgradeParser.y.cvs index ad72b3996ad..c003ffed343 100644 --- a/tools/llvm-upgrade/UpgradeParser.y.cvs +++ b/tools/llvm-upgrade/UpgradeParser.y.cvs @@ -23,6 +23,7 @@ #include "llvm/Support/MathExtras.h" #include #include +#include #include #include