OmniSciDB  91042dcc5b
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Scanner_wnd_pregen.cpp File Reference
#include <errno.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <FlexLexer.h>
#include <boost/algorithm/string/trim.hpp>
#include <cstdint>
#include "../Shared/sqldefs.h"
#include "parser.h"
+ Include dependency graph for Scanner_wnd_pregen.cpp:

Go to the source code of this file.

Classes

struct  yy_buffer_state
 
struct  yy_trans_info
 

Macros

#define YY_INT_ALIGNED   short int
 
#define FLEX_SCANNER
 
#define YY_FLEX_MAJOR_VERSION   2
 
#define YY_FLEX_MINOR_VERSION   5
 
#define YY_FLEX_SUBMINOR_VERSION   37
 
#define FLEX_BETA
 
#define yyFlexLexer   yyFlexLexer
 
#define FLEXINT_H
 
#define INT8_MIN   (-128)
 
#define INT16_MIN   (-32767 - 1)
 
#define INT32_MIN   (-2147483647 - 1)
 
#define INT8_MAX   (127)
 
#define INT16_MAX   (32767)
 
#define INT32_MAX   (2147483647)
 
#define UINT8_MAX   (255U)
 
#define UINT16_MAX   (65535U)
 
#define UINT32_MAX   (4294967295U)
 
#define SIZE_MAX   (~(size_t)0)
 
#define yyconst
 
#define YY_NULL   0
 
#define YY_SC_TO_UI(c)   ((unsigned int)(unsigned char)c)
 
#define BEGIN   (yy_start) = 1 + 2 *
 
#define YY_START   (((yy_start)-1) / 2)
 
#define YYSTATE   YY_START
 
#define YY_STATE_EOF(state)   (YY_END_OF_BUFFER + state + 1)
 
#define YY_NEW_FILE   yyrestart(yyin)
 
#define YY_END_OF_BUFFER_CHAR   0
 
#define YY_BUF_SIZE   16384
 
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
 
#define YY_TYPEDEF_YY_BUFFER_STATE
 
#define YY_TYPEDEF_YY_SIZE_T
 
#define EOB_ACT_CONTINUE_SCAN   0
 
#define EOB_ACT_END_OF_FILE   1
 
#define EOB_ACT_LAST_MATCH   2
 
#define YY_LESS_LINENO(n)
 
#define yyless(n)
 
#define unput(c)   yyunput(c, (yytext_ptr))
 
#define YY_STRUCT_YY_BUFFER_STATE
 
#define YY_BUFFER_NEW   0
 
#define YY_BUFFER_NORMAL   1
 
#define YY_BUFFER_EOF_PENDING   2
 
#define YY_CURRENT_BUFFER   ((yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : NULL)
 
#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]
 
#define yy_new_buffer   yy_create_buffer
 
#define yy_set_interactive(is_interactive)
 
#define yy_set_bol(at_bol)
 
#define YY_AT_BOL()   (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
 
#define YY_SKIP_YYWRAP
 
#define FLEX_DEBUG
 
#define yytext_ptr   yytext
 
#define YY_INTERACTIVE
 
#define YY_DO_BEFORE_ACTION
 
#define YY_NUM_RULES   168
 
#define YY_END_OF_BUFFER   169
 
#define REJECT
 
#define yymore()   ((yy_more_flag) = 1)
 
#define YY_MORE_ADJ   (yy_more_len)
 
#define YY_RESTORE_YY_MORE_OFFSET
 
#define yylval   (dynamic_cast<SQLLexer*>(this)->yylval)
 
#define parsed_str_tokens_   (dynamic_cast<SQLLexer*>(this)->parsed_str_tokens_)
 
#define TOK(name)   { return SQLParser::name; }
 
#define INITIAL   0
 
#define STATE_CREATE   1
 
#define STATE_CREATE_AS   2
 
#define STATE_INSERT   3
 
#define STATE_INSERT_INTO   4
 
#define YY_EXTRA_TYPE   void*
 
#define YY_READ_BUF_SIZE   8192
 
#define ECHO   LexerOutput(yytext, yyleng)
 
#define YY_INPUT(buf, result, max_size)
 
#define yyterminate()   return YY_NULL
 
#define YY_START_STACK_INCR   25
 
#define YY_FATAL_ERROR(msg)   LexerError(msg)
 
#define YY_DECL_IS_OURS   1
 
#define YY_DECL   int yyFlexLexer::yylex()
 
#define YY_USER_ACTION
 
#define YY_BREAK   break;
 
#define YY_RULE_SETUP   YY_USER_ACTION
 
#define YY_EXIT_FAILURE   2
 
#define yyless(n)
 
#define YYTABLES_NAME   "yytables"
 

Typedefs

typedef signed char flex_int8_t
 
typedef short int flex_int16_t
 
typedef int flex_int32_t
 
typedef unsigned char flex_uint8_t
 
typedef unsigned short int flex_uint16_t
 
typedef unsigned int flex_uint32_t
 
typedef struct yy_buffer_stateYY_BUFFER_STATE
 
typedef size_t yy_size_t
 
typedef unsigned char YY_CHAR
 

Functions

void * yyalloc (yy_size_t)
 
void * yyrealloc (void *, yy_size_t)
 
void yyfree (void *)
 
 if (!(yy_init))
 
 while (1)
 

Variables

yy_size_t yyleng
 
static yyconst flex_int16_t yy_acclist [2871]
 
static yyconst flex_int16_t yy_accept [1409]
 
static yyconst flex_int32_t yy_ec [256]
 
static yyconst flex_int32_t yy_meta [76]
 
static yyconst flex_int16_t yy_base [1492]
 
static yyconst flex_int16_t yy_def [1492]
 
static yyconst flex_int16_t yy_nxt [12584]
 
static yyconst flex_int16_t yy_chk [12584]
 
static yyconst flex_int32_t yy_rule_can_match_eol [169]
 
static yyconst flex_int16_t yy_rule_linenum [168]
 
 YY_DECL
 
char * yy_cp
 
char * yy_bp
 
int yy_act
 

Macro Definition Documentation

#define BEGIN   (yy_start) = 1 + 2 *
#define ECHO   LexerOutput(yytext, yyleng)

Definition at line 3450 of file Scanner_wnd_pregen.cpp.

Referenced by while().

#define EOB_ACT_CONTINUE_SCAN   0
#define EOB_ACT_END_OF_FILE   1
#define EOB_ACT_LAST_MATCH   2
#define FLEX_BETA

Definition at line 19 of file Scanner_wnd_pregen.cpp.

#define FLEX_DEBUG

Definition at line 385 of file Scanner_wnd_pregen.cpp.

#define FLEX_SCANNER

Definition at line 14 of file Scanner_wnd_pregen.cpp.

#define FLEXINT_H

Definition at line 52 of file Scanner_wnd_pregen.cpp.

#define INITIAL   0

Definition at line 3383 of file Scanner_wnd_pregen.cpp.

Referenced by while().

#define INT16_MAX   (32767)

Definition at line 94 of file Scanner_wnd_pregen.cpp.

Referenced by Parser::IntLiteral::analyzeValue().

#define INT16_MIN   (-32767 - 1)

Definition at line 85 of file Scanner_wnd_pregen.cpp.

Referenced by Parser::IntLiteral::analyzeValue().

#define INT8_MAX   (127)

Definition at line 91 of file Scanner_wnd_pregen.cpp.

#define INT8_MIN   (-128)

Definition at line 82 of file Scanner_wnd_pregen.cpp.

#define parsed_str_tokens_   (dynamic_cast<SQLLexer*>(this)->parsed_str_tokens_)

Definition at line 3375 of file Scanner_wnd_pregen.cpp.

Referenced by while().

#define REJECT
Value:
{ \
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
++(yy_lp); \
goto find_rule; \
}
char * yy_cp

Definition at line 3355 of file Scanner_wnd_pregen.cpp.

Referenced by while().

#define SIZE_MAX   (~(size_t)0)

Definition at line 110 of file Scanner_wnd_pregen.cpp.

Referenced by QueryPlanDagCache::addNodeIfAbsent().

#define STATE_CREATE   1

Definition at line 3384 of file Scanner_wnd_pregen.cpp.

Referenced by while().

#define STATE_CREATE_AS   2

Definition at line 3385 of file Scanner_wnd_pregen.cpp.

Referenced by while().

#define STATE_INSERT   3

Definition at line 3386 of file Scanner_wnd_pregen.cpp.

Referenced by while().

#define STATE_INSERT_INTO   4

Definition at line 3387 of file Scanner_wnd_pregen.cpp.

Referenced by while().

#define TOK (   name)    { return SQLParser::name; }

Definition at line 3380 of file Scanner_wnd_pregen.cpp.

Referenced by while().

#define UINT16_MAX   (65535U)

Definition at line 103 of file Scanner_wnd_pregen.cpp.

#define UINT8_MAX   (255U)

Definition at line 100 of file Scanner_wnd_pregen.cpp.

#define unput (   c)    yyunput(c, (yytext_ptr))

Definition at line 253 of file Scanner_wnd_pregen.cpp.

Referenced by while().

#define YY_AT_BOL ( )    (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

Definition at line 379 of file Scanner_wnd_pregen.cpp.

#define YY_BREAK   break;

Definition at line 3525 of file Scanner_wnd_pregen.cpp.

Referenced by while().

#define YY_BUF_SIZE   16384

Definition at line 196 of file Scanner_wnd_pregen.cpp.

Referenced by if(), yyFlexLexer::switch_streams(), and yyFlexLexer::yyrestart().

#define YY_BUFFER_EOF_PENDING   2

Definition at line 319 of file Scanner_wnd_pregen.cpp.

Referenced by yyFlexLexer::yy_get_next_buffer().

#define YY_BUFFER_NEW   0

Definition at line 307 of file Scanner_wnd_pregen.cpp.

Referenced by while(), and yyFlexLexer::yy_flush_buffer().

#define YY_BUFFER_NORMAL   1

Definition at line 308 of file Scanner_wnd_pregen.cpp.

Referenced by while().

#define YY_DECL   int yyFlexLexer::yylex()

Definition at line 3512 of file Scanner_wnd_pregen.cpp.

#define YY_DECL_IS_OURS   1

Definition at line 3508 of file Scanner_wnd_pregen.cpp.

#define YY_DO_BEFORE_ACTION
Value:
/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */ \
(yytext_ptr) -= (yy_more_len); \
yyleng = (size_t)(yy_cp - (yytext_ptr)); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */ \
(yy_c_buf_p) = yy_cp;
#define yytext_ptr
char * yy_bp
yy_size_t yyleng
char * yy_cp

Definition at line 404 of file Scanner_wnd_pregen.cpp.

Referenced by while().

#define YY_END_OF_BUFFER   169

Definition at line 416 of file Scanner_wnd_pregen.cpp.

Referenced by while().

#define YY_END_OF_BUFFER_CHAR   0
#define YY_EXIT_FAILURE   2

Definition at line 5478 of file Scanner_wnd_pregen.cpp.

Referenced by yyFlexLexer::LexerError().

#define YY_EXTRA_TYPE   void*

Definition at line 3402 of file Scanner_wnd_pregen.cpp.

#define YY_FLEX_MAJOR_VERSION   2

Definition at line 15 of file Scanner_wnd_pregen.cpp.

#define YY_FLEX_MINOR_VERSION   5

Definition at line 16 of file Scanner_wnd_pregen.cpp.

#define YY_FLEX_SUBMINOR_VERSION   37

Definition at line 17 of file Scanner_wnd_pregen.cpp.

#define YY_INPUT (   buf,
  result,
  max_size 
)
Value:
/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \
* \ */ \
\
/* %if-c++-only C++ definition \ */ \
if ((result = LexerInput((char*)buf, max_size)) < 0) \
YY_FATAL_ERROR("input in flex scanner failed");
#define YY_FATAL_ERROR(msg)
if(yyssp >=yyss+yystacksize-1)

Definition at line 3458 of file Scanner_wnd_pregen.cpp.

Referenced by yyFlexLexer::yy_get_next_buffer().

#define YY_INT_ALIGNED   short int

Definition at line 3 of file Scanner_wnd_pregen.cpp.

#define YY_INTERACTIVE

Definition at line 390 of file Scanner_wnd_pregen.cpp.

#define YY_LESS_LINENO (   n)
Value:
do { \
int yyl; \
for (yyl = n; yyl < yyleng; ++yyl) \
if (yytext[yyl] == '\n') \
--yylineno; \
} while (0)
yy_size_t yyleng
constexpr double n
Definition: Utm.h:38

Definition at line 233 of file Scanner_wnd_pregen.cpp.

#define YY_MORE_ADJ   (yy_more_len)
#define yy_new_buffer   yy_create_buffer

Definition at line 359 of file Scanner_wnd_pregen.cpp.

#define YY_NEW_FILE   yyrestart(yyin)

Definition at line 190 of file Scanner_wnd_pregen.cpp.

Referenced by while(), and yyFlexLexer::yyinput().

#define YY_NULL   0

Definition at line 153 of file Scanner_wnd_pregen.cpp.

#define YY_NUM_RULES   168

Definition at line 415 of file Scanner_wnd_pregen.cpp.

#define YY_READ_BUF_SIZE   8192

Definition at line 3442 of file Scanner_wnd_pregen.cpp.

Referenced by yyFlexLexer::yy_get_next_buffer().

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 3365 of file Scanner_wnd_pregen.cpp.

Referenced by while().

#define YY_RULE_SETUP   YY_USER_ACTION

Definition at line 3529 of file Scanner_wnd_pregen.cpp.

Referenced by while().

#define YY_SC_TO_UI (   c)    ((unsigned int)(unsigned char)c)

Definition at line 163 of file Scanner_wnd_pregen.cpp.

Referenced by while(), and yyFlexLexer::yy_get_previous_state().

#define yy_set_bol (   at_bol)
Value:
{ \
yyensure_buffer_stack(); \
YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
#define YY_BUF_SIZE
#define YY_CURRENT_BUFFER
#define YY_CURRENT_BUFFER_LVALUE
if(yyssp >=yyss+yystacksize-1)

Definition at line 370 of file Scanner_wnd_pregen.cpp.

#define yy_set_interactive (   is_interactive)
Value:
{ \
yyensure_buffer_stack(); \
YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
#define YY_BUF_SIZE
#define YY_CURRENT_BUFFER
#define YY_CURRENT_BUFFER_LVALUE
if(yyssp >=yyss+yystacksize-1)

Definition at line 361 of file Scanner_wnd_pregen.cpp.

#define YY_SKIP_YYWRAP

Definition at line 383 of file Scanner_wnd_pregen.cpp.

#define YY_START   (((yy_start)-1) / 2)

Definition at line 183 of file Scanner_wnd_pregen.cpp.

Referenced by while(), and yyFlexLexer::yy_push_state().

#define YY_START_STACK_INCR   25

Definition at line 3479 of file Scanner_wnd_pregen.cpp.

Referenced by yyFlexLexer::yy_push_state().

#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

Definition at line 201 of file Scanner_wnd_pregen.cpp.

Referenced by yyFlexLexer::ctor_common(), and if().

#define YY_STATE_EOF (   state)    (YY_END_OF_BUFFER + state + 1)

Definition at line 187 of file Scanner_wnd_pregen.cpp.

Referenced by while().

#define YY_STRUCT_YY_BUFFER_STATE

Definition at line 256 of file Scanner_wnd_pregen.cpp.

#define YY_TYPEDEF_YY_BUFFER_STATE

Definition at line 204 of file Scanner_wnd_pregen.cpp.

#define YY_TYPEDEF_YY_SIZE_T

Definition at line 209 of file Scanner_wnd_pregen.cpp.

#define YY_USER_ACTION

Definition at line 3520 of file Scanner_wnd_pregen.cpp.

#define yyconst

Definition at line 147 of file Scanner_wnd_pregen.cpp.

#define yyFlexLexer   yyFlexLexer

Definition at line 29 of file Scanner_wnd_pregen.cpp.

#define yyless (   n)
Value:
do { \
/* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg); \
*yy_cp = (yy_hold_char); \
yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} while (0)
#define YY_LESS_LINENO(n)
#define YY_RESTORE_YY_MORE_OFFSET
#define YY_DO_BEFORE_ACTION
char * yy_bp
#define YY_MORE_ADJ
constexpr double n
Definition: Utm.h:38
char * yy_cp

Definition at line 5493 of file Scanner_wnd_pregen.cpp.

#define yyless (   n)
Value:
do { \
/* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg); \
yytext[yyleng] = (yy_hold_char); \
(yy_c_buf_p) = yytext + yyless_macro_arg; \
(yy_hold_char) = *(yy_c_buf_p); \
*(yy_c_buf_p) = '\0'; \
yyleng = yyless_macro_arg; \
} while (0)
#define YY_LESS_LINENO(n)
yy_size_t yyleng
constexpr double n
Definition: Utm.h:38

Definition at line 5493 of file Scanner_wnd_pregen.cpp.

#define yylval   (dynamic_cast<SQLLexer*>(this)->yylval)

Definition at line 3374 of file Scanner_wnd_pregen.cpp.

Referenced by while().

#define yymore ( )    ((yy_more_flag) = 1)

Definition at line 3363 of file Scanner_wnd_pregen.cpp.

Referenced by while().

#define YYSTATE   YY_START

Definition at line 184 of file Scanner_wnd_pregen.cpp.

#define YYTABLES_NAME   "yytables"

Definition at line 5570 of file Scanner_wnd_pregen.cpp.

#define yyterminate ( )    return YY_NULL

Definition at line 3474 of file Scanner_wnd_pregen.cpp.

Referenced by while().

Typedef Documentation

typedef short int flex_int16_t

Definition at line 74 of file Scanner_wnd_pregen.cpp.

typedef int flex_int32_t

Definition at line 75 of file Scanner_wnd_pregen.cpp.

typedef signed char flex_int8_t

Definition at line 73 of file Scanner_wnd_pregen.cpp.

typedef unsigned short int flex_uint16_t

Definition at line 77 of file Scanner_wnd_pregen.cpp.

typedef unsigned int flex_uint32_t

Definition at line 78 of file Scanner_wnd_pregen.cpp.

typedef unsigned char flex_uint8_t

Definition at line 76 of file Scanner_wnd_pregen.cpp.

Definition at line 205 of file Scanner_wnd_pregen.cpp.

typedef unsigned char YY_CHAR

Definition at line 387 of file Scanner_wnd_pregen.cpp.

typedef size_t yy_size_t

Definition at line 210 of file Scanner_wnd_pregen.cpp.

Function Documentation

if ( yy_init)

Definition at line 3544 of file Scanner_wnd_pregen.cpp.

References YY_BUF_SIZE, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, YY_FATAL_ERROR, YY_STATE_BUF_SIZE, and yyalloc().

3544  {
3545  (yy_init) = 1;
3546 
3547 #ifdef YY_USER_INIT
3548  YY_USER_INIT;
3549 #endif
3550 
3551  /* Create the reject buffer large enough to save one state per allowed character. */
3552  if (!(yy_state_buf))
3553  (yy_state_buf) = (yy_state_type*)yyalloc(YY_STATE_BUF_SIZE);
3554  if (!(yy_state_buf))
3555  YY_FATAL_ERROR("out of dynamic memory in yylex()");
3556 
3557  if (!(yy_start))
3558  (yy_start) = 1; /* first start state */
3559 
3560  if (!yyin)
3561  /* %if-c-only */
3562  /* %endif */
3563  /* %if-c++-only */
3564  yyin.rdbuf(std::cin.rdbuf());
3565  /* %endif */
3566 
3567  if (!yyout)
3568  /* %if-c-only */
3569  /* %endif */
3570  /* %if-c++-only */
3571  yyout.rdbuf(std::cout.rdbuf());
3572  /* %endif */
3573 
3574  if (!YY_CURRENT_BUFFER) {
3575  yyensure_buffer_stack();
3576  YY_CURRENT_BUFFER_LVALUE = yy_create_buffer(yyin, YY_BUF_SIZE);
3577  }
3578 
3579  yy_load_buffer_state();
3580  }
#define YY_BUF_SIZE
#define YY_FATAL_ERROR(msg)
#define YY_STATE_BUF_SIZE
void * yyalloc(yy_size_t)
int yy_state_type
Definition: FlexLexer_wnd.h:55
#define YY_CURRENT_BUFFER
#define YY_CURRENT_BUFFER_LVALUE

+ Here is the call graph for this function:

while ( )

Definition at line 3582 of file Scanner_wnd_pregen.cpp.

References ACCESS, ADD, ALL, ALTER, AND, ANY, ARCHIVE, ARRAY, AS, ASC, AUTHORIZATION, BEGIN, BETWEEN, BIGINT, BOOLEAN, BY, CASE, CAST, CHAR_LENGTH, CHARACTER, CHECK, CLOSE, CLUSTER, COLUMN, COMMIT, COMPARISON, CONTINUE, COPY, CREATE, CURRENT, CURSOR, DASHBOARD, DASHEDNAME, DATABASE, DATAFRAME, DATE, DATE_TRUNC, DATETIME, DECIMAL, DECLARE, DEFAULT, DELETE, DESC, DICTIONARY, DISTINCT, DOUBLE, DROP, DUMP, ECHO, EDIT, EDITOR, ELSE, EMAIL, END, EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, EQUAL, EXISTS, EXTRACT, FETCH, FIRST, FIXEDNUM, FLOAT, FOR, FOREIGN, FOUND, FROM, FWDSTR, GEOGRAPHY, GEOMETRY, GRANT, GROUP, HAVING, i, IF, ILIKE, IN, INITIAL, INSERT, INTEGER, INTNUM, INTO, IS, kALL, kANY, kEQ, kGE, kGT, kLE, kLT, kNE, LANGUAGE, LAST, LENGTH, LIKE, LIMIT, LINESTRING, Parser::TrackedPtr< std::string >::make(), MOD, MULTIPOLYGON, NAME, NOT, NOW, NULLX, NUMERIC, OF, OFFSET, ON, OPEN, OPTIMIZE, OPTION, OR, ORDER, PARAMETER, parsed_str_tokens_, POINT, POLYGON, PRECISION, PRIMARY, PRIVILEGES, PROCEDURE, PUBLIC, QUOTED_IDENTIFIER, REAL, REFERENCES, REJECT, RENAME, RESTORE, REVOKE, ROLE, ROLLBACK, SCHEMA, SELECT, SELECTSTRING, SERVER, SET, SHARD, SHARED, SHOW, SMALLINT, SOME, SQL, STATE_CREATE, STATE_CREATE_AS, STATE_INSERT, STATE_INSERT_INTO, STRING, TABLE, TEMPORARY, TEXT, THEN, TIME, TIMESTAMP, TINYINT, TO, TOK, TRUNCATE, UNION, UNIQUE, unput, UPDATE, USAGE, USER, VALIDATE, VALUES, VIEW, WHEN, WHERE, WITH, WORK, yy_accept, yy_acclist, yy_act, yy_base, YY_BREAK, YY_BUFFER_NEW, YY_BUFFER_NORMAL, yy_chk, yy_cp, YY_CURRENT_BUFFER_LVALUE, yy_def, YY_DO_BEFORE_ACTION, yy_ec, YY_END_OF_BUFFER, YY_FATAL_ERROR, yy_meta, YY_MORE_ADJ, YY_NEW_FILE, yy_nxt, YY_RESTORE_YY_MORE_OFFSET, yy_rule_can_match_eol, yy_rule_linenum, YY_RULE_SETUP, YY_SC_TO_UI, YY_START, YY_STATE_EOF, yyFlexLexer::yyinput(), yyleng, yylval, yymore, yyterminate, and yytext_ptr.

3583  {
3584  /* %% [8.0] yymore()-related code goes here */
3585  (yy_more_len) = 0;
3586  if ((yy_more_flag)) {
3587  (yy_more_len) = (yy_c_buf_p) - (yytext_ptr);
3588  (yy_more_flag) = 0;
3589  }
3590  yy_cp = (yy_c_buf_p);
3591 
3592  /* Support of yytext. */
3593  *yy_cp = (yy_hold_char);
3594 
3595  /* yy_bp points to the position in yy_ch_buf of the start of
3596  * the current run.
3597  */
3598  yy_bp = yy_cp;
3599 
3600  /* %% [9.0] code to set up and find next match goes here */
3601  yy_current_state = (yy_start);
3602 
3603  (yy_state_ptr) = (yy_state_buf);
3604  *(yy_state_ptr)++ = yy_current_state;
3605 
3606  yy_match:
3607  do {
3608  YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
3609  while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) {
3610  yy_current_state = (int)yy_def[yy_current_state];
3611  if (yy_current_state >= 1408)
3612  yy_c = yy_meta[(unsigned int)yy_c];
3613  }
3614  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int)yy_c];
3615  *(yy_state_ptr)++ = yy_current_state;
3616  ++yy_cp;
3617  } while (yy_base[yy_current_state] != 12508);
3618 
3619  yy_find_action:
3620  /* %% [10.0] code to find the action number goes here */
3621  yy_current_state = *--(yy_state_ptr);
3622  (yy_lp) = yy_accept[yy_current_state];
3623  find_rule: /* we branch to this label when backing up */
3624  for (;;) /* until we find what rule we matched */
3625  {
3626  if ((yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1]) {
3627  yy_act = yy_acclist[(yy_lp)];
3628  {
3629  (yy_full_match) = yy_cp;
3630  break;
3631  }
3632  }
3633  --yy_cp;
3634  yy_current_state = *--(yy_state_ptr);
3635  (yy_lp) = yy_accept[yy_current_state];
3636  }
3637 
3639 
3640  /* %% [11.0] code for yylineno update goes here */
3641 
3643  yy_size_t yyl;
3644  for (yyl = (yy_more_len); yyl < yyleng; ++yyl)
3645  if (yytext[yyl] == '\n')
3646 
3647  yylineno++;
3648  ;
3649  }
3650 
3651  do_action: /* This label is used only to access EOF actions. */
3652 
3653  /* %% [12.0] debug code goes here */
3654  if (yy_flex_debug) {
3655  if (yy_act == 0)
3656  std::cerr << "--scanner backing up\n";
3657  else if (yy_act < 168)
3658  std::cerr << "--accepting rule at line " << yy_rule_linenum[yy_act] << "(\""
3659  << yytext << "\")\n";
3660  else if (yy_act == 168)
3661  std::cerr << "--accepting default rule (\"" << yytext << "\")\n";
3662  else if (yy_act == 169)
3663  std::cerr << "--(end of buffer or a NUL)\n";
3664  else
3665  std::cerr << "--EOF (start condition " << YY_START << ")\n";
3666  }
3667 
3668  switch (yy_act) { /* beginning of action switch */
3669  /* %% [13.0] actions go here */
3670  case 1:
3672  TOK(ACCESS)
3673  YY_BREAK
3674  case 2:
3675  YY_RULE_SETUP {
3676  yylval.qualval = kALL;
3677  TOK(ALL)
3678  }
3679  YY_BREAK
3680  case 3:
3682  TOK(ALTER)
3683  YY_BREAK
3684  case 4:
3686  TOK(ADD)
3687  YY_BREAK
3688  case 5:
3690  TOK(AND)
3691  YY_BREAK
3692  case 6:
3693  YY_RULE_SETUP {
3694  yylval.qualval = kANY;
3695  TOK(ANY)
3696  }
3697  YY_BREAK
3698  case 7:
3700  TOK(ARCHIVE)
3701  YY_BREAK
3702  case 8:
3704  TOK(ARRAY)
3705  YY_BREAK
3706  case 9:
3707  YY_RULE_SETUP {
3709  return SQLParser::AS;
3710  }
3711  YY_BREAK
3712  case 10:
3714  TOK(AS)
3715  YY_BREAK
3716  case 11:
3718  TOK(ASC)
3719  YY_BREAK
3720  case 12:
3723  YY_BREAK
3724  case 13:
3726  TOK(BETWEEN)
3727  YY_BREAK
3728  case 14:
3730  TOK(BIGINT)
3731  YY_BREAK
3732  case 15:
3734  TOK(BOOLEAN)
3735  YY_BREAK
3736  case 16:
3738  TOK(BY)
3739  YY_BREAK
3740  case 17:
3742  TOK(CASE)
3743  YY_BREAK
3744  case 18:
3746  TOK(CAST)
3747  YY_BREAK
3748  case 19:
3750  TOK(CHAR_LENGTH)
3751  YY_BREAK
3752  case 20:
3754  TOK(CHARACTER)
3755  YY_BREAK
3756  case 21:
3758  TOK(CHECK)
3759  YY_BREAK
3760  case 22:
3762  TOK(CLOSE)
3763  YY_BREAK
3764  case 23:
3766  TOK(COLUMN)
3767  YY_BREAK
3768  case 24:
3770  TOK(COMMIT)
3771  YY_BREAK
3772  case 25:
3774  TOK(CONTINUE)
3775  YY_BREAK
3776  case 26:
3778  TOK(COPY);
3779  YY_BREAK
3780  case 27:
3781  YY_RULE_SETUP {
3783  return SQLParser::CREATE;
3784  }
3785  YY_BREAK
3786  case 28:
3788  TOK(CURRENT)
3789  YY_BREAK
3790  case 29:
3792  TOK(CURSOR)
3793  YY_BREAK
3794  case 30:
3796  TOK(DASHBOARD)
3797  YY_BREAK
3798  case 31:
3800  TOK(DATABASE)
3801  YY_BREAK
3802  case 32:
3804  TOK(DATAFRAME)
3805  YY_BREAK
3806  case 33:
3808  TOK(DATE)
3809  YY_BREAK
3810  case 34:
3812  TOK(DATETIME)
3813  YY_BREAK
3814  case 35:
3816  TOK(DATE_TRUNC)
3817  YY_BREAK
3818  case 36:
3820  TOK(DECIMAL)
3821  YY_BREAK
3822  case 37:
3824  TOK(DECLARE)
3825  YY_BREAK
3826  case 38:
3828  TOK(DEFAULT)
3829  YY_BREAK
3830  case 39:
3832  TOK(DELETE)
3833  YY_BREAK
3834  case 40:
3836  TOK(DESC)
3837  YY_BREAK
3838  case 41:
3840  TOK(DICTIONARY)
3841  YY_BREAK
3842  case 42:
3844  TOK(DISTINCT)
3845  YY_BREAK
3846  case 43:
3848  TOK(DOUBLE)
3849  YY_BREAK
3850  case 44:
3852  TOK(DROP)
3853  YY_BREAK
3854  case 45:
3856  TOK(DUMP)
3857  YY_BREAK
3858  case 46:
3860  TOK(EDIT)
3861  YY_BREAK
3862  case 47:
3864  TOK(EDITOR)
3865  YY_BREAK
3866  case 48:
3868  TOK(ELSE)
3869  YY_BREAK
3870  case 49:
3872  TOK(END)
3873  YY_BREAK
3874  case 50:
3876  TOK(EXISTS)
3877  YY_BREAK
3878  case 51:
3880  TOK(EXTRACT)
3881  YY_BREAK
3882  case 52:
3884  TOK(FETCH)
3885  YY_BREAK
3886  case 53:
3888  TOK(FIRST)
3889  YY_BREAK
3890  case 54:
3892  TOK(FLOAT)
3893  YY_BREAK
3894  case 55:
3896  TOK(FOR)
3897  YY_BREAK
3898  case 56:
3900  TOK(FOREIGN)
3901  YY_BREAK
3902  case 57:
3904  TOK(FOUND)
3905  YY_BREAK
3906  case 58:
3908  TOK(FROM)
3909  YY_BREAK
3910  case 59:
3912  TOK(GEOGRAPHY)
3913  YY_BREAK
3914  case 60:
3916  TOK(GEOMETRY)
3917  YY_BREAK
3918  case 61:
3920  TOK(GRANT)
3921  YY_BREAK
3922  case 62:
3924  TOK(GROUP)
3925  YY_BREAK
3926  case 63:
3928  TOK(HAVING)
3929  YY_BREAK
3930  case 64:
3932  TOK(IF)
3933  YY_BREAK
3934  case 65:
3936  TOK(ILIKE)
3937  YY_BREAK
3938  case 66:
3940  TOK(IN)
3941  YY_BREAK
3942  case 67:
3943  YY_RULE_SETUP {
3945  return SQLParser::INSERT;
3946  }
3947  YY_BREAK
3948  case 68:
3950  TOK(INTEGER)
3951  YY_BREAK
3952  case 69:
3953  YY_RULE_SETUP {
3955  return SQLParser::INTO;
3956  }
3957  YY_BREAK
3958  case 70:
3960  TOK(INTO)
3961  YY_BREAK
3962  case 71:
3964  TOK(IS)
3965  YY_BREAK
3966  case 72:
3968  TOK(LANGUAGE)
3969  YY_BREAK
3970  case 73:
3972  TOK(LAST)
3973  YY_BREAK
3974  case 74:
3976  TOK(LENGTH)
3977  YY_BREAK
3978  case 75:
3980  TOK(LIKE)
3981  YY_BREAK
3982  case 76:
3984  TOK(LIMIT)
3985  YY_BREAK
3986  case 77:
3988  TOK(LINESTRING)
3989  YY_BREAK
3990  case 78:
3992  TOK(MOD)
3993  YY_BREAK
3994  case 79:
3996  TOK(MULTIPOLYGON)
3997  YY_BREAK
3998  case 80:
4000  TOK(NOT)
4001  YY_BREAK
4002  case 81:
4004  TOK(NOW)
4005  YY_BREAK
4006  case 82:
4008  TOK(NULLX)
4009  YY_BREAK
4010  case 83:
4012  TOK(NUMERIC)
4013  YY_BREAK
4014  case 84:
4016  TOK(OF)
4017  YY_BREAK
4018  case 85:
4020  TOK(OFFSET)
4021  YY_BREAK
4022  case 86:
4024  TOK(ON)
4025  YY_BREAK
4026  case 87:
4028  TOK(OPEN)
4029  YY_BREAK
4030  case 88:
4032  TOK(OPTION)
4033  YY_BREAK
4034  case 89:
4036  TOK(OPTIMIZE)
4037  YY_BREAK
4038  case 90:
4040  TOK(OR)
4041  YY_BREAK
4042  case 91:
4044  TOK(ORDER)
4045  YY_BREAK
4046  case 92:
4048  TOK(POINT)
4049  YY_BREAK
4050  case 93:
4052  TOK(POLYGON)
4053  YY_BREAK
4054  case 94:
4056  TOK(PRECISION)
4057  YY_BREAK
4058  case 95:
4060  TOK(PRIMARY)
4061  YY_BREAK
4062  case 96:
4064  TOK(PRIVILEGES)
4065  YY_BREAK
4066  case 97:
4068  TOK(PROCEDURE)
4069  YY_BREAK
4070  case 98:
4072  TOK(PUBLIC)
4073  YY_BREAK
4074  case 99:
4076  TOK(REAL)
4077  YY_BREAK
4078  case 100:
4080  TOK(REFERENCES)
4081  YY_BREAK
4082  case 101:
4084  TOK(RENAME)
4085  YY_BREAK
4086  case 102:
4088  TOK(RESTORE)
4089  YY_BREAK
4090  case 103:
4092  TOK(REVOKE)
4093  YY_BREAK
4094  case 104:
4096  TOK(ROLE)
4097  YY_BREAK
4098  case 105:
4100  TOK(ROLLBACK)
4101  YY_BREAK
4102  case 106:
4104  TOK(SCHEMA)
4105  YY_BREAK
4106  case 107:
4108  TOK(SELECT)
4109  YY_BREAK
4110  case 108:
4112  TOK(SERVER)
4113  YY_BREAK
4114  case 109:
4116  TOK(SET)
4117  YY_BREAK
4118  case 110:
4120  TOK(SHARD)
4121  YY_BREAK
4122  case 111:
4124  TOK(SHARED)
4125  YY_BREAK
4126  case 112:
4128  TOK(SHOW)
4129  YY_BREAK
4130  case 113:
4132  TOK(SMALLINT)
4133  YY_BREAK
4134  case 114:
4135  YY_RULE_SETUP {
4136  yylval.qualval = kANY;
4137  TOK(SOME)
4138  } /* SOME = ANY */
4139  YY_BREAK
4140  case 115:
4142  TOK(SQL)
4143  YY_BREAK
4144  case 116:
4146  TOK(TABLE)
4147  YY_BREAK
4148  case 117:
4150  TOK(TEMPORARY)
4151  YY_BREAK
4152  case 118:
4154  TOK(TEXT)
4155  YY_BREAK
4156  case 119:
4158  TOK(THEN)
4159  YY_BREAK
4160  case 120:
4162  TOK(TIME)
4163  YY_BREAK
4164  case 121:
4166  TOK(TIMESTAMP)
4167  YY_BREAK
4168  case 122:
4170  TOK(TINYINT)
4171  YY_BREAK
4172  case 123:
4174  TOK(TO)
4175  YY_BREAK
4176  case 124:
4178  TOK(TRUNCATE)
4179  YY_BREAK
4180  case 125:
4182  TOK(UNION)
4183  YY_BREAK
4184  case 126:
4186  TOK(UNIQUE)
4187  YY_BREAK
4188  case 127:
4190  TOK(UPDATE)
4191  YY_BREAK
4192  case 128:
4194  TOK(USAGE)
4195  YY_BREAK
4196  case 129:
4198  TOK(USER)
4199  YY_BREAK
4200  case 130:
4201  YY_RULE_SETUP {
4202  BEGIN 0;
4203  return SQLParser::VALUES;
4204  }
4205  YY_BREAK
4206  case 131:
4208  TOK(VALIDATE)
4209  YY_BREAK
4210  case 132:
4212  TOK(CHARACTER) /* XXX don't distinguish char and varchar for now */
4213  YY_BREAK
4214  case 133:
4216  TOK(VIEW)
4217  YY_BREAK
4218  case 134:
4220  TOK(WHEN)
4221  YY_BREAK
4222  case 135:
4224  TOK(WHERE)
4225  YY_BREAK
4226  case 136:
4228  TOK(WITH)
4229  YY_BREAK
4230  case 137:
4232  TOK(WORK)
4233  YY_BREAK
4234  /* punctuation */
4235  case 138:
4236  YY_RULE_SETUP {
4237  yylval.opval = kEQ;
4238  TOK(EQUAL);
4239  }
4240  YY_BREAK
4241  case 139:
4242  YY_RULE_SETUP {
4243  yylval.opval = kNE;
4244  TOK(COMPARISON);
4245  }
4246  YY_BREAK
4247  case 140:
4248  YY_RULE_SETUP {
4249  yylval.opval = kLT;
4250  TOK(COMPARISON);
4251  }
4252  YY_BREAK
4253  case 141:
4254  YY_RULE_SETUP {
4255  yylval.opval = kGT;
4256  TOK(COMPARISON);
4257  }
4258  YY_BREAK
4259  case 142:
4260  YY_RULE_SETUP {
4261  yylval.opval = kLE;
4262  TOK(COMPARISON);
4263  }
4264  YY_BREAK
4265  case 143:
4266  YY_RULE_SETUP {
4267  yylval.opval = kGE;
4268  TOK(COMPARISON);
4269  }
4270  YY_BREAK
4271  case 144:
4272  YY_RULE_SETUP { return yytext[0]; }
4273  YY_BREAK
4274  case 145:
4275  YY_RULE_SETUP {
4276  BEGIN 0;
4277  return yytext[0];
4278  }
4279  YY_BREAK
4280  /* validate type */
4281  case 146:
4282  YY_RULE_SETUP {
4284  TOK(CLUSTER)
4285  }
4286  YY_BREAK
4287  /* names */
4288  case 147:
4289  YY_RULE_SETUP {
4291  TOK(NAME)
4292  }
4293  YY_BREAK
4294  /* names with dashes */
4295  case 148:
4296  YY_RULE_SETUP {
4298  TOK(DASHEDNAME)
4299  }
4300  YY_BREAK
4301  /* emails */
4302  case 149:
4303  YY_RULE_SETUP {
4305  TOK(EMAIL)
4306  }
4307  YY_BREAK
4308  /* parameters */
4309  case 150:
4311  TOK(PARAMETER)
4312  YY_BREAK
4313  /* numbers */
4314  case 151:
4315  YY_RULE_SETUP {
4316  yylval.intval = atoll(yytext);
4317  TOK(INTNUM)
4318  }
4319  YY_BREAK
4320  case 152:
4321  case 153:
4322  YY_RULE_SETUP {
4324  // numeric and decimal precisions cannot exceed 19
4325  if (yylval.stringval->get()->length() < 20) {
4326  return SQLParser::FIXEDNUM;
4327  }
4328  delete yylval.stringval->release();
4329  // otherwise return as double
4330  yylval.doubleval = std::stod(yytext);
4331  return SQLParser::DOUBLE;
4332  }
4333  YY_BREAK
4334  /* TODO: handle FLOAT v.s. DOUBLE */
4335  case 154:
4336  case 155:
4337  case 156:
4338  YY_RULE_SETUP {
4339  yylval.doubleval = atof(yytext);
4340  TOK(DOUBLE)
4341  }
4342  YY_BREAK
4343  /* strings */
4344  case 157:
4345  /* rule 157 can match eol */
4346  *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
4347  (yy_c_buf_p) = yy_cp -= 3;
4348  YY_DO_BEFORE_ACTION; /* set up yytext again */
4349  YY_RULE_SETUP {
4350  int len = yyleng;
4351  yylval.stringval =
4353  boost::trim(*yylval.stringval->get());
4354 
4355  BEGIN 0;
4356  return SQLParser::SELECTSTRING;
4357  }
4358  YY_BREAK
4359  case 158:
4360  /* rule 158 can match eol */
4361  *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
4362  (yy_c_buf_p) = yy_cp -= 1;
4363  YY_DO_BEFORE_ACTION; /* set up yytext again */
4364  YY_RULE_SETUP {
4365  int len = yyleng;
4366  std::string tmp(yytext, len);
4367  boost::regex keyword{"\\swith", boost::regex::icase};
4368  boost::smatch what;
4369  if (boost::regex_search(tmp, what, keyword)) {
4370  REJECT;
4371  } else {
4372  yylval.stringval =
4374  boost::trim(*yylval.stringval->get());
4375  BEGIN 0;
4376  return SQLParser::SELECTSTRING;
4377  }
4378  }
4379  YY_BREAK
4380  case 159:
4381  *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
4382  (yy_c_buf_p) = yy_cp -= 1;
4383  YY_DO_BEFORE_ACTION; /* set up yytext again */
4384  YY_RULE_SETUP {
4385  int len = yyleng;
4386  std::string tmp(yytext, len);
4387  boost::regex keyword{"\\svalues", boost::regex::icase};
4388  boost::smatch what;
4389  if (boost::regex_search(tmp, what, keyword)) {
4390  REJECT;
4391  } else {
4392  yylval.stringval =
4394  boost::trim(*yylval.stringval->get());
4395  BEGIN 0;
4396  return SQLParser::SELECTSTRING;
4397  }
4398  }
4399  YY_BREAK
4400  case 160:
4401  YY_RULE_SETUP {
4402  int len = yyleng - 6;
4403  if (len > 0) {
4404  yylval.stringval =
4406  boost::trim(*yylval.stringval->get());
4407  } else {
4409  }
4410  return SQLParser::FWDSTR;
4411  }
4412  YY_BREAK
4413  case 161:
4414  YY_RULE_SETUP {
4415  int c = yyFlexLexer::yyinput();
4416 
4417  unput(c); /* just peeking */
4418  if (c != '\'') {
4419  /* remove quotes */
4420  std::vector<char> escape_removed(yyleng - 1);
4421  char* p = yytext + 1;
4422  int j = 0;
4423  int len = yyleng - 2;
4424  for (int i = 0; i < len; i++) {
4425  if (p[i] == '\\') {
4426  if (p[i + 1] == 't') {
4427  escape_removed[j++] = '\t';
4428  i++;
4429  continue;
4430  } else if (p[i + 1] == 'n') {
4431  escape_removed[j++] = '\n';
4432  i++;
4433  continue;
4434  } else if (p[i + 1] == '\\') {
4435  escape_removed[j++] = '\\';
4436  i++;
4437  continue;
4438  } else if (p[i + 1] == 'x' && i + 3 < len) {
4439  char s[3];
4440  s[0] = p[i + 2];
4441  s[1] = p[i + 3];
4442  s[2] = '\0';
4443  int c;
4444  sscanf(s, "%x", &c);
4445  escape_removed[j++] = (char)c;
4446  i += 3;
4447  continue;
4448  }
4449  }
4450  if (p[i] != '\'' || p[i + 1] != '\'')
4451  escape_removed[j++] = p[i];
4452  }
4453  escape_removed[j] = '\0';
4454 
4456  parsed_str_tokens_, std::string{escape_removed.data()});
4457  return SQLParser::STRING;
4458  } else
4459  yymore();
4460  }
4461  YY_BREAK
4462  case 162:
4463  *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
4464  (yy_c_buf_p) = yy_cp -= 1;
4465  YY_DO_BEFORE_ACTION; /* set up yytext again */
4466  YY_RULE_SETUP { throw std::runtime_error("Unterminated string"); }
4467  YY_BREAK
4468  case 163:
4469  YY_RULE_SETUP {
4470  int c = yyFlexLexer::yyinput();
4471 
4472  unput(c); /* just peeking */
4473  if (c != '"') {
4474  /* remove quotes */
4475  std::vector<char> escape_removed(yyleng - 1);
4476  char* p = yytext + 1;
4477  int j = 0;
4478  int len = yyleng - 2;
4479  for (int i = 0; i < len; i++) {
4480  if (p[i] == '\\') {
4481  if (p[i + 1] == 't') {
4482  escape_removed[j++] = '\t';
4483  i++;
4484  continue;
4485  } else if (p[i + 1] == 'n') {
4486  escape_removed[j++] = '\n';
4487  i++;
4488  continue;
4489  } else if (p[i + 1] == '\\') {
4490  escape_removed[j++] = '\\';
4491  i++;
4492  continue;
4493  } else if (p[i + 1] == '"') {
4494  escape_removed[j++] = '"';
4495  i++;
4496  continue;
4497  } else if (p[i + 1] == 'x' && i + 3 < len) {
4498  char s[3];
4499  s[0] = p[i + 2];
4500  s[1] = p[i + 3];
4501  s[2] = '\0';
4502  int c;
4503  sscanf(s, "%x", &c);
4504  escape_removed[j++] = (char)c;
4505  i += 3;
4506  continue;
4507  }
4508  }
4509  escape_removed[j++] = p[i];
4510  }
4511  escape_removed[j] = '\0';
4512 
4514  parsed_str_tokens_, std::string{escape_removed.data()});
4516  } else
4517  yymore();
4518  }
4519  YY_BREAK
4520  case 164:
4521  *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
4522  (yy_c_buf_p) = yy_cp -= 1;
4523  YY_DO_BEFORE_ACTION; /* set up yytext again */
4524  YY_RULE_SETUP { throw std::runtime_error("Unterminated string"); }
4525  YY_BREAK
4526  /*
4527  \n { lineno++; }
4528  */
4529  case 165:
4530  /* rule 165 can match eol */
4531  YY_RULE_SETUP; /* white space */
4532  YY_BREAK
4533  case 166:
4534  YY_RULE_SETUP; /* comment */
4535  YY_BREAK
4536  case 167:
4537  YY_RULE_SETUP {
4538  return yytext[0];
4539  } /* random non-SQL text. cause error in parser */
4540  YY_BREAK
4541  case YY_STATE_EOF(INITIAL):
4542  case YY_STATE_EOF(STATE_CREATE):
4543  case YY_STATE_EOF(STATE_CREATE_AS):
4544  case YY_STATE_EOF(STATE_INSERT):
4545  case YY_STATE_EOF(STATE_INSERT_INTO): {
4546  yyterminate();
4547  }
4548  YY_BREAK
4549  case 168:
4551  ECHO;
4552  YY_BREAK
4553 
4554  case YY_END_OF_BUFFER: {
4555  /* Amount of text matched not including the EOB char. */
4556  int yy_amount_of_matched_text = (int)(yy_cp - (yytext_ptr)) - 1;
4557 
4558  /* Undo the effects of YY_DO_BEFORE_ACTION. */
4559  *yy_cp = (yy_hold_char);
4561 
4562  if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) {
4563  /* We're scanning a new file or input source. It's
4564  * possible that this happened because the user
4565  * just pointed yyin at a new source and called
4566  * yylex(). If so, then we have to assure
4567  * consistency between YY_CURRENT_BUFFER and our
4568  * globals. Here is the right place to do so, because
4569  * this is the first action (other than possibly a
4570  * back-up) that will match for the new input source.
4571  */
4572  /*
4573 
4574  dfasdfasdfasd
4575 
4576  */
4577  int x = 5;
4578  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
4579  int yy = 57;
4580  /* %if-c++-only */
4581  YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin.rdbuf();
4582  /* %endif */
4583  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
4584  }
4585 
4586  /* Note that here we test for yy_c_buf_p "<=" to the position
4587  * of the first EOB in the buffer, since yy_c_buf_p will
4588  * already have been incremented past the NUL character
4589  * (since all states make transitions on EOB to the
4590  * end-of-buffer state). Contrast this with the test
4591  * in input().
4592  */
4593  if ((yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE
4594  ->yy_ch_buf[(yy_n_chars)]) { /* This was really a NUL. */
4595  yy_state_type yy_next_state;
4596 
4597  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
4598 
4599  yy_current_state = yy_get_previous_state();
4600 
4601  /* Okay, we're now positioned to make the NUL
4602  * transition. We couldn't have
4603  * yy_get_previous_state() go ahead and do it
4604  * for us because it doesn't know how to deal
4605  * with the possibility of jamming (and we don't
4606  * want to build jamming into it because then it
4607  * will run more slowly).
4608  */
4609 
4610  yy_next_state = yy_try_NUL_trans(yy_current_state);
4611 
4613 
4614  if (yy_next_state) {
4615  /* Consume the NUL. */
4616  yy_cp = ++(yy_c_buf_p);
4617  yy_current_state = yy_next_state;
4618  goto yy_match;
4619  }
4620 
4621  else {
4622  /* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes
4623  * here */
4624  yy_cp = (yy_c_buf_p);
4625  goto yy_find_action;
4626  }
4627  }
4628 
4629  else
4630  switch (yy_get_next_buffer()) {
4631  case EOB_ACT_END_OF_FILE: {
4632  (yy_did_buffer_switch_on_eof) = 0;
4633 
4634  if (yywrap()) {
4635  /* Note: because we've taken care in
4636  * yy_get_next_buffer() to have set up
4637  * yytext, we can now set up
4638  * yy_c_buf_p so that if some total
4639  * hoser (like flex itself) wants to
4640  * call the scanner after we return the
4641  * YY_NULL, it'll still work - another
4642  * YY_NULL will get returned.
4643  */
4644  (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
4645 
4646  yy_act = YY_STATE_EOF(YY_START);
4647  goto do_action;
4648  }
4649 
4650  else {
4651  if (!(yy_did_buffer_switch_on_eof))
4652  YY_NEW_FILE;
4653  }
4654  break;
4655  }
4656 
4657  case EOB_ACT_CONTINUE_SCAN:
4658  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
4659 
4660  yy_current_state = yy_get_previous_state();
4661 
4662  yy_cp = (yy_c_buf_p);
4664  goto yy_match;
4665 
4666  case EOB_ACT_LAST_MATCH:
4667  (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
4668 
4669  yy_current_state = yy_get_previous_state();
4670 
4671  yy_cp = (yy_c_buf_p);
4673  goto yy_find_action;
4674  }
4675  break;
4676  }
4677 
4678  default:
4679  YY_FATAL_ERROR("fatal flex scanner internal error--no action found");
4680  } /* end of action switch */
4681  } /* end of scanning one token */
#define COMMIT
Definition: sqldefs.h:69
#define BETWEEN
#define DELETE
#define FOREIGN
#define PRECISION
#define PRIMARY
#define VALUES
#define NOT
#define LINESTRING
#define INSERT
#define QUOTED_IDENTIFIER
#define REVOKE
#define THEN
#define REFERENCES
#define BY
#define NOW
#define YY_BUFFER_NORMAL
#define YY_BUFFER_NEW
#define INITIAL
#define EMAIL
#define TEMPORARY
#define REAL
#define GEOMETRY
#define parsed_str_tokens_
#define ELSE
#define DUMP
#define yymore()
#define HAVING
static yyconst flex_int16_t yy_nxt[12584]
#define CURSOR
#define DATABASE
#define SMALLINT
#define OPTIMIZE
#define EXISTS
Definition: sqldefs.h:35
#define END
#define ALTER
#define DROP
#define YY_FATAL_ERROR(msg)
#define OPTION
#define DOUBLE
#define yylval
#define FOUND
Definition: sqldefs.h:36
#define CONTINUE
#define BIGINT
#define STATE_INSERT
#define TO
static yyconst flex_int16_t yy_accept[1409]
#define VALIDATE
#define TRUNCATE
Definition: sqldefs.h:30
#define EOB_ACT_END_OF_FILE
static yyconst flex_int16_t yy_base[1492]
#define DICTIONARY
#define DASHBOARD
#define CURRENT
static yyconst flex_int16_t yy_chk[12584]
#define OPEN
#define IN
#define DATE
#define EDIT
#define REJECT
#define PARAMETER
#define OFFSET
#define INTNUM
#define VIEW
#define GRANT
#define SHARED
#define ROLLBACK
#define FWDSTR
#define CHARACTER
#define PUBLIC
#define MOD
#define NULLX
#define YY_RESTORE_YY_MORE_OFFSET
#define RESTORE
#define TEXT
#define ROLE
#define SELECTSTRING
#define DASHEDNAME
#define yyterminate()
#define EDITOR
#define FOR
#define MULTIPOLYGON
#define POINT
#define STATE_CREATE_AS
#define IF
#define SHOW
static TrackedPtr< std::string > * make(std::vector< std::unique_ptr< TrackedPtr< std::string >>> &tracked_ptrs, Args &&...args)
Definition: TrackedPtr.h:70
static yyconst flex_int32_t yy_meta[76]
int yy_act
#define ASC
#define GROUP
#define LIMIT
#define SHARD
#define NAME
#define WITH
#define TIME
#define YY_END_OF_BUFFER
#define FROM
size_t yy_size_t
Definition: sqldefs.h:69
#define CLUSTER
#define SQL
#define TINYINT
#define YY_RULE_SETUP
#define AUTHORIZATION
#define USAGE
#define CREATE
#define COMPARISON
#define RENAME
#define ON
#define TOK(name)
static yyconst flex_int16_t yy_def[1492]
#define DATAFRAME
#define ANY
#define DESC
#define COLUMN
Definition: sqldefs.h:34
#define CASE
#define WHERE
static yyconst flex_int32_t yy_ec[256]
#define ARRAY
#define WHEN
int yy_state_type
Definition: FlexLexer_wnd.h:55
#define IS
#define SOME
#define SCHEMA
#define CHAR_LENGTH
#define PRIVILEGES
#define SERVER
#define CLOSE
#define LENGTH
#define YY_CURRENT_BUFFER_LVALUE
Definition: sqldefs.h:32
static yyconst flex_int16_t yy_acclist[2871]
#define SET
#define TIMESTAMP
#define YY_BREAK
#define ORDER
#define BEGIN
#define DISTINCT
#define FETCH
#define YY_DO_BEFORE_ACTION
#define EQUAL
static yyconst flex_int32_t yy_rule_can_match_eol[169]
#define YY_SC_TO_UI(c)
#define LIKE
#define WORK
#define yytext_ptr
#define PROCEDURE
#define UPDATE
#define USER
#define STRING
#define OR
#define EXTRACT
#define NUMERIC
#define CHECK(condition)
Definition: Logger.h:211
#define ARCHIVE
#define ILIKE
#define DECIMAL
#define DATE_TRUNC
#define FIXEDNUM
#define DEFAULT
#define UNIQUE
Definition: sqldefs.h:33
#define GEOGRAPHY
#define DATETIME
#define POLYGON
#define CAST
#define COPY
char * yy_bp
yy_size_t yyleng
#define YY_MORE_ADJ
#define STATE_CREATE
#define AND
#define EOB_ACT_CONTINUE_SCAN
#define unput(c)
#define FLOAT
#define OF
#define ECHO
#define DECLARE
char * yy_cp
unsigned char YY_CHAR
#define EOB_ACT_LAST_MATCH
static yyconst flex_int16_t yy_rule_linenum[168]
#define YY_STATE_EOF(state)
#define INTO
#define ALL
#define AS
#define LANGUAGE
#define SELECT
#define STATE_INSERT_INTO
#define BOOLEAN
#define YY_START
#define INTEGER
#define ACCESS
#define YY_NEW_FILE

+ Here is the call graph for this function:

void * yyalloc ( yy_size_t  size)

Definition at line 5549 of file Scanner_wnd_pregen.cpp.

Referenced by if(), yyFlexLexer::yy_create_buffer(), yyFlexLexer::yy_push_state(), and yyFlexLexer::yyensure_buffer_stack().

5549  {
5550  return (void*)malloc(size);
5551 }

+ Here is the caller graph for this function:

void yyfree ( void *  ptr)

Definition at line 5564 of file Scanner_wnd_pregen.cpp.

Referenced by yyFlexLexer::yy_delete_buffer(), and yyFlexLexer::~yyFlexLexer().

5564  {
5565  free((char*)ptr); /* see yyrealloc() for (char *) cast */
5566 }

+ Here is the caller graph for this function:

void * yyrealloc ( void *  ptr,
yy_size_t  size 
)

Definition at line 5553 of file Scanner_wnd_pregen.cpp.

Referenced by yyFlexLexer::yy_get_next_buffer(), yyFlexLexer::yy_push_state(), and yyFlexLexer::yyensure_buffer_stack().

5553  {
5554  /* The cast to (char *) in the following accommodates both
5555  * implementations that use char* generic pointers, and those
5556  * that use void* generic pointers. It works with the latter
5557  * because both ANSI C and C++ allow castless assignment from
5558  * any pointer type to void*, and deal with argument conversions
5559  * as though doing an assignment.
5560  */
5561  return (void*)realloc((char*)ptr, size);
5562 }

