| 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-2017, PostgreSQL Global Development PGGroup |
| 9 | * Portions Copyright (c) 1994, Regents of the University of California |
| 10 | * |
| 11 | * src/include/parser/parser.h |
| 12 | * |
| 13 | *------------------------------------------------------------------------- |
| 14 | */ |
| 15 | #pragma once |
| 16 | |
| 17 | #include "nodes/parsenodes.hpp" |
| 18 | |
| 19 | |
| 20 | typedef enum PGBackslashQuoteType |
| 21 | { |
| 22 | PG_BACKSLASH_QUOTE_OFF, |
| 23 | PG_BACKSLASH_QUOTE_ON, |
| 24 | PG_BACKSLASH_QUOTE_SAFE_ENCODING |
| 25 | } PGBackslashQuoteType; |
| 26 | |
| 27 | /* GUC variables in scan.l (every one of these is a bad idea :-() */ |
| 28 | extern __thread int backslash_quote; |
| 29 | extern __thread bool escape_string_warning; |
| 30 | extern __thread bool standard_conforming_strings; |
| 31 | |
| 32 | /* Primary entry point for the raw parsing functions */ |
| 33 | extern PGList *raw_parser(const char *str); |
| 34 | |
| 35 | /* Utility functions exported by gram.y (perhaps these should be elsewhere) */ |
| 36 | extern PGList *SystemFuncName(const char *name); |
| 37 | extern PGTypeName *SystemTypeName(const char *name); |
| 38 | |
| 39 | |