#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 126
#define YY_END_OF_BUFFER 127
/* 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[481] =
    {   0,
        0,    0,    0,    0,  127,  125,    1,    2,    2,  125,
      125,  112,  111,  125,  101,  102,  108,  106,  104,  107,
      103,  109,   97,   97,  125,  105,  119,  115,  117,   99,
       92,   92,   92,   92,   92,   92,   92,   92,   92,   92,
       92,   92,   92,   92,   92,   92,   92,   92,   92,   92,
       92,   92,  125,  125,  113,  110,  125,  125,  125,   92,
        1,    2,  121,    0,   95,    0,   96,    3,   97,    4,
       97,   97,    0,    0,  100,  123,  120,  122,  116,  118,
      124,   99,   92,   92,   92,   92,   92,   11,   92,    0,
        0,    0,   92,   92,   92,   92,   92,   92,   92,   92,

       92,   92,   92,   92,   92,   92,   92,   92,   92,   92,
       43,   92,   92,   46,   50,   92,   92,   92,   55,   92,
       59,   60,   92,   92,   92,   92,   92,   92,   92,   92,
       92,   92,   92,   92,   92,   92,   92,   92,   92,   92,
        0,    0,   94,    0,   93,  114,   92,    0,    0,   92,
       97,    0,   97,   97,   99,   92,   92,   92,    6,   12,
       92,    0,    0,   92,   92,   92,   92,   92,   92,   92,
       92,   92,   92,   92,   92,   32,   92,   92,   92,   92,
       92,   92,   92,   92,   92,   92,   92,   92,   92,   92,
       92,   92,   52,   92,   92,   56,   92,   92,   92,   92,

       92,   92,   92,   92,   92,   92,   92,   92,   92,   92,
       92,   76,   92,   92,   92,   92,   92,   92,   92,   92,
       92,   92,   92,   92,   92,   98,    0,    0,    5,   92,
       92,   92,   92,    0,   92,   92,   15,   16,   92,   92,
       92,   92,   92,   92,   92,   92,   92,   29,   92,   31,
       92,   92,   35,   92,   92,   92,   92,   40,   92,   42,
       92,   92,   92,   92,   92,   92,   53,   92,   92,   58,
       61,   92,   92,   92,   92,   92,   92,   92,   92,   92,
       92,   92,   92,   74,   92,   92,   92,   92,   80,   82,
       83,   92,   92,   92,   92,   92,   89,   92,   92,    8,

       92,   92,   92,   92,   92,   17,   92,   92,   92,   92,
       92,   92,   92,   92,   92,   92,   92,   36,   92,   92,
       92,   92,   92,   92,   47,   92,   92,   92,   54,   92,
       92,   92,   92,   65,   66,   92,   92,   92,   92,   92,
       92,   73,   92,   92,   92,   79,   92,   92,   92,   92,
       87,   92,   90,   92,    9,   10,   92,   92,   92,   92,
       92,   92,   21,   92,   92,   92,   28,   92,   33,   34,
       37,   92,   92,   92,   44,   92,   92,   49,   51,   92,
       92,   92,   92,   92,   68,   92,   92,   92,   92,   75,
       77,   78,   92,   92,   85,   86,   92,   92,   92,    7,

       14,   18,   92,   92,   92,   25,   92,   92,   92,   92,
       39,   92,   92,   92,   57,   92,   92,   64,   92,   69,
       92,   92,   92,   92,   92,   88,   91,   92,   19,   92,
       92,   92,   27,   30,   92,   92,   92,   92,   92,   92,
       92,   70,   92,   72,   92,   92,   92,   92,   92,   92,
       92,   38,   41,   45,   48,   62,   63,   92,   71,   81,
       84,   92,   20,   92,   92,   26,   67,   92,   92,   92,
       92,   22,   23,   13,   92,   92,   92,   92,   24,    0
    } ;

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

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

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

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

static const flex_int16_t yy_base[489] =
    {   0,
        0,    0,   59,   60,  299, 2446,  293,   85,   87,  270,
      285, 2446, 2446,  278, 2446, 2446, 2446, 2446, 2446,  271,
       73,  270,   77,   81,    0, 2446,   79,  255,   81,  244,
      128,   64,  187,   76,  124,  154,  191,   34,  245,   68,
       94,   87,  183,  225,  161,  255,  271,  315,  280,   99,
      298,  157,  210,  206,  156, 2446,  153,  150,  145,  373,
      223,  106, 2446,  214,  210,  205,  196, 2446,  229, 2446,
      261,  349,  106,    0,    0, 2446, 2446, 2446, 2446, 2446,
     2446,  111,   61,  310,  252,  170,  344,  331,  338,  122,
      111,  109,  350,  359,  366,  370,  406,  396,  427,  400,

      419,  437,  440,  322,  470,  433,  463,  378,  447,  473,
      220,  493,  498,  515,  501,  487,  307,  506,  518,  521,
      391,  443,  536,  550,  576,  573,  630,  600,  604,  610,
      540,  613,  584,  624,  677,  643,  646,  667,  659,  671,
      177,  127, 2446,  121,  110, 2446,  533,   72,   68,  688,
      357,  113,  119,    0,  180,  681,  685,  711,  543,  546,
      694,   60,   53,  697,  754,  746,  749,  774,  757,  714,
      761,  789,  778,  781,  792,  562,  795,  798,  818,  815,
      821,  830,  856,  850,  859,  863,  853,  866,  892,  847,
      896,  878,  638,  914,  899,  918,  921,  924,  939,  931,

      927,  945,  955,  960,  988,  983,  979,  994,  999, 1012,
     1015,  706, 1008,  741, 1004, 1032, 1041, 1059, 1045, 1051,
     1076, 1065, 1072, 1097, 1089, 2446,  113,   39,  718, 1092,
     1110,  975, 1104,   31, 1123, 1135,  725,  824, 1127, 1140,
     1120, 1152, 1155, 1168, 1174, 1158, 1171,  827, 1149,  886,
     1180, 1198,  948, 1215, 1229, 1207, 1232,  951, 1222, 1023,
     1225, 1243, 1251, 1239, 1260, 1255, 1027, 1284, 1273, 1131,
     1194, 1290, 1299, 1304, 1310, 1318, 1307, 1321, 1325, 1328,
     1342, 1379, 1385, 1201, 1388, 1391, 1394, 1397, 1355, 1278,
     1281, 1408, 1411, 1414, 1423, 1437, 1335, 1430, 1418, 1346,

     1449, 1455, 1469, 1485, 1488, 1349, 1477, 1491, 1505, 1496,
     1510, 1519, 1514, 1499, 1523, 1536, 1542, 1358, 1556, 1552,
     1572, 1582, 1585, 1578, 1364, 1590, 1597, 1593, 1382, 1606,
     1612, 1620, 1616, 1458, 1481, 1623, 1642, 1635, 1650, 1647,
     1665, 1527, 1670, 1679, 1682, 1539, 1685, 1703, 1691, 1721,
     1564, 1733, 1568, 1725, 1656, 1662, 1744, 1739, 1730, 1751,
     1754, 1764, 1709, 1757, 1779, 1799, 1712, 1792, 1760, 1773,
     1782, 1816, 1806, 1786, 1802, 1825, 1830, 1809, 1819, 1840,
     1853, 1862, 1856, 1865, 1835, 1891, 1869, 1894, 1899, 1847,
     1859, 1876, 1907, 1926, 1881, 1884, 1932, 1940, 1936, 1888,

     1904, 1910, 1953, 1962, 1946, 1918, 1976, 1982, 1988, 1967,
     1959, 1997, 1994, 2010, 1970, 2015, 2018, 2004, 2034, 2021,
     2037, 2029, 2059, 2063, 2077, 2042, 2045, 2085, 2048, 2070,
     2093, 2098, 2066, 2073, 2101, 2129, 2134, 2120, 2139, 2147,
     2142, 2106, 2154, 2112, 2150, 2162, 2169, 2174, 2184, 2180,
     2210, 2166, 2177, 2188, 2191, 2194, 2197, 2238, 2201, 2204,
     2207, 2265, 2214, 2254, 2262, 2219, 2222, 2268, 2281, 2284,
     2287, 2233, 2290, 2247, 2308, 2300, 2275, 2320, 2293, 2446,
     2405, 2412, 2414, 2419, 2426, 2433, 2436, 2439
    } ;

static const flex_int16_t yy_def[489] =
    {   0,
      480,    1,    1,    1,  480,  480,  480,  480,  480,  480,
      481,  480,  480,  482,  480,  480,  480,  480,  480,  480,
      480,  480,  480,  480,  483,  480,  480,  480,  480,  480,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  485,  486,  480,  480,  480,  480,  480,  484,
      480,  480,  480,  481,  480,  482,  480,  480,  480,  480,
      480,  480,  480,  487,  483,  480,  480,  480,  480,  480,
      480,  480,  484,  484,  484,  484,  484,  484,  484,  480,
      480,  480,  484,  484,  484,  484,  484,  484,  484,  484,

      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      488,  485,  480,  486,  480,  480,  484,  480,  480,  484,
      480,  480,  480,  487,  480,  484,  484,  484,  484,  484,
      484,  480,  480,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,

      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  480,  488,  480,  484,  484,
      484,  484,  484,  480,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,

      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,

      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,    0,
      480,  480,  480,  480,  480,  480,  480,  480
    } ;

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

       72,   76,   77,   78,   80,   81,   99,   73,   62,   62,
      100,   73,   83,  118,   60,   60,   90,   91,   92,  152,
      147,  152,  226,   93,  153,  153,   74,  116,  117,  155,
      155,  153,  153,  138,  234,   99,   73,  153,  153,  100,
       73,   83,  118,   90,   91,   92,   90,   91,   92,  228,
       90,   91,   92,  147,   74,   84,   85,  117,   90,   91,
       92,  101,  138,  102,  144,   86,  141,   87,  103,   90,
       91,   92,   88,  104,   89,  145,   90,   91,   92,  143,
      105,   90,   91,   92,   84,   85,  226,  124,  106,  101,
      163,  102,  162,   86,  107,   87,  103,  108,  155,  155,

       88,  104,   89,   83,  125,   66,   90,   91,   92,  105,
       90,   91,   92,   94,   67,   64,  124,  106,  158,   65,
       95,  109,  107,  119,   61,  108,  149,   96,  110,  120,
       97,  148,  125,   98,  147,  146,   90,   91,   92,   90,
       91,   92,   94,   90,   91,   92,  158,   69,   69,   95,
      109,  119,   90,   91,   92,   96,  110,  120,   97,   73,
      145,   98,  143,   82,  121,   90,   91,   92,  122,   90,
       91,   92,  123,   90,   91,   92,  111,  112,   79,  151,
      151,  126,   70,  113,  114,  127,   68,   67,   73,  115,
       65,   73,  121,   63,   61,  128,  122,  157,  480,  480,

      123,  129,   90,   91,   92,  111,  112,   90,   91,   92,
      126,  113,  114,  480,  127,  480,  130,  115,  480,  135,
       73,  136,  480,  128,  137,  157,  480,   90,   91,   92,
      129,  139,  140,  480,   90,   91,   92,   90,   91,   92,
      480,  131,  480,  194,  130,  132,  480,  135,  133,  136,
      156,  480,  137,   90,   91,   92,  178,  480,  134,  160,
      139,  140,   90,   91,   92,   71,  480,   72,   72,  480,
      131,  194,  480,  159,  132,  151,  151,  133,  156,   73,
       90,   91,   92,  161,  480,  178,  134,   73,  160,   90,
       91,   92,   90,   91,   92,  164,  166,   90,   91,   92,

       84,   85,  159,  165,   90,   91,   92,  167,   73,  168,
       86,  161,  150,   90,   91,   92,   73,   88,  184,   89,
       90,   91,   92,  164,  480,  166,   90,   91,   92,   84,
       85,  165,   90,   91,   92,  167,  169,  168,   86,  170,
      150,   90,   91,   92,  174,   88,  184,   89,   90,   91,
       92,  480,   90,   91,   92,   90,   91,   92,  171,  480,
       90,   91,   92,  175,  172,  169,  176,  170,  177,  480,
      181,  173,  174,   90,   91,   92,  480,  480,   90,   91,
       92,  480,   90,   91,   92,  480,  185,  171,   90,   91,
       92,  175,  172,  480,  480,  176,  480,  177,  181,  173,

      182,   90,   91,   92,  179,  480,  183,  180,  480,   90,
       91,   92,  480,  186,  185,   90,   91,   92,  480,   90,
       91,   92,   90,   91,   92,   90,   91,   92,  182,   90,
       91,   92,  187,  179,  183,  180,  188,  193,  480,  480,
      192,  186,  480,  480,  189,   90,   91,   92,  480,  190,
      480,  195,   90,   91,   92,   90,   91,   92,  197,  191,
      187,  480,  480,  196,  188,  193,  198,  215,  192,   90,
       91,   92,  480,  189,  480,   90,   91,   92,  190,  195,
       90,   91,   92,   90,   91,   92,  197,  191,   90,   91,
       92,  196,  480,  199,  480,  198,  215,   90,   91,   92,

       90,   91,   92,   90,   91,   92,  200,  202,  480,  480,
      201,  480,  203,  480,  217,   90,   91,   92,   90,   91,
       92,  199,   90,   91,   92,   90,   91,   92,   90,   91,
       92,  480,   90,   91,   92,  200,  202,  209,  480,  201,
      203,  211,  480,  217,   90,   91,   92,  480,  210,  212,
      213,  216,  480,  214,  480,   90,   91,   92,   90,   91,
       92,  204,  205,  480,  480,  209,   90,   91,   92,  211,
      218,  206,  221,  480,  207,  208,  210,  212,  213,  216,
      222,  214,   90,   91,   92,  480,   90,   91,   92,  224,
      204,  205,   90,   91,   92,   90,   91,   92,  218,  206,

      480,  221,  207,  208,  219,  480,   90,   91,   92,  222,
      223,  220,   90,   91,   92,  480,  225,  229,  224,  231,
       90,   91,   92,  480,  230,   90,   91,   92,   90,   91,
       92,  480,  480,  219,  233,  480,  480,  232,  223,  480,
      220,   90,   91,   92,  225,  235,  229,  480,  231,   90,
       91,   92,  230,   90,   91,   92,  480,  244,  480,   90,
       91,   92,  233,   90,   91,   92,  232,   90,   91,   92,
       90,   91,   92,  235,  239,  287,   90,   91,   92,   90,
       91,   92,  236,  243,  237,  244,  240,  245,   90,   91,
       92,  246,  480,   90,   91,   92,   90,   91,   92,  238,

       90,   91,   92,  239,  287,  241,  248,   90,   91,   92,
      480,  236,  243,  237,  240,  480,  245,  480,  242,  247,
      246,  251,  250,   90,   91,   92,  249,  238,   90,   91,
       92,   90,   91,   92,  241,  248,   90,   91,   92,   90,
       91,   92,  252,   90,   91,   92,  242,  480,  247,  480,
      251,  250,  480,  480,  249,  253,   90,   91,   92,  254,
       90,   91,   92,   90,   91,   92,  255,  256,  480,  480,
      252,   90,   91,   92,   90,   91,   92,   90,   91,   92,
       90,   91,   92,  253,  480,  480,  257,  254,  258,  259,
      260,  480,  264,  261,  255,  256,  262,   90,   91,   92,

       90,   91,   92,   90,   91,   92,   90,   91,   92,   90,
       91,   92,   90,   91,   92,  257,  258,  480,  259,  260,
      264,  261,  263,  480,  266,  262,  265,  268,  480,   90,
       91,   92,   90,   91,   92,   90,   91,   92,   90,   91,
       92,   90,   91,   92,  267,   90,   91,   92,   90,   91,
       92,  263,  266,  480,  480,  265,  268,  269,  270,  273,
       90,   91,   92,  480,  480,  274,  480,  271,   90,   91,
       92,  480,  480,  267,   90,   91,   92,  480,   90,   91,
       92,   90,   91,   92,  272,  269,  270,  276,  273,  275,
      277,  480,  480,  274,  480,  271,   90,   91,   92,  480,

       90,   91,   92,   90,   91,   92,   90,   91,   92,   90,
       91,   92,  272,   90,   91,   92,  276,  275,  278,  277,
      279,   90,   91,   92,  280,  302,  480,   90,   91,   92,
       90,   91,   92,   90,   91,   92,  282,   90,   91,   92,
      281,  288,   90,   91,   92,  285,  283,  278,  279,  480,
      480,  286,  280,  302,  480,  480,  284,   90,   91,   92,
      480,   90,   91,   92,  282,   90,   91,   92,  281,  288,
       90,   91,   92,  289,  285,  283,   90,   91,   92,  286,
      290,   90,   91,   92,  284,  292,   90,   91,   92,  291,
       90,   91,   92,  293,   90,   91,   92,   90,   91,   92,

      480,  289,  294,  480,  295,   90,   91,   92,  290,   90,
       91,   92,  480,  292,   90,   91,   92,  296,  291,  480,
      480,  293,  299,   90,   91,   92,  480,   90,   91,   92,
      480,  294,  295,   90,   91,   92,  297,  300,  303,  480,
      298,   90,   91,   92,  480,  296,  480,   90,   91,   92,
      301,  299,  480,  304,   90,   91,   92,  308,   90,   91,
       92,  305,  480,  306,  297,  300,  307,  303,  298,  480,
      480,   90,   91,   92,   90,   91,   92,  480,  301,   90,
       91,   92,  304,  315,  480,  308,   90,   91,   92,  480,
      305,  306,   90,   91,   92,  307,  480,  309,  311,  480,

      310,  313,   90,   91,   92,   90,   91,   92,  480,   90,
       91,   92,  315,   90,   91,   92,  314,   90,   91,   92,
      312,  316,   90,   91,   92,  309,  480,  311,  310,  313,
      480,   90,   91,   92,   90,   91,   92,   90,   91,   92,
       90,   91,   92,  317,  314,  318,  480,  320,  312,  316,
       90,   91,   92,   90,   91,   92,   90,   91,   92,  319,
      480,  480,   90,   91,   92,  322,  321,  480,  323,  480,
      480,  317,  324,  326,  318,  320,   90,   91,   92,  480,
       90,   91,   92,   90,   91,   92,  480,  480,  319,   90,
       91,   92,  328,  322,  480,  321,  323,   90,   91,   92,

      325,  324,  326,  327,   90,   91,   92,   90,   91,   92,
      480,   90,   91,   92,   90,   91,   92,  329,  480,  330,
      328,   90,   91,   92,  331,   90,   91,   92,  325,  332,
      333,  327,  480,   90,   91,   92,  480,   90,   91,   92,
      334,  480,   90,   91,   92,  480,  329,  330,  335,  480,
      336,  338,  480,  331,  480,   90,   91,   92,  332,  333,
       90,   91,   92,   90,   91,   92,   90,   91,   92,  334,
      337,  339,   90,   91,   92,  480,  480,  335,  336,  480,
      338,   90,   91,   92,  480,  340,   90,   91,   92,   90,
       91,   92,   90,   91,   92,  347,  480,  480,  337,  339,

       90,   91,   92,   90,   91,   92,  341,   90,   91,   92,
       90,   91,   92,  340,  342,  480,  343,   90,   91,   92,
      480,  344,  345,  347,   90,   91,   92,  346,   90,   91,
       92,   90,   91,   92,  480,  341,  480,   90,   91,   92,
       90,   91,   92,  342,  480,  343,   90,   91,   92,  480,
      344,  345,  480,  480,  348,  351,  346,  349,  354,  350,
      353,   90,   91,   92,   90,   91,   92,   90,   91,   92,
       90,   91,   92,   90,   91,   92,   90,   91,   92,   90,
       91,   92,  348,  352,  351,  349,  354,  350,  355,  353,
       90,   91,   92,   90,   91,   92,   90,   91,   92,  356,

       90,   91,   92,  480,  480,   90,   91,   92,  357,  480,
      480,  352,   90,   91,   92,  358,  355,  359,  480,   90,
       91,   92,  360,  480,  480,  361,  363,  356,  480,  367,
      480,   90,   91,   92,  480,  480,  357,   90,   91,   92,
       90,   91,   92,  480,  358,  480,  359,  480,  362,  364,
      360,   90,   91,   92,  361,  363,  365,  366,  367,   90,
       91,   92,  368,   90,   91,   92,  369,   90,   91,   92,
       90,   91,   92,   90,   91,   92,  362,  364,   90,   91,
       92,   90,   91,   92,  365,  366,  370,   90,   91,   92,
      368,  480,   90,   91,   92,  369,   90,   91,   92,  371,

      372,   90,   91,   92,  373,   90,   91,   92,  374,   90,
       91,   92,  376,  480,  370,  375,  377,  480,   90,   91,
       92,   90,   91,   92,   90,   91,   92,  371,  372,  480,
      379,  480,  480,  373,   90,   91,   92,  374,   90,   91,
       92,  376,  378,  380,  375,  377,   90,   91,   92,  382,
       90,   91,   92,  384,   90,   91,   92,  381,  379,  383,
       90,   91,   92,  386,   90,   91,   92,   90,   91,   92,
      378,  380,   90,   91,   92,   90,   91,   92,  382,   90,
       91,   92,  384,  385,  387,  381,  388,  383,   90,   91,
       92,  389,  386,  480,   90,   91,   92,  480,   90,   91,

       92,  480,   90,   91,   92,   90,   91,   92,  391,  480,
      480,  385,  480,  387,  388,  390,  480,   90,   91,   92,
      389,  395,  480,  480,   90,   91,   92,  392,  393,   90,
       91,   92,   90,   91,   92,  480,  480,  391,   90,   91,
       92,  480,  394,  390,   90,   91,   92,   90,   91,   92,
      395,  396,   90,   91,   92,  392,  393,  480,  480,  397,
      401,   90,   91,   92,   90,   91,   92,   90,   91,   92,
      394,  398,  399,   90,   91,   92,  480,  480,  400,  480,
      396,  402,  403,  480,  480,   90,   91,   92,  397,  401,
      404,   90,   91,   92,   90,   91,   92,  480,  480,  398,

      480,  399,  405,   90,   91,   92,  400,   90,   91,   92,
      402,  403,   90,   91,   92,   90,   91,   92,  480,  404,
      409,   90,   91,   92,  406,  407,   90,   91,   92,  408,
      405,  412,  480,   90,   91,   92,   90,   91,   92,   90,
       91,   92,   90,   91,   92,  411,   90,   91,   92,  409,
      410,  413,  406,  480,  407,   90,   91,   92,  408,  412,
      480,   90,   91,   92,   90,   91,   92,  414,   90,   91,
       92,  480,  480,  411,   90,   91,   92,  415,  480,  410,
      413,   90,   91,   92,   90,   91,   92,  416,   90,   91,
       92,   90,   91,   92,  480,  414,  417,  421,   90,   91,

       92,   90,   91,   92,  419,  415,  418,   90,   91,   92,
      480,  480,   90,   91,   92,  480,  416,   90,   91,   92,
      480,  420,   90,   91,   92,  417,  421,  423,  422,   90,
       91,   92,  419,  424,  418,   90,   91,   92,   90,   91,
       92,   90,   91,   92,   90,   91,   92,   90,   91,   92,
      420,   90,   91,   92,  480,  425,  423,  422,   90,   91,
       92,  480,  424,   90,   91,   92,   90,   91,   92,  426,
       90,   91,   92,   90,   91,   92,   90,   91,   92,  428,
      480,   90,   91,   92,  425,  427,   90,   91,   92,   90,
       91,   92,   90,   91,   92,  480,  430,  426,  429,  431,

       90,   91,   92,  432,  480,  480,  435,  428,   90,   91,
       92,  433,  480,  427,   90,   91,   92,  480,   90,   91,
       92,  480,   90,   91,   92,  430,  429,  436,   90,   91,
       92,  480,  432,  434,  435,   90,   91,   92,  480,  437,
      433,   90,   91,   92,   90,   91,   92,  438,  480,   90,
       91,   92,   90,   91,   92,  439,  436,  440,   90,   91,
       92,  434,  441,  480,   90,   91,   92,  437,  443,  480,
       90,   91,   92,  480,  480,  438,   90,   91,   92,   90,
       91,   92,  442,  439,  480,  440,   90,   91,   92,  480,
      480,  441,   90,   91,   92,  444,  443,   90,   91,   92,

       90,   91,   92,   90,   91,   92,  445,  446,  480,  448,
      442,   90,   91,   92,  480,  447,   90,   91,   92,   90,
       91,   92,  449,  444,   90,   91,   92,   90,   91,   92,
       90,   91,   92,  452,  445,  451,  446,  448,  450,  480,
      480,   90,   91,   92,  447,   90,   91,   92,   90,   91,
       92,  449,   90,   91,   92,   90,   91,   92,  453,   90,
       91,   92,  452,  451,  454,  480,  450,   90,   91,   92,
      455,  480,  458,  480,  480,   90,   91,   92,  456,  457,
       90,   91,   92,   90,   91,   92,  459,  453,   90,   91,
       92,  461,  480,  454,   90,   91,   92,  480,  455,  480,

      460,  458,   90,   91,   92,  480,  456,  462,  457,  480,
      464,   90,   91,   92,  465,  459,   90,   91,   92,  463,
      461,   90,   91,   92,   90,   91,   92,  480,  460,   90,
       91,   92,   90,   91,   92,  462,   90,   91,   92,  464,
      466,  480,  480,  465,   90,   91,   92,  463,   90,   91,
       92,   90,   91,   92,  480,  480,   90,   91,   92,   90,
       91,   92,   90,   91,   92,  480,   90,   91,   92,  466,
       90,   91,   92,   90,   91,   92,   90,   91,   92,   90,
       91,   92,  467,   90,   91,   92,   90,   91,   92,   90,
       91,   92,   90,   91,   92,  468,   90,   91,   92,  469,

      470,   90,   91,   92,   90,   91,   92,  471,  480,  480,
      467,  472,  480,  478,  473,   90,   91,   92,  480,  480,
       90,   91,   92,  480,  468,  480,  477,  469,  470,   90,
       91,   92,  474,  480,  475,  471,   90,   91,   92,  480,
      472,  478,  480,  473,   90,   91,   92,   90,   91,   92,
       90,   91,   92,  476,  480,  477,  480,   90,   91,   92,
      474,  479,  475,   90,   91,   92,   90,   91,   92,   90,
       91,   92,   90,   91,   92,   90,   91,   92,  480,  480,
      480,  476,   90,   91,   92,  480,  480,  480,  480,  479,
       90,   91,   92,  480,  480,  480,  480,  480,  480,  480,

      480,  480,   90,   91,   92,   64,  480,   64,   64,   64,
       64,   64,   66,  480,   66,   66,   66,   66,   66,   75,
       75,   83,  480,   83,   83,   83,  142,  480,  142,  142,
      142,  142,  142,  144,  480,  144,  144,  144,  144,  144,
      154,  154,  227,  227,  227,    5,  480,  480,  480,  480,
      480,  480,  480,  480,  480,  480,  480,  480,  480,  480,
      480,  480,  480,  480,  480,  480,  480,  480,  480,  480,
      480,  480,  480,  480,  480,  480,  480,  480,  480,  480,
      480,  480,  480,  480,  480,  480,  480,  480,  480,  480,
      480,  480,  480,  480,  480,  480,  480,  480,  480,  480,

      480,  480,  480,  480,  480,  480,  480,  480,  480,  480,
      480,  480,  480,  480,  480,  480,  480,  480,  480,  480,
      480,  480,  480,  480,  480,  480,  480,  480,  480,  480,
      480
    } ;

static const flex_int16_t yy_chk[2532] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    3,    4,    8,    8,    9,
        9,   21,   21,   23,   32,   23,   23,   24,   40,   24,

       24,   27,   27,   27,   29,   29,   34,   23,   62,   62,
       34,   24,  234,   42,    3,    4,   38,   38,   38,   73,
      228,   73,  227,   32,   73,   73,   23,   40,   41,   82,
       82,  152,  152,   50,  163,   34,   23,  153,  153,   34,
       24,  162,   42,   83,   83,   83,   32,   32,   32,  149,
       40,   40,   40,  148,   23,   31,   31,   41,   34,   34,
       34,   35,   50,   35,  145,   31,   52,   31,   35,   42,
       42,   42,   31,   35,   31,  144,   41,   41,   41,  142,
       36,   50,   50,   50,   31,   31,  141,   45,   36,   35,
       92,   35,   91,   31,   36,   31,   35,   36,  155,  155,

       31,   35,   31,   90,   45,   67,   35,   35,   35,   36,
       31,   31,   31,   33,   66,   65,   45,   36,   86,   64,
       33,   37,   36,   43,   61,   36,   59,   33,   37,   43,
       33,   58,   45,   33,   57,   55,   36,   36,   36,   52,
       52,   52,   33,   45,   45,   45,   86,   69,   69,   33,
       37,   43,   86,   86,   86,   33,   37,   43,   33,   69,
       54,   33,   53,   30,   44,   43,   43,   43,   44,   33,
       33,   33,   44,   37,   37,   37,   39,   39,   28,   71,
       71,   46,   22,   39,   39,   46,   20,   14,   69,   39,
       11,   71,   44,   10,    7,   46,   44,   85,    5,    0,

       44,   47,  111,  111,  111,   39,   39,   44,   44,   44,
       46,   39,   39,    0,   46,    0,   47,   39,    0,   49,
       71,   49,    0,   46,   49,   85,    0,   39,   39,   39,
       47,   51,   51,    0,   85,   85,   85,   46,   46,   46,
        0,   48,    0,  117,   47,   48,    0,   49,   48,   49,
       84,    0,   49,   47,   47,   47,  104,    0,   48,   88,
       51,   51,   49,   49,   49,   72,    0,   72,   72,    0,
       48,  117,    0,   87,   48,  151,  151,   48,   84,   72,
       51,   51,   51,   89,    0,  104,   48,  151,   88,  117,
      117,  117,   84,   84,   84,   93,   95,   48,   48,   48,

       60,   60,   87,   94,  104,  104,  104,   96,   72,   96,
       60,   89,   60,   88,   88,   88,  151,   60,  108,   60,
       89,   89,   89,   93,    0,   95,   87,   87,   87,   60,
       60,   94,   93,   93,   93,   96,   97,   96,   60,   98,
       60,   94,   94,   94,  100,   60,  108,   60,   95,   95,
       95,    0,   96,   96,   96,   60,   60,   60,   99,    0,
      108,  108,  108,  101,   99,   97,  102,   98,  103,    0,
      106,   99,  100,  121,  121,  121,    0,    0,   98,   98,
       98,    0,  100,  100,  100,    0,  109,   99,   97,   97,
       97,  101,   99,    0,    0,  102,    0,  103,  106,   99,

      107,  101,  101,  101,  105,    0,  107,  105,    0,   99,
       99,   99,    0,  110,  109,  106,  106,  106,    0,  102,
      102,  102,  103,  103,  103,  122,  122,  122,  107,  109,
      109,  109,  112,  105,  107,  105,  113,  116,    0,    0,
      115,  110,    0,    0,  114,  107,  107,  107,    0,  114,
        0,  118,  105,  105,  105,  110,  110,  110,  120,  114,
      112,    0,    0,  119,  113,  116,  123,  131,  115,  116,
      116,  116,    0,  114,    0,  112,  112,  112,  114,  118,
      113,  113,  113,  115,  115,  115,  120,  114,  118,  118,
      118,  119,    0,  124,    0,  123,  131,  114,  114,  114,

      119,  119,  119,  120,  120,  120,  125,  126,    0,    0,
      125,    0,  126,    0,  133,  147,  147,  147,  123,  123,
      123,  124,  131,  131,  131,  159,  159,  159,  160,  160,
      160,    0,  124,  124,  124,  125,  126,  128,    0,  125,
      126,  129,    0,  133,  176,  176,  176,    0,  128,  129,
      130,  132,    0,  130,    0,  126,  126,  126,  125,  125,
      125,  127,  127,    0,    0,  128,  133,  133,  133,  129,
      134,  127,  136,    0,  127,  127,  128,  129,  130,  132,
      137,  130,  128,  128,  128,    0,  129,  129,  129,  139,
      127,  127,  130,  130,  130,  132,  132,  132,  134,  127,

        0,  136,  127,  127,  135,    0,  134,  134,  134,  137,
      138,  135,  127,  127,  127,    0,  140,  150,  139,  157,
      193,  193,  193,    0,  156,  136,  136,  136,  137,  137,
      137,    0,    0,  135,  161,    0,    0,  158,  138,    0,
      135,  139,  139,  139,  140,  164,  150,    0,  157,  138,
      138,  138,  156,  140,  140,  140,    0,  170,    0,  135,
      135,  135,  161,  156,  156,  156,  158,  157,  157,  157,
      150,  150,  150,  164,  166,  214,  161,  161,  161,  164,
      164,  164,  165,  169,  165,  170,  167,  171,  212,  212,
      212,  171,    0,  158,  158,  158,  170,  170,  170,  165,

      229,  229,  229,  166,  214,  168,  173,  237,  237,  237,
        0,  165,  169,  165,  167,    0,  171,    0,  168,  172,
      171,  177,  175,  214,  214,  214,  174,  165,  166,  166,
      166,  167,  167,  167,  168,  173,  165,  165,  165,  169,
      169,  169,  178,  171,  171,  171,  168,    0,  172,    0,
      177,  175,    0,    0,  174,  179,  168,  168,  168,  180,
      173,  173,  173,  174,  174,  174,  181,  182,    0,    0,
      178,  172,  172,  172,  175,  175,  175,  177,  177,  177,
      178,  178,  178,  179,    0,    0,  183,  180,  184,  185,
      186,    0,  190,  187,  181,  182,  188,  180,  180,  180,

      179,  179,  179,  181,  181,  181,  238,  238,  238,  248,
      248,  248,  182,  182,  182,  183,  184,    0,  185,  186,
      190,  187,  189,    0,  192,  188,  191,  195,    0,  190,
      190,  190,  184,  184,  184,  187,  187,  187,  183,  183,
      183,  185,  185,  185,  194,  186,  186,  186,  188,  188,
      188,  189,  192,    0,    0,  191,  195,  196,  197,  200,
      192,  192,  192,    0,    0,  201,    0,  198,  250,  250,
      250,    0,    0,  194,  189,  189,  189,    0,  191,  191,
      191,  195,  195,  195,  199,  196,  197,  203,  200,  202,
      204,    0,    0,  201,    0,  198,  194,  194,  194,    0,

      196,  196,  196,  197,  197,  197,  198,  198,  198,  201,
      201,  201,  199,  200,  200,  200,  203,  202,  205,  204,
      206,  199,  199,  199,  207,  232,    0,  202,  202,  202,
      253,  253,  253,  258,  258,  258,  209,  203,  203,  203,
      208,  215,  204,  204,  204,  211,  210,  205,  206,    0,
        0,  213,  207,  232,    0,    0,  210,  232,  232,  232,
        0,  207,  207,  207,  209,  206,  206,  206,  208,  215,
      205,  205,  205,  216,  211,  210,  208,  208,  208,  213,
      217,  209,  209,  209,  210,  219,  215,  215,  215,  218,
      213,  213,  213,  220,  210,  210,  210,  211,  211,  211,

        0,  216,  221,    0,  222,  260,  260,  260,  217,  267,
      267,  267,    0,  219,  216,  216,  216,  223,  218,    0,
        0,  220,  225,  217,  217,  217,    0,  219,  219,  219,
        0,  221,  222,  220,  220,  220,  224,  230,  233,    0,
      224,  218,  218,  218,    0,  223,    0,  222,  222,  222,
      231,  225,    0,  235,  223,  223,  223,  241,  221,  221,
      221,  236,    0,  239,  224,  230,  240,  233,  224,    0,
        0,  225,  225,  225,  230,  230,  230,    0,  231,  224,
      224,  224,  235,  249,    0,  241,  233,  233,  233,    0,
      236,  239,  231,  231,  231,  240,    0,  242,  244,    0,

      243,  246,  241,  241,  241,  235,  235,  235,    0,  239,
      239,  239,  249,  270,  270,  270,  247,  236,  236,  236,
      245,  251,  240,  240,  240,  242,    0,  244,  243,  246,
        0,  249,  249,  249,  242,  242,  242,  243,  243,  243,
      246,  246,  246,  252,  247,  254,    0,  256,  245,  251,
      244,  244,  244,  247,  247,  247,  245,  245,  245,  255,
        0,    0,  251,  251,  251,  259,  257,    0,  261,    0,
        0,  252,  262,  264,  254,  256,  271,  271,  271,    0,
      252,  252,  252,  284,  284,  284,    0,    0,  255,  256,
      256,  256,  266,  259,    0,  257,  261,  254,  254,  254,

      263,  262,  264,  265,  259,  259,  259,  261,  261,  261,
        0,  255,  255,  255,  257,  257,  257,  268,    0,  269,
      266,  264,  264,  264,  272,  262,  262,  262,  263,  273,
      274,  265,    0,  263,  263,  263,    0,  266,  266,  266,
      275,    0,  265,  265,  265,    0,  268,  269,  276,    0,
      277,  279,    0,  272,    0,  269,  269,  269,  273,  274,
      290,  290,  290,  291,  291,  291,  268,  268,  268,  275,
      278,  280,  272,  272,  272,    0,    0,  276,  277,    0,
      279,  273,  273,  273,    0,  281,  274,  274,  274,  277,
      277,  277,  275,  275,  275,  289,    0,    0,  278,  280,

      276,  276,  276,  278,  278,  278,  282,  279,  279,  279,
      280,  280,  280,  281,  283,    0,  285,  297,  297,  297,
        0,  286,  287,  289,  281,  281,  281,  288,  300,  300,
      300,  306,  306,  306,    0,  282,    0,  289,  289,  289,
      318,  318,  318,  283,    0,  285,  325,  325,  325,    0,
      286,  287,    0,    0,  292,  295,  288,  293,  299,  294,
      298,  282,  282,  282,  329,  329,  329,  283,  283,  283,
      285,  285,  285,  286,  286,  286,  287,  287,  287,  288,
      288,  288,  292,  296,  295,  293,  299,  294,  301,  298,
      292,  292,  292,  293,  293,  293,  294,  294,  294,  302,

      299,  299,  299,    0,    0,  295,  295,  295,  303,    0,
        0,  296,  298,  298,  298,  304,  301,  305,    0,  296,
      296,  296,  307,    0,    0,  308,  310,  302,    0,  314,
        0,  301,  301,  301,    0,    0,  303,  302,  302,  302,
      334,  334,  334,    0,  304,    0,  305,    0,  309,  311,
      307,  303,  303,  303,  308,  310,  312,  313,  314,  307,
      307,  307,  315,  335,  335,  335,  316,  304,  304,  304,
      305,  305,  305,  308,  308,  308,  309,  311,  310,  310,
      310,  314,  314,  314,  312,  313,  317,  309,  309,  309,
      315,    0,  311,  311,  311,  316,  313,  313,  313,  319,

      320,  312,  312,  312,  321,  315,  315,  315,  322,  342,
      342,  342,  324,    0,  317,  323,  326,    0,  316,  316,
      316,  346,  346,  346,  317,  317,  317,  319,  320,    0,
      328,    0,    0,  321,  320,  320,  320,  322,  319,  319,
      319,  324,  327,  330,  323,  326,  351,  351,  351,  332,
      353,  353,  353,  336,  321,  321,  321,  331,  328,  333,
      324,  324,  324,  338,  322,  322,  322,  323,  323,  323,
      327,  330,  326,  326,  326,  328,  328,  328,  332,  327,
      327,  327,  336,  337,  339,  331,  340,  333,  330,  330,
      330,  341,  338,    0,  331,  331,  331,    0,  333,  333,

      333,    0,  332,  332,  332,  336,  336,  336,  344,    0,
        0,  337,    0,  339,  340,  343,    0,  338,  338,  338,
      341,  349,    0,    0,  337,  337,  337,  345,  347,  340,
      340,  340,  339,  339,  339,    0,    0,  344,  355,  355,
      355,    0,  348,  343,  356,  356,  356,  341,  341,  341,
      349,  350,  343,  343,  343,  345,  347,    0,    0,  352,
      359,  344,  344,  344,  345,  345,  345,  347,  347,  347,
      348,  354,  357,  349,  349,  349,    0,    0,  358,    0,
      350,  360,  361,    0,    0,  348,  348,  348,  352,  359,
      362,  363,  363,  363,  367,  367,  367,    0,    0,  354,

        0,  357,  364,  350,  350,  350,  358,  354,  354,  354,
      360,  361,  359,  359,  359,  352,  352,  352,    0,  362,
      368,  358,  358,  358,  365,  366,  357,  357,  357,  366,
      364,  374,    0,  360,  360,  360,  361,  361,  361,  364,
      364,  364,  369,  369,  369,  373,  362,  362,  362,  368,
      372,  376,  365,    0,  366,  370,  370,  370,  366,  374,
        0,  365,  365,  365,  371,  371,  371,  377,  374,  374,
      374,    0,    0,  373,  368,  368,  368,  380,    0,  372,
      376,  366,  366,  366,  375,  375,  375,  381,  373,  373,
      373,  378,  378,  378,    0,  377,  382,  387,  372,  372,

      372,  379,  379,  379,  384,  380,  383,  376,  376,  376,
        0,    0,  377,  377,  377,    0,  381,  385,  385,  385,
        0,  386,  380,  380,  380,  382,  387,  389,  388,  390,
      390,  390,  384,  393,  383,  381,  381,  381,  383,  383,
      383,  391,  391,  391,  382,  382,  382,  384,  384,  384,
      386,  387,  387,  387,    0,  394,  389,  388,  392,  392,
      392,    0,  393,  395,  395,  395,  396,  396,  396,  397,
      400,  400,  400,  386,  386,  386,  388,  388,  388,  399,
        0,  389,  389,  389,  394,  398,  401,  401,  401,  393,
      393,  393,  402,  402,  402,    0,  404,  397,  403,  405,

      406,  406,  406,  407,    0,    0,  410,  399,  394,  394,
      394,  408,    0,  398,  397,  397,  397,    0,  399,  399,
      399,    0,  398,  398,  398,  404,  403,  412,  405,  405,
      405,    0,  407,  409,  410,  403,  403,  403,    0,  413,
      408,  411,  411,  411,  404,  404,  404,  414,    0,  410,
      410,  410,  415,  415,  415,  416,  412,  417,  407,  407,
      407,  409,  419,    0,  408,  408,  408,  413,  422,    0,
      409,  409,  409,    0,    0,  414,  413,  413,  413,  412,
      412,  412,  421,  416,    0,  417,  418,  418,  418,    0,
        0,  419,  414,  414,  414,  423,  422,  416,  416,  416,

      417,  417,  417,  420,  420,  420,  424,  425,    0,  430,
      421,  422,  422,  422,    0,  428,  419,  419,  419,  421,
      421,  421,  431,  423,  426,  426,  426,  427,  427,  427,
      429,  429,  429,  435,  424,  432,  425,  430,  431,    0,
        0,  423,  423,  423,  428,  424,  424,  424,  433,  433,
      433,  431,  430,  430,  430,  434,  434,  434,  436,  425,
      425,  425,  435,  432,  437,    0,  431,  428,  428,  428,
      438,    0,  441,    0,    0,  431,  431,  431,  439,  440,
      432,  432,  432,  435,  435,  435,  443,  436,  442,  442,
      442,  446,    0,  437,  444,  444,  444,    0,  438,    0,

      445,  441,  438,  438,  438,    0,  439,  447,  440,    0,
      449,  436,  436,  436,  450,  443,  437,  437,  437,  448,
      446,  439,  439,  439,  441,  441,  441,    0,  445,  440,
      440,  440,  445,  445,  445,  447,  443,  443,  443,  449,
      451,    0,    0,  450,  446,  446,  446,  448,  452,  452,
      452,  447,  447,  447,    0,    0,  448,  448,  448,  453,
      453,  453,  450,  450,  450,    0,  449,  449,  449,  451,
      454,  454,  454,  455,  455,  455,  456,  456,  456,  457,
      457,  457,  458,  459,  459,  459,  460,  460,  460,  461,
      461,  461,  451,  451,  451,  462,  463,  463,  463,  464,

      465,  466,  466,  466,  467,  467,  467,  468,    0,    0,
      458,  469,    0,  477,  470,  472,  472,  472,    0,    0,
      458,  458,  458,    0,  462,    0,  476,  464,  465,  474,
      474,  474,  471,    0,  473,  468,  464,  464,  464,    0,
      469,  477,    0,  470,  465,  465,  465,  462,  462,  462,
      468,  468,  468,  475,    0,  476,    0,  477,  477,  477,
      471,  478,  473,  469,  469,  469,  470,  470,  470,  471,
      471,  471,  473,  473,  473,  479,  479,  479,    0,    0,
        0,  475,  476,  476,  476,    0,    0,    0,    0,  478,
      475,  475,  475,    0,    0,    0,    0,    0,    0,    0,

        0,    0,  478,  478,  478,  481,    0,  481,  481,  481,
      481,  481,  482,    0,  482,  482,  482,  482,  482,  483,
      483,  484,    0,  484,  484,  484,  485,    0,  485,  485,
      485,  485,  485,  486,    0,  486,  486,  486,  486,  486,
      487,  487,  488,  488,  488,  480,  480,  480,  480,  480,
      480,  480,  480,  480,  480,  480,  480,  480,  480,  480,
      480,  480,  480,  480,  480,  480,  480,  480,  480,  480,
      480,  480,  480,  480,  480,  480,  480,  480,  480,  480,
      480,  480,  480,  480,  480,  480,  480,  480,  480,  480,
      480,  480,  480,  480,  480,  480,  480,  480,  480,  480,

      480,  480,  480,  480,  480,  480,  480,  480,  480,  480,
      480,  480,  480,  480,  480,  480,  480,  480,  480,  480,
      480,  480,  480,  480,  480,  480,  480,  480,  480,  480,
      480
    } ;

static const flex_int16_t yy_rule_linenum[126] =
    {   0,
       80,   81,   83,   89,  113,  114,  115,  117,  118,  119,
      120,  121,  122,  123,  124,  125,  126,  127,  128,  129,
      130,  131,  132,  133,  134,  135,  136,  137,  138,  139,
      140,  141,  142,  143,  144,  145,  146,  147,  148,  149,
      150,  151,  152,  153,  154,  155,  156,  157,  158,  159,
      160,  161,  162,  163,  164,  165,  166,  167,  168,  169,
      170,  171,  172,  173,  174,  175,  176,  177,  178,  179,
      180,  181,  182,  183,  184,  185,  186,  187,  188,  189,
      190,  191,  192,  193,  194,  195,  196,  197,  198,  199,
      200,  202,  203,  204,  205,  206,  207,  208,  209,  210,

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

/* 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 1244 "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 1270 "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 1275 "sqlite3_lexer.cpp"

#line 1277 "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 1615 "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 >= 481 )
					yy_c = yy_meta[yy_c];
				}
			yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
			++yy_cp;
			}
		while ( yy_current_state != 480 );
		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 < 126 )
				fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
				         (long)yy_rule_linenum[yy_act], yytext );
			else if ( yy_act == 126 )
				fprintf( stderr, "--accepting default rule (\"%s\")\n",
				         yytext );
			else if ( yy_act == 127 )
				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(FROM);
	YY_BREAK
case 41:
YY_RULE_SETUP
#line 150 "sqlite3_lexer.ll"
return TOKEN(GENERATED);
	YY_BREAK
case 42:
YY_RULE_SETUP
#line 151 "sqlite3_lexer.ll"
return TOKEN(GLOB);
	YY_BREAK
case 43:
YY_RULE_SETUP
#line 152 "sqlite3_lexer.ll"
return TOKEN(IF);
	YY_BREAK
case 44:
YY_RULE_SETUP
#line 153 "sqlite3_lexer.ll"
return TOKEN(IGNORE);
	YY_BREAK
case 45:
YY_RULE_SETUP
#line 154 "sqlite3_lexer.ll"
return TOKEN(IMMEDIATE);
	YY_BREAK
case 46:
YY_RULE_SETUP
#line 155 "sqlite3_lexer.ll"
return TOKEN(IN);
	YY_BREAK
case 47:
YY_RULE_SETUP
#line 156 "sqlite3_lexer.ll"
return TOKEN(INDEX);
	YY_BREAK
case 48:
YY_RULE_SETUP
#line 157 "sqlite3_lexer.ll"
return TOKEN(INITIALLY);
	YY_BREAK
case 49:
YY_RULE_SETUP
#line 158 "sqlite3_lexer.ll"
return TOKEN(INSERT);
	YY_BREAK
case 50:
YY_RULE_SETUP
#line 159 "sqlite3_lexer.ll"
return TOKEN(IS);
	YY_BREAK
case 51:
YY_RULE_SETUP
#line 160 "sqlite3_lexer.ll"
return TOKEN(ISNULL);
	YY_BREAK
case 52:
YY_RULE_SETUP
#line 161 "sqlite3_lexer.ll"
return TOKEN(KEY);
	YY_BREAK
case 53:
YY_RULE_SETUP
#line 162 "sqlite3_lexer.ll"
return TOKEN(LIKE);
	YY_BREAK
case 54:
YY_RULE_SETUP
#line 163 "sqlite3_lexer.ll"
return TOKEN(MATCH);
	YY_BREAK
case 55:
YY_RULE_SETUP
#line 164 "sqlite3_lexer.ll"
return TOKEN(NO);
	YY_BREAK
case 56:
YY_RULE_SETUP
#line 165 "sqlite3_lexer.ll"
return TOKEN(NOT);
	YY_BREAK
case 57:
YY_RULE_SETUP
#line 166 "sqlite3_lexer.ll"
return TOKEN(NOTNULL);
	YY_BREAK
case 58:
YY_RULE_SETUP
#line 167 "sqlite3_lexer.ll"
return TOKEN(NULL);
	YY_BREAK
case 59:
YY_RULE_SETUP
#line 168 "sqlite3_lexer.ll"
return TOKEN(ON);
	YY_BREAK
case 60:
YY_RULE_SETUP
#line 169 "sqlite3_lexer.ll"
return TOKEN(OR);
	YY_BREAK
case 61:
YY_RULE_SETUP
#line 170 "sqlite3_lexer.ll"
return TOKEN(OVER);
	YY_BREAK
case 62:
YY_RULE_SETUP
#line 171 "sqlite3_lexer.ll"
return TOKEN(PARTITION);
	YY_BREAK
case 63:
YY_RULE_SETUP
#line 172 "sqlite3_lexer.ll"
return TOKEN(PRECEDING);
	YY_BREAK
case 64:
YY_RULE_SETUP
#line 173 "sqlite3_lexer.ll"
return TOKEN(PRIMARY);
	YY_BREAK
case 65:
YY_RULE_SETUP
#line 174 "sqlite3_lexer.ll"
return TOKEN(RAISE);
	YY_BREAK
case 66:
YY_RULE_SETUP
#line 175 "sqlite3_lexer.ll"
return TOKEN(RANGE);
	YY_BREAK
case 67:
YY_RULE_SETUP
#line 176 "sqlite3_lexer.ll"
return TOKEN(REFERENCES);
	YY_BREAK
case 68:
YY_RULE_SETUP
#line 177 "sqlite3_lexer.ll"
return TOKEN(REGEXP);
	YY_BREAK
case 69:
YY_RULE_SETUP
#line 178 "sqlite3_lexer.ll"
return TOKEN(REPLACE);
	YY_BREAK
case 70:
YY_RULE_SETUP
#line 179 "sqlite3_lexer.ll"
return TOKEN(RESTRICT);
	YY_BREAK
case 71:
YY_RULE_SETUP
#line 180 "sqlite3_lexer.ll"
return TOKEN(RETURNING);
	YY_BREAK
case 72:
YY_RULE_SETUP
#line 181 "sqlite3_lexer.ll"
return TOKEN(ROLLBACK);
	YY_BREAK
case 73:
YY_RULE_SETUP
#line 182 "sqlite3_lexer.ll"
return TOKEN(ROWID);
	YY_BREAK
case 74:
YY_RULE_SETUP
#line 183 "sqlite3_lexer.ll"
return TOKEN(ROWS);
	YY_BREAK
case 75:
YY_RULE_SETUP
#line 184 "sqlite3_lexer.ll"
return TOKEN(SELECT);
	YY_BREAK
case 76:
YY_RULE_SETUP
#line 185 "sqlite3_lexer.ll"
return TOKEN(SET);
	YY_BREAK
case 77:
YY_RULE_SETUP
#line 186 "sqlite3_lexer.ll"
return TOKEN(STORED);
	YY_BREAK
case 78:
YY_RULE_SETUP
#line 187 "sqlite3_lexer.ll"
return TOKEN(STRICT);
	YY_BREAK
case 79:
YY_RULE_SETUP
#line 188 "sqlite3_lexer.ll"
return TOKEN(TABLE);
	YY_BREAK
case 80:
YY_RULE_SETUP
#line 189 "sqlite3_lexer.ll"
return TOKEN(TEMP);
	YY_BREAK
case 81:
YY_RULE_SETUP
#line 190 "sqlite3_lexer.ll"
return TOKEN(TEMPORARY);
	YY_BREAK
case 82:
YY_RULE_SETUP
#line 191 "sqlite3_lexer.ll"
return TOKEN(THEN);
	YY_BREAK
case 83:
YY_RULE_SETUP
#line 192 "sqlite3_lexer.ll"
return TOKEN(TRUE);
	YY_BREAK
case 84:
YY_RULE_SETUP
#line 193 "sqlite3_lexer.ll"
return TOKEN(UNBOUNDED);
	YY_BREAK
case 85:
YY_RULE_SETUP
#line 194 "sqlite3_lexer.ll"
return TOKEN(UNIQUE);
	YY_BREAK
case 86:
YY_RULE_SETUP
#line 195 "sqlite3_lexer.ll"
return TOKEN(UPDATE);
	YY_BREAK
case 87:
YY_RULE_SETUP
#line 196 "sqlite3_lexer.ll"
return TOKEN(USING);
	YY_BREAK
case 88:
YY_RULE_SETUP
#line 197 "sqlite3_lexer.ll"
return TOKEN(VIRTUAL);
	YY_BREAK
case 89:
YY_RULE_SETUP
#line 198 "sqlite3_lexer.ll"
return TOKEN(WHEN);
	YY_BREAK
case 90:
YY_RULE_SETUP
#line 199 "sqlite3_lexer.ll"
return TOKEN(WHERE);
	YY_BREAK
case 91:
YY_RULE_SETUP
#line 200 "sqlite3_lexer.ll"
return TOKEN(WITHOUT);
	YY_BREAK
case 92:
YY_RULE_SETUP
#line 202 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_IDENTIFIER(yytext, loc);
	YY_BREAK
case 93:
YY_RULE_SETUP
#line 203 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_IDENTIFIER(unquote_string(yytext, '`'), loc);
	YY_BREAK
case 94:
YY_RULE_SETUP
#line 204 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_IDENTIFIER(unquote_string(yytext, '['), loc);
	YY_BREAK
case 95:
YY_RULE_SETUP
#line 205 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_QUOTEDLITERAL(unquote_string(yytext, '"'), loc);
	YY_BREAK
case 96:
YY_RULE_SETUP
#line 206 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_STRINGLITERAL(yytext, loc);
	YY_BREAK
case 97:
YY_RULE_SETUP
#line 207 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_NUMERIC(yytext, loc);
	YY_BREAK
case 98:
YY_RULE_SETUP
#line 208 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_BLOBLITERAL(yytext, loc);
	YY_BREAK
case 99:
YY_RULE_SETUP
#line 209 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_BINDPARAMETER(yytext, loc);
	YY_BREAK
case 100:
YY_RULE_SETUP
#line 210 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_BINDPARAMETER(yytext, loc);
	YY_BREAK
case 101:
YY_RULE_SETUP
#line 212 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_LPAREN(loc);
	YY_BREAK
case 102:
YY_RULE_SETUP
#line 213 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_RPAREN(loc);
	YY_BREAK
case 103:
YY_RULE_SETUP
#line 214 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_DOT(loc);
	YY_BREAK
case 104:
YY_RULE_SETUP
#line 215 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_COMMA(loc);
	YY_BREAK
case 105:
YY_RULE_SETUP
#line 216 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_SEMI(loc);
	YY_BREAK
case 106:
YY_RULE_SETUP
#line 217 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_PLUS(loc);
	YY_BREAK
case 107:
YY_RULE_SETUP
#line 218 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_MINUS(loc);
	YY_BREAK
case 108:
YY_RULE_SETUP
#line 219 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_STAR(loc);
	YY_BREAK
case 109:
YY_RULE_SETUP
#line 220 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_SLASH(loc);
	YY_BREAK
case 110:
YY_RULE_SETUP
#line 221 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_TILDE(loc);
	YY_BREAK
case 111:
YY_RULE_SETUP
#line 222 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_AMPERSAND(loc);
	YY_BREAK
case 112:
YY_RULE_SETUP
#line 223 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_PERCENT(loc);
	YY_BREAK
case 113:
YY_RULE_SETUP
#line 224 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_BITOR(loc);
	YY_BREAK
case 114:
YY_RULE_SETUP
#line 225 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_OROP(loc);
	YY_BREAK
case 115:
YY_RULE_SETUP
#line 226 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_EQUAL(loc);
	YY_BREAK
case 116:
YY_RULE_SETUP
#line 227 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_EQUAL2(loc);
	YY_BREAK
case 117:
YY_RULE_SETUP
#line 228 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_GREATER(loc);
	YY_BREAK
case 118:
YY_RULE_SETUP
#line 229 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_GREATEREQUAL(loc);
	YY_BREAK
case 119:
YY_RULE_SETUP
#line 230 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_LOWER(loc);
	YY_BREAK
case 120:
YY_RULE_SETUP
#line 231 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_LOWEREQUAL(loc);
	YY_BREAK
case 121:
YY_RULE_SETUP
#line 232 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_UNEQUAL(loc);
	YY_BREAK
case 122:
YY_RULE_SETUP
#line 233 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_UNEQUAL2(loc);
	YY_BREAK
case 123:
YY_RULE_SETUP
#line 234 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_BITWISELEFT(loc);
	YY_BREAK
case 124:
YY_RULE_SETUP
#line 235 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_BITWISERIGHT(loc);
	YY_BREAK
case 125:
YY_RULE_SETUP
#line 237 "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 239 "sqlite3_lexer.ll"
return sqlb::parser::parser::make_EOF(loc);
	YY_BREAK
case 126:
YY_RULE_SETUP
#line 241 "sqlite3_lexer.ll"
YY_FATAL_ERROR( "flex scanner jammed" );
	YY_BREAK
#line 2353 "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 >= 481 )
				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 >= 481 )
			yy_c = yy_meta[yy_c];
		}
	yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
	yy_is_jam = (yy_current_state == 480);

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

}
}