+ Here is the caller graph for this function:

Variable Documentation

yyconst flex_int16_t yy_accept[1409]
static

Definition at line 626 of file Scanner_wnd_pregen.cpp.

Referenced by while().

yyconst flex_int16_t yy_acclist[2871]
static

Definition at line 423 of file Scanner_wnd_pregen.cpp.

Referenced by while().

int yy_act

Definition at line 3538 of file Scanner_wnd_pregen.cpp.

Referenced by while().

char * yy_bp

Definition at line 3537 of file Scanner_wnd_pregen.cpp.

char* yy_cp
YY_DECL
Initial value:
{
yy_state_type yy_current_state
int yy_state_type
Definition: FlexLexer_wnd.h:55

The main scanner function which does all the work.

Definition at line 3535 of file Scanner_wnd_pregen.cpp.

yyconst flex_int32_t yy_ec[256]
static
Initial value:
= {
0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 4, 5, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 7, 8, 9, 1, 1, 10, 11, 12,
12, 13, 12, 14, 15, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 18, 19, 20, 21,
1, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
42, 43, 44, 45, 46, 47, 48, 1, 1, 1, 1, 49, 1, 50, 51, 52, 53,
54, 55, 56, 57, 58, 32, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
74, 1, 1, 1, 75, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}

Definition at line 755 of file Scanner_wnd_pregen.cpp.

Referenced by while(), and yyFlexLexer::yy_get_previous_state().

yyconst flex_int32_t yy_meta[76]
static
Initial value:
= {
0, 1, 2, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}

Definition at line 772 of file Scanner_wnd_pregen.cpp.

Referenced by while(), yyFlexLexer::yy_get_previous_state(), and yyFlexLexer::yy_try_NUL_trans().

yyconst flex_int32_t yy_rule_can_match_eol[169]
static
Initial value:
= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
}

Definition at line 3333 of file Scanner_wnd_pregen.cpp.

Referenced by while().

yyconst flex_int16_t yy_rule_linenum[168]
static
Initial value:
= {
0, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
162, 163, 164, 168, 169, 170, 171, 172, 173, 175, 177, 180, 183, 189, 192, 195, 199,
200, 201, 214, 215, 216, 219, 228, 243, 258, 269, 317, 319, 370, 377, 379, 382}

Definition at line 3342 of file Scanner_wnd_pregen.cpp.

Referenced by while().

yy_size_t yyleng

Referenced by while().