PostgreSQL Source Code git master
|
#include "postgres_fe.h"
#include "fe_utils/psqlscan_int.h"
#include "pgbench.h"
#include "exprparse.h"
Go to the source code of this file.
Functions | |
int | yylex (YYSTYPE *yylval_param, yyscan_t yyscanner) |
void | expr_yyerror_more (yyscan_t yyscanner, const char *message, const char *more) |
void | expr_yyerror (PgBenchExpr **expr_parse_result_p, yyscan_t yyscanner, const char *message) |
bool | expr_lex_one_word (PsqlScanState state, PQExpBuffer word_buf, int *offset) |
yyscan_t | expr_scanner_init (PsqlScanState state, const char *source, int lineno, int start_offset, const char *command) |
void | expr_scanner_finish (yyscan_t yyscanner) |
int | expr_scanner_offset (PsqlScanState state) |
char * | expr_scanner_get_substring (PsqlScanState state, int start_offset, int end_offset, bool chomp) |
int | expr_scanner_get_lineno (PsqlScanState state, int offset) |
Variables | |
static const char * | expr_source = NULL |
static int | expr_lineno = 0 |
static int | expr_start_offset = 0 |
static const char * | expr_command = NULL |
static bool | last_was_newline = false |
bool expr_lex_one_word | ( | PsqlScanState | state, |
PQExpBuffer | word_buf, | ||
int * | offset | ||
) |
Definition at line 315 of file exprscan.l.
References Assert, expr_scanner_offset(), PQExpBufferData::len, psql_scan_reselect_sql_lexer(), resetPQExpBuffer(), and yylex().
Referenced by process_backslash_command().
void expr_scanner_finish | ( | yyscan_t | yyscanner | ) |
Definition at line 396 of file exprscan.l.
References psql_scan_reselect_sql_lexer().
Referenced by process_backslash_command().
int expr_scanner_get_lineno | ( | PsqlScanState | state, |
int | offset | ||
) |
Definition at line 456 of file exprscan.l.
Referenced by ParseScript(), and process_backslash_command().
char * expr_scanner_get_substring | ( | PsqlScanState | state, |
int | start_offset, | ||
int | end_offset, | ||
bool | chomp | ||
) |
Definition at line 426 of file exprscan.l.
References Assert, and pg_malloc().
Referenced by expr_yyerror_more(), and process_backslash_command().
yyscan_t expr_scanner_init | ( | PsqlScanState | state, |
const char * | source, | ||
int | lineno, | ||
int | start_offset, | ||
const char * | command | ||
) |
Definition at line 364 of file exprscan.l.
References Assert, expr_command, expr_lineno, expr_source, expr_start_offset, and source.
Referenced by process_backslash_command().
int expr_scanner_offset | ( | PsqlScanState | state | ) |
Definition at line 415 of file exprscan.l.
Referenced by expr_lex_one_word(), expr_yyerror_more(), ParseScript(), and process_backslash_command().
void expr_yyerror | ( | PgBenchExpr ** | expr_parse_result_p, |
yyscan_t | yyscanner, | ||
const char * | message | ||
) |
Definition at line 304 of file exprscan.l.
References expr_yyerror_more().
void expr_yyerror_more | ( | yyscan_t | yyscanner, |
const char * | message, | ||
const char * | more | ||
) |
Definition at line 271 of file exprscan.l.
References expr_command, expr_lineno, expr_scanner_get_substring(), expr_scanner_offset(), expr_source, expr_start_offset, last_was_newline, syntax_error(), and yylex().
Referenced by expr_yyerror().
Definition at line 94 of file exprscan.l.
Referenced by expr_lex_one_word(), and expr_yyerror_more().
|
static |
Definition at line 42 of file exprscan.l.
Referenced by expr_scanner_init(), and expr_yyerror_more().
|
static |
Definition at line 40 of file exprscan.l.
Referenced by expr_scanner_init(), and expr_yyerror_more().
|
static |
Definition at line 39 of file exprscan.l.
Referenced by expr_scanner_init(), and expr_yyerror_more().
|
static |
Definition at line 41 of file exprscan.l.
Referenced by expr_scanner_init(), and expr_yyerror_more().
|
static |
Definition at line 45 of file exprscan.l.
Referenced by expr_yyerror_more().