/*
** 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){
  pParse->disableLookaside++;
  pParse->db->lookaside.bDisable++;
}

#line 454 "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){
    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 940 "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->affinity = 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 1111 "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 1329 "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 1774 "parse.y"

#if TK_SPAN>255
# error too many tokens in the grammar
#endif
#line 193 "parse.c"
/**************** 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 302
#define YYACTIONTYPE unsigned short int
#define YYWILDCARD 95
#define sqlite3ParserTOKENTYPE Token
typedef union {
  int yyinit;
  sqlite3ParserTOKENTYPE yy0;
  TriggerStep* yy11;
  IdList* yy76;
  ExprList* yy94;
  Upsert* yy95;
  int yy100;
  Expr* yy102;
  struct {int value; int mask;} yy199;
  u8 yy218;
  With* yy243;
  struct TrigEvent yy298;
  Window* yy379;
  struct FrameBound yy389;
  Select* yy391;
  SrcList* yy407;
  const char* yy528;
} 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             540
#define YYNRULE              376
#define YYNTOKEN             176
#define YY_MAX_SHIFT         539
#define YY_MIN_SHIFTREDUCE   783
#define YY_MAX_SHIFTREDUCE   1158
#define YY_ERROR_ACTION      1159
#define YY_ACCEPT_ACTION     1160
#define YY_NO_ACTION         1161
#define YY_MIN_REDUCE        1162
#define YY_MAX_REDUCE        1537
/************* 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 (2142)
static const YYACTIONTYPE yy_action[] = {
 /*     0 */   112,  109,  209,  112,  109,  209, 1160,    1,    1,  539,
 /*    10 */     2, 1164,  490, 1193, 1293,  534,  289, 1196,  134,  383,
 /*    20 */  1485, 1428, 1164, 1229, 1208, 1242, 1195,  289,  491,  134,
 /*    30 */   373,  915, 1229,  443,   16,   16, 1242,   70,   70,  916,
 /*    40 */   242, 1292,  296,  119,  120,  110, 1136, 1136,  981,  984,
 /*    50 */   974,  974,  117,  117,  118,  118,  118,  118,  264,  264,
 /*    60 */   190,  264,  264,  264,  264,  112,  109,  209,  362,  264,
 /*    70 */   264,  531,  376,  497,  531, 1134,  531, 1501,  239,  206,
 /*    80 */   338,    9,  531,  242,  219, 1203,  118,  118,  118,  118,
 /*    90 */   111,  439,  112,  109,  209,  219,  116,  116,  116,  116,
 /*   100 */   115,  115,  114,  114,  114,  113,  414,  115,  115,  114,
 /*   110 */   114,  114,  113,  414,  418,   12,  383,  400, 1134,  114,
 /*   120 */   114,  114,  113,  414, 1115,  418, 1134, 1392,  116,  116,
 /*   130 */   116,  116,  115,  115,  114,  114,  114,  113,  414,  961,
 /*   140 */   119,  120,  110, 1136, 1136,  981,  984,  974,  974,  117,
 /*   150 */   117,  118,  118,  118,  118,  952,  534,  414,  941,  951,
 /*   160 */  1481,  539,    2, 1164, 1505,  534,  160,  175,  289, 1134,
 /*   170 */   134,  434,  312,  297, 1115, 1116, 1117, 1242,   70,   70,
 /*   180 */  1089,  338, 1089,  118,  118,  118,  118,   42,   42,  448,
 /*   190 */   951,  951,  953,  116,  116,  116,  116,  115,  115,  114,
 /*   200 */   114,  114,  113,  414, 1115,  311,  264,  264,   82,  441,
 /*   210 */   264,  264,  190,  383,  284,   12,  288,  525,  407,  531,
 /*   220 */    96,  159,  458,  531,  371,  116,  116,  116,  116,  115,
 /*   230 */   115,  114,  114,  114,  113,  414,  219,  119,  120,  110,
 /*   240 */  1136, 1136,  981,  984,  974,  974,  117,  117,  118,  118,
 /*   250 */   118,  118,  511, 1477, 1115, 1116, 1117,  113,  414,  534,
 /*   260 */   528,  528,  528,  121,  534, 1427,  418,  116,  116,  116,
 /*   270 */   116,  115,  115,  114,  114,  114,  113,  414, 1464,  351,
 /*   280 */   270,   42,   42,  383,  187, 1115,   70,   70,  533,  433,
 /*   290 */   116,  116,  116,  116,  115,  115,  114,  114,  114,  113,
 /*   300 */   414,  534, 1339,  405,  159,  411,  410,  119,  120,  110,
 /*   310 */  1136, 1136,  981,  984,  974,  974,  117,  117,  118,  118,
 /*   320 */   118,  118,  285,   42,   42,  349,  411,  410,  514,  479,
 /*   330 */  1458,   79, 1084,    6, 1140, 1115, 1116, 1117,  480, 1142,
 /*   340 */   501, 1115, 1084,  123,  238, 1084,  136, 1141, 1234, 1234,
 /*   350 */  1143,  383, 1143, 1115,  167,  426,   80,  447,  512, 1451,
 /*   360 */   116,  116,  116,  116,  115,  115,  114,  114,  114,  113,
 /*   370 */   414, 1143, 1466, 1143,  350,  119,  120,  110, 1136, 1136,
 /*   380 */   981,  984,  974,  974,  117,  117,  118,  118,  118,  118,
 /*   390 */   402, 1115, 1116, 1117,  500,  534,  250,  267,  336,  474,
 /*   400 */   331,  473,  236, 1115, 1116, 1117,  231, 1115,  329,  471,
 /*   410 */   468,  467,  509, 1458, 1464,  505,    6,   70,   70,  466,
 /*   420 */   181,  380,  379,  534,  971,  971,  982,  985,  116,  116,
 /*   430 */   116,  116,  115,  115,  114,  114,  114,  113,  414, 1115,
 /*   440 */   412,  412,  412,  496, 1115,   69,   69,  235,  383,  288,
 /*   450 */   525,  273,  326,  516,  337,  458, 1084, 1115, 1116, 1117,
 /*   460 */  1232, 1232,  492,  160,  508,  441, 1084, 1067, 1531, 1084,
 /*   470 */   207, 1531,  119,  120,  110, 1136, 1136,  981,  984,  974,
 /*   480 */   974,  117,  117,  118,  118,  118,  118,  881,  534, 1115,
 /*   490 */  1116, 1117,  975,  534, 1115, 1116, 1117,  534,  421,  534,
 /*   500 */   141,  534,  176,  356,  517, 1119,   32,  511,  482,  388,
 /*   510 */    70,   70,  818,  288,  525,   70,   70,  441,  499,   50,
 /*   520 */    50,   70,   70,   70,   70,  116,  116,  116,  116,  115,
 /*   530 */   115,  114,  114,  114,  113,  414,  274,  264,  264, 1115,
 /*   540 */  1065,  264,  264, 1115,  355,  383,  409,  961, 1439,  822,
 /*   550 */   531,  516,  190,  419,  531,  483, 1119,  516,  337,  516,
 /*   560 */   518, 1115,  818,  952,  382,  458,  515,  951,  481,  119,
 /*   570 */   120,  110, 1136, 1136,  981,  984,  974,  974,  117,  117,
 /*   580 */   118,  118,  118,  118, 1338,  278, 1045,  278,  275, 1115,
 /*   590 */  1116, 1117,  259, 1115, 1116, 1117,  534,    5,  951,  951,
 /*   600 */   953, 1046,  231,    3,  143,  471,  468,  467, 1391,  463,
 /*   610 */  1115, 1115, 1116, 1117, 1452,  466, 1047,  836,   70,   70,
 /*   620 */   480,  534,  116,  116,  116,  116,  115,  115,  114,  114,
 /*   630 */   114,  113,  414,   95, 1115,  287,  235,  856,  902,  420,
 /*   640 */  1115,  534,  383,   13,   13,  381,  815,  857,  472,  112,
 /*   650 */   109,  209, 1115,  337,  413,  309,  837,  394, 1436,  534,
 /*   660 */  1115, 1116, 1117,   54,   54,  291,  119,  120,  110, 1136,
 /*   670 */  1136,  981,  984,  974,  974,  117,  117,  118,  118,  118,
 /*   680 */   118,   13,   13, 1084, 1115, 1116, 1117,  901,  264,  264,
 /*   690 */  1115, 1116, 1117, 1084,  292,  399, 1084,  800,  388,  140,
 /*   700 */   295,  531, 1115, 1116, 1117,  403,  447,  532,  534,  870,
 /*   710 */   870,  534, 1240,  534,  329,  534, 1185,  389,  534,  116,
 /*   720 */   116,  116,  116,  115,  115,  114,  114,  114,  113,  414,
 /*   730 */    13,   13, 1024,   13,   13,   13,   13,   13,   13,  383,
 /*   740 */    13,   13,  424, 1100,  401,  264,  264,  277,  160,  184,
 /*   750 */  1182,  185, 1533,  369,  513,  484,  432,  487,  531,  424,
 /*   760 */   423, 1397,  941,  119,  120,  110, 1136, 1136,  981,  984,
 /*   770 */   974,  974,  117,  117,  118,  118,  118,  118, 1397, 1399,
 /*   780 */   425,  519,  392,  264,  264, 1029, 1029,  455,  264,  264,
 /*   790 */   264,  264, 1004,  304,  261, 1278,  531,  900,  288,  525,
 /*   800 */   310,  531,  493,  531, 1067, 1532,  458,  387, 1532,  311,
 /*   810 */   429,  299,  534,  107,  264,  264,  116,  116,  116,  116,
 /*   820 */   115,  115,  114,  114,  114,  113,  414,  531,  424, 1384,
 /*   830 */   507,  258,  258, 1246,   55,   55,  383, 1277,  265,  265,
 /*   840 */   962,  324,  434,  312,  531,  531,  506, 1397, 1026, 1241,
 /*   850 */   298,  531, 1026,  445,  301, 1095,  303,  534,  368, 1156,
 /*   860 */   119,  120,  110, 1136, 1136,  981,  984,  974,  974,  117,
 /*   870 */   117,  118,  118,  118,  118, 1045,  534, 1065,  534,   15,
 /*   880 */    15, 1084,  208, 1324,  453,  452,  534, 1324,  534,  449,
 /*   890 */  1046, 1084,  494,  458, 1084,  234,  233,  232,   44,   44,
 /*   900 */    56,   56,  319, 1095,  322, 1047,  534,  900,   57,   57,
 /*   910 */    58,   58,  534,  116,  116,  116,  116,  115,  115,  114,
 /*   920 */   114,  114,  113,  414,  534,  514,  522,  534,   59,   59,
 /*   930 */   302, 1157,  534,  383,   60,   60, 1237,  946,  788,  789,
 /*   940 */   790, 1459, 1456,  446,    6,    6,   61,   61, 1212,   45,
 /*   950 */    45,  534,  396,  383,   46,   46,  397,  119,  120,  110,
 /*   960 */  1136, 1136,  981,  984,  974,  974,  117,  117,  118,  118,
 /*   970 */   118,  118,  428,   48,   48,  534,  392,  119,  120,  110,
 /*   980 */  1136, 1136,  981,  984,  974,  974,  117,  117,  118,  118,
 /*   990 */   118,  118, 1324,  368, 1066,  447,  825,   49,   49,  534,
 /*  1000 */   458,  357,  534,  353,  534,  138,  534,  337, 1478,  478,
 /*  1010 */   116,  116,  116,  116,  115,  115,  114,  114,  114,  113,
 /*  1020 */   414,   62,   62,  392,   63,   63,   64,   64,   14,   14,
 /*  1030 */   116,  116,  116,  116,  115,  115,  114,  114,  114,  113,
 /*  1040 */   414,  534,  810,  317,  271,  534, 1457,  825,  534,    6,
 /*  1050 */   534, 1324,  534,  142,  534, 1442,  534,  212,  534, 1324,
 /*  1060 */   534,  398,  305,   65,   65,  534, 1157,  125,  125,  476,
 /*  1070 */    66,   66,   51,   51,   67,   67,   68,   68,   52,   52,
 /*  1080 */   147,  147,  148,  148,  534,   98,  534,   75,   75,  276,
 /*  1090 */   534,  272,  534,  810,  534,  876,  534,  527,  389,  534,
 /*  1100 */   875,  534, 1151,  202,  534,  383,   53,   53,   71,   71,
 /*  1110 */   288,  525,  126,  126,   72,   72,  127,  127,  128,  128,
 /*  1120 */   454,  124,  124,  146,  146,  383,  145,  145,  408,  119,
 /*  1130 */   120,  110, 1136, 1136,  981,  984,  974,  974,  117,  117,
 /*  1140 */   118,  118,  118,  118,  534,  900,  534,   95,  534,  119,
 /*  1150 */   120,  110, 1136, 1136,  981,  984,  974,  974,  117,  117,
 /*  1160 */   118,  118,  118,  118,  390,  161,  132,  132,  131,  131,
 /*  1170 */   129,  129,  534,  915,  534, 1455,  534, 1454,    6, 1416,
 /*  1180 */     6,  916,  116,  116,  116,  116,  115,  115,  114,  114,
 /*  1190 */   114,  113,  414, 1415,  130,  130,   74,   74,   76,   76,
 /*  1200 */   534,   30,  116,  116,  116,  116,  115,  115,  114,  114,
 /*  1210 */   114,  113,  414,  534,  263,  206,  534, 1133, 1504,   93,
 /*  1220 */   876,  845,   73,   73,  102,  875,  100,  139,   17,   38,
 /*  1230 */   208, 1062,   31,  450,  370,   43,   43,  101,   47,   47,
 /*  1240 */   827,  216,  436,  308,  943,  440,   95,  241,  241,  442,
 /*  1250 */   313,  464,  241,   95,  237,  900,  327,  383,  266,   95,
 /*  1260 */   835,  834,  193,  335,  938,  314, 1011,  435,  842,  843,
 /*  1270 */   955, 1007,  909,  334,  237,  241,  873,  383, 1023,  107,
 /*  1280 */  1023,  119,  120,  110, 1136, 1136,  981,  984,  974,  974,
 /*  1290 */   117,  117,  118,  118,  118,  118, 1022,  808, 1022, 1274,
 /*  1300 */   137,  119,  108,  110, 1136, 1136,  981,  984,  974,  974,
 /*  1310 */   117,  117,  118,  118,  118,  118,  874, 1011,  318,  107,
 /*  1320 */   321,  955,  323,  325, 1225, 1211,  197, 1210, 1209,  330,
 /*  1330 */   339, 1265,  340,  283,  116,  116,  116,  116,  115,  115,
 /*  1340 */   114,  114,  114,  113,  414, 1286, 1323, 1261, 1471, 1272,
 /*  1350 */   520,  218,  521, 1329,  116,  116,  116,  116,  115,  115,
 /*  1360 */   114,  114,  114,  113,  414, 1192, 1184, 1173, 1172, 1174,
 /*  1370 */  1494, 1488,  459,  256,  383, 1258,  342,  199,  367,  344,
 /*  1380 */   211,  195,  307,  444,   11,  346,  469,  333, 1308, 1316,
 /*  1390 */   375,  427,  203,  360,  383, 1388,  188, 1387,  189,  120,
 /*  1400 */   110, 1136, 1136,  981,  984,  974,  974,  117,  117,  118,
 /*  1410 */   118,  118,  118, 1208, 1151,  300,  348, 1491,  245, 1148,
 /*  1420 */   110, 1136, 1136,  981,  984,  974,  974,  117,  117,  118,
 /*  1430 */   118,  118,  118,  198, 1435, 1433,  524,   78,  391,  163,
 /*  1440 */    82, 1393,  438,  173,   81,  105,  526, 1313,    4,   35,
 /*  1450 */   157,  116,  116,  116,  116,  115,  115,  114,  114,  114,
 /*  1460 */   113,  414,  529,  165,   93,  430, 1305,  168,  169,  431,
 /*  1470 */   462,  116,  116,  116,  116,  115,  115,  114,  114,  114,
 /*  1480 */   113,  414,  170,  171,  221,  415,  372,  437, 1319,  177,
 /*  1490 */   374,   36,  451,  225, 1382,   87,  457,  523,  257, 1404,
 /*  1500 */   316,  105,  526,  227,    4,  182,  460,  160,  320,  228,
 /*  1510 */   377, 1175,  475,  229, 1228,  404, 1227, 1226,  529,  827,
 /*  1520 */   961, 1219,  378, 1200, 1199,  406,  103,  103, 1218,  332,
 /*  1530 */     8,  281, 1198,  104, 1503,  415,  536,  535,  486,  282,
 /*  1540 */   951,  415,  489,  495,   92,  244, 1269,  341,  243,  122,
 /*  1550 */  1270,  343,  514,  523, 1268, 1462,   10,  288,  525,  345,
 /*  1560 */  1461,  354,   99,  352,  503,   94, 1267,  347, 1251,  502,
 /*  1570 */   498,  951,  951,  953,  954,   27,  961, 1250,  194,  358,
 /*  1580 */   251,  359,  103,  103, 1181,   34,  537, 1110,  252,  104,
 /*  1590 */   254,  415,  536,  535,  255, 1368,  951, 1420,  286,  538,
 /*  1600 */  1170, 1165, 1421,  135, 1419, 1418,  149,  150,  279,  784,
 /*  1610 */   416,  196,  151,  290,  210,  200,   77,  385,  269,  386,
 /*  1620 */   133,  162,  935, 1021,  201, 1019,  153,  951,  951,  953,
 /*  1630 */   954,   27, 1480, 1104,  417,  164,  217,  268,  859,  166,
 /*  1640 */   306, 1035,  366,  366,  365,  253,  363,  220,  172,  797,
 /*  1650 */   939,  155,  105,  526,  393,    4,  395,  174,  156,   83,
 /*  1660 */  1038,   84,  213,   85,  294,  222,   86,  223, 1034,  529,
 /*  1670 */   144,   18,  293,  224,  315,  456,  241, 1027, 1145,  178,
 /*  1680 */   226,  179,   37,  799,  334,  461,  230,  465,  470,  838,
 /*  1690 */   180,   88,  415,   19,  280,  328,   20,   89,   90,  158,
 /*  1700 */   191,  477,  215, 1097,  523,  204,  192,  987,   91, 1070,
 /*  1710 */   152,   39,  485,  154, 1071,  503,   40,  488,  205,  260,
 /*  1720 */   504,  262,  105,  526,  214,    4,  908,  961,  183,  240,
 /*  1730 */   903,  107, 1086,  103,  103,   21,   22, 1088,   23,  529,
 /*  1740 */   104,   24,  415,  536,  535, 1090, 1093,  951, 1094,   25,
 /*  1750 */  1074,   33,    7,   26,  510, 1002,  247,  186,  384,   95,
 /*  1760 */   988,  986,  415,  288,  525,  990, 1044,  246, 1043,  991,
 /*  1770 */    28,   41,  530,  956,  523,  809,  106,   29,  951,  951,
 /*  1780 */   953,  954,   27,  869,  361,  503,  422,  248,  364, 1105,
 /*  1790 */   502,  249, 1161, 1496, 1495, 1161, 1161,  961, 1161, 1161,
 /*  1800 */  1161, 1161, 1161,  103,  103, 1161, 1161, 1161, 1161, 1161,
 /*  1810 */   104, 1161,  415,  536,  535, 1104,  417,  951, 1161,  268,
 /*  1820 */  1161, 1161, 1161, 1161,  366,  366,  365,  253,  363, 1161,
 /*  1830 */  1161,  797, 1161, 1161, 1161, 1161,  105,  526, 1161,    4,
 /*  1840 */  1161, 1161, 1161, 1161,  213, 1161,  294, 1161,  951,  951,
 /*  1850 */   953,  954,   27,  529,  293, 1161, 1161, 1161, 1161, 1161,
 /*  1860 */  1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
 /*  1870 */  1161, 1161, 1161, 1161, 1161, 1161,  415, 1161, 1161, 1161,
 /*  1880 */  1161, 1161, 1161, 1161,  215, 1161, 1161, 1161,  523, 1161,
 /*  1890 */  1161, 1161,  152, 1161, 1161,  154,  105,  526, 1161,    4,
 /*  1900 */  1161, 1161, 1161, 1161, 1161, 1161,  214, 1161, 1161, 1161,
 /*  1910 */  1161,  961, 1161,  529, 1161, 1161, 1161,  103,  103,  880,
 /*  1920 */  1161, 1161, 1161, 1161,  104, 1161,  415,  536,  535, 1161,
 /*  1930 */  1161,  951, 1161, 1161, 1161, 1161,  415, 1161, 1161, 1161,
 /*  1940 */   384, 1161, 1161, 1161, 1161,  288,  525, 1161,  523, 1161,
 /*  1950 */  1161, 1161, 1161, 1161, 1161, 1161,   97,  526, 1161,    4,
 /*  1960 */  1161, 1161,  951,  951,  953,  954,   27, 1161,  422, 1161,
 /*  1970 */  1161,  961, 1161,  529, 1161, 1161, 1161,  103,  103, 1161,
 /*  1980 */  1161, 1161, 1161, 1161,  104, 1161,  415,  536,  535, 1161,
 /*  1990 */  1161,  951,  268, 1161, 1161, 1161,  415,  366,  366,  365,
 /*  2000 */   253,  363, 1161, 1161,  797, 1161, 1161, 1161,  523, 1161,
 /*  2010 */  1161, 1161, 1161, 1161, 1161, 1161, 1161,  213, 1161,  294,
 /*  2020 */  1161, 1161,  951,  951,  953,  954,   27,  293, 1161, 1161,
 /*  2030 */  1161,  961, 1161, 1161, 1161, 1161, 1161,  103,  103, 1161,
 /*  2040 */  1161, 1161, 1161, 1161,  104, 1161,  415,  536,  535, 1161,
 /*  2050 */  1161,  951, 1161, 1161, 1161, 1161, 1161,  215, 1161, 1161,
 /*  2060 */  1161, 1161, 1161, 1161, 1161,  152, 1161, 1161,  154, 1161,
 /*  2070 */  1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,  214,
 /*  2080 */  1161, 1161,  951,  951,  953,  954,   27, 1161, 1161, 1161,
 /*  2090 */  1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
 /*  2100 */  1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
 /*  2110 */  1161, 1161, 1161,  384, 1161, 1161, 1161, 1161,  288,  525,
 /*  2120 */  1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
 /*  2130 */  1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
 /*  2140 */  1161,  422,
};
static const YYCODETYPE yy_lookahead[] = {
 /*     0 */   260,  261,  262,  260,  261,  262,  176,  177,  178,  179,
 /*    10 */   180,  181,  184,  206,  209,  184,  186,  206,  188,   19,
 /*    20 */   179,  281,  181,  213,  214,  195,  206,  186,  195,  188,
 /*    30 */   195,   31,  222,  184,  206,  207,  195,  206,  207,   39,
 /*    40 */    24,  209,  184,   43,   44,   45,   46,   47,   48,   49,
 /*    50 */    50,   51,   52,   53,   54,   55,   56,   57,  228,  229,
 /*    60 */   184,  228,  229,  228,  229,  260,  261,  262,  192,  228,
 /*    70 */   229,  241,  196,  242,  241,   59,  241,  205,  245,  246,
 /*    80 */   184,   22,  241,   24,  254,  213,   54,   55,   56,   57,
 /*    90 */    58,  256,  260,  261,  262,  254,   96,   97,   98,   99,
 /*   100 */   100,  101,  102,  103,  104,  105,  106,  100,  101,  102,
 /*   110 */   103,  104,  105,  106,  284,  203,   19,  221,   59,  102,
 /*   120 */   103,  104,  105,  106,   59,  284,  110,  269,   96,   97,
 /*   130 */    98,   99,  100,  101,  102,  103,  104,  105,  106,   94,
 /*   140 */    43,   44,   45,   46,   47,   48,   49,   50,   51,   52,
 /*   150 */    53,   54,   55,   56,   57,  110,  184,  106,   73,  114,
 /*   160 */   178,  179,  180,  181,  219,  184,   81,   22,  186,  110,
 /*   170 */   188,  121,  122,  195,  109,  110,  111,  195,  206,  207,
 /*   180 */    83,  184,   85,   54,   55,   56,   57,  206,  207,  277,
 /*   190 */   145,  146,  147,   96,   97,   98,   99,  100,  101,  102,
 /*   200 */   103,  104,  105,  106,   59,  120,  228,  229,  143,  184,
 /*   210 */   228,  229,  184,   19,  242,  203,  131,  132,  221,  241,
 /*   220 */    26,  184,  184,  241,  196,   96,   97,   98,   99,  100,
 /*   230 */   101,  102,  103,  104,  105,  106,  254,   43,   44,   45,
 /*   240 */    46,   47,   48,   49,   50,   51,   52,   53,   54,   55,
 /*   250 */    56,   57,  184,  184,  109,  110,  111,  105,  106,  184,
 /*   260 */   200,  201,  202,   69,  184,  227,  284,   96,   97,   98,
 /*   270 */    99,  100,  101,  102,  103,  104,  105,  106,  297,  298,
 /*   280 */   255,  206,  207,   19,  272,   59,  206,  207,  184,  277,
 /*   290 */    96,   97,   98,   99,  100,  101,  102,  103,  104,  105,
 /*   300 */   106,  184,  259,   19,  184,  100,  101,   43,   44,   45,
 /*   310 */    46,   47,   48,   49,   50,   51,   52,   53,   54,   55,
 /*   320 */    56,   57,  242,  206,  207,  184,  100,  101,  138,  292,
 /*   330 */   293,   67,   76,  296,  108,  109,  110,  111,  295,  113,
 /*   340 */    84,   59,   86,   22,   26,   89,  156,  121,  224,  225,
 /*   350 */   145,   19,  147,   59,   72,  256,   24,  184,  290,  291,
 /*   360 */    96,   97,   98,   99,  100,  101,  102,  103,  104,  105,
 /*   370 */   106,  145,  297,  147,  299,   43,   44,   45,   46,   47,
 /*   380 */    48,   49,   50,   51,   52,   53,   54,   55,   56,   57,
 /*   390 */   106,  109,  110,  111,  138,  184,  112,  113,  114,  115,
 /*   400 */   116,  117,  118,  109,  110,  111,  112,   59,  124,  115,
 /*   410 */   116,  117,  292,  293,  297,  298,  296,  206,  207,  125,
 /*   420 */    72,  100,  101,  184,   46,   47,   48,   49,   96,   97,
 /*   430 */    98,   99,  100,  101,  102,  103,  104,  105,  106,   59,
 /*   440 */   200,  201,  202,  184,   59,  206,  207,   46,   19,  131,
 /*   450 */   132,  278,   23,  242,  184,  184,   76,  109,  110,  111,
 /*   460 */   224,  225,  251,   81,   84,  184,   86,   22,   23,   89,
 /*   470 */   184,   26,   43,   44,   45,   46,   47,   48,   49,   50,
 /*   480 */    51,   52,   53,   54,   55,   56,   57,  102,  184,  109,
 /*   490 */   110,  111,  114,  184,  109,  110,  111,  184,  227,  184,
 /*   500 */   230,  184,   22,  264,  195,   59,   22,  184,  195,  108,
 /*   510 */   206,  207,   59,  131,  132,  206,  207,  184,  138,  206,
 /*   520 */   207,  206,  207,  206,  207,   96,   97,   98,   99,  100,
 /*   530 */   101,  102,  103,  104,  105,  106,  255,  228,  229,   59,
 /*   540 */    95,  228,  229,   59,  184,   19,  242,   94,  184,   23,
 /*   550 */   241,  242,  184,  282,  241,  242,  110,  242,  184,  242,
 /*   560 */   251,   59,  109,  110,  196,  184,  251,  114,  251,   43,
 /*   570 */    44,   45,   46,   47,   48,   49,   50,   51,   52,   53,
 /*   580 */    54,   55,   56,   57,  259,  217,   12,  219,  255,  109,
 /*   590 */   110,  111,  203,  109,  110,  111,  184,   22,  145,  146,
 /*   600 */   147,   27,  112,   22,  230,  115,  116,  117,  227,   19,
 /*   610 */    59,  109,  110,  111,  291,  125,   42,   35,  206,  207,
 /*   620 */   295,  184,   96,   97,   98,   99,  100,  101,  102,  103,
 /*   630 */   104,  105,  106,   26,   59,  233,   46,   63,  136,  184,
 /*   640 */    59,  184,   19,  206,  207,  243,   23,   73,   66,  260,
 /*   650 */   261,  262,   59,  184,  242,  195,   74,  220,  184,  184,
 /*   660 */   109,  110,  111,  206,  207,  184,   43,   44,   45,   46,
 /*   670 */    47,   48,   49,   50,   51,   52,   53,   54,   55,   56,
 /*   680 */    57,  206,  207,   76,  109,  110,  111,  136,  228,  229,
 /*   690 */   109,  110,  111,   86,  184,  220,   89,   21,  108,  230,
 /*   700 */   184,  241,  109,  110,  111,  123,  184,  127,  184,  129,
 /*   710 */   130,  184,  195,  184,  124,  184,  198,  199,  184,   96,
 /*   720 */    97,   98,   99,  100,  101,  102,  103,  104,  105,  106,
 /*   730 */   206,  207,   11,  206,  207,  206,  207,  206,  207,   19,
 /*   740 */   206,  207,  184,   23,  220,  228,  229,  220,   81,  220,
 /*   750 */   195,  220,  287,  288,  220,  195,   80,  195,  241,  201,
 /*   760 */   202,  184,   73,   43,   44,   45,   46,   47,   48,   49,
 /*   770 */    50,   51,   52,   53,   54,   55,   56,   57,  201,  202,
 /*   780 */   113,  195,  184,  228,  229,  120,  121,  122,  228,  229,
 /*   790 */   228,  229,  116,   16,   23,  184,  241,   26,  131,  132,
 /*   800 */   278,  241,   19,  241,   22,   23,  184,  189,   26,  120,
 /*   810 */   121,  122,  184,   26,  228,  229,   96,   97,   98,   99,
 /*   820 */   100,  101,  102,  103,  104,  105,  106,  241,  270,  153,
 /*   830 */    66,  228,  229,  229,  206,  207,   19,  184,  228,  229,
 /*   840 */    23,   16,  121,  122,  241,  241,   82,  270,   29,  227,
 /*   850 */   252,  241,   33,   19,   77,   91,   79,  184,   22,   23,
 /*   860 */    43,   44,   45,   46,   47,   48,   49,   50,   51,   52,
 /*   870 */    53,   54,   55,   56,   57,   12,  184,   95,  184,  206,
 /*   880 */   207,   76,  111,  184,   65,  267,  184,  184,  184,  271,
 /*   890 */    27,   86,  109,  184,   89,  120,  121,  122,  206,  207,
 /*   900 */   206,  207,   77,  139,   79,   42,  184,  136,  206,  207,
 /*   910 */   206,  207,  184,   96,   97,   98,   99,  100,  101,  102,
 /*   920 */   103,  104,  105,  106,  184,  138,   63,  184,  206,  207,
 /*   930 */   153,   95,  184,   19,  206,  207,  227,   23,    7,    8,
 /*   940 */     9,  293,  293,  109,  296,  296,  206,  207,  215,  206,
 /*   950 */   207,  184,  253,   19,  206,  207,  253,   43,   44,   45,
 /*   960 */    46,   47,   48,   49,   50,   51,   52,   53,   54,   55,
 /*   970 */    56,   57,  184,  206,  207,  184,  184,   43,   44,   45,
 /*   980 */    46,   47,   48,   49,   50,   51,   52,   53,   54,   55,
 /*   990 */    56,   57,  184,   22,   23,  184,   59,  206,  207,  184,
 /*  1000 */   184,  238,  184,  240,  184,   22,  184,  184,  157,  158,
 /*  1010 */    96,   97,   98,   99,  100,  101,  102,  103,  104,  105,
 /*  1020 */   106,  206,  207,  184,  206,  207,  206,  207,  206,  207,
 /*  1030 */    96,   97,   98,   99,  100,  101,  102,  103,  104,  105,
 /*  1040 */   106,  184,   59,  227,  252,  184,  293,  110,  184,  296,
 /*  1050 */   184,  184,  184,  230,  184,  184,  184,   15,  184,  184,
 /*  1060 */   184,  253,  184,  206,  207,  184,   95,  206,  207,  102,
 /*  1070 */   206,  207,  206,  207,  206,  207,  206,  207,  206,  207,
 /*  1080 */   206,  207,  206,  207,  184,  151,  184,  206,  207,  278,
 /*  1090 */   184,  252,  184,  110,  184,  128,  184,  198,  199,  184,
 /*  1100 */   133,  184,   60,   26,  184,   19,  206,  207,  206,  207,
 /*  1110 */   131,  132,  206,  207,  206,  207,  206,  207,  206,  207,
 /*  1120 */   253,  206,  207,  206,  207,   19,  206,  207,  253,   43,
 /*  1130 */    44,   45,   46,   47,   48,   49,   50,   51,   52,   53,
 /*  1140 */    54,   55,   56,   57,  184,   26,  184,   26,  184,   43,
 /*  1150 */    44,   45,   46,   47,   48,   49,   50,   51,   52,   53,
 /*  1160 */    54,   55,   56,   57,  285,  286,  206,  207,  206,  207,
 /*  1170 */   206,  207,  184,   31,  184,  293,  184,  293,  296,  184,
 /*  1180 */   296,   39,   96,   97,   98,   99,  100,  101,  102,  103,
 /*  1190 */   104,  105,  106,  184,  206,  207,  206,  207,  206,  207,
 /*  1200 */   184,   22,   96,   97,   98,   99,  100,  101,  102,  103,
 /*  1210 */   104,  105,  106,  184,  245,  246,  184,   26,   23,  142,
 /*  1220 */   128,   26,  206,  207,  150,  133,  152,   22,   22,   24,
 /*  1230 */   111,   23,   53,  184,   26,  206,  207,  151,  206,  207,
 /*  1240 */   119,   24,  122,   23,   23,   23,   26,   26,   26,   23,
 /*  1250 */    23,   23,   26,   26,   26,  136,   23,   19,   22,   26,
 /*  1260 */   113,  114,   24,  114,  144,  184,   59,   61,    7,    8,
 /*  1270 */    59,   23,   23,  124,   26,   26,   23,   19,  145,   26,
 /*  1280 */   147,   43,   44,   45,   46,   47,   48,   49,   50,   51,
 /*  1290 */    52,   53,   54,   55,   56,   57,  145,   23,  147,  184,
 /*  1300 */    26,   43,   44,   45,   46,   47,   48,   49,   50,   51,
 /*  1310 */    52,   53,   54,   55,   56,   57,   23,  110,  184,   26,
 /*  1320 */   184,  110,  184,  184,  184,  215,  135,  215,  184,  184,
 /*  1330 */   184,  247,  184,  244,   96,   97,   98,   99,  100,  101,
 /*  1340 */   102,  103,  104,  105,  106,  184,  184,  184,  301,  184,
 /*  1350 */   184,  134,  225,  184,   96,   97,   98,   99,  100,  101,
 /*  1360 */   102,  103,  104,  105,  106,  184,  184,  184,  184,  184,
 /*  1370 */   134,  184,  274,  273,   19,  244,  244,  204,  182,  244,
 /*  1380 */   283,  231,  279,  279,  232,  244,  210,  209,  235,  235,
 /*  1390 */   235,  248,  218,  234,   19,  209,  238,  209,  238,   44,
 /*  1400 */    45,   46,   47,   48,   49,   50,   51,   52,   53,   54,
 /*  1410 */    55,   56,   57,  214,   60,  248,  248,  187,  134,   38,
 /*  1420 */    45,   46,   47,   48,   49,   50,   51,   52,   53,   54,
 /*  1430 */    55,   56,   57,  232,  191,  191,  266,  280,  191,  283,
 /*  1440 */   143,  269,  108,   22,  280,   19,   20,  258,   22,  257,
 /*  1450 */    43,   96,   97,   98,   99,  100,  101,  102,  103,  104,
 /*  1460 */   105,  106,   36,  223,  142,   18,  235,  226,  226,  191,
 /*  1470 */    18,   96,   97,   98,   99,  100,  101,  102,  103,  104,
 /*  1480 */   105,  106,  226,  226,  190,   59,  235,  235,  223,  223,
 /*  1490 */   258,  257,  191,  190,  235,  150,   62,   71,  191,  276,
 /*  1500 */   275,   19,   20,  190,   22,   22,  211,   81,  191,  190,
 /*  1510 */   211,  191,  108,  190,  208,   64,  208,  208,   36,  119,
 /*  1520 */    94,  216,  211,  208,  210,  106,  100,  101,  216,  208,
 /*  1530 */    48,  268,  208,  107,  208,  109,  110,  111,  211,  268,
 /*  1540 */   114,   59,  211,  137,  108,   88,  250,  249,  191,  141,
 /*  1550 */   250,  249,  138,   71,  250,  300,   22,  131,  132,  249,
 /*  1560 */   300,  191,  150,  238,   82,  140,  250,  249,  239,   87,
 /*  1570 */   139,  145,  146,  147,  148,  149,   94,  239,  237,  236,
 /*  1580 */    25,  235,  100,  101,  194,   26,  193,   13,  185,  107,
 /*  1590 */   185,  109,  110,  111,    6,  263,  114,  203,  265,  183,
 /*  1600 */   183,  183,  203,  212,  203,  203,  197,  197,  212,    4,
 /*  1610 */     3,   22,  197,  155,   15,  204,  203,  289,   93,  289,
 /*  1620 */    16,  286,  132,   23,  204,   23,  123,  145,  146,  147,
 /*  1630 */   148,  149,    0,    1,    2,  143,   24,    5,   20,  135,
 /*  1640 */    16,    1,   10,   11,   12,   13,   14,  137,  135,   17,
 /*  1650 */   144,  123,   19,   20,   61,   22,   37,  143,  123,   53,
 /*  1660 */   109,   53,   30,   53,   32,   34,   53,  134,    1,   36,
 /*  1670 */     5,   22,   40,  108,  153,   41,   26,   68,   75,   68,
 /*  1680 */   134,  108,   24,   20,  124,   19,  118,   67,   67,   28,
 /*  1690 */    22,   22,   59,   22,   67,   23,   22,   22,  142,   37,
 /*  1700 */    23,   22,   70,   23,   71,  157,   23,   23,   26,   23,
 /*  1710 */    78,   22,   24,   81,   23,   82,   22,   24,  134,   23,
 /*  1720 */    87,   23,   19,   20,   92,   22,  109,   94,   22,   34,
 /*  1730 */   136,   26,   85,  100,  101,   34,   34,   83,   34,   36,
 /*  1740 */   107,   34,  109,  110,  111,   75,   90,  114,   75,   34,
 /*  1750 */    23,   22,   44,   34,   24,   23,   22,   26,  126,   26,
 /*  1760 */    23,   23,   59,  131,  132,   23,   23,   26,   23,   11,
 /*  1770 */    22,   22,   26,   23,   71,   23,   22,   22,  145,  146,
 /*  1780 */   147,  148,  149,  128,   23,   82,  154,  134,   15,    1,
 /*  1790 */    87,  134,  302,  134,  134,  302,  302,   94,  302,  302,
 /*  1800 */   302,  302,  302,  100,  101,  302,  302,  302,  302,  302,
 /*  1810 */   107,  302,  109,  110,  111,    1,    2,  114,  302,    5,
 /*  1820 */   302,  302,  302,  302,   10,   11,   12,   13,   14,  302,
 /*  1830 */   302,   17,  302,  302,  302,  302,   19,   20,  302,   22,
 /*  1840 */   302,  302,  302,  302,   30,  302,   32,  302,  145,  146,
 /*  1850 */   147,  148,  149,   36,   40,  302,  302,  302,  302,  302,
 /*  1860 */   302,  302,  302,  302,  302,  302,  302,  302,  302,  302,
 /*  1870 */   302,  302,  302,  302,  302,  302,   59,  302,  302,  302,
 /*  1880 */   302,  302,  302,  302,   70,  302,  302,  302,   71,  302,
 /*  1890 */   302,  302,   78,  302,  302,   81,   19,   20,  302,   22,
 /*  1900 */   302,  302,  302,  302,  302,  302,   92,  302,  302,  302,
 /*  1910 */   302,   94,  302,   36,  302,  302,  302,  100,  101,  102,
 /*  1920 */   302,  302,  302,  302,  107,  302,  109,  110,  111,  302,
 /*  1930 */   302,  114,  302,  302,  302,  302,   59,  302,  302,  302,
 /*  1940 */   126,  302,  302,  302,  302,  131,  132,  302,   71,  302,
 /*  1950 */   302,  302,  302,  302,  302,  302,   19,   20,  302,   22,
 /*  1960 */   302,  302,  145,  146,  147,  148,  149,  302,  154,  302,
 /*  1970 */   302,   94,  302,   36,  302,  302,  302,  100,  101,  302,
 /*  1980 */   302,  302,  302,  302,  107,  302,  109,  110,  111,  302,
 /*  1990 */   302,  114,    5,  302,  302,  302,   59,   10,   11,   12,
 /*  2000 */    13,   14,  302,  302,   17,  302,  302,  302,   71,  302,
 /*  2010 */   302,  302,  302,  302,  302,  302,  302,   30,  302,   32,
 /*  2020 */   302,  302,  145,  146,  147,  148,  149,   40,  302,  302,
 /*  2030 */   302,   94,  302,  302,  302,  302,  302,  100,  101,  302,
 /*  2040 */   302,  302,  302,  302,  107,  302,  109,  110,  111,  302,
 /*  2050 */   302,  114,  302,  302,  302,  302,  302,   70,  302,  302,
 /*  2060 */   302,  302,  302,  302,  302,   78,  302,  302,   81,  302,
 /*  2070 */   302,  302,  302,  302,  302,  302,  302,  302,  302,   92,
 /*  2080 */   302,  302,  145,  146,  147,  148,  149,  302,  302,  302,
 /*  2090 */   302,  302,  302,  302,  302,  302,  302,  302,  302,  302,
 /*  2100 */   302,  302,  302,  302,  302,  302,  302,  302,  302,  302,
 /*  2110 */   302,  302,  302,  126,  302,  302,  302,  302,  131,  132,
 /*  2120 */   302,  302,  302,  302,  302,  302,  302,  302,  302,  302,
 /*  2130 */   302,  302,  302,  302,  302,  302,  302,  302,  302,  302,
 /*  2140 */   302,  154,  302,  302,  302,  302,  302,  302,  302,  302,
 /*  2150 */   302,  302,  302,  302,  302,  302,  302,  302,  302,  302,
 /*  2160 */   302,  302,  302,  302,  302,  302,  302,  302,  302,
};
#define YY_SHIFT_COUNT    (539)
#define YY_SHIFT_MIN      (0)
#define YY_SHIFT_MAX      (1987)
static const unsigned short int yy_shift_ofst[] = {
 /*     0 */  1814, 1632, 1987, 1426, 1426,  382, 1482, 1633, 1703, 1877,
 /*    10 */  1877, 1877,   85,    0,    0,  264, 1106, 1877, 1877, 1877,
 /*    20 */  1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877,
 /*    30 */   226,  226,  380,  380,  294,  667,  382,  382,  382,  382,
 /*    40 */   382,  382,   97,  194,  332,  429,  526,  623,  720,  817,
 /*    50 */   914,  934, 1086, 1238, 1106, 1106, 1106, 1106, 1106, 1106,
 /*    60 */  1106, 1106, 1106, 1106, 1106, 1106, 1106, 1106, 1106, 1106,
 /*    70 */  1106, 1106, 1258, 1106, 1355, 1375, 1375, 1817, 1877, 1877,
 /*    80 */  1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877,
 /*    90 */  1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877,
 /*   100 */  1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877,
 /*   110 */  1937, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877,
 /*   120 */  1877, 1877, 1877, 1877,   32,  129,  129,  129,  129,  129,
 /*   130 */   171,    7,   17,  593,  676,  590,  593,  205,  205,  593,
 /*   140 */   318,  318,  318,  318,   50,  152,   51, 2142, 2142,  284,
 /*   150 */   284,  284,   65,  145,  282,  145,  145,  574,  574,  256,
 /*   160 */   348,  445,  782,  593,  593,  593,  593,  593,  593,  593,
 /*   170 */   593,  593,  593,  593,  593,  593,  593,  593,  593,  593,
 /*   180 */   593,  593,  593,  593,  607,  607,  593,  721,  805,  805,
 /*   190 */   446,  851,  851,  446,  190,  979, 2142, 2142, 2142,  453,
 /*   200 */    45,   45,  480,  490,  484,  385,  575,  502,  551,  581,
 /*   210 */   593,  593,  593,  593,  593,  593,  593,  593,  593,  689,
 /*   220 */   593,  593,  593,  593,  593,  593,  593,  593,  593,  593,
 /*   230 */   593,  593,  582,  582,  582,  593,  593,  593,  593,  771,
 /*   240 */   593,  593,  593,   59,  764,  593,  593,  863,  593,  593,
 /*   250 */   593,  593,  593,  593,  593,  593,  665,  819,  580,   16,
 /*   260 */    16,   16,   16, 1119,  580,  580,  967,  321,  931, 1042,
 /*   270 */  1077,  783,  783,  834, 1077, 1077,  834, 1121, 1195,  401,
 /*   280 */  1142, 1142, 1142,  783,  787,  787, 1074, 1191, 1092, 1205,
 /*   290 */  1354, 1284, 1284, 1381, 1381, 1284, 1297, 1334, 1421, 1407,
 /*   300 */  1322, 1447, 1447, 1447, 1447, 1284, 1452, 1322, 1322, 1334,
 /*   310 */  1421, 1407, 1407, 1322, 1284, 1452, 1345, 1434, 1284, 1452,
 /*   320 */  1483, 1284, 1452, 1284, 1452, 1483, 1404, 1404, 1404, 1451,
 /*   330 */  1483, 1404, 1400, 1404, 1451, 1404, 1404, 1483, 1419, 1419,
 /*   340 */  1483, 1406, 1436, 1406, 1436, 1406, 1436, 1406, 1436, 1284,
 /*   350 */  1457, 1457, 1408, 1414, 1534, 1284, 1412, 1408, 1425, 1431,
 /*   360 */  1322, 1555, 1559, 1574, 1574, 1588, 1588, 1588, 2142, 2142,
 /*   370 */  2142, 2142, 2142, 2142, 2142, 2142, 2142, 2142, 2142, 2142,
 /*   380 */  2142, 2142, 2142,  378,  777,  836,  971,  825,  775,  983,
 /*   390 */  1208, 1179, 1217, 1120, 1220, 1206, 1221, 1222, 1226, 1227,
 /*   400 */  1228, 1233,  937, 1147, 1261, 1149, 1207, 1248, 1249, 1253,
 /*   410 */  1133, 1151, 1274, 1293, 1211, 1236, 1605, 1607, 1589, 1458,
 /*   420 */  1599, 1525, 1604, 1600, 1602, 1490, 1492, 1503, 1612, 1504,
 /*   430 */  1618, 1510, 1624, 1640, 1513, 1506, 1528, 1593, 1619, 1514,
 /*   440 */  1606, 1608, 1610, 1613, 1535, 1551, 1631, 1533, 1667, 1665,
 /*   450 */  1649, 1565, 1521, 1609, 1650, 1611, 1603, 1634, 1546, 1573,
 /*   460 */  1658, 1663, 1666, 1560, 1568, 1668, 1620, 1669, 1671, 1672,
 /*   470 */  1674, 1621, 1661, 1675, 1627, 1662, 1677, 1556, 1679, 1680,
 /*   480 */  1548, 1683, 1684, 1682, 1686, 1689, 1688, 1691, 1694, 1693,
 /*   490 */  1584, 1696, 1698, 1617, 1695, 1706, 1594, 1705, 1701, 1702,
 /*   500 */  1704, 1707, 1647, 1670, 1654, 1708, 1673, 1656, 1715, 1727,
 /*   510 */  1729, 1730, 1731, 1733, 1719, 1732, 1705, 1737, 1738, 1742,
 /*   520 */  1743, 1741, 1745, 1734, 1758, 1748, 1749, 1750, 1752, 1754,
 /*   530 */  1755, 1746, 1655, 1653, 1657, 1659, 1660, 1761, 1773, 1788,
};
#define YY_REDUCE_COUNT (382)
#define YY_REDUCE_MIN   (-260)
#define YY_REDUCE_MAX   (1420)
static const short yy_reduce_ofst[] = {
 /*     0 */  -170,  -18, -159,  309,  313, -167,  -19,   75,  117,  211,
 /*    10 */   315,  317, -165, -195, -168, -260,  389,  437,  475,  524,
 /*    20 */   527, -169,  529,  531,  -28,   80,  534,  239,  304,  412,
 /*    30 */   558,  577,   37,  120,  368,  -22,  460,  517,  555,  560,
 /*    40 */   562,  586, -257, -257, -257, -257, -257, -257, -257, -257,
 /*    50 */  -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
 /*    60 */  -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
 /*    70 */  -257, -257, -257, -257, -257, -257, -257, -172,  457,  628,
 /*    80 */   673,  692,  694,  702,  704,  722,  728,  740,  743,  748,
 /*    90 */   767,  791,  815,  818,  820,  822,  857,  861,  864,  866,
 /*   100 */   868,  870,  872,  874,  876,  881,  900,  902,  906,  908,
 /*   110 */   910,  912,  915,  917,  920,  960,  962,  964,  988,  990,
 /*   120 */   992, 1016, 1029, 1032, -257, -257, -257, -257, -257, -257,
 /*   130 */  -257, -257, -257,  271,  618, -190,   68,   60,  240, -124,
 /*   140 */   603,  610,  603,  610,   12, -257, -257, -257, -257, -128,
 /*   150 */  -128, -128, -142,   25,  270,  281,  333,  124,  236,  648,
 /*   160 */   374,  465,  465,   28,  598,  792,  839,  469,   38,  381,
 /*   170 */   622,  709,  173,  699,  522,  703,  808,  811,  867,  816,
 /*   180 */  -104,  823,   -3,  875,  649,  753,  323,  -88,  882,  884,
 /*   190 */   518,   43,  325,  899,  763,  604,  879,  969,  402, -193,
 /*   200 */  -189, -180, -151,  -55,   69,  104,  141,  259,  286,  360,
 /*   210 */   364,  455,  474,  481,  510,  516,  611,  653,  788,   99,
 /*   220 */   871,  878,  995, 1009, 1049, 1081, 1115, 1134, 1136, 1138,
 /*   230 */  1139, 1140,  733, 1110, 1112, 1144, 1145, 1146, 1148, 1084,
 /*   240 */  1161, 1162, 1163, 1089, 1047, 1165, 1166, 1127, 1169,  104,
 /*   250 */  1181, 1182, 1183, 1184, 1185, 1187, 1098, 1100, 1150, 1131,
 /*   260 */  1132, 1135, 1141, 1084, 1150, 1150, 1152, 1173, 1196, 1097,
 /*   270 */  1153, 1143, 1167, 1103, 1154, 1155, 1104, 1176, 1174, 1199,
 /*   280 */  1178, 1186, 1188, 1168, 1158, 1160, 1170, 1159, 1201, 1230,
 /*   290 */  1156, 1243, 1244, 1157, 1164, 1247, 1172, 1189, 1192, 1240,
 /*   300 */  1231, 1241, 1242, 1256, 1257, 1278, 1294, 1251, 1252, 1232,
 /*   310 */  1234, 1265, 1266, 1259, 1301, 1303, 1223, 1225, 1307, 1313,
 /*   320 */  1295, 1317, 1319, 1320, 1323, 1299, 1306, 1308, 1309, 1305,
 /*   330 */  1311, 1315, 1314, 1321, 1312, 1324, 1326, 1327, 1263, 1271,
 /*   340 */  1331, 1296, 1298, 1300, 1302, 1304, 1310, 1316, 1318, 1357,
 /*   350 */  1255, 1260, 1329, 1325, 1332, 1370, 1333, 1338, 1341, 1343,
 /*   360 */  1346, 1390, 1393, 1403, 1405, 1416, 1417, 1418, 1328, 1330,
 /*   370 */  1335, 1409, 1394, 1399, 1401, 1402, 1410, 1391, 1396, 1411,
 /*   380 */  1420, 1413, 1415,
};
static const YYACTIONTYPE yy_default[] = {
 /*     0 */  1537, 1537, 1537, 1377, 1159, 1266, 1159, 1159, 1159, 1377,
 /*    10 */  1377, 1377, 1159, 1296, 1296, 1430, 1190, 1159, 1159, 1159,
 /*    20 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1376, 1159, 1159,
 /*    30 */  1159, 1159, 1460, 1460, 1159, 1159, 1159, 1159, 1159, 1159,
 /*    40 */  1159, 1159, 1159, 1302, 1159, 1159, 1159, 1159, 1159, 1378,
 /*    50 */  1379, 1159, 1159, 1159, 1429, 1431, 1394, 1312, 1311, 1310,
 /*    60 */  1309, 1412, 1283, 1307, 1300, 1304, 1372, 1373, 1371, 1375,
 /*    70 */  1379, 1378, 1159, 1303, 1343, 1357, 1342, 1159, 1159, 1159,
 /*    80 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
 /*    90 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
 /*   100 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
 /*   110 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
 /*   120 */  1159, 1159, 1159, 1159, 1351, 1356, 1362, 1355, 1352, 1345,
 /*   130 */  1344, 1346, 1347, 1159, 1180, 1230, 1159, 1159, 1159, 1159,
 /*   140 */  1448, 1447, 1159, 1159, 1190, 1348, 1349, 1359, 1358, 1437,
 /*   150 */  1493, 1492, 1395, 1159, 1159, 1159, 1159, 1159, 1159, 1460,
 /*   160 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
 /*   170 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
 /*   180 */  1159, 1159, 1159, 1159, 1460, 1460, 1159, 1190, 1460, 1460,
 /*   190 */  1186, 1337, 1336, 1186, 1290, 1159, 1443, 1266, 1257, 1159,
 /*   200 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
 /*   210 */  1159, 1159, 1159, 1434, 1432, 1159, 1159, 1159, 1159, 1159,
 /*   220 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
 /*   230 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
 /*   240 */  1159, 1159, 1159, 1262, 1159, 1159, 1159, 1159, 1159, 1159,
 /*   250 */  1159, 1159, 1159, 1159, 1159, 1487, 1159, 1407, 1244, 1262,
 /*   260 */  1262, 1262, 1262, 1264, 1245, 1243, 1256, 1191, 1166, 1529,
 /*   270 */  1306, 1285, 1285, 1526, 1306, 1306, 1526, 1205, 1507, 1202,
 /*   280 */  1296, 1296, 1296, 1285, 1290, 1290, 1374, 1263, 1256, 1159,
 /*   290 */  1529, 1271, 1271, 1528, 1528, 1271, 1395, 1315, 1321, 1233,
 /*   300 */  1306, 1239, 1239, 1239, 1239, 1271, 1177, 1306, 1306, 1315,
 /*   310 */  1321, 1233, 1233, 1306, 1271, 1177, 1411, 1523, 1271, 1177,
 /*   320 */  1385, 1271, 1177, 1271, 1177, 1385, 1231, 1231, 1231, 1220,
 /*   330 */  1385, 1231, 1205, 1231, 1220, 1231, 1231, 1385, 1389, 1389,
 /*   340 */  1385, 1289, 1284, 1289, 1284, 1289, 1284, 1289, 1284, 1271,
 /*   350 */  1470, 1470, 1301, 1290, 1380, 1271, 1159, 1301, 1299, 1297,
 /*   360 */  1306, 1183, 1223, 1490, 1490, 1486, 1486, 1486, 1534, 1534,
 /*   370 */  1443, 1502, 1190, 1190, 1190, 1190, 1502, 1207, 1207, 1191,
 /*   380 */  1191, 1190, 1502, 1159, 1159, 1159, 1159, 1159, 1159, 1497,
 /*   390 */  1159, 1396, 1275, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
 /*   400 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
 /*   410 */  1159, 1159, 1159, 1159, 1159, 1326, 1159, 1162, 1440, 1159,
 /*   420 */  1159, 1438, 1159, 1159, 1159, 1159, 1159, 1159, 1276, 1159,
 /*   430 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
 /*   440 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1525, 1159, 1159,
 /*   450 */  1159, 1159, 1159, 1159, 1410, 1409, 1159, 1159, 1273, 1159,
 /*   460 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
 /*   470 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
 /*   480 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
 /*   490 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1298, 1159, 1159,
 /*   500 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
 /*   510 */  1159, 1159, 1475, 1291, 1159, 1159, 1516, 1159, 1159, 1159,
 /*   520 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
 /*   530 */  1159, 1511, 1247, 1328, 1159, 1327, 1331, 1159, 1171, 1159,
};
/********** 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,  /*    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,  /*    REINDEX => ID */
   59,  /*     RENAME => ID */
   59,  /*   CTIME_KW => ID */
};
#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 */ "CURRENT",
  /*   83 */ "FOLLOWING",
  /*   84 */ "PARTITION",
  /*   85 */ "PRECEDING",
  /*   86 */ "RANGE",
  /*   87 */ "UNBOUNDED",
  /*   88 */ "EXCLUDE",
  /*   89 */ "GROUPS",
  /*   90 */ "OTHERS",
  /*   91 */ "TIES",
  /*   92 */ "REINDEX",
  /*   93 */ "RENAME",
  /*   94 */ "CTIME_KW",
  /*   95 */ "ANY",
  /*   96 */ "BITAND",
  /*   97 */ "BITOR",
  /*   98 */ "LSHIFT",
  /*   99 */ "RSHIFT",
  /*  100 */ "PLUS",
  /*  101 */ "MINUS",
  /*  102 */ "STAR",
  /*  103 */ "SLASH",
  /*  104 */ "REM",
  /*  105 */ "CONCAT",
  /*  106 */ "COLLATE",
  /*  107 */ "BITNOT",
  /*  108 */ "ON",
  /*  109 */ "INDEXED",
  /*  110 */ "STRING",
  /*  111 */ "JOIN_KW",
  /*  112 */ "CONSTRAINT",
  /*  113 */ "DEFAULT",
  /*  114 */ "NULL",
  /*  115 */ "PRIMARY",
  /*  116 */ "UNIQUE",
  /*  117 */ "CHECK",
  /*  118 */ "REFERENCES",
  /*  119 */ "AUTOINCR",
  /*  120 */ "INSERT",
  /*  121 */ "DELETE",
  /*  122 */ "UPDATE",
  /*  123 */ "SET",
  /*  124 */ "DEFERRABLE",
  /*  125 */ "FOREIGN",
  /*  126 */ "DROP",
  /*  127 */ "UNION",
  /*  128 */ "ALL",
  /*  129 */ "EXCEPT",
  /*  130 */ "INTERSECT",
  /*  131 */ "SELECT",
  /*  132 */ "VALUES",
  /*  133 */ "DISTINCT",
  /*  134 */ "DOT",
  /*  135 */ "FROM",
  /*  136 */ "JOIN",
  /*  137 */ "USING",
  /*  138 */ "ORDER",
  /*  139 */ "GROUP",
  /*  140 */ "HAVING",
  /*  141 */ "LIMIT",
  /*  142 */ "WHERE",
  /*  143 */ "INTO",
  /*  144 */ "NOTHING",
  /*  145 */ "FLOAT",
  /*  146 */ "BLOB",
  /*  147 */ "INTEGER",
  /*  148 */ "VARIABLE",
  /*  149 */ "CASE",
  /*  150 */ "WHEN",
  /*  151 */ "THEN",
  /*  152 */ "ELSE",
  /*  153 */ "INDEX",
  /*  154 */ "ALTER",
  /*  155 */ "ADD",
  /*  156 */ "WINDOW",
  /*  157 */ "OVER",
  /*  158 */ "FILTER",
  /*  159 */ "TRUEFALSE",
  /*  160 */ "ISNOT",
  /*  161 */ "FUNCTION",
  /*  162 */ "COLUMN",
  /*  163 */ "AGG_FUNCTION",
  /*  164 */ "AGG_COLUMN",
  /*  165 */ "UMINUS",
  /*  166 */ "UPLUS",
  /*  167 */ "TRUTH",
  /*  168 */ "REGISTER",
  /*  169 */ "VECTOR",
  /*  170 */ "SELECT_COLUMN",
  /*  171 */ "IF_NULL_ROW",
  /*  172 */ "ASTERISK",
  /*  173 */ "SPAN",
  /*  174 */ "SPACE",
  /*  175 */ "ILLEGAL",
  /*  176 */ "input",
  /*  177 */ "cmdlist",
  /*  178 */ "ecmd",
  /*  179 */ "cmdx",
  /*  180 */ "explain",
  /*  181 */ "cmd",
  /*  182 */ "transtype",
  /*  183 */ "trans_opt",
  /*  184 */ "nm",
  /*  185 */ "savepoint_opt",
  /*  186 */ "create_table",
  /*  187 */ "create_table_args",
  /*  188 */ "createkw",
  /*  189 */ "temp",
  /*  190 */ "ifnotexists",
  /*  191 */ "dbnm",
  /*  192 */ "columnlist",
  /*  193 */ "conslist_opt",
  /*  194 */ "table_options",
  /*  195 */ "select",
  /*  196 */ "columnname",
  /*  197 */ "carglist",
  /*  198 */ "typetoken",
  /*  199 */ "typename",
  /*  200 */ "signed",
  /*  201 */ "plus_num",
  /*  202 */ "minus_num",
  /*  203 */ "scanpt",
  /*  204 */ "scantok",
  /*  205 */ "ccons",
  /*  206 */ "term",
  /*  207 */ "expr",
  /*  208 */ "onconf",
  /*  209 */ "sortorder",
  /*  210 */ "autoinc",
  /*  211 */ "eidlist_opt",
  /*  212 */ "refargs",
  /*  213 */ "defer_subclause",
  /*  214 */ "refarg",
  /*  215 */ "refact",
  /*  216 */ "init_deferred_pred_opt",
  /*  217 */ "conslist",
  /*  218 */ "tconscomma",
  /*  219 */ "tcons",
  /*  220 */ "sortlist",
  /*  221 */ "eidlist",
  /*  222 */ "defer_subclause_opt",
  /*  223 */ "orconf",
  /*  224 */ "resolvetype",
  /*  225 */ "raisetype",
  /*  226 */ "ifexists",
  /*  227 */ "fullname",
  /*  228 */ "selectnowith",
  /*  229 */ "oneselect",
  /*  230 */ "wqlist",
  /*  231 */ "multiselect_op",
  /*  232 */ "distinct",
  /*  233 */ "selcollist",
  /*  234 */ "from",
  /*  235 */ "where_opt",
  /*  236 */ "groupby_opt",
  /*  237 */ "having_opt",
  /*  238 */ "orderby_opt",
  /*  239 */ "limit_opt",
  /*  240 */ "window_clause",
  /*  241 */ "values",
  /*  242 */ "nexprlist",
  /*  243 */ "sclp",
  /*  244 */ "as",
  /*  245 */ "seltablist",
  /*  246 */ "stl_prefix",
  /*  247 */ "joinop",
  /*  248 */ "indexed_opt",
  /*  249 */ "on_opt",
  /*  250 */ "using_opt",
  /*  251 */ "exprlist",
  /*  252 */ "xfullname",
  /*  253 */ "idlist",
  /*  254 */ "with",
  /*  255 */ "setlist",
  /*  256 */ "insert_cmd",
  /*  257 */ "idlist_opt",
  /*  258 */ "upsert",
  /*  259 */ "over_clause",
  /*  260 */ "likeop",
  /*  261 */ "between_op",
  /*  262 */ "in_op",
  /*  263 */ "paren_exprlist",
  /*  264 */ "case_operand",
  /*  265 */ "case_exprlist",
  /*  266 */ "case_else",
  /*  267 */ "uniqueflag",
  /*  268 */ "collate",
  /*  269 */ "vinto",
  /*  270 */ "nmnum",
  /*  271 */ "trigger_decl",
  /*  272 */ "trigger_cmd_list",
  /*  273 */ "trigger_time",
  /*  274 */ "trigger_event",
  /*  275 */ "foreach_clause",
  /*  276 */ "when_clause",
  /*  277 */ "trigger_cmd",
  /*  278 */ "trnm",
  /*  279 */ "tridxby",
  /*  280 */ "database_kw_opt",
  /*  281 */ "key_opt",
  /*  282 */ "add_column_fullname",
  /*  283 */ "kwcolumn_opt",
  /*  284 */ "create_vtab",
  /*  285 */ "vtabarglist",
  /*  286 */ "vtabarg",
  /*  287 */ "vtabargtoken",
  /*  288 */ "lp",
  /*  289 */ "anylist",
  /*  290 */ "windowdefn_list",
  /*  291 */ "windowdefn",
  /*  292 */ "window",
  /*  293 */ "frame_opt",
  /*  294 */ "part_opt",
  /*  295 */ "filter_opt",
  /*  296 */ "range_or_rows",
  /*  297 */ "frame_bound",
  /*  298 */ "frame_bound_s",
  /*  299 */ "frame_bound_e",
  /*  300 */ "frame_exclude_opt",
  /*  301 */ "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 */ "autoinc ::=",
 /*  44 */ "autoinc ::= AUTOINCR",
 /*  45 */ "refargs ::=",
 /*  46 */ "refargs ::= refargs refarg",
 /*  47 */ "refarg ::= MATCH nm",
 /*  48 */ "refarg ::= ON INSERT refact",
 /*  49 */ "refarg ::= ON DELETE refact",
 /*  50 */ "refarg ::= ON UPDATE refact",
 /*  51 */ "refact ::= SET NULL",
 /*  52 */ "refact ::= SET DEFAULT",
 /*  53 */ "refact ::= CASCADE",
 /*  54 */ "refact ::= RESTRICT",
 /*  55 */ "refact ::= NO ACTION",
 /*  56 */ "defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt",
 /*  57 */ "defer_subclause ::= DEFERRABLE init_deferred_pred_opt",
 /*  58 */ "init_deferred_pred_opt ::=",
 /*  59 */ "init_deferred_pred_opt ::= INITIALLY DEFERRED",
 /*  60 */ "init_deferred_pred_opt ::= INITIALLY IMMEDIATE",
 /*  61 */ "conslist_opt ::=",
 /*  62 */ "tconscomma ::= COMMA",
 /*  63 */ "tcons ::= CONSTRAINT nm",
 /*  64 */ "tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf",
 /*  65 */ "tcons ::= UNIQUE LP sortlist RP onconf",
 /*  66 */ "tcons ::= CHECK LP expr RP onconf",
 /*  67 */ "tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt",
 /*  68 */ "defer_subclause_opt ::=",
 /*  69 */ "onconf ::=",
 /*  70 */ "onconf ::= ON CONFLICT resolvetype",
 /*  71 */ "orconf ::=",
 /*  72 */ "orconf ::= OR resolvetype",
 /*  73 */ "resolvetype ::= IGNORE",
 /*  74 */ "resolvetype ::= REPLACE",
 /*  75 */ "cmd ::= DROP TABLE ifexists fullname",
 /*  76 */ "ifexists ::= IF EXISTS",
 /*  77 */ "ifexists ::=",
 /*  78 */ "cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select",
 /*  79 */ "cmd ::= DROP VIEW ifexists fullname",
 /*  80 */ "cmd ::= select",
 /*  81 */ "select ::= WITH wqlist selectnowith",
 /*  82 */ "select ::= WITH RECURSIVE wqlist selectnowith",
 /*  83 */ "select ::= selectnowith",
 /*  84 */ "selectnowith ::= selectnowith multiselect_op oneselect",
 /*  85 */ "multiselect_op ::= UNION",
 /*  86 */ "multiselect_op ::= UNION ALL",
 /*  87 */ "multiselect_op ::= EXCEPT|INTERSECT",
 /*  88 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt",
 /*  89 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt",
 /*  90 */ "values ::= VALUES LP nexprlist RP",
 /*  91 */ "values ::= values COMMA LP nexprlist RP",
 /*  92 */ "distinct ::= DISTINCT",
 /*  93 */ "distinct ::= ALL",
 /*  94 */ "distinct ::=",
 /*  95 */ "sclp ::=",
 /*  96 */ "selcollist ::= sclp scanpt expr scanpt as",
 /*  97 */ "selcollist ::= sclp scanpt STAR",
 /*  98 */ "selcollist ::= sclp scanpt nm DOT STAR",
 /*  99 */ "as ::= AS nm",
 /* 100 */ "as ::=",
 /* 101 */ "from ::=",
 /* 102 */ "from ::= FROM seltablist",
 /* 103 */ "stl_prefix ::= seltablist joinop",
 /* 104 */ "stl_prefix ::=",
 /* 105 */ "seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt",
 /* 106 */ "seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt",
 /* 107 */ "seltablist ::= stl_prefix LP select RP as on_opt using_opt",
 /* 108 */ "seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt",
 /* 109 */ "dbnm ::=",
 /* 110 */ "dbnm ::= DOT nm",
 /* 111 */ "fullname ::= nm",
 /* 112 */ "fullname ::= nm DOT nm",
 /* 113 */ "xfullname ::= nm",
 /* 114 */ "xfullname ::= nm DOT nm",
 /* 115 */ "xfullname ::= nm DOT nm AS nm",
 /* 116 */ "xfullname ::= nm AS nm",
 /* 117 */ "joinop ::= COMMA|JOIN",
 /* 118 */ "joinop ::= JOIN_KW JOIN",
 /* 119 */ "joinop ::= JOIN_KW nm JOIN",
 /* 120 */ "joinop ::= JOIN_KW nm nm JOIN",
 /* 121 */ "on_opt ::= ON expr",
 /* 122 */ "on_opt ::=",
 /* 123 */ "indexed_opt ::=",
 /* 124 */ "indexed_opt ::= INDEXED BY nm",
 /* 125 */ "indexed_opt ::= NOT INDEXED",
 /* 126 */ "using_opt ::= USING LP idlist RP",
 /* 127 */ "using_opt ::=",
 /* 128 */ "orderby_opt ::=",
 /* 129 */ "orderby_opt ::= ORDER BY sortlist",
 /* 130 */ "sortlist ::= sortlist COMMA expr sortorder",
 /* 131 */ "sortlist ::= expr sortorder",
 /* 132 */ "sortorder ::= ASC",
 /* 133 */ "sortorder ::= DESC",
 /* 134 */ "sortorder ::=",
 /* 135 */ "groupby_opt ::=",
 /* 136 */ "groupby_opt ::= GROUP BY nexprlist",
 /* 137 */ "having_opt ::=",
 /* 138 */ "having_opt ::= HAVING expr",
 /* 139 */ "limit_opt ::=",
 /* 140 */ "limit_opt ::= LIMIT expr",
 /* 141 */ "limit_opt ::= LIMIT expr OFFSET expr",
 /* 142 */ "limit_opt ::= LIMIT expr COMMA expr",
 /* 143 */ "cmd ::= with DELETE FROM xfullname indexed_opt where_opt",
 /* 144 */ "where_opt ::=",
 /* 145 */ "where_opt ::= WHERE expr",
 /* 146 */ "cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt",
 /* 147 */ "setlist ::= setlist COMMA nm EQ expr",
 /* 148 */ "setlist ::= setlist COMMA LP idlist RP EQ expr",
 /* 149 */ "setlist ::= nm EQ expr",
 /* 150 */ "setlist ::= LP idlist RP EQ expr",
 /* 151 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert",
 /* 152 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES",
 /* 153 */ "upsert ::=",
 /* 154 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt",
 /* 155 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING",
 /* 156 */ "upsert ::= ON CONFLICT DO NOTHING",
 /* 157 */ "insert_cmd ::= INSERT orconf",
 /* 158 */ "insert_cmd ::= REPLACE",
 /* 159 */ "idlist_opt ::=",
 /* 160 */ "idlist_opt ::= LP idlist RP",
 /* 161 */ "idlist ::= idlist COMMA nm",
 /* 162 */ "idlist ::= nm",
 /* 163 */ "expr ::= LP expr RP",
 /* 164 */ "expr ::= ID|INDEXED",
 /* 165 */ "expr ::= JOIN_KW",
 /* 166 */ "expr ::= nm DOT nm",
 /* 167 */ "expr ::= nm DOT nm DOT nm",
 /* 168 */ "term ::= NULL|FLOAT|BLOB",
 /* 169 */ "term ::= STRING",
 /* 170 */ "term ::= INTEGER",
 /* 171 */ "expr ::= VARIABLE",
 /* 172 */ "expr ::= expr COLLATE ID|STRING",
 /* 173 */ "expr ::= CAST LP expr AS typetoken RP",
 /* 174 */ "expr ::= ID|INDEXED LP distinct exprlist RP",
 /* 175 */ "expr ::= ID|INDEXED LP STAR RP",
 /* 176 */ "expr ::= ID|INDEXED LP distinct exprlist RP over_clause",
 /* 177 */ "expr ::= ID|INDEXED LP STAR RP over_clause",
 /* 178 */ "term ::= CTIME_KW",
 /* 179 */ "expr ::= LP nexprlist COMMA expr RP",
 /* 180 */ "expr ::= expr AND expr",
 /* 181 */ "expr ::= expr OR expr",
 /* 182 */ "expr ::= expr LT|GT|GE|LE expr",
 /* 183 */ "expr ::= expr EQ|NE expr",
 /* 184 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr",
 /* 185 */ "expr ::= expr PLUS|MINUS expr",
 /* 186 */ "expr ::= expr STAR|SLASH|REM expr",
 /* 187 */ "expr ::= expr CONCAT expr",
 /* 188 */ "likeop ::= NOT LIKE_KW|MATCH",
 /* 189 */ "expr ::= expr likeop expr",
 /* 190 */ "expr ::= expr likeop expr ESCAPE expr",
 /* 191 */ "expr ::= expr ISNULL|NOTNULL",
 /* 192 */ "expr ::= expr NOT NULL",
 /* 193 */ "expr ::= expr IS expr",
 /* 194 */ "expr ::= expr IS NOT expr",
 /* 195 */ "expr ::= NOT expr",
 /* 196 */ "expr ::= BITNOT expr",
 /* 197 */ "expr ::= PLUS|MINUS expr",
 /* 198 */ "between_op ::= BETWEEN",
 /* 199 */ "between_op ::= NOT BETWEEN",
 /* 200 */ "expr ::= expr between_op expr AND expr",
 /* 201 */ "in_op ::= IN",
 /* 202 */ "in_op ::= NOT IN",
 /* 203 */ "expr ::= expr in_op LP exprlist RP",
 /* 204 */ "expr ::= LP select RP",
 /* 205 */ "expr ::= expr in_op LP select RP",
 /* 206 */ "expr ::= expr in_op nm dbnm paren_exprlist",
 /* 207 */ "expr ::= EXISTS LP select RP",
 /* 208 */ "expr ::= CASE case_operand case_exprlist case_else END",
 /* 209 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr",
 /* 210 */ "case_exprlist ::= WHEN expr THEN expr",
 /* 211 */ "case_else ::= ELSE expr",
 /* 212 */ "case_else ::=",
 /* 213 */ "case_operand ::= expr",
 /* 214 */ "case_operand ::=",
 /* 215 */ "exprlist ::=",
 /* 216 */ "nexprlist ::= nexprlist COMMA expr",
 /* 217 */ "nexprlist ::= expr",
 /* 218 */ "paren_exprlist ::=",
 /* 219 */ "paren_exprlist ::= LP exprlist RP",
 /* 220 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt",
 /* 221 */ "uniqueflag ::= UNIQUE",
 /* 222 */ "uniqueflag ::=",
 /* 223 */ "eidlist_opt ::=",
 /* 224 */ "eidlist_opt ::= LP eidlist RP",
 /* 225 */ "eidlist ::= eidlist COMMA nm collate sortorder",
 /* 226 */ "eidlist ::= nm collate sortorder",
 /* 227 */ "collate ::=",
 /* 228 */ "collate ::= COLLATE ID|STRING",
 /* 229 */ "cmd ::= DROP INDEX ifexists fullname",
 /* 230 */ "cmd ::= VACUUM vinto",
 /* 231 */ "cmd ::= VACUUM nm vinto",
 /* 232 */ "vinto ::= INTO expr",
 /* 233 */ "vinto ::=",
 /* 234 */ "cmd ::= PRAGMA nm dbnm",
 /* 235 */ "cmd ::= PRAGMA nm dbnm EQ nmnum",
 /* 236 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP",
 /* 237 */ "cmd ::= PRAGMA nm dbnm EQ minus_num",
 /* 238 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP",
 /* 239 */ "plus_num ::= PLUS INTEGER|FLOAT",
 /* 240 */ "minus_num ::= MINUS INTEGER|FLOAT",
 /* 241 */ "cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END",
 /* 242 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause",
 /* 243 */ "trigger_time ::= BEFORE|AFTER",
 /* 244 */ "trigger_time ::= INSTEAD OF",
 /* 245 */ "trigger_time ::=",
 /* 246 */ "trigger_event ::= DELETE|INSERT",
 /* 247 */ "trigger_event ::= UPDATE",
 /* 248 */ "trigger_event ::= UPDATE OF idlist",
 /* 249 */ "when_clause ::=",
 /* 250 */ "when_clause ::= WHEN expr",
 /* 251 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI",
 /* 252 */ "trigger_cmd_list ::= trigger_cmd SEMI",
 /* 253 */ "trnm ::= nm DOT nm",
 /* 254 */ "tridxby ::= INDEXED BY nm",
 /* 255 */ "tridxby ::= NOT INDEXED",
 /* 256 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt",
 /* 257 */ "trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt",
 /* 258 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt",
 /* 259 */ "trigger_cmd ::= scanpt select scanpt",
 /* 260 */ "expr ::= RAISE LP IGNORE RP",
 /* 261 */ "expr ::= RAISE LP raisetype COMMA nm RP",
 /* 262 */ "raisetype ::= ROLLBACK",
 /* 263 */ "raisetype ::= ABORT",
 /* 264 */ "raisetype ::= FAIL",
 /* 265 */ "cmd ::= DROP TRIGGER ifexists fullname",
 /* 266 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt",
 /* 267 */ "cmd ::= DETACH database_kw_opt expr",
 /* 268 */ "key_opt ::=",
 /* 269 */ "key_opt ::= KEY expr",
 /* 270 */ "cmd ::= REINDEX",
 /* 271 */ "cmd ::= REINDEX nm dbnm",
 /* 272 */ "cmd ::= ANALYZE",
 /* 273 */ "cmd ::= ANALYZE nm dbnm",
 /* 274 */ "cmd ::= ALTER TABLE fullname RENAME TO nm",
 /* 275 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist",
 /* 276 */ "add_column_fullname ::= fullname",
 /* 277 */ "cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm",
 /* 278 */ "cmd ::= create_vtab",
 /* 279 */ "cmd ::= create_vtab LP vtabarglist RP",
 /* 280 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm",
 /* 281 */ "vtabarg ::=",
 /* 282 */ "vtabargtoken ::= ANY",
 /* 283 */ "vtabargtoken ::= lp anylist RP",
 /* 284 */ "lp ::= LP",
 /* 285 */ "with ::= WITH wqlist",
 /* 286 */ "with ::= WITH RECURSIVE wqlist",
 /* 287 */ "wqlist ::= nm eidlist_opt AS LP select RP",
 /* 288 */ "wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP",
 /* 289 */ "windowdefn_list ::= windowdefn",
 /* 290 */ "windowdefn_list ::= windowdefn_list COMMA windowdefn",
 /* 291 */ "windowdefn ::= nm AS LP window RP",
 /* 292 */ "window ::= PARTITION BY nexprlist orderby_opt frame_opt",
 /* 293 */ "window ::= nm PARTITION BY nexprlist orderby_opt frame_opt",
 /* 294 */ "window ::= ORDER BY sortlist frame_opt",
 /* 295 */ "window ::= nm ORDER BY sortlist frame_opt",
 /* 296 */ "window ::= frame_opt",
 /* 297 */ "window ::= nm frame_opt",
 /* 298 */ "frame_opt ::=",
 /* 299 */ "frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt",
 /* 300 */ "frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt",
 /* 301 */ "range_or_rows ::= RANGE|ROWS|GROUPS",
 /* 302 */ "frame_bound_s ::= frame_bound",
 /* 303 */ "frame_bound_s ::= UNBOUNDED PRECEDING",
 /* 304 */ "frame_bound_e ::= frame_bound",
 /* 305 */ "frame_bound_e ::= UNBOUNDED FOLLOWING",
 /* 306 */ "frame_bound ::= expr PRECEDING|FOLLOWING",
 /* 307 */ "frame_bound ::= CURRENT ROW",
 /* 308 */ "frame_exclude_opt ::=",
 /* 309 */ "frame_exclude_opt ::= EXCLUDE frame_exclude",
 /* 310 */ "frame_exclude ::= NO OTHERS",
 /* 311 */ "frame_exclude ::= CURRENT ROW",
 /* 312 */ "frame_exclude ::= GROUP|TIES",
 /* 313 */ "window_clause ::= WINDOW windowdefn_list",
 /* 314 */ "over_clause ::= filter_opt OVER LP window RP",
 /* 315 */ "over_clause ::= filter_opt OVER nm",
 /* 316 */ "filter_opt ::=",
 /* 317 */ "filter_opt ::= FILTER LP WHERE expr RP",
 /* 318 */ "input ::= cmdlist",
 /* 319 */ "cmdlist ::= cmdlist ecmd",
 /* 320 */ "cmdlist ::= ecmd",
 /* 321 */ "ecmd ::= SEMI",
 /* 322 */ "ecmd ::= cmdx SEMI",
 /* 323 */ "ecmd ::= explain cmdx",
 /* 324 */ "trans_opt ::=",
 /* 325 */ "trans_opt ::= TRANSACTION",
 /* 326 */ "trans_opt ::= TRANSACTION nm",
 /* 327 */ "savepoint_opt ::= SAVEPOINT",
 /* 328 */ "savepoint_opt ::=",
 /* 329 */ "cmd ::= create_table create_table_args",
 /* 330 */ "columnlist ::= columnlist COMMA columnname carglist",
 /* 331 */ "columnlist ::= columnname carglist",
 /* 332 */ "nm ::= ID|INDEXED",
 /* 333 */ "nm ::= STRING",
 /* 334 */ "nm ::= JOIN_KW",
 /* 335 */ "typetoken ::= typename",
 /* 336 */ "typename ::= ID|STRING",
 /* 337 */ "signed ::= plus_num",
 /* 338 */ "signed ::= minus_num",
 /* 339 */ "carglist ::= carglist ccons",
 /* 340 */ "carglist ::=",
 /* 341 */ "ccons ::= NULL onconf",
 /* 342 */ "conslist_opt ::= COMMA conslist",
 /* 343 */ "conslist ::= conslist tconscomma tcons",
 /* 344 */ "conslist ::= tcons",
 /* 345 */ "tconscomma ::=",
 /* 346 */ "defer_subclause_opt ::= defer_subclause",
 /* 347 */ "resolvetype ::= raisetype",
 /* 348 */ "selectnowith ::= oneselect",
 /* 349 */ "oneselect ::= values",
 /* 350 */ "sclp ::= selcollist COMMA",
 /* 351 */ "as ::= ID|STRING",
 /* 352 */ "expr ::= term",
 /* 353 */ "likeop ::= LIKE_KW|MATCH",
 /* 354 */ "exprlist ::= nexprlist",
 /* 355 */ "nmnum ::= plus_num",
 /* 356 */ "nmnum ::= nm",
 /* 357 */ "nmnum ::= ON",
 /* 358 */ "nmnum ::= DELETE",
 /* 359 */ "nmnum ::= DEFAULT",
 /* 360 */ "plus_num ::= INTEGER|FLOAT",
 /* 361 */ "foreach_clause ::=",
 /* 362 */ "foreach_clause ::= FOR EACH ROW",
 /* 363 */ "trnm ::= nm",
 /* 364 */ "tridxby ::=",
 /* 365 */ "database_kw_opt ::= DATABASE",
 /* 366 */ "database_kw_opt ::=",
 /* 367 */ "kwcolumn_opt ::=",
 /* 368 */ "kwcolumn_opt ::= COLUMNKW",
 /* 369 */ "vtabarglist ::= vtabarg",
 /* 370 */ "vtabarglist ::= vtabarglist COMMA vtabarg",
 /* 371 */ "vtabarg ::= vtabarg vtabargtoken",
 /* 372 */ "anylist ::=",
 /* 373 */ "anylist ::= anylist LP anylist RP",
 /* 374 */ "anylist ::= anylist ANY",
 /* 375 */ "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 195: /* select */
    case 228: /* selectnowith */
    case 229: /* oneselect */
    case 241: /* values */
{
#line 448 "parse.y"
sqlite3SelectDelete(pParse->db, (yypminor->yy391));
#line 1984 "parse.c"
}
      break;
    case 206: /* term */
    case 207: /* expr */
    case 235: /* where_opt */
    case 237: /* having_opt */
    case 249: /* on_opt */
    case 264: /* case_operand */
    case 266: /* case_else */
    case 269: /* vinto */
    case 276: /* when_clause */
    case 281: /* key_opt */
    case 295: /* filter_opt */
{
#line 938 "parse.y"
sqlite3ExprDelete(pParse->db, (yypminor->yy102));
#line 2001 "parse.c"
}
      break;
    case 211: /* eidlist_opt */
    case 220: /* sortlist */
    case 221: /* eidlist */
    case 233: /* selcollist */
    case 236: /* groupby_opt */
    case 238: /* orderby_opt */
    case 242: /* nexprlist */
    case 243: /* sclp */
    case 251: /* exprlist */
    case 255: /* setlist */
    case 263: /* paren_exprlist */
    case 265: /* case_exprlist */
    case 294: /* part_opt */
{
#line 1327 "parse.y"
sqlite3ExprListDelete(pParse->db, (yypminor->yy94));
#line 2020 "parse.c"
}
      break;
    case 227: /* fullname */
    case 234: /* from */
    case 245: /* seltablist */
    case 246: /* stl_prefix */
    case 252: /* xfullname */
{
#line 694 "parse.y"
sqlite3SrcListDelete(pParse->db, (yypminor->yy407));
#line 2031 "parse.c"
}
      break;
    case 230: /* wqlist */
{
#line 1610 "parse.y"
sqlite3WithDelete(pParse->db, (yypminor->yy243));
#line 2038 "parse.c"
}
      break;
    case 240: /* window_clause */
    case 290: /* windowdefn_list */
{
#line 1724 "parse.y"
sqlite3WindowListDelete(pParse->db, (yypminor->yy379));
#line 2046 "parse.c"
}
      break;
    case 250: /* using_opt */
    case 253: /* idlist */
    case 257: /* idlist_opt */
{
#line 766 "parse.y"
sqlite3IdListDelete(pParse->db, (yypminor->yy76));
#line 2055 "parse.c"
}
      break;
    case 259: /* over_clause */
    case 291: /* windowdefn */
    case 292: /* window */
    case 293: /* frame_opt */
{
#line 1728 "parse.y"
sqlite3WindowDelete(pParse->db, (yypminor->yy379));
#line 2065 "parse.c"
}
      break;
    case 272: /* trigger_cmd_list */
    case 277: /* trigger_cmd */
{
#line 1444 "parse.y"
sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy11));
#line 2073 "parse.c"
}
      break;
    case 274: /* trigger_event */
{
#line 1430 "parse.y"
sqlite3IdListDelete(pParse->db, (yypminor->yy298).b);
#line 2080 "parse.c"
}
      break;
    case 297: /* frame_bound */
    case 298: /* frame_bound_s */
    case 299: /* frame_bound_e */
{
#line 1666 "parse.y"
sqlite3ExprDelete(pParse->db, (yypminor->yy389).pExpr);
#line 2089 "parse.c"
}
      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+YYNTOKEN<=(int)YY_NLOOKAHEAD ); */
    assert( iLookAhead!=YYNOCODE );
    assert( iLookAhead < YYNTOKEN );
    i += iLookAhead;
    if( i>=YY_NLOOKAHEAD || yy_lookahead[i]!=iLookAhead ){
#ifdef YYFALLBACK
      YYCODETYPE iFallback;            /* Fallback token */
      if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
             && (iFallback = yyFallback[iLookAhead])!=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;
        if( 
#if YY_SHIFT_MIN+YYWILDCARD<0
          j>=0 &&
#endif
#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT
          j<YY_ACTTAB_COUNT &&
#endif
          j<(int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])) &&
          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{
      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 2314 "parse.c"
/******** 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[] = {
   180,  /* (0) explain ::= EXPLAIN */
   180,  /* (1) explain ::= EXPLAIN QUERY PLAN */
   179,  /* (2) cmdx ::= cmd */
   181,  /* (3) cmd ::= BEGIN transtype trans_opt */
   182,  /* (4) transtype ::= */
   182,  /* (5) transtype ::= DEFERRED */
   182,  /* (6) transtype ::= IMMEDIATE */
   182,  /* (7) transtype ::= EXCLUSIVE */
   181,  /* (8) cmd ::= COMMIT|END trans_opt */
   181,  /* (9) cmd ::= ROLLBACK trans_opt */
   181,  /* (10) cmd ::= SAVEPOINT nm */
   181,  /* (11) cmd ::= RELEASE savepoint_opt nm */
   181,  /* (12) cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
   186,  /* (13) create_table ::= createkw temp TABLE ifnotexists nm dbnm */
   188,  /* (14) createkw ::= CREATE */
   190,  /* (15) ifnotexists ::= */
   190,  /* (16) ifnotexists ::= IF NOT EXISTS */
   189,  /* (17) temp ::= TEMP */
   189,  /* (18) temp ::= */
   187,  /* (19) create_table_args ::= LP columnlist conslist_opt RP table_options */
   187,  /* (20) create_table_args ::= AS select */
   194,  /* (21) table_options ::= */
   194,  /* (22) table_options ::= WITHOUT nm */
   196,  /* (23) columnname ::= nm typetoken */
   198,  /* (24) typetoken ::= */
   198,  /* (25) typetoken ::= typename LP signed RP */
   198,  /* (26) typetoken ::= typename LP signed COMMA signed RP */
   199,  /* (27) typename ::= typename ID|STRING */
   203,  /* (28) scanpt ::= */
   204,  /* (29) scantok ::= */
   205,  /* (30) ccons ::= CONSTRAINT nm */
   205,  /* (31) ccons ::= DEFAULT scantok term */
   205,  /* (32) ccons ::= DEFAULT LP expr RP */
   205,  /* (33) ccons ::= DEFAULT PLUS scantok term */
   205,  /* (34) ccons ::= DEFAULT MINUS scantok term */
   205,  /* (35) ccons ::= DEFAULT scantok ID|INDEXED */
   205,  /* (36) ccons ::= NOT NULL onconf */
   205,  /* (37) ccons ::= PRIMARY KEY sortorder onconf autoinc */
   205,  /* (38) ccons ::= UNIQUE onconf */
   205,  /* (39) ccons ::= CHECK LP expr RP */
   205,  /* (40) ccons ::= REFERENCES nm eidlist_opt refargs */
   205,  /* (41) ccons ::= defer_subclause */
   205,  /* (42) ccons ::= COLLATE ID|STRING */
   210,  /* (43) autoinc ::= */
   210,  /* (44) autoinc ::= AUTOINCR */
   212,  /* (45) refargs ::= */
   212,  /* (46) refargs ::= refargs refarg */
   214,  /* (47) refarg ::= MATCH nm */
   214,  /* (48) refarg ::= ON INSERT refact */
   214,  /* (49) refarg ::= ON DELETE refact */
   214,  /* (50) refarg ::= ON UPDATE refact */
   215,  /* (51) refact ::= SET NULL */
   215,  /* (52) refact ::= SET DEFAULT */
   215,  /* (53) refact ::= CASCADE */
   215,  /* (54) refact ::= RESTRICT */
   215,  /* (55) refact ::= NO ACTION */
   213,  /* (56) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
   213,  /* (57) defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
   216,  /* (58) init_deferred_pred_opt ::= */
   216,  /* (59) init_deferred_pred_opt ::= INITIALLY DEFERRED */
   216,  /* (60) init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
   193,  /* (61) conslist_opt ::= */
   218,  /* (62) tconscomma ::= COMMA */
   219,  /* (63) tcons ::= CONSTRAINT nm */
   219,  /* (64) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
   219,  /* (65) tcons ::= UNIQUE LP sortlist RP onconf */
   219,  /* (66) tcons ::= CHECK LP expr RP onconf */
   219,  /* (67) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
   222,  /* (68) defer_subclause_opt ::= */
   208,  /* (69) onconf ::= */
   208,  /* (70) onconf ::= ON CONFLICT resolvetype */
   223,  /* (71) orconf ::= */
   223,  /* (72) orconf ::= OR resolvetype */
   224,  /* (73) resolvetype ::= IGNORE */
   224,  /* (74) resolvetype ::= REPLACE */
   181,  /* (75) cmd ::= DROP TABLE ifexists fullname */
   226,  /* (76) ifexists ::= IF EXISTS */
   226,  /* (77) ifexists ::= */
   181,  /* (78) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
   181,  /* (79) cmd ::= DROP VIEW ifexists fullname */
   181,  /* (80) cmd ::= select */
   195,  /* (81) select ::= WITH wqlist selectnowith */
   195,  /* (82) select ::= WITH RECURSIVE wqlist selectnowith */
   195,  /* (83) select ::= selectnowith */
   228,  /* (84) selectnowith ::= selectnowith multiselect_op oneselect */
   231,  /* (85) multiselect_op ::= UNION */
   231,  /* (86) multiselect_op ::= UNION ALL */
   231,  /* (87) multiselect_op ::= EXCEPT|INTERSECT */
   229,  /* (88) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
   229,  /* (89) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
   241,  /* (90) values ::= VALUES LP nexprlist RP */
   241,  /* (91) values ::= values COMMA LP nexprlist RP */
   232,  /* (92) distinct ::= DISTINCT */
   232,  /* (93) distinct ::= ALL */
   232,  /* (94) distinct ::= */
   243,  /* (95) sclp ::= */
   233,  /* (96) selcollist ::= sclp scanpt expr scanpt as */
   233,  /* (97) selcollist ::= sclp scanpt STAR */
   233,  /* (98) selcollist ::= sclp scanpt nm DOT STAR */
   244,  /* (99) as ::= AS nm */
   244,  /* (100) as ::= */
   234,  /* (101) from ::= */
   234,  /* (102) from ::= FROM seltablist */
   246,  /* (103) stl_prefix ::= seltablist joinop */
   246,  /* (104) stl_prefix ::= */
   245,  /* (105) seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
   245,  /* (106) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */
   245,  /* (107) seltablist ::= stl_prefix LP select RP as on_opt using_opt */
   245,  /* (108) seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
   191,  /* (109) dbnm ::= */
   191,  /* (110) dbnm ::= DOT nm */
   227,  /* (111) fullname ::= nm */
   227,  /* (112) fullname ::= nm DOT nm */
   252,  /* (113) xfullname ::= nm */
   252,  /* (114) xfullname ::= nm DOT nm */
   252,  /* (115) xfullname ::= nm DOT nm AS nm */
   252,  /* (116) xfullname ::= nm AS nm */
   247,  /* (117) joinop ::= COMMA|JOIN */
   247,  /* (118) joinop ::= JOIN_KW JOIN */
   247,  /* (119) joinop ::= JOIN_KW nm JOIN */
   247,  /* (120) joinop ::= JOIN_KW nm nm JOIN */
   249,  /* (121) on_opt ::= ON expr */
   249,  /* (122) on_opt ::= */
   248,  /* (123) indexed_opt ::= */
   248,  /* (124) indexed_opt ::= INDEXED BY nm */
   248,  /* (125) indexed_opt ::= NOT INDEXED */
   250,  /* (126) using_opt ::= USING LP idlist RP */
   250,  /* (127) using_opt ::= */
   238,  /* (128) orderby_opt ::= */
   238,  /* (129) orderby_opt ::= ORDER BY sortlist */
   220,  /* (130) sortlist ::= sortlist COMMA expr sortorder */
   220,  /* (131) sortlist ::= expr sortorder */
   209,  /* (132) sortorder ::= ASC */
   209,  /* (133) sortorder ::= DESC */
   209,  /* (134) sortorder ::= */
   236,  /* (135) groupby_opt ::= */
   236,  /* (136) groupby_opt ::= GROUP BY nexprlist */
   237,  /* (137) having_opt ::= */
   237,  /* (138) having_opt ::= HAVING expr */
   239,  /* (139) limit_opt ::= */
   239,  /* (140) limit_opt ::= LIMIT expr */
   239,  /* (141) limit_opt ::= LIMIT expr OFFSET expr */
   239,  /* (142) limit_opt ::= LIMIT expr COMMA expr */
   181,  /* (143) cmd ::= with DELETE FROM xfullname indexed_opt where_opt */
   235,  /* (144) where_opt ::= */
   235,  /* (145) where_opt ::= WHERE expr */
   181,  /* (146) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt */
   255,  /* (147) setlist ::= setlist COMMA nm EQ expr */
   255,  /* (148) setlist ::= setlist COMMA LP idlist RP EQ expr */
   255,  /* (149) setlist ::= nm EQ expr */
   255,  /* (150) setlist ::= LP idlist RP EQ expr */
   181,  /* (151) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
   181,  /* (152) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES */
   258,  /* (153) upsert ::= */
   258,  /* (154) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt */
   258,  /* (155) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING */
   258,  /* (156) upsert ::= ON CONFLICT DO NOTHING */
   256,  /* (157) insert_cmd ::= INSERT orconf */
   256,  /* (158) insert_cmd ::= REPLACE */
   257,  /* (159) idlist_opt ::= */
   257,  /* (160) idlist_opt ::= LP idlist RP */
   253,  /* (161) idlist ::= idlist COMMA nm */
   253,  /* (162) idlist ::= nm */
   207,  /* (163) expr ::= LP expr RP */
   207,  /* (164) expr ::= ID|INDEXED */
   207,  /* (165) expr ::= JOIN_KW */
   207,  /* (166) expr ::= nm DOT nm */
   207,  /* (167) expr ::= nm DOT nm DOT nm */
   206,  /* (168) term ::= NULL|FLOAT|BLOB */
   206,  /* (169) term ::= STRING */
   206,  /* (170) term ::= INTEGER */
   207,  /* (171) expr ::= VARIABLE */
   207,  /* (172) expr ::= expr COLLATE ID|STRING */
   207,  /* (173) expr ::= CAST LP expr AS typetoken RP */
   207,  /* (174) expr ::= ID|INDEXED LP distinct exprlist RP */
   207,  /* (175) expr ::= ID|INDEXED LP STAR RP */
   207,  /* (176) expr ::= ID|INDEXED LP distinct exprlist RP over_clause */
   207,  /* (177) expr ::= ID|INDEXED LP STAR RP over_clause */
   206,  /* (178) term ::= CTIME_KW */
   207,  /* (179) expr ::= LP nexprlist COMMA expr RP */
   207,  /* (180) expr ::= expr AND expr */
   207,  /* (181) expr ::= expr OR expr */
   207,  /* (182) expr ::= expr LT|GT|GE|LE expr */
   207,  /* (183) expr ::= expr EQ|NE expr */
   207,  /* (184) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */
   207,  /* (185) expr ::= expr PLUS|MINUS expr */
   207,  /* (186) expr ::= expr STAR|SLASH|REM expr */
   207,  /* (187) expr ::= expr CONCAT expr */
   260,  /* (188) likeop ::= NOT LIKE_KW|MATCH */
   207,  /* (189) expr ::= expr likeop expr */
   207,  /* (190) expr ::= expr likeop expr ESCAPE expr */
   207,  /* (191) expr ::= expr ISNULL|NOTNULL */
   207,  /* (192) expr ::= expr NOT NULL */
   207,  /* (193) expr ::= expr IS expr */
   207,  /* (194) expr ::= expr IS NOT expr */
   207,  /* (195) expr ::= NOT expr */
   207,  /* (196) expr ::= BITNOT expr */
   207,  /* (197) expr ::= PLUS|MINUS expr */
   261,  /* (198) between_op ::= BETWEEN */
   261,  /* (199) between_op ::= NOT BETWEEN */
   207,  /* (200) expr ::= expr between_op expr AND expr */
   262,  /* (201) in_op ::= IN */
   262,  /* (202) in_op ::= NOT IN */
   207,  /* (203) expr ::= expr in_op LP exprlist RP */
   207,  /* (204) expr ::= LP select RP */
   207,  /* (205) expr ::= expr in_op LP select RP */
   207,  /* (206) expr ::= expr in_op nm dbnm paren_exprlist */
   207,  /* (207) expr ::= EXISTS LP select RP */
   207,  /* (208) expr ::= CASE case_operand case_exprlist case_else END */
   265,  /* (209) case_exprlist ::= case_exprlist WHEN expr THEN expr */
   265,  /* (210) case_exprlist ::= WHEN expr THEN expr */
   266,  /* (211) case_else ::= ELSE expr */
   266,  /* (212) case_else ::= */
   264,  /* (213) case_operand ::= expr */
   264,  /* (214) case_operand ::= */
   251,  /* (215) exprlist ::= */
   242,  /* (216) nexprlist ::= nexprlist COMMA expr */
   242,  /* (217) nexprlist ::= expr */
   263,  /* (218) paren_exprlist ::= */
   263,  /* (219) paren_exprlist ::= LP exprlist RP */
   181,  /* (220) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
   267,  /* (221) uniqueflag ::= UNIQUE */
   267,  /* (222) uniqueflag ::= */
   211,  /* (223) eidlist_opt ::= */
   211,  /* (224) eidlist_opt ::= LP eidlist RP */
   221,  /* (225) eidlist ::= eidlist COMMA nm collate sortorder */
   221,  /* (226) eidlist ::= nm collate sortorder */
   268,  /* (227) collate ::= */
   268,  /* (228) collate ::= COLLATE ID|STRING */
   181,  /* (229) cmd ::= DROP INDEX ifexists fullname */
   181,  /* (230) cmd ::= VACUUM vinto */
   181,  /* (231) cmd ::= VACUUM nm vinto */
   269,  /* (232) vinto ::= INTO expr */
   269,  /* (233) vinto ::= */
   181,  /* (234) cmd ::= PRAGMA nm dbnm */
   181,  /* (235) cmd ::= PRAGMA nm dbnm EQ nmnum */
   181,  /* (236) cmd ::= PRAGMA nm dbnm LP nmnum RP */
   181,  /* (237) cmd ::= PRAGMA nm dbnm EQ minus_num */
   181,  /* (238) cmd ::= PRAGMA nm dbnm LP minus_num RP */
   201,  /* (239) plus_num ::= PLUS INTEGER|FLOAT */
   202,  /* (240) minus_num ::= MINUS INTEGER|FLOAT */
   181,  /* (241) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
   271,  /* (242) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
   273,  /* (243) trigger_time ::= BEFORE|AFTER */
   273,  /* (244) trigger_time ::= INSTEAD OF */
   273,  /* (245) trigger_time ::= */
   274,  /* (246) trigger_event ::= DELETE|INSERT */
   274,  /* (247) trigger_event ::= UPDATE */
   274,  /* (248) trigger_event ::= UPDATE OF idlist */
   276,  /* (249) when_clause ::= */
   276,  /* (250) when_clause ::= WHEN expr */
   272,  /* (251) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
   272,  /* (252) trigger_cmd_list ::= trigger_cmd SEMI */
   278,  /* (253) trnm ::= nm DOT nm */
   279,  /* (254) tridxby ::= INDEXED BY nm */
   279,  /* (255) tridxby ::= NOT INDEXED */
   277,  /* (256) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt */
   277,  /* (257) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
   277,  /* (258) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
   277,  /* (259) trigger_cmd ::= scanpt select scanpt */
   207,  /* (260) expr ::= RAISE LP IGNORE RP */
   207,  /* (261) expr ::= RAISE LP raisetype COMMA nm RP */
   225,  /* (262) raisetype ::= ROLLBACK */
   225,  /* (263) raisetype ::= ABORT */
   225,  /* (264) raisetype ::= FAIL */
   181,  /* (265) cmd ::= DROP TRIGGER ifexists fullname */
   181,  /* (266) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
   181,  /* (267) cmd ::= DETACH database_kw_opt expr */
   281,  /* (268) key_opt ::= */
   281,  /* (269) key_opt ::= KEY expr */
   181,  /* (270) cmd ::= REINDEX */
   181,  /* (271) cmd ::= REINDEX nm dbnm */
   181,  /* (272) cmd ::= ANALYZE */
   181,  /* (273) cmd ::= ANALYZE nm dbnm */
   181,  /* (274) cmd ::= ALTER TABLE fullname RENAME TO nm */
   181,  /* (275) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
   282,  /* (276) add_column_fullname ::= fullname */
   181,  /* (277) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
   181,  /* (278) cmd ::= create_vtab */
   181,  /* (279) cmd ::= create_vtab LP vtabarglist RP */
   284,  /* (280) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
   286,  /* (281) vtabarg ::= */
   287,  /* (282) vtabargtoken ::= ANY */
   287,  /* (283) vtabargtoken ::= lp anylist RP */
   288,  /* (284) lp ::= LP */
   254,  /* (285) with ::= WITH wqlist */
   254,  /* (286) with ::= WITH RECURSIVE wqlist */
   230,  /* (287) wqlist ::= nm eidlist_opt AS LP select RP */
   230,  /* (288) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
   290,  /* (289) windowdefn_list ::= windowdefn */
   290,  /* (290) windowdefn_list ::= windowdefn_list COMMA windowdefn */
   291,  /* (291) windowdefn ::= nm AS LP window RP */
   292,  /* (292) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
   292,  /* (293) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
   292,  /* (294) window ::= ORDER BY sortlist frame_opt */
   292,  /* (295) window ::= nm ORDER BY sortlist frame_opt */
   292,  /* (296) window ::= frame_opt */
   292,  /* (297) window ::= nm frame_opt */
   293,  /* (298) frame_opt ::= */
   293,  /* (299) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
   293,  /* (300) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
   296,  /* (301) range_or_rows ::= RANGE|ROWS|GROUPS */
   298,  /* (302) frame_bound_s ::= frame_bound */
   298,  /* (303) frame_bound_s ::= UNBOUNDED PRECEDING */
   299,  /* (304) frame_bound_e ::= frame_bound */
   299,  /* (305) frame_bound_e ::= UNBOUNDED FOLLOWING */
   297,  /* (306) frame_bound ::= expr PRECEDING|FOLLOWING */
   297,  /* (307) frame_bound ::= CURRENT ROW */
   300,  /* (308) frame_exclude_opt ::= */
   300,  /* (309) frame_exclude_opt ::= EXCLUDE frame_exclude */
   301,  /* (310) frame_exclude ::= NO OTHERS */
   301,  /* (311) frame_exclude ::= CURRENT ROW */
   301,  /* (312) frame_exclude ::= GROUP|TIES */
   240,  /* (313) window_clause ::= WINDOW windowdefn_list */
   259,  /* (314) over_clause ::= filter_opt OVER LP window RP */
   259,  /* (315) over_clause ::= filter_opt OVER nm */
   295,  /* (316) filter_opt ::= */
   295,  /* (317) filter_opt ::= FILTER LP WHERE expr RP */
   176,  /* (318) input ::= cmdlist */
   177,  /* (319) cmdlist ::= cmdlist ecmd */
   177,  /* (320) cmdlist ::= ecmd */
   178,  /* (321) ecmd ::= SEMI */
   178,  /* (322) ecmd ::= cmdx SEMI */
   178,  /* (323) ecmd ::= explain cmdx */
   183,  /* (324) trans_opt ::= */
   183,  /* (325) trans_opt ::= TRANSACTION */
   183,  /* (326) trans_opt ::= TRANSACTION nm */
   185,  /* (327) savepoint_opt ::= SAVEPOINT */
   185,  /* (328) savepoint_opt ::= */
   181,  /* (329) cmd ::= create_table create_table_args */
   192,  /* (330) columnlist ::= columnlist COMMA columnname carglist */
   192,  /* (331) columnlist ::= columnname carglist */
   184,  /* (332) nm ::= ID|INDEXED */
   184,  /* (333) nm ::= STRING */
   184,  /* (334) nm ::= JOIN_KW */
   198,  /* (335) typetoken ::= typename */
   199,  /* (336) typename ::= ID|STRING */
   200,  /* (337) signed ::= plus_num */
   200,  /* (338) signed ::= minus_num */
   197,  /* (339) carglist ::= carglist ccons */
   197,  /* (340) carglist ::= */
   205,  /* (341) ccons ::= NULL onconf */
   193,  /* (342) conslist_opt ::= COMMA conslist */
   217,  /* (343) conslist ::= conslist tconscomma tcons */
   217,  /* (344) conslist ::= tcons */
   218,  /* (345) tconscomma ::= */
   222,  /* (346) defer_subclause_opt ::= defer_subclause */
   224,  /* (347) resolvetype ::= raisetype */
   228,  /* (348) selectnowith ::= oneselect */
   229,  /* (349) oneselect ::= values */
   243,  /* (350) sclp ::= selcollist COMMA */
   244,  /* (351) as ::= ID|STRING */
   207,  /* (352) expr ::= term */
   260,  /* (353) likeop ::= LIKE_KW|MATCH */
   251,  /* (354) exprlist ::= nexprlist */
   270,  /* (355) nmnum ::= plus_num */
   270,  /* (356) nmnum ::= nm */
   270,  /* (357) nmnum ::= ON */
   270,  /* (358) nmnum ::= DELETE */
   270,  /* (359) nmnum ::= DEFAULT */
   201,  /* (360) plus_num ::= INTEGER|FLOAT */
   275,  /* (361) foreach_clause ::= */
   275,  /* (362) foreach_clause ::= FOR EACH ROW */
   278,  /* (363) trnm ::= nm */
   279,  /* (364) tridxby ::= */
   280,  /* (365) database_kw_opt ::= DATABASE */
   280,  /* (366) database_kw_opt ::= */
   283,  /* (367) kwcolumn_opt ::= */
   283,  /* (368) kwcolumn_opt ::= COLUMNKW */
   285,  /* (369) vtabarglist ::= vtabarg */
   285,  /* (370) vtabarglist ::= vtabarglist COMMA vtabarg */
   286,  /* (371) vtabarg ::= vtabarg vtabargtoken */
   289,  /* (372) anylist ::= */
   289,  /* (373) anylist ::= anylist LP anylist RP */
   289,  /* (374) anylist ::= anylist ANY */
   254,  /* (375) 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 */
    0,  /* (43) autoinc ::= */
   -1,  /* (44) autoinc ::= AUTOINCR */
    0,  /* (45) refargs ::= */
   -2,  /* (46) refargs ::= refargs refarg */
   -2,  /* (47) refarg ::= MATCH nm */
   -3,  /* (48) refarg ::= ON INSERT refact */
   -3,  /* (49) refarg ::= ON DELETE refact */
   -3,  /* (50) refarg ::= ON UPDATE refact */
   -2,  /* (51) refact ::= SET NULL */
   -2,  /* (52) refact ::= SET DEFAULT */
   -1,  /* (53) refact ::= CASCADE */
   -1,  /* (54) refact ::= RESTRICT */
   -2,  /* (55) refact ::= NO ACTION */
   -3,  /* (56) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
   -2,  /* (57) defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
    0,  /* (58) init_deferred_pred_opt ::= */
   -2,  /* (59) init_deferred_pred_opt ::= INITIALLY DEFERRED */
   -2,  /* (60) init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
    0,  /* (61) conslist_opt ::= */
   -1,  /* (62) tconscomma ::= COMMA */
   -2,  /* (63) tcons ::= CONSTRAINT nm */
   -7,  /* (64) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
   -5,  /* (65) tcons ::= UNIQUE LP sortlist RP onconf */
   -5,  /* (66) tcons ::= CHECK LP expr RP onconf */
  -10,  /* (67) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
    0,  /* (68) defer_subclause_opt ::= */
    0,  /* (69) onconf ::= */
   -3,  /* (70) onconf ::= ON CONFLICT resolvetype */
    0,  /* (71) orconf ::= */
   -2,  /* (72) orconf ::= OR resolvetype */
   -1,  /* (73) resolvetype ::= IGNORE */
   -1,  /* (74) resolvetype ::= REPLACE */
   -4,  /* (75) cmd ::= DROP TABLE ifexists fullname */
   -2,  /* (76) ifexists ::= IF EXISTS */
    0,  /* (77) ifexists ::= */
   -9,  /* (78) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
   -4,  /* (79) cmd ::= DROP VIEW ifexists fullname */
   -1,  /* (80) cmd ::= select */
   -3,  /* (81) select ::= WITH wqlist selectnowith */
   -4,  /* (82) select ::= WITH RECURSIVE wqlist selectnowith */
   -1,  /* (83) select ::= selectnowith */
   -3,  /* (84) selectnowith ::= selectnowith multiselect_op oneselect */
   -1,  /* (85) multiselect_op ::= UNION */
   -2,  /* (86) multiselect_op ::= UNION ALL */
   -1,  /* (87) multiselect_op ::= EXCEPT|INTERSECT */
   -9,  /* (88) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
  -10,  /* (89) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
   -4,  /* (90) values ::= VALUES LP nexprlist RP */
   -5,  /* (91) values ::= values COMMA LP nexprlist RP */
   -1,  /* (92) distinct ::= DISTINCT */
   -1,  /* (93) distinct ::= ALL */
    0,  /* (94) distinct ::= */
    0,  /* (95) sclp ::= */
   -5,  /* (96) selcollist ::= sclp scanpt expr scanpt as */
   -3,  /* (97) selcollist ::= sclp scanpt STAR */
   -5,  /* (98) selcollist ::= sclp scanpt nm DOT STAR */
   -2,  /* (99) as ::= AS nm */
    0,  /* (100) as ::= */
    0,  /* (101) from ::= */
   -2,  /* (102) from ::= FROM seltablist */
   -2,  /* (103) stl_prefix ::= seltablist joinop */
    0,  /* (104) stl_prefix ::= */
   -7,  /* (105) seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
   -9,  /* (106) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */
   -7,  /* (107) seltablist ::= stl_prefix LP select RP as on_opt using_opt */
   -7,  /* (108) seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
    0,  /* (109) dbnm ::= */
   -2,  /* (110) dbnm ::= DOT nm */
   -1,  /* (111) fullname ::= nm */
   -3,  /* (112) fullname ::= nm DOT nm */
   -1,  /* (113) xfullname ::= nm */
   -3,  /* (114) xfullname ::= nm DOT nm */
   -5,  /* (115) xfullname ::= nm DOT nm AS nm */
   -3,  /* (116) xfullname ::= nm AS nm */
   -1,  /* (117) joinop ::= COMMA|JOIN */
   -2,  /* (118) joinop ::= JOIN_KW JOIN */
   -3,  /* (119) joinop ::= JOIN_KW nm JOIN */
   -4,  /* (120) joinop ::= JOIN_KW nm nm JOIN */
   -2,  /* (121) on_opt ::= ON expr */
    0,  /* (122) on_opt ::= */
    0,  /* (123) indexed_opt ::= */
   -3,  /* (124) indexed_opt ::= INDEXED BY nm */
   -2,  /* (125) indexed_opt ::= NOT INDEXED */
   -4,  /* (126) using_opt ::= USING LP idlist RP */
    0,  /* (127) using_opt ::= */
    0,  /* (128) orderby_opt ::= */
   -3,  /* (129) orderby_opt ::= ORDER BY sortlist */
   -4,  /* (130) sortlist ::= sortlist COMMA expr sortorder */
   -2,  /* (131) sortlist ::= expr sortorder */
   -1,  /* (132) sortorder ::= ASC */
   -1,  /* (133) sortorder ::= DESC */
    0,  /* (134) sortorder ::= */
    0,  /* (135) groupby_opt ::= */
   -3,  /* (136) groupby_opt ::= GROUP BY nexprlist */
    0,  /* (137) having_opt ::= */
   -2,  /* (138) having_opt ::= HAVING expr */
    0,  /* (139) limit_opt ::= */
   -2,  /* (140) limit_opt ::= LIMIT expr */
   -4,  /* (141) limit_opt ::= LIMIT expr OFFSET expr */
   -4,  /* (142) limit_opt ::= LIMIT expr COMMA expr */
   -6,  /* (143) cmd ::= with DELETE FROM xfullname indexed_opt where_opt */
    0,  /* (144) where_opt ::= */
   -2,  /* (145) where_opt ::= WHERE expr */
   -8,  /* (146) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt */
   -5,  /* (147) setlist ::= setlist COMMA nm EQ expr */
   -7,  /* (148) setlist ::= setlist COMMA LP idlist RP EQ expr */
   -3,  /* (149) setlist ::= nm EQ expr */
   -5,  /* (150) setlist ::= LP idlist RP EQ expr */
   -7,  /* (151) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
   -7,  /* (152) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES */
    0,  /* (153) upsert ::= */
  -11,  /* (154) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt */
   -8,  /* (155) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING */
   -4,  /* (156) upsert ::= ON CONFLICT DO NOTHING */
   -2,  /* (157) insert_cmd ::= INSERT orconf */
   -1,  /* (158) insert_cmd ::= REPLACE */
    0,  /* (159) idlist_opt ::= */
   -3,  /* (160) idlist_opt ::= LP idlist RP */
   -3,  /* (161) idlist ::= idlist COMMA nm */
   -1,  /* (162) idlist ::= nm */
   -3,  /* (163) expr ::= LP expr RP */
   -1,  /* (164) expr ::= ID|INDEXED */
   -1,  /* (165) expr ::= JOIN_KW */
   -3,  /* (166) expr ::= nm DOT nm */
   -5,  /* (167) expr ::= nm DOT nm DOT nm */
   -1,  /* (168) term ::= NULL|FLOAT|BLOB */
   -1,  /* (169) term ::= STRING */
   -1,  /* (170) term ::= INTEGER */
   -1,  /* (171) expr ::= VARIABLE */
   -3,  /* (172) expr ::= expr COLLATE ID|STRING */
   -6,  /* (173) expr ::= CAST LP expr AS typetoken RP */
   -5,  /* (174) expr ::= ID|INDEXED LP distinct exprlist RP */
   -4,  /* (175) expr ::= ID|INDEXED LP STAR RP */
   -6,  /* (176) expr ::= ID|INDEXED LP distinct exprlist RP over_clause */
   -5,  /* (177) expr ::= ID|INDEXED LP STAR RP over_clause */
   -1,  /* (178) term ::= CTIME_KW */
   -5,  /* (179) expr ::= LP nexprlist COMMA expr RP */
   -3,  /* (180) expr ::= expr AND expr */
   -3,  /* (181) expr ::= expr OR expr */
   -3,  /* (182) expr ::= expr LT|GT|GE|LE expr */
   -3,  /* (183) expr ::= expr EQ|NE expr */
   -3,  /* (184) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */
   -3,  /* (185) expr ::= expr PLUS|MINUS expr */
   -3,  /* (186) expr ::= expr STAR|SLASH|REM expr */
   -3,  /* (187) expr ::= expr CONCAT expr */
   -2,  /* (188) likeop ::= NOT LIKE_KW|MATCH */
   -3,  /* (189) expr ::= expr likeop expr */
   -5,  /* (190) expr ::= expr likeop expr ESCAPE expr */
   -2,  /* (191) expr ::= expr ISNULL|NOTNULL */
   -3,  /* (192) expr ::= expr NOT NULL */
   -3,  /* (193) expr ::= expr IS expr */
   -4,  /* (194) expr ::= expr IS NOT expr */
   -2,  /* (195) expr ::= NOT expr */
   -2,  /* (196) expr ::= BITNOT expr */
   -2,  /* (197) expr ::= PLUS|MINUS expr */
   -1,  /* (198) between_op ::= BETWEEN */
   -2,  /* (199) between_op ::= NOT BETWEEN */
   -5,  /* (200) expr ::= expr between_op expr AND expr */
   -1,  /* (201) in_op ::= IN */
   -2,  /* (202) in_op ::= NOT IN */
   -5,  /* (203) expr ::= expr in_op LP exprlist RP */
   -3,  /* (204) expr ::= LP select RP */
   -5,  /* (205) expr ::= expr in_op LP select RP */
   -5,  /* (206) expr ::= expr in_op nm dbnm paren_exprlist */
   -4,  /* (207) expr ::= EXISTS LP select RP */
   -5,  /* (208) expr ::= CASE case_operand case_exprlist case_else END */
   -5,  /* (209) case_exprlist ::= case_exprlist WHEN expr THEN expr */
   -4,  /* (210) case_exprlist ::= WHEN expr THEN expr */
   -2,  /* (211) case_else ::= ELSE expr */
    0,  /* (212) case_else ::= */
   -1,  /* (213) case_operand ::= expr */
    0,  /* (214) case_operand ::= */
    0,  /* (215) exprlist ::= */
   -3,  /* (216) nexprlist ::= nexprlist COMMA expr */
   -1,  /* (217) nexprlist ::= expr */
    0,  /* (218) paren_exprlist ::= */
   -3,  /* (219) paren_exprlist ::= LP exprlist RP */
  -12,  /* (220) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
   -1,  /* (221) uniqueflag ::= UNIQUE */
    0,  /* (222) uniqueflag ::= */
    0,  /* (223) eidlist_opt ::= */
   -3,  /* (224) eidlist_opt ::= LP eidlist RP */
   -5,  /* (225) eidlist ::= eidlist COMMA nm collate sortorder */
   -3,  /* (226) eidlist ::= nm collate sortorder */
    0,  /* (227) collate ::= */
   -2,  /* (228) collate ::= COLLATE ID|STRING */
   -4,  /* (229) cmd ::= DROP INDEX ifexists fullname */
   -2,  /* (230) cmd ::= VACUUM vinto */
   -3,  /* (231) cmd ::= VACUUM nm vinto */
   -2,  /* (232) vinto ::= INTO expr */
    0,  /* (233) vinto ::= */
   -3,  /* (234) cmd ::= PRAGMA nm dbnm */
   -5,  /* (235) cmd ::= PRAGMA nm dbnm EQ nmnum */
   -6,  /* (236) cmd ::= PRAGMA nm dbnm LP nmnum RP */
   -5,  /* (237) cmd ::= PRAGMA nm dbnm EQ minus_num */
   -6,  /* (238) cmd ::= PRAGMA nm dbnm LP minus_num RP */
   -2,  /* (239) plus_num ::= PLUS INTEGER|FLOAT */
   -2,  /* (240) minus_num ::= MINUS INTEGER|FLOAT */
   -5,  /* (241) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
  -11,  /* (242) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
   -1,  /* (243) trigger_time ::= BEFORE|AFTER */
   -2,  /* (244) trigger_time ::= INSTEAD OF */
    0,  /* (245) trigger_time ::= */
   -1,  /* (246) trigger_event ::= DELETE|INSERT */
   -1,  /* (247) trigger_event ::= UPDATE */
   -3,  /* (248) trigger_event ::= UPDATE OF idlist */
    0,  /* (249) when_clause ::= */
   -2,  /* (250) when_clause ::= WHEN expr */
   -3,  /* (251) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
   -2,  /* (252) trigger_cmd_list ::= trigger_cmd SEMI */
   -3,  /* (253) trnm ::= nm DOT nm */
   -3,  /* (254) tridxby ::= INDEXED BY nm */
   -2,  /* (255) tridxby ::= NOT INDEXED */
   -8,  /* (256) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt */
   -8,  /* (257) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
   -6,  /* (258) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
   -3,  /* (259) trigger_cmd ::= scanpt select scanpt */
   -4,  /* (260) expr ::= RAISE LP IGNORE RP */
   -6,  /* (261) expr ::= RAISE LP raisetype COMMA nm RP */
   -1,  /* (262) raisetype ::= ROLLBACK */
   -1,  /* (263) raisetype ::= ABORT */
   -1,  /* (264) raisetype ::= FAIL */
   -4,  /* (265) cmd ::= DROP TRIGGER ifexists fullname */
   -6,  /* (266) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
   -3,  /* (267) cmd ::= DETACH database_kw_opt expr */
    0,  /* (268) key_opt ::= */
   -2,  /* (269) key_opt ::= KEY expr */
   -1,  /* (270) cmd ::= REINDEX */
   -3,  /* (271) cmd ::= REINDEX nm dbnm */
   -1,  /* (272) cmd ::= ANALYZE */
   -3,  /* (273) cmd ::= ANALYZE nm dbnm */
   -6,  /* (274) cmd ::= ALTER TABLE fullname RENAME TO nm */
   -7,  /* (275) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
   -1,  /* (276) add_column_fullname ::= fullname */
   -8,  /* (277) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
   -1,  /* (278) cmd ::= create_vtab */
   -4,  /* (279) cmd ::= create_vtab LP vtabarglist RP */
   -8,  /* (280) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
    0,  /* (281) vtabarg ::= */
   -1,  /* (282) vtabargtoken ::= ANY */
   -3,  /* (283) vtabargtoken ::= lp anylist RP */
   -1,  /* (284) lp ::= LP */
   -2,  /* (285) with ::= WITH wqlist */
   -3,  /* (286) with ::= WITH RECURSIVE wqlist */
   -6,  /* (287) wqlist ::= nm eidlist_opt AS LP select RP */
   -8,  /* (288) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
   -1,  /* (289) windowdefn_list ::= windowdefn */
   -3,  /* (290) windowdefn_list ::= windowdefn_list COMMA windowdefn */
   -5,  /* (291) windowdefn ::= nm AS LP window RP */
   -5,  /* (292) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
   -6,  /* (293) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
   -4,  /* (294) window ::= ORDER BY sortlist frame_opt */
   -5,  /* (295) window ::= nm ORDER BY sortlist frame_opt */
   -1,  /* (296) window ::= frame_opt */
   -2,  /* (297) window ::= nm frame_opt */
    0,  /* (298) frame_opt ::= */
   -3,  /* (299) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
   -6,  /* (300) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
   -1,  /* (301) range_or_rows ::= RANGE|ROWS|GROUPS */
   -1,  /* (302) frame_bound_s ::= frame_bound */
   -2,  /* (303) frame_bound_s ::= UNBOUNDED PRECEDING */
   -1,  /* (304) frame_bound_e ::= frame_bound */
   -2,  /* (305) frame_bound_e ::= UNBOUNDED FOLLOWING */
   -2,  /* (306) frame_bound ::= expr PRECEDING|FOLLOWING */
   -2,  /* (307) frame_bound ::= CURRENT ROW */
    0,  /* (308) frame_exclude_opt ::= */
   -2,  /* (309) frame_exclude_opt ::= EXCLUDE frame_exclude */
   -2,  /* (310) frame_exclude ::= NO OTHERS */
   -2,  /* (311) frame_exclude ::= CURRENT ROW */
   -1,  /* (312) frame_exclude ::= GROUP|TIES */
   -2,  /* (313) window_clause ::= WINDOW windowdefn_list */
   -5,  /* (314) over_clause ::= filter_opt OVER LP window RP */
   -3,  /* (315) over_clause ::= filter_opt OVER nm */
    0,  /* (316) filter_opt ::= */
   -5,  /* (317) filter_opt ::= FILTER LP WHERE expr RP */
   -1,  /* (318) input ::= cmdlist */
   -2,  /* (319) cmdlist ::= cmdlist ecmd */
   -1,  /* (320) cmdlist ::= ecmd */
   -1,  /* (321) ecmd ::= SEMI */
   -2,  /* (322) ecmd ::= cmdx SEMI */
   -2,  /* (323) ecmd ::= explain cmdx */
    0,  /* (324) trans_opt ::= */
   -1,  /* (325) trans_opt ::= TRANSACTION */
   -2,  /* (326) trans_opt ::= TRANSACTION nm */
   -1,  /* (327) savepoint_opt ::= SAVEPOINT */
    0,  /* (328) savepoint_opt ::= */
   -2,  /* (329) cmd ::= create_table create_table_args */
   -4,  /* (330) columnlist ::= columnlist COMMA columnname carglist */
   -2,  /* (331) columnlist ::= columnname carglist */
   -1,  /* (332) nm ::= ID|INDEXED */
   -1,  /* (333) nm ::= STRING */
   -1,  /* (334) nm ::= JOIN_KW */
   -1,  /* (335) typetoken ::= typename */
   -1,  /* (336) typename ::= ID|STRING */
   -1,  /* (337) signed ::= plus_num */
   -1,  /* (338) signed ::= minus_num */
   -2,  /* (339) carglist ::= carglist ccons */
    0,  /* (340) carglist ::= */
   -2,  /* (341) ccons ::= NULL onconf */
   -2,  /* (342) conslist_opt ::= COMMA conslist */
   -3,  /* (343) conslist ::= conslist tconscomma tcons */
   -1,  /* (344) conslist ::= tcons */
    0,  /* (345) tconscomma ::= */
   -1,  /* (346) defer_subclause_opt ::= defer_subclause */
   -1,  /* (347) resolvetype ::= raisetype */
   -1,  /* (348) selectnowith ::= oneselect */
   -1,  /* (349) oneselect ::= values */
   -2,  /* (350) sclp ::= selcollist COMMA */
   -1,  /* (351) as ::= ID|STRING */
   -1,  /* (352) expr ::= term */
   -1,  /* (353) likeop ::= LIKE_KW|MATCH */
   -1,  /* (354) exprlist ::= nexprlist */
   -1,  /* (355) nmnum ::= plus_num */
   -1,  /* (356) nmnum ::= nm */
   -1,  /* (357) nmnum ::= ON */
   -1,  /* (358) nmnum ::= DELETE */
   -1,  /* (359) nmnum ::= DEFAULT */
   -1,  /* (360) plus_num ::= INTEGER|FLOAT */
    0,  /* (361) foreach_clause ::= */
   -3,  /* (362) foreach_clause ::= FOR EACH ROW */
   -1,  /* (363) trnm ::= nm */
    0,  /* (364) tridxby ::= */
   -1,  /* (365) database_kw_opt ::= DATABASE */
    0,  /* (366) database_kw_opt ::= */
    0,  /* (367) kwcolumn_opt ::= */
   -1,  /* (368) kwcolumn_opt ::= COLUMNKW */
   -1,  /* (369) vtabarglist ::= vtabarg */
   -3,  /* (370) vtabarglist ::= vtabarglist COMMA vtabarg */
   -2,  /* (371) vtabarg ::= vtabarg vtabargtoken */
    0,  /* (372) anylist ::= */
   -4,  /* (373) anylist ::= anylist LP anylist RP */
   -2,  /* (374) anylist ::= anylist ANY */
    0,  /* (375) 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], go to state %d.\n",
        yyTracePrompt,
        yyruleno, yyRuleName[yyruleno], yymsp[yysize].stateno);
    }else{
      fprintf(yyTraceFILE, "%sReduce %d [%s].\n",
        yyTracePrompt, yyruleno, yyRuleName[yyruleno]);
    }
  }
#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 123 "parse.y"
{ pParse->explain = 1; }
#line 3232 "parse.c"
        break;
      case 1: /* explain ::= EXPLAIN QUERY PLAN */
#line 124 "parse.y"
{ pParse->explain = 2; }
#line 3237 "parse.c"
        break;
      case 2: /* cmdx ::= cmd */
#line 126 "parse.y"
{ sqlite3FinishCoding(pParse); }
#line 3242 "parse.c"
        break;
      case 3: /* cmd ::= BEGIN transtype trans_opt */
#line 131 "parse.y"
{sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy100);}
#line 3247 "parse.c"
        break;
      case 4: /* transtype ::= */
#line 136 "parse.y"
{yymsp[1].minor.yy100 = TK_DEFERRED;}
#line 3252 "parse.c"
        break;
      case 5: /* transtype ::= DEFERRED */
      case 6: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==6);
      case 7: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==7);
      case 301: /* range_or_rows ::= RANGE|ROWS|GROUPS */ yytestcase(yyruleno==301);
#line 137 "parse.y"
{yymsp[0].minor.yy100 = yymsp[0].major; /*A-overwrites-X*/}
#line 3260 "parse.c"
        break;
      case 8: /* cmd ::= COMMIT|END trans_opt */
      case 9: /* cmd ::= ROLLBACK trans_opt */ yytestcase(yyruleno==9);
#line 140 "parse.y"
{sqlite3EndTransaction(pParse,yymsp[-1].major);}
#line 3266 "parse.c"
        break;
      case 10: /* cmd ::= SAVEPOINT nm */
#line 145 "parse.y"
{
  sqlite3Savepoint(pParse, SAVEPOINT_BEGIN, &yymsp[0].minor.yy0);
}
#line 3273 "parse.c"
        break;
      case 11: /* cmd ::= RELEASE savepoint_opt nm */
#line 148 "parse.y"
{
  sqlite3Savepoint(pParse, SAVEPOINT_RELEASE, &yymsp[0].minor.yy0);
}
#line 3280 "parse.c"
        break;
      case 12: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
#line 151 "parse.y"
{
  sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0);
}
#line 3287 "parse.c"
        break;
      case 13: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */
#line 158 "parse.y"
{
   sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy100,0,0,yymsp[-2].minor.yy100);
}
#line 3294 "parse.c"
        break;
      case 14: /* createkw ::= CREATE */
#line 161 "parse.y"
{disableLookaside(pParse);}
#line 3299 "parse.c"
        break;
      case 15: /* ifnotexists ::= */
      case 18: /* temp ::= */ yytestcase(yyruleno==18);
      case 21: /* table_options ::= */ yytestcase(yyruleno==21);
      case 43: /* autoinc ::= */ yytestcase(yyruleno==43);
      case 58: /* init_deferred_pred_opt ::= */ yytestcase(yyruleno==58);
      case 68: /* defer_subclause_opt ::= */ yytestcase(yyruleno==68);
      case 77: /* ifexists ::= */ yytestcase(yyruleno==77);
      case 94: /* distinct ::= */ yytestcase(yyruleno==94);
      case 227: /* collate ::= */ yytestcase(yyruleno==227);
#line 164 "parse.y"
{yymsp[1].minor.yy100 = 0;}
#line 3312 "parse.c"
        break;
      case 16: /* ifnotexists ::= IF NOT EXISTS */
#line 165 "parse.y"
{yymsp[-2].minor.yy100 = 1;}
#line 3317 "parse.c"
        break;
      case 17: /* temp ::= TEMP */
      case 44: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==44);
#line 168 "parse.y"
{yymsp[0].minor.yy100 = 1;}
#line 3323 "parse.c"
        break;
      case 19: /* create_table_args ::= LP columnlist conslist_opt RP table_options */
#line 171 "parse.y"
{
  sqlite3EndTable(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,yymsp[0].minor.yy100,0);
}
#line 3330 "parse.c"
        break;
      case 20: /* create_table_args ::= AS select */
#line 174 "parse.y"
{
  sqlite3EndTable(pParse,0,0,0,yymsp[0].minor.yy391);
  sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy391);
}
#line 3338 "parse.c"
        break;
      case 22: /* table_options ::= WITHOUT nm */
#line 180 "parse.y"
{
  if( yymsp[0].minor.yy0.n==5 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,"rowid",5)==0 ){
    yymsp[-1].minor.yy100 = TF_WithoutRowid | TF_NoVisibleRowid;
  }else{
    yymsp[-1].minor.yy100 = 0;
    sqlite3ErrorMsg(pParse, "unknown table option: %.*s", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z);
  }
}
#line 3350 "parse.c"
        break;
      case 23: /* columnname ::= nm typetoken */
#line 190 "parse.y"
{sqlite3AddColumn(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);}
#line 3355 "parse.c"
        break;
      case 24: /* typetoken ::= */
      case 61: /* conslist_opt ::= */ yytestcase(yyruleno==61);
      case 100: /* as ::= */ yytestcase(yyruleno==100);
#line 272 "parse.y"
{yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = 0;}
#line 3362 "parse.c"
        break;
      case 25: /* typetoken ::= typename LP signed RP */
#line 274 "parse.y"
{
  yymsp[-3].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z);
}
#line 3369 "parse.c"
        break;
      case 26: /* typetoken ::= typename LP signed COMMA signed RP */
#line 277 "parse.y"
{
  yymsp[-5].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z);
}
#line 3376 "parse.c"
        break;
      case 27: /* typename ::= typename ID|STRING */
#line 282 "parse.y"
{yymsp[-1].minor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);}
#line 3381 "parse.c"
        break;
      case 28: /* scanpt ::= */
#line 300 "parse.y"
{
  assert( yyLookahead!=YYNOCODE );
  yymsp[1].minor.yy528 = yyLookaheadToken.z;
}
#line 3389 "parse.c"
        break;
      case 29: /* scantok ::= */
#line 304 "parse.y"
{
  assert( yyLookahead!=YYNOCODE );
  yymsp[1].minor.yy0 = yyLookaheadToken;
}
#line 3397 "parse.c"
        break;
      case 30: /* ccons ::= CONSTRAINT nm */
      case 63: /* tcons ::= CONSTRAINT nm */ yytestcase(yyruleno==63);
#line 314 "parse.y"
{pParse->constraintName = yymsp[0].minor.yy0;}
#line 3403 "parse.c"
        break;
      case 31: /* ccons ::= DEFAULT scantok term */
#line 316 "parse.y"
{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy102,yymsp[-1].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}
#line 3408 "parse.c"
        break;
      case 32: /* ccons ::= DEFAULT LP expr RP */
#line 318 "parse.y"
{sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy102,yymsp[-2].minor.yy0.z+1,yymsp[0].minor.yy0.z);}
#line 3413 "parse.c"
        break;
      case 33: /* ccons ::= DEFAULT PLUS scantok term */
#line 320 "parse.y"
{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy102,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}
#line 3418 "parse.c"
        break;
      case 34: /* ccons ::= DEFAULT MINUS scantok term */
#line 321 "parse.y"
{
  Expr *p = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy102, 0);
  sqlite3AddDefaultValue(pParse,p,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);
}
#line 3426 "parse.c"
        break;
      case 35: /* ccons ::= DEFAULT scantok ID|INDEXED */
#line 325 "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 3438 "parse.c"
        break;
      case 36: /* ccons ::= NOT NULL onconf */
#line 338 "parse.y"
{sqlite3AddNotNull(pParse, yymsp[0].minor.yy100);}
#line 3443 "parse.c"
        break;
      case 37: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */
#line 340 "parse.y"
{sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy100,yymsp[0].minor.yy100,yymsp[-2].minor.yy100);}
#line 3448 "parse.c"
        break;
      case 38: /* ccons ::= UNIQUE onconf */
#line 341 "parse.y"
{sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy100,0,0,0,0,
                                   SQLITE_IDXTYPE_UNIQUE);}
#line 3454 "parse.c"
        break;
      case 39: /* ccons ::= CHECK LP expr RP */
#line 343 "parse.y"
{sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy102);}
#line 3459 "parse.c"
        break;
      case 40: /* ccons ::= REFERENCES nm eidlist_opt refargs */
#line 345 "parse.y"
{sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy94,yymsp[0].minor.yy100);}
#line 3464 "parse.c"
        break;
      case 41: /* ccons ::= defer_subclause */
#line 346 "parse.y"
{sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy100);}
#line 3469 "parse.c"
        break;
      case 42: /* ccons ::= COLLATE ID|STRING */
#line 347 "parse.y"
{sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);}
#line 3474 "parse.c"
        break;
      case 45: /* refargs ::= */
#line 360 "parse.y"
{ yymsp[1].minor.yy100 = OE_None*0x0101; /* EV: R-19803-45884 */}
#line 3479 "parse.c"
        break;
      case 46: /* refargs ::= refargs refarg */
#line 361 "parse.y"
{ yymsp[-1].minor.yy100 = (yymsp[-1].minor.yy100 & ~yymsp[0].minor.yy199.mask) | yymsp[0].minor.yy199.value; }
#line 3484 "parse.c"
        break;
      case 47: /* refarg ::= MATCH nm */
#line 363 "parse.y"
{ yymsp[-1].minor.yy199.value = 0;     yymsp[-1].minor.yy199.mask = 0x000000; }
#line 3489 "parse.c"
        break;
      case 48: /* refarg ::= ON INSERT refact */
#line 364 "parse.y"
{ yymsp[-2].minor.yy199.value = 0;     yymsp[-2].minor.yy199.mask = 0x000000; }
#line 3494 "parse.c"
        break;
      case 49: /* refarg ::= ON DELETE refact */
#line 365 "parse.y"
{ yymsp[-2].minor.yy199.value = yymsp[0].minor.yy100;     yymsp[-2].minor.yy199.mask = 0x0000ff; }
#line 3499 "parse.c"
        break;
      case 50: /* refarg ::= ON UPDATE refact */
#line 366 "parse.y"
{ yymsp[-2].minor.yy199.value = yymsp[0].minor.yy100<<8;  yymsp[-2].minor.yy199.mask = 0x00ff00; }
#line 3504 "parse.c"
        break;
      case 51: /* refact ::= SET NULL */
#line 368 "parse.y"
{ yymsp[-1].minor.yy100 = OE_SetNull;  /* EV: R-33326-45252 */}
#line 3509 "parse.c"
        break;
      case 52: /* refact ::= SET DEFAULT */
#line 369 "parse.y"
{ yymsp[-1].minor.yy100 = OE_SetDflt;  /* EV: R-33326-45252 */}
#line 3514 "parse.c"
        break;
      case 53: /* refact ::= CASCADE */
#line 370 "parse.y"
{ yymsp[0].minor.yy100 = OE_Cascade;  /* EV: R-33326-45252 */}
#line 3519 "parse.c"
        break;
      case 54: /* refact ::= RESTRICT */
#line 371 "parse.y"
{ yymsp[0].minor.yy100 = OE_Restrict; /* EV: R-33326-45252 */}
#line 3524 "parse.c"
        break;
      case 55: /* refact ::= NO ACTION */
#line 372 "parse.y"
{ yymsp[-1].minor.yy100 = OE_None;     /* EV: R-33326-45252 */}
#line 3529 "parse.c"
        break;
      case 56: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
#line 374 "parse.y"
{yymsp[-2].minor.yy100 = 0;}
#line 3534 "parse.c"
        break;
      case 57: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
      case 72: /* orconf ::= OR resolvetype */ yytestcase(yyruleno==72);
      case 157: /* insert_cmd ::= INSERT orconf */ yytestcase(yyruleno==157);
#line 375 "parse.y"
{yymsp[-1].minor.yy100 = yymsp[0].minor.yy100;}
#line 3541 "parse.c"
        break;
      case 59: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */
      case 76: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==76);
      case 199: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==199);
      case 202: /* in_op ::= NOT IN */ yytestcase(yyruleno==202);
      case 228: /* collate ::= COLLATE ID|STRING */ yytestcase(yyruleno==228);
#line 378 "parse.y"
{yymsp[-1].minor.yy100 = 1;}
#line 3550 "parse.c"
        break;
      case 60: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
#line 379 "parse.y"
{yymsp[-1].minor.yy100 = 0;}
#line 3555 "parse.c"
        break;
      case 62: /* tconscomma ::= COMMA */
#line 385 "parse.y"
{pParse->constraintName.n = 0;}
#line 3560 "parse.c"
        break;
      case 64: /* tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
#line 389 "parse.y"
{sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy94,yymsp[0].minor.yy100,yymsp[-2].minor.yy100,0);}
#line 3565 "parse.c"
        break;
      case 65: /* tcons ::= UNIQUE LP sortlist RP onconf */
#line 391 "parse.y"
{sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy94,yymsp[0].minor.yy100,0,0,0,0,
                                       SQLITE_IDXTYPE_UNIQUE);}
#line 3571 "parse.c"
        break;
      case 66: /* tcons ::= CHECK LP expr RP onconf */
#line 394 "parse.y"
{sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy102);}
#line 3576 "parse.c"
        break;
      case 67: /* tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
#line 396 "parse.y"
{
    sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy94, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy94, yymsp[-1].minor.yy100);
    sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy100);
}
#line 3584 "parse.c"
        break;
      case 69: /* onconf ::= */
      case 71: /* orconf ::= */ yytestcase(yyruleno==71);
#line 410 "parse.y"
{yymsp[1].minor.yy100 = OE_Default;}
#line 3590 "parse.c"
        break;
      case 70: /* onconf ::= ON CONFLICT resolvetype */
#line 411 "parse.y"
{yymsp[-2].minor.yy100 = yymsp[0].minor.yy100;}
#line 3595 "parse.c"
        break;
      case 73: /* resolvetype ::= IGNORE */
#line 415 "parse.y"
{yymsp[0].minor.yy100 = OE_Ignore;}
#line 3600 "parse.c"
        break;
      case 74: /* resolvetype ::= REPLACE */
      case 158: /* insert_cmd ::= REPLACE */ yytestcase(yyruleno==158);
#line 416 "parse.y"
{yymsp[0].minor.yy100 = OE_Replace;}
#line 3606 "parse.c"
        break;
      case 75: /* cmd ::= DROP TABLE ifexists fullname */
#line 420 "parse.y"
{
  sqlite3DropTable(pParse, yymsp[0].minor.yy407, 0, yymsp[-1].minor.yy100);
}
#line 3613 "parse.c"
        break;
      case 78: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
#line 431 "parse.y"
{
  sqlite3CreateView(pParse, &yymsp[-8].minor.yy0, &yymsp[-4].minor.yy0, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy94, yymsp[0].minor.yy391, yymsp[-7].minor.yy100, yymsp[-5].minor.yy100);
}
#line 3620 "parse.c"
        break;
      case 79: /* cmd ::= DROP VIEW ifexists fullname */
#line 434 "parse.y"
{
  sqlite3DropTable(pParse, yymsp[0].minor.yy407, 1, yymsp[-1].minor.yy100);
}
#line 3627 "parse.c"
        break;
      case 80: /* cmd ::= select */
#line 441 "parse.y"
{
  SelectDest dest = {SRT_Output, 0, 0, 0, 0, 0};
  sqlite3Select(pParse, yymsp[0].minor.yy391, &dest);
  sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy391);
}
#line 3636 "parse.c"
        break;
      case 81: /* select ::= WITH wqlist selectnowith */
#line 479 "parse.y"
{
  Select *p = yymsp[0].minor.yy391;
  if( p ){
    p->pWith = yymsp[-1].minor.yy243;
    parserDoubleLinkSelect(pParse, p);
  }else{
    sqlite3WithDelete(pParse->db, yymsp[-1].minor.yy243);
  }
  yymsp[-2].minor.yy391 = p;
}
#line 3650 "parse.c"
        break;
      case 82: /* select ::= WITH RECURSIVE wqlist selectnowith */
#line 489 "parse.y"
{
  Select *p = yymsp[0].minor.yy391;
  if( p ){
    p->pWith = yymsp[-1].minor.yy243;
    parserDoubleLinkSelect(pParse, p);
  }else{
    sqlite3WithDelete(pParse->db, yymsp[-1].minor.yy243);
  }
  yymsp[-3].minor.yy391 = p;
}
#line 3664 "parse.c"
        break;
      case 83: /* select ::= selectnowith */
#line 500 "parse.y"
{
  Select *p = yymsp[0].minor.yy391;
  if( p ){
    parserDoubleLinkSelect(pParse, p);
  }
  yymsp[0].minor.yy391 = p; /*A-overwrites-X*/
}
#line 3675 "parse.c"
        break;
      case 84: /* selectnowith ::= selectnowith multiselect_op oneselect */
#line 510 "parse.y"
{
  Select *pRhs = yymsp[0].minor.yy391;
  Select *pLhs = yymsp[-2].minor.yy391;
  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.yy100;
    pRhs->pPrior = pLhs;
    if( ALWAYS(pLhs) ) pLhs->selFlags &= ~SF_MultiValue;
    pRhs->selFlags &= ~SF_MultiValue;
    if( yymsp[-1].minor.yy100!=TK_ALL ) pParse->hasCompound = 1;
  }else{
    sqlite3SelectDelete(pParse->db, pLhs);
  }
  yymsp[-2].minor.yy391 = pRhs;
}
#line 3701 "parse.c"
        break;
      case 85: /* multiselect_op ::= UNION */
      case 87: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==87);
#line 533 "parse.y"
{yymsp[0].minor.yy100 = yymsp[0].major; /*A-overwrites-OP*/}
#line 3707 "parse.c"
        break;
      case 86: /* multiselect_op ::= UNION ALL */
#line 534 "parse.y"
{yymsp[-1].minor.yy100 = TK_ALL;}
#line 3712 "parse.c"
        break;
      case 88: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
#line 540 "parse.y"
{
  yymsp[-8].minor.yy391 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy94,yymsp[-5].minor.yy407,yymsp[-4].minor.yy102,yymsp[-3].minor.yy94,yymsp[-2].minor.yy102,yymsp[-1].minor.yy94,yymsp[-7].minor.yy100,yymsp[0].minor.yy102);
}
#line 3719 "parse.c"
        break;
      case 89: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
#line 546 "parse.y"
{
  yymsp[-9].minor.yy391 = sqlite3SelectNew(pParse,yymsp[-7].minor.yy94,yymsp[-6].minor.yy407,yymsp[-5].minor.yy102,yymsp[-4].minor.yy94,yymsp[-3].minor.yy102,yymsp[-1].minor.yy94,yymsp[-8].minor.yy100,yymsp[0].minor.yy102);
  if( yymsp[-9].minor.yy391 ){
    yymsp[-9].minor.yy391->pWinDefn = yymsp[-2].minor.yy379;
  }else{
    sqlite3WindowListDelete(pParse->db, yymsp[-2].minor.yy379);
  }
}
#line 3731 "parse.c"
        break;
      case 90: /* values ::= VALUES LP nexprlist RP */
#line 561 "parse.y"
{
  yymsp[-3].minor.yy391 = sqlite3SelectNew(pParse,yymsp[-1].minor.yy94,0,0,0,0,0,SF_Values,0);
}
#line 3738 "parse.c"
        break;
      case 91: /* values ::= values COMMA LP nexprlist RP */
#line 564 "parse.y"
{
  Select *pRight, *pLeft = yymsp[-4].minor.yy391;
  pRight = sqlite3SelectNew(pParse,yymsp[-1].minor.yy94,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.yy391 = pRight;
  }else{
    yymsp[-4].minor.yy391 = pLeft;
  }
}
#line 3754 "parse.c"
        break;
      case 92: /* distinct ::= DISTINCT */
#line 581 "parse.y"
{yymsp[0].minor.yy100 = SF_Distinct;}
#line 3759 "parse.c"
        break;
      case 93: /* distinct ::= ALL */
#line 582 "parse.y"
{yymsp[0].minor.yy100 = SF_All;}
#line 3764 "parse.c"
        break;
      case 95: /* sclp ::= */
      case 128: /* orderby_opt ::= */ yytestcase(yyruleno==128);
      case 135: /* groupby_opt ::= */ yytestcase(yyruleno==135);
      case 215: /* exprlist ::= */ yytestcase(yyruleno==215);
      case 218: /* paren_exprlist ::= */ yytestcase(yyruleno==218);
      case 223: /* eidlist_opt ::= */ yytestcase(yyruleno==223);
#line 595 "parse.y"
{yymsp[1].minor.yy94 = 0;}
#line 3774 "parse.c"
        break;
      case 96: /* selcollist ::= sclp scanpt expr scanpt as */
#line 596 "parse.y"
{
   yymsp[-4].minor.yy94 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy94, yymsp[-2].minor.yy102);
   if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy94, &yymsp[0].minor.yy0, 1);
   sqlite3ExprListSetSpan(pParse,yymsp[-4].minor.yy94,yymsp[-3].minor.yy528,yymsp[-1].minor.yy528);
}
#line 3783 "parse.c"
        break;
      case 97: /* selcollist ::= sclp scanpt STAR */
#line 601 "parse.y"
{
  Expr *p = sqlite3Expr(pParse->db, TK_ASTERISK, 0);
  yymsp[-2].minor.yy94 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy94, p);
}
#line 3791 "parse.c"
        break;
      case 98: /* selcollist ::= sclp scanpt nm DOT STAR */
#line 605 "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.yy94 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy94, pDot);
}
#line 3801 "parse.c"
        break;
      case 99: /* as ::= AS nm */
      case 110: /* dbnm ::= DOT nm */ yytestcase(yyruleno==110);
      case 239: /* plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==239);
      case 240: /* minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==240);
#line 616 "parse.y"
{yymsp[-1].minor.yy0 = yymsp[0].minor.yy0;}
#line 3809 "parse.c"
        break;
      case 101: /* from ::= */
#line 630 "parse.y"
{yymsp[1].minor.yy407 = sqlite3DbMallocZero(pParse->db, sizeof(*yymsp[1].minor.yy407));}
#line 3814 "parse.c"
        break;
      case 102: /* from ::= FROM seltablist */
#line 631 "parse.y"
{
  yymsp[-1].minor.yy407 = yymsp[0].minor.yy407;
  sqlite3SrcListShiftJoinType(yymsp[-1].minor.yy407);
}
#line 3822 "parse.c"
        break;
      case 103: /* stl_prefix ::= seltablist joinop */
#line 639 "parse.y"
{
   if( ALWAYS(yymsp[-1].minor.yy407 && yymsp[-1].minor.yy407->nSrc>0) ) yymsp[-1].minor.yy407->a[yymsp[-1].minor.yy407->nSrc-1].fg.jointype = (u8)yymsp[0].minor.yy100;
}
#line 3829 "parse.c"
        break;
      case 104: /* stl_prefix ::= */
#line 642 "parse.y"
{yymsp[1].minor.yy407 = 0;}
#line 3834 "parse.c"
        break;
      case 105: /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
#line 644 "parse.y"
{
  yymsp[-6].minor.yy407 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy407,&yymsp[-5].minor.yy0,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,0,yymsp[-1].minor.yy102,yymsp[0].minor.yy76);
  sqlite3SrcListIndexedBy(pParse, yymsp[-6].minor.yy407, &yymsp[-2].minor.yy0);
}
#line 3842 "parse.c"
        break;
      case 106: /* seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */
#line 649 "parse.y"
{
  yymsp[-8].minor.yy407 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-8].minor.yy407,&yymsp[-7].minor.yy0,&yymsp[-6].minor.yy0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy102,yymsp[0].minor.yy76);
  sqlite3SrcListFuncArgs(pParse, yymsp[-8].minor.yy407, yymsp[-4].minor.yy94);
}
#line 3850 "parse.c"
        break;
      case 107: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */
#line 655 "parse.y"
{
    yymsp[-6].minor.yy407 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy407,0,0,&yymsp[-2].minor.yy0,yymsp[-4].minor.yy391,yymsp[-1].minor.yy102,yymsp[0].minor.yy76);
  }
#line 3857 "parse.c"
        break;
      case 108: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
#line 659 "parse.y"
{
    if( yymsp[-6].minor.yy407==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy102==0 && yymsp[0].minor.yy76==0 ){
      yymsp[-6].minor.yy407 = yymsp[-4].minor.yy407;
    }else if( yymsp[-4].minor.yy407->nSrc==1 ){
      yymsp[-6].minor.yy407 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy407,0,0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy102,yymsp[0].minor.yy76);
      if( yymsp[-6].minor.yy407 ){
        struct SrcList_item *pNew = &yymsp[-6].minor.yy407->a[yymsp[-6].minor.yy407->nSrc-1];
        struct SrcList_item *pOld = yymsp[-4].minor.yy407->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.yy407);
    }else{
      Select *pSubquery;
      sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy407);
      pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy407,0,0,0,0,SF_NestedFrom,0);
      yymsp[-6].minor.yy407 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy407,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy102,yymsp[0].minor.yy76);
    }
  }
#line 3889 "parse.c"
        break;
      case 109: /* dbnm ::= */
      case 123: /* indexed_opt ::= */ yytestcase(yyruleno==123);
#line 690 "parse.y"
{yymsp[1].minor.yy0.z=0; yymsp[1].minor.yy0.n=0;}
#line 3895 "parse.c"
        break;
      case 111: /* fullname ::= nm */
#line 695 "parse.y"
{
  yylhsminor.yy407 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0);
  if( IN_RENAME_OBJECT && yylhsminor.yy407 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy407->a[0].zName, &yymsp[0].minor.yy0);
}
#line 3903 "parse.c"
  yymsp[0].minor.yy407 = yylhsminor.yy407;
        break;
      case 112: /* fullname ::= nm DOT nm */
#line 699 "parse.y"
{
  yylhsminor.yy407 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
  if( IN_RENAME_OBJECT && yylhsminor.yy407 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy407->a[0].zName, &yymsp[0].minor.yy0);
}
#line 3912 "parse.c"
  yymsp[-2].minor.yy407 = yylhsminor.yy407;
        break;
      case 113: /* xfullname ::= nm */
#line 707 "parse.y"
{yymsp[0].minor.yy407 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0); /*A-overwrites-X*/}
#line 3918 "parse.c"
        break;
      case 114: /* xfullname ::= nm DOT nm */
#line 709 "parse.y"
{yymsp[-2].minor.yy407 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/}
#line 3923 "parse.c"
        break;
      case 115: /* xfullname ::= nm DOT nm AS nm */
#line 710 "parse.y"
{
   yymsp[-4].minor.yy407 = sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,&yymsp[-2].minor.yy0); /*A-overwrites-X*/
   if( yymsp[-4].minor.yy407 ) yymsp[-4].minor.yy407->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
}
#line 3931 "parse.c"
        break;
      case 116: /* xfullname ::= nm AS nm */
#line 714 "parse.y"
{  
   yymsp[-2].minor.yy407 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,0); /*A-overwrites-X*/
   if( yymsp[-2].minor.yy407 ) yymsp[-2].minor.yy407->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
}
#line 3939 "parse.c"
        break;
      case 117: /* joinop ::= COMMA|JOIN */
#line 720 "parse.y"
{ yymsp[0].minor.yy100 = JT_INNER; }
#line 3944 "parse.c"
        break;
      case 118: /* joinop ::= JOIN_KW JOIN */
#line 722 "parse.y"
{yymsp[-1].minor.yy100 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0);  /*X-overwrites-A*/}
#line 3949 "parse.c"
        break;
      case 119: /* joinop ::= JOIN_KW nm JOIN */
#line 724 "parse.y"
{yymsp[-2].minor.yy100 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); /*X-overwrites-A*/}
#line 3954 "parse.c"
        break;
      case 120: /* joinop ::= JOIN_KW nm nm JOIN */
#line 726 "parse.y"
{yymsp[-3].minor.yy100 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);/*X-overwrites-A*/}
#line 3959 "parse.c"
        break;
      case 121: /* on_opt ::= ON expr */
      case 138: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==138);
      case 145: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==145);
      case 211: /* case_else ::= ELSE expr */ yytestcase(yyruleno==211);
      case 232: /* vinto ::= INTO expr */ yytestcase(yyruleno==232);
#line 747 "parse.y"
{yymsp[-1].minor.yy102 = yymsp[0].minor.yy102;}
#line 3968 "parse.c"
        break;
      case 122: /* on_opt ::= */
      case 137: /* having_opt ::= */ yytestcase(yyruleno==137);
      case 139: /* limit_opt ::= */ yytestcase(yyruleno==139);
      case 144: /* where_opt ::= */ yytestcase(yyruleno==144);
      case 212: /* case_else ::= */ yytestcase(yyruleno==212);
      case 214: /* case_operand ::= */ yytestcase(yyruleno==214);
      case 233: /* vinto ::= */ yytestcase(yyruleno==233);
#line 748 "parse.y"
{yymsp[1].minor.yy102 = 0;}
#line 3979 "parse.c"
        break;
      case 124: /* indexed_opt ::= INDEXED BY nm */
#line 762 "parse.y"
{yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;}
#line 3984 "parse.c"
        break;
      case 125: /* indexed_opt ::= NOT INDEXED */
#line 763 "parse.y"
{yymsp[-1].minor.yy0.z=0; yymsp[-1].minor.yy0.n=1;}
#line 3989 "parse.c"
        break;
      case 126: /* using_opt ::= USING LP idlist RP */
#line 767 "parse.y"
{yymsp[-3].minor.yy76 = yymsp[-1].minor.yy76;}
#line 3994 "parse.c"
        break;
      case 127: /* using_opt ::= */
      case 159: /* idlist_opt ::= */ yytestcase(yyruleno==159);
#line 768 "parse.y"
{yymsp[1].minor.yy76 = 0;}
#line 4000 "parse.c"
        break;
      case 129: /* orderby_opt ::= ORDER BY sortlist */
      case 136: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==136);
#line 782 "parse.y"
{yymsp[-2].minor.yy94 = yymsp[0].minor.yy94;}
#line 4006 "parse.c"
        break;
      case 130: /* sortlist ::= sortlist COMMA expr sortorder */
#line 783 "parse.y"
{
  yymsp[-3].minor.yy94 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy94,yymsp[-1].minor.yy102);
  sqlite3ExprListSetSortOrder(yymsp[-3].minor.yy94,yymsp[0].minor.yy100);
}
#line 4014 "parse.c"
        break;
      case 131: /* sortlist ::= expr sortorder */
#line 787 "parse.y"
{
  yymsp[-1].minor.yy94 = sqlite3ExprListAppend(pParse,0,yymsp[-1].minor.yy102); /*A-overwrites-Y*/
  sqlite3ExprListSetSortOrder(yymsp[-1].minor.yy94,yymsp[0].minor.yy100);
}
#line 4022 "parse.c"
        break;
      case 132: /* sortorder ::= ASC */
#line 794 "parse.y"
{yymsp[0].minor.yy100 = SQLITE_SO_ASC;}
#line 4027 "parse.c"
        break;
      case 133: /* sortorder ::= DESC */
#line 795 "parse.y"
{yymsp[0].minor.yy100 = SQLITE_SO_DESC;}
#line 4032 "parse.c"
        break;
      case 134: /* sortorder ::= */
#line 796 "parse.y"
{yymsp[1].minor.yy100 = SQLITE_SO_UNDEFINED;}
#line 4037 "parse.c"
        break;
      case 140: /* limit_opt ::= LIMIT expr */
#line 820 "parse.y"
{yymsp[-1].minor.yy102 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy102,0);}
#line 4042 "parse.c"
        break;
      case 141: /* limit_opt ::= LIMIT expr OFFSET expr */
#line 822 "parse.y"
{yymsp[-3].minor.yy102 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[-2].minor.yy102,yymsp[0].minor.yy102);}
#line 4047 "parse.c"
        break;
      case 142: /* limit_opt ::= LIMIT expr COMMA expr */
#line 824 "parse.y"
{yymsp[-3].minor.yy102 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy102,yymsp[-2].minor.yy102);}
#line 4052 "parse.c"
        break;
      case 143: /* cmd ::= with DELETE FROM xfullname indexed_opt where_opt */
#line 840 "parse.y"
{
  sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy407, &yymsp[-1].minor.yy0);
  sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy407,yymsp[0].minor.yy102,0,0);
}
#line 4060 "parse.c"
        break;
      case 146: /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt */
#line 864 "parse.y"
{
  sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy407, &yymsp[-3].minor.yy0);
  sqlite3ExprListCheckLength(pParse,yymsp[-1].minor.yy94,"set list"); 
  sqlite3Update(pParse,yymsp[-4].minor.yy407,yymsp[-1].minor.yy94,yymsp[0].minor.yy102,yymsp[-5].minor.yy100,0,0,0);
}
#line 4069 "parse.c"
        break;
      case 147: /* setlist ::= setlist COMMA nm EQ expr */
#line 874 "parse.y"
{
  yymsp[-4].minor.yy94 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy94, yymsp[0].minor.yy102);
  sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy94, &yymsp[-2].minor.yy0, 1);
}
#line 4077 "parse.c"
        break;
      case 148: /* setlist ::= setlist COMMA LP idlist RP EQ expr */
#line 878 "parse.y"
{
  yymsp[-6].minor.yy94 = sqlite3ExprListAppendVector(pParse, yymsp[-6].minor.yy94, yymsp[-3].minor.yy76, yymsp[0].minor.yy102);
}
#line 4084 "parse.c"
        break;
      case 149: /* setlist ::= nm EQ expr */
#line 881 "parse.y"
{
  yylhsminor.yy94 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy102);
  sqlite3ExprListSetName(pParse, yylhsminor.yy94, &yymsp[-2].minor.yy0, 1);
}
#line 4092 "parse.c"
  yymsp[-2].minor.yy94 = yylhsminor.yy94;
        break;
      case 150: /* setlist ::= LP idlist RP EQ expr */
#line 885 "parse.y"
{
  yymsp[-4].minor.yy94 = sqlite3ExprListAppendVector(pParse, 0, yymsp[-3].minor.yy76, yymsp[0].minor.yy102);
}
#line 4100 "parse.c"
        break;
      case 151: /* cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
#line 892 "parse.y"
{
  sqlite3Insert(pParse, yymsp[-3].minor.yy407, yymsp[-1].minor.yy391, yymsp[-2].minor.yy76, yymsp[-5].minor.yy100, yymsp[0].minor.yy95);
}
#line 4107 "parse.c"
        break;
      case 152: /* cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES */
#line 896 "parse.y"
{
  sqlite3Insert(pParse, yymsp[-3].minor.yy407, 0, yymsp[-2].minor.yy76, yymsp[-5].minor.yy100, 0);
}
#line 4114 "parse.c"
        break;
      case 153: /* upsert ::= */
#line 907 "parse.y"
{ yymsp[1].minor.yy95 = 0; }
#line 4119 "parse.c"
        break;
      case 154: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt */
#line 910 "parse.y"
{ yymsp[-10].minor.yy95 = sqlite3UpsertNew(pParse->db,yymsp[-7].minor.yy94,yymsp[-5].minor.yy102,yymsp[-1].minor.yy94,yymsp[0].minor.yy102);}
#line 4124 "parse.c"
        break;
      case 155: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING */
#line 912 "parse.y"
{ yymsp[-7].minor.yy95 = sqlite3UpsertNew(pParse->db,yymsp[-4].minor.yy94,yymsp[-2].minor.yy102,0,0); }
#line 4129 "parse.c"
        break;
      case 156: /* upsert ::= ON CONFLICT DO NOTHING */
#line 914 "parse.y"
{ yymsp[-3].minor.yy95 = sqlite3UpsertNew(pParse->db,0,0,0,0); }
#line 4134 "parse.c"
        break;
      case 160: /* idlist_opt ::= LP idlist RP */
#line 926 "parse.y"
{yymsp[-2].minor.yy76 = yymsp[-1].minor.yy76;}
#line 4139 "parse.c"
        break;
      case 161: /* idlist ::= idlist COMMA nm */
#line 928 "parse.y"
{yymsp[-2].minor.yy76 = sqlite3IdListAppend(pParse,yymsp[-2].minor.yy76,&yymsp[0].minor.yy0);}
#line 4144 "parse.c"
        break;
      case 162: /* idlist ::= nm */
#line 930 "parse.y"
{yymsp[0].minor.yy76 = sqlite3IdListAppend(pParse,0,&yymsp[0].minor.yy0); /*A-overwrites-Y*/}
#line 4149 "parse.c"
        break;
      case 163: /* expr ::= LP expr RP */
#line 980 "parse.y"
{yymsp[-2].minor.yy102 = yymsp[-1].minor.yy102;}
#line 4154 "parse.c"
        break;
      case 164: /* expr ::= ID|INDEXED */
      case 165: /* expr ::= JOIN_KW */ yytestcase(yyruleno==165);
#line 981 "parse.y"
{yymsp[0].minor.yy102=tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0); /*A-overwrites-X*/}
#line 4160 "parse.c"
        break;
      case 166: /* expr ::= nm DOT nm */
#line 983 "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.yy102 = sqlite3PExpr(pParse, TK_DOT, temp1, temp2);
}
#line 4173 "parse.c"
  yymsp[-2].minor.yy102 = yylhsminor.yy102;
        break;
      case 167: /* expr ::= nm DOT nm DOT nm */
#line 992 "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.yy102 = sqlite3PExpr(pParse, TK_DOT, temp1, temp4);
}
#line 4189 "parse.c"
  yymsp[-4].minor.yy102 = yylhsminor.yy102;
        break;
      case 168: /* term ::= NULL|FLOAT|BLOB */
      case 169: /* term ::= STRING */ yytestcase(yyruleno==169);
#line 1003 "parse.y"
{yymsp[0].minor.yy102=tokenExpr(pParse,yymsp[0].major,yymsp[0].minor.yy0); /*A-overwrites-X*/}
#line 4196 "parse.c"
        break;
      case 170: /* term ::= INTEGER */
#line 1005 "parse.y"
{
  yylhsminor.yy102 = sqlite3ExprAlloc(pParse->db, TK_INTEGER, &yymsp[0].minor.yy0, 1);
}
#line 4203 "parse.c"
  yymsp[0].minor.yy102 = yylhsminor.yy102;
        break;
      case 171: /* expr ::= VARIABLE */
#line 1008 "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.yy102 = tokenExpr(pParse, TK_VARIABLE, yymsp[0].minor.yy0);
    sqlite3ExprAssignVarNumber(pParse, yymsp[0].minor.yy102, 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.yy102 = 0;
    }else{
      yymsp[0].minor.yy102 = sqlite3PExpr(pParse, TK_REGISTER, 0, 0);
      if( yymsp[0].minor.yy102 ) sqlite3GetInt32(&t.z[1], &yymsp[0].minor.yy102->iTable);
    }
  }
}
#line 4228 "parse.c"
        break;
      case 172: /* expr ::= expr COLLATE ID|STRING */
#line 1028 "parse.y"
{
  yymsp[-2].minor.yy102 = sqlite3ExprAddCollateToken(pParse, yymsp[-2].minor.yy102, &yymsp[0].minor.yy0, 1);
}
#line 4235 "parse.c"
        break;
      case 173: /* expr ::= CAST LP expr AS typetoken RP */
#line 1032 "parse.y"
{
  yymsp[-5].minor.yy102 = sqlite3ExprAlloc(pParse->db, TK_CAST, &yymsp[-1].minor.yy0, 1);
  sqlite3ExprAttachSubtrees(pParse->db, yymsp[-5].minor.yy102, yymsp[-3].minor.yy102, 0);
}
#line 4243 "parse.c"
        break;
      case 174: /* expr ::= ID|INDEXED LP distinct exprlist RP */
#line 1039 "parse.y"
{
  yylhsminor.yy102 = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy94, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy100);
}
#line 4250 "parse.c"
  yymsp[-4].minor.yy102 = yylhsminor.yy102;
        break;
      case 175: /* expr ::= ID|INDEXED LP STAR RP */
#line 1042 "parse.y"
{
  yylhsminor.yy102 = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0, 0);
}
#line 4258 "parse.c"
  yymsp[-3].minor.yy102 = yylhsminor.yy102;
        break;
      case 176: /* expr ::= ID|INDEXED LP distinct exprlist RP over_clause */
#line 1047 "parse.y"
{
  yylhsminor.yy102 = sqlite3ExprFunction(pParse, yymsp[-2].minor.yy94, &yymsp[-5].minor.yy0, yymsp[-3].minor.yy100);
  sqlite3WindowAttach(pParse, yylhsminor.yy102, yymsp[0].minor.yy379);
}
#line 4267 "parse.c"
  yymsp[-5].minor.yy102 = yylhsminor.yy102;
        break;
      case 177: /* expr ::= ID|INDEXED LP STAR RP over_clause */
#line 1051 "parse.y"
{
  yylhsminor.yy102 = sqlite3ExprFunction(pParse, 0, &yymsp[-4].minor.yy0, 0);
  sqlite3WindowAttach(pParse, yylhsminor.yy102, yymsp[0].minor.yy379);
}
#line 4276 "parse.c"
  yymsp[-4].minor.yy102 = yylhsminor.yy102;
        break;
      case 178: /* term ::= CTIME_KW */
#line 1057 "parse.y"
{
  yylhsminor.yy102 = sqlite3ExprFunction(pParse, 0, &yymsp[0].minor.yy0, 0);
}
#line 4284 "parse.c"
  yymsp[0].minor.yy102 = yylhsminor.yy102;
        break;
      case 179: /* expr ::= LP nexprlist COMMA expr RP */
#line 1061 "parse.y"
{
  ExprList *pList = sqlite3ExprListAppend(pParse, yymsp[-3].minor.yy94, yymsp[-1].minor.yy102);
  yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, TK_VECTOR, 0, 0);
  if( yymsp[-4].minor.yy102 ){
    yymsp[-4].minor.yy102->x.pList = pList;
  }else{
    sqlite3ExprListDelete(pParse->db, pList);
  }
}
#line 4298 "parse.c"
        break;
      case 180: /* expr ::= expr AND expr */
#line 1071 "parse.y"
{yymsp[-2].minor.yy102=sqlite3ExprAnd(pParse,yymsp[-2].minor.yy102,yymsp[0].minor.yy102);}
#line 4303 "parse.c"
        break;
      case 181: /* expr ::= expr OR expr */
      case 182: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==182);
      case 183: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==183);
      case 184: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==184);
      case 185: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==185);
      case 186: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==186);
      case 187: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==187);
#line 1072 "parse.y"
{yymsp[-2].minor.yy102=sqlite3PExpr(pParse,yymsp[-1].major,yymsp[-2].minor.yy102,yymsp[0].minor.yy102);}
#line 4314 "parse.c"
        break;
      case 188: /* likeop ::= NOT LIKE_KW|MATCH */
#line 1085 "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 4319 "parse.c"
        break;
      case 189: /* expr ::= expr likeop expr */
#line 1086 "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.yy102);
  pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy102);
  yymsp[-2].minor.yy102 = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy0, 0);
  if( bNot ) yymsp[-2].minor.yy102 = sqlite3PExpr(pParse, TK_NOT, yymsp[-2].minor.yy102, 0);
  if( yymsp[-2].minor.yy102 ) yymsp[-2].minor.yy102->flags |= EP_InfixFunc;
}
#line 4333 "parse.c"
        break;
      case 190: /* expr ::= expr likeop expr ESCAPE expr */
#line 1096 "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.yy102);
  pList = sqlite3ExprListAppend(pParse,pList, yymsp[-4].minor.yy102);
  pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy102);
  yymsp[-4].minor.yy102 = sqlite3ExprFunction(pParse, pList, &yymsp[-3].minor.yy0, 0);
  if( bNot ) yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy102, 0);
  if( yymsp[-4].minor.yy102 ) yymsp[-4].minor.yy102->flags |= EP_InfixFunc;
}
#line 4348 "parse.c"
        break;
      case 191: /* expr ::= expr ISNULL|NOTNULL */
#line 1108 "parse.y"
{yymsp[-1].minor.yy102 = sqlite3PExpr(pParse,yymsp[0].major,yymsp[-1].minor.yy102,0);}
#line 4353 "parse.c"
        break;
      case 192: /* expr ::= expr NOT NULL */
#line 1109 "parse.y"
{yymsp[-2].minor.yy102 = sqlite3PExpr(pParse,TK_NOTNULL,yymsp[-2].minor.yy102,0);}
#line 4358 "parse.c"
        break;
      case 193: /* expr ::= expr IS expr */
#line 1130 "parse.y"
{
  yymsp[-2].minor.yy102 = sqlite3PExpr(pParse,TK_IS,yymsp[-2].minor.yy102,yymsp[0].minor.yy102);
  binaryToUnaryIfNull(pParse, yymsp[0].minor.yy102, yymsp[-2].minor.yy102, TK_ISNULL);
}
#line 4366 "parse.c"
        break;
      case 194: /* expr ::= expr IS NOT expr */
#line 1134 "parse.y"
{
  yymsp[-3].minor.yy102 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-3].minor.yy102,yymsp[0].minor.yy102);
  binaryToUnaryIfNull(pParse, yymsp[0].minor.yy102, yymsp[-3].minor.yy102, TK_NOTNULL);
}
#line 4374 "parse.c"
        break;
      case 195: /* expr ::= NOT expr */
      case 196: /* expr ::= BITNOT expr */ yytestcase(yyruleno==196);
#line 1140 "parse.y"
{yymsp[-1].minor.yy102 = sqlite3PExpr(pParse, yymsp[-1].major, yymsp[0].minor.yy102, 0);/*A-overwrites-B*/}
#line 4380 "parse.c"
        break;
      case 197: /* expr ::= PLUS|MINUS expr */
#line 1143 "parse.y"
{
  yymsp[-1].minor.yy102 = sqlite3PExpr(pParse, yymsp[-1].major==TK_PLUS ? TK_UPLUS : TK_UMINUS, yymsp[0].minor.yy102, 0);
  /*A-overwrites-B*/
}
#line 4388 "parse.c"
        break;
      case 198: /* between_op ::= BETWEEN */
      case 201: /* in_op ::= IN */ yytestcase(yyruleno==201);
#line 1149 "parse.y"
{yymsp[0].minor.yy100 = 0;}
#line 4394 "parse.c"
        break;
      case 200: /* expr ::= expr between_op expr AND expr */
#line 1151 "parse.y"
{
  ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy102);
  pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy102);
  yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy102, 0);
  if( yymsp[-4].minor.yy102 ){
    yymsp[-4].minor.yy102->x.pList = pList;
  }else{
    sqlite3ExprListDelete(pParse->db, pList);
  } 
  if( yymsp[-3].minor.yy100 ) yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy102, 0);
}
#line 4409 "parse.c"
        break;
      case 203: /* expr ::= expr in_op LP exprlist RP */
#line 1166 "parse.y"
{
    if( yymsp[-1].minor.yy94==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.yy102);
      yymsp[-4].minor.yy102 = sqlite3ExprAlloc(pParse->db, TK_INTEGER,&sqlite3IntTokens[yymsp[-3].minor.yy100],1);
    }else if( yymsp[-1].minor.yy94->nExpr==1 ){
      /* Expressions of the form:
      **
      **      expr1 IN (?1)
      **      expr1 NOT IN (?2)
      **
      ** with exactly one value on the RHS can be simplified to something
      ** like this:
      **
      **      expr1 == ?1
      **      expr1 <> ?2
      **
      ** But, the RHS of the == or <> is marked with the EP_Generic flag
      ** so that it may not contribute to the computation of comparison
      ** affinity or the collating sequence to use for comparison.  Otherwise,
      ** the semantics would be subtly different from IN or NOT IN.
      */
      Expr *pRHS = yymsp[-1].minor.yy94->a[0].pExpr;
      yymsp[-1].minor.yy94->a[0].pExpr = 0;
      sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy94);
      /* pRHS cannot be NULL because a malloc error would have been detected
      ** before now and control would have never reached this point */
      if( ALWAYS(pRHS) ){
        pRHS->flags &= ~EP_Collate;
        pRHS->flags |= EP_Generic;
      }
      yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, yymsp[-3].minor.yy100 ? TK_NE : TK_EQ, yymsp[-4].minor.yy102, pRHS);
    }else{
      yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy102, 0);
      if( yymsp[-4].minor.yy102 ){
        yymsp[-4].minor.yy102->x.pList = yymsp[-1].minor.yy94;
        sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy102);
      }else{
        sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy94);
      }
      if( yymsp[-3].minor.yy100 ) yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy102, 0);
    }
  }
#line 4463 "parse.c"
        break;
      case 204: /* expr ::= LP select RP */
#line 1216 "parse.y"
{
    yymsp[-2].minor.yy102 = sqlite3PExpr(pParse, TK_SELECT, 0, 0);
    sqlite3PExprAddSelect(pParse, yymsp[-2].minor.yy102, yymsp[-1].minor.yy391);
  }
#line 4471 "parse.c"
        break;
      case 205: /* expr ::= expr in_op LP select RP */
#line 1220 "parse.y"
{
    yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy102, 0);
    sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy102, yymsp[-1].minor.yy391);
    if( yymsp[-3].minor.yy100 ) yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy102, 0);
  }
#line 4480 "parse.c"
        break;
      case 206: /* expr ::= expr in_op nm dbnm paren_exprlist */
#line 1225 "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.yy94 )  sqlite3SrcListFuncArgs(pParse, pSelect ? pSrc : 0, yymsp[0].minor.yy94);
    yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy102, 0);
    sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy102, pSelect);
    if( yymsp[-3].minor.yy100 ) yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy102, 0);
  }
#line 4492 "parse.c"
        break;
      case 207: /* expr ::= EXISTS LP select RP */
#line 1233 "parse.y"
{
    Expr *p;
    p = yymsp[-3].minor.yy102 = sqlite3PExpr(pParse, TK_EXISTS, 0, 0);
    sqlite3PExprAddSelect(pParse, p, yymsp[-1].minor.yy391);
  }
#line 4501 "parse.c"
        break;
      case 208: /* expr ::= CASE case_operand case_exprlist case_else END */
#line 1241 "parse.y"
{
  yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy102, 0);
  if( yymsp[-4].minor.yy102 ){
    yymsp[-4].minor.yy102->x.pList = yymsp[-1].minor.yy102 ? sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy94,yymsp[-1].minor.yy102) : yymsp[-2].minor.yy94;
    sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy102);
  }else{
    sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy94);
    sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy102);
  }
}
#line 4515 "parse.c"
        break;
      case 209: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
#line 1253 "parse.y"
{
  yymsp[-4].minor.yy94 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy94, yymsp[-2].minor.yy102);
  yymsp[-4].minor.yy94 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy94, yymsp[0].minor.yy102);
}
#line 4523 "parse.c"
        break;
      case 210: /* case_exprlist ::= WHEN expr THEN expr */
#line 1257 "parse.y"
{
  yymsp[-3].minor.yy94 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy102);
  yymsp[-3].minor.yy94 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy94, yymsp[0].minor.yy102);
}
#line 4531 "parse.c"
        break;
      case 213: /* case_operand ::= expr */
#line 1267 "parse.y"
{yymsp[0].minor.yy102 = yymsp[0].minor.yy102; /*A-overwrites-X*/}
#line 4536 "parse.c"
        break;
      case 216: /* nexprlist ::= nexprlist COMMA expr */
#line 1278 "parse.y"
{yymsp[-2].minor.yy94 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy94,yymsp[0].minor.yy102);}
#line 4541 "parse.c"
        break;
      case 217: /* nexprlist ::= expr */
#line 1280 "parse.y"
{yymsp[0].minor.yy94 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy102); /*A-overwrites-Y*/}
#line 4546 "parse.c"
        break;
      case 219: /* paren_exprlist ::= LP exprlist RP */
      case 224: /* eidlist_opt ::= LP eidlist RP */ yytestcase(yyruleno==224);
#line 1288 "parse.y"
{yymsp[-2].minor.yy94 = yymsp[-1].minor.yy94;}
#line 4552 "parse.c"
        break;
      case 220: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
#line 1295 "parse.y"
{
  sqlite3CreateIndex(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, 
                     sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,0), yymsp[-2].minor.yy94, yymsp[-10].minor.yy100,
                      &yymsp[-11].minor.yy0, yymsp[0].minor.yy102, SQLITE_SO_ASC, yymsp[-8].minor.yy100, SQLITE_IDXTYPE_APPDEF);
  if( IN_RENAME_OBJECT && pParse->pNewIndex ){
    sqlite3RenameTokenMap(pParse, pParse->pNewIndex->zName, &yymsp[-4].minor.yy0);
  }
}
#line 4564 "parse.c"
        break;
      case 221: /* uniqueflag ::= UNIQUE */
      case 263: /* raisetype ::= ABORT */ yytestcase(yyruleno==263);
#line 1305 "parse.y"
{yymsp[0].minor.yy100 = OE_Abort;}
#line 4570 "parse.c"
        break;
      case 222: /* uniqueflag ::= */
#line 1306 "parse.y"
{yymsp[1].minor.yy100 = OE_None;}
#line 4575 "parse.c"
        break;
      case 225: /* eidlist ::= eidlist COMMA nm collate sortorder */
#line 1356 "parse.y"
{
  yymsp[-4].minor.yy94 = parserAddExprIdListTerm(pParse, yymsp[-4].minor.yy94, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy100, yymsp[0].minor.yy100);
}
#line 4582 "parse.c"
        break;
      case 226: /* eidlist ::= nm collate sortorder */
#line 1359 "parse.y"
{
  yymsp[-2].minor.yy94 = parserAddExprIdListTerm(pParse, 0, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy100, yymsp[0].minor.yy100); /*A-overwrites-Y*/
}
#line 4589 "parse.c"
        break;
      case 229: /* cmd ::= DROP INDEX ifexists fullname */
#line 1370 "parse.y"
{sqlite3DropIndex(pParse, yymsp[0].minor.yy407, yymsp[-1].minor.yy100);}
#line 4594 "parse.c"
        break;
      case 230: /* cmd ::= VACUUM vinto */
#line 1378 "parse.y"
{sqlite3Vacuum(pParse,0,yymsp[0].minor.yy102);}
#line 4599 "parse.c"
        break;
      case 231: /* cmd ::= VACUUM nm vinto */
#line 1379 "parse.y"
{sqlite3Vacuum(pParse,&yymsp[-1].minor.yy0,yymsp[0].minor.yy102);}
#line 4604 "parse.c"
        break;
      case 234: /* cmd ::= PRAGMA nm dbnm */
#line 1388 "parse.y"
{sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);}
#line 4609 "parse.c"
        break;
      case 235: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
#line 1389 "parse.y"
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);}
#line 4614 "parse.c"
        break;
      case 236: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
#line 1390 "parse.y"
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);}
#line 4619 "parse.c"
        break;
      case 237: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
#line 1392 "parse.y"
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);}
#line 4624 "parse.c"
        break;
      case 238: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */
#line 1394 "parse.y"
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);}
#line 4629 "parse.c"
        break;
      case 241: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
#line 1410 "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.yy11, &all);
}
#line 4639 "parse.c"
        break;
      case 242: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
#line 1419 "parse.y"
{
  sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy100, yymsp[-4].minor.yy298.a, yymsp[-4].minor.yy298.b, yymsp[-2].minor.yy407, yymsp[0].minor.yy102, yymsp[-10].minor.yy100, yymsp[-8].minor.yy100);
  yymsp[-10].minor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0); /*A-overwrites-T*/
}
#line 4647 "parse.c"
        break;
      case 243: /* trigger_time ::= BEFORE|AFTER */
#line 1425 "parse.y"
{ yymsp[0].minor.yy100 = yymsp[0].major; /*A-overwrites-X*/ }
#line 4652 "parse.c"
        break;
      case 244: /* trigger_time ::= INSTEAD OF */
#line 1426 "parse.y"
{ yymsp[-1].minor.yy100 = TK_INSTEAD;}
#line 4657 "parse.c"
        break;
      case 245: /* trigger_time ::= */
#line 1427 "parse.y"
{ yymsp[1].minor.yy100 = TK_BEFORE; }
#line 4662 "parse.c"
        break;
      case 246: /* trigger_event ::= DELETE|INSERT */
      case 247: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==247);
#line 1431 "parse.y"
{yymsp[0].minor.yy298.a = yymsp[0].major; /*A-overwrites-X*/ yymsp[0].minor.yy298.b = 0;}
#line 4668 "parse.c"
        break;
      case 248: /* trigger_event ::= UPDATE OF idlist */
#line 1433 "parse.y"
{yymsp[-2].minor.yy298.a = TK_UPDATE; yymsp[-2].minor.yy298.b = yymsp[0].minor.yy76;}
#line 4673 "parse.c"
        break;
      case 249: /* when_clause ::= */
      case 268: /* key_opt ::= */ yytestcase(yyruleno==268);
      case 316: /* filter_opt ::= */ yytestcase(yyruleno==316);
#line 1440 "parse.y"
{ yymsp[1].minor.yy102 = 0; }
#line 4680 "parse.c"
        break;
      case 250: /* when_clause ::= WHEN expr */
      case 269: /* key_opt ::= KEY expr */ yytestcase(yyruleno==269);
#line 1441 "parse.y"
{ yymsp[-1].minor.yy102 = yymsp[0].minor.yy102; }
#line 4686 "parse.c"
        break;
      case 251: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
#line 1445 "parse.y"
{
  assert( yymsp[-2].minor.yy11!=0 );
  yymsp[-2].minor.yy11->pLast->pNext = yymsp[-1].minor.yy11;
  yymsp[-2].minor.yy11->pLast = yymsp[-1].minor.yy11;
}
#line 4695 "parse.c"
        break;
      case 252: /* trigger_cmd_list ::= trigger_cmd SEMI */
#line 1450 "parse.y"
{ 
  assert( yymsp[-1].minor.yy11!=0 );
  yymsp[-1].minor.yy11->pLast = yymsp[-1].minor.yy11;
}
#line 4703 "parse.c"
        break;
      case 253: /* trnm ::= nm DOT nm */
#line 1461 "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 4713 "parse.c"
        break;
      case 254: /* tridxby ::= INDEXED BY nm */
#line 1473 "parse.y"
{
  sqlite3ErrorMsg(pParse,
        "the INDEXED BY clause is not allowed on UPDATE or DELETE statements "
        "within triggers");
}
#line 4722 "parse.c"
        break;
      case 255: /* tridxby ::= NOT INDEXED */
#line 1478 "parse.y"
{
  sqlite3ErrorMsg(pParse,
        "the NOT INDEXED clause is not allowed on UPDATE or DELETE statements "
        "within triggers");
}
#line 4731 "parse.c"
        break;
      case 256: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt */
#line 1491 "parse.y"
{yylhsminor.yy11 = sqlite3TriggerUpdateStep(pParse, &yymsp[-5].minor.yy0, yymsp[-2].minor.yy94, yymsp[-1].minor.yy102, yymsp[-6].minor.yy100, yymsp[-7].minor.yy0.z, yymsp[0].minor.yy528);}
#line 4736 "parse.c"
  yymsp[-7].minor.yy11 = yylhsminor.yy11;
        break;
      case 257: /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
#line 1495 "parse.y"
{
   yylhsminor.yy11 = sqlite3TriggerInsertStep(pParse,&yymsp[-4].minor.yy0,yymsp[-3].minor.yy76,yymsp[-2].minor.yy391,yymsp[-6].minor.yy100,yymsp[-1].minor.yy95,yymsp[-7].minor.yy528,yymsp[0].minor.yy528);/*yylhsminor.yy11-overwrites-yymsp[-6].minor.yy100*/
}
#line 4744 "parse.c"
  yymsp[-7].minor.yy11 = yylhsminor.yy11;
        break;
      case 258: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
#line 1500 "parse.y"
{yylhsminor.yy11 = sqlite3TriggerDeleteStep(pParse, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy102, yymsp[-5].minor.yy0.z, yymsp[0].minor.yy528);}
#line 4750 "parse.c"
  yymsp[-5].minor.yy11 = yylhsminor.yy11;
        break;
      case 259: /* trigger_cmd ::= scanpt select scanpt */
#line 1504 "parse.y"
{yylhsminor.yy11 = sqlite3TriggerSelectStep(pParse->db, yymsp[-1].minor.yy391, yymsp[-2].minor.yy528, yymsp[0].minor.yy528); /*yylhsminor.yy11-overwrites-yymsp[-1].minor.yy391*/}
#line 4756 "parse.c"
  yymsp[-2].minor.yy11 = yylhsminor.yy11;
        break;
      case 260: /* expr ::= RAISE LP IGNORE RP */
#line 1507 "parse.y"
{
  yymsp[-3].minor.yy102 = sqlite3PExpr(pParse, TK_RAISE, 0, 0); 
  if( yymsp[-3].minor.yy102 ){
    yymsp[-3].minor.yy102->affinity = OE_Ignore;
  }
}
#line 4767 "parse.c"
        break;
      case 261: /* expr ::= RAISE LP raisetype COMMA nm RP */
#line 1513 "parse.y"
{
  yymsp[-5].minor.yy102 = sqlite3ExprAlloc(pParse->db, TK_RAISE, &yymsp[-1].minor.yy0, 1); 
  if( yymsp[-5].minor.yy102 ) {
    yymsp[-5].minor.yy102->affinity = (char)yymsp[-3].minor.yy100;
  }
}
#line 4777 "parse.c"
        break;
      case 262: /* raisetype ::= ROLLBACK */
#line 1522 "parse.y"
{yymsp[0].minor.yy100 = OE_Rollback;}
#line 4782 "parse.c"
        break;
      case 264: /* raisetype ::= FAIL */
#line 1524 "parse.y"
{yymsp[0].minor.yy100 = OE_Fail;}
#line 4787 "parse.c"
        break;
      case 265: /* cmd ::= DROP TRIGGER ifexists fullname */
#line 1529 "parse.y"
{
  sqlite3DropTrigger(pParse,yymsp[0].minor.yy407,yymsp[-1].minor.yy100);
}
#line 4794 "parse.c"
        break;
      case 266: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
#line 1536 "parse.y"
{
  sqlite3Attach(pParse, yymsp[-3].minor.yy102, yymsp[-1].minor.yy102, yymsp[0].minor.yy102);
}
#line 4801 "parse.c"
        break;
      case 267: /* cmd ::= DETACH database_kw_opt expr */
#line 1539 "parse.y"
{
  sqlite3Detach(pParse, yymsp[0].minor.yy102);
}
#line 4808 "parse.c"
        break;
      case 270: /* cmd ::= REINDEX */
#line 1554 "parse.y"
{sqlite3Reindex(pParse, 0, 0);}
#line 4813 "parse.c"
        break;
      case 271: /* cmd ::= REINDEX nm dbnm */
#line 1555 "parse.y"
{sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
#line 4818 "parse.c"
        break;
      case 272: /* cmd ::= ANALYZE */
#line 1560 "parse.y"
{sqlite3Analyze(pParse, 0, 0);}
#line 4823 "parse.c"
        break;
      case 273: /* cmd ::= ANALYZE nm dbnm */
#line 1561 "parse.y"
{sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
#line 4828 "parse.c"
        break;
      case 274: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
#line 1566 "parse.y"
{
  sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy407,&yymsp[0].minor.yy0);
}
#line 4835 "parse.c"
        break;
      case 275: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
#line 1570 "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 4843 "parse.c"
        break;
      case 276: /* add_column_fullname ::= fullname */
#line 1574 "parse.y"
{
  disableLookaside(pParse);
  sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy407);
}
#line 4851 "parse.c"
        break;
      case 277: /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
#line 1578 "parse.y"
{
  sqlite3AlterRenameColumn(pParse, yymsp[-5].minor.yy407, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
}
#line 4858 "parse.c"
        break;
      case 278: /* cmd ::= create_vtab */
#line 1589 "parse.y"
{sqlite3VtabFinishParse(pParse,0);}
#line 4863 "parse.c"
        break;
      case 279: /* cmd ::= create_vtab LP vtabarglist RP */
#line 1590 "parse.y"
{sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}
#line 4868 "parse.c"
        break;
      case 280: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
#line 1592 "parse.y"
{
    sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy100);
}
#line 4875 "parse.c"
        break;
      case 281: /* vtabarg ::= */
#line 1597 "parse.y"
{sqlite3VtabArgInit(pParse);}
#line 4880 "parse.c"
        break;
      case 282: /* vtabargtoken ::= ANY */
      case 283: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==283);
      case 284: /* lp ::= LP */ yytestcase(yyruleno==284);
#line 1599 "parse.y"
{sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}
#line 4887 "parse.c"
        break;
      case 285: /* with ::= WITH wqlist */
      case 286: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==286);
#line 1614 "parse.y"
{ sqlite3WithPush(pParse, yymsp[0].minor.yy243, 1); }
#line 4893 "parse.c"
        break;
      case 287: /* wqlist ::= nm eidlist_opt AS LP select RP */
#line 1617 "parse.y"
{
  yymsp[-5].minor.yy243 = sqlite3WithAdd(pParse, 0, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy94, yymsp[-1].minor.yy391); /*A-overwrites-X*/
}
#line 4900 "parse.c"
        break;
      case 288: /* wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
#line 1620 "parse.y"
{
  yymsp[-7].minor.yy243 = sqlite3WithAdd(pParse, yymsp[-7].minor.yy243, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy94, yymsp[-1].minor.yy391);
}
#line 4907 "parse.c"
        break;
      case 289: /* windowdefn_list ::= windowdefn */
#line 1634 "parse.y"
{ yylhsminor.yy379 = yymsp[0].minor.yy379; }
#line 4912 "parse.c"
  yymsp[0].minor.yy379 = yylhsminor.yy379;
        break;
      case 290: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */
#line 1635 "parse.y"
{
  assert( yymsp[0].minor.yy379!=0 );
  sqlite3WindowChain(pParse, yymsp[0].minor.yy379, yymsp[-2].minor.yy379);
  yymsp[0].minor.yy379->pNextWin = yymsp[-2].minor.yy379;
  yylhsminor.yy379 = yymsp[0].minor.yy379;
}
#line 4923 "parse.c"
  yymsp[-2].minor.yy379 = yylhsminor.yy379;
        break;
      case 291: /* windowdefn ::= nm AS LP window RP */
#line 1644 "parse.y"
{
  if( ALWAYS(yymsp[-1].minor.yy379) ){
    yymsp[-1].minor.yy379->zName = sqlite3DbStrNDup(pParse->db, yymsp[-4].minor.yy0.z, yymsp[-4].minor.yy0.n);
  }
  yylhsminor.yy379 = yymsp[-1].minor.yy379;
}
#line 4934 "parse.c"
  yymsp[-4].minor.yy379 = yylhsminor.yy379;
        break;
      case 292: /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */
#line 1672 "parse.y"
{
  yymsp[-4].minor.yy379 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy379, yymsp[-2].minor.yy94, yymsp[-1].minor.yy94, 0);
}
#line 4942 "parse.c"
        break;
      case 293: /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
#line 1675 "parse.y"
{
  yylhsminor.yy379 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy379, yymsp[-2].minor.yy94, yymsp[-1].minor.yy94, &yymsp[-5].minor.yy0);
}
#line 4949 "parse.c"
  yymsp[-5].minor.yy379 = yylhsminor.yy379;
        break;
      case 294: /* window ::= ORDER BY sortlist frame_opt */
#line 1678 "parse.y"
{
  yymsp[-3].minor.yy379 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy379, 0, yymsp[-1].minor.yy94, 0);
}
#line 4957 "parse.c"
        break;
      case 295: /* window ::= nm ORDER BY sortlist frame_opt */
#line 1681 "parse.y"
{
  yylhsminor.yy379 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy379, 0, yymsp[-1].minor.yy94, &yymsp[-4].minor.yy0);
}
#line 4964 "parse.c"
  yymsp[-4].minor.yy379 = yylhsminor.yy379;
        break;
      case 296: /* window ::= frame_opt */
#line 1684 "parse.y"
{
  yylhsminor.yy379 = yymsp[0].minor.yy379;
}
#line 4972 "parse.c"
  yymsp[0].minor.yy379 = yylhsminor.yy379;
        break;
      case 297: /* window ::= nm frame_opt */
#line 1687 "parse.y"
{
  yylhsminor.yy379 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy379, 0, 0, &yymsp[-1].minor.yy0);
}
#line 4980 "parse.c"
  yymsp[-1].minor.yy379 = yylhsminor.yy379;
        break;
      case 298: /* frame_opt ::= */
#line 1691 "parse.y"
{ 
  yymsp[1].minor.yy379 = sqlite3WindowAlloc(pParse, 0, TK_UNBOUNDED, 0, TK_CURRENT, 0, 0);
}
#line 4988 "parse.c"
        break;
      case 299: /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
#line 1694 "parse.y"
{ 
  yylhsminor.yy379 = sqlite3WindowAlloc(pParse, yymsp[-2].minor.yy100, yymsp[-1].minor.yy389.eType, yymsp[-1].minor.yy389.pExpr, TK_CURRENT, 0, yymsp[0].minor.yy218);
}
#line 4995 "parse.c"
  yymsp[-2].minor.yy379 = yylhsminor.yy379;
        break;
      case 300: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
#line 1698 "parse.y"
{ 
  yylhsminor.yy379 = sqlite3WindowAlloc(pParse, yymsp[-5].minor.yy100, yymsp[-3].minor.yy389.eType, yymsp[-3].minor.yy389.pExpr, yymsp[-1].minor.yy389.eType, yymsp[-1].minor.yy389.pExpr, yymsp[0].minor.yy218);
}
#line 5003 "parse.c"
  yymsp[-5].minor.yy379 = yylhsminor.yy379;
        break;
      case 302: /* frame_bound_s ::= frame_bound */
      case 304: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==304);
#line 1704 "parse.y"
{yylhsminor.yy389 = yymsp[0].minor.yy389;}
#line 5010 "parse.c"
  yymsp[0].minor.yy389 = yylhsminor.yy389;
        break;
      case 303: /* frame_bound_s ::= UNBOUNDED PRECEDING */
      case 305: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==305);
      case 307: /* frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==307);
#line 1705 "parse.y"
{yylhsminor.yy389.eType = yymsp[-1].major; yylhsminor.yy389.pExpr = 0;}
#line 5018 "parse.c"
  yymsp[-1].minor.yy389 = yylhsminor.yy389;
        break;
      case 306: /* frame_bound ::= expr PRECEDING|FOLLOWING */
#line 1710 "parse.y"
{yylhsminor.yy389.eType = yymsp[0].major; yylhsminor.yy389.pExpr = yymsp[-1].minor.yy102;}
#line 5024 "parse.c"
  yymsp[-1].minor.yy389 = yylhsminor.yy389;
        break;
      case 308: /* frame_exclude_opt ::= */
#line 1714 "parse.y"
{yymsp[1].minor.yy218 = 0;}
#line 5030 "parse.c"
        break;
      case 309: /* frame_exclude_opt ::= EXCLUDE frame_exclude */
#line 1715 "parse.y"
{yymsp[-1].minor.yy218 = yymsp[0].minor.yy218;}
#line 5035 "parse.c"
        break;
      case 310: /* frame_exclude ::= NO OTHERS */
      case 311: /* frame_exclude ::= CURRENT ROW */ yytestcase(yyruleno==311);
#line 1718 "parse.y"
{yymsp[-1].minor.yy218 = yymsp[-1].major; /*A-overwrites-X*/}
#line 5041 "parse.c"
        break;
      case 312: /* frame_exclude ::= GROUP|TIES */
#line 1720 "parse.y"
{yymsp[0].minor.yy218 = yymsp[0].major; /*A-overwrites-X*/}
#line 5046 "parse.c"
        break;
      case 313: /* window_clause ::= WINDOW windowdefn_list */
#line 1725 "parse.y"
{ yymsp[-1].minor.yy379 = yymsp[0].minor.yy379; }
#line 5051 "parse.c"
        break;
      case 314: /* over_clause ::= filter_opt OVER LP window RP */
#line 1729 "parse.y"
{
  yylhsminor.yy379 = yymsp[-1].minor.yy379;
  assert( yylhsminor.yy379!=0 );
  yylhsminor.yy379->pFilter = yymsp[-4].minor.yy102;
}
#line 5060 "parse.c"
  yymsp[-4].minor.yy379 = yylhsminor.yy379;
        break;
      case 315: /* over_clause ::= filter_opt OVER nm */
#line 1734 "parse.y"
{
  yylhsminor.yy379 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
  if( yylhsminor.yy379 ){
    yylhsminor.yy379->zName = sqlite3DbStrNDup(pParse->db, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n);
    yylhsminor.yy379->pFilter = yymsp[-2].minor.yy102;
  }else{
    sqlite3ExprDelete(pParse->db, yymsp[-2].minor.yy102);
  }
}
#line 5074 "parse.c"
  yymsp[-2].minor.yy379 = yylhsminor.yy379;
        break;
      case 317: /* filter_opt ::= FILTER LP WHERE expr RP */
#line 1745 "parse.y"
{ yymsp[-4].minor.yy102 = yymsp[-1].minor.yy102; }
#line 5080 "parse.c"
        break;
      default:
      /* (318) input ::= cmdlist */ yytestcase(yyruleno==318);
      /* (319) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==319);
      /* (320) cmdlist ::= ecmd (OPTIMIZED OUT) */ assert(yyruleno!=320);
      /* (321) ecmd ::= SEMI */ yytestcase(yyruleno==321);
      /* (322) ecmd ::= cmdx SEMI */ yytestcase(yyruleno==322);
      /* (323) ecmd ::= explain cmdx */ yytestcase(yyruleno==323);
      /* (324) trans_opt ::= */ yytestcase(yyruleno==324);
      /* (325) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==325);
      /* (326) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==326);
      /* (327) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==327);
      /* (328) savepoint_opt ::= */ yytestcase(yyruleno==328);
      /* (329) cmd ::= create_table create_table_args */ yytestcase(yyruleno==329);
      /* (330) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==330);
      /* (331) columnlist ::= columnname carglist */ yytestcase(yyruleno==331);
      /* (332) nm ::= ID|INDEXED */ yytestcase(yyruleno==332);
      /* (333) nm ::= STRING */ yytestcase(yyruleno==333);
      /* (334) nm ::= JOIN_KW */ yytestcase(yyruleno==334);
      /* (335) typetoken ::= typename */ yytestcase(yyruleno==335);
      /* (336) typename ::= ID|STRING */ yytestcase(yyruleno==336);
      /* (337) signed ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=337);
      /* (338) signed ::= minus_num (OPTIMIZED OUT) */ assert(yyruleno!=338);
      /* (339) carglist ::= carglist ccons */ yytestcase(yyruleno==339);
      /* (340) carglist ::= */ yytestcase(yyruleno==340);
      /* (341) ccons ::= NULL onconf */ yytestcase(yyruleno==341);
      /* (342) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==342);
      /* (343) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==343);
      /* (344) conslist ::= tcons (OPTIMIZED OUT) */ assert(yyruleno!=344);
      /* (345) tconscomma ::= */ yytestcase(yyruleno==345);
      /* (346) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=346);
      /* (347) resolvetype ::= raisetype (OPTIMIZED OUT) */ assert(yyruleno!=347);
      /* (348) selectnowith ::= oneselect (OPTIMIZED OUT) */ assert(yyruleno!=348);
      /* (349) oneselect ::= values */ yytestcase(yyruleno==349);
      /* (350) sclp ::= selcollist COMMA */ yytestcase(yyruleno==350);
      /* (351) as ::= ID|STRING */ yytestcase(yyruleno==351);
      /* (352) expr ::= term (OPTIMIZED OUT) */ assert(yyruleno!=352);
      /* (353) likeop ::= LIKE_KW|MATCH */ yytestcase(yyruleno==353);
      /* (354) exprlist ::= nexprlist */ yytestcase(yyruleno==354);
      /* (355) nmnum ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=355);
      /* (356) nmnum ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=356);
      /* (357) nmnum ::= ON */ yytestcase(yyruleno==357);
      /* (358) nmnum ::= DELETE */ yytestcase(yyruleno==358);
      /* (359) nmnum ::= DEFAULT */ yytestcase(yyruleno==359);
      /* (360) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==360);
      /* (361) foreach_clause ::= */ yytestcase(yyruleno==361);
      /* (362) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==362);
      /* (363) trnm ::= nm */ yytestcase(yyruleno==363);
      /* (364) tridxby ::= */ yytestcase(yyruleno==364);
      /* (365) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==365);
      /* (366) database_kw_opt ::= */ yytestcase(yyruleno==366);
      /* (367) kwcolumn_opt ::= */ yytestcase(yyruleno==367);
      /* (368) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==368);
      /* (369) vtabarglist ::= vtabarg */ yytestcase(yyruleno==369);
      /* (370) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==370);
      /* (371) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==371);
      /* (372) anylist ::= */ yytestcase(yyruleno==372);
      /* (373) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==373);
      /* (374) anylist ::= anylist ANY */ yytestcase(yyruleno==374);
      /* (375) with ::= */ yytestcase(yyruleno==375);
        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 5208 "parse.c"
/************ 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
  if( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) ){
    return yyFallback[iToken];
  }
#else
  (void)iToken;
#endif
  return 0;
}
