1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +03:00

Move some declarations in the raw-parser header files to create a clearer

distinction between the external API (parser.h) and declarations that only
need to be visible within the raw parser code (gramparse.h, which now is only
included by parser.c, gram.y, scan.l, and keywords.c).  This is in preparation
for the upcoming change to a reentrant lexer, which will require referencing
YYSTYPE in the declarations of base_yylex and filtered_base_yylex, hence
gram.h will have to be included by gramparse.h.  We don't want any more files
than absolutely necessary to depend on gram.h, so some cleanup is called for.
This commit is contained in:
Tom Lane
2009-07-12 17:12:34 +00:00
parent 23d830bd9a
commit 6566e37e02
12 changed files with 53 additions and 44 deletions

View File

@ -1,23 +1,43 @@
/*-------------------------------------------------------------------------
*
* parser.h
* Definitions for the "raw" parser (lex and yacc phases only)
* Definitions for the "raw" parser (flex and bison phases only)
*
* This is the external API for the raw lexing/parsing functions.
*
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/parser/parser.h,v 1.25 2009/04/19 21:50:08 tgl Exp $
* $PostgreSQL: pgsql/src/include/parser/parser.h,v 1.26 2009/07/12 17:12:34 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef PARSER_H
#define PARSER_H
#include "nodes/pg_list.h"
#include "nodes/parsenodes.h"
typedef enum
{
BACKSLASH_QUOTE_OFF,
BACKSLASH_QUOTE_ON,
BACKSLASH_QUOTE_SAFE_ENCODING
} BackslashQuoteType;
/* GUC variables in scan.l (every one of these is a bad idea :-() */
extern int backslash_quote;
extern bool escape_string_warning;
extern bool standard_conforming_strings;
/* Primary entry points for the raw parsing functions */
extern List *raw_parser(const char *str);
extern char *pg_parse_string_token(const char *token);
/* Utility functions exported by gram.y (perhaps these should be elsewhere) */
extern List *SystemFuncName(char *name);
extern TypeName *SystemTypeName(char *name);
#endif /* PARSER_H */