static const char * expr_source
static bool last_was_newline
static int expr_start_offset
static const char * expr_command
55%option never-interactive
61%option prefix="expr_yy"
64alpha [a-zA-Z\200-\377_]
66alnum [A-Za-z\200-\377_0-9]
69nonspace [^ \t\r\f\v\n]
73continuation \\\r?{newline}
85false [Ff][Aa][Ll][Ss][Ee]
88isnull [Ii][Ss][Nn][Uu][Ll][Ll]
89notnull [Nn][Oo][Tt][Nn][Uu][Ll][Ll]
107 BEGIN(cur_state->start_state);
110 last_was_newline =
false;
void psqlscan_emit(PsqlScanState state, const char *txt, int len)
125{nonspace}+{continuation} {
128 if (
yytext[wordlen] ==
'\r')
#define Assert(condition)
155"<>" {
return NE_OP; }
156"!=" {
return NE_OP; }
157"<=" {
return LE_OP; }
158">=" {
return GE_OP; }
159"<<" {
return LS_OP; }
160">>" {
return RS_OP; }
173{or} {
return OR_OP; }
175{is} {
return IS_OP; }
char * pg_strdup(const char *in)
199"9223372036854775808" {
void expr_yyerror_more(yyscan_t yyscanner, const char *message, const char *more)
bool strtoint64(const char *str, bool errorOK, int64 *result)
214{digit}+(\.{digit}*)?([eE][-+]?{digit}+)? {
bool strtodouble(const char *str, bool errorOK, double *dv)
220\.{digit}+([eE][-+]?{digit}+)? {
void psqlscan_select_top_buffer(PsqlScanState state)
void psqlscan_pop_buffer_stack(PsqlScanState state)
289 while (
yylex(&lval, yyscanner))
395 return state->scanner;
bool expr_lex_one_word(PsqlScanState state, PQExpBuffer word_buf, int *offset)
char * expr_scanner_get_substring(PsqlScanState state, int start_offset, bool chomp)
void expr_yyerror(PgBenchExpr **expr_parse_result_p, yyscan_t yyscanner, const char *message)
void expr_scanner_finish(yyscan_t yyscanner)
yyscan_t expr_scanner_init(PsqlScanState state, const char *source, int lineno, int start_offset, const char *command)
void * pg_malloc(size_t size)
static rewind_source * source
void syntax_error(const char *source, int lineno, const char *line, const char *command, const char *msg, const char *more, int column)
void resetPQExpBuffer(PQExpBuffer str)
void psql_scan_get_location(PsqlScanState state, int *lineno, int *offset)
void psql_scan_reselect_sql_lexer(PsqlScanState state)