PostgreSQL Source Code  git master
parser.h File Reference
#include "nodes/parsenodes.h"
Include dependency graph for parser.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  BackslashQuoteType { BACKSLASH_QUOTE_OFF, BACKSLASH_QUOTE_ON, BACKSLASH_QUOTE_SAFE_ENCODING }
 

Functions

Listraw_parser (const char *str)
 
ListSystemFuncName (char *name)
 
TypeNameSystemTypeName (char *name)
 

Variables

int backslash_quote
 
bool escape_string_warning
 
PGDLLIMPORT bool standard_conforming_strings
 

Enumeration Type Documentation

◆ BackslashQuoteType

Enumerator
BACKSLASH_QUOTE_OFF 
BACKSLASH_QUOTE_ON 
BACKSLASH_QUOTE_SAFE_ENCODING 

Definition at line 21 of file parser.h.

Function Documentation

◆ raw_parser()

List* raw_parser ( const char *  str)

Definition at line 42 of file parser.c.

References base_yyparse(), base_yy_extra_type::core_yy_extra, base_yy_extra_type::have_lookahead, NIL, parser_init(), base_yy_extra_type::parsetree, ScanKeywords, ScanKeywordTokens, scanner_finish(), scanner_init(), and yyscanner.

Referenced by ATPostAlterTypeParse(), pg_parse_query(), and typeStringToTypeName().

43 {
45  base_yy_extra_type yyextra;
46  int yyresult;
47 
48  /* initialize the flex scanner */
49  yyscanner = scanner_init(str, &yyextra.core_yy_extra,
51 
52  /* base_yylex() only needs this much initialization */
53  yyextra.have_lookahead = false;
54 
55  /* initialize the bison parser */
56  parser_init(&yyextra);
57 
58  /* Parse! */
59  yyresult = base_yyparse(yyscanner);
60 
61  /* Clean up (release memory) */
62  scanner_finish(yyscanner);
63 
64  if (yyresult) /* error */
65  return NIL;
66 
67  return yyextra.parsetree;
68 }
#define NIL
Definition: pg_list.h:65
int base_yyparse(core_yyscan_t yyscanner)
void * core_yyscan_t
Definition: scanner.h:117
PGDLLIMPORT const uint16 ScanKeywordTokens[]
core_yy_extra_type core_yy_extra
Definition: gramparse.h:40
PGDLLIMPORT const ScanKeywordList ScanKeywords
void parser_init(base_yy_extra_type *yyext)
core_yyscan_t scanner_init(const char *str, core_yy_extra_type *yyext, const ScanKeywordList *keywordlist, const uint16 *keyword_tokens)
static core_yyscan_t yyscanner
Definition: pl_scanner.c:106
void scanner_finish(core_yyscan_t yyscanner)

◆ SystemFuncName()

◆ SystemTypeName()

TypeName* SystemTypeName ( char *  name)

Variable Documentation

◆ backslash_quote

int backslash_quote

◆ escape_string_warning

bool escape_string_warning

◆ standard_conforming_strings

PGDLLIMPORT bool standard_conforming_strings

Referenced by simple_quote_literal().