📄 cmdline_gram.tab.cc
字号:
/* A Bison parser, made from cmdline_gram.y by GNU bison 1.35. */#define YYBISON 1 /* Identify Bison output. */# define ID 257# define STRCONST 258# define INTCONST 259# define IOPARAM 260# define FLOATCONST 261# define CREATE 262# define INSERT 263# define OPEN 264# define CLOSE 265# define QUIT 266# define SELECT 267# define DELETE 268# define NL 269# define ERROR 270# define CHECK 271# define SPLIT 272# define HELP 273# define DUMP 274# define ONLY 275# define SET 276# define STRUCT 277# define WRITE 278# define ECHO_TOKEN 279# define EVALSPLIT 280# define EVALPENALTY 281# define LOADFILE 282# define PREDINFO 283# define CREATEANL 284# define OPENANL 285# define CLOSEANL 286# define WKLDSTATS 287# define SPLITSTATS 288# define PENALTYSTATS 289# define ANLINFO 290#line 5 "cmdline_gram.y"#include <iostream.h>#include "gist_compat.h" // for malloc#include "gist_defs.h"#include "cmdline.h"#define YYDEBUG 1void cmdPrompt();int yyerror(char *msg);int yylex();#line 18 "cmdline_gram.y"#ifndef YYSTYPEtypedef union { char *string; shpid_t pgno; int number; float flt;} yystype;# define YYSTYPE yystype# define YYSTYPE_IS_TRIVIAL 1#endif#ifndef YYDEBUG# define YYDEBUG 0#endif#define YYFINAL 100#define YYFLAG -32768#define YYNTBASE 37/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */#define YYTRANSLATE(x) ((unsigned)(x) <= 290 ? yytranslate[x] : 43)/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 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};#if YYDEBUGstatic const short yyprhs[] ={ 0, 0, 1, 4, 9, 16, 22, 26, 30, 34, 41, 47, 52, 55, 60, 65, 70, 76, 84, 88, 92, 97, 101, 107, 111, 117, 120, 123, 125, 126, 128, 129, 131, 132, 134, 135};static const short yyrhs[] ={ -1, 37, 38, 0, 8, 3, 3, 15, 0, 8, 3, 3, 3, 7, 15, 0, 24, 28, 3, 3, 15, 0, 10, 3, 15, 0, 11, 3, 15, 0, 17, 3, 15, 0, 13, 3, 41, 42, 4, 15, 0, 9, 3, 4, 4, 15, 0, 14, 3, 4, 15, 0, 12, 15, 0, 20, 3, 39, 15, 0, 18, 3, 5, 15, 0, 22, 25, 5, 15, 0, 22, 23, 3, 5, 15, 0, 30, 3, 3, 3, 5, 7, 15, 0, 31, 3, 15, 0, 32, 3, 15, 0, 34, 3, 40, 15, 0, 33, 3, 15, 0, 35, 3, 3, 40, 15, 0, 36, 3, 15, 0, 29, 3, 5, 5, 15, 0, 19, 15, 0, 1, 15, 0, 15, 0, 0, 5, 0, 0, 3, 0, 0, 5, 0, 0, 6, 0};#endif#if YYDEBUG/* YYRLINE[YYN] -- source line where rule number YYN was defined. */static const short yyrline[] ={ 0, 46, 47, 54, 61, 69, 76, 82, 88, 94, 101, 109, 116, 121, 127, 133, 138, 144, 152, 158, 164, 171, 177, 185, 191, 197, 202, 207, 211, 212, 216, 217, 221, 222, 226, 227};#endif#if (YYDEBUG) || defined YYERROR_VERBOSE/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */static const char *const yytname[] ={ "$", "error", "$undefined.", "ID", "STRCONST", "INTCONST", "IOPARAM", "FLOATCONST", "CREATE", "INSERT", "OPEN", "CLOSE", "QUIT", "SELECT", "DELETE", "NL", "ERROR", "CHECK", "SPLIT", "HELP", "DUMP", "ONLY", "SET", "STRUCT", "WRITE", "ECHO_TOKEN", "EVALSPLIT", "EVALPENALTY", "LOADFILE", "PREDINFO", "CREATEANL", "OPENANL", "CLOSEANL", "WKLDSTATS", "SPLITSTATS", "PENALTYSTATS", "ANLINFO", "commands", "command", "dump_page", "opt_id", "opt_k", "opt_ioparam", 0};#endif/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */static const short yyr1[] ={ 0, 37, 37, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 39, 39, 40, 40, 41, 41, 42, 42};/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */static const short yyr2[] ={ 0, 0, 2, 4, 6, 5, 3, 3, 3, 6, 5, 4, 2, 4, 4, 4, 5, 7, 3, 3, 4, 3, 5, 3, 5, 2, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1};/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE doesn't specify something else to do. Zero means the default is an error. */static const short yydefact[] ={ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 26, 0, 0, 0, 0, 12, 32, 0, 0, 0, 25, 28, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 6, 7, 33, 34, 0, 8, 0, 29, 0, 0, 0, 0, 0, 0, 18, 19, 21, 31, 0, 30, 23, 0, 3, 0, 35, 0, 11, 14, 13, 0, 15, 0, 0, 0, 20, 0, 0, 10, 0, 16, 5, 24, 0, 22, 4, 9, 0, 17, 0, 0};static const short yydefgoto[] ={ 1, 25, 59, 69, 54, 76};static const short yypact[] ={ -32768, 0, -13, 3, 4, 18, 20, 10, 23, 24, -32768, 25, 34, 26, 35, -20, 11, 37, 39, 40, 41, 42, 43, 44, 45,-32768,-32768, 46, 47, 38, 48,-32768, 49, 51, 50, 52,-32768, 53, 56, 55, 58, 57, 61, 54, 59, 60, 63, 64, 62, 1, 66,-32768,-32768,-32768, 65, 67,-32768, 68,-32768, 69, 71, 70, 75, 74, 77,-32768,-32768,-32768,-32768, 72, 63,-32768, 79,-32768, 73,-32768, 85,-32768,-32768,-32768, 76,-32768, 78, 80, 87,-32768, 81, 82,-32768, 83, -32768,-32768,-32768, 92,-32768,-32768,-32768, 86,-32768, 90, -32768};static const short yypgoto[] ={ -32768,-32768,-32768, -18,-32768,-32768};#define YYLAST 101static const short yytable[] ={ 99, 2, 26, 38, 72, 39, 27, 28, 3, 4, 5, 6, 7, 8, 9, 10, 73, 11, 12, 13, 14, 29, 15, 30, 16, 31, 32, 33, 34, 17, 18, 19, 20, 21, 22, 23, 24, 35, 37, 40, 41, 36, 42, 43, 44, 45, 46, 47, 48, 49, 0, 50, 86, 51, 53, 55, 0, 57, 58, 60, 61, 62, 63, 52, 64, 56, 68, 70, 0, 65, 74, 75, 0, 0, 66, 67, 80, 71, 82, 83, 84, 0, 77, 78, 79, 81, 87, 85, 88, 89, 100, 90, 93, 91, 0, 92, 94, 95, 96, 97, 0, 98};static const short yycheck[] ={ 0, 1, 15, 23, 3, 25, 3, 3, 8, 9, 10, 11, 12, 13, 14, 15, 15, 17, 18, 19, 20, 3, 22, 3, 24, 15, 3, 3, 3, 29, 30, 31, 32, 33, 34, 35, 36, 3, 3, 28, 3, 15, 3, 3, 3, 3, 3, 3, 3, 3, -1, 4, 70, 15, 5, 4, -1, 5, 5, 3, 5, 3, 5, 15, 3, 15, 3, 3, -1, 15, 4, 6, -1, -1, 15, 15, 5, 15, 3, 5, 3, -1, 15, 15, 15, 15, 7, 15, 15, 4, 0, 15, 5, 15, -1, 15, 15, 15, 15, 7, -1, 15};/* -*-C-*- Note some compilers choke on comments on `#line' lines. */#line 3 "/usr/share/bison/bison.simple"/* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 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. *//* 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. */#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)/* The parser invokes alloca or malloc; define the necessary symbols. */# if YYSTACK_USE_ALLOCA# define YYSTACK_ALLOC alloca# else# ifndef YYSTACK_USE_ALLOCA# if defined (alloca) || defined (_ALLOCA_H)# define YYSTACK_ALLOC alloca# else# ifdef __GNUC__# define YYSTACK_ALLOC __builtin_alloca# endif# endif# endif# endif# ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)# else# if defined (__STDC__) || defined (__cplusplus)# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */# define YYSIZE_T size_t# endif# define YYSTACK_ALLOC malloc# define YYSTACK_FREE free# endif#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */#if (! defined (yyoverflow) \ && (! defined (__cplusplus) \ || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))/* A type that is properly aligned for any stack member. */union yyalloc{ short yyss; YYSTYPE yyvs;# if YYLSP_NEEDED YYLTYPE yyls;# endif};/* The size of the maximum gap between one aligned stack and the next. */# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)/* The size of an array large to enough to hold all stacks, each with N elements. */# if YYLSP_NEEDED# define YYSTACK_BYTES(N) \ ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + 2 * YYSTACK_GAP_MAX)# else# define YYSTACK_BYTES(N) \ ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAX)# endif/* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */# ifndef YYCOPY# if 1 < __GNUC__# define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))# else# define YYCOPY(To, From, Count) \ do \ { \ register 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_MAX; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0)#endif#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)# if defined (__STDC__) || defined (__cplusplus)# include <stddef.h> /* INFRINGES ON USER NAME SPACE */# define YYSIZE_T size_t# endif#endif#if ! defined (YYSIZE_T)# define YYSIZE_T unsigned int#endif#define yyerrok (yyerrstatus = 0)#define yyclearin (yychar = YYEMPTY)#define YYEMPTY -2#define YYEOF 0#define YYACCEPT goto yyacceptlab#define YYABORT goto yyabortlab#define YYERROR goto yyerrlab1/* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. */#define YYFAIL goto yyerrlab#define YYRECOVERING() (!!yyerrstatus)#define YYBACKUP(Token, Value) \do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yychar1 = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { \ yyerror ("syntax error: cannot back up"); \ YYERROR; \ } \while (0)#define YYTERROR 1#define YYERRCODE 256/* YYLLOC_DEFAULT -- Compute the default location (before the actions are run). When YYLLOC_DEFAULT is run, CURRENT is set the location of the first token. By default, to implement support for ranges, extend its range to the last symbol. */#ifndef YYLLOC_DEFAULT# define YYLLOC_DEFAULT(Current, Rhs, N) \ Current.last_line = Rhs[N].last_line; \ Current.last_column = Rhs[N].last_column;#endif/* YYLEX -- calling `yylex' with the right arguments. */#if YYPURE# if YYLSP_NEEDED# ifdef YYLEX_PARAM# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)# else# define YYLEX yylex (&yylval, &yylloc)# endif# else /* !YYLSP_NEEDED */# ifdef YYLEX_PARAM# define YYLEX yylex (&yylval, YYLEX_PARAM)# else# define YYLEX yylex (&yylval)# endif# endif /* !YYLSP_NEEDED */#else /* !YYPURE */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -