PostgreSQL Source Code  git master
parser.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * parser.h
4  * Definitions for the "raw" parser (flex and bison phases only)
5  *
6  * This is the external API for the raw lexing/parsing functions.
7  *
8  * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
9  * Portions Copyright (c) 1994, Regents of the University of California
10  *
11  * src/include/parser/parser.h
12  *
13  *-------------------------------------------------------------------------
14  */
15 #ifndef PARSER_H
16 #define PARSER_H
17 
18 #include "nodes/parsenodes.h"
19 
20 
21 /*
22  * RawParseMode determines the form of the string that raw_parser() accepts:
23  *
24  * RAW_PARSE_DEFAULT: parse a semicolon-separated list of SQL commands,
25  * and return a List of RawStmt nodes.
26  *
27  * RAW_PARSE_TYPE_NAME: parse a type name, and return a one-element List
28  * containing a TypeName node.
29  *
30  * RAW_PARSE_PLPGSQL_EXPR: parse a PL/pgSQL expression, and return
31  * a one-element List containing a RawStmt node.
32  *
33  * RAW_PARSE_PLPGSQL_ASSIGNn: parse a PL/pgSQL assignment statement,
34  * and return a one-element List containing a RawStmt node. "n"
35  * gives the number of dotted names comprising the target ColumnRef.
36  */
37 typedef enum
38 {
45 } RawParseMode;
46 
47 /* Values for the backslash_quote GUC */
48 typedef enum
49 {
54 
55 /* GUC variables in scan.l (every one of these is a bad idea :-() */
56 extern int backslash_quote;
57 extern bool escape_string_warning;
59 
60 
61 /* Primary entry point for the raw parsing functions */
62 extern List *raw_parser(const char *str, RawParseMode mode);
63 
64 /* Utility functions exported by gram.y (perhaps these should be elsewhere) */
65 extern List *SystemFuncName(char *name);
66 extern TypeName *SystemTypeName(char *name);
67 
68 #endif /* PARSER_H */
static PgChecksumMode mode
Definition: pg_checksums.c:61
List * SystemFuncName(char *name)
List * raw_parser(const char *str, RawParseMode mode)
Definition: parser.c:42
RawParseMode
Definition: parser.h:37
bool escape_string_warning
#define PGDLLIMPORT
Definition: c.h:1317
BackslashQuoteType
Definition: parser.h:48
TypeName * SystemTypeName(char *name)
int backslash_quote
PGDLLIMPORT bool standard_conforming_strings
const char * name
Definition: encode.c:515
Definition: pg_list.h:50