|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <ctype.h>#include <unistd.h>#include "common/string.h"#include "gramparse.h"#include "nodes/miscnodes.h"#include "parser/parser.h"#include "parser/scansup.h"#include "port/pg_bitutils.h"#include "mb/pg_wchar.h"#include "utils/builtins.h"#include "parser/kwlist.h"Go to the source code of this file.
Macros | |
| #define | fprintf(file, fmt, msg) fprintf_to_ereport(fmt, msg) |
| #define | PG_KEYWORD(kwname, value, category, collabel) value, |
| #define | YYSTYPE core_YYSTYPE |
| #define | SET_YYLLOC() (*(yylloc) = yytext - yyextra->scanbuf) |
| #define | ADVANCE_YYLLOC(delta) ( *(yylloc) += (delta) ) |
| #define | PUSH_YYLLOC() (yyextra->save_yylloc = *(yylloc)) |
| #define | POP_YYLLOC() (*(yylloc) = yyextra->save_yylloc) |
| #define | startlit() ( yyextra->literallen = 0 ) |
| #define | yyerror(msg) scanner_yyerror(msg, yyscanner) |
| #define | lexer_errposition() scanner_errposition(*(yylloc), yyscanner) |
| #define | yyextra (((struct yyguts_t *) yyscanner)->yyextra_r) |
| #define | yylloc (((struct yyguts_t *) yyscanner)->yylloc_r) |
| #define | yyleng (((struct yyguts_t *) yyscanner)->yyleng_r) |
Variables | |
| int | backslash_quote = BACKSLASH_QUOTE_SAFE_ENCODING |
| const uint16 | ScanKeywordTokens [] |
| #define fprintf | ( | file, | |
| fmt, | |||
| msg | |||
| ) | fprintf_to_ereport(fmt, msg) |
| #define lexer_errposition | ( | ) | scanner_errposition(*(yylloc), yyscanner) |
| #define startlit | ( | ) | ( yyextra->literallen = 0 ) |
| #define yyerror | ( | msg | ) | scanner_yyerror(msg, yyscanner) |
|
static |
Definition at line 1284 of file scan.l.
References fb(), pg_nextpower2_32(), repalloc(), and yyextra.
Referenced by addunicode().
|
static |
Definition at line 1352 of file scan.l.
References addlit(), buf, cancel_scanner_errposition_callback(), fb(), is_valid_unicode_codepoint(), MAX_UNICODE_EQUIVALENT_STRING, pg_unicode_to_server(), setup_scanner_errposition_callback(), yyerror, and yylloc.
| void cancel_scanner_errposition_callback | ( | ScannerCallbackState * | scbstate | ) |
Definition at line 1178 of file scan.l.
References error_context_stack, fb(), and ErrorContextCallback::previous.
Referenced by addunicode(), and str_udeescape().
| void * core_yyalloc | ( | yy_size_t | bytes, |
| core_yyscan_t | yyscanner | ||
| ) |
| void core_yyfree | ( | void * | ptr, |
| core_yyscan_t | yyscanner | ||
| ) |
| void * core_yyrealloc | ( | void * | ptr, |
| yy_size_t | bytes, | ||
| core_yyscan_t | yyscanner | ||
| ) |
|
static |
Definition at line 1335 of file scan.l.
References ErrorSaveContext::error_occurred, fb(), pg_strtoint32_safe(), pstrdup(), and val.
| int scanner_errposition | ( | int | location, |
| core_yyscan_t | yyscanner | ||
| ) |
Definition at line 1115 of file scan.l.
References errposition(), pg_mbstrlen_with_len(), and yyextra.
Referenced by scb_error_callback(), and str_udeescape().
| void scanner_finish | ( | core_yyscan_t | yyscanner | ) |
Definition at line 1264 of file scan.l.
References pfree(), and yyextra.
Referenced by fill_in_constant_lengths(), plpgsql_scanner_finish(), and raw_parser().
| core_yyscan_t scanner_init | ( | const char * | str, |
| core_yy_extra_type * | yyext, | ||
| const ScanKeywordList * | keywordlist, | ||
| const uint16 * | keyword_tokens | ||
| ) |
Definition at line 1224 of file scan.l.
References backslash_quote, elog, ERROR, fb(), palloc(), and str.
Referenced by fill_in_constant_lengths(), plpgsql_scanner_init(), and raw_parser().
| void scanner_yyerror | ( | const char * | message, |
| core_yyscan_t | yyscanner | ||
| ) |
Definition at line 1197 of file scan.l.
References _, ereport, errcode(), errmsg(), ERROR, fb(), lexer_errposition, yyextra, and yylloc.
Referenced by base_yylex().
Definition at line 1136 of file scan.l.
References arg, fb(), geterrcode(), and scanner_errposition().
Referenced by setup_scanner_errposition_callback().
| void setup_scanner_errposition_callback | ( | ScannerCallbackState * | scbstate, |
| core_yyscan_t | yyscanner, | ||
| int | location | ||
| ) |
Definition at line 1161 of file scan.l.
References error_context_stack, fb(), and scb_error_callback().
Referenced by addunicode(), and str_udeescape().
Definition at line 1371 of file scan.l.
References IS_HIGHBIT_SET, and yyextra.
Definition at line 437 of file scan.l.
| int backslash_quote = BACKSLASH_QUOTE_SAFE_ENCODING |
Definition at line 69 of file scan.l.
Referenced by scanner_init().
Definition at line 80 of file scan.l.
Referenced by fill_in_constant_lengths(), and raw_parser().