#line 1 "sqlite3_lexer.cpp"

#line 3 "sqlite3_lexer.cpp"

#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

/* %not-for-header */
/* %if-c-only */
/* %if-not-reentrant */
/* %endif */
/* %endif */
/* %ok-for-header */

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6
#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif

/* %if-c++-only */
/* %endif */

/* %if-c-only */

/* %endif */

/* %if-c-only */

/* %endif */

/* First, we deal with  platform-specific or compiler-specific issues. */

/* begin standard C headers. */
/* %if-c-only */
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
/* %endif */

/* %if-tables-serialization */
/* %endif */
/* end standard C headers. */

/* %if-c-or-c++ */
/* flex integer type definitions */

#ifndef FLEXINT_H
#define FLEXINT_H

/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */

#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L

/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
 * if you want the limit (max/min) macros for int types. 
 */
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
#endif

#include <inttypes.h>
typedef int8_t flex_int8_t;
typedef uint8_t flex_uint8_t;
typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
#else
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;

/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN               (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN              (-32767-1)
#endif
#ifndef INT32_MIN
#define INT32_MIN              (-2147483647-1)
#endif
#ifndef INT8_MAX
#define INT8_MAX               (127)
#endif
#ifndef INT16_MAX
#define INT16_MAX              (32767)
#endif
#ifndef INT32_MAX
#define INT32_MAX              (2147483647)
#endif
#ifndef UINT8_MAX
#define UINT8_MAX              (255U)
#endif
#ifndef UINT16_MAX
#define UINT16_MAX             (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX             (4294967295U)
#endif

#ifndef SIZE_MAX
#define SIZE_MAX               (~(size_t)0)
#endif

#endif /* ! C99 */

#endif /* ! FLEXINT_H */

/* %endif */

/* begin standard C++ headers. */
/* %if-c++-only */
/* %endif */

/* TODO: this is always defined, so inline it */
#define yyconst const

#if defined(__GNUC__) && __GNUC__ >= 3
#define yynoreturn __attribute__((__noreturn__))
#else
#define yynoreturn
#endif

/* %not-for-header */
/* Returned upon end-of-file. */
#define YY_NULL 0
/* %ok-for-header */

/* %not-for-header */
/* Promotes a possibly negative, possibly signed char to an
 *   integer in range [0..255] for use as an array index.
 */
#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
/* %ok-for-header */

/* %if-reentrant */

/* An opaque pointer. */
#ifndef YY_TYPEDEF_YY_SCANNER_T
#define YY_TYPEDEF_YY_SCANNER_T
typedef void* yyscan_t;
#endif

/* For convenience, these vars (plus the bison vars far below)
   are macros in the reentrant scanner. */
#define yyin yyg->yyin_r
#define yyout yyg->yyout_r
#define yyextra yyg->yyextra_r
#define yyleng yyg->yyleng_r
#define yytext yyg->yytext_r
#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
#define yy_flex_debug yyg->yy_flex_debug_r

/* %endif */

/* %if-not-reentrant */
/* %endif */

/* Enter a start condition.  This macro really ought to take a parameter,
 * but we do it the disgusting crufty way forced on us by the ()-less
 * definition of BEGIN.
 */
#define BEGIN yyg->yy_start = 1 + 2 *
/* Translate the current start state into a value that can be later handed
 * to BEGIN to return to the state.  The YYSTATE alias is for lex
 * compatibility.
 */
#define YY_START ((yyg->yy_start - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart( yyin , yyscanner )
#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k.
 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
 * Ditto for the __ia64__ case accordingly.
 */
#define YY_BUF_SIZE 32768
#else
#define YY_BUF_SIZE 16384
#endif /* __ia64__ */
#endif

/* The state buf must be large enough to hold one state per character in the main buffer.
 */
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif

#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif

/* %if-not-reentrant */
/* %endif */

/* %if-c-only */
/* %if-not-reentrant */
/* %endif */
/* %endif */

#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 YY_LINENO_REWIND_TO(ptr)
    
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		*yy_cp = yyg->yy_hold_char; \
		YY_RESTORE_YY_MORE_OFFSET \
		yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
		} \
	while ( 0 )
#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )

#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
	{
/* %if-c-only */
	FILE *yy_input_file;
/* %endif */

/* %if-c++-only */
/* %endif */

	char *yy_ch_buf;		/* input buffer */
	char *yy_buf_pos;		/* current position in input buffer */

	/* Size of input buffer in bytes, not including room for EOB
	 * characters.
	 */
	int yy_buf_size;

	/* Number of characters read into yy_ch_buf, not including EOB
	 * characters.
	 */
	int yy_n_chars;

	/* Whether we "own" the buffer - i.e., we know we created it,
	 * and can realloc() it to grow it, and should free() it to
	 * delete it.
	 */
	int yy_is_our_buffer;

	/* Whether this is an "interactive" input source; if so, and
	 * if we're using stdio for input, then we want to use getc()
	 * instead of fread(), to make sure we stop fetching input after
	 * each newline.
	 */
	int yy_is_interactive;

	/* Whether we're considered to be at the beginning of a line.
	 * If so, '^' rules will be active on the next match, otherwise
	 * not.
	 */
	int yy_at_bol;

    int yy_bs_lineno; /**< The line count. */
    int yy_bs_column; /**< The column count. */

	/* Whether to try to fill the input buffer when we reach the
	 * end of it.
	 */
	int yy_fill_buffer;

	int yy_buffer_status;

#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
	/* When an EOF's been seen but there's still some text to process
	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
	 * shouldn't try reading from the input source any more.  We might
	 * still have a bunch of tokens to match, though, because of
	 * possible backing-up.
	 *
	 * When we actually see the EOF, we change the status to "new"
	 * (via yyrestart()), so that the user can continue scanning by
	 * just pointing yyin at a new input file.
	 */
#define YY_BUFFER_EOF_PENDING 2

	};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */

/* %if-c-only Standard (non-C++) definition */
/* %not-for-header */
/* %if-not-reentrant */
/* %endif */
/* %ok-for-header */

/* %endif */

/* We provide macros for accessing buffer states in case in the
 * future we want to put the buffer states in a more general
 * "scanner state".
 *
 * Returns the top of the stack, or NULL.
 */
#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
                          ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
                          : NULL)
/* Same as previous macro, but useful when we know that the buffer stack is not
 * NULL or when we need an lvalue. For internal use only.
 */
#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]

/* %if-c-only Standard (non-C++) definition */

/* %if-not-reentrant */
/* %not-for-header */
/* %ok-for-header */

/* %endif */

void yyrestart ( FILE *input_file , yyscan_t yyscanner );
void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
void yypop_buffer_state ( yyscan_t yyscanner );

static void yyensure_buffer_stack ( yyscan_t yyscanner );
static void yy_load_buffer_state ( yyscan_t yyscanner );
static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner );
#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)

YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );

/* %endif */

void *yyalloc ( yy_size_t , yyscan_t yyscanner );
void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
void yyfree ( void * , yyscan_t yyscanner );

#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){ \
        yyensure_buffer_stack (yyscanner); \
		YY_CURRENT_BUFFER_LVALUE =    \
            yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
	} \
	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
	}
#define yy_set_bol(at_bol) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){\
        yyensure_buffer_stack (yyscanner); \
		YY_CURRENT_BUFFER_LVALUE =    \
            yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
	} \
	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
	}
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
/* Begin user sect3 */

#define yywrap(yyscanner) (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP

#define FLEX_DEBUG
typedef flex_uint8_t YY_CHAR;

typedef int yy_state_type;

#define yytext_ptr yytext_r

/* %% [1.5] DFA */

/* %if-c-only Standard (non-C++) definition */

static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
static yy_state_type yy_try_NUL_trans ( yy_state_type current_state  , yyscan_t yyscanner);
static int yy_get_next_buffer ( yyscan_t yyscanner );
static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );

/* %endif */

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up yytext.
 */
#define YY_DO_BEFORE_ACTION \
	yyg->yytext_ptr = yy_bp; \
/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
	yyleng = (int) (yy_cp - yy_bp); \
	yyg->yy_hold_char = *yy_cp; \
	*yy_cp = '\0'; \
/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
	yyg->yy_c_buf_p = yy_cp;
/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
#define YY_NUM_RULES 124
#define YY_END_OF_BUFFER 125
/* This struct is not used in this scanner,
   but its presence is necessary. */
struct yy_trans_info
	{
	flex_int32_t yy_verify;
	flex_int32_t yy_nxt;
	};
static const flex_int16_t yy_accept[474] =
    {   0,
        0,    0,    0,    0,  125,  123,    1,    2,    2,  123,
      123,  110,  109,  123,   99,  100,  106,  104,  102,  105,
      101,  107,   95,   95,  123,  103,  117,  113,  115,   97,
       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
       90,   90,  123,  123,  111,  108,  123,  123,  123,   90,
        1,    2,  119,    0,   93,    0,   94,    3,   95,    4,
       95,   95,    0,    0,   98,  121,  118,  120,  114,  116,
      122,   97,   90,   90,   90,   90,   90,   11,   90,    0,
        0,    0,   90,   90,   90,   90,   90,   90,   90,   90,

       90,   90,   90,   90,   90,   90,   90,   90,   90,   42,
       90,   90,   45,   49,   90,   90,   90,   54,   90,   58,
       59,   90,   90,   90,   90,   90,   90,   90,   90,   90,
       90,   90,   90,   90,   90,   90,   90,   90,   90,    0,
        0,   92,    0,   91,  112,   90,    0,    0,   90,   95,
        0,   95,   95,   97,   90,   90,   90,    6,   12,   90,
        0,    0,   90,   90,   90,   90,   90,   90,   90,   90,
       90,   90,   90,   90,   32,   90,   90,   90,   90,   90,
       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
       51,   90,   90,   55,   90,   90,   90,   90,   90,   90,

       90,   90,   90,   90,   90,   90,   90,   90,   90,   75,
       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
       90,   90,   96,    0,    0,    5,   90,   90,   90,   90,
        0,   90,   90,   15,   16,   90,   90,   90,   90,   90,
       90,   90,   90,   90,   29,   90,   31,   90,   90,   35,
       90,   90,   90,   90,   90,   41,   90,   90,   90,   90,
       90,   90,   52,   90,   90,   57,   60,   90,   90,   90,
       90,   90,   90,   90,   90,   90,   90,   90,   90,   73,
       90,   90,   90,   78,   80,   81,   90,   90,   90,   90,
       90,   87,   90,   90,    8,   90,   90,   90,   90,   90,

       17,   90,   90,   90,   90,   90,   90,   90,   90,   90,
       90,   90,   36,   90,   90,   90,   90,   90,   90,   46,
       90,   90,   90,   53,   90,   90,   90,   90,   64,   65,
       90,   90,   90,   90,   90,   90,   72,   90,   90,   77,
       90,   90,   90,   90,   85,   90,   88,   90,    9,   10,
       90,   90,   90,   90,   90,   90,   21,   90,   90,   90,
       28,   90,   33,   34,   37,   90,   90,   90,   43,   90,
       90,   48,   50,   90,   90,   90,   90,   90,   67,   90,
       90,   90,   90,   74,   76,   90,   90,   83,   84,   90,
       90,   90,    7,   14,   18,   90,   90,   90,   25,   90,

       90,   90,   90,   39,   90,   90,   90,   56,   90,   90,
       63,   90,   68,   90,   90,   90,   90,   90,   86,   89,
       90,   19,   90,   90,   90,   27,   30,   90,   90,   90,
       90,   90,   90,   90,   69,   90,   71,   90,   90,   90,
       90,   90,   90,   90,   38,   40,   44,   47,   61,   62,
       90,   70,   79,   82,   90,   20,   90,   90,   26,   66,
       90,   90,   90,   90,   22,   23,   13,   90,   90,   90,
       90,   24,    0
    } ;

static const YY_CHAR yy_ec[256] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
        1,    2,    4,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    2,    5,    6,    1,    7,    8,    9,   10,   11,
       12,   13,   14,   15,   16,   17,   18,   19,   20,   20,
       20,   20,   20,   20,   20,   20,   20,   21,   22,   23,
       24,   25,   26,   21,   27,   28,   29,   30,   31,   32,
       33,   34,   35,   36,   37,   38,   39,   40,   41,   42,
       43,   44,   45,   46,   47,   48,   49,   50,   51,   36,
       52,    1,   53,    1,   54,   55,   56,   57,   58,   59,

       60,   61,   62,   63,   64,   36,   65,   66,   67,   68,
       69,   70,   71,   72,   73,   74,   75,   76,   77,   78,
       79,   36,    1,   80,    1,   81,    1,   82,   82,   82,
       82,   82,   82,   82,   82,   82,   82,   82,   82,   82,
       82,   82,   82,   82,   82,   82,   82,   82,   82,   82,
       82,   82,   82,   82,   82,   82,   82,   82,   82,   82,
       82,   82,   82,   82,   82,   82,   82,   82,   82,   82,
       82,   82,   82,   82,   82,   82,   82,   82,   82,   82,
       82,   82,   82,   82,   82,   82,   82,   82,   82,   82,
       82,    1,    1,   83,   83,   83,   83,   83,   83,   83,

       83,   83,   83,   83,   83,   83,   83,   83,   83,   83,
       83,   83,   83,   83,   83,   83,   83,   83,   83,   83,
       83,   83,   83,   84,   84,   84,   84,   84,   84,   84,
       84,   84,   84,   84,   84,   84,   84,   84,   84,   85,
       85,   85,   85,   85,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1
    } ;

static const YY_CHAR yy_meta[86] =
    {   0,
        1,    1,    2,    1,    1,    1,    3,    1,    1,    4,
        1,    1,    1,    1,    1,    1,    1,    1,    5,    5,
        1,    1,    1,    1,    1,    1,    6,    6,    6,    6,
        6,    6,    7,    7,    7,    7,    7,    7,    7,    7,
        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
        7,    1,    1,    3,    1,    6,    6,    6,    6,    6,
        6,    7,    7,    7,    7,    7,    7,    7,    7,    7,
        7,    7,    7,    7,    7,    7,    7,    7,    7,    1,
        1,    1,    3,    3,    3
    } ;

static const flex_int16_t yy_base[482] =
    {   0,
        0,    0,   59,   60,  284, 2439,  280,   85,   87,  255,
      261, 2439, 2439,  256, 2439, 2439, 2439, 2439, 2439,  244,
       73,  242,   77,   81,    0, 2439,   79,  229,   81,  229,
      128,   64,  187,   76,  124,   94,  157,   34,  241,   68,
      135,   98,  163,  221,  251,  227,  267,  311,  276,  141,
      294,  247,  192,  189,  159, 2439,  155,  153,  151,  369,
      228,  106, 2439,  223,  221,  212,  196, 2439,  111, 2439,
      232,  345,  366,    0,    0, 2439, 2439, 2439, 2439, 2439,
     2439,   94,   49,  306,  327,  338,  372,  334,  362,  118,
      116,  111,  384,  355,  389,  394,  410,  192,  443,  414,

      418,  446,  453,  436,  475,  423,  479,  450,  471,   60,
      482,  485,  512,  504,  495,  516,  529,  536,  539,  216,
      285,  542,  546,  573,  576,  630,  568,  600,  595,  558,
      610,  636,  622,  653,  640,  647,  657,  667,  670,  181,
      136, 2439,  132,  129, 2439,  381,   98,   90,  688,  465,
      103,  119,    0,  196,  684,  698,  707,  508,  674,  719,
       85,   83,  712,  747,  716,  728,  753,  750,  771,  789,
      779,  793,  734,  797,  740,  802,  815,  809,  822,  837,
      830,  819,  858,  862,  843,  870,  877,  851,  892,  882,
      757,  908,  911,  904,  918,  866,  924,  942,  939,  945,

      948,  951,  954,  974,  967,  970,  977, 1011,  988,  786,
      998,  983, 1021, 1024, 1016, 1028, 1031, 1061, 1050, 1047,
     1079, 1076, 2439,  136,   44,  848, 1082, 1057, 1069, 1094,
       38, 1112, 1128,  994, 1002, 1085, 1144, 1119, 1134, 1140,
     1150, 1147, 1154, 1169, 1053, 1157, 1090, 1174, 1190, 1104,
     1216, 1219, 1208, 1225, 1211, 1122, 1234, 1231, 1247, 1263,
     1267, 1182, 1185, 1250, 1274, 1197, 1202, 1277, 1293, 1280,
     1306, 1309, 1298, 1317, 1328, 1324, 1331, 1360, 1314, 1302,
     1375, 1379, 1387, 1365, 1336, 1339, 1382, 1393, 1400, 1418,
     1406, 1342, 1438, 1441, 1347, 1446, 1434, 1452, 1456, 1469,

     1352, 1459, 1474, 1462, 1496, 1492, 1512, 1517, 1524, 1530,
     1533, 1521, 1371, 1527, 1542, 1559, 1547, 1589, 1593, 1410,
     1596, 1576, 1599, 1428, 1602, 1616, 1608, 1622, 1484, 1502,
     1638, 1633, 1612, 1667, 1664, 1681, 1550, 1684, 1694, 1562,
     1671, 1689, 1678, 1710, 1570, 1715, 1627, 1728, 1642, 1650,
     1731, 1736, 1749, 1757, 1752, 1769, 1661, 1744, 1776, 1812,
     1699, 1772, 1702, 1722, 1761, 1803, 1807, 1819, 1779, 1822,
     1828, 1786, 1796, 1835, 1850, 1863, 1838, 1860, 1799, 1877,
     1880, 1889, 1896, 1846, 1856, 1899, 1912, 1866, 1873, 1921,
     1924, 1931, 1883, 1893, 1905, 1939, 1956, 1945, 1909, 1974,

     1987, 1964, 1992, 1942, 2002, 1999, 2012, 1951, 1996, 2021,
     1959, 2034, 1968, 2028, 2048, 2056, 2063, 2060, 1971, 1983,
     2067, 2016, 2070, 2112, 2090, 2039, 2076, 2104, 2119, 2131,
     2085, 2125, 2139, 2145, 2096, 2149, 2100, 2156, 2160, 2153,
     2172, 2186, 2142, 2190, 2115, 2164, 2168, 2175, 2178, 2181,
     2209, 2193, 2196, 2200, 2236, 2203, 2226, 2250, 2214, 2218,
     2255, 2276, 2281, 2244, 2221, 2269, 2241, 2284, 2288, 2307,
     2313, 2264, 2439, 2398, 2405, 2407, 2412, 2419, 2426, 2429,
     2432
    } ;

static const flex_int16_t yy_def[482] =
    {   0,
      473,    1,    1,    1,  473,  473,  473,  473,  473,  473,
      474,  473,  473,  475,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  476,  473,  473,  473,  473,  473,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  478,  479,  473,  473,  473,  473,  473,  477,
      473,  473,  473,  474,  473,  475,  473,  473,  473,  473,
      473,  473,  473,  480,  476,  473,  473,  473,  473,  473,
      473,  473,  477,  477,  477,  477,  477,  477,  477,  473,
      473,  473,  477,  477,  477,  477,  477,  477,  477,  477,

      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  481,
      478,  473,  479,  473,  473,  477,  473,  473,  477,  473,
      473,  473,  480,  473,  477,  477,  477,  477,  477,  477,
      473,  473,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,

      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  473,  481,  473,  477,  477,  477,  477,  477,
      473,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,

      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,

      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,    0,  473,  473,  473,  473,  473,  473,  473,
      473
    } ;

static const flex_int16_t yy_nxt[2525] =
    {   0,
        6,    7,    8,    9,   10,   11,    6,   12,   13,   14,
       15,   16,   17,   18,   19,   20,   21,   22,   23,   24,
       25,   26,   27,   28,   29,   30,   31,   32,   33,   34,
       35,   36,   37,   38,   39,   38,   40,   41,   42,   43,
       44,   45,   38,   46,   47,   48,   49,   50,   51,   52,
       38,   53,    6,   38,   54,   31,   32,   33,   34,   35,
       36,   37,   38,   39,   40,   41,   42,   43,   44,   45,
       38,   46,   47,   48,   49,   50,   51,   52,   38,   55,
       56,    6,   57,   58,   59,   60,   60,   62,   62,   62,
       62,   69,   69,   71,   93,   72,   72,   71,  115,   72,

       72,   76,   77,   78,   80,   81,   99,   73,   62,   62,
      100,   73,  154,  154,   60,   60,   90,   91,   92,   83,
      105,  152,  152,   93,  117,  146,   74,  115,  106,   69,
       69,   90,   91,   92,  107,   99,   73,  152,  152,  100,
       73,   73,   90,   91,   92,  223,   90,   91,   92,  105,
       90,   91,   92,  117,   74,   84,   85,  106,   90,   91,
       92,  101,  107,  102,  231,   86,   83,   87,  103,  116,
       73,  225,   88,  104,   89,  137,   90,   91,   92,  146,
       90,   91,   92,  143,   84,   85,  144,  108,  142,  101,
      223,  102,  162,   86,  109,   87,  103,  161,  116,   83,

       88,  104,   89,  118,  137,   66,   90,   91,   92,  119,
       90,   91,   92,   94,  154,  154,  108,   90,   91,   92,
       95,   67,  109,   90,   91,   92,   64,   96,   65,   61,
       97,  118,  148,   98,  147,  169,  146,  119,  145,   90,
       91,   92,   94,  144,  142,   90,   91,   92,   82,   95,
      150,  150,   79,  125,   70,   96,  140,  126,   97,   68,
      120,   98,   73,  169,  121,   67,   65,  127,  122,   90,
       91,   92,  110,  111,   90,   91,   92,  123,   63,  112,
      113,   61,  125,  473,  473,  114,  126,  473,  120,  473,
      473,   73,  121,  473,  124,  127,  122,  128,   90,   91,

       92,  110,  111,   90,   91,   92,  123,  112,  113,   90,
       91,   92,  129,  114,  473,  134,  473,  135,  473,  473,
      136,  473,  124,   90,   91,   92,  128,  138,  139,   90,
       91,   92,  473,   90,   91,   92,  473,  130,  473,  473,
      129,  131,  473,  134,  132,  135,  155,  473,  136,   90,
       91,   92,  473,  473,  133,  473,  138,  139,   90,   91,
       92,   71,  159,   72,   72,  473,  130,   90,   91,   92,
      131,  473,  156,  132,  155,   73,   90,   91,   92,  151,
      473,  151,  133,  473,  152,  152,  157,  473,   90,   91,
       92,  159,  473,   90,   91,   92,   84,   85,  473,  164,

      156,  158,  473,  473,   73,  473,   86,  160,  149,   90,
       91,   92,  473,   88,  157,   89,   90,   91,   92,  165,
       90,   91,   92,  473,  473,   84,   85,  164,  473,  163,
      158,  166,  473,  167,   86,  160,  149,   90,   91,   92,
      168,   88,  473,   89,   90,   91,   92,  473,  165,  473,
      473,   90,   91,   92,   90,   91,   92,  163,  173,  166,
      180,  167,  174,   90,   91,   92,   90,   91,   92,  168,
      177,   90,   91,   92,  170,  175,   90,   91,   92,  473,
      171,  176,  473,  150,  150,  473,  173,  172,  180,  183,
      174,  473,   90,   91,   92,   73,   90,   91,   92,  177,

       90,   91,   92,  170,  175,   90,   91,   92,  171,  178,
      176,  184,  179,  473,  473,  172,  181,  183,   90,   91,
       92,  185,  182,  186,   73,   90,   91,   92,   90,   91,
       92,  473,   90,   91,   92,   90,   91,   92,  178,  184,
      179,  187,  473,  190,  181,  191,  188,  473,  473,  185,
      182,  186,  192,   90,   91,   92,  189,   90,   91,   92,
      473,   90,   91,   92,   90,   91,   92,   90,   91,   92,
      187,  190,  196,  191,  193,  188,  195,   90,   91,   92,
      192,  194,  473,  473,  189,  212,   90,   91,   92,  197,
       90,   91,   92,  473,   90,   91,   92,  473,   90,   91,

       92,  196,  193,  198,  195,  207,  473,  199,  473,  194,
      200,   90,   91,   92,  212,  201,  208,  197,   90,   91,
       92,   90,   91,   92,   90,   91,   92,  473,   90,   91,
       92,  473,  198,  207,  473,  211,  199,  209,  473,  200,
       90,   91,   92,  201,  208,  210,  473,  473,  213,  473,
       90,   91,   92,  473,  473,   90,   91,   92,   90,   91,
       92,  202,  203,  211,  473,  209,  214,  473,  215,  218,
      473,  204,  473,  210,  205,  206,  213,   90,   91,   92,
      216,  219,   90,   91,   92,  473,  473,  217,  473,  473,
      202,  203,   90,   91,   92,  214,  215,  221,  218,  204,

      220,  473,  205,  206,   90,   91,   92,  473,  473,  216,
      219,  473,   90,   91,   92,  222,  217,  226,   90,   91,
       92,  473,   90,   91,   92,  473,  221,  227,  220,   90,
       91,   92,  228,  229,  473,   90,   91,   92,  473,   90,
       91,   92,  473,  222,  236,  473,  226,  473,  473,   90,
       91,   92,   90,   91,   92,  227,   90,   91,   92,  230,
      232,  228,  229,  473,  473,  237,   90,   91,   92,  473,
       90,   91,   92,  236,  473,  233,  240,  234,  473,  246,
       90,   91,   92,  473,  238,  473,  473,  230,  232,   90,
       91,   92,  235,  237,   90,   91,   92,  239,   90,   91,

       92,   90,   91,   92,  233,  240,  234,  246,  473,  244,
       90,   91,   92,  238,  241,  242,   90,   91,   92,  243,
      235,  245,   90,   91,   92,  239,  473,  247,  248,   90,
       91,   92,   90,   91,   92,   90,   91,   92,  244,   90,
       91,   92,  241,  473,  242,  473,  250,  473,  243,  254,
      245,  473,  473,   90,   91,   92,  247,  248,  473,  249,
      473,   90,   91,   92,  473,  473,  251,  253,   90,   91,
       92,   90,   91,   92,  250,   90,   91,   92,  254,   90,
       91,   92,  252,  257,   90,   91,   92,  249,  255,  256,
      473,   90,   91,   92,  251,  253,  260,   90,   91,   92,

      258,   90,   91,   92,   90,   91,   92,  259,  473,  267,
      252,  257,   90,   91,   92,  473,  473,  255,  256,   90,
       91,   92,  261,  473,  260,   90,   91,   92,  262,  258,
       90,   91,   92,   90,   91,   92,  259,  267,  263,  264,
       90,   91,   92,  265,   90,   91,   92,  473,   90,   91,
       92,  261,   90,   91,   92,  266,  262,  473,  473,   90,
       91,   92,  473,  473,   90,   91,   92,  263,  264,  268,
      269,  265,  473,  473,   90,   91,   92,  270,  473,  473,
      272,  273,  473,  266,  274,  473,   90,   91,   92,  271,
       90,   91,   92,   90,   91,   92,  473,  268,  473,  269,

       90,   91,   92,  473,  473,  270,   90,   91,   92,  272,
      273,  275,  276,  274,  278,  473,  277,  271,  281,  473,
      283,   90,   91,   92,   90,   91,   92,   90,   91,   92,
       90,   91,   92,   90,   91,   92,   90,   91,   92,  275,
      276,  282,  278,  473,  277,  279,  286,  281,  283,   90,
       91,   92,   90,   91,   92,  280,   90,   91,   92,   90,
       91,   92,  284,  285,  473,   90,   91,   92,  287,  282,
       90,   91,   92,  288,  279,  286,   90,   91,   92,  473,
       90,   91,   92,  280,   90,   91,   92,  289,  473,  290,
      284,  285,  291,   90,   91,   92,  287,  296,   90,   91,

       92,  288,  473,   90,   91,   92,   90,   91,   92,  294,
       90,   91,   92,   90,   91,   92,  289,  290,  292,  297,
      291,  301,  293,  473,  473,  296,  473,  295,  298,   90,
       91,   92,   90,   91,   92,   90,   91,   92,  294,   90,
       91,   92,  299,   90,   91,   92,  292,  297,  473,  301,
      293,   90,   91,   92,  300,  295,  303,  298,   90,   91,
       92,   90,   91,   92,   90,   91,   92,   90,   91,   92,
      302,  299,   90,   91,   92,  473,   90,   91,   92,  304,
      306,  473,  473,  300,  303,  305,   90,   91,   92,  473,
      473,  310,  473,  307,   90,   91,   92,  308,  473,  302,

      473,   90,   91,   92,   90,   91,   92,  304,  473,  306,
       90,   91,   92,  305,  309,  311,   90,   91,   92,  323,
      310,  307,   90,   91,   92,  308,   90,   91,   92,   90,
       91,   92,   90,   91,   92,  312,   90,   91,   92,   90,
       91,   92,  309,  311,  473,  473,  313,  323,  315,  314,
      473,   90,   91,   92,  317,  473,   90,   91,   92,  316,
      319,  473,  473,  312,   90,   91,   92,   90,   91,   92,
      473,  473,   90,   91,   92,  313,  315,  318,  314,   90,
       91,   92,  317,  324,   90,   91,   92,  473,  316,  319,
       90,   91,   92,   90,   91,   92,  320,  321,   90,   91,

       92,   90,   91,   92,  473,  318,  328,   90,   91,   92,
      322,  326,  324,   90,   91,   92,   90,   91,   92,  473,
      325,  473,  473,  327,  320,  473,  321,  473,  473,   90,
       91,   92,   90,   91,   92,  328,  329,  473,  322,  330,
      326,  331,  473,  337,  473,   90,   91,   92,  325,   90,
       91,   92,  327,  473,  333,  473,   90,   91,   92,   90,
       91,   92,   90,   91,   92,  329,  332,  334,  330,  331,
      473,  473,  337,  473,  335,   90,   91,   92,  473,  473,
       90,   91,   92,  333,   90,   91,   92,  336,   90,   91,
       92,   90,   91,   92,  332,  334,   90,   91,   92,   90,

       91,   92,  335,  338,  473,  341,   90,   91,   92,  339,
       90,   91,   92,   90,   91,   92,  336,  340,   90,   91,
       92,   90,   91,   92,   90,   91,   92,  473,  342,   90,
       91,   92,  338,  341,   90,   91,   92,  473,  339,  343,
      473,  473,   90,   91,   92,  344,  340,   90,   91,   92,
      345,  473,  346,   90,   91,   92,  342,   90,   91,   92,
      473,   90,   91,   92,   90,   91,   92,  343,  347,   90,
       91,   92,  473,  344,  473,   90,   91,   92,  350,  345,
      346,  348,   90,   91,   92,  349,  352,  473,   90,   91,
       92,  351,   90,   91,   92,  473,  473,  347,  353,  473,

       90,   91,   92,  473,  354,  356,  350,  473,  355,  348,
       90,   91,   92,  349,  473,  352,   90,   91,   92,  351,
       90,   91,   92,   90,   91,   92,  357,  353,   90,   91,
       92,  358,  354,  356,   90,   91,   92,  355,   90,   91,
       92,   90,   91,   92,   90,   91,   92,  473,  473,  359,
      473,   90,   91,   92,  361,  357,   90,   91,   92,  358,
      360,  473,  473,  363,  473,  364,   90,   91,   92,  362,
      365,  473,  473,  368,   90,   91,   92,  359,   90,   91,
       92,  473,  473,  361,   90,   91,   92,  473,  360,  473,
      366,  367,  363,  364,   90,   91,   92,  362,  365,   90,

       91,   92,  368,   90,   91,   92,   90,   91,   92,   90,
       91,   92,   90,   91,   92,   90,   91,   92,  366,  369,
      367,  372,  371,  473,   90,   91,   92,  370,  473,   90,
       91,   92,   90,   91,   92,  473,  373,  376,  473,  374,
      380,   90,   91,   92,   90,   91,   92,  473,  369,  372,
      473,  371,   90,   91,   92,  473,  370,  473,   90,   91,
       92,  375,  473,  473,  373,  377,  376,  374,  378,  380,
      473,   90,   91,   92,  379,   90,   91,   92,   90,   91,
       92,   90,   91,   92,   90,   91,   92,  473,  473,  375,
       90,   91,   92,  377,   90,   91,   92,  378,   90,   91,

       92,  381,  379,  382,   90,   91,   92,  383,  388,   90,
       91,   92,  473,  473,  386,   90,   91,   92,  473,  473,
       90,   91,   92,  385,   90,   91,   92,  473,  387,  384,
      381,  382,   90,   91,   92,  473,  383,  388,  473,  473,
      389,  390,  386,   90,   91,   92,   90,   91,   92,   90,
       91,   92,  385,   90,   91,   92,  387,  384,  473,  392,
       90,   91,   92,   90,   91,   92,   90,   91,   92,  389,
      390,   90,   91,   92,  391,  393,   90,   91,   92,  394,
      396,   90,   91,   92,   90,   91,   92,  395,  392,  398,
      473,  473,   90,   91,   92,  397,  473,   90,   91,   92,

      402,  473,  391,  393,   90,   91,   92,  473,  394,  396,
       90,   91,   92,   90,   91,   92,  395,  398,   90,   91,
       92,  399,  473,  473,  397,  473,   90,   91,   92,  402,
      473,   90,   91,   92,   90,   91,   92,  403,  400,   90,
       91,   92,  401,   90,   91,   92,  404,  473,  406,  399,
      473,   90,   91,   92,   90,   91,   92,  473,   90,   91,
       92,   90,   91,   92,  405,  407,  403,  400,   90,   91,
       92,  401,  408,  473,  404,  473,  473,  406,   90,   91,
       92,   90,   91,   92,  409,   90,   91,   92,  411,   90,
       91,   92,  405,  407,   90,   91,   92,  410,  473,  412,

      408,   90,   91,   92,   90,   91,   92,  413,  414,  473,
       90,   91,   92,  409,  473,  473,  411,   90,   91,   92,
       90,   91,   92,  415,  416,  417,  410,  412,   90,   91,
       92,  473,   90,   91,   92,  473,  413,  414,   90,   91,
       92,  418,   90,   91,   92,   90,   91,   92,   90,   91,
       92,  473,  415,  416,  417,   90,   91,   92,  419,   90,
       91,   92,   90,   91,   92,   90,   91,   92,  473,  420,
      418,   90,   91,   92,  421,   90,   91,   92,   90,   91,
       92,   90,   91,   92,  422,  473,  419,   90,   91,   92,
      423,   90,   91,   92,   90,   91,   92,  420,  424,  473,

      473,  425,  421,   90,   91,   92,   90,   91,   92,  427,
      473,  473,  422,   90,   91,   92,  426,  473,  473,  423,
      473,   90,   91,   92,   90,   91,   92,   90,   91,   92,
      425,  428,  429,   90,   91,   92,  432,  427,   90,   91,
       92,   90,   91,   92,  430,  426,   90,   91,   92,  431,
       90,   91,   92,   90,   91,   92,   90,   91,   92,  428,
      433,  429,  434,  473,  432,   90,   91,   92,  473,   90,
       91,   92,  430,  435,   90,   91,   92,  431,   90,   91,
       92,   90,   91,   92,   90,   91,   92,  436,  433,  473,
      439,  434,  437,  473,   90,   91,   92,  440,   90,   91,

       92,  435,  473,   90,   91,   92,  438,  473,  473,  441,
       90,   91,   92,  473,  473,  436,   90,   91,   92,  439,
      437,   90,   91,   92,  473,  473,  440,  444,  473,  473,
       90,   91,   92,  473,  438,  448,  445,  441,   90,   91,
       92,  442,   90,   91,   92,   90,   91,   92,  446,   90,
       91,   92,   90,   91,   92,  444,  473,  443,   90,   91,
       92,  447,  473,  448,  449,  445,  473,   90,   91,   92,
      442,  450,   90,   91,   92,  451,  458,  446,   90,   91,
       92,  452,   90,   91,   92,  443,   90,   91,   92,  454,
      447,  455,  449,  473,   90,   91,   92,   90,   91,   92,

      450,   90,   91,   92,  451,  458,  453,   90,   91,   92,
      452,  473,  457,   90,   91,   92,  473,  456,  454,  455,
      459,   90,   91,   92,   90,   91,   92,   90,   91,   92,
      473,   90,   91,   92,  453,   90,   91,   92,   90,   91,
       92,  457,   90,   91,   92,  456,   90,   91,   92,  459,
       90,   91,   92,  460,   90,   91,   92,   90,   91,   92,
       90,   91,   92,   90,   91,   92,  461,  473,   90,   91,
       92,  462,   90,   91,   92,   90,   91,   92,   90,   91,
       92,  460,   90,   91,   92,   90,   91,   92,  463,  467,
      473,   90,   91,   92,  464,  461,   90,   91,   92,  462,

       90,   91,   92,   90,   91,   92,  465,  473,   90,   91,
       92,  466,  473,  468,  470,  473,  463,  467,   90,   91,
       92,  473,  464,   90,   91,   92,   90,   91,   92,  469,
      473,  473,   90,   91,   92,  465,  473,   90,   91,   92,
      466,  468,  473,  470,  473,  471,   90,   91,   92,  473,
      473,   90,   91,   92,  472,  473,  473,  469,   90,   91,
       92,  473,  473,   90,   91,   92,   90,   91,   92,  473,
       90,   91,   92,  471,  473,  473,  473,  473,  473,  473,
      473,  473,  472,  473,  473,  473,  473,  473,  473,   90,
       91,   92,  473,  473,  473,   90,   91,   92,   64,  473,

       64,   64,   64,   64,   64,   66,  473,   66,   66,   66,
       66,   66,   75,   75,   83,  473,   83,   83,   83,  141,
      473,  141,  141,  141,  141,  141,  143,  473,  143,  143,
      143,  143,  143,  153,  153,  224,  224,  224,    5,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,

      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473
    } ;

static const flex_int16_t yy_chk[2525] =
    {   0,
        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,    3,    4,    8,    8,    9,
        9,   21,   21,   23,   32,   23,   23,   24,   40,   24,

       24,   27,   27,   27,   29,   29,   34,   23,   62,   62,
       34,   24,   82,   82,    3,    4,   38,   38,   38,  231,
       36,  151,  151,   32,   42,  225,   23,   40,   36,   69,
       69,   83,   83,   83,   36,   34,   23,  152,  152,   34,
       24,   69,  110,  110,  110,  224,   32,   32,   32,   36,
       40,   40,   40,   42,   23,   31,   31,   36,   34,   34,
       34,   35,   36,   35,  162,   31,  161,   31,   35,   41,
       69,  148,   31,   35,   31,   50,   36,   36,   36,  147,
       42,   42,   42,  144,   31,   31,  143,   37,  141,   35,
      140,   35,   92,   31,   37,   31,   35,   91,   41,   90,

       31,   35,   31,   43,   50,   67,   35,   35,   35,   43,
       31,   31,   31,   33,  154,  154,   37,   41,   41,   41,
       33,   66,   37,   50,   50,   50,   65,   33,   64,   61,
       33,   43,   59,   33,   58,   98,   57,   43,   55,   37,
       37,   37,   33,   54,   53,   43,   43,   43,   30,   33,
       71,   71,   28,   46,   22,   33,   52,   46,   33,   20,
       44,   33,   71,   98,   44,   14,   11,   46,   44,   33,
       33,   33,   39,   39,   98,   98,   98,   45,   10,   39,
       39,    7,   46,    5,    0,   39,   46,    0,   44,    0,
        0,   71,   44,    0,   45,   46,   44,   47,  120,  120,

      120,   39,   39,   44,   44,   44,   45,   39,   39,   46,
       46,   46,   47,   39,    0,   49,    0,   49,    0,    0,
       49,    0,   45,   39,   39,   39,   47,   51,   51,   52,
       52,   52,    0,   45,   45,   45,    0,   48,    0,    0,
       47,   48,    0,   49,   48,   49,   84,    0,   49,   47,
       47,   47,    0,    0,   48,    0,   51,   51,   49,   49,
       49,   72,   88,   72,   72,    0,   48,  121,  121,  121,
       48,    0,   85,   48,   84,   72,   51,   51,   51,   73,
        0,   73,   48,    0,   73,   73,   86,    0,   84,   84,
       84,   88,    0,   48,   48,   48,   60,   60,    0,   94,

       85,   87,    0,    0,   72,    0,   60,   89,   60,   85,
       85,   85,    0,   60,   86,   60,   88,   88,   88,   95,
       86,   86,   86,    0,    0,   60,   60,   94,    0,   93,
       87,   96,    0,   96,   60,   89,   60,   94,   94,   94,
       97,   60,    0,   60,   89,   89,   89,    0,   95,    0,
        0,   60,   60,   60,   87,   87,   87,   93,  100,   96,
      106,   96,  101,  146,  146,  146,   93,   93,   93,   97,
      104,   95,   95,   95,   99,  102,   96,   96,   96,    0,
       99,  103,    0,  150,  150,    0,  100,   99,  106,  108,
      101,    0,   97,   97,   97,  150,  100,  100,  100,  104,

      101,  101,  101,   99,  102,  106,  106,  106,   99,  105,
      103,  109,  105,    0,    0,   99,  107,  108,  104,  104,
      104,  111,  107,  112,  150,   99,   99,   99,  102,  102,
      102,    0,  108,  108,  108,  103,  103,  103,  105,  109,
      105,  113,    0,  114,  107,  115,  113,    0,    0,  111,
      107,  112,  116,  109,  109,  109,  113,  105,  105,  105,
        0,  107,  107,  107,  111,  111,  111,  112,  112,  112,
      113,  114,  122,  115,  117,  113,  119,  115,  115,  115,
      116,  118,    0,    0,  113,  130,  114,  114,  114,  123,
      158,  158,  158,    0,  113,  113,  113,    0,  116,  116,

      116,  122,  117,  124,  119,  127,    0,  124,    0,  118,
      125,  117,  117,  117,  130,  125,  127,  123,  118,  118,
      118,  119,  119,  119,  122,  122,  122,    0,  123,  123,
      123,    0,  124,  127,    0,  129,  124,  128,    0,  125,
      130,  130,  130,  125,  127,  128,    0,    0,  131,    0,
      127,  127,  127,    0,    0,  124,  124,  124,  125,  125,
      125,  126,  126,  129,    0,  128,  132,    0,  133,  135,
        0,  126,    0,  128,  126,  126,  131,  129,  129,  129,
      134,  136,  128,  128,  128,    0,    0,  134,    0,    0,
      126,  126,  131,  131,  131,  132,  133,  138,  135,  126,

      137,    0,  126,  126,  133,  133,  133,    0,    0,  134,
      136,    0,  126,  126,  126,  139,  134,  149,  132,  132,
      132,    0,  135,  135,  135,    0,  138,  155,  137,  136,
      136,  136,  156,  157,    0,  134,  134,  134,    0,  137,
      137,  137,    0,  139,  165,    0,  149,    0,    0,  138,
      138,  138,  139,  139,  139,  155,  159,  159,  159,  160,
      163,  156,  157,    0,    0,  166,  155,  155,  155,    0,
      149,  149,  149,  165,    0,  164,  168,  164,    0,  173,
      156,  156,  156,    0,  167,    0,    0,  160,  163,  157,
      157,  157,  164,  166,  163,  163,  163,  167,  165,  165,

      165,  160,  160,  160,  164,  168,  164,  173,    0,  171,
      166,  166,  166,  167,  169,  170,  173,  173,  173,  170,
      164,  172,  175,  175,  175,  167,    0,  174,  176,  164,
      164,  164,  168,  168,  168,  167,  167,  167,  171,  191,
      191,  191,  169,    0,  170,    0,  178,    0,  170,  182,
      172,    0,    0,  169,  169,  169,  174,  176,    0,  177,
        0,  171,  171,  171,    0,    0,  179,  181,  210,  210,
      210,  170,  170,  170,  178,  172,  172,  172,  182,  174,
      174,  174,  180,  185,  176,  176,  176,  177,  183,  184,
        0,  178,  178,  178,  179,  181,  188,  177,  177,  177,

      186,  182,  182,  182,  179,  179,  179,  187,    0,  196,
      180,  185,  181,  181,  181,    0,    0,  183,  184,  180,
      180,  180,  189,    0,  188,  185,  185,  185,  190,  186,
      226,  226,  226,  188,  188,  188,  187,  196,  192,  193,
      183,  183,  183,  194,  184,  184,  184,    0,  196,  196,
      196,  189,  186,  186,  186,  195,  190,    0,    0,  187,
      187,  187,    0,    0,  190,  190,  190,  192,  193,  197,
      198,  194,    0,    0,  189,  189,  189,  199,    0,    0,
      201,  202,    0,  195,  203,    0,  194,  194,  194,  200,
      192,  192,  192,  193,  193,  193,    0,  197,    0,  198,

      195,  195,  195,    0,    0,  199,  197,  197,  197,  201,
      202,  204,  205,  203,  207,    0,  206,  200,  209,    0,
      212,  199,  199,  199,  198,  198,  198,  200,  200,  200,
      201,  201,  201,  202,  202,  202,  203,  203,  203,  204,
      205,  211,  207,    0,  206,  208,  215,  209,  212,  205,
      205,  205,  206,  206,  206,  208,  204,  204,  204,  207,
      207,  207,  213,  214,    0,  212,  212,  212,  216,  211,
      209,  209,  209,  217,  208,  215,  234,  234,  234,    0,
      211,  211,  211,  208,  235,  235,  235,  218,    0,  219,
      213,  214,  220,  208,  208,  208,  216,  228,  215,  215,

      215,  217,    0,  213,  213,  213,  214,  214,  214,  222,
      216,  216,  216,  217,  217,  217,  218,  219,  221,  229,
      220,  236,  221,    0,    0,  228,    0,  227,  230,  220,
      220,  220,  219,  219,  219,  245,  245,  245,  222,  228,
      228,  228,  232,  218,  218,  218,  221,  229,    0,  236,
      221,  229,  229,  229,  233,  227,  238,  230,  222,  222,
      222,  221,  221,  221,  227,  227,  227,  236,  236,  236,
      237,  232,  247,  247,  247,    0,  230,  230,  230,  239,
      241,    0,    0,  233,  238,  240,  250,  250,  250,    0,
        0,  246,    0,  242,  232,  232,  232,  243,    0,  237,

        0,  238,  238,  238,  256,  256,  256,  239,    0,  241,
      233,  233,  233,  240,  244,  248,  239,  239,  239,  262,
      246,  242,  240,  240,  240,  243,  237,  237,  237,  242,
      242,  242,  241,  241,  241,  249,  243,  243,  243,  246,
      246,  246,  244,  248,    0,    0,  251,  262,  253,  252,
        0,  244,  244,  244,  255,    0,  248,  248,  248,  254,
      258,    0,    0,  249,  262,  262,  262,  263,  263,  263,
        0,    0,  249,  249,  249,  251,  253,  257,  252,  266,
      266,  266,  255,  264,  267,  267,  267,    0,  254,  258,
      253,  253,  253,  255,  255,  255,  259,  260,  251,  251,

      251,  252,  252,  252,    0,  257,  270,  254,  254,  254,
      261,  268,  264,  258,  258,  258,  257,  257,  257,    0,
      265,    0,    0,  269,  259,    0,  260,    0,    0,  259,
      259,  259,  264,  264,  264,  270,  271,    0,  261,  272,
      268,  273,    0,  279,    0,  260,  260,  260,  265,  261,
      261,  261,  269,    0,  275,    0,  265,  265,  265,  268,
      268,  268,  270,  270,  270,  271,  274,  276,  272,  273,
        0,    0,  279,    0,  277,  269,  269,  269,    0,    0,
      273,  273,  273,  275,  280,  280,  280,  278,  271,  271,
      271,  272,  272,  272,  274,  276,  279,  279,  279,  274,

      274,  274,  277,  281,    0,  284,  276,  276,  276,  282,
      275,  275,  275,  277,  277,  277,  278,  283,  285,  285,
      285,  286,  286,  286,  292,  292,  292,    0,  287,  295,
      295,  295,  281,  284,  301,  301,  301,    0,  282,  288,
        0,    0,  278,  278,  278,  289,  283,  284,  284,  284,
      290,    0,  291,  313,  313,  313,  287,  281,  281,  281,
        0,  282,  282,  282,  287,  287,  287,  288,  293,  283,
      283,  283,    0,  289,    0,  288,  288,  288,  297,  290,
      291,  294,  289,  289,  289,  296,  299,    0,  291,  291,
      291,  298,  320,  320,  320,    0,    0,  293,  300,    0,

      290,  290,  290,    0,  302,  304,  297,    0,  303,  294,
      324,  324,  324,  296,    0,  299,  297,  297,  297,  298,
      293,  293,  293,  294,  294,  294,  305,  300,  296,  296,
      296,  306,  302,  304,  298,  298,  298,  303,  299,  299,
      299,  302,  302,  302,  304,  304,  304,    0,    0,  307,
        0,  300,  300,  300,  309,  305,  303,  303,  303,  306,
      308,    0,    0,  311,    0,  312,  329,  329,  329,  310,
      314,    0,    0,  317,  306,  306,  306,  307,  305,  305,
      305,    0,    0,  309,  330,  330,  330,    0,  308,    0,
      315,  316,  311,  312,  307,  307,  307,  310,  314,  308,

      308,  308,  317,  312,  312,  312,  309,  309,  309,  314,
      314,  314,  310,  310,  310,  311,  311,  311,  315,  318,
      316,  322,  321,    0,  315,  315,  315,  319,    0,  317,
      317,  317,  337,  337,  337,    0,  323,  327,    0,  325,
      333,  316,  316,  316,  340,  340,  340,    0,  318,  322,
        0,  321,  345,  345,  345,    0,  319,    0,  322,  322,
      322,  326,    0,    0,  323,  328,  327,  325,  331,  333,
        0,  318,  318,  318,  332,  319,  319,  319,  321,  321,
      321,  323,  323,  323,  325,  325,  325,    0,    0,  326,
      327,  327,  327,  328,  333,  333,  333,  331,  326,  326,

      326,  334,  332,  335,  328,  328,  328,  336,  343,  347,
      347,  347,    0,    0,  341,  332,  332,  332,    0,    0,
      331,  331,  331,  339,  349,  349,  349,    0,  342,  338,
      334,  335,  350,  350,  350,    0,  336,  343,    0,    0,
      344,  346,  341,  357,  357,  357,  335,  335,  335,  334,
      334,  334,  339,  341,  341,  341,  342,  338,    0,  351,
      343,  343,  343,  336,  336,  336,  338,  338,  338,  344,
      346,  342,  342,  342,  348,  352,  339,  339,  339,  353,
      355,  361,  361,  361,  363,  363,  363,  354,  351,  358,
        0,    0,  344,  344,  344,  356,    0,  346,  346,  346,

      362,    0,  348,  352,  364,  364,  364,    0,  353,  355,
      348,  348,  348,  351,  351,  351,  354,  358,  352,  352,
      352,  359,    0,    0,  356,    0,  358,  358,  358,  362,
        0,  353,  353,  353,  355,  355,  355,  366,  360,  354,
      354,  354,  360,  365,  365,  365,  367,    0,  370,  359,
        0,  356,  356,  356,  362,  362,  362,    0,  359,  359,
      359,  369,  369,  369,  368,  371,  366,  360,  372,  372,
      372,  360,  374,    0,  367,    0,    0,  370,  373,  373,
      373,  379,  379,  379,  375,  366,  366,  366,  377,  367,
      367,  367,  368,  371,  360,  360,  360,  376,    0,  378,

      374,  368,  368,  368,  370,  370,  370,  380,  381,    0,
      371,  371,  371,  375,    0,    0,  377,  374,  374,  374,
      377,  377,  377,  382,  383,  386,  376,  378,  384,  384,
      384,    0,  375,  375,  375,    0,  380,  381,  385,  385,
      385,  387,  378,  378,  378,  376,  376,  376,  388,  388,
      388,    0,  382,  383,  386,  389,  389,  389,  390,  380,
      380,  380,  381,  381,  381,  393,  393,  393,    0,  391,
      387,  382,  382,  382,  392,  394,  394,  394,  383,  383,
      383,  386,  386,  386,  396,    0,  390,  395,  395,  395,
      397,  399,  399,  399,  387,  387,  387,  391,  398,    0,

        0,  400,  392,  390,  390,  390,  391,  391,  391,  402,
        0,    0,  396,  392,  392,  392,  401,    0,    0,  397,
        0,  396,  396,  396,  404,  404,  404,  398,  398,  398,
      400,  403,  405,  408,  408,  408,  409,  402,  397,  397,
      397,  411,  411,  411,  406,  401,  402,  402,  402,  407,
      413,  413,  413,  419,  419,  419,  400,  400,  400,  403,
      410,  405,  412,    0,  409,  420,  420,  420,    0,  401,
      401,  401,  406,  414,  403,  403,  403,  407,  409,  409,
      409,  406,  406,  406,  405,  405,  405,  415,  410,    0,
      418,  412,  416,    0,  407,  407,  407,  421,  422,  422,

      422,  414,    0,  410,  410,  410,  417,    0,    0,  423,
      414,  414,  414,    0,    0,  415,  412,  412,  412,  418,
      416,  426,  426,  426,    0,    0,  421,  425,    0,    0,
      415,  415,  415,    0,  417,  431,  428,  423,  416,  416,
      416,  424,  418,  418,  418,  417,  417,  417,  429,  421,
      421,  421,  423,  423,  423,  425,    0,  424,  427,  427,
      427,  430,    0,  431,  432,  428,    0,  431,  431,  431,
      424,  433,  425,  425,  425,  434,  443,  429,  435,  435,
      435,  436,  437,  437,  437,  424,  428,  428,  428,  439,
      430,  440,  432,    0,  424,  424,  424,  445,  445,  445,

      433,  429,  429,  429,  434,  443,  438,  432,  432,  432,
      436,    0,  442,  430,  430,  430,    0,  441,  439,  440,
      444,  433,  433,  433,  443,  443,  443,  434,  434,  434,
        0,  436,  436,  436,  438,  440,  440,  440,  438,  438,
      438,  442,  439,  439,  439,  441,  446,  446,  446,  444,
      447,  447,  447,  451,  441,  441,  441,  448,  448,  448,
      449,  449,  449,  450,  450,  450,  455,    0,  442,  442,
      442,  457,  444,  444,  444,  452,  452,  452,  453,  453,
      453,  451,  454,  454,  454,  456,  456,  456,  458,  464,
        0,  451,  451,  451,  461,  455,  459,  459,  459,  457,

      460,  460,  460,  465,  465,  465,  462,    0,  457,  457,
      457,  463,    0,  466,  469,    0,  458,  464,  455,  455,
      455,    0,  461,  467,  467,  467,  464,  464,  464,  468,
        0,    0,  458,  458,  458,  462,    0,  461,  461,  461,
      463,  466,    0,  469,    0,  470,  472,  472,  472,    0,
        0,  466,  466,  466,  471,    0,    0,  468,  462,  462,
      462,    0,    0,  463,  463,  463,  468,  468,  468,    0,
      469,  469,  469,  470,    0,    0,    0,    0,    0,    0,
        0,    0,  471,    0,    0,    0,    0,    0,    0,  470,
      470,  470,    0,    0,    0,  471,  471,  471,  474,    0,

      474,  474,  474,  474,  474,  475,    0,  475,  475,  475,
      475,  475,  476,  476,  477,    0,  477,  477,  477,  478,
        0,  478,  478,  478,  478,  478,  479,    0,  479,  479,
      479,  479,  479,  480,  480,  481,  481,  481,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,

      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473
    } ;

static const flex_int16_t yy_rule_linenum[124] =
    {   0,
       80,   81,   83,   89,  113,  114,  115,  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,  165,  166,  167,  168,  169,
      170,  171,  172,  173,  174,  175,  176,  177,  178,  179,
      180,  181,  182,  183,  184,  185,  186,  187,  188,  189,
      190,  191,  192,  193,  194,  195,  196,  197,  198,  200,
      201,  202,  203,  204,  205,  206,  207,  208,  210,  211,

      212,  213,  214,  215,  216,  217,  218,  219,  220,  221,
      222,  223,  224,  225,  226,  227,  228,  229,  230,  231,
      232,  233,  235
    } ;

/* The intent behind this definition is that it'll catch
 * any uses of REJECT which flex missed.
 */
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
#line 1 "sqlite3_lexer.ll"
#line 2 "sqlite3_lexer.ll"
#include <string>
#include "ParserDriver.h"
#include "sqlite3_parser.hpp"
#line 1241 "sqlite3_lexer.cpp"
#define YY_NO_UNISTD_H 1
#line 12 "sqlite3_lexer.ll"
	#define TOKEN(n) sqlb::parser::parser::symbol_type(sqlb::parser::parser::token::TOK_##n, yytext, loc)

	std::string unquote_string(std::string s, char quote_char)
	{
		if(s.size() < 2)
			return s;

		if(quote_char == '[')
		{
			if(s.front() == '[' && s.back() == ']')
				s = s.substr(1, s.size()-2);
		} else {
			if(s.front() == quote_char && s.back() == quote_char)
			{
				s = s.substr(1, s.size()-2);
				auto pos = s.npos;
				while((pos = s.find(std::string(2, quote_char))) != s.npos)
					s = s.replace(pos, 2, std::string(1, quote_char));
			}
		}

		return s;
	}
#line 1267 "sqlite3_lexer.cpp"
#line 55 "sqlite3_lexer.ll"
	/* TODO Add $ bind parameters */
	// Code run each time a pattern is matched.
	#define YY_USER_ACTION loc.columns(yyleng);
#line 1272 "sqlite3_lexer.cpp"

#line 1274 "sqlite3_lexer.cpp"

#define INITIAL 0
#define BETWEEN_MODE 1

#ifndef YY_NO_UNISTD_H
/* Special case for "unistd.h", since it is non-ANSI. We include it way
 * down here because we want the user's section 1 to have been scanned first.
 * The user has a chance to override it with an option.
 */
/* %if-c-only */
#include <unistd.h>
/* %endif */
/* %if-c++-only */
/* %endif */
#endif

#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif

/* %if-c-only Reentrant structure and macros (non-C++). */
/* %if-reentrant */

/* Holds the entire state of the reentrant scanner. */
struct yyguts_t
    {

    /* User-defined. Not touched by flex. */
    YY_EXTRA_TYPE yyextra_r;

    /* The rest are the same as the globals declared in the non-reentrant scanner. */
    FILE *yyin_r, *yyout_r;
    size_t yy_buffer_stack_top; /**< index of top of stack. */
    size_t yy_buffer_stack_max; /**< capacity of stack. */
    YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
    char yy_hold_char;
    int yy_n_chars;
    int yyleng_r;
    char *yy_c_buf_p;
    int yy_init;
    int yy_start;
    int yy_did_buffer_switch_on_eof;
    int yy_start_stack_ptr;
    int yy_start_stack_depth;
    int *yy_start_stack;
    yy_state_type yy_last_accepting_state;
    char* yy_last_accepting_cpos;

    int yylineno_r;
    int yy_flex_debug_r;

    char *yytext_r;
    int yy_more_flag;
    int yy_more_len;

    }; /* end struct yyguts_t */

/* %if-c-only */

static int yy_init_globals ( yyscan_t yyscanner );

/* %endif */

/* %if-reentrant */

int yylex_init (yyscan_t* scanner);

int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);

/* %endif */

/* %endif End reentrant structures and macros. */

/* Accessor methods to globals.
   These are made visible to non-reentrant scanners for convenience. */

int yylex_destroy ( yyscan_t yyscanner );

int yyget_debug ( yyscan_t yyscanner );

void yyset_debug ( int debug_flag , yyscan_t yyscanner );

YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );

void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );

FILE *yyget_in ( yyscan_t yyscanner );

void yyset_in  ( FILE * _in_str , yyscan_t yyscanner );

FILE *yyget_out ( yyscan_t yyscanner );

void yyset_out  ( FILE * _out_str , yyscan_t yyscanner );

			int yyget_leng ( yyscan_t yyscanner );

char *yyget_text ( yyscan_t yyscanner );

int yyget_lineno ( yyscan_t yyscanner );

void yyset_lineno ( int _line_number , yyscan_t yyscanner );

int yyget_column  ( yyscan_t yyscanner );

void yyset_column ( int _column_no , yyscan_t yyscanner );

/* %if-bison-bridge */
/* %endif */

/* Macros after this point can all be overridden by user definitions in
 * section 1.
 */

#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int yywrap ( yyscan_t yyscanner );
#else
extern int yywrap ( yyscan_t yyscanner );
#endif
#endif

/* %not-for-header */
#ifndef YY_NO_UNPUT
    
#endif
/* %ok-for-header */

/* %endif */

#ifndef yytext_ptr
static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
#endif

#ifndef YY_NO_INPUT
/* %if-c-only Standard (non-C++) definition */
/* %not-for-header */
#ifdef __cplusplus
static int yyinput ( yyscan_t yyscanner );
#else
static int input ( yyscan_t yyscanner );
#endif
/* %ok-for-header */

/* %endif */
#endif

/* %if-c-only */

/* %endif */

/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k */
#define YY_READ_BUF_SIZE 16384
#else
#define YY_READ_BUF_SIZE 8192
#endif /* __ia64__ */
#endif

/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* %if-c-only Standard (non-C++) definition */
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
/* %endif */
/* %if-c++-only C++ definition */
/* %endif */
#endif

/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 * is returned in "result".
 */
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
		{ \
		int c = '*'; \
		int n; \
		for ( n = 0; n < max_size && \
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
			buf[n] = (char) c; \
		if ( c == '\n' ) \
			buf[n++] = (char) c; \
		if ( c == EOF && ferror( yyin ) ) \
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
		result = n; \
		} \
	else \
		{ \
		errno=0; \
		while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
			{ \
			if( errno != EINTR) \
				{ \
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
				break; \
				} \
			errno=0; \
			clearerr(yyin); \
			} \
		}\
\
/* %if-c++-only C++ definition \ */\
/* %endif */

#endif

/* No semi-colon after return; correct usage is to write "yyterminate();" -
 * we don't want an extra ';' after the "return" because that will cause
 * some compilers to complain about unreachable statements.
 */
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif

/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif

/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
/* %if-c-only */
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
#endif

/* %if-tables-serialization structures and prototypes */
/* %not-for-header */
/* %ok-for-header */

/* %not-for-header */
/* %tables-yydmap generated elements */
/* %endif */
/* end tables serialization structures and prototypes */

/* %ok-for-header */

/* Default declaration of generated scanner - a define so the user can
 * easily add parameters.
 */
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
/* %if-c-only Standard (non-C++) definition */

extern int yylex (yyscan_t yyscanner);

#define YY_DECL int yylex (yyscan_t yyscanner)
/* %endif */
/* %if-c++-only C++ definition */
/* %endif */
#endif /* !YY_DECL */

/* Code executed at the beginning of each rule, after yytext and yyleng
 * have been set up.
 */
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif

/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK /*LINTED*/break;
#endif

/* %% [6.0] YY_RULE_SETUP definition goes here */
#define YY_RULE_SETUP \
	YY_USER_ACTION

/* %not-for-header */
/** The main scanner function which does all the work.
 */
YY_DECL
{
	yy_state_type yy_current_state;
	char *yy_cp, *yy_bp;
	int yy_act;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if ( !yyg->yy_init )
		{
		yyg->yy_init = 1;

#ifdef YY_USER_INIT
		YY_USER_INIT;
#endif

		if ( ! yyg->yy_start )
			yyg->yy_start = 1;	/* first start state */

		if ( ! yyin )
/* %if-c-only */
			yyin = stdin;
/* %endif */
/* %if-c++-only */
/* %endif */

		if ( ! yyout )
/* %if-c-only */
			yyout = stdout;
/* %endif */
/* %if-c++-only */
/* %endif */

		if ( ! YY_CURRENT_BUFFER ) {
			yyensure_buffer_stack (yyscanner);
			YY_CURRENT_BUFFER_LVALUE =
				yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
		}

		yy_load_buffer_state( yyscanner );
		}

	{
/* %% [7.0] user's declarations go here */
#line 69 "sqlite3_lexer.ll"



#line 73 "sqlite3_lexer.ll"
	// Shortcut to the location held by the driver
	sqlb::parser::location& loc = drv.location;

	// Code run each time yylex is called.
	loc.step();


#line 1612 "sqlite3_lexer.cpp"

	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
		{
/* %% [8.0] yymore()-related code goes here */
		yy_cp = yyg->yy_c_buf_p;

		/* Support of yytext. */
		*yy_cp = yyg->yy_hold_char;

		/* yy_bp points to the position in yy_ch_buf of the start of
		 * the current run.
		 */
		yy_bp = yy_cp;

/* %% [9.0] code to set up and find next match goes here */
		yy_current_state = yyg->yy_start;
yy_match:
		do
			{
			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
			if ( yy_accept[yy_current_state] )
				{
				yyg->yy_last_accepting_state = yy_current_state;
				yyg->yy_last_accepting_cpos = yy_cp;
				}
			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
				{
				yy_current_state = (int) yy_def[yy_current_state];
				if ( yy_current_state >= 474 )
					yy_c = yy_meta[yy_c];
				}
			yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
			++yy_cp;
			}
		while ( yy_current_state != 473 );
		yy_cp = yyg->yy_last_accepting_cpos;
		yy_current_state = yyg->yy_last_accepting_state;

yy_find_action:
/* %% [10.0] code to find the action number goes here */
		yy_act = yy_accept[yy_current_state];

		YY_DO_BEFORE_ACTION;

/* %% [11.0] code for yylineno update goes here */

do_action:	/* This label is used only to access EOF actions. */

/* %% [12.0] debug code goes here */
		if ( yy_flex_debug )
			{
			if ( yy_act == 0 )
				fprintf( stderr, "--scanner backing up\n" );
			else if ( yy_act < 124 )
				fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
				         (long)yy_rule_linenum[yy_act], yytext );
			else if ( yy_act == 124 )
				fprintf( stderr, "--accepting default rule (\"%s\")\n",
				         yytext );
			else if ( yy_act == 125 )
				fprintf( stderr, "--(end of buffer or a NUL)\n" );
			else
				fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
			}

		switch ( yy_act )
	{ /* beginning of action switch */
/* %% [13.0] actions go here */
			case 0: /* must back up */
			/* undo the effects of YY_DO_BEFORE_ACTION */
			*yy_cp = yyg->yy_hold_char;
			yy_cp = yyg->yy_last_accepting_cpos;
			yy_current_state = yyg->yy_last_accepting_state;
			goto yy_find_action;

case 1:
YY_RULE_SETUP
#line 80 "sqlite3_lexer.ll"
loc.step();
	YY_BREAK
case 2:
/* rule 2 can match eol */
YY_RULE_SETUP
#line 81 "sqlite3_lexer.ll"
loc.lines(yyleng); loc.step();
	YY_BREAK
case 3:
YY_RULE_SETUP
#line 83 "sqlite3_lexer.ll"
{
			int c;
			while((c = yyinput(yyscanner)) != '\n' && c != EOF)
				;    /* eat up text of comment */
		}
	YY_BREAK
case 4:
YY_RULE_SETUP
#line 89 "sqlite3_lexer.ll"
{
			int c;

			for(;;)
			{
				while((c = yyinput(yyscanner)) != '*' && c != EOF)
					;    /* eat up text of comment */

				if(c == '*')
				{
					while((c = yyinput(yyscanner)) == '*')
						;
					if(c == '/')
						break;    /* found the end */
				}

				if(c == EOF)
					throw sqlb::parser::parser::syntax_error(loc, "EOF in comment");
			}
		}
	YY_BREAK
/* For lack of a better idea, we need this hack to avoid reduce/reduce conflicts in the rules for parsing BETWEEN expressions.
  * What we do here is distinguish two types of AND operators: the regular one and the special case when the AND follows a BETWEEN keyword.
  */
case 5:
YY_RULE_SETUP
#line 113 "sqlite3_lexer.ll"
{ BEGIN INITIAL; return TOKEN(AND_BETWEEN); }
	YY_BREAK
case 6:
YY_RULE_SETUP
#line 114 "sqlite3_lexer.ll"
return TOKEN(AND);
	YY_BREAK
case 7:
YY_RULE_SETUP
#line 115 "sqlite3_lexer.ll"
{ BEGIN BETWEEN_MODE; return TOKEN(BETWEEN); }
	YY_BREAK
case 8:
YY_RULE_SETUP
#line 117 "sqlite3_lexer.ll"
return TOKEN(ABORT);
	YY_BREAK
case 9:
YY_RULE_SETUP
#line 118 "sqlite3_lexer.ll"
return TOKEN(ACTION);
	YY_BREAK
case 10:
YY_RULE_SETUP
#line 119 "sqlite3_lexer.ll"
return TOKEN(ALWAYS);
	YY_BREAK
case 11:
YY_RULE_SETUP
#line 120 "sqlite3_lexer.ll"
return TOKEN(AS);
	YY_BREAK
case 12:
YY_RULE_SETUP
#line 121 "sqlite3_lexer.ll"
return TOKEN(ASC);
	YY_BREAK
case 13:
YY_RULE_SETUP
#line 122 "sqlite3_lexer.ll"
return TOKEN(AUTOINCREMENT);
	YY_BREAK
case 14:
YY_RULE_SETUP
#line 123 "sqlite3_lexer.ll"
return TOKEN(CASCADE);
	YY_BREAK
case 15:
YY_RULE_SETUP
#line 124 "sqlite3_lexer.ll"
return TOKEN(CASE);
	YY_BREAK
case 16:
YY_RULE_SETUP
#line 125 "sqlite3_lexer.ll"
return TOKEN(CAST);
	YY_BREAK
case 17:
YY_RULE_SETUP
#line 126 "sqlite3_lexer.ll"
return TOKEN(CHECK);
	YY_BREAK
case 18:
YY_RULE_SETUP
#line 127 "sqlite3_lexer.ll"
return TOKEN(COLLATE);
	YY_BREAK
case 19:
YY_RULE_SETUP
#line 128 "sqlite3_lexer.ll"
return TOKEN(CONFLICT);
	YY_BREAK
case 20:
YY_RULE_SETUP
#line 129 "sqlite3_lexer.ll"
return TOKEN(CONSTRAINT);
	YY_BREAK
case 21:
YY_RULE_SETUP
#line 130 "sqlite3_lexer.ll"
return TOKEN(CREATE);
	YY_BREAK
case 22:
YY_RULE_SETUP
#line 131 "sqlite3_lexer.ll"
return TOKEN(CURRENT_DATE);
	YY_BREAK
case 23:
YY_RULE_SETUP
#line 132 "sqlite3_lexer.ll"
return TOKEN(CURRENT_TIME);
	YY_BREAK
case 24:
YY_RULE_SETUP
#line 133 "sqlite3_lexer.ll"
return TOKEN(CURRENT_TIMESTAMP);
	YY_BREAK
case 25:
YY_RULE_SETUP
#line 134 "sqlite3_lexer.ll"
return TOKEN(DEFAULT);
	YY_BREAK
case 26:
YY_RULE_SETUP
#line 135 "sqlite3_lexer.ll"
return TOKEN(DEFERRABLE);
	YY_BREAK
case 27:
YY_RULE_SETUP
#line 136 "sqlite3_lexer.ll"
return TOKEN(DEFERRED);
	YY_BREAK
case 28:
YY_RULE_SETUP
#line 137 "sqlite3_lexer.ll"
return TOKEN(DELETE);
	YY_BREAK
case 29:
YY_RULE_SETUP
#line 138 "sqlite3_lexer.ll"
return TOKEN(DESC);
	YY_BREAK
case 30:
YY_RULE_SETUP
#line 139 "sqlite3_lexer.ll"
return TOKEN(DISTINCT);
	YY_BREAK
case 31:
YY_RULE_SETUP
#line 140 "sqlite3_lexer.ll"
return TOKEN(ELSE);
	YY_BREAK
case 32:
YY_RULE_SETUP
#line 141 "sqlite3_lexer.ll"
return TOKEN(END);
	YY_BREAK
case 33:
YY_RULE_SETUP
#line 142 "sqlite3_lexer.ll"
return TOKEN(ESCAPE);
	YY_BREAK
case 34:
YY_RULE_SETUP
#line 143 "sqlite3_lexer.ll"
return TOKEN(EXISTS);
	YY_BREAK
case 35:
YY_RULE_SETUP
#line 144 "sqlite3_lexer.ll"
return TOKEN(FAIL);
	YY_BREAK
case 36:
YY_RULE_SETUP
#line 145 "sqlite3_lexer.ll"
return TOKEN(FALSE);
	YY_BREAK
case 37:
YY_RULE_SETUP
#line 146 "sqlite3_lexer.ll"
return TOKEN(FILTER);
	YY_BREAK
case 38:
YY_RULE_SETUP
#line 147 "sqlite3_lexer.ll"
return TOKEN(FOLLOWING);
	YY_BREAK
case 39:
YY_RULE_SETUP
#line 148 "sqlite3_lexer.ll"
return TOKEN(FOREIGN);
	YY_BREAK
case 40:
YY_RULE_SETUP
#line 149 "sqlite3_lexer.ll"
return TOKEN(GENERATED);
	YY_BREAK
case 41:
YY_RULE_SETUP
#line 150 "sqlite3_lexer.ll"
return TOKEN(GLOB);
	YY_BREAK
case 42:
YY_RULE_SETUP
#line 151 "sqlite3_lexer.ll"
return TOKEN(IF);
	YY_BREAK
case 43:
YY_RULE_SETUP
#line 152 "sqlite3_lexer.ll"
return TOKEN(IGNORE);
	YY_BREAK
case 44:
YY_RULE_SETUP
#line 153 "sqlite3_lexer.ll"
return TOKEN(IMMEDIATE);
	YY_BREAK
case 45:
YY_RULE_SETUP
#line 154 "sqlite3_lexer.ll"
return TOKEN(IN);
	YY_BREAK
case 46:
YY_RULE_SETUP
#line 155 "sqlite3_lexer.ll"
return TOKEN(INDEX);
	YY_BREAK
case 47:
YY_RULE_SETUP
#line 156 "sqlite3_lexer.ll"
return TOKEN(INITIALLY);
	YY_BREAK
case 48:
YY_RULE_SETUP
#line 157 "sqlite3_lexer.ll"
return TOKEN(INSERT);
	YY_BREAK
case 49:
YY_RULE_SETUP
#line 158 "sqlite3_lexer.ll"
return TOKEN(IS);
	YY_BREAK
case 50:
YY_RULE_SETUP
#line 159 "sqlite3_lexer.ll"
return TOKEN(ISNULL);
	YY_BREAK
case 51:
YY_RULE_SETUP
#line 160 "sqlite3_lexer.ll"
return TOKEN(KEY);
	YY_BREAK
case 52:
YY_RULE_SETUP
#line 161 "sqlite3_lexer.ll"
return TOKEN(LIKE);
	YY_BREAK
case 53:
YY_RULE_SETUP
#line 162 "sqlite3_lexer.ll"
return TOKEN(MATCH);
	YY_BREAK
case 54:
YY_RULE_SETUP
#line 163 "sqlite3_lexer.ll"
return TOKEN(NO);
	YY_BREAK
case 55:
YY_RULE_SETUP
#line 164 "sqlite3_lexer.ll"
return TOKEN(NOT);
	YY_BREAK
case 56:
YY_RULE_SETUP
#line 165 "sqlite3_lexer.ll"
return TOKEN(NOTNULL);
	YY_BREAK
case 57:
YY_RULE_SETUP
#line 166 "sqlite3_lexer.ll"
return TOKEN(NULL);
	YY_BREAK
case 58:
YY_RULE_SETUP
#line 167 "sqlite3_lexer.ll"
return TOKEN(ON);
	YY_BREAK
case 59:
YY_RULE_SETUP
#line 168 "sqlite3_lexer.ll"
return TOKEN(OR);
	YY_BREAK
case 60:
YY_RULE_SETUP
#line 169 "sqlite3_lexer.ll"
return TOKEN(OVER);
	YY_BREAK
case 61:
YY_RULE_SETUP
#line 170 "sqlite3_lexer.ll"
return TOKEN(PARTITION);
	YY_BREAK
case 62:
YY_RULE_SETUP
#line 171 "sqlite3_lexer.ll"
return TOKEN(PRECEDING);
	YY_BREAK
case 63:
YY_RULE_SETUP
#line 172 "sqlite3_lexer.ll"
return TOKEN(PRIMARY);
	YY_BREAK
case 64:
YY_RULE_SETUP
#line 173 "sqlite3_lexer.ll"
return TOKEN(RAISE);
	YY_BREAK
case 65:
YY_RULE_SETUP
#line 174 "sqlite3_lexer.ll"
return TOKEN(RANGE);
	YY_BREAK
case 66:
YY_RULE_SETUP
#line 175 "sqlite3_lexer.ll"
return TOKEN(REFERENCES);
	YY_BREAK
case 67:
YY_RULE_SETUP
#line 176 "sqlite3_lexer.ll"
return TOKEN(REGEXP);
	YY_BREAK
case 68:
YY_RULE_SETUP
#line 177 "sqlite3_lexer.ll"
return TOKEN(REPLACE);
	YY_BREAK
case 69:
YY_RULE_SETUP
#line 178 "sqlite3_lexer.ll"
return TOKEN(RESTRICT);
	YY_BREAK
case 70:
YY_RULE_SETUP
#line 179 "sqlite3_lexer.ll"
return TOKEN(RETURNING);
	YY_BREAK
case 71:
YY_RULE_SETUP
#line 180 "sqlite3_lexer.ll"
return TOKEN(ROLLBACK);
	YY_BREAK
case 72:
YY_RULE_SETUP
#line 181 "sqlite3_lexer.ll"
return TOKEN(ROWID);
	YY_BREAK
case 73:
YY_RULE_SETUP
#line 182 "sqlite3_lexer.ll"
return TOKEN(ROWS);
	YY_BREAK
case 74:
YY_RULE_SETUP
#line 183 "sqlite3_lexer.ll"
return TOKEN(SELECT);
	YY_BREAK
case 75:
YY_RULE_SETUP
#line 184 "sqlite3_lexer.ll"
return TOKEN(SET);
	YY_BREAK
case 76:
YY_RULE_SETUP
#line 185 "sqlite3_lexer.ll"
return TOKEN(STORED);
	YY_BREAK
case 77:
YY_RULE_SETUP
#line 186 "sqlite3_lexer.ll"
return TOKEN(TABLE);
	YY_BREAK
case 78:
YY_RULE_SETUP
#line 187 "sqlite3_lexer.ll"
return TOKEN(TEMP);
	YY_BREAK
case 79:
YY_RULE_SETUP
#line 188 "sqlite3_lexer.ll"
return TOKEN(TEMPORARY);
	YY_BREAK
case 80:
YY_RULE_SETUP
#line 189 "sqlite3_lexer.ll"
return TOKEN(THEN);
	YY_BREAK
case 81:
YY_RULE_SETUP
#line 190 "sqlite3_lexer.ll"
return TOKEN(TRUE);
	YY_BREAK
case 82:
YY_RULE_SETUP
#line 191 "sqlite3_lexer.ll"
return TOKEN(UNBOUNDED);
	YY_BREAK
case 83:
YY_RULE_SETUP
#line 192 "sqlite3_lexer.ll"
return TOKEN(UNIQUE);
	YY_BREAK
case 84:
YY_RULE_SETUP
#line 193 "sqlite3_lexer.ll"
return TOKEN(UPDATE);
	YY_BREAK
case 85:
YY_RULE_SETUP
#line 194 "sqlite3_lexer.ll"
return TOKEN(USING);
	YY_BREAK
case 86:
YY_RULE_SETUP
#line 195 "sqlite3_lexer.ll"
return TOKEN(VIRTUAL);
	YY_BREAK
case 87:
YY_RULE_SETUP
#line 196 "sqlite3_lexer.ll"
return TOKEN(WHEN);
	YY_BREAK
case 88:
YY_RULE_SETUP
#line 197 "sqlite3_lexer.ll"
return TOKEN(WHERE);
	YY_BREAK
case 89:
YY_RULE_SETUP
#line 198 "sqlite3_lexer.ll"
return TOKEN(WITHOUT);
	YY_BREAK
case 90:
YY_RULE_SETUP
#line 200 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_IDENTIFIER(yytext, loc);
	YY_BREAK
case 91:
YY_RULE_SETUP
#line 201 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_IDENTIFIER(unquote_string(yytext, '`'), loc);
	YY_BREAK
case 92:
YY_RULE_SETUP
#line 202 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_IDENTIFIER(unquote_string(yytext, '['), loc);
	YY_BREAK
case 93:
YY_RULE_SETUP
#line 203 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_QUOTEDLITERAL(unquote_string(yytext, '"'), loc);
	YY_BREAK
case 94:
YY_RULE_SETUP
#line 204 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_STRINGLITERAL(yytext, loc);
	YY_BREAK
case 95:
YY_RULE_SETUP
#line 205 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_NUMERIC(yytext, loc);
	YY_BREAK
case 96:
YY_RULE_SETUP
#line 206 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_BLOBLITERAL(yytext, loc);
	YY_BREAK
case 97:
YY_RULE_SETUP
#line 207 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_BINDPARAMETER(yytext, loc);
	YY_BREAK
case 98:
YY_RULE_SETUP
#line 208 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_BINDPARAMETER(yytext, loc);
	YY_BREAK
case 99:
YY_RULE_SETUP
#line 210 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_LPAREN(loc);
	YY_BREAK
case 100:
YY_RULE_SETUP
#line 211 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_RPAREN(loc);
	YY_BREAK
case 101:
YY_RULE_SETUP
#line 212 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_DOT(loc);
	YY_BREAK
case 102:
YY_RULE_SETUP
#line 213 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_COMMA(loc);
	YY_BREAK
case 103:
YY_RULE_SETUP
#line 214 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_SEMI(loc);
	YY_BREAK
case 104:
YY_RULE_SETUP
#line 215 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_PLUS(loc);
	YY_BREAK
case 105:
YY_RULE_SETUP
#line 216 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_MINUS(loc);
	YY_BREAK
case 106:
YY_RULE_SETUP
#line 217 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_STAR(loc);
	YY_BREAK
case 107:
YY_RULE_SETUP
#line 218 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_SLASH(loc);
	YY_BREAK
case 108:
YY_RULE_SETUP
#line 219 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_TILDE(loc);
	YY_BREAK
case 109:
YY_RULE_SETUP
#line 220 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_AMPERSAND(loc);
	YY_BREAK
case 110:
YY_RULE_SETUP
#line 221 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_PERCENT(loc);
	YY_BREAK
case 111:
YY_RULE_SETUP
#line 222 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_BITOR(loc);
	YY_BREAK
case 112:
YY_RULE_SETUP
#line 223 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_OROP(loc);
	YY_BREAK
case 113:
YY_RULE_SETUP
#line 224 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_EQUAL(loc);
	YY_BREAK
case 114:
YY_RULE_SETUP
#line 225 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_EQUAL2(loc);
	YY_BREAK
case 115:
YY_RULE_SETUP
#line 226 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_GREATER(loc);
	YY_BREAK
case 116:
YY_RULE_SETUP
#line 227 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_GREATEREQUAL(loc);
	YY_BREAK
case 117:
YY_RULE_SETUP
#line 228 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_LOWER(loc);
	YY_BREAK
case 118:
YY_RULE_SETUP
#line 229 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_LOWEREQUAL(loc);
	YY_BREAK
case 119:
YY_RULE_SETUP
#line 230 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_UNEQUAL(loc);
	YY_BREAK
case 120:
YY_RULE_SETUP
#line 231 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_UNEQUAL2(loc);
	YY_BREAK
case 121:
YY_RULE_SETUP
#line 232 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_BITWISELEFT(loc);
	YY_BREAK
case 122:
YY_RULE_SETUP
#line 233 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_BITWISERIGHT(loc);
	YY_BREAK
case 123:
YY_RULE_SETUP
#line 235 "sqlite3_lexer.ll"
throw sqlb::parser::parser::syntax_error(loc, "Invalid character: " + std::string(yytext));
	YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(BETWEEN_MODE):
#line 237 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_EOF(loc);
	YY_BREAK
case 124:
YY_RULE_SETUP
#line 239 "sqlite3_lexer.ll"
YY_FATAL_ERROR( "flex scanner jammed" );
	YY_BREAK
#line 2340 "sqlite3_lexer.cpp"

	case YY_END_OF_BUFFER:
		{
		/* Amount of text matched not including the EOB char. */
		int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;

		/* Undo the effects of YY_DO_BEFORE_ACTION. */
		*yy_cp = yyg->yy_hold_char;
		YY_RESTORE_YY_MORE_OFFSET

		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
			{
			/* We're scanning a new file or input source.  It's
			 * possible that this happened because the user
			 * just pointed yyin at a new source and called
			 * yylex().  If so, then we have to assure
			 * consistency between YY_CURRENT_BUFFER and our
			 * globals.  Here is the right place to do so, because
			 * this is the first action (other than possibly a
			 * back-up) that will match for the new input source.
			 */
			yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
/* %if-c-only */
			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
/* %endif */
/* %if-c++-only */
/* %endif */
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
			}

		/* Note that here we test for yy_c_buf_p "<=" to the position
		 * of the first EOB in the buffer, since yy_c_buf_p will
		 * already have been incremented past the NUL character
		 * (since all states make transitions on EOB to the
		 * end-of-buffer state).  Contrast this with the test
		 * in input().
		 */
		if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
			{ /* This was really a NUL. */
			yy_state_type yy_next_state;

			yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;

			yy_current_state = yy_get_previous_state( yyscanner );

			/* Okay, we're now positioned to make the NUL
			 * transition.  We couldn't have
			 * yy_get_previous_state() go ahead and do it
			 * for us because it doesn't know how to deal
			 * with the possibility of jamming (and we don't
			 * want to build jamming into it because then it
			 * will run more slowly).
			 */

			yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);

			yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;

			if ( yy_next_state )
				{
				/* Consume the NUL. */
				yy_cp = ++yyg->yy_c_buf_p;
				yy_current_state = yy_next_state;
				goto yy_match;
				}

			else
				{
/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
				yy_cp = yyg->yy_last_accepting_cpos;
				yy_current_state = yyg->yy_last_accepting_state;
				goto yy_find_action;
				}
			}

		else switch ( yy_get_next_buffer( yyscanner ) )
			{
			case EOB_ACT_END_OF_FILE:
				{
				yyg->yy_did_buffer_switch_on_eof = 0;

				if ( yywrap( yyscanner ) )
					{
					/* Note: because we've taken care in
					 * yy_get_next_buffer() to have set up
					 * yytext, we can now set up
					 * yy_c_buf_p so that if some total
					 * hoser (like flex itself) wants to
					 * call the scanner after we return the
					 * YY_NULL, it'll still work - another
					 * YY_NULL will get returned.
					 */
					yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;

					yy_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

				else
					{
					if ( ! yyg->yy_did_buffer_switch_on_eof )
						YY_NEW_FILE;
					}
				break;
				}

			case EOB_ACT_CONTINUE_SCAN:
				yyg->yy_c_buf_p =
					yyg->yytext_ptr + yy_amount_of_matched_text;

				yy_current_state = yy_get_previous_state( yyscanner );

				yy_cp = yyg->yy_c_buf_p;
				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
				goto yy_match;

			case EOB_ACT_LAST_MATCH:
				yyg->yy_c_buf_p =
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];

				yy_current_state = yy_get_previous_state( yyscanner );

				yy_cp = yyg->yy_c_buf_p;
				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
				goto yy_find_action;
			}
		break;
		}

	default:
		YY_FATAL_ERROR(
			"fatal flex scanner internal error--no action found" );
	} /* end of action switch */
		} /* end of scanning one token */
	} /* end of user's declarations */
} /* end of yylex */
/* %ok-for-header */

/* %if-c++-only */
/* %not-for-header */
/* %ok-for-header */

/* %endif */

/* yy_get_next_buffer - try to read in a new buffer
 *
 * Returns a code representing an action:
 *	EOB_ACT_LAST_MATCH -
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 *	EOB_ACT_END_OF_FILE - end of file
 */
/* %if-c-only */
static int yy_get_next_buffer (yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
	char *source = yyg->yytext_ptr;
	int number_to_move, i;
	int ret_val;

	if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
		YY_FATAL_ERROR(
		"fatal flex scanner internal error--end of buffer missed" );

	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
		{ /* Don't try to fill the buffer, so this is an EOF. */
		if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
			{
			/* We matched a single character, the EOB, so
			 * treat this as a final EOF.
			 */
			return EOB_ACT_END_OF_FILE;
			}

		else
			{
			/* We matched some text prior to the EOB, first
			 * process it.
			 */
			return EOB_ACT_LAST_MATCH;
			}
		}

	/* Try to read more data. */

	/* First move last chars to start of buffer. */
	number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);

	for ( i = 0; i < number_to_move; ++i )
		*(dest++) = *(source++);

	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
		/* don't do the read, it's not guaranteed to return an EOF,
		 * just force an EOF
		 */
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;

	else
		{
			int num_to_read =
			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;

		while ( num_to_read <= 0 )
			{ /* Not enough room in the buffer - grow it. */

			/* just a shorter name for the current buffer */
			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;

			int yy_c_buf_p_offset =
				(int) (yyg->yy_c_buf_p - b->yy_ch_buf);

			if ( b->yy_is_our_buffer )
				{
				int new_size = b->yy_buf_size * 2;

				if ( new_size <= 0 )
					b->yy_buf_size += b->yy_buf_size / 8;
				else
					b->yy_buf_size *= 2;

				b->yy_ch_buf = (char *)
					/* Include room in for 2 EOB chars. */
					yyrealloc( (void *) b->yy_ch_buf,
							 (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
				}
			else
				/* Can't grow it, we don't own it. */
				b->yy_ch_buf = NULL;

			if ( ! b->yy_ch_buf )
				YY_FATAL_ERROR(
				"fatal error - scanner input buffer overflow" );

			yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];

			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
						number_to_move - 1;

			}

		if ( num_to_read > YY_READ_BUF_SIZE )
			num_to_read = YY_READ_BUF_SIZE;

		/* Read in more data. */
		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
			yyg->yy_n_chars, num_to_read );

		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
		}

	if ( yyg->yy_n_chars == 0 )
		{
		if ( number_to_move == YY_MORE_ADJ )
			{
			ret_val = EOB_ACT_END_OF_FILE;
			yyrestart( yyin  , yyscanner);
			}

		else
			{
			ret_val = EOB_ACT_LAST_MATCH;
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
				YY_BUFFER_EOF_PENDING;
			}
		}

	else
		ret_val = EOB_ACT_CONTINUE_SCAN;

	if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
		/* Extend the array by 50%, plus the number we really need. */
		int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
			(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
		/* "- 2" to take care of EOB's */
		YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
	}

	yyg->yy_n_chars += number_to_move;
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;

	yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];

	return ret_val;
}

/* yy_get_previous_state - get the state just before the EOB char was reached */

/* %if-c-only */
/* %not-for-header */
    static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
	yy_state_type yy_current_state;
	char *yy_cp;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

/* %% [15.0] code to get the start state into yy_current_state goes here */
	yy_current_state = yyg->yy_start;

	for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
		{
/* %% [16.0] code to find the next state goes here */
		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
		if ( yy_accept[yy_current_state] )
			{
			yyg->yy_last_accepting_state = yy_current_state;
			yyg->yy_last_accepting_cpos = yy_cp;
			}
		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
			{
			yy_current_state = (int) yy_def[yy_current_state];
			if ( yy_current_state >= 474 )
				yy_c = yy_meta[yy_c];
			}
		yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
		}

	return yy_current_state;
}

/* yy_try_NUL_trans - try to make a transition on the NUL character
 *
 * synopsis
 *	next_state = yy_try_NUL_trans( current_state );
 */
/* %if-c-only */
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
	int yy_is_jam;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
/* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
	char *yy_cp = yyg->yy_c_buf_p;

	YY_CHAR yy_c = 1;
	if ( yy_accept[yy_current_state] )
		{
		yyg->yy_last_accepting_state = yy_current_state;
		yyg->yy_last_accepting_cpos = yy_cp;
		}
	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
		{
		yy_current_state = (int) yy_def[yy_current_state];
		if ( yy_current_state >= 474 )
			yy_c = yy_meta[yy_c];
		}
	yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
	yy_is_jam = (yy_current_state == 473);

	(void)yyg;
	return yy_is_jam ? 0 : yy_current_state;
}

#ifndef YY_NO_UNPUT
/* %if-c-only */

/* %endif */
#endif

/* %if-c-only */
#ifndef YY_NO_INPUT
#ifdef __cplusplus
    static int yyinput (yyscan_t yyscanner)
#else
    static int input  (yyscan_t yyscanner)
#endif

/* %endif */
/* %if-c++-only */
/* %endif */
{
	int c;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	*yyg->yy_c_buf_p = yyg->yy_hold_char;

	if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
		{
		/* yy_c_buf_p now points to the character we want to return.
		 * If this occurs *before* the EOB characters, then it's a
		 * valid NUL; if not, then we've hit the end of the buffer.
		 */
		if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
			/* This was really a NUL. */
			*yyg->yy_c_buf_p = '\0';

		else
			{ /* need more input */
			int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
			++yyg->yy_c_buf_p;

			switch ( yy_get_next_buffer( yyscanner ) )
				{
				case EOB_ACT_LAST_MATCH:
					/* This happens because yy_g_n_b()
					 * sees that we've accumulated a
					 * token and flags that we need to
					 * try matching the token before
					 * proceeding.  But for input(),
					 * there's no matching to consider.
					 * So convert the EOB_ACT_LAST_MATCH
					 * to EOB_ACT_END_OF_FILE.
					 */

					/* Reset buffer status. */
					yyrestart( yyin , yyscanner);

					/*FALLTHROUGH*/

				case EOB_ACT_END_OF_FILE:
					{
					if ( yywrap( yyscanner ) )
						return 0;

					if ( ! yyg->yy_did_buffer_switch_on_eof )
						YY_NEW_FILE;
#ifdef __cplusplus
					return yyinput(yyscanner);
#else
					return input(yyscanner);
#endif
					}

				case EOB_ACT_CONTINUE_SCAN:
					yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
					break;
				}
			}
		}

	c = *(unsigned char *) yyg->yy_c_buf_p;	/* cast for 8-bit char's */
	*yyg->yy_c_buf_p = '\0';	/* preserve yytext */
	yyg->yy_hold_char = *++yyg->yy_c_buf_p;

/* %% [19.0] update BOL and yylineno */

	return c;
}
/* %if-c-only */
#endif	/* ifndef YY_NO_INPUT */
/* %endif */

/** Immediately switch to a different input stream.
 * @param input_file A readable stream.
 * @param yyscanner The scanner object.
 * @note This function does not reset the start condition to @c INITIAL .
 */
/* %if-c-only */
    void yyrestart  (FILE * input_file , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if ( ! YY_CURRENT_BUFFER ){
        yyensure_buffer_stack (yyscanner);
		YY_CURRENT_BUFFER_LVALUE =
            yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
	}

	yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
	yy_load_buffer_state( yyscanner );
}

/* %if-c++-only */
/* %endif */

/** Switch to a different input buffer.
 * @param new_buffer The new input buffer.
 * @param yyscanner The scanner object.
 */
/* %if-c-only */
    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	/* TODO. We should be able to replace this entire function body
	 * with
	 *		yypop_buffer_state();
	 *		yypush_buffer_state(new_buffer);
     */
	yyensure_buffer_stack (yyscanner);
	if ( YY_CURRENT_BUFFER == new_buffer )
		return;

	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*yyg->yy_c_buf_p = yyg->yy_hold_char;
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
		}

	YY_CURRENT_BUFFER_LVALUE = new_buffer;
	yy_load_buffer_state( yyscanner );

	/* We don't actually know whether we did this switch during
	 * EOF (yywrap()) processing, but the only time this flag
	 * is looked at is after yywrap() is called, so it's safe
	 * to go ahead and always set it.
	 */
	yyg->yy_did_buffer_switch_on_eof = 1;
}

/* %if-c-only */
static void yy_load_buffer_state  (yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
	yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
/* %if-c-only */
	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
/* %endif */
/* %if-c++-only */
/* %endif */
	yyg->yy_hold_char = *yyg->yy_c_buf_p;
}

/** Allocate and initialize an input buffer state.
 * @param file A readable stream.
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 * @param yyscanner The scanner object.
 * @return the allocated buffer state.
 */
/* %if-c-only */
    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
	YY_BUFFER_STATE b;
    
	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );

	b->yy_buf_size = size;

	/* yy_ch_buf has to be 2 characters longer than the size given because
	 * we need to put in 2 end-of-buffer characters.
	 */
	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
	if ( ! b->yy_ch_buf )
		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );

	b->yy_is_our_buffer = 1;

	yy_init_buffer( b, file , yyscanner);

	return b;
}

/* %if-c++-only */
/* %endif */

/** Destroy the buffer.
 * @param b a buffer created with yy_create_buffer()
 * @param yyscanner The scanner object.
 */
/* %if-c-only */
    void yy_delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if ( ! b )
		return;

	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;

	if ( b->yy_is_our_buffer )
		yyfree( (void *) b->yy_ch_buf , yyscanner );

	yyfree( (void *) b , yyscanner );
}

/* Initializes or reinitializes a buffer.
 * This function is sometimes called more than once on the same buffer,
 * such as during a yyrestart() or at EOF.
 */
/* %if-c-only */
    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */

{
	int oerrno = errno;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	yy_flush_buffer( b , yyscanner);

/* %if-c-only */
	b->yy_input_file = file;
/* %endif */
/* %if-c++-only */
/* %endif */
	b->yy_fill_buffer = 1;

    /* If b is the current buffer, then yy_init_buffer was _probably_
     * called from yyrestart() or through yy_get_next_buffer.
     * In that case, we don't want to reset the lineno or column.
     */
    if (b != YY_CURRENT_BUFFER){
        b->yy_bs_lineno = 1;
        b->yy_bs_column = 0;
    }

/* %if-c-only */

        b->yy_is_interactive = 0;
    
/* %endif */
/* %if-c++-only */
/* %endif */
	errno = oerrno;
}

/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 * @param yyscanner The scanner object.
 */
/* %if-c-only */
    void yy_flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	if ( ! b )
		return;

	b->yy_n_chars = 0;

	/* We always need two end-of-buffer characters.  The first causes
	 * a transition to the end-of-buffer state.  The second causes
	 * a jam in that state.
	 */
	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;

	b->yy_buf_pos = &b->yy_ch_buf[0];

	b->yy_at_bol = 1;
	b->yy_buffer_status = YY_BUFFER_NEW;

	if ( b == YY_CURRENT_BUFFER )
		yy_load_buffer_state( yyscanner );
}

/* %if-c-or-c++ */
/** Pushes the new state onto the stack. The new state becomes
 *  the current state. This function will allocate the stack
 *  if necessary.
 *  @param new_buffer The new state.
 *  @param yyscanner The scanner object.
 */
/* %if-c-only */
void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	if (new_buffer == NULL)
		return;

	yyensure_buffer_stack(yyscanner);

	/* This block is copied from yy_switch_to_buffer. */
	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*yyg->yy_c_buf_p = yyg->yy_hold_char;
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
		}

	/* Only push if top exists. Otherwise, replace top. */
	if (YY_CURRENT_BUFFER)
		yyg->yy_buffer_stack_top++;
	YY_CURRENT_BUFFER_LVALUE = new_buffer;

	/* copied from yy_switch_to_buffer. */
	yy_load_buffer_state( yyscanner );
	yyg->yy_did_buffer_switch_on_eof = 1;
}
/* %endif */

/* %if-c-or-c++ */
/** Removes and deletes the top of the stack, if present.
 *  The next element becomes the new top.
 *  @param yyscanner The scanner object.
 */
/* %if-c-only */
void yypop_buffer_state (yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	if (!YY_CURRENT_BUFFER)
		return;

	yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
	YY_CURRENT_BUFFER_LVALUE = NULL;
	if (yyg->yy_buffer_stack_top > 0)
		--yyg->yy_buffer_stack_top;

	if (YY_CURRENT_BUFFER) {
		yy_load_buffer_state( yyscanner );
		yyg->yy_did_buffer_switch_on_eof = 1;
	}
}
/* %endif */

/* %if-c-or-c++ */
/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 */
/* %if-c-only */
static void yyensure_buffer_stack (yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
	yy_size_t num_to_alloc;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if (!yyg->yy_buffer_stack) {

		/* First allocation is just for 2 elements, since we don't know if this
		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
		 * immediate realloc on the next call.
         */
      num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
		yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
								(num_to_alloc * sizeof(struct yy_buffer_state*)
								, yyscanner);
		if ( ! yyg->yy_buffer_stack )
			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );

		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));

		yyg->yy_buffer_stack_max = num_to_alloc;
		yyg->yy_buffer_stack_top = 0;
		return;
	}

	if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){

		/* Increase the buffer to prepare for a possible push. */
		yy_size_t grow_size = 8 /* arbitrary grow size */;

		num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
		yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
								(yyg->yy_buffer_stack,
								num_to_alloc * sizeof(struct yy_buffer_state*)
								, yyscanner);
		if ( ! yyg->yy_buffer_stack )
			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );

		/* zero only the new slots.*/
		memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
		yyg->yy_buffer_stack_max = num_to_alloc;
	}
}
/* %endif */

/* %if-c-only */
/** Setup the input buffer state to scan directly from a user-specified character buffer.
 * @param base the character buffer
 * @param size the size in bytes of the character buffer
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
{
	YY_BUFFER_STATE b;
    
	if ( size < 2 ||
	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
	     base[size-1] != YY_END_OF_BUFFER_CHAR )
		/* They forgot to leave room for the EOB's. */
		return NULL;

	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );

	b->yy_buf_size = (int) (size - 2);	/* "- 2" to take care of EOB's */
	b->yy_buf_pos = b->yy_ch_buf = base;
	b->yy_is_our_buffer = 0;
	b->yy_input_file = NULL;
	b->yy_n_chars = b->yy_buf_size;
	b->yy_is_interactive = 0;
	b->yy_at_bol = 1;
	b->yy_fill_buffer = 0;
	b->yy_buffer_status = YY_BUFFER_NEW;

	yy_switch_to_buffer( b , yyscanner );

	return b;
}
/* %endif */

/* %if-c-only */
/** Setup the input buffer state to scan a string. The next call to yylex() will
 * scan from a @e copy of @a str.
 * @param yystr a NUL-terminated string to scan
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 * @note If you want to scan bytes that may contain NUL values, then use
 *       yy_scan_bytes() instead.
 */
YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
{
    
	return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
}
/* %endif */

/* %if-c-only */
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
 * scan from a @e copy of @a bytes.
 * @param yybytes the byte buffer to scan
 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len , yyscan_t yyscanner)
{
	YY_BUFFER_STATE b;
	char *buf;
	yy_size_t n;
	int i;
    
	/* Get memory for full buffer, including space for trailing EOB's. */
	n = (yy_size_t) (_yybytes_len + 2);
	buf = (char *) yyalloc( n , yyscanner );
	if ( ! buf )
		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );

	for ( i = 0; i < _yybytes_len; ++i )
		buf[i] = yybytes[i];

	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;

	b = yy_scan_buffer( buf, n , yyscanner);
	if ( ! b )
		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );

	/* It's okay to grow etc. this buffer, and we should throw it
	 * away when we're done.
	 */
	b->yy_is_our_buffer = 1;

	return b;
}
/* %endif */

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

/* %if-c-only */
static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;
	fprintf( stderr, "%s\n", msg );
	exit( YY_EXIT_FAILURE );
}
/* %endif */
/* %if-c++-only */
/* %endif */

/* Redefine yyless() so it works in section 3 code. */

#undef yyless
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		yytext[yyleng] = yyg->yy_hold_char; \
		yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
		yyg->yy_hold_char = *yyg->yy_c_buf_p; \
		*yyg->yy_c_buf_p = '\0'; \
		yyleng = yyless_macro_arg; \
		} \
	while ( 0 )

/* Accessor  methods (get/set functions) to struct members. */

/* %if-c-only */
/* %if-reentrant */

/** Get the user-defined data for this scanner.
 * @param yyscanner The scanner object.
 */
YY_EXTRA_TYPE yyget_extra  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    return yyextra;
}

/* %endif */

/** Get the current line number.
 * @param yyscanner The scanner object.
 */
int yyget_lineno  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

        if (! YY_CURRENT_BUFFER)
            return 0;
    
    return yylineno;
}

/** Get the current column number.
 * @param yyscanner The scanner object.
 */
int yyget_column  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

        if (! YY_CURRENT_BUFFER)
            return 0;
    
    return yycolumn;
}

/** Get the input stream.
 * @param yyscanner The scanner object.
 */
FILE *yyget_in  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    return yyin;
}

/** Get the output stream.
 * @param yyscanner The scanner object.
 */
FILE *yyget_out  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    return yyout;
}

/** Get the length of the current token.
 * @param yyscanner The scanner object.
 */
int yyget_leng  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    return yyleng;
}

/** Get the current token.
 * @param yyscanner The scanner object.
 */

char *yyget_text  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    return yytext;
}

/* %if-reentrant */

/** Set the user-defined data. This data is never touched by the scanner.
 * @param user_defined The data to be associated with this scanner.
 * @param yyscanner The scanner object.
 */
void yyset_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    yyextra = user_defined ;
}

/* %endif */

/** Set the current line number.
 * @param _line_number line number
 * @param yyscanner The scanner object.
 */
void yyset_lineno (int  _line_number , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

        /* lineno is only valid if an input buffer exists. */
        if (! YY_CURRENT_BUFFER )
           YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
    
    yylineno = _line_number;
}

/** Set the current column.
 * @param _column_no column number
 * @param yyscanner The scanner object.
 */
void yyset_column (int  _column_no , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

        /* column is only valid if an input buffer exists. */
        if (! YY_CURRENT_BUFFER )
           YY_FATAL_ERROR( "yyset_column called with no buffer" );
    
    yycolumn = _column_no;
}

/** Set the input stream. This does not discard the current
 * input buffer.
 * @param _in_str A readable stream.
 * @param yyscanner The scanner object.
 * @see yy_switch_to_buffer
 */
void yyset_in (FILE *  _in_str , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    yyin = _in_str ;
}

void yyset_out (FILE *  _out_str , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    yyout = _out_str ;
}

int yyget_debug  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    return yy_flex_debug;
}

void yyset_debug (int  _bdebug , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    yy_flex_debug = _bdebug ;
}

/* %endif */

/* %if-reentrant */
/* Accessor methods for yylval and yylloc */

/* %if-bison-bridge */
/* %endif */

/* User-visible API */

/* yylex_init is special because it creates the scanner itself, so it is
 * the ONLY reentrant function that doesn't take the scanner as the last argument.
 * That's why we explicitly handle the declaration, instead of using our macros.
 */
int yylex_init(yyscan_t* ptr_yy_globals)
{
    if (ptr_yy_globals == NULL){
        errno = EINVAL;
        return 1;
    }

    *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );

    if (*ptr_yy_globals == NULL){
        errno = ENOMEM;
        return 1;
    }

    /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));

    return yy_init_globals ( *ptr_yy_globals );
}

/* yylex_init_extra has the same functionality as yylex_init, but follows the
 * convention of taking the scanner as the last argument. Note however, that
 * this is a *pointer* to a scanner, as it will be allocated by this call (and
 * is the reason, too, why this function also must handle its own declaration).
 * The user defined value in the first argument will be available to yyalloc in
 * the yyextra field.
 */
int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
{
    struct yyguts_t dummy_yyguts;

    yyset_extra (yy_user_defined, &dummy_yyguts);

    if (ptr_yy_globals == NULL){
        errno = EINVAL;
        return 1;
    }

    *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );

    if (*ptr_yy_globals == NULL){
        errno = ENOMEM;
        return 1;
    }

    /* By setting to 0xAA, we expose bugs in
    yy_init_globals. Leave at 0x00 for releases. */
    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));

    yyset_extra (yy_user_defined, *ptr_yy_globals);

    return yy_init_globals ( *ptr_yy_globals );
}

/* %endif if-c-only */

/* %if-c-only */
static int yy_init_globals (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    /* Initialization is the same as for the non-reentrant scanner.
     * This function is called from yylex_destroy(), so don't allocate here.
     */

    yyg->yy_buffer_stack = NULL;
    yyg->yy_buffer_stack_top = 0;
    yyg->yy_buffer_stack_max = 0;
    yyg->yy_c_buf_p = NULL;
    yyg->yy_init = 0;
    yyg->yy_start = 0;

    yyg->yy_start_stack_ptr = 0;
    yyg->yy_start_stack_depth = 0;
    yyg->yy_start_stack =  NULL;

/* Defined in main.c */
#ifdef YY_STDINIT
    yyin = stdin;
    yyout = stdout;
#else
    yyin = NULL;
    yyout = NULL;
#endif

    /* For future reference: Set errno on error, since we are called by
     * yylex_init()
     */
    return 0;
}
/* %endif */

/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
int yylex_destroy  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    /* Pop the buffer stack, destroying each element. */
	while(YY_CURRENT_BUFFER){
		yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
		YY_CURRENT_BUFFER_LVALUE = NULL;
		yypop_buffer_state(yyscanner);
	}

	/* Destroy the stack itself. */
	yyfree(yyg->yy_buffer_stack , yyscanner);
	yyg->yy_buffer_stack = NULL;

    /* Destroy the start condition stack. */
        yyfree( yyg->yy_start_stack , yyscanner );
        yyg->yy_start_stack = NULL;

    /* Reset the globals. This is important in a non-reentrant scanner so the next time
     * yylex() is called, initialization will occur. */
    yy_init_globals( yyscanner);

/* %if-reentrant */
    /* Destroy the main struct (reentrant only). */
    yyfree ( yyscanner , yyscanner );
    yyscanner = NULL;
/* %endif */
    return 0;
}
/* %endif */

/*
 * Internal utility routines.
 */

#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;

	int i;
	for ( i = 0; i < n; ++i )
		s1[i] = s2[i];
}
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
{
	int n;
	for ( n = 0; s[n]; ++n )
		;

	return n;
}
#endif

void *yyalloc (yy_size_t  size , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;
	return malloc(size);
}

void *yyrealloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;

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

void yyfree (void * ptr , yyscan_t yyscanner)
{
	struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	(void)yyg;
	free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
}

/* %if-tables-serialization definitions */
/* %define-yytables   The name for this specific scanner's tables. */
#define YYTABLES_NAME "yytables"
/* %endif */

/* %ok-for-header */

#line 239 "sqlite3_lexer.ll"


namespace sqlb
{
namespace parser
{

void ParserDriver::begin_scan()
{
	yylex_init(&scanner);
	location.initialize();
	yyset_debug(trace_scanner, scanner);
	buffer = yy_scan_string(source.c_str(), scanner);
}

void ParserDriver::end_scan()
{
	yy_delete_buffer(buffer, scanner);
	yylex_destroy(scanner);
}

}
}

