⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bootparse.c

📁 PostgreSQL 8.1.4的源码 适用于Linux下的开源数据库系统
💻 C
📖 第 1 页 / 共 4 页
字号:
/* A Bison parser, made by GNU Bison 1.875.  *//* Skeleton parser for Yacc-like parsing with 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.  *//* Written by Richard Stallman by simplifying the original so called   ``semantic'' parser.  *//* All symbols defined below should begin with Int_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/* Skeleton name.  */#define YYSKELETON_NAME "yacc.c"/* Pure parsers.  */#define YYPURE 0/* Using locations.  */#define YYLSP_NEEDED 0/* Tokens.  */#ifndef YYTOKENTYPE# define YYTOKENTYPE   /* Put the tokens into the symbol table, so that GDB and other debuggers      know about them.  */   enum Int_yytokentype {     CONST_P = 258,     ID = 259,     OPEN = 260,     XCLOSE = 261,     XCREATE = 262,     INSERT_TUPLE = 263,     XDECLARE = 264,     INDEX = 265,     ON = 266,     USING = 267,     XBUILD = 268,     INDICES = 269,     UNIQUE = 270,     COMMA = 271,     EQUALS = 272,     LPAREN = 273,     RPAREN = 274,     OBJ_ID = 275,     XBOOTSTRAP = 276,     XSHARED_RELATION = 277,     XWITHOUT_OIDS = 278,     NULLVAL = 279,     low = 280,     high = 281   };#endif#define CONST_P 258#define ID 259#define OPEN 260#define XCLOSE 261#define XCREATE 262#define INSERT_TUPLE 263#define XDECLARE 264#define INDEX 265#define ON 266#define USING 267#define XBUILD 268#define INDICES 269#define UNIQUE 270#define COMMA 271#define EQUALS 272#define LPAREN 273#define RPAREN 274#define OBJ_ID 275#define XBOOTSTRAP 276#define XSHARED_RELATION 277#define XWITHOUT_OIDS 278#define NULLVAL 279#define low 280#define high 281/* Copy the first part of user declarations.  */#line 1 "bootparse.y"/*------------------------------------------------------------------------- * * bootparse.y *	  yacc parser grammar for the "backend" initialization program. * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION *	  $PostgreSQL: pgsql/src/backend/bootstrap/bootparse.y,v 1.78 2005/08/26 03:07:00 tgl Exp $ * *------------------------------------------------------------------------- */#include "postgres.h"#include <unistd.h>#include "access/attnum.h"#include "access/htup.h"#include "access/itup.h"#include "access/skey.h"#include "access/tupdesc.h"#include "access/xact.h"#include "bootstrap/bootstrap.h"#include "catalog/catalog.h"#include "catalog/heap.h"#include "catalog/pg_am.h"#include "catalog/pg_attribute.h"#include "catalog/pg_authid.h"#include "catalog/pg_class.h"#include "catalog/pg_namespace.h"#include "catalog/pg_tablespace.h"#include "commands/defrem.h"#include "miscadmin.h"#include "nodes/makefuncs.h"#include "nodes/nodes.h"#include "nodes/parsenodes.h"#include "nodes/pg_list.h"#include "nodes/primnodes.h"#include "rewrite/prs2lock.h"#include "storage/block.h"#include "storage/fd.h"#include "storage/ipc.h"#include "storage/itemptr.h"#include "storage/off.h"#include "storage/smgr.h"#include "tcop/dest.h"#include "utils/rel.h"#define atooid(x)	((Oid) strtoul((x), NULL, 10))static voiddo_start(void){	StartTransactionCommand();	elog(DEBUG4, "start transaction");}static voiddo_end(void){	CommitTransactionCommand();	elog(DEBUG4, "commit transaction");	CHECK_FOR_INTERRUPTS();		/* allow SIGINT to kill bootstrap run */	if (isatty(0))	{		printf("bootstrap> ");		fflush(stdout);	}}int num_columns_read = 0;/* 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#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)#line 83 "bootparse.y"typedef union YYSTYPE {	List		*list;	IndexElem	*ielem;	char		*str;	int			ival;	Oid			oidval;} YYSTYPE;/* Line 191 of yacc.c.  */#line 216 "y.tab.c"# define Int_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 214 of yacc.c.  */#line 228 "y.tab.c"#if ! defined (Int_yyoverflow) || 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 (Int_yyoverflow) || YYERROR_VERBOSE */#if (! defined (Int_yyoverflow) \     && (! defined (__cplusplus) \	 || (YYSTYPE_IS_TRIVIAL)))/* A type that is properly aligned for any stack member.  */union Int_yyalloc{  short Int_yyss;  YYSTYPE Int_yyvs;  };/* The size of the maximum gap between one aligned stack and the next.  */# define YYSTACK_GAP_MAXIMUM (sizeof (union Int_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) + sizeof (YYSTYPE))				\      + YYSTACK_GAP_MAXIMUM)/* 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 Int_yyi;		\	  for (Int_yyi = 0; Int_yyi < (Count); Int_yyi++)	\	    (To)[Int_yyi] = (From)[Int_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 Int_yynewbytes;						\	YYCOPY (&Int_yyptr->Stack, Stack, Int_yysize);				\	Stack = &Int_yyptr->Stack;						\	Int_yynewbytes = Int_yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \	Int_yyptr += Int_yynewbytes / sizeof (*Int_yyptr);				\      }									\    while (0)#endif#if defined (__STDC__) || defined (__cplusplus)   typedef signed char Int_yysigned_char;#else   typedef short Int_yysigned_char;#endif/* YYFINAL -- State number of the termination state. */#define YYFINAL  27/* YYLAST -- Last index in YYTABLE.  */#define YYLAST   78/* YYNTOKENS -- Number of terminals. */#define YYNTOKENS  27/* YYNNTS -- Number of nonterminals. */#define YYNNTS  27/* YYNRULES -- Number of rules. */#define YYNRULES  46/* YYNRULES -- Number of states. */#define YYNSTATES  85/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */#define YYUNDEFTOK  2#define YYMAXUTOK   281#define YYTRANSLATE(YYX) 						\  ((unsigned int) (YYX) <= YYMAXUTOK ? Int_yytranslate[YYX] : YYUNDEFTOK)/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */static const unsigned char Int_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,     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};#if YYDEBUG/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in   YYRHS.  */static const unsigned char Int_yyprhs[] ={       0,     0,     3,     5,     6,     8,    11,    13,    15,    17,      19,    21,    23,    25,    28,    31,    33,    34,    35,    47,      48,    55,    67,    80,    83,    87,    89,    92,    94,    95,      97,    98,   100,   101,   103,   107,   111,   113,   117,   118,     120,   123,   127,   129,   131,   133,   135};/* YYRHS -- A `-1'-separated list of the rules' RHS. */static const Int_yysigned_char Int_yyrhs[] ={      28,     0,    -1,    29,    -1,    -1,    30,    -1,    29,    30,      -1,    31,    -1,    32,    -1,    33,    -1,    36,    -1,    38,      -1,    39,    -1,    40,    -1,     5,    53,    -1,     6,    53,      -1,     6,    -1,    -1,    -1,     7,    43,    44,    45,    53,      48,    18,    34,    46,    35,    19,    -1,    -1,     8,    49,      37,    18,    50,    19,    -1,     9,    10,    53,    48,    11,      53,    12,    53,    18,    41,    19,    -1,     9,    15,    10,      53,    48,    11,    53,    12,    53,    18,    41,    19,    -1,      13,    14,    -1,    41,    16,    42,    -1,    42,    -1,    53,      53,    -1,    21,    -1,    -1,    22,    -1,    -1,    23,    -1,      -1,    47,    -1,    46,    16,    47,    -1,    53,    17,    53,      -1,    53,    -1,    20,    17,    48,    -1,    -1,    51,    -1,      50,    51,    -1,    50,    16,    51,    -1,    53,    -1,    52,      -1,    24,    -1,     3,    -1,     4,    -1};/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */static const unsigned short Int_yyrline[] ={       0,   111,   111,   112,   116,   117,   121,   122,   123,   124,     125,   126,   127,   131,   140,   146,   156,   166,   155,   219,     218,   243,   261,   279,   289,   290,   294,   305,   306,   310,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -