/*
** 2000-05-29
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Driver template for the LEMON parser generator.
**
** The "lemon" program processes an LALR(1) input grammar file, then uses
** this template to construct a parser.  The "lemon" program inserts text
** at each "%%" line.  Also, any "P-a-r-s-e" identifer prefix (without the
** interstitial "-" characters) contained in this template is changed into
** the value of the %name directive from the grammar.  Otherwise, the content
** of this template is copied straight through into the generate parser
** source file.
**
** The following is the concatenation of all %include directives from the
** input grammar file:
*/
#include <stdio.h>
#include <assert.h>
/************ Begin %include sections from the grammar ************************/
#line 52 "parse.y"

#include "sqliteInt.h"

/*
** Disable all error recovery processing in the parser push-down
** automaton.
*/
#define YYNOERRORRECOVERY 1

/*
** Make yytestcase() the same as testcase()
*/
#define yytestcase(X) testcase(X)

/*
** Indicate that sqlite3ParserFree() will never be called with a null
** pointer.
*/
#define YYPARSEFREENEVERNULL 1

/*
** In the amalgamation, the parse.c file generated by lemon and the
** tokenize.c file are concatenated.  In that case, sqlite3RunParser()
** has access to the the size of the yyParser object and so the parser
** engine can be allocated from stack.  In that case, only the
** sqlite3ParserInit() and sqlite3ParserFinalize() routines are invoked
** and the sqlite3ParserAlloc() and sqlite3ParserFree() routines can be
** omitted.
*/
#ifdef SQLITE_AMALGAMATION
# define sqlite3Parser_ENGINEALWAYSONSTACK 1
#endif

/*
** Alternative datatype for the argument to the malloc() routine passed
** into sqlite3ParserAlloc().  The default is size_t.
*/
#define YYMALLOCARGTYPE  u64

/*
** An instance of the following structure describes the event of a
** TRIGGER.  "a" is the event type, one of TK_UPDATE, TK_INSERT,
** TK_DELETE, or TK_INSTEAD.  If the event is of the form
**
**      UPDATE ON (a,b,c)
**
** Then the "b" IdList records the list "a,b,c".
*/
struct TrigEvent { int a; IdList * b; };

struct FrameBound     { int eType; Expr *pExpr; };

/*
** Disable lookaside memory allocation for objects that might be
** shared across database connections.
*/
static void disableLookaside(Parse *pParse){
  sqlite3 *db = pParse->db;
  pParse->disableLookaside++;
  DisableLookaside;
}

#line 463 "parse.y"

  /*
  ** For a compound SELECT statement, make sure p->pPrior->pNext==p for
  ** all elements in the list.  And make sure list length does not exceed
  ** SQLITE_LIMIT_COMPOUND_SELECT.
  */
  static void parserDoubleLinkSelect(Parse *pParse, Select *p){
    assert( p!=0 );
    if( p->pPrior ){
      Select *pNext = 0, *pLoop;
      int mxSelect, cnt = 0;
      for(pLoop=p; pLoop; pNext=pLoop, pLoop=pLoop->pPrior, cnt++){
        pLoop->pNext = pNext;
        pLoop->selFlags |= SF_Compound;
      }
      if( (p->selFlags & SF_MultiValue)==0 && 
        (mxSelect = pParse->db->aLimit[SQLITE_LIMIT_COMPOUND_SELECT])>0 &&
        cnt>mxSelect
      ){
        sqlite3ErrorMsg(pParse, "too many terms in compound SELECT");
      }
    }
  }
#line 955 "parse.y"


  /* Construct a new Expr object from a single identifier.  Use the
  ** new Expr to populate pOut.  Set the span of pOut to be the identifier
  ** that created the expression.
  */
  static Expr *tokenExpr(Parse *pParse, int op, Token t){
    Expr *p = sqlite3DbMallocRawNN(pParse->db, sizeof(Expr)+t.n+1);
    if( p ){
      /* memset(p, 0, sizeof(Expr)); */
      p->op = (u8)op;
      p->affExpr = 0;
      p->flags = EP_Leaf;
      p->iAgg = -1;
      p->pLeft = p->pRight = 0;
      p->x.pList = 0;
      p->pAggInfo = 0;
      p->y.pTab = 0;
      p->op2 = 0;
      p->iTable = 0;
      p->iColumn = 0;
      p->u.zToken = (char*)&p[1];
      memcpy(p->u.zToken, t.z, t.n);
      p->u.zToken[t.n] = 0;
      if( sqlite3Isquote(p->u.zToken[0]) ){
        sqlite3DequoteExpr(p);
      }
#if SQLITE_MAX_EXPR_DEPTH>0
      p->nHeight = 1;
#endif  
      if( IN_RENAME_OBJECT ){
        return (Expr*)sqlite3RenameTokenMap(pParse, (void*)p, &t);
      }
    }
    return p;
  }

#line 1129 "parse.y"

  /* A routine to convert a binary TK_IS or TK_ISNOT expression into a
  ** unary TK_ISNULL or TK_NOTNULL expression. */
  static void binaryToUnaryIfNull(Parse *pParse, Expr *pY, Expr *pA, int op){
    sqlite3 *db = pParse->db;
    if( pA && pY && pY->op==TK_NULL && !IN_RENAME_OBJECT ){
      pA->op = (u8)op;
      sqlite3ExprDelete(db, pA->pRight);
      pA->pRight = 0;
    }
  }
#line 1320 "parse.y"

  /* Add a single new term to an ExprList that is used to store a
  ** list of identifiers.  Report an error if the ID list contains
  ** a COLLATE clause or an ASC or DESC keyword, except ignore the
  ** error while parsing a legacy schema.
  */
  static ExprList *parserAddExprIdListTerm(
    Parse *pParse,
    ExprList *pPrior,
    Token *pIdToken,
    int hasCollate,
    int sortOrder
  ){
    ExprList *p = sqlite3ExprListAppend(pParse, pPrior, 0);
    if( (hasCollate || sortOrder!=SQLITE_SO_UNDEFINED)
        && pParse->db->init.busy==0
    ){
      sqlite3ErrorMsg(pParse, "syntax error after column name \"%.*s\"",
                         pIdToken->n, pIdToken->z);
    }
    sqlite3ExprListSetName(pParse, p, pIdToken, 1);
    return p;
  }
#line 1781 "parse.y"

#if TK_SPAN>255
# error too many tokens in the grammar
#endif
#line 195 "parse.sql"
/**************** End of %include directives **********************************/
/* These constants specify the various numeric values for terminal symbols
** in a format understandable to "makeheaders".  This section is blank unless
** "lemon" is run with the "-m" command-line option.
***************** Begin makeheaders token definitions *************************/
/**************** End makeheaders token definitions ***************************/

/* The next sections is a series of control #defines.
** various aspects of the generated parser.
**    YYCODETYPE         is the data type used to store the integer codes
**                       that represent terminal and non-terminal symbols.
**                       "unsigned char" is used if there are fewer than
**                       256 symbols.  Larger types otherwise.
**    YYNOCODE           is a number of type YYCODETYPE that is not used for
**                       any terminal or nonterminal symbol.
**    YYFALLBACK         If defined, this indicates that one or more tokens
**                       (also known as: "terminal symbols") have fall-back
**                       values which should be used if the original symbol
**                       would not parse.  This permits keywords to sometimes
**                       be used as identifiers, for example.
**    YYACTIONTYPE       is the data type used for "action codes" - numbers
**                       that indicate what to do in response to the next
**                       token.
**    sqlite3ParserTOKENTYPE     is the data type used for minor type for terminal
**                       symbols.  Background: A "minor type" is a semantic
**                       value associated with a terminal or non-terminal
**                       symbols.  For example, for an "ID" terminal symbol,
**                       the minor type might be the name of the identifier.
**                       Each non-terminal can have a different minor type.
**                       Terminal symbols all have the same minor type, though.
**                       This macros defines the minor type for terminal 
**                       symbols.
**    YYMINORTYPE        is the data type used for all minor types.
**                       This is typically a union of many types, one of
**                       which is sqlite3ParserTOKENTYPE.  The entry in the union
**                       for terminal symbols is called "yy0".
**    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If
**                       zero the stack is dynamically sized using realloc()
**    sqlite3ParserARG_SDECL     A static variable declaration for the %extra_argument
**    sqlite3ParserARG_PDECL     A parameter declaration for the %extra_argument
**    sqlite3ParserARG_PARAM     Code to pass %extra_argument as a subroutine parameter
**    sqlite3ParserARG_STORE     Code to store %extra_argument into yypParser
**    sqlite3ParserARG_FETCH     Code to extract %extra_argument from yypParser
**    sqlite3ParserCTX_*         As sqlite3ParserARG_ except for %extra_context
**    YYERRORSYMBOL      is the code number of the error symbol.  If not
**                       defined, then do no error processing.
**    YYNSTATE           the combined number of states.
**    YYNRULE            the number of rules in the grammar
**    YYNTOKEN           Number of terminal symbols
**    YY_MAX_SHIFT       Maximum value for shift actions
**    YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions
**    YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions
**    YY_ERROR_ACTION    The yy_action[] code for syntax error
**    YY_ACCEPT_ACTION   The yy_action[] code for accept
**    YY_NO_ACTION       The yy_action[] code for no-op
**    YY_MIN_REDUCE      Minimum value for reduce actions
**    YY_MAX_REDUCE      Maximum value for reduce actions
*/
#ifndef INTERFACE
# define INTERFACE 1
#endif
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned short int
#define YYNOCODE 310
#define YYACTIONTYPE unsigned short int
#define YYWILDCARD 100
#define sqlite3ParserTOKENTYPE Token
typedef union {
  int yyinit;
  sqlite3ParserTOKENTYPE yy0;
  SrcList* yy47;
  u8 yy58;
  struct FrameBound yy77;
  With* yy131;
  int yy192;
  Expr* yy202;
  struct {int value; int mask;} yy207;
  struct TrigEvent yy230;
  ExprList* yy242;
  Window* yy303;
  Upsert* yy318;
  const char* yy436;
  TriggerStep* yy447;
  Select* yy539;
  IdList* yy600;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
#endif
#define sqlite3ParserARG_SDECL
#define sqlite3ParserARG_PDECL
#define sqlite3ParserARG_PARAM
#define sqlite3ParserARG_FETCH
#define sqlite3ParserARG_STORE
#define sqlite3ParserCTX_SDECL Parse *pParse;
#define sqlite3ParserCTX_PDECL ,Parse *pParse
#define sqlite3ParserCTX_PARAM ,pParse
#define sqlite3ParserCTX_FETCH Parse *pParse=yypParser->pParse;
#define sqlite3ParserCTX_STORE yypParser->pParse=pParse;
#define YYFALLBACK 1
#define YYNSTATE             551
#define YYNRULE              385
#define YYNRULE_WITH_ACTION  325
#define YYNTOKEN             181
#define YY_MAX_SHIFT         550
#define YY_MIN_SHIFTREDUCE   801
#define YY_MAX_SHIFTREDUCE   1185
#define YY_ERROR_ACTION      1186
#define YY_ACCEPT_ACTION     1187
#define YY_NO_ACTION         1188
#define YY_MIN_REDUCE        1189
#define YY_MAX_REDUCE        1573
/************* End control #defines *******************************************/
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))

/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
**
** Applications can choose to define yytestcase() in the %include section
** to a macro that can assist in verifying code coverage.  For production
** code the yytestcase() macro should be turned off.  But it is useful
** for testing.
*/
#ifndef yytestcase
# define yytestcase(X)
#endif


/* Next are the tables used to determine what action to take based on the
** current state and lookahead token.  These tables are used to implement
** functions that take a state number and lookahead value and return an
** action integer.  
**
** Suppose the action integer is N.  Then the action is determined as
** follows
**
**   0 <= N <= YY_MAX_SHIFT             Shift N.  That is, push the lookahead
**                                      token onto the stack and goto state N.
**
**   N between YY_MIN_SHIFTREDUCE       Shift to an arbitrary state then
**     and YY_MAX_SHIFTREDUCE           reduce by rule N-YY_MIN_SHIFTREDUCE.
**
**   N == YY_ERROR_ACTION               A syntax error has occurred.
**
**   N == YY_ACCEPT_ACTION              The parser accepts its input.
**
**   N == YY_NO_ACTION                  No such action.  Denotes unused
**                                      slots in the yy_action[] table.
**
**   N between YY_MIN_REDUCE            Reduce by rule N-YY_MIN_REDUCE
**     and YY_MAX_REDUCE
**
** The action table is constructed as a single large table named yy_action[].
** Given state S and lookahead X, the action is computed as either:
**
**    (A)   N = yy_action[ yy_shift_ofst[S] + X ]
**    (B)   N = yy_default[S]
**
** The (A) formula is preferred.  The B formula is used instead if
** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X.
**
** The formulas above are for computing the action when the lookahead is
** a terminal symbol.  If the lookahead is a non-terminal (as occurs after
** a reduce action) then the yy_reduce_ofst[] array is used in place of
** the yy_shift_ofst[] array.
**
** The following are the tables generated in this section:
**
**  yy_action[]        A single table containing all actions.
**  yy_lookahead[]     A table containing the lookahead for each entry in
**                     yy_action.  Used to detect hash collisions.
**  yy_shift_ofst[]    For each state, the offset into yy_action for
**                     shifting terminals.
**  yy_reduce_ofst[]   For each state, the offset into yy_action for
**                     shifting non-terminals after a reduce.
**  yy_default[]       Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (1958)
static const YYACTIONTYPE yy_action[] = {
 /*     0 */   544, 1220,  544,  449, 1258,  544, 1237,  544,  114,  111,
 /*    10 */   211,  544, 1535,  544, 1258,  521,  114,  111,  211,  390,
 /*    20 */  1230,  342,   42,   42,   42,   42, 1223,   42,   42,   71,
 /*    30 */    71,  935, 1222,   71,   71,   71,   71, 1460, 1491,  936,
 /*    40 */   818,  451,    6,  121,  122,  112, 1163, 1163, 1004, 1007,
 /*    50 */   997,  997,  119,  119,  120,  120,  120,  120, 1541,  390,
 /*    60 */  1356, 1515,  550,    2, 1191,  194,  526,  434,  143,  291,
 /*    70 */   526,  136,  526,  369,  261,  502,  272,  383, 1271,  525,
 /*    80 */   501,  491,  164,  121,  122,  112, 1163, 1163, 1004, 1007,
 /*    90 */   997,  997,  119,  119,  120,  120,  120,  120, 1356,  440,
 /*   100 */  1512,  118,  118,  118,  118,  117,  117,  116,  116,  116,
 /*   110 */   115,  422,  266,  266,  266,  266, 1496,  356, 1498,  433,
 /*   120 */   355, 1496,  515,  522, 1483,  541, 1112,  541, 1112,  390,
 /*   130 */   403,  241,  208,  114,  111,  211,   98,  290,  535,  221,
 /*   140 */  1027,  118,  118,  118,  118,  117,  117,  116,  116,  116,
 /*   150 */   115,  422, 1140,  121,  122,  112, 1163, 1163, 1004, 1007,
 /*   160 */   997,  997,  119,  119,  120,  120,  120,  120,  404,  426,
 /*   170 */   117,  117,  116,  116,  116,  115,  422, 1416,  466,  123,
 /*   180 */   118,  118,  118,  118,  117,  117,  116,  116,  116,  115,
 /*   190 */   422,  116,  116,  116,  115,  422,  538,  538,  538,  390,
 /*   200 */   503,  120,  120,  120,  120,  113, 1049, 1140, 1141, 1142,
 /*   210 */  1049,  118,  118,  118,  118,  117,  117,  116,  116,  116,
 /*   220 */   115,  422, 1459,  121,  122,  112, 1163, 1163, 1004, 1007,
 /*   230 */   997,  997,  119,  119,  120,  120,  120,  120,  390,  442,
 /*   240 */   314,   83,  461,   81,  357,  380, 1140,   80,  118,  118,
 /*   250 */   118,  118,  117,  117,  116,  116,  116,  115,  422,  179,
 /*   260 */   432,  422,  121,  122,  112, 1163, 1163, 1004, 1007,  997,
 /*   270 */   997,  119,  119,  120,  120,  120,  120,  432,  431,  266,
 /*   280 */   266,  118,  118,  118,  118,  117,  117,  116,  116,  116,
 /*   290 */   115,  422,  541, 1107,  901,  504, 1140,  114,  111,  211,
 /*   300 */  1429, 1140, 1141, 1142,  206,  489, 1107,  390,  447, 1107,
 /*   310 */   543,  328,  120,  120,  120,  120,  298, 1429, 1431,   17,
 /*   320 */   118,  118,  118,  118,  117,  117,  116,  116,  116,  115,
 /*   330 */   422,  121,  122,  112, 1163, 1163, 1004, 1007,  997,  997,
 /*   340 */   119,  119,  120,  120,  120,  120,  390, 1356,  432, 1140,
 /*   350 */   480, 1140, 1141, 1142,  994,  994, 1005, 1008,  443,  118,
 /*   360 */   118,  118,  118,  117,  117,  116,  116,  116,  115,  422,
 /*   370 */   121,  122,  112, 1163, 1163, 1004, 1007,  997,  997,  119,
 /*   380 */   119,  120,  120,  120,  120, 1052, 1052,  463, 1429,  118,
 /*   390 */   118,  118,  118,  117,  117,  116,  116,  116,  115,  422,
 /*   400 */  1140,  449,  544, 1424, 1140, 1141, 1142,  233,  964, 1140,
 /*   410 */   479,  476,  475,  171,  358,  390,  164,  405,  412,  840,
 /*   420 */   474,  164,  185,  332,   71,   71, 1241,  998,  118,  118,
 /*   430 */   118,  118,  117,  117,  116,  116,  116,  115,  422,  121,
 /*   440 */   122,  112, 1163, 1163, 1004, 1007,  997,  997,  119,  119,
 /*   450 */   120,  120,  120,  120,  390, 1140, 1141, 1142,  833,   12,
 /*   460 */   313,  507,  163,  354, 1140, 1141, 1142,  114,  111,  211,
 /*   470 */   506,  290,  535,  544,  276,  180,  290,  535,  121,  122,
 /*   480 */   112, 1163, 1163, 1004, 1007,  997,  997,  119,  119,  120,
 /*   490 */   120,  120,  120,  343,  482,   71,   71,  118,  118,  118,
 /*   500 */   118,  117,  117,  116,  116,  116,  115,  422, 1140,  209,
 /*   510 */   409,  521, 1140, 1107, 1569,  376,  252,  269,  340,  485,
 /*   520 */   335,  484,  238,  390,  511,  362, 1107, 1125,  331, 1107,
 /*   530 */   191,  407,  286,   32,  455,  441,  118,  118,  118,  118,
 /*   540 */   117,  117,  116,  116,  116,  115,  422,  121,  122,  112,
 /*   550 */  1163, 1163, 1004, 1007,  997,  997,  119,  119,  120,  120,
 /*   560 */   120,  120,  390, 1140, 1141, 1142,  985, 1140, 1141, 1142,
 /*   570 */  1140,  233,  490, 1490,  479,  476,  475,    6,  163,  544,
 /*   580 */   510,  544,  115,  422,  474,    5,  121,  122,  112, 1163,
 /*   590 */  1163, 1004, 1007,  997,  997,  119,  119,  120,  120,  120,
 /*   600 */   120,   13,   13,   13,   13,  118,  118,  118,  118,  117,
 /*   610 */   117,  116,  116,  116,  115,  422,  401,  500,  406,  544,
 /*   620 */  1484,  542, 1140,  890,  890, 1140, 1141, 1142, 1471, 1140,
 /*   630 */   275,  390,  806,  807,  808,  969,  420,  420,  420,   16,
 /*   640 */    16,   55,   55, 1240,  118,  118,  118,  118,  117,  117,
 /*   650 */   116,  116,  116,  115,  422,  121,  122,  112, 1163, 1163,
 /*   660 */  1004, 1007,  997,  997,  119,  119,  120,  120,  120,  120,
 /*   670 */   390, 1187,    1,    1,  550,    2, 1191, 1140, 1141, 1142,
 /*   680 */   194,  291,  896,  136, 1140, 1141, 1142,  895,  519, 1490,
 /*   690 */  1271,    3,  378,    6,  121,  122,  112, 1163, 1163, 1004,
 /*   700 */  1007,  997,  997,  119,  119,  120,  120,  120,  120,  856,
 /*   710 */   544,  922,  544,  118,  118,  118,  118,  117,  117,  116,
 /*   720 */   116,  116,  115,  422,  266,  266, 1090, 1567, 1140,  549,
 /*   730 */  1567, 1191,   13,   13,   13,   13,  291,  541,  136,  390,
 /*   740 */   483,  419,  418,  964,  342, 1271,  466,  408,  857,  279,
 /*   750 */   140,  221,  118,  118,  118,  118,  117,  117,  116,  116,
 /*   760 */   116,  115,  422,  121,  122,  112, 1163, 1163, 1004, 1007,
 /*   770 */   997,  997,  119,  119,  120,  120,  120,  120,  544,  266,
 /*   780 */   266,  426,  390, 1140, 1141, 1142, 1170,  828, 1170,  466,
 /*   790 */   429,  145,  541, 1144,  399,  313,  437,  301,  836, 1488,
 /*   800 */    71,   71,  410,    6, 1088,  471,  221,  100,  112, 1163,
 /*   810 */  1163, 1004, 1007,  997,  997,  119,  119,  120,  120,  120,
 /*   820 */   120,  118,  118,  118,  118,  117,  117,  116,  116,  116,
 /*   830 */   115,  422,  237, 1423,  544,  449,  426,  287,  984,  544,
 /*   840 */   236,  235,  234,  828,   97,  527,  427, 1263, 1263, 1144,
 /*   850 */   492,  306,  428,  836,  975,  544,   71,   71,  974, 1239,
 /*   860 */   544,   51,   51,  300,  118,  118,  118,  118,  117,  117,
 /*   870 */   116,  116,  116,  115,  422,  194,  103,   70,   70,  266,
 /*   880 */   266,  544,   71,   71,  266,  266,   30,  389,  342,  974,
 /*   890 */   974,  976,  541,  526, 1107,  326,  390,  541,  493,  395,
 /*   900 */  1468,  195,  528,   13,   13, 1356,  240, 1107,  277,  280,
 /*   910 */  1107,  280,  303,  455,  305,  331,  390,   31,  188,  417,
 /*   920 */   121,  122,  112, 1163, 1163, 1004, 1007,  997,  997,  119,
 /*   930 */   119,  120,  120,  120,  120,  142,  390,  363,  455,  984,
 /*   940 */   121,  122,  112, 1163, 1163, 1004, 1007,  997,  997,  119,
 /*   950 */   119,  120,  120,  120,  120,  975,  321, 1140,  324,  974,
 /*   960 */   121,  110,  112, 1163, 1163, 1004, 1007,  997,  997,  119,
 /*   970 */   119,  120,  120,  120,  120,  462,  375, 1183,  118,  118,
 /*   980 */   118,  118,  117,  117,  116,  116,  116,  115,  422, 1140,
 /*   990 */   974,  974,  976,  304,    9,  364,  244,  360,  118,  118,
 /*  1000 */   118,  118,  117,  117,  116,  116,  116,  115,  422,  312,
 /*  1010 */   544,  342, 1140, 1141, 1142,  299,  290,  535,  118,  118,
 /*  1020 */   118,  118,  117,  117,  116,  116,  116,  115,  422, 1261,
 /*  1030 */  1261, 1161,   13,   13,  278,  419,  418,  466,  390,  921,
 /*  1040 */   260,  260,  289, 1167, 1140, 1141, 1142,  189, 1169,  266,
 /*  1050 */   266,  466,  388,  541, 1184,  544, 1168,  263,  144,  487,
 /*  1060 */   920,  544,  541,  122,  112, 1163, 1163, 1004, 1007,  997,
 /*  1070 */   997,  119,  119,  120,  120,  120,  120,   71,   71, 1140,
 /*  1080 */  1170, 1270, 1170,   13,   13,  896, 1068, 1161,  544,  466,
 /*  1090 */   895,  107,  536, 1489,    4, 1266, 1107,    6,  523, 1047,
 /*  1100 */    12, 1069, 1090, 1568,  311,  453, 1568,  518,  539, 1107,
 /*  1110 */    56,   56, 1107, 1487,  421, 1356, 1070,    6,  343,  285,
 /*  1120 */   118,  118,  118,  118,  117,  117,  116,  116,  116,  115,
 /*  1130 */   422,  423, 1269,  319, 1140, 1141, 1142,  876,  266,  266,
 /*  1140 */  1275,  107,  536,  533,    4, 1486,  293,  877, 1209,    6,
 /*  1150 */   210,  541,  541,  164, 1540,  494,  414,  865,  539,  267,
 /*  1160 */   267, 1212,  396,  509,  497,  204,  266,  266,  394,  529,
 /*  1170 */     8,  984,  541,  517,  544,  920,  456,  105,  105,  541,
 /*  1180 */  1088,  423,  266,  266,  106,  415,  423,  546,  545,  266,
 /*  1190 */   266,  974,  516,  533, 1371,  541,   15,   15,  266,  266,
 /*  1200 */   454, 1118,  541,  266,  266, 1068, 1370,  513,  290,  535,
 /*  1210 */   544,  541,  512,   97,  442,  314,  541,  544,  920,  125,
 /*  1220 */  1069,  984,  974,  974,  976,  977,   27,  105,  105,  399,
 /*  1230 */   341, 1509,   44,   44,  106, 1070,  423,  546,  545,   57,
 /*  1240 */    57,  974,  341, 1509,  107,  536,  544,    4,  460,  399,
 /*  1250 */   214, 1118,  457,  294,  375, 1089,  532,  297,  544,  537,
 /*  1260 */   396,  539,  290,  535,  104,  244,  102,  524,   58,   58,
 /*  1270 */   544,  109,  974,  974,  976,  977,   27, 1514, 1129,  425,
 /*  1280 */    59,   59,  270,  237,  423,  138,   95,  373,  373,  372,
 /*  1290 */   255,  370,   60,   60,  815, 1178,  533,  544,  273,  544,
 /*  1300 */  1161,  843,  387,  386,  544, 1307,  544,  215,  210,  296,
 /*  1310 */   513,  847,  544,  265,  208,  514, 1306,  295,  274,   61,
 /*  1320 */    61,   62,   62,  436,  984, 1160,   45,   45,   46,   46,
 /*  1330 */   105,  105, 1184,  920,   47,   47, 1474,  106,  544,  423,
 /*  1340 */   546,  545,  218,  544,  974,  935, 1085,  217,  544,  377,
 /*  1350 */   395,  107,  536,  936,    4,  156, 1161,  843,  158,  544,
 /*  1360 */    49,   49,  141,  544,   38,   50,   50,  544,  539,  307,
 /*  1370 */    63,   63,  544, 1448,  216,  974,  974,  976,  977,   27,
 /*  1380 */   444,   64,   64,  544, 1447,   65,   65,  544,  524,   14,
 /*  1390 */    14,  423,  458,  544,   66,   66,  310,  544,  316,   97,
 /*  1400 */  1034,  544,  961,  533,  268,  127,  127,  544,  391,   67,
 /*  1410 */    67,  544,  978,  290,  535,   52,   52,  513,  544,   68,
 /*  1420 */    68, 1294,  512,   69,   69,  397,  165,  855,  854,   53,
 /*  1430 */    53,  984,  966,  151,  151,  243,  430,  105,  105,  199,
 /*  1440 */   152,  152,  448, 1303,  106,  243,  423,  546,  545, 1129,
 /*  1450 */   425,  974,  320,  270,  862,  863, 1034,  220,  373,  373,
 /*  1460 */   372,  255,  370,  450,  323,  815,  243,  544,  978,  544,
 /*  1470 */   107,  536,  544,    4,  544,  938,  939,  325,  215, 1046,
 /*  1480 */   296, 1046,  974,  974,  976,  977,   27,  539,  295,   76,
 /*  1490 */    76,   54,   54,  327,   72,   72,  128,  128, 1503, 1254,
 /*  1500 */   107,  536,  544,    4, 1045,  544, 1045,  531, 1238,  544,
 /*  1510 */   423,  544,  315,  334,  544,   97,  544,  539,  217,  544,
 /*  1520 */   472, 1528,  533,  239,   73,   73,  156,  129,  129,  158,
 /*  1530 */   467,  130,  130,  126,  126,  344,  150,  150,  149,  149,
 /*  1540 */   423,  134,  134,  329, 1030,  216,   97,  239,  929,  345,
 /*  1550 */   984,  243,  533, 1315,  339,  544,  105,  105,  900, 1355,
 /*  1560 */   544, 1290,  258,  106,  338,  423,  546,  545,  544, 1301,
 /*  1570 */   974,  893,   99,  536,  109,    4,  544,  133,  133,  391,
 /*  1580 */   984,  197,  131,  131,  290,  535,  105,  105,  530,  539,
 /*  1590 */   132,  132, 1361,  106, 1219,  423,  546,  545,   75,   75,
 /*  1600 */   974,  974,  974,  976,  977,   27,  544,  430,  826, 1211,
 /*  1610 */   894,  139,  423,  109,  544, 1200, 1199, 1201, 1522,  544,
 /*  1620 */   201,  544,   11,  374,  533, 1287,  347,  349,   77,   77,
 /*  1630 */  1340,  974,  974,  976,  977,   27,   74,   74,  351,  213,
 /*  1640 */   435,   43,   43,   48,   48,  302,  477,  309, 1348,  382,
 /*  1650 */   353,  452,  984,  337, 1237, 1420, 1419,  205,  105,  105,
 /*  1660 */   192,  367,  193,  534, 1525,  106, 1178,  423,  546,  545,
 /*  1670 */   247,  167,  974,  270, 1467,  200, 1465, 1175,  373,  373,
 /*  1680 */   372,  255,  370,  398,   79,  815,   83,   82, 1425,  446,
 /*  1690 */   161,  177,  169,   95, 1337,  438,  172,  173,  215,  174,
 /*  1700 */   296,  175,   35,  974,  974,  976,  977,   27,  295, 1345,
 /*  1710 */   439,  470,  223,   36,  379,  445, 1414,  381,  459, 1351,
 /*  1720 */   181,  227,   88,  465,  259,  229, 1436,  318,  186,  468,
 /*  1730 */   322,  230,  384, 1202,  231,  486, 1257, 1256,  217,  411,
 /*  1740 */  1255, 1248,   90,  847,  206,  413,  156,  505, 1539,  158,
 /*  1750 */  1226, 1538,  283, 1508, 1227,  336,  385,  284, 1225,  496,
 /*  1760 */  1537, 1298,   94,  346,  348,  216, 1247,  499, 1299,  245,
 /*  1770 */   246, 1297,  416,  350, 1494,  124, 1493,   10,  524,  361,
 /*  1780 */  1400,  101,   96,  288,  508,  253, 1135, 1208,   34, 1296,
 /*  1790 */   547,  254,  256,  257,  392,  548, 1197, 1192,  359,  391,
 /*  1800 */  1280, 1279,  196,  365,  290,  535,  366,  352, 1452, 1322,
 /*  1810 */  1321, 1453,  153,  137,  281,  154,  802,  424,  155, 1451,
 /*  1820 */  1450,  198,  292,  202,  203,   78,  212,  430,  271,  135,
 /*  1830 */  1044, 1042,  958,  168,  219,  157,  170,  879,  308,  222,
 /*  1840 */  1058,  176,  159,  962,  400,   84,  402,  178,   85,   86,
 /*  1850 */    87,  166,  160,  393, 1061,  224,  225, 1057,  146,   18,
 /*  1860 */   226,  317, 1050, 1172,  243,  464,  182,  228,   37,  183,
 /*  1870 */   817,  469,  338,  232,  330,  481,  184,   89,  845,   19,
 /*  1880 */    20,   92,  473,  478,  333,   91,  162,  858,  147,  488,
 /*  1890 */   282, 1123,  148, 1010,  928, 1093,   39,   93,   40,  495,
 /*  1900 */  1094,  187,  498,  207,  262,  264,  923,  242, 1109,  109,
 /*  1910 */  1113, 1111, 1097,   33,   21, 1117,  520, 1025,   22,   23,
 /*  1920 */    24, 1116,   25,  190,   97, 1011, 1009,   26, 1013, 1067,
 /*  1930 */   248,    7, 1066,  249, 1014,   28,   41,  889,  979,  827,
 /*  1940 */   108,   29,  250,  540,  251, 1530,  371,  368, 1131, 1130,
 /*  1950 */  1188, 1188, 1188, 1188, 1188, 1188, 1188, 1529,
};
static const YYCODETYPE yy_lookahead[] = {
 /*     0 */   189,  211,  189,  189,  218,  189,  220,  189,  267,  268,
 /*    10 */   269,  189,  210,  189,  228,  189,  267,  268,  269,   19,
 /*    20 */   218,  189,  211,  212,  211,  212,  211,  211,  212,  211,
 /*    30 */   212,   31,  211,  211,  212,  211,  212,  288,  300,   39,
 /*    40 */    21,  189,  304,   43,   44,   45,   46,   47,   48,   49,
 /*    50 */    50,   51,   52,   53,   54,   55,   56,   57,  225,   19,
 /*    60 */   189,  183,  184,  185,  186,  189,  248,  263,  236,  191,
 /*    70 */   248,  193,  248,  197,  208,  257,  262,  201,  200,  257,
 /*    80 */   200,  257,   81,   43,   44,   45,   46,   47,   48,   49,
 /*    90 */    50,   51,   52,   53,   54,   55,   56,   57,  189,   80,
 /*   100 */   189,  101,  102,  103,  104,  105,  106,  107,  108,  109,
 /*   110 */   110,  111,  234,  235,  234,  235,  305,  306,  305,  118,
 /*   120 */   307,  305,  306,  297,  298,  247,   86,  247,   88,   19,
 /*   130 */   259,  251,  252,  267,  268,  269,   26,  136,  137,  261,
 /*   140 */   121,  101,  102,  103,  104,  105,  106,  107,  108,  109,
 /*   150 */   110,  111,   59,   43,   44,   45,   46,   47,   48,   49,
 /*   160 */    50,   51,   52,   53,   54,   55,   56,   57,  259,  291,
 /*   170 */   105,  106,  107,  108,  109,  110,  111,  158,  189,   69,
 /*   180 */   101,  102,  103,  104,  105,  106,  107,  108,  109,  110,
 /*   190 */   111,  107,  108,  109,  110,  111,  205,  206,  207,   19,
 /*   200 */    19,   54,   55,   56,   57,   58,   29,  114,  115,  116,
 /*   210 */    33,  101,  102,  103,  104,  105,  106,  107,  108,  109,
 /*   220 */   110,  111,  233,   43,   44,   45,   46,   47,   48,   49,
 /*   230 */    50,   51,   52,   53,   54,   55,   56,   57,   19,  126,
 /*   240 */   127,  148,   65,   24,  214,  200,   59,   67,  101,  102,
 /*   250 */   103,  104,  105,  106,  107,  108,  109,  110,  111,   22,
 /*   260 */   189,  111,   43,   44,   45,   46,   47,   48,   49,   50,
 /*   270 */    51,   52,   53,   54,   55,   56,   57,  206,  207,  234,
 /*   280 */   235,  101,  102,  103,  104,  105,  106,  107,  108,  109,
 /*   290 */   110,  111,  247,   76,  107,  114,   59,  267,  268,  269,
 /*   300 */   189,  114,  115,  116,  162,  163,   89,   19,  263,   92,
 /*   310 */   189,   23,   54,   55,   56,   57,  189,  206,  207,   22,
 /*   320 */   101,  102,  103,  104,  105,  106,  107,  108,  109,  110,
 /*   330 */   111,   43,   44,   45,   46,   47,   48,   49,   50,   51,
 /*   340 */    52,   53,   54,   55,   56,   57,   19,  189,  277,   59,
 /*   350 */    23,  114,  115,  116,   46,   47,   48,   49,   61,  101,
 /*   360 */   102,  103,  104,  105,  106,  107,  108,  109,  110,  111,
 /*   370 */    43,   44,   45,   46,   47,   48,   49,   50,   51,   52,
 /*   380 */    53,   54,   55,   56,   57,  125,  126,  127,  277,  101,
 /*   390 */   102,  103,  104,  105,  106,  107,  108,  109,  110,  111,
 /*   400 */    59,  189,  189,  276,  114,  115,  116,  117,   73,   59,
 /*   410 */   120,  121,  122,   72,  214,   19,   81,  259,   19,   23,
 /*   420 */   130,   81,   72,   24,  211,  212,  221,  119,  101,  102,
 /*   430 */   103,  104,  105,  106,  107,  108,  109,  110,  111,   43,
 /*   440 */    44,   45,   46,   47,   48,   49,   50,   51,   52,   53,
 /*   450 */    54,   55,   56,   57,   19,  114,  115,  116,   23,  208,
 /*   460 */   125,  248,  189,  189,  114,  115,  116,  267,  268,  269,
 /*   470 */   189,  136,  137,  189,  262,   22,  136,  137,   43,   44,
 /*   480 */    45,   46,   47,   48,   49,   50,   51,   52,   53,   54,
 /*   490 */    55,   56,   57,  189,   95,  211,  212,  101,  102,  103,
 /*   500 */   104,  105,  106,  107,  108,  109,  110,  111,   59,  189,
 /*   510 */   111,  189,   59,   76,  294,  295,  117,  118,  119,  120,
 /*   520 */   121,  122,  123,   19,   87,  189,   89,   23,  129,   92,
 /*   530 */   279,  227,  248,   22,  189,  284,  101,  102,  103,  104,
 /*   540 */   105,  106,  107,  108,  109,  110,  111,   43,   44,   45,
 /*   550 */    46,   47,   48,   49,   50,   51,   52,   53,   54,   55,
 /*   560 */    56,   57,   19,  114,  115,  116,   23,  114,  115,  116,
 /*   570 */    59,  117,  299,  300,  120,  121,  122,  304,  189,  189,
 /*   580 */   143,  189,  110,  111,  130,   22,   43,   44,   45,   46,
 /*   590 */    47,   48,   49,   50,   51,   52,   53,   54,   55,   56,
 /*   600 */    57,  211,  212,  211,  212,  101,  102,  103,  104,  105,
 /*   610 */   106,  107,  108,  109,  110,  111,  226,  189,  226,  189,
 /*   620 */   298,  132,   59,  134,  135,  114,  115,  116,  189,   59,
 /*   630 */   285,   19,    7,    8,    9,   23,  205,  206,  207,  211,
 /*   640 */   212,  211,  212,  221,  101,  102,  103,  104,  105,  106,
 /*   650 */   107,  108,  109,  110,  111,   43,   44,   45,   46,   47,
 /*   660 */    48,   49,   50,   51,   52,   53,   54,   55,   56,   57,
 /*   670 */    19,  181,  182,  183,  184,  185,  186,  114,  115,  116,
 /*   680 */   189,  191,  133,  193,  114,  115,  116,  138,  299,  300,
 /*   690 */   200,   22,  201,  304,   43,   44,   45,   46,   47,   48,
 /*   700 */    49,   50,   51,   52,   53,   54,   55,   56,   57,   35,
 /*   710 */   189,  141,  189,  101,  102,  103,  104,  105,  106,  107,
 /*   720 */   108,  109,  110,  111,  234,  235,   22,   23,   59,  184,
 /*   730 */    26,  186,  211,  212,  211,  212,  191,  247,  193,   19,
 /*   740 */    66,  105,  106,   73,  189,  200,  189,  226,   74,  226,
 /*   750 */    22,  261,  101,  102,  103,  104,  105,  106,  107,  108,
 /*   760 */   109,  110,  111,   43,   44,   45,   46,   47,   48,   49,
 /*   770 */    50,   51,   52,   53,   54,   55,   56,   57,  189,  234,
 /*   780 */   235,  291,   19,  114,  115,  116,  150,   59,  152,  189,
 /*   790 */   233,  236,  247,   59,  189,  125,  126,  127,   59,  300,
 /*   800 */   211,  212,  128,  304,  100,   19,  261,  156,   45,   46,
 /*   810 */    47,   48,   49,   50,   51,   52,   53,   54,   55,   56,
 /*   820 */    57,  101,  102,  103,  104,  105,  106,  107,  108,  109,
 /*   830 */   110,  111,   46,  233,  189,  189,  291,  248,   99,  189,
 /*   840 */   125,  126,  127,  115,   26,  200,  289,  230,  231,  115,
 /*   850 */   200,   16,  189,  114,  115,  189,  211,  212,  119,  221,
 /*   860 */   189,  211,  212,  258,  101,  102,  103,  104,  105,  106,
 /*   870 */   107,  108,  109,  110,  111,  189,  156,  211,  212,  234,
 /*   880 */   235,  189,  211,  212,  234,  235,   22,  201,  189,  150,
 /*   890 */   151,  152,  247,  248,   76,   16,   19,  247,  248,  113,
 /*   900 */   189,   24,  257,  211,  212,  189,   26,   89,  262,  223,
 /*   910 */    92,  225,   77,  189,   79,  129,   19,   53,  226,  248,
 /*   920 */    43,   44,   45,   46,   47,   48,   49,   50,   51,   52,
 /*   930 */    53,   54,   55,   56,   57,  236,   19,  271,  189,   99,
 /*   940 */    43,   44,   45,   46,   47,   48,   49,   50,   51,   52,
 /*   950 */    53,   54,   55,   56,   57,  115,   77,   59,   79,  119,
 /*   960 */    43,   44,   45,   46,   47,   48,   49,   50,   51,   52,
 /*   970 */    53,   54,   55,   56,   57,  259,   22,   23,  101,  102,
 /*   980 */   103,  104,  105,  106,  107,  108,  109,  110,  111,   59,
 /*   990 */   150,  151,  152,  158,   22,  244,   24,  246,  101,  102,
 /*  1000 */   103,  104,  105,  106,  107,  108,  109,  110,  111,  285,
 /*  1010 */   189,  189,  114,  115,  116,  200,  136,  137,  101,  102,
 /*  1020 */   103,  104,  105,  106,  107,  108,  109,  110,  111,  230,
 /*  1030 */   231,   59,  211,  212,  285,  105,  106,  189,   19,  141,
 /*  1040 */   234,  235,  239,  113,  114,  115,  116,  226,  118,  234,
 /*  1050 */   235,  189,  249,  247,  100,  189,  126,   23,  236,  107,
 /*  1060 */    26,  189,  247,   44,   45,   46,   47,   48,   49,   50,
 /*  1070 */    51,   52,   53,   54,   55,   56,   57,  211,  212,   59,
 /*  1080 */   150,  233,  152,  211,  212,  133,   12,  115,  189,  189,
 /*  1090 */   138,   19,   20,  300,   22,  233,   76,  304,  226,   11,
 /*  1100 */   208,   27,   22,   23,  200,   19,   26,   87,   36,   89,
 /*  1110 */   211,  212,   92,  300,  248,  189,   42,  304,  189,  250,
 /*  1120 */   101,  102,  103,  104,  105,  106,  107,  108,  109,  110,
 /*  1130 */   111,   59,  200,  233,  114,  115,  116,   63,  234,  235,
 /*  1140 */   235,   19,   20,   71,   22,  300,  189,   73,  200,  304,
 /*  1150 */   116,  247,  247,   81,   23,  200,  227,   26,   36,  234,
 /*  1160 */   235,  203,  204,  143,  200,   26,  234,  235,  194,  200,
 /*  1170 */    48,   99,  247,   66,  189,  141,  284,  105,  106,  247,
 /*  1180 */   100,   59,  234,  235,  112,  259,  114,  115,  116,  234,
 /*  1190 */   235,  119,   85,   71,  266,  247,  211,  212,  234,  235,
 /*  1200 */   114,   94,  247,  234,  235,   12,  266,   85,  136,  137,
 /*  1210 */   189,  247,   90,   26,  126,  127,  247,  189,   26,   22,
 /*  1220 */    27,   99,  150,  151,  152,  153,  154,  105,  106,  189,
 /*  1230 */   302,  303,  211,  212,  112,   42,  114,  115,  116,  211,
 /*  1240 */   212,  119,  302,  303,   19,   20,  189,   22,  274,  189,
 /*  1250 */    15,  144,  278,  189,   22,   23,   63,  189,  189,  203,
 /*  1260 */   204,   36,  136,  137,  155,   24,  157,  143,  211,  212,
 /*  1270 */   189,   26,  150,  151,  152,  153,  154,    0,    1,    2,
 /*  1280 */   211,  212,    5,   46,   59,  161,  147,   10,   11,   12,
 /*  1290 */    13,   14,  211,  212,   17,   60,   71,  189,  258,  189,
 /*  1300 */    59,   59,  105,  106,  189,  189,  189,   30,  116,   32,
 /*  1310 */    85,  124,  189,  251,  252,   90,  189,   40,  258,  211,
 /*  1320 */   212,  211,  212,  189,   99,   26,  211,  212,  211,  212,
 /*  1330 */   105,  106,  100,  141,  211,  212,  189,  112,  189,  114,
 /*  1340 */   115,  116,   24,  189,  119,   31,   23,   70,  189,   26,
 /*  1350 */   113,   19,   20,   39,   22,   78,  115,  115,   81,  189,
 /*  1360 */   211,  212,   22,  189,   24,  211,  212,  189,   36,  189,
 /*  1370 */   211,  212,  189,  189,   97,  150,  151,  152,  153,  154,
 /*  1380 */   127,  211,  212,  189,  189,  211,  212,  189,  143,  211,
 /*  1390 */   212,   59,  189,  189,  211,  212,   23,  189,  189,   26,
 /*  1400 */    59,  189,  149,   71,   22,  211,  212,  189,  131,  211,
 /*  1410 */   212,  189,   59,  136,  137,  211,  212,   85,  189,  211,
 /*  1420 */   212,  253,   90,  211,  212,  292,  293,  118,  119,  211,
 /*  1430 */   212,   99,   23,  211,  212,   26,  159,  105,  106,  140,
 /*  1440 */   211,  212,   23,  189,  112,   26,  114,  115,  116,    1,
 /*  1450 */     2,  119,  189,    5,    7,    8,  115,  139,   10,   11,
 /*  1460 */    12,   13,   14,   23,  189,   17,   26,  189,  115,  189,
 /*  1470 */    19,   20,  189,   22,  189,   83,   84,  189,   30,  150,
 /*  1480 */    32,  152,  150,  151,  152,  153,  154,   36,   40,  211,
 /*  1490 */   212,  211,  212,  189,  211,  212,  211,  212,  309,  189,
 /*  1500 */    19,   20,  189,   22,  150,  189,  152,  231,  189,  189,
 /*  1510 */    59,  189,   23,  189,  189,   26,  189,   36,   70,  189,
 /*  1520 */    23,  139,   71,   26,  211,  212,   78,  211,  212,   81,
 /*  1530 */   281,  211,  212,  211,  212,  189,  211,  212,  211,  212,
 /*  1540 */    59,  211,  212,   23,   23,   97,   26,   26,   23,  189,
 /*  1550 */    99,   26,   71,  189,  119,  189,  105,  106,  107,  189,
 /*  1560 */   189,  189,  280,  112,  129,  114,  115,  116,  189,  189,
 /*  1570 */   119,   23,   19,   20,   26,   22,  189,  211,  212,  131,
 /*  1580 */    99,  237,  211,  212,  136,  137,  105,  106,  189,   36,
 /*  1590 */   211,  212,  189,  112,  189,  114,  115,  116,  211,  212,
 /*  1600 */   119,  150,  151,  152,  153,  154,  189,  159,   23,  189,
 /*  1610 */    23,   26,   59,   26,  189,  189,  189,  189,  189,  189,
 /*  1620 */   209,  189,  238,  187,   71,  250,  250,  250,  211,  212,
 /*  1630 */   241,  150,  151,  152,  153,  154,  211,  212,  250,  290,
 /*  1640 */   254,  211,  212,  211,  212,  254,  215,  286,  241,  241,
 /*  1650 */   254,  286,   99,  214,  220,  214,  214,  224,  105,  106,
 /*  1660 */   244,  240,  244,  273,  192,  112,   60,  114,  115,  116,
 /*  1670 */   139,  290,  119,    5,  196,  238,  196,   38,   10,   11,
 /*  1680 */    12,   13,   14,  196,  287,   17,  148,  287,  276,  113,
 /*  1690 */    43,   22,  229,  147,  241,   18,  232,  232,   30,  232,
 /*  1700 */    32,  232,  264,  150,  151,  152,  153,  154,   40,  265,
 /*  1710 */   196,   18,  195,  264,  241,  241,  241,  265,  196,  229,
 /*  1720 */   229,  195,  155,   62,  196,  195,  283,  282,   22,  216,
 /*  1730 */   196,  195,  216,  196,  195,  113,  213,  213,   70,   64,
 /*  1740 */   213,  222,   22,  124,  162,  111,   78,  142,  219,   81,
 /*  1750 */   215,  219,  275,  303,  213,  213,  216,  275,  213,  216,
 /*  1760 */   213,  256,  113,  255,  255,   97,  222,  216,  256,  196,
 /*  1770 */    91,  256,   82,  255,  308,  146,  308,   22,  143,  196,
 /*  1780 */   270,  155,  145,  272,  144,   25,   13,  199,   26,  256,
 /*  1790 */   198,  190,  190,    6,  296,  188,  188,  188,  244,  131,
 /*  1800 */   245,  245,  243,  242,  136,  137,  241,  255,  208,  260,
 /*  1810 */   260,  208,  202,  217,  217,  202,    4,    3,  202,  208,
 /*  1820 */   208,   22,  160,  209,  209,  208,   15,  159,   98,   16,
 /*  1830 */    23,   23,  137,  148,   24,  128,  140,   20,   16,  142,
 /*  1840 */     1,  140,  128,  149,   61,   53,   37,  148,   53,   53,
 /*  1850 */    53,  293,  128,  296,  114,   34,  139,    1,    5,   22,
 /*  1860 */   113,  158,   68,   75,   26,   41,   68,  139,   24,  113,
 /*  1870 */    20,   19,  129,  123,   23,   96,   22,   22,   59,   22,
 /*  1880 */    22,  147,   67,   67,   24,   22,   37,   28,   23,   22,
 /*  1890 */    67,   23,   23,   23,  114,   23,   22,   26,   22,   24,
 /*  1900 */    23,   22,   24,  139,   23,   23,  141,   34,   88,   26,
 /*  1910 */    75,   86,   23,   22,   34,   75,   24,   23,   34,   34,
 /*  1920 */    34,   93,   34,   26,   26,   23,   23,   34,   23,   23,
 /*  1930 */    26,   44,   23,   22,   11,   22,   22,  133,   23,   23,
 /*  1940 */    22,   22,  139,   26,  139,  139,   15,   23,    1,    1,
 /*  1950 */   310,  310,  310,  310,  310,  310,  310,  139,  310,  310,
 /*  1960 */   310,  310,  310,  310,  310,  310,  310,  310,  310,  310,
 /*  1970 */   310,  310,  310,  310,  310,  310,  310,  310,  310,  310,
 /*  1980 */   310,  310,  310,  310,  310,  310,  310,  310,  310,  310,
 /*  1990 */   310,  310,  310,  310,  310,  310,  310,  310,  310,  310,
 /*  2000 */   310,  310,  310,  310,  310,  310,  310,  310,  310,  310,
 /*  2010 */   310,  310,  310,  310,  310,  310,  310,  310,  310,  310,
 /*  2020 */   310,  310,  310,  310,  310,  310,  310,  310,  310,  310,
 /*  2030 */   310,  310,  310,  310,  310,  310,  310,  310,  310,  310,
 /*  2040 */   310,  310,  310,  310,  310,  310,  310,  310,  310,  310,
 /*  2050 */   310,  310,  310,  310,  310,  310,  310,  310,  310,  310,
 /*  2060 */   310,  310,  310,  310,  310,  310,  310,  310,  310,  310,
 /*  2070 */   310,  310,  310,  310,  310,  310,  310,  310,  310,  310,
 /*  2080 */   310,  310,  310,  310,  310,  310,  310,  310,  310,  310,
 /*  2090 */   310,  310,  310,  310,  310,  310,  310,  310,  310,  310,
 /*  2100 */   310,  310,  310,  310,  310,  310,  310,  310,  310,  310,
 /*  2110 */   310,  310,  310,  310,  310,  310,  310,  310,  310,  310,
 /*  2120 */   310,  310,  310,  310,  310,  310,  310,  310,  310,  310,
 /*  2130 */   310,  310,  310,  310,  310,  310,  310,  310,  310,
};
#define YY_SHIFT_COUNT    (550)
#define YY_SHIFT_MIN      (0)
#define YY_SHIFT_MAX      (1948)
static const unsigned short int yy_shift_ofst[] = {
 /*     0 */  1448, 1277, 1668, 1072, 1072,  340, 1122, 1225, 1332, 1481,
 /*    10 */  1481, 1481,  335,    0,    0,  180,  897, 1481, 1481, 1481,
 /*    20 */  1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481,
 /*    30 */   930,  930, 1020, 1020,  290,    1,  340,  340,  340,  340,
 /*    40 */   340,  340,   40,  110,  219,  288,  327,  396,  435,  504,
 /*    50 */   543,  612,  651,  720,  877,  897,  897,  897,  897,  897,
 /*    60 */   897,  897,  897,  897,  897,  897,  897,  897,  897,  897,
 /*    70 */   897,  897,  897,  917,  897, 1019,  763,  763, 1451, 1481,
 /*    80 */  1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481,
 /*    90 */  1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481,
 /*   100 */  1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481, 1481,
 /*   110 */  1481, 1481, 1553, 1481, 1481, 1481, 1481, 1481, 1481, 1481,
 /*   120 */  1481, 1481, 1481, 1481, 1481, 1481,  147,  258,  258,  258,
 /*   130 */   258,  258,   79,   65,   84,  449,   19,  786,  449,  636,
 /*   140 */   636,  449,  880,  880,  880,  880,  113,  142,  142,  472,
 /*   150 */   150, 1958, 1958,  399,  399,  399,   93,  237,  341,  237,
 /*   160 */   237, 1074, 1074,  437,  350,  704, 1080,  449,  449,  449,
 /*   170 */   449,  449,  449,  449,  449,  449,  449,  449,  449,  449,
 /*   180 */   449,  449,  449,  449,  449,  449,  449,  449,  818,  818,
 /*   190 */   449, 1088,  217,  217,  734,  734, 1124, 1126, 1958, 1958,
 /*   200 */  1958,  739,  840,  840,  453,  454,  511,  187,  563,  570,
 /*   210 */   898,  669,  449,  449,  449,  449,  449,  449,  449,  449,
 /*   220 */   449,  670,  449,  449,  449,  449,  449,  449,  449,  449,
 /*   230 */   449,  449,  449,  449,  674,  674,  674,  449,  449,  449,
 /*   240 */   449, 1034,  449,  449,  449,  972, 1107,  449,  449, 1193,
 /*   250 */   449,  449,  449,  449,  449,  449,  449,  449,  260,  177,
 /*   260 */   489, 1241, 1241, 1241, 1241, 1192,  489,  489,  952, 1197,
 /*   270 */   625, 1235, 1139,  181,  181, 1086, 1139, 1139, 1086, 1187,
 /*   280 */  1131, 1237, 1314, 1314, 1314,  181, 1245, 1245, 1109, 1299,
 /*   290 */   549, 1340, 1606, 1531, 1531, 1639, 1639, 1531, 1538, 1576,
 /*   300 */  1669, 1647, 1546, 1677, 1677, 1677, 1677, 1531, 1693, 1546,
 /*   310 */  1546, 1576, 1669, 1647, 1647, 1546, 1531, 1693, 1567, 1661,
 /*   320 */  1531, 1693, 1706, 1531, 1693, 1531, 1693, 1706, 1622, 1622,
 /*   330 */  1622, 1675, 1720, 1720, 1706, 1622, 1619, 1622, 1675, 1622,
 /*   340 */  1622, 1582, 1706, 1634, 1634, 1706, 1605, 1649, 1605, 1649,
 /*   350 */  1605, 1649, 1605, 1649, 1531, 1679, 1679, 1690, 1690, 1629,
 /*   360 */  1635, 1755, 1531, 1626, 1629, 1637, 1640, 1546, 1760, 1762,
 /*   370 */  1773, 1773, 1787, 1787, 1787, 1958, 1958, 1958, 1958, 1958,
 /*   380 */  1958, 1958, 1958, 1958, 1958, 1958, 1958, 1958, 1958, 1958,
 /*   390 */   308,  835,  954, 1232,  879,  715,  728, 1323,  864, 1318,
 /*   400 */  1253, 1373,  297, 1409, 1419, 1440, 1489, 1497, 1520, 1242,
 /*   410 */  1309, 1447, 1435, 1341, 1521, 1525, 1392, 1548, 1329, 1354,
 /*   420 */  1585, 1587, 1353, 1382, 1812, 1814, 1799, 1662, 1811, 1730,
 /*   430 */  1813, 1807, 1808, 1695, 1685, 1707, 1810, 1696, 1817, 1697,
 /*   440 */  1822, 1839, 1701, 1694, 1714, 1783, 1809, 1699, 1792, 1795,
 /*   450 */  1796, 1797, 1724, 1740, 1821, 1717, 1856, 1853, 1837, 1747,
 /*   460 */  1703, 1794, 1838, 1798, 1788, 1824, 1728, 1756, 1844, 1850,
 /*   470 */  1852, 1743, 1750, 1854, 1815, 1855, 1857, 1851, 1858, 1816,
 /*   480 */  1819, 1860, 1779, 1859, 1863, 1823, 1849, 1865, 1734, 1867,
 /*   490 */  1868, 1869, 1870, 1871, 1872, 1874, 1875, 1877, 1876, 1878,
 /*   500 */  1764, 1881, 1882, 1780, 1873, 1879, 1765, 1883, 1880, 1884,
 /*   510 */  1885, 1886, 1820, 1835, 1825, 1887, 1840, 1828, 1888, 1889,
 /*   520 */  1891, 1892, 1897, 1898, 1893, 1894, 1883, 1902, 1903, 1905,
 /*   530 */  1906, 1904, 1909, 1911, 1923, 1913, 1914, 1915, 1916, 1918,
 /*   540 */  1919, 1917, 1804, 1803, 1805, 1806, 1818, 1924, 1931, 1947,
 /*   550 */  1948,
};
#define YY_REDUCE_COUNT (389)
#define YY_REDUCE_MIN   (-262)
#define YY_REDUCE_MAX   (1617)
static const short yy_reduce_ofst[] = {
 /*     0 */   490, -122,  545,  645,  650, -120, -189, -187, -184, -182,
 /*    10 */  -178, -176,   45,   30,  200, -251, -134,  390,  392,  521,
 /*    20 */   523,  213,  692,  821,  284,  589,  872,  666,  671,  866,
 /*    30 */    71,  111,  273,  389,  686,  815,  904,  932,  948,  955,
 /*    40 */   964,  969, -259, -259, -259, -259, -259, -259, -259, -259,
 /*    50 */  -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
 /*    60 */  -259, -259, -259, -259, -259, -259, -259, -259, -259, -259,
 /*    70 */  -259, -259, -259, -259, -259, -259, -259, -259,  428,  430,
 /*    80 */   899,  985, 1021, 1028, 1057, 1069, 1081, 1108, 1110, 1115,
 /*    90 */  1117, 1123, 1149, 1154, 1159, 1170, 1174, 1178, 1183, 1194,
 /*   100 */  1198, 1204, 1208, 1212, 1218, 1222, 1229, 1278, 1280, 1283,
 /*   110 */  1285, 1313, 1316, 1320, 1322, 1325, 1327, 1330, 1366, 1371,
 /*   120 */  1379, 1387, 1417, 1425, 1430, 1432, -259, -259, -259, -259,
 /*   130 */  -259, -259, -259, -259, -259,  557,  974, -214, -174,   -9,
 /*   140 */   431, -124,  806,  925,  806,  925,  251,  928,  940, -259,
 /*   150 */  -259, -259, -259, -198, -198, -198,  127, -186, -168,  212,
 /*   160 */   646,  617,  799, -262,  555,  220,  220,  491,  605, 1040,
 /*   170 */  1060,  699,  -11,  600,  848,  862,  345, -129,  724,  -91,
 /*   180 */   158,  749,  716,  900,  304,  822,  929,  926,  499,  793,
 /*   190 */   322,  892,  813,  845,  958, 1056,  751,  905, 1133, 1062,
 /*   200 */   803, -210, -185, -179, -148, -167,  -89,  121,  274,  281,
 /*   210 */   320,  336,  439,  663,  711,  957, 1064, 1068, 1116, 1127,
 /*   220 */  1134, -196, 1147, 1180, 1184, 1195, 1203, 1209, 1254, 1263,
 /*   230 */  1275, 1288, 1304, 1310,  205,  422,  638, 1319, 1324, 1346,
 /*   240 */  1360, 1168, 1364, 1370, 1372,  869, 1189, 1380, 1399, 1276,
 /*   250 */  1403,  121, 1405, 1420, 1426, 1427, 1428, 1429, 1249, 1282,
 /*   260 */  1344, 1375, 1376, 1377, 1388, 1168, 1344, 1344, 1384, 1411,
 /*   270 */  1436, 1349, 1389, 1386, 1391, 1361, 1407, 1408, 1365, 1431,
 /*   280 */  1433, 1434, 1439, 1441, 1442, 1396, 1416, 1418, 1390, 1421,
 /*   290 */  1437, 1472, 1381, 1478, 1480, 1397, 1400, 1487, 1412, 1444,
 /*   300 */  1438, 1463, 1453, 1464, 1465, 1467, 1469, 1514, 1517, 1473,
 /*   310 */  1474, 1452, 1449, 1490, 1491, 1475, 1522, 1526, 1443, 1445,
 /*   320 */  1528, 1530, 1513, 1534, 1536, 1537, 1539, 1516, 1523, 1524,
 /*   330 */  1527, 1519, 1529, 1532, 1540, 1541, 1535, 1542, 1544, 1545,
 /*   340 */  1547, 1450, 1543, 1477, 1482, 1551, 1505, 1508, 1512, 1509,
 /*   350 */  1515, 1518, 1533, 1552, 1573, 1466, 1468, 1549, 1550, 1555,
 /*   360 */  1554, 1510, 1583, 1511, 1556, 1559, 1561, 1565, 1588, 1592,
 /*   370 */  1601, 1602, 1607, 1608, 1609, 1498, 1557, 1558, 1610, 1600,
 /*   380 */  1603, 1611, 1612, 1613, 1596, 1597, 1614, 1615, 1617, 1616,
};
static const YYACTIONTYPE yy_default[] = {
 /*     0 */  1573, 1573, 1573, 1409, 1186, 1295, 1186, 1186, 1186, 1409,
 /*    10 */  1409, 1409, 1186, 1325, 1325, 1462, 1217, 1186, 1186, 1186,
 /*    20 */  1186, 1186, 1186, 1186, 1186, 1186, 1186, 1408, 1186, 1186,
 /*    30 */  1186, 1186, 1492, 1492, 1186, 1186, 1186, 1186, 1186, 1186,
 /*    40 */  1186, 1186, 1186, 1334, 1186, 1186, 1186, 1186, 1186, 1186,
 /*    50 */  1410, 1411, 1186, 1186, 1186, 1461, 1463, 1426, 1344, 1343,
 /*    60 */  1342, 1341, 1444, 1312, 1339, 1332, 1336, 1404, 1405, 1403,
 /*    70 */  1407, 1411, 1410, 1186, 1335, 1375, 1389, 1374, 1186, 1186,
 /*    80 */  1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186,
 /*    90 */  1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186,
 /*   100 */  1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186,
 /*   110 */  1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186,
 /*   120 */  1186, 1186, 1186, 1186, 1186, 1186, 1383, 1388, 1394, 1387,
 /*   130 */  1384, 1377, 1376, 1378, 1379, 1186, 1207, 1259, 1186, 1186,
 /*   140 */  1186, 1186, 1480, 1479, 1186, 1186, 1217, 1369, 1368, 1380,
 /*   150 */  1381, 1391, 1390, 1469, 1527, 1526, 1427, 1186, 1186, 1186,
 /*   160 */  1186, 1186, 1186, 1492, 1186, 1186, 1186, 1186, 1186, 1186,
 /*   170 */  1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186,
 /*   180 */  1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1492, 1492,
 /*   190 */  1186, 1217, 1492, 1492, 1213, 1213, 1319, 1186, 1475, 1295,
 /*   200 */  1286, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186,
 /*   210 */  1186, 1186, 1186, 1186, 1186, 1466, 1464, 1186, 1186, 1186,
 /*   220 */  1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186,
 /*   230 */  1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186,
 /*   240 */  1186, 1186, 1186, 1186, 1186, 1291, 1186, 1186, 1186, 1186,
 /*   250 */  1186, 1186, 1186, 1186, 1186, 1186, 1186, 1521, 1186, 1439,
 /*   260 */  1273, 1291, 1291, 1291, 1291, 1293, 1274, 1272, 1285, 1218,
 /*   270 */  1193, 1565, 1338, 1314, 1314, 1562, 1338, 1338, 1562, 1234,
 /*   280 */  1543, 1229, 1325, 1325, 1325, 1314, 1319, 1319, 1406, 1292,
 /*   290 */  1285, 1186, 1565, 1300, 1300, 1564, 1564, 1300, 1427, 1347,
 /*   300 */  1353, 1262, 1338, 1268, 1268, 1268, 1268, 1300, 1204, 1338,
 /*   310 */  1338, 1347, 1353, 1262, 1262, 1338, 1300, 1204, 1443, 1559,
 /*   320 */  1300, 1204, 1417, 1300, 1204, 1300, 1204, 1417, 1260, 1260,
 /*   330 */  1260, 1249, 1186, 1186, 1417, 1260, 1234, 1260, 1249, 1260,
 /*   340 */  1260, 1510, 1417, 1421, 1421, 1417, 1318, 1313, 1318, 1313,
 /*   350 */  1318, 1313, 1318, 1313, 1300, 1502, 1502, 1328, 1328, 1333,
 /*   360 */  1319, 1412, 1300, 1186, 1333, 1331, 1329, 1338, 1210, 1252,
 /*   370 */  1524, 1524, 1520, 1520, 1520, 1570, 1570, 1475, 1536, 1217,
 /*   380 */  1217, 1217, 1217, 1536, 1236, 1236, 1218, 1218, 1217, 1536,
 /*   390 */  1186, 1186, 1186, 1186, 1186, 1186, 1531, 1186, 1428, 1304,
 /*   400 */  1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186,
 /*   410 */  1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186,
 /*   420 */  1186, 1186, 1186, 1358, 1186, 1189, 1472, 1186, 1186, 1470,
 /*   430 */  1186, 1186, 1186, 1186, 1186, 1186, 1305, 1186, 1186, 1186,
 /*   440 */  1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186,
 /*   450 */  1186, 1186, 1186, 1186, 1186, 1561, 1186, 1186, 1186, 1186,
 /*   460 */  1186, 1186, 1442, 1441, 1186, 1186, 1302, 1186, 1186, 1186,
 /*   470 */  1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186,
 /*   480 */  1232, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186,
 /*   490 */  1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186,
 /*   500 */  1186, 1186, 1186, 1186, 1186, 1186, 1186, 1330, 1186, 1186,
 /*   510 */  1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186,
 /*   520 */  1186, 1186, 1507, 1320, 1186, 1186, 1552, 1186, 1186, 1186,
 /*   530 */  1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186, 1186,
 /*   540 */  1186, 1547, 1276, 1360, 1186, 1359, 1363, 1186, 1198, 1186,
 /*   550 */  1186,
};
/********** End of lemon-generated parsing tables *****************************/

/* The next table maps tokens (terminal symbols) into fallback tokens.  
** If a construct like the following:
** 
**      %fallback ID X Y Z.
**
** appears in the grammar, then ID becomes a fallback token for X, Y,
** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser
** but it does not parse, the type of the token is changed to ID and
** the parse is retried before an error is thrown.
**
** This feature can be used, for example, to cause some keywords in a language
** to revert to identifiers if they keyword does not apply in the context where
** it appears.
*/
#ifdef YYFALLBACK
static const YYCODETYPE yyFallback[] = {
    0,  /*          $ => nothing */
    0,  /*       SEMI => nothing */
   59,  /*    EXPLAIN => ID */
   59,  /*      QUERY => ID */
   59,  /*       PLAN => ID */
   59,  /*      BEGIN => ID */
    0,  /* TRANSACTION => nothing */
   59,  /*   DEFERRED => ID */
   59,  /*  IMMEDIATE => ID */
   59,  /*  EXCLUSIVE => ID */
    0,  /*     COMMIT => nothing */
   59,  /*        END => ID */
   59,  /*   ROLLBACK => ID */
   59,  /*  SAVEPOINT => ID */
   59,  /*    RELEASE => ID */
    0,  /*         TO => nothing */
    0,  /*      TABLE => nothing */
    0,  /*     CREATE => nothing */
   59,  /*         IF => ID */
    0,  /*        NOT => nothing */
    0,  /*     EXISTS => nothing */
   59,  /*       TEMP => ID */
    0,  /*         LP => nothing */
    0,  /*         RP => nothing */
    0,  /*         AS => nothing */
   59,  /*    WITHOUT => ID */
    0,  /*      COMMA => nothing */
   59,  /*      ABORT => ID */
   59,  /*     ACTION => ID */
   59,  /*      AFTER => ID */
   59,  /*    ANALYZE => ID */
   59,  /*        ASC => ID */
   59,  /*     ATTACH => ID */
   59,  /*     BEFORE => ID */
   59,  /*         BY => ID */
   59,  /*    CASCADE => ID */
   59,  /*       CAST => ID */
   59,  /*   CONFLICT => ID */
   59,  /*   DATABASE => ID */
   59,  /*       DESC => ID */
   59,  /*     DETACH => ID */
   59,  /*       EACH => ID */
   59,  /*       FAIL => ID */
    0,  /*         OR => nothing */
    0,  /*        AND => nothing */
    0,  /*         IS => nothing */
   59,  /*      MATCH => ID */
   59,  /*    LIKE_KW => ID */
    0,  /*    BETWEEN => nothing */
    0,  /*         IN => nothing */
    0,  /*     ISNULL => nothing */
    0,  /*    NOTNULL => nothing */
    0,  /*         NE => nothing */
    0,  /*         EQ => nothing */
    0,  /*         GT => nothing */
    0,  /*         LE => nothing */
    0,  /*         LT => nothing */
    0,  /*         GE => nothing */
    0,  /*     ESCAPE => nothing */
    0,  /*         ID => nothing */
   59,  /*   COLUMNKW => ID */
   59,  /*         DO => ID */
   59,  /*        FOR => ID */
   59,  /*     IGNORE => ID */
   59,  /*  INITIALLY => ID */
   59,  /*    INSTEAD => ID */
   59,  /*         NO => ID */
   59,  /*        KEY => ID */
   59,  /*         OF => ID */
   59,  /*     OFFSET => ID */
   59,  /*     PRAGMA => ID */
   59,  /*      RAISE => ID */
   59,  /*  RECURSIVE => ID */
   59,  /*    REPLACE => ID */
   59,  /*   RESTRICT => ID */
   59,  /*        ROW => ID */
   59,  /*       ROWS => ID */
   59,  /*    TRIGGER => ID */
   59,  /*     VACUUM => ID */
   59,  /*       VIEW => ID */
   59,  /*    VIRTUAL => ID */
   59,  /*       WITH => ID */
   59,  /*      NULLS => ID */
   59,  /*      FIRST => ID */
   59,  /*       LAST => ID */
   59,  /*    CURRENT => ID */
   59,  /*  FOLLOWING => ID */
   59,  /*  PARTITION => ID */
   59,  /*  PRECEDING => ID */
   59,  /*      RANGE => ID */
   59,  /*  UNBOUNDED => ID */
   59,  /*    EXCLUDE => ID */
   59,  /*     GROUPS => ID */
   59,  /*     OTHERS => ID */
   59,  /*       TIES => ID */
   59,  /*  GENERATED => ID */
   59,  /*     ALWAYS => ID */
   59,  /*    REINDEX => ID */
   59,  /*     RENAME => ID */
   59,  /*   CTIME_KW => ID */
    0,  /*        ANY => nothing */
    0,  /*     BITAND => nothing */
    0,  /*      BITOR => nothing */
    0,  /*     LSHIFT => nothing */
    0,  /*     RSHIFT => nothing */
    0,  /*       PLUS => nothing */
    0,  /*      MINUS => nothing */
    0,  /*       STAR => nothing */
    0,  /*      SLASH => nothing */
    0,  /*        REM => nothing */
    0,  /*     CONCAT => nothing */
    0,  /*    COLLATE => nothing */
    0,  /*     BITNOT => nothing */
    0,  /*         ON => nothing */
    0,  /*    INDEXED => nothing */
    0,  /*     STRING => nothing */
    0,  /*    JOIN_KW => nothing */
    0,  /* CONSTRAINT => nothing */
    0,  /*    DEFAULT => nothing */
    0,  /*       NULL => nothing */
    0,  /*    PRIMARY => nothing */
    0,  /*     UNIQUE => nothing */
    0,  /*      CHECK => nothing */
    0,  /* REFERENCES => nothing */
    0,  /*   AUTOINCR => nothing */
    0,  /*     INSERT => nothing */
    0,  /*     DELETE => nothing */
    0,  /*     UPDATE => nothing */
    0,  /*        SET => nothing */
    0,  /* DEFERRABLE => nothing */
    0,  /*    FOREIGN => nothing */
    0,  /*       DROP => nothing */
    0,  /*      UNION => nothing */
    0,  /*        ALL => nothing */
    0,  /*     EXCEPT => nothing */
    0,  /*  INTERSECT => nothing */
    0,  /*     SELECT => nothing */
    0,  /*     VALUES => nothing */
    0,  /*   DISTINCT => nothing */
    0,  /*        DOT => nothing */
    0,  /*       FROM => nothing */
    0,  /*       JOIN => nothing */
    0,  /*      USING => nothing */
    0,  /*      ORDER => nothing */
    0,  /*      GROUP => nothing */
    0,  /*     HAVING => nothing */
    0,  /*      LIMIT => nothing */
    0,  /*      WHERE => nothing */
    0,  /*       INTO => nothing */
    0,  /*    NOTHING => nothing */
    0,  /*      FLOAT => nothing */
    0,  /*       BLOB => nothing */
    0,  /*    INTEGER => nothing */
    0,  /*   VARIABLE => nothing */
    0,  /*       CASE => nothing */
    0,  /*       WHEN => nothing */
    0,  /*       THEN => nothing */
    0,  /*       ELSE => nothing */
    0,  /*      INDEX => nothing */
    0,  /*      ALTER => nothing */
    0,  /*        ADD => nothing */
    0,  /*     WINDOW => nothing */
    0,  /*       OVER => nothing */
    0,  /*     FILTER => nothing */
    0,  /*     COLUMN => nothing */
    0,  /* AGG_FUNCTION => nothing */
    0,  /* AGG_COLUMN => nothing */
    0,  /*  TRUEFALSE => nothing */
    0,  /*      ISNOT => nothing */
    0,  /*   FUNCTION => nothing */
    0,  /*     UMINUS => nothing */
    0,  /*      UPLUS => nothing */
    0,  /*      TRUTH => nothing */
    0,  /*   REGISTER => nothing */
    0,  /*     VECTOR => nothing */
    0,  /* SELECT_COLUMN => nothing */
    0,  /* IF_NULL_ROW => nothing */
    0,  /*   ASTERISK => nothing */
    0,  /*       SPAN => nothing */
    0,  /*      SPACE => nothing */
    0,  /*    ILLEGAL => nothing */
};
#endif /* YYFALLBACK */

/* The following structure represents a single element of the
** parser's stack.  Information stored includes:
**
**   +  The state number for the parser at this level of the stack.
**
**   +  The value of the token stored at this level of the stack.
**      (In other words, the "major" token.)
**
**   +  The semantic value stored at this level of the stack.  This is
**      the information used by the action routines in the grammar.
**      It is sometimes called the "minor" token.
**
** After the "shift" half of a SHIFTREDUCE action, the stateno field
** actually contains the reduce action for the second half of the
** SHIFTREDUCE.
*/
struct yyStackEntry {
  YYACTIONTYPE stateno;  /* The state-number, or reduce action in SHIFTREDUCE */
  YYCODETYPE major;      /* The major token value.  This is the code
                         ** number for the token at this stack level */
  YYMINORTYPE minor;     /* The user-supplied minor token value.  This
                         ** is the value of the token  */
};
typedef struct yyStackEntry yyStackEntry;

/* The state of the parser is completely contained in an instance of
** the following structure */
struct yyParser {
  yyStackEntry *yytos;          /* Pointer to top element of the stack */
#ifdef YYTRACKMAXSTACKDEPTH
  int yyhwm;                    /* High-water mark of the stack */
#endif
#ifndef YYNOERRORRECOVERY
  int yyerrcnt;                 /* Shifts left before out of the error */
#endif
  sqlite3ParserARG_SDECL                /* A place to hold %extra_argument */
  sqlite3ParserCTX_SDECL                /* A place to hold %extra_context */
#if YYSTACKDEPTH<=0
  int yystksz;                  /* Current side of the stack */
  yyStackEntry *yystack;        /* The parser's stack */
  yyStackEntry yystk0;          /* First stack entry */
#else
  yyStackEntry yystack[YYSTACKDEPTH];  /* The parser's stack */
  yyStackEntry *yystackEnd;            /* Last entry in the stack */
#endif
};
typedef struct yyParser yyParser;

#ifndef NDEBUG
#include <stdio.h>
static FILE *yyTraceFILE = 0;
static char *yyTracePrompt = 0;
#endif /* NDEBUG */

#ifndef NDEBUG
/* 
** Turn parser tracing on by giving a stream to which to write the trace
** and a prompt to preface each trace message.  Tracing is turned off
** by making either argument NULL 
**
** Inputs:
** <ul>
** <li> A FILE* to which trace output should be written.
**      If NULL, then tracing is turned off.
** <li> A prefix string written at the beginning of every
**      line of trace output.  If NULL, then tracing is
**      turned off.
** </ul>
**
** Outputs:
** None.
*/
void sqlite3ParserTrace(FILE *TraceFILE, char *zTracePrompt){
  yyTraceFILE = TraceFILE;
  yyTracePrompt = zTracePrompt;
  if( yyTraceFILE==0 ) yyTracePrompt = 0;
  else if( yyTracePrompt==0 ) yyTraceFILE = 0;
}
#endif /* NDEBUG */

#if defined(YYCOVERAGE) || !defined(NDEBUG)
/* For tracing shifts, the names of all terminals and nonterminals
** are required.  The following table supplies these names */
static const char *const yyTokenName[] = { 
  /*    0 */ "$",
  /*    1 */ "SEMI",
  /*    2 */ "EXPLAIN",
  /*    3 */ "QUERY",
  /*    4 */ "PLAN",
  /*    5 */ "BEGIN",
  /*    6 */ "TRANSACTION",
  /*    7 */ "DEFERRED",
  /*    8 */ "IMMEDIATE",
  /*    9 */ "EXCLUSIVE",
  /*   10 */ "COMMIT",
  /*   11 */ "END",
  /*   12 */ "ROLLBACK",
  /*   13 */ "SAVEPOINT",
  /*   14 */ "RELEASE",
  /*   15 */ "TO",
  /*   16 */ "TABLE",
  /*   17 */ "CREATE",
  /*   18 */ "IF",
  /*   19 */ "NOT",
  /*   20 */ "EXISTS",
  /*   21 */ "TEMP",
  /*   22 */ "LP",
  /*   23 */ "RP",
  /*   24 */ "AS",
  /*   25 */ "WITHOUT",
  /*   26 */ "COMMA",
  /*   27 */ "ABORT",
  /*   28 */ "ACTION",
  /*   29 */ "AFTER",
  /*   30 */ "ANALYZE",
  /*   31 */ "ASC",
  /*   32 */ "ATTACH",
  /*   33 */ "BEFORE",
  /*   34 */ "BY",
  /*   35 */ "CASCADE",
  /*   36 */ "CAST",
  /*   37 */ "CONFLICT",
  /*   38 */ "DATABASE",
  /*   39 */ "DESC",
  /*   40 */ "DETACH",
  /*   41 */ "EACH",
  /*   42 */ "FAIL",
  /*   43 */ "OR",
  /*   44 */ "AND",
  /*   45 */ "IS",
  /*   46 */ "MATCH",
  /*   47 */ "LIKE_KW",
  /*   48 */ "BETWEEN",
  /*   49 */ "IN",
  /*   50 */ "ISNULL",
  /*   51 */ "NOTNULL",
  /*   52 */ "NE",
  /*   53 */ "EQ",
  /*   54 */ "GT",
  /*   55 */ "LE",
  /*   56 */ "LT",
  /*   57 */ "GE",
  /*   58 */ "ESCAPE",
  /*   59 */ "ID",
  /*   60 */ "COLUMNKW",
  /*   61 */ "DO",
  /*   62 */ "FOR",
  /*   63 */ "IGNORE",
  /*   64 */ "INITIALLY",
  /*   65 */ "INSTEAD",
  /*   66 */ "NO",
  /*   67 */ "KEY",
  /*   68 */ "OF",
  /*   69 */ "OFFSET",
  /*   70 */ "PRAGMA",
  /*   71 */ "RAISE",
  /*   72 */ "RECURSIVE",
  /*   73 */ "REPLACE",
  /*   74 */ "RESTRICT",
  /*   75 */ "ROW",
  /*   76 */ "ROWS",
  /*   77 */ "TRIGGER",
  /*   78 */ "VACUUM",
  /*   79 */ "VIEW",
  /*   80 */ "VIRTUAL",
  /*   81 */ "WITH",
  /*   82 */ "NULLS",
  /*   83 */ "FIRST",
  /*   84 */ "LAST",
  /*   85 */ "CURRENT",
  /*   86 */ "FOLLOWING",
  /*   87 */ "PARTITION",
  /*   88 */ "PRECEDING",
  /*   89 */ "RANGE",
  /*   90 */ "UNBOUNDED",
  /*   91 */ "EXCLUDE",
  /*   92 */ "GROUPS",
  /*   93 */ "OTHERS",
  /*   94 */ "TIES",
  /*   95 */ "GENERATED",
  /*   96 */ "ALWAYS",
  /*   97 */ "REINDEX",
  /*   98 */ "RENAME",
  /*   99 */ "CTIME_KW",
  /*  100 */ "ANY",
  /*  101 */ "BITAND",
  /*  102 */ "BITOR",
  /*  103 */ "LSHIFT",
  /*  104 */ "RSHIFT",
  /*  105 */ "PLUS",
  /*  106 */ "MINUS",
  /*  107 */ "STAR",
  /*  108 */ "SLASH",
  /*  109 */ "REM",
  /*  110 */ "CONCAT",
  /*  111 */ "COLLATE",
  /*  112 */ "BITNOT",
  /*  113 */ "ON",
  /*  114 */ "INDEXED",
  /*  115 */ "STRING",
  /*  116 */ "JOIN_KW",
  /*  117 */ "CONSTRAINT",
  /*  118 */ "DEFAULT",
  /*  119 */ "NULL",
  /*  120 */ "PRIMARY",
  /*  121 */ "UNIQUE",
  /*  122 */ "CHECK",
  /*  123 */ "REFERENCES",
  /*  124 */ "AUTOINCR",
  /*  125 */ "INSERT",
  /*  126 */ "DELETE",
  /*  127 */ "UPDATE",
  /*  128 */ "SET",
  /*  129 */ "DEFERRABLE",
  /*  130 */ "FOREIGN",
  /*  131 */ "DROP",
  /*  132 */ "UNION",
  /*  133 */ "ALL",
  /*  134 */ "EXCEPT",
  /*  135 */ "INTERSECT",
  /*  136 */ "SELECT",
  /*  137 */ "VALUES",
  /*  138 */ "DISTINCT",
  /*  139 */ "DOT",
  /*  140 */ "FROM",
  /*  141 */ "JOIN",
  /*  142 */ "USING",
  /*  143 */ "ORDER",
  /*  144 */ "GROUP",
  /*  145 */ "HAVING",
  /*  146 */ "LIMIT",
  /*  147 */ "WHERE",
  /*  148 */ "INTO",
  /*  149 */ "NOTHING",
  /*  150 */ "FLOAT",
  /*  151 */ "BLOB",
  /*  152 */ "INTEGER",
  /*  153 */ "VARIABLE",
  /*  154 */ "CASE",
  /*  155 */ "WHEN",
  /*  156 */ "THEN",
  /*  157 */ "ELSE",
  /*  158 */ "INDEX",
  /*  159 */ "ALTER",
  /*  160 */ "ADD",
  /*  161 */ "WINDOW",
  /*  162 */ "OVER",
  /*  163 */ "FILTER",
  /*  164 */ "COLUMN",
  /*  165 */ "AGG_FUNCTION",
  /*  166 */ "AGG_COLUMN",
  /*  167 */ "TRUEFALSE",
  /*  168 */ "ISNOT",
  /*  169 */ "FUNCTION",
  /*  170 */ "UMINUS",
  /*  171 */ "UPLUS",
  /*  172 */ "TRUTH",
  /*  173 */ "REGISTER",
  /*  174 */ "VECTOR",
  /*  175 */ "SELECT_COLUMN",
  /*  176 */ "IF_NULL_ROW",
  /*  177 */ "ASTERISK",
  /*  178 */ "SPAN",
  /*  179 */ "SPACE",
  /*  180 */ "ILLEGAL",
  /*  181 */ "input",
  /*  182 */ "cmdlist",
  /*  183 */ "ecmd",
  /*  184 */ "cmdx",
  /*  185 */ "explain",
  /*  186 */ "cmd",
  /*  187 */ "transtype",
  /*  188 */ "trans_opt",
  /*  189 */ "nm",
  /*  190 */ "savepoint_opt",
  /*  191 */ "create_table",
  /*  192 */ "create_table_args",
  /*  193 */ "createkw",
  /*  194 */ "temp",
  /*  195 */ "ifnotexists",
  /*  196 */ "dbnm",
  /*  197 */ "columnlist",
  /*  198 */ "conslist_opt",
  /*  199 */ "table_options",
  /*  200 */ "select",
  /*  201 */ "columnname",
  /*  202 */ "carglist",
  /*  203 */ "typetoken",
  /*  204 */ "typename",
  /*  205 */ "signed",
  /*  206 */ "plus_num",
  /*  207 */ "minus_num",
  /*  208 */ "scanpt",
  /*  209 */ "scantok",
  /*  210 */ "ccons",
  /*  211 */ "term",
  /*  212 */ "expr",
  /*  213 */ "onconf",
  /*  214 */ "sortorder",
  /*  215 */ "autoinc",
  /*  216 */ "eidlist_opt",
  /*  217 */ "refargs",
  /*  218 */ "defer_subclause",
  /*  219 */ "generated",
  /*  220 */ "refarg",
  /*  221 */ "refact",
  /*  222 */ "init_deferred_pred_opt",
  /*  223 */ "conslist",
  /*  224 */ "tconscomma",
  /*  225 */ "tcons",
  /*  226 */ "sortlist",
  /*  227 */ "eidlist",
  /*  228 */ "defer_subclause_opt",
  /*  229 */ "orconf",
  /*  230 */ "resolvetype",
  /*  231 */ "raisetype",
  /*  232 */ "ifexists",
  /*  233 */ "fullname",
  /*  234 */ "selectnowith",
  /*  235 */ "oneselect",
  /*  236 */ "wqlist",
  /*  237 */ "multiselect_op",
  /*  238 */ "distinct",
  /*  239 */ "selcollist",
  /*  240 */ "from",
  /*  241 */ "where_opt",
  /*  242 */ "groupby_opt",
  /*  243 */ "having_opt",
  /*  244 */ "orderby_opt",
  /*  245 */ "limit_opt",
  /*  246 */ "window_clause",
  /*  247 */ "values",
  /*  248 */ "nexprlist",
  /*  249 */ "sclp",
  /*  250 */ "as",
  /*  251 */ "seltablist",
  /*  252 */ "stl_prefix",
  /*  253 */ "joinop",
  /*  254 */ "indexed_opt",
  /*  255 */ "on_opt",
  /*  256 */ "using_opt",
  /*  257 */ "exprlist",
  /*  258 */ "xfullname",
  /*  259 */ "idlist",
  /*  260 */ "nulls",
  /*  261 */ "with",
  /*  262 */ "setlist",
  /*  263 */ "insert_cmd",
  /*  264 */ "idlist_opt",
  /*  265 */ "upsert",
  /*  266 */ "filter_over",
  /*  267 */ "likeop",
  /*  268 */ "between_op",
  /*  269 */ "in_op",
  /*  270 */ "paren_exprlist",
  /*  271 */ "case_operand",
  /*  272 */ "case_exprlist",
  /*  273 */ "case_else",
  /*  274 */ "uniqueflag",
  /*  275 */ "collate",
  /*  276 */ "vinto",
  /*  277 */ "nmnum",
  /*  278 */ "trigger_decl",
  /*  279 */ "trigger_cmd_list",
  /*  280 */ "trigger_time",
  /*  281 */ "trigger_event",
  /*  282 */ "foreach_clause",
  /*  283 */ "when_clause",
  /*  284 */ "trigger_cmd",
  /*  285 */ "trnm",
  /*  286 */ "tridxby",
  /*  287 */ "database_kw_opt",
  /*  288 */ "key_opt",
  /*  289 */ "add_column_fullname",
  /*  290 */ "kwcolumn_opt",
  /*  291 */ "create_vtab",
  /*  292 */ "vtabarglist",
  /*  293 */ "vtabarg",
  /*  294 */ "vtabargtoken",
  /*  295 */ "lp",
  /*  296 */ "anylist",
  /*  297 */ "windowdefn_list",
  /*  298 */ "windowdefn",
  /*  299 */ "window",
  /*  300 */ "frame_opt",
  /*  301 */ "part_opt",
  /*  302 */ "filter_clause",
  /*  303 */ "over_clause",
  /*  304 */ "range_or_rows",
  /*  305 */ "frame_bound",
  /*  306 */ "frame_bound_s",
  /*  307 */ "frame_bound_e",
  /*  308 */ "frame_exclude_opt",
  /*  309 */ "frame_exclude",
};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
 /*   0 */ "explain ::= EXPLAIN",
 /*   1 */ "explain ::= EXPLAIN QUERY PLAN",
 /*   2 */ "cmdx ::= cmd",
 /*   3 */ "cmd ::= BEGIN transtype trans_opt",
 /*   4 */ "transtype ::=",
 /*   5 */ "transtype ::= DEFERRED",
 /*   6 */ "transtype ::= IMMEDIATE",
 /*   7 */ "transtype ::= EXCLUSIVE",
 /*   8 */ "cmd ::= COMMIT|END trans_opt",
 /*   9 */ "cmd ::= ROLLBACK trans_opt",
 /*  10 */ "cmd ::= SAVEPOINT nm",
 /*  11 */ "cmd ::= RELEASE savepoint_opt nm",
 /*  12 */ "cmd ::= ROLLBACK trans_opt TO savepoint_opt nm",
 /*  13 */ "create_table ::= createkw temp TABLE ifnotexists nm dbnm",
 /*  14 */ "createkw ::= CREATE",
 /*  15 */ "ifnotexists ::=",
 /*  16 */ "ifnotexists ::= IF NOT EXISTS",
 /*  17 */ "temp ::= TEMP",
 /*  18 */ "temp ::=",
 /*  19 */ "create_table_args ::= LP columnlist conslist_opt RP table_options",
 /*  20 */ "create_table_args ::= AS select",
 /*  21 */ "table_options ::=",
 /*  22 */ "table_options ::= WITHOUT nm",
 /*  23 */ "columnname ::= nm typetoken",
 /*  24 */ "typetoken ::=",
 /*  25 */ "typetoken ::= typename LP signed RP",
 /*  26 */ "typetoken ::= typename LP signed COMMA signed RP",
 /*  27 */ "typename ::= typename ID|STRING",
 /*  28 */ "scanpt ::=",
 /*  29 */ "scantok ::=",
 /*  30 */ "ccons ::= CONSTRAINT nm",
 /*  31 */ "ccons ::= DEFAULT scantok term",
 /*  32 */ "ccons ::= DEFAULT LP expr RP",
 /*  33 */ "ccons ::= DEFAULT PLUS scantok term",
 /*  34 */ "ccons ::= DEFAULT MINUS scantok term",
 /*  35 */ "ccons ::= DEFAULT scantok ID|INDEXED",
 /*  36 */ "ccons ::= NOT NULL onconf",
 /*  37 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc",
 /*  38 */ "ccons ::= UNIQUE onconf",
 /*  39 */ "ccons ::= CHECK LP expr RP",
 /*  40 */ "ccons ::= REFERENCES nm eidlist_opt refargs",
 /*  41 */ "ccons ::= defer_subclause",
 /*  42 */ "ccons ::= COLLATE ID|STRING",
 /*  43 */ "generated ::= LP expr RP",
 /*  44 */ "generated ::= LP expr RP ID",
 /*  45 */ "autoinc ::=",
 /*  46 */ "autoinc ::= AUTOINCR",
 /*  47 */ "refargs ::=",
 /*  48 */ "refargs ::= refargs refarg",
 /*  49 */ "refarg ::= MATCH nm",
 /*  50 */ "refarg ::= ON INSERT refact",
 /*  51 */ "refarg ::= ON DELETE refact",
 /*  52 */ "refarg ::= ON UPDATE refact",
 /*  53 */ "refact ::= SET NULL",
 /*  54 */ "refact ::= SET DEFAULT",
 /*  55 */ "refact ::= CASCADE",
 /*  56 */ "refact ::= RESTRICT",
 /*  57 */ "refact ::= NO ACTION",
 /*  58 */ "defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt",
 /*  59 */ "defer_subclause ::= DEFERRABLE init_deferred_pred_opt",
 /*  60 */ "init_deferred_pred_opt ::=",
 /*  61 */ "init_deferred_pred_opt ::= INITIALLY DEFERRED",
 /*  62 */ "init_deferred_pred_opt ::= INITIALLY IMMEDIATE",
 /*  63 */ "conslist_opt ::=",
 /*  64 */ "tconscomma ::= COMMA",
 /*  65 */ "tcons ::= CONSTRAINT nm",
 /*  66 */ "tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf",
 /*  67 */ "tcons ::= UNIQUE LP sortlist RP onconf",
 /*  68 */ "tcons ::= CHECK LP expr RP onconf",
 /*  69 */ "tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt",
 /*  70 */ "defer_subclause_opt ::=",
 /*  71 */ "onconf ::=",
 /*  72 */ "onconf ::= ON CONFLICT resolvetype",
 /*  73 */ "orconf ::=",
 /*  74 */ "orconf ::= OR resolvetype",
 /*  75 */ "resolvetype ::= IGNORE",
 /*  76 */ "resolvetype ::= REPLACE",
 /*  77 */ "cmd ::= DROP TABLE ifexists fullname",
 /*  78 */ "ifexists ::= IF EXISTS",
 /*  79 */ "ifexists ::=",
 /*  80 */ "cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select",
 /*  81 */ "cmd ::= DROP VIEW ifexists fullname",
 /*  82 */ "cmd ::= select",
 /*  83 */ "select ::= WITH wqlist selectnowith",
 /*  84 */ "select ::= WITH RECURSIVE wqlist selectnowith",
 /*  85 */ "select ::= selectnowith",
 /*  86 */ "selectnowith ::= selectnowith multiselect_op oneselect",
 /*  87 */ "multiselect_op ::= UNION",
 /*  88 */ "multiselect_op ::= UNION ALL",
 /*  89 */ "multiselect_op ::= EXCEPT|INTERSECT",
 /*  90 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt",
 /*  91 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt",
 /*  92 */ "values ::= VALUES LP nexprlist RP",
 /*  93 */ "values ::= values COMMA LP nexprlist RP",
 /*  94 */ "distinct ::= DISTINCT",
 /*  95 */ "distinct ::= ALL",
 /*  96 */ "distinct ::=",
 /*  97 */ "sclp ::=",
 /*  98 */ "selcollist ::= sclp scanpt expr scanpt as",
 /*  99 */ "selcollist ::= sclp scanpt STAR",
 /* 100 */ "selcollist ::= sclp scanpt nm DOT STAR",
 /* 101 */ "as ::= AS nm",
 /* 102 */ "as ::=",
 /* 103 */ "from ::=",
 /* 104 */ "from ::= FROM seltablist",
 /* 105 */ "stl_prefix ::= seltablist joinop",
 /* 106 */ "stl_prefix ::=",
 /* 107 */ "seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt",
 /* 108 */ "seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt",
 /* 109 */ "seltablist ::= stl_prefix LP select RP as on_opt using_opt",
 /* 110 */ "seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt",
 /* 111 */ "dbnm ::=",
 /* 112 */ "dbnm ::= DOT nm",
 /* 113 */ "fullname ::= nm",
 /* 114 */ "fullname ::= nm DOT nm",
 /* 115 */ "xfullname ::= nm",
 /* 116 */ "xfullname ::= nm DOT nm",
 /* 117 */ "xfullname ::= nm DOT nm AS nm",
 /* 118 */ "xfullname ::= nm AS nm",
 /* 119 */ "joinop ::= COMMA|JOIN",
 /* 120 */ "joinop ::= JOIN_KW JOIN",
 /* 121 */ "joinop ::= JOIN_KW nm JOIN",
 /* 122 */ "joinop ::= JOIN_KW nm nm JOIN",
 /* 123 */ "on_opt ::= ON expr",
 /* 124 */ "on_opt ::=",
 /* 125 */ "indexed_opt ::=",
 /* 126 */ "indexed_opt ::= INDEXED BY nm",
 /* 127 */ "indexed_opt ::= NOT INDEXED",
 /* 128 */ "using_opt ::= USING LP idlist RP",
 /* 129 */ "using_opt ::=",
 /* 130 */ "orderby_opt ::=",
 /* 131 */ "orderby_opt ::= ORDER BY sortlist",
 /* 132 */ "sortlist ::= sortlist COMMA expr sortorder nulls",
 /* 133 */ "sortlist ::= expr sortorder nulls",
 /* 134 */ "sortorder ::= ASC",
 /* 135 */ "sortorder ::= DESC",
 /* 136 */ "sortorder ::=",
 /* 137 */ "nulls ::= NULLS FIRST",
 /* 138 */ "nulls ::= NULLS LAST",
 /* 139 */ "nulls ::=",
 /* 140 */ "groupby_opt ::=",
 /* 141 */ "groupby_opt ::= GROUP BY nexprlist",
 /* 142 */ "having_opt ::=",
 /* 143 */ "having_opt ::= HAVING expr",
 /* 144 */ "limit_opt ::=",
 /* 145 */ "limit_opt ::= LIMIT expr",
 /* 146 */ "limit_opt ::= LIMIT expr OFFSET expr",
 /* 147 */ "limit_opt ::= LIMIT expr COMMA expr",
 /* 148 */ "cmd ::= with DELETE FROM xfullname indexed_opt where_opt",
 /* 149 */ "where_opt ::=",
 /* 150 */ "where_opt ::= WHERE expr",
 /* 151 */ "cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt",
 /* 152 */ "setlist ::= setlist COMMA nm EQ expr",
 /* 153 */ "setlist ::= setlist COMMA LP idlist RP EQ expr",
 /* 154 */ "setlist ::= nm EQ expr",
 /* 155 */ "setlist ::= LP idlist RP EQ expr",
 /* 156 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert",
 /* 157 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES",
 /* 158 */ "upsert ::=",
 /* 159 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt",
 /* 160 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING",
 /* 161 */ "upsert ::= ON CONFLICT DO NOTHING",
 /* 162 */ "insert_cmd ::= INSERT orconf",
 /* 163 */ "insert_cmd ::= REPLACE",
 /* 164 */ "idlist_opt ::=",
 /* 165 */ "idlist_opt ::= LP idlist RP",
 /* 166 */ "idlist ::= idlist COMMA nm",
 /* 167 */ "idlist ::= nm",
 /* 168 */ "expr ::= LP expr RP",
 /* 169 */ "expr ::= ID|INDEXED",
 /* 170 */ "expr ::= JOIN_KW",
 /* 171 */ "expr ::= nm DOT nm",
 /* 172 */ "expr ::= nm DOT nm DOT nm",
 /* 173 */ "term ::= NULL|FLOAT|BLOB",
 /* 174 */ "term ::= STRING",
 /* 175 */ "term ::= INTEGER",
 /* 176 */ "expr ::= VARIABLE",
 /* 177 */ "expr ::= expr COLLATE ID|STRING",
 /* 178 */ "expr ::= CAST LP expr AS typetoken RP",
 /* 179 */ "expr ::= ID|INDEXED LP distinct exprlist RP",
 /* 180 */ "expr ::= ID|INDEXED LP STAR RP",
 /* 181 */ "expr ::= ID|INDEXED LP distinct exprlist RP filter_over",
 /* 182 */ "expr ::= ID|INDEXED LP STAR RP filter_over",
 /* 183 */ "term ::= CTIME_KW",
 /* 184 */ "expr ::= LP nexprlist COMMA expr RP",
 /* 185 */ "expr ::= expr AND expr",
 /* 186 */ "expr ::= expr OR expr",
 /* 187 */ "expr ::= expr LT|GT|GE|LE expr",
 /* 188 */ "expr ::= expr EQ|NE expr",
 /* 189 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr",
 /* 190 */ "expr ::= expr PLUS|MINUS expr",
 /* 191 */ "expr ::= expr STAR|SLASH|REM expr",
 /* 192 */ "expr ::= expr CONCAT expr",
 /* 193 */ "likeop ::= NOT LIKE_KW|MATCH",
 /* 194 */ "expr ::= expr likeop expr",
 /* 195 */ "expr ::= expr likeop expr ESCAPE expr",
 /* 196 */ "expr ::= expr ISNULL|NOTNULL",
 /* 197 */ "expr ::= expr NOT NULL",
 /* 198 */ "expr ::= expr IS expr",
 /* 199 */ "expr ::= expr IS NOT expr",
 /* 200 */ "expr ::= NOT expr",
 /* 201 */ "expr ::= BITNOT expr",
 /* 202 */ "expr ::= PLUS|MINUS expr",
 /* 203 */ "between_op ::= BETWEEN",
 /* 204 */ "between_op ::= NOT BETWEEN",
 /* 205 */ "expr ::= expr between_op expr AND expr",
 /* 206 */ "in_op ::= IN",
 /* 207 */ "in_op ::= NOT IN",
 /* 208 */ "expr ::= expr in_op LP exprlist RP",
 /* 209 */ "expr ::= LP select RP",
 /* 210 */ "expr ::= expr in_op LP select RP",
 /* 211 */ "expr ::= expr in_op nm dbnm paren_exprlist",
 /* 212 */ "expr ::= EXISTS LP select RP",
 /* 213 */ "expr ::= CASE case_operand case_exprlist case_else END",
 /* 214 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr",
 /* 215 */ "case_exprlist ::= WHEN expr THEN expr",
 /* 216 */ "case_else ::= ELSE expr",
 /* 217 */ "case_else ::=",
 /* 218 */ "case_operand ::= expr",
 /* 219 */ "case_operand ::=",
 /* 220 */ "exprlist ::=",
 /* 221 */ "nexprlist ::= nexprlist COMMA expr",
 /* 222 */ "nexprlist ::= expr",
 /* 223 */ "paren_exprlist ::=",
 /* 224 */ "paren_exprlist ::= LP exprlist RP",
 /* 225 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt",
 /* 226 */ "uniqueflag ::= UNIQUE",
 /* 227 */ "uniqueflag ::=",
 /* 228 */ "eidlist_opt ::=",
 /* 229 */ "eidlist_opt ::= LP eidlist RP",
 /* 230 */ "eidlist ::= eidlist COMMA nm collate sortorder",
 /* 231 */ "eidlist ::= nm collate sortorder",
 /* 232 */ "collate ::=",
 /* 233 */ "collate ::= COLLATE ID|STRING",
 /* 234 */ "cmd ::= DROP INDEX ifexists fullname",
 /* 235 */ "cmd ::= VACUUM vinto",
 /* 236 */ "cmd ::= VACUUM nm vinto",
 /* 237 */ "vinto ::= INTO expr",
 /* 238 */ "vinto ::=",
 /* 239 */ "cmd ::= PRAGMA nm dbnm",
 /* 240 */ "cmd ::= PRAGMA nm dbnm EQ nmnum",
 /* 241 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP",
 /* 242 */ "cmd ::= PRAGMA nm dbnm EQ minus_num",
 /* 243 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP",
 /* 244 */ "plus_num ::= PLUS INTEGER|FLOAT",
 /* 245 */ "minus_num ::= MINUS INTEGER|FLOAT",
 /* 246 */ "cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END",
 /* 247 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause",
 /* 248 */ "trigger_time ::= BEFORE|AFTER",
 /* 249 */ "trigger_time ::= INSTEAD OF",
 /* 250 */ "trigger_time ::=",
 /* 251 */ "trigger_event ::= DELETE|INSERT",
 /* 252 */ "trigger_event ::= UPDATE",
 /* 253 */ "trigger_event ::= UPDATE OF idlist",
 /* 254 */ "when_clause ::=",
 /* 255 */ "when_clause ::= WHEN expr",
 /* 256 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI",
 /* 257 */ "trigger_cmd_list ::= trigger_cmd SEMI",
 /* 258 */ "trnm ::= nm DOT nm",
 /* 259 */ "tridxby ::= INDEXED BY nm",
 /* 260 */ "tridxby ::= NOT INDEXED",
 /* 261 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt",
 /* 262 */ "trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt",
 /* 263 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt",
 /* 264 */ "trigger_cmd ::= scanpt select scanpt",
 /* 265 */ "expr ::= RAISE LP IGNORE RP",
 /* 266 */ "expr ::= RAISE LP raisetype COMMA nm RP",
 /* 267 */ "raisetype ::= ROLLBACK",
 /* 268 */ "raisetype ::= ABORT",
 /* 269 */ "raisetype ::= FAIL",
 /* 270 */ "cmd ::= DROP TRIGGER ifexists fullname",
 /* 271 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt",
 /* 272 */ "cmd ::= DETACH database_kw_opt expr",
 /* 273 */ "key_opt ::=",
 /* 274 */ "key_opt ::= KEY expr",
 /* 275 */ "cmd ::= REINDEX",
 /* 276 */ "cmd ::= REINDEX nm dbnm",
 /* 277 */ "cmd ::= ANALYZE",
 /* 278 */ "cmd ::= ANALYZE nm dbnm",
 /* 279 */ "cmd ::= ALTER TABLE fullname RENAME TO nm",
 /* 280 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist",
 /* 281 */ "add_column_fullname ::= fullname",
 /* 282 */ "cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm",
 /* 283 */ "cmd ::= create_vtab",
 /* 284 */ "cmd ::= create_vtab LP vtabarglist RP",
 /* 285 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm",
 /* 286 */ "vtabarg ::=",
 /* 287 */ "vtabargtoken ::= ANY",
 /* 288 */ "vtabargtoken ::= lp anylist RP",
 /* 289 */ "lp ::= LP",
 /* 290 */ "with ::= WITH wqlist",
 /* 291 */ "with ::= WITH RECURSIVE wqlist",
 /* 292 */ "wqlist ::= nm eidlist_opt AS LP select RP",
 /* 293 */ "wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP",
 /* 294 */ "windowdefn_list ::= windowdefn",
 /* 295 */ "windowdefn_list ::= windowdefn_list COMMA windowdefn",
 /* 296 */ "windowdefn ::= nm AS LP window RP",
 /* 297 */ "window ::= PARTITION BY nexprlist orderby_opt frame_opt",
 /* 298 */ "window ::= nm PARTITION BY nexprlist orderby_opt frame_opt",
 /* 299 */ "window ::= ORDER BY sortlist frame_opt",
 /* 300 */ "window ::= nm ORDER BY sortlist frame_opt",
 /* 301 */ "window ::= frame_opt",
 /* 302 */ "window ::= nm frame_opt",
 /* 303 */ "frame_opt ::=",
 /* 304 */ "frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt",
 /* 305 */ "frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt",
 /* 306 */ "range_or_rows ::= RANGE|ROWS|GROUPS",
 /* 307 */ "frame_bound_s ::= frame_bound",
 /* 308 */ "frame_bound_s ::= UNBOUNDED PRECEDING",
 /* 309 */ "frame_bound_e ::= frame_bound",
 /* 310 */ "frame_bound_e ::= UNBOUNDED FOLLOWING",
 /* 311 */ "frame_bound ::= expr PRECEDING|FOLLOWING",
 /* 312 */ "frame_bound ::= CURRENT ROW",
 /* 313 */ "frame_exclude_opt ::=",
 /* 314 */ "frame_exclude_opt ::= EXCLUDE frame_exclude",
 /* 315 */ "frame_exclude ::= NO OTHERS",
 /* 316 */ "frame_exclude ::= CURRENT ROW",
 /* 317 */ "frame_exclude ::= GROUP|TIES",
 /* 318 */ "window_clause ::= WINDOW windowdefn_list",
 /* 319 */ "filter_over ::= filter_clause over_clause",
 /* 320 */ "filter_over ::= over_clause",
 /* 321 */ "filter_over ::= filter_clause",
 /* 322 */ "over_clause ::= OVER LP window RP",
 /* 323 */ "over_clause ::= OVER nm",
 /* 324 */ "filter_clause ::= FILTER LP WHERE expr RP",
 /* 325 */ "input ::= cmdlist",
 /* 326 */ "cmdlist ::= cmdlist ecmd",
 /* 327 */ "cmdlist ::= ecmd",
 /* 328 */ "ecmd ::= SEMI",
 /* 329 */ "ecmd ::= cmdx SEMI",
 /* 330 */ "ecmd ::= explain cmdx SEMI",
 /* 331 */ "trans_opt ::=",
 /* 332 */ "trans_opt ::= TRANSACTION",
 /* 333 */ "trans_opt ::= TRANSACTION nm",
 /* 334 */ "savepoint_opt ::= SAVEPOINT",
 /* 335 */ "savepoint_opt ::=",
 /* 336 */ "cmd ::= create_table create_table_args",
 /* 337 */ "columnlist ::= columnlist COMMA columnname carglist",
 /* 338 */ "columnlist ::= columnname carglist",
 /* 339 */ "nm ::= ID|INDEXED",
 /* 340 */ "nm ::= STRING",
 /* 341 */ "nm ::= JOIN_KW",
 /* 342 */ "typetoken ::= typename",
 /* 343 */ "typename ::= ID|STRING",
 /* 344 */ "signed ::= plus_num",
 /* 345 */ "signed ::= minus_num",
 /* 346 */ "carglist ::= carglist ccons",
 /* 347 */ "carglist ::=",
 /* 348 */ "ccons ::= NULL onconf",
 /* 349 */ "ccons ::= GENERATED ALWAYS AS generated",
 /* 350 */ "ccons ::= AS generated",
 /* 351 */ "conslist_opt ::= COMMA conslist",
 /* 352 */ "conslist ::= conslist tconscomma tcons",
 /* 353 */ "conslist ::= tcons",
 /* 354 */ "tconscomma ::=",
 /* 355 */ "defer_subclause_opt ::= defer_subclause",
 /* 356 */ "resolvetype ::= raisetype",
 /* 357 */ "selectnowith ::= oneselect",
 /* 358 */ "oneselect ::= values",
 /* 359 */ "sclp ::= selcollist COMMA",
 /* 360 */ "as ::= ID|STRING",
 /* 361 */ "expr ::= term",
 /* 362 */ "likeop ::= LIKE_KW|MATCH",
 /* 363 */ "exprlist ::= nexprlist",
 /* 364 */ "nmnum ::= plus_num",
 /* 365 */ "nmnum ::= nm",
 /* 366 */ "nmnum ::= ON",
 /* 367 */ "nmnum ::= DELETE",
 /* 368 */ "nmnum ::= DEFAULT",
 /* 369 */ "plus_num ::= INTEGER|FLOAT",
 /* 370 */ "foreach_clause ::=",
 /* 371 */ "foreach_clause ::= FOR EACH ROW",
 /* 372 */ "trnm ::= nm",
 /* 373 */ "tridxby ::=",
 /* 374 */ "database_kw_opt ::= DATABASE",
 /* 375 */ "database_kw_opt ::=",
 /* 376 */ "kwcolumn_opt ::=",
 /* 377 */ "kwcolumn_opt ::= COLUMNKW",
 /* 378 */ "vtabarglist ::= vtabarg",
 /* 379 */ "vtabarglist ::= vtabarglist COMMA vtabarg",
 /* 380 */ "vtabarg ::= vtabarg vtabargtoken",
 /* 381 */ "anylist ::=",
 /* 382 */ "anylist ::= anylist LP anylist RP",
 /* 383 */ "anylist ::= anylist ANY",
 /* 384 */ "with ::=",
};
#endif /* NDEBUG */


#if YYSTACKDEPTH<=0
/*
** Try to increase the size of the parser stack.  Return the number
** of errors.  Return 0 on success.
*/
static int yyGrowStack(yyParser *p){
  int newSize;
  int idx;
  yyStackEntry *pNew;

  newSize = p->yystksz*2 + 100;
  idx = p->yytos ? (int)(p->yytos - p->yystack) : 0;
  if( p->yystack==&p->yystk0 ){
    pNew = malloc(newSize*sizeof(pNew[0]));
    if( pNew ) pNew[0] = p->yystk0;
  }else{
    pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
  }
  if( pNew ){
    p->yystack = pNew;
    p->yytos = &p->yystack[idx];
#ifndef NDEBUG
    if( yyTraceFILE ){
      fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n",
              yyTracePrompt, p->yystksz, newSize);
    }
#endif
    p->yystksz = newSize;
  }
  return pNew==0; 
}
#endif

/* Datatype of the argument to the memory allocated passed as the
** second argument to sqlite3ParserAlloc() below.  This can be changed by
** putting an appropriate #define in the %include section of the input
** grammar.
*/
#ifndef YYMALLOCARGTYPE
# define YYMALLOCARGTYPE size_t
#endif

/* Initialize a new parser that has already been allocated.
*/
void sqlite3ParserInit(void *yypRawParser sqlite3ParserCTX_PDECL){
  yyParser *yypParser = (yyParser*)yypRawParser;
  sqlite3ParserCTX_STORE
#ifdef YYTRACKMAXSTACKDEPTH
  yypParser->yyhwm = 0;
#endif
#if YYSTACKDEPTH<=0
  yypParser->yytos = NULL;
  yypParser->yystack = NULL;
  yypParser->yystksz = 0;
  if( yyGrowStack(yypParser) ){
    yypParser->yystack = &yypParser->yystk0;
    yypParser->yystksz = 1;
  }
#endif
#ifndef YYNOERRORRECOVERY
  yypParser->yyerrcnt = -1;
#endif
  yypParser->yytos = yypParser->yystack;
  yypParser->yystack[0].stateno = 0;
  yypParser->yystack[0].major = 0;
#if YYSTACKDEPTH>0
  yypParser->yystackEnd = &yypParser->yystack[YYSTACKDEPTH-1];
#endif
}

#ifndef sqlite3Parser_ENGINEALWAYSONSTACK
/* 
** This function allocates a new parser.
** The only argument is a pointer to a function which works like
** malloc.
**
** Inputs:
** A pointer to the function used to allocate memory.
**
** Outputs:
** A pointer to a parser.  This pointer is used in subsequent calls
** to sqlite3Parser and sqlite3ParserFree.
*/
void *sqlite3ParserAlloc(void *(*mallocProc)(YYMALLOCARGTYPE) sqlite3ParserCTX_PDECL){
  yyParser *yypParser;
  yypParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
  if( yypParser ){
    sqlite3ParserCTX_STORE
    sqlite3ParserInit(yypParser sqlite3ParserCTX_PARAM);
  }
  return (void*)yypParser;
}
#endif /* sqlite3Parser_ENGINEALWAYSONSTACK */


/* The following function deletes the "minor type" or semantic value
** associated with a symbol.  The symbol can be either a terminal
** or nonterminal. "yymajor" is the symbol code, and "yypminor" is
** a pointer to the value to be deleted.  The code used to do the 
** deletions is derived from the %destructor and/or %token_destructor
** directives of the input grammar.
*/
static void yy_destructor(
  yyParser *yypParser,    /* The parser */
  YYCODETYPE yymajor,     /* Type code for object to destroy */
  YYMINORTYPE *yypminor   /* The object to be destroyed */
){
  sqlite3ParserARG_FETCH
  sqlite3ParserCTX_FETCH
  switch( yymajor ){
    /* Here is inserted the actions which take place when a
    ** terminal or non-terminal is destroyed.  This can happen
    ** when the symbol is popped from the stack during a
    ** reduce or during error processing or when a parser is 
    ** being destroyed before it is finished parsing.
    **
    ** Note: during a reduce, the only symbols destroyed are those
    ** which appear on the RHS of the rule, but which are *not* used
    ** inside the C code.
    */
/********* Begin destructor definitions ***************************************/
    case 200: /* select */
    case 234: /* selectnowith */
    case 235: /* oneselect */
    case 247: /* values */
{
#line 457 "parse.y"
sqlite3SelectDelete(pParse->db, (yypminor->yy539));
#line 2072 "parse.sql"
}
      break;
    case 211: /* term */
    case 212: /* expr */
    case 241: /* where_opt */
    case 243: /* having_opt */
    case 255: /* on_opt */
    case 271: /* case_operand */
    case 273: /* case_else */
    case 276: /* vinto */
    case 283: /* when_clause */
    case 288: /* key_opt */
    case 302: /* filter_clause */
{
#line 953 "parse.y"
sqlite3ExprDelete(pParse->db, (yypminor->yy202));
#line 2089 "parse.sql"
}
      break;
    case 216: /* eidlist_opt */
    case 226: /* sortlist */
    case 227: /* eidlist */
    case 239: /* selcollist */
    case 242: /* groupby_opt */
    case 244: /* orderby_opt */
    case 248: /* nexprlist */
    case 249: /* sclp */
    case 257: /* exprlist */
    case 262: /* setlist */
    case 270: /* paren_exprlist */
    case 272: /* case_exprlist */
    case 301: /* part_opt */
{
#line 1318 "parse.y"
sqlite3ExprListDelete(pParse->db, (yypminor->yy242));
#line 2108 "parse.sql"
}
      break;
    case 233: /* fullname */
    case 240: /* from */
    case 251: /* seltablist */
    case 252: /* stl_prefix */
    case 258: /* xfullname */
{
#line 704 "parse.y"
sqlite3SrcListDelete(pParse->db, (yypminor->yy47));
#line 2119 "parse.sql"
}
      break;
    case 236: /* wqlist */
{
#line 1601 "parse.y"
sqlite3WithDelete(pParse->db, (yypminor->yy131));
#line 2126 "parse.sql"
}
      break;
    case 246: /* window_clause */
    case 297: /* windowdefn_list */
{
#line 1721 "parse.y"
sqlite3WindowListDelete(pParse->db, (yypminor->yy303));
#line 2134 "parse.sql"
}
      break;
    case 256: /* using_opt */
    case 259: /* idlist */
    case 264: /* idlist_opt */
{
#line 776 "parse.y"
sqlite3IdListDelete(pParse->db, (yypminor->yy600));
#line 2143 "parse.sql"
}
      break;
    case 266: /* filter_over */
    case 298: /* windowdefn */
    case 299: /* window */
    case 300: /* frame_opt */
    case 303: /* over_clause */
{
#line 1658 "parse.y"
sqlite3WindowDelete(pParse->db, (yypminor->yy303));
#line 2154 "parse.sql"
}
      break;
    case 279: /* trigger_cmd_list */
    case 284: /* trigger_cmd */
{
#line 1435 "parse.y"
sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy447));
#line 2162 "parse.sql"
}
      break;
    case 281: /* trigger_event */
{
#line 1421 "parse.y"
sqlite3IdListDelete(pParse->db, (yypminor->yy230).b);
#line 2169 "parse.sql"
}
      break;
    case 305: /* frame_bound */
    case 306: /* frame_bound_s */
    case 307: /* frame_bound_e */
{
#line 1663 "parse.y"
sqlite3ExprDelete(pParse->db, (yypminor->yy77).pExpr);
#line 2178 "parse.sql"
}
      break;
/********* End destructor definitions *****************************************/
    default:  break;   /* If no destructor action specified: do nothing */
  }
}

/*
** Pop the parser's stack once.
**
** If there is a destructor routine associated with the token which
** is popped from the stack, then call it.
*/
static void yy_pop_parser_stack(yyParser *pParser){
  yyStackEntry *yytos;
  assert( pParser->yytos!=0 );
  assert( pParser->yytos > pParser->yystack );
  yytos = pParser->yytos--;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sPopping %s\n",
      yyTracePrompt,
      yyTokenName[yytos->major]);
  }
#endif
  yy_destructor(pParser, yytos->major, &yytos->minor);
}

/*
** Clear all secondary memory allocations from the parser
*/
void sqlite3ParserFinalize(void *p){
  yyParser *pParser = (yyParser*)p;
  while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
#if YYSTACKDEPTH<=0
  if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
#endif
}

#ifndef sqlite3Parser_ENGINEALWAYSONSTACK
/* 
** Deallocate and destroy a parser.  Destructors are called for
** all stack elements before shutting the parser down.
**
** If the YYPARSEFREENEVERNULL macro exists (for example because it
** is defined in a %include section of the input grammar) then it is
** assumed that the input pointer is never NULL.
*/
void sqlite3ParserFree(
  void *p,                    /* The parser to be deleted */
  void (*freeProc)(void*)     /* Function used to reclaim memory */
){
#ifndef YYPARSEFREENEVERNULL
  if( p==0 ) return;
#endif
  sqlite3ParserFinalize(p);
  (*freeProc)(p);
}
#endif /* sqlite3Parser_ENGINEALWAYSONSTACK */

/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
int sqlite3ParserStackPeak(void *p){
  yyParser *pParser = (yyParser*)p;
  return pParser->yyhwm;
}
#endif

/* This array of booleans keeps track of the parser statement
** coverage.  The element yycoverage[X][Y] is set when the parser
** is in state X and has a lookahead token Y.  In a well-tested
** systems, every element of this matrix should end up being set.
*/
#if defined(YYCOVERAGE)
static unsigned char yycoverage[YYNSTATE][YYNTOKEN];
#endif

/*
** Write into out a description of every state/lookahead combination that
**
**   (1)  has not been used by the parser, and
**   (2)  is not a syntax error.
**
** Return the number of missed state/lookahead combinations.
*/
#if defined(YYCOVERAGE)
int sqlite3ParserCoverage(FILE *out){
  int stateno, iLookAhead, i;
  int nMissed = 0;
  for(stateno=0; stateno<YYNSTATE; stateno++){
    i = yy_shift_ofst[stateno];
    for(iLookAhead=0; iLookAhead<YYNTOKEN; iLookAhead++){
      if( yy_lookahead[i+iLookAhead]!=iLookAhead ) continue;
      if( yycoverage[stateno][iLookAhead]==0 ) nMissed++;
      if( out ){
        fprintf(out,"State %d lookahead %s %s\n", stateno,
                yyTokenName[iLookAhead],
                yycoverage[stateno][iLookAhead] ? "ok" : "missed");
      }
    }
  }
  return nMissed;
}
#endif

/*
** Find the appropriate action for a parser given the terminal
** look-ahead token iLookAhead.
*/
static YYACTIONTYPE yy_find_shift_action(
  YYCODETYPE iLookAhead,    /* The look-ahead token */
  YYACTIONTYPE stateno      /* Current state number */
){
  int i;

  if( stateno>YY_MAX_SHIFT ) return stateno;
  assert( stateno <= YY_SHIFT_COUNT );
#if defined(YYCOVERAGE)
  yycoverage[stateno][iLookAhead] = 1;
#endif
  do{
    i = yy_shift_ofst[stateno];
    assert( i>=0 );
    assert( i<=YY_ACTTAB_COUNT );
    assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD );
    assert( iLookAhead!=YYNOCODE );
    assert( iLookAhead < YYNTOKEN );
    i += iLookAhead;
    assert( i<(int)YY_NLOOKAHEAD );
    if( yy_lookahead[i]!=iLookAhead ){
#ifdef YYFALLBACK
      YYCODETYPE iFallback;            /* Fallback token */
      assert( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0]) );
      iFallback = yyFallback[iLookAhead];
      if( iFallback!=0 ){
#ifndef NDEBUG
        if( yyTraceFILE ){
          fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
             yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
        }
#endif
        assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */
        iLookAhead = iFallback;
        continue;
      }
#endif
#ifdef YYWILDCARD
      {
        int j = i - iLookAhead + YYWILDCARD;
        assert( j<(int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])) );
        if( yy_lookahead[j]==YYWILDCARD && iLookAhead>0 ){
#ifndef NDEBUG
          if( yyTraceFILE ){
            fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
               yyTracePrompt, yyTokenName[iLookAhead],
               yyTokenName[YYWILDCARD]);
          }
#endif /* NDEBUG */
          return yy_action[j];
        }
      }
#endif /* YYWILDCARD */
      return yy_default[stateno];
    }else{
      assert( i>=0 && i<sizeof(yy_action)/sizeof(yy_action[0]) );
      return yy_action[i];
    }
  }while(1);
}

/*
** Find the appropriate action for a parser given the non-terminal
** look-ahead token iLookAhead.
*/
static YYACTIONTYPE yy_find_reduce_action(
  YYACTIONTYPE stateno,     /* Current state number */
  YYCODETYPE iLookAhead     /* The look-ahead token */
){
  int i;
#ifdef YYERRORSYMBOL
  if( stateno>YY_REDUCE_COUNT ){
    return yy_default[stateno];
  }
#else
  assert( stateno<=YY_REDUCE_COUNT );
#endif
  i = yy_reduce_ofst[stateno];
  assert( iLookAhead!=YYNOCODE );
  i += iLookAhead;
#ifdef YYERRORSYMBOL
  if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
    return yy_default[stateno];
  }
#else
  assert( i>=0 && i<YY_ACTTAB_COUNT );
  assert( yy_lookahead[i]==iLookAhead );
#endif
  return yy_action[i];
}

/*
** The following routine is called if the stack overflows.
*/
static void yyStackOverflow(yyParser *yypParser){
   sqlite3ParserARG_FETCH
   sqlite3ParserCTX_FETCH
#ifndef NDEBUG
   if( yyTraceFILE ){
     fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
   }
#endif
   while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
   /* Here code is inserted which will execute if the parser
   ** stack every overflows */
/******** Begin %stack_overflow code ******************************************/
#line 41 "parse.y"

  sqlite3ErrorMsg(pParse, "parser stack overflow");
#line 2399 "parse.sql"
/******** End %stack_overflow code ********************************************/
   sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument var */
   sqlite3ParserCTX_STORE
}

/*
** Print tracing information for a SHIFT action
*/
#ifndef NDEBUG
static void yyTraceShift(yyParser *yypParser, int yyNewState, const char *zTag){
  if( yyTraceFILE ){
    if( yyNewState<YYNSTATE ){
      fprintf(yyTraceFILE,"%s%s '%s', go to state %d\n",
         yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
         yyNewState);
    }else{
      fprintf(yyTraceFILE,"%s%s '%s', pending reduce %d\n",
         yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major],
         yyNewState - YY_MIN_REDUCE);
    }
  }
}
#else
# define yyTraceShift(X,Y,Z)
#endif

/*
** Perform a shift action.
*/
static void yy_shift(
  yyParser *yypParser,          /* The parser to be shifted */
  YYACTIONTYPE yyNewState,      /* The new state to shift in */
  YYCODETYPE yyMajor,           /* The major token to shift in */
  sqlite3ParserTOKENTYPE yyMinor        /* The minor token to shift in */
){
  yyStackEntry *yytos;
  yypParser->yytos++;
#ifdef YYTRACKMAXSTACKDEPTH
  if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
    yypParser->yyhwm++;
    assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) );
  }
#endif
#if YYSTACKDEPTH>0 
  if( yypParser->yytos>yypParser->yystackEnd ){
    yypParser->yytos--;
    yyStackOverflow(yypParser);
    return;
  }
#else
  if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){
    if( yyGrowStack(yypParser) ){
      yypParser->yytos--;
      yyStackOverflow(yypParser);
      return;
    }
  }
#endif
  if( yyNewState > YY_MAX_SHIFT ){
    yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
  }
  yytos = yypParser->yytos;
  yytos->stateno = yyNewState;
  yytos->major = yyMajor;
  yytos->minor.yy0 = yyMinor;
  yyTraceShift(yypParser, yyNewState, "Shift");
}

/* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side
** of that rule */
static const YYCODETYPE yyRuleInfoLhs[] = {
   185,  /* (0) explain ::= EXPLAIN */
   185,  /* (1) explain ::= EXPLAIN QUERY PLAN */
   184,  /* (2) cmdx ::= cmd */
   186,  /* (3) cmd ::= BEGIN transtype trans_opt */
   187,  /* (4) transtype ::= */
   187,  /* (5) transtype ::= DEFERRED */
   187,  /* (6) transtype ::= IMMEDIATE */
   187,  /* (7) transtype ::= EXCLUSIVE */
   186,  /* (8) cmd ::= COMMIT|END trans_opt */
   186,  /* (9) cmd ::= ROLLBACK trans_opt */
   186,  /* (10) cmd ::= SAVEPOINT nm */
   186,  /* (11) cmd ::= RELEASE savepoint_opt nm */
   186,  /* (12) cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
   191,  /* (13) create_table ::= createkw temp TABLE ifnotexists nm dbnm */
   193,  /* (14) createkw ::= CREATE */
   195,  /* (15) ifnotexists ::= */
   195,  /* (16) ifnotexists ::= IF NOT EXISTS */
   194,  /* (17) temp ::= TEMP */
   194,  /* (18) temp ::= */
   192,  /* (19) create_table_args ::= LP columnlist conslist_opt RP table_options */
   192,  /* (20) create_table_args ::= AS select */
   199,  /* (21) table_options ::= */
   199,  /* (22) table_options ::= WITHOUT nm */
   201,  /* (23) columnname ::= nm typetoken */
   203,  /* (24) typetoken ::= */
   203,  /* (25) typetoken ::= typename LP signed RP */
   203,  /* (26) typetoken ::= typename LP signed COMMA signed RP */
   204,  /* (27) typename ::= typename ID|STRING */
   208,  /* (28) scanpt ::= */
   209,  /* (29) scantok ::= */
   210,  /* (30) ccons ::= CONSTRAINT nm */
   210,  /* (31) ccons ::= DEFAULT scantok term */
   210,  /* (32) ccons ::= DEFAULT LP expr RP */
   210,  /* (33) ccons ::= DEFAULT PLUS scantok term */
   210,  /* (34) ccons ::= DEFAULT MINUS scantok term */
   210,  /* (35) ccons ::= DEFAULT scantok ID|INDEXED */
   210,  /* (36) ccons ::= NOT NULL onconf */
   210,  /* (37) ccons ::= PRIMARY KEY sortorder onconf autoinc */
   210,  /* (38) ccons ::= UNIQUE onconf */
   210,  /* (39) ccons ::= CHECK LP expr RP */
   210,  /* (40) ccons ::= REFERENCES nm eidlist_opt refargs */
   210,  /* (41) ccons ::= defer_subclause */
   210,  /* (42) ccons ::= COLLATE ID|STRING */
   219,  /* (43) generated ::= LP expr RP */
   219,  /* (44) generated ::= LP expr RP ID */
   215,  /* (45) autoinc ::= */
   215,  /* (46) autoinc ::= AUTOINCR */
   217,  /* (47) refargs ::= */
   217,  /* (48) refargs ::= refargs refarg */
   220,  /* (49) refarg ::= MATCH nm */
   220,  /* (50) refarg ::= ON INSERT refact */
   220,  /* (51) refarg ::= ON DELETE refact */
   220,  /* (52) refarg ::= ON UPDATE refact */
   221,  /* (53) refact ::= SET NULL */
   221,  /* (54) refact ::= SET DEFAULT */
   221,  /* (55) refact ::= CASCADE */
   221,  /* (56) refact ::= RESTRICT */
   221,  /* (57) refact ::= NO ACTION */
   218,  /* (58) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
   218,  /* (59) defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
   222,  /* (60) init_deferred_pred_opt ::= */
   222,  /* (61) init_deferred_pred_opt ::= INITIALLY DEFERRED */
   222,  /* (62) init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
   198,  /* (63) conslist_opt ::= */
   224,  /* (64) tconscomma ::= COMMA */
   225,  /* (65) tcons ::= CONSTRAINT nm */
   225,  /* (66) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
   225,  /* (67) tcons ::= UNIQUE LP sortlist RP onconf */
   225,  /* (68) tcons ::= CHECK LP expr RP onconf */
   225,  /* (69) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
   228,  /* (70) defer_subclause_opt ::= */
   213,  /* (71) onconf ::= */
   213,  /* (72) onconf ::= ON CONFLICT resolvetype */
   229,  /* (73) orconf ::= */
   229,  /* (74) orconf ::= OR resolvetype */
   230,  /* (75) resolvetype ::= IGNORE */
   230,  /* (76) resolvetype ::= REPLACE */
   186,  /* (77) cmd ::= DROP TABLE ifexists fullname */
   232,  /* (78) ifexists ::= IF EXISTS */
   232,  /* (79) ifexists ::= */
   186,  /* (80) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
   186,  /* (81) cmd ::= DROP VIEW ifexists fullname */
   186,  /* (82) cmd ::= select */
   200,  /* (83) select ::= WITH wqlist selectnowith */
   200,  /* (84) select ::= WITH RECURSIVE wqlist selectnowith */
   200,  /* (85) select ::= selectnowith */
   234,  /* (86) selectnowith ::= selectnowith multiselect_op oneselect */
   237,  /* (87) multiselect_op ::= UNION */
   237,  /* (88) multiselect_op ::= UNION ALL */
   237,  /* (89) multiselect_op ::= EXCEPT|INTERSECT */
   235,  /* (90) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
   235,  /* (91) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
   247,  /* (92) values ::= VALUES LP nexprlist RP */
   247,  /* (93) values ::= values COMMA LP nexprlist RP */
   238,  /* (94) distinct ::= DISTINCT */
   238,  /* (95) distinct ::= ALL */
   238,  /* (96) distinct ::= */
   249,  /* (97) sclp ::= */
   239,  /* (98) selcollist ::= sclp scanpt expr scanpt as */
   239,  /* (99) selcollist ::= sclp scanpt STAR */
   239,  /* (100) selcollist ::= sclp scanpt nm DOT STAR */
   250,  /* (101) as ::= AS nm */
   250,  /* (102) as ::= */
   240,  /* (103) from ::= */
   240,  /* (104) from ::= FROM seltablist */
   252,  /* (105) stl_prefix ::= seltablist joinop */
   252,  /* (106) stl_prefix ::= */
   251,  /* (107) seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
   251,  /* (108) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */
   251,  /* (109) seltablist ::= stl_prefix LP select RP as on_opt using_opt */
   251,  /* (110) seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
   196,  /* (111) dbnm ::= */
   196,  /* (112) dbnm ::= DOT nm */
   233,  /* (113) fullname ::= nm */
   233,  /* (114) fullname ::= nm DOT nm */
   258,  /* (115) xfullname ::= nm */
   258,  /* (116) xfullname ::= nm DOT nm */
   258,  /* (117) xfullname ::= nm DOT nm AS nm */
   258,  /* (118) xfullname ::= nm AS nm */
   253,  /* (119) joinop ::= COMMA|JOIN */
   253,  /* (120) joinop ::= JOIN_KW JOIN */
   253,  /* (121) joinop ::= JOIN_KW nm JOIN */
   253,  /* (122) joinop ::= JOIN_KW nm nm JOIN */
   255,  /* (123) on_opt ::= ON expr */
   255,  /* (124) on_opt ::= */
   254,  /* (125) indexed_opt ::= */
   254,  /* (126) indexed_opt ::= INDEXED BY nm */
   254,  /* (127) indexed_opt ::= NOT INDEXED */
   256,  /* (128) using_opt ::= USING LP idlist RP */
   256,  /* (129) using_opt ::= */
   244,  /* (130) orderby_opt ::= */
   244,  /* (131) orderby_opt ::= ORDER BY sortlist */
   226,  /* (132) sortlist ::= sortlist COMMA expr sortorder nulls */
   226,  /* (133) sortlist ::= expr sortorder nulls */
   214,  /* (134) sortorder ::= ASC */
   214,  /* (135) sortorder ::= DESC */
   214,  /* (136) sortorder ::= */
   260,  /* (137) nulls ::= NULLS FIRST */
   260,  /* (138) nulls ::= NULLS LAST */
   260,  /* (139) nulls ::= */
   242,  /* (140) groupby_opt ::= */
   242,  /* (141) groupby_opt ::= GROUP BY nexprlist */
   243,  /* (142) having_opt ::= */
   243,  /* (143) having_opt ::= HAVING expr */
   245,  /* (144) limit_opt ::= */
   245,  /* (145) limit_opt ::= LIMIT expr */
   245,  /* (146) limit_opt ::= LIMIT expr OFFSET expr */
   245,  /* (147) limit_opt ::= LIMIT expr COMMA expr */
   186,  /* (148) cmd ::= with DELETE FROM xfullname indexed_opt where_opt */
   241,  /* (149) where_opt ::= */
   241,  /* (150) where_opt ::= WHERE expr */
   186,  /* (151) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt */
   262,  /* (152) setlist ::= setlist COMMA nm EQ expr */
   262,  /* (153) setlist ::= setlist COMMA LP idlist RP EQ expr */
   262,  /* (154) setlist ::= nm EQ expr */
   262,  /* (155) setlist ::= LP idlist RP EQ expr */
   186,  /* (156) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
   186,  /* (157) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES */
   265,  /* (158) upsert ::= */
   265,  /* (159) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt */
   265,  /* (160) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING */
   265,  /* (161) upsert ::= ON CONFLICT DO NOTHING */
   263,  /* (162) insert_cmd ::= INSERT orconf */
   263,  /* (163) insert_cmd ::= REPLACE */
   264,  /* (164) idlist_opt ::= */
   264,  /* (165) idlist_opt ::= LP idlist RP */
   259,  /* (166) idlist ::= idlist COMMA nm */
   259,  /* (167) idlist ::= nm */
   212,  /* (168) expr ::= LP expr RP */
   212,  /* (169) expr ::= ID|INDEXED */
   212,  /* (170) expr ::= JOIN_KW */
   212,  /* (171) expr ::= nm DOT nm */
   212,  /* (172) expr ::= nm DOT nm DOT nm */
   211,  /* (173) term ::= NULL|FLOAT|BLOB */
   211,  /* (174) term ::= STRING */
   211,  /* (175) term ::= INTEGER */
   212,  /* (176) expr ::= VARIABLE */
   212,  /* (177) expr ::= expr COLLATE ID|STRING */
   212,  /* (178) expr ::= CAST LP expr AS typetoken RP */
   212,  /* (179) expr ::= ID|INDEXED LP distinct exprlist RP */
   212,  /* (180) expr ::= ID|INDEXED LP STAR RP */
   212,  /* (181) expr ::= ID|INDEXED LP distinct exprlist RP filter_over */
   212,  /* (182) expr ::= ID|INDEXED LP STAR RP filter_over */
   211,  /* (183) term ::= CTIME_KW */
   212,  /* (184) expr ::= LP nexprlist COMMA expr RP */
   212,  /* (185) expr ::= expr AND expr */
   212,  /* (186) expr ::= expr OR expr */
   212,  /* (187) expr ::= expr LT|GT|GE|LE expr */
   212,  /* (188) expr ::= expr EQ|NE expr */
   212,  /* (189) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */
   212,  /* (190) expr ::= expr PLUS|MINUS expr */
   212,  /* (191) expr ::= expr STAR|SLASH|REM expr */
   212,  /* (192) expr ::= expr CONCAT expr */
   267,  /* (193) likeop ::= NOT LIKE_KW|MATCH */
   212,  /* (194) expr ::= expr likeop expr */
   212,  /* (195) expr ::= expr likeop expr ESCAPE expr */
   212,  /* (196) expr ::= expr ISNULL|NOTNULL */
   212,  /* (197) expr ::= expr NOT NULL */
   212,  /* (198) expr ::= expr IS expr */
   212,  /* (199) expr ::= expr IS NOT expr */
   212,  /* (200) expr ::= NOT expr */
   212,  /* (201) expr ::= BITNOT expr */
   212,  /* (202) expr ::= PLUS|MINUS expr */
   268,  /* (203) between_op ::= BETWEEN */
   268,  /* (204) between_op ::= NOT BETWEEN */
   212,  /* (205) expr ::= expr between_op expr AND expr */
   269,  /* (206) in_op ::= IN */
   269,  /* (207) in_op ::= NOT IN */
   212,  /* (208) expr ::= expr in_op LP exprlist RP */
   212,  /* (209) expr ::= LP select RP */
   212,  /* (210) expr ::= expr in_op LP select RP */
   212,  /* (211) expr ::= expr in_op nm dbnm paren_exprlist */
   212,  /* (212) expr ::= EXISTS LP select RP */
   212,  /* (213) expr ::= CASE case_operand case_exprlist case_else END */
   272,  /* (214) case_exprlist ::= case_exprlist WHEN expr THEN expr */
   272,  /* (215) case_exprlist ::= WHEN expr THEN expr */
   273,  /* (216) case_else ::= ELSE expr */
   273,  /* (217) case_else ::= */
   271,  /* (218) case_operand ::= expr */
   271,  /* (219) case_operand ::= */
   257,  /* (220) exprlist ::= */
   248,  /* (221) nexprlist ::= nexprlist COMMA expr */
   248,  /* (222) nexprlist ::= expr */
   270,  /* (223) paren_exprlist ::= */
   270,  /* (224) paren_exprlist ::= LP exprlist RP */
   186,  /* (225) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
   274,  /* (226) uniqueflag ::= UNIQUE */
   274,  /* (227) uniqueflag ::= */
   216,  /* (228) eidlist_opt ::= */
   216,  /* (229) eidlist_opt ::= LP eidlist RP */
   227,  /* (230) eidlist ::= eidlist COMMA nm collate sortorder */
   227,  /* (231) eidlist ::= nm collate sortorder */
   275,  /* (232) collate ::= */
   275,  /* (233) collate ::= COLLATE ID|STRING */
   186,  /* (234) cmd ::= DROP INDEX ifexists fullname */
   186,  /* (235) cmd ::= VACUUM vinto */
   186,  /* (236) cmd ::= VACUUM nm vinto */
   276,  /* (237) vinto ::= INTO expr */
   276,  /* (238) vinto ::= */
   186,  /* (239) cmd ::= PRAGMA nm dbnm */
   186,  /* (240) cmd ::= PRAGMA nm dbnm EQ nmnum */
   186,  /* (241) cmd ::= PRAGMA nm dbnm LP nmnum RP */
   186,  /* (242) cmd ::= PRAGMA nm dbnm EQ minus_num */
   186,  /* (243) cmd ::= PRAGMA nm dbnm LP minus_num RP */
   206,  /* (244) plus_num ::= PLUS INTEGER|FLOAT */
   207,  /* (245) minus_num ::= MINUS INTEGER|FLOAT */
   186,  /* (246) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
   278,  /* (247) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
   280,  /* (248) trigger_time ::= BEFORE|AFTER */
   280,  /* (249) trigger_time ::= INSTEAD OF */
   280,  /* (250) trigger_time ::= */
   281,  /* (251) trigger_event ::= DELETE|INSERT */
   281,  /* (252) trigger_event ::= UPDATE */
   281,  /* (253) trigger_event ::= UPDATE OF idlist */
   283,  /* (254) when_clause ::= */
   283,  /* (255) when_clause ::= WHEN expr */
   279,  /* (256) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
   279,  /* (257) trigger_cmd_list ::= trigger_cmd SEMI */
   285,  /* (258) trnm ::= nm DOT nm */
   286,  /* (259) tridxby ::= INDEXED BY nm */
   286,  /* (260) tridxby ::= NOT INDEXED */
   284,  /* (261) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt */
   284,  /* (262) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
   284,  /* (263) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
   284,  /* (264) trigger_cmd ::= scanpt select scanpt */
   212,  /* (265) expr ::= RAISE LP IGNORE RP */
   212,  /* (266) expr ::= RAISE LP raisetype COMMA nm RP */
   231,  /* (267) raisetype ::= ROLLBACK */
   231,  /* (268) raisetype ::= ABORT */
   231,  /* (269) raisetype ::= FAIL */
   186,  /* (270) cmd ::= DROP TRIGGER ifexists fullname */
   186,  /* (271) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
   186,  /* (272) cmd ::= DETACH database_kw_opt expr */
   288,  /* (273) key_opt ::= */
   288,  /* (274) key_opt ::= KEY expr */
   186,  /* (275) cmd ::= REINDEX */
   186,  /* (276) cmd ::= REINDEX nm dbnm */
   186,  /* (277) cmd ::= ANALYZE */
   186,  /* (278) cmd ::= ANALYZE nm dbnm */
   186,  /* (279) cmd ::= ALTER TABLE fullname RENAME TO nm */
   186,  /* (280) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
   289,  /* (281) add_column_fullname ::= fullname */
   186,  /* (282) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
   186,  /* (283) cmd ::= create_vtab */
   186,  /* (284) cmd ::= create_vtab LP vtabarglist RP */
   291,  /* (285) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
   293,  /* (286) vtabarg ::= */
   294,  /* (287) vtabargtoken ::= ANY */
   294,  /* (288) vtabargtoken ::= lp anylist RP */
   295,  /* (289) lp ::= LP */
   261,  /* (290) with ::= WITH wqlist */
   261,  /* (291) with ::= WITH RECURSIVE wqlist */
   236,  /* (292) wqlist ::= nm eidlist_opt AS LP select RP */
   236,  /* (293) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
   297,  /* (294) windowdefn_list ::= windowdefn */
   297,  /* (295) windowdefn_list ::= windowdefn_list COMMA windowdefn */
   298,  /* (296) windowdefn ::= nm AS LP window RP */
   299,  /* (297) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
   299,  /* (298) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
   299,  /* (299) window ::= ORDER BY sortlist frame_opt */
   299,  /* (300) window ::= nm ORDER BY sortlist frame_opt */
   299,  /* (301) window ::= frame_opt */
   299,  /* (302) window ::= nm frame_opt */
   300,  /* (303) frame_opt ::= */
   300,  /* (304) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
   300,  /* (305) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
   304,  /* (306) range_or_rows ::= RANGE|ROWS|GROUPS */
   306,  /* (307) frame_bound_s ::= frame_bound */
   306,  /* (308) frame_bound_s ::= UNBOUNDED PRECEDING */
   307,  /* (309) frame_bound_e ::= frame_bound */
   307,  /* (310) frame_bound_e ::= UNBOUNDED FOLLOWING */
   305,  /* (311) frame_bound ::= expr PRECEDING|FOLLOWING */
   305,  /* (312) frame_bound ::= CURRENT ROW */
   308,  /* (313) frame_exclude_opt ::= */
   308,  /* (314) frame_exclude_opt ::= EXCLUDE frame_exclude */
   309,  /* (315) frame_exclude ::= NO OTHERS */
   309,  /* (316) frame_exclude ::= CURRENT ROW */
   309,  /* (317) frame_exclude ::= GROUP|TIES */
   246,  /* (318) window_clause ::= WINDOW windowdefn_list */
   266,  /* (319) filter_over ::= filter_clause over_clause */
   266,  /* (320) filter_over ::= over_clause */
   266,  /* (321) filter_over ::= filter_clause */
   303,  /* (322) over_clause ::= OVER LP window RP */
   303,  /* (323) over_clause ::= OVER nm */
   302,  /* (324) filter_clause ::= FILTER LP WHERE expr RP */
   181,  /* (325) input ::= cmdlist */
   182,  /* (326) cmdlist ::= cmdlist ecmd */
   182,  /* (327) cmdlist ::= ecmd */
   183,  /* (328) ecmd ::= SEMI */
   183,  /* (329) ecmd ::= cmdx SEMI */
   183,  /* (330) ecmd ::= explain cmdx SEMI */
   188,  /* (331) trans_opt ::= */
   188,  /* (332) trans_opt ::= TRANSACTION */
   188,  /* (333) trans_opt ::= TRANSACTION nm */
   190,  /* (334) savepoint_opt ::= SAVEPOINT */
   190,  /* (335) savepoint_opt ::= */
   186,  /* (336) cmd ::= create_table create_table_args */
   197,  /* (337) columnlist ::= columnlist COMMA columnname carglist */
   197,  /* (338) columnlist ::= columnname carglist */
   189,  /* (339) nm ::= ID|INDEXED */
   189,  /* (340) nm ::= STRING */
   189,  /* (341) nm ::= JOIN_KW */
   203,  /* (342) typetoken ::= typename */
   204,  /* (343) typename ::= ID|STRING */
   205,  /* (344) signed ::= plus_num */
   205,  /* (345) signed ::= minus_num */
   202,  /* (346) carglist ::= carglist ccons */
   202,  /* (347) carglist ::= */
   210,  /* (348) ccons ::= NULL onconf */
   210,  /* (349) ccons ::= GENERATED ALWAYS AS generated */
   210,  /* (350) ccons ::= AS generated */
   198,  /* (351) conslist_opt ::= COMMA conslist */
   223,  /* (352) conslist ::= conslist tconscomma tcons */
   223,  /* (353) conslist ::= tcons */
   224,  /* (354) tconscomma ::= */
   228,  /* (355) defer_subclause_opt ::= defer_subclause */
   230,  /* (356) resolvetype ::= raisetype */
   234,  /* (357) selectnowith ::= oneselect */
   235,  /* (358) oneselect ::= values */
   249,  /* (359) sclp ::= selcollist COMMA */
   250,  /* (360) as ::= ID|STRING */
   212,  /* (361) expr ::= term */
   267,  /* (362) likeop ::= LIKE_KW|MATCH */
   257,  /* (363) exprlist ::= nexprlist */
   277,  /* (364) nmnum ::= plus_num */
   277,  /* (365) nmnum ::= nm */
   277,  /* (366) nmnum ::= ON */
   277,  /* (367) nmnum ::= DELETE */
   277,  /* (368) nmnum ::= DEFAULT */
   206,  /* (369) plus_num ::= INTEGER|FLOAT */
   282,  /* (370) foreach_clause ::= */
   282,  /* (371) foreach_clause ::= FOR EACH ROW */
   285,  /* (372) trnm ::= nm */
   286,  /* (373) tridxby ::= */
   287,  /* (374) database_kw_opt ::= DATABASE */
   287,  /* (375) database_kw_opt ::= */
   290,  /* (376) kwcolumn_opt ::= */
   290,  /* (377) kwcolumn_opt ::= COLUMNKW */
   292,  /* (378) vtabarglist ::= vtabarg */
   292,  /* (379) vtabarglist ::= vtabarglist COMMA vtabarg */
   293,  /* (380) vtabarg ::= vtabarg vtabargtoken */
   296,  /* (381) anylist ::= */
   296,  /* (382) anylist ::= anylist LP anylist RP */
   296,  /* (383) anylist ::= anylist ANY */
   261,  /* (384) with ::= */
};

/* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
** of symbols on the right-hand side of that rule. */
static const signed char yyRuleInfoNRhs[] = {
   -1,  /* (0) explain ::= EXPLAIN */
   -3,  /* (1) explain ::= EXPLAIN QUERY PLAN */
   -1,  /* (2) cmdx ::= cmd */
   -3,  /* (3) cmd ::= BEGIN transtype trans_opt */
    0,  /* (4) transtype ::= */
   -1,  /* (5) transtype ::= DEFERRED */
   -1,  /* (6) transtype ::= IMMEDIATE */
   -1,  /* (7) transtype ::= EXCLUSIVE */
   -2,  /* (8) cmd ::= COMMIT|END trans_opt */
   -2,  /* (9) cmd ::= ROLLBACK trans_opt */
   -2,  /* (10) cmd ::= SAVEPOINT nm */
   -3,  /* (11) cmd ::= RELEASE savepoint_opt nm */
   -5,  /* (12) cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
   -6,  /* (13) create_table ::= createkw temp TABLE ifnotexists nm dbnm */
   -1,  /* (14) createkw ::= CREATE */
    0,  /* (15) ifnotexists ::= */
   -3,  /* (16) ifnotexists ::= IF NOT EXISTS */
   -1,  /* (17) temp ::= TEMP */
    0,  /* (18) temp ::= */
   -5,  /* (19) create_table_args ::= LP columnlist conslist_opt RP table_options */
   -2,  /* (20) create_table_args ::= AS select */
    0,  /* (21) table_options ::= */
   -2,  /* (22) table_options ::= WITHOUT nm */
   -2,  /* (23) columnname ::= nm typetoken */
    0,  /* (24) typetoken ::= */
   -4,  /* (25) typetoken ::= typename LP signed RP */
   -6,  /* (26) typetoken ::= typename LP signed COMMA signed RP */
   -2,  /* (27) typename ::= typename ID|STRING */
    0,  /* (28) scanpt ::= */
    0,  /* (29) scantok ::= */
   -2,  /* (30) ccons ::= CONSTRAINT nm */
   -3,  /* (31) ccons ::= DEFAULT scantok term */
   -4,  /* (32) ccons ::= DEFAULT LP expr RP */
   -4,  /* (33) ccons ::= DEFAULT PLUS scantok term */
   -4,  /* (34) ccons ::= DEFAULT MINUS scantok term */
   -3,  /* (35) ccons ::= DEFAULT scantok ID|INDEXED */
   -3,  /* (36) ccons ::= NOT NULL onconf */
   -5,  /* (37) ccons ::= PRIMARY KEY sortorder onconf autoinc */
   -2,  /* (38) ccons ::= UNIQUE onconf */
   -4,  /* (39) ccons ::= CHECK LP expr RP */
   -4,  /* (40) ccons ::= REFERENCES nm eidlist_opt refargs */
   -1,  /* (41) ccons ::= defer_subclause */
   -2,  /* (42) ccons ::= COLLATE ID|STRING */
   -3,  /* (43) generated ::= LP expr RP */
   -4,  /* (44) generated ::= LP expr RP ID */
    0,  /* (45) autoinc ::= */
   -1,  /* (46) autoinc ::= AUTOINCR */
    0,  /* (47) refargs ::= */
   -2,  /* (48) refargs ::= refargs refarg */
   -2,  /* (49) refarg ::= MATCH nm */
   -3,  /* (50) refarg ::= ON INSERT refact */
   -3,  /* (51) refarg ::= ON DELETE refact */
   -3,  /* (52) refarg ::= ON UPDATE refact */
   -2,  /* (53) refact ::= SET NULL */
   -2,  /* (54) refact ::= SET DEFAULT */
   -1,  /* (55) refact ::= CASCADE */
   -1,  /* (56) refact ::= RESTRICT */
   -2,  /* (57) refact ::= NO ACTION */
   -3,  /* (58) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
   -2,  /* (59) defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
    0,  /* (60) init_deferred_pred_opt ::= */
   -2,  /* (61) init_deferred_pred_opt ::= INITIALLY DEFERRED */
   -2,  /* (62) init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
    0,  /* (63) conslist_opt ::= */
   -1,  /* (64) tconscomma ::= COMMA */
   -2,  /* (65) tcons ::= CONSTRAINT nm */
   -7,  /* (66) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
   -5,  /* (67) tcons ::= UNIQUE LP sortlist RP onconf */
   -5,  /* (68) tcons ::= CHECK LP expr RP onconf */
  -10,  /* (69) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
    0,  /* (70) defer_subclause_opt ::= */
    0,  /* (71) onconf ::= */
   -3,  /* (72) onconf ::= ON CONFLICT resolvetype */
    0,  /* (73) orconf ::= */
   -2,  /* (74) orconf ::= OR resolvetype */
   -1,  /* (75) resolvetype ::= IGNORE */
   -1,  /* (76) resolvetype ::= REPLACE */
   -4,  /* (77) cmd ::= DROP TABLE ifexists fullname */
   -2,  /* (78) ifexists ::= IF EXISTS */
    0,  /* (79) ifexists ::= */
   -9,  /* (80) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
   -4,  /* (81) cmd ::= DROP VIEW ifexists fullname */
   -1,  /* (82) cmd ::= select */
   -3,  /* (83) select ::= WITH wqlist selectnowith */
   -4,  /* (84) select ::= WITH RECURSIVE wqlist selectnowith */
   -1,  /* (85) select ::= selectnowith */
   -3,  /* (86) selectnowith ::= selectnowith multiselect_op oneselect */
   -1,  /* (87) multiselect_op ::= UNION */
   -2,  /* (88) multiselect_op ::= UNION ALL */
   -1,  /* (89) multiselect_op ::= EXCEPT|INTERSECT */
   -9,  /* (90) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
  -10,  /* (91) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
   -4,  /* (92) values ::= VALUES LP nexprlist RP */
   -5,  /* (93) values ::= values COMMA LP nexprlist RP */
   -1,  /* (94) distinct ::= DISTINCT */
   -1,  /* (95) distinct ::= ALL */
    0,  /* (96) distinct ::= */
    0,  /* (97) sclp ::= */
   -5,  /* (98) selcollist ::= sclp scanpt expr scanpt as */
   -3,  /* (99) selcollist ::= sclp scanpt STAR */
   -5,  /* (100) selcollist ::= sclp scanpt nm DOT STAR */
   -2,  /* (101) as ::= AS nm */
    0,  /* (102) as ::= */
    0,  /* (103) from ::= */
   -2,  /* (104) from ::= FROM seltablist */
   -2,  /* (105) stl_prefix ::= seltablist joinop */
    0,  /* (106) stl_prefix ::= */
   -7,  /* (107) seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
   -9,  /* (108) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */
   -7,  /* (109) seltablist ::= stl_prefix LP select RP as on_opt using_opt */
   -7,  /* (110) seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
    0,  /* (111) dbnm ::= */
   -2,  /* (112) dbnm ::= DOT nm */
   -1,  /* (113) fullname ::= nm */
   -3,  /* (114) fullname ::= nm DOT nm */
   -1,  /* (115) xfullname ::= nm */
   -3,  /* (116) xfullname ::= nm DOT nm */
   -5,  /* (117) xfullname ::= nm DOT nm AS nm */
   -3,  /* (118) xfullname ::= nm AS nm */
   -1,  /* (119) joinop ::= COMMA|JOIN */
   -2,  /* (120) joinop ::= JOIN_KW JOIN */
   -3,  /* (121) joinop ::= JOIN_KW nm JOIN */
   -4,  /* (122) joinop ::= JOIN_KW nm nm JOIN */
   -2,  /* (123) on_opt ::= ON expr */
    0,  /* (124) on_opt ::= */
    0,  /* (125) indexed_opt ::= */
   -3,  /* (126) indexed_opt ::= INDEXED BY nm */
   -2,  /* (127) indexed_opt ::= NOT INDEXED */
   -4,  /* (128) using_opt ::= USING LP idlist RP */
    0,  /* (129) using_opt ::= */
    0,  /* (130) orderby_opt ::= */
   -3,  /* (131) orderby_opt ::= ORDER BY sortlist */
   -5,  /* (132) sortlist ::= sortlist COMMA expr sortorder nulls */
   -3,  /* (133) sortlist ::= expr sortorder nulls */
   -1,  /* (134) sortorder ::= ASC */
   -1,  /* (135) sortorder ::= DESC */
    0,  /* (136) sortorder ::= */
   -2,  /* (137) nulls ::= NULLS FIRST */
   -2,  /* (138) nulls ::= NULLS LAST */
    0,  /* (139) nulls ::= */
    0,  /* (140) groupby_opt ::= */
   -3,  /* (141) groupby_opt ::= GROUP BY nexprlist */
    0,  /* (142) having_opt ::= */
   -2,  /* (143) having_opt ::= HAVING expr */
    0,  /* (144) limit_opt ::= */
   -2,  /* (145) limit_opt ::= LIMIT expr */
   -4,  /* (146) limit_opt ::= LIMIT expr OFFSET expr */
   -4,  /* (147) limit_opt ::= LIMIT expr COMMA expr */
   -6,  /* (148) cmd ::= with DELETE FROM xfullname indexed_opt where_opt */
    0,  /* (149) where_opt ::= */
   -2,  /* (150) where_opt ::= WHERE expr */
   -8,  /* (151) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt */
   -5,  /* (152) setlist ::= setlist COMMA nm EQ expr */
   -7,  /* (153) setlist ::= setlist COMMA LP idlist RP EQ expr */
   -3,  /* (154) setlist ::= nm EQ expr */
   -5,  /* (155) setlist ::= LP idlist RP EQ expr */
   -7,  /* (156) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
   -7,  /* (157) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES */
    0,  /* (158) upsert ::= */
  -11,  /* (159) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt */
   -8,  /* (160) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING */
   -4,  /* (161) upsert ::= ON CONFLICT DO NOTHING */
   -2,  /* (162) insert_cmd ::= INSERT orconf */
   -1,  /* (163) insert_cmd ::= REPLACE */
    0,  /* (164) idlist_opt ::= */
   -3,  /* (165) idlist_opt ::= LP idlist RP */
   -3,  /* (166) idlist ::= idlist COMMA nm */
   -1,  /* (167) idlist ::= nm */
   -3,  /* (168) expr ::= LP expr RP */
   -1,  /* (169) expr ::= ID|INDEXED */
   -1,  /* (170) expr ::= JOIN_KW */
   -3,  /* (171) expr ::= nm DOT nm */
   -5,  /* (172) expr ::= nm DOT nm DOT nm */
   -1,  /* (173) term ::= NULL|FLOAT|BLOB */
   -1,  /* (174) term ::= STRING */
   -1,  /* (175) term ::= INTEGER */
   -1,  /* (176) expr ::= VARIABLE */
   -3,  /* (177) expr ::= expr COLLATE ID|STRING */
   -6,  /* (178) expr ::= CAST LP expr AS typetoken RP */
   -5,  /* (179) expr ::= ID|INDEXED LP distinct exprlist RP */
   -4,  /* (180) expr ::= ID|INDEXED LP STAR RP */
   -6,  /* (181) expr ::= ID|INDEXED LP distinct exprlist RP filter_over */
   -5,  /* (182) expr ::= ID|INDEXED LP STAR RP filter_over */
   -1,  /* (183) term ::= CTIME_KW */
   -5,  /* (184) expr ::= LP nexprlist COMMA expr RP */
   -3,  /* (185) expr ::= expr AND expr */
   -3,  /* (186) expr ::= expr OR expr */
   -3,  /* (187) expr ::= expr LT|GT|GE|LE expr */
   -3,  /* (188) expr ::= expr EQ|NE expr */
   -3,  /* (189) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */
   -3,  /* (190) expr ::= expr PLUS|MINUS expr */
   -3,  /* (191) expr ::= expr STAR|SLASH|REM expr */
   -3,  /* (192) expr ::= expr CONCAT expr */
   -2,  /* (193) likeop ::= NOT LIKE_KW|MATCH */
   -3,  /* (194) expr ::= expr likeop expr */
   -5,  /* (195) expr ::= expr likeop expr ESCAPE expr */
   -2,  /* (196) expr ::= expr ISNULL|NOTNULL */
   -3,  /* (197) expr ::= expr NOT NULL */
   -3,  /* (198) expr ::= expr IS expr */
   -4,  /* (199) expr ::= expr IS NOT expr */
   -2,  /* (200) expr ::= NOT expr */
   -2,  /* (201) expr ::= BITNOT expr */
   -2,  /* (202) expr ::= PLUS|MINUS expr */
   -1,  /* (203) between_op ::= BETWEEN */
   -2,  /* (204) between_op ::= NOT BETWEEN */
   -5,  /* (205) expr ::= expr between_op expr AND expr */
   -1,  /* (206) in_op ::= IN */
   -2,  /* (207) in_op ::= NOT IN */
   -5,  /* (208) expr ::= expr in_op LP exprlist RP */
   -3,  /* (209) expr ::= LP select RP */
   -5,  /* (210) expr ::= expr in_op LP select RP */
   -5,  /* (211) expr ::= expr in_op nm dbnm paren_exprlist */
   -4,  /* (212) expr ::= EXISTS LP select RP */
   -5,  /* (213) expr ::= CASE case_operand case_exprlist case_else END */
   -5,  /* (214) case_exprlist ::= case_exprlist WHEN expr THEN expr */
   -4,  /* (215) case_exprlist ::= WHEN expr THEN expr */
   -2,  /* (216) case_else ::= ELSE expr */
    0,  /* (217) case_else ::= */
   -1,  /* (218) case_operand ::= expr */
    0,  /* (219) case_operand ::= */
    0,  /* (220) exprlist ::= */
   -3,  /* (221) nexprlist ::= nexprlist COMMA expr */
   -1,  /* (222) nexprlist ::= expr */
    0,  /* (223) paren_exprlist ::= */
   -3,  /* (224) paren_exprlist ::= LP exprlist RP */
  -12,  /* (225) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
   -1,  /* (226) uniqueflag ::= UNIQUE */
    0,  /* (227) uniqueflag ::= */
    0,  /* (228) eidlist_opt ::= */
   -3,  /* (229) eidlist_opt ::= LP eidlist RP */
   -5,  /* (230) eidlist ::= eidlist COMMA nm collate sortorder */
   -3,  /* (231) eidlist ::= nm collate sortorder */
    0,  /* (232) collate ::= */
   -2,  /* (233) collate ::= COLLATE ID|STRING */
   -4,  /* (234) cmd ::= DROP INDEX ifexists fullname */
   -2,  /* (235) cmd ::= VACUUM vinto */
   -3,  /* (236) cmd ::= VACUUM nm vinto */
   -2,  /* (237) vinto ::= INTO expr */
    0,  /* (238) vinto ::= */
   -3,  /* (239) cmd ::= PRAGMA nm dbnm */
   -5,  /* (240) cmd ::= PRAGMA nm dbnm EQ nmnum */
   -6,  /* (241) cmd ::= PRAGMA nm dbnm LP nmnum RP */
   -5,  /* (242) cmd ::= PRAGMA nm dbnm EQ minus_num */
   -6,  /* (243) cmd ::= PRAGMA nm dbnm LP minus_num RP */
   -2,  /* (244) plus_num ::= PLUS INTEGER|FLOAT */
   -2,  /* (245) minus_num ::= MINUS INTEGER|FLOAT */
   -5,  /* (246) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
  -11,  /* (247) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
   -1,  /* (248) trigger_time ::= BEFORE|AFTER */
   -2,  /* (249) trigger_time ::= INSTEAD OF */
    0,  /* (250) trigger_time ::= */
   -1,  /* (251) trigger_event ::= DELETE|INSERT */
   -1,  /* (252) trigger_event ::= UPDATE */
   -3,  /* (253) trigger_event ::= UPDATE OF idlist */
    0,  /* (254) when_clause ::= */
   -2,  /* (255) when_clause ::= WHEN expr */
   -3,  /* (256) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
   -2,  /* (257) trigger_cmd_list ::= trigger_cmd SEMI */
   -3,  /* (258) trnm ::= nm DOT nm */
   -3,  /* (259) tridxby ::= INDEXED BY nm */
   -2,  /* (260) tridxby ::= NOT INDEXED */
   -8,  /* (261) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt */
   -8,  /* (262) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
   -6,  /* (263) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
   -3,  /* (264) trigger_cmd ::= scanpt select scanpt */
   -4,  /* (265) expr ::= RAISE LP IGNORE RP */
   -6,  /* (266) expr ::= RAISE LP raisetype COMMA nm RP */
   -1,  /* (267) raisetype ::= ROLLBACK */
   -1,  /* (268) raisetype ::= ABORT */
   -1,  /* (269) raisetype ::= FAIL */
   -4,  /* (270) cmd ::= DROP TRIGGER ifexists fullname */
   -6,  /* (271) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
   -3,  /* (272) cmd ::= DETACH database_kw_opt expr */
    0,  /* (273) key_opt ::= */
   -2,  /* (274) key_opt ::= KEY expr */
   -1,  /* (275) cmd ::= REINDEX */
   -3,  /* (276) cmd ::= REINDEX nm dbnm */
   -1,  /* (277) cmd ::= ANALYZE */
   -3,  /* (278) cmd ::= ANALYZE nm dbnm */
   -6,  /* (279) cmd ::= ALTER TABLE fullname RENAME TO nm */
   -7,  /* (280) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
   -1,  /* (281) add_column_fullname ::= fullname */
   -8,  /* (282) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
   -1,  /* (283) cmd ::= create_vtab */
   -4,  /* (284) cmd ::= create_vtab LP vtabarglist RP */
   -8,  /* (285) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
    0,  /* (286) vtabarg ::= */
   -1,  /* (287) vtabargtoken ::= ANY */
   -3,  /* (288) vtabargtoken ::= lp anylist RP */
   -1,  /* (289) lp ::= LP */
   -2,  /* (290) with ::= WITH wqlist */
   -3,  /* (291) with ::= WITH RECURSIVE wqlist */
   -6,  /* (292) wqlist ::= nm eidlist_opt AS LP select RP */
   -8,  /* (293) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
   -1,  /* (294) windowdefn_list ::= windowdefn */
   -3,  /* (295) windowdefn_list ::= windowdefn_list COMMA windowdefn */
   -5,  /* (296) windowdefn ::= nm AS LP window RP */
   -5,  /* (297) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
   -6,  /* (298) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
   -4,  /* (299) window ::= ORDER BY sortlist frame_opt */
   -5,  /* (300) window ::= nm ORDER BY sortlist frame_opt */
   -1,  /* (301) window ::= frame_opt */
   -2,  /* (302) window ::= nm frame_opt */
    0,  /* (303) frame_opt ::= */
   -3,  /* (304) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
   -6,  /* (305) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
   -1,  /* (306) range_or_rows ::= RANGE|ROWS|GROUPS */
   -1,  /* (307) frame_bound_s ::= frame_bound */
   -2,  /* (308) frame_bound_s ::= UNBOUNDED PRECEDING */
   -1,  /* (309) frame_bound_e ::= frame_bound */
   -2,  /* (310) frame_bound_e ::= UNBOUNDED FOLLOWING */
   -2,  /* (311) frame_bound ::= expr PRECEDING|FOLLOWING */
   -2,  /* (312) frame_bound ::= CURRENT ROW */
    0,  /* (313) frame_exclude_opt ::= */
   -2,  /* (314) frame_exclude_opt ::= EXCLUDE frame_exclude */
   -2,  /* (315) frame_exclude ::= NO OTHERS */
   -2,  /* (316) frame_exclude ::= CURRENT ROW */
   -1,  /* (317) frame_exclude ::= GROUP|TIES */
   -2,  /* (318) window_clause ::= WINDOW windowdefn_list */
   -2,  /* (319) filter_over ::= filter_clause over_clause */
   -1,  /* (320) filter_over ::= over_clause */
   -1,  /* (321) filter_over ::= filter_clause */
   -4,  /* (322) over_clause ::= OVER LP window RP */
   -2,  /* (323) over_clause ::= OVER nm */
   -5,  /* (324) filter_clause ::= FILTER LP WHERE expr RP */
   -1,  /* (325) input ::= cmdlist */
   -2,  /* (326) cmdlist ::= cmdlist ecmd */
   -1,  /* (327) cmdlist ::= ecmd */
   -1,  /* (328) ecmd ::= SEMI */
   -2,  /* (329) ecmd ::= cmdx SEMI */
   -3,  /* (330) ecmd ::= explain cmdx SEMI */
    0,  /* (331) trans_opt ::= */
   -1,  /* (332) trans_opt ::= TRANSACTION */
   -2,  /* (333) trans_opt ::= TRANSACTION nm */
   -1,  /* (334) savepoint_opt ::= SAVEPOINT */
    0,  /* (335) savepoint_opt ::= */
   -2,  /* (336) cmd ::= create_table create_table_args */
   -4,  /* (337) columnlist ::= columnlist COMMA columnname carglist */
   -2,  /* (338) columnlist ::= columnname carglist */
   -1,  /* (339) nm ::= ID|INDEXED */
   -1,  /* (340) nm ::= STRING */
   -1,  /* (341) nm ::= JOIN_KW */
   -1,  /* (342) typetoken ::= typename */
   -1,  /* (343) typename ::= ID|STRING */
   -1,  /* (344) signed ::= plus_num */
   -1,  /* (345) signed ::= minus_num */
   -2,  /* (346) carglist ::= carglist ccons */
    0,  /* (347) carglist ::= */
   -2,  /* (348) ccons ::= NULL onconf */
   -4,  /* (349) ccons ::= GENERATED ALWAYS AS generated */
   -2,  /* (350) ccons ::= AS generated */
   -2,  /* (351) conslist_opt ::= COMMA conslist */
   -3,  /* (352) conslist ::= conslist tconscomma tcons */
   -1,  /* (353) conslist ::= tcons */
    0,  /* (354) tconscomma ::= */
   -1,  /* (355) defer_subclause_opt ::= defer_subclause */
   -1,  /* (356) resolvetype ::= raisetype */
   -1,  /* (357) selectnowith ::= oneselect */
   -1,  /* (358) oneselect ::= values */
   -2,  /* (359) sclp ::= selcollist COMMA */
   -1,  /* (360) as ::= ID|STRING */
   -1,  /* (361) expr ::= term */
   -1,  /* (362) likeop ::= LIKE_KW|MATCH */
   -1,  /* (363) exprlist ::= nexprlist */
   -1,  /* (364) nmnum ::= plus_num */
   -1,  /* (365) nmnum ::= nm */
   -1,  /* (366) nmnum ::= ON */
   -1,  /* (367) nmnum ::= DELETE */
   -1,  /* (368) nmnum ::= DEFAULT */
   -1,  /* (369) plus_num ::= INTEGER|FLOAT */
    0,  /* (370) foreach_clause ::= */
   -3,  /* (371) foreach_clause ::= FOR EACH ROW */
   -1,  /* (372) trnm ::= nm */
    0,  /* (373) tridxby ::= */
   -1,  /* (374) database_kw_opt ::= DATABASE */
    0,  /* (375) database_kw_opt ::= */
    0,  /* (376) kwcolumn_opt ::= */
   -1,  /* (377) kwcolumn_opt ::= COLUMNKW */
   -1,  /* (378) vtabarglist ::= vtabarg */
   -3,  /* (379) vtabarglist ::= vtabarglist COMMA vtabarg */
   -2,  /* (380) vtabarg ::= vtabarg vtabargtoken */
    0,  /* (381) anylist ::= */
   -4,  /* (382) anylist ::= anylist LP anylist RP */
   -2,  /* (383) anylist ::= anylist ANY */
    0,  /* (384) with ::= */
};

static void yy_accept(yyParser*);  /* Forward Declaration */

/*
** Perform a reduce action and the shift that must immediately
** follow the reduce.
**
** The yyLookahead and yyLookaheadToken parameters provide reduce actions
** access to the lookahead token (if any).  The yyLookahead will be YYNOCODE
** if the lookahead token has already been consumed.  As this procedure is
** only called from one place, optimizing compilers will in-line it, which
** means that the extra parameters have no performance impact.
*/
static YYACTIONTYPE yy_reduce(
  yyParser *yypParser,         /* The parser */
  unsigned int yyruleno,       /* Number of the rule by which to reduce */
  int yyLookahead,             /* Lookahead token, or YYNOCODE if none */
  sqlite3ParserTOKENTYPE yyLookaheadToken  /* Value of the lookahead token */
  sqlite3ParserCTX_PDECL                   /* %extra_context */
){
  int yygoto;                     /* The next state */
  YYACTIONTYPE yyact;             /* The next action */
  yyStackEntry *yymsp;            /* The top of the parser's stack */
  int yysize;                     /* Amount to pop the stack */
  sqlite3ParserARG_FETCH
  (void)yyLookahead;
  (void)yyLookaheadToken;
  yymsp = yypParser->yytos;
#ifndef NDEBUG
  if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
    yysize = yyRuleInfoNRhs[yyruleno];
    if( yysize ){
      fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n",
        yyTracePrompt,
        yyruleno, yyRuleName[yyruleno],
        yyruleno<YYNRULE_WITH_ACTION ? "" : " without external action",
        yymsp[yysize].stateno);
    }else{
      fprintf(yyTraceFILE, "%sReduce %d [%s]%s.\n",
        yyTracePrompt, yyruleno, yyRuleName[yyruleno],
        yyruleno<YYNRULE_WITH_ACTION ? "" : " without external action");
    }
  }
#endif /* NDEBUG */

  /* Check that the stack is large enough to grow by a single entry
  ** if the RHS of the rule is empty.  This ensures that there is room
  ** enough on the stack to push the LHS value */
  if( yyRuleInfoNRhs[yyruleno]==0 ){
#ifdef YYTRACKMAXSTACKDEPTH
    if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
      yypParser->yyhwm++;
      assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack));
    }
#endif
#if YYSTACKDEPTH>0 
    if( yypParser->yytos>=yypParser->yystackEnd ){
      yyStackOverflow(yypParser);
      /* The call to yyStackOverflow() above pops the stack until it is
      ** empty, causing the main parser loop to exit.  So the return value
      ** is never used and does not matter. */
      return 0;
    }
#else
    if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
      if( yyGrowStack(yypParser) ){
        yyStackOverflow(yypParser);
        /* The call to yyStackOverflow() above pops the stack until it is
        ** empty, causing the main parser loop to exit.  So the return value
        ** is never used and does not matter. */
        return 0;
      }
      yymsp = yypParser->yytos;
    }
#endif
  }

  switch( yyruleno ){
  /* Beginning here are the reduction cases.  A typical example
  ** follows:
  **   case 0:
  **  #line <lineno> <grammarfile>
  **     { ... }           // User supplied code
  **  #line <lineno> <thisfile>
  **     break;
  */
/********** Begin reduce actions **********************************************/
        YYMINORTYPE yylhsminor;
      case 0: /* explain ::= EXPLAIN */
#line 124 "parse.y"
{ pParse->explain = 1; }
#line 3338 "parse.sql"
        break;
      case 1: /* explain ::= EXPLAIN QUERY PLAN */
#line 125 "parse.y"
{ pParse->explain = 2; }
#line 3343 "parse.sql"
        break;
      case 2: /* cmdx ::= cmd */
#line 127 "parse.y"
{ sqlite3FinishCoding(pParse); }
#line 3348 "parse.sql"
        break;
      case 3: /* cmd ::= BEGIN transtype trans_opt */
#line 132 "parse.y"
{sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy192);}
#line 3353 "parse.sql"
        break;
      case 4: /* transtype ::= */
#line 137 "parse.y"
{yymsp[1].minor.yy192 = TK_DEFERRED;}
#line 3358 "parse.sql"
        break;
      case 5: /* transtype ::= DEFERRED */
      case 6: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==6);
      case 7: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==7);
      case 306: /* range_or_rows ::= RANGE|ROWS|GROUPS */ yytestcase(yyruleno==306);
#line 138 "parse.y"
{yymsp[0].minor.yy192 = yymsp[0].major; /*A-overwrites-X*/}
#line 3366 "parse.sql"
        break;
      case 8: /* cmd ::= COMMIT|END trans_opt */
      case 9: /* cmd ::= ROLLBACK trans_opt */ yytestcase(yyruleno==9);
#line 141 "parse.y"
{sqlite3EndTransaction(pParse,yymsp[-1].major);}
#line 3372 "parse.sql"
        break;
      case 10: /* cmd ::= SAVEPOINT nm */
#line 146 "parse.y"
{
  sqlite3Savepoint(pParse, SAVEPOINT_BEGIN, &yymsp[0].minor.yy0);
}
#line 3379 "parse.sql"
        break;
      case 11: /* cmd ::= RELEASE savepoint_opt nm */
#line 149 "parse.y"
{
  sqlite3Savepoint(pParse, SAVEPOINT_RELEASE, &yymsp[0].minor.yy0);
}
#line 3386 "parse.sql"
        break;
      case 12: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
#line 152 "parse.y"
{
  sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0);
}
#line 3393 "parse.sql"
        break;
      case 13: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */
#line 159 "parse.y"
{
   sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy192,0,0,yymsp[-2].minor.yy192);
}
#line 3400 "parse.sql"
        break;
      case 14: /* createkw ::= CREATE */
#line 162 "parse.y"
{disableLookaside(pParse);}
#line 3405 "parse.sql"
        break;
      case 15: /* ifnotexists ::= */
      case 18: /* temp ::= */ yytestcase(yyruleno==18);
      case 21: /* table_options ::= */ yytestcase(yyruleno==21);
      case 45: /* autoinc ::= */ yytestcase(yyruleno==45);
      case 60: /* init_deferred_pred_opt ::= */ yytestcase(yyruleno==60);
      case 70: /* defer_subclause_opt ::= */ yytestcase(yyruleno==70);
      case 79: /* ifexists ::= */ yytestcase(yyruleno==79);
      case 96: /* distinct ::= */ yytestcase(yyruleno==96);
      case 232: /* collate ::= */ yytestcase(yyruleno==232);
#line 165 "parse.y"
{yymsp[1].minor.yy192 = 0;}
#line 3418 "parse.sql"
        break;
      case 16: /* ifnotexists ::= IF NOT EXISTS */
#line 166 "parse.y"
{yymsp[-2].minor.yy192 = 1;}
#line 3423 "parse.sql"
        break;
      case 17: /* temp ::= TEMP */
      case 46: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==46);
#line 169 "parse.y"
{yymsp[0].minor.yy192 = 1;}
#line 3429 "parse.sql"
        break;
      case 19: /* create_table_args ::= LP columnlist conslist_opt RP table_options */
#line 172 "parse.y"
{
  sqlite3EndTable(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,yymsp[0].minor.yy192,0);
}
#line 3436 "parse.sql"
        break;
      case 20: /* create_table_args ::= AS select */
#line 175 "parse.y"
{
  sqlite3EndTable(pParse,0,0,0,yymsp[0].minor.yy539);
  sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy539);
}
#line 3444 "parse.sql"
        break;
      case 22: /* table_options ::= WITHOUT nm */
#line 181 "parse.y"
{
  if( yymsp[0].minor.yy0.n==5 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,"rowid",5)==0 ){
    yymsp[-1].minor.yy192 = TF_WithoutRowid | TF_NoVisibleRowid;
  }else{
    yymsp[-1].minor.yy192 = 0;
    sqlite3ErrorMsg(pParse, "unknown table option: %.*s", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z);
  }
}
#line 3456 "parse.sql"
        break;
      case 23: /* columnname ::= nm typetoken */
#line 191 "parse.y"
{sqlite3AddColumn(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);}
#line 3461 "parse.sql"
        break;
      case 24: /* typetoken ::= */
      case 63: /* conslist_opt ::= */ yytestcase(yyruleno==63);
      case 102: /* as ::= */ yytestcase(yyruleno==102);
#line 277 "parse.y"
{yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = 0;}
#line 3468 "parse.sql"
        break;
      case 25: /* typetoken ::= typename LP signed RP */
#line 279 "parse.y"
{
  yymsp[-3].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z);
}
#line 3475 "parse.sql"
        break;
      case 26: /* typetoken ::= typename LP signed COMMA signed RP */
#line 282 "parse.y"
{
  yymsp[-5].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z);
}
#line 3482 "parse.sql"
        break;
      case 27: /* typename ::= typename ID|STRING */
#line 287 "parse.y"
{yymsp[-1].minor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);}
#line 3487 "parse.sql"
        break;
      case 28: /* scanpt ::= */
#line 305 "parse.y"
{
  assert( yyLookahead!=YYNOCODE );
  yymsp[1].minor.yy436 = yyLookaheadToken.z;
}
#line 3495 "parse.sql"
        break;
      case 29: /* scantok ::= */
#line 309 "parse.y"
{
  assert( yyLookahead!=YYNOCODE );
  yymsp[1].minor.yy0 = yyLookaheadToken;
}
#line 3503 "parse.sql"
        break;
      case 30: /* ccons ::= CONSTRAINT nm */
      case 65: /* tcons ::= CONSTRAINT nm */ yytestcase(yyruleno==65);
#line 319 "parse.y"
{pParse->constraintName = yymsp[0].minor.yy0;}
#line 3509 "parse.sql"
        break;
      case 31: /* ccons ::= DEFAULT scantok term */
#line 321 "parse.y"
{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy202,yymsp[-1].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}
#line 3514 "parse.sql"
        break;
      case 32: /* ccons ::= DEFAULT LP expr RP */
#line 323 "parse.y"
{sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy202,yymsp[-2].minor.yy0.z+1,yymsp[0].minor.yy0.z);}
#line 3519 "parse.sql"
        break;
      case 33: /* ccons ::= DEFAULT PLUS scantok term */
#line 325 "parse.y"
{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy202,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}
#line 3524 "parse.sql"
        break;
      case 34: /* ccons ::= DEFAULT MINUS scantok term */
#line 326 "parse.y"
{
  Expr *p = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy202, 0);
  sqlite3AddDefaultValue(pParse,p,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);
}
#line 3532 "parse.sql"
        break;
      case 35: /* ccons ::= DEFAULT scantok ID|INDEXED */
#line 330 "parse.y"
{
  Expr *p = tokenExpr(pParse, TK_STRING, yymsp[0].minor.yy0);
  if( p ){
    sqlite3ExprIdToTrueFalse(p);
    testcase( p->op==TK_TRUEFALSE && sqlite3ExprTruthValue(p) );
  }
    sqlite3AddDefaultValue(pParse,p,yymsp[0].minor.yy0.z,yymsp[0].minor.yy0.z+yymsp[0].minor.yy0.n);
}
#line 3544 "parse.sql"
        break;
      case 36: /* ccons ::= NOT NULL onconf */
#line 343 "parse.y"
{sqlite3AddNotNull(pParse, yymsp[0].minor.yy192);}
#line 3549 "parse.sql"
        break;
      case 37: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */
#line 345 "parse.y"
{sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy192,yymsp[0].minor.yy192,yymsp[-2].minor.yy192);}
#line 3554 "parse.sql"
        break;
      case 38: /* ccons ::= UNIQUE onconf */
#line 346 "parse.y"
{sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy192,0,0,0,0,
                                   SQLITE_IDXTYPE_UNIQUE);}
#line 3560 "parse.sql"
        break;
      case 39: /* ccons ::= CHECK LP expr RP */
#line 348 "parse.y"
{sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy202);}
#line 3565 "parse.sql"
        break;
      case 40: /* ccons ::= REFERENCES nm eidlist_opt refargs */
#line 350 "parse.y"
{sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy242,yymsp[0].minor.yy192);}
#line 3570 "parse.sql"
        break;
      case 41: /* ccons ::= defer_subclause */
#line 351 "parse.y"
{sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy192);}
#line 3575 "parse.sql"
        break;
      case 42: /* ccons ::= COLLATE ID|STRING */
#line 352 "parse.y"
{sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);}
#line 3580 "parse.sql"
        break;
      case 43: /* generated ::= LP expr RP */
#line 355 "parse.y"
{sqlite3AddGenerated(pParse,yymsp[-1].minor.yy202,0);}
#line 3585 "parse.sql"
        break;
      case 44: /* generated ::= LP expr RP ID */
#line 356 "parse.y"
{sqlite3AddGenerated(pParse,yymsp[-2].minor.yy202,&yymsp[0].minor.yy0);}
#line 3590 "parse.sql"
        break;
      case 47: /* refargs ::= */
#line 369 "parse.y"
{ yymsp[1].minor.yy192 = OE_None*0x0101; /* EV: R-19803-45884 */}
#line 3595 "parse.sql"
        break;
      case 48: /* refargs ::= refargs refarg */
#line 370 "parse.y"
{ yymsp[-1].minor.yy192 = (yymsp[-1].minor.yy192 & ~yymsp[0].minor.yy207.mask) | yymsp[0].minor.yy207.value; }
#line 3600 "parse.sql"
        break;
      case 49: /* refarg ::= MATCH nm */
#line 372 "parse.y"
{ yymsp[-1].minor.yy207.value = 0;     yymsp[-1].minor.yy207.mask = 0x000000; }
#line 3605 "parse.sql"
        break;
      case 50: /* refarg ::= ON INSERT refact */
#line 373 "parse.y"
{ yymsp[-2].minor.yy207.value = 0;     yymsp[-2].minor.yy207.mask = 0x000000; }
#line 3610 "parse.sql"
        break;
      case 51: /* refarg ::= ON DELETE refact */
#line 374 "parse.y"
{ yymsp[-2].minor.yy207.value = yymsp[0].minor.yy192;     yymsp[-2].minor.yy207.mask = 0x0000ff; }
#line 3615 "parse.sql"
        break;
      case 52: /* refarg ::= ON UPDATE refact */
#line 375 "parse.y"
{ yymsp[-2].minor.yy207.value = yymsp[0].minor.yy192<<8;  yymsp[-2].minor.yy207.mask = 0x00ff00; }
#line 3620 "parse.sql"
        break;
      case 53: /* refact ::= SET NULL */
#line 377 "parse.y"
{ yymsp[-1].minor.yy192 = OE_SetNull;  /* EV: R-33326-45252 */}
#line 3625 "parse.sql"
        break;
      case 54: /* refact ::= SET DEFAULT */
#line 378 "parse.y"
{ yymsp[-1].minor.yy192 = OE_SetDflt;  /* EV: R-33326-45252 */}
#line 3630 "parse.sql"
        break;
      case 55: /* refact ::= CASCADE */
#line 379 "parse.y"
{ yymsp[0].minor.yy192 = OE_Cascade;  /* EV: R-33326-45252 */}
#line 3635 "parse.sql"
        break;
      case 56: /* refact ::= RESTRICT */
#line 380 "parse.y"
{ yymsp[0].minor.yy192 = OE_Restrict; /* EV: R-33326-45252 */}
#line 3640 "parse.sql"
        break;
      case 57: /* refact ::= NO ACTION */
#line 381 "parse.y"
{ yymsp[-1].minor.yy192 = OE_None;     /* EV: R-33326-45252 */}
#line 3645 "parse.sql"
        break;
      case 58: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
#line 383 "parse.y"
{yymsp[-2].minor.yy192 = 0;}
#line 3650 "parse.sql"
        break;
      case 59: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
      case 74: /* orconf ::= OR resolvetype */ yytestcase(yyruleno==74);
      case 162: /* insert_cmd ::= INSERT orconf */ yytestcase(yyruleno==162);
#line 384 "parse.y"
{yymsp[-1].minor.yy192 = yymsp[0].minor.yy192;}
#line 3657 "parse.sql"
        break;
      case 61: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */
      case 78: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==78);
      case 204: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==204);
      case 207: /* in_op ::= NOT IN */ yytestcase(yyruleno==207);
      case 233: /* collate ::= COLLATE ID|STRING */ yytestcase(yyruleno==233);
#line 387 "parse.y"
{yymsp[-1].minor.yy192 = 1;}
#line 3666 "parse.sql"
        break;
      case 62: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
#line 388 "parse.y"
{yymsp[-1].minor.yy192 = 0;}
#line 3671 "parse.sql"
        break;
      case 64: /* tconscomma ::= COMMA */
#line 394 "parse.y"
{pParse->constraintName.n = 0;}
#line 3676 "parse.sql"
        break;
      case 66: /* tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
#line 398 "parse.y"
{sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy242,yymsp[0].minor.yy192,yymsp[-2].minor.yy192,0);}
#line 3681 "parse.sql"
        break;
      case 67: /* tcons ::= UNIQUE LP sortlist RP onconf */
#line 400 "parse.y"
{sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy242,yymsp[0].minor.yy192,0,0,0,0,
                                       SQLITE_IDXTYPE_UNIQUE);}
#line 3687 "parse.sql"
        break;
      case 68: /* tcons ::= CHECK LP expr RP onconf */
#line 403 "parse.y"
{sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy202);}
#line 3692 "parse.sql"
        break;
      case 69: /* tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
#line 405 "parse.y"
{
    sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy242, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy242, yymsp[-1].minor.yy192);
    sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy192);
}
#line 3700 "parse.sql"
        break;
      case 71: /* onconf ::= */
      case 73: /* orconf ::= */ yytestcase(yyruleno==73);
#line 419 "parse.y"
{yymsp[1].minor.yy192 = OE_Default;}
#line 3706 "parse.sql"
        break;
      case 72: /* onconf ::= ON CONFLICT resolvetype */
#line 420 "parse.y"
{yymsp[-2].minor.yy192 = yymsp[0].minor.yy192;}
#line 3711 "parse.sql"
        break;
      case 75: /* resolvetype ::= IGNORE */
#line 424 "parse.y"
{yymsp[0].minor.yy192 = OE_Ignore;}
#line 3716 "parse.sql"
        break;
      case 76: /* resolvetype ::= REPLACE */
      case 163: /* insert_cmd ::= REPLACE */ yytestcase(yyruleno==163);
#line 425 "parse.y"
{yymsp[0].minor.yy192 = OE_Replace;}
#line 3722 "parse.sql"
        break;
      case 77: /* cmd ::= DROP TABLE ifexists fullname */
#line 429 "parse.y"
{
  sqlite3DropTable(pParse, yymsp[0].minor.yy47, 0, yymsp[-1].minor.yy192);
}
#line 3729 "parse.sql"
        break;
      case 80: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
#line 440 "parse.y"
{
  sqlite3CreateView(pParse, &yymsp[-8].minor.yy0, &yymsp[-4].minor.yy0, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy242, yymsp[0].minor.yy539, yymsp[-7].minor.yy192, yymsp[-5].minor.yy192);
}
#line 3736 "parse.sql"
        break;
      case 81: /* cmd ::= DROP VIEW ifexists fullname */
#line 443 "parse.y"
{
  sqlite3DropTable(pParse, yymsp[0].minor.yy47, 1, yymsp[-1].minor.yy192);
}
#line 3743 "parse.sql"
        break;
      case 82: /* cmd ::= select */
#line 450 "parse.y"
{
  SelectDest dest = {SRT_Output, 0, 0, 0, 0, 0};
  sqlite3Select(pParse, yymsp[0].minor.yy539, &dest);
  sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy539);
}
#line 3752 "parse.sql"
        break;
      case 83: /* select ::= WITH wqlist selectnowith */
#line 489 "parse.y"
{
  Select *p = yymsp[0].minor.yy539;
  if( p ){
    p->pWith = yymsp[-1].minor.yy131;
    parserDoubleLinkSelect(pParse, p);
  }else{
    sqlite3WithDelete(pParse->db, yymsp[-1].minor.yy131);
  }
  yymsp[-2].minor.yy539 = p;
}
#line 3766 "parse.sql"
        break;
      case 84: /* select ::= WITH RECURSIVE wqlist selectnowith */
#line 499 "parse.y"
{
  Select *p = yymsp[0].minor.yy539;
  if( p ){
    p->pWith = yymsp[-1].minor.yy131;
    parserDoubleLinkSelect(pParse, p);
  }else{
    sqlite3WithDelete(pParse->db, yymsp[-1].minor.yy131);
  }
  yymsp[-3].minor.yy539 = p;
}
#line 3780 "parse.sql"
        break;
      case 85: /* select ::= selectnowith */
#line 510 "parse.y"
{
  Select *p = yymsp[0].minor.yy539;
  if( p ){
    parserDoubleLinkSelect(pParse, p);
  }
  yymsp[0].minor.yy539 = p; /*A-overwrites-X*/
}
#line 3791 "parse.sql"
        break;
      case 86: /* selectnowith ::= selectnowith multiselect_op oneselect */
#line 520 "parse.y"
{
  Select *pRhs = yymsp[0].minor.yy539;
  Select *pLhs = yymsp[-2].minor.yy539;
  if( pRhs && pRhs->pPrior ){
    SrcList *pFrom;
    Token x;
    x.n = 0;
    parserDoubleLinkSelect(pParse, pRhs);
    pFrom = sqlite3SrcListAppendFromTerm(pParse,0,0,0,&x,pRhs,0,0);
    pRhs = sqlite3SelectNew(pParse,0,pFrom,0,0,0,0,0,0);
  }
  if( pRhs ){
    pRhs->op = (u8)yymsp[-1].minor.yy192;
    pRhs->pPrior = pLhs;
    if( ALWAYS(pLhs) ) pLhs->selFlags &= ~SF_MultiValue;
    pRhs->selFlags &= ~SF_MultiValue;
    if( yymsp[-1].minor.yy192!=TK_ALL ) pParse->hasCompound = 1;
  }else{
    sqlite3SelectDelete(pParse->db, pLhs);
  }
  yymsp[-2].minor.yy539 = pRhs;
}
#line 3817 "parse.sql"
        break;
      case 87: /* multiselect_op ::= UNION */
      case 89: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==89);
#line 543 "parse.y"
{yymsp[0].minor.yy192 = yymsp[0].major; /*A-overwrites-OP*/}
#line 3823 "parse.sql"
        break;
      case 88: /* multiselect_op ::= UNION ALL */
#line 544 "parse.y"
{yymsp[-1].minor.yy192 = TK_ALL;}
#line 3828 "parse.sql"
        break;
      case 90: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
#line 550 "parse.y"
{
  yymsp[-8].minor.yy539 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy242,yymsp[-5].minor.yy47,yymsp[-4].minor.yy202,yymsp[-3].minor.yy242,yymsp[-2].minor.yy202,yymsp[-1].minor.yy242,yymsp[-7].minor.yy192,yymsp[0].minor.yy202);
}
#line 3835 "parse.sql"
        break;
      case 91: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
#line 556 "parse.y"
{
  yymsp[-9].minor.yy539 = sqlite3SelectNew(pParse,yymsp[-7].minor.yy242,yymsp[-6].minor.yy47,yymsp[-5].minor.yy202,yymsp[-4].minor.yy242,yymsp[-3].minor.yy202,yymsp[-1].minor.yy242,yymsp[-8].minor.yy192,yymsp[0].minor.yy202);
  if( yymsp[-9].minor.yy539 ){
    yymsp[-9].minor.yy539->pWinDefn = yymsp[-2].minor.yy303;
  }else{
    sqlite3WindowListDelete(pParse->db, yymsp[-2].minor.yy303);
  }
}
#line 3847 "parse.sql"
        break;
      case 92: /* values ::= VALUES LP nexprlist RP */
#line 571 "parse.y"
{
  yymsp[-3].minor.yy539 = sqlite3SelectNew(pParse,yymsp[-1].minor.yy242,0,0,0,0,0,SF_Values,0);
}
#line 3854 "parse.sql"
        break;
      case 93: /* values ::= values COMMA LP nexprlist RP */
#line 574 "parse.y"
{
  Select *pRight, *pLeft = yymsp[-4].minor.yy539;
  pRight = sqlite3SelectNew(pParse,yymsp[-1].minor.yy242,0,0,0,0,0,SF_Values|SF_MultiValue,0);
  if( ALWAYS(pLeft) ) pLeft->selFlags &= ~SF_MultiValue;
  if( pRight ){
    pRight->op = TK_ALL;
    pRight->pPrior = pLeft;
    yymsp[-4].minor.yy539 = pRight;
  }else{
    yymsp[-4].minor.yy539 = pLeft;
  }
}
#line 3870 "parse.sql"
        break;
      case 94: /* distinct ::= DISTINCT */
#line 591 "parse.y"
{yymsp[0].minor.yy192 = SF_Distinct;}
#line 3875 "parse.sql"
        break;
      case 95: /* distinct ::= ALL */
#line 592 "parse.y"
{yymsp[0].minor.yy192 = SF_All;}
#line 3880 "parse.sql"
        break;
      case 97: /* sclp ::= */
      case 130: /* orderby_opt ::= */ yytestcase(yyruleno==130);
      case 140: /* groupby_opt ::= */ yytestcase(yyruleno==140);
      case 220: /* exprlist ::= */ yytestcase(yyruleno==220);
      case 223: /* paren_exprlist ::= */ yytestcase(yyruleno==223);
      case 228: /* eidlist_opt ::= */ yytestcase(yyruleno==228);
#line 605 "parse.y"
{yymsp[1].minor.yy242 = 0;}
#line 3890 "parse.sql"
        break;
      case 98: /* selcollist ::= sclp scanpt expr scanpt as */
#line 606 "parse.y"
{
   yymsp[-4].minor.yy242 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy242, yymsp[-2].minor.yy202);
   if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy242, &yymsp[0].minor.yy0, 1);
   sqlite3ExprListSetSpan(pParse,yymsp[-4].minor.yy242,yymsp[-3].minor.yy436,yymsp[-1].minor.yy436);
}
#line 3899 "parse.sql"
        break;
      case 99: /* selcollist ::= sclp scanpt STAR */
#line 611 "parse.y"
{
  Expr *p = sqlite3Expr(pParse->db, TK_ASTERISK, 0);
  yymsp[-2].minor.yy242 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy242, p);
}
#line 3907 "parse.sql"
        break;
      case 100: /* selcollist ::= sclp scanpt nm DOT STAR */
#line 615 "parse.y"
{
  Expr *pRight = sqlite3PExpr(pParse, TK_ASTERISK, 0, 0);
  Expr *pLeft = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-2].minor.yy0, 1);
  Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight);
  yymsp[-4].minor.yy242 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy242, pDot);
}
#line 3917 "parse.sql"
        break;
      case 101: /* as ::= AS nm */
      case 112: /* dbnm ::= DOT nm */ yytestcase(yyruleno==112);
      case 244: /* plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==244);
      case 245: /* minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==245);
#line 626 "parse.y"
{yymsp[-1].minor.yy0 = yymsp[0].minor.yy0;}
#line 3925 "parse.sql"
        break;
      case 103: /* from ::= */
#line 640 "parse.y"
{yymsp[1].minor.yy47 = sqlite3DbMallocZero(pParse->db, sizeof(*yymsp[1].minor.yy47));}
#line 3930 "parse.sql"
        break;
      case 104: /* from ::= FROM seltablist */
#line 641 "parse.y"
{
  yymsp[-1].minor.yy47 = yymsp[0].minor.yy47;
  sqlite3SrcListShiftJoinType(yymsp[-1].minor.yy47);
}
#line 3938 "parse.sql"
        break;
      case 105: /* stl_prefix ::= seltablist joinop */
#line 649 "parse.y"
{
   if( ALWAYS(yymsp[-1].minor.yy47 && yymsp[-1].minor.yy47->nSrc>0) ) yymsp[-1].minor.yy47->a[yymsp[-1].minor.yy47->nSrc-1].fg.jointype = (u8)yymsp[0].minor.yy192;
}
#line 3945 "parse.sql"
        break;
      case 106: /* stl_prefix ::= */
#line 652 "parse.y"
{yymsp[1].minor.yy47 = 0;}
#line 3950 "parse.sql"
        break;
      case 107: /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
#line 654 "parse.y"
{
  yymsp[-6].minor.yy47 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy47,&yymsp[-5].minor.yy0,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,0,yymsp[-1].minor.yy202,yymsp[0].minor.yy600);
  sqlite3SrcListIndexedBy(pParse, yymsp[-6].minor.yy47, &yymsp[-2].minor.yy0);
}
#line 3958 "parse.sql"
        break;
      case 108: /* seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */
#line 659 "parse.y"
{
  yymsp[-8].minor.yy47 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-8].minor.yy47,&yymsp[-7].minor.yy0,&yymsp[-6].minor.yy0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy202,yymsp[0].minor.yy600);
  sqlite3SrcListFuncArgs(pParse, yymsp[-8].minor.yy47, yymsp[-4].minor.yy242);
}
#line 3966 "parse.sql"
        break;
      case 109: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */
#line 665 "parse.y"
{
    yymsp[-6].minor.yy47 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy47,0,0,&yymsp[-2].minor.yy0,yymsp[-4].minor.yy539,yymsp[-1].minor.yy202,yymsp[0].minor.yy600);
  }
#line 3973 "parse.sql"
        break;
      case 110: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
#line 669 "parse.y"
{
    if( yymsp[-6].minor.yy47==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy202==0 && yymsp[0].minor.yy600==0 ){
      yymsp[-6].minor.yy47 = yymsp[-4].minor.yy47;
    }else if( yymsp[-4].minor.yy47->nSrc==1 ){
      yymsp[-6].minor.yy47 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy47,0,0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy202,yymsp[0].minor.yy600);
      if( yymsp[-6].minor.yy47 ){
        struct SrcList_item *pNew = &yymsp[-6].minor.yy47->a[yymsp[-6].minor.yy47->nSrc-1];
        struct SrcList_item *pOld = yymsp[-4].minor.yy47->a;
        pNew->zName = pOld->zName;
        pNew->zDatabase = pOld->zDatabase;
        pNew->pSelect = pOld->pSelect;
        if( pOld->fg.isTabFunc ){
          pNew->u1.pFuncArg = pOld->u1.pFuncArg;
          pOld->u1.pFuncArg = 0;
          pOld->fg.isTabFunc = 0;
          pNew->fg.isTabFunc = 1;
        }
        pOld->zName = pOld->zDatabase = 0;
        pOld->pSelect = 0;
      }
      sqlite3SrcListDelete(pParse->db, yymsp[-4].minor.yy47);
    }else{
      Select *pSubquery;
      sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy47);
      pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy47,0,0,0,0,SF_NestedFrom,0);
      yymsp[-6].minor.yy47 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy47,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy202,yymsp[0].minor.yy600);
    }
  }
#line 4005 "parse.sql"
        break;
      case 111: /* dbnm ::= */
      case 125: /* indexed_opt ::= */ yytestcase(yyruleno==125);
#line 700 "parse.y"
{yymsp[1].minor.yy0.z=0; yymsp[1].minor.yy0.n=0;}
#line 4011 "parse.sql"
        break;
      case 113: /* fullname ::= nm */
#line 705 "parse.y"
{
  yylhsminor.yy47 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0);
  if( IN_RENAME_OBJECT && yylhsminor.yy47 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy47->a[0].zName, &yymsp[0].minor.yy0);
}
#line 4019 "parse.sql"
  yymsp[0].minor.yy47 = yylhsminor.yy47;
        break;
      case 114: /* fullname ::= nm DOT nm */
#line 709 "parse.y"
{
  yylhsminor.yy47 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
  if( IN_RENAME_OBJECT && yylhsminor.yy47 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy47->a[0].zName, &yymsp[0].minor.yy0);
}
#line 4028 "parse.sql"
  yymsp[-2].minor.yy47 = yylhsminor.yy47;
        break;
      case 115: /* xfullname ::= nm */
#line 717 "parse.y"
{yymsp[0].minor.yy47 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0); /*A-overwrites-X*/}
#line 4034 "parse.sql"
        break;
      case 116: /* xfullname ::= nm DOT nm */
#line 719 "parse.y"
{yymsp[-2].minor.yy47 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/}
#line 4039 "parse.sql"
        break;
      case 117: /* xfullname ::= nm DOT nm AS nm */
#line 720 "parse.y"
{
   yymsp[-4].minor.yy47 = sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,&yymsp[-2].minor.yy0); /*A-overwrites-X*/
   if( yymsp[-4].minor.yy47 ) yymsp[-4].minor.yy47->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
}
#line 4047 "parse.sql"
        break;
      case 118: /* xfullname ::= nm AS nm */
#line 724 "parse.y"
{  
   yymsp[-2].minor.yy47 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,0); /*A-overwrites-X*/
   if( yymsp[-2].minor.yy47 ) yymsp[-2].minor.yy47->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
}
#line 4055 "parse.sql"
        break;
      case 119: /* joinop ::= COMMA|JOIN */
#line 730 "parse.y"
{ yymsp[0].minor.yy192 = JT_INNER; }
#line 4060 "parse.sql"
        break;
      case 120: /* joinop ::= JOIN_KW JOIN */
#line 732 "parse.y"
{yymsp[-1].minor.yy192 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0);  /*X-overwrites-A*/}
#line 4065 "parse.sql"
        break;
      case 121: /* joinop ::= JOIN_KW nm JOIN */
#line 734 "parse.y"
{yymsp[-2].minor.yy192 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); /*X-overwrites-A*/}
#line 4070 "parse.sql"
        break;
      case 122: /* joinop ::= JOIN_KW nm nm JOIN */
#line 736 "parse.y"
{yymsp[-3].minor.yy192 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);/*X-overwrites-A*/}
#line 4075 "parse.sql"
        break;
      case 123: /* on_opt ::= ON expr */
      case 143: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==143);
      case 150: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==150);
      case 216: /* case_else ::= ELSE expr */ yytestcase(yyruleno==216);
      case 237: /* vinto ::= INTO expr */ yytestcase(yyruleno==237);
#line 757 "parse.y"
{yymsp[-1].minor.yy202 = yymsp[0].minor.yy202;}
#line 4084 "parse.sql"
        break;
      case 124: /* on_opt ::= */
      case 142: /* having_opt ::= */ yytestcase(yyruleno==142);
      case 144: /* limit_opt ::= */ yytestcase(yyruleno==144);
      case 149: /* where_opt ::= */ yytestcase(yyruleno==149);
      case 217: /* case_else ::= */ yytestcase(yyruleno==217);
      case 219: /* case_operand ::= */ yytestcase(yyruleno==219);
      case 238: /* vinto ::= */ yytestcase(yyruleno==238);
#line 758 "parse.y"
{yymsp[1].minor.yy202 = 0;}
#line 4095 "parse.sql"
        break;
      case 126: /* indexed_opt ::= INDEXED BY nm */
#line 772 "parse.y"
{yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;}
#line 4100 "parse.sql"
        break;
      case 127: /* indexed_opt ::= NOT INDEXED */
#line 773 "parse.y"
{yymsp[-1].minor.yy0.z=0; yymsp[-1].minor.yy0.n=1;}
#line 4105 "parse.sql"
        break;
      case 128: /* using_opt ::= USING LP idlist RP */
#line 777 "parse.y"
{yymsp[-3].minor.yy600 = yymsp[-1].minor.yy600;}
#line 4110 "parse.sql"
        break;
      case 129: /* using_opt ::= */
      case 164: /* idlist_opt ::= */ yytestcase(yyruleno==164);
#line 778 "parse.y"
{yymsp[1].minor.yy600 = 0;}
#line 4116 "parse.sql"
        break;
      case 131: /* orderby_opt ::= ORDER BY sortlist */
      case 141: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==141);
#line 792 "parse.y"
{yymsp[-2].minor.yy242 = yymsp[0].minor.yy242;}
#line 4122 "parse.sql"
        break;
      case 132: /* sortlist ::= sortlist COMMA expr sortorder nulls */
#line 793 "parse.y"
{
  yymsp[-4].minor.yy242 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy242,yymsp[-2].minor.yy202);
  sqlite3ExprListSetSortOrder(yymsp[-4].minor.yy242,yymsp[-1].minor.yy192,yymsp[0].minor.yy192);
}
#line 4130 "parse.sql"
        break;
      case 133: /* sortlist ::= expr sortorder nulls */
#line 797 "parse.y"
{
  yymsp[-2].minor.yy242 = sqlite3ExprListAppend(pParse,0,yymsp[-2].minor.yy202); /*A-overwrites-Y*/
  sqlite3ExprListSetSortOrder(yymsp[-2].minor.yy242,yymsp[-1].minor.yy192,yymsp[0].minor.yy192);
}
#line 4138 "parse.sql"
        break;
      case 134: /* sortorder ::= ASC */
#line 804 "parse.y"
{yymsp[0].minor.yy192 = SQLITE_SO_ASC;}
#line 4143 "parse.sql"
        break;
      case 135: /* sortorder ::= DESC */
#line 805 "parse.y"
{yymsp[0].minor.yy192 = SQLITE_SO_DESC;}
#line 4148 "parse.sql"
        break;
      case 136: /* sortorder ::= */
      case 139: /* nulls ::= */ yytestcase(yyruleno==139);
#line 806 "parse.y"
{yymsp[1].minor.yy192 = SQLITE_SO_UNDEFINED;}
#line 4154 "parse.sql"
        break;
      case 137: /* nulls ::= NULLS FIRST */
#line 809 "parse.y"
{yymsp[-1].minor.yy192 = SQLITE_SO_ASC;}
#line 4159 "parse.sql"
        break;
      case 138: /* nulls ::= NULLS LAST */
#line 810 "parse.y"
{yymsp[-1].minor.yy192 = SQLITE_SO_DESC;}
#line 4164 "parse.sql"
        break;
      case 145: /* limit_opt ::= LIMIT expr */
#line 835 "parse.y"
{yymsp[-1].minor.yy202 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy202,0);}
#line 4169 "parse.sql"
        break;
      case 146: /* limit_opt ::= LIMIT expr OFFSET expr */
#line 837 "parse.y"
{yymsp[-3].minor.yy202 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[-2].minor.yy202,yymsp[0].minor.yy202);}
#line 4174 "parse.sql"
        break;
      case 147: /* limit_opt ::= LIMIT expr COMMA expr */
#line 839 "parse.y"
{yymsp[-3].minor.yy202 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy202,yymsp[-2].minor.yy202);}
#line 4179 "parse.sql"
        break;
      case 148: /* cmd ::= with DELETE FROM xfullname indexed_opt where_opt */
#line 855 "parse.y"
{
  sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy47, &yymsp[-1].minor.yy0);
  sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy47,yymsp[0].minor.yy202,0,0);
}
#line 4187 "parse.sql"
        break;
      case 151: /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt */
#line 879 "parse.y"
{
  sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy47, &yymsp[-3].minor.yy0);
  sqlite3ExprListCheckLength(pParse,yymsp[-1].minor.yy242,"set list"); 
  sqlite3Update(pParse,yymsp[-4].minor.yy47,yymsp[-1].minor.yy242,yymsp[0].minor.yy202,yymsp[-5].minor.yy192,0,0,0);
}
#line 4196 "parse.sql"
        break;
      case 152: /* setlist ::= setlist COMMA nm EQ expr */
#line 889 "parse.y"
{
  yymsp[-4].minor.yy242 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy242, yymsp[0].minor.yy202);
  sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy242, &yymsp[-2].minor.yy0, 1);
}
#line 4204 "parse.sql"
        break;
      case 153: /* setlist ::= setlist COMMA LP idlist RP EQ expr */
#line 893 "parse.y"
{
  yymsp[-6].minor.yy242 = sqlite3ExprListAppendVector(pParse, yymsp[-6].minor.yy242, yymsp[-3].minor.yy600, yymsp[0].minor.yy202);
}
#line 4211 "parse.sql"
        break;
      case 154: /* setlist ::= nm EQ expr */
#line 896 "parse.y"
{
  yylhsminor.yy242 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy202);
  sqlite3ExprListSetName(pParse, yylhsminor.yy242, &yymsp[-2].minor.yy0, 1);
}
#line 4219 "parse.sql"
  yymsp[-2].minor.yy242 = yylhsminor.yy242;
        break;
      case 155: /* setlist ::= LP idlist RP EQ expr */
#line 900 "parse.y"
{
  yymsp[-4].minor.yy242 = sqlite3ExprListAppendVector(pParse, 0, yymsp[-3].minor.yy600, yymsp[0].minor.yy202);
}
#line 4227 "parse.sql"
        break;
      case 156: /* cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
#line 907 "parse.y"
{
  sqlite3Insert(pParse, yymsp[-3].minor.yy47, yymsp[-1].minor.yy539, yymsp[-2].minor.yy600, yymsp[-5].minor.yy192, yymsp[0].minor.yy318);
}
#line 4234 "parse.sql"
        break;
      case 157: /* cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES */
#line 911 "parse.y"
{
  sqlite3Insert(pParse, yymsp[-3].minor.yy47, 0, yymsp[-2].minor.yy600, yymsp[-5].minor.yy192, 0);
}
#line 4241 "parse.sql"
        break;
      case 158: /* upsert ::= */
#line 922 "parse.y"
{ yymsp[1].minor.yy318 = 0; }
#line 4246 "parse.sql"
        break;
      case 159: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt */
#line 925 "parse.y"
{ yymsp[-10].minor.yy318 = sqlite3UpsertNew(pParse->db,yymsp[-7].minor.yy242,yymsp[-5].minor.yy202,yymsp[-1].minor.yy242,yymsp[0].minor.yy202);}
#line 4251 "parse.sql"
        break;
      case 160: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING */
#line 927 "parse.y"
{ yymsp[-7].minor.yy318 = sqlite3UpsertNew(pParse->db,yymsp[-4].minor.yy242,yymsp[-2].minor.yy202,0,0); }
#line 4256 "parse.sql"
        break;
      case 161: /* upsert ::= ON CONFLICT DO NOTHING */
#line 929 "parse.y"
{ yymsp[-3].minor.yy318 = sqlite3UpsertNew(pParse->db,0,0,0,0); }
#line 4261 "parse.sql"
        break;
      case 165: /* idlist_opt ::= LP idlist RP */
#line 941 "parse.y"
{yymsp[-2].minor.yy600 = yymsp[-1].minor.yy600;}
#line 4266 "parse.sql"
        break;
      case 166: /* idlist ::= idlist COMMA nm */
#line 943 "parse.y"
{yymsp[-2].minor.yy600 = sqlite3IdListAppend(pParse,yymsp[-2].minor.yy600,&yymsp[0].minor.yy0);}
#line 4271 "parse.sql"
        break;
      case 167: /* idlist ::= nm */
#line 945 "parse.y"
{yymsp[0].minor.yy600 = sqlite3IdListAppend(pParse,0,&yymsp[0].minor.yy0); /*A-overwrites-Y*/}
#line 4276 "parse.sql"
        break;
      case 168: /* expr ::= LP expr RP */
#line 995 "parse.y"
{yymsp[-2].minor.yy202 = yymsp[-1].minor.yy202;}
#line 4281 "parse.sql"
        break;
      case 169: /* expr ::= ID|INDEXED */
      case 170: /* expr ::= JOIN_KW */ yytestcase(yyruleno==170);
#line 996 "parse.y"
{yymsp[0].minor.yy202=tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0); /*A-overwrites-X*/}
#line 4287 "parse.sql"
        break;
      case 171: /* expr ::= nm DOT nm */
#line 998 "parse.y"
{
  Expr *temp1 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-2].minor.yy0, 1);
  Expr *temp2 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[0].minor.yy0, 1);
  if( IN_RENAME_OBJECT ){
    sqlite3RenameTokenMap(pParse, (void*)temp2, &yymsp[0].minor.yy0);
    sqlite3RenameTokenMap(pParse, (void*)temp1, &yymsp[-2].minor.yy0);
  }
  yylhsminor.yy202 = sqlite3PExpr(pParse, TK_DOT, temp1, temp2);
}
#line 4300 "parse.sql"
  yymsp[-2].minor.yy202 = yylhsminor.yy202;
        break;
      case 172: /* expr ::= nm DOT nm DOT nm */
#line 1007 "parse.y"
{
  Expr *temp1 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-4].minor.yy0, 1);
  Expr *temp2 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-2].minor.yy0, 1);
  Expr *temp3 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[0].minor.yy0, 1);
  Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3);
  if( IN_RENAME_OBJECT ){
    sqlite3RenameTokenMap(pParse, (void*)temp3, &yymsp[0].minor.yy0);
    sqlite3RenameTokenMap(pParse, (void*)temp2, &yymsp[-2].minor.yy0);
  }
  yylhsminor.yy202 = sqlite3PExpr(pParse, TK_DOT, temp1, temp4);
}
#line 4316 "parse.sql"
  yymsp[-4].minor.yy202 = yylhsminor.yy202;
        break;
      case 173: /* term ::= NULL|FLOAT|BLOB */
      case 174: /* term ::= STRING */ yytestcase(yyruleno==174);
#line 1018 "parse.y"
{yymsp[0].minor.yy202=tokenExpr(pParse,yymsp[0].major,yymsp[0].minor.yy0); /*A-overwrites-X*/}
#line 4323 "parse.sql"
        break;
      case 175: /* term ::= INTEGER */
#line 1020 "parse.y"
{
  yylhsminor.yy202 = sqlite3ExprAlloc(pParse->db, TK_INTEGER, &yymsp[0].minor.yy0, 1);
}
#line 4330 "parse.sql"
  yymsp[0].minor.yy202 = yylhsminor.yy202;
        break;
      case 176: /* expr ::= VARIABLE */
#line 1023 "parse.y"
{
  if( !(yymsp[0].minor.yy0.z[0]=='#' && sqlite3Isdigit(yymsp[0].minor.yy0.z[1])) ){
    u32 n = yymsp[0].minor.yy0.n;
    yymsp[0].minor.yy202 = tokenExpr(pParse, TK_VARIABLE, yymsp[0].minor.yy0);
    sqlite3ExprAssignVarNumber(pParse, yymsp[0].minor.yy202, n);
  }else{
    /* When doing a nested parse, one can include terms in an expression
    ** that look like this:   #1 #2 ...  These terms refer to registers
    ** in the virtual machine.  #N is the N-th register. */
    Token t = yymsp[0].minor.yy0; /*A-overwrites-X*/
    assert( t.n>=2 );
    if( pParse->nested==0 ){
      sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &t);
      yymsp[0].minor.yy202 = 0;
    }else{
      yymsp[0].minor.yy202 = sqlite3PExpr(pParse, TK_REGISTER, 0, 0);
      if( yymsp[0].minor.yy202 ) sqlite3GetInt32(&t.z[1], &yymsp[0].minor.yy202->iTable);
    }
  }
}
#line 4355 "parse.sql"
        break;
      case 177: /* expr ::= expr COLLATE ID|STRING */
#line 1043 "parse.y"
{
  yymsp[-2].minor.yy202 = sqlite3ExprAddCollateToken(pParse, yymsp[-2].minor.yy202, &yymsp[0].minor.yy0, 1);
}
#line 4362 "parse.sql"
        break;
      case 178: /* expr ::= CAST LP expr AS typetoken RP */
#line 1047 "parse.y"
{
  yymsp[-5].minor.yy202 = sqlite3ExprAlloc(pParse->db, TK_CAST, &yymsp[-1].minor.yy0, 1);
  sqlite3ExprAttachSubtrees(pParse->db, yymsp[-5].minor.yy202, yymsp[-3].minor.yy202, 0);
}
#line 4370 "parse.sql"
        break;
      case 179: /* expr ::= ID|INDEXED LP distinct exprlist RP */
#line 1054 "parse.y"
{
  yylhsminor.yy202 = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy242, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy192);
}
#line 4377 "parse.sql"
  yymsp[-4].minor.yy202 = yylhsminor.yy202;
        break;
      case 180: /* expr ::= ID|INDEXED LP STAR RP */
#line 1057 "parse.y"
{
  yylhsminor.yy202 = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0, 0);
}
#line 4385 "parse.sql"
  yymsp[-3].minor.yy202 = yylhsminor.yy202;
        break;
      case 181: /* expr ::= ID|INDEXED LP distinct exprlist RP filter_over */
#line 1062 "parse.y"
{
  yylhsminor.yy202 = sqlite3ExprFunction(pParse, yymsp[-2].minor.yy242, &yymsp[-5].minor.yy0, yymsp[-3].minor.yy192);
  sqlite3WindowAttach(pParse, yylhsminor.yy202, yymsp[0].minor.yy303);
}
#line 4394 "parse.sql"
  yymsp[-5].minor.yy202 = yylhsminor.yy202;
        break;
      case 182: /* expr ::= ID|INDEXED LP STAR RP filter_over */
#line 1066 "parse.y"
{
  yylhsminor.yy202 = sqlite3ExprFunction(pParse, 0, &yymsp[-4].minor.yy0, 0);
  sqlite3WindowAttach(pParse, yylhsminor.yy202, yymsp[0].minor.yy303);
}
#line 4403 "parse.sql"
  yymsp[-4].minor.yy202 = yylhsminor.yy202;
        break;
      case 183: /* term ::= CTIME_KW */
#line 1072 "parse.y"
{
  yylhsminor.yy202 = sqlite3ExprFunction(pParse, 0, &yymsp[0].minor.yy0, 0);
}
#line 4411 "parse.sql"
  yymsp[0].minor.yy202 = yylhsminor.yy202;
        break;
      case 184: /* expr ::= LP nexprlist COMMA expr RP */
#line 1076 "parse.y"
{
  ExprList *pList = sqlite3ExprListAppend(pParse, yymsp[-3].minor.yy242, yymsp[-1].minor.yy202);
  yymsp[-4].minor.yy202 = sqlite3PExpr(pParse, TK_VECTOR, 0, 0);
  if( yymsp[-4].minor.yy202 ){
    yymsp[-4].minor.yy202->x.pList = pList;
    if( ALWAYS(pList->nExpr) ){
      yymsp[-4].minor.yy202->flags |= pList->a[0].pExpr->flags & EP_Propagate;
    }
  }else{
    sqlite3ExprListDelete(pParse->db, pList);
  }
}
#line 4428 "parse.sql"
        break;
      case 185: /* expr ::= expr AND expr */
#line 1089 "parse.y"
{yymsp[-2].minor.yy202=sqlite3ExprAnd(pParse,yymsp[-2].minor.yy202,yymsp[0].minor.yy202);}
#line 4433 "parse.sql"
        break;
      case 186: /* expr ::= expr OR expr */
      case 187: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==187);
      case 188: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==188);
      case 189: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==189);
      case 190: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==190);
      case 191: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==191);
      case 192: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==192);
#line 1090 "parse.y"
{yymsp[-2].minor.yy202=sqlite3PExpr(pParse,yymsp[-1].major,yymsp[-2].minor.yy202,yymsp[0].minor.yy202);}
#line 4444 "parse.sql"
        break;
      case 193: /* likeop ::= NOT LIKE_KW|MATCH */
#line 1103 "parse.y"
{yymsp[-1].minor.yy0=yymsp[0].minor.yy0; yymsp[-1].minor.yy0.n|=0x80000000; /*yymsp[-1].minor.yy0-overwrite-yymsp[0].minor.yy0*/}
#line 4449 "parse.sql"
        break;
      case 194: /* expr ::= expr likeop expr */
#line 1104 "parse.y"
{
  ExprList *pList;
  int bNot = yymsp[-1].minor.yy0.n & 0x80000000;
  yymsp[-1].minor.yy0.n &= 0x7fffffff;
  pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy202);
  pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy202);
  yymsp[-2].minor.yy202 = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy0, 0);
  if( bNot ) yymsp[-2].minor.yy202 = sqlite3PExpr(pParse, TK_NOT, yymsp[-2].minor.yy202, 0);
  if( yymsp[-2].minor.yy202 ) yymsp[-2].minor.yy202->flags |= EP_InfixFunc;
}
#line 4463 "parse.sql"
        break;
      case 195: /* expr ::= expr likeop expr ESCAPE expr */
#line 1114 "parse.y"
{
  ExprList *pList;
  int bNot = yymsp[-3].minor.yy0.n & 0x80000000;
  yymsp[-3].minor.yy0.n &= 0x7fffffff;
  pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy202);
  pList = sqlite3ExprListAppend(pParse,pList, yymsp[-4].minor.yy202);
  pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy202);
  yymsp[-4].minor.yy202 = sqlite3ExprFunction(pParse, pList, &yymsp[-3].minor.yy0, 0);
  if( bNot ) yymsp[-4].minor.yy202 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy202, 0);
  if( yymsp[-4].minor.yy202 ) yymsp[-4].minor.yy202->flags |= EP_InfixFunc;
}
#line 4478 "parse.sql"
        break;
      case 196: /* expr ::= expr ISNULL|NOTNULL */
#line 1126 "parse.y"
{yymsp[-1].minor.yy202 = sqlite3PExpr(pParse,yymsp[0].major,yymsp[-1].minor.yy202,0);}
#line 4483 "parse.sql"
        break;
      case 197: /* expr ::= expr NOT NULL */
#line 1127 "parse.y"
{yymsp[-2].minor.yy202 = sqlite3PExpr(pParse,TK_NOTNULL,yymsp[-2].minor.yy202,0);}
#line 4488 "parse.sql"
        break;
      case 198: /* expr ::= expr IS expr */
#line 1148 "parse.y"
{
  yymsp[-2].minor.yy202 = sqlite3PExpr(pParse,TK_IS,yymsp[-2].minor.yy202,yymsp[0].minor.yy202);
  binaryToUnaryIfNull(pParse, yymsp[0].minor.yy202, yymsp[-2].minor.yy202, TK_ISNULL);
}
#line 4496 "parse.sql"
        break;
      case 199: /* expr ::= expr IS NOT expr */
#line 1152 "parse.y"
{
  yymsp[-3].minor.yy202 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-3].minor.yy202,yymsp[0].minor.yy202);
  binaryToUnaryIfNull(pParse, yymsp[0].minor.yy202, yymsp[-3].minor.yy202, TK_NOTNULL);
}
#line 4504 "parse.sql"
        break;
      case 200: /* expr ::= NOT expr */
      case 201: /* expr ::= BITNOT expr */ yytestcase(yyruleno==201);
#line 1158 "parse.y"
{yymsp[-1].minor.yy202 = sqlite3PExpr(pParse, yymsp[-1].major, yymsp[0].minor.yy202, 0);/*A-overwrites-B*/}
#line 4510 "parse.sql"
        break;
      case 202: /* expr ::= PLUS|MINUS expr */
#line 1161 "parse.y"
{
  yymsp[-1].minor.yy202 = sqlite3PExpr(pParse, yymsp[-1].major==TK_PLUS ? TK_UPLUS : TK_UMINUS, yymsp[0].minor.yy202, 0);
  /*A-overwrites-B*/
}
#line 4518 "parse.sql"
        break;
      case 203: /* between_op ::= BETWEEN */
      case 206: /* in_op ::= IN */ yytestcase(yyruleno==206);
#line 1167 "parse.y"
{yymsp[0].minor.yy192 = 0;}
#line 4524 "parse.sql"
        break;
      case 205: /* expr ::= expr between_op expr AND expr */
#line 1169 "parse.y"
{
  ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy202);
  pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy202);
  yymsp[-4].minor.yy202 = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy202, 0);
  if( yymsp[-4].minor.yy202 ){
    yymsp[-4].minor.yy202->x.pList = pList;
  }else{
    sqlite3ExprListDelete(pParse->db, pList);
  } 
  if( yymsp[-3].minor.yy192 ) yymsp[-4].minor.yy202 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy202, 0);
}
#line 4539 "parse.sql"
        break;
      case 208: /* expr ::= expr in_op LP exprlist RP */
#line 1184 "parse.y"
{
    if( yymsp[-1].minor.yy242==0 ){
      /* Expressions of the form
      **
      **      expr1 IN ()
      **      expr1 NOT IN ()
      **
      ** simplify to constants 0 (false) and 1 (true), respectively,
      ** regardless of the value of expr1.
      */
      sqlite3ExprUnmapAndDelete(pParse, yymsp[-4].minor.yy202);
      yymsp[-4].minor.yy202 = sqlite3Expr(pParse->db, TK_INTEGER, yymsp[-3].minor.yy192 ? "1" : "0");
    }else{
      yymsp[-4].minor.yy202 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy202, 0);
      if( yymsp[-4].minor.yy202 ){
        yymsp[-4].minor.yy202->x.pList = yymsp[-1].minor.yy242;
        sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy202);
      }else{
        sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy242);
      }
      if( yymsp[-3].minor.yy192 ) yymsp[-4].minor.yy202 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy202, 0);
    }
  }
#line 4566 "parse.sql"
        break;
      case 209: /* expr ::= LP select RP */
#line 1207 "parse.y"
{
    yymsp[-2].minor.yy202 = sqlite3PExpr(pParse, TK_SELECT, 0, 0);
    sqlite3PExprAddSelect(pParse, yymsp[-2].minor.yy202, yymsp[-1].minor.yy539);
  }
#line 4574 "parse.sql"
        break;
      case 210: /* expr ::= expr in_op LP select RP */
#line 1211 "parse.y"
{
    yymsp[-4].minor.yy202 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy202, 0);
    sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy202, yymsp[-1].minor.yy539);
    if( yymsp[-3].minor.yy192 ) yymsp[-4].minor.yy202 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy202, 0);
  }
#line 4583 "parse.sql"
        break;
      case 211: /* expr ::= expr in_op nm dbnm paren_exprlist */
#line 1216 "parse.y"
{
    SrcList *pSrc = sqlite3SrcListAppend(pParse, 0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);
    Select *pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0);
    if( yymsp[0].minor.yy242 )  sqlite3SrcListFuncArgs(pParse, pSelect ? pSrc : 0, yymsp[0].minor.yy242);
    yymsp[-4].minor.yy202 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy202, 0);
    sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy202, pSelect);
    if( yymsp[-3].minor.yy192 ) yymsp[-4].minor.yy202 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy202, 0);
  }
#line 4595 "parse.sql"
        break;
      case 212: /* expr ::= EXISTS LP select RP */
#line 1224 "parse.y"
{
    Expr *p;
    p = yymsp[-3].minor.yy202 = sqlite3PExpr(pParse, TK_EXISTS, 0, 0);
    sqlite3PExprAddSelect(pParse, p, yymsp[-1].minor.yy539);
  }
#line 4604 "parse.sql"
        break;
      case 213: /* expr ::= CASE case_operand case_exprlist case_else END */
#line 1232 "parse.y"
{
  yymsp[-4].minor.yy202 = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy202, 0);
  if( yymsp[-4].minor.yy202 ){
    yymsp[-4].minor.yy202->x.pList = yymsp[-1].minor.yy202 ? sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy242,yymsp[-1].minor.yy202) : yymsp[-2].minor.yy242;
    sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy202);
  }else{
    sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy242);
    sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy202);
  }
}
#line 4618 "parse.sql"
        break;
      case 214: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
#line 1244 "parse.y"
{
  yymsp[-4].minor.yy242 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy242, yymsp[-2].minor.yy202);
  yymsp[-4].minor.yy242 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy242, yymsp[0].minor.yy202);
}
#line 4626 "parse.sql"
        break;
      case 215: /* case_exprlist ::= WHEN expr THEN expr */
#line 1248 "parse.y"
{
  yymsp[-3].minor.yy242 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy202);
  yymsp[-3].minor.yy242 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy242, yymsp[0].minor.yy202);
}
#line 4634 "parse.sql"
        break;
      case 218: /* case_operand ::= expr */
#line 1258 "parse.y"
{yymsp[0].minor.yy202 = yymsp[0].minor.yy202; /*A-overwrites-X*/}
#line 4639 "parse.sql"
        break;
      case 221: /* nexprlist ::= nexprlist COMMA expr */
#line 1269 "parse.y"
{yymsp[-2].minor.yy242 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy242,yymsp[0].minor.yy202);}
#line 4644 "parse.sql"
        break;
      case 222: /* nexprlist ::= expr */
#line 1271 "parse.y"
{yymsp[0].minor.yy242 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy202); /*A-overwrites-Y*/}
#line 4649 "parse.sql"
        break;
      case 224: /* paren_exprlist ::= LP exprlist RP */
      case 229: /* eidlist_opt ::= LP eidlist RP */ yytestcase(yyruleno==229);
#line 1279 "parse.y"
{yymsp[-2].minor.yy242 = yymsp[-1].minor.yy242;}
#line 4655 "parse.sql"
        break;
      case 225: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
#line 1286 "parse.y"
{
  sqlite3CreateIndex(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, 
                     sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,0), yymsp[-2].minor.yy242, yymsp[-10].minor.yy192,
                      &yymsp[-11].minor.yy0, yymsp[0].minor.yy202, SQLITE_SO_ASC, yymsp[-8].minor.yy192, SQLITE_IDXTYPE_APPDEF);
  if( IN_RENAME_OBJECT && pParse->pNewIndex ){
    sqlite3RenameTokenMap(pParse, pParse->pNewIndex->zName, &yymsp[-4].minor.yy0);
  }
}
#line 4667 "parse.sql"
        break;
      case 226: /* uniqueflag ::= UNIQUE */
      case 268: /* raisetype ::= ABORT */ yytestcase(yyruleno==268);
#line 1296 "parse.y"
{yymsp[0].minor.yy192 = OE_Abort;}
#line 4673 "parse.sql"
        break;
      case 227: /* uniqueflag ::= */
#line 1297 "parse.y"
{yymsp[1].minor.yy192 = OE_None;}
#line 4678 "parse.sql"
        break;
      case 230: /* eidlist ::= eidlist COMMA nm collate sortorder */
#line 1347 "parse.y"
{
  yymsp[-4].minor.yy242 = parserAddExprIdListTerm(pParse, yymsp[-4].minor.yy242, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy192, yymsp[0].minor.yy192);
}
#line 4685 "parse.sql"
        break;
      case 231: /* eidlist ::= nm collate sortorder */
#line 1350 "parse.y"
{
  yymsp[-2].minor.yy242 = parserAddExprIdListTerm(pParse, 0, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy192, yymsp[0].minor.yy192); /*A-overwrites-Y*/
}
#line 4692 "parse.sql"
        break;
      case 234: /* cmd ::= DROP INDEX ifexists fullname */
#line 1361 "parse.y"
{sqlite3DropIndex(pParse, yymsp[0].minor.yy47, yymsp[-1].minor.yy192);}
#line 4697 "parse.sql"
        break;
      case 235: /* cmd ::= VACUUM vinto */
#line 1369 "parse.y"
{sqlite3Vacuum(pParse,0,yymsp[0].minor.yy202);}
#line 4702 "parse.sql"
        break;
      case 236: /* cmd ::= VACUUM nm vinto */
#line 1370 "parse.y"
{sqlite3Vacuum(pParse,&yymsp[-1].minor.yy0,yymsp[0].minor.yy202);}
#line 4707 "parse.sql"
        break;
      case 239: /* cmd ::= PRAGMA nm dbnm */
#line 1379 "parse.y"
{sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);}
#line 4712 "parse.sql"
        break;
      case 240: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
#line 1380 "parse.y"
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);}
#line 4717 "parse.sql"
        break;
      case 241: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
#line 1381 "parse.y"
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);}
#line 4722 "parse.sql"
        break;
      case 242: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
#line 1383 "parse.y"
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);}
#line 4727 "parse.sql"
        break;
      case 243: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */
#line 1385 "parse.y"
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);}
#line 4732 "parse.sql"
        break;
      case 246: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
#line 1401 "parse.y"
{
  Token all;
  all.z = yymsp[-3].minor.yy0.z;
  all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n;
  sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy447, &all);
}
#line 4742 "parse.sql"
        break;
      case 247: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
#line 1410 "parse.y"
{
  sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy192, yymsp[-4].minor.yy230.a, yymsp[-4].minor.yy230.b, yymsp[-2].minor.yy47, yymsp[0].minor.yy202, yymsp[-10].minor.yy192, yymsp[-8].minor.yy192);
  yymsp[-10].minor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0); /*A-overwrites-T*/
}
#line 4750 "parse.sql"
        break;
      case 248: /* trigger_time ::= BEFORE|AFTER */
#line 1416 "parse.y"
{ yymsp[0].minor.yy192 = yymsp[0].major; /*A-overwrites-X*/ }
#line 4755 "parse.sql"
        break;
      case 249: /* trigger_time ::= INSTEAD OF */
#line 1417 "parse.y"
{ yymsp[-1].minor.yy192 = TK_INSTEAD;}
#line 4760 "parse.sql"
        break;
      case 250: /* trigger_time ::= */
#line 1418 "parse.y"
{ yymsp[1].minor.yy192 = TK_BEFORE; }
#line 4765 "parse.sql"
        break;
      case 251: /* trigger_event ::= DELETE|INSERT */
      case 252: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==252);
#line 1422 "parse.y"
{yymsp[0].minor.yy230.a = yymsp[0].major; /*A-overwrites-X*/ yymsp[0].minor.yy230.b = 0;}
#line 4771 "parse.sql"
        break;
      case 253: /* trigger_event ::= UPDATE OF idlist */
#line 1424 "parse.y"
{yymsp[-2].minor.yy230.a = TK_UPDATE; yymsp[-2].minor.yy230.b = yymsp[0].minor.yy600;}
#line 4776 "parse.sql"
        break;
      case 254: /* when_clause ::= */
      case 273: /* key_opt ::= */ yytestcase(yyruleno==273);
#line 1431 "parse.y"
{ yymsp[1].minor.yy202 = 0; }
#line 4782 "parse.sql"
        break;
      case 255: /* when_clause ::= WHEN expr */
      case 274: /* key_opt ::= KEY expr */ yytestcase(yyruleno==274);
#line 1432 "parse.y"
{ yymsp[-1].minor.yy202 = yymsp[0].minor.yy202; }
#line 4788 "parse.sql"
        break;
      case 256: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
#line 1436 "parse.y"
{
  assert( yymsp[-2].minor.yy447!=0 );
  yymsp[-2].minor.yy447->pLast->pNext = yymsp[-1].minor.yy447;
  yymsp[-2].minor.yy447->pLast = yymsp[-1].minor.yy447;
}
#line 4797 "parse.sql"
        break;
      case 257: /* trigger_cmd_list ::= trigger_cmd SEMI */
#line 1441 "parse.y"
{ 
  assert( yymsp[-1].minor.yy447!=0 );
  yymsp[-1].minor.yy447->pLast = yymsp[-1].minor.yy447;
}
#line 4805 "parse.sql"
        break;
      case 258: /* trnm ::= nm DOT nm */
#line 1452 "parse.y"
{
  yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;
  sqlite3ErrorMsg(pParse, 
        "qualified table names are not allowed on INSERT, UPDATE, and DELETE "
        "statements within triggers");
}
#line 4815 "parse.sql"
        break;
      case 259: /* tridxby ::= INDEXED BY nm */
#line 1464 "parse.y"
{
  sqlite3ErrorMsg(pParse,
        "the INDEXED BY clause is not allowed on UPDATE or DELETE statements "
        "within triggers");
}
#line 4824 "parse.sql"
        break;
      case 260: /* tridxby ::= NOT INDEXED */
#line 1469 "parse.y"
{
  sqlite3ErrorMsg(pParse,
        "the NOT INDEXED clause is not allowed on UPDATE or DELETE statements "
        "within triggers");
}
#line 4833 "parse.sql"
        break;
      case 261: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt */
#line 1482 "parse.y"
{yylhsminor.yy447 = sqlite3TriggerUpdateStep(pParse, &yymsp[-5].minor.yy0, yymsp[-2].minor.yy242, yymsp[-1].minor.yy202, yymsp[-6].minor.yy192, yymsp[-7].minor.yy0.z, yymsp[0].minor.yy436);}
#line 4838 "parse.sql"
  yymsp[-7].minor.yy447 = yylhsminor.yy447;
        break;
      case 262: /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
#line 1486 "parse.y"
{
   yylhsminor.yy447 = sqlite3TriggerInsertStep(pParse,&yymsp[-4].minor.yy0,yymsp[-3].minor.yy600,yymsp[-2].minor.yy539,yymsp[-6].minor.yy192,yymsp[-1].minor.yy318,yymsp[-7].minor.yy436,yymsp[0].minor.yy436);/*yylhsminor.yy447-overwrites-yymsp[-6].minor.yy192*/
}
#line 4846 "parse.sql"
  yymsp[-7].minor.yy447 = yylhsminor.yy447;
        break;
      case 263: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
#line 1491 "parse.y"
{yylhsminor.yy447 = sqlite3TriggerDeleteStep(pParse, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy202, yymsp[-5].minor.yy0.z, yymsp[0].minor.yy436);}
#line 4852 "parse.sql"
  yymsp[-5].minor.yy447 = yylhsminor.yy447;
        break;
      case 264: /* trigger_cmd ::= scanpt select scanpt */
#line 1495 "parse.y"
{yylhsminor.yy447 = sqlite3TriggerSelectStep(pParse->db, yymsp[-1].minor.yy539, yymsp[-2].minor.yy436, yymsp[0].minor.yy436); /*yylhsminor.yy447-overwrites-yymsp[-1].minor.yy539*/}
#line 4858 "parse.sql"
  yymsp[-2].minor.yy447 = yylhsminor.yy447;
        break;
      case 265: /* expr ::= RAISE LP IGNORE RP */
#line 1498 "parse.y"
{
  yymsp[-3].minor.yy202 = sqlite3PExpr(pParse, TK_RAISE, 0, 0); 
  if( yymsp[-3].minor.yy202 ){
    yymsp[-3].minor.yy202->affExpr = OE_Ignore;
  }
}
#line 4869 "parse.sql"
        break;
      case 266: /* expr ::= RAISE LP raisetype COMMA nm RP */
#line 1504 "parse.y"
{
  yymsp[-5].minor.yy202 = sqlite3ExprAlloc(pParse->db, TK_RAISE, &yymsp[-1].minor.yy0, 1); 
  if( yymsp[-5].minor.yy202 ) {
    yymsp[-5].minor.yy202->affExpr = (char)yymsp[-3].minor.yy192;
  }
}
#line 4879 "parse.sql"
        break;
      case 267: /* raisetype ::= ROLLBACK */
#line 1513 "parse.y"
{yymsp[0].minor.yy192 = OE_Rollback;}
#line 4884 "parse.sql"
        break;
      case 269: /* raisetype ::= FAIL */
#line 1515 "parse.y"
{yymsp[0].minor.yy192 = OE_Fail;}
#line 4889 "parse.sql"
        break;
      case 270: /* cmd ::= DROP TRIGGER ifexists fullname */
#line 1520 "parse.y"
{
  sqlite3DropTrigger(pParse,yymsp[0].minor.yy47,yymsp[-1].minor.yy192);
}
#line 4896 "parse.sql"
        break;
      case 271: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
#line 1527 "parse.y"
{
  sqlite3Attach(pParse, yymsp[-3].minor.yy202, yymsp[-1].minor.yy202, yymsp[0].minor.yy202);
}
#line 4903 "parse.sql"
        break;
      case 272: /* cmd ::= DETACH database_kw_opt expr */
#line 1530 "parse.y"
{
  sqlite3Detach(pParse, yymsp[0].minor.yy202);
}
#line 4910 "parse.sql"
        break;
      case 275: /* cmd ::= REINDEX */
#line 1545 "parse.y"
{sqlite3Reindex(pParse, 0, 0);}
#line 4915 "parse.sql"
        break;
      case 276: /* cmd ::= REINDEX nm dbnm */
#line 1546 "parse.y"
{sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
#line 4920 "parse.sql"
        break;
      case 277: /* cmd ::= ANALYZE */
#line 1551 "parse.y"
{sqlite3Analyze(pParse, 0, 0);}
#line 4925 "parse.sql"
        break;
      case 278: /* cmd ::= ANALYZE nm dbnm */
#line 1552 "parse.y"
{sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
#line 4930 "parse.sql"
        break;
      case 279: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
#line 1557 "parse.y"
{
  sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy47,&yymsp[0].minor.yy0);
}
#line 4937 "parse.sql"
        break;
      case 280: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
#line 1561 "parse.y"
{
  yymsp[-1].minor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-1].minor.yy0.z) + pParse->sLastToken.n;
  sqlite3AlterFinishAddColumn(pParse, &yymsp[-1].minor.yy0);
}
#line 4945 "parse.sql"
        break;
      case 281: /* add_column_fullname ::= fullname */
#line 1565 "parse.y"
{
  disableLookaside(pParse);
  sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy47);
}
#line 4953 "parse.sql"
        break;
      case 282: /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
#line 1569 "parse.y"
{
  sqlite3AlterRenameColumn(pParse, yymsp[-5].minor.yy47, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
}
#line 4960 "parse.sql"
        break;
      case 283: /* cmd ::= create_vtab */
#line 1580 "parse.y"
{sqlite3VtabFinishParse(pParse,0);}
#line 4965 "parse.sql"
        break;
      case 284: /* cmd ::= create_vtab LP vtabarglist RP */
#line 1581 "parse.y"
{sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}
#line 4970 "parse.sql"
        break;
      case 285: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
#line 1583 "parse.y"
{
    sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy192);
}
#line 4977 "parse.sql"
        break;
      case 286: /* vtabarg ::= */
#line 1588 "parse.y"
{sqlite3VtabArgInit(pParse);}
#line 4982 "parse.sql"
        break;
      case 287: /* vtabargtoken ::= ANY */
      case 288: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==288);
      case 289: /* lp ::= LP */ yytestcase(yyruleno==289);
#line 1590 "parse.y"
{sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}
#line 4989 "parse.sql"
        break;
      case 290: /* with ::= WITH wqlist */
      case 291: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==291);
#line 1605 "parse.y"
{ sqlite3WithPush(pParse, yymsp[0].minor.yy131, 1); }
#line 4995 "parse.sql"
        break;
      case 292: /* wqlist ::= nm eidlist_opt AS LP select RP */
#line 1608 "parse.y"
{
  yymsp[-5].minor.yy131 = sqlite3WithAdd(pParse, 0, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy242, yymsp[-1].minor.yy539); /*A-overwrites-X*/
}
#line 5002 "parse.sql"
        break;
      case 293: /* wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
#line 1611 "parse.y"
{
  yymsp[-7].minor.yy131 = sqlite3WithAdd(pParse, yymsp[-7].minor.yy131, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy242, yymsp[-1].minor.yy539);
}
#line 5009 "parse.sql"
        break;
      case 294: /* windowdefn_list ::= windowdefn */
#line 1625 "parse.y"
{ yylhsminor.yy303 = yymsp[0].minor.yy303; }
#line 5014 "parse.sql"
  yymsp[0].minor.yy303 = yylhsminor.yy303;
        break;
      case 295: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */
#line 1626 "parse.y"
{
  assert( yymsp[0].minor.yy303!=0 );
  sqlite3WindowChain(pParse, yymsp[0].minor.yy303, yymsp[-2].minor.yy303);
  yymsp[0].minor.yy303->pNextWin = yymsp[-2].minor.yy303;
  yylhsminor.yy303 = yymsp[0].minor.yy303;
}
#line 5025 "parse.sql"
  yymsp[-2].minor.yy303 = yylhsminor.yy303;
        break;
      case 296: /* windowdefn ::= nm AS LP window RP */
#line 1635 "parse.y"
{
  if( ALWAYS(yymsp[-1].minor.yy303) ){
    yymsp[-1].minor.yy303->zName = sqlite3DbStrNDup(pParse->db, yymsp[-4].minor.yy0.z, yymsp[-4].minor.yy0.n);
  }
  yylhsminor.yy303 = yymsp[-1].minor.yy303;
}
#line 5036 "parse.sql"
  yymsp[-4].minor.yy303 = yylhsminor.yy303;
        break;
      case 297: /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */
#line 1669 "parse.y"
{
  yymsp[-4].minor.yy303 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy303, yymsp[-2].minor.yy242, yymsp[-1].minor.yy242, 0);
}
#line 5044 "parse.sql"
        break;
      case 298: /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
#line 1672 "parse.y"
{
  yylhsminor.yy303 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy303, yymsp[-2].minor.yy242, yymsp[-1].minor.yy242, &yymsp[-5].minor.yy0);
}
#line 5051 "parse.sql"
  yymsp[-5].minor.yy303 = yylhsminor.yy303;
        break;
      case 299: /* window ::= ORDER BY sortlist frame_opt */
#line 1675 "parse.y"
{
  yymsp[-3].minor.yy303 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy303, 0, yymsp[-1].minor.yy242, 0);
}
#line 5059 "parse.sql"
        break;
      case 300: /* window ::= nm ORDER BY sortlist frame_opt */
#line 1678 "parse.y"
{
  yylhsminor.yy303 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy303, 0, yymsp[-1].minor.yy242, &yymsp[-4].minor.yy0);
}
#line 5066 "parse.sql"
  yymsp[-4].minor.yy303 = yylhsminor.yy303;
        break;
      case 301: /* window ::= frame_opt */
      case 320: /* filter_over ::= over_clause */ yytestcase(yyruleno==320);
#line 1681 "parse.y"
{
  yylhsminor.yy303 = yymsp[0].minor.yy303;
}
#line 5075 "parse.sql"
  yymsp[0].minor.yy303 = yylhsminor.yy303;
        break;
      case 302: /* window ::= nm frame_opt */
#line 1684 "parse.y"
{
  yylhsminor.yy303 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy303, 0, 0, &yymsp[-1].minor.yy0);
}
#line 5083 "parse.sql"
  yymsp[-1].minor.yy303 = yylhsminor.yy303;
        break;
      case 303: /* frame_opt ::= */
#line 1688 "parse.y"
{ 
  yymsp[1].minor.yy303 = sqlite3WindowAlloc(pParse, 0, TK_UNBOUNDED, 0, TK_CURRENT, 0, 0);
}
#line 5091 "parse.sql"
        break;
      case 304: /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
#line 1691 "parse.y"
{ 
  yylhsminor.yy303 = sqlite3WindowAlloc(pParse, yymsp[-2].minor.yy192, yymsp[-1].minor.yy77.eType, yymsp[-1].minor.yy77.pExpr, TK_CURRENT, 0, yymsp[0].minor.yy58);
}
#line 5098 "parse.sql"
  yymsp[-2].minor.yy303 = yylhsminor.yy303;
        break;
      case 305: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
#line 1695 "parse.y"
{ 
  yylhsminor.yy303 = sqlite3WindowAlloc(pParse, yymsp[-5].minor.yy192, yymsp[-3].minor.yy77.eType, yymsp[-3].minor.yy77.pExpr, yymsp[-1].minor.yy77.eType, yymsp[-1].minor.yy77.pExpr, yymsp[0].minor.yy58);
}
#line 5106 "parse.sql"
  yymsp[-5].minor.yy303 = yylhsminor.yy303;
        break;
      case 307: /* frame_bound_s ::= frame_bound */
      case 309: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==309);
#line 1701 "parse.y"
{yylhsminor.yy77 = yymsp[0].minor.yy77;}
#line 5113 "parse.sql"
  yymsp[0].minor.yy77 = yylhsminor.yy77;
        break;
      case 308: /* frame_bound_s ::= UNBOUNDED PRECEDING */
      case 310: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==310);
      case 312: /* frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==312);
#line 1702 "parse.y"
{yylhsminor.yy77.eType = yymsp[-1].major; yylhsminor.yy77.pExpr = 0;}
#line 5121 "parse.sql"
  yymsp[-1].minor.yy77 = yylhsminor.yy77;
        break;
      case 311: /* frame_bound ::= expr PRECEDING|FOLLOWING */
#line 1707 "parse.y"
{yylhsminor.yy77.eType = yymsp[0].major; yylhsminor.yy77.pExpr = yymsp[-1].minor.yy202;}
#line 5127 "parse.sql"
  yymsp[-1].minor.yy77 = yylhsminor.yy77;
        break;
      case 313: /* frame_exclude_opt ::= */
#line 1711 "parse.y"
{yymsp[1].minor.yy58 = 0;}
#line 5133 "parse.sql"
        break;
      case 314: /* frame_exclude_opt ::= EXCLUDE frame_exclude */
#line 1712 "parse.y"
{yymsp[-1].minor.yy58 = yymsp[0].minor.yy58;}
#line 5138 "parse.sql"
        break;
      case 315: /* frame_exclude ::= NO OTHERS */
      case 316: /* frame_exclude ::= CURRENT ROW */ yytestcase(yyruleno==316);
#line 1715 "parse.y"
{yymsp[-1].minor.yy58 = yymsp[-1].major; /*A-overwrites-X*/}
#line 5144 "parse.sql"
        break;
      case 317: /* frame_exclude ::= GROUP|TIES */
#line 1717 "parse.y"
{yymsp[0].minor.yy58 = yymsp[0].major; /*A-overwrites-X*/}
#line 5149 "parse.sql"
        break;
      case 318: /* window_clause ::= WINDOW windowdefn_list */
#line 1722 "parse.y"
{ yymsp[-1].minor.yy303 = yymsp[0].minor.yy303; }
#line 5154 "parse.sql"
        break;
      case 319: /* filter_over ::= filter_clause over_clause */
#line 1724 "parse.y"
{
  yymsp[0].minor.yy303->pFilter = yymsp[-1].minor.yy202;
  yylhsminor.yy303 = yymsp[0].minor.yy303;
}
#line 5162 "parse.sql"
  yymsp[-1].minor.yy303 = yylhsminor.yy303;
        break;
      case 321: /* filter_over ::= filter_clause */
#line 1731 "parse.y"
{
  yylhsminor.yy303 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
  if( yylhsminor.yy303 ){
    yylhsminor.yy303->eFrmType = TK_FILTER;
    yylhsminor.yy303->pFilter = yymsp[0].minor.yy202;
  }else{
    sqlite3ExprDelete(pParse->db, yymsp[0].minor.yy202);
  }
}
#line 5176 "parse.sql"
  yymsp[0].minor.yy303 = yylhsminor.yy303;
        break;
      case 322: /* over_clause ::= OVER LP window RP */
#line 1741 "parse.y"
{
  yymsp[-3].minor.yy303 = yymsp[-1].minor.yy303;
  assert( yymsp[-3].minor.yy303!=0 );
}
#line 5185 "parse.sql"
        break;
      case 323: /* over_clause ::= OVER nm */
#line 1745 "parse.y"
{
  yymsp[-1].minor.yy303 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
  if( yymsp[-1].minor.yy303 ){
    yymsp[-1].minor.yy303->zName = sqlite3DbStrNDup(pParse->db, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n);
  }
}
#line 5195 "parse.sql"
        break;
      case 324: /* filter_clause ::= FILTER LP WHERE expr RP */
#line 1752 "parse.y"
{ yymsp[-4].minor.yy202 = yymsp[-1].minor.yy202; }
#line 5200 "parse.sql"
        break;
      default:
      /* (325) input ::= cmdlist */ yytestcase(yyruleno==325);
      /* (326) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==326);
      /* (327) cmdlist ::= ecmd (OPTIMIZED OUT) */ assert(yyruleno!=327);
      /* (328) ecmd ::= SEMI */ yytestcase(yyruleno==328);
      /* (329) ecmd ::= cmdx SEMI */ yytestcase(yyruleno==329);
      /* (330) ecmd ::= explain cmdx SEMI (NEVER REDUCES) */ assert(yyruleno!=330);
      /* (331) trans_opt ::= */ yytestcase(yyruleno==331);
      /* (332) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==332);
      /* (333) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==333);
      /* (334) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==334);
      /* (335) savepoint_opt ::= */ yytestcase(yyruleno==335);
      /* (336) cmd ::= create_table create_table_args */ yytestcase(yyruleno==336);
      /* (337) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==337);
      /* (338) columnlist ::= columnname carglist */ yytestcase(yyruleno==338);
      /* (339) nm ::= ID|INDEXED */ yytestcase(yyruleno==339);
      /* (340) nm ::= STRING */ yytestcase(yyruleno==340);
      /* (341) nm ::= JOIN_KW */ yytestcase(yyruleno==341);
      /* (342) typetoken ::= typename */ yytestcase(yyruleno==342);
      /* (343) typename ::= ID|STRING */ yytestcase(yyruleno==343);
      /* (344) signed ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=344);
      /* (345) signed ::= minus_num (OPTIMIZED OUT) */ assert(yyruleno!=345);
      /* (346) carglist ::= carglist ccons */ yytestcase(yyruleno==346);
      /* (347) carglist ::= */ yytestcase(yyruleno==347);
      /* (348) ccons ::= NULL onconf */ yytestcase(yyruleno==348);
      /* (349) ccons ::= GENERATED ALWAYS AS generated */ yytestcase(yyruleno==349);
      /* (350) ccons ::= AS generated */ yytestcase(yyruleno==350);
      /* (351) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==351);
      /* (352) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==352);
      /* (353) conslist ::= tcons (OPTIMIZED OUT) */ assert(yyruleno!=353);
      /* (354) tconscomma ::= */ yytestcase(yyruleno==354);
      /* (355) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=355);
      /* (356) resolvetype ::= raisetype (OPTIMIZED OUT) */ assert(yyruleno!=356);
      /* (357) selectnowith ::= oneselect (OPTIMIZED OUT) */ assert(yyruleno!=357);
      /* (358) oneselect ::= values */ yytestcase(yyruleno==358);
      /* (359) sclp ::= selcollist COMMA */ yytestcase(yyruleno==359);
      /* (360) as ::= ID|STRING */ yytestcase(yyruleno==360);
      /* (361) expr ::= term (OPTIMIZED OUT) */ assert(yyruleno!=361);
      /* (362) likeop ::= LIKE_KW|MATCH */ yytestcase(yyruleno==362);
      /* (363) exprlist ::= nexprlist */ yytestcase(yyruleno==363);
      /* (364) nmnum ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=364);
      /* (365) nmnum ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=365);
      /* (366) nmnum ::= ON */ yytestcase(yyruleno==366);
      /* (367) nmnum ::= DELETE */ yytestcase(yyruleno==367);
      /* (368) nmnum ::= DEFAULT */ yytestcase(yyruleno==368);
      /* (369) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==369);
      /* (370) foreach_clause ::= */ yytestcase(yyruleno==370);
      /* (371) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==371);
      /* (372) trnm ::= nm */ yytestcase(yyruleno==372);
      /* (373) tridxby ::= */ yytestcase(yyruleno==373);
      /* (374) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==374);
      /* (375) database_kw_opt ::= */ yytestcase(yyruleno==375);
      /* (376) kwcolumn_opt ::= */ yytestcase(yyruleno==376);
      /* (377) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==377);
      /* (378) vtabarglist ::= vtabarg */ yytestcase(yyruleno==378);
      /* (379) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==379);
      /* (380) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==380);
      /* (381) anylist ::= */ yytestcase(yyruleno==381);
      /* (382) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==382);
      /* (383) anylist ::= anylist ANY */ yytestcase(yyruleno==383);
      /* (384) with ::= */ yytestcase(yyruleno==384);
        break;
/********** End reduce actions ************************************************/
  };
  assert( yyruleno<sizeof(yyRuleInfoLhs)/sizeof(yyRuleInfoLhs[0]) );
  yygoto = yyRuleInfoLhs[yyruleno];
  yysize = yyRuleInfoNRhs[yyruleno];
  yyact = yy_find_reduce_action(yymsp[yysize].stateno,(YYCODETYPE)yygoto);

  /* There are no SHIFTREDUCE actions on nonterminals because the table
  ** generator has simplified them to pure REDUCE actions. */
  assert( !(yyact>YY_MAX_SHIFT && yyact<=YY_MAX_SHIFTREDUCE) );

  /* It is not possible for a REDUCE to be followed by an error */
  assert( yyact!=YY_ERROR_ACTION );

  yymsp += yysize+1;
  yypParser->yytos = yymsp;
  yymsp->stateno = (YYACTIONTYPE)yyact;
  yymsp->major = (YYCODETYPE)yygoto;
  yyTraceShift(yypParser, yyact, "... then shift");
  return yyact;
}

/*
** The following code executes when the parse fails
*/
#ifndef YYNOERRORRECOVERY
static void yy_parse_failed(
  yyParser *yypParser           /* The parser */
){
  sqlite3ParserARG_FETCH
  sqlite3ParserCTX_FETCH
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
  }
#endif
  while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
  /* Here code is inserted which will be executed whenever the
  ** parser fails */
/************ Begin %parse_failure code ***************************************/
/************ End %parse_failure code *****************************************/
  sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument variable */
  sqlite3ParserCTX_STORE
}
#endif /* YYNOERRORRECOVERY */

/*
** The following code executes when a syntax error first occurs.
*/
static void yy_syntax_error(
  yyParser *yypParser,           /* The parser */
  int yymajor,                   /* The major type of the error token */
  sqlite3ParserTOKENTYPE yyminor         /* The minor type of the error token */
){
  sqlite3ParserARG_FETCH
  sqlite3ParserCTX_FETCH
#define TOKEN yyminor
/************ Begin %syntax_error code ****************************************/
#line 33 "parse.y"

  UNUSED_PARAMETER(yymajor);  /* Silence some compiler warnings */
  if( TOKEN.z[0] ){
    sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
  }else{
    sqlite3ErrorMsg(pParse, "incomplete input");
  }
#line 5330 "parse.sql"
/************ End %syntax_error code ******************************************/
  sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument variable */
  sqlite3ParserCTX_STORE
}

/*
** The following is executed when the parser accepts
*/
static void yy_accept(
  yyParser *yypParser           /* The parser */
){
  sqlite3ParserARG_FETCH
  sqlite3ParserCTX_FETCH
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
  }
#endif
#ifndef YYNOERRORRECOVERY
  yypParser->yyerrcnt = -1;
#endif
  assert( yypParser->yytos==yypParser->yystack );
  /* Here code is inserted which will be executed whenever the
  ** parser accepts */
/*********** Begin %parse_accept code *****************************************/
/*********** End %parse_accept code *******************************************/
  sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument variable */
  sqlite3ParserCTX_STORE
}

/* The main parser program.
** The first argument is a pointer to a structure obtained from
** "sqlite3ParserAlloc" which describes the current state of the parser.
** The second argument is the major token number.  The third is
** the minor token.  The fourth optional argument is whatever the
** user wants (and specified in the grammar) and is available for
** use by the action routines.
**
** Inputs:
** <ul>
** <li> A pointer to the parser (an opaque structure.)
** <li> The major token number.
** <li> The minor token number.
** <li> An option argument of a grammar-specified type.
** </ul>
**
** Outputs:
** None.
*/
void sqlite3Parser(
  void *yyp,                   /* The parser */
  int yymajor,                 /* The major token code number */
  sqlite3ParserTOKENTYPE yyminor       /* The value for the token */
  sqlite3ParserARG_PDECL               /* Optional %extra_argument parameter */
){
  YYMINORTYPE yyminorunion;
  YYACTIONTYPE yyact;   /* The parser action. */
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
  int yyendofinput;     /* True if we are at the end of input */
#endif
#ifdef YYERRORSYMBOL
  int yyerrorhit = 0;   /* True if yymajor has invoked an error */
#endif
  yyParser *yypParser = (yyParser*)yyp;  /* The parser */
  sqlite3ParserCTX_FETCH
  sqlite3ParserARG_STORE

  assert( yypParser->yytos!=0 );
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
  yyendofinput = (yymajor==0);
#endif

  yyact = yypParser->yytos->stateno;
#ifndef NDEBUG
  if( yyTraceFILE ){
    if( yyact < YY_MIN_REDUCE ){
      fprintf(yyTraceFILE,"%sInput '%s' in state %d\n",
              yyTracePrompt,yyTokenName[yymajor],yyact);
    }else{
      fprintf(yyTraceFILE,"%sInput '%s' with pending reduce %d\n",
              yyTracePrompt,yyTokenName[yymajor],yyact-YY_MIN_REDUCE);
    }
  }
#endif

  do{
    assert( yyact==yypParser->yytos->stateno );
    yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);
    if( yyact >= YY_MIN_REDUCE ){
      yyact = yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,
                        yyminor sqlite3ParserCTX_PARAM);
    }else if( yyact <= YY_MAX_SHIFTREDUCE ){
      yy_shift(yypParser,yyact,(YYCODETYPE)yymajor,yyminor);
#ifndef YYNOERRORRECOVERY
      yypParser->yyerrcnt--;
#endif
      break;
    }else if( yyact==YY_ACCEPT_ACTION ){
      yypParser->yytos--;
      yy_accept(yypParser);
      return;
    }else{
      assert( yyact == YY_ERROR_ACTION );
      yyminorunion.yy0 = yyminor;
#ifdef YYERRORSYMBOL
      int yymx;
#endif
#ifndef NDEBUG
      if( yyTraceFILE ){
        fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
      }
#endif
#ifdef YYERRORSYMBOL
      /* A syntax error has occurred.
      ** The response to an error depends upon whether or not the
      ** grammar defines an error token "ERROR".  
      **
      ** This is what we do if the grammar does define ERROR:
      **
      **  * Call the %syntax_error function.
      **
      **  * Begin popping the stack until we enter a state where
      **    it is legal to shift the error symbol, then shift
      **    the error symbol.
      **
      **  * Set the error count to three.
      **
      **  * Begin accepting and shifting new tokens.  No new error
      **    processing will occur until three tokens have been
      **    shifted successfully.
      **
      */
      if( yypParser->yyerrcnt<0 ){
        yy_syntax_error(yypParser,yymajor,yyminor);
      }
      yymx = yypParser->yytos->major;
      if( yymx==YYERRORSYMBOL || yyerrorhit ){
#ifndef NDEBUG
        if( yyTraceFILE ){
          fprintf(yyTraceFILE,"%sDiscard input token %s\n",
             yyTracePrompt,yyTokenName[yymajor]);
        }
#endif
        yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);
        yymajor = YYNOCODE;
      }else{
        while( yypParser->yytos >= yypParser->yystack
            && (yyact = yy_find_reduce_action(
                        yypParser->yytos->stateno,
                        YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE
        ){
          yy_pop_parser_stack(yypParser);
        }
        if( yypParser->yytos < yypParser->yystack || yymajor==0 ){
          yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
          yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
          yypParser->yyerrcnt = -1;
#endif
          yymajor = YYNOCODE;
        }else if( yymx!=YYERRORSYMBOL ){
          yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor);
        }
      }
      yypParser->yyerrcnt = 3;
      yyerrorhit = 1;
      if( yymajor==YYNOCODE ) break;
      yyact = yypParser->yytos->stateno;
#elif defined(YYNOERRORRECOVERY)
      /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
      ** do any kind of error recovery.  Instead, simply invoke the syntax
      ** error routine and continue going as if nothing had happened.
      **
      ** Applications can set this macro (for example inside %include) if
      ** they intend to abandon the parse upon the first syntax error seen.
      */
      yy_syntax_error(yypParser,yymajor, yyminor);
      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
      break;
#else  /* YYERRORSYMBOL is not defined */
      /* This is what we do if the grammar does not define ERROR:
      **
      **  * Report an error message, and throw away the input token.
      **
      **  * If the input token is $, then fail the parse.
      **
      ** As before, subsequent error messages are suppressed until
      ** three input tokens have been successfully shifted.
      */
      if( yypParser->yyerrcnt<=0 ){
        yy_syntax_error(yypParser,yymajor, yyminor);
      }
      yypParser->yyerrcnt = 3;
      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
      if( yyendofinput ){
        yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
        yypParser->yyerrcnt = -1;
#endif
      }
      break;
#endif
    }
  }while( yypParser->yytos>yypParser->yystack );
#ifndef NDEBUG
  if( yyTraceFILE ){
    yyStackEntry *i;
    char cDiv = '[';
    fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt);
    for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){
      fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]);
      cDiv = ' ';
    }
    fprintf(yyTraceFILE,"]\n");
  }
#endif
  return;
}

/*
** Return the fallback token corresponding to canonical token iToken, or
** 0 if iToken has no fallback.
*/
int sqlite3ParserFallback(int iToken){
#ifdef YYFALLBACK
  assert( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) );
  return yyFallback[iToken];
#else
  (void)iToken;
  return 0;
#endif
}
