diff options
author | Bill Wendling <isanbard@gmail.com> | 2006-12-07 22:21:48 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2006-12-07 22:21:48 +0000 |
commit | f5da13367f88f06e3b585dc2263ab6e9ca6c4bf8 (patch) | |
tree | 3cf9a9612ba0a90fee9ec668819ae5a69a7bada1 /utils/TableGen/FileParser.cpp.cvs | |
parent | 6e49d8b4bf7b5911dc953551672161b8f9a7418f (diff) |
What should be the last unnecessary <iostream>s in the library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32333 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/FileParser.cpp.cvs')
-rw-r--r-- | utils/TableGen/FileParser.cpp.cvs | 3636 |
1 files changed, 2202 insertions, 1434 deletions
diff --git a/utils/TableGen/FileParser.cpp.cvs b/utils/TableGen/FileParser.cpp.cvs index 1f0ff3f028..6cfc3dde27 100644 --- a/utils/TableGen/FileParser.cpp.cvs +++ b/utils/TableGen/FileParser.cpp.cvs @@ -1,44 +1,138 @@ +/* A Bison parser, made by GNU Bison 2.3. */ -/* A Bison parser, made from /Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y - by GNU Bison version 1.28 */ +/* Skeleton implementation for Bison's Yacc-like parsers in C -#define YYBISON 1 /* Identify Bison output. */ + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.3" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + +/* Substitute the variable and function names. */ #define yyparse Fileparse -#define yylex Filelex +#define yylex Filelex #define yyerror Fileerror -#define yylval Filelval -#define yychar Filechar +#define yylval Filelval +#define yychar Filechar #define yydebug Filedebug #define yynerrs Filenerrs -#define INT 257 -#define BIT 258 -#define STRING 259 -#define BITS 260 -#define LIST 261 -#define CODE 262 -#define DAG 263 -#define CLASS 264 -#define DEF 265 -#define MULTICLASS 266 -#define DEFM 267 -#define FIELD 268 -#define LET 269 -#define IN 270 -#define SHLTOK 271 -#define SRATOK 272 -#define SRLTOK 273 -#define STRCONCATTOK 274 -#define INTVAL 275 -#define ID 276 -#define VARNAME 277 -#define STRVAL 278 -#define CODEFRAGMENT 279 - -#line 14 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + INT = 258, + BIT = 259, + STRING = 260, + BITS = 261, + LIST = 262, + CODE = 263, + DAG = 264, + CLASS = 265, + DEF = 266, + MULTICLASS = 267, + DEFM = 268, + FIELD = 269, + LET = 270, + IN = 271, + SHLTOK = 272, + SRATOK = 273, + SRLTOK = 274, + STRCONCATTOK = 275, + INTVAL = 276, + ID = 277, + VARNAME = 278, + STRVAL = 279, + CODEFRAGMENT = 280 + }; +#endif +/* Tokens. */ +#define INT 258 +#define BIT 259 +#define STRING 260 +#define BITS 261 +#define LIST 262 +#define CODE 263 +#define DAG 264 +#define CLASS 265 +#define DEF 266 +#define MULTICLASS 267 +#define DEFM 268 +#define FIELD 269 +#define LET 270 +#define IN 271 +#define SHLTOK 272 +#define SRATOK 273 +#define SRLTOK 274 +#define STRCONCATTOK 275 +#define INTVAL 276 +#define ID 277 +#define VARNAME 278 +#define STRVAL 279 +#define CODEFRAGMENT 280 + + + + +/* Copy the first part of user declarations. */ +#line 14 "/Volumes/Gir/devel/llvm/llvm.src/utils/TableGen/FileParser.y" #include "Record.h" #include "llvm/ADT/StringExtras.h" +#include "llvm/Support/Streams.h" #include <algorithm> #include <cstdio> #define YYERROR_VERBOSE 1 @@ -149,7 +243,7 @@ static void setValue(const std::string &ValName, } // We should have a BitsInit type now... - assert(dynamic_cast<BitsInit*>(BI) != 0 || &(std::cerr << *BI) == 0); + assert(dynamic_cast<BitsInit*>(BI) != 0 || (cerr << *BI).stream() == 0); BitsInit *BInit = (BitsInit*)BI; BitsInit *NewVal = new BitsInit(CurVal->getNumBits()); @@ -230,8 +324,29 @@ static void addSubClass(Record *SC, const std::vector<Init*> &TemplateArgs) { using namespace llvm; -#line 209 "/Volumes/ProjectsDisk/cvs/llvm/utils/TableGen/FileParser.y" -typedef union { + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +#line 210 "/Volumes/Gir/devel/llvm/llvm.src/utils/TableGen/FileParser.y" +{ std::string* StrVal; int IntVal; llvm::RecTy* Ty; @@ -243,572 +358,1195 @@ typedef union { SubClassRefTy* SubClassRef; std::vector<SubClassRefTy>* SubClassList; std::vector<std::pair<llvm::Init*, std::string> >* DagValueList; -} YYSTYPE; -#include <stdio.h> +} +/* Line 193 of yacc.c. */ +#line 364 "FileParser.tab.c" + YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + +/* Copy the second part of user declarations. */ + + +/* Line 216 of yacc.c. */ +#line 377 "FileParser.tab.c" -#ifndef __cplusplus -#ifndef __STDC__ -#define const +#ifdef short +# undef short #endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; #endif +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif -#define YYFINAL 188 -#define YYFLAG -32768 -#define YYNTBASE 41 - -#define YYTRANSLATE(x) ((unsigned)(x) <= 279 ? yytranslate[x] : 90) - -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, 35, - 36, 2, 2, 37, 39, 34, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 38, 40, 26, - 28, 27, 29, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 32, 2, 33, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 30, 2, 31, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 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 -}; +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif -#if YYDEBUG != 0 -static const short yyprhs[] = { 0, - 0, 2, 4, 6, 11, 13, 18, 20, 22, 24, - 25, 27, 28, 31, 33, 35, 37, 39, 41, 43, - 47, 52, 57, 61, 65, 70, 75, 82, 89, 96, - 103, 104, 107, 110, 115, 116, 118, 120, 124, 127, - 131, 137, 142, 144, 145, 149, 150, 152, 154, 158, - 163, 166, 173, 174, 177, 179, 183, 185, 190, 192, - 196, 197, 200, 202, 206, 210, 211, 213, 215, 216, - 218, 220, 222, 223, 227, 228, 229, 236, 240, 242, - 244, 247, 249, 250, 251, 260, 261, 268, 270, 272, - 274, 276, 281, 283, 287, 288, 293, 298, 301, 303, - 306 -}; +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif -static const short yyrhs[] = { 22, - 0, 5, 0, 4, 0, 6, 26, 21, 27, 0, - 3, 0, 7, 26, 42, 27, 0, 8, 0, 9, - 0, 41, 0, 0, 14, 0, 0, 28, 46, 0, - 22, 0, 45, 0, 21, 0, 24, 0, 25, 0, - 29, 0, 30, 53, 31, 0, 22, 26, 54, 27, - 0, 46, 30, 51, 31, 0, 32, 53, 33, 0, - 46, 34, 22, 0, 35, 45, 49, 36, 0, 46, - 32, 51, 33, 0, 17, 35, 46, 37, 46, 36, - 0, 18, 35, 46, 37, 46, 36, 0, 19, 35, - 46, 37, 46, 36, 0, 20, 35, 46, 37, 46, - 36, 0, 0, 38, 23, 0, 46, 47, 0, 48, - 37, 46, 47, 0, 0, 48, 0, 21, 0, 21, - 39, 21, 0, 21, 21, 0, 50, 37, 21, 0, - 50, 37, 21, 39, 21, 0, 50, 37, 21, 21, - 0, 50, 0, 0, 30, 51, 31, 0, 0, 54, - 0, 46, 0, 54, 37, 46, 0, 43, 42, 22, - 44, 0, 55, 40, 0, 15, 22, 52, 28, 46, - 40, 0, 0, 57, 56, 0, 40, 0, 30, 57, - 31, 0, 41, 0, 41, 26, 54, 27, 0, 59, - 0, 60, 37, 59, 0, 0, 38, 60, 0, 55, - 0, 62, 37, 55, 0, 26, 62, 27, 0, 0, - 63, 0, 22, 0, 0, 65, 0, 66, 0, 66, - 0, 0, 61, 70, 58, 0, 0, 0, 10, 67, - 72, 64, 73, 69, 0, 11, 68, 69, 0, 74, - 0, 75, 0, 76, 75, 0, 22, 0, 0, 0, - 12, 77, 79, 64, 80, 30, 76, 31, 0, 0, - 13, 22, 82, 38, 59, 40, 0, 71, 0, 74, - 0, 78, 0, 81, 0, 22, 52, 28, 46, 0, - 84, 0, 85, 37, 84, 0, 0, 15, 87, 85, - 16, 0, 86, 30, 88, 31, 0, 86, 83, 0, - 83, 0, 88, 83, 0, 88, 0 -}; +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if YYENABLE_NLS +# if ENABLE_NLS +# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ #endif -#if YYDEBUG != 0 -static const short yyrline[] = { 0, - 245, 267, 269, 271, 273, 275, 277, 279, 281, 285, - 285, 287, 287, 289, 312, 314, 316, 319, 322, 324, - 337, 365, 372, 375, 382, 385, 393, 395, 397, 399, - 403, 406, 410, 415, 421, 424, 427, 430, 443, 457, - 459, 472, 488, 490, 490, 494, 496, 500, 503, 507, - 524, 526, 532, 532, 533, 533, 535, 537, 541, 546, - 551, 554, 558, 561, 566, 567, 567, 569, 569, 571, - 578, 596, 621, 635, 640, 642, 644, 648, 658, 672, - 675, 679, 690, 692, 694, 699, 699, 773, 773, 774, - 774, 776, 781, 781, 784, 784, 787, 790, 794, 794, - 796 -}; +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int i) +#else +static int +YYID (i) + int i; +#endif +{ + return i; +} #endif +#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 +# elif defined __BUILTIN_VA_ARG_INCR +# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss; + YYSTYPE yyvs; + }; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) -#if YYDEBUG != 0 || defined (YYERROR_VERBOSE) - -static const char * const yytname[] = { "$","error","$undefined.","INT","BIT", -"STRING","BITS","LIST","CODE","DAG","CLASS","DEF","MULTICLASS","DEFM","FIELD", -"LET","IN","SHLTOK","SRATOK","SRLTOK","STRCONCATTOK","INTVAL","ID","VARNAME", -"STRVAL","CODEFRAGMENT","'<'","'>'","'='","'?'","'{'","'}'","'['","']'","'.'", -"'('","')'","','","':'","'-'","';'","ClassID","Type","OptPrefix","OptValue", -"IDValue","Value","OptVarName","DagArgListNE","DagArgList","RBitList","BitList", -"OptBitList","ValueList","ValueListNE","Declaration","BodyItem","BodyList","Body", -"SubClassRef","ClassListNE","ClassList","DeclListNE","TemplateArgList","OptTemplateArgList", -"OptID","ObjectName","ClassName","DefName","ObjectBody","@1","ClassInst","@2", -"@3","DefInst","MultiClassDef","MultiClassBody","MultiClassName","MultiClassInst", -"@4","@5","DefMInst","@6","Object","LETItem","LETList","LETCommand","@7","ObjectList", -"File", NULL -}; #endif -static const short yyr1[] = { 0, - 41, 42, 42, 42, 42, 42, 42, 42, 42, 43, - 43, 44, 44, 45, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, - 47, 47, 48, 48, 49, 49, 50, 50, 50, 50, - 50, 50, 51, 52, 52, 53, 53, 54, 54, 55, - 56, 56, 57, 57, 58, 58, 59, 59, 60, 60, - 61, 61, 62, 62, 63, 64, 64, 65, 65, 66, - 67, 68, 70, 69, 72, 73, 71, 74, 75, 76, - 76, 77, 79, 80, 78, 82, 81, 83, 83, 83, - 83, 84, 85, 85, 87, 86, 83, 83, 88, 88, - 89 +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 27 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 204 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 41 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 50 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 102 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 188 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 280 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 35, 36, 2, 2, 37, 39, 34, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 38, 40, + 26, 28, 27, 29, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 32, 2, 33, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 30, 2, 31, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 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 }; -static const short yyr2[] = { 0, - 1, 1, 1, 4, 1, 4, 1, 1, 1, 0, - 1, 0, 2, 1, 1, 1, 1, 1, 1, 3, - 4, 4, 3, 3, 4, 4, 6, 6, 6, 6, - 0, 2, 2, 4, 0, 1, 1, 3, 2, 3, - 5, 4, 1, 0, 3, 0, 1, 1, 3, 4, - 2, 6, 0, 2, 1, 3, 1, 4, 1, 3, - 0, 2, 1, 3, 3, 0, 1, 1, 0, 1, - 1, 1, 0, 3, 0, 0, 6, 3, 1, 1, - 2, 1, 0, 0, 8, 0, 6, 1, 1, 1, - 1, 4, 1, 3, 0, 4, 4, 2, 1, 2, - 1 +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint16 yyprhs[] = +{ + 0, 0, 3, 5, 7, 9, 14, 16, 21, 23, + 25, 27, 28, 30, 31, 34, 36, 38, 40, 42, + 44, 46, 50, 55, 60, 64, 68, 73, 78, 85, + 92, 99, 106, 107, 110, 113, 118, 119, 121, 123, + 127, 130, 134, 140, 145, 147, 148, 152, 153, 155, + 157, 161, 166, 169, 176, 177, 180, 182, 186, 188, + 193, 195, 199, 200, 203, 205, 209, 213, 214, 216, + 218, 219, 221, 223, 225, 226, 230, 231, 232, 239, + 243, 245, 247, 250, 252, 253, 254, 263, 264, 271, + 273, 275, 277, 279, 284, 286, 290, 291, 296, 301, + 304, 306, 309 }; -static const short yydefact[] = { 0, - 69, 69, 0, 0, 95, 88, 89, 90, 91, 99, - 0, 101, 68, 70, 71, 75, 72, 61, 82, 83, - 86, 0, 0, 98, 100, 66, 0, 73, 78, 66, - 0, 44, 93, 0, 0, 10, 67, 76, 1, 57, - 59, 62, 0, 84, 0, 0, 0, 96, 0, 97, - 11, 0, 63, 0, 61, 0, 0, 53, 55, 74, - 0, 0, 37, 43, 0, 0, 94, 5, 3, 2, - 0, 0, 7, 8, 9, 0, 65, 10, 77, 0, - 0, 0, 0, 16, 14, 17, 18, 19, 46, 46, - 0, 15, 48, 0, 60, 10, 0, 87, 39, 0, - 0, 45, 92, 0, 0, 12, 64, 0, 0, 0, - 0, 0, 0, 47, 0, 14, 35, 0, 0, 0, - 58, 0, 0, 56, 0, 54, 79, 80, 0, 38, - 40, 0, 0, 0, 50, 0, 0, 0, 0, 0, - 20, 23, 31, 36, 0, 0, 0, 24, 49, 44, - 51, 85, 81, 42, 0, 4, 6, 13, 0, 0, - 0, 0, 21, 0, 33, 0, 25, 22, 26, 0, - 41, 0, 0, 0, 0, 32, 31, 0, 27, 28, - 29, 30, 34, 0, 52, 0, 0, 0 +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = +{ + 90, 0, -1, 22, -1, 5, -1, 4, -1, 6, + 26, 21, 27, -1, 3, -1, 7, 26, 43, 27, + -1, 8, -1, 9, -1, 42, -1, -1, 14, -1, + -1, 28, 47, -1, 22, -1, 46, -1, 21, -1, + 24, -1, 25, -1, 29, -1, 30, 54, 31, -1, + 22, 26, 55, 27, -1, 47, 30, 52, 31, -1, + 32, 54, 33, -1, 47, 34, 22, -1, 35, 46, + 50, 36, -1, 47, 32, 52, 33, -1, 17, 35, + 47, 37, 47, 36, -1, 18, 35, 47, 37, 47, + 36, -1, 19, 35, 47, 37, 47, 36, -1, 20, + 35, 47, 37, 47, 36, -1, -1, 38, 23, -1, + 47, 48, -1, 49, 37, 47, 48, -1, -1, 49, + -1, 21, -1, 21, 39, 21, -1, 21, 21, -1, + 51, 37, 21, -1, 51, 37, 21, 39, 21, -1, + 51, 37, 21, 21, -1, 51, -1, -1, 30, 52, + 31, -1, -1, 55, -1, 47, -1, 55, 37, 47, + -1, 44, 43, 22, 45, -1, 56, 40, -1, 15, + 22, 53, 28, 47, 40, -1, -1, 58, 57, -1, + 40, -1, 30, 58, 31, -1, 42, -1, 42, 26, + 55, 27, -1, 60, -1, 61, 37, 60, -1, -1, + 38, 61, -1, 56, -1, 63, 37, 56, -1, 26, + 63, 27, -1, -1, 64, -1, 22, -1, -1, 66, + -1, 67, -1, 67, -1, -1, 62, 71, 59, -1, + -1, -1, 10, 68, 73, 65, 74, 70, -1, 11, + 69, 70, -1, 75, -1, 76, -1, 77, 76, -1, + 22, -1, -1, -1, 12, 78, 80, 65, 81, 30, + 77, 31, -1, -1, 13, 22, 83, 38, 60, 40, + -1, 72, -1, 75, -1, 79, -1, 82, -1, 22, + 53, 28, 47, -1, 85, -1, 86, 37, 85, -1, + -1, 15, 88, 86, 16, -1, 87, 30, 89, 31, + -1, 87, 84, -1, 84, -1, 89, 84, -1, 89, + -1 }; -static const short yydefgoto[] = { 40, - 76, 52, 135, 92, 93, 165, 144, 145, 64, 65, - 47, 113, 114, 53, 126, 96, 60, 41, 42, 28, - 54, 37, 38, 14, 15, 16, 18, 29, 43, 6, - 26, 55, 7, 128, 129, 20, 8, 30, 61, 9, - 31, 10, 33, 34, 11, 22, 12, 186 +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 246, 246, 268, 270, 272, 274, 276, 278, 280, + 282, 286, 286, 288, 288, 290, 313, 315, 317, 320, + 323, 325, 338, 366, 373, 376, 383, 386, 394, 396, + 398, 400, 404, 407, 411, 416, 422, 425, 428, 431, + 444, 458, 460, 473, 489, 491, 491, 495, 497, 501, + 504, 508, 525, 527, 533, 533, 534, 534, 536, 538, + 542, 547, 552, 555, 559, 562, 567, 568, 568, 570, + 570, 572, 579, 597, 622, 622, 641, 643, 641, 649, + 659, 673, 676, 680, 691, 693, 691, 700, 700, 774, + 774, 775, 775, 777, 782, 782, 785, 785, 788, 791, + 795, 795, 797 }; +#endif -static const short yypact[] = { 129, - 3, 3, 11, 19,-32768,-32768,-32768,-32768,-32768,-32768, - 2, 129,-32768,-32768,-32768,-32768,-32768, 29,-32768,-32768, --32768, 24, 129,-32768,-32768, 43, 31,-32768,-32768, 43, - 40, 50,-32768, -6, -4, 69,-32768,-32768,-32768, 59, --32768, 61, 10,-32768, 31, 81, 78,-32768, 24,-32768, --32768, 15,-32768, 12, 29, 41, 31,-32768,-32768,-32768, - 84, 68, 8, 83, 87, 41,-32768,-32768,-32768,-32768, - 111, 120,-32768,-32768,-32768, 126,-32768, 69,-32768, 114, - 115, 116, 117,-32768, 127,-32768,-32768,-32768, 41, 41, - 132,-32768, 113, 27,-32768, 60, 144,-32768,-32768, 135, - 136,-32768, 113, 137, 15, 131,-32768, 41, 41, 41, - 41, 41, 130, 123, 133,-32768, 41, 81, 81, 140, --32768, 41, 141,-32768, 124,-32768,-32768,-32768, 5,-32768, - 9, 138, 142, 41,-32768, 67, 73, 79, 85, 45, --32768,-32768, 54, 134, 139, 143, 145,-32768, 113, 50, --32768,-32768,-32768,-32768, 146,-32768,-32768, 113, 41, 41, - 41, 41,-32768, 147,-32768, 41,-32768,-32768,-32768, 148, --32768, 91, 94, 99, 102,-32768, 54, 41,-32768,-32768, --32768,-32768,-32768, 47,-32768, 168, 172,-32768 +#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", "INT", "BIT", "STRING", "BITS", "LIST", + "CODE", "DAG", "CLASS", "DEF", "MULTICLASS", "DEFM", "FIELD", "LET", + "IN", "SHLTOK", "SRATOK", "SRLTOK", "STRCONCATTOK", "INTVAL", "ID", + "VARNAME", "STRVAL", "CODEFRAGMENT", "'<'", "'>'", "'='", "'?'", "'{'", + "'}'", "'['", "']'", "'.'", "'('", "')'", "','", "':'", "'-'", "';'", + "$accept", "ClassID", "Type", "OptPrefix", "OptValue", "IDValue", + "Value", "OptVarName", "DagArgListNE", "DagArgList", "RBitList", + "BitList", "OptBitList", "ValueList", "ValueListNE", "Declaration", + "BodyItem", "BodyList", "Body", "SubClassRef", "ClassListNE", + "ClassList", "DeclListNE", "TemplateArgList", "OptTemplateArgList", + "OptID", "ObjectName", "ClassName", "DefName", "ObjectBody", "@1", + "ClassInst", "@2", "@3", "DefInst", "MultiClassDef", "MultiClassBody", + "MultiClassName", "MultiClassInst", "@4", "@5", "DefMInst", "@6", + "Object", "LETItem", "LETList", "LETCommand", "@7", "ObjectList", "File", 0 }; +#endif -static const short yypgoto[] = { -50, - 72,-32768,-32768, 82, -66, 4,-32768,-32768,-32768, -29, - 30, 89, -55, -44,-32768,-32768,-32768, -19,-32768,-32768, --32768,-32768, 152,-32768, 181,-32768,-32768, 149,-32768,-32768, --32768,-32768, -94, 55,-32768,-32768,-32768,-32768,-32768,-32768, --32768, -7, 150,-32768,-32768,-32768, 162,-32768 +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 60, 62, 61, 63, + 123, 125, 91, 93, 46, 40, 41, 44, 58, 45, + 59 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 41, 42, 43, 43, 43, 43, 43, 43, 43, + 43, 44, 44, 45, 45, 46, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 48, 48, 49, 49, 50, 50, 51, 51, + 51, 51, 51, 51, 52, 53, 53, 54, 54, 55, + 55, 56, 57, 57, 58, 58, 59, 59, 60, 60, + 61, 61, 62, 62, 63, 63, 64, 65, 65, 66, + 66, 67, 68, 69, 71, 70, 73, 74, 72, 75, + 76, 77, 77, 78, 80, 81, 79, 83, 82, 84, + 84, 84, 84, 85, 86, 86, 88, 87, 84, 84, + 89, 89, 90 }; +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 1, 1, 4, 1, 4, 1, 1, + 1, 0, 1, 0, 2, 1, 1, 1, 1, 1, + 1, 3, 4, 4, 3, 3, 4, 4, 6, 6, + 6, 6, 0, 2, 2, 4, 0, 1, 1, 3, + 2, 3, 5, 4, 1, 0, 3, 0, 1, 1, + 3, 4, 2, 6, 0, 2, 1, 3, 1, 4, + 1, 3, 0, 2, 1, 3, 3, 0, 1, 1, + 0, 1, 1, 1, 0, 3, 0, 0, 6, 3, + 1, 1, 2, 1, 0, 0, 8, 0, 6, 1, + 1, 1, 1, 4, 1, 3, 0, 4, 4, 2, + 1, 2, 1 +}; -#define YYLAST 204 - - -static const short yytable[] = { 103, - 94, 75, 127, 24, 25, 1, 2, 3, 4, 48, - 5, 1, 2, 3, 4, 2, 5, 68, 69, 70, - 71, 72, 73, 74, 13, 62, 50, 25, 99, 154, - 49, 23, 19, 107, 127, 152, 39, 95, 77, 58, - 21, 136, 137, 138, 139, 32, 100, 155, 78, 59, - 143, 125, 39, 121, 75, 149, 140, 80, 81, 82, - 83, 84, 85, 122, 86, 87, 27, 158, 36, 88, - 89, 163, 90, 51, 123, 91, 118, 45, 119, 46, - 120, 122, 51, 118, 56, 119, 185, 120, 146, 147, - 124, 164, 172, 173, 174, 175, 118, 57, 119, 177, - 120, 63, 118, 159, 119, 66, 120, 98, 118, 160, - 119, 184, 120, 97, 118, 161, 119, 102, 120, 101, - 118, 162, 119, 118, 120, 119, 179, 120, 118, 180, - 119, 118, 120, 119, 181, 120, 104, 182, 1, 2, - 3, 4, 118, 5, 119, 105, 120, 106, 108, 109, - 110, 111, 112, 116, 2, 130, 131, 132, 134, 122, - 141, 148, 150, 151, 156, 142, 171, 187, 157, 176, - 166, 188, 117, 168, 167, 178, 133, 169, 115, 170, - 183, 44, 17, 153, 35, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 67, 0, - 0, 0, 0, 79 +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 0, 70, 70, 0, 0, 96, 89, 90, 91, 92, + 100, 0, 102, 0, 69, 71, 72, 76, 73, 62, + 83, 84, 87, 0, 0, 99, 101, 1, 67, 0, + 74, 79, 67, 0, 45, 94, 0, 0, 11, 68, + 77, 2, 58, 60, 63, 0, 85, 0, 0, 0, + 97, 0, 98, 12, 0, 64, 0, 62, 0, 0, + 54, 56, 75, 0, 0, 38, 44, 0, 0, 95, + 6, 4, 3, 0, 0, 8, 9, 10, 0, 66 |