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 36 of file parser.c.

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

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

37 {
39  base_yy_extra_type yyextra;
40  int yyresult;
41 
42  /* initialize the flex scanner */
43  yyscanner = scanner_init(str, &yyextra.core_yy_extra,
45 
46  /* base_yylex() only needs this much initialization */
47  yyextra.have_lookahead = false;
48 
49  /* initialize the bison parser */
50  parser_init(&yyextra);
51 
52  /* Parse! */
53  yyresult = base_yyparse(yyscanner);
54 
55  /* Clean up (release memory) */
56  scanner_finish(yyscanner);
57 
58  if (yyresult) /* error */
59  return NIL;
60 
61  return yyextra.parsetree;
62 }
#define NIL
Definition: pg_list.h:69
int base_yyparse(core_yyscan_t yyscanner)
void * core_yyscan_t
Definition: scanner.h:116
const int NumScanKeywords
Definition: keywords.c:45
core_yy_extra_type core_yy_extra
Definition: gramparse.h:40
const ScanKeyword ScanKeywords[]
Definition: keywords.c:41
void parser_init(base_yy_extra_type *yyext)
core_yyscan_t scanner_init(const char *str, core_yy_extra_type *yyext, const ScanKeyword *keywords, int num_keywords)
static core_yyscan_t yyscanner
Definition: pl_scanner.c:210
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().