diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-10-09 17:36:59 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-10-09 17:36:59 +0000 |
commit | f63697de046e3830c16492822addd134e96ffdc5 (patch) | |
tree | a84e904ebe54b6b91b884397fab236047ec925c3 /lib/AsmParser/llvmAsmParser.cpp.cvs | |
parent | d68d2c312a1bf4b07a76a7fcdf515d71178adb9c (diff) |
Fix PR886:
The result of yyparse() was not being checked. When YYERROR or YYABORT is
called it causes yyparse() to return 1 to indicate the error. The code was
silently ignoring this situation because it previously expected either an
exception or a null ParserResult to indicate an error. The patch corrects
this situation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30834 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/llvmAsmParser.cpp.cvs')
-rw-r--r-- | lib/AsmParser/llvmAsmParser.cpp.cvs | 6373 |
1 files changed, 3610 insertions, 2763 deletions
diff --git a/lib/AsmParser/llvmAsmParser.cpp.cvs b/lib/AsmParser/llvmAsmParser.cpp.cvs index 9057dad687..e9b73d1d7c 100644 --- a/lib/AsmParser/llvmAsmParser.cpp.cvs +++ b/lib/AsmParser/llvmAsmParser.cpp.cvs @@ -1,123 +1,288 @@ +/* A Bison parser, made by GNU Bison 2.1. */ -/* A Bison parser, made from /Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y - by GNU Bison version 1.28 */ +/* Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -#define YYBISON 1 /* Identify Bison output. */ + 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. */ + +/* 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 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 RET 325 -#define BR 326 -#define SWITCH 327 -#define INVOKE 328 -#define UNWIND 329 -#define UNREACHABLE 330 -#define ADD 331 -#define SUB 332 -#define MUL 333 -#define DIV 334 -#define REM 335 -#define AND 336 -#define OR 337 -#define XOR 338 -#define SETLE 339 -#define SETGE 340 -#define SETLT 341 -#define SETGT 342 -#define SETEQ 343 -#define SETNE 344 -#define MALLOC 345 -#define ALLOCA 346 -#define FREE 347 -#define LOAD 348 -#define STORE 349 -#define GETELEMENTPTR 350 -#define PHI_TOK 351 -#define CAST 352 -#define SELECT 353 -#define SHL 354 -#define SHR 355 -#define VAARG 356 -#define EXTRACTELEMENT 357 -#define INSERTELEMENT 358 -#define SHUFFLEVECTOR 359 -#define VAARG_old 360 -#define VANEXT_old 361 - -#line 14 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + ESINT64VAL = 258, + EUINT64VAL = 259, + SINTVAL = 260, + UINTVAL = 261, + FPVAL = 262, + VOID = 263, + BOOL = 264, + SBYTE = 265, + UBYTE = 266, + SHORT = 267, + USHORT = 268, + INT = 269, + UINT = 270, + LONG = 271, + ULONG = 272, + FLOAT = 273, + DOUBLE = 274, + TYPE = 275, + LABEL = 276, + VAR_ID = 277, + LABELSTR = 278, + STRINGCONSTANT = 279, + IMPLEMENTATION = 280, + ZEROINITIALIZER = 281, + TRUETOK = 282, + FALSETOK = 283, + BEGINTOK = 284, + ENDTOK = 285, + DECLARE = 286, + GLOBAL = 287, + CONSTANT = 288, + SECTION = 289, + VOLATILE = 290, + TO = 291, + DOTDOTDOT = 292, + NULL_TOK = 293, + UNDEF = 294, + CONST = 295, + INTERNAL = 296, + LINKONCE = 297, + WEAK = 298, + APPENDING = 299, + DLLIMPORT = 300, + DLLEXPORT = 301, + EXTERN_WEAK = 302, + OPAQUE = 303, + NOT = 304, + EXTERNAL = 305, + TARGET = 306, + TRIPLE = 307, + ENDIAN = 308, + POINTERSIZE = 309, + LITTLE = 310, + BIG = 311, + ALIGN = 312, + DEPLIBS = 313, + CALL = 314, + TAIL = 315, + ASM_TOK = 316, + MODULE = 317, + SIDEEFFECT = 318, + CC_TOK = 319, + CCC_TOK = 320, + CSRETCC_TOK = 321, + FASTCC_TOK = 322, + COLDCC_TOK = 323, + X86_STDCALLCC_TOK = 324, + X86_FASTCALLCC_TOK = 325, + RET = 326, + BR = 327, + SWITCH = 328, + INVOKE = 329, + UNWIND = 330, + UNREACHABLE = 331, + ADD = 332, + SUB = 333, + MUL = 334, + DIV = 335, + REM = 336, + AND = 337, + OR = 338, + XOR = 339, + SETLE = 340, + SETGE = 341, + SETLT = 342, + SETGT = 343, + SETEQ = 344, + SETNE = 345, + MALLOC = 346, + ALLOCA = 347, + FREE = 348, + LOAD = 349, + STORE = 350, + GETELEMENTPTR = 351, + PHI_TOK = 352, + CAST = 353, + SELECT = 354, + SHL = 355, + SHR = 356, + VAARG = 357, + EXTRACTELEMENT = 358, + INSERTELEMENT = 359, + SHUFFLEVECTOR = 360, + VAARG_old = 361, + VANEXT_old = 362 + }; +#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 RET 326 +#define BR 327 +#define SWITCH 328 +#define INVOKE 329 +#define UNWIND 330 +#define UNREACHABLE 331 +#define ADD 332 +#define SUB 333 +#define MUL 334 +#define DIV 335 +#define REM 336 +#define AND 337 +#define OR 338 +#define XOR 339 +#define SETLE 340 +#define SETGE 341 +#define SETLT 342 +#define SETGT 343 +#define SETEQ 344 +#define SETNE 345 +#define MALLOC 346 +#define ALLOCA 347 +#define FREE 348 +#define LOAD 349 +#define STORE 350 +#define GETELEMENTPTR 351 +#define PHI_TOK 352 +#define CAST 353 +#define SELECT 354 +#define SHL 355 +#define SHR 356 +#define VAARG 357 +#define EXTRACTELEMENT 358 +#define INSERTELEMENT 359 +#define SHUFFLEVECTOR 360 +#define VAARG_old 361 +#define VANEXT_old 362 + + + + +/* Copy the first part of user declarations. */ +#line 14 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" #include "ParserInternals.h" #include "llvm/CallingConv.h" @@ -146,7 +311,7 @@ // immediately invokes YYERROR. This would be so much cleaner if it was a // recursive descent parser. static bool TriggerError = false; -#define CHECK_FOR_ERROR { if (TriggerError) { TriggerError = false; YYERROR; } } +#define CHECK_FOR_ERROR { if (TriggerError) { TriggerError = false; YYABORT; } } #define GEN_ERROR(msg) { GenerateError(msg); YYERROR; } int yyerror(const char *ErrorMsg); // Forward declarations to prevent "implicit @@ -927,12 +1092,20 @@ static Module* RunParser(Module * M) { llvmAsmlineno = 1; // Reset the current line number... ObsoleteVarArgs = false; NewVarArgs = false; - CurModule.CurrentModule = M; - yyparse(); // Parse the file, potentially throwing exception + + // Check to make sure the parser succeeded + if (yyparse()) { + if (ParserResult) + delete ParserResult; + return 0; + } + + // Check to make sure that parsing produced a result if (!ParserResult) return 0; + // Reset ParserResult variable while saving its value for the result. Module *Result = ParserResult; ParserResult = 0; @@ -1069,8 +1242,28 @@ Module *llvm::RunVMAsmParser(const char * AsmString, Module * M) { } -#line 966 "/Volumes/ProjectsDisk/cvs/llvm/lib/AsmParser/llvmAsmParser.y" -typedef union { + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +#line 974 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" +typedef union YYSTYPE { llvm::Module *ModuleVal; llvm::Function *FunctionVal; std::pair<llvm::PATypeHolder*, char*> *ArgVal; @@ -1109,997 +1302,1457 @@ typedef union { llvm::Instruction::OtherOps OtherOpVal; llvm::Module::Endianness Endianness; } YYSTYPE; -#include <stdio.h> - -#ifndef __cplusplus -#ifndef __STDC__ -#define const -#endif +/* Line 196 of yacc.c. */ +#line 1307 "llvmAsmParser.tab.c" +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 #endif -#define YYFINAL 514 -#define YYFLAG -32768 -#define YYNTBASE 122 - -#define YYTRANSLATE(x) ((unsigned)(x) <= 361 ? yytranslate[x] : 196) - -static const 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, 111, - 112, 120, 2, 109, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 116, - 108, 117, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 113, 110, 115, 2, 2, 2, 2, 2, 121, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 114, - 2, 2, 118, 2, 119, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 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 -}; +/* Copy the second part of user declarations. */ -#if YYDEBUG != 0 -static const short yyprhs[] = { 0, - 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, - 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, - 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, - 60, 62, 64, 67, 68, 70, 72, 74, 76, 78, - 80, 82, 83, 84, 86, 88, 90, 92, 94, 96, - 99, 100, 103, 104, 108, 111, 112, 114, 115, 119, - 121, 124, 126, 128, 130, 132, 134, 136, 138, 140, - 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, - 162, 164, 166, 169, 174, 180, 186, 190, 193, 196, - 198, 202, 204, 208, 210, 211, 216, 220, 224, 229, - 234, 238, 241, 244, 247, 250, 253, 256, 259, 262, - 265, 268, 275, 281, 290, 297, 304, 311, 318, 325, - 334, 343, 347, 349, 351, 353, 355, 358, 361, 366, - 369, 371, 376, 379, 384, 385, 393, 394, 402, 403, - 411, 412, 420, 424, 429, 430, 432, 434, 436, 440, - 444, 448, 452, 456, 458, 459, 461, 463, 465, 466, - 469, 473, 475, 477, 481, 483, 484, 493, 495, 497, - 501, 503, 505, 508, 509, 511, 513, 514, 519, 520, - 522, 524, 526, 528, 530, 532, 534, 536, 538, 542, - 544, 550, 552, 554, 556, 558, 561, 564, 567, 571, - 574, 575, 577, 580, 583, 587, 597, 607, 616, 630, - 632, 634, 641, 647, 650, 657, 665, 667, 671, 673, - 674, 677, 679, 685, 691, 697, 700, 705, 710, 717, - 722, 727, 732, 737, 744, 751, 754, 762, 764, 767, - 768, 770, 771, 775, 782, 786, 793, 796, 801, 808 -}; -static const short yyrhs[] = { 5, - 0, 6, 0, 3, 0, 4, 0, 77, 0, 78, - 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, 100, 0, 101, 0, 16, - 0, 14, 0, 12, 0, 10, 0, 17, 0, 15, - 0, 13, 0, 11, 0, 128, 0, 129, 0, 18, - 0, 19, 0, 164, 108, 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, 109, 57, 4, 0, 34, 24, 0, - 0, 137, 0, 0, 109, 140, 139, 0, 137, 0, - 57, 4, 0, 143, 0, 8, 0, 145, 0, 8, - 0, 145, 0, 9, 0, 10, 0, 11, 0, 12, - 0, 13, 0, 14, 0, 15, 0, 16, 0, 17, - 0, 18, 0, 19, 0, 20, 0, 21, 0, 48, - 0, 144, 0, 179, 0, 110, 4, 0, 142, 111, - 147, 112, 0, 113, 4, 114, 145, 115, 0, 116, - 4, 114, 145, 117, 0, 118, 146, 119, 0, 118, - 119, 0, 145, 120, 0, 145, 0, 146, 109, 145, - 0, 146, 0, 146, 109, 37, 0, 37, 0, 0, - 143, 113, 150, 115, 0, 143, 113, 115, 0, 143, - 121, 24, 0, 143, 116, 150, 117, 0, 143, 118, - 150, 119, 0, 143, 118, 119, 0, 143, 38, 0, - 143, 39, 0, 143, 179, 0, 143, 149, 0, 143, - 26, 0, 128, 123, 0, 129, 4, 0, 9, 27, - 0, 9, 28, 0, 131, 7, 0, 98, 111, 148, - 36, 143, 112, 0, 96, 111, 148, 193, 112, 0, - 99, 111, 148, 109, 148, 109, 148, 112, 0, 124, - 111, 148, 109, 148, 112, 0, 125, 111, 148, 109, - 148, 112, 0, 126, 111, 148, 109, 148, 112, 0, - 127, 111, 148, 109, 148, 112, 0, 103, 111, 148, - 109, 148, 112, 0, 104, 111, 148, 109, 148, 109, - 148, 112, 0, 105, 111, 148, 109, 148, 109, 148, - 112, 0, 150, 109, 148, 0, 148, 0, 32, 0, - 33, 0, 153, 0, 153, 173, 0, 153, 175, 0, - 153, 62, 61, 159, 0, 153, 25, 0, 154, 0, - 154, 132, 20, 141, 0, 154, 175, 0, 154, 62, - 61, 159, 0, 0, 154, 132, 133, 151, 148, 155, - 139, 0, 0, 154, 132, 50, 151, 143, 156, 139, - 0, 0, 154, 132, 45, 151, 143, 157, 139, 0, - 0, 154, 132, 47, 151, 143, 158, 139, 0, 154, - 51, 161, 0, 154, 58, 108, 162, 0, 0, 24, - 0, 56, 0, 55, 0, 53, 108, 160, 0, 54, - 108, 4, 0, 52, 108, 24, 0, 113, 163, 115, - 0, 163, 109, 24, 0, 24, 0, 0, 22, 0, - 24, 0, 164, 0, 0, 143, 165, 0, 167, 109, - 166, 0, 166, 0, 167, 0, 167, 109, 37, 0, - 37, 0, 0, 134, 141, 164, 111, 168, 112, 138, - 135, 0, 29, 0, 118, 0, 133, 169, 170, 0, - 30, 0, 119, 0, 182, 172, 0, 0, 45, 0, - 47, 0, 0, 31, 176, 174, 169, 0, 0, 63, - 0, 3, 0, 4, 0, 7, 0, 27, 0, 28, - 0, 38, 0, 39, 0, 26, 0, 116, 150, 117, - 0, 149, 0, 61, 177, 24, 109, 24, 0, 122, - 0, 164, 0, 179, 0, 178, 0, 143, 180, 0, - 182, 183, 0, 171, 183, 0, 184, 132, 185, 0, - 184, 187, 0, 0, 23, 0, 71, 181, 0, 71, - 8, 0, 72, 21, 180, 0, 72, 9, 180, 109, - 21, 180, 109, 21, 180, 0, 73, 130, 180, 109, - 21, 180, 113, 186, 115, 0, 73, 130, 180, 109, - 21, 180, 113, 115, 0, 74, 134, 141, 180, 111, - 190, 112, 36, 21, 180, 75, 21, 180, 0, 75, - 0, 76, 0, 186, 130, 178, 109, 21, 180, 0, - 130, 178, 109, 21, 180, 0, 132, 192, 0, 143, - 113, 180, 109, 180, 115, 0, 188, 109, 113, 180, - 109, 180, 115, 0, 181, 0, 189, 109, 181, 0, - 189, 0, 0, 60, 59, 0, 59, 0, 124, 143, - 180, 109, 180, 0, 125, 143, 180, 109, 180, 0, - 126, 143, 180, 109, 180, 0, 49, 181, 0, 127, - 181, 109, 181, 0, 98, 181, 36, 143, 0, 99, - 181, 109, 181, 109, 181, 0, 102, 181, 109, 143, - 0, 106, 181, 109, 143, 0, 107, 181, 109, 143, - 0, 103, 181, 109, 181, 0, 104, 181, 109, 181, - 109, 181, 0, 105, 181, 109, 181, 109, 181, 0, - 97, 188, 0, 191, 134, 141, 180, 111, 190, 112, - 0, 195, 0, 109, 189, 0, 0, 35, 0, 0, - 91, 143, 136, 0, 91, 143, 109, 15, 180, 136, - 0, 92, 143, 136, 0, 92, 143, 109, 15, 180, - 136, 0, 93, 181, 0, 194, 94, 143, 180, 0, - 194, 95, 181, 109, 143, 180, 0, 96, 143, 180, - 193, 0 -}; +/* Line 219 of yacc.c. */ +#line 1319 "llvmAsmParser.tab.c" +#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 <stddef.h> /* 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 yyrline[] = { 0, - 1088, 1089, 1097, 1098, 1108, 1108, 1108, 1108, 1108, 1109, - 1109, 1109, 1110, 1110, 1110, 1110, 1110, 1110, 1112, 1112, - 1116, 1116, 1116, 1116, 1117, 1117, 1117, 1117, 1118, 1118, - 1119, 1119, 1122, 1126, 1131, 1131, 1132, 1133, 1134, 1135, - 1136, 1137, 1140, 1140, 1141, 1142, 1143, 1144, 1145, 1146, - 1156, 1156, 1163, 1163, 1172, 1180, 1180, 1186, 1186, 1188, - 1193, 1207, 1207, 1208, 1208, 1210, 1220, 1220, 1220, 1220, - 1220, 1220, 1220, 1221, 1221, 1221, 1221, 1221, 1221, 1222, - 1226, 1230, 1238, 1246, 1259, 1264, 1276, 1286, 1290, 1299, - 1304, 1310, 1311, 1315, 1319, 1330, 1356, 1370, 1400, 1426, - 1447, 1460, 1470, 1475, 1536, 1543, 1552, 1558, 1564, 1568, - 1572, 1580, 1591, 1623, 1631, 1653, 1664, 1670, 1678, 1684, - 1690, 1699, 1703, 1711, 1711, 1721, 1729, 1734, 1738, 1742, - 1746, 1761, 1783, 1786, 1789, 1794, 1797, 1801, 1805, 1809, - 1813, 1818, 1822, 1825, 1828, 1832, 1845, 1846, 1848, 1852, - 1861, 1867, 1869, 1874, 1879, 1888, 1888, 1889, 1889, 1891, - 1898, 1904, 1911, 1915, 1921, 1926, 1931, 2026, 2026, 2028, - 2036, 2036, 2038, 2043, 2043, 2044, 2047, 2047, 2057, 2061, - 2066, 2070, 2074, 2078, 2082, 2086, 2090, 2094, 2098, 2123, - 2127, 2141, 2145, 2151, 2151, 2157, 2162, 2166, 2175, 2186, - 2191, 2203, 2216, 2220, 2224, 2229, 2238, 2257, 2266, 2322, - 2326, 2333, 2344, 2357, 2366, 2375, 2385, 2389, 2396, 2396, - 2398, 2402, 2407, 2423, 2438, 2452, 2465, 2473, 2481, 2489, - 2495, 2515, 2538, 2544, 2550, 2556, 2571, 2630, 2637, 2640, - 2645, 2649, 2656, 2661, 2667, 2672, 2678, 2686, 2698, 2713 -}; +#ifndef YY_ +# if YYENABLE_NLS +# if ENABLE_NLS +# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif #endif +#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 <stdlib.h> /* 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) -#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","RET","BR","SWITCH","INVOKE","UNWIND", -"UNREACHABLE","ADD","SUB","MUL","DIV","REM","AND","OR","XOR","SETLE","SETGE", -"SETLT","SETGT","SETEQ","SETNE","MALLOC","ALLOCA","FREE","LOAD","STORE","GETELEMENTPTR", -"PHI_TOK","CAST","SELECT","SHL","SHR","VAARG","EXTRACTELEMENT","INSERTELEMENT", -"SHUFFLEVECTOR","VAARG_old","VANEXT_old","'='","','","'\\\\'","'('","')'","'['", -"'x'","']'","'<'","'>'","'{'","'}'","'*'","'c'","INTVAL","EINT64VAL","ArithmeticOps", -"LogicalOps","SetCondOps","ShiftOps","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","OptSideEffect","ConstValueRef", -"SymbolicValueRef","ValueRef","ResolvedVal","BasicBlockList","BasicBlock","InstructionList", -"BBTerminatorInst","JumpTable","Inst","PHIList","ValueRefList","ValueRefListE", -"OptTailCall","InstVal","IndexList","OptVolatile","MemoryInst", NULL -}; #endif -static const short yyr1[] = { 0, - 122, 122, 123, 123, 124, 124, 124, 124, 124, 125, - 125, 125, 126, 126, 126, 126, 126, 126, 127, 127, - 128, 128, 128, 128, 129, 129, 129, 129, 130, 130, - 131, 131, 132, 132, 133, 133, 133, 133, 133, 133, - 133, 133, 134, 134, 134, 134, 134, 134, 134, 134, - 135, 135, 136, 136, 137, 138, 138, 139, 139, 140, - 140, 141, 141, 142, 142, 143, 144, 144, 144, 144, - 144, 144, 144, 144, 144, 144, 144, 144, 144, 145, - 145, 145, 145, 145, 145, 145, 145, 145, 145, 146, - 146, 147, 147, 147, 147, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, - 148, 149, 149, 149, 149, 149, 149, 149, 149, 149, - 149, 150, 150, 151, 151, 152, 153, 153, 153, 153, - 153, 154, 154, 154, 155, 154, 156, 154, 157, 154, - 158, 154, 154, 154, 154, 159, 160, 160, 161, 161, - 161, 162, 163, 163, 163, 164, 164, 165, 165, 166, - 167, 167, 168, 168, 168, 168, 169, 170, 170, 171, - 172, 172, 173, 174, 174, 174, 176, 175, 177, 177, - 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, - 178, 179, 179, 180, 180, 181, 182, 182, 183, 184, - 184, 184, 185, 185, 185, 185, 185, 185, 185, 185, - 185, 186, 186, 187, 188, 188, 189, 189, 190, 190, - 191, 191, 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, 193, 193, - 194, 194, 195, 195, 195, 195, 195, 195, 195, 195 -}; +#if defined (__STDC__) || defined (__cplusplus) + typedef signed char yysigned_char; +#else + typedef short int yysigned_char; +#endif -static const short yyr2[] = { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 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, 1, 2, 4, 5, 5, 3, 2, 2, 1, - 3, 1, 3, 1, 0, 4, 3, 3, 4, 4, - 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 6, 5, 8, 6, 6, 6, 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, 1, 0, 1, 1, 1, 0, 2, - 3, 1, 1, 3, 1, 0, 8, 1, 1, 3, - 1, 1, 2, 0, 1, 1, 0, 4, 0, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, - 5, 1, 1, 1, 1, 2, 2, 2, 3, 2, - 0, 1, 2, 2, 3, 9, 9, 8, 13, 1, - 1, 6, 5, 2, 6, 7, 1, 3, 1, 0, - 2, 1, 5, 5, 5, 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 +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 4 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 1330 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 122 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 75 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 251 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 514 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 362 + +#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, + 111, 112, |