#line 2 "sqlite3_lexer.cpp"

#line 4 "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 123
#define YY_END_OF_BUFFER 124
/* 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[467] =
    {   0,
        0,    0,    0,    0,  124,  122,    1,    2,    2,  122,
      122,  109,  108,  122,   98,   99,  105,  103,  101,  104,
      100,  106,   94,   94,  122,  102,  116,  112,  114,   96,
       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
       89,   89,  122,  122,  110,  107,  122,  122,  122,   89,
        1,    2,  118,    0,   92,    0,   93,    3,   94,    4,
       94,   94,    0,    0,   97,  120,  117,  119,  113,  115,
      121,   96,   89,   89,   89,   89,   89,   11,   89,    0,
        0,    0,   89,   89,   89,   89,   89,   89,   89,   89,

       89,   89,   89,   89,   89,   89,   89,   89,   89,   42,
       89,   89,   45,   49,   89,   89,   89,   54,   89,   58,
       59,   89,   89,   89,   89,   89,   89,   89,   89,   89,
       89,   89,   89,   89,   89,   89,   89,   89,   89,    0,
        0,   91,    0,   90,  111,   89,    0,    0,   89,   94,
        0,   94,   94,   96,   89,   89,   89,    6,   12,   89,
        0,    0,   89,   89,   89,   89,   89,   89,   89,   89,
       89,   89,   89,   89,   32,   89,   89,   89,   89,   89,
       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
       51,   89,   89,   55,   89,   89,   89,   89,   89,   89,

       89,   89,   89,   89,   89,   89,   89,   89,   74,   89,
       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
       89,   95,    0,    0,    5,   89,   89,   89,   89,    0,
       89,   89,   15,   16,   89,   89,   89,   89,   89,   89,
       89,   89,   89,   29,   89,   31,   89,   89,   35,   89,
       89,   89,   89,   89,   41,   89,   89,   89,   89,   89,
       89,   52,   89,   89,   57,   60,   89,   89,   89,   89,
       89,   89,   89,   89,   89,   89,   89,   72,   89,   89,
       89,   77,   79,   80,   89,   89,   89,   89,   89,   86,
       89,   89,    8,   89,   89,   89,   89,   89,   17,   89,

       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
       36,   89,   89,   89,   89,   89,   89,   46,   89,   89,
       89,   53,   89,   89,   89,   89,   64,   65,   89,   89,
       89,   89,   89,   71,   89,   89,   76,   89,   89,   89,
       89,   84,   89,   87,   89,    9,   10,   89,   89,   89,
       89,   89,   89,   21,   89,   89,   89,   28,   89,   33,
       34,   37,   89,   89,   89,   43,   89,   89,   48,   50,
       89,   89,   89,   89,   89,   67,   89,   89,   89,   73,
       75,   89,   89,   82,   83,   89,   89,   89,    7,   14,
       18,   89,   89,   89,   25,   89,   89,   89,   89,   39,

       89,   89,   89,   56,   89,   89,   63,   89,   68,   89,
       89,   89,   89,   85,   88,   89,   19,   89,   89,   89,
       27,   30,   89,   89,   89,   89,   89,   89,   89,   69,
       70,   89,   89,   89,   89,   89,   89,   89,   38,   40,
       44,   47,   61,   62,   89,   78,   81,   89,   20,   89,
       89,   26,   66,   89,   89,   89,   89,   22,   23,   13,
       89,   89,   89,   89,   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,    1,    7,    8,    9,   10,
       11,   12,   13,   14,   15,   16,   17,   18,   19,   19,
       19,   19,   19,   19,   19,   19,   19,   20,   21,   22,
       23,   24,   25,   20,   26,   27,   28,   29,   30,   31,
       32,   33,   34,   35,   36,   37,   38,   39,   40,   41,
       42,   43,   44,   45,   46,   47,   48,   49,   50,   35,
       51,    1,   52,    1,   53,   54,   55,   56,   57,   58,

       59,   60,   61,   62,   63,   35,   64,   65,   66,   67,
       68,   69,   70,   71,   72,   73,   74,   75,   76,   77,
       78,   35,    1,   79,    1,   80,    1,   81,   81,   81,
       81,   81,   81,   81,   81,   81,   81,   81,   81,   81,
       81,   81,   81,   81,   81,   81,   81,   81,   81,   81,
       81,   81,   81,   81,   81,   81,   81,   81,   81,   81,
       81,   81,   81,   81,   81,   81,   81,   81,   81,   81,
       81,   81,   81,   81,   81,   81,   81,   81,   81,   81,
       81,   81,   81,   81,   81,   81,   81,   81,   81,   81,
       81,    1,    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,   83,   83,   83,   83,   83,   83,   83,
       83,   83,   83,   83,   83,   83,   83,   83,   83,   84,
       84,   84,   84,   84,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1
    } ;

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

static const flex_int16_t yy_base[475] =
    {   0,
        0,    0,   59,   60,  283, 2424,  279,   84,   86,  255,
      260, 2424, 2424,  256, 2424, 2424, 2424, 2424, 2424,  244,
       73,  242,   77,   81,    0, 2424,   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, 2424,  155,  153,  151,  369,
      227,  105, 2424,  222,  220,  212,  196, 2424,  111, 2424,
      232,  345,  366,    0,    0, 2424, 2424, 2424, 2424, 2424,
     2424,   94,   49,  306,  327,  338,  369,  355,  346,  118,
      116,  111,  372,  387,  402,  410,  405,  192,  435,  419,

      432,  415,  439,  399,  471,  474,  494,  485,  480,   60,
      499,  504,  517,  535,  529,  508,  548,  551,  557,  216,
      285,  567,  571,  593,  581,  626,  623,  601,  629,  634,
      653,  642,  646,  687,  664,  446,  680,  672,  693,  181,
      136, 2424,  132,  129, 2424,  319,   98,   90,  675,  586,
      103,  119,    0,  196,  696,  710,  706,  443,  526,  700,
       85,   83,  724,  757,  753,  760,  773,  765,  779,  769,
      799,  803,  793,  829,  596,  838,  823,  789,  826,  844,
      832,  860,  864,  847,  856,  874,  895,  887,  904,  890,
      729,  907,  923,  914,  918,  932,  937,  956,  961,  950,

      976,  965,  982,  986,  973,  989, 1018, 1023,  796,  992,
     1013, 1039, 1044, 1054, 1047, 1050, 1059, 1073, 1079, 1105,
     1083, 2424,  136,   44,  817, 1101, 1109, 1097, 1076,   38,
     1123, 1142,  946, 1035, 1134, 1145, 1149, 1128, 1157, 1160,
     1163, 1152, 1175, 1167, 1204, 1170, 1214, 1211, 1178, 1233,
     1240, 1236, 1243, 1229, 1182, 1258, 1249, 1226, 1271, 1278,
     1291, 1197, 1281, 1284, 1207, 1253, 1313, 1318, 1324, 1321,
     1327, 1301, 1310, 1343, 1346, 1363, 1383, 1331, 1392, 1340,
     1401, 1395, 1350, 1354, 1370, 1412, 1398, 1407, 1418, 1373,
     1429, 1447, 1415, 1454, 1460, 1466, 1476, 1481, 1425, 1472,

     1484, 1491, 1494, 1502, 1514, 1509, 1531, 1542, 1552, 1545,
     1443, 1559, 1523, 1555, 1568, 1573, 1538, 1562, 1578, 1586,
     1582, 1589, 1611, 1604, 1624, 1620, 1596, 1601, 1637, 1640,
     1661, 1664, 1671, 1617, 1667, 1676, 1631, 1685, 1690, 1680,
     1702, 1653, 1715, 1693, 1706, 1699, 1709, 1737, 1740, 1757,
     1766, 1772, 1775, 1720, 1760, 1763, 1805, 1727, 1809, 1730,
     1744, 1769, 1798, 1795, 1822, 1786, 1839, 1834, 1790, 1801,
     1849, 1856, 1862, 1825, 1859, 1818, 1890, 1896, 1899, 1828,
     1846, 1908, 1918, 1853, 1868, 1921, 1912, 1926, 1877, 1882,
     1905, 1939, 1936, 1945, 1931, 1950, 1978, 1966, 1985, 1958,

     1995, 1990, 2000, 1961, 2007, 2014, 1973, 2023, 2003, 2019,
     2030, 2033, 2040, 2026, 2036, 2070, 2043, 2054, 2099, 2093,
     2049, 2057, 2102, 2106, 2112, 2096, 2120, 2130, 2138, 2065,
     2083, 2123, 2141, 2160, 2155, 2185, 2182, 2188, 2126, 2147,
     2150, 2166, 2169, 2172, 2191, 2175, 2178, 2246, 2195, 2235,
     2243, 2200, 2203, 2249, 2261, 2264, 2267, 2213, 2270, 2216,
     2289, 2281, 2255, 2300, 2219, 2424, 2384, 2391, 2394, 2397,
     2404, 2411, 2415, 2418
    } ;

static const flex_int16_t yy_def[475] =
    {   0,
      466,    1,    1,    1,  466,  466,  466,  466,  466,  466,
      467,  466,  466,  468,  466,  466,  466,  466,  466,  466,
      466,  466,  466,  466,  469,  466,  466,  466,  466,  466,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  471,  472,  466,  466,  466,  466,  466,   35,
      466,  466,  466,  467,  466,  468,  466,  466,  466,  466,
      466,  466,  466,  473,  469,  466,  466,  466,  466,  466,
      466,  466,  470,  470,  470,  470,  470,  470,  470,  466,
      466,  466,  470,  470,  470,  470,  470,  470,  470,  470,

      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  474,
      471,  466,  472,  466,  466,  470,  466,  466,  470,  466,
      466,  466,  473,  466,  470,  470,  470,  470,  470,  470,
      466,  466,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,

      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  466,  474,  466,  470,  470,  470,  470,  470,  466,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,

      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,

      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,    0,  466,  466,  466,  466,
      466,  466,  466,  466
    } ;

static const flex_int16_t yy_nxt[2509] =
    {   0,
        6,    7,    8,    9,   10,   11,   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,  222,   90,   91,   92,  105,   90,
       91,   92,  117,   74,   84,   85,  106,   90,   91,   92,
      101,  107,  102,  230,   86,   83,   87,  103,  116,   73,
      224,   88,  104,   89,  137,   90,   91,   92,  146,   90,
       91,   92,  143,   84,   85,  144,  108,  142,  101,  222,
      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,  466,  466,  114,  126,  466,  120,  466,  466,
       73,  121,  466,  124,  127,  122,  128,   90,   91,   92,

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

       90,   91,   92,   73,  466,   86,  466,  149,   90,   91,
       92,  159,   88,  157,   89,  466,  163,   83,  160,   90,
       91,   92,  466,  466,   84,   85,  158,   90,   91,   92,
      164,  165,  177,   86,  168,  149,   90,   91,   92,  466,
       88,  466,   89,  175,  163,   83,  166,  466,  167,  466,
       90,   91,   92,   90,   91,   92,  466,  466,  164,  466,
      165,  177,  173,  168,  466,  170,  176,  466,   90,   91,
       92,  171,  175,  466,  166,  174,  167,  466,  172,  218,
       90,   91,   92,   90,   91,   92,   90,   91,   92,  466,
      173,   90,   91,   92,  170,  176,   90,   91,   92,  171,

       90,   91,   92,  174,  178,  466,  172,  179,  218,  466,
      180,  466,  466,   90,   91,   92,   90,   91,   92,  184,
       90,   91,   92,  183,   90,   91,   92,   90,   91,   92,
      181,  466,  466,  178,  466,  179,  182,  185,  180,  466,
      466,  186,  466,  192,  466,  187,  466,  184,  466,  466,
      188,  183,   90,   91,   92,   90,   91,   92,  181,  466,
      189,   90,   91,   92,  182,  185,   90,   91,   92,  186,
      466,  192,  466,  190,  187,   90,   91,   92,  191,  188,
       90,   91,   92,  466,  466,   90,   91,   92,  189,   90,
       91,   92,  193,  195,  466,  194,  196,  466,   90,   91,

       92,  190,  466,  150,  150,  466,  191,   90,   91,   92,
       90,   91,   92,  197,  200,   73,   90,   91,   92,  201,
      193,  195,  198,  194,  466,  196,  199,  466,  466,   90,
       91,   92,   90,   91,   92,  466,  466,  208,   90,   91,
       92,  197,  466,  200,   73,  209,  466,  201,   90,   91,
       92,  198,   90,   91,   92,  199,  202,  203,  466,  206,
      211,  466,   90,   91,   92,  208,  204,  466,  210,  205,
      207,  213,  466,  209,   90,   91,   92,   90,   91,   92,
      466,  466,   90,   91,   92,  202,  203,  206,  466,  211,
      212,  214,  217,  466,  204,  466,  210,  205,  207,  466,

      213,  220,  466,  225,   90,   91,   92,   90,   91,   92,
       90,   91,   92,  215,  466,   90,   91,   92,  212,  214,
      216,  217,  219,   90,   91,   92,  466,   90,   91,   92,
      220,  228,  225,  466,   90,   91,   92,  221,  226,  229,
      466,  466,  215,  227,  466,   90,   91,   92,  466,  216,
      219,  466,  466,   90,   91,   92,   90,   91,   92,  466,
      228,   90,   91,   92,  466,  221,  226,  229,   90,   91,
       92,  231,  227,  466,   90,   91,   92,   90,   91,   92,
      235,   90,   91,   92,  232,  466,  233,   90,   91,   92,
      239,   90,   91,   92,  241,  466,  236,  466,  242,  231,

      466,  234,  466,  237,  466,   90,   91,   92,  466,  235,
       90,   91,   92,  232,  466,  233,  238,  466,  466,  239,
      466,  240,  466,  241,  236,  249,  466,  242,  243,  234,
      244,  466,  237,  466,   90,   91,   92,  245,   90,   91,
       92,   90,   91,   92,  238,  466,   90,   91,   92,  240,
       90,   91,   92,  249,   90,   91,   92,  243,  246,  244,
       90,   91,   92,  247,  466,  245,  248,  466,  252,  250,
       90,   91,   92,  255,   90,   91,   92,   90,   91,   92,
       90,   91,   92,  466,   90,   91,   92,  246,  251,  253,
      466,  466,  247,  254,  248,  256,  252,  250,   90,   91,

       92,  466,  255,  257,   90,   91,   92,   90,   91,   92,
       90,   91,   92,   90,   91,   92,  251,  466,  253,   90,
       91,   92,  254,  256,  258,   90,   91,   92,   90,   91,
       92,  259,  257,  260,  466,  261,  262,   90,   91,   92,
      466,   90,   91,   92,  466,   90,   91,   92,  466,  466,
      263,  466,  264,  258,  265,   90,   91,   92,  466,  259,
      466,  466,  260,  261,  466,  262,  466,  466,   90,   91,
       92,   90,   91,   92,  266,  466,   90,   91,   92,  263,
      264,  267,  265,  268,  466,   90,   91,   92,   90,   91,
       92,  466,  466,  270,  272,   90,   91,   92,  269,   90,

       91,   92,  266,  466,   90,   91,   92,  271,  466,  267,
      466,  273,  268,   90,   91,   92,  466,  275,   90,   91,
       92,  270,  274,  272,  466,  276,  269,   90,   91,   92,
      466,   90,   91,   92,  280,  466,  271,   90,   91,   92,
      273,  466,   90,   91,   92,  275,   90,   91,   92,  281,
      274,  277,  279,  276,   90,   91,   92,   90,   91,   92,
      466,  278,  280,   90,   91,   92,  466,   90,   91,   92,
       90,   91,   92,   90,   91,   92,  466,  281,  466,  282,
      277,  279,  283,  284,  287,  466,  285,  466,  466,  278,
      466,  286,  466,  466,   90,   91,   92,  466,  466,   90,

       91,   92,  466,  466,   90,   91,   92,  282,  466,  296,
      283,  288,  284,  287,  285,  292,   90,   91,   92,  286,
       90,   91,   92,  289,  466,   90,   91,   92,   90,   91,
       92,   90,   91,   92,  466,   90,   91,   92,  296,  288,
       90,   91,   92,  290,  292,  293,  295,  291,  294,  466,
      466,  289,  297,  466,   90,   91,   92,   90,   91,   92,
       90,   91,   92,  466,   90,   91,   92,  298,  466,  299,
      300,  290,  302,  293,  295,  291,  294,  466,   90,   91,
       92,  297,   90,   91,   92,  301,   90,   91,   92,  304,
       90,   91,   92,  466,  306,  466,  298,  299,  466,  300,

      302,  303,  466,  466,   90,   91,   92,  466,  305,   90,
       91,   92,  466,  301,  466,   90,   91,   92,  304,  307,
      466,  466,  306,   90,   91,   92,   90,   91,   92,  303,
       90,   91,   92,   90,   91,   92,  305,  308,   90,   91,
       92,   90,   91,   92,   90,   91,   92,  307,   90,   91,
       92,   90,   91,   92,  309,  310,   90,   91,   92,   90,
       91,   92,  311,   90,   91,   92,  308,  466,  466,  312,
      466,  315,  466,  466,  318,  313,  314,  317,   90,   91,
       92,  466,  309,  310,  466,   90,   91,   92,   90,   91,
       92,  311,   90,   91,   92,   90,   91,   92,  312,  315,

      316,  466,  318,  313,  319,  314,  317,   90,   91,   92,
       90,   91,   92,  322,   90,   91,   92,   90,   91,   92,
      320,   90,   91,   92,   90,   91,   92,  321,  316,  323,
       90,   91,   92,  319,   90,   91,   92,  466,  466,   90,
       91,   92,  322,  329,  466,  466,  324,  325,  320,  326,
      327,  466,   90,   91,   92,  321,  328,  323,  330,   90,
       91,   92,   90,   91,   92,   90,   91,   92,  331,  336,
      466,  329,   90,   91,   92,  324,  325,  466,  326,  327,
      466,  466,   90,   91,   92,  328,  330,  466,  332,  333,
      466,   90,   91,   92,   90,   91,   92,  331,  336,   90,

       91,   92,   90,   91,   92,   90,   91,   92,   90,   91,
       92,  334,   90,   91,   92,  339,  332,  466,  333,  335,
      466,   90,   91,   92,   90,   91,   92,   90,   91,   92,
      337,   90,   91,   92,  338,   90,   91,   92,  342,  466,
      334,  466,  341,  339,   90,   91,   92,  466,  335,  466,
      466,   90,   91,   92,   90,   91,   92,  340,  344,  337,
      466,  466,  338,  343,   90,   91,   92,  342,  466,  466,
      341,  466,  466,   90,   91,   92,   90,   91,   92,   90,
       91,   92,   90,   91,   92,  340,  345,  344,   90,   91,
       92,  343,  346,   90,   91,   92,   90,   91,   92,   90,

       91,   92,  466,  347,  348,  349,   90,   91,   92,  350,
       90,   91,   92,  466,  345,  466,  351,  352,  466,  466,
      346,  466,  466,  354,   90,   91,   92,  466,   90,   91,
       92,  347,  348,  353,  349,   90,   91,   92,  350,  466,
      355,   90,   91,   92,  351,  466,  352,   90,   91,   92,
      356,  357,  354,   90,   91,   92,  466,   90,   91,   92,
      358,  353,   90,   91,   92,   90,   91,   92,  355,  466,
      363,  367,   90,   91,   92,   90,   91,   92,  356,  357,
      359,  360,  466,   90,   91,   92,  364,  466,  361,  358,
       90,   91,   92,  365,  466,   90,   91,   92,  363,  466,

      367,  362,  366,  368,   90,   91,   92,  466,  359,  466,
      360,  466,   90,   91,   92,  364,  361,  466,  370,   90,
       91,   92,  365,   90,   91,   92,   90,   91,   92,  362,
      369,  366,  368,   90,   91,   92,   90,   91,   92,  466,
       90,   91,   92,   90,   91,   92,  370,  371,  372,   90,
       91,   92,  373,  466,   90,   91,   92,  466,  369,   90,
       91,   92,  374,   90,   91,   92,  375,   90,   91,   92,
       90,   91,   92,  466,  466,  371,  372,   90,   91,   92,
      376,  373,   90,   91,   92,   90,   91,   92,  377,  466,
      374,  466,   90,   91,   92,  375,  379,  378,   90,   91,

       92,   90,   91,   92,  381,   90,   91,   92,  376,  384,
      466,  380,   90,   91,   92,  466,  466,  377,   90,   91,
       92,   90,   91,   92,  466,  379,  378,  382,  383,  466,
      466,  385,  466,  381,   90,   91,   92,  466,  384,  380,
      386,  466,   90,   91,   92,   90,   91,   92,   90,   91,
       92,  387,   90,   91,   92,  382,  383,   90,   91,   92,
      385,   90,   91,   92,  388,  466,   90,   91,   92,  386,
      466,   90,   91,   92,   90,   91,   92,  466,  389,  387,
       90,   91,   92,   90,   91,   92,  390,   90,   91,   92,
       90,   91,   92,  388,  466,  391,   90,   91,   92,  392,

      393,   90,   91,   92,  394,  466,  389,  395,   90,   91,
       92,   90,   91,   92,  466,  390,  466,  466,   90,   91,
       92,   90,   91,   92,  391,   90,   91,   92,  392,  393,
      396,  399,  394,  400,  397,  395,  398,  466,   90,   91,
       92,   90,   91,   92,   90,   91,   92,   90,   91,   92,
       90,   91,   92,   90,   91,   92,   90,   91,   92,  396,
      399,  400,  466,  397,  402,  398,  401,   90,   91,   92,
      403,   90,   91,   92,  407,  466,   90,   91,   92,   90,
       91,   92,   90,   91,   92,  404,   90,   91,   92,  405,
       90,   91,   92,  402,  401,  406,  466,  408,  403,   90,

       91,   92,  407,   90,   91,   92,   90,   91,   92,   90,
       91,   92,  466,  404,  466,   90,   91,   92,  405,  409,
       90,   91,   92,  410,  406,  408,  411,   90,   91,   92,
       90,   91,   92,  412,   90,   91,   92,   90,   91,   92,
       90,   91,   92,   90,   91,   92,  413,  466,  409,   90,
       91,   92,  410,  466,  466,  411,  415,  414,   90,   91,
       92,  466,  412,   90,   91,   92,  466,  466,  416,  418,
      466,   90,   91,   92,  466,  413,  420,   90,   91,   92,
       90,   91,   92,  417,  415,  414,   90,   91,   92,   90,
       91,   92,  466,   90,   91,   92,  416,  419,  418,   90,

       91,   92,   90,   91,   92,  420,  421,   90,   91,   92,
      422,  417,   90,   91,   92,  466,  466,   90,   91,   92,
       90,   91,   92,  423,  424,  466,   90,   91,   92,  466,
      466,   90,   91,   92,  425,  421,  426,  466,  422,   90,
       91,   92,   90,   91,   92,  466,  427,   90,   91,   92,
      429,  423,  428,  424,   90,   91,   92,  466,  466,   90,
       91,   92,  425,  430,  426,  431,   90,   91,   92,  433,
      466,   90,   91,   92,  427,  432,   90,   91,   92,  429,
      428,   90,   91,   92,   90,   91,   92,  466,   90,   91,
       92,  430,  435,  431,  466,   90,   91,   92,  433,  434,

       90,   91,   92,  432,   90,   91,   92,   90,   91,   92,
      466,   90,   91,   92,   90,   91,   92,   90,   91,   92,
      435,   90,   91,   92,   90,   91,   92,  436,  434,  438,
       90,   91,   92,  439,  440,   90,   91,   92,   90,   91,
       92,  441,  466,  437,  466,  442,   90,   91,   92,  466,
      466,   90,   91,   92,  466,  466,  436,  438,  443,  466,
      466,  444,  439,  440,   90,   91,   92,  445,  466,  447,
      441,  437,  446,  442,   90,   91,   92,   90,   91,   92,
       90,   91,   92,   90,   91,   92,  443,   90,   91,   92,
      444,  466,  466,   90,   91,   92,  445,  448,  447,  449,

      446,   90,   91,   92,   90,   91,   92,   90,   91,   92,
      450,   90,   91,   92,  466,  451,  466,  452,  466,   90,
       91,   92,   90,   91,   92,  448,  466,  449,   90,   91,
       92,   90,   91,   92,  453,  466,   90,   91,   92,  450,
      466,   90,   91,   92,  451,  466,  452,   90,   91,   92,
       90,   91,   92,   90,   91,   92,   90,   91,   92,   90,
       91,   92,  453,   90,   91,   92,   90,   91,   92,   90,
       91,   92,   90,   91,   92,  454,   90,   91,   92,  455,
      456,   90,   91,   92,   90,   91,   92,  457,  466,  466,
      458,  466,  464,  459,   90,   91,   92,   90,   91,   92,

       90,   91,   92,  466,  454,  466,  463,  455,  456,  466,
      466,  460,  466,  461,  466,  457,   90,   91,   92,  458,
      464,  466,  459,  466,   90,   91,   92,   90,   91,   92,
       90,   91,   92,  462,  466,  463,   90,   91,   92,  460,
      465,  461,   90,   91,   92,   90,   91,   92,   90,   91,
       92,   90,   91,   92,  466,  466,  466,  466,  466,  466,
      466,  462,   90,   91,   92,  466,  466,  466,  465,  466,
       90,   91,   92,  466,  466,  466,  466,  466,  466,  466,
      466,   90,   91,   92,   64,  466,   64,   64,   64,   64,
       64,   66,  466,   66,   66,   66,   66,   66,   75,   75,

       83,   83,   83,   83,  141,  466,  141,  141,  141,  141,
      141,  143,  466,  143,  143,  143,  143,  143,  153,  153,
      223,  223,  223,    5,  466,  466,  466,  466,  466,  466,
      466,  466,  466,  466,  466,  466,  466,  466,  466,  466,
      466,  466,  466,  466,  466,  466,  466,  466,  466,  466,
      466,  466,  466,  466,  466,  466,  466,  466,  466,  466,
      466,  466,  466,  466,  466,  466,  466,  466,  466,  466,
      466,  466,  466,  466,  466,  466,  466,  466,  466,  466,
      466,  466,  466,  466,  466,  466,  466,  466,  466,  466,
      466,  466,  466,  466,  466,  466,  466,  466,  466,  466,

      466,  466,  466,  466,  466,  466,  466,  466
    } ;

static const flex_int16_t yy_chk[2509] =
    {   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,    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,  230,   36,
      151,  151,   32,   42,  224,   23,   40,   36,   69,   69,
       83,   83,   83,   36,   34,   23,  152,  152,   34,   24,
       69,  110,  110,  110,  223,   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,    0,   72,   72,    0,   48,  121,  121,  121,   48,
        0,   85,   48,   84,   72,   51,   51,   51,   73,    0,
       73,   48,   88,   73,   73,   86,    0,   84,   84,   84,
       89,    0,   48,   48,   48,   60,   60,   87,    0,   85,

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

      100,  100,  100,  101,  105,    0,   99,  105,  136,    0,
      106,    0,    0,  101,  101,  101,   99,   99,   99,  109,
      103,  103,  103,  108,  158,  158,  158,  136,  136,  136,
      107,    0,    0,  105,    0,  105,  107,  111,  106,    0,
        0,  112,    0,  116,    0,  113,    0,  109,    0,    0,
      113,  108,  105,  105,  105,  106,  106,  106,  107,    0,
      113,  109,  109,  109,  107,  111,  108,  108,  108,  112,
        0,  116,    0,  114,  113,  107,  107,  107,  115,  113,
      111,  111,  111,    0,    0,  112,  112,  112,  113,  116,
      116,  116,  117,  119,    0,  118,  122,    0,  113,  113,

      113,  114,    0,  150,  150,    0,  115,  159,  159,  159,
      115,  115,  115,  123,  125,  150,  114,  114,  114,  125,
      117,  119,  124,  118,    0,  122,  124,    0,    0,  117,
      117,  117,  118,  118,  118,    0,    0,  128,  119,  119,
      119,  123,    0,  125,  150,  128,    0,  125,  122,  122,
      122,  124,  123,  123,  123,  124,  126,  126,    0,  127,
      130,    0,  125,  125,  125,  128,  126,    0,  129,  126,
      127,  132,    0,  128,  124,  124,  124,  175,  175,  175,
        0,    0,  128,  128,  128,  126,  126,  127,    0,  130,
      131,  133,  135,    0,  126,    0,  129,  126,  127,    0,

      132,  138,    0,  149,  127,  127,  127,  126,  126,  126,
      129,  129,  129,  134,    0,  130,  130,  130,  131,  133,
      134,  135,  137,  132,  132,  132,    0,  133,  133,  133,
      138,  157,  149,    0,  131,  131,  131,  139,  155,  160,
        0,    0,  134,  156,    0,  135,  135,  135,    0,  134,
      137,    0,    0,  138,  138,  138,  149,  149,  149,    0,
      157,  137,  137,  137,    0,  139,  155,  160,  134,  134,
      134,  163,  156,    0,  139,  139,  139,  155,  155,  155,
      165,  160,  160,  160,  164,    0,  164,  157,  157,  157,
      168,  156,  156,  156,  170,    0,  166,    0,  170,  163,

        0,  164,    0,  167,    0,  163,  163,  163,    0,  165,
      191,  191,  191,  164,    0,  164,  167,    0,    0,  168,
        0,  169,    0,  170,  166,  178,    0,  170,  171,  164,
      172,    0,  167,    0,  165,  165,  165,  173,  164,  164,
      164,  166,  166,  166,  167,    0,  168,  168,  168,  169,
      170,  170,  170,  178,  167,  167,  167,  171,  174,  172,
      169,  169,  169,  176,    0,  173,  177,    0,  181,  179,
      178,  178,  178,  184,  173,  173,  173,  209,  209,  209,
      171,  171,  171,    0,  172,  172,  172,  174,  180,  182,
        0,    0,  176,  183,  177,  185,  181,  179,  225,  225,

      225,    0,  184,  186,  177,  177,  177,  179,  179,  179,
      174,  174,  174,  181,  181,  181,  180,    0,  182,  176,
      176,  176,  183,  185,  187,  180,  180,  180,  184,  184,
      184,  188,  186,  189,    0,  190,  192,  185,  185,  185,
        0,  182,  182,  182,    0,  183,  183,  183,    0,    0,
      193,    0,  194,  187,  195,  186,  186,  186,    0,  188,
        0,    0,  189,  190,    0,  192,    0,    0,  188,  188,
      188,  190,  190,  190,  196,    0,  187,  187,  187,  193,
      194,  197,  195,  198,    0,  189,  189,  189,  192,  192,
      192,    0,    0,  200,  202,  194,  194,  194,  199,  195,

      195,  195,  196,    0,  193,  193,  193,  201,    0,  197,
        0,  203,  198,  196,  196,  196,    0,  205,  197,  197,
      197,  200,  204,  202,    0,  206,  199,  233,  233,  233,
        0,  200,  200,  200,  210,    0,  201,  198,  198,  198,
      203,    0,  199,  199,  199,  205,  202,  202,  202,  211,
      204,  207,  208,  206,  205,  205,  205,  201,  201,  201,
        0,  207,  210,  203,  203,  203,    0,  204,  204,  204,
      206,  206,  206,  210,  210,  210,    0,  211,    0,  212,
      207,  208,  213,  214,  217,    0,  215,    0,    0,  207,
        0,  216,    0,    0,  211,  211,  211,    0,    0,  207,

      207,  207,    0,    0,  208,  208,  208,  212,    0,  229,
      213,  218,  214,  217,  215,  221,  234,  234,  234,  216,
      212,  212,  212,  219,    0,  213,  213,  213,  215,  215,
      215,  216,  216,  216,    0,  214,  214,  214,  229,  218,
      217,  217,  217,  220,  221,  226,  228,  220,  227,    0,
        0,  219,  231,    0,  218,  218,  218,  229,  229,  229,
      219,  219,  219,    0,  221,  221,  221,  232,    0,  235,
      236,  220,  238,  226,  228,  220,  227,    0,  228,  228,
      228,  231,  226,  226,  226,  237,  220,  220,  220,  240,
      227,  227,  227,    0,  242,    0,  232,  235,    0,  236,

      238,  239,    0,    0,  231,  231,  231,    0,  241,  238,
      238,  238,    0,  237,    0,  235,  235,  235,  240,  243,
        0,    0,  242,  232,  232,  232,  236,  236,  236,  239,
      237,  237,  237,  242,  242,  242,  241,  245,  239,  239,
      239,  240,  240,  240,  241,  241,  241,  243,  244,  244,
      244,  246,  246,  246,  247,  248,  243,  243,  243,  249,
      249,  249,  250,  255,  255,  255,  245,    0,    0,  251,
        0,  254,    0,    0,  258,  252,  253,  257,  262,  262,
      262,    0,  247,  248,    0,  245,  245,  245,  265,  265,
      265,  250,  248,  248,  248,  247,  247,  247,  251,  254,

      256,    0,  258,  252,  259,  253,  257,  258,  258,  258,
      254,  254,  254,  263,  250,  250,  250,  252,  252,  252,
      260,  251,  251,  251,  253,  253,  253,  261,  256,  264,
      257,  257,  257,  259,  266,  266,  266,    0,    0,  256,
      256,  256,  263,  272,    0,    0,  267,  268,  260,  269,
      270,    0,  259,  259,  259,  261,  271,  264,  273,  260,
      260,  260,  263,  263,  263,  264,  264,  264,  274,  280,
        0,  272,  261,  261,  261,  267,  268,    0,  269,  270,
        0,    0,  272,  272,  272,  271,  273,    0,  275,  276,
        0,  273,  273,  273,  267,  267,  267,  274,  280,  268,

      268,  268,  270,  270,  270,  269,  269,  269,  271,  271,
      271,  277,  278,  278,  278,  285,  275,    0,  276,  279,
        0,  280,  280,  280,  274,  274,  274,  275,  275,  275,
      281,  283,  283,  283,  282,  284,  284,  284,  288,    0,
      277,    0,  287,  285,  276,  276,  276,    0,  279,    0,
        0,  285,  285,  285,  290,  290,  290,  286,  291,  281,
        0,    0,  282,  289,  277,  277,  277,  288,    0,    0,
      287,    0,    0,  279,  279,  279,  282,  282,  282,  287,
      287,  287,  281,  281,  281,  286,  292,  291,  288,  288,
      288,  289,  294,  286,  286,  286,  293,  293,  293,  289,

      289,  289,    0,  295,  296,  297,  299,  299,  299,  298,
      291,  291,  291,    0,  292,    0,  300,  301,    0,    0,
      294,    0,    0,  303,  311,  311,  311,    0,  292,  292,
      292,  295,  296,  302,  297,  294,  294,  294,  298,    0,
      304,  295,  295,  295,  300,    0,  301,  296,  296,  296,
      305,  306,  303,  300,  300,  300,    0,  297,  297,  297,
      307,  302,  298,  298,  298,  301,  301,  301,  304,    0,
      313,  317,  302,  302,  302,  303,  303,  303,  305,  306,
      308,  309,    0,  304,  304,  304,  314,    0,  310,  307,
      306,  306,  306,  315,    0,  305,  305,  305,  313,    0,

      317,  312,  316,  319,  313,  313,  313,    0,  308,    0,
      309,    0,  307,  307,  307,  314,  310,    0,  321,  317,
      317,  317,  315,  308,  308,  308,  310,  310,  310,  312,
      320,  316,  319,  309,  309,  309,  314,  314,  314,    0,
      312,  312,  312,  318,  318,  318,  321,  323,  324,  315,
      315,  315,  325,    0,  316,  316,  316,    0,  320,  319,
      319,  319,  326,  321,  321,  321,  329,  320,  320,  320,
      322,  322,  322,    0,    0,  323,  324,  327,  327,  327,
      330,  325,  328,  328,  328,  324,  324,  324,  331,    0,
      326,    0,  323,  323,  323,  329,  333,  332,  334,  334,

      334,  326,  326,  326,  336,  325,  325,  325,  330,  340,
        0,  335,  337,  337,  337,    0,    0,  331,  329,  329,
      329,  330,  330,  330,    0,  333,  332,  338,  339,    0,
        0,  341,    0,  336,  342,  342,  342,    0,  340,  335,
      343,    0,  331,  331,  331,  332,  332,  332,  335,  335,
      335,  345,  333,  333,  333,  338,  339,  336,  336,  336,
      341,  340,  340,  340,  348,    0,  338,  338,  338,  343,
        0,  339,  339,  339,  344,  344,  344,    0,  349,  345,
      346,  346,  346,  341,  341,  341,  350,  345,  345,  345,
      347,  347,  347,  348,    0,  351,  343,  343,  343,  352,

      353,  354,  354,  354,  355,    0,  349,  356,  358,  358,
      358,  360,  360,  360,    0,  350,    0,    0,  348,  348,
      348,  349,  349,  349,  351,  361,  361,  361,  352,  353,
      357,  363,  355,  364,  357,  356,  359,    0,  350,  350,
      350,  355,  355,  355,  356,  356,  356,  351,  351,  351,
      362,  362,  362,  352,  352,  352,  353,  353,  353,  357,
      363,  364,    0,  357,  367,  359,  365,  366,  366,  366,
      368,  369,  369,  369,  374,    0,  364,  364,  364,  363,
      363,  363,  370,  370,  370,  371,  357,  357,  357,  372,
      359,  359,  359,  367,  365,  373,    0,  375,  368,  376,

      376,  376,  374,  365,  365,  365,  374,  374,  374,  380,
      380,  380,    0,  371,    0,  368,  368,  368,  372,  377,
      367,  367,  367,  378,  373,  375,  379,  381,  381,  381,
      371,  371,  371,  382,  384,  384,  384,  372,  372,  372,
      375,  375,  375,  373,  373,  373,  383,    0,  377,  385,
      385,  385,  378,    0,    0,  379,  387,  386,  389,  389,
      389,    0,  382,  390,  390,  390,    0,    0,  388,  393,
        0,  377,  377,  377,    0,  383,  396,  378,  378,  378,
      379,  379,  379,  392,  387,  386,  391,  391,  391,  382,
      382,  382,    0,  387,  387,  387,  388,  394,  393,  383,

      383,  383,  386,  386,  386,  396,  397,  388,  388,  388,
      398,  392,  395,  395,  395,    0,    0,  393,  393,  393,
      392,  392,  392,  399,  401,    0,  394,  394,  394,    0,
        0,  396,  396,  396,  402,  397,  403,    0,  398,  400,
      400,  400,  404,  404,  404,    0,  405,  398,  398,  398,
      408,  399,  406,  401,  407,  407,  407,    0,    0,  397,
      397,  397,  402,  410,  403,  411,  399,  399,  399,  413,
        0,  402,  402,  402,  405,  412,  401,  401,  401,  408,
      406,  403,  403,  403,  409,  409,  409,    0,  405,  405,
      405,  410,  418,  411,    0,  406,  406,  406,  413,  416,

      410,  410,  410,  412,  408,  408,  408,  414,  414,  414,
        0,  411,  411,  411,  412,  412,  412,  415,  415,  415,
      418,  413,  413,  413,  417,  417,  417,  419,  416,  420,
      421,  421,  421,  423,  424,  418,  418,  418,  422,  422,
      422,  425,    0,  419,    0,  426,  430,  430,  430,    0,
        0,  416,  416,  416,    0,    0,  419,  420,  427,    0,
        0,  428,  423,  424,  431,  431,  431,  429,    0,  433,
      425,  419,  432,  426,  420,  420,  420,  426,  426,  426,
      419,  419,  419,  423,  423,  423,  427,  424,  424,  424,
      428,    0,    0,  425,  425,  425,  429,  434,  433,  435,

      432,  427,  427,  427,  432,  432,  432,  439,  439,  439,
      436,  428,  428,  428,    0,  437,    0,  438,    0,  429,
      429,  429,  433,  433,  433,  434,    0,  435,  440,  440,
      440,  441,  441,  441,  445,    0,  435,  435,  435,  436,
        0,  434,  434,  434,  437,    0,  438,  442,  442,  442,
      443,  443,  443,  444,  444,  444,  446,  446,  446,  447,
      447,  447,  445,  437,  437,  437,  436,  436,  436,  438,
      438,  438,  445,  445,  445,  448,  449,  449,  449,  450,
      451,  452,  452,  452,  453,  453,  453,  454,    0,    0,
      455,    0,  463,  456,  458,  458,  458,  460,  460,  460,

      465,  465,  465,    0,  448,    0,  462,  450,  451,    0,
        0,  457,    0,  459,    0,  454,  450,  450,  450,  455,
      463,    0,  456,    0,  451,  451,  451,  448,  448,  448,
      454,  454,  454,  461,    0,  462,  463,  463,  463,  457,
      464,  459,  455,  455,  455,  456,  456,  456,  457,  457,
      457,  459,  459,  459,    0,    0,    0,    0,    0,    0,
        0,  461,  462,  462,  462,    0,    0,    0,  464,    0,
      461,  461,  461,    0,    0,    0,    0,    0,    0,    0,
        0,  464,  464,  464,  467,    0,  467,  467,  467,  467,
      467,  468,    0,  468,  468,  468,  468,  468,  469,  469,

      470,  470,  470,  470,  471,    0,  471,  471,  471,  471,
      471,  472,    0,  472,  472,  472,  472,  472,  473,  473,
      474,  474,  474,  466,  466,  466,  466,  466,  466,  466,
      466,  466,  466,  466,  466,  466,  466,  466,  466,  466,
      466,  466,  466,  466,  466,  466,  466,  466,  466,  466,
      466,  466,  466,  466,  466,  466,  466,  466,  466,  466,
      466,  466,  466,  466,  466,  466,  466,  466,  466,  466,
      466,  466,  466,  466,  466,  466,  466,  466,  466,  466,
      466,  466,  466,  466,  466,  466,  466,  466,  466,  466,
      466,  466,  466,  466,  466,  466,  466,  466,  466,  466,

      466,  466,  466,  466,  466,  466,  466,  466
    } ;

static const flex_int16_t yy_rule_linenum[123] =
    {   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,  199,  200,
      201,  202,  203,  204,  205,  206,  207,  209,  210,  211,

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

/* 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 1235 "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 1261 "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 1266 "sqlite3_lexer.cpp"

#line 1268 "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 1606 "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 >= 467 )
					yy_c = yy_meta[yy_c];
				}
			yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
			++yy_cp;
			}
		while ( yy_current_state != 466 );
		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 < 123 )
				fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
				         (long)yy_rule_linenum[yy_act], yytext );
			else if ( yy_act == 123 )
				fprintf( stderr, "--accepting default rule (\"%s\")\n",
				         yytext );
			else if ( yy_act == 124 )
				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(ROLLBACK);
	YY_BREAK
case 71:
YY_RULE_SETUP
#line 180 "sqlite3_lexer.ll"
return TOKEN(ROWID);
	YY_BREAK
case 72:
YY_RULE_SETUP
#line 181 "sqlite3_lexer.ll"
return TOKEN(ROWS);
	YY_BREAK
case 73:
YY_RULE_SETUP
#line 182 "sqlite3_lexer.ll"
return TOKEN(SELECT);
	YY_BREAK
case 74:
YY_RULE_SETUP
#line 183 "sqlite3_lexer.ll"
return TOKEN(SET);
	YY_BREAK
case 75:
YY_RULE_SETUP
#line 184 "sqlite3_lexer.ll"
return TOKEN(STORED);
	YY_BREAK
case 76:
YY_RULE_SETUP
#line 185 "sqlite3_lexer.ll"
return TOKEN(TABLE);
	YY_BREAK
case 77:
YY_RULE_SETUP
#line 186 "sqlite3_lexer.ll"
return TOKEN(TEMP);
	YY_BREAK
case 78:
YY_RULE_SETUP
#line 187 "sqlite3_lexer.ll"
return TOKEN(TEMPORARY);
	YY_BREAK
case 79:
YY_RULE_SETUP
#line 188 "sqlite3_lexer.ll"
return TOKEN(THEN);
	YY_BREAK
case 80:
YY_RULE_SETUP
#line 189 "sqlite3_lexer.ll"
return TOKEN(TRUE);
	YY_BREAK
case 81:
YY_RULE_SETUP
#line 190 "sqlite3_lexer.ll"
return TOKEN(UNBOUNDED);
	YY_BREAK
case 82:
YY_RULE_SETUP
#line 191 "sqlite3_lexer.ll"
return TOKEN(UNIQUE);
	YY_BREAK
case 83:
YY_RULE_SETUP
#line 192 "sqlite3_lexer.ll"
return TOKEN(UPDATE);
	YY_BREAK
case 84:
YY_RULE_SETUP
#line 193 "sqlite3_lexer.ll"
return TOKEN(USING);
	YY_BREAK
case 85:
YY_RULE_SETUP
#line 194 "sqlite3_lexer.ll"
return TOKEN(VIRTUAL);
	YY_BREAK
case 86:
YY_RULE_SETUP
#line 195 "sqlite3_lexer.ll"
return TOKEN(WHEN);
	YY_BREAK
case 87:
YY_RULE_SETUP
#line 196 "sqlite3_lexer.ll"
return TOKEN(WHERE);
	YY_BREAK
case 88:
YY_RULE_SETUP
#line 197 "sqlite3_lexer.ll"
return TOKEN(WITHOUT);
	YY_BREAK
case 89:
YY_RULE_SETUP
#line 199 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_IDENTIFIER(yytext, loc);
	YY_BREAK
case 90:
YY_RULE_SETUP
#line 200 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_IDENTIFIER(unquote_string(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_QUOTEDLITERAL(unquote_string(yytext, '"'), loc);
	YY_BREAK
case 93:
YY_RULE_SETUP
#line 203 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_STRINGLITERAL(yytext, loc);
	YY_BREAK
case 94:
YY_RULE_SETUP
#line 204 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_NUMERIC(yytext, loc);
	YY_BREAK
case 95:
YY_RULE_SETUP
#line 205 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_BLOBLITERAL(yytext, loc);
	YY_BREAK
case 96:
YY_RULE_SETUP
#line 206 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_BINDPARAMETER(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 209 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_LPAREN(loc);
	YY_BREAK
case 99:
YY_RULE_SETUP
#line 210 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_RPAREN(loc);
	YY_BREAK
case 100:
YY_RULE_SETUP
#line 211 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_DOT(loc);
	YY_BREAK
case 101:
YY_RULE_SETUP
#line 212 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_COMMA(loc);
	YY_BREAK
case 102:
YY_RULE_SETUP
#line 213 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_SEMI(loc);
	YY_BREAK
case 103:
YY_RULE_SETUP
#line 214 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_PLUS(loc);
	YY_BREAK
case 104:
YY_RULE_SETUP
#line 215 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_MINUS(loc);
	YY_BREAK
case 105:
YY_RULE_SETUP
#line 216 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_STAR(loc);
	YY_BREAK
case 106:
YY_RULE_SETUP
#line 217 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_SLASH(loc);
	YY_BREAK
case 107:
YY_RULE_SETUP
#line 218 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_TILDE(loc);
	YY_BREAK
case 108:
YY_RULE_SETUP
#line 219 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_AMPERSAND(loc);
	YY_BREAK
case 109:
YY_RULE_SETUP
#line 220 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_PERCENT(loc);
	YY_BREAK
case 110:
YY_RULE_SETUP
#line 221 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_BITOR(loc);
	YY_BREAK
case 111:
YY_RULE_SETUP
#line 222 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_OROP(loc);
	YY_BREAK
case 112:
YY_RULE_SETUP
#line 223 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_EQUAL(loc);
	YY_BREAK
case 113:
YY_RULE_SETUP
#line 224 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_EQUAL2(loc);
	YY_BREAK
case 114:
YY_RULE_SETUP
#line 225 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_GREATER(loc);
	YY_BREAK
case 115:
YY_RULE_SETUP
#line 226 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_GREATEREQUAL(loc);
	YY_BREAK
case 116:
YY_RULE_SETUP
#line 227 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_LOWER(loc);
	YY_BREAK
case 117:
YY_RULE_SETUP
#line 228 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_LOWEREQUAL(loc);
	YY_BREAK
case 118:
YY_RULE_SETUP
#line 229 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_UNEQUAL(loc);
	YY_BREAK
case 119:
YY_RULE_SETUP
#line 230 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_UNEQUAL2(loc);
	YY_BREAK
case 120:
YY_RULE_SETUP
#line 231 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_BITWISELEFT(loc);
	YY_BREAK
case 121:
YY_RULE_SETUP
#line 232 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_BITWISERIGHT(loc);
	YY_BREAK
case 122:
YY_RULE_SETUP
#line 234 "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 236 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_EOF(loc);
	YY_BREAK
case 123:
YY_RULE_SETUP
#line 238 "sqlite3_lexer.ll"
YY_FATAL_ERROR( "flex scanner jammed" );
	YY_BREAK
#line 2329 "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 >= 467 )
				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 >= 467 )
			yy_c = yy_meta[yy_c];
		}
	yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
	yy_is_jam = (yy_current_state == 466);

	(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 238 "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);
}

}
}

