Fossil: Check-in [4f040a180a]

Fossil SCM

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Update the built-in SQLite to the latest 3.29.0 alpha.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:4f040a180a6ec90d5be3ea0f325cfd12acf2a6801a10c86900e5a166d4c994b1
User & Date: drh 2019-05-23 17:07:08
Context
2019-05-27
11:17
Fix a memory leak in the delta_parse() table-valued function, pointed out by Ralf Junkers. check-in: 9002a80ad6 user: drh tags: trunk
2019-05-23
17:08
Merge enhancements from trunk. check-in: cf07e5827a user: drh tags: tooltip-experiments
17:07
Update the built-in SQLite to the latest 3.29.0 alpha. check-in: 4f040a180a user: drh tags: trunk
06:44
Since libressl abuses OPENSSL_VERSION_NUMBER, don't let fossil being confused by that. check-in: 5c40d6b0d4 user: jan.nijtmans tags: trunk
Changes

Changes to src/sqlite3.c.

  1165   1165   **
  1166   1166   ** See also: [sqlite3_libversion()],
  1167   1167   ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
  1168   1168   ** [sqlite_version()] and [sqlite_source_id()].
  1169   1169   */
  1170   1170   #define SQLITE_VERSION        "3.29.0"
  1171   1171   #define SQLITE_VERSION_NUMBER 3029000
  1172         -#define SQLITE_SOURCE_ID      "2019-05-10 17:54:58 956ca2a452aa3707bca553007a7ef221af3d4f6b0af747d17070926e000f2362"
         1172  +#define SQLITE_SOURCE_ID      "2019-05-23 16:38:12 d2fe370cafa9b11f6c3eb4e1c3be48d9d2610b9d2f9d9ebf9e50267f9079dfc0"
  1173   1173   
  1174   1174   /*
  1175   1175   ** CAPI3REF: Run-Time Library Version Numbers
  1176   1176   ** KEYWORDS: sqlite3_version sqlite3_sourceid
  1177   1177   **
  1178   1178   ** These interfaces provide the same information as the [SQLITE_VERSION],
  1179   1179   ** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros
................................................................................
  3238   3238   ** <dd>The SQLITE_DBCONFIG_DEFENSIVE option activates or deactivates the
  3239   3239   ** "defensive" flag for a database connection.  When the defensive
  3240   3240   ** flag is enabled, language features that allow ordinary SQL to 
  3241   3241   ** deliberately corrupt the database file are disabled.  The disabled
  3242   3242   ** features include but are not limited to the following:
  3243   3243   ** <ul>
  3244   3244   ** <li> The [PRAGMA writable_schema=ON] statement.
         3245  +** <li> The [PRAGMA journal_mode=OFF] statement.
  3245   3246   ** <li> Writes to the [sqlite_dbpage] virtual table.
  3246   3247   ** <li> Direct writes to [shadow tables].
  3247   3248   ** </ul>
  3248   3249   ** </dd>
  3249   3250   **
  3250   3251   ** [[SQLITE_DBCONFIG_WRITABLE_SCHEMA]] <dt>SQLITE_DBCONFIG_WRITABLE_SCHEMA</dt>
  3251   3252   ** <dd>The SQLITE_DBCONFIG_WRITABLE_SCHEMA option activates or deactivates the
................................................................................
 13954  13955   **
 13955  13956   ** For best performance, an attempt is made to guess at the byte-order
 13956  13957   ** using C-preprocessor macros.  If that is unsuccessful, or if
 13957  13958   ** -DSQLITE_BYTEORDER=0 is set, then byte-order is determined
 13958  13959   ** at run-time.
 13959  13960   */
 13960  13961   #ifndef SQLITE_BYTEORDER
 13961         -# if defined(i386)     || defined(__i386__)   || defined(_M_IX86) ||    \
 13962         -     defined(__x86_64) || defined(__x86_64__) || defined(_M_X64)  ||    \
 13963         -     defined(_M_AMD64) || defined(_M_ARM)     || defined(__x86)   ||    \
 13964         -     defined(__arm__)  || defined(_M_ARM64)
        13962  +# if defined(i386)      || defined(__i386__)      || defined(_M_IX86) ||    \
        13963  +     defined(__x86_64)  || defined(__x86_64__)    || defined(_M_X64)  ||    \
        13964  +     defined(_M_AMD64)  || defined(_M_ARM)        || defined(__x86)   ||    \
        13965  +     defined(__ARMEL__) || defined(__AARCH64EL__) || defined(_M_ARM64)
 13965  13966   #   define SQLITE_BYTEORDER    1234
 13966         -# elif defined(sparc)    || defined(__ppc__)
        13967  +# elif defined(sparc)     || defined(__ppc__) || \
        13968  +       defined(__ARMEB__) || defined(__AARCH64EB__)
 13967  13969   #   define SQLITE_BYTEORDER    4321
 13968  13970   # else
 13969  13971   #   define SQLITE_BYTEORDER 0
 13970  13972   # endif
 13971  13973   #endif
 13972  13974   #if SQLITE_BYTEORDER==4321
 13973  13975   # define SQLITE_BIGENDIAN    1
................................................................................
 17178  17180     unsigned bUnordered:1;   /* Use this index for == or IN queries only */
 17179  17181     unsigned uniqNotNull:1;  /* True if UNIQUE and NOT NULL for all columns */
 17180  17182     unsigned isResized:1;    /* True if resizeIndexObject() has been called */
 17181  17183     unsigned isCovering:1;   /* True if this is a covering index */
 17182  17184     unsigned noSkipScan:1;   /* Do not try to use skip-scan if true */
 17183  17185     unsigned hasStat1:1;     /* aiRowLogEst values come from sqlite_stat1 */
 17184  17186     unsigned bNoQuery:1;     /* Do not use this index to optimize queries */
        17187  +  unsigned bAscKeyBug:1;   /* True if the bba7b69f9849b5bf bug applies */
 17185  17188   #ifdef SQLITE_ENABLE_STAT3_OR_STAT4
 17186  17189     int nSample;             /* Number of elements in aSample[] */
 17187  17190     int nSampleCol;          /* Size of IndexSample.anEq[] and so on */
 17188  17191     tRowcnt *aAvgEq;         /* Average nEq values for keys not in aSample */
 17189  17192     IndexSample *aSample;    /* Samples of the left-most key */
 17190  17193     tRowcnt *aiRowEst;       /* Non-logarithmic stat1 data for this index */
 17191  17194     tRowcnt nRowEst0;        /* Non-logarithmic number of rows in the index */
................................................................................
 17405  17408                            ** EP_Unlikely:  134217728 times likelihood
 17406  17409                            ** TK_SELECT: 1st register of result vector */
 17407  17410     ynVar iColumn;         /* TK_COLUMN: column index.  -1 for rowid.
 17408  17411                            ** TK_VARIABLE: variable number (always >= 1).
 17409  17412                            ** TK_SELECT_COLUMN: column of the result vector */
 17410  17413     i16 iAgg;              /* Which entry in pAggInfo->aCol[] or ->aFunc[] */
 17411  17414     i16 iRightJoinTable;   /* If EP_FromJoin, the right table of the join */
 17412         -  u8 op2;                /* TK_REGISTER: original value of Expr.op
        17415  +  u8 op2;                /* TK_REGISTER/TK_TRUTH: original value of Expr.op
 17413  17416                            ** TK_COLUMN: the value of p5 for OP_Column
 17414  17417                            ** TK_AGG_FUNCTION: nesting depth */
 17415  17418     AggInfo *pAggInfo;     /* Used by TK_AGG_COLUMN and TK_AGG_FUNCTION */
 17416  17419     union {
 17417  17420       Table *pTab;           /* TK_COLUMN: Table containing column. Can be NULL
 17418  17421                              ** for a column of an index on an expression */
 17419  17422       Window *pWin;          /* TK_FUNCTION: Window definition for the func */
................................................................................
 17690  17693       ExprList *pEList;    /* Optional list of result-set columns */
 17691  17694       AggInfo *pAggInfo;   /* Information about aggregates at this level */
 17692  17695       Upsert *pUpsert;     /* ON CONFLICT clause information from an upsert */
 17693  17696     } uNC;
 17694  17697     NameContext *pNext;  /* Next outer name context.  NULL for outermost */
 17695  17698     int nRef;            /* Number of names resolved by this context */
 17696  17699     int nErr;            /* Number of errors encountered while resolving names */
 17697         -  u16 ncFlags;         /* Zero or more NC_* flags defined below */
        17700  +  int ncFlags;         /* Zero or more NC_* flags defined below */
 17698  17701     Select *pWinSelect;  /* SELECT statement for any window functions */
 17699  17702   };
 17700  17703   
 17701  17704   /*
 17702  17705   ** Allowed values for the NameContext, ncFlags field.
 17703  17706   **
 17704  17707   ** Value constraints (all checked via assert()):
................................................................................
 17717  17720   #define NC_UEList    0x0080  /* True if uNC.pEList is used */
 17718  17721   #define NC_UAggInfo  0x0100  /* True if uNC.pAggInfo is used */
 17719  17722   #define NC_UUpsert   0x0200  /* True if uNC.pUpsert is used */
 17720  17723   #define NC_MinMaxAgg 0x1000  /* min/max aggregates seen.  See note above */
 17721  17724   #define NC_Complex   0x2000  /* True if a function or subquery seen */
 17722  17725   #define NC_AllowWin  0x4000  /* Window functions are allowed here */
 17723  17726   #define NC_HasWin    0x8000  /* One or more window functions seen */
        17727  +#define NC_NoDblQStr 0x10000 /* Do not allow double-quoted string hack.
        17728  +                             ** Mnemonic: "NO DouBLe-Quoted STRings" */
 17724  17729   
 17725  17730   /*
 17726  17731   ** An instance of the following object describes a single ON CONFLICT
 17727  17732   ** clause in an upsert.
 17728  17733   **
 17729  17734   ** The pUpsertTarget field is only set if the ON CONFLICT clause includes
 17730  17735   ** conflict-target clause.  (In "ON CONFLICT(a,b)" the "(a,b)" is the
................................................................................
 68716  68721             **
 68717  68722             ** If the record is corrupt, the xRecordCompare routine may read
 68718  68723             ** up to two varints past the end of the buffer. An extra 18 
 68719  68724             ** bytes of padding is allocated at the end of the buffer in
 68720  68725             ** case this happens.  */
 68721  68726             void *pCellKey;
 68722  68727             u8 * const pCellBody = pCell - pPage->childPtrSize;
        68728  +          const int nOverrun = 18;  /* Size of the overrun padding */
 68723  68729             pPage->xParseCell(pPage, pCellBody, &pCur->info);
 68724  68730             nCell = (int)pCur->info.nKey;
 68725  68731             testcase( nCell<0 );   /* True if key size is 2^32 or more */
 68726  68732             testcase( nCell==0 );  /* Invalid key size:  0x80 0x80 0x00 */
 68727  68733             testcase( nCell==1 );  /* Invalid key size:  0x80 0x80 0x01 */
 68728  68734             testcase( nCell==2 );  /* Minimum legal index key size */
 68729  68735             if( nCell<2 || nCell/pCur->pBt->usableSize>pCur->pBt->nPage ){
 68730  68736               rc = SQLITE_CORRUPT_PAGE(pPage);
 68731  68737               goto moveto_finish;
 68732  68738             }
 68733         -          pCellKey = sqlite3Malloc( nCell+18 );
        68739  +          pCellKey = sqlite3Malloc( nCell+nOverrun );
 68734  68740             if( pCellKey==0 ){
 68735  68741               rc = SQLITE_NOMEM_BKPT;
 68736  68742               goto moveto_finish;
 68737  68743             }
 68738  68744             pCur->ix = (u16)idx;
 68739  68745             rc = accessPayload(pCur, 0, nCell, (unsigned char*)pCellKey, 0);
        68746  +          memset(((u8*)pCellKey)+nCell,0,nOverrun); /* Fix uninit warnings */
 68740  68747             pCur->curFlags &= ~BTCF_ValidOvfl;
 68741  68748             if( rc ){
 68742  68749               sqlite3_free(pCellKey);
 68743  68750               goto moveto_finish;
 68744  68751             }
 68745  68752             c = sqlite3VdbeRecordCompare(nCell, pCellKey, pIdxKey);
 68746  68753             sqlite3_free(pCellKey);
................................................................................
 74558  74565     }
 74559  74566     assert( acc.zText==zBuf && acc.mxAlloc<=0 );
 74560  74567     zBuf[acc.nChar] = 0; /* Fast version of sqlite3StrAccumFinish(&acc) */
 74561  74568   }
 74562  74569   
 74563  74570   #ifdef SQLITE_DEBUG
 74564  74571   /*
 74565         -** Check that string value of pMem agrees with its integer or real value.
        74572  +** Validity checks on pMem.  pMem holds a string.
        74573  +**
        74574  +** (1) Check that string value of pMem agrees with its integer or real value.
        74575  +** (2) Check that the string is correctly zero terminated
 74566  74576   **
 74567  74577   ** A single int or real value always converts to the same strings.  But
 74568  74578   ** many different strings can be converted into the same int or real.
 74569  74579   ** If a table contains a numeric value and an index is based on the
 74570  74580   ** corresponding string value, then it is important that the string be
 74571  74581   ** derived from the numeric value, not the other way around, to ensure
 74572  74582   ** that the index and table are consistent.  See ticket
................................................................................
 74576  74586   ** This routine looks at pMem to verify that if it has both a numeric
 74577  74587   ** representation and a string representation then the string rep has
 74578  74588   ** been derived from the numeric and not the other way around.  It returns
 74579  74589   ** true if everything is ok and false if there is a problem.
 74580  74590   **
 74581  74591   ** This routine is for use inside of assert() statements only.
 74582  74592   */
 74583         -SQLITE_PRIVATE int sqlite3VdbeMemConsistentDualRep(Mem *p){
        74593  +SQLITE_PRIVATE int sqlite3VdbeMemValidStrRep(Mem *p){
 74584  74594     char zBuf[100];
 74585  74595     char *z;
 74586  74596     int i, j, incr;
 74587  74597     if( (p->flags & MEM_Str)==0 ) return 1;
        74598  +  if( p->flags & MEM_Term ){
        74599  +    /* Insure that the string is properly zero-terminated.  Pay particular
        74600  +    ** attention to the case where p->n is odd */
        74601  +    if( p->szMalloc>0 && p->z==p->zMalloc ){
        74602  +      assert( p->enc==SQLITE_UTF8 || p->szMalloc >= ((p->n+1)&~1)+2 );
        74603  +      assert( p->enc!=SQLITE_UTF8 || p->szMalloc >= p->n+1 );
        74604  +    }
        74605  +    assert( p->z[p->n]==0 );
        74606  +    assert( p->enc==SQLITE_UTF8 || p->z[(p->n+1)&~1]==0 );
        74607  +    assert( p->enc==SQLITE_UTF8 || p->z[((p->n+1)&~1)+1]==0 );
        74608  +  }
 74588  74609     if( (p->flags & (MEM_Int|MEM_Real|MEM_IntReal))==0 ) return 1;
 74589  74610     vdbeMemRenderNum(sizeof(zBuf), zBuf, p);
 74590  74611     z = p->z;
 74591  74612     i = j = 0;
 74592  74613     incr = 1;
 74593  74614     if( p->enc!=SQLITE_UTF8 ){
 74594  74615       incr = 2;
................................................................................
 75661  75682     }else{
 75662  75683       sqlite3VdbeMemStringify(pVal, enc, 0);
 75663  75684       assert( 0==(1&SQLITE_PTR_TO_INT(pVal->z)) );
 75664  75685     }
 75665  75686     assert(pVal->enc==(enc & ~SQLITE_UTF16_ALIGNED) || pVal->db==0
 75666  75687                 || pVal->db->mallocFailed );
 75667  75688     if( pVal->enc==(enc & ~SQLITE_UTF16_ALIGNED) ){
 75668         -    assert( sqlite3VdbeMemConsistentDualRep(pVal) );
        75689  +    assert( sqlite3VdbeMemValidStrRep(pVal) );
 75669  75690       return pVal->z;
 75670  75691     }else{
 75671  75692       return 0;
 75672  75693     }
 75673  75694   }
 75674  75695   
 75675  75696   /* This function is only available internally, it is not part of the
................................................................................
 75684  75705   */
 75685  75706   SQLITE_PRIVATE const void *sqlite3ValueText(sqlite3_value* pVal, u8 enc){
 75686  75707     if( !pVal ) return 0;
 75687  75708     assert( pVal->db==0 || sqlite3_mutex_held(pVal->db->mutex) );
 75688  75709     assert( (enc&3)==(enc&~SQLITE_UTF16_ALIGNED) );
 75689  75710     assert( !sqlite3VdbeMemIsRowSet(pVal) );
 75690  75711     if( (pVal->flags&(MEM_Str|MEM_Term))==(MEM_Str|MEM_Term) && pVal->enc==enc ){
 75691         -    assert( sqlite3VdbeMemConsistentDualRep(pVal) );
        75712  +    assert( sqlite3VdbeMemValidStrRep(pVal) );
 75692  75713       return pVal->z;
 75693  75714     }
 75694  75715     if( pVal->flags&MEM_Null ){
 75695  75716       return 0;
 75696  75717     }
 75697  75718     return valueToText(pVal, enc);
 75698  75719   }
................................................................................
 76989  77010   **
 76990  77011   **   assert( sqlite3VdbeAssertMayAbort(pParse->pVdbe, pParse->mayAbort) );
 76991  77012   */
 76992  77013   SQLITE_PRIVATE int sqlite3VdbeAssertMayAbort(Vdbe *v, int mayAbort){
 76993  77014     int hasAbort = 0;
 76994  77015     int hasFkCounter = 0;
 76995  77016     int hasCreateTable = 0;
        77017  +  int hasCreateIndex = 0;
 76996  77018     int hasInitCoroutine = 0;
 76997  77019     Op *pOp;
 76998  77020     VdbeOpIter sIter;
 76999  77021     memset(&sIter, 0, sizeof(sIter));
 77000  77022     sIter.v = v;
 77001  77023   
 77002  77024     while( (pOp = opIterNext(&sIter))!=0 ){
................................................................................
 77007  77029        || ((opcode==OP_Halt || opcode==OP_HaltIfNull) 
 77008  77030         && ((pOp->p1)!=SQLITE_OK && pOp->p2==OE_Abort))
 77009  77031       ){
 77010  77032         hasAbort = 1;
 77011  77033         break;
 77012  77034       }
 77013  77035       if( opcode==OP_CreateBtree && pOp->p3==BTREE_INTKEY ) hasCreateTable = 1;
        77036  +    if( mayAbort ){
        77037  +      /* hasCreateIndex may also be set for some DELETE statements that use
        77038  +      ** OP_Clear. So this routine may end up returning true in the case 
        77039  +      ** where a "DELETE FROM tbl" has a statement-journal but does not
        77040  +      ** require one. This is not so bad - it is an inefficiency, not a bug. */
        77041  +      if( opcode==OP_CreateBtree && pOp->p3==BTREE_BLOBKEY ) hasCreateIndex = 1;
        77042  +      if( opcode==OP_Clear ) hasCreateIndex = 1;
        77043  +    }
 77014  77044       if( opcode==OP_InitCoroutine ) hasInitCoroutine = 1;
 77015  77045   #ifndef SQLITE_OMIT_FOREIGN_KEY
 77016  77046       if( opcode==OP_FkCounter && pOp->p1==0 && pOp->p2==1 ){
 77017  77047         hasFkCounter = 1;
 77018  77048       }
 77019  77049   #endif
 77020  77050     }
................................................................................
 77022  77052   
 77023  77053     /* Return true if hasAbort==mayAbort. Or if a malloc failure occurred.
 77024  77054     ** If malloc failed, then the while() loop above may not have iterated
 77025  77055     ** through all opcodes and hasAbort may be set incorrectly. Return
 77026  77056     ** true for this case to prevent the assert() in the callers frame
 77027  77057     ** from failing.  */
 77028  77058     return ( v->db->mallocFailed || hasAbort==mayAbort || hasFkCounter
 77029         -              || (hasCreateTable && hasInitCoroutine) );
        77059  +        || (hasCreateTable && hasInitCoroutine) || hasCreateIndex
        77060  +  );
 77030  77061   }
 77031  77062   #endif /* SQLITE_DEBUG - the sqlite3AssertMayAbort() function */
 77032  77063   
 77033  77064   #ifdef SQLITE_DEBUG
 77034  77065   /*
 77035  77066   ** Increment the nWrite counter in the VDBE if the cursor is not an
 77036  77067   ** ephemeral cursor, or if the cursor argument is NULL.
................................................................................
 85212  85243       if( sqlite3VdbeMemExpandBlob(pIn2) ) goto no_mem;
 85213  85244       flags2 = pIn2->flags & ~MEM_Str;
 85214  85245     }
 85215  85246     nByte = pIn1->n + pIn2->n;
 85216  85247     if( nByte>db->aLimit[SQLITE_LIMIT_LENGTH] ){
 85217  85248       goto too_big;
 85218  85249     }
 85219         -  if( sqlite3VdbeMemGrow(pOut, (int)nByte+2, pOut==pIn2) ){
        85250  +  if( sqlite3VdbeMemGrow(pOut, (int)nByte+3, pOut==pIn2) ){
 85220  85251       goto no_mem;
 85221  85252     }
 85222  85253     MemSetTypeFlag(pOut, MEM_Str);
 85223  85254     if( pOut!=pIn2 ){
 85224  85255       memcpy(pOut->z, pIn2->z, pIn2->n);
 85225  85256       assert( (pIn2->flags & MEM_Dyn) == (flags2 & MEM_Dyn) );
 85226  85257       pIn2->flags = flags2;
 85227  85258     }
 85228  85259     memcpy(&pOut->z[pIn2->n], pIn1->z, pIn1->n);
 85229  85260     assert( (pIn1->flags & MEM_Dyn) == (flags1 & MEM_Dyn) );
 85230  85261     pIn1->flags = flags1;
 85231  85262     pOut->z[nByte]=0;
 85232  85263     pOut->z[nByte+1] = 0;
        85264  +  pOut->z[nByte+2] = 0;
 85233  85265     pOut->flags |= MEM_Term;
 85234  85266     pOut->n = (int)nByte;
 85235  85267     pOut->enc = encoding;
 85236  85268     UPDATE_MAX_BLOBSIZE(pOut);
 85237  85269     break;
 85238  85270   }
 85239  85271   
................................................................................
 86594  86626     /* Apply the requested affinity to all inputs
 86595  86627     */
 86596  86628     assert( pData0<=pLast );
 86597  86629     if( zAffinity ){
 86598  86630       pRec = pData0;
 86599  86631       do{
 86600  86632         applyAffinity(pRec, zAffinity[0], encoding);
        86633  +      if( zAffinity[0]==SQLITE_AFF_REAL && (pRec->flags & MEM_Int) ){
        86634  +        pRec->flags |= MEM_IntReal;
        86635  +        pRec->flags &= ~(MEM_Int);
        86636  +      }
 86601  86637         REGISTER_TRACE((int)(pRec-aMem), pRec);
 86602  86638         zAffinity++;
 86603  86639         pRec++;
 86604  86640         assert( zAffinity[0]==0 || pRec<=pLast );
 86605  86641       }while( zAffinity[0] );
 86606  86642     }
 86607  86643   
................................................................................
 87712  87748     oc = pOp->opcode;
 87713  87749     eqOnly = 0;
 87714  87750     pC->nullRow = 0;
 87715  87751   #ifdef SQLITE_DEBUG
 87716  87752     pC->seekOp = pOp->opcode;
 87717  87753   #endif
 87718  87754   
        87755  +  pC->deferredMoveto = 0;
        87756  +  pC->cacheStatus = CACHE_STALE;
 87719  87757     if( pC->isTable ){
 87720  87758       /* The BTREE_SEEK_EQ flag is only set on index cursors */
 87721  87759       assert( sqlite3BtreeCursorHasHint(pC->uc.pCursor, BTREE_SEEK_EQ)==0
 87722  87760                 || CORRUPT_DB );
 87723  87761   
 87724  87762       /* The input value in P3 might be of any type: integer, real, string,
 87725  87763       ** blob, or NULL.  But it needs to be an integer before we can do
................................................................................
 87816  87854         goto abort_due_to_error;
 87817  87855       }
 87818  87856       if( eqOnly && r.eqSeen==0 ){
 87819  87857         assert( res!=0 );
 87820  87858         goto seek_not_found;
 87821  87859       }
 87822  87860     }
 87823         -  pC->deferredMoveto = 0;
 87824         -  pC->cacheStatus = CACHE_STALE;
 87825  87861   #ifdef SQLITE_TEST
 87826  87862     sqlite3_search_count++;
 87827  87863   #endif
 87828  87864     if( oc>=OP_SeekGE ){  assert( oc==OP_SeekGE || oc==OP_SeekGT );
 87829  87865       if( res<0 || (res==0 && oc==OP_SeekGT) ){
 87830  87866         res = 0;
 87831  87867         rc = sqlite3BtreeNext(pC->uc.pCursor, 0);
................................................................................
 88494  88530   
 88495  88531   #ifdef SQLITE_DEBUG
 88496  88532     if( pOp->p4type==P4_TABLE && HasRowid(pOp->p4.pTab) && pOp->p5==0 ){
 88497  88533       /* If p5 is zero, the seek operation that positioned the cursor prior to
 88498  88534       ** OP_Delete will have also set the pC->movetoTarget field to the rowid of
 88499  88535       ** the row that is being deleted */
 88500  88536       i64 iKey = sqlite3BtreeIntegerKey(pC->uc.pCursor);
 88501         -    assert( pC->movetoTarget==iKey );
        88537  +    assert( CORRUPT_DB || pC->movetoTarget==iKey );
 88502  88538     }
 88503  88539   #endif
 88504  88540   
 88505  88541     /* If the update-hook or pre-update-hook will be invoked, set zDb to
 88506  88542     ** the name of the db to pass as to it. Also set local pTab to a copy
 88507  88543     ** of p4.pTab. Finally, if p5 is true, indicating that this cursor was
 88508  88544     ** last moved with OP_Next or OP_Prev, not Seek or NotFound, set 
................................................................................
 95781  95817     ** pExpr.
 95782  95818     **
 95783  95819     ** Because no reference was made to outer contexts, the pNC->nRef
 95784  95820     ** fields are not changed in any context.
 95785  95821     */
 95786  95822     if( cnt==0 && zTab==0 ){
 95787  95823       assert( pExpr->op==TK_ID );
 95788         -    if( ExprHasProperty(pExpr,EP_DblQuoted) ){
        95824  +    if( ExprHasProperty(pExpr,EP_DblQuoted) 
        95825  +     && 0==(pTopNC->ncFlags&NC_NoDblQStr) 
        95826  +    ){
 95789  95827         /* If a double-quoted identifier does not match any known column name,
 95790  95828         ** then treat it as a string.
 95791  95829         **
 95792  95830         ** This hack was added in the early days of SQLite in a misguided attempt
 95793  95831         ** to be compatible with MySQL 3.x, which used double-quotes for strings.
 95794  95832         ** I now sorely regret putting in this hack. The effect of this hack is
 95795  95833         ** that misspelled identifier names are silently converted into strings
................................................................................
 96959  96997   ** An error message is left in pParse if anything is amiss.  The number
 96960  96998   ** if errors is returned.
 96961  96999   */
 96962  97000   SQLITE_PRIVATE int sqlite3ResolveExprNames( 
 96963  97001     NameContext *pNC,       /* Namespace to resolve expressions in. */
 96964  97002     Expr *pExpr             /* The expression to be analyzed. */
 96965  97003   ){
 96966         -  u16 savedHasAgg;
        97004  +  int savedHasAgg;
 96967  97005     Walker w;
 96968  97006   
 96969  97007     if( pExpr==0 ) return SQLITE_OK;
 96970  97008     savedHasAgg = pNC->ncFlags & (NC_HasAgg|NC_MinMaxAgg|NC_HasWin);
 96971  97009     pNC->ncFlags &= ~(NC_HasAgg|NC_MinMaxAgg|NC_HasWin);
 96972  97010     w.pParse = pNC->pParse;
 96973  97011     w.xExprCallback = resolveExprStep;
................................................................................
 97074  97112       sSrc.a[0].zName = pTab->zName;
 97075  97113       sSrc.a[0].pTab = pTab;
 97076  97114       sSrc.a[0].iCursor = -1;
 97077  97115     }
 97078  97116     sNC.pParse = pParse;
 97079  97117     sNC.pSrcList = &sSrc;
 97080  97118     sNC.ncFlags = type;
        97119  +  if( !pParse->db->init.busy && !sqlite3WritableSchema(pParse->db) ){
        97120  +    sNC.ncFlags |= NC_NoDblQStr;
        97121  +  }
 97081  97122     if( (rc = sqlite3ResolveExprNames(&sNC, pExpr))!=SQLITE_OK ) return rc;
 97082  97123     if( pList ) rc = sqlite3ResolveExprListNames(&sNC, pList);
 97083  97124     return rc;
 97084  97125   }
 97085  97126   
 97086  97127   /************** End of resolve.c *********************************************/
 97087  97128   /************** Begin file expr.c ********************************************/
................................................................................
 99891  99932         /* If the expression is not constant then we will need to
 99892  99933         ** disable the test that was generated above that makes sure
 99893  99934         ** this code only executes once.  Because for a non-constant
 99894  99935         ** expression we need to rerun this code each time.
 99895  99936         */
 99896  99937         if( addrOnce && !sqlite3ExprIsConstant(pE2) ){
 99897  99938           sqlite3VdbeChangeToNoop(v, addrOnce);
        99939  +        ExprClearProperty(pExpr, EP_Subrtn);
 99898  99940           addrOnce = 0;
 99899  99941         }
 99900  99942   
 99901  99943         /* Evaluate the expression and insert it into the temp table */
 99902  99944         r3 = sqlite3ExprCodeTarget(pParse, pE2, r1);
 99903  99945         sqlite3VdbeAddOp4(v, OP_MakeRecord, r3, 1, r2, &affinity, 1);
 99904  99946         sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iTab, r2, r3, 1);
................................................................................
101944 101986       if( sqlite3ExprCompare(pParse, pA->pRight, pB->pRight, iTab) ) return 2;
101945 101987       if( sqlite3ExprListCompare(pA->x.pList, pB->x.pList, iTab) ) return 2;
101946 101988       if( pA->op!=TK_STRING
101947 101989        && pA->op!=TK_TRUEFALSE
101948 101990        && (combinedFlags & EP_Reduced)==0
101949 101991       ){
101950 101992         if( pA->iColumn!=pB->iColumn ) return 2;
       101993  +      if( pA->op2!=pB->op2 ) return 2;
101951 101994         if( pA->iTable!=pB->iTable 
101952 101995          && (pA->iTable!=iTab || NEVER(pB->iTable>=0)) ) return 2;
101953 101996       }
101954 101997     }
101955 101998     return 0;
101956 101999   }
101957 102000   
................................................................................
101990 102033   */
101991 102034   SQLITE_PRIVATE int sqlite3ExprCompareSkip(Expr *pA, Expr *pB, int iTab){
101992 102035     return sqlite3ExprCompare(0,
101993 102036                sqlite3ExprSkipCollate(pA),
101994 102037                sqlite3ExprSkipCollate(pB),
101995 102038                iTab);
101996 102039   }
       102040  +
       102041  +/*
       102042  +** Return non-zero if Expr p can only be true if pNN is not NULL.
       102043  +*/
       102044  +static int exprImpliesNotNull(
       102045  +  Parse *pParse,      /* Parsing context */
       102046  +  Expr *p,            /* The expression to be checked */
       102047  +  Expr *pNN,          /* The expression that is NOT NULL */
       102048  +  int iTab,           /* Table being evaluated */
       102049  +  int seenNot         /* True if p is an operand of NOT */
       102050  +){
       102051  +  assert( p );
       102052  +  assert( pNN );
       102053  +  if( sqlite3ExprCompare(pParse, p, pNN, iTab)==0 ) return 1;
       102054  +  switch( p->op ){
       102055  +    case TK_IN: {
       102056  +      if( seenNot && ExprHasProperty(p, EP_xIsSelect) ) return 0;
       102057  +      assert( ExprHasProperty(p,EP_xIsSelect)
       102058  +           || (p->x.pList!=0 && p->x.pList->nExpr>0) );
       102059  +      return exprImpliesNotNull(pParse, p->pLeft, pNN, iTab, seenNot);
       102060  +    }
       102061  +    case TK_BETWEEN: {
       102062  +      ExprList *pList = p->x.pList;
       102063  +      assert( pList!=0 );
       102064  +      assert( pList->nExpr==2 );
       102065  +      if( seenNot ) return 0;
       102066  +      if( exprImpliesNotNull(pParse, pList->a[0].pExpr, pNN, iTab, seenNot)
       102067  +       || exprImpliesNotNull(pParse, pList->a[1].pExpr, pNN, iTab, seenNot)
       102068  +      ){
       102069  +        return 1;
       102070  +      }
       102071  +      return exprImpliesNotNull(pParse, p->pLeft, pNN, iTab, seenNot);
       102072  +    }
       102073  +    case TK_EQ:
       102074  +    case TK_NE:
       102075  +    case TK_LT:
       102076  +    case TK_LE:
       102077  +    case TK_GT:
       102078  +    case TK_GE:
       102079  +    case TK_PLUS:
       102080  +    case TK_MINUS:
       102081  +    case TK_STAR:
       102082  +    case TK_REM:
       102083  +    case TK_BITAND:
       102084  +    case TK_BITOR:
       102085  +    case TK_SLASH:
       102086  +    case TK_LSHIFT:
       102087  +    case TK_RSHIFT: 
       102088  +    case TK_CONCAT: {
       102089  +      if( exprImpliesNotNull(pParse, p->pRight, pNN, iTab, seenNot) ) return 1;
       102090  +      /* Fall thru into the next case */
       102091  +    }
       102092  +    case TK_SPAN:
       102093  +    case TK_COLLATE:
       102094  +    case TK_BITNOT:
       102095  +    case TK_UPLUS:
       102096  +    case TK_UMINUS: {
       102097  +      return exprImpliesNotNull(pParse, p->pLeft, pNN, iTab, seenNot);
       102098  +    }
       102099  +    case TK_TRUTH: {
       102100  +      if( seenNot ) return 0;
       102101  +      if( p->op2!=TK_IS ) return 0;
       102102  +      return exprImpliesNotNull(pParse, p->pLeft, pNN, iTab, seenNot);
       102103  +    }
       102104  +    case TK_NOT: {
       102105  +      return exprImpliesNotNull(pParse, p->pLeft, pNN, iTab, 1);
       102106  +    }
       102107  +  }
       102108  +  return 0;
       102109  +}
101997 102110   
101998 102111   /*
101999 102112   ** Return true if we can prove the pE2 will always be true if pE1 is
102000 102113   ** true.  Return false if we cannot complete the proof or if pE2 might
102001 102114   ** be false.  Examples:
102002 102115   **
102003 102116   **     pE1: x==5       pE2: x==5             Result: true
................................................................................
102027 102140     if( pE2->op==TK_OR
102028 102141      && (sqlite3ExprImpliesExpr(pParse, pE1, pE2->pLeft, iTab)
102029 102142                || sqlite3ExprImpliesExpr(pParse, pE1, pE2->pRight, iTab) )
102030 102143     ){
102031 102144       return 1;
102032 102145     }
102033 102146     if( pE2->op==TK_NOTNULL
102034         -   && pE1->op!=TK_ISNULL
102035         -   && pE1->op!=TK_IS
102036         -   && pE1->op!=TK_OR
       102147  +   && exprImpliesNotNull(pParse, pE1, pE2->pLeft, iTab, 0)
102037 102148     ){
102038         -    Expr *pX = sqlite3ExprSkipCollate(pE1->pLeft);
102039         -    testcase( pX!=pE1->pLeft );
102040         -    if( sqlite3ExprCompare(pParse, pX, pE2->pLeft, iTab)==0 ) return 1;
       102149  +    return 1;
102041 102150     }
102042 102151     return 0;
102043 102152   }
102044 102153   
102045 102154   /*
102046 102155   ** This is the Expr node callback for sqlite3ExprImpliesNotNullRow().
102047 102156   ** If the expression node requires that the table at pWalker->iCur
................................................................................
108977 109086       }
108978 109087       if( resizeIndexObject(db, pIdx, pIdx->nKeyCol+n) ) return;
108979 109088       for(i=0, j=pIdx->nKeyCol; i<nPk; i++){
108980 109089         if( !isDupColumn(pIdx, pIdx->nKeyCol, pPk, i) ){
108981 109090           testcase( hasColumn(pIdx->aiColumn, pIdx->nKeyCol, pPk->aiColumn[i]) );
108982 109091           pIdx->aiColumn[j] = pPk->aiColumn[i];
108983 109092           pIdx->azColl[j] = pPk->azColl[i];
       109093  +        if( pPk->aSortOrder[i] ){
       109094  +          /* See ticket https://www.sqlite.org/src/info/bba7b69f9849b5bf */
       109095  +          pIdx->bAscKeyBug = 1;
       109096  +        }
108984 109097           j++;
108985 109098         }
108986 109099       }
108987 109100       assert( pIdx->nColumn>=pIdx->nKeyCol+n );
108988 109101       assert( pIdx->nColumn>=j );
108989 109102     }
108990 109103   
................................................................................
110095 110208       addr2 = sqlite3VdbeCurrentAddr(v);
110096 110209       sqlite3VdbeVerifyAbortable(v, OE_Abort);
110097 110210       sqlite3VdbeAddOp4Int(v, OP_SorterCompare, iSorter, j2, regRecord,
110098 110211                            pIndex->nKeyCol); VdbeCoverage(v);
110099 110212       sqlite3UniqueConstraint(pParse, OE_Abort, pIndex);
110100 110213       sqlite3VdbeJumpHere(v, j2);
110101 110214     }else{
       110215  +    /* Most CREATE INDEX and REINDEX statements that are not UNIQUE can not
       110216  +    ** abort. The exception is if one of the indexed expressions contains a
       110217  +    ** user function that throws an exception when it is evaluated. But the
       110218  +    ** overhead of adding a statement journal to a CREATE INDEX statement is
       110219  +    ** very small (since most of the pages written do not contain content that
       110220  +    ** needs to be restored if the statement aborts), so we call 
       110221  +    ** sqlite3MayAbort() for all CREATE INDEX statements.  */
       110222  +    sqlite3MayAbort(pParse);
110102 110223       addr2 = sqlite3VdbeCurrentAddr(v);
110103 110224     }
110104 110225     sqlite3VdbeAddOp3(v, OP_SorterData, iSorter, regRecord, iIdx);
110105         -  sqlite3VdbeAddOp1(v, OP_SeekEnd, iIdx);
       110226  +  if( !pIndex->bAscKeyBug ){
       110227  +    /* This OP_SeekEnd opcode makes index insert for a REINDEX go much
       110228  +    ** faster by avoiding unnecessary seeks.  But the optimization does
       110229  +    ** not work for UNIQUE constraint indexes on WITHOUT ROWID tables
       110230  +    ** with DESC primary keys, since those indexes have there keys in
       110231  +    ** a different order from the main table.
       110232  +    ** See ticket: https://www.sqlite.org/src/info/bba7b69f9849b5bf
       110233  +    */
       110234  +    sqlite3VdbeAddOp1(v, OP_SeekEnd, iIdx);
       110235  +  }
110106 110236     sqlite3VdbeAddOp2(v, OP_IdxInsert, iIdx, regRecord);
110107 110237     sqlite3VdbeChangeP5(v, OPFLAG_USESEEKRESULT);
110108 110238     sqlite3ReleaseTempReg(pParse, regRecord);
110109 110239     sqlite3VdbeAddOp2(v, OP_SorterNext, iSorter, addr2); VdbeCoverage(v);
110110 110240     sqlite3VdbeJumpHere(v, addr1);
110111 110241   
110112 110242     sqlite3VdbeAddOp1(v, OP_Close, iTab);
................................................................................
120848 120978   #define PragTyp_TABLE_INFO                    34
120849 120979   #define PragTyp_TEMP_STORE                    35
120850 120980   #define PragTyp_TEMP_STORE_DIRECTORY          36
120851 120981   #define PragTyp_THREADS                       37
120852 120982   #define PragTyp_WAL_AUTOCHECKPOINT            38
120853 120983   #define PragTyp_WAL_CHECKPOINT                39
120854 120984   #define PragTyp_ACTIVATE_EXTENSIONS           40
120855         -#define PragTyp_HEXKEY                        41
120856         -#define PragTyp_KEY                           42
120857         -#define PragTyp_LOCK_STATUS                   43
120858         -#define PragTyp_STATS                         44
       120985  +#define PragTyp_KEY                           41
       120986  +#define PragTyp_LOCK_STATUS                   42
       120987  +#define PragTyp_STATS                         43
120859 120988   
120860 120989   /* Property flags associated with various pragma. */
120861 120990   #define PragFlg_NeedSchema 0x01 /* Force schema load before running */
120862 120991   #define PragFlg_NoColumns  0x02 /* OP_ResultRow called with zero columns */
120863 120992   #define PragFlg_NoColumns1 0x04 /* zero columns if RHS argument is present */
120864 120993   #define PragFlg_ReadOnly   0x08 /* Read-only HEADER_VALUE */
120865 120994   #define PragFlg_Result0    0x10 /* Acts as query when no argument */
................................................................................
121124 121253     /* ePragFlg:  */ PragFlg_Result0,
121125 121254     /* ColNames:  */ 41, 2,
121126 121255     /* iArg:      */ 0 },
121127 121256   #endif
121128 121257   #endif
121129 121258   #if defined(SQLITE_HAS_CODEC)
121130 121259    {/* zName:     */ "hexkey",
121131         -  /* ePragTyp:  */ PragTyp_HEXKEY,
       121260  +  /* ePragTyp:  */ PragTyp_KEY,
121132 121261     /* ePragFlg:  */ 0,
121133 121262     /* ColNames:  */ 0, 0,
121134 121263     /* iArg:      */ 2 },
121135 121264    {/* zName:     */ "hexrekey",
121136         -  /* ePragTyp:  */ PragTyp_HEXKEY,
       121265  +  /* ePragTyp:  */ PragTyp_KEY,
121137 121266     /* ePragFlg:  */ 0,
121138 121267     /* ColNames:  */ 0, 0,
121139 121268     /* iArg:      */ 3 },
121140 121269   #endif
121141 121270   #if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
121142 121271   #if !defined(SQLITE_OMIT_CHECK)
121143 121272    {/* zName:     */ "ignore_check_constraints",
................................................................................
122089 122218         for(eMode=0; (zMode = sqlite3JournalModename(eMode))!=0; eMode++){
122090 122219           if( sqlite3StrNICmp(zRight, zMode, n)==0 ) break;
122091 122220         }
122092 122221         if( !zMode ){
122093 122222           /* If the "=MODE" part does not match any known journal mode,
122094 122223           ** then do a query */
122095 122224           eMode = PAGER_JOURNALMODE_QUERY;
       122225  +      }
       122226  +      if( eMode==PAGER_JOURNALMODE_OFF && (db->flags & SQLITE_Defensive)!=0 ){
       122227  +        /* Do not allow journal-mode "OFF" in defensive since the database
       122228  +        ** can become corrupted using ordinary SQL when the journal is off */
       122229  +        eMode = PAGER_JOURNALMODE_QUERY;
122096 122230         }
122097 122231       }
122098 122232       if( eMode==PAGER_JOURNALMODE_QUERY && pId2->n==0 ){
122099 122233         /* Convert "PRAGMA journal_mode" into "PRAGMA main.journal_mode" */
122100 122234         iDb = 0;
122101 122235         pId2->n = 1;
122102 122236       }
................................................................................
123571 123705     **  hexkey        2
123572 123706     **  hexrekey      3
123573 123707     **  textkey       4
123574 123708     **  textrekey     5
123575 123709     */
123576 123710     case PragTyp_KEY: {
123577 123711       if( zRight ){
123578         -      int n = pPragma->iArg<4 ? sqlite3Strlen30(zRight) : -1;
123579         -      if( (pPragma->iArg & 1)==0 ){
123580         -        sqlite3_key_v2(db, zDb, zRight, n);
       123712  +      char zBuf[40];
       123713  +      const char *zKey = zRight;
       123714  +      int n;
       123715  +      if( pPragma->iArg==2 || pPragma->iArg==3 ){
       123716  +        u8 iByte;
       123717  +        int i;
       123718  +        for(i=0, iByte=0; i<sizeof(zBuf)*2 && sqlite3Isxdigit(zRight[i]); i++){
       123719  +          iByte = (iByte<<4) + sqlite3HexToInt(zRight[i]);
       123720  +          if( (i&1)!=0 ) zBuf[i/2] = iByte;
       123721  +        }
       123722  +        zKey = zBuf;
       123723  +        n = i/2;
123581 123724         }else{
123582         -        sqlite3_rekey_v2(db, zDb, zRight, n);
123583         -      }
123584         -    }
123585         -    break;
123586         -  }
123587         -  case PragTyp_HEXKEY: {
123588         -    if( zRight ){
123589         -      u8 iByte;
123590         -      int i;
123591         -      char zKey[40];
123592         -      for(i=0, iByte=0; i<sizeof(zKey)*2 && sqlite3Isxdigit(zRight[i]); i++){
123593         -        iByte = (iByte<<4) + sqlite3HexToInt(zRight[i]);
123594         -        if( (i&1)!=0 ) zKey[i/2] = iByte;
       123725  +        n = pPragma->iArg<4 ? sqlite3Strlen30(zRight) : -1;
123595 123726         }
123596 123727         if( (pPragma->iArg & 1)==0 ){
123597         -        sqlite3_key_v2(db, zDb, zKey, i/2);
       123728  +        rc = sqlite3_key_v2(db, zDb, zKey, n);
123598 123729         }else{
123599         -        sqlite3_rekey_v2(db, zDb, zKey, i/2);
       123730  +        rc = sqlite3_rekey_v2(db, zDb, zKey, n);
       123731  +      }
       123732  +      if( rc==SQLITE_OK && n!=0 ){
       123733  +        sqlite3VdbeSetNumCols(v, 1);
       123734  +        sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "ok", SQLITE_STATIC);
       123735  +        returnSingleText(v, "ok");
123600 123736         }
123601 123737       }
123602 123738       break;
123603 123739     }
123604 123740   #endif
123605 123741   #if defined(SQLITE_HAS_CODEC) || defined(SQLITE_ENABLE_CEROD)
123606 123742     case PragTyp_ACTIVATE_EXTENSIONS: if( zRight ){
................................................................................
129721 129857     if( db->mallocFailed  ){
129722 129858       return WRC_Abort;
129723 129859     }
129724 129860     assert( p->pSrc!=0 );
129725 129861     if( (selFlags & SF_Expanded)!=0 ){
129726 129862       return WRC_Prune;
129727 129863     }
       129864  +  if( pWalker->eCode ){
       129865  +    /* Renumber selId because it has been copied from a view */
       129866  +    p->selId = ++pParse->nSelect;
       129867  +  }
129728 129868     pTabList = p->pSrc;
129729 129869     pEList = p->pEList;
129730 129870     sqlite3WithPush(pParse, p->pWith, 0);
129731 129871   
129732 129872     /* Make sure cursor numbers have been assigned to all entries in
129733 129873     ** the FROM clause of the SELECT statement.
129734 129874     */
................................................................................
129770 129910         pTab->nTabRef++;
129771 129911         if( !IsVirtual(pTab) && cannotBeFunction(pParse, pFrom) ){
129772 129912           return WRC_Abort;
129773 129913         }
129774 129914   #if !defined(SQLITE_OMIT_VIEW) || !defined (SQLITE_OMIT_VIRTUALTABLE)
129775 129915         if( IsVirtual(pTab) || pTab->pSelect ){
129776 129916           i16 nCol;
       129917  +        u8 eCodeOrig = pWalker->eCode;
129777 129918           if( sqlite3ViewGetColumnNames(pParse, pTab) ) return WRC_Abort;
129778 129919           assert( pFrom->pSelect==0 );
129779 129920           pFrom->pSelect = sqlite3SelectDup(db, pTab->pSelect, 0);
129780 129921           nCol = pTab->nCol;
129781 129922           pTab->nCol = -1;
       129923  +        pWalker->eCode = 1;  /* Turn on Select.selId renumbering */
129782 129924           sqlite3WalkSelect(pWalker, pFrom->pSelect);
       129925  +        pWalker->eCode = eCodeOrig;
129783 129926           pTab->nCol = nCol;
129784 129927         }
129785 129928   #endif
129786 129929       }
129787 129930   
129788 129931       /* Locate the index named by the INDEXED BY clause, if any. */
129789 129932       if( sqlite3IndexedByLookup(pParse, pFrom) ){
................................................................................
130025 130168     if( OK_IF_ALWAYS_TRUE(pParse->hasCompound) ){
130026 130169       w.xSelectCallback = convertCompoundSelectToSubquery;
130027 130170       w.xSelectCallback2 = 0;
130028 130171       sqlite3WalkSelect(&w, pSelect);
130029 130172     }
130030 130173     w.xSelectCallback = selectExpander;
130031 130174     w.xSelectCallback2 = selectPopWith;
       130175  +  w.eCode = 0;
130032 130176     sqlite3WalkSelect(&w, pSelect);
130033 130177   }
130034 130178   
130035 130179   
130036 130180   #ifndef SQLITE_OMIT_SUBQUERY
130037 130181   /*
130038 130182   ** This is a Walker.xSelectCallback callback for the sqlite3SelectTypeInfo()
................................................................................
130351 130495   ){
130352 130496     struct SrcList_item *pItem;
130353 130497     for(pItem = pTabList->a; pItem<pThis; pItem++){
130354 130498       Select *pS1;
130355 130499       if( pItem->pSelect==0 ) continue;
130356 130500       if( pItem->fg.viaCoroutine ) continue;
130357 130501       if( pItem->zName==0 ) continue;
130358         -    if( sqlite3_stricmp(pItem->zDatabase, pThis->zDatabase)!=0 ) continue;
       130502  +    assert( pItem->pTab!=0 );
       130503  +    assert( pThis->pTab!=0 );
       130504  +    if( pItem->pTab->pSchema!=pThis->pTab->pSchema ) continue;
130359 130505       if( sqlite3_stricmp(pItem->zName, pThis->zName)!=0 ) continue;
130360 130506       pS1 = pItem->pSelect;
130361         -    if( pThis->pSelect->selId!=pS1->selId ){
       130507  +    if( pItem->pTab->pSchema==0 && pThis->pSelect->selId!=pS1->selId ){
130362 130508         /* The query flattener left two different CTE tables with identical
130363 130509         ** names in the same FROM clause. */
130364 130510         continue;
130365 130511       }
130366 130512       if( sqlite3ExprCompare(0, pThis->pSelect->pWhere, pS1->pWhere, -1)
130367 130513        || sqlite3ExprCompare(0, pThis->pSelect->pHaving, pS1->pHaving, -1) 
130368 130514       ){
................................................................................
130386 130532   **    SELECT (SELECT count(*) FROM t1)+(SELECT count(*) FROM t2)
130387 130533   **
130388 130534   ** The transformation only works if all of the following are true:
130389 130535   **
130390 130536   **   *  The subquery is a UNION ALL of two or more terms
130391 130537   **   *  The subquery does not have a LIMIT clause
130392 130538   **   *  There is no WHERE or GROUP BY or HAVING clauses on the subqueries
130393         -**   *  The outer query is a simple count(*)
       130539  +**   *  The outer query is a simple count(*) with no WHERE clause or other
       130540  +**      extraneous syntax.
130394 130541   **
130395 130542   ** Return TRUE if the optimization is undertaken.
130396 130543   */
130397 130544   static int countOfViewOptimization(Parse *pParse, Select *p){
130398 130545     Select *pSub, *pPrior;
130399 130546     Expr *pExpr;
130400 130547     Expr *pCount;
130401 130548     sqlite3 *db;
130402 130549     if( (p->selFlags & SF_Aggregate)==0 ) return 0;   /* This is an aggregate */
130403 130550     if( p->pEList->nExpr!=1 ) return 0;               /* Single result column */
       130551  +  if( p->pWhere ) return 0;
       130552  +  if( p->pGroupBy ) return 0;
130404 130553     pExpr = p->pEList->a[0].pExpr;
130405 130554     if( pExpr->op!=TK_AGG_FUNCTION ) return 0;        /* Result is an aggregate */
130406 130555     if( sqlite3_stricmp(pExpr->u.zToken,"count") ) return 0;  /* Is count() */
130407 130556     if( pExpr->x.pList!=0 ) return 0;                 /* Must be count(*) */
130408 130557     if( p->pSrc->nSrc!=1 ) return 0;                  /* One table in FROM  */
130409 130558     pSub = p->pSrc->a[0].pSelect;
130410 130559     if( pSub==0 ) return 0;                           /* The FROM is a subquery */
................................................................................
148648 148797   **    YY_MAX_REDUCE      Maximum value for reduce actions
148649 148798   */
148650 148799   #ifndef INTERFACE
148651 148800   # define INTERFACE 1
148652 148801   #endif
148653 148802   /************* Begin control #defines *****************************************/
148654 148803   #define YYCODETYPE unsigned short int
148655         -#define YYNOCODE 301
       148804  +#define YYNOCODE 302
148656 148805   #define YYACTIONTYPE unsigned short int
148657 148806   #define YYWILDCARD 95
148658 148807   #define sqlite3ParserTOKENTYPE Token
148659 148808   typedef union {
148660 148809     int yyinit;
148661 148810     sqlite3ParserTOKENTYPE yy0;
148662         -  With* yy59;
148663         -  IdList* yy62;
148664         -  struct TrigEvent yy90;
148665         -  Upsert* yy136;
148666         -  struct FrameBound yy201;
148667         -  u8 yy238;
148668         -  const char* yy294;
148669         -  Window* yy295;
148670         -  struct {int value; int mask;} yy355;
148671         -  ExprList* yy434;
148672         -  TriggerStep* yy455;
148673         -  Select* yy457;
148674         -  SrcList* yy483;
148675         -  int yy494;
148676         -  Expr* yy524;
       148811  +  TriggerStep* yy11;
       148812  +  IdList* yy76;
       148813  +  ExprList* yy94;
       148814  +  Upsert* yy95;
       148815  +  int yy100;
       148816  +  Expr* yy102;
       148817  +  struct {int value; int mask;} yy199;
       148818  +  u8 yy218;
       148819  +  With* yy243;
       148820  +  struct TrigEvent yy298;
       148821  +  Window* yy379;
       148822  +  struct FrameBound yy389;
       148823  +  Select* yy391;
       148824  +  SrcList* yy407;
       148825  +  const char* yy528;
148677 148826   } YYMINORTYPE;
148678 148827   #ifndef YYSTACKDEPTH
148679 148828   #define YYSTACKDEPTH 100
148680 148829   #endif
148681 148830   #define sqlite3ParserARG_SDECL
148682 148831   #define sqlite3ParserARG_PDECL
148683 148832   #define sqlite3ParserARG_PARAM
................................................................................
148685 148834   #define sqlite3ParserARG_STORE
148686 148835   #define sqlite3ParserCTX_SDECL Parse *pParse;
148687 148836   #define sqlite3ParserCTX_PDECL ,Parse *pParse
148688 148837   #define sqlite3ParserCTX_PARAM ,pParse
148689 148838   #define sqlite3ParserCTX_FETCH Parse *pParse=yypParser->pParse;
148690 148839   #define sqlite3ParserCTX_STORE yypParser->pParse=pParse;
148691 148840   #define YYFALLBACK 1
148692         -#define YYNSTATE             541
148693         -#define YYNRULE              375
       148841  +#define YYNSTATE             540
       148842  +#define YYNRULE              376
148694 148843   #define YYNTOKEN             176
148695         -#define YY_MAX_SHIFT         540
148696         -#define YY_MIN_SHIFTREDUCE   784
       148844  +#define YY_MAX_SHIFT         539
       148845  +#define YY_MIN_SHIFTREDUCE   783
148697 148846   #define YY_MAX_SHIFTREDUCE   1158
148698 148847   #define YY_ERROR_ACTION      1159
148699 148848   #define YY_ACCEPT_ACTION     1160
148700 148849   #define YY_NO_ACTION         1161
148701 148850   #define YY_MIN_REDUCE        1162
148702         -#define YY_MAX_REDUCE        1536
       148851  +#define YY_MAX_REDUCE        1537
148703 148852   /************* End control #defines *******************************************/
148704 148853   #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
148705 148854   
148706 148855   /* Define the yytestcase() macro to be a no-op if is not already defined
148707 148856   ** otherwise.
148708 148857   **
148709 148858   ** Applications can choose to define yytestcase() in the %include section
................................................................................
148764 148913   **  yy_reduce_ofst[]   For each state, the offset into yy_action for
148765 148914   **                     shifting non-terminals after a reduce.
148766 148915   **  yy_default[]       Default action for each state.
148767 148916   **
148768 148917   *********** Begin parsing tables **********************************************/
148769 148918   #define YY_ACTTAB_COUNT (2142)
148770 148919   static const YYACTIONTYPE yy_action[] = {
148771         - /*     0 */   535, 1323,  112,  109,  209,  112,  109,  209, 1160,    1,
148772         - /*    10 */     1,  540,    2, 1164,  535, 1292, 1228, 1207,  289,  384,
148773         - /*    20 */   134,   42,   42, 1427,  382, 1228,    9, 1241,  242,  492,
148774         - /*    30 */  1291,  915,  373,  379, 1026,   70,   70,  427, 1026,  916,
148775         - /*    40 */   529,  529,  529,  119,  120,  110, 1136, 1136,  981,  984,
148776         - /*    50 */   974,  974,  117,  117,  118,  118,  118,  118,  380,  264,
148777         - /*    60 */   264,  264,  264, 1134,  264,  264,  112,  109,  209,  397,
148778         - /*    70 */   454,  517,  532,  491,  532, 1233, 1233,  532,  239,  206,
148779         - /*    80 */   493,  112,  109,  209,  464,  219,  118,  118,  118,  118,
148780         - /*    90 */   111,  393,  440,  444,   16,   16,  116,  116,  116,  116,
148781         - /*   100 */   115,  115,  114,  114,  114,  113,  415,  971,  971,  982,
148782         - /*   110 */   985,  235, 1463,  351, 1134,  419,  384,  116,  116,  116,
148783         - /*   120 */   116,  115,  115,  114,  114,  114,  113,  415,  116,  116,
148784         - /*   130 */   116,  116,  115,  115,  114,  114,  114,  113,  415,  961,
       148920  + /*     0 */   112,  109,  209,  112,  109,  209, 1160,    1,    1,  539,
       148921  + /*    10 */     2, 1164,  490, 1193, 1293,  534,  289, 1196,  134,  383,
       148922  + /*    20 */  1485, 1428, 1164, 1229, 1208, 1242, 1195,  289,  491,  134,
       148923  + /*    30 */   373,  915, 1229,  443,   16,   16, 1242,   70,   70,  916,
       148924  + /*    40 */   242, 1292,  296,  119,  120,  110, 1136, 1136,  981,  984,
       148925  + /*    50 */   974,  974,  117,  117,  118,  118,  118,  118,  264,  264,
       148926  + /*    60 */   190,  264,  264,  264,  264,  112,  109,  209,  362,  264,
       148927  + /*    70 */   264,  531,  376,  497,  531, 1134,  531, 1501,  239,  206,
       148928  + /*    80 */   338,    9,  531,  242,  219, 1203,  118,  118,  118,  118,
       148929  + /*    90 */   111,  439,  112,  109,  209,  219,  116,  116,  116,  116,
       148930  + /*   100 */   115,  115,  114,  114,  114,  113,  414,  115,  115,  114,
       148931  + /*   110 */   114,  114,  113,  414,  418,   12,  383,  400, 1134,  114,
       148932  + /*   120 */   114,  114,  113,  414, 1115,  418, 1134, 1392,  116,  116,
       148933  + /*   130 */   116,  116,  115,  115,  114,  114,  114,  113,  414,  961,
148785 148934    /*   140 */   119,  120,  110, 1136, 1136,  981,  984,  974,  974,  117,
148786         - /*   150 */   117,  118,  118,  118,  118,  952,  415,  941,  298,  951,
148787         - /*   160 */   941, 1480,  540,    2, 1164, 1115,  535, 1458,  160,  289,
148788         - /*   170 */     6,  134, 1504,  389,  406,  975,  338, 1024, 1241,  337,
148789         - /*   180 */  1089, 1476, 1089,  118,  118,  118,  118,   42,   42,  329,
       148935  + /*   150 */   117,  118,  118,  118,  118,  952,  534,  414,  941,  951,
       148936  + /*   160 */  1481,  539,    2, 1164, 1505,  534,  160,  175,  289, 1134,
       148937  + /*   170 */   134,  434,  312,  297, 1115, 1116, 1117, 1242,   70,   70,
       148938  + /*   180 */  1089,  338, 1089,  118,  118,  118,  118,   42,   42,  448,
148790 148939    /*   190 */   951,  951,  953,  116,  116,  116,  116,  115,  115,  114,
148791         - /*   200 */   114,  114,  113,  415,  311,  430,  299,  311,  881,  160,
148792         - /*   210 */   264,  264,  401,  384,  324, 1115, 1116, 1117,  288,  526,
148793         - /*   220 */    96,  159, 1441,  532,  141,  116,  116,  116,  116,  115,
148794         - /*   230 */   115,  114,  114,  114,  113,  415,  219,  119,  120,  110,
       148940  + /*   200 */   114,  114,  113,  414, 1115,  311,  264,  264,   82,  441,
       148941  + /*   210 */   264,  264,  190,  383,  284,   12,  288,  525,  407,  531,
       148942  + /*   220 */    96,  159,  458,  531,  371,  116,  116,  116,  116,  115,
       148943  + /*   230 */   115,  114,  114,  114,  113,  414,  219,  119,  120,  110,
148795 148944    /*   240 */  1136, 1136,  981,  984,  974,  974,  117,  117,  118,  118,
148796         - /*   250 */   118,  118,  115,  115,  114,  114,  114,  113,  415,  288,
148797         - /*   260 */   526,  403,  533,  121,  870,  870,  419,  250,  267,  336,
148798         - /*   270 */   475,  331,  474,  236,  160,  319, 1084,  322, 1465,  329,
148799         - /*   280 */   350,   12,  535,  384,  502, 1115, 1084,  435,  312, 1084,
       148945  + /*   250 */   118,  118,  511, 1477, 1115, 1116, 1117,  113,  414,  534,
       148946  + /*   260 */   528,  528,  528,  121,  534, 1427,  418,  116,  116,  116,
       148947  + /*   270 */   116,  115,  115,  114,  114,  114,  113,  414, 1464,  351,
       148948  + /*   280 */   270,   42,   42,  383,  187, 1115,   70,   70,  533,  433,
148800 148949    /*   290 */   116,  116,  116,  116,  115,  115,  114,  114,  114,  113,
148801         - /*   300 */   415,  535,  836,   42,   42,  138,  426,  119,  120,  110,
       148950  + /*   300 */   414,  534, 1339,  405,  159,  411,  410,  119,  120,  110,
148802 148951    /*   310 */  1136, 1136,  981,  984,  974,  974,  117,  117,  118,  118,
148803         - /*   320 */   118,  118,   70,   70,  288,  526,  412,  411,  480, 1457,
148804         - /*   330 */   335,   79,    6,  473, 1140, 1115, 1116, 1117,  501, 1142,
148805         - /*   340 */   334,  837,  811, 1484,  512, 1164,  534, 1141,  123,  187,
148806         - /*   350 */   289,  384,  134,  448,  434, 1115,   80,  349,  498, 1241,
       148952  + /*   320 */   118,  118,  285,   42,   42,  349,  411,  410,  514,  479,
       148953  + /*   330 */  1458,   79, 1084,    6, 1140, 1115, 1116, 1117,  480, 1142,
       148954  + /*   340 */   501, 1115, 1084,  123,  238, 1084,  136, 1141, 1234, 1234,
       148955  + /*   350 */  1143,  383, 1143, 1115,  167,  426,   80,  447,  512, 1451,
148807 148956    /*   360 */   116,  116,  116,  116,  115,  115,  114,  114,  114,  113,
148808         - /*   370 */   415, 1143, 1115, 1143,  459,  119,  120,  110, 1136, 1136,
       148957  + /*   370 */   414, 1143, 1466, 1143,  350,  119,  120,  110, 1136, 1136,
148809 148958    /*   380 */   981,  984,  974,  974,  117,  117,  118,  118,  118,  118,
148810         - /*   390 */   404,  264,  264,  811, 1463,  506,  368, 1156,  535,  114,
148811         - /*   400 */   114,  114,  113,  415,  532, 1115, 1116, 1117,  231,  518,
148812         - /*   410 */  1500,  472,  469,  468,  175,  497,  422,  219, 1202,   70,
148813         - /*   420 */    70,  467, 1115, 1116, 1117,  176,  201,  200,  116,  116,
148814         - /*   430 */   116,  116,  115,  115,  114,  114,  114,  113,  415,  535,
148815         - /*   440 */  1115,  264,  264,  435,  312, 1115,  273,  419,  384,  513,
148816         - /*   450 */  1450, 1115,  326, 1084,  532,  517,   82, 1084,  167,  388,
148817         - /*   460 */    69,   69, 1115, 1084,  519,  509, 1084, 1084,   12, 1157,
148818         - /*   470 */  1084,  420,  119,  120,  110, 1136, 1136,  981,  984,  974,
148819         - /*   480 */   974,  117,  117,  118,  118,  118,  118,  258,  258,  535,
148820         - /*   490 */  1115, 1116, 1117, 1045,  535, 1115, 1116, 1117, 1323,  535,
148821         - /*   500 */   532, 1115, 1116, 1117,  296,  483, 1211,  818, 1046,  448,
148822         - /*   510 */    70,   70, 1115, 1116, 1117,   50,   50,  448,  356,  500,
148823         - /*   520 */    70,   70,  207, 1047,   32,  116,  116,  116,  116,  115,
148824         - /*   530 */   115,  114,  114,  114,  113,  415,  453,  264,  264, 1115,
148825         - /*   540 */   450,  449,  961,  508,  856,  384,  517,    5,  900,  822,
148826         - /*   550 */   532,  484,  181, 1115,  857,  516,  517,  818,  952,  507,
148827         - /*   560 */     3, 1115,  951, 1231, 1231,  482,  398, 1115, 1095,  119,
       148959  + /*   390 */   402, 1115, 1116, 1117,  500,  534,  250,  267,  336,  474,
       148960  + /*   400 */   331,  473,  236, 1115, 1116, 1117,  231, 1115,  329,  471,
       148961  + /*   410 */   468,  467,  509, 1458, 1464,  505,    6,   70,   70,  466,
       148962  + /*   420 */   181,  380,  379,  534,  971,  971,  982,  985,  116,  116,
       148963  + /*   430 */   116,  116,  115,  115,  114,  114,  114,  113,  414, 1115,
       148964  + /*   440 */   412,  412,  412,  496, 1115,   69,   69,  235,  383,  288,
       148965  + /*   450 */   525,  273,  326,  516,  337,  458, 1084, 1115, 1116, 1117,
       148966  + /*   460 */  1232, 1232,  492,  160,  508,  441, 1084, 1067, 1531, 1084,
       148967  + /*   470 */   207, 1531,  119,  120,  110, 1136, 1136,  981,  984,  974,
       148968  + /*   480 */   974,  117,  117,  118,  118,  118,  118,  881,  534, 1115,
       148969  + /*   490 */  1116, 1117,  975,  534, 1115, 1116, 1117,  534,  421,  534,
       148970  + /*   500 */   141,  534,  176,  356,  517, 1119,   32,  511,  482,  388,
       148971  + /*   510 */    70,   70,  818,  288,  525,   70,   70,  441,  499,   50,
       148972  + /*   520 */    50,   70,   70,   70,   70,  116,  116,  116,  116,  115,
       148973  + /*   530 */   115,  114,  114,  114,  113,  414,  274,  264,  264, 1115,
       148974  + /*   540 */  1065,  264,  264, 1115,  355,  383,  409,  961, 1439,  822,
       148975  + /*   550 */   531,  516,  190,  419,  531,  483, 1119,  516,  337,  516,
       148976  + /*   560 */   518, 1115,  818,  952,  382,  458,  515,  951,  481,  119,
148828 148977    /*   570 */   120,  110, 1136, 1136,  981,  984,  974,  974,  117,  117,
148829         - /*   580 */   118,  118,  118,  118, 1115,  535,  238, 1115, 1391, 1115,
148830         - /*   590 */  1116, 1117,  159,  951,  951,  953,  231, 1115,  259,  472,
148831         - /*   600 */   469,  468,  310, 1115, 1116, 1117,   13,   13,  297,  467,
148832         - /*   610 */   276, 1115, 1116, 1117,  412,  411, 1095, 1115, 1116, 1117,
148833         - /*   620 */   395,  355,  116,  116,  116,  116,  115,  115,  114,  114,
148834         - /*   630 */   114,  113,  415,  208, 1115, 1116, 1117, 1115, 1116, 1117,
148835         - /*   640 */   264,  264,  384,  337,  902,  393,  815, 1115, 1116, 1117,
148836         - /*   650 */   413,  413,  413,  532,  112,  109,  209,  309,  900, 1143,
148837         - /*   660 */   535, 1143,  535,  393,  901, 1210,  119,  120,  110, 1136,
       148978  + /*   580 */   118,  118,  118,  118, 1338,  278, 1045,  278,  275, 1115,
       148979  + /*   590 */  1116, 1117,  259, 1115, 1116, 1117,  534,    5,  951,  951,
       148980  + /*   600 */   953, 1046,  231,    3,  143,  471,  468,  467, 1391,  463,
       148981  + /*   610 */  1115, 1115, 1116, 1117, 1452,  466, 1047,  836,   70,   70,
       148982  + /*   620 */   480,  534,  116,  116,  116,  116,  115,  115,  114,  114,
       148983  + /*   630 */   114,  113,  414,   95, 1115,  287,  235,  856,  902,  420,
       148984  + /*   640 */  1115,  534,  383,   13,   13,  381,  815,  857,  472,  112,
       148985  + /*   650 */   109,  209, 1115,  337,  413,  309,  837,  394, 1436,  534,
       148986  + /*   660 */  1115, 1116, 1117,   54,   54,  291,  119,  120,  110, 1136,
148838 148987    /*   670 */  1136,  981,  984,  974,  974,  117,  117,  118,  118,  118,
148839         - /*   680 */   118,   13,   13,   13,   13,  265,  265,  535,  143,  264,
148840         - /*   690 */   264,  288,  526,  535, 1119,  400,  535,  402,  532,  510,
148841         - /*   700 */  1457,  512,  532,    6,  113,  415, 1067, 1530,   70,   70,
148842         - /*   710 */  1530,  535,  271,  535,   70,   70,  535,   13,   13,  116,
148843         - /*   720 */   116,  116,  116,  115,  115,  114,  114,  114,  113,  415,
148844         - /*   730 */   272,  277,   13,   13,   13,   13,  535,   13,   13,  384,
148845         - /*   740 */   535,  304,  425, 1100,  284, 1119,  184,  801,  185,  338,
148846         - /*   750 */   285,  514, 1532,  369, 1239, 1438, 1182,   70,   70,  425,
148847         - /*   760 */   424,   70,   70,  119,  120,  110, 1136, 1136,  981,  984,
148848         - /*   770 */   974,  974,  117,  117,  118,  118,  118,  118,  190, 1065,
148849         - /*   780 */  1067, 1531,  442,  107, 1531,  408,  264,  264,  264,  264,
148850         - /*   790 */   383, 1396,  261,  410,   95,  900,  485,  414,  421,  532,
148851         - /*   800 */  1045,  532,  301, 1133,  303,  488,  433, 1451, 1396, 1398,
148852         - /*   810 */   278,  535,  278,  520, 1435, 1046,  116,  116,  116,  116,
148853         - /*   820 */   115,  115,  114,  114,  114,  113,  415,  425,  264,  264,
148854         - /*   830 */  1047,  190,   54,   54,  535,  291,  384,  264,  264,  362,
148855         - /*   840 */   962,  532, 1004,  376, 1084,  264,  264, 1029, 1029,  456,
148856         - /*   850 */   532,  523,  270, 1065, 1084,   55,   55, 1084,  532,  442,
       148988  + /*   680 */   118,   13,   13, 1084, 1115, 1116, 1117,  901,  264,  264,
       148989  + /*   690 */  1115, 1116, 1117, 1084,  292,  399, 1084,  800,  388,  140,
       148990  + /*   700 */   295,  531, 1115, 1116, 1117,  403,  447,  532,  534,  870,
       148991  + /*   710 */   870,  534, 1240,  534,  329,  534, 1185,  389,  534,  116,
       148992  + /*   720 */   116,  116,  116,  115,  115,  114,  114,  114,  113,  414,
       148993  + /*   730 */    13,   13, 1024,   13,   13,   13,   13,   13,   13,  383,
       148994  + /*   740 */    13,   13,  424, 1100,  401,  264,  264,  277,  160,  184,
       148995  + /*   750 */  1182,  185, 1533,  369,  513,  484,  432,  487,  531,  424,
       148996  + /*   760 */   423, 1397,  941,  119,  120,  110, 1136, 1136,  981,  984,
       148997  + /*   770 */   974,  974,  117,  117,  118,  118,  118,  118, 1397, 1399,
       148998  + /*   780 */   425,  519,  392,  264,  264, 1029, 1029,  455,  264,  264,
       148999  + /*   790 */   264,  264, 1004,  304,  261, 1278,  531,  900,  288,  525,
       149000  + /*   800 */   310,  531,  493,  531, 1067, 1532,  458,  387, 1532,  311,
       149001  + /*   810 */   429,  299,  534,  107,  264,  264,  116,  116,  116,  116,
       149002  + /*   820 */   115,  115,  114,  114,  114,  113,  414,  531,  424, 1384,
       149003  + /*   830 */   507,  258,  258, 1246,   55,   55,  383, 1277,  265,  265,
       149004  + /*   840 */   962,  324,  434,  312,  531,  531,  506, 1397, 1026, 1241,
       149005  + /*   850 */   298,  531, 1026,  445,  301, 1095,  303,  534,  368, 1156,
148857 149006    /*   860 */   119,  120,  110, 1136, 1136,  981,  984,  974,  974,  117,
148858         - /*   870 */   117,  118,  118,  118,  118,  535, 1396,  190,  302, 1383,
148859         - /*   880 */   208,  535,  789,  790,  791,  535,  515,  535, 1323,  371,
148860         - /*   890 */   337,  234,  233,  232,  459,  515,   15,   15,  459,  477,
148861         - /*   900 */   459,  459,   44,   44,  136,  900,   56,   56,   57,   57,
148862         - /*   910 */  1185,  390,  197,  116,  116,  116,  116,  115,  115,  114,
148863         - /*   920 */   114,  114,  113,  415,  535,  876,  535,  442,  535,  274,
148864         - /*   930 */   875, 1323,  357,  384,  353,  140, 1426,  946, 1455, 1323,
148865         - /*   940 */  1390,    6, 1240, 1236,  292,   58,   58,   59,   59,   60,
148866         - /*   950 */    60,  535, 1456,  384,  535,    6,  399,  119,  120,  110,
       149007  + /*   870 */   117,  118,  118,  118,  118, 1045,  534, 1065,  534,   15,
       149008  + /*   880 */    15, 1084,  208, 1324,  453,  452,  534, 1324,  534,  449,
       149009  + /*   890 */  1046, 1084,  494,  458, 1084,  234,  233,  232,   44,   44,
       149010  + /*   900 */    56,   56,  319, 1095,  322, 1047,  534,  900,   57,   57,
       149011  + /*   910 */    58,   58,  534,  116,  116,  116,  116,  115,  115,  114,
       149012  + /*   920 */   114,  114,  113,  414,  534,  514,  522,  534,   59,   59,
       149013  + /*   930 */   302, 1157,  534,  383,   60,   60, 1237,  946,  788,  789,
       149014  + /*   940 */   790, 1459, 1456,  446,    6,    6,   61,   61, 1212,   45,
       149015  + /*   950 */    45,  534,  396,  383,   46,   46,  397,  119,  120,  110,
148867 149016    /*   960 */  1136, 1136,  981,  984,  974,  974,  117,  117,  118,  118,
148868         - /*   970 */   118,  118,   61,   61,  535,   45,   45,  119,  120,  110,
       149017  + /*   970 */   118,  118,  428,   48,   48,  534,  392,  119,  120,  110,
148869 149018    /*   980 */  1136, 1136,  981,  984,  974,  974,  117,  117,  118,  118,
148870         - /*   990 */   118,  118, 1477,  479,  202,   46,   46,  275,   95,  455,
148871         - /*  1000 */   535,  212,  535,  337,  535, 1454,  535,  409,    6,  242,
       149019  + /*   990 */   118,  118, 1324,  368, 1066,  447,  825,   49,   49,  534,
       149020  + /*  1000 */   458,  357,  534,  353,  534,  138,  534,  337, 1478,  478,
148872 149021    /*  1010 */   116,  116,  116,  116,  115,  115,  114,  114,  114,  113,
148873         - /*  1020 */   415,   48,   48,   49,   49,   62,   62,   63,   63,  535,
       149022  + /*  1020 */   414,   62,   62,  392,   63,   63,   64,   64,   14,   14,
148874 149023    /*  1030 */   116,  116,  116,  116,  115,  115,  114,  114,  114,  113,
148875         - /*  1040 */   415,  535,  459,  535, 1134,  535, 1151,  535,  142,  535,
148876         - /*  1050 */    64,   64,  535, 1338,  535,  494,  535,  446,  535, 1264,
148877         - /*  1060 */   535, 1337,   14,   14,   65,   65,  125,  125,   66,   66,
148878         - /*  1070 */    51,   51,  535,   67,   67,   68,   68,   52,   52,  147,
148879         - /*  1080 */   147,  148,  148, 1453,  317,   98,    6,  535, 1245,  481,
148880         - /*  1090 */   535,  827,  535,   75,   75, 1134,  102,  481,  100,  535,
148881         - /*  1100 */   532,  535,  368, 1066, 1503,  384,  535,  845,   53,   53,
148882         - /*  1110 */    93,   71,   71,  126,  126,  295,  528,  390,  288,  526,
148883         - /*  1120 */    72,   72,  127,  127,  139,  384,   38,  128,  128,  119,
       149024  + /*  1040 */   414,  534,  810,  317,  271,  534, 1457,  825,  534,    6,
       149025  + /*  1050 */   534, 1324,  534,  142,  534, 1442,  534,  212,  534, 1324,
       149026  + /*  1060 */   534,  398,  305,   65,   65,  534, 1157,  125,  125,  476,
       149027  + /*  1070 */    66,   66,   51,   51,   67,   67,   68,   68,   52,   52,
       149028  + /*  1080 */   147,  147,  148,  148,  534,   98,  534,   75,   75,  276,
       149029  + /*  1090 */   534,  272,  534,  810,  534,  876,  534,  527,  389,  534,
       149030  + /*  1100 */   875,  534, 1151,  202,  534,  383,   53,   53,   71,   71,
       149031  + /*  1110 */   288,  525,  126,  126,   72,   72,  127,  127,  128,  128,
       149032  + /*  1120 */   454,  124,  124,  146,  146,  383,  145,  145,  408,  119,
148884 149033    /*  1130 */   120,  110, 1136, 1136,  981,  984,  974,  974,  117,  117,
148885         - /*  1140 */   118,  118,  118,  118,  535,  495,  535,  447,  535,  119,
       149034  + /*  1140 */   118,  118,  118,  118,  534,  900,  534,   95,  534,  119,
148886 149035    /*  1150 */   120,  110, 1136, 1136,  981,  984,  974,  974,  117,  117,
148887         - /*  1160 */   118,  118,  118,  118,  235,  124,  124,  146,  146,  145,
148888         - /*  1170 */   145,  287,  535, 1277,  535, 1157,  535,  391,  161,  263,
148889         - /*  1180 */   206,  381,  116,  116,  116,  116,  115,  115,  114,  114,
148890         - /*  1190 */   114,  113,  415,  132,  132,  131,  131,  129,  129,  535,
148891         - /*  1200 */    30,  535,  116,  116,  116,  116,  115,  115,  114,  114,
148892         - /*  1210 */   114,  113,  415,  535,  216, 1062, 1276,  535,  370,  535,
148893         - /*  1220 */   130,  130,   74,   74,  535,  915,  389,  876,   17,  437,
148894         - /*  1230 */   429,   31,  875,  916,   76,   76,  266,  101,   73,   73,
148895         - /*  1240 */    43,   43,  835,  834,  308,   47,   47,   95,  825,  943,
148896         - /*  1250 */   441,  938,  241,  241,  305,  443,  313,  384,  241,   95,
148897         - /*  1260 */   842,  843,  193,  465, 1209,  327,  237,  436,   95, 1011,
148898         - /*  1270 */  1007,  909,  873,  237,  241,  107, 1023,  384, 1023,  955,
148899         - /*  1280 */  1415,  119,  120,  110, 1136, 1136,  981,  984,  974,  974,
148900         - /*  1290 */   117,  117,  118,  118,  118,  118, 1022,  809, 1022,  825,
       149036  + /*  1160 */   118,  118,  118,  118,  390,  161,  132,  132,  131,  131,
       149037  + /*  1170 */   129,  129,  534,  915,  534, 1455,  534, 1454,    6, 1416,
       149038  + /*  1180 */     6,  916,  116,  116,  116,  116,  115,  115,  114,  114,
       149039  + /*  1190 */   114,  113,  414, 1415,  130,  130,   74,   74,   76,   76,
       149040  + /*  1200 */   534,   30,  116,  116,  116,  116,  115,  115,  114,  114,
       149041  + /*  1210 */   114,  113,  414,  534,  263,  206,  534, 1133, 1504,   93,
       149042  + /*  1220 */   876,  845,   73,   73,  102,  875,  100,  139,   17,   38,
       149043  + /*  1230 */   208, 1062,   31,  450,  370,   43,   43,  101,   47,   47,
       149044  + /*  1240 */   827,  216,  436,  308,  943,  440,   95,  241,  241,  442,
       149045  + /*  1250 */   313,  464,  241,   95,  237,  900,  327,  383,  266,   95,
       149046  + /*  1260 */   835,  834,  193,  335,  938,  314, 1011,  435,  842,  843,
       149047  + /*  1270 */   955, 1007,  909,  334,  237,  241,  873,  383, 1023,  107,
       149048  + /*  1280 */  1023,  119,  120,  110, 1136, 1136,  981,  984,  974,  974,
       149049  + /*  1290 */   117,  117,  118,  118,  118,  118, 1022,  808, 1022, 1274,
148901 149050    /*  1300 */   137,  119,  108,  110, 1136, 1136,  981,  984,  974,  974,
148902         - /*  1310 */   117,  117,  118,  118,  118,  118,  874, 1414,  451,  107,
148903         - /*  1320 */  1011,  314, 1273,  318,  218,  321,  323,  325, 1224, 1208,
148904         - /*  1330 */   955,  330,  339,  340,  116,  116,  116,  116,  115,  115,
148905         - /*  1340 */   114,  114,  114,  113,  415, 1285, 1322, 1260, 1493, 1470,
148906         - /*  1350 */  1271,  283,  521, 1328,  116,  116,  116,  116,  115,  115,
148907         - /*  1360 */   114,  114,  114,  113,  415, 1191, 1184, 1173, 1172, 1174,
148908         - /*  1370 */   522, 1487,  211,  460,  384,  256,  199,  367, 1257,  342,
148909         - /*  1380 */   195,  470,  307,  344,   11,  333,  525,  445, 1307, 1315,
148910         - /*  1390 */   375,  203, 1207, 1151,  384,  346, 1387,  188,  360,  120,
       149051  + /*  1310 */   117,  117,  118,  118,  118,  118,  874, 1011,  318,  107,
       149052  + /*  1320 */   321,  955,  323,  325, 1225, 1211,  197, 1210, 1209,  330,
       149053  + /*  1330 */   339, 1265,  340,  283,  116,  116,  116,  116,  115,  115,
       149054  + /*  1340 */   114,  114,  114,  113,  414, 1286, 1323, 1261, 1471, 1272,
       149055  + /*  1350 */   520,  218,  521, 1329,  116,  116,  116,  116,  115,  115,
       149056  + /*  1360 */   114,  114,  114,  113,  414, 1192, 1184, 1173, 1172, 1174,
       149057  + /*  1370 */  1494, 1488,  459,  256,  383, 1258,  342,  199,  367,  344,
       149058  + /*  1380 */   211,  195,  307,  444,   11,  346,  469,  333, 1308, 1316,
       149059  + /*  1390 */   375,  427,  203,  360,  383, 1388,  188, 1387,  189,  120,
148911 149060    /*  1400 */   110, 1136, 1136,  981,  984,  974,  974,  117,  117,  118,
148912         - /*  1410 */   118,  118,  118, 1386,  428, 1490,  245,  300,  348, 1148,
       149061  + /*  1410 */   118,  118,  118, 1208, 1151,  300,  348, 1491,  245, 1148,
148913 149062    /*  1420 */   110, 1136, 1136,  981,  984,  974,  974,  117,  117,  118,
148914         - /*  1430 */   118,  118,  118,  189,  198, 1434, 1432,   78,   81,  163,
148915         - /*  1440 */    82,  392,  439, 1392,  173,  105,  527,   35,    4,  157,
148916         - /*  1450 */  1312,  116,  116,  116,  116,  115,  115,  114,  114,  114,
148917         - /*  1460 */   113,  415,  530,  165,   93, 1304,  431,  432,  168,  463,
148918         - /*  1470 */   221,  116,  116,  116,  116,  115,  115,  114,  114,  114,
148919         - /*  1480 */   113,  415,  169,  452,  170,  416,  171,  374,  372,  438,
148920         - /*  1490 */    36, 1318,  177,  225, 1381,   87,  458,  524, 1403,  316,
148921         - /*  1500 */   257,  105,  527,  227,    4,  182,  461,  160,  320,  228,
148922         - /*  1510 */   377, 1175,  476,  229, 1227, 1226,  405, 1225,  530, 1218,
148923         - /*  1520 */   961,  378, 1199, 1198,  827,  332,  103,  103, 1197,  407,
148924         - /*  1530 */     8, 1217, 1502,  104,  487,  416,  537,  536,  281,  282,
148925         - /*  1540 */   951,  416,  490, 1268,  496,   92,  341,  243, 1269,  343,
148926         - /*  1550 */   244, 1267,  122,  524,  345, 1461,  515,  288,  526,   10,
148927         - /*  1560 */   354, 1266, 1460,  352,  504, 1250,   99, 1367,   94,  503,
148928         - /*  1570 */   499,  951,  951,  953,  954,   27,  961,  347, 1249,  194,
148929         - /*  1580 */   251,  358,  103,  103,  359, 1181,   34,  538, 1110,  104,
148930         - /*  1590 */   255,  416,  537,  536,  286,  252,  951,  254,  539,  149,
148931         - /*  1600 */  1170, 1419, 1165, 1420, 1418,  150, 1417,  135,  279,  785,
148932         - /*  1610 */   151,  417, 1195,  196,  290,  210,  386, 1194,  269,  387,
148933         - /*  1620 */   162, 1021,  133,   77, 1192, 1019,  935,  951,  951,  953,
148934         - /*  1630 */   954,   27, 1479, 1104,  418,  164,  153,  268,  217,  166,
148935         - /*  1640 */   859,  306,  366,  366,  365,  253,  363,  220, 1035,  798,
148936         - /*  1650 */   172,  939,  105,  527,  155,    4,  394,  174,  396,  156,
148937         - /*  1660 */    83, 1038,  213,   84,  294,   85,   86,  223,  222,  530,
148938         - /*  1670 */  1034,  144,  293,   18,  224,  315,  241, 1027, 1145,  178,
148939         - /*  1680 */   457,  226,  179,   37,  800,  334,  462,  230,  328,  466,
148940         - /*  1690 */   180,  471,  416,   88,   19,   20,   89,  280,  838,  158,
148941         - /*  1700 */   191,   90,  215,  478,  524, 1097,  204,  192,  987,   91,
148942         - /*  1710 */   152, 1070,   39,  154, 1071,  504,  486,   40,  489,  205,
148943         - /*  1720 */   505,  260,  105,  527,  214,    4,  908,  961,  262,  183,
148944         - /*  1730 */   240,   21,  903,  103,  103,  107,   22, 1086,   23,  530,
148945         - /*  1740 */   104, 1088,  416,  537,  536,   24, 1093,  951,   25, 1074,
148946         - /*  1750 */  1090, 1094,    7,   33,  511,  186,   26, 1002,  385,   95,
148947         - /*  1760 */   988,  986,  416,  288,  526,  990, 1044,  246, 1043,  247,
148948         - /*  1770 */   991,   28,   41,  106,  524,  956,  810,   29,  951,  951,
148949         - /*  1780 */   953,  954,   27,  531,  361,  504,  423,  248,  869,  249,
148950         - /*  1790 */   503, 1495,  364, 1105, 1161, 1494, 1161,  961, 1161, 1161,
       149063  + /*  1430 */   118,  118,  118,  198, 1435, 1433,  524,   78,  391,  163,
       149064  + /*  1440 */    82, 1393,  438,  173,   81,  105,  526, 1313,    4,   35,
       149065  + /*  1450 */   157,  116,  116,  116,  116,  115,  115,  114,  114,  114,
       149066  + /*  1460 */   113,  414,  529,  165,   93,  430, 1305,  168,  169,  431,
       149067  + /*  1470 */   462,  116,  116,  116,  116,  115,  115,  114,  114,  114,
       149068  + /*  1480 */   113,  414,  170,  171,  221,  415,  372,  437, 1319,  177,
       149069  + /*  1490 */   374,   36,  451,  225, 1382,   87,  457,  523,  257, 1404,
       149070  + /*  1500 */   316,  105,  526,  227,    4,  182,  460,  160,  320,  228,
       149071  + /*  1510 */   377, 1175,  475,  229, 1228,  404, 1227, 1226,  529,  827,
       149072  + /*  1520 */   961, 1219,  378, 1200, 1199,  406,  103,  103, 1218,  332,
       149073  + /*  1530 */     8,  281, 1198,  104, 1503,  415,  536,  535,  486,  282,
       149074  + /*  1540 */   951,  415,  489,  495,   92,  244, 1269,  341,  243,  122,
       149075  + /*  1550 */  1270,  343,  514,  523, 1268, 1462,   10,  288,  525,  345,
       149076  + /*  1560 */  1461,  354,   99,  352,  503,   94, 1267,  347, 1251,  502,
       149077  + /*  1570 */   498,  951,  951,  953,  954,   27,  961, 1250,  194,  358,
       149078  + /*  1580 */   251,  359,  103,  103, 1181,   34,  537, 1110,  252,  104,
       149079  + /*  1590 */   254,  415,  536,  535,  255, 1368,  951, 1420,  286,  538,
       149080  + /*  1600 */  1170, 1165, 1421,  135, 1419, 1418,  149,  150,  279,  784,
       149081  + /*  1610 */   416,  196,  151,  290,  210,  200,   77,  385,  269,  386,
       149082  + /*  1620 */   133,  162,  935, 1021,  201, 1019,  153,  951,  951,  953,
       149083  + /*  1630 */   954,   27, 1480, 1104,  417,  164,  217,  268,  859,  166,
       149084  + /*  1640 */   306, 1035,  366,  366,  365,  253,  363,  220,  172,  797,
       149085  + /*  1650 */   939,  155,  105,  526,  393,    4,  395,  174,  156,   83,
       149086  + /*  1660 */  1038,   84,  213,   85,  294,  222,   86,  223, 1034,  529,
       149087  + /*  1670 */   144,   18,  293,  224,  315,  456,  241, 1027, 1145,  178,
       149088  + /*  1680 */   226,  179,   37,  799,  334,  461,  230,  465,  470,  838,
       149089  + /*  1690 */   180,   88,  415,   19,  280,  328,   20,   89,   90,  158,
       149090  + /*  1700 */   191,  477,  215, 1097,  523,  204,  192,  987,   91, 1070,
       149091  + /*  1710 */   152,   39,  485,  154, 1071,  503,   40,  488,  205,  260,
       149092  + /*  1720 */   504,  262,  105,  526,  214,    4,  908,  961,  183,  240,
       149093  + /*  1730 */   903,  107, 1086,  103,  103,   21,   22, 1088,   23,  529,
       149094  + /*  1740 */   104,   24,  415,  536,  535, 1090, 1093,  951, 1094,   25,
       149095  + /*  1750 */  1074,   33,    7,   26,  510, 1002,  247,  186,  384,   95,
       149096  + /*  1760 */   988,  986,  415,  288,  525,  990, 1044,  246, 1043,  991,
       149097  + /*  1770 */    28,   41,  530,  956,  523,  809,  106,   29,  951,  951,
       149098  + /*  1780 */   953,  954,   27,  869,  361,  503,  422,  248,  364, 1105,
       149099  + /*  1790 */   502,  249, 1161, 1496, 1495, 1161, 1161,  961, 1161, 1161,
148951 149100    /*  1800 */  1161, 1161, 1161,  103,  103, 1161, 1161, 1161, 1161, 1161,
148952         - /*  1810 */   104, 1161,  416,  537,  536, 1104,  418,  951, 1161,  268,
       149101  + /*  1810 */   104, 1161,  415,  536,  535, 1104,  417,  951, 1161,  268,
148953 149102    /*  1820 */  1161, 1161, 1161, 1161,  366,  366,  365,  253,  363, 1161,
148954         - /*  1830 */  1161,  798, 1161, 1161, 1161, 1161,  105,  527, 1161,    4,
       149103  + /*  1830 */  1161,  797, 1161, 1161, 1161, 1161,  105,  526, 1161,    4,
148955 149104    /*  1840 */  1161, 1161, 1161, 1161,  213, 1161,  294, 1161,  951,  951,
148956         - /*  1850 */   953,  954,   27,  530,  293, 1161, 1161, 1161, 1161, 1161,
       149105  + /*  1850 */   953,  954,   27,  529,  293, 1161, 1161, 1161, 1161, 1161,
148957 149106    /*  1860 */  1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
148958         - /*  1870 */  1161, 1161, 1161, 1161, 1161, 1161,  416, 1161, 1161, 1161,
148959         - /*  1880 */  1161, 1161, 1161, 1161,  215, 1161, 1161, 1161,  524, 1161,
148960         - /*  1890 */  1161, 1161,  152, 1161, 1161,  154,  105,  527, 1161,    4,
       149107  + /*  1870 */  1161, 1161, 1161, 1161, 1161, 1161,  415, 1161, 1161, 1161,
       149108  + /*  1880 */  1161, 1161, 1161, 1161,  215, 1161, 1161, 1161,  523, 1161,
       149109  + /*  1890 */  1161, 1161,  152, 1161, 1161,  154,  105,  526, 1161,    4,
148961 149110    /*  1900 */  1161, 1161, 1161, 1161, 1161, 1161,  214, 1161, 1161, 1161,
148962         - /*  1910 */  1161,  961, 1161,  530, 1161, 1161, 1161,  103,  103,  880,
148963         - /*  1920 */  1161, 1161, 1161, 1161,  104, 1161,  416,  537,  536, 1161,
148964         - /*  1930 */  1161,  951, 1161, 1161, 1161, 1161,  416, 1161, 1161, 1161,
148965         - /*  1940 */   385, 1161, 1161, 1161, 1161,  288,  526, 1161,  524, 1161,
148966         - /*  1950 */  1161, 1161, 1161, 1161, 1161, 1161,   97,  527, 1161,    4,
148967         - /*  1960 */  1161, 1161,  951,  951,  953,  954,   27, 1161,  423, 1161,
148968         - /*  1970 */  1161,  961, 1161,  530, 1161, 1161, 1161,  103,  103, 1161,
148969         - /*  1980 */  1161, 1161, 1161, 1161,  104, 1161,  416,  537,  536, 1161,
148970         - /*  1990 */  1161,  951,  268, 1161, 1161, 1161,  416,  366,  366,  365,
148971         - /*  2000 */   253,  363, 1161, 1161,  798, 1161, 1161, 1161,  524, 1161,
       149111  + /*  1910 */  1161,  961, 1161,  529, 1161, 1161, 1161,  103,  103,  880,
       149112  + /*  1920 */  1161, 1161, 1161, 1161,  104, 1161,  415,  536,  535, 1161,
       149113  + /*  1930 */  1161,  951, 1161, 1161, 1161, 1161,  415, 1161, 1161, 1161,
       149114  + /*  1940 */   384, 1161, 1161, 1161, 1161,  288,  525, 1161,  523, 1161,
       149115  + /*  1950 */  1161, 1161, 1161, 1161, 1161, 1161,   97,  526, 1161,    4,
       149116  + /*  1960 */  1161, 1161,  951,  951,  953,  954,   27, 1161,  422, 1161,
       149117  + /*  1970 */  1161,  961, 1161,  529, 1161, 1161, 1161,  103,  103, 1161,
       149118  + /*  1980 */  1161, 1161, 1161, 1161,  104, 1161,  415,  536,  535, 1161,
       149119  + /*  1990 */  1161,  951,  268, 1161, 1161, 1161,  415,  366,  366,  365,
       149120  + /*  2000 */   253,  363, 1161, 1161,  797, 1161, 1161, 1161,  523, 1161,
148972 149121    /*  2010 */  1161, 1161, 1161, 1161, 1161, 1161, 1161,  213, 1161,  294,
148973 149122    /*  2020 */  1161, 1161,  951,  951,  953,  954,   27,  293, 1161, 1161,
148974 149123    /*  2030 */  1161,  961, 1161, 1161, 1161, 1161, 1161,  103,  103, 1161,
148975         - /*  2040 */  1161, 1161, 1161, 1161,  104, 1161,  416,  537,  536, 1161,
       149124  + /*  2040 */  1161, 1161, 1161, 1161,  104, 1161,  415,  536,  535, 1161,
148976 149125    /*  2050 */  1161,  951, 1161, 1161, 1161, 1161, 1161,  215, 1161, 1161,
148977 149126    /*  2060 */  1161, 1161, 1161, 1161, 1161,  152, 1161, 1161,  154, 1161,
148978 149127    /*  2070 */  1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,  214,
148979 149128    /*  2080 */  1161, 1161,  951,  951,  953,  954,   27, 1161, 1161, 1161,
148980 149129    /*  2090 */  1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
148981 149130    /*  2100 */  1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
148982         - /*  2110 */  1161, 1161, 1161,  385, 1161, 1161, 1161, 1161,  288,  526,
       149131  + /*  2110 */  1161, 1161, 1161,  384, 1161, 1161, 1161, 1161,  288,  525,
148983 149132    /*  2120 */  1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
148984 149133    /*  2130 */  1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161, 1161,
148985         - /*  2140 */  1161,  423,
       149134  + /*  2140 */  1161,  422,
148986 149135   };
148987 149136   static const YYCODETYPE yy_lookahead[] = {
148988         - /*     0 */   184,  184,  259,  260,  261,  259,  260,  261,  176,  177,
148989         - /*    10 */   178,  179,  180,  181,  184,  208,  212,  213,  186,   19,
148990         - /*    20 */   188,  205,  206,  280,  205,  221,   22,  195,   24,  195,
148991         - /*    30 */   208,   31,  195,  205,   29,  205,  206,  255,   33,   39,
148992         - /*    40 */   200,  201,  202,   43,   44,   45,   46,   47,   48,   49,
148993         - /*    50 */    50,   51,   52,   53,   54,   55,   56,   57,  205,  227,
148994         - /*    60 */   228,  227,  228,   59,  227,  228,  259,  260,  261,  252,
148995         - /*    70 */    65,  241,  240,  184,  240,  223,  224,  240,  244,  245,
148996         - /*    80 */   250,  259,  260,  261,   19,  253,   54,   55,   56,   57,
148997         - /*    90 */    58,  184,  255,  184,  205,  206,   96,   97,   98,   99,
148998         - /*   100 */   100,  101,  102,  103,  104,  105,  106,   46,   47,   48,
148999         - /*   110 */    49,   46,  296,  297,  110,  283,   19,   96,   97,   98,
149000         - /*   120 */    99,  100,  101,  102,  103,  104,  105,  106,   96,   97,
       149137  + /*     0 */   260,  261,  262,  260,  261,  262,  176,  177,  178,  179,
       149138  + /*    10 */   180,  181,  184,  206,  209,  184,  186,  206,  188,   19,
       149139  + /*    20 */   179,  281,  181,  213,  214,  195,  206,  186,  195,  188,
       149140  + /*    30 */   195,   31,  222,  184,  206,  207,  195,  206,  207,   39,
       149141  + /*    40 */    24,  209,  184,   43,   44,   45,   46,   47,   48,   49,
       149142  + /*    50 */    50,   51,   52,   53,   54,   55,   56,   57,  228,  229,
       149143  + /*    60 */   184,  228,  229,  228,  229,  260,  261,  262,  192,  228,
       149144  + /*    70 */   229,  241,  196,  242,  241,   59,  241,  205,  245,  246,
       149145  + /*    80 */   184,   22,  241,   24,  254,  213,   54,   55,   56,   57,
       149146  + /*    90 */    58,  256,  260,  261,  262,  254,   96,   97,   98,   99,
       149147  + /*   100 */   100,  101,  102,  103,  104,  105,  106,  100,  101,  102,
       149148  + /*   110 */   103,  104,  105,  106,  284,  203,   19,  221,   59,  102,
       149149  + /*   120 */   103,  104,  105,  106,   59,  284,  110,  269,   96,   97,
149001 149150    /*   130 */    98,   99,  100,  101,  102,  103,  104,  105,  106,   94,
149002 149151    /*   140 */    43,   44,   45,   46,   47,   48,   49,   50,   51,   52,
149003         - /*   150 */    53,   54,   55,   56,   57,  110,  106,   73,  251,  114,
149004         - /*   160 */    73,  178,  179,  180,  181,   59,  184,  292,   81,  186,
149005         - /*   170 */   295,  188,  218,  108,   19,  114,  184,   11,  195,  184,
149006         - /*   180 */    83,  184,   85,   54,   55,   56,   57,  205,  206,  124,
       149152  + /*   150 */    53,   54,   55,   56,   57,  110,  184,  106,   73,  114,
       149153  + /*   160 */   178,  179,  180,  181,  219,  184,   81,   22,  186,  110,
       149154  + /*   170 */   188,  121,  122,  195,  109,  110,  111,  195,  206,  207,
       149155  + /*   180 */    83,  184,   85,   54,   55,   56,   57,  206,  207,  277,
149007 149156    /*   190 */   145,  146,  147,   96,   97,   98,   99,  100,  101,  102,
149008         - /*   200 */   103,  104,  105,  106,  120,  121,  122,  120,  102,   81,
149009         - /*   210 */   227,  228,  220,   19,   16,  109,  110,  111,  131,  132,
149010         - /*   220 */    26,  184,  184,  240,  229,   96,   97,   98,   99,  100,
149011         - /*   230 */   101,  102,  103,  104,  105,  106,  253,   43,   44,   45,
       149157  + /*   200 */   103,  104,  105,  106,   59,  120,  228,  229,  143,  184,
       149158  + /*   210 */   228,  229,  184,   19,  242,  203,  131,  132,  221,  241,
       149159  + /*   220 */    26,  184,  184,  241,  196,   96,   97,   98,   99,  100,
       149160  + /*   230 */   101,  102,  103,  104,  105,  106,  254,   43,   44,   45,
149012 149161    /*   240 */    46,   47,   48,   49,   50,   51,   52,   53,   54,   55,
149013         - /*   250 */    56,   57,  100,  101,  102,  103,  104,  105,  106,  131,
149014         - /*   260 */   132,  106,  127,   69,  129,  130,  283,  112,  113,  114,
149015         - /*   270 */   115,  116,  117,  118,   81,   77,   76,   79,  296,  124,
149016         - /*   280 */   298,  203,  184,   19,   84,   59,   86,  121,  122,   89,
       149162  + /*   250 */    56,   57,  184,  184,  109,  110,  111,  105,  106,  184,
       149163  + /*   260 */   200,  201,  202,   69,  184,  227,  284,   96,   97,   98,
       149164  + /*   270 */    99,  100,  101,  102,  103,  104,  105,  106,  297,  298,
       149165  + /*   280 */   255,  206,  207,   19,  272,   59,  206,  207,  184,  277,
149017 149166    /*   290 */    96,   97,   98,   99,  100,  101,  102,  103,  104,  105,
149018         - /*   300 */   106,  184,   35,  205,  206,   22,  113,   43,   44,   45,
       149167  + /*   300 */   106,  184,  259,   19,  184,  100,  101,   43,   44,   45,
149019 149168    /*   310 */    46,   47,   48,   49,   50,   51,   52,   53,   54,   55,
149020         - /*   320 */    56,   57,  205,  206,  131,  132,  100,  101,  291,  292,
149021         - /*   330 */   114,   67,  295,   66,  108,  109,  110,  111,  138,  113,
149022         - /*   340 */   124,   74,   59,  179,  184,  181,  184,  121,   22,  271,
149023         - /*   350 */   186,   19,  188,  184,  276,   59,   24,  184,  241,  195,
       149169  + /*   320 */    56,   57,  242,  206,  207,  184,  100,  101,  138,  292,
       149170  + /*   330 */   293,   67,   76,  296,  108,  109,  110,  111,  295,  113,
       149171  + /*   340 */    84,   59,   86,   22,   26,   89,  156,  121,  224,  225,
       149172  + /*   350 */   145,   19,  147,   59,   72,  256,   24,  184,  290,  291,
149024 149173    /*   360 */    96,   97,   98,   99,  100,  101,  102,  103,  104,  105,
149025         - /*   370 */   106,  145,   59,  147,  184,   43,   44,   45,   46,   47,
       149174  + /*   370 */   106,  145,  297,  147,  299,   43,   44,   45,   46,   47,
149026 149175    /*   380 */    48,   49,   50,   51,   52,   53,   54,   55,   56,   57,
149027         - /*   390 */   123,  227,  228,  110,  296,  297,   22,   23,  184,  102,
149028         - /*   400 */   103,  104,  105,  106,  240,  109,  110,  111,  112,  195,
149029         - /*   410 */   204,  115,  116,  117,   22,  184,  226,  253,  212,  205,
149030         - /*   420 */   206,  125,  109,  110,  111,   22,  100,  101,   96,   97,
149031         - /*   430 */    98,   99,  100,  101,  102,  103,  104,  105,  106,  184,
149032         - /*   440 */    59,  227,  228,  121,  122,   59,  277,  283,   19,  289,
149033         - /*   450 */   290,   59,   23,   76,  240,  241,  143,   76,   72,  189,
149034         - /*   460 */   205,  206,   59,   86,  250,   84,   89,   86,  203,   95,
149035         - /*   470 */    89,  281,   43,   44,   45,   46,   47,   48,   49,   50,
149036         - /*   480 */    51,   52,   53,   54,   55,   56,   57,  227,  228,  184,
149037         - /*   490 */   109,  110,  111,   12,  184,  109,  110,  111,  184,  184,
149038         - /*   500 */   240,  109,  110,  111,  184,  195,  214,   59,   27,  184,
149039         - /*   510 */   205,  206,  109,  110,  111,  205,  206,  184,  263,  138,
149040         - /*   520 */   205,  206,  184,   42,   22,   96,   97,   98,   99,  100,
149041         - /*   530 */   101,  102,  103,  104,  105,  106,  266,  227,  228,   59,
149042         - /*   540 */   270,  276,   94,   66,   63,   19,  241,   22,   26,   23,
149043         - /*   550 */   240,  241,   72,   59,   73,  250,  241,  109,  110,   82,
149044         - /*   560 */    22,   59,  114,  223,  224,  250,  252,   59,   91,   43,
       149176  + /*   390 */   106,  109,  110,  111,  138,  184,  112,  113,  114,  115,
       149177  + /*   400 */   116,  117,  118,  109,  110,  111,  112,   59,  124,  115,
       149178  + /*   410 */   116,  117,  292,  293,  297,  298,  296,  206,  207,  125,
       149179  + /*   420 */    72,  100,  101,  184,   46,   47,   48,   49,   96,   97,
       149180  + /*   430 */    98,   99,  100,  101,  102,  103,  104,  105,  106,   59,
       149181  + /*   440 */   200,  201,  202,  184,   59,  206,  207,   46,   19,  131,
       149182  + /*   450 */   132,  278,   23,  242,  184,  184,   76,  109,  110,  111,
       149183  + /*   460 */   224,  225,  251,   81,   84,  184,   86,   22,   23,   89,
       149184  + /*   470 */   184,   26,   43,   44,   45,   46,   47,   48,   49,   50,
       149185  + /*   480 */    51,   52,   53,   54,   55,   56,   57,  102,  184,  109,
       149186  + /*   490 */   110,  111,  114,  184,  109,  110,  111,  184,  227,  184,
       149187  + /*   500 */   230,  184,   22,  264,  195,   59,   22,  184,  195,  108,
       149188  + /*   510 */   206,  207,   59,  131,  132,  206,  207,  184,  138,  206,
       149189  + /*   520 */   207,  206,  207,  206,  207,   96,   97,   98,   99,  100,
       149190  + /*   530 */   101,  102,  103,  104,  105,  106,  255,  228,  229,   59,
       149191  + /*   540 */    95,  228,  229,   59,  184,   19,  242,   94,  184,   23,
       149192  + /*   550 */   241,  242,  184,  282,  241,  242,  110,  242,  184,  242,
       149193  + /*   560 */   251,   59,  109,  110,  196,  184,  251,  114,  251,   43,
149045 149194    /*   570 */    44,   45,   46,   47,   48,   49,   50,   51,   52,   53,
149046         - /*   580 */    54,   55,   56,   57,   59,  184,   26,   59,  268,  109,
149047         - /*   590 */   110,  111,  184,  145,  146,  147,  112,   59,  203,  115,
149048         - /*   600 */   116,  117,  277,  109,  110,  111,  205,  206,  195,  125,
149049         - /*   610 */   277,  109,  110,  111,  100,  101,  139,  109,  110,  111,
149050         - /*   620 */   219,  184,   96,   97,   98,   99,  100,  101,  102,  103,
149051         - /*   630 */   104,  105,  106,  111,  109,  110,  111,  109,  110,  111,
149052         - /*   640 */   227,  228,   19,  184,  136,  184,   23,  109,  110,  111,
149053         - /*   650 */   200,  201,  202,  240,  259,  260,  261,  195,  136,  145,
149054         - /*   660 */   184,  147,  184,  184,  136,  214,   43,   44,   45,   46,
       149195  + /*   580 */    54,   55,   56,   57,  259,  217,   12,  219,  255,  109,
       149196  + /*   590 */   110,  111,  203,  109,  110,  111,  184,   22,  145,  146,
       149197  + /*   600 */   147,   27,  112,   22,  230,  115,  116,  117,  227,   19,
       149198  + /*   610 */    59,  109,  110,  111,  291,  125,   42,   35,  206,  207,
       149199  + /*   620 */   295,  184,   96,   97,   98,   99,  100,  101,  102,  103,
       149200  + /*   630 */   104,  105,  106,   26,   59,  233,   46,   63,  136,  184,
       149201  + /*   640 */    59,  184,   19,  206,  207,  243,   23,   73,   66,  260,
       149202  + /*   650 */   261,  262,   59,  184,  242,  195,   74,  220,  184,  184,
       149203  + /*   660 */   109,  110,  111,  206,  207,  184,   43,   44,   45,   46,
149055 149204    /*   670 */    47,   48,   49,   50,   51,   52,   53,   54,   55,   56,
149056         - /*   680 */    57,  205,  206,  205,  206,  227,  228,  184,  229,  227,
149057         - /*   690 */   228,  131,  132,  184,   59,  219,  184,  219,  240,  291,
149058         - /*   700 */   292,  184,  240,  295,  105,  106,   22,   23,  205,  206,
149059         - /*   710 */    26,  184,  251,  184,  205,  206,  184,  205,  206,   96,
       149205  + /*   680 */    57,  206,  207,   76,  109,  110,  111,  136,  228,  229,
       149206  + /*   690 */   109,  110,  111,   86,  184,  220,   89,   21,  108,  230,
       149207  + /*   700 */   184,  241,  109,  110,  111,  123,  184,  127,  184,  129,
       149208  + /*   710 */   130,  184,  195,  184,  124,  184,  198,  199,  184,   96,
149060 149209    /*   720 */    97,   98,   99,  100,  101,  102,  103,  104,  105,  106,
149061         - /*   730 */   251,  219,  205,  206,  205,  206,  184,  205,  206,   19,
149062         - /*   740 */   184,   16,  184,   23,  241,  110,  219,   21,  219,  184,
149063         - /*   750 */   241,  219,  286,  287,  195,  184,  195,  205,  206,  201,
149064         - /*   760 */   202,  205,  206,   43,   44,   45,   46,   47,   48,   49,
149065         - /*   770 */    50,   51,   52,   53,   54,   55,   56,   57,  184,   95,
149066         - /*   780 */    22,   23,  184,   26,   26,  220,  227,  228,  227,  228,
149067         - /*   790 */   196,  184,   23,  241,   26,   26,  195,  241,  184,  240,
149068         - /*   800 */    12,  240,   77,   26,   79,  195,   80,  290,  201,  202,
149069         - /*   810 */   216,  184,  218,  195,  184,   27,   96,   97,   98,   99,
149070         - /*   820 */   100,  101,  102,  103,  104,  105,  106,  269,  227,  228,
149071         - /*   830 */    42,  184,  205,  206,  184,  184,   19,  227,  228,  192,
149072         - /*   840 */    23,  240,  116,  196,   76,  227,  228,  120,  121,  122,
149073         - /*   850 */   240,   63,  254,   95,   86,  205,  206,   89,  240,  184,
       149210  + /*   730 */   206,  207,   11,  206,  207,  206,  207,  206,  207,   19,
       149211  + /*   740 */   206,  207,  184,   23,  220,  228,  229,  220,   81,  220,
       149212  + /*   750 */   195,  220,  287,  288,  220,  195,   80,  195,  241,  201,
       149213  + /*   760 */   202,  184,   73,   43,   44,   45,   46,   47,   48,   49,
       149214  + /*   770 */    50,   51,   52,   53,   54,   55,   56,   57,  201,  202,
       149215  + /*   780 */   113,  195,  184,  228,  229,  120,  121,  122,  228,  229,
       149216  + /*   790 */   228,  229,  116,   16,   23,  184,  241,   26,  131,  132,
       149217  + /*   800 */   278,  241,   19,  241,   22,   23,  184,  189,   26,  120,
       149218  + /*   810 */   121,  122,  184,   26,  228,  229,   96,   97,   98,   99,
       149219  + /*   820 */   100,  101,  102,  103,  104,  105,  106,  241,  270,  153,
       149220  + /*   830 */    66,  228,  229,  229,  206,  207,   19,  184,  228,  229,
       149221  + /*   840 */    23,   16,  121,  122,  241,  241,   82,  270,   29,  227,
       149222  + /*   850 */   252,  241,   33,   19,   77,   91,   79,  184,   22,   23,
149074 149223    /*   860 */    43,   44,   45,   46,   47,   48,   49,   50,   51,   52,
149075         - /*   870 */    53,   54,   55,   56,   57,  184,  269,  184,  153,  153,
149076         - /*   880 */   111,  184,    7,    8,    9,  184,  138,  184,  184,  196,
149077         - /*   890 */   184,  120,  121,  122,  184,  138,  205,  206,  184,  102,
149078         - /*   900 */   184,  184,  205,  206,  156,  136,  205,  206,  205,  206,
149079         - /*   910 */   198,  199,  135,   96,   97,   98,   99,  100,  101,  102,
149080         - /*   920 */   103,  104,  105,  106,  184,  128,  184,  184,  184,  254,
149081         - /*   930 */   133,  184,  237,   19,  239,  229,  226,   23,  292,  184,
149082         - /*   940 */   226,  295,  226,  226,  184,  205,  206,  205,  206,  205,
149083         - /*   950 */   206,  184,  292,   19,  184,  295,  252,   43,   44,   45,
       149224  + /*   870 */    53,   54,   55,   56,   57,   12,  184,   95,  184,  206,
       149225  + /*   880 */   207,   76,  111,  184,   65,  267,  184,  184,  184,  271,
       149226  + /*   890 */    27,   86,  109,  184,   89,  120,  121,  122,  206,  207,
       149227  + /*   900 */   206,  207,   77,  139,   79,   42,  184,  136,  206,  207,
       149228  + /*   910 */   206,  207,  184,   96,   97,   98,   99,  100,  101,  102,
       149229  + /*   920 */   103,  104,  105,  106,  184,  138,   63,  184,  206,  207,
       149230  + /*   930 */   153,   95,  184,   19,  206,  207,  227,   23,    7,    8,
       149231  + /*   940 */     9,  293,  293,  109,  296,  296,  206,  207,  215,  206,
       149232  + /*   950 */   207,  184,  253,   19,  206,  207,  253,   43,   44,   45,
149084 149233    /*   960 */    46,   47,   48,   49,   50,   51,   52,   53,   54,   55,
149085         - /*   970 */    56,   57,  205,  206,  184,  205,  206,   43,   44,   45,
       149234  + /*   970 */    56,   57,  184,  206,  207,  184,  184,   43,   44,   45,
149086 149235    /*   980 */    46,   47,   48,   49,   50,   51,   52,   53,   54,   55,
149087         - /*   990 */    56,   57,  157,  158,   26,  205,  206,  254,   26,  252,
149088         - /*  1000 */   184,   15,  184,  184,  184,  292,  184,  252,  295,   24,
       149236  + /*   990 */    56,   57,  184,   22,   23,  184,   59,  206,  207,  184,
       149237  + /*  1000 */   184,  238,  184,  240,  184,   22,  184,  184,  157,  158,
149089 149238    /*  1010 */    96,   97,   98,   99,  100,  101,  102,  103,  104,  105,
149090         - /*  1020 */   106,  205,  206,  205,  206,  205,  206,  205,  206,  184,
       149239  + /*  1020 */   106,  206,  207,  184,  206,  207,  206,  207,  206,  207,
149091 149240    /*  1030 */    96,   97,   98,   99,  100,  101,  102,  103,  104,  105,
149092         - /*  1040 */   106,  184,  184,  184,   59,  184,   60,  184,  229,  184,
149093         - /*  1050 */   205,  206,  184,  258,  184,   19,  184,   19,  184,  246,
149094         - /*  1060 */   184,  258,  205,  206,  205,  206,  205,  206,  205,  206,
149095         - /*  1070 */   205,  206,  184,  205,  206,  205,  206,  205,  206,  205,
149096         - /*  1080 */   206,  205,  206,  292,  226,  151,  295,  184,  228,  294,
149097         - /*  1090 */   184,  119,  184,  205,  206,  110,  150,  294,  152,  184,
149098         - /*  1100 */   240,  184,   22,   23,   23,   19,  184,   26,  205,  206,
149099         - /*  1110 */   142,  205,  206,  205,  206,  184,  198,  199,  131,  132,
149100         - /*  1120 */   205,  206,  205,  206,   22,   19,   24,  205,  206,   43,
       149241  + /*  1040 */   106,  184,   59,  227,  252,  184,  293,  110,  184,  296,
       149242  + /*  1050 */   184,  184,  184,  230,  184,  184,  184,   15,  184,  184,
       149243  + /*  1060 */   184,  253,  184,  206,  207,  184,   95,  206,  207,  102,
       149244  + /*  1070 */   206,  207,  206,  207,  206,  207,  206,  207,  206,  207,
       149245  + /*  1080 */   206,  207,  206,  207,  184,  151,  184,  206,  207,  278,
       149246  + /*  1090 */   184,  252,  184,  110,  184,  128,  184,  198,  199,  184,
       149247  + /*  1100 */   133,  184,   60,   26,  184,   19,  206,  207,  206,  207,
       149248  + /*  1110 */   131,  132,  206,  207,  206,  207,  206,  207,  206,  207,
       149249  + /*  1120 */   253,  206,  207,  206,  207,   19,  206,  207,  253,   43,
149101 149250    /*  1130 */    44,   45,   46,   47,   48,   49,   50,   51,   52,   53,
149102         - /*  1140 */    54,   55,   56,   57,  184,  109,  184,  109,  184,   43,
       149251  + /*  1140 */    54,   55,   56,   57,  184,   26,  184,   26,  184,   43,
149103 149252    /*  1150 */    44,   45,   46,   47,   48,   49,   50,   51,   52,   53,
149104         - /*  1160 */    54,   55,   56,   57,   46,  205,  206,  205,  206,  205,
149105         - /*  1170 */   206,  232,  184,  184,  184,   95,  184,  284,  285,  244,
149106         - /*  1180 */   245,  242,   96,   97,   98,   99,  100,  101,  102,  103,
149107         - /*  1190 */   104,  105,  106,  205,  206,  205,  206,  205,  206,  184,
149108         - /*  1200 */    22,  184,   96,   97,   98,   99,  100,  101,  102,  103,
149109         - /*  1210 */   104,  105,  106,  184,   24,   23,  184,  184,   26,  184,
149110         - /*  1220 */   205,  206,  205,  206,  184,   31,  108,  128,   22,  122,
149111         - /*  1230 */   184,   53,  133,   39,  205,  206,   22,  151,  205,  206,
149112         - /*  1240 */   205,  206,  113,  114,   23,  205,  206,   26,   59,   23,
149113         - /*  1250 */    23,  144,   26,   26,  184,   23,   23,   19,   26,   26,
149114         - /*  1260 */     7,    8,   24,   23,  214,   23,   26,   61,   26,   59,
149115         - /*  1270 */    23,   23,   23,   26,   26,   26,  145,   19,  147,   59,
149116         - /*  1280 */   184,   43,   44,   45,   46,   47,   48,   49,   50,   51,
149117         - /*  1290 */    52,   53,   54,   55,   56,   57,  145,   23,  147,  110,
       149253  + /*  1160 */    54,   55,   56,   57,  285,  286,  206,  207,  206,  207,
       149254  + /*  1170 */   206,  207,  184,   31,  184,  293,  184,  293,  296,  184,
       149255  + /*  1180 */   296,   39,   96,   97,   98,   99,  100,  101,  102,  103,
       149256  + /*  1190 */   104,  105,  106,  184,  206,  207,  206,  207,  206,  207,
       149257  + /*  1200 */   184,   22,   96,   97,   98,   99,  100,  101,  102,  103,
       149258  + /*  1210 */   104,  105,  106,  184,  245,  246,  184,   26,   23,  142,
       149259  + /*  1220 */   128,   26,  206,  207,  150,  133,  152,   22,   22,   24,
       149260  + /*  1230 */   111,   23,   53,  184,   26,  206,  207,  151,  206,  207,
       149261  + /*  1240 */   119,   24,  122,   23,   23,   23,   26,   26,   26,   23,
       149262  + /*  1250 */    23,   23,   26,   26,   26,  136,   23,   19,   22,   26,
       149263  + /*  1260 */   113,  114,   24,  114,  144,  184,   59,   61,    7,    8,
       149264  + /*  1270 */    59,   23,   23,  124,   26,   26,   23,   19,  145,   26,
       149265  + /*  1280 */   147,   43,   44,   45,   46,   47,   48,   49,   50,   51,
       149266  + /*  1290 */    52,   53,   54,   55,   56,   57,  145,   23,  147,  184,
149118 149267    /*  1300 */    26,   43,   44,   45,   46,   47,   48,   49,   50,   51,
149119         - /*  1310 */    52,   53,   54,   55,   56,   57,   23,  184,  184,   26,
149120         - /*  1320 */   110,  184,  184,  184,  134,  184,  184,  184,  184,  184,
149121         - /*  1330 */   110,  184,  184,  184,   96,   97,   98,   99,  100,  101,
149122         - /*  1340 */   102,  103,  104,  105,  106,  184,  184,  184,  134,  300,
149123         - /*  1350 */   184,  243,  184,  184,   96,   97,   98,   99,  100,  101,
       149268  + /*  1310 */    52,   53,   54,   55,   56,   57,   23,  110,  184,   26,
       149269  + /*  1320 */   184,  110,  184,  184,  184,  215,  135,  215,  184,  184,
       149270  + /*  1330 */   184,  247,  184,  244,   96,   97,   98,   99,  100,  101,
       149271  + /*  1340 */   102,  103,  104,  105,  106,  184,  184,  184,  301,  184,
       149272  + /*  1350 */   184,  134,  225,  184,   96,   97,   98,   99,  100,  101,
149124 149273    /*  1360 */   102,  103,  104,  105,  106,  184,  184,  184,  184,  184,
149125         - /*  1370 */   224,  184,  282,  273,   19,  272,  203,  182,  243,  243,
149126         - /*  1380 */   230,  209,  278,  243,  231,  208,  265,  278,  234,  234,
149127         - /*  1390 */   234,  217,  213,   60,   19,  243,  208,  237,  233,   44,
       149274  + /*  1370 */   134,  184,  274,  273,   19,  244,  244,  204,  182,  244,
       149275  + /*  1380 */   283,  231,  279,  279,  232,  244,  210,  209,  235,  235,
       149276  + /*  1390 */   235,  248,  218,  234,   19,  209,  238,  209,  238,   44,
149128 149277    /*  1400 */    45,   46,   47,   48,   49,   50,   51,   52,   53,   54,
149129         - /*  1410 */    55,   56,   57,  208,  247,  187,  134,  247,  247,   38,
       149278  + /*  1410 */    55,   56,   57,  214,   60,  248,  248,  187,  134,   38,
149130 149279    /*  1420 */    45,   46,   47,   48,   49,   50,   51,   52,   53,   54,
149131         - /*  1430 */    55,   56,   57,  237,  231,  191,  191,  279,  279,  282,
149132         - /*  1440 */   143,  191,  108,  268,   22,   19,   20,  256,   22,   43,
149133         - /*  1450 */   257,   96,   97,   98,   99,  100,  101,  102,  103,  104,
149134         - /*  1460 */   105,  106,   36,  222,  142,  234,   18,  191,  225,   18,
149135         - /*  1470 */   190,   96,   97,   98,   99,  100,  101,  102,  103,  104,
149136         - /*  1480 */   105,  106,  225,  191,  225,   59,  225,  257,  234,  234,
149137         - /*  1490 */   256,  222,  222,  190,  234,  150,   62,   71,  275,  274,
149138         - /*  1500 */   191,   19,   20,  190,   22,   22,  210,   81,  191,  190,
149139         - /*  1510 */   210,  191,  108,  190,  207,  207,   64,  207,   36,  215,
149140         - /*  1520 */    94,  210,  207,  209,  119,  207,  100,  101,  207,  106,
149141         - /*  1530 */    48,  215,  207,  107,  210,  109,  110,  111,  267,  267,
149142         - /*  1540 */   114,   59,  210,  249,  137,  108,  248,  191,  249,  248,
149143         - /*  1550 */    88,  249,  141,   71,  248,  299,  138,  131,  132,   22,
149144         - /*  1560 */   191,  249,  299,  237,   82,  238,  150,  262,  140,   87,
149145         - /*  1570 */   139,  145,  146,  147,  148,  149,   94,  248,  238,  236,
149146         - /*  1580 */    25,  235,  100,  101,  234,  194,   26,  193,   13,  107,
149147         - /*  1590 */     6,  109,  110,  111,  264,  185,  114,  185,  183,  197,
149148         - /*  1600 */   183,  203,  183,  203,  203,  197,  203,  211,  211,    4,
149149         - /*  1610 */   197,    3,  203,   22,  155,   15,  288,  203,   93,  288,
149150         - /*  1620 */   285,   23,   16,  203,  203,   23,  132,  145,  146,  147,
149151         - /*  1630 */   148,  149,    0,    1,    2,  143,  123,    5,   24,  135,
149152         - /*  1640 */    20,   16,   10,   11,   12,   13,   14,  137,    1,   17,
149153         - /*  1650 */   135,  144,   19,   20,  123,   22,   61,  143,   37,  123,
149154         - /*  1660 */    53,  109,   30,   53,   32,   53,   53,  134,   34,   36,
149155         - /*  1670 */     1,    5,   40,   22,  108,  153,   26,   68,   75,   68,
149156         - /*  1680 */    41,  134,  108,   24,   20,  124,   19,  118,   23,   67,
149157         - /*  1690 */    22,   67,   59,   22,   22,   22,   22,   67,   28,   37,
149158         - /*  1700 */    23,  142,   70,   22,   71,   23,  157,   23,   23,   26,
149159         - /*  1710 */    78,   23,   22,   81,   23,   82,   24,   22,   24,  134,
149160         - /*  1720 */    87,   23,   19,   20,   92,   22,  109,   94,   23,   22,
149161         - /*  1730 */    34,   34,  136,  100,  101,   26,   34,   85,   34,   36,
149162         - /*  1740 */   107,   83,  109,  110,  111,   34,   90,  114,   34,   23,
149163         - /*  1750 */    75,   75,   44,   22,   24,   26,   34,   23,  126,   26,
149164         - /*  1760 */    23,   23,   59,  131,  132,   23,   23,   26,   23,   22,
149165         - /*  1770 */    11,   22,   22,   22,   71,   23,   23,   22,  145,  146,
149166         - /*  1780 */   147,  148,  149,   26,   23,   82,  154,  134,  128,  134,
149167         - /*  1790 */    87,  134,   15,    1,  301,  134,  301,   94,  301,  301,
149168         - /*  1800 */   301,  301,  301,  100,  101,  301,  301,  301,  301,  301,
149169         - /*  1810 */   107,  301,  109,  110,  111,    1,    2,  114,  301,    5,
149170         - /*  1820 */   301,  301,  301,  301,   10,   11,   12,   13,   14,  301,
149171         - /*  1830 */   301,   17,  301,  301,  301,  301,   19,   20,  301,   22,
149172         - /*  1840 */   301,  301,  301,  301,   30,  301,   32,  301,  145,  146,
149173         - /*  1850 */   147,  148,  149,   36,   40,  301,  301,  301,  301,  301,
149174         - /*  1860 */   301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
149175         - /*  1870 */   301,  301,  301,  301,  301,  301,   59,  301,  301,  301,
149176         - /*  1880 */   301,  301,  301,  301,   70,  301,  301,  301,   71,  301,
149177         - /*  1890 */   301,  301,   78,  301,  301,   81,   19,   20,  301,   22,
149178         - /*  1900 */   301,  301,  301,  301,  301,  301,   92,  301,  301,  301,
149179         - /*  1910 */   301,   94,  301,   36,  301,  301,  301,  100,  101,  102,
149180         - /*  1920 */   301,  301,  301,  301,  107,  301,  109,  110,  111,  301,
149181         - /*  1930 */   301,  114,  301,  301,  301,  301,   59,  301,  301,  301,
149182         - /*  1940 */   126,  301,  301,  301,  301,  131,  132,  301,   71,  301,
149183         - /*  1950 */   301,  301,  301,  301,  301,  301,   19,   20,  301,   22,
149184         - /*  1960 */   301,  301,  145,  146,  147,  148,  149,  301,  154,  301,
149185         - /*  1970 */   301,   94,  301,   36,  301,  301,  301,  100,  101,  301,
149186         - /*  1980 */   301,  301,  301,  301,  107,  301,  109,  110,  111,  301,
149187         - /*  1990 */   301,  114,    5,  301,  301,  301,   59,   10,   11,   12,
149188         - /*  2000 */    13,   14,  301,  301,   17,  301,  301,  301,   71,  301,
149189         - /*  2010 */   301,  301,  301,  301,  301,  301,  301,   30,  301,   32,
149190         - /*  2020 */   301,  301,  145,  146,  147,  148,  149,   40,  301,  301,
149191         - /*  2030 */   301,   94,  301,  301,  301,  301,  301,  100,  101,  301,
149192         - /*  2040 */   301,  301,  301,  301,  107,  301,  109,  110,  111,  301,
149193         - /*  2050 */   301,  114,  301,  301,  301,  301,  301,   70,  301,  301,
149194         - /*  2060 */   301,  301,  301,  301,  301,   78,  301,  301,   81,  301,
149195         - /*  2070 */   301,  301,  301,  301,  301,  301,  301,  301,  301,   92,
149196         - /*  2080 */   301,  301,  145,  146,  147,  148,  149,  301,  301,  301,
149197         - /*  2090 */   301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
149198         - /*  2100 */   301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
149199         - /*  2110 */   301,  301,  301,  126,  301,  301,  301,  301,  131,  132,
149200         - /*  2120 */   301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
149201         - /*  2130 */   301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
149202         - /*  2140 */   301,  154,  301,  301,  301,  301,  301,  301,  301,  301,
149203         - /*  2150 */   301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
149204         - /*  2160 */   301,  301,  301,  301,  301,  301,  301,  301,  301,
149205         -};
149206         -#define YY_SHIFT_COUNT    (540)
       149280  + /*  1430 */    55,   56,   57,  232,  191,  191,  266,  280,  191,  283,
       149281  + /*  1440 */   143,  269,  108,   22,  280,   19,   20,  258,   22,  257,
       149282  + /*  1450 */    43,   96,   97,   98,   99,  100,  101,  102,  103,  104,
       149283  + /*  1460 */   105,  106,   36,  223,  142,   18,  235,  226,  226,  191,
       149284  + /*  1470 */    18,   96,   97,   98,   99,  100,  101,  102,  103,  104,
       149285  + /*  1480 */   105,  106,  226,  226,  190,   59,  235,  235,  223,  223,
       149286  + /*  1490 */   258,  257,  191,  190,  235,  150,   62,   71,  191,  276,
       149287  + /*  1500 */   275,   19,   20,  190,   22,   22,  211,   81,  191,  190,
       149288  + /*  1510 */   211,  191,  108,  190,  208,   64,  208,  208,   36,  119,
       149289  + /*  1520 */    94,  216,  211,  208,  210,  106,  100,  101,  216,  208,
       149290  + /*  1530 */    48,  268,  208,  107,  208,  109,  110,  111,  211,  268,
       149291  + /*  1540 */   114,   59,  211,  137,  108,   88,  250,  249,  191,  141,
       149292  + /*  1550 */   250,  249,  138,   71,  250,  300,   22,  131,  132,  249,
       149293  + /*  1560 */   300,  191,  150,  238,   82,  140,  250,  249,  239,   87,
       149294  + /*  1570 */   139,  145,  146,  147,  148,  149,   94,  239,  237,  236,
       149295  + /*  1580 */    25,  235,  100,  101,  194,   26,  193,   13,  185,  107,
       149296  + /*  1590 */   185,  109,  110,  111,    6,  263,  114,  203,  265,  183,
       149297  + /*  1600 */   183,  183,  203,  212,  203,  203,  197,  197,  212,    4,
       149298  + /*  1610 */     3,   22,  197,  155,   15,  204,  203,  289,   93,  289,
       149299  + /*  1620 */    16,  286,  132,   23,  204,   23,  123,  145,  146,  147,
       149300  + /*  1630 */   148,  149,    0,    1,    2,  143,   24,    5,   20,  135,
       149301  + /*  1640 */    16,    1,   10,   11,   12,   13,   14,  137,  135,   17,
       149302  + /*  1650 */   144,  123,   19,   20,   61,   22,   37,  143,  123,   53,
       149303  + /*  1660 */   109,   53,   30,   53,   32,   34,   53,  134,    1,   36,
       149304  + /*  1670 */     5,   22,   40,  108,  153,   41,   26,   68,   75,   68,
       149305  + /*  1680 */   134,  108,   24,   20,  124,   19,  118,   67,   67,   28,
       149306  + /*  1690 */    22,   22,   59,   22,   67,   23,   22,   22,  142,   37,
       149307  + /*  1700 */    23,   22,   70,   23,   71,  157,   23,   23,   26,   23,
       149308  + /*  1710 */    78,   22,   24,   81,   23,   82,   22,   24,  134,   23,
       149309  + /*  1720 */    87,   23,   19,   20,   92,   22,  109,   94,   22,   34,
       149310  + /*  1730 */   136,   26,   85,  100,  101,   34,   34,   83,   34,   36,
       149311  + /*  1740 */   107,   34,  109,  110,  111,   75,   90,  114,   75,   34,
       149312  + /*  1750 */    23,   22,   44,   34,   24,   23,   22,   26,  126,   26,
       149313  + /*  1760 */    23,   23,   59,  131,  132,   23,   23,   26,   23,   11,
       149314  + /*  1770 */    22,   22,   26,   23,   71,   23,   22,   22,  145,  146,
       149315  + /*  1780 */   147,  148,  149,  128,   23,   82,  154,  134,   15,    1,
       149316  + /*  1790 */    87,  134,  302,  134,  134,  302,  302,   94,  302,  302,
       149317  + /*  1800 */   302,  302,  302,  100,  101,  302,  302,  302,  302,  302,
       149318  + /*  1810 */   107,  302,  109,  110,  111,    1,    2,  114,  302,    5,
       149319  + /*  1820 */   302,  302,  302,  302,   10,   11,   12,   13,   14,  302,
       149320  + /*  1830 */   302,   17,  302,  302,  302,  302,   19,   20,  302,   22,
       149321  + /*  1840 */   302,  302,  302,  302,   30,  302,   32,  302,  145,  146,
       149322  + /*  1850 */   147,  148,  149,   36,   40,  302,  302,  302,  302,  302,
       149323  + /*  1860 */   302,  302,  302,  302,  302,  302,  302,  302,  302,  302,
       149324  + /*  1870 */   302,  302,  302,  302,  302,  302,   59,  302,  302,  302,
       149325  + /*  1880 */   302,  302,  302,  302,   70,  302,  302,  302,   71,  302,
       149326  + /*  1890 */   302,  302,   78,  302,  302,   81,   19,   20,  302,   22,
       149327  + /*  1900 */   302,  302,  302,  302,  302,  302,   92,  302,  302,  302,
       149328  + /*  1910 */   302,   94,  302,   36,  302,  302,  302,  100,  101,  102,
       149329  + /*  1920 */   302,  302,  302,  302,  107,  302,  109,  110,  111,  302,
       149330  + /*  1930 */   302,  114,  302,  302,  302,  302,   59,  302,  302,  302,
       149331  + /*  1940 */   126,  302,  302,  302,  302,  131,  132,  302,   71,  302,
       149332  + /*  1950 */   302,  302,  302,  302,  302,  302,   19,   20,  302,   22,
       149333  + /*  1960 */   302,  302,  145,  146,  147,  148,  149,  302,  154,  302,
       149334  + /*  1970 */   302,   94,  302,   36,  302,  302,  302,  100,  101,  302,
       149335  + /*  1980 */   302,  302,  302,  302,  107,  302,  109,  110,  111,  302,
       149336  + /*  1990 */   302,  114,    5,  302,  302,  302,   59,   10,   11,   12,
       149337  + /*  2000 */    13,   14,  302,  302,   17,  302,  302,  302,   71,  302,
       149338  + /*  2010 */   302,  302,  302,  302,  302,  302,  302,   30,  302,   32,
       149339  + /*  2020 */   302,  302,  145,  146,  147,  148,  149,   40,  302,  302,
       149340  + /*  2030 */   302,   94,  302,  302,  302,  302,  302,  100,  101,  302,
       149341  + /*  2040 */   302,  302,  302,  302,  107,  302,  109,  110,  111,  302,
       149342  + /*  2050 */   302,  114,  302,  302,  302,  302,  302,   70,  302,  302,
       149343  + /*  2060 */   302,  302,  302,  302,  302,   78,  302,  302,   81,  302,
       149344  + /*  2070 */   302,  302,  302,  302,  302,  302,  302,  302,  302,   92,
       149345  + /*  2080 */   302,  302,  145,  146,  147,  148,  149,  302,  302,  302,
       149346  + /*  2090 */   302,  302,  302,  302,  302,  302,  302,  302,  302,  302,
       149347  + /*  2100 */   302,  302,  302,  302,  302,  302,  302,  302,  302,  302,
       149348  + /*  2110 */   302,  302,  302,  126,  302,  302,  302,  302,  131,  132,
       149349  + /*  2120 */   302,  302,  302,  302,  302,  302,  302,  302,  302,  302,
       149350  + /*  2130 */   302,  302,  302,  302,  302,  302,  302,  302,  302,  302,
       149351  + /*  2140 */   302,  154,  302,  302,  302,  302,  302,  302,  302,  302,
       149352  + /*  2150 */   302,  302,  302,  302,  302,  302,  302,  302,  302,  302,
       149353  + /*  2160 */   302,  302,  302,  302,  302,  302,  302,  302,  302,
       149354  +};
       149355  +#define YY_SHIFT_COUNT    (539)
149207 149356   #define YY_SHIFT_MIN      (0)
149208 149357   #define YY_SHIFT_MAX      (1987)
149209 149358   static const unsigned short int yy_shift_ofst[] = {
149210         - /*     0 */  1814, 1632, 1987, 1426, 1426,  128, 1482, 1633, 1703, 1877,
149211         - /*    10 */  1877, 1877,   87,    0,    0,  264, 1106, 1877, 1877, 1877,
       149359  + /*     0 */  1814, 1632, 1987, 1426, 1426,  382, 1482, 1633, 1703, 1877,
       149360  + /*    10 */  1877, 1877,   85,    0,    0,  264, 1106, 1877, 1877, 1877,
149212 149361    /*    20 */  1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877,
149213         - /*    30 */   226,  226,  381,  381,  296,  193,  128,  128,  128,  128,
149214         - /*    40 */   128,  128,   97,  194,  332,  429,  526,  623,  720,  817,
       149362  + /*    30 */   226,  226,  380,  380,  294,  667,  382,  382,  382,  382,
       149363  + /*    40 */   382,  382,   97,  194,  332,  429,  526,  623,  720,  817,
149215 149364    /*    50 */   914,  934, 1086, 1238, 1106, 1106, 1106, 1106, 1106, 1106,
149216 149365    /*    60 */  1106, 1106, 1106, 1106, 1106, 1106, 1106, 1106, 1106, 1106,
149217 149366    /*    70 */  1106, 1106, 1258, 1106, 1355, 1375, 1375, 1817, 1877, 1877,
149218 149367    /*    80 */  1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877,
149219 149368    /*    90 */  1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877,
149220 149369    /*   100 */  1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877,
149221 149370    /*   110 */  1937, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877, 1877,
149222 149371    /*   120 */  1877, 1877, 1877, 1877,   32,  129,  129,  129,  129,  129,
149223         - /*   130 */    21,  152,  297,  494,  726,   65,  494,  514,  514,  494,
149224         - /*   140 */   560,  560,  560,  560,  322,  599,   50, 2142, 2142,  155,
149225         - /*   150 */   155,  155,  313,  392,  386,  392,  392,  481,  481,  200,
149226         - /*   160 */   480,  684,  758,  494,  494,  494,  494,  494,  494,  494,
149227         - /*   170 */   494,  494,  494,  494,  494,  494,  494,  494,  494,  494,
149228         - /*   180 */   494,  494,  494,  494,  768,  768,  494,  166,  377,  377,
149229         - /*   190 */   635,  835,  835,  635,  748,  987, 2142, 2142, 2142,  448,
149230         - /*   200 */    45,   45,  403,  484,  502,  106,  525,  508,  528,  538,
149231         - /*   210 */   494,  494,  494,  494,  494,  494,  494,  494,  494,   84,
149232         - /*   220 */   494,  494,  494,  494,  494,  494,  494,  494,  494,  494,
149233         - /*   230 */   494,  494,  267,  267,  267,  494,  494,  494,  494,  769,
149234         - /*   240 */   494,  494,  494,    4,  477,  494,  494,  788,  494,  494,
149235         - /*   250 */   494,  494,  494,  494,  494,  494,  727,    5,  135,  985,
149236         - /*   260 */   985,  985,  985,  522,  135,  135,  797,  326,  875,  986,
149237         - /*   270 */   968, 1036, 1036, 1038,  968,  968, 1038,  972, 1081, 1118,
149238         - /*   280 */  1194, 1194, 1194, 1036,  757,  757,  946,  777, 1099, 1102,
149239         - /*   290 */  1333, 1282, 1282, 1381, 1381, 1282, 1297, 1334, 1422, 1406,
149240         - /*   300 */  1322, 1448, 1448, 1448, 1448, 1282, 1451, 1322, 1322, 1334,
149241         - /*   310 */  1422, 1406, 1406, 1322, 1282, 1451, 1345, 1434, 1282, 1451,
149242         - /*   320 */  1483, 1282, 1451, 1282, 1451, 1483, 1404, 1404, 1404, 1452,
149243         - /*   330 */  1483, 1404, 1405, 1404, 1452, 1404, 1404, 1483, 1423, 1423,
149244         - /*   340 */  1483, 1407, 1437, 1407, 1437, 1407, 1437, 1407, 1437, 1282,
149245         - /*   350 */  1462, 1462, 1411, 1418, 1537, 1282, 1416, 1411, 1428, 1431,
149246         - /*   360 */  1322, 1555, 1560, 1575, 1575, 1584, 1584, 1584, 2142, 2142,
       149372  + /*   130 */   171,    7,   17,  593,  676,  590,  593,  205,  205,  593,
       149373  + /*   140 */   318,  318,  318,  318,   50,  152,   51, 2142, 2142,  284,
       149374  + /*   150 */   284,  284,   65,  145,  282,  145,  145,  574,  574,  256,
       149375  + /*   160 */   348,  445,  782,  593,  593,  593,  593,  593,  593,  593,
       149376  + /*   170 */   593,  593,  593,  593,  593,  593,  593,  593,  593,  593,
       149377  + /*   180 */   593,  593,  593,  593,  607,  607,  593,  721,  805,  805,
       149378  + /*   190 */   446,  851,  851,  446,  190,  979, 2142, 2142, 2142,  453,
       149379  + /*   200 */    45,   45,  480,  490,  484,  385,  575,  502,  551,  581,
       149380  + /*   210 */   593,  593,  593,  593,  593,  593,  593,  593,  593,  689,
       149381  + /*   220 */   593,  593,  593,  593,  593,  593,  593,  593,  593,  593,
       149382  + /*   230 */   593,  593,  582,  582,  582,  593,  593,  593,  593,  771,
       149383  + /*   240 */   593,  593,  593,   59,  764,  593,  593,  863,  593,  593,
       149384  + /*   250 */   593,  593,  593,  593,  593,  593,  665,  819,  580,   16,
       149385  + /*   260 */    16,   16,   16, 1119,  580,  580,  967,  321,  931, 1042,
       149386  + /*   270 */  1077,  783,  783,  834, 1077, 1077,  834, 1121, 1195,  401,
       149387  + /*   280 */  1142, 1142, 1142,  783,  787,  787, 1074, 1191, 1092, 1205,
       149388  + /*   290 */  1354, 1284, 1284, 1381, 1381, 1284, 1297, 1334, 1421, 1407,
       149389  + /*   300 */  1322, 1447, 1447, 1447, 1447, 1284, 1452, 1322, 1322, 1334,
       149390  + /*   310 */  1421, 1407, 1407, 1322, 1284, 1452, 1345, 1434, 1284, 1452,
       149391  + /*   320 */  1483, 1284, 1452, 1284, 1452, 1483, 1404, 1404, 1404, 1451,
       149392  + /*   330 */  1483, 1404, 1400, 1404, 1451, 1404, 1404, 1483, 1419, 1419,
       149393  + /*   340 */  1483, 1406, 1436, 1406, 1436, 1406, 1436, 1406, 1436, 1284,
       149394  + /*   350 */  1457, 1457, 1408, 1414, 1534, 1284, 1412, 1408, 1425, 1431,
       149395  + /*   360 */  1322, 1555, 1559, 1574, 1574, 1588, 1588, 1588, 2142, 2142,
149247 149396    /*   370 */  2142, 2142, 2142, 2142, 2142, 2142, 2142, 2142, 2142, 2142,
149248         - /*   380 */  2142, 2142, 2142, 2142,   61,  725,  374, 1080,  198,  771,
149249         - /*   390 */   283, 1192, 1178, 1190, 1107, 1221, 1206, 1226, 1227, 1232,
149250         - /*   400 */  1233, 1240, 1242, 1189, 1129, 1253,  216, 1210, 1247, 1248,
149251         - /*   410 */  1249, 1131, 1151, 1274, 1293, 1220, 1214, 1605, 1608, 1591,
149252         - /*   420 */  1459, 1600, 1525, 1606, 1598, 1602, 1494, 1492, 1513, 1614,
149253         - /*   430 */  1504, 1620, 1510, 1625, 1647, 1515, 1507, 1531, 1595, 1621,
149254         - /*   440 */  1514, 1607, 1610, 1612, 1613, 1536, 1552, 1634, 1533, 1669,
149255         - /*   450 */  1666, 1651, 1566, 1522, 1609, 1650, 1611, 1603, 1639, 1547,
149256         - /*   460 */  1574, 1659, 1664, 1667, 1561, 1569, 1668, 1622, 1671, 1672,
149257         - /*   470 */  1665, 1673, 1624, 1670, 1674, 1630, 1662, 1677, 1559, 1681,
149258         - /*   480 */  1682, 1549, 1684, 1685, 1683, 1688, 1690, 1692, 1691, 1695,
149259         - /*   490 */  1694, 1585, 1698, 1705, 1617, 1696, 1707, 1596, 1709, 1697,
149260         - /*   500 */  1702, 1704, 1711, 1652, 1675, 1658, 1708, 1676, 1656, 1714,
149261         - /*   510 */  1726, 1731, 1730, 1729, 1733, 1722, 1734, 1709, 1737, 1738,
149262         - /*   520 */  1742, 1743, 1741, 1745, 1747, 1759, 1749, 1750, 1752, 1753,
149263         - /*   530 */  1751, 1755, 1757, 1660, 1653, 1655, 1657, 1661, 1761, 1777,
149264         - /*   540 */  1792,
149265         -};
149266         -#define YY_REDUCE_COUNT (383)
149267         -#define YY_REDUCE_MIN   (-257)
149268         -#define YY_REDUCE_MAX   (1421)
       149397  + /*   380 */  2142, 2142, 2142,  378,  777,  836,  971,  825,  775,  983,
       149398  + /*   390 */  1208, 1179, 1217, 1120, 1220, 1206, 1221, 1222, 1226, 1227,
       149399  + /*   400 */  1228, 1233,  937, 1147, 1261, 1149, 1207, 1248, 1249, 1253,
       149400  + /*   410 */  1133, 1151, 1274, 1293, 1211, 1236, 1605, 1607, 1589, 1458,
       149401  + /*   420 */  1599, 1525, 1604, 1600, 1602, 1490, 1492, 1503, 1612, 1504,
       149402  + /*   430 */  1618, 1510, 1624, 1640, 1513, 1506, 1528, 1593, 1619, 1514,
       149403  + /*   440 */  1606, 1608, 1610, 1613, 1535, 1551, 1631, 1533, 1667, 1665,
       149404  + /*   450 */  1649, 1565, 1521, 1609, 1650, 1611, 1603, 1634, 1546, 1573,
       149405  + /*   460 */  1658, 1663, 1666, 1560, 1568, 1668, 1620, 1669, 1671, 1672,
       149406  + /*   470 */  1674, 1621, 1661, 1675, 1627, 1662, 1677, 1556, 1679, 1680,
       149407  + /*   480 */  1548, 1683, 1684, 1682, 1686, 1689, 1688, 1691, 1694, 1693,
       149408  + /*   490 */  1584, 1696, 1698, 1617, 1695, 1706, 1594, 1705, 1701, 1702,
       149409  + /*   500 */  1704, 1707, 1647, 1670, 1654, 1708, 1673, 1656, 1715, 1727,
       149410  + /*   510 */  1729, 1730, 1731, 1733, 1719, 1732, 1705, 1737, 1738, 1742,
       149411  + /*   520 */  1743, 1741, 1745, 1734, 1758, 1748, 1749, 1750, 1752, 1754,
       149412  + /*   530 */  1755, 1746, 1655, 1653, 1657, 1659, 1660, 1761, 1773, 1788,
       149413  +};
       149414  +#define YY_REDUCE_COUNT (382)
       149415  +#define YY_REDUCE_MIN   (-260)
       149416  +#define YY_REDUCE_MAX   (1420)
149269 149417   static const short yy_reduce_ofst[] = {
149270         - /*     0 */  -168,  -17,  164,  214,  310, -166, -184,  -18,   98, -170,
149271         - /*    10 */   305,  315, -163, -193, -178, -257,  395,  401,  476,  478,
149272         - /*    20 */   512,  117,  527,  529,  503,  509,  532,  255,  552,  556,
149273         - /*    30 */   558,  607,   37,  408,  594,  413,  462,  559,  561,  601,
149274         - /*    40 */   610,  618, -254, -254, -254, -254, -254, -254, -254, -254,
149275         - /*    50 */  -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
149276         - /*    60 */  -254, -254, -254, -254, -254, -254, -254, -254, -254, -254,
149277         - /*    70 */  -254, -254, -254, -254, -254, -254, -254, -111,  627,  650,
149278         - /*    80 */   691,  697,  701,  703,  740,  742,  744,  767,  770,  790,
149279         - /*    90 */   816,  818,  820,  822,  845,  857,  859,  861,  863,  865,
149280         - /*   100 */   868,  870,  872,  874,  876,  888,  903,  906,  908,  915,
149281         - /*   110 */   917,  922,  960,  962,  964,  988,  990,  992, 1015, 1017,
149282         - /*   120 */  1029, 1033, 1035, 1040, -254, -254, -254, -254, -254, -254,
149283         - /*   130 */  -254, -254, -254,  190,  270, -196,  160, -160,  450,  647,
149284         - /*   140 */   260,  458,  260,  458,   78, -254, -254, -254, -254,  206,
149285         - /*   150 */   206,  206,  320,  598,   -5,  675,  743, -148,  340, -125,
149286         - /*   160 */   459,  466,  466,  693,  -93,  461,  479,  706,  710,  714,
149287         - /*   170 */   716,  717,  169, -183,  325,  314,  704,  333,  747,  858,
149288         - /*   180 */    -8,  819,  565,  755,  646,  660,  517,  265,  713,  791,
149289         - /*   190 */   712,  795,  803,  918,  695,  860,  893,  935,  939, -181,
149290         - /*   200 */  -172, -147,  -91,  -46,   -3,  162,  173,  231,  338,  437,
149291         - /*   210 */   571,  614,  630,  651,  760,  931,  989, 1032, 1046, -218,
149292         - /*   220 */    38, 1070, 1096, 1133, 1134, 1137, 1138, 1139, 1141, 1142,
149293         - /*   230 */  1143, 1144,  292,  451, 1050, 1145, 1147, 1148, 1149,  813,
149294         - /*   240 */  1161, 1162, 1163, 1108, 1049, 1166, 1168, 1146, 1169,  162,
149295         - /*   250 */  1181, 1182, 1183, 1184, 1185, 1187, 1100, 1103, 1150, 1135,
149296         - /*   260 */  1136, 1140, 1152,  813, 1150, 1150, 1153, 1173, 1195, 1090,
149297         - /*   270 */  1154, 1167, 1170, 1104, 1155, 1156, 1109, 1172, 1174, 1179,
149298         - /*   280 */  1177, 1188, 1205, 1171, 1160, 1196, 1121, 1165, 1203, 1228,
149299         - /*   290 */  1157, 1244, 1245, 1158, 1159, 1250, 1175, 1193, 1191, 1241,
149300         - /*   300 */  1231, 1243, 1257, 1259, 1261, 1276, 1280, 1254, 1255, 1230,
149301         - /*   310 */  1234, 1269, 1270, 1260, 1292, 1303, 1223, 1225, 1309, 1313,
149302         - /*   320 */  1296, 1317, 1319, 1320, 1323, 1300, 1307, 1308, 1310, 1304,
149303         - /*   330 */  1311, 1315, 1314, 1318, 1316, 1321, 1325, 1324, 1271, 1272,
149304         - /*   340 */  1332, 1294, 1298, 1299, 1301, 1302, 1306, 1312, 1329, 1356,
149305         - /*   350 */  1256, 1263, 1327, 1326, 1305, 1369, 1330, 1340, 1343, 1346,
149306         - /*   360 */  1350, 1391, 1394, 1410, 1412, 1415, 1417, 1419, 1328, 1331,
149307         - /*   370 */  1335, 1402, 1398, 1400, 1401, 1403, 1408, 1396, 1397, 1409,
149308         - /*   380 */  1414, 1420, 1421, 1413,
       149418  + /*     0 */  -170,  -18, -159,  309,  313, -167,  -19,   75,  117,  211,
       149419  + /*    10 */   315,  317, -165, -195, -168, -260,  389,  437,  475,  524,
       149420  + /*    20 */   527, -169,  529,  531,  -28,   80,  534,  239,  304,  412,
       149421  + /*    30 */   558,  577,   37,  120,  368,  -22,  460,  517,  555,  560,
       149422  + /*    40 */   562,  586, -257, -257, -257, -257, -257, -257, -257, -257,
       149423  + /*    50 */  -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
       149424  + /*    60 */  -257, -257, -257, -257, -257, -257, -257, -257, -257, -257,
       149425  + /*    70 */  -257, -257, -257, -257, -257, -257, -257, -172,  457,  628,
       149426  + /*    80 */   673,  692,  694,  702,  704,  722,  728,  740,  743,  748,
       149427  + /*    90 */   767,  791,  815,  818,  820,  822,  857,  861,  864,  866,
       149428  + /*   100 */   868,  870,  872,  874,  876,  881,  900,  902,  906,  908,
       149429  + /*   110 */   910,  912,  915,  917,  920,  960,  962,  964,  988,  990,
       149430  + /*   120 */   992, 1016, 1029, 1032, -257, -257, -257, -257, -257, -257,
       149431  + /*   130 */  -257, -257, -257,  271,  618, -190,   68,   60,  240, -124,
       149432  + /*   140 */   603,  610,  603,  610,   12, -257, -257, -257, -257, -128,
       149433  + /*   150 */  -128, -128, -142,   25,  270,  281,  333,  124,  236,  648,
       149434  + /*   160 */   374,  465,  465,   28,  598,  792,  839,  469,   38,  381,
       149435  + /*   170 */   622,  709,  173,  699,  522,  703,  808,  811,  867,  816,
       149436  + /*   180 */  -104,  823,   -3,  875,  649,  753,  323,  -88,  882,  884,
       149437  + /*   190 */   518,   43,  325,  899,  763,  604,  879,  969,  402, -193,
       149438  + /*   200 */  -189, -180, -151,  -55,   69,  104,  141,  259,  286,  360,
       149439  + /*   210 */   364,  455,  474,  481,  510,  516,  611,  653,  788,   99,
       149440  + /*   220 */   871,  878,  995, 1009, 1049, 1081, 1115, 1134, 1136, 1138,
       149441  + /*   230 */  1139, 1140,  733, 1110, 1112, 1144, 1145, 1146, 1148, 1084,
       149442  + /*   240 */  1161, 1162, 1163, 1089, 1047, 1165, 1166, 1127, 1169,  104,
       149443  + /*   250 */  1181, 1182, 1183, 1184, 1185, 1187, 1098, 1100, 1150, 1131,
       149444  + /*   260 */  1132, 1135, 1141, 1084, 1150, 1150, 1152, 1173, 1196, 1097,
       149445  + /*   270 */  1153, 1143, 1167, 1103, 1154, 1155, 1104, 1176, 1174, 1199,
       149446  + /*   280 */  1178, 1186, 1188, 1168, 1158, 1160, 1170, 1159, 1201, 1230,
       149447  + /*   290 */  1156, 1243, 1244, 1157, 1164, 1247, 1172, 1189, 1192, 1240,
       149448  + /*   300 */  1231, 1241, 1242, 1256, 1257, 1278, 1294, 1251, 1252, 1232,
       149449  + /*   310 */  1234, 1265, 1266, 1259, 1301, 1303, 1223, 1225, 1307, 1313,
       149450  + /*   320 */  1295, 1317, 1319, 1320, 1323, 1299, 1306, 1308, 1309, 1305,
       149451  + /*   330 */  1311, 1315, 1314, 1321, 1312, 1324, 1326, 1327, 1263, 1271,
       149452  + /*   340 */  1331, 1296, 1298, 1300, 1302, 1304, 1310, 1316, 1318, 1357,
       149453  + /*   350 */  1255, 1260, 1329, 1325, 1332, 1370, 1333, 1338, 1341, 1343,
       149454  + /*   360 */  1346, 1390, 1393, 1403, 1405, 1416, 1417, 1418, 1328, 1330,
       149455  + /*   370 */  1335, 1409, 1394, 1399, 1401, 1402, 1410, 1391, 1396, 1411,
       149456  + /*   380 */  1420, 1413, 1415,
149309 149457   };
149310 149458   static const YYACTIONTYPE yy_default[] = {
149311         - /*     0 */  1536, 1536, 1536, 1376, 1159, 1265, 1159, 1159, 1159, 1376,
149312         - /*    10 */  1376, 1376, 1159, 1295, 1295, 1429, 1190, 1159, 1159, 1159,
149313         - /*    20 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1375, 1159, 1159,
149314         - /*    30 */  1159, 1159, 1459, 1459, 1159, 1159, 1159, 1159, 1159, 1159,
149315         - /*    40 */  1159, 1159, 1159, 1301, 1159, 1159, 1159, 1159, 1159, 1377,
149316         - /*    50 */  1378, 1159, 1159, 1159, 1428, 1430, 1393, 1311, 1310, 1309,
149317         - /*    60 */  1308, 1411, 1282, 1306, 1299, 1303, 1371, 1372, 1370, 1374,
149318         - /*    70 */  1378, 1377, 1159, 1302, 1342, 1356, 1341, 1159, 1159, 1159,
       149459  + /*     0 */  1537, 1537, 1537, 1377, 1159, 1266, 1159, 1159, 1159, 1377,
       149460  + /*    10 */  1377, 1377, 1159, 1296, 1296, 1430, 1190, 1159, 1159, 1159,
       149461  + /*    20 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1376, 1159, 1159,
       149462  + /*    30 */  1159, 1159, 1460, 1460, 1159, 1159, 1159, 1159, 1159, 1159,
       149463  + /*    40 */  1159, 1159, 1159, 1302, 1159, 1159, 1159, 1159, 1159, 1378,
       149464  + /*    50 */  1379, 1159, 1159, 1159, 1429, 1431, 1394, 1312, 1311, 1310,
       149465  + /*    60 */  1309, 1412, 1283, 1307, 1300, 1304, 1372, 1373, 1371, 1375,
       149466  + /*    70 */  1379, 1378, 1159, 1303, 1343, 1357, 1342, 1159, 1159, 1159,
149319 149467    /*    80 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
149320 149468    /*    90 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
149321 149469    /*   100 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
149322 149470    /*   110 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
149323         - /*   120 */  1159, 1159, 1159, 1159, 1350, 1355, 1361, 1354, 1351, 1344,
149324         - /*   130 */  1343, 1345, 1346, 1159, 1180, 1229, 1159, 1159, 1159, 1159,
149325         - /*   140 */  1447, 1446, 1159, 1159, 1190, 1347, 1348, 1358, 1357, 1436,
149326         - /*   150 */  1492, 1491, 1394, 1159, 1159, 1159, 1159, 1159, 1159, 1459,
       149471  + /*   120 */  1159, 1159, 1159, 1159, 1351, 1356, 1362, 1355, 1352, 1345,
       149472  + /*   130 */  1344, 1346, 1347, 1159, 1180, 1230, 1159, 1159, 1159, 1159,
       149473  + /*   140 */  1448, 1447, 1159, 1159, 1190, 1348, 1349, 1359, 1358, 1437,
       149474  + /*   150 */  1493, 1492, 1395, 1159, 1159, 1159, 1159, 1159, 1159, 1460,
149327 149475    /*   160 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
149328 149476    /*   170 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
149329         - /*   180 */  1159, 1159, 1159, 1159, 1459, 1459, 1159, 1190, 1459, 1459,
149330         - /*   190 */  1186, 1336, 1335, 1186, 1289, 1159, 1442, 1265, 1256, 1159,
       149477  + /*   180 */  1159, 1159, 1159, 1159, 1460, 1460, 1159, 1190, 1460, 1460,
       149478  + /*   190 */  1186, 1337, 1336, 1186, 1290, 1159, 1443, 1266, 1257, 1159,
149331 149479    /*   200 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
149332         - /*   210 */  1159, 1159, 1159, 1433, 1431, 1159, 1159, 1159, 1159, 1159,
       149480  + /*   210 */  1159, 1159, 1159, 1434, 1432, 1159, 1159, 1159, 1159, 1159,
149333 149481    /*   220 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
149334 149482    /*   230 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
149335         - /*   240 */  1159, 1159, 1159, 1261, 1159, 1159, 1159, 1159, 1159, 1159,
149336         - /*   250 */  1159, 1159, 1159, 1159, 1159, 1486, 1159, 1406, 1243, 1261,
149337         - /*   260 */  1261, 1261, 1261, 1263, 1244, 1242, 1255, 1190, 1166, 1528,
149338         - /*   270 */  1305, 1284, 1284, 1525, 1305, 1305, 1525, 1204, 1506, 1201,
149339         - /*   280 */  1295, 1295, 1295, 1284, 1289, 1289, 1373, 1262, 1255, 1159,
149340         - /*   290 */  1528, 1270, 1270, 1527, 1527, 1270, 1394, 1314, 1320, 1232,
149341         - /*   300 */  1305, 1238, 1238, 1238, 1238, 1270, 1177, 1305, 1305, 1314,
149342         - /*   310 */  1320, 1232, 1232, 1305, 1270, 1177, 1410, 1522, 1270, 1177,
149343         - /*   320 */  1384, 1270, 1177, 1270, 1177, 1384, 1230, 1230, 1230, 1219,
149344         - /*   330 */  1384, 1230, 1204, 1230, 1219, 1230, 1230, 1384, 1388, 1388,
149345         - /*   340 */  1384, 1288, 1283, 1288, 1283, 1288, 1283, 1288, 1283, 1270,
149346         - /*   350 */  1469, 1469, 1300, 1289, 1379, 1270, 1159, 1300, 1298, 1296,
149347         - /*   360 */  1305, 1183, 1222, 1489, 1489, 1485, 1485, 1485, 1533, 1533,
149348         - /*   370 */  1442, 1501, 1190, 1190, 1190, 1190, 1501, 1206, 1206, 1190,
149349         - /*   380 */  1190, 1190, 1190, 1501, 1159, 1159, 1159, 1159, 1159, 1159,
149350         - /*   390 */  1496, 1159, 1395, 1274, 1159, 1159, 1159, 1159, 1159, 1159,
       149483  + /*   240 */  1159, 1159, 1159, 1262, 1159, 1159, 1159, 1159, 1159, 1159,
       149484  + /*   250 */  1159, 1159, 1159, 1159, 1159, 1487, 1159, 1407, 1244, 1262,
       149485  + /*   260 */  1262, 1262, 1262, 1264, 1245, 1243, 1256, 1191, 1166, 1529,
       149486  + /*   270 */  1306, 1285, 1285, 1526, 1306, 1306, 1526, 1205, 1507, 1202,
       149487  + /*   280 */  1296, 1296, 1296, 1285, 1290, 1290, 1374, 1263, 1256, 1159,
       149488  + /*   290 */  1529, 1271, 1271, 1528, 1528, 1271, 1395, 1315, 1321, 1233,
       149489  + /*   300 */  1306, 1239, 1239, 1239, 1239, 1271, 1177, 1306, 1306, 1315,
       149490  + /*   310 */  1321, 1233, 1233, 1306, 1271, 1177, 1411, 1523, 1271, 1177,
       149491  + /*   320 */  1385, 1271, 1177, 1271, 1177, 1385, 1231, 1231, 1231, 1220,
       149492  + /*   330 */  1385, 1231, 1205, 1231, 1220, 1231, 1231, 1385, 1389, 1389,
       149493  + /*   340 */  1385, 1289, 1284, 1289, 1284, 1289, 1284, 1289, 1284, 1271,
       149494  + /*   350 */  1470, 1470, 1301, 1290, 1380, 1271, 1159, 1301, 1299, 1297,
       149495  + /*   360 */  1306, 1183, 1223, 1490, 1490, 1486, 1486, 1486, 1534, 1534,
       149496  + /*   370 */  1443, 1502, 1190, 1190, 1190, 1190, 1502, 1207, 1207, 1191,
       149497  + /*   380 */  1191, 1190, 1502, 1159, 1159, 1159, 1159, 1159, 1159, 1497,
       149498  + /*   390 */  1159, 1396, 1275, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
149351 149499    /*   400 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
149352         - /*   410 */  1159, 1159, 1159, 1159, 1159, 1159, 1325, 1159, 1162, 1439,
149353         - /*   420 */  1159, 1159, 1437, 1159, 1159, 1159, 1159, 1159, 1159, 1275,
       149500  + /*   410 */  1159, 1159, 1159, 1159, 1159, 1326, 1159, 1162, 1440, 1159,
       149501  + /*   420 */  1159, 1438, 1159, 1159, 1159, 1159, 1159, 1159, 1276, 1159,
149354 149502    /*   430 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
149355         - /*   440 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1524, 1159,
149356         - /*   450 */  1159, 1159, 1159, 1159, 1159, 1409, 1408, 1159, 1159, 1272,
       149503  + /*   440 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1525, 1159, 1159,
       149504  + /*   450 */  1159, 1159, 1159, 1159, 1410, 1409, 1159, 1159, 1273, 1159,
149357 149505    /*   460 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
149358 149506    /*   470 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
149359 149507    /*   480 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
149360         - /*   490 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1297, 1159,
       149508  + /*   490 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1298, 1159, 1159,
149361 149509    /*   500 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
149362         - /*   510 */  1159, 1159, 1159, 1474, 1290, 1159, 1159, 1515, 1159, 1159,
       149510  + /*   510 */  1159, 1159, 1475, 1291, 1159, 1159, 1516, 1159, 1159, 1159,
149363 149511    /*   520 */  1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159, 1159,
149364         - /*   530 */  1159, 1159, 1510, 1246, 1327, 1159, 1326, 1330, 1159, 1171,
149365         - /*   540 */  1159,
       149512  + /*   530 */  1159, 1511, 1247, 1328, 1159, 1327, 1331, 1159, 1171, 1159,
149366 149513   };
149367 149514   /********** End of lemon-generated parsing tables *****************************/
149368 149515   
149369 149516   /* The next table maps tokens (terminal symbols) into fallback tokens.  
149370 149517   ** If a construct like the following:
149371 149518   ** 
149372 149519   **      %fallback ID X Y Z.
................................................................................
149764 149911     /*  197 */ "carglist",
149765 149912     /*  198 */ "typetoken",
149766 149913     /*  199 */ "typename",
149767 149914     /*  200 */ "signed",
149768 149915     /*  201 */ "plus_num",
149769 149916     /*  202 */ "minus_num",
149770 149917     /*  203 */ "scanpt",
149771         -  /*  204 */ "ccons",
149772         -  /*  205 */ "term",
149773         -  /*  206 */ "expr",
149774         -  /*  207 */ "onconf",
149775         -  /*  208 */ "sortorder",
149776         -  /*  209 */ "autoinc",
149777         -  /*  210 */ "eidlist_opt",
149778         -  /*  211 */ "refargs",
149779         -  /*  212 */ "defer_subclause",
149780         -  /*  213 */ "refarg",
149781         -  /*  214 */ "refact",
149782         -  /*  215 */ "init_deferred_pred_opt",
149783         -  /*  216 */ "conslist",
149784         -  /*  217 */ "tconscomma",
149785         -  /*  218 */ "tcons",
149786         -  /*  219 */ "sortlist",
149787         -  /*  220 */ "eidlist",
149788         -  /*  221 */ "defer_subclause_opt",
149789         -  /*  222 */ "orconf",
149790         -  /*  223 */ "resolvetype",
149791         -  /*  224 */ "raisetype",
149792         -  /*  225 */ "ifexists",
149793         -  /*  226 */ "fullname",
149794         -  /*  227 */ "selectnowith",
149795         -  /*  228 */ "oneselect",
149796         -  /*  229 */ "wqlist",
149797         -  /*  230 */ "multiselect_op",
149798         -  /*  231 */ "distinct",
149799         -  /*  232 */ "selcollist",
149800         -  /*  233 */ "from",
149801         -  /*  234 */ "where_opt",
149802         -  /*  235 */ "groupby_opt",
149803         -  /*  236 */ "having_opt",
149804         -  /*  237 */ "orderby_opt",
149805         -  /*  238 */ "limit_opt",
149806         -  /*  239 */ "window_clause",
149807         -  /*  240 */ "values",
149808         -  /*  241 */ "nexprlist",
149809         -  /*  242 */ "sclp",
149810         -  /*  243 */ "as",
149811         -  /*  244 */ "seltablist",
149812         -  /*  245 */ "stl_prefix",
149813         -  /*  246 */ "joinop",
149814         -  /*  247 */ "indexed_opt",
149815         -  /*  248 */ "on_opt",
149816         -  /*  249 */ "using_opt",
149817         -  /*  250 */ "exprlist",
149818         -  /*  251 */ "xfullname",
149819         -  /*  252 */ "idlist",
149820         -  /*  253 */ "with",
149821         -  /*  254 */ "setlist",
149822         -  /*  255 */ "insert_cmd",
149823         -  /*  256 */ "idlist_opt",
149824         -  /*  257 */ "upsert",
149825         -  /*  258 */ "over_clause",
149826         -  /*  259 */ "likeop",
149827         -  /*  260 */ "between_op",
149828         -  /*  261 */ "in_op",
149829         -  /*  262 */ "paren_exprlist",
149830         -  /*  263 */ "case_operand",
149831         -  /*  264 */ "case_exprlist",
149832         -  /*  265 */ "case_else",
149833         -  /*  266 */ "uniqueflag",
149834         -  /*  267 */ "collate",
149835         -  /*  268 */ "vinto",
149836         -  /*  269 */ "nmnum",
149837         -  /*  270 */ "trigger_decl",
149838         -  /*  271 */ "trigger_cmd_list",
149839         -  /*  272 */ "trigger_time",
149840         -  /*  273 */ "trigger_event",
149841         -  /*  274 */ "foreach_clause",
149842         -  /*  275 */ "when_clause",
149843         -  /*  276 */ "trigger_cmd",
149844         -  /*  277 */ "trnm",
149845         -  /*  278 */ "tridxby",
149846         -  /*  279 */ "database_kw_opt",
149847         -  /*  280 */ "key_opt",
149848         -  /*  281 */ "add_column_fullname",
149849         -  /*  282 */ "kwcolumn_opt",
149850         -  /*  283 */ "create_vtab",
149851         -  /*  284 */ "vtabarglist",
149852         -  /*  285 */ "vtabarg",
149853         -  /*  286 */ "vtabargtoken",
149854         -  /*  287 */ "lp",
149855         -  /*  288 */ "anylist",
149856         -  /*  289 */ "windowdefn_list",
149857         -  /*  290 */ "windowdefn",
149858         -  /*  291 */ "window",
149859         -  /*  292 */ "frame_opt",
149860         -  /*  293 */ "part_opt",
149861         -  /*  294 */ "filter_opt",
149862         -  /*  295 */ "range_or_rows",
149863         -  /*  296 */ "frame_bound",
149864         -  /*  297 */ "frame_bound_s",
149865         -  /*  298 */ "frame_bound_e",
149866         -  /*  299 */ "frame_exclude_opt",
149867         -  /*  300 */ "frame_exclude",
       149918  +  /*  204 */ "scantok",
       149919  +  /*  205 */ "ccons",
       149920  +  /*  206 */ "term",
       149921  +  /*  207 */ "expr",
       149922  +  /*  208 */ "onconf",
       149923  +  /*  209 */ "sortorder",
       149924  +  /*  210 */ "autoinc",
       149925  +  /*  211 */ "eidlist_opt",
       149926  +  /*  212 */ "refargs",
       149927  +  /*  213 */ "defer_subclause",
       149928  +  /*  214 */ "refarg",
       149929  +  /*  215 */ "refact",
       149930  +  /*  216 */ "init_deferred_pred_opt",
       149931  +  /*  217 */ "conslist",
       149932  +  /*  218 */ "tconscomma",
       149933  +  /*  219 */ "tcons",
       149934  +  /*  220 */ "sortlist",
       149935  +  /*  221 */ "eidlist",
       149936  +  /*  222 */ "defer_subclause_opt",
       149937  +  /*  223 */ "orconf",
       149938  +  /*  224 */ "resolvetype",
       149939  +  /*  225 */ "raisetype",
       149940  +  /*  226 */ "ifexists",
       149941  +  /*  227 */ "fullname",
       149942  +  /*  228 */ "selectnowith",
       149943  +  /*  229 */ "oneselect",
       149944  +  /*  230 */ "wqlist",
       149945  +  /*  231 */ "multiselect_op",
       149946  +  /*  232 */ "distinct",
       149947  +  /*  233 */ "selcollist",
       149948  +  /*  234 */ "from",
       149949  +  /*  235 */ "where_opt",
       149950  +  /*  236 */ "groupby_opt",
       149951  +  /*  237 */ "having_opt",
       149952  +  /*  238 */ "orderby_opt",
       149953  +  /*  239 */ "limit_opt",
       149954  +  /*  240 */ "window_clause",
       149955  +  /*  241 */ "values",
       149956  +  /*  242 */ "nexprlist",
       149957  +  /*  243 */ "sclp",
       149958  +  /*  244 */ "as",
       149959  +  /*  245 */ "seltablist",
       149960  +  /*  246 */ "stl_prefix",
       149961  +  /*  247 */ "joinop",
       149962  +  /*  248 */ "indexed_opt",
       149963  +  /*  249 */ "on_opt",
       149964  +  /*  250 */ "using_opt",
       149965  +  /*  251 */ "exprlist",
       149966  +  /*  252 */ "xfullname",
       149967  +  /*  253 */ "idlist",
       149968  +  /*  254 */ "with",
       149969  +  /*  255 */ "setlist",
       149970  +  /*  256 */ "insert_cmd",
       149971  +  /*  257 */ "idlist_opt",
       149972  +  /*  258 */ "upsert",
       149973  +  /*  259 */ "over_clause",
       149974  +  /*  260 */ "likeop",
       149975  +  /*  261 */ "between_op",
       149976  +  /*  262 */ "in_op",
       149977  +  /*  263 */ "paren_exprlist",
       149978  +  /*  264 */ "case_operand",
       149979  +  /*  265 */ "case_exprlist",
       149980  +  /*  266 */ "case_else",
       149981  +  /*  267 */ "uniqueflag",
       149982  +  /*  268 */ "collate",
       149983  +  /*  269 */ "vinto",
       149984  +  /*  270 */ "nmnum",
       149985  +  /*  271 */ "trigger_decl",
       149986  +  /*  272 */ "trigger_cmd_list",
       149987  +  /*  273 */ "trigger_time",
       149988  +  /*  274 */ "trigger_event",
       149989  +  /*  275 */ "foreach_clause",
       149990  +  /*  276 */ "when_clause",
       149991  +  /*  277 */ "trigger_cmd",
       149992  +  /*  278 */ "trnm",
       149993  +  /*  279 */ "tridxby",
       149994  +  /*  280 */ "database_kw_opt",
       149995  +  /*  281 */ "key_opt",
       149996  +  /*  282 */ "add_column_fullname",
       149997  +  /*  283 */ "kwcolumn_opt",
       149998  +  /*  284 */ "create_vtab",
       149999  +  /*  285 */ "vtabarglist",
       150000  +  /*  286 */ "vtabarg",
       150001  +  /*  287 */ "vtabargtoken",
       150002  +  /*  288 */ "lp",
       150003  +  /*  289 */ "anylist",
       150004  +  /*  290 */ "windowdefn_list",
       150005  +  /*  291 */ "windowdefn",
       150006  +  /*  292 */ "window",
       150007  +  /*  293 */ "frame_opt",
       150008  +  /*  294 */ "part_opt",
       150009  +  /*  295 */ "filter_opt",
       150010  +  /*  296 */ "range_or_rows",
       150011  +  /*  297 */ "frame_bound",
       150012  +  /*  298 */ "frame_bound_s",
       150013  +  /*  299 */ "frame_bound_e",
       150014  +  /*  300 */ "frame_exclude_opt",
       150015  +  /*  301 */ "frame_exclude",
149868 150016   };
149869 150017   #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */
149870 150018   
149871 150019   #ifndef NDEBUG
149872 150020   /* For tracing reduce actions, the names of all rules are required.
149873 150021   */
149874 150022   static const char *const yyRuleName[] = {
................................................................................
149897 150045    /*  22 */ "table_options ::= WITHOUT nm",
149898 150046    /*  23 */ "columnname ::= nm typetoken",
149899 150047    /*  24 */ "typetoken ::=",
149900 150048    /*  25 */ "typetoken ::= typename LP signed RP",
149901 150049    /*  26 */ "typetoken ::= typename LP signed COMMA signed RP",
149902 150050    /*  27 */ "typename ::= typename ID|STRING",
149903 150051    /*  28 */ "scanpt ::=",
149904         - /*  29 */ "ccons ::= CONSTRAINT nm",
149905         - /*  30 */ "ccons ::= DEFAULT scanpt term scanpt",
149906         - /*  31 */ "ccons ::= DEFAULT LP expr RP",
149907         - /*  32 */ "ccons ::= DEFAULT PLUS term scanpt",
149908         - /*  33 */ "ccons ::= DEFAULT MINUS term scanpt",
149909         - /*  34 */ "ccons ::= DEFAULT scanpt ID|INDEXED",
149910         - /*  35 */ "ccons ::= NOT NULL onconf",
149911         - /*  36 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc",
149912         - /*  37 */ "ccons ::= UNIQUE onconf",
149913         - /*  38 */ "ccons ::= CHECK LP expr RP",
149914         - /*  39 */ "ccons ::= REFERENCES nm eidlist_opt refargs",
149915         - /*  40 */ "ccons ::= defer_subclause",
149916         - /*  41 */ "ccons ::= COLLATE ID|STRING",
149917         - /*  42 */ "autoinc ::=",
149918         - /*  43 */ "autoinc ::= AUTOINCR",
149919         - /*  44 */ "refargs ::=",
149920         - /*  45 */ "refargs ::= refargs refarg",
149921         - /*  46 */ "refarg ::= MATCH nm",
149922         - /*  47 */ "refarg ::= ON INSERT refact",
149923         - /*  48 */ "refarg ::= ON DELETE refact",
149924         - /*  49 */ "refarg ::= ON UPDATE refact",
149925         - /*  50 */ "refact ::= SET NULL",
149926         - /*  51 */ "refact ::= SET DEFAULT",
149927         - /*  52 */ "refact ::= CASCADE",
149928         - /*  53 */ "refact ::= RESTRICT",
149929         - /*  54 */ "refact ::= NO ACTION",
149930         - /*  55 */ "defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt",
149931         - /*  56 */ "defer_subclause ::= DEFERRABLE init_deferred_pred_opt",
149932         - /*  57 */ "init_deferred_pred_opt ::=",
149933         - /*  58 */ "init_deferred_pred_opt ::= INITIALLY DEFERRED",
149934         - /*  59 */ "init_deferred_pred_opt ::= INITIALLY IMMEDIATE",
149935         - /*  60 */ "conslist_opt ::=",
149936         - /*  61 */ "tconscomma ::= COMMA",
149937         - /*  62 */ "tcons ::= CONSTRAINT nm",
149938         - /*  63 */ "tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf",
149939         - /*  64 */ "tcons ::= UNIQUE LP sortlist RP onconf",
149940         - /*  65 */ "tcons ::= CHECK LP expr RP onconf",
149941         - /*  66 */ "tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt",
149942         - /*  67 */ "defer_subclause_opt ::=",
149943         - /*  68 */ "onconf ::=",
149944         - /*  69 */ "onconf ::= ON CONFLICT resolvetype",
149945         - /*  70 */ "orconf ::=",
149946         - /*  71 */ "orconf ::= OR resolvetype",
149947         - /*  72 */ "resolvetype ::= IGNORE",
149948         - /*  73 */ "resolvetype ::= REPLACE",
149949         - /*  74 */ "cmd ::= DROP TABLE ifexists fullname",
149950         - /*  75 */ "ifexists ::= IF EXISTS",
149951         - /*  76 */ "ifexists ::=",
149952         - /*  77 */ "cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select",
149953         - /*  78 */ "cmd ::= DROP VIEW ifexists fullname",
149954         - /*  79 */ "cmd ::= select",
149955         - /*  80 */ "select ::= WITH wqlist selectnowith",
149956         - /*  81 */ "select ::= WITH RECURSIVE wqlist selectnowith",
149957         - /*  82 */ "select ::= selectnowith",
149958         - /*  83 */ "selectnowith ::= selectnowith multiselect_op oneselect",
149959         - /*  84 */ "multiselect_op ::= UNION",
149960         - /*  85 */ "multiselect_op ::= UNION ALL",
149961         - /*  86 */ "multiselect_op ::= EXCEPT|INTERSECT",
149962         - /*  87 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt",
149963         - /*  88 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt",
149964         - /*  89 */ "values ::= VALUES LP nexprlist RP",
149965         - /*  90 */ "values ::= values COMMA LP nexprlist RP",
149966         - /*  91 */ "distinct ::= DISTINCT",
149967         - /*  92 */ "distinct ::= ALL",
149968         - /*  93 */ "distinct ::=",
149969         - /*  94 */ "sclp ::=",
149970         - /*  95 */ "selcollist ::= sclp scanpt expr scanpt as",
149971         - /*  96 */ "selcollist ::= sclp scanpt STAR",
149972         - /*  97 */ "selcollist ::= sclp scanpt nm DOT STAR",
149973         - /*  98 */ "as ::= AS nm",
149974         - /*  99 */ "as ::=",
149975         - /* 100 */ "from ::=",
149976         - /* 101 */ "from ::= FROM seltablist",
149977         - /* 102 */ "stl_prefix ::= seltablist joinop",
149978         - /* 103 */ "stl_prefix ::=",
149979         - /* 104 */ "seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt",
149980         - /* 105 */ "seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt",
149981         - /* 106 */ "seltablist ::= stl_prefix LP select RP as on_opt using_opt",
149982         - /* 107 */ "seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt",
149983         - /* 108 */ "dbnm ::=",
149984         - /* 109 */ "dbnm ::= DOT nm",
149985         - /* 110 */ "fullname ::= nm",
149986         - /* 111 */ "fullname ::= nm DOT nm",
149987         - /* 112 */ "xfullname ::= nm",
149988         - /* 113 */ "xfullname ::= nm DOT nm",
149989         - /* 114 */ "xfullname ::= nm DOT nm AS nm",
149990         - /* 115 */ "xfullname ::= nm AS nm",
149991         - /* 116 */ "joinop ::= COMMA|JOIN",
149992         - /* 117 */ "joinop ::= JOIN_KW JOIN",
149993         - /* 118 */ "joinop ::= JOIN_KW nm JOIN",
149994         - /* 119 */ "joinop ::= JOIN_KW nm nm JOIN",
149995         - /* 120 */ "on_opt ::= ON expr",
149996         - /* 121 */ "on_opt ::=",
149997         - /* 122 */ "indexed_opt ::=",
149998         - /* 123 */ "indexed_opt ::= INDEXED BY nm",
149999         - /* 124 */ "indexed_opt ::= NOT INDEXED",
150000         - /* 125 */ "using_opt ::= USING LP idlist RP",
150001         - /* 126 */ "using_opt ::=",
150002         - /* 127 */ "orderby_opt ::=",
150003         - /* 128 */ "orderby_opt ::= ORDER BY sortlist",
150004         - /* 129 */ "sortlist ::= sortlist COMMA expr sortorder",
150005         - /* 130 */ "sortlist ::= expr sortorder",
150006         - /* 131 */ "sortorder ::= ASC",
150007         - /* 132 */ "sortorder ::= DESC",
150008         - /* 133 */ "sortorder ::=",
150009         - /* 134 */ "groupby_opt ::=",
150010         - /* 135 */ "groupby_opt ::= GROUP BY nexprlist",
150011         - /* 136 */ "having_opt ::=",
150012         - /* 137 */ "having_opt ::= HAVING expr",
150013         - /* 138 */ "limit_opt ::=",
150014         - /* 139 */ "limit_opt ::= LIMIT expr",
150015         - /* 140 */ "limit_opt ::= LIMIT expr OFFSET expr",
150016         - /* 141 */ "limit_opt ::= LIMIT expr COMMA expr",
150017         - /* 142 */ "cmd ::= with DELETE FROM xfullname indexed_opt where_opt",
150018         - /* 143 */ "where_opt ::=",
150019         - /* 144 */ "where_opt ::= WHERE expr",
150020         - /* 145 */ "cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt",
150021         - /* 146 */ "setlist ::= setlist COMMA nm EQ expr",
150022         - /* 147 */ "setlist ::= setlist COMMA LP idlist RP EQ expr",
150023         - /* 148 */ "setlist ::= nm EQ expr",
150024         - /* 149 */ "setlist ::= LP idlist RP EQ expr",
150025         - /* 150 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert",
150026         - /* 151 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES",
150027         - /* 152 */ "upsert ::=",
150028         - /* 153 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt",
150029         - /* 154 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING",
150030         - /* 155 */ "upsert ::= ON CONFLICT DO NOTHING",
150031         - /* 156 */ "insert_cmd ::= INSERT orconf",
150032         - /* 157 */ "insert_cmd ::= REPLACE",
150033         - /* 158 */ "idlist_opt ::=",
150034         - /* 159 */ "idlist_opt ::= LP idlist RP",
150035         - /* 160 */ "idlist ::= idlist COMMA nm",
150036         - /* 161 */ "idlist ::= nm",
150037         - /* 162 */ "expr ::= LP expr RP",
150038         - /* 163 */ "expr ::= ID|INDEXED",
150039         - /* 164 */ "expr ::= JOIN_KW",
150040         - /* 165 */ "expr ::= nm DOT nm",
150041         - /* 166 */ "expr ::= nm DOT nm DOT nm",
150042         - /* 167 */ "term ::= NULL|FLOAT|BLOB",
150043         - /* 168 */ "term ::= STRING",
150044         - /* 169 */ "term ::= INTEGER",
150045         - /* 170 */ "expr ::= VARIABLE",
150046         - /* 171 */ "expr ::= expr COLLATE ID|STRING",
150047         - /* 172 */ "expr ::= CAST LP expr AS typetoken RP",
150048         - /* 173 */ "expr ::= ID|INDEXED LP distinct exprlist RP",
150049         - /* 174 */ "expr ::= ID|INDEXED LP STAR RP",
150050         - /* 175 */ "expr ::= ID|INDEXED LP distinct exprlist RP over_clause",
150051         - /* 176 */ "expr ::= ID|INDEXED LP STAR RP over_clause",
150052         - /* 177 */ "term ::= CTIME_KW",
150053         - /* 178 */ "expr ::= LP nexprlist COMMA expr RP",
150054         - /* 179 */ "expr ::= expr AND expr",
150055         - /* 180 */ "expr ::= expr OR expr",
150056         - /* 181 */ "expr ::= expr LT|GT|GE|LE expr",
150057         - /* 182 */ "expr ::= expr EQ|NE expr",
150058         - /* 183 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr",
150059         - /* 184 */ "expr ::= expr PLUS|MINUS expr",
150060         - /* 185 */ "expr ::= expr STAR|SLASH|REM expr",
150061         - /* 186 */ "expr ::= expr CONCAT expr",
150062         - /* 187 */ "likeop ::= NOT LIKE_KW|MATCH",
150063         - /* 188 */ "expr ::= expr likeop expr",
150064         - /* 189 */ "expr ::= expr likeop expr ESCAPE expr",
150065         - /* 190 */ "expr ::= expr ISNULL|NOTNULL",
150066         - /* 191 */ "expr ::= expr NOT NULL",
150067         - /* 192 */ "expr ::= expr IS expr",
150068         - /* 193 */ "expr ::= expr IS NOT expr",
150069         - /* 194 */ "expr ::= NOT expr",
150070         - /* 195 */ "expr ::= BITNOT expr",
150071         - /* 196 */ "expr ::= PLUS|MINUS expr",
150072         - /* 197 */ "between_op ::= BETWEEN",
150073         - /* 198 */ "between_op ::= NOT BETWEEN",
150074         - /* 199 */ "expr ::= expr between_op expr AND expr",
150075         - /* 200 */ "in_op ::= IN",
150076         - /* 201 */ "in_op ::= NOT IN",
150077         - /* 202 */ "expr ::= expr in_op LP exprlist RP",
150078         - /* 203 */ "expr ::= LP select RP",
150079         - /* 204 */ "expr ::= expr in_op LP select RP",
150080         - /* 205 */ "expr ::= expr in_op nm dbnm paren_exprlist",
150081         - /* 206 */ "expr ::= EXISTS LP select RP",
150082         - /* 207 */ "expr ::= CASE case_operand case_exprlist case_else END",
150083         - /* 208 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr",
150084         - /* 209 */ "case_exprlist ::= WHEN expr THEN expr",
150085         - /* 210 */ "case_else ::= ELSE expr",
150086         - /* 211 */ "case_else ::=",
150087         - /* 212 */ "case_operand ::= expr",
150088         - /* 213 */ "case_operand ::=",
150089         - /* 214 */ "exprlist ::=",
150090         - /* 215 */ "nexprlist ::= nexprlist COMMA expr",
150091         - /* 216 */ "nexprlist ::= expr",
150092         - /* 217 */ "paren_exprlist ::=",
150093         - /* 218 */ "paren_exprlist ::= LP exprlist RP",
150094         - /* 219 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt",
150095         - /* 220 */ "uniqueflag ::= UNIQUE",
150096         - /* 221 */ "uniqueflag ::=",
150097         - /* 222 */ "eidlist_opt ::=",
150098         - /* 223 */ "eidlist_opt ::= LP eidlist RP",
150099         - /* 224 */ "eidlist ::= eidlist COMMA nm collate sortorder",
150100         - /* 225 */ "eidlist ::= nm collate sortorder",
150101         - /* 226 */ "collate ::=",
150102         - /* 227 */ "collate ::= COLLATE ID|STRING",
150103         - /* 228 */ "cmd ::= DROP INDEX ifexists fullname",
150104         - /* 229 */ "cmd ::= VACUUM vinto",
150105         - /* 230 */ "cmd ::= VACUUM nm vinto",
150106         - /* 231 */ "vinto ::= INTO expr",
150107         - /* 232 */ "vinto ::=",
150108         - /* 233 */ "cmd ::= PRAGMA nm dbnm",
150109         - /* 234 */ "cmd ::= PRAGMA nm dbnm EQ nmnum",
150110         - /* 235 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP",
150111         - /* 236 */ "cmd ::= PRAGMA nm dbnm EQ minus_num",
150112         - /* 237 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP",
150113         - /* 238 */ "plus_num ::= PLUS INTEGER|FLOAT",
150114         - /* 239 */ "minus_num ::= MINUS INTEGER|FLOAT",
150115         - /* 240 */ "cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END",
150116         - /* 241 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause",
150117         - /* 242 */ "trigger_time ::= BEFORE|AFTER",
150118         - /* 243 */ "trigger_time ::= INSTEAD OF",
150119         - /* 244 */ "trigger_time ::=",
150120         - /* 245 */ "trigger_event ::= DELETE|INSERT",
150121         - /* 246 */ "trigger_event ::= UPDATE",
150122         - /* 247 */ "trigger_event ::= UPDATE OF idlist",
150123         - /* 248 */ "when_clause ::=",
150124         - /* 249 */ "when_clause ::= WHEN expr",
150125         - /* 250 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI",
150126         - /* 251 */ "trigger_cmd_list ::= trigger_cmd SEMI",
150127         - /* 252 */ "trnm ::= nm DOT nm",
150128         - /* 253 */ "tridxby ::= INDEXED BY nm",
150129         - /* 254 */ "tridxby ::= NOT INDEXED",
150130         - /* 255 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt",
150131         - /* 256 */ "trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt",
150132         - /* 257 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt",
150133         - /* 258 */ "trigger_cmd ::= scanpt select scanpt",
150134         - /* 259 */ "expr ::= RAISE LP IGNORE RP",
150135         - /* 260 */ "expr ::= RAISE LP raisetype COMMA nm RP",
150136         - /* 261 */ "raisetype ::= ROLLBACK",
150137         - /* 262 */ "raisetype ::= ABORT",
150138         - /* 263 */ "raisetype ::= FAIL",
150139         - /* 264 */ "cmd ::= DROP TRIGGER ifexists fullname",
150140         - /* 265 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt",
150141         - /* 266 */ "cmd ::= DETACH database_kw_opt expr",
150142         - /* 267 */ "key_opt ::=",
150143         - /* 268 */ "key_opt ::= KEY expr",
150144         - /* 269 */ "cmd ::= REINDEX",
150145         - /* 270 */ "cmd ::= REINDEX nm dbnm",
150146         - /* 271 */ "cmd ::= ANALYZE",
150147         - /* 272 */ "cmd ::= ANALYZE nm dbnm",
150148         - /* 273 */ "cmd ::= ALTER TABLE fullname RENAME TO nm",
150149         - /* 274 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist",
150150         - /* 275 */ "add_column_fullname ::= fullname",
150151         - /* 276 */ "cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm",
150152         - /* 277 */ "cmd ::= create_vtab",
150153         - /* 278 */ "cmd ::= create_vtab LP vtabarglist RP",
150154         - /* 279 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm",
150155         - /* 280 */ "vtabarg ::=",
150156         - /* 281 */ "vtabargtoken ::= ANY",
150157         - /* 282 */ "vtabargtoken ::= lp anylist RP",
150158         - /* 283 */ "lp ::= LP",
150159         - /* 284 */ "with ::= WITH wqlist",
150160         - /* 285 */ "with ::= WITH RECURSIVE wqlist",
150161         - /* 286 */ "wqlist ::= nm eidlist_opt AS LP select RP",
150162         - /* 287 */ "wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP",
150163         - /* 288 */ "windowdefn_list ::= windowdefn",
150164         - /* 289 */ "windowdefn_list ::= windowdefn_list COMMA windowdefn",
150165         - /* 290 */ "windowdefn ::= nm AS LP window RP",
150166         - /* 291 */ "window ::= PARTITION BY nexprlist orderby_opt frame_opt",
150167         - /* 292 */ "window ::= nm PARTITION BY nexprlist orderby_opt frame_opt",
150168         - /* 293 */ "window ::= ORDER BY sortlist frame_opt",
150169         - /* 294 */ "window ::= nm ORDER BY sortlist frame_opt",
150170         - /* 295 */ "window ::= frame_opt",
150171         - /* 296 */ "window ::= nm frame_opt",
150172         - /* 297 */ "frame_opt ::=",
150173         - /* 298 */ "frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt",
150174         - /* 299 */ "frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt",
150175         - /* 300 */ "range_or_rows ::= RANGE|ROWS|GROUPS",
150176         - /* 301 */ "frame_bound_s ::= frame_bound",
150177         - /* 302 */ "frame_bound_s ::= UNBOUNDED PRECEDING",
150178         - /* 303 */ "frame_bound_e ::= frame_bound",
150179         - /* 304 */ "frame_bound_e ::= UNBOUNDED FOLLOWING",
150180         - /* 305 */ "frame_bound ::= expr PRECEDING|FOLLOWING",
150181         - /* 306 */ "frame_bound ::= CURRENT ROW",
150182         - /* 307 */ "frame_exclude_opt ::=",
150183         - /* 308 */ "frame_exclude_opt ::= EXCLUDE frame_exclude",
150184         - /* 309 */ "frame_exclude ::= NO OTHERS",
150185         - /* 310 */ "frame_exclude ::= CURRENT ROW",
150186         - /* 311 */ "frame_exclude ::= GROUP|TIES",
150187         - /* 312 */ "window_clause ::= WINDOW windowdefn_list",
150188         - /* 313 */ "over_clause ::= filter_opt OVER LP window RP",
150189         - /* 314 */ "over_clause ::= filter_opt OVER nm",
150190         - /* 315 */ "filter_opt ::=",
150191         - /* 316 */ "filter_opt ::= FILTER LP WHERE expr RP",
150192         - /* 317 */ "input ::= cmdlist",
150193         - /* 318 */ "cmdlist ::= cmdlist ecmd",
150194         - /* 319 */ "cmdlist ::= ecmd",
150195         - /* 320 */ "ecmd ::= SEMI",
150196         - /* 321 */ "ecmd ::= cmdx SEMI",
150197         - /* 322 */ "ecmd ::= explain cmdx",
150198         - /* 323 */ "trans_opt ::=",
150199         - /* 324 */ "trans_opt ::= TRANSACTION",
150200         - /* 325 */ "trans_opt ::= TRANSACTION nm",
150201         - /* 326 */ "savepoint_opt ::= SAVEPOINT",
150202         - /* 327 */ "savepoint_opt ::=",
150203         - /* 328 */ "cmd ::= create_table create_table_args",
150204         - /* 329 */ "columnlist ::= columnlist COMMA columnname carglist",
150205         - /* 330 */ "columnlist ::= columnname carglist",
150206         - /* 331 */ "nm ::= ID|INDEXED",
150207         - /* 332 */ "nm ::= STRING",
150208         - /* 333 */ "nm ::= JOIN_KW",
150209         - /* 334 */ "typetoken ::= typename",
150210         - /* 335 */ "typename ::= ID|STRING",
150211         - /* 336 */ "signed ::= plus_num",
150212         - /* 337 */ "signed ::= minus_num",
150213         - /* 338 */ "carglist ::= carglist ccons",
150214         - /* 339 */ "carglist ::=",
150215         - /* 340 */ "ccons ::= NULL onconf",
150216         - /* 341 */ "conslist_opt ::= COMMA conslist",
150217         - /* 342 */ "conslist ::= conslist tconscomma tcons",
150218         - /* 343 */ "conslist ::= tcons",
150219         - /* 344 */ "tconscomma ::=",
150220         - /* 345 */ "defer_subclause_opt ::= defer_subclause",
150221         - /* 346 */ "resolvetype ::= raisetype",
150222         - /* 347 */ "selectnowith ::= oneselect",
150223         - /* 348 */ "oneselect ::= values",
150224         - /* 349 */ "sclp ::= selcollist COMMA",
150225         - /* 350 */ "as ::= ID|STRING",
150226         - /* 351 */ "expr ::= term",
150227         - /* 352 */ "likeop ::= LIKE_KW|MATCH",
150228         - /* 353 */ "exprlist ::= nexprlist",
150229         - /* 354 */ "nmnum ::= plus_num",
150230         - /* 355 */ "nmnum ::= nm",
150231         - /* 356 */ "nmnum ::= ON",
150232         - /* 357 */ "nmnum ::= DELETE",
150233         - /* 358 */ "nmnum ::= DEFAULT",
150234         - /* 359 */ "plus_num ::= INTEGER|FLOAT",
150235         - /* 360 */ "foreach_clause ::=",
150236         - /* 361 */ "foreach_clause ::= FOR EACH ROW",
150237         - /* 362 */ "trnm ::= nm",
150238         - /* 363 */ "tridxby ::=",
150239         - /* 364 */ "database_kw_opt ::= DATABASE",
150240         - /* 365 */ "database_kw_opt ::=",
150241         - /* 366 */ "kwcolumn_opt ::=",
150242         - /* 367 */ "kwcolumn_opt ::= COLUMNKW",
150243         - /* 368 */ "vtabarglist ::= vtabarg",
150244         - /* 369 */ "vtabarglist ::= vtabarglist COMMA vtabarg",
150245         - /* 370 */ "vtabarg ::= vtabarg vtabargtoken",
150246         - /* 371 */ "anylist ::=",
150247         - /* 372 */ "anylist ::= anylist LP anylist RP",
150248         - /* 373 */ "anylist ::= anylist ANY",
150249         - /* 374 */ "with ::=",
       150052  + /*  29 */ "scantok ::=",
       150053  + /*  30 */ "ccons ::= CONSTRAINT nm",
       150054  + /*  31 */ "ccons ::= DEFAULT scantok term",
       150055  + /*  32 */ "ccons ::= DEFAULT LP expr RP",
       150056  + /*  33 */ "ccons ::= DEFAULT PLUS scantok term",
       150057  + /*  34 */ "ccons ::= DEFAULT MINUS scantok term",
       150058  + /*  35 */ "ccons ::= DEFAULT scantok ID|INDEXED",
       150059  + /*  36 */ "ccons ::= NOT NULL onconf",
       150060  + /*  37 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc",
       150061  + /*  38 */ "ccons ::= UNIQUE onconf",
       150062  + /*  39 */ "ccons ::= CHECK LP expr RP",
       150063  + /*  40 */ "ccons ::= REFERENCES nm eidlist_opt refargs",
       150064  + /*  41 */ "ccons ::= defer_subclause",
       150065  + /*  42 */ "ccons ::= COLLATE ID|STRING",
       150066  + /*  43 */ "autoinc ::=",
       150067  + /*  44 */ "autoinc ::= AUTOINCR",
       150068  + /*  45 */ "refargs ::=",
       150069  + /*  46 */ "refargs ::= refargs refarg",
       150070  + /*  47 */ "refarg ::= MATCH nm",
       150071  + /*  48 */ "refarg ::= ON INSERT refact",
       150072  + /*  49 */ "refarg ::= ON DELETE refact",
       150073  + /*  50 */ "refarg ::= ON UPDATE refact",
       150074  + /*  51 */ "refact ::= SET NULL",
       150075  + /*  52 */ "refact ::= SET DEFAULT",
       150076  + /*  53 */ "refact ::= CASCADE",
       150077  + /*  54 */ "refact ::= RESTRICT",
       150078  + /*  55 */ "refact ::= NO ACTION",
       150079  + /*  56 */ "defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt",
       150080  + /*  57 */ "defer_subclause ::= DEFERRABLE init_deferred_pred_opt",
       150081  + /*  58 */ "init_deferred_pred_opt ::=",
       150082  + /*  59 */ "init_deferred_pred_opt ::= INITIALLY DEFERRED",
       150083  + /*  60 */ "init_deferred_pred_opt ::= INITIALLY IMMEDIATE",
       150084  + /*  61 */ "conslist_opt ::=",
       150085  + /*  62 */ "tconscomma ::= COMMA",
       150086  + /*  63 */ "tcons ::= CONSTRAINT nm",
       150087  + /*  64 */ "tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf",
       150088  + /*  65 */ "tcons ::= UNIQUE LP sortlist RP onconf",
       150089  + /*  66 */ "tcons ::= CHECK LP expr RP onconf",
       150090  + /*  67 */ "tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt",
       150091  + /*  68 */ "defer_subclause_opt ::=",
       150092  + /*  69 */ "onconf ::=",
       150093  + /*  70 */ "onconf ::= ON CONFLICT resolvetype",
       150094  + /*  71 */ "orconf ::=",
       150095  + /*  72 */ "orconf ::= OR resolvetype",
       150096  + /*  73 */ "resolvetype ::= IGNORE",
       150097  + /*  74 */ "resolvetype ::= REPLACE",
       150098  + /*  75 */ "cmd ::= DROP TABLE ifexists fullname",
       150099  + /*  76 */ "ifexists ::= IF EXISTS",
       150100  + /*  77 */ "ifexists ::=",
       150101  + /*  78 */ "cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select",
       150102  + /*  79 */ "cmd ::= DROP VIEW ifexists fullname",
       150103  + /*  80 */ "cmd ::= select",
       150104  + /*  81 */ "select ::= WITH wqlist selectnowith",
       150105  + /*  82 */ "select ::= WITH RECURSIVE wqlist selectnowith",
       150106  + /*  83 */ "select ::= selectnowith",
       150107  + /*  84 */ "selectnowith ::= selectnowith multiselect_op oneselect",
       150108  + /*  85 */ "multiselect_op ::= UNION",
       150109  + /*  86 */ "multiselect_op ::= UNION ALL",
       150110  + /*  87 */ "multiselect_op ::= EXCEPT|INTERSECT",
       150111  + /*  88 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt",
       150112  + /*  89 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt",
       150113  + /*  90 */ "values ::= VALUES LP nexprlist RP",
       150114  + /*  91 */ "values ::= values COMMA LP nexprlist RP",
       150115  + /*  92 */ "distinct ::= DISTINCT",
       150116  + /*  93 */ "distinct ::= ALL",
       150117  + /*  94 */ "distinct ::=",
       150118  + /*  95 */ "sclp ::=",
       150119  + /*  96 */ "selcollist ::= sclp scanpt expr scanpt as",
       150120  + /*  97 */ "selcollist ::= sclp scanpt STAR",
       150121  + /*  98 */ "selcollist ::= sclp scanpt nm DOT STAR",
       150122  + /*  99 */ "as ::= AS nm",
       150123  + /* 100 */ "as ::=",
       150124  + /* 101 */ "from ::=",
       150125  + /* 102 */ "from ::= FROM seltablist",
       150126  + /* 103 */ "stl_prefix ::= seltablist joinop",
       150127  + /* 104 */ "stl_prefix ::=",
       150128  + /* 105 */ "seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt",
       150129  + /* 106 */ "seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt",
       150130  + /* 107 */ "seltablist ::= stl_prefix LP select RP as on_opt using_opt",
       150131  + /* 108 */ "seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt",
       150132  + /* 109 */ "dbnm ::=",
       150133  + /* 110 */ "dbnm ::= DOT nm",
       150134  + /* 111 */ "fullname ::= nm",
       150135  + /* 112 */ "fullname ::= nm DOT nm",
       150136  + /* 113 */ "xfullname ::= nm",
       150137  + /* 114 */ "xfullname ::= nm DOT nm",
       150138  + /* 115 */ "xfullname ::= nm DOT nm AS nm",
       150139  + /* 116 */ "xfullname ::= nm AS nm",
       150140  + /* 117 */ "joinop ::= COMMA|JOIN",
       150141  + /* 118 */ "joinop ::= JOIN_KW JOIN",
       150142  + /* 119 */ "joinop ::= JOIN_KW nm JOIN",
       150143  + /* 120 */ "joinop ::= JOIN_KW nm nm JOIN",
       150144  + /* 121 */ "on_opt ::= ON expr",
       150145  + /* 122 */ "on_opt ::=",
       150146  + /* 123 */ "indexed_opt ::=",
       150147  + /* 124 */ "indexed_opt ::= INDEXED BY nm",
       150148  + /* 125 */ "indexed_opt ::= NOT INDEXED",
       150149  + /* 126 */ "using_opt ::= USING LP idlist RP",
       150150  + /* 127 */ "using_opt ::=",
       150151  + /* 128 */ "orderby_opt ::=",
       150152  + /* 129 */ "orderby_opt ::= ORDER BY sortlist",
       150153  + /* 130 */ "sortlist ::= sortlist COMMA expr sortorder",
       150154  + /* 131 */ "sortlist ::= expr sortorder",
       150155  + /* 132 */ "sortorder ::= ASC",
       150156  + /* 133 */ "sortorder ::= DESC",
       150157  + /* 134 */ "sortorder ::=",
       150158  + /* 135 */ "groupby_opt ::=",
       150159  + /* 136 */ "groupby_opt ::= GROUP BY nexprlist",
       150160  + /* 137 */ "having_opt ::=",
       150161  + /* 138 */ "having_opt ::= HAVING expr",
       150162  + /* 139 */ "limit_opt ::=",
       150163  + /* 140 */ "limit_opt ::= LIMIT expr",
       150164  + /* 141 */ "limit_opt ::= LIMIT expr OFFSET expr",
       150165  + /* 142 */ "limit_opt ::= LIMIT expr COMMA expr",
       150166  + /* 143 */ "cmd ::= with DELETE FROM xfullname indexed_opt where_opt",
       150167  + /* 144 */ "where_opt ::=",
       150168  + /* 145 */ "where_opt ::= WHERE expr",
       150169  + /* 146 */ "cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt",
       150170  + /* 147 */ "setlist ::= setlist COMMA nm EQ expr",
       150171  + /* 148 */ "setlist ::= setlist COMMA LP idlist RP EQ expr",
       150172  + /* 149 */ "setlist ::= nm EQ expr",
       150173  + /* 150 */ "setlist ::= LP idlist RP EQ expr",
       150174  + /* 151 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert",
       150175  + /* 152 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES",
       150176  + /* 153 */ "upsert ::=",
       150177  + /* 154 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt",
       150178  + /* 155 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING",
       150179  + /* 156 */ "upsert ::= ON CONFLICT DO NOTHING",
       150180  + /* 157 */ "insert_cmd ::= INSERT orconf",
       150181  + /* 158 */ "insert_cmd ::= REPLACE",
       150182  + /* 159 */ "idlist_opt ::=",
       150183  + /* 160 */ "idlist_opt ::= LP idlist RP",
       150184  + /* 161 */ "idlist ::= idlist COMMA nm",
       150185  + /* 162 */ "idlist ::= nm",
       150186  + /* 163 */ "expr ::= LP expr RP",
       150187  + /* 164 */ "expr ::= ID|INDEXED",
       150188  + /* 165 */ "expr ::= JOIN_KW",
       150189  + /* 166 */ "expr ::= nm DOT nm",
       150190  + /* 167 */ "expr ::= nm DOT nm DOT nm",
       150191  + /* 168 */ "term ::= NULL|FLOAT|BLOB",
       150192  + /* 169 */ "term ::= STRING",
       150193  + /* 170 */ "term ::= INTEGER",
       150194  + /* 171 */ "expr ::= VARIABLE",
       150195  + /* 172 */ "expr ::= expr COLLATE ID|STRING",
       150196  + /* 173 */ "expr ::= CAST LP expr AS typetoken RP",
       150197  + /* 174 */ "expr ::= ID|INDEXED LP distinct exprlist RP",
       150198  + /* 175 */ "expr ::= ID|INDEXED LP STAR RP",
       150199  + /* 176 */ "expr ::= ID|INDEXED LP distinct exprlist RP over_clause",
       150200  + /* 177 */ "expr ::= ID|INDEXED LP STAR RP over_clause",
       150201  + /* 178 */ "term ::= CTIME_KW",
       150202  + /* 179 */ "expr ::= LP nexprlist COMMA expr RP",
       150203  + /* 180 */ "expr ::= expr AND expr",
       150204  + /* 181 */ "expr ::= expr OR expr",
       150205  + /* 182 */ "expr ::= expr LT|GT|GE|LE expr",
       150206  + /* 183 */ "expr ::= expr EQ|NE expr",
       150207  + /* 184 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr",
       150208  + /* 185 */ "expr ::= expr PLUS|MINUS expr",
       150209  + /* 186 */ "expr ::= expr STAR|SLASH|REM expr",
       150210  + /* 187 */ "expr ::= expr CONCAT expr",
       150211  + /* 188 */ "likeop ::= NOT LIKE_KW|MATCH",
       150212  + /* 189 */ "expr ::= expr likeop expr",
       150213  + /* 190 */ "expr ::= expr likeop expr ESCAPE expr",
       150214  + /* 191 */ "expr ::= expr ISNULL|NOTNULL",
       150215  + /* 192 */ "expr ::= expr NOT NULL",
       150216  + /* 193 */ "expr ::= expr IS expr",
       150217  + /* 194 */ "expr ::= expr IS NOT expr",
       150218  + /* 195 */ "expr ::= NOT expr",
       150219  + /* 196 */ "expr ::= BITNOT expr",
       150220  + /* 197 */ "expr ::= PLUS|MINUS expr",
       150221  + /* 198 */ "between_op ::= BETWEEN",
       150222  + /* 199 */ "between_op ::= NOT BETWEEN",
       150223  + /* 200 */ "expr ::= expr between_op expr AND expr",
       150224  + /* 201 */ "in_op ::= IN",
       150225  + /* 202 */ "in_op ::= NOT IN",
       150226  + /* 203 */ "expr ::= expr in_op LP exprlist RP",
       150227  + /* 204 */ "expr ::= LP select RP",
       150228  + /* 205 */ "expr ::= expr in_op LP select RP",
       150229  + /* 206 */ "expr ::= expr in_op nm dbnm paren_exprlist",
       150230  + /* 207 */ "expr ::= EXISTS LP select RP",
       150231  + /* 208 */ "expr ::= CASE case_operand case_exprlist case_else END",
       150232  + /* 209 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr",
       150233  + /* 210 */ "case_exprlist ::= WHEN expr THEN expr",
       150234  + /* 211 */ "case_else ::= ELSE expr",
       150235  + /* 212 */ "case_else ::=",
       150236  + /* 213 */ "case_operand ::= expr",
       150237  + /* 214 */ "case_operand ::=",
       150238  + /* 215 */ "exprlist ::=",
       150239  + /* 216 */ "nexprlist ::= nexprlist COMMA expr",
       150240  + /* 217 */ "nexprlist ::= expr",
       150241  + /* 218 */ "paren_exprlist ::=",
       150242  + /* 219 */ "paren_exprlist ::= LP exprlist RP",
       150243  + /* 220 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt",
       150244  + /* 221 */ "uniqueflag ::= UNIQUE",
       150245  + /* 222 */ "uniqueflag ::=",
       150246  + /* 223 */ "eidlist_opt ::=",
       150247  + /* 224 */ "eidlist_opt ::= LP eidlist RP",
       150248  + /* 225 */ "eidlist ::= eidlist COMMA nm collate sortorder",
       150249  + /* 226 */ "eidlist ::= nm collate sortorder",
       150250  + /* 227 */ "collate ::=",
       150251  + /* 228 */ "collate ::= COLLATE ID|STRING",
       150252  + /* 229 */ "cmd ::= DROP INDEX ifexists fullname",
       150253  + /* 230 */ "cmd ::= VACUUM vinto",
       150254  + /* 231 */ "cmd ::= VACUUM nm vinto",
       150255  + /* 232 */ "vinto ::= INTO expr",
       150256  + /* 233 */ "vinto ::=",
       150257  + /* 234 */ "cmd ::= PRAGMA nm dbnm",
       150258  + /* 235 */ "cmd ::= PRAGMA nm dbnm EQ nmnum",
       150259  + /* 236 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP",
       150260  + /* 237 */ "cmd ::= PRAGMA nm dbnm EQ minus_num",
       150261  + /* 238 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP",
       150262  + /* 239 */ "plus_num ::= PLUS INTEGER|FLOAT",
       150263  + /* 240 */ "minus_num ::= MINUS INTEGER|FLOAT",
       150264  + /* 241 */ "cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END",
       150265  + /* 242 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause",
       150266  + /* 243 */ "trigger_time ::= BEFORE|AFTER",
       150267  + /* 244 */ "trigger_time ::= INSTEAD OF",
       150268  + /* 245 */ "trigger_time ::=",
       150269  + /* 246 */ "trigger_event ::= DELETE|INSERT",
       150270  + /* 247 */ "trigger_event ::= UPDATE",
       150271  + /* 248 */ "trigger_event ::= UPDATE OF idlist",
       150272  + /* 249 */ "when_clause ::=",
       150273  + /* 250 */ "when_clause ::= WHEN expr",
       150274  + /* 251 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI",
       150275  + /* 252 */ "trigger_cmd_list ::= trigger_cmd SEMI",
       150276  + /* 253 */ "trnm ::= nm DOT nm",
       150277  + /* 254 */ "tridxby ::= INDEXED BY nm",
       150278  + /* 255 */ "tridxby ::= NOT INDEXED",
       150279  + /* 256 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt",
       150280  + /* 257 */ "trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt",
       150281  + /* 258 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt",
       150282  + /* 259 */ "trigger_cmd ::= scanpt select scanpt",
       150283  + /* 260 */ "expr ::= RAISE LP IGNORE RP",
       150284  + /* 261 */ "expr ::= RAISE LP raisetype COMMA nm RP",
       150285  + /* 262 */ "raisetype ::= ROLLBACK",
       150286  + /* 263 */ "raisetype ::= ABORT",
       150287  + /* 264 */ "raisetype ::= FAIL",
       150288  + /* 265 */ "cmd ::= DROP TRIGGER ifexists fullname",
       150289  + /* 266 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt",
       150290  + /* 267 */ "cmd ::= DETACH database_kw_opt expr",
       150291  + /* 268 */ "key_opt ::=",
       150292  + /* 269 */ "key_opt ::= KEY expr",
       150293  + /* 270 */ "cmd ::= REINDEX",
       150294  + /* 271 */ "cmd ::= REINDEX nm dbnm",
       150295  + /* 272 */ "cmd ::= ANALYZE",
       150296  + /* 273 */ "cmd ::= ANALYZE nm dbnm",
       150297  + /* 274 */ "cmd ::= ALTER TABLE fullname RENAME TO nm",
       150298  + /* 275 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist",
       150299  + /* 276 */ "add_column_fullname ::= fullname",
       150300  + /* 277 */ "cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm",
       150301  + /* 278 */ "cmd ::= create_vtab",
       150302  + /* 279 */ "cmd ::= create_vtab LP vtabarglist RP",
       150303  + /* 280 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm",
       150304  + /* 281 */ "vtabarg ::=",
       150305  + /* 282 */ "vtabargtoken ::= ANY",
       150306  + /* 283 */ "vtabargtoken ::= lp anylist RP",
       150307  + /* 284 */ "lp ::= LP",
       150308  + /* 285 */ "with ::= WITH wqlist",
       150309  + /* 286 */ "with ::= WITH RECURSIVE wqlist",
       150310  + /* 287 */ "wqlist ::= nm eidlist_opt AS LP select RP",
       150311  + /* 288 */ "wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP",
       150312  + /* 289 */ "windowdefn_list ::= windowdefn",
       150313  + /* 290 */ "windowdefn_list ::= windowdefn_list COMMA windowdefn",
       150314  + /* 291 */ "windowdefn ::= nm AS LP window RP",
       150315  + /* 292 */ "window ::= PARTITION BY nexprlist orderby_opt frame_opt",
       150316  + /* 293 */ "window ::= nm PARTITION BY nexprlist orderby_opt frame_opt",
       150317  + /* 294 */ "window ::= ORDER BY sortlist frame_opt",
       150318  + /* 295 */ "window ::= nm ORDER BY sortlist frame_opt",
       150319  + /* 296 */ "window ::= frame_opt",
       150320  + /* 297 */ "window ::= nm frame_opt",
       150321  + /* 298 */ "frame_opt ::=",
       150322  + /* 299 */ "frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt",
       150323  + /* 300 */ "frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt",
       150324  + /* 301 */ "range_or_rows ::= RANGE|ROWS|GROUPS",
       150325  + /* 302 */ "frame_bound_s ::= frame_bound",
       150326  + /* 303 */ "frame_bound_s ::= UNBOUNDED PRECEDING",
       150327  + /* 304 */ "frame_bound_e ::= frame_bound",
       150328  + /* 305 */ "frame_bound_e ::= UNBOUNDED FOLLOWING",
       150329  + /* 306 */ "frame_bound ::= expr PRECEDING|FOLLOWING",
       150330  + /* 307 */ "frame_bound ::= CURRENT ROW",
       150331  + /* 308 */ "frame_exclude_opt ::=",
       150332  + /* 309 */ "frame_exclude_opt ::= EXCLUDE frame_exclude",
       150333  + /* 310 */ "frame_exclude ::= NO OTHERS",
       150334  + /* 311 */ "frame_exclude ::= CURRENT ROW",
       150335  + /* 312 */ "frame_exclude ::= GROUP|TIES",
       150336  + /* 313 */ "window_clause ::= WINDOW windowdefn_list",
       150337  + /* 314 */ "over_clause ::= filter_opt OVER LP window RP",
       150338  + /* 315 */ "over_clause ::= filter_opt OVER nm",
       150339  + /* 316 */ "filter_opt ::=",
       150340  + /* 317 */ "filter_opt ::= FILTER LP WHERE expr RP",
       150341  + /* 318 */ "input ::= cmdlist",
       150342  + /* 319 */ "cmdlist ::= cmdlist ecmd",
       150343  + /* 320 */ "cmdlist ::= ecmd",
       150344  + /* 321 */ "ecmd ::= SEMI",
       150345  + /* 322 */ "ecmd ::= cmdx SEMI",
       150346  + /* 323 */ "ecmd ::= explain cmdx",
       150347  + /* 324 */ "trans_opt ::=",
       150348  + /* 325 */ "trans_opt ::= TRANSACTION",
       150349  + /* 326 */ "trans_opt ::= TRANSACTION nm",
       150350  + /* 327 */ "savepoint_opt ::= SAVEPOINT",
       150351  + /* 328 */ "savepoint_opt ::=",
       150352  + /* 329 */ "cmd ::= create_table create_table_args",
       150353  + /* 330 */ "columnlist ::= columnlist COMMA columnname carglist",
       150354  + /* 331 */ "columnlist ::= columnname carglist",
       150355  + /* 332 */ "nm ::= ID|INDEXED",
       150356  + /* 333 */ "nm ::= STRING",
       150357  + /* 334 */ "nm ::= JOIN_KW",
       150358  + /* 335 */ "typetoken ::= typename",
       150359  + /* 336 */ "typename ::= ID|STRING",
       150360  + /* 337 */ "signed ::= plus_num",
       150361  + /* 338 */ "signed ::= minus_num",
       150362  + /* 339 */ "carglist ::= carglist ccons",
       150363  + /* 340 */ "carglist ::=",
       150364  + /* 341 */ "ccons ::= NULL onconf",
       150365  + /* 342 */ "conslist_opt ::= COMMA conslist",
       150366  + /* 343 */ "conslist ::= conslist tconscomma tcons",
       150367  + /* 344 */ "conslist ::= tcons",
       150368  + /* 345 */ "tconscomma ::=",
       150369  + /* 346 */ "defer_subclause_opt ::= defer_subclause",
       150370  + /* 347 */ "resolvetype ::= raisetype",
       150371  + /* 348 */ "selectnowith ::= oneselect",
       150372  + /* 349 */ "oneselect ::= values",
       150373  + /* 350 */ "sclp ::= selcollist COMMA",
       150374  + /* 351 */ "as ::= ID|STRING",
       150375  + /* 352 */ "expr ::= term",
       150376  + /* 353 */ "likeop ::= LIKE_KW|MATCH",
       150377  + /* 354 */ "exprlist ::= nexprlist",
       150378  + /* 355 */ "nmnum ::= plus_num",
       150379  + /* 356 */ "nmnum ::= nm",
       150380  + /* 357 */ "nmnum ::= ON",
       150381  + /* 358 */ "nmnum ::= DELETE",
       150382  + /* 359 */ "nmnum ::= DEFAULT",
       150383  + /* 360 */ "plus_num ::= INTEGER|FLOAT",
       150384  + /* 361 */ "foreach_clause ::=",
       150385  + /* 362 */ "foreach_clause ::= FOR EACH ROW",
       150386  + /* 363 */ "trnm ::= nm",
       150387  + /* 364 */ "tridxby ::=",
       150388  + /* 365 */ "database_kw_opt ::= DATABASE",
       150389  + /* 366 */ "database_kw_opt ::=",
       150390  + /* 367 */ "kwcolumn_opt ::=",
       150391  + /* 368 */ "kwcolumn_opt ::= COLUMNKW",
       150392  + /* 369 */ "vtabarglist ::= vtabarg",
       150393  + /* 370 */ "vtabarglist ::= vtabarglist COMMA vtabarg",
       150394  + /* 371 */ "vtabarg ::= vtabarg vtabargtoken",
       150395  + /* 372 */ "anylist ::=",
       150396  + /* 373 */ "anylist ::= anylist LP anylist RP",
       150397  + /* 374 */ "anylist ::= anylist ANY",
       150398  + /* 375 */ "with ::=",
150250 150399   };
150251 150400   #endif /* NDEBUG */
150252 150401   
150253 150402   
150254 150403   #if YYSTACKDEPTH<=0
150255 150404   /*
150256 150405   ** Try to increase the size of the parser stack.  Return the number
................................................................................
150369 150518       **
150370 150519       ** Note: during a reduce, the only symbols destroyed are those
150371 150520       ** which appear on the RHS of the rule, but which are *not* used
150372 150521       ** inside the C code.
150373 150522       */
150374 150523   /********* Begin destructor definitions ***************************************/
150375 150524       case 195: /* select */
150376         -    case 227: /* selectnowith */
150377         -    case 228: /* oneselect */
150378         -    case 240: /* values */
150379         -{
150380         -sqlite3SelectDelete(pParse->db, (yypminor->yy457));
150381         -}
150382         -      break;
150383         -    case 205: /* term */
150384         -    case 206: /* expr */
150385         -    case 234: /* where_opt */
150386         -    case 236: /* having_opt */
150387         -    case 248: /* on_opt */
150388         -    case 263: /* case_operand */
150389         -    case 265: /* case_else */
150390         -    case 268: /* vinto */
150391         -    case 275: /* when_clause */
150392         -    case 280: /* key_opt */
150393         -    case 294: /* filter_opt */
150394         -{
150395         -sqlite3ExprDelete(pParse->db, (yypminor->yy524));
150396         -}
150397         -      break;
150398         -    case 210: /* eidlist_opt */
150399         -    case 219: /* sortlist */
150400         -    case 220: /* eidlist */
150401         -    case 232: /* selcollist */
150402         -    case 235: /* groupby_opt */
150403         -    case 237: /* orderby_opt */
150404         -    case 241: /* nexprlist */
150405         -    case 242: /* sclp */
150406         -    case 250: /* exprlist */
150407         -    case 254: /* setlist */
150408         -    case 262: /* paren_exprlist */
150409         -    case 264: /* case_exprlist */
150410         -    case 293: /* part_opt */
150411         -{
150412         -sqlite3ExprListDelete(pParse->db, (yypminor->yy434));
150413         -}
150414         -      break;
150415         -    case 226: /* fullname */
150416         -    case 233: /* from */
150417         -    case 244: /* seltablist */
150418         -    case 245: /* stl_prefix */
150419         -    case 251: /* xfullname */
150420         -{
150421         -sqlite3SrcListDelete(pParse->db, (yypminor->yy483));
150422         -}
150423         -      break;
150424         -    case 229: /* wqlist */
150425         -{
150426         -sqlite3WithDelete(pParse->db, (yypminor->yy59));
150427         -}
150428         -      break;
150429         -    case 239: /* window_clause */
150430         -    case 289: /* windowdefn_list */
150431         -{
150432         -sqlite3WindowListDelete(pParse->db, (yypminor->yy295));
150433         -}
150434         -      break;
150435         -    case 249: /* using_opt */
150436         -    case 252: /* idlist */
150437         -    case 256: /* idlist_opt */
150438         -{
150439         -sqlite3IdListDelete(pParse->db, (yypminor->yy62));
150440         -}
150441         -      break;
150442         -    case 258: /* over_clause */
150443         -    case 290: /* windowdefn */
150444         -    case 291: /* window */
150445         -    case 292: /* frame_opt */
150446         -{
150447         -sqlite3WindowDelete(pParse->db, (yypminor->yy295));
150448         -}
150449         -      break;
150450         -    case 271: /* trigger_cmd_list */
150451         -    case 276: /* trigger_cmd */
150452         -{
150453         -sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy455));
150454         -}
150455         -      break;
150456         -    case 273: /* trigger_event */
150457         -{
150458         -sqlite3IdListDelete(pParse->db, (yypminor->yy90).b);
150459         -}
150460         -      break;
150461         -    case 296: /* frame_bound */
150462         -    case 297: /* frame_bound_s */
150463         -    case 298: /* frame_bound_e */
150464         -{
150465         -sqlite3ExprDelete(pParse->db, (yypminor->yy201).pExpr);
       150525  +    case 228: /* selectnowith */
       150526  +    case 229: /* oneselect */
       150527  +    case 241: /* values */
       150528  +{
       150529  +sqlite3SelectDelete(pParse->db, (yypminor->yy391));
       150530  +}
       150531  +      break;
       150532  +    case 206: /* term */
       150533  +    case 207: /* expr */
       150534  +    case 235: /* where_opt */
       150535  +    case 237: /* having_opt */
       150536  +    case 249: /* on_opt */
       150537  +    case 264: /* case_operand */
       150538  +    case 266: /* case_else */
       150539  +    case 269: /* vinto */
       150540  +    case 276: /* when_clause */
       150541  +    case 281: /* key_opt */
       150542  +    case 295: /* filter_opt */
       150543  +{
       150544  +sqlite3ExprDelete(pParse->db, (yypminor->yy102));
       150545  +}
       150546  +      break;
       150547  +    case 211: /* eidlist_opt */
       150548  +    case 220: /* sortlist */
       150549  +    case 221: /* eidlist */
       150550  +    case 233: /* selcollist */
       150551  +    case 236: /* groupby_opt */
       150552  +    case 238: /* orderby_opt */
       150553  +    case 242: /* nexprlist */
       150554  +    case 243: /* sclp */
       150555  +    case 251: /* exprlist */
       150556  +    case 255: /* setlist */
       150557  +    case 263: /* paren_exprlist */
       150558  +    case 265: /* case_exprlist */
       150559  +    case 294: /* part_opt */
       150560  +{
       150561  +sqlite3ExprListDelete(pParse->db, (yypminor->yy94));
       150562  +}
       150563  +      break;
       150564  +    case 227: /* fullname */
       150565  +    case 234: /* from */
       150566  +    case 245: /* seltablist */
       150567  +    case 246: /* stl_prefix */
       150568  +    case 252: /* xfullname */
       150569  +{
       150570  +sqlite3SrcListDelete(pParse->db, (yypminor->yy407));
       150571  +}
       150572  +      break;
       150573  +    case 230: /* wqlist */
       150574  +{
       150575  +sqlite3WithDelete(pParse->db, (yypminor->yy243));
       150576  +}
       150577  +      break;
       150578  +    case 240: /* window_clause */
       150579  +    case 290: /* windowdefn_list */
       150580  +{
       150581  +sqlite3WindowListDelete(pParse->db, (yypminor->yy379));
       150582  +}
       150583  +      break;
       150584  +    case 250: /* using_opt */
       150585  +    case 253: /* idlist */
       150586  +    case 257: /* idlist_opt */
       150587  +{
       150588  +sqlite3IdListDelete(pParse->db, (yypminor->yy76));
       150589  +}
       150590  +      break;
       150591  +    case 259: /* over_clause */
       150592  +    case 291: /* windowdefn */
       150593  +    case 292: /* window */
       150594  +    case 293: /* frame_opt */
       150595  +{
       150596  +sqlite3WindowDelete(pParse->db, (yypminor->yy379));
       150597  +}
       150598  +      break;
       150599  +    case 272: /* trigger_cmd_list */
       150600  +    case 277: /* trigger_cmd */
       150601  +{
       150602  +sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy11));
       150603  +}
       150604  +      break;
       150605  +    case 274: /* trigger_event */
       150606  +{
       150607  +sqlite3IdListDelete(pParse->db, (yypminor->yy298).b);
       150608  +}
       150609  +      break;
       150610  +    case 297: /* frame_bound */
       150611  +    case 298: /* frame_bound_s */
       150612  +    case 299: /* frame_bound_e */
       150613  +{
       150614  +sqlite3ExprDelete(pParse->db, (yypminor->yy389).pExpr);
150466 150615   }
150467 150616         break;
150468 150617   /********* End destructor definitions *****************************************/
150469 150618       default:  break;   /* If no destructor action specified: do nothing */
150470 150619     }
150471 150620   }
150472 150621   
................................................................................
150782 150931      194,  /* (22) table_options ::= WITHOUT nm */
150783 150932      196,  /* (23) columnname ::= nm typetoken */
150784 150933      198,  /* (24) typetoken ::= */
150785 150934      198,  /* (25) typetoken ::= typename LP signed RP */
150786 150935      198,  /* (26) typetoken ::= typename LP signed COMMA signed RP */
150787 150936      199,  /* (27) typename ::= typename ID|STRING */
150788 150937      203,  /* (28) scanpt ::= */
150789         -   204,  /* (29) ccons ::= CONSTRAINT nm */
150790         -   204,  /* (30) ccons ::= DEFAULT scanpt term scanpt */
150791         -   204,  /* (31) ccons ::= DEFAULT LP expr RP */
150792         -   204,  /* (32) ccons ::= DEFAULT PLUS term scanpt */
150793         -   204,  /* (33) ccons ::= DEFAULT MINUS term scanpt */
150794         -   204,  /* (34) ccons ::= DEFAULT scanpt ID|INDEXED */
150795         -   204,  /* (35) ccons ::= NOT NULL onconf */
150796         -   204,  /* (36) ccons ::= PRIMARY KEY sortorder onconf autoinc */
150797         -   204,  /* (37) ccons ::= UNIQUE onconf */
150798         -   204,  /* (38) ccons ::= CHECK LP expr RP */
150799         -   204,  /* (39) ccons ::= REFERENCES nm eidlist_opt refargs */
150800         -   204,  /* (40) ccons ::= defer_subclause */
150801         -   204,  /* (41) ccons ::= COLLATE ID|STRING */
150802         -   209,  /* (42) autoinc ::= */
150803         -   209,  /* (43) autoinc ::= AUTOINCR */
150804         -   211,  /* (44) refargs ::= */
150805         -   211,  /* (45) refargs ::= refargs refarg */
150806         -   213,  /* (46) refarg ::= MATCH nm */
150807         -   213,  /* (47) refarg ::= ON INSERT refact */
150808         -   213,  /* (48) refarg ::= ON DELETE refact */
150809         -   213,  /* (49) refarg ::= ON UPDATE refact */
150810         -   214,  /* (50) refact ::= SET NULL */
150811         -   214,  /* (51) refact ::= SET DEFAULT */
150812         -   214,  /* (52) refact ::= CASCADE */
150813         -   214,  /* (53) refact ::= RESTRICT */
150814         -   214,  /* (54) refact ::= NO ACTION */
150815         -   212,  /* (55) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
150816         -   212,  /* (56) defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
150817         -   215,  /* (57) init_deferred_pred_opt ::= */
150818         -   215,  /* (58) init_deferred_pred_opt ::= INITIALLY DEFERRED */
150819         -   215,  /* (59) init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
150820         -   193,  /* (60) conslist_opt ::= */
150821         -   217,  /* (61) tconscomma ::= COMMA */
150822         -   218,  /* (62) tcons ::= CONSTRAINT nm */
150823         -   218,  /* (63) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
150824         -   218,  /* (64) tcons ::= UNIQUE LP sortlist RP onconf */
150825         -   218,  /* (65) tcons ::= CHECK LP expr RP onconf */
150826         -   218,  /* (66) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
150827         -   221,  /* (67) defer_subclause_opt ::= */
150828         -   207,  /* (68) onconf ::= */
150829         -   207,  /* (69) onconf ::= ON CONFLICT resolvetype */
150830         -   222,  /* (70) orconf ::= */
150831         -   222,  /* (71) orconf ::= OR resolvetype */
150832         -   223,  /* (72) resolvetype ::= IGNORE */
150833         -   223,  /* (73) resolvetype ::= REPLACE */
150834         -   181,  /* (74) cmd ::= DROP TABLE ifexists fullname */
150835         -   225,  /* (75) ifexists ::= IF EXISTS */
150836         -   225,  /* (76) ifexists ::= */
150837         -   181,  /* (77) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
150838         -   181,  /* (78) cmd ::= DROP VIEW ifexists fullname */
150839         -   181,  /* (79) cmd ::= select */
150840         -   195,  /* (80) select ::= WITH wqlist selectnowith */
150841         -   195,  /* (81) select ::= WITH RECURSIVE wqlist selectnowith */
150842         -   195,  /* (82) select ::= selectnowith */
150843         -   227,  /* (83) selectnowith ::= selectnowith multiselect_op oneselect */
150844         -   230,  /* (84) multiselect_op ::= UNION */
150845         -   230,  /* (85) multiselect_op ::= UNION ALL */
150846         -   230,  /* (86) multiselect_op ::= EXCEPT|INTERSECT */
150847         -   228,  /* (87) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
150848         -   228,  /* (88) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
150849         -   240,  /* (89) values ::= VALUES LP nexprlist RP */
150850         -   240,  /* (90) values ::= values COMMA LP nexprlist RP */
150851         -   231,  /* (91) distinct ::= DISTINCT */
150852         -   231,  /* (92) distinct ::= ALL */
150853         -   231,  /* (93) distinct ::= */
150854         -   242,  /* (94) sclp ::= */
150855         -   232,  /* (95) selcollist ::= sclp scanpt expr scanpt as */
150856         -   232,  /* (96) selcollist ::= sclp scanpt STAR */
150857         -   232,  /* (97) selcollist ::= sclp scanpt nm DOT STAR */
150858         -   243,  /* (98) as ::= AS nm */
150859         -   243,  /* (99) as ::= */
150860         -   233,  /* (100) from ::= */
150861         -   233,  /* (101) from ::= FROM seltablist */
150862         -   245,  /* (102) stl_prefix ::= seltablist joinop */
150863         -   245,  /* (103) stl_prefix ::= */
150864         -   244,  /* (104) seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
150865         -   244,  /* (105) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */
150866         -   244,  /* (106) seltablist ::= stl_prefix LP select RP as on_opt using_opt */
150867         -   244,  /* (107) seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
150868         -   191,  /* (108) dbnm ::= */
150869         -   191,  /* (109) dbnm ::= DOT nm */
150870         -   226,  /* (110) fullname ::= nm */
150871         -   226,  /* (111) fullname ::= nm DOT nm */
150872         -   251,  /* (112) xfullname ::= nm */
150873         -   251,  /* (113) xfullname ::= nm DOT nm */
150874         -   251,  /* (114) xfullname ::= nm DOT nm AS nm */
150875         -   251,  /* (115) xfullname ::= nm AS nm */
150876         -   246,  /* (116) joinop ::= COMMA|JOIN */
150877         -   246,  /* (117) joinop ::= JOIN_KW JOIN */
150878         -   246,  /* (118) joinop ::= JOIN_KW nm JOIN */
150879         -   246,  /* (119) joinop ::= JOIN_KW nm nm JOIN */
150880         -   248,  /* (120) on_opt ::= ON expr */
150881         -   248,  /* (121) on_opt ::= */
150882         -   247,  /* (122) indexed_opt ::= */
150883         -   247,  /* (123) indexed_opt ::= INDEXED BY nm */
150884         -   247,  /* (124) indexed_opt ::= NOT INDEXED */
150885         -   249,  /* (125) using_opt ::= USING LP idlist RP */
150886         -   249,  /* (126) using_opt ::= */
150887         -   237,  /* (127) orderby_opt ::= */
150888         -   237,  /* (128) orderby_opt ::= ORDER BY sortlist */
150889         -   219,  /* (129) sortlist ::= sortlist COMMA expr sortorder */
150890         -   219,  /* (130) sortlist ::= expr sortorder */
150891         -   208,  /* (131) sortorder ::= ASC */
150892         -   208,  /* (132) sortorder ::= DESC */
150893         -   208,  /* (133) sortorder ::= */
150894         -   235,  /* (134) groupby_opt ::= */
150895         -   235,  /* (135) groupby_opt ::= GROUP BY nexprlist */
150896         -   236,  /* (136) having_opt ::= */
150897         -   236,  /* (137) having_opt ::= HAVING expr */
150898         -   238,  /* (138) limit_opt ::= */
150899         -   238,  /* (139) limit_opt ::= LIMIT expr */
150900         -   238,  /* (140) limit_opt ::= LIMIT expr OFFSET expr */
150901         -   238,  /* (141) limit_opt ::= LIMIT expr COMMA expr */
150902         -   181,  /* (142) cmd ::= with DELETE FROM xfullname indexed_opt where_opt */
150903         -   234,  /* (143) where_opt ::= */
150904         -   234,  /* (144) where_opt ::= WHERE expr */
150905         -   181,  /* (145) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt */
150906         -   254,  /* (146) setlist ::= setlist COMMA nm EQ expr */
150907         -   254,  /* (147) setlist ::= setlist COMMA LP idlist RP EQ expr */
150908         -   254,  /* (148) setlist ::= nm EQ expr */
150909         -   254,  /* (149) setlist ::= LP idlist RP EQ expr */
150910         -   181,  /* (150) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
150911         -   181,  /* (151) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES */
150912         -   257,  /* (152) upsert ::= */
150913         -   257,  /* (153) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt */
150914         -   257,  /* (154) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING */
150915         -   257,  /* (155) upsert ::= ON CONFLICT DO NOTHING */
150916         -   255,  /* (156) insert_cmd ::= INSERT orconf */
150917         -   255,  /* (157) insert_cmd ::= REPLACE */
150918         -   256,  /* (158) idlist_opt ::= */
150919         -   256,  /* (159) idlist_opt ::= LP idlist RP */
150920         -   252,  /* (160) idlist ::= idlist COMMA nm */
150921         -   252,  /* (161) idlist ::= nm */
150922         -   206,  /* (162) expr ::= LP expr RP */
150923         -   206,  /* (163) expr ::= ID|INDEXED */
150924         -   206,  /* (164) expr ::= JOIN_KW */
150925         -   206,  /* (165) expr ::= nm DOT nm */
150926         -   206,  /* (166) expr ::= nm DOT nm DOT nm */
150927         -   205,  /* (167) term ::= NULL|FLOAT|BLOB */
150928         -   205,  /* (168) term ::= STRING */
150929         -   205,  /* (169) term ::= INTEGER */
150930         -   206,  /* (170) expr ::= VARIABLE */
150931         -   206,  /* (171) expr ::= expr COLLATE ID|STRING */
150932         -   206,  /* (172) expr ::= CAST LP expr AS typetoken RP */
150933         -   206,  /* (173) expr ::= ID|INDEXED LP distinct exprlist RP */
150934         -   206,  /* (174) expr ::= ID|INDEXED LP STAR RP */
150935         -   206,  /* (175) expr ::= ID|INDEXED LP distinct exprlist RP over_clause */
150936         -   206,  /* (176) expr ::= ID|INDEXED LP STAR RP over_clause */
150937         -   205,  /* (177) term ::= CTIME_KW */
150938         -   206,  /* (178) expr ::= LP nexprlist COMMA expr RP */
150939         -   206,  /* (179) expr ::= expr AND expr */
150940         -   206,  /* (180) expr ::= expr OR expr */
150941         -   206,  /* (181) expr ::= expr LT|GT|GE|LE expr */
150942         -   206,  /* (182) expr ::= expr EQ|NE expr */
150943         -   206,  /* (183) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */
150944         -   206,  /* (184) expr ::= expr PLUS|MINUS expr */
150945         -   206,  /* (185) expr ::= expr STAR|SLASH|REM expr */
150946         -   206,  /* (186) expr ::= expr CONCAT expr */
150947         -   259,  /* (187) likeop ::= NOT LIKE_KW|MATCH */
150948         -   206,  /* (188) expr ::= expr likeop expr */
150949         -   206,  /* (189) expr ::= expr likeop expr ESCAPE expr */
150950         -   206,  /* (190) expr ::= expr ISNULL|NOTNULL */
150951         -   206,  /* (191) expr ::= expr NOT NULL */
150952         -   206,  /* (192) expr ::= expr IS expr */
150953         -   206,  /* (193) expr ::= expr IS NOT expr */
150954         -   206,  /* (194) expr ::= NOT expr */
150955         -   206,  /* (195) expr ::= BITNOT expr */
150956         -   206,  /* (196) expr ::= PLUS|MINUS expr */
150957         -   260,  /* (197) between_op ::= BETWEEN */
150958         -   260,  /* (198) between_op ::= NOT BETWEEN */
150959         -   206,  /* (199) expr ::= expr between_op expr AND expr */
150960         -   261,  /* (200) in_op ::= IN */
150961         -   261,  /* (201) in_op ::= NOT IN */
150962         -   206,  /* (202) expr ::= expr in_op LP exprlist RP */
150963         -   206,  /* (203) expr ::= LP select RP */
150964         -   206,  /* (204) expr ::= expr in_op LP select RP */
150965         -   206,  /* (205) expr ::= expr in_op nm dbnm paren_exprlist */
150966         -   206,  /* (206) expr ::= EXISTS LP select RP */
150967         -   206,  /* (207) expr ::= CASE case_operand case_exprlist case_else END */
150968         -   264,  /* (208) case_exprlist ::= case_exprlist WHEN expr THEN expr */
150969         -   264,  /* (209) case_exprlist ::= WHEN expr THEN expr */
150970         -   265,  /* (210) case_else ::= ELSE expr */
150971         -   265,  /* (211) case_else ::= */
150972         -   263,  /* (212) case_operand ::= expr */
150973         -   263,  /* (213) case_operand ::= */
150974         -   250,  /* (214) exprlist ::= */
150975         -   241,  /* (215) nexprlist ::= nexprlist COMMA expr */
150976         -   241,  /* (216) nexprlist ::= expr */
150977         -   262,  /* (217) paren_exprlist ::= */
150978         -   262,  /* (218) paren_exprlist ::= LP exprlist RP */
150979         -   181,  /* (219) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
150980         -   266,  /* (220) uniqueflag ::= UNIQUE */
150981         -   266,  /* (221) uniqueflag ::= */
150982         -   210,  /* (222) eidlist_opt ::= */
150983         -   210,  /* (223) eidlist_opt ::= LP eidlist RP */
150984         -   220,  /* (224) eidlist ::= eidlist COMMA nm collate sortorder */
150985         -   220,  /* (225) eidlist ::= nm collate sortorder */
150986         -   267,  /* (226) collate ::= */
150987         -   267,  /* (227) collate ::= COLLATE ID|STRING */
150988         -   181,  /* (228) cmd ::= DROP INDEX ifexists fullname */
150989         -   181,  /* (229) cmd ::= VACUUM vinto */
150990         -   181,  /* (230) cmd ::= VACUUM nm vinto */
150991         -   268,  /* (231) vinto ::= INTO expr */
150992         -   268,  /* (232) vinto ::= */
150993         -   181,  /* (233) cmd ::= PRAGMA nm dbnm */
150994         -   181,  /* (234) cmd ::= PRAGMA nm dbnm EQ nmnum */
150995         -   181,  /* (235) cmd ::= PRAGMA nm dbnm LP nmnum RP */
150996         -   181,  /* (236) cmd ::= PRAGMA nm dbnm EQ minus_num */
150997         -   181,  /* (237) cmd ::= PRAGMA nm dbnm LP minus_num RP */
150998         -   201,  /* (238) plus_num ::= PLUS INTEGER|FLOAT */
150999         -   202,  /* (239) minus_num ::= MINUS INTEGER|FLOAT */
151000         -   181,  /* (240) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
151001         -   270,  /* (241) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
151002         -   272,  /* (242) trigger_time ::= BEFORE|AFTER */
151003         -   272,  /* (243) trigger_time ::= INSTEAD OF */
151004         -   272,  /* (244) trigger_time ::= */
151005         -   273,  /* (245) trigger_event ::= DELETE|INSERT */
151006         -   273,  /* (246) trigger_event ::= UPDATE */
151007         -   273,  /* (247) trigger_event ::= UPDATE OF idlist */
151008         -   275,  /* (248) when_clause ::= */
151009         -   275,  /* (249) when_clause ::= WHEN expr */
151010         -   271,  /* (250) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
151011         -   271,  /* (251) trigger_cmd_list ::= trigger_cmd SEMI */
151012         -   277,  /* (252) trnm ::= nm DOT nm */
151013         -   278,  /* (253) tridxby ::= INDEXED BY nm */
151014         -   278,  /* (254) tridxby ::= NOT INDEXED */
151015         -   276,  /* (255) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt */
151016         -   276,  /* (256) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
151017         -   276,  /* (257) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
151018         -   276,  /* (258) trigger_cmd ::= scanpt select scanpt */
151019         -   206,  /* (259) expr ::= RAISE LP IGNORE RP */
151020         -   206,  /* (260) expr ::= RAISE LP raisetype COMMA nm RP */
151021         -   224,  /* (261) raisetype ::= ROLLBACK */
151022         -   224,  /* (262) raisetype ::= ABORT */
151023         -   224,  /* (263) raisetype ::= FAIL */
151024         -   181,  /* (264) cmd ::= DROP TRIGGER ifexists fullname */
151025         -   181,  /* (265) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
151026         -   181,  /* (266) cmd ::= DETACH database_kw_opt expr */
151027         -   280,  /* (267) key_opt ::= */
151028         -   280,  /* (268) key_opt ::= KEY expr */
151029         -   181,  /* (269) cmd ::= REINDEX */
151030         -   181,  /* (270) cmd ::= REINDEX nm dbnm */
151031         -   181,  /* (271) cmd ::= ANALYZE */
151032         -   181,  /* (272) cmd ::= ANALYZE nm dbnm */
151033         -   181,  /* (273) cmd ::= ALTER TABLE fullname RENAME TO nm */
151034         -   181,  /* (274) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
151035         -   281,  /* (275) add_column_fullname ::= fullname */
151036         -   181,  /* (276) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
151037         -   181,  /* (277) cmd ::= create_vtab */
151038         -   181,  /* (278) cmd ::= create_vtab LP vtabarglist RP */
151039         -   283,  /* (279) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
151040         -   285,  /* (280) vtabarg ::= */
151041         -   286,  /* (281) vtabargtoken ::= ANY */
151042         -   286,  /* (282) vtabargtoken ::= lp anylist RP */
151043         -   287,  /* (283) lp ::= LP */
151044         -   253,  /* (284) with ::= WITH wqlist */
151045         -   253,  /* (285) with ::= WITH RECURSIVE wqlist */
151046         -   229,  /* (286) wqlist ::= nm eidlist_opt AS LP select RP */
151047         -   229,  /* (287) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
151048         -   289,  /* (288) windowdefn_list ::= windowdefn */
151049         -   289,  /* (289) windowdefn_list ::= windowdefn_list COMMA windowdefn */
151050         -   290,  /* (290) windowdefn ::= nm AS LP window RP */
151051         -   291,  /* (291) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
151052         -   291,  /* (292) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
151053         -   291,  /* (293) window ::= ORDER BY sortlist frame_opt */
151054         -   291,  /* (294) window ::= nm ORDER BY sortlist frame_opt */
151055         -   291,  /* (295) window ::= frame_opt */
151056         -   291,  /* (296) window ::= nm frame_opt */
151057         -   292,  /* (297) frame_opt ::= */
151058         -   292,  /* (298) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
151059         -   292,  /* (299) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
151060         -   295,  /* (300) range_or_rows ::= RANGE|ROWS|GROUPS */
151061         -   297,  /* (301) frame_bound_s ::= frame_bound */
151062         -   297,  /* (302) frame_bound_s ::= UNBOUNDED PRECEDING */
151063         -   298,  /* (303) frame_bound_e ::= frame_bound */
151064         -   298,  /* (304) frame_bound_e ::= UNBOUNDED FOLLOWING */
151065         -   296,  /* (305) frame_bound ::= expr PRECEDING|FOLLOWING */
151066         -   296,  /* (306) frame_bound ::= CURRENT ROW */
151067         -   299,  /* (307) frame_exclude_opt ::= */
151068         -   299,  /* (308) frame_exclude_opt ::= EXCLUDE frame_exclude */
151069         -   300,  /* (309) frame_exclude ::= NO OTHERS */
151070         -   300,  /* (310) frame_exclude ::= CURRENT ROW */
151071         -   300,  /* (311) frame_exclude ::= GROUP|TIES */
151072         -   239,  /* (312) window_clause ::= WINDOW windowdefn_list */
151073         -   258,  /* (313) over_clause ::= filter_opt OVER LP window RP */
151074         -   258,  /* (314) over_clause ::= filter_opt OVER nm */
151075         -   294,  /* (315) filter_opt ::= */
151076         -   294,  /* (316) filter_opt ::= FILTER LP WHERE expr RP */
151077         -   176,  /* (317) input ::= cmdlist */
151078         -   177,  /* (318) cmdlist ::= cmdlist ecmd */
151079         -   177,  /* (319) cmdlist ::= ecmd */
151080         -   178,  /* (320) ecmd ::= SEMI */
151081         -   178,  /* (321) ecmd ::= cmdx SEMI */
151082         -   178,  /* (322) ecmd ::= explain cmdx */
151083         -   183,  /* (323) trans_opt ::= */
151084         -   183,  /* (324) trans_opt ::= TRANSACTION */
151085         -   183,  /* (325) trans_opt ::= TRANSACTION nm */
151086         -   185,  /* (326) savepoint_opt ::= SAVEPOINT */
151087         -   185,  /* (327) savepoint_opt ::= */
151088         -   181,  /* (328) cmd ::= create_table create_table_args */
151089         -   192,  /* (329) columnlist ::= columnlist COMMA columnname carglist */
151090         -   192,  /* (330) columnlist ::= columnname carglist */
151091         -   184,  /* (331) nm ::= ID|INDEXED */
151092         -   184,  /* (332) nm ::= STRING */
151093         -   184,  /* (333) nm ::= JOIN_KW */
151094         -   198,  /* (334) typetoken ::= typename */
151095         -   199,  /* (335) typename ::= ID|STRING */
151096         -   200,  /* (336) signed ::= plus_num */
151097         -   200,  /* (337) signed ::= minus_num */
151098         -   197,  /* (338) carglist ::= carglist ccons */
151099         -   197,  /* (339) carglist ::= */
151100         -   204,  /* (340) ccons ::= NULL onconf */
151101         -   193,  /* (341) conslist_opt ::= COMMA conslist */
151102         -   216,  /* (342) conslist ::= conslist tconscomma tcons */
151103         -   216,  /* (343) conslist ::= tcons */
151104         -   217,  /* (344) tconscomma ::= */
151105         -   221,  /* (345) defer_subclause_opt ::= defer_subclause */
151106         -   223,  /* (346) resolvetype ::= raisetype */
151107         -   227,  /* (347) selectnowith ::= oneselect */
151108         -   228,  /* (348) oneselect ::= values */
151109         -   242,  /* (349) sclp ::= selcollist COMMA */
151110         -   243,  /* (350) as ::= ID|STRING */
151111         -   206,  /* (351) expr ::= term */
151112         -   259,  /* (352) likeop ::= LIKE_KW|MATCH */
151113         -   250,  /* (353) exprlist ::= nexprlist */
151114         -   269,  /* (354) nmnum ::= plus_num */
151115         -   269,  /* (355) nmnum ::= nm */
151116         -   269,  /* (356) nmnum ::= ON */
151117         -   269,  /* (357) nmnum ::= DELETE */
151118         -   269,  /* (358) nmnum ::= DEFAULT */
151119         -   201,  /* (359) plus_num ::= INTEGER|FLOAT */
151120         -   274,  /* (360) foreach_clause ::= */
151121         -   274,  /* (361) foreach_clause ::= FOR EACH ROW */
151122         -   277,  /* (362) trnm ::= nm */
151123         -   278,  /* (363) tridxby ::= */
151124         -   279,  /* (364) database_kw_opt ::= DATABASE */
151125         -   279,  /* (365) database_kw_opt ::= */
151126         -   282,  /* (366) kwcolumn_opt ::= */
151127         -   282,  /* (367) kwcolumn_opt ::= COLUMNKW */
151128         -   284,  /* (368) vtabarglist ::= vtabarg */
151129         -   284,  /* (369) vtabarglist ::= vtabarglist COMMA vtabarg */
151130         -   285,  /* (370) vtabarg ::= vtabarg vtabargtoken */
151131         -   288,  /* (371) anylist ::= */
151132         -   288,  /* (372) anylist ::= anylist LP anylist RP */
151133         -   288,  /* (373) anylist ::= anylist ANY */
151134         -   253,  /* (374) with ::= */
       150938  +   204,  /* (29) scantok ::= */
       150939  +   205,  /* (30) ccons ::= CONSTRAINT nm */
       150940  +   205,  /* (31) ccons ::= DEFAULT scantok term */
       150941  +   205,  /* (32) ccons ::= DEFAULT LP expr RP */
       150942  +   205,  /* (33) ccons ::= DEFAULT PLUS scantok term */
       150943  +   205,  /* (34) ccons ::= DEFAULT MINUS scantok term */
       150944  +   205,  /* (35) ccons ::= DEFAULT scantok ID|INDEXED */
       150945  +   205,  /* (36) ccons ::= NOT NULL onconf */
       150946  +   205,  /* (37) ccons ::= PRIMARY KEY sortorder onconf autoinc */
       150947  +   205,  /* (38) ccons ::= UNIQUE onconf */
       150948  +   205,  /* (39) ccons ::= CHECK LP expr RP */
       150949  +   205,  /* (40) ccons ::= REFERENCES nm eidlist_opt refargs */
       150950  +   205,  /* (41) ccons ::= defer_subclause */
       150951  +   205,  /* (42) ccons ::= COLLATE ID|STRING */
       150952  +   210,  /* (43) autoinc ::= */
       150953  +   210,  /* (44) autoinc ::= AUTOINCR */
       150954  +   212,  /* (45) refargs ::= */
       150955  +   212,  /* (46) refargs ::= refargs refarg */
       150956  +   214,  /* (47) refarg ::= MATCH nm */
       150957  +   214,  /* (48) refarg ::= ON INSERT refact */
       150958  +   214,  /* (49) refarg ::= ON DELETE refact */
       150959  +   214,  /* (50) refarg ::= ON UPDATE refact */
       150960  +   215,  /* (51) refact ::= SET NULL */
       150961  +   215,  /* (52) refact ::= SET DEFAULT */
       150962  +   215,  /* (53) refact ::= CASCADE */
       150963  +   215,  /* (54) refact ::= RESTRICT */
       150964  +   215,  /* (55) refact ::= NO ACTION */
       150965  +   213,  /* (56) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
       150966  +   213,  /* (57) defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
       150967  +   216,  /* (58) init_deferred_pred_opt ::= */
       150968  +   216,  /* (59) init_deferred_pred_opt ::= INITIALLY DEFERRED */
       150969  +   216,  /* (60) init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
       150970  +   193,  /* (61) conslist_opt ::= */
       150971  +   218,  /* (62) tconscomma ::= COMMA */
       150972  +   219,  /* (63) tcons ::= CONSTRAINT nm */
       150973  +   219,  /* (64) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
       150974  +   219,  /* (65) tcons ::= UNIQUE LP sortlist RP onconf */
       150975  +   219,  /* (66) tcons ::= CHECK LP expr RP onconf */
       150976  +   219,  /* (67) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
       150977  +   222,  /* (68) defer_subclause_opt ::= */
       150978  +   208,  /* (69) onconf ::= */
       150979  +   208,  /* (70) onconf ::= ON CONFLICT resolvetype */
       150980  +   223,  /* (71) orconf ::= */
       150981  +   223,  /* (72) orconf ::= OR resolvetype */
       150982  +   224,  /* (73) resolvetype ::= IGNORE */
       150983  +   224,  /* (74) resolvetype ::= REPLACE */
       150984  +   181,  /* (75) cmd ::= DROP TABLE ifexists fullname */
       150985  +   226,  /* (76) ifexists ::= IF EXISTS */
       150986  +   226,  /* (77) ifexists ::= */
       150987  +   181,  /* (78) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
       150988  +   181,  /* (79) cmd ::= DROP VIEW ifexists fullname */
       150989  +   181,  /* (80) cmd ::= select */
       150990  +   195,  /* (81) select ::= WITH wqlist selectnowith */
       150991  +   195,  /* (82) select ::= WITH RECURSIVE wqlist selectnowith */
       150992  +   195,  /* (83) select ::= selectnowith */
       150993  +   228,  /* (84) selectnowith ::= selectnowith multiselect_op oneselect */
       150994  +   231,  /* (85) multiselect_op ::= UNION */
       150995  +   231,  /* (86) multiselect_op ::= UNION ALL */
       150996  +   231,  /* (87) multiselect_op ::= EXCEPT|INTERSECT */
       150997  +   229,  /* (88) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
       150998  +   229,  /* (89) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
       150999  +   241,  /* (90) values ::= VALUES LP nexprlist RP */
       151000  +   241,  /* (91) values ::= values COMMA LP nexprlist RP */
       151001  +   232,  /* (92) distinct ::= DISTINCT */
       151002  +   232,  /* (93) distinct ::= ALL */
       151003  +   232,  /* (94) distinct ::= */
       151004  +   243,  /* (95) sclp ::= */
       151005  +   233,  /* (96) selcollist ::= sclp scanpt expr scanpt as */
       151006  +   233,  /* (97) selcollist ::= sclp scanpt STAR */
       151007  +   233,  /* (98) selcollist ::= sclp scanpt nm DOT STAR */
       151008  +   244,  /* (99) as ::= AS nm */
       151009  +   244,  /* (100) as ::= */
       151010  +   234,  /* (101) from ::= */
       151011  +   234,  /* (102) from ::= FROM seltablist */
       151012  +   246,  /* (103) stl_prefix ::= seltablist joinop */
       151013  +   246,  /* (104) stl_prefix ::= */
       151014  +   245,  /* (105) seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
       151015  +   245,  /* (106) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */
       151016  +   245,  /* (107) seltablist ::= stl_prefix LP select RP as on_opt using_opt */
       151017  +   245,  /* (108) seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
       151018  +   191,  /* (109) dbnm ::= */
       151019  +   191,  /* (110) dbnm ::= DOT nm */
       151020  +   227,  /* (111) fullname ::= nm */
       151021  +   227,  /* (112) fullname ::= nm DOT nm */
       151022  +   252,  /* (113) xfullname ::= nm */
       151023  +   252,  /* (114) xfullname ::= nm DOT nm */
       151024  +   252,  /* (115) xfullname ::= nm DOT nm AS nm */
       151025  +   252,  /* (116) xfullname ::= nm AS nm */
       151026  +   247,  /* (117) joinop ::= COMMA|JOIN */
       151027  +   247,  /* (118) joinop ::= JOIN_KW JOIN */
       151028  +   247,  /* (119) joinop ::= JOIN_KW nm JOIN */
       151029  +   247,  /* (120) joinop ::= JOIN_KW nm nm JOIN */
       151030  +   249,  /* (121) on_opt ::= ON expr */
       151031  +   249,  /* (122) on_opt ::= */
       151032  +   248,  /* (123) indexed_opt ::= */
       151033  +   248,  /* (124) indexed_opt ::= INDEXED BY nm */
       151034  +   248,  /* (125) indexed_opt ::= NOT INDEXED */
       151035  +   250,  /* (126) using_opt ::= USING LP idlist RP */
       151036  +   250,  /* (127) using_opt ::= */
       151037  +   238,  /* (128) orderby_opt ::= */
       151038  +   238,  /* (129) orderby_opt ::= ORDER BY sortlist */
       151039  +   220,  /* (130) sortlist ::= sortlist COMMA expr sortorder */
       151040  +   220,  /* (131) sortlist ::= expr sortorder */
       151041  +   209,  /* (132) sortorder ::= ASC */
       151042  +   209,  /* (133) sortorder ::= DESC */
       151043  +   209,  /* (134) sortorder ::= */
       151044  +   236,  /* (135) groupby_opt ::= */
       151045  +   236,  /* (136) groupby_opt ::= GROUP BY nexprlist */
       151046  +   237,  /* (137) having_opt ::= */
       151047  +   237,  /* (138) having_opt ::= HAVING expr */
       151048  +   239,  /* (139) limit_opt ::= */
       151049  +   239,  /* (140) limit_opt ::= LIMIT expr */
       151050  +   239,  /* (141) limit_opt ::= LIMIT expr OFFSET expr */
       151051  +   239,  /* (142) limit_opt ::= LIMIT expr COMMA expr */
       151052  +   181,  /* (143) cmd ::= with DELETE FROM xfullname indexed_opt where_opt */
       151053  +   235,  /* (144) where_opt ::= */
       151054  +   235,  /* (145) where_opt ::= WHERE expr */
       151055  +   181,  /* (146) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt */
       151056  +   255,  /* (147) setlist ::= setlist COMMA nm EQ expr */
       151057  +   255,  /* (148) setlist ::= setlist COMMA LP idlist RP EQ expr */
       151058  +   255,  /* (149) setlist ::= nm EQ expr */
       151059  +   255,  /* (150) setlist ::= LP idlist RP EQ expr */
       151060  +   181,  /* (151) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
       151061  +   181,  /* (152) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES */
       151062  +   258,  /* (153) upsert ::= */
       151063  +   258,  /* (154) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt */
       151064  +   258,  /* (155) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING */
       151065  +   258,  /* (156) upsert ::= ON CONFLICT DO NOTHING */
       151066  +   256,  /* (157) insert_cmd ::= INSERT orconf */
       151067  +   256,  /* (158) insert_cmd ::= REPLACE */
       151068  +   257,  /* (159) idlist_opt ::= */
       151069  +   257,  /* (160) idlist_opt ::= LP idlist RP */
       151070  +   253,  /* (161) idlist ::= idlist COMMA nm */
       151071  +   253,  /* (162) idlist ::= nm */
       151072  +   207,  /* (163) expr ::= LP expr RP */
       151073  +   207,  /* (164) expr ::= ID|INDEXED */
       151074  +   207,  /* (165) expr ::= JOIN_KW */
       151075  +   207,  /* (166) expr ::= nm DOT nm */
       151076  +   207,  /* (167) expr ::= nm DOT nm DOT nm */
       151077  +   206,  /* (168) term ::= NULL|FLOAT|BLOB */
       151078  +   206,  /* (169) term ::= STRING */
       151079  +   206,  /* (170) term ::= INTEGER */
       151080  +   207,  /* (171) expr ::= VARIABLE */
       151081  +   207,  /* (172) expr ::= expr COLLATE ID|STRING */
       151082  +   207,  /* (173) expr ::= CAST LP expr AS typetoken RP */
       151083  +   207,  /* (174) expr ::= ID|INDEXED LP distinct exprlist RP */
       151084  +   207,  /* (175) expr ::= ID|INDEXED LP STAR RP */
       151085  +   207,  /* (176) expr ::= ID|INDEXED LP distinct exprlist RP over_clause */
       151086  +   207,  /* (177) expr ::= ID|INDEXED LP STAR RP over_clause */
       151087  +   206,  /* (178) term ::= CTIME_KW */
       151088  +   207,  /* (179) expr ::= LP nexprlist COMMA expr RP */
       151089  +   207,  /* (180) expr ::= expr AND expr */
       151090  +   207,  /* (181) expr ::= expr OR expr */
       151091  +   207,  /* (182) expr ::= expr LT|GT|GE|LE expr */
       151092  +   207,  /* (183) expr ::= expr EQ|NE expr */
       151093  +   207,  /* (184) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */
       151094  +   207,  /* (185) expr ::= expr PLUS|MINUS expr */
       151095  +   207,  /* (186) expr ::= expr STAR|SLASH|REM expr */
       151096  +   207,  /* (187) expr ::= expr CONCAT expr */
       151097  +   260,  /* (188) likeop ::= NOT LIKE_KW|MATCH */
       151098  +   207,  /* (189) expr ::= expr likeop expr */
       151099  +   207,  /* (190) expr ::= expr likeop expr ESCAPE expr */
       151100  +   207,  /* (191) expr ::= expr ISNULL|NOTNULL */
       151101  +   207,  /* (192) expr ::= expr NOT NULL */
       151102  +   207,  /* (193) expr ::= expr IS expr */
       151103  +   207,  /* (194) expr ::= expr IS NOT expr */
       151104  +   207,  /* (195) expr ::= NOT expr */
       151105  +   207,  /* (196) expr ::= BITNOT expr */
       151106  +   207,  /* (197) expr ::= PLUS|MINUS expr */
       151107  +   261,  /* (198) between_op ::= BETWEEN */
       151108  +   261,  /* (199) between_op ::= NOT BETWEEN */
       151109  +   207,  /* (200) expr ::= expr between_op expr AND expr */
       151110  +   262,  /* (201) in_op ::= IN */
       151111  +   262,  /* (202) in_op ::= NOT IN */
       151112  +   207,  /* (203) expr ::= expr in_op LP exprlist RP */
       151113  +   207,  /* (204) expr ::= LP select RP */
       151114  +   207,  /* (205) expr ::= expr in_op LP select RP */
       151115  +   207,  /* (206) expr ::= expr in_op nm dbnm paren_exprlist */
       151116  +   207,  /* (207) expr ::= EXISTS LP select RP */
       151117  +   207,  /* (208) expr ::= CASE case_operand case_exprlist case_else END */
       151118  +   265,  /* (209) case_exprlist ::= case_exprlist WHEN expr THEN expr */
       151119  +   265,  /* (210) case_exprlist ::= WHEN expr THEN expr */
       151120  +   266,  /* (211) case_else ::= ELSE expr */
       151121  +   266,  /* (212) case_else ::= */
       151122  +   264,  /* (213) case_operand ::= expr */
       151123  +   264,  /* (214) case_operand ::= */
       151124  +   251,  /* (215) exprlist ::= */
       151125  +   242,  /* (216) nexprlist ::= nexprlist COMMA expr */
       151126  +   242,  /* (217) nexprlist ::= expr */
       151127  +   263,  /* (218) paren_exprlist ::= */
       151128  +   263,  /* (219) paren_exprlist ::= LP exprlist RP */
       151129  +   181,  /* (220) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
       151130  +   267,  /* (221) uniqueflag ::= UNIQUE */
       151131  +   267,  /* (222) uniqueflag ::= */
       151132  +   211,  /* (223) eidlist_opt ::= */
       151133  +   211,  /* (224) eidlist_opt ::= LP eidlist RP */
       151134  +   221,  /* (225) eidlist ::= eidlist COMMA nm collate sortorder */
       151135  +   221,  /* (226) eidlist ::= nm collate sortorder */
       151136  +   268,  /* (227) collate ::= */
       151137  +   268,  /* (228) collate ::= COLLATE ID|STRING */
       151138  +   181,  /* (229) cmd ::= DROP INDEX ifexists fullname */
       151139  +   181,  /* (230) cmd ::= VACUUM vinto */
       151140  +   181,  /* (231) cmd ::= VACUUM nm vinto */
       151141  +   269,  /* (232) vinto ::= INTO expr */
       151142  +   269,  /* (233) vinto ::= */
       151143  +   181,  /* (234) cmd ::= PRAGMA nm dbnm */
       151144  +   181,  /* (235) cmd ::= PRAGMA nm dbnm EQ nmnum */
       151145  +   181,  /* (236) cmd ::= PRAGMA nm dbnm LP nmnum RP */
       151146  +   181,  /* (237) cmd ::= PRAGMA nm dbnm EQ minus_num */
       151147  +   181,  /* (238) cmd ::= PRAGMA nm dbnm LP minus_num RP */
       151148  +   201,  /* (239) plus_num ::= PLUS INTEGER|FLOAT */
       151149  +   202,  /* (240) minus_num ::= MINUS INTEGER|FLOAT */
       151150  +   181,  /* (241) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
       151151  +   271,  /* (242) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
       151152  +   273,  /* (243) trigger_time ::= BEFORE|AFTER */
       151153  +   273,  /* (244) trigger_time ::= INSTEAD OF */
       151154  +   273,  /* (245) trigger_time ::= */
       151155  +   274,  /* (246) trigger_event ::= DELETE|INSERT */
       151156  +   274,  /* (247) trigger_event ::= UPDATE */
       151157  +   274,  /* (248) trigger_event ::= UPDATE OF idlist */
       151158  +   276,  /* (249) when_clause ::= */
       151159  +   276,  /* (250) when_clause ::= WHEN expr */
       151160  +   272,  /* (251) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
       151161  +   272,  /* (252) trigger_cmd_list ::= trigger_cmd SEMI */
       151162  +   278,  /* (253) trnm ::= nm DOT nm */
       151163  +   279,  /* (254) tridxby ::= INDEXED BY nm */
       151164  +   279,  /* (255) tridxby ::= NOT INDEXED */
       151165  +   277,  /* (256) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt */
       151166  +   277,  /* (257) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
       151167  +   277,  /* (258) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
       151168  +   277,  /* (259) trigger_cmd ::= scanpt select scanpt */
       151169  +   207,  /* (260) expr ::= RAISE LP IGNORE RP */
       151170  +   207,  /* (261) expr ::= RAISE LP raisetype COMMA nm RP */
       151171  +   225,  /* (262) raisetype ::= ROLLBACK */
       151172  +   225,  /* (263) raisetype ::= ABORT */
       151173  +   225,  /* (264) raisetype ::= FAIL */
       151174  +   181,  /* (265) cmd ::= DROP TRIGGER ifexists fullname */
       151175  +   181,  /* (266) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
       151176  +   181,  /* (267) cmd ::= DETACH database_kw_opt expr */
       151177  +   281,  /* (268) key_opt ::= */
       151178  +   281,  /* (269) key_opt ::= KEY expr */
       151179  +   181,  /* (270) cmd ::= REINDEX */
       151180  +   181,  /* (271) cmd ::= REINDEX nm dbnm */
       151181  +   181,  /* (272) cmd ::= ANALYZE */
       151182  +   181,  /* (273) cmd ::= ANALYZE nm dbnm */
       151183  +   181,  /* (274) cmd ::= ALTER TABLE fullname RENAME TO nm */
       151184  +   181,  /* (275) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
       151185  +   282,  /* (276) add_column_fullname ::= fullname */
       151186  +   181,  /* (277) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
       151187  +   181,  /* (278) cmd ::= create_vtab */
       151188  +   181,  /* (279) cmd ::= create_vtab LP vtabarglist RP */
       151189  +   284,  /* (280) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
       151190  +   286,  /* (281) vtabarg ::= */
       151191  +   287,  /* (282) vtabargtoken ::= ANY */
       151192  +   287,  /* (283) vtabargtoken ::= lp anylist RP */
       151193  +   288,  /* (284) lp ::= LP */
       151194  +   254,  /* (285) with ::= WITH wqlist */
       151195  +   254,  /* (286) with ::= WITH RECURSIVE wqlist */
       151196  +   230,  /* (287) wqlist ::= nm eidlist_opt AS LP select RP */
       151197  +   230,  /* (288) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
       151198  +   290,  /* (289) windowdefn_list ::= windowdefn */
       151199  +   290,  /* (290) windowdefn_list ::= windowdefn_list COMMA windowdefn */
       151200  +   291,  /* (291) windowdefn ::= nm AS LP window RP */
       151201  +   292,  /* (292) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
       151202  +   292,  /* (293) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
       151203  +   292,  /* (294) window ::= ORDER BY sortlist frame_opt */
       151204  +   292,  /* (295) window ::= nm ORDER BY sortlist frame_opt */
       151205  +   292,  /* (296) window ::= frame_opt */
       151206  +   292,  /* (297) window ::= nm frame_opt */
       151207  +   293,  /* (298) frame_opt ::= */
       151208  +   293,  /* (299) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
       151209  +   293,  /* (300) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
       151210  +   296,  /* (301) range_or_rows ::= RANGE|ROWS|GROUPS */
       151211  +   298,  /* (302) frame_bound_s ::= frame_bound */
       151212  +   298,  /* (303) frame_bound_s ::= UNBOUNDED PRECEDING */
       151213  +   299,  /* (304) frame_bound_e ::= frame_bound */
       151214  +   299,  /* (305) frame_bound_e ::= UNBOUNDED FOLLOWING */
       151215  +   297,  /* (306) frame_bound ::= expr PRECEDING|FOLLOWING */
       151216  +   297,  /* (307) frame_bound ::= CURRENT ROW */
       151217  +   300,  /* (308) frame_exclude_opt ::= */
       151218  +   300,  /* (309) frame_exclude_opt ::= EXCLUDE frame_exclude */
       151219  +   301,  /* (310) frame_exclude ::= NO OTHERS */
       151220  +   301,  /* (311) frame_exclude ::= CURRENT ROW */
       151221  +   301,  /* (312) frame_exclude ::= GROUP|TIES */
       151222  +   240,  /* (313) window_clause ::= WINDOW windowdefn_list */
       151223  +   259,  /* (314) over_clause ::= filter_opt OVER LP window RP */
       151224  +   259,  /* (315) over_clause ::= filter_opt OVER nm */
       151225  +   295,  /* (316) filter_opt ::= */
       151226  +   295,  /* (317) filter_opt ::= FILTER LP WHERE expr RP */
       151227  +   176,  /* (318) input ::= cmdlist */
       151228  +   177,  /* (319) cmdlist ::= cmdlist ecmd */
       151229  +   177,  /* (320) cmdlist ::= ecmd */
       151230  +   178,  /* (321) ecmd ::= SEMI */
       151231  +   178,  /* (322) ecmd ::= cmdx SEMI */
       151232  +   178,  /* (323) ecmd ::= explain cmdx */
       151233  +   183,  /* (324) trans_opt ::= */
       151234  +   183,  /* (325) trans_opt ::= TRANSACTION */
       151235  +   183,  /* (326) trans_opt ::= TRANSACTION nm */
       151236  +   185,  /* (327) savepoint_opt ::= SAVEPOINT */
       151237  +   185,  /* (328) savepoint_opt ::= */
       151238  +   181,  /* (329) cmd ::= create_table create_table_args */
       151239  +   192,  /* (330) columnlist ::= columnlist COMMA columnname carglist */
       151240  +   192,  /* (331) columnlist ::= columnname carglist */
       151241  +   184,  /* (332) nm ::= ID|INDEXED */
       151242  +   184,  /* (333) nm ::= STRING */
       151243  +   184,  /* (334) nm ::= JOIN_KW */
       151244  +   198,  /* (335) typetoken ::= typename */
       151245  +   199,  /* (336) typename ::= ID|STRING */
       151246  +   200,  /* (337) signed ::= plus_num */
       151247  +   200,  /* (338) signed ::= minus_num */
       151248  +   197,  /* (339) carglist ::= carglist ccons */
       151249  +   197,  /* (340) carglist ::= */
       151250  +   205,  /* (341) ccons ::= NULL onconf */
       151251  +   193,  /* (342) conslist_opt ::= COMMA conslist */
       151252  +   217,  /* (343) conslist ::= conslist tconscomma tcons */
       151253  +   217,  /* (344) conslist ::= tcons */
       151254  +   218,  /* (345) tconscomma ::= */
       151255  +   222,  /* (346) defer_subclause_opt ::= defer_subclause */
       151256  +   224,  /* (347) resolvetype ::= raisetype */
       151257  +   228,  /* (348) selectnowith ::= oneselect */
       151258  +   229,  /* (349) oneselect ::= values */
       151259  +   243,  /* (350) sclp ::= selcollist COMMA */
       151260  +   244,  /* (351) as ::= ID|STRING */
       151261  +   207,  /* (352) expr ::= term */
       151262  +   260,  /* (353) likeop ::= LIKE_KW|MATCH */
       151263  +   251,  /* (354) exprlist ::= nexprlist */
       151264  +   270,  /* (355) nmnum ::= plus_num */
       151265  +   270,  /* (356) nmnum ::= nm */
       151266  +   270,  /* (357) nmnum ::= ON */
       151267  +   270,  /* (358) nmnum ::= DELETE */
       151268  +   270,  /* (359) nmnum ::= DEFAULT */
       151269  +   201,  /* (360) plus_num ::= INTEGER|FLOAT */
       151270  +   275,  /* (361) foreach_clause ::= */
       151271  +   275,  /* (362) foreach_clause ::= FOR EACH ROW */
       151272  +   278,  /* (363) trnm ::= nm */
       151273  +   279,  /* (364) tridxby ::= */
       151274  +   280,  /* (365) database_kw_opt ::= DATABASE */
       151275  +   280,  /* (366) database_kw_opt ::= */
       151276  +   283,  /* (367) kwcolumn_opt ::= */
       151277  +   283,  /* (368) kwcolumn_opt ::= COLUMNKW */
       151278  +   285,  /* (369) vtabarglist ::= vtabarg */
       151279  +   285,  /* (370) vtabarglist ::= vtabarglist COMMA vtabarg */
       151280  +   286,  /* (371) vtabarg ::= vtabarg vtabargtoken */
       151281  +   289,  /* (372) anylist ::= */
       151282  +   289,  /* (373) anylist ::= anylist LP anylist RP */
       151283  +   289,  /* (374) anylist ::= anylist ANY */
       151284  +   254,  /* (375) with ::= */
151135 151285   };
151136 151286   
151137 151287   /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
151138 151288   ** of symbols on the right-hand side of that rule. */
151139 151289   static const signed char yyRuleInfoNRhs[] = {
151140 151290      -1,  /* (0) explain ::= EXPLAIN */
151141 151291      -3,  /* (1) explain ::= EXPLAIN QUERY PLAN */
................................................................................
151162 151312      -2,  /* (22) table_options ::= WITHOUT nm */
151163 151313      -2,  /* (23) columnname ::= nm typetoken */
151164 151314       0,  /* (24) typetoken ::= */
151165 151315      -4,  /* (25) typetoken ::= typename LP signed RP */
151166 151316      -6,  /* (26) typetoken ::= typename LP signed COMMA signed RP */
151167 151317      -2,  /* (27) typename ::= typename ID|STRING */
151168 151318       0,  /* (28) scanpt ::= */
151169         -   -2,  /* (29) ccons ::= CONSTRAINT nm */
151170         -   -4,  /* (30) ccons ::= DEFAULT scanpt term scanpt */
151171         -   -4,  /* (31) ccons ::= DEFAULT LP expr RP */
151172         -   -4,  /* (32) ccons ::= DEFAULT PLUS term scanpt */
151173         -   -4,  /* (33) ccons ::= DEFAULT MINUS term scanpt */
151174         -   -3,  /* (34) ccons ::= DEFAULT scanpt ID|INDEXED */
151175         -   -3,  /* (35) ccons ::= NOT NULL onconf */
151176         -   -5,  /* (36) ccons ::= PRIMARY KEY sortorder onconf autoinc */
151177         -   -2,  /* (37) ccons ::= UNIQUE onconf */
151178         -   -4,  /* (38) ccons ::= CHECK LP expr RP */
151179         -   -4,  /* (39) ccons ::= REFERENCES nm eidlist_opt refargs */
151180         -   -1,  /* (40) ccons ::= defer_subclause */
151181         -   -2,  /* (41) ccons ::= COLLATE ID|STRING */
151182         -    0,  /* (42) autoinc ::= */
151183         -   -1,  /* (43) autoinc ::= AUTOINCR */
151184         -    0,  /* (44) refargs ::= */
151185         -   -2,  /* (45) refargs ::= refargs refarg */
151186         -   -2,  /* (46) refarg ::= MATCH nm */
151187         -   -3,  /* (47) refarg ::= ON INSERT refact */
151188         -   -3,  /* (48) refarg ::= ON DELETE refact */
151189         -   -3,  /* (49) refarg ::= ON UPDATE refact */
151190         -   -2,  /* (50) refact ::= SET NULL */
151191         -   -2,  /* (51) refact ::= SET DEFAULT */
151192         -   -1,  /* (52) refact ::= CASCADE */
151193         -   -1,  /* (53) refact ::= RESTRICT */
151194         -   -2,  /* (54) refact ::= NO ACTION */
151195         -   -3,  /* (55) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
151196         -   -2,  /* (56) defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
151197         -    0,  /* (57) init_deferred_pred_opt ::= */
151198         -   -2,  /* (58) init_deferred_pred_opt ::= INITIALLY DEFERRED */
151199         -   -2,  /* (59) init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
151200         -    0,  /* (60) conslist_opt ::= */
151201         -   -1,  /* (61) tconscomma ::= COMMA */
151202         -   -2,  /* (62) tcons ::= CONSTRAINT nm */
151203         -   -7,  /* (63) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
151204         -   -5,  /* (64) tcons ::= UNIQUE LP sortlist RP onconf */
151205         -   -5,  /* (65) tcons ::= CHECK LP expr RP onconf */
151206         -  -10,  /* (66) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
151207         -    0,  /* (67) defer_subclause_opt ::= */
151208         -    0,  /* (68) onconf ::= */
151209         -   -3,  /* (69) onconf ::= ON CONFLICT resolvetype */
151210         -    0,  /* (70) orconf ::= */
151211         -   -2,  /* (71) orconf ::= OR resolvetype */
151212         -   -1,  /* (72) resolvetype ::= IGNORE */
151213         -   -1,  /* (73) resolvetype ::= REPLACE */
151214         -   -4,  /* (74) cmd ::= DROP TABLE ifexists fullname */
151215         -   -2,  /* (75) ifexists ::= IF EXISTS */
151216         -    0,  /* (76) ifexists ::= */
151217         -   -9,  /* (77) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
151218         -   -4,  /* (78) cmd ::= DROP VIEW ifexists fullname */
151219         -   -1,  /* (79) cmd ::= select */
151220         -   -3,  /* (80) select ::= WITH wqlist selectnowith */
151221         -   -4,  /* (81) select ::= WITH RECURSIVE wqlist selectnowith */
151222         -   -1,  /* (82) select ::= selectnowith */
151223         -   -3,  /* (83) selectnowith ::= selectnowith multiselect_op oneselect */
151224         -   -1,  /* (84) multiselect_op ::= UNION */
151225         -   -2,  /* (85) multiselect_op ::= UNION ALL */
151226         -   -1,  /* (86) multiselect_op ::= EXCEPT|INTERSECT */
151227         -   -9,  /* (87) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
151228         -  -10,  /* (88) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
151229         -   -4,  /* (89) values ::= VALUES LP nexprlist RP */
151230         -   -5,  /* (90) values ::= values COMMA LP nexprlist RP */
151231         -   -1,  /* (91) distinct ::= DISTINCT */
151232         -   -1,  /* (92) distinct ::= ALL */
151233         -    0,  /* (93) distinct ::= */
151234         -    0,  /* (94) sclp ::= */
151235         -   -5,  /* (95) selcollist ::= sclp scanpt expr scanpt as */
151236         -   -3,  /* (96) selcollist ::= sclp scanpt STAR */
151237         -   -5,  /* (97) selcollist ::= sclp scanpt nm DOT STAR */
151238         -   -2,  /* (98) as ::= AS nm */
151239         -    0,  /* (99) as ::= */
151240         -    0,  /* (100) from ::= */
151241         -   -2,  /* (101) from ::= FROM seltablist */
151242         -   -2,  /* (102) stl_prefix ::= seltablist joinop */
151243         -    0,  /* (103) stl_prefix ::= */
151244         -   -7,  /* (104) seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
151245         -   -9,  /* (105) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */
151246         -   -7,  /* (106) seltablist ::= stl_prefix LP select RP as on_opt using_opt */
151247         -   -7,  /* (107) seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
151248         -    0,  /* (108) dbnm ::= */
151249         -   -2,  /* (109) dbnm ::= DOT nm */
151250         -   -1,  /* (110) fullname ::= nm */
151251         -   -3,  /* (111) fullname ::= nm DOT nm */
151252         -   -1,  /* (112) xfullname ::= nm */
151253         -   -3,  /* (113) xfullname ::= nm DOT nm */
151254         -   -5,  /* (114) xfullname ::= nm DOT nm AS nm */
151255         -   -3,  /* (115) xfullname ::= nm AS nm */
151256         -   -1,  /* (116) joinop ::= COMMA|JOIN */
151257         -   -2,  /* (117) joinop ::= JOIN_KW JOIN */
151258         -   -3,  /* (118) joinop ::= JOIN_KW nm JOIN */
151259         -   -4,  /* (119) joinop ::= JOIN_KW nm nm JOIN */
151260         -   -2,  /* (120) on_opt ::= ON expr */
151261         -    0,  /* (121) on_opt ::= */
151262         -    0,  /* (122) indexed_opt ::= */
151263         -   -3,  /* (123) indexed_opt ::= INDEXED BY nm */
151264         -   -2,  /* (124) indexed_opt ::= NOT INDEXED */
151265         -   -4,  /* (125) using_opt ::= USING LP idlist RP */
151266         -    0,  /* (126) using_opt ::= */
151267         -    0,  /* (127) orderby_opt ::= */
151268         -   -3,  /* (128) orderby_opt ::= ORDER BY sortlist */
151269         -   -4,  /* (129) sortlist ::= sortlist COMMA expr sortorder */
151270         -   -2,  /* (130) sortlist ::= expr sortorder */
151271         -   -1,  /* (131) sortorder ::= ASC */
151272         -   -1,  /* (132) sortorder ::= DESC */
151273         -    0,  /* (133) sortorder ::= */
151274         -    0,  /* (134) groupby_opt ::= */
151275         -   -3,  /* (135) groupby_opt ::= GROUP BY nexprlist */
151276         -    0,  /* (136) having_opt ::= */
151277         -   -2,  /* (137) having_opt ::= HAVING expr */
151278         -    0,  /* (138) limit_opt ::= */
151279         -   -2,  /* (139) limit_opt ::= LIMIT expr */
151280         -   -4,  /* (140) limit_opt ::= LIMIT expr OFFSET expr */
151281         -   -4,  /* (141) limit_opt ::= LIMIT expr COMMA expr */
151282         -   -6,  /* (142) cmd ::= with DELETE FROM xfullname indexed_opt where_opt */
151283         -    0,  /* (143) where_opt ::= */
151284         -   -2,  /* (144) where_opt ::= WHERE expr */
151285         -   -8,  /* (145) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt */
151286         -   -5,  /* (146) setlist ::= setlist COMMA nm EQ expr */
151287         -   -7,  /* (147) setlist ::= setlist COMMA LP idlist RP EQ expr */
151288         -   -3,  /* (148) setlist ::= nm EQ expr */
151289         -   -5,  /* (149) setlist ::= LP idlist RP EQ expr */
151290         -   -7,  /* (150) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
151291         -   -7,  /* (151) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES */
151292         -    0,  /* (152) upsert ::= */
151293         -  -11,  /* (153) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt */
151294         -   -8,  /* (154) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING */
151295         -   -4,  /* (155) upsert ::= ON CONFLICT DO NOTHING */
151296         -   -2,  /* (156) insert_cmd ::= INSERT orconf */
151297         -   -1,  /* (157) insert_cmd ::= REPLACE */
151298         -    0,  /* (158) idlist_opt ::= */
151299         -   -3,  /* (159) idlist_opt ::= LP idlist RP */
151300         -   -3,  /* (160) idlist ::= idlist COMMA nm */
151301         -   -1,  /* (161) idlist ::= nm */
151302         -   -3,  /* (162) expr ::= LP expr RP */
151303         -   -1,  /* (163) expr ::= ID|INDEXED */
151304         -   -1,  /* (164) expr ::= JOIN_KW */
151305         -   -3,  /* (165) expr ::= nm DOT nm */
151306         -   -5,  /* (166) expr ::= nm DOT nm DOT nm */
151307         -   -1,  /* (167) term ::= NULL|FLOAT|BLOB */
151308         -   -1,  /* (168) term ::= STRING */
151309         -   -1,  /* (169) term ::= INTEGER */
151310         -   -1,  /* (170) expr ::= VARIABLE */
151311         -   -3,  /* (171) expr ::= expr COLLATE ID|STRING */
151312         -   -6,  /* (172) expr ::= CAST LP expr AS typetoken RP */
151313         -   -5,  /* (173) expr ::= ID|INDEXED LP distinct exprlist RP */
151314         -   -4,  /* (174) expr ::= ID|INDEXED LP STAR RP */
151315         -   -6,  /* (175) expr ::= ID|INDEXED LP distinct exprlist RP over_clause */
151316         -   -5,  /* (176) expr ::= ID|INDEXED LP STAR RP over_clause */
151317         -   -1,  /* (177) term ::= CTIME_KW */
151318         -   -5,  /* (178) expr ::= LP nexprlist COMMA expr RP */
151319         -   -3,  /* (179) expr ::= expr AND expr */
151320         -   -3,  /* (180) expr ::= expr OR expr */
151321         -   -3,  /* (181) expr ::= expr LT|GT|GE|LE expr */
151322         -   -3,  /* (182) expr ::= expr EQ|NE expr */
151323         -   -3,  /* (183) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */
151324         -   -3,  /* (184) expr ::= expr PLUS|MINUS expr */
151325         -   -3,  /* (185) expr ::= expr STAR|SLASH|REM expr */
151326         -   -3,  /* (186) expr ::= expr CONCAT expr */
151327         -   -2,  /* (187) likeop ::= NOT LIKE_KW|MATCH */
151328         -   -3,  /* (188) expr ::= expr likeop expr */
151329         -   -5,  /* (189) expr ::= expr likeop expr ESCAPE expr */
151330         -   -2,  /* (190) expr ::= expr ISNULL|NOTNULL */
151331         -   -3,  /* (191) expr ::= expr NOT NULL */
151332         -   -3,  /* (192) expr ::= expr IS expr */
151333         -   -4,  /* (193) expr ::= expr IS NOT expr */
151334         -   -2,  /* (194) expr ::= NOT expr */
151335         -   -2,  /* (195) expr ::= BITNOT expr */
151336         -   -2,  /* (196) expr ::= PLUS|MINUS expr */
151337         -   -1,  /* (197) between_op ::= BETWEEN */
151338         -   -2,  /* (198) between_op ::= NOT BETWEEN */
151339         -   -5,  /* (199) expr ::= expr between_op expr AND expr */
151340         -   -1,  /* (200) in_op ::= IN */
151341         -   -2,  /* (201) in_op ::= NOT IN */
151342         -   -5,  /* (202) expr ::= expr in_op LP exprlist RP */
151343         -   -3,  /* (203) expr ::= LP select RP */
151344         -   -5,  /* (204) expr ::= expr in_op LP select RP */
151345         -   -5,  /* (205) expr ::= expr in_op nm dbnm paren_exprlist */
151346         -   -4,  /* (206) expr ::= EXISTS LP select RP */
151347         -   -5,  /* (207) expr ::= CASE case_operand case_exprlist case_else END */
151348         -   -5,  /* (208) case_exprlist ::= case_exprlist WHEN expr THEN expr */
151349         -   -4,  /* (209) case_exprlist ::= WHEN expr THEN expr */
151350         -   -2,  /* (210) case_else ::= ELSE expr */
151351         -    0,  /* (211) case_else ::= */
151352         -   -1,  /* (212) case_operand ::= expr */
151353         -    0,  /* (213) case_operand ::= */
151354         -    0,  /* (214) exprlist ::= */
151355         -   -3,  /* (215) nexprlist ::= nexprlist COMMA expr */
151356         -   -1,  /* (216) nexprlist ::= expr */
151357         -    0,  /* (217) paren_exprlist ::= */
151358         -   -3,  /* (218) paren_exprlist ::= LP exprlist RP */
151359         -  -12,  /* (219) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
151360         -   -1,  /* (220) uniqueflag ::= UNIQUE */
151361         -    0,  /* (221) uniqueflag ::= */
151362         -    0,  /* (222) eidlist_opt ::= */
151363         -   -3,  /* (223) eidlist_opt ::= LP eidlist RP */
151364         -   -5,  /* (224) eidlist ::= eidlist COMMA nm collate sortorder */
151365         -   -3,  /* (225) eidlist ::= nm collate sortorder */
151366         -    0,  /* (226) collate ::= */
151367         -   -2,  /* (227) collate ::= COLLATE ID|STRING */
151368         -   -4,  /* (228) cmd ::= DROP INDEX ifexists fullname */
151369         -   -2,  /* (229) cmd ::= VACUUM vinto */
151370         -   -3,  /* (230) cmd ::= VACUUM nm vinto */
151371         -   -2,  /* (231) vinto ::= INTO expr */
151372         -    0,  /* (232) vinto ::= */
151373         -   -3,  /* (233) cmd ::= PRAGMA nm dbnm */
151374         -   -5,  /* (234) cmd ::= PRAGMA nm dbnm EQ nmnum */
151375         -   -6,  /* (235) cmd ::= PRAGMA nm dbnm LP nmnum RP */
151376         -   -5,  /* (236) cmd ::= PRAGMA nm dbnm EQ minus_num */
151377         -   -6,  /* (237) cmd ::= PRAGMA nm dbnm LP minus_num RP */
151378         -   -2,  /* (238) plus_num ::= PLUS INTEGER|FLOAT */
151379         -   -2,  /* (239) minus_num ::= MINUS INTEGER|FLOAT */
151380         -   -5,  /* (240) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
151381         -  -11,  /* (241) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
151382         -   -1,  /* (242) trigger_time ::= BEFORE|AFTER */
151383         -   -2,  /* (243) trigger_time ::= INSTEAD OF */
151384         -    0,  /* (244) trigger_time ::= */
151385         -   -1,  /* (245) trigger_event ::= DELETE|INSERT */
151386         -   -1,  /* (246) trigger_event ::= UPDATE */
151387         -   -3,  /* (247) trigger_event ::= UPDATE OF idlist */
151388         -    0,  /* (248) when_clause ::= */
151389         -   -2,  /* (249) when_clause ::= WHEN expr */
151390         -   -3,  /* (250) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
151391         -   -2,  /* (251) trigger_cmd_list ::= trigger_cmd SEMI */
151392         -   -3,  /* (252) trnm ::= nm DOT nm */
151393         -   -3,  /* (253) tridxby ::= INDEXED BY nm */
151394         -   -2,  /* (254) tridxby ::= NOT INDEXED */
151395         -   -8,  /* (255) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt */
151396         -   -8,  /* (256) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
151397         -   -6,  /* (257) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
151398         -   -3,  /* (258) trigger_cmd ::= scanpt select scanpt */
151399         -   -4,  /* (259) expr ::= RAISE LP IGNORE RP */
151400         -   -6,  /* (260) expr ::= RAISE LP raisetype COMMA nm RP */
151401         -   -1,  /* (261) raisetype ::= ROLLBACK */
151402         -   -1,  /* (262) raisetype ::= ABORT */
151403         -   -1,  /* (263) raisetype ::= FAIL */
151404         -   -4,  /* (264) cmd ::= DROP TRIGGER ifexists fullname */
151405         -   -6,  /* (265) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
151406         -   -3,  /* (266) cmd ::= DETACH database_kw_opt expr */
151407         -    0,  /* (267) key_opt ::= */
151408         -   -2,  /* (268) key_opt ::= KEY expr */
151409         -   -1,  /* (269) cmd ::= REINDEX */
151410         -   -3,  /* (270) cmd ::= REINDEX nm dbnm */
151411         -   -1,  /* (271) cmd ::= ANALYZE */
151412         -   -3,  /* (272) cmd ::= ANALYZE nm dbnm */
151413         -   -6,  /* (273) cmd ::= ALTER TABLE fullname RENAME TO nm */
151414         -   -7,  /* (274) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
151415         -   -1,  /* (275) add_column_fullname ::= fullname */
151416         -   -8,  /* (276) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
151417         -   -1,  /* (277) cmd ::= create_vtab */
151418         -   -4,  /* (278) cmd ::= create_vtab LP vtabarglist RP */
151419         -   -8,  /* (279) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
151420         -    0,  /* (280) vtabarg ::= */
151421         -   -1,  /* (281) vtabargtoken ::= ANY */
151422         -   -3,  /* (282) vtabargtoken ::= lp anylist RP */
151423         -   -1,  /* (283) lp ::= LP */
151424         -   -2,  /* (284) with ::= WITH wqlist */
151425         -   -3,  /* (285) with ::= WITH RECURSIVE wqlist */
151426         -   -6,  /* (286) wqlist ::= nm eidlist_opt AS LP select RP */
151427         -   -8,  /* (287) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
151428         -   -1,  /* (288) windowdefn_list ::= windowdefn */
151429         -   -3,  /* (289) windowdefn_list ::= windowdefn_list COMMA windowdefn */
151430         -   -5,  /* (290) windowdefn ::= nm AS LP window RP */
151431         -   -5,  /* (291) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
151432         -   -6,  /* (292) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
151433         -   -4,  /* (293) window ::= ORDER BY sortlist frame_opt */
151434         -   -5,  /* (294) window ::= nm ORDER BY sortlist frame_opt */
151435         -   -1,  /* (295) window ::= frame_opt */
151436         -   -2,  /* (296) window ::= nm frame_opt */
151437         -    0,  /* (297) frame_opt ::= */
151438         -   -3,  /* (298) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
151439         -   -6,  /* (299) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
151440         -   -1,  /* (300) range_or_rows ::= RANGE|ROWS|GROUPS */
151441         -   -1,  /* (301) frame_bound_s ::= frame_bound */
151442         -   -2,  /* (302) frame_bound_s ::= UNBOUNDED PRECEDING */
151443         -   -1,  /* (303) frame_bound_e ::= frame_bound */
151444         -   -2,  /* (304) frame_bound_e ::= UNBOUNDED FOLLOWING */
151445         -   -2,  /* (305) frame_bound ::= expr PRECEDING|FOLLOWING */
151446         -   -2,  /* (306) frame_bound ::= CURRENT ROW */
151447         -    0,  /* (307) frame_exclude_opt ::= */
151448         -   -2,  /* (308) frame_exclude_opt ::= EXCLUDE frame_exclude */
151449         -   -2,  /* (309) frame_exclude ::= NO OTHERS */
151450         -   -2,  /* (310) frame_exclude ::= CURRENT ROW */
151451         -   -1,  /* (311) frame_exclude ::= GROUP|TIES */
151452         -   -2,  /* (312) window_clause ::= WINDOW windowdefn_list */
151453         -   -5,  /* (313) over_clause ::= filter_opt OVER LP window RP */
151454         -   -3,  /* (314) over_clause ::= filter_opt OVER nm */
151455         -    0,  /* (315) filter_opt ::= */
151456         -   -5,  /* (316) filter_opt ::= FILTER LP WHERE expr RP */
151457         -   -1,  /* (317) input ::= cmdlist */
151458         -   -2,  /* (318) cmdlist ::= cmdlist ecmd */
151459         -   -1,  /* (319) cmdlist ::= ecmd */
151460         -   -1,  /* (320) ecmd ::= SEMI */
151461         -   -2,  /* (321) ecmd ::= cmdx SEMI */
151462         -   -2,  /* (322) ecmd ::= explain cmdx */
151463         -    0,  /* (323) trans_opt ::= */
151464         -   -1,  /* (324) trans_opt ::= TRANSACTION */
151465         -   -2,  /* (325) trans_opt ::= TRANSACTION nm */
151466         -   -1,  /* (326) savepoint_opt ::= SAVEPOINT */
151467         -    0,  /* (327) savepoint_opt ::= */
151468         -   -2,  /* (328) cmd ::= create_table create_table_args */
151469         -   -4,  /* (329) columnlist ::= columnlist COMMA columnname carglist */
151470         -   -2,  /* (330) columnlist ::= columnname carglist */
151471         -   -1,  /* (331) nm ::= ID|INDEXED */
151472         -   -1,  /* (332) nm ::= STRING */
151473         -   -1,  /* (333) nm ::= JOIN_KW */
151474         -   -1,  /* (334) typetoken ::= typename */
151475         -   -1,  /* (335) typename ::= ID|STRING */
151476         -   -1,  /* (336) signed ::= plus_num */
151477         -   -1,  /* (337) signed ::= minus_num */
151478         -   -2,  /* (338) carglist ::= carglist ccons */
151479         -    0,  /* (339) carglist ::= */
151480         -   -2,  /* (340) ccons ::= NULL onconf */
151481         -   -2,  /* (341) conslist_opt ::= COMMA conslist */
151482         -   -3,  /* (342) conslist ::= conslist tconscomma tcons */
151483         -   -1,  /* (343) conslist ::= tcons */
151484         -    0,  /* (344) tconscomma ::= */
151485         -   -1,  /* (345) defer_subclause_opt ::= defer_subclause */
151486         -   -1,  /* (346) resolvetype ::= raisetype */
151487         -   -1,  /* (347) selectnowith ::= oneselect */
151488         -   -1,  /* (348) oneselect ::= values */
151489         -   -2,  /* (349) sclp ::= selcollist COMMA */
151490         -   -1,  /* (350) as ::= ID|STRING */
151491         -   -1,  /* (351) expr ::= term */
151492         -   -1,  /* (352) likeop ::= LIKE_KW|MATCH */
151493         -   -1,  /* (353) exprlist ::= nexprlist */
151494         -   -1,  /* (354) nmnum ::= plus_num */
151495         -   -1,  /* (355) nmnum ::= nm */
151496         -   -1,  /* (356) nmnum ::= ON */
151497         -   -1,  /* (357) nmnum ::= DELETE */
151498         -   -1,  /* (358) nmnum ::= DEFAULT */
151499         -   -1,  /* (359) plus_num ::= INTEGER|FLOAT */
151500         -    0,  /* (360) foreach_clause ::= */
151501         -   -3,  /* (361) foreach_clause ::= FOR EACH ROW */
151502         -   -1,  /* (362) trnm ::= nm */
151503         -    0,  /* (363) tridxby ::= */
151504         -   -1,  /* (364) database_kw_opt ::= DATABASE */
151505         -    0,  /* (365) database_kw_opt ::= */
151506         -    0,  /* (366) kwcolumn_opt ::= */
151507         -   -1,  /* (367) kwcolumn_opt ::= COLUMNKW */
151508         -   -1,  /* (368) vtabarglist ::= vtabarg */
151509         -   -3,  /* (369) vtabarglist ::= vtabarglist COMMA vtabarg */
151510         -   -2,  /* (370) vtabarg ::= vtabarg vtabargtoken */
151511         -    0,  /* (371) anylist ::= */
151512         -   -4,  /* (372) anylist ::= anylist LP anylist RP */
151513         -   -2,  /* (373) anylist ::= anylist ANY */
151514         -    0,  /* (374) with ::= */
       151319  +    0,  /* (29) scantok ::= */
       151320  +   -2,  /* (30) ccons ::= CONSTRAINT nm */
       151321  +   -3,  /* (31) ccons ::= DEFAULT scantok term */
       151322  +   -4,  /* (32) ccons ::= DEFAULT LP expr RP */
       151323  +   -4,  /* (33) ccons ::= DEFAULT PLUS scantok term */
       151324  +   -4,  /* (34) ccons ::= DEFAULT MINUS scantok term */
       151325  +   -3,  /* (35) ccons ::= DEFAULT scantok ID|INDEXED */
       151326  +   -3,  /* (36) ccons ::= NOT NULL onconf */
       151327  +   -5,  /* (37) ccons ::= PRIMARY KEY sortorder onconf autoinc */
       151328  +   -2,  /* (38) ccons ::= UNIQUE onconf */
       151329  +   -4,  /* (39) ccons ::= CHECK LP expr RP */
       151330  +   -4,  /* (40) ccons ::= REFERENCES nm eidlist_opt refargs */
       151331  +   -1,  /* (41) ccons ::= defer_subclause */
       151332  +   -2,  /* (42) ccons ::= COLLATE ID|STRING */
       151333  +    0,  /* (43) autoinc ::= */
       151334  +   -1,  /* (44) autoinc ::= AUTOINCR */
       151335  +    0,  /* (45) refargs ::= */
       151336  +   -2,  /* (46) refargs ::= refargs refarg */
       151337  +   -2,  /* (47) refarg ::= MATCH nm */
       151338  +   -3,  /* (48) refarg ::= ON INSERT refact */
       151339  +   -3,  /* (49) refarg ::= ON DELETE refact */
       151340  +   -3,  /* (50) refarg ::= ON UPDATE refact */
       151341  +   -2,  /* (51) refact ::= SET NULL */
       151342  +   -2,  /* (52) refact ::= SET DEFAULT */
       151343  +   -1,  /* (53) refact ::= CASCADE */
       151344  +   -1,  /* (54) refact ::= RESTRICT */
       151345  +   -2,  /* (55) refact ::= NO ACTION */
       151346  +   -3,  /* (56) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
       151347  +   -2,  /* (57) defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
       151348  +    0,  /* (58) init_deferred_pred_opt ::= */
       151349  +   -2,  /* (59) init_deferred_pred_opt ::= INITIALLY DEFERRED */
       151350  +   -2,  /* (60) init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
       151351  +    0,  /* (61) conslist_opt ::= */
       151352  +   -1,  /* (62) tconscomma ::= COMMA */
       151353  +   -2,  /* (63) tcons ::= CONSTRAINT nm */
       151354  +   -7,  /* (64) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
       151355  +   -5,  /* (65) tcons ::= UNIQUE LP sortlist RP onconf */
       151356  +   -5,  /* (66) tcons ::= CHECK LP expr RP onconf */
       151357  +  -10,  /* (67) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
       151358  +    0,  /* (68) defer_subclause_opt ::= */
       151359  +    0,  /* (69) onconf ::= */
       151360  +   -3,  /* (70) onconf ::= ON CONFLICT resolvetype */
       151361  +    0,  /* (71) orconf ::= */
       151362  +   -2,  /* (72) orconf ::= OR resolvetype */
       151363  +   -1,  /* (73) resolvetype ::= IGNORE */
       151364  +   -1,  /* (74) resolvetype ::= REPLACE */
       151365  +   -4,  /* (75) cmd ::= DROP TABLE ifexists fullname */
       151366  +   -2,  /* (76) ifexists ::= IF EXISTS */
       151367  +    0,  /* (77) ifexists ::= */
       151368  +   -9,  /* (78) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
       151369  +   -4,  /* (79) cmd ::= DROP VIEW ifexists fullname */
       151370  +   -1,  /* (80) cmd ::= select */
       151371  +   -3,  /* (81) select ::= WITH wqlist selectnowith */
       151372  +   -4,  /* (82) select ::= WITH RECURSIVE wqlist selectnowith */
       151373  +   -1,  /* (83) select ::= selectnowith */
       151374  +   -3,  /* (84) selectnowith ::= selectnowith multiselect_op oneselect */
       151375  +   -1,  /* (85) multiselect_op ::= UNION */
       151376  +   -2,  /* (86) multiselect_op ::= UNION ALL */
       151377  +   -1,  /* (87) multiselect_op ::= EXCEPT|INTERSECT */
       151378  +   -9,  /* (88) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
       151379  +  -10,  /* (89) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
       151380  +   -4,  /* (90) values ::= VALUES LP nexprlist RP */
       151381  +   -5,  /* (91) values ::= values COMMA LP nexprlist RP */
       151382  +   -1,  /* (92) distinct ::= DISTINCT */
       151383  +   -1,  /* (93) distinct ::= ALL */
       151384  +    0,  /* (94) distinct ::= */
       151385  +    0,  /* (95) sclp ::= */
       151386  +   -5,  /* (96) selcollist ::= sclp scanpt expr scanpt as */
       151387  +   -3,  /* (97) selcollist ::= sclp scanpt STAR */
       151388  +   -5,  /* (98) selcollist ::= sclp scanpt nm DOT STAR */
       151389  +   -2,  /* (99) as ::= AS nm */
       151390  +    0,  /* (100) as ::= */
       151391  +    0,  /* (101) from ::= */
       151392  +   -2,  /* (102) from ::= FROM seltablist */
       151393  +   -2,  /* (103) stl_prefix ::= seltablist joinop */
       151394  +    0,  /* (104) stl_prefix ::= */
       151395  +   -7,  /* (105) seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
       151396  +   -9,  /* (106) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */
       151397  +   -7,  /* (107) seltablist ::= stl_prefix LP select RP as on_opt using_opt */
       151398  +   -7,  /* (108) seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
       151399  +    0,  /* (109) dbnm ::= */
       151400  +   -2,  /* (110) dbnm ::= DOT nm */
       151401  +   -1,  /* (111) fullname ::= nm */
       151402  +   -3,  /* (112) fullname ::= nm DOT nm */
       151403  +   -1,  /* (113) xfullname ::= nm */
       151404  +   -3,  /* (114) xfullname ::= nm DOT nm */
       151405  +   -5,  /* (115) xfullname ::= nm DOT nm AS nm */
       151406  +   -3,  /* (116) xfullname ::= nm AS nm */
       151407  +   -1,  /* (117) joinop ::= COMMA|JOIN */
       151408  +   -2,  /* (118) joinop ::= JOIN_KW JOIN */
       151409  +   -3,  /* (119) joinop ::= JOIN_KW nm JOIN */
       151410  +   -4,  /* (120) joinop ::= JOIN_KW nm nm JOIN */
       151411  +   -2,  /* (121) on_opt ::= ON expr */
       151412  +    0,  /* (122) on_opt ::= */
       151413  +    0,  /* (123) indexed_opt ::= */
       151414  +   -3,  /* (124) indexed_opt ::= INDEXED BY nm */
       151415  +   -2,  /* (125) indexed_opt ::= NOT INDEXED */
       151416  +   -4,  /* (126) using_opt ::= USING LP idlist RP */
       151417  +    0,  /* (127) using_opt ::= */
       151418  +    0,  /* (128) orderby_opt ::= */
       151419  +   -3,  /* (129) orderby_opt ::= ORDER BY sortlist */
       151420  +   -4,  /* (130) sortlist ::= sortlist COMMA expr sortorder */
       151421  +   -2,  /* (131) sortlist ::= expr sortorder */
       151422  +   -1,  /* (132) sortorder ::= ASC */
       151423  +   -1,  /* (133) sortorder ::= DESC */
       151424  +    0,  /* (134) sortorder ::= */
       151425  +    0,  /* (135) groupby_opt ::= */
       151426  +   -3,  /* (136) groupby_opt ::= GROUP BY nexprlist */
       151427  +    0,  /* (137) having_opt ::= */
       151428  +   -2,  /* (138) having_opt ::= HAVING expr */
       151429  +    0,  /* (139) limit_opt ::= */
       151430  +   -2,  /* (140) limit_opt ::= LIMIT expr */
       151431  +   -4,  /* (141) limit_opt ::= LIMIT expr OFFSET expr */
       151432  +   -4,  /* (142) limit_opt ::= LIMIT expr COMMA expr */
       151433  +   -6,  /* (143) cmd ::= with DELETE FROM xfullname indexed_opt where_opt */
       151434  +    0,  /* (144) where_opt ::= */
       151435  +   -2,  /* (145) where_opt ::= WHERE expr */
       151436  +   -8,  /* (146) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt */
       151437  +   -5,  /* (147) setlist ::= setlist COMMA nm EQ expr */
       151438  +   -7,  /* (148) setlist ::= setlist COMMA LP idlist RP EQ expr */
       151439  +   -3,  /* (149) setlist ::= nm EQ expr */
       151440  +   -5,  /* (150) setlist ::= LP idlist RP EQ expr */
       151441  +   -7,  /* (151) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
       151442  +   -7,  /* (152) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES */
       151443  +    0,  /* (153) upsert ::= */
       151444  +  -11,  /* (154) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt */
       151445  +   -8,  /* (155) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING */
       151446  +   -4,  /* (156) upsert ::= ON CONFLICT DO NOTHING */
       151447  +   -2,  /* (157) insert_cmd ::= INSERT orconf */
       151448  +   -1,  /* (158) insert_cmd ::= REPLACE */
       151449  +    0,  /* (159) idlist_opt ::= */
       151450  +   -3,  /* (160) idlist_opt ::= LP idlist RP */
       151451  +   -3,  /* (161) idlist ::= idlist COMMA nm */
       151452  +   -1,  /* (162) idlist ::= nm */
       151453  +   -3,  /* (163) expr ::= LP expr RP */
       151454  +   -1,  /* (164) expr ::= ID|INDEXED */
       151455  +   -1,  /* (165) expr ::= JOIN_KW */
       151456  +   -3,  /* (166) expr ::= nm DOT nm */
       151457  +   -5,  /* (167) expr ::= nm DOT nm DOT nm */
       151458  +   -1,  /* (168) term ::= NULL|FLOAT|BLOB */
       151459  +   -1,  /* (169) term ::= STRING */
       151460  +   -1,  /* (170) term ::= INTEGER */
       151461  +   -1,  /* (171) expr ::= VARIABLE */
       151462  +   -3,  /* (172) expr ::= expr COLLATE ID|STRING */
       151463  +   -6,  /* (173) expr ::= CAST LP expr AS typetoken RP */
       151464  +   -5,  /* (174) expr ::= ID|INDEXED LP distinct exprlist RP */
       151465  +   -4,  /* (175) expr ::= ID|INDEXED LP STAR RP */
       151466  +   -6,  /* (176) expr ::= ID|INDEXED LP distinct exprlist RP over_clause */
       151467  +   -5,  /* (177) expr ::= ID|INDEXED LP STAR RP over_clause */
       151468  +   -1,  /* (178) term ::= CTIME_KW */
       151469  +   -5,  /* (179) expr ::= LP nexprlist COMMA expr RP */
       151470  +   -3,  /* (180) expr ::= expr AND expr */
       151471  +   -3,  /* (181) expr ::= expr OR expr */
       151472  +   -3,  /* (182) expr ::= expr LT|GT|GE|LE expr */
       151473  +   -3,  /* (183) expr ::= expr EQ|NE expr */
       151474  +   -3,  /* (184) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */
       151475  +   -3,  /* (185) expr ::= expr PLUS|MINUS expr */
       151476  +   -3,  /* (186) expr ::= expr STAR|SLASH|REM expr */
       151477  +   -3,  /* (187) expr ::= expr CONCAT expr */
       151478  +   -2,  /* (188) likeop ::= NOT LIKE_KW|MATCH */
       151479  +   -3,  /* (189) expr ::= expr likeop expr */
       151480  +   -5,  /* (190) expr ::= expr likeop expr ESCAPE expr */
       151481  +   -2,  /* (191) expr ::= expr ISNULL|NOTNULL */
       151482  +   -3,  /* (192) expr ::= expr NOT NULL */
       151483  +   -3,  /* (193) expr ::= expr IS expr */
       151484  +   -4,  /* (194) expr ::= expr IS NOT expr */
       151485  +   -2,  /* (195) expr ::= NOT expr */
       151486  +   -2,  /* (196) expr ::= BITNOT expr */
       151487  +   -2,  /* (197) expr ::= PLUS|MINUS expr */
       151488  +   -1,  /* (198) between_op ::= BETWEEN */
       151489  +   -2,  /* (199) between_op ::= NOT BETWEEN */
       151490  +   -5,  /* (200) expr ::= expr between_op expr AND expr */
       151491  +   -1,  /* (201) in_op ::= IN */
       151492  +   -2,  /* (202) in_op ::= NOT IN */
       151493  +   -5,  /* (203) expr ::= expr in_op LP exprlist RP */
       151494  +   -3,  /* (204) expr ::= LP select RP */
       151495  +   -5,  /* (205) expr ::= expr in_op LP select RP */
       151496  +   -5,  /* (206) expr ::= expr in_op nm dbnm paren_exprlist */
       151497  +   -4,  /* (207) expr ::= EXISTS LP select RP */
       151498  +   -5,  /* (208) expr ::= CASE case_operand case_exprlist case_else END */
       151499  +   -5,  /* (209) case_exprlist ::= case_exprlist WHEN expr THEN expr */
       151500  +   -4,  /* (210) case_exprlist ::= WHEN expr THEN expr */
       151501  +   -2,  /* (211) case_else ::= ELSE expr */
       151502  +    0,  /* (212) case_else ::= */
       151503  +   -1,  /* (213) case_operand ::= expr */
       151504  +    0,  /* (214) case_operand ::= */
       151505  +    0,  /* (215) exprlist ::= */
       151506  +   -3,  /* (216) nexprlist ::= nexprlist COMMA expr */
       151507  +   -1,  /* (217) nexprlist ::= expr */
       151508  +    0,  /* (218) paren_exprlist ::= */
       151509  +   -3,  /* (219) paren_exprlist ::= LP exprlist RP */
       151510  +  -12,  /* (220) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
       151511  +   -1,  /* (221) uniqueflag ::= UNIQUE */
       151512  +    0,  /* (222) uniqueflag ::= */
       151513  +    0,  /* (223) eidlist_opt ::= */
       151514  +   -3,  /* (224) eidlist_opt ::= LP eidlist RP */
       151515  +   -5,  /* (225) eidlist ::= eidlist COMMA nm collate sortorder */
       151516  +   -3,  /* (226) eidlist ::= nm collate sortorder */
       151517  +    0,  /* (227) collate ::= */
       151518  +   -2,  /* (228) collate ::= COLLATE ID|STRING */
       151519  +   -4,  /* (229) cmd ::= DROP INDEX ifexists fullname */
       151520  +   -2,  /* (230) cmd ::= VACUUM vinto */
       151521  +   -3,  /* (231) cmd ::= VACUUM nm vinto */
       151522  +   -2,  /* (232) vinto ::= INTO expr */
       151523  +    0,  /* (233) vinto ::= */
       151524  +   -3,  /* (234) cmd ::= PRAGMA nm dbnm */
       151525  +   -5,  /* (235) cmd ::= PRAGMA nm dbnm EQ nmnum */
       151526  +   -6,  /* (236) cmd ::= PRAGMA nm dbnm LP nmnum RP */
       151527  +   -5,  /* (237) cmd ::= PRAGMA nm dbnm EQ minus_num */
       151528  +   -6,  /* (238) cmd ::= PRAGMA nm dbnm LP minus_num RP */
       151529  +   -2,  /* (239) plus_num ::= PLUS INTEGER|FLOAT */
       151530  +   -2,  /* (240) minus_num ::= MINUS INTEGER|FLOAT */
       151531  +   -5,  /* (241) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
       151532  +  -11,  /* (242) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
       151533  +   -1,  /* (243) trigger_time ::= BEFORE|AFTER */
       151534  +   -2,  /* (244) trigger_time ::= INSTEAD OF */
       151535  +    0,  /* (245) trigger_time ::= */
       151536  +   -1,  /* (246) trigger_event ::= DELETE|INSERT */
       151537  +   -1,  /* (247) trigger_event ::= UPDATE */
       151538  +   -3,  /* (248) trigger_event ::= UPDATE OF idlist */
       151539  +    0,  /* (249) when_clause ::= */
       151540  +   -2,  /* (250) when_clause ::= WHEN expr */
       151541  +   -3,  /* (251) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
       151542  +   -2,  /* (252) trigger_cmd_list ::= trigger_cmd SEMI */
       151543  +   -3,  /* (253) trnm ::= nm DOT nm */
       151544  +   -3,  /* (254) tridxby ::= INDEXED BY nm */
       151545  +   -2,  /* (255) tridxby ::= NOT INDEXED */
       151546  +   -8,  /* (256) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt */
       151547  +   -8,  /* (257) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
       151548  +   -6,  /* (258) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
       151549  +   -3,  /* (259) trigger_cmd ::= scanpt select scanpt */
       151550  +   -4,  /* (260) expr ::= RAISE LP IGNORE RP */
       151551  +   -6,  /* (261) expr ::= RAISE LP raisetype COMMA nm RP */
       151552  +   -1,  /* (262) raisetype ::= ROLLBACK */
       151553  +   -1,  /* (263) raisetype ::= ABORT */
       151554  +   -1,  /* (264) raisetype ::= FAIL */
       151555  +   -4,  /* (265) cmd ::= DROP TRIGGER ifexists fullname */
       151556  +   -6,  /* (266) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
       151557  +   -3,  /* (267) cmd ::= DETACH database_kw_opt expr */
       151558  +    0,  /* (268) key_opt ::= */
       151559  +   -2,  /* (269) key_opt ::= KEY expr */
       151560  +   -1,  /* (270) cmd ::= REINDEX */
       151561  +   -3,  /* (271) cmd ::= REINDEX nm dbnm */
       151562  +   -1,  /* (272) cmd ::= ANALYZE */
       151563  +   -3,  /* (273) cmd ::= ANALYZE nm dbnm */
       151564  +   -6,  /* (274) cmd ::= ALTER TABLE fullname RENAME TO nm */
       151565  +   -7,  /* (275) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
       151566  +   -1,  /* (276) add_column_fullname ::= fullname */
       151567  +   -8,  /* (277) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
       151568  +   -1,  /* (278) cmd ::= create_vtab */
       151569  +   -4,  /* (279) cmd ::= create_vtab LP vtabarglist RP */
       151570  +   -8,  /* (280) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
       151571  +    0,  /* (281) vtabarg ::= */
       151572  +   -1,  /* (282) vtabargtoken ::= ANY */
       151573  +   -3,  /* (283) vtabargtoken ::= lp anylist RP */
       151574  +   -1,  /* (284) lp ::= LP */
       151575  +   -2,  /* (285) with ::= WITH wqlist */
       151576  +   -3,  /* (286) with ::= WITH RECURSIVE wqlist */
       151577  +   -6,  /* (287) wqlist ::= nm eidlist_opt AS LP select RP */
       151578  +   -8,  /* (288) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
       151579  +   -1,  /* (289) windowdefn_list ::= windowdefn */
       151580  +   -3,  /* (290) windowdefn_list ::= windowdefn_list COMMA windowdefn */
       151581  +   -5,  /* (291) windowdefn ::= nm AS LP window RP */
       151582  +   -5,  /* (292) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
       151583  +   -6,  /* (293) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
       151584  +   -4,  /* (294) window ::= ORDER BY sortlist frame_opt */
       151585  +   -5,  /* (295) window ::= nm ORDER BY sortlist frame_opt */
       151586  +   -1,  /* (296) window ::= frame_opt */
       151587  +   -2,  /* (297) window ::= nm frame_opt */
       151588  +    0,  /* (298) frame_opt ::= */
       151589  +   -3,  /* (299) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
       151590  +   -6,  /* (300) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
       151591  +   -1,  /* (301) range_or_rows ::= RANGE|ROWS|GROUPS */
       151592  +   -1,  /* (302) frame_bound_s ::= frame_bound */
       151593  +   -2,  /* (303) frame_bound_s ::= UNBOUNDED PRECEDING */
       151594  +   -1,  /* (304) frame_bound_e ::= frame_bound */
       151595  +   -2,  /* (305) frame_bound_e ::= UNBOUNDED FOLLOWING */
       151596  +   -2,  /* (306) frame_bound ::= expr PRECEDING|FOLLOWING */
       151597  +   -2,  /* (307) frame_bound ::= CURRENT ROW */
       151598  +    0,  /* (308) frame_exclude_opt ::= */
       151599  +   -2,  /* (309) frame_exclude_opt ::= EXCLUDE frame_exclude */
       151600  +   -2,  /* (310) frame_exclude ::= NO OTHERS */
       151601  +   -2,  /* (311) frame_exclude ::= CURRENT ROW */
       151602  +   -1,  /* (312) frame_exclude ::= GROUP|TIES */
       151603  +   -2,  /* (313) window_clause ::= WINDOW windowdefn_list */
       151604  +   -5,  /* (314) over_clause ::= filter_opt OVER LP window RP */
       151605  +   -3,  /* (315) over_clause ::= filter_opt OVER nm */
       151606  +    0,  /* (316) filter_opt ::= */
       151607  +   -5,  /* (317) filter_opt ::= FILTER LP WHERE expr RP */
       151608  +   -1,  /* (318) input ::= cmdlist */
       151609  +   -2,  /* (319) cmdlist ::= cmdlist ecmd */
       151610  +   -1,  /* (320) cmdlist ::= ecmd */
       151611  +   -1,  /* (321) ecmd ::= SEMI */
       151612  +   -2,  /* (322) ecmd ::= cmdx SEMI */
       151613  +   -2,  /* (323) ecmd ::= explain cmdx */
       151614  +    0,  /* (324) trans_opt ::= */
       151615  +   -1,  /* (325) trans_opt ::= TRANSACTION */
       151616  +   -2,  /* (326) trans_opt ::= TRANSACTION nm */
       151617  +   -1,  /* (327) savepoint_opt ::= SAVEPOINT */
       151618  +    0,  /* (328) savepoint_opt ::= */
       151619  +   -2,  /* (329) cmd ::= create_table create_table_args */
       151620  +   -4,  /* (330) columnlist ::= columnlist COMMA columnname carglist */
       151621  +   -2,  /* (331) columnlist ::= columnname carglist */
       151622  +   -1,  /* (332) nm ::= ID|INDEXED */
       151623  +   -1,  /* (333) nm ::= STRING */
       151624  +   -1,  /* (334) nm ::= JOIN_KW */
       151625  +   -1,  /* (335) typetoken ::= typename */
       151626  +   -1,  /* (336) typename ::= ID|STRING */
       151627  +   -1,  /* (337) signed ::= plus_num */
       151628  +   -1,  /* (338) signed ::= minus_num */
       151629  +   -2,  /* (339) carglist ::= carglist ccons */
       151630  +    0,  /* (340) carglist ::= */
       151631  +   -2,  /* (341) ccons ::= NULL onconf */
       151632  +   -2,  /* (342) conslist_opt ::= COMMA conslist */
       151633  +   -3,  /* (343) conslist ::= conslist tconscomma tcons */
       151634  +   -1,  /* (344) conslist ::= tcons */
       151635  +    0,  /* (345) tconscomma ::= */
       151636  +   -1,  /* (346) defer_subclause_opt ::= defer_subclause */
       151637  +   -1,  /* (347) resolvetype ::= raisetype */
       151638  +   -1,  /* (348) selectnowith ::= oneselect */
       151639  +   -1,  /* (349) oneselect ::= values */
       151640  +   -2,  /* (350) sclp ::= selcollist COMMA */
       151641  +   -1,  /* (351) as ::= ID|STRING */
       151642  +   -1,  /* (352) expr ::= term */
       151643  +   -1,  /* (353) likeop ::= LIKE_KW|MATCH */
       151644  +   -1,  /* (354) exprlist ::= nexprlist */
       151645  +   -1,  /* (355) nmnum ::= plus_num */
       151646  +   -1,  /* (356) nmnum ::= nm */
       151647  +   -1,  /* (357) nmnum ::= ON */
       151648  +   -1,  /* (358) nmnum ::= DELETE */
       151649  +   -1,  /* (359) nmnum ::= DEFAULT */
       151650  +   -1,  /* (360) plus_num ::= INTEGER|FLOAT */
       151651  +    0,  /* (361) foreach_clause ::= */
       151652  +   -3,  /* (362) foreach_clause ::= FOR EACH ROW */
       151653  +   -1,  /* (363) trnm ::= nm */
       151654  +    0,  /* (364) tridxby ::= */
       151655  +   -1,  /* (365) database_kw_opt ::= DATABASE */
       151656  +    0,  /* (366) database_kw_opt ::= */
       151657  +    0,  /* (367) kwcolumn_opt ::= */
       151658  +   -1,  /* (368) kwcolumn_opt ::= COLUMNKW */
       151659  +   -1,  /* (369) vtabarglist ::= vtabarg */
       151660  +   -3,  /* (370) vtabarglist ::= vtabarglist COMMA vtabarg */
       151661  +   -2,  /* (371) vtabarg ::= vtabarg vtabargtoken */
       151662  +    0,  /* (372) anylist ::= */
       151663  +   -4,  /* (373) anylist ::= anylist LP anylist RP */
       151664  +   -2,  /* (374) anylist ::= anylist ANY */
       151665  +    0,  /* (375) with ::= */
151515 151666   };
151516 151667   
151517 151668   static void yy_accept(yyParser*);  /* Forward Declaration */
151518 151669   
151519 151670   /*
151520 151671   ** Perform a reduce action and the shift that must immediately
151521 151672   ** follow the reduce.
................................................................................
151604 151755         case 1: /* explain ::= EXPLAIN QUERY PLAN */
151605 151756   { pParse->explain = 2; }
151606 151757           break;
151607 151758         case 2: /* cmdx ::= cmd */
151608 151759   { sqlite3FinishCoding(pParse); }
151609 151760           break;
151610 151761         case 3: /* cmd ::= BEGIN transtype trans_opt */
151611         -{sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy494);}
       151762  +{sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy100);}
151612 151763           break;
151613 151764         case 4: /* transtype ::= */
151614         -{yymsp[1].minor.yy494 = TK_DEFERRED;}
       151765  +{yymsp[1].minor.yy100 = TK_DEFERRED;}
151615 151766           break;
151616 151767         case 5: /* transtype ::= DEFERRED */
151617 151768         case 6: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==6);
151618 151769         case 7: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==7);
151619         -      case 300: /* range_or_rows ::= RANGE|ROWS|GROUPS */ yytestcase(yyruleno==300);
151620         -{yymsp[0].minor.yy494 = yymsp[0].major; /*A-overwrites-X*/}
       151770  +      case 301: /* range_or_rows ::= RANGE|ROWS|GROUPS */ yytestcase(yyruleno==301);
       151771  +{yymsp[0].minor.yy100 = yymsp[0].major; /*A-overwrites-X*/}
151621 151772           break;
151622 151773         case 8: /* cmd ::= COMMIT|END trans_opt */
151623 151774         case 9: /* cmd ::= ROLLBACK trans_opt */ yytestcase(yyruleno==9);
151624 151775   {sqlite3EndTransaction(pParse,yymsp[-1].major);}
151625 151776           break;
151626 151777         case 10: /* cmd ::= SAVEPOINT nm */
151627 151778   {
................................................................................
151636 151787         case 12: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
151637 151788   {
151638 151789     sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0);
151639 151790   }
151640 151791           break;
151641 151792         case 13: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */
151642 151793   {
151643         -   sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy494,0,0,yymsp[-2].minor.yy494);
       151794  +   sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy100,0,0,yymsp[-2].minor.yy100);
151644 151795   }
151645 151796           break;
151646 151797         case 14: /* createkw ::= CREATE */
151647 151798   {disableLookaside(pParse);}
151648 151799           break;
151649 151800         case 15: /* ifnotexists ::= */
151650 151801         case 18: /* temp ::= */ yytestcase(yyruleno==18);
151651 151802         case 21: /* table_options ::= */ yytestcase(yyruleno==21);
151652         -      case 42: /* autoinc ::= */ yytestcase(yyruleno==42);
151653         -      case 57: /* init_deferred_pred_opt ::= */ yytestcase(yyruleno==57);
151654         -      case 67: /* defer_subclause_opt ::= */ yytestcase(yyruleno==67);
151655         -      case 76: /* ifexists ::= */ yytestcase(yyruleno==76);
151656         -      case 93: /* distinct ::= */ yytestcase(yyruleno==93);
151657         -      case 226: /* collate ::= */ yytestcase(yyruleno==226);
151658         -{yymsp[1].minor.yy494 = 0;}
       151803  +      case 43: /* autoinc ::= */ yytestcase(yyruleno==43);
       151804  +      case 58: /* init_deferred_pred_opt ::= */ yytestcase(yyruleno==58);
       151805  +      case 68: /* defer_subclause_opt ::= */ yytestcase(yyruleno==68);
       151806  +      case 77: /* ifexists ::= */ yytestcase(yyruleno==77);
       151807  +      case 94: /* distinct ::= */ yytestcase(yyruleno==94);
       151808  +      case 227: /* collate ::= */ yytestcase(yyruleno==227);
       151809  +{yymsp[1].minor.yy100 = 0;}
151659 151810           break;
151660 151811         case 16: /* ifnotexists ::= IF NOT EXISTS */
151661         -{yymsp[-2].minor.yy494 = 1;}
       151812  +{yymsp[-2].minor.yy100 = 1;}
151662 151813           break;
151663 151814         case 17: /* temp ::= TEMP */
151664         -      case 43: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==43);
151665         -{yymsp[0].minor.yy494 = 1;}
       151815  +      case 44: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==44);
       151816  +{yymsp[0].minor.yy100 = 1;}
151666 151817           break;
151667 151818         case 19: /* create_table_args ::= LP columnlist conslist_opt RP table_options */
151668 151819   {
151669         -  sqlite3EndTable(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,yymsp[0].minor.yy494,0);
       151820  +  sqlite3EndTable(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,yymsp[0].minor.yy100,0);
151670 151821   }
151671 151822           break;
151672 151823         case 20: /* create_table_args ::= AS select */
151673 151824   {
151674         -  sqlite3EndTable(pParse,0,0,0,yymsp[0].minor.yy457);
151675         -  sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy457);
       151825  +  sqlite3EndTable(pParse,0,0,0,yymsp[0].minor.yy391);
       151826  +  sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy391);
151676 151827   }
151677 151828           break;
151678 151829         case 22: /* table_options ::= WITHOUT nm */
151679 151830   {
151680 151831     if( yymsp[0].minor.yy0.n==5 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,"rowid",5)==0 ){
151681         -    yymsp[-1].minor.yy494 = TF_WithoutRowid | TF_NoVisibleRowid;
       151832  +    yymsp[-1].minor.yy100 = TF_WithoutRowid | TF_NoVisibleRowid;
151682 151833     }else{
151683         -    yymsp[-1].minor.yy494 = 0;
       151834  +    yymsp[-1].minor.yy100 = 0;
151684 151835       sqlite3ErrorMsg(pParse, "unknown table option: %.*s", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z);
151685 151836     }
151686 151837   }
151687 151838           break;
151688 151839         case 23: /* columnname ::= nm typetoken */
151689 151840   {sqlite3AddColumn(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);}
151690 151841           break;
151691 151842         case 24: /* typetoken ::= */
151692         -      case 60: /* conslist_opt ::= */ yytestcase(yyruleno==60);
151693         -      case 99: /* as ::= */ yytestcase(yyruleno==99);
       151843  +      case 61: /* conslist_opt ::= */ yytestcase(yyruleno==61);
       151844  +      case 100: /* as ::= */ yytestcase(yyruleno==100);
151694 151845   {yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = 0;}
151695 151846           break;
151696 151847         case 25: /* typetoken ::= typename LP signed RP */
151697 151848   {
151698 151849     yymsp[-3].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z);
151699 151850   }
151700 151851           break;
................................................................................
151705 151856           break;
151706 151857         case 27: /* typename ::= typename ID|STRING */
151707 151858   {yymsp[-1].minor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);}
151708 151859           break;
151709 151860         case 28: /* scanpt ::= */
151710 151861   {
151711 151862     assert( yyLookahead!=YYNOCODE );
151712         -  yymsp[1].minor.yy294 = yyLookaheadToken.z;
       151863  +  yymsp[1].minor.yy528 = yyLookaheadToken.z;
151713 151864   }
151714 151865           break;
151715         -      case 29: /* ccons ::= CONSTRAINT nm */
151716         -      case 62: /* tcons ::= CONSTRAINT nm */ yytestcase(yyruleno==62);
       151866  +      case 29: /* scantok ::= */
       151867  +{
       151868  +  assert( yyLookahead!=YYNOCODE );
       151869  +  yymsp[1].minor.yy0 = yyLookaheadToken;
       151870  +}
       151871  +        break;
       151872  +      case 30: /* ccons ::= CONSTRAINT nm */
       151873  +      case 63: /* tcons ::= CONSTRAINT nm */ yytestcase(yyruleno==63);
151717 151874   {pParse->constraintName = yymsp[0].minor.yy0;}
151718 151875           break;
151719         -      case 30: /* ccons ::= DEFAULT scanpt term scanpt */
151720         -{sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy524,yymsp[-2].minor.yy294,yymsp[0].minor.yy294);}
       151876  +      case 31: /* ccons ::= DEFAULT scantok term */
       151877  +{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy102,yymsp[-1].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}
151721 151878           break;
151722         -      case 31: /* ccons ::= DEFAULT LP expr RP */
151723         -{sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy524,yymsp[-2].minor.yy0.z+1,yymsp[0].minor.yy0.z);}
       151879  +      case 32: /* ccons ::= DEFAULT LP expr RP */
       151880  +{sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy102,yymsp[-2].minor.yy0.z+1,yymsp[0].minor.yy0.z);}
151724 151881           break;
151725         -      case 32: /* ccons ::= DEFAULT PLUS term scanpt */
151726         -{sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy524,yymsp[-2].minor.yy0.z,yymsp[0].minor.yy294);}
       151882  +      case 33: /* ccons ::= DEFAULT PLUS scantok term */
       151883  +{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy102,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}
151727 151884           break;
151728         -      case 33: /* ccons ::= DEFAULT MINUS term scanpt */
       151885  +      case 34: /* ccons ::= DEFAULT MINUS scantok term */
151729 151886   {
151730         -  Expr *p = sqlite3PExpr(pParse, TK_UMINUS, yymsp[-1].minor.yy524, 0);
151731         -  sqlite3AddDefaultValue(pParse,p,yymsp[-2].minor.yy0.z,yymsp[0].minor.yy294);
       151887  +  Expr *p = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy102, 0);
       151888  +  sqlite3AddDefaultValue(pParse,p,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);
151732 151889   }
151733 151890           break;
151734         -      case 34: /* ccons ::= DEFAULT scanpt ID|INDEXED */
       151891  +      case 35: /* ccons ::= DEFAULT scantok ID|INDEXED */
151735 151892   {
151736 151893     Expr *p = tokenExpr(pParse, TK_STRING, yymsp[0].minor.yy0);
151737 151894     if( p ){
151738 151895       sqlite3ExprIdToTrueFalse(p);
151739 151896       testcase( p->op==TK_TRUEFALSE && sqlite3ExprTruthValue(p) );
151740 151897     }
151741 151898       sqlite3AddDefaultValue(pParse,p,yymsp[0].minor.yy0.z,yymsp[0].minor.yy0.z+yymsp[0].minor.yy0.n);
151742 151899   }
151743 151900           break;
151744         -      case 35: /* ccons ::= NOT NULL onconf */
151745         -{sqlite3AddNotNull(pParse, yymsp[0].minor.yy494);}
       151901  +      case 36: /* ccons ::= NOT NULL onconf */
       151902  +{sqlite3AddNotNull(pParse, yymsp[0].minor.yy100);}
151746 151903           break;
151747         -      case 36: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */
151748         -{sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy494,yymsp[0].minor.yy494,yymsp[-2].minor.yy494);}
       151904  +      case 37: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */
       151905  +{sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy100,yymsp[0].minor.yy100,yymsp[-2].minor.yy100);}
151749 151906           break;
151750         -      case 37: /* ccons ::= UNIQUE onconf */
151751         -{sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy494,0,0,0,0,
       151907  +      case 38: /* ccons ::= UNIQUE onconf */
       151908  +{sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy100,0,0,0,0,
151752 151909                                      SQLITE_IDXTYPE_UNIQUE);}
151753 151910           break;
151754         -      case 38: /* ccons ::= CHECK LP expr RP */
151755         -{sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy524);}
       151911  +      case 39: /* ccons ::= CHECK LP expr RP */
       151912  +{sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy102);}
151756 151913           break;
151757         -      case 39: /* ccons ::= REFERENCES nm eidlist_opt refargs */
151758         -{sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy434,yymsp[0].minor.yy494);}
       151914  +      case 40: /* ccons ::= REFERENCES nm eidlist_opt refargs */
       151915  +{sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy94,yymsp[0].minor.yy100);}
151759 151916           break;
151760         -      case 40: /* ccons ::= defer_subclause */
151761         -{sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy494);}
       151917  +      case 41: /* ccons ::= defer_subclause */
       151918  +{sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy100);}
151762 151919           break;
151763         -      case 41: /* ccons ::= COLLATE ID|STRING */
       151920  +      case 42: /* ccons ::= COLLATE ID|STRING */
151764 151921   {sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);}
151765 151922           break;
151766         -      case 44: /* refargs ::= */
151767         -{ yymsp[1].minor.yy494 = OE_None*0x0101; /* EV: R-19803-45884 */}
151768         -        break;
151769         -      case 45: /* refargs ::= refargs refarg */
151770         -{ yymsp[-1].minor.yy494 = (yymsp[-1].minor.yy494 & ~yymsp[0].minor.yy355.mask) | yymsp[0].minor.yy355.value; }
151771         -        break;
151772         -      case 46: /* refarg ::= MATCH nm */
151773         -{ yymsp[-1].minor.yy355.value = 0;     yymsp[-1].minor.yy355.mask = 0x000000; }
151774         -        break;
151775         -      case 47: /* refarg ::= ON INSERT refact */
151776         -{ yymsp[-2].minor.yy355.value = 0;     yymsp[-2].minor.yy355.mask = 0x000000; }
151777         -        break;
151778         -      case 48: /* refarg ::= ON DELETE refact */
151779         -{ yymsp[-2].minor.yy355.value = yymsp[0].minor.yy494;     yymsp[-2].minor.yy355.mask = 0x0000ff; }
151780         -        break;
151781         -      case 49: /* refarg ::= ON UPDATE refact */
151782         -{ yymsp[-2].minor.yy355.value = yymsp[0].minor.yy494<<8;  yymsp[-2].minor.yy355.mask = 0x00ff00; }
151783         -        break;
151784         -      case 50: /* refact ::= SET NULL */
151785         -{ yymsp[-1].minor.yy494 = OE_SetNull;  /* EV: R-33326-45252 */}
151786         -        break;
151787         -      case 51: /* refact ::= SET DEFAULT */
151788         -{ yymsp[-1].minor.yy494 = OE_SetDflt;  /* EV: R-33326-45252 */}
151789         -        break;
151790         -      case 52: /* refact ::= CASCADE */
151791         -{ yymsp[0].minor.yy494 = OE_Cascade;  /* EV: R-33326-45252 */}
151792         -        break;
151793         -      case 53: /* refact ::= RESTRICT */
151794         -{ yymsp[0].minor.yy494 = OE_Restrict; /* EV: R-33326-45252 */}
151795         -        break;
151796         -      case 54: /* refact ::= NO ACTION */
151797         -{ yymsp[-1].minor.yy494 = OE_None;     /* EV: R-33326-45252 */}
151798         -        break;
151799         -      case 55: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
151800         -{yymsp[-2].minor.yy494 = 0;}
151801         -        break;
151802         -      case 56: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
151803         -      case 71: /* orconf ::= OR resolvetype */ yytestcase(yyruleno==71);
151804         -      case 156: /* insert_cmd ::= INSERT orconf */ yytestcase(yyruleno==156);
151805         -{yymsp[-1].minor.yy494 = yymsp[0].minor.yy494;}
151806         -        break;
151807         -      case 58: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */
151808         -      case 75: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==75);
151809         -      case 198: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==198);
151810         -      case 201: /* in_op ::= NOT IN */ yytestcase(yyruleno==201);
151811         -      case 227: /* collate ::= COLLATE ID|STRING */ yytestcase(yyruleno==227);
151812         -{yymsp[-1].minor.yy494 = 1;}
151813         -        break;
151814         -      case 59: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
151815         -{yymsp[-1].minor.yy494 = 0;}
151816         -        break;
151817         -      case 61: /* tconscomma ::= COMMA */
       151923  +      case 45: /* refargs ::= */
       151924  +{ yymsp[1].minor.yy100 = OE_None*0x0101; /* EV: R-19803-45884 */}
       151925  +        break;
       151926  +      case 46: /* refargs ::= refargs refarg */
       151927  +{ yymsp[-1].minor.yy100 = (yymsp[-1].minor.yy100 & ~yymsp[0].minor.yy199.mask) | yymsp[0].minor.yy199.value; }
       151928  +        break;
       151929  +      case 47: /* refarg ::= MATCH nm */
       151930  +{ yymsp[-1].minor.yy199.value = 0;     yymsp[-1].minor.yy199.mask = 0x000000; }
       151931  +        break;
       151932  +      case 48: /* refarg ::= ON INSERT refact */
       151933  +{ yymsp[-2].minor.yy199.value = 0;     yymsp[-2].minor.yy199.mask = 0x000000; }
       151934  +        break;
       151935  +      case 49: /* refarg ::= ON DELETE refact */
       151936  +{ yymsp[-2].minor.yy199.value = yymsp[0].minor.yy100;     yymsp[-2].minor.yy199.mask = 0x0000ff; }
       151937  +        break;
       151938  +      case 50: /* refarg ::= ON UPDATE refact */
       151939  +{ yymsp[-2].minor.yy199.value = yymsp[0].minor.yy100<<8;  yymsp[-2].minor.yy199.mask = 0x00ff00; }
       151940  +        break;
       151941  +      case 51: /* refact ::= SET NULL */
       151942  +{ yymsp[-1].minor.yy100 = OE_SetNull;  /* EV: R-33326-45252 */}
       151943  +        break;
       151944  +      case 52: /* refact ::= SET DEFAULT */
       151945  +{ yymsp[-1].minor.yy100 = OE_SetDflt;  /* EV: R-33326-45252 */}
       151946  +        break;
       151947  +      case 53: /* refact ::= CASCADE */
       151948  +{ yymsp[0].minor.yy100 = OE_Cascade;  /* EV: R-33326-45252 */}
       151949  +        break;
       151950  +      case 54: /* refact ::= RESTRICT */
       151951  +{ yymsp[0].minor.yy100 = OE_Restrict; /* EV: R-33326-45252 */}
       151952  +        break;
       151953  +      case 55: /* refact ::= NO ACTION */
       151954  +{ yymsp[-1].minor.yy100 = OE_None;     /* EV: R-33326-45252 */}
       151955  +        break;
       151956  +      case 56: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
       151957  +{yymsp[-2].minor.yy100 = 0;}
       151958  +        break;
       151959  +      case 57: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
       151960  +      case 72: /* orconf ::= OR resolvetype */ yytestcase(yyruleno==72);
       151961  +      case 157: /* insert_cmd ::= INSERT orconf */ yytestcase(yyruleno==157);
       151962  +{yymsp[-1].minor.yy100 = yymsp[0].minor.yy100;}
       151963  +        break;
       151964  +      case 59: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */
       151965  +      case 76: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==76);
       151966  +      case 199: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==199);
       151967  +      case 202: /* in_op ::= NOT IN */ yytestcase(yyruleno==202);
       151968  +      case 228: /* collate ::= COLLATE ID|STRING */ yytestcase(yyruleno==228);
       151969  +{yymsp[-1].minor.yy100 = 1;}
       151970  +        break;
       151971  +      case 60: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
       151972  +{yymsp[-1].minor.yy100 = 0;}
       151973  +        break;
       151974  +      case 62: /* tconscomma ::= COMMA */
151818 151975   {pParse->constraintName.n = 0;}
151819 151976           break;
151820         -      case 63: /* tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
151821         -{sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy434,yymsp[0].minor.yy494,yymsp[-2].minor.yy494,0);}
       151977  +      case 64: /* tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
       151978  +{sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy94,yymsp[0].minor.yy100,yymsp[-2].minor.yy100,0);}
151822 151979           break;
151823         -      case 64: /* tcons ::= UNIQUE LP sortlist RP onconf */
151824         -{sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy434,yymsp[0].minor.yy494,0,0,0,0,
       151980  +      case 65: /* tcons ::= UNIQUE LP sortlist RP onconf */
       151981  +{sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy94,yymsp[0].minor.yy100,0,0,0,0,
151825 151982                                          SQLITE_IDXTYPE_UNIQUE);}
151826 151983           break;
151827         -      case 65: /* tcons ::= CHECK LP expr RP onconf */
151828         -{sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy524);}
151829         -        break;
151830         -      case 66: /* tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
151831         -{
151832         -    sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy434, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy434, yymsp[-1].minor.yy494);
151833         -    sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy494);
151834         -}
151835         -        break;
151836         -      case 68: /* onconf ::= */
151837         -      case 70: /* orconf ::= */ yytestcase(yyruleno==70);
151838         -{yymsp[1].minor.yy494 = OE_Default;}
151839         -        break;
151840         -      case 69: /* onconf ::= ON CONFLICT resolvetype */
151841         -{yymsp[-2].minor.yy494 = yymsp[0].minor.yy494;}
151842         -        break;
151843         -      case 72: /* resolvetype ::= IGNORE */
151844         -{yymsp[0].minor.yy494 = OE_Ignore;}
151845         -        break;
151846         -      case 73: /* resolvetype ::= REPLACE */
151847         -      case 157: /* insert_cmd ::= REPLACE */ yytestcase(yyruleno==157);
151848         -{yymsp[0].minor.yy494 = OE_Replace;}
151849         -        break;
151850         -      case 74: /* cmd ::= DROP TABLE ifexists fullname */
151851         -{
151852         -  sqlite3DropTable(pParse, yymsp[0].minor.yy483, 0, yymsp[-1].minor.yy494);
151853         -}
151854         -        break;
151855         -      case 77: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
151856         -{
151857         -  sqlite3CreateView(pParse, &yymsp[-8].minor.yy0, &yymsp[-4].minor.yy0, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy434, yymsp[0].minor.yy457, yymsp[-7].minor.yy494, yymsp[-5].minor.yy494);
151858         -}
151859         -        break;
151860         -      case 78: /* cmd ::= DROP VIEW ifexists fullname */
151861         -{
151862         -  sqlite3DropTable(pParse, yymsp[0].minor.yy483, 1, yymsp[-1].minor.yy494);
151863         -}
151864         -        break;
151865         -      case 79: /* cmd ::= select */
       151984  +      case 66: /* tcons ::= CHECK LP expr RP onconf */
       151985  +{sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy102);}
       151986  +        break;
       151987  +      case 67: /* tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
       151988  +{
       151989  +    sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy94, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy94, yymsp[-1].minor.yy100);
       151990  +    sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy100);
       151991  +}
       151992  +        break;
       151993  +      case 69: /* onconf ::= */
       151994  +      case 71: /* orconf ::= */ yytestcase(yyruleno==71);
       151995  +{yymsp[1].minor.yy100 = OE_Default;}
       151996  +        break;
       151997  +      case 70: /* onconf ::= ON CONFLICT resolvetype */
       151998  +{yymsp[-2].minor.yy100 = yymsp[0].minor.yy100;}
       151999  +        break;
       152000  +      case 73: /* resolvetype ::= IGNORE */
       152001  +{yymsp[0].minor.yy100 = OE_Ignore;}
       152002  +        break;
       152003  +      case 74: /* resolvetype ::= REPLACE */
       152004  +      case 158: /* insert_cmd ::= REPLACE */ yytestcase(yyruleno==158);
       152005  +{yymsp[0].minor.yy100 = OE_Replace;}
       152006  +        break;
       152007  +      case 75: /* cmd ::= DROP TABLE ifexists fullname */
       152008  +{
       152009  +  sqlite3DropTable(pParse, yymsp[0].minor.yy407, 0, yymsp[-1].minor.yy100);
       152010  +}
       152011  +        break;
       152012  +      case 78: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
       152013  +{
       152014  +  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);
       152015  +}
       152016  +        break;
       152017  +      case 79: /* cmd ::= DROP VIEW ifexists fullname */
       152018  +{
       152019  +  sqlite3DropTable(pParse, yymsp[0].minor.yy407, 1, yymsp[-1].minor.yy100);
       152020  +}
       152021  +        break;
       152022  +      case 80: /* cmd ::= select */
151866 152023   {
151867 152024     SelectDest dest = {SRT_Output, 0, 0, 0, 0, 0};
151868         -  sqlite3Select(pParse, yymsp[0].minor.yy457, &dest);
151869         -  sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy457);
       152025  +  sqlite3Select(pParse, yymsp[0].minor.yy391, &dest);
       152026  +  sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy391);
151870 152027   }
151871 152028           break;
151872         -      case 80: /* select ::= WITH wqlist selectnowith */
       152029  +      case 81: /* select ::= WITH wqlist selectnowith */
151873 152030   {
151874         -  Select *p = yymsp[0].minor.yy457;
       152031  +  Select *p = yymsp[0].minor.yy391;
151875 152032     if( p ){
151876         -    p->pWith = yymsp[-1].minor.yy59;
       152033  +    p->pWith = yymsp[-1].minor.yy243;
151877 152034       parserDoubleLinkSelect(pParse, p);
151878 152035     }else{
151879         -    sqlite3WithDelete(pParse->db, yymsp[-1].minor.yy59);
       152036  +    sqlite3WithDelete(pParse->db, yymsp[-1].minor.yy243);
151880 152037     }
151881         -  yymsp[-2].minor.yy457 = p;
       152038  +  yymsp[-2].minor.yy391 = p;
151882 152039   }
151883 152040           break;
151884         -      case 81: /* select ::= WITH RECURSIVE wqlist selectnowith */
       152041  +      case 82: /* select ::= WITH RECURSIVE wqlist selectnowith */
151885 152042   {
151886         -  Select *p = yymsp[0].minor.yy457;
       152043  +  Select *p = yymsp[0].minor.yy391;
151887 152044     if( p ){
151888         -    p->pWith = yymsp[-1].minor.yy59;
       152045  +    p->pWith = yymsp[-1].minor.yy243;
151889 152046       parserDoubleLinkSelect(pParse, p);
151890 152047     }else{
151891         -    sqlite3WithDelete(pParse->db, yymsp[-1].minor.yy59);
       152048  +    sqlite3WithDelete(pParse->db, yymsp[-1].minor.yy243);
151892 152049     }
151893         -  yymsp[-3].minor.yy457 = p;
       152050  +  yymsp[-3].minor.yy391 = p;
151894 152051   }
151895 152052           break;
151896         -      case 82: /* select ::= selectnowith */
       152053  +      case 83: /* select ::= selectnowith */
151897 152054   {
151898         -  Select *p = yymsp[0].minor.yy457;
       152055  +  Select *p = yymsp[0].minor.yy391;
151899 152056     if( p ){
151900 152057       parserDoubleLinkSelect(pParse, p);
151901 152058     }
151902         -  yymsp[0].minor.yy457 = p; /*A-overwrites-X*/
       152059  +  yymsp[0].minor.yy391 = p; /*A-overwrites-X*/
151903 152060   }
151904 152061           break;
151905         -      case 83: /* selectnowith ::= selectnowith multiselect_op oneselect */
       152062  +      case 84: /* selectnowith ::= selectnowith multiselect_op oneselect */
151906 152063   {
151907         -  Select *pRhs = yymsp[0].minor.yy457;
151908         -  Select *pLhs = yymsp[-2].minor.yy457;
       152064  +  Select *pRhs = yymsp[0].minor.yy391;
       152065  +  Select *pLhs = yymsp[-2].minor.yy391;
151909 152066     if( pRhs && pRhs->pPrior ){
151910 152067       SrcList *pFrom;
151911 152068       Token x;
151912 152069       x.n = 0;
151913 152070       parserDoubleLinkSelect(pParse, pRhs);
151914 152071       pFrom = sqlite3SrcListAppendFromTerm(pParse,0,0,0,&x,pRhs,0,0);
151915 152072       pRhs = sqlite3SelectNew(pParse,0,pFrom,0,0,0,0,0,0);
151916 152073     }
151917 152074     if( pRhs ){
151918         -    pRhs->op = (u8)yymsp[-1].minor.yy494;
       152075  +    pRhs->op = (u8)yymsp[-1].minor.yy100;
151919 152076       pRhs->pPrior = pLhs;
151920 152077       if( ALWAYS(pLhs) ) pLhs->selFlags &= ~SF_MultiValue;
151921 152078       pRhs->selFlags &= ~SF_MultiValue;
151922         -    if( yymsp[-1].minor.yy494!=TK_ALL ) pParse->hasCompound = 1;
       152079  +    if( yymsp[-1].minor.yy100!=TK_ALL ) pParse->hasCompound = 1;
151923 152080     }else{
151924 152081       sqlite3SelectDelete(pParse->db, pLhs);
151925 152082     }
151926         -  yymsp[-2].minor.yy457 = pRhs;
151927         -}
151928         -        break;
151929         -      case 84: /* multiselect_op ::= UNION */
151930         -      case 86: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==86);
151931         -{yymsp[0].minor.yy494 = yymsp[0].major; /*A-overwrites-OP*/}
151932         -        break;
151933         -      case 85: /* multiselect_op ::= UNION ALL */
151934         -{yymsp[-1].minor.yy494 = TK_ALL;}
151935         -        break;
151936         -      case 87: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
151937         -{
151938         -  yymsp[-8].minor.yy457 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy434,yymsp[-5].minor.yy483,yymsp[-4].minor.yy524,yymsp[-3].minor.yy434,yymsp[-2].minor.yy524,yymsp[-1].minor.yy434,yymsp[-7].minor.yy494,yymsp[0].minor.yy524);
151939         -}
151940         -        break;
151941         -      case 88: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
151942         -{
151943         -  yymsp[-9].minor.yy457 = sqlite3SelectNew(pParse,yymsp[-7].minor.yy434,yymsp[-6].minor.yy483,yymsp[-5].minor.yy524,yymsp[-4].minor.yy434,yymsp[-3].minor.yy524,yymsp[-1].minor.yy434,yymsp[-8].minor.yy494,yymsp[0].minor.yy524);
151944         -  if( yymsp[-9].minor.yy457 ){
151945         -    yymsp[-9].minor.yy457->pWinDefn = yymsp[-2].minor.yy295;
151946         -  }else{
151947         -    sqlite3WindowListDelete(pParse->db, yymsp[-2].minor.yy295);
151948         -  }
151949         -}
151950         -        break;
151951         -      case 89: /* values ::= VALUES LP nexprlist RP */
151952         -{
151953         -  yymsp[-3].minor.yy457 = sqlite3SelectNew(pParse,yymsp[-1].minor.yy434,0,0,0,0,0,SF_Values,0);
151954         -}
151955         -        break;
151956         -      case 90: /* values ::= values COMMA LP nexprlist RP */
151957         -{
151958         -  Select *pRight, *pLeft = yymsp[-4].minor.yy457;
151959         -  pRight = sqlite3SelectNew(pParse,yymsp[-1].minor.yy434,0,0,0,0,0,SF_Values|SF_MultiValue,0);
       152083  +  yymsp[-2].minor.yy391 = pRhs;
       152084  +}
       152085  +        break;
       152086  +      case 85: /* multiselect_op ::= UNION */
       152087  +      case 87: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==87);
       152088  +{yymsp[0].minor.yy100 = yymsp[0].major; /*A-overwrites-OP*/}
       152089  +        break;
       152090  +      case 86: /* multiselect_op ::= UNION ALL */
       152091  +{yymsp[-1].minor.yy100 = TK_ALL;}
       152092  +        break;
       152093  +      case 88: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
       152094  +{
       152095  +  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);
       152096  +}
       152097  +        break;
       152098  +      case 89: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
       152099  +{
       152100  +  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);
       152101  +  if( yymsp[-9].minor.yy391 ){
       152102  +    yymsp[-9].minor.yy391->pWinDefn = yymsp[-2].minor.yy379;
       152103  +  }else{
       152104  +    sqlite3WindowListDelete(pParse->db, yymsp[-2].minor.yy379);
       152105  +  }
       152106  +}
       152107  +        break;
       152108  +      case 90: /* values ::= VALUES LP nexprlist RP */
       152109  +{
       152110  +  yymsp[-3].minor.yy391 = sqlite3SelectNew(pParse,yymsp[-1].minor.yy94,0,0,0,0,0,SF_Values,0);
       152111  +}
       152112  +        break;
       152113  +      case 91: /* values ::= values COMMA LP nexprlist RP */
       152114  +{
       152115  +  Select *pRight, *pLeft = yymsp[-4].minor.yy391;
       152116  +  pRight = sqlite3SelectNew(pParse,yymsp[-1].minor.yy94,0,0,0,0,0,SF_Values|SF_MultiValue,0);
151960 152117     if( ALWAYS(pLeft) ) pLeft->selFlags &= ~SF_MultiValue;
151961 152118     if( pRight ){
151962 152119       pRight->op = TK_ALL;
151963 152120       pRight->pPrior = pLeft;
151964         -    yymsp[-4].minor.yy457 = pRight;
151965         -  }else{
151966         -    yymsp[-4].minor.yy457 = pLeft;
151967         -  }
151968         -}
151969         -        break;
151970         -      case 91: /* distinct ::= DISTINCT */
151971         -{yymsp[0].minor.yy494 = SF_Distinct;}
151972         -        break;
151973         -      case 92: /* distinct ::= ALL */
151974         -{yymsp[0].minor.yy494 = SF_All;}
151975         -        break;
151976         -      case 94: /* sclp ::= */
151977         -      case 127: /* orderby_opt ::= */ yytestcase(yyruleno==127);
151978         -      case 134: /* groupby_opt ::= */ yytestcase(yyruleno==134);
151979         -      case 214: /* exprlist ::= */ yytestcase(yyruleno==214);
151980         -      case 217: /* paren_exprlist ::= */ yytestcase(yyruleno==217);
151981         -      case 222: /* eidlist_opt ::= */ yytestcase(yyruleno==222);
151982         -{yymsp[1].minor.yy434 = 0;}
151983         -        break;
151984         -      case 95: /* selcollist ::= sclp scanpt expr scanpt as */
151985         -{
151986         -   yymsp[-4].minor.yy434 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy434, yymsp[-2].minor.yy524);
151987         -   if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy434, &yymsp[0].minor.yy0, 1);
151988         -   sqlite3ExprListSetSpan(pParse,yymsp[-4].minor.yy434,yymsp[-3].minor.yy294,yymsp[-1].minor.yy294);
151989         -}
151990         -        break;
151991         -      case 96: /* selcollist ::= sclp scanpt STAR */
       152121  +    yymsp[-4].minor.yy391 = pRight;
       152122  +  }else{
       152123  +    yymsp[-4].minor.yy391 = pLeft;
       152124  +  }
       152125  +}
       152126  +        break;
       152127  +      case 92: /* distinct ::= DISTINCT */
       152128  +{yymsp[0].minor.yy100 = SF_Distinct;}
       152129  +        break;
       152130  +      case 93: /* distinct ::= ALL */
       152131  +{yymsp[0].minor.yy100 = SF_All;}
       152132  +        break;
       152133  +      case 95: /* sclp ::= */
       152134  +      case 128: /* orderby_opt ::= */ yytestcase(yyruleno==128);
       152135  +      case 135: /* groupby_opt ::= */ yytestcase(yyruleno==135);
       152136  +      case 215: /* exprlist ::= */ yytestcase(yyruleno==215);
       152137  +      case 218: /* paren_exprlist ::= */ yytestcase(yyruleno==218);
       152138  +      case 223: /* eidlist_opt ::= */ yytestcase(yyruleno==223);
       152139  +{yymsp[1].minor.yy94 = 0;}
       152140  +        break;
       152141  +      case 96: /* selcollist ::= sclp scanpt expr scanpt as */
       152142  +{
       152143  +   yymsp[-4].minor.yy94 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy94, yymsp[-2].minor.yy102);
       152144  +   if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy94, &yymsp[0].minor.yy0, 1);
       152145  +   sqlite3ExprListSetSpan(pParse,yymsp[-4].minor.yy94,yymsp[-3].minor.yy528,yymsp[-1].minor.yy528);
       152146  +}
       152147  +        break;
       152148  +      case 97: /* selcollist ::= sclp scanpt STAR */
151992 152149   {
151993 152150     Expr *p = sqlite3Expr(pParse->db, TK_ASTERISK, 0);
151994         -  yymsp[-2].minor.yy434 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy434, p);
       152151  +  yymsp[-2].minor.yy94 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy94, p);
151995 152152   }
151996 152153           break;
151997         -      case 97: /* selcollist ::= sclp scanpt nm DOT STAR */
       152154  +      case 98: /* selcollist ::= sclp scanpt nm DOT STAR */
151998 152155   {
151999 152156     Expr *pRight = sqlite3PExpr(pParse, TK_ASTERISK, 0, 0);
152000 152157     Expr *pLeft = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-2].minor.yy0, 1);
152001 152158     Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight);
152002         -  yymsp[-4].minor.yy434 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy434, pDot);
       152159  +  yymsp[-4].minor.yy94 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy94, pDot);
152003 152160   }
152004 152161           break;
152005         -      case 98: /* as ::= AS nm */
152006         -      case 109: /* dbnm ::= DOT nm */ yytestcase(yyruleno==109);
152007         -      case 238: /* plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==238);
152008         -      case 239: /* minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==239);
       152162  +      case 99: /* as ::= AS nm */
       152163  +      case 110: /* dbnm ::= DOT nm */ yytestcase(yyruleno==110);
       152164  +      case 239: /* plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==239);
       152165  +      case 240: /* minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==240);
152009 152166   {yymsp[-1].minor.yy0 = yymsp[0].minor.yy0;}
152010 152167           break;
152011         -      case 100: /* from ::= */
152012         -{yymsp[1].minor.yy483 = sqlite3DbMallocZero(pParse->db, sizeof(*yymsp[1].minor.yy483));}
152013         -        break;
152014         -      case 101: /* from ::= FROM seltablist */
152015         -{
152016         -  yymsp[-1].minor.yy483 = yymsp[0].minor.yy483;
152017         -  sqlite3SrcListShiftJoinType(yymsp[-1].minor.yy483);
152018         -}
152019         -        break;
152020         -      case 102: /* stl_prefix ::= seltablist joinop */
152021         -{
152022         -   if( ALWAYS(yymsp[-1].minor.yy483 && yymsp[-1].minor.yy483->nSrc>0) ) yymsp[-1].minor.yy483->a[yymsp[-1].minor.yy483->nSrc-1].fg.jointype = (u8)yymsp[0].minor.yy494;
152023         -}
152024         -        break;
152025         -      case 103: /* stl_prefix ::= */
152026         -{yymsp[1].minor.yy483 = 0;}
152027         -        break;
152028         -      case 104: /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
152029         -{
152030         -  yymsp[-6].minor.yy483 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy483,&yymsp[-5].minor.yy0,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,0,yymsp[-1].minor.yy524,yymsp[0].minor.yy62);
152031         -  sqlite3SrcListIndexedBy(pParse, yymsp[-6].minor.yy483, &yymsp[-2].minor.yy0);
152032         -}
152033         -        break;
152034         -      case 105: /* seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */
152035         -{
152036         -  yymsp[-8].minor.yy483 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-8].minor.yy483,&yymsp[-7].minor.yy0,&yymsp[-6].minor.yy0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy524,yymsp[0].minor.yy62);
152037         -  sqlite3SrcListFuncArgs(pParse, yymsp[-8].minor.yy483, yymsp[-4].minor.yy434);
152038         -}
152039         -        break;
152040         -      case 106: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */
152041         -{
152042         -    yymsp[-6].minor.yy483 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy483,0,0,&yymsp[-2].minor.yy0,yymsp[-4].minor.yy457,yymsp[-1].minor.yy524,yymsp[0].minor.yy62);
152043         -  }
152044         -        break;
152045         -      case 107: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
152046         -{
152047         -    if( yymsp[-6].minor.yy483==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy524==0 && yymsp[0].minor.yy62==0 ){
152048         -      yymsp[-6].minor.yy483 = yymsp[-4].minor.yy483;
152049         -    }else if( yymsp[-4].minor.yy483->nSrc==1 ){
152050         -      yymsp[-6].minor.yy483 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy483,0,0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy524,yymsp[0].minor.yy62);
152051         -      if( yymsp[-6].minor.yy483 ){
152052         -        struct SrcList_item *pNew = &yymsp[-6].minor.yy483->a[yymsp[-6].minor.yy483->nSrc-1];
152053         -        struct SrcList_item *pOld = yymsp[-4].minor.yy483->a;
       152168  +      case 101: /* from ::= */
       152169  +{yymsp[1].minor.yy407 = sqlite3DbMallocZero(pParse->db, sizeof(*yymsp[1].minor.yy407));}
       152170  +        break;
       152171  +      case 102: /* from ::= FROM seltablist */
       152172  +{
       152173  +  yymsp[-1].minor.yy407 = yymsp[0].minor.yy407;
       152174  +  sqlite3SrcListShiftJoinType(yymsp[-1].minor.yy407);
       152175  +}
       152176  +        break;
       152177  +      case 103: /* stl_prefix ::= seltablist joinop */
       152178  +{
       152179  +   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;
       152180  +}
       152181  +        break;
       152182  +      case 104: /* stl_prefix ::= */
       152183  +{yymsp[1].minor.yy407 = 0;}
       152184  +        break;
       152185  +      case 105: /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
       152186  +{
       152187  +  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);
       152188  +  sqlite3SrcListIndexedBy(pParse, yymsp[-6].minor.yy407, &yymsp[-2].minor.yy0);
       152189  +}
       152190  +        break;
       152191  +      case 106: /* seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */
       152192  +{
       152193  +  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);
       152194  +  sqlite3SrcListFuncArgs(pParse, yymsp[-8].minor.yy407, yymsp[-4].minor.yy94);
       152195  +}
       152196  +        break;
       152197  +      case 107: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */
       152198  +{
       152199  +    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);
       152200  +  }
       152201  +        break;
       152202  +      case 108: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
       152203  +{
       152204  +    if( yymsp[-6].minor.yy407==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy102==0 && yymsp[0].minor.yy76==0 ){
       152205  +      yymsp[-6].minor.yy407 = yymsp[-4].minor.yy407;
       152206  +    }else if( yymsp[-4].minor.yy407->nSrc==1 ){
       152207  +      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);
       152208  +      if( yymsp[-6].minor.yy407 ){
       152209  +        struct SrcList_item *pNew = &yymsp[-6].minor.yy407->a[yymsp[-6].minor.yy407->nSrc-1];
       152210  +        struct SrcList_item *pOld = yymsp[-4].minor.yy407->a;
152054 152211           pNew->zName = pOld->zName;
152055 152212           pNew->zDatabase = pOld->zDatabase;
152056 152213           pNew->pSelect = pOld->pSelect;
152057 152214           if( pOld->fg.isTabFunc ){
152058 152215             pNew->u1.pFuncArg = pOld->u1.pFuncArg;
152059 152216             pOld->u1.pFuncArg = 0;
152060 152217             pOld->fg.isTabFunc = 0;
152061 152218             pNew->fg.isTabFunc = 1;
152062 152219           }
152063 152220           pOld->zName = pOld->zDatabase = 0;
152064 152221           pOld->pSelect = 0;
152065 152222         }
152066         -      sqlite3SrcListDelete(pParse->db, yymsp[-4].minor.yy483);
       152223  +      sqlite3SrcListDelete(pParse->db, yymsp[-4].minor.yy407);
152067 152224       }else{
152068 152225         Select *pSubquery;
152069         -      sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy483);
152070         -      pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy483,0,0,0,0,SF_NestedFrom,0);
152071         -      yymsp[-6].minor.yy483 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy483,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy524,yymsp[0].minor.yy62);
       152226  +      sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy407);
       152227  +      pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy407,0,0,0,0,SF_NestedFrom,0);
       152228  +      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);
152072 152229       }
152073 152230     }
152074 152231           break;
152075         -      case 108: /* dbnm ::= */
152076         -      case 122: /* indexed_opt ::= */ yytestcase(yyruleno==122);
       152232  +      case 109: /* dbnm ::= */
       152233  +      case 123: /* indexed_opt ::= */ yytestcase(yyruleno==123);
152077 152234   {yymsp[1].minor.yy0.z=0; yymsp[1].minor.yy0.n=0;}
152078 152235           break;
152079         -      case 110: /* fullname ::= nm */
152080         -{
152081         -  yylhsminor.yy483 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0);
152082         -  if( IN_RENAME_OBJECT && yylhsminor.yy483 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy483->a[0].zName, &yymsp[0].minor.yy0);
152083         -}
152084         -  yymsp[0].minor.yy483 = yylhsminor.yy483;
152085         -        break;
152086         -      case 111: /* fullname ::= nm DOT nm */
152087         -{
152088         -  yylhsminor.yy483 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
152089         -  if( IN_RENAME_OBJECT && yylhsminor.yy483 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy483->a[0].zName, &yymsp[0].minor.yy0);
152090         -}
152091         -  yymsp[-2].minor.yy483 = yylhsminor.yy483;
152092         -        break;
152093         -      case 112: /* xfullname ::= nm */
152094         -{yymsp[0].minor.yy483 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0); /*A-overwrites-X*/}
152095         -        break;
152096         -      case 113: /* xfullname ::= nm DOT nm */
152097         -{yymsp[-2].minor.yy483 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/}
152098         -        break;
152099         -      case 114: /* xfullname ::= nm DOT nm AS nm */
152100         -{
152101         -   yymsp[-4].minor.yy483 = sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,&yymsp[-2].minor.yy0); /*A-overwrites-X*/
152102         -   if( yymsp[-4].minor.yy483 ) yymsp[-4].minor.yy483->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
152103         -}
152104         -        break;
152105         -      case 115: /* xfullname ::= nm AS nm */
       152236  +      case 111: /* fullname ::= nm */
       152237  +{
       152238  +  yylhsminor.yy407 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0);
       152239  +  if( IN_RENAME_OBJECT && yylhsminor.yy407 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy407->a[0].zName, &yymsp[0].minor.yy0);
       152240  +}
       152241  +  yymsp[0].minor.yy407 = yylhsminor.yy407;
       152242  +        break;
       152243  +      case 112: /* fullname ::= nm DOT nm */
       152244  +{
       152245  +  yylhsminor.yy407 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
       152246  +  if( IN_RENAME_OBJECT && yylhsminor.yy407 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy407->a[0].zName, &yymsp[0].minor.yy0);
       152247  +}
       152248  +  yymsp[-2].minor.yy407 = yylhsminor.yy407;
       152249  +        break;
       152250  +      case 113: /* xfullname ::= nm */
       152251  +{yymsp[0].minor.yy407 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0); /*A-overwrites-X*/}
       152252  +        break;
       152253  +      case 114: /* xfullname ::= nm DOT nm */
       152254  +{yymsp[-2].minor.yy407 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/}
       152255  +        break;
       152256  +      case 115: /* xfullname ::= nm DOT nm AS nm */
       152257  +{
       152258  +   yymsp[-4].minor.yy407 = sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,&yymsp[-2].minor.yy0); /*A-overwrites-X*/
       152259  +   if( yymsp[-4].minor.yy407 ) yymsp[-4].minor.yy407->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
       152260  +}
       152261  +        break;
       152262  +      case 116: /* xfullname ::= nm AS nm */
152106 152263   {  
152107         -   yymsp[-2].minor.yy483 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,0); /*A-overwrites-X*/
152108         -   if( yymsp[-2].minor.yy483 ) yymsp[-2].minor.yy483->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
152109         -}
152110         -        break;
152111         -      case 116: /* joinop ::= COMMA|JOIN */
152112         -{ yymsp[0].minor.yy494 = JT_INNER; }
152113         -        break;
152114         -      case 117: /* joinop ::= JOIN_KW JOIN */
152115         -{yymsp[-1].minor.yy494 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0);  /*X-overwrites-A*/}
152116         -        break;
152117         -      case 118: /* joinop ::= JOIN_KW nm JOIN */
152118         -{yymsp[-2].minor.yy494 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); /*X-overwrites-A*/}
152119         -        break;
152120         -      case 119: /* joinop ::= JOIN_KW nm nm JOIN */
152121         -{yymsp[-3].minor.yy494 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);/*X-overwrites-A*/}
152122         -        break;
152123         -      case 120: /* on_opt ::= ON expr */
152124         -      case 137: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==137);
152125         -      case 144: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==144);
152126         -      case 210: /* case_else ::= ELSE expr */ yytestcase(yyruleno==210);
152127         -      case 231: /* vinto ::= INTO expr */ yytestcase(yyruleno==231);
152128         -{yymsp[-1].minor.yy524 = yymsp[0].minor.yy524;}
152129         -        break;
152130         -      case 121: /* on_opt ::= */
152131         -      case 136: /* having_opt ::= */ yytestcase(yyruleno==136);
152132         -      case 138: /* limit_opt ::= */ yytestcase(yyruleno==138);
152133         -      case 143: /* where_opt ::= */ yytestcase(yyruleno==143);
152134         -      case 211: /* case_else ::= */ yytestcase(yyruleno==211);
152135         -      case 213: /* case_operand ::= */ yytestcase(yyruleno==213);
152136         -      case 232: /* vinto ::= */ yytestcase(yyruleno==232);
152137         -{yymsp[1].minor.yy524 = 0;}
152138         -        break;
152139         -      case 123: /* indexed_opt ::= INDEXED BY nm */
       152264  +   yymsp[-2].minor.yy407 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,0); /*A-overwrites-X*/
       152265  +   if( yymsp[-2].minor.yy407 ) yymsp[-2].minor.yy407->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
       152266  +}
       152267  +        break;
       152268  +      case 117: /* joinop ::= COMMA|JOIN */
       152269  +{ yymsp[0].minor.yy100 = JT_INNER; }
       152270  +        break;
       152271  +      case 118: /* joinop ::= JOIN_KW JOIN */
       152272  +{yymsp[-1].minor.yy100 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0);  /*X-overwrites-A*/}
       152273  +        break;
       152274  +      case 119: /* joinop ::= JOIN_KW nm JOIN */
       152275  +{yymsp[-2].minor.yy100 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); /*X-overwrites-A*/}
       152276  +        break;
       152277  +      case 120: /* joinop ::= JOIN_KW nm nm JOIN */
       152278  +{yymsp[-3].minor.yy100 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);/*X-overwrites-A*/}
       152279  +        break;
       152280  +      case 121: /* on_opt ::= ON expr */
       152281  +      case 138: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==138);
       152282  +      case 145: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==145);
       152283  +      case 211: /* case_else ::= ELSE expr */ yytestcase(yyruleno==211);
       152284  +      case 232: /* vinto ::= INTO expr */ yytestcase(yyruleno==232);
       152285  +{yymsp[-1].minor.yy102 = yymsp[0].minor.yy102;}
       152286  +        break;
       152287  +      case 122: /* on_opt ::= */
       152288  +      case 137: /* having_opt ::= */ yytestcase(yyruleno==137);
       152289  +      case 139: /* limit_opt ::= */ yytestcase(yyruleno==139);
       152290  +      case 144: /* where_opt ::= */ yytestcase(yyruleno==144);
       152291  +      case 212: /* case_else ::= */ yytestcase(yyruleno==212);
       152292  +      case 214: /* case_operand ::= */ yytestcase(yyruleno==214);
       152293  +      case 233: /* vinto ::= */ yytestcase(yyruleno==233);
       152294  +{yymsp[1].minor.yy102 = 0;}
       152295  +        break;
       152296  +      case 124: /* indexed_opt ::= INDEXED BY nm */
152140 152297   {yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;}
152141 152298           break;
152142         -      case 124: /* indexed_opt ::= NOT INDEXED */
       152299  +      case 125: /* indexed_opt ::= NOT INDEXED */
152143 152300   {yymsp[-1].minor.yy0.z=0; yymsp[-1].minor.yy0.n=1;}
152144 152301           break;
152145         -      case 125: /* using_opt ::= USING LP idlist RP */
152146         -{yymsp[-3].minor.yy62 = yymsp[-1].minor.yy62;}
152147         -        break;
152148         -      case 126: /* using_opt ::= */
152149         -      case 158: /* idlist_opt ::= */ yytestcase(yyruleno==158);
152150         -{yymsp[1].minor.yy62 = 0;}
152151         -        break;
152152         -      case 128: /* orderby_opt ::= ORDER BY sortlist */
152153         -      case 135: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==135);
152154         -{yymsp[-2].minor.yy434 = yymsp[0].minor.yy434;}
152155         -        break;
152156         -      case 129: /* sortlist ::= sortlist COMMA expr sortorder */
152157         -{
152158         -  yymsp[-3].minor.yy434 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy434,yymsp[-1].minor.yy524);
152159         -  sqlite3ExprListSetSortOrder(yymsp[-3].minor.yy434,yymsp[0].minor.yy494);
152160         -}
152161         -        break;
152162         -      case 130: /* sortlist ::= expr sortorder */
152163         -{
152164         -  yymsp[-1].minor.yy434 = sqlite3ExprListAppend(pParse,0,yymsp[-1].minor.yy524); /*A-overwrites-Y*/
152165         -  sqlite3ExprListSetSortOrder(yymsp[-1].minor.yy434,yymsp[0].minor.yy494);
152166         -}
152167         -        break;
152168         -      case 131: /* sortorder ::= ASC */
152169         -{yymsp[0].minor.yy494 = SQLITE_SO_ASC;}
152170         -        break;
152171         -      case 132: /* sortorder ::= DESC */
152172         -{yymsp[0].minor.yy494 = SQLITE_SO_DESC;}
152173         -        break;
152174         -      case 133: /* sortorder ::= */
152175         -{yymsp[1].minor.yy494 = SQLITE_SO_UNDEFINED;}
152176         -        break;
152177         -      case 139: /* limit_opt ::= LIMIT expr */
152178         -{yymsp[-1].minor.yy524 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy524,0);}
152179         -        break;
152180         -      case 140: /* limit_opt ::= LIMIT expr OFFSET expr */
152181         -{yymsp[-3].minor.yy524 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[-2].minor.yy524,yymsp[0].minor.yy524);}
152182         -        break;
152183         -      case 141: /* limit_opt ::= LIMIT expr COMMA expr */
152184         -{yymsp[-3].minor.yy524 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy524,yymsp[-2].minor.yy524);}
152185         -        break;
152186         -      case 142: /* cmd ::= with DELETE FROM xfullname indexed_opt where_opt */
152187         -{
152188         -  sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy483, &yymsp[-1].minor.yy0);
152189         -  sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy483,yymsp[0].minor.yy524,0,0);
152190         -}
152191         -        break;
152192         -      case 145: /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt */
152193         -{
152194         -  sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy483, &yymsp[-3].minor.yy0);
152195         -  sqlite3ExprListCheckLength(pParse,yymsp[-1].minor.yy434,"set list"); 
152196         -  sqlite3Update(pParse,yymsp[-4].minor.yy483,yymsp[-1].minor.yy434,yymsp[0].minor.yy524,yymsp[-5].minor.yy494,0,0,0);
152197         -}
152198         -        break;
152199         -      case 146: /* setlist ::= setlist COMMA nm EQ expr */
152200         -{
152201         -  yymsp[-4].minor.yy434 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy434, yymsp[0].minor.yy524);
152202         -  sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy434, &yymsp[-2].minor.yy0, 1);
152203         -}
152204         -        break;
152205         -      case 147: /* setlist ::= setlist COMMA LP idlist RP EQ expr */
152206         -{
152207         -  yymsp[-6].minor.yy434 = sqlite3ExprListAppendVector(pParse, yymsp[-6].minor.yy434, yymsp[-3].minor.yy62, yymsp[0].minor.yy524);
152208         -}
152209         -        break;
152210         -      case 148: /* setlist ::= nm EQ expr */
152211         -{
152212         -  yylhsminor.yy434 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy524);
152213         -  sqlite3ExprListSetName(pParse, yylhsminor.yy434, &yymsp[-2].minor.yy0, 1);
152214         -}
152215         -  yymsp[-2].minor.yy434 = yylhsminor.yy434;
152216         -        break;
152217         -      case 149: /* setlist ::= LP idlist RP EQ expr */
152218         -{
152219         -  yymsp[-4].minor.yy434 = sqlite3ExprListAppendVector(pParse, 0, yymsp[-3].minor.yy62, yymsp[0].minor.yy524);
152220         -}
152221         -        break;
152222         -      case 150: /* cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
152223         -{
152224         -  sqlite3Insert(pParse, yymsp[-3].minor.yy483, yymsp[-1].minor.yy457, yymsp[-2].minor.yy62, yymsp[-5].minor.yy494, yymsp[0].minor.yy136);
152225         -}
152226         -        break;
152227         -      case 151: /* cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES */
152228         -{
152229         -  sqlite3Insert(pParse, yymsp[-3].minor.yy483, 0, yymsp[-2].minor.yy62, yymsp[-5].minor.yy494, 0);
152230         -}
152231         -        break;
152232         -      case 152: /* upsert ::= */
152233         -{ yymsp[1].minor.yy136 = 0; }
152234         -        break;
152235         -      case 153: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt */
152236         -{ yymsp[-10].minor.yy136 = sqlite3UpsertNew(pParse->db,yymsp[-7].minor.yy434,yymsp[-5].minor.yy524,yymsp[-1].minor.yy434,yymsp[0].minor.yy524);}
152237         -        break;
152238         -      case 154: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING */
152239         -{ yymsp[-7].minor.yy136 = sqlite3UpsertNew(pParse->db,yymsp[-4].minor.yy434,yymsp[-2].minor.yy524,0,0); }
152240         -        break;
152241         -      case 155: /* upsert ::= ON CONFLICT DO NOTHING */
152242         -{ yymsp[-3].minor.yy136 = sqlite3UpsertNew(pParse->db,0,0,0,0); }
152243         -        break;
152244         -      case 159: /* idlist_opt ::= LP idlist RP */
152245         -{yymsp[-2].minor.yy62 = yymsp[-1].minor.yy62;}
152246         -        break;
152247         -      case 160: /* idlist ::= idlist COMMA nm */
152248         -{yymsp[-2].minor.yy62 = sqlite3IdListAppend(pParse,yymsp[-2].minor.yy62,&yymsp[0].minor.yy0);}
152249         -        break;
152250         -      case 161: /* idlist ::= nm */
152251         -{yymsp[0].minor.yy62 = sqlite3IdListAppend(pParse,0,&yymsp[0].minor.yy0); /*A-overwrites-Y*/}
152252         -        break;
152253         -      case 162: /* expr ::= LP expr RP */
152254         -{yymsp[-2].minor.yy524 = yymsp[-1].minor.yy524;}
152255         -        break;
152256         -      case 163: /* expr ::= ID|INDEXED */
152257         -      case 164: /* expr ::= JOIN_KW */ yytestcase(yyruleno==164);
152258         -{yymsp[0].minor.yy524=tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0); /*A-overwrites-X*/}
152259         -        break;
152260         -      case 165: /* expr ::= nm DOT nm */
       152302  +      case 126: /* using_opt ::= USING LP idlist RP */
       152303  +{yymsp[-3].minor.yy76 = yymsp[-1].minor.yy76;}
       152304  +        break;
       152305  +      case 127: /* using_opt ::= */
       152306  +      case 159: /* idlist_opt ::= */ yytestcase(yyruleno==159);
       152307  +{yymsp[1].minor.yy76 = 0;}
       152308  +        break;
       152309  +      case 129: /* orderby_opt ::= ORDER BY sortlist */
       152310  +      case 136: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==136);
       152311  +{yymsp[-2].minor.yy94 = yymsp[0].minor.yy94;}
       152312  +        break;
       152313  +      case 130: /* sortlist ::= sortlist COMMA expr sortorder */
       152314  +{
       152315  +  yymsp[-3].minor.yy94 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy94,yymsp[-1].minor.yy102);
       152316  +  sqlite3ExprListSetSortOrder(yymsp[-3].minor.yy94,yymsp[0].minor.yy100);
       152317  +}
       152318  +        break;
       152319  +      case 131: /* sortlist ::= expr sortorder */
       152320  +{
       152321  +  yymsp[-1].minor.yy94 = sqlite3ExprListAppend(pParse,0,yymsp[-1].minor.yy102); /*A-overwrites-Y*/
       152322  +  sqlite3ExprListSetSortOrder(yymsp[-1].minor.yy94,yymsp[0].minor.yy100);
       152323  +}
       152324  +        break;
       152325  +      case 132: /* sortorder ::= ASC */
       152326  +{yymsp[0].minor.yy100 = SQLITE_SO_ASC;}
       152327  +        break;
       152328  +      case 133: /* sortorder ::= DESC */
       152329  +{yymsp[0].minor.yy100 = SQLITE_SO_DESC;}
       152330  +        break;
       152331  +      case 134: /* sortorder ::= */
       152332  +{yymsp[1].minor.yy100 = SQLITE_SO_UNDEFINED;}
       152333  +        break;
       152334  +      case 140: /* limit_opt ::= LIMIT expr */
       152335  +{yymsp[-1].minor.yy102 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy102,0);}
       152336  +        break;
       152337  +      case 141: /* limit_opt ::= LIMIT expr OFFSET expr */
       152338  +{yymsp[-3].minor.yy102 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[-2].minor.yy102,yymsp[0].minor.yy102);}
       152339  +        break;
       152340  +      case 142: /* limit_opt ::= LIMIT expr COMMA expr */
       152341  +{yymsp[-3].minor.yy102 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy102,yymsp[-2].minor.yy102);}
       152342  +        break;
       152343  +      case 143: /* cmd ::= with DELETE FROM xfullname indexed_opt where_opt */
       152344  +{
       152345  +  sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy407, &yymsp[-1].minor.yy0);
       152346  +  sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy407,yymsp[0].minor.yy102,0,0);
       152347  +}
       152348  +        break;
       152349  +      case 146: /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt */
       152350  +{
       152351  +  sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy407, &yymsp[-3].minor.yy0);
       152352  +  sqlite3ExprListCheckLength(pParse,yymsp[-1].minor.yy94,"set list"); 
       152353  +  sqlite3Update(pParse,yymsp[-4].minor.yy407,yymsp[-1].minor.yy94,yymsp[0].minor.yy102,yymsp[-5].minor.yy100,0,0,0);
       152354  +}
       152355  +        break;
       152356  +      case 147: /* setlist ::= setlist COMMA nm EQ expr */
       152357  +{
       152358  +  yymsp[-4].minor.yy94 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy94, yymsp[0].minor.yy102);
       152359  +  sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy94, &yymsp[-2].minor.yy0, 1);
       152360  +}
       152361  +        break;
       152362  +      case 148: /* setlist ::= setlist COMMA LP idlist RP EQ expr */
       152363  +{
       152364  +  yymsp[-6].minor.yy94 = sqlite3ExprListAppendVector(pParse, yymsp[-6].minor.yy94, yymsp[-3].minor.yy76, yymsp[0].minor.yy102);
       152365  +}
       152366  +        break;
       152367  +      case 149: /* setlist ::= nm EQ expr */
       152368  +{
       152369  +  yylhsminor.yy94 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy102);
       152370  +  sqlite3ExprListSetName(pParse, yylhsminor.yy94, &yymsp[-2].minor.yy0, 1);
       152371  +}
       152372  +  yymsp[-2].minor.yy94 = yylhsminor.yy94;
       152373  +        break;
       152374  +      case 150: /* setlist ::= LP idlist RP EQ expr */
       152375  +{
       152376  +  yymsp[-4].minor.yy94 = sqlite3ExprListAppendVector(pParse, 0, yymsp[-3].minor.yy76, yymsp[0].minor.yy102);
       152377  +}
       152378  +        break;
       152379  +      case 151: /* cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
       152380  +{
       152381  +  sqlite3Insert(pParse, yymsp[-3].minor.yy407, yymsp[-1].minor.yy391, yymsp[-2].minor.yy76, yymsp[-5].minor.yy100, yymsp[0].minor.yy95);
       152382  +}
       152383  +        break;
       152384  +      case 152: /* cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES */
       152385  +{
       152386  +  sqlite3Insert(pParse, yymsp[-3].minor.yy407, 0, yymsp[-2].minor.yy76, yymsp[-5].minor.yy100, 0);
       152387  +}
       152388  +        break;
       152389  +      case 153: /* upsert ::= */
       152390  +{ yymsp[1].minor.yy95 = 0; }
       152391  +        break;
       152392  +      case 154: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt */
       152393  +{ yymsp[-10].minor.yy95 = sqlite3UpsertNew(pParse->db,yymsp[-7].minor.yy94,yymsp[-5].minor.yy102,yymsp[-1].minor.yy94,yymsp[0].minor.yy102);}
       152394  +        break;
       152395  +      case 155: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING */
       152396  +{ yymsp[-7].minor.yy95 = sqlite3UpsertNew(pParse->db,yymsp[-4].minor.yy94,yymsp[-2].minor.yy102,0,0); }
       152397  +        break;
       152398  +      case 156: /* upsert ::= ON CONFLICT DO NOTHING */
       152399  +{ yymsp[-3].minor.yy95 = sqlite3UpsertNew(pParse->db,0,0,0,0); }
       152400  +        break;
       152401  +      case 160: /* idlist_opt ::= LP idlist RP */
       152402  +{yymsp[-2].minor.yy76 = yymsp[-1].minor.yy76;}
       152403  +        break;
       152404  +      case 161: /* idlist ::= idlist COMMA nm */
       152405  +{yymsp[-2].minor.yy76 = sqlite3IdListAppend(pParse,yymsp[-2].minor.yy76,&yymsp[0].minor.yy0);}
       152406  +        break;
       152407  +      case 162: /* idlist ::= nm */
       152408  +{yymsp[0].minor.yy76 = sqlite3IdListAppend(pParse,0,&yymsp[0].minor.yy0); /*A-overwrites-Y*/}
       152409  +        break;
       152410  +      case 163: /* expr ::= LP expr RP */
       152411  +{yymsp[-2].minor.yy102 = yymsp[-1].minor.yy102;}
       152412  +        break;
       152413  +      case 164: /* expr ::= ID|INDEXED */
       152414  +      case 165: /* expr ::= JOIN_KW */ yytestcase(yyruleno==165);
       152415  +{yymsp[0].minor.yy102=tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0); /*A-overwrites-X*/}
       152416  +        break;
       152417  +      case 166: /* expr ::= nm DOT nm */
152261 152418   {
152262 152419     Expr *temp1 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-2].minor.yy0, 1);
152263 152420     Expr *temp2 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[0].minor.yy0, 1);
152264 152421     if( IN_RENAME_OBJECT ){
152265 152422       sqlite3RenameTokenMap(pParse, (void*)temp2, &yymsp[0].minor.yy0);
152266 152423       sqlite3RenameTokenMap(pParse, (void*)temp1, &yymsp[-2].minor.yy0);
152267 152424     }
152268         -  yylhsminor.yy524 = sqlite3PExpr(pParse, TK_DOT, temp1, temp2);
       152425  +  yylhsminor.yy102 = sqlite3PExpr(pParse, TK_DOT, temp1, temp2);
152269 152426   }
152270         -  yymsp[-2].minor.yy524 = yylhsminor.yy524;
       152427  +  yymsp[-2].minor.yy102 = yylhsminor.yy102;
152271 152428           break;
152272         -      case 166: /* expr ::= nm DOT nm DOT nm */
       152429  +      case 167: /* expr ::= nm DOT nm DOT nm */
152273 152430   {
152274 152431     Expr *temp1 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-4].minor.yy0, 1);
152275 152432     Expr *temp2 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-2].minor.yy0, 1);
152276 152433     Expr *temp3 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[0].minor.yy0, 1);
152277 152434     Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3);
152278 152435     if( IN_RENAME_OBJECT ){
152279 152436       sqlite3RenameTokenMap(pParse, (void*)temp3, &yymsp[0].minor.yy0);
152280 152437       sqlite3RenameTokenMap(pParse, (void*)temp2, &yymsp[-2].minor.yy0);
152281 152438     }
152282         -  yylhsminor.yy524 = sqlite3PExpr(pParse, TK_DOT, temp1, temp4);
       152439  +  yylhsminor.yy102 = sqlite3PExpr(pParse, TK_DOT, temp1, temp4);
152283 152440   }
152284         -  yymsp[-4].minor.yy524 = yylhsminor.yy524;
       152441  +  yymsp[-4].minor.yy102 = yylhsminor.yy102;
152285 152442           break;
152286         -      case 167: /* term ::= NULL|FLOAT|BLOB */
152287         -      case 168: /* term ::= STRING */ yytestcase(yyruleno==168);
152288         -{yymsp[0].minor.yy524=tokenExpr(pParse,yymsp[0].major,yymsp[0].minor.yy0); /*A-overwrites-X*/}
       152443  +      case 168: /* term ::= NULL|FLOAT|BLOB */
       152444  +      case 169: /* term ::= STRING */ yytestcase(yyruleno==169);
       152445  +{yymsp[0].minor.yy102=tokenExpr(pParse,yymsp[0].major,yymsp[0].minor.yy0); /*A-overwrites-X*/}
152289 152446           break;
152290         -      case 169: /* term ::= INTEGER */
       152447  +      case 170: /* term ::= INTEGER */
152291 152448   {
152292         -  yylhsminor.yy524 = sqlite3ExprAlloc(pParse->db, TK_INTEGER, &yymsp[0].minor.yy0, 1);
       152449  +  yylhsminor.yy102 = sqlite3ExprAlloc(pParse->db, TK_INTEGER, &yymsp[0].minor.yy0, 1);
152293 152450   }
152294         -  yymsp[0].minor.yy524 = yylhsminor.yy524;
       152451  +  yymsp[0].minor.yy102 = yylhsminor.yy102;
152295 152452           break;
152296         -      case 170: /* expr ::= VARIABLE */
       152453  +      case 171: /* expr ::= VARIABLE */
152297 152454   {
152298 152455     if( !(yymsp[0].minor.yy0.z[0]=='#' && sqlite3Isdigit(yymsp[0].minor.yy0.z[1])) ){
152299 152456       u32 n = yymsp[0].minor.yy0.n;
152300         -    yymsp[0].minor.yy524 = tokenExpr(pParse, TK_VARIABLE, yymsp[0].minor.yy0);
152301         -    sqlite3ExprAssignVarNumber(pParse, yymsp[0].minor.yy524, n);
       152457  +    yymsp[0].minor.yy102 = tokenExpr(pParse, TK_VARIABLE, yymsp[0].minor.yy0);
       152458  +    sqlite3ExprAssignVarNumber(pParse, yymsp[0].minor.yy102, n);
152302 152459     }else{
152303 152460       /* When doing a nested parse, one can include terms in an expression
152304 152461       ** that look like this:   #1 #2 ...  These terms refer to registers
152305 152462       ** in the virtual machine.  #N is the N-th register. */
152306 152463       Token t = yymsp[0].minor.yy0; /*A-overwrites-X*/
152307 152464       assert( t.n>=2 );
152308 152465       if( pParse->nested==0 ){
152309 152466         sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &t);
152310         -      yymsp[0].minor.yy524 = 0;
152311         -    }else{
152312         -      yymsp[0].minor.yy524 = sqlite3PExpr(pParse, TK_REGISTER, 0, 0);
152313         -      if( yymsp[0].minor.yy524 ) sqlite3GetInt32(&t.z[1], &yymsp[0].minor.yy524->iTable);
152314         -    }
152315         -  }
152316         -}
152317         -        break;
152318         -      case 171: /* expr ::= expr COLLATE ID|STRING */
152319         -{
152320         -  yymsp[-2].minor.yy524 = sqlite3ExprAddCollateToken(pParse, yymsp[-2].minor.yy524, &yymsp[0].minor.yy0, 1);
152321         -}
152322         -        break;
152323         -      case 172: /* expr ::= CAST LP expr AS typetoken RP */
152324         -{
152325         -  yymsp[-5].minor.yy524 = sqlite3ExprAlloc(pParse->db, TK_CAST, &yymsp[-1].minor.yy0, 1);
152326         -  sqlite3ExprAttachSubtrees(pParse->db, yymsp[-5].minor.yy524, yymsp[-3].minor.yy524, 0);
152327         -}
152328         -        break;
152329         -      case 173: /* expr ::= ID|INDEXED LP distinct exprlist RP */
152330         -{
152331         -  yylhsminor.yy524 = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy434, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy494);
152332         -}
152333         -  yymsp[-4].minor.yy524 = yylhsminor.yy524;
152334         -        break;
152335         -      case 174: /* expr ::= ID|INDEXED LP STAR RP */
152336         -{
152337         -  yylhsminor.yy524 = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0, 0);
152338         -}
152339         -  yymsp[-3].minor.yy524 = yylhsminor.yy524;
152340         -        break;
152341         -      case 175: /* expr ::= ID|INDEXED LP distinct exprlist RP over_clause */
152342         -{
152343         -  yylhsminor.yy524 = sqlite3ExprFunction(pParse, yymsp[-2].minor.yy434, &yymsp[-5].minor.yy0, yymsp[-3].minor.yy494);
152344         -  sqlite3WindowAttach(pParse, yylhsminor.yy524, yymsp[0].minor.yy295);
152345         -}
152346         -  yymsp[-5].minor.yy524 = yylhsminor.yy524;
152347         -        break;
152348         -      case 176: /* expr ::= ID|INDEXED LP STAR RP over_clause */
152349         -{
152350         -  yylhsminor.yy524 = sqlite3ExprFunction(pParse, 0, &yymsp[-4].minor.yy0, 0);
152351         -  sqlite3WindowAttach(pParse, yylhsminor.yy524, yymsp[0].minor.yy295);
152352         -}
152353         -  yymsp[-4].minor.yy524 = yylhsminor.yy524;
152354         -        break;
152355         -      case 177: /* term ::= CTIME_KW */
152356         -{
152357         -  yylhsminor.yy524 = sqlite3ExprFunction(pParse, 0, &yymsp[0].minor.yy0, 0);
152358         -}
152359         -  yymsp[0].minor.yy524 = yylhsminor.yy524;
152360         -        break;
152361         -      case 178: /* expr ::= LP nexprlist COMMA expr RP */
152362         -{
152363         -  ExprList *pList = sqlite3ExprListAppend(pParse, yymsp[-3].minor.yy434, yymsp[-1].minor.yy524);
152364         -  yymsp[-4].minor.yy524 = sqlite3PExpr(pParse, TK_VECTOR, 0, 0);
152365         -  if( yymsp[-4].minor.yy524 ){
152366         -    yymsp[-4].minor.yy524->x.pList = pList;
       152467  +      yymsp[0].minor.yy102 = 0;
       152468  +    }else{
       152469  +      yymsp[0].minor.yy102 = sqlite3PExpr(pParse, TK_REGISTER, 0, 0);
       152470  +      if( yymsp[0].minor.yy102 ) sqlite3GetInt32(&t.z[1], &yymsp[0].minor.yy102->iTable);
       152471  +    }
       152472  +  }
       152473  +}
       152474  +        break;
       152475  +      case 172: /* expr ::= expr COLLATE ID|STRING */
       152476  +{
       152477  +  yymsp[-2].minor.yy102 = sqlite3ExprAddCollateToken(pParse, yymsp[-2].minor.yy102, &yymsp[0].minor.yy0, 1);
       152478  +}
       152479  +        break;
       152480  +      case 173: /* expr ::= CAST LP expr AS typetoken RP */
       152481  +{
       152482  +  yymsp[-5].minor.yy102 = sqlite3ExprAlloc(pParse->db, TK_CAST, &yymsp[-1].minor.yy0, 1);
       152483  +  sqlite3ExprAttachSubtrees(pParse->db, yymsp[-5].minor.yy102, yymsp[-3].minor.yy102, 0);
       152484  +}
       152485  +        break;
       152486  +      case 174: /* expr ::= ID|INDEXED LP distinct exprlist RP */
       152487  +{
       152488  +  yylhsminor.yy102 = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy94, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy100);
       152489  +}
       152490  +  yymsp[-4].minor.yy102 = yylhsminor.yy102;
       152491  +        break;
       152492  +      case 175: /* expr ::= ID|INDEXED LP STAR RP */
       152493  +{
       152494  +  yylhsminor.yy102 = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0, 0);
       152495  +}
       152496  +  yymsp[-3].minor.yy102 = yylhsminor.yy102;
       152497  +        break;
       152498  +      case 176: /* expr ::= ID|INDEXED LP distinct exprlist RP over_clause */
       152499  +{
       152500  +  yylhsminor.yy102 = sqlite3ExprFunction(pParse, yymsp[-2].minor.yy94, &yymsp[-5].minor.yy0, yymsp[-3].minor.yy100);
       152501  +  sqlite3WindowAttach(pParse, yylhsminor.yy102, yymsp[0].minor.yy379);
       152502  +}
       152503  +  yymsp[-5].minor.yy102 = yylhsminor.yy102;
       152504  +        break;
       152505  +      case 177: /* expr ::= ID|INDEXED LP STAR RP over_clause */
       152506  +{
       152507  +  yylhsminor.yy102 = sqlite3ExprFunction(pParse, 0, &yymsp[-4].minor.yy0, 0);
       152508  +  sqlite3WindowAttach(pParse, yylhsminor.yy102, yymsp[0].minor.yy379);
       152509  +}
       152510  +  yymsp[-4].minor.yy102 = yylhsminor.yy102;
       152511  +        break;
       152512  +      case 178: /* term ::= CTIME_KW */
       152513  +{
       152514  +  yylhsminor.yy102 = sqlite3ExprFunction(pParse, 0, &yymsp[0].minor.yy0, 0);
       152515  +}
       152516  +  yymsp[0].minor.yy102 = yylhsminor.yy102;
       152517  +        break;
       152518  +      case 179: /* expr ::= LP nexprlist COMMA expr RP */
       152519  +{
       152520  +  ExprList *pList = sqlite3ExprListAppend(pParse, yymsp[-3].minor.yy94, yymsp[-1].minor.yy102);
       152521  +  yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, TK_VECTOR, 0, 0);
       152522  +  if( yymsp[-4].minor.yy102 ){
       152523  +    yymsp[-4].minor.yy102->x.pList = pList;
152367 152524     }else{
152368 152525       sqlite3ExprListDelete(pParse->db, pList);
152369 152526     }
152370 152527   }
152371 152528           break;
152372         -      case 179: /* expr ::= expr AND expr */
152373         -{yymsp[-2].minor.yy524=sqlite3ExprAnd(pParse,yymsp[-2].minor.yy524,yymsp[0].minor.yy524);}
       152529  +      case 180: /* expr ::= expr AND expr */
       152530  +{yymsp[-2].minor.yy102=sqlite3ExprAnd(pParse,yymsp[-2].minor.yy102,yymsp[0].minor.yy102);}
152374 152531           break;
152375         -      case 180: /* expr ::= expr OR expr */
152376         -      case 181: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==181);
152377         -      case 182: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==182);
152378         -      case 183: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==183);
152379         -      case 184: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==184);
152380         -      case 185: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==185);
152381         -      case 186: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==186);
152382         -{yymsp[-2].minor.yy524=sqlite3PExpr(pParse,yymsp[-1].major,yymsp[-2].minor.yy524,yymsp[0].minor.yy524);}
       152532  +      case 181: /* expr ::= expr OR expr */
       152533  +      case 182: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==182);
       152534  +      case 183: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==183);
       152535  +      case 184: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==184);
       152536  +      case 185: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==185);
       152537  +      case 186: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==186);
       152538  +      case 187: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==187);
       152539  +{yymsp[-2].minor.yy102=sqlite3PExpr(pParse,yymsp[-1].major,yymsp[-2].minor.yy102,yymsp[0].minor.yy102);}
152383 152540           break;
152384         -      case 187: /* likeop ::= NOT LIKE_KW|MATCH */
       152541  +      case 188: /* likeop ::= NOT LIKE_KW|MATCH */
152385 152542   {yymsp[-1].minor.yy0=yymsp[0].minor.yy0; yymsp[-1].minor.yy0.n|=0x80000000; /*yymsp[-1].minor.yy0-overwrite-yymsp[0].minor.yy0*/}
152386 152543           break;
152387         -      case 188: /* expr ::= expr likeop expr */
       152544  +      case 189: /* expr ::= expr likeop expr */
152388 152545   {
152389 152546     ExprList *pList;
152390 152547     int bNot = yymsp[-1].minor.yy0.n & 0x80000000;
152391 152548     yymsp[-1].minor.yy0.n &= 0x7fffffff;
152392         -  pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy524);
152393         -  pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy524);
152394         -  yymsp[-2].minor.yy524 = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy0, 0);
152395         -  if( bNot ) yymsp[-2].minor.yy524 = sqlite3PExpr(pParse, TK_NOT, yymsp[-2].minor.yy524, 0);
152396         -  if( yymsp[-2].minor.yy524 ) yymsp[-2].minor.yy524->flags |= EP_InfixFunc;
       152549  +  pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy102);
       152550  +  pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy102);
       152551  +  yymsp[-2].minor.yy102 = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy0, 0);
       152552  +  if( bNot ) yymsp[-2].minor.yy102 = sqlite3PExpr(pParse, TK_NOT, yymsp[-2].minor.yy102, 0);
       152553  +  if( yymsp[-2].minor.yy102 ) yymsp[-2].minor.yy102->flags |= EP_InfixFunc;
152397 152554   }
152398 152555           break;
152399         -      case 189: /* expr ::= expr likeop expr ESCAPE expr */
       152556  +      case 190: /* expr ::= expr likeop expr ESCAPE expr */
152400 152557   {
152401 152558     ExprList *pList;
152402 152559     int bNot = yymsp[-3].minor.yy0.n & 0x80000000;
152403 152560     yymsp[-3].minor.yy0.n &= 0x7fffffff;
152404         -  pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy524);
152405         -  pList = sqlite3ExprListAppend(pParse,pList, yymsp[-4].minor.yy524);
152406         -  pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy524);
152407         -  yymsp[-4].minor.yy524 = sqlite3ExprFunction(pParse, pList, &yymsp[-3].minor.yy0, 0);
152408         -  if( bNot ) yymsp[-4].minor.yy524 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy524, 0);
152409         -  if( yymsp[-4].minor.yy524 ) yymsp[-4].minor.yy524->flags |= EP_InfixFunc;
152410         -}
152411         -        break;
152412         -      case 190: /* expr ::= expr ISNULL|NOTNULL */
152413         -{yymsp[-1].minor.yy524 = sqlite3PExpr(pParse,yymsp[0].major,yymsp[-1].minor.yy524,0);}
152414         -        break;
152415         -      case 191: /* expr ::= expr NOT NULL */
152416         -{yymsp[-2].minor.yy524 = sqlite3PExpr(pParse,TK_NOTNULL,yymsp[-2].minor.yy524,0);}
152417         -        break;
152418         -      case 192: /* expr ::= expr IS expr */
152419         -{
152420         -  yymsp[-2].minor.yy524 = sqlite3PExpr(pParse,TK_IS,yymsp[-2].minor.yy524,yymsp[0].minor.yy524);
152421         -  binaryToUnaryIfNull(pParse, yymsp[0].minor.yy524, yymsp[-2].minor.yy524, TK_ISNULL);
152422         -}
152423         -        break;
152424         -      case 193: /* expr ::= expr IS NOT expr */
152425         -{
152426         -  yymsp[-3].minor.yy524 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-3].minor.yy524,yymsp[0].minor.yy524);
152427         -  binaryToUnaryIfNull(pParse, yymsp[0].minor.yy524, yymsp[-3].minor.yy524, TK_NOTNULL);
152428         -}
152429         -        break;
152430         -      case 194: /* expr ::= NOT expr */
152431         -      case 195: /* expr ::= BITNOT expr */ yytestcase(yyruleno==195);
152432         -{yymsp[-1].minor.yy524 = sqlite3PExpr(pParse, yymsp[-1].major, yymsp[0].minor.yy524, 0);/*A-overwrites-B*/}
152433         -        break;
152434         -      case 196: /* expr ::= PLUS|MINUS expr */
152435         -{
152436         -  yymsp[-1].minor.yy524 = sqlite3PExpr(pParse, yymsp[-1].major==TK_PLUS ? TK_UPLUS : TK_UMINUS, yymsp[0].minor.yy524, 0);
       152561  +  pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy102);
       152562  +  pList = sqlite3ExprListAppend(pParse,pList, yymsp[-4].minor.yy102);
       152563  +  pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy102);
       152564  +  yymsp[-4].minor.yy102 = sqlite3ExprFunction(pParse, pList, &yymsp[-3].minor.yy0, 0);
       152565  +  if( bNot ) yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy102, 0);
       152566  +  if( yymsp[-4].minor.yy102 ) yymsp[-4].minor.yy102->flags |= EP_InfixFunc;
       152567  +}
       152568  +        break;
       152569  +      case 191: /* expr ::= expr ISNULL|NOTNULL */
       152570  +{yymsp[-1].minor.yy102 = sqlite3PExpr(pParse,yymsp[0].major,yymsp[-1].minor.yy102,0);}
       152571  +        break;
       152572  +      case 192: /* expr ::= expr NOT NULL */
       152573  +{yymsp[-2].minor.yy102 = sqlite3PExpr(pParse,TK_NOTNULL,yymsp[-2].minor.yy102,0);}
       152574  +        break;
       152575  +      case 193: /* expr ::= expr IS expr */
       152576  +{
       152577  +  yymsp[-2].minor.yy102 = sqlite3PExpr(pParse,TK_IS,yymsp[-2].minor.yy102,yymsp[0].minor.yy102);
       152578  +  binaryToUnaryIfNull(pParse, yymsp[0].minor.yy102, yymsp[-2].minor.yy102, TK_ISNULL);
       152579  +}
       152580  +        break;
       152581  +      case 194: /* expr ::= expr IS NOT expr */
       152582  +{
       152583  +  yymsp[-3].minor.yy102 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-3].minor.yy102,yymsp[0].minor.yy102);
       152584  +  binaryToUnaryIfNull(pParse, yymsp[0].minor.yy102, yymsp[-3].minor.yy102, TK_NOTNULL);
       152585  +}
       152586  +        break;
       152587  +      case 195: /* expr ::= NOT expr */
       152588  +      case 196: /* expr ::= BITNOT expr */ yytestcase(yyruleno==196);
       152589  +{yymsp[-1].minor.yy102 = sqlite3PExpr(pParse, yymsp[-1].major, yymsp[0].minor.yy102, 0);/*A-overwrites-B*/}
       152590  +        break;
       152591  +      case 197: /* expr ::= PLUS|MINUS expr */
       152592  +{
       152593  +  yymsp[-1].minor.yy102 = sqlite3PExpr(pParse, yymsp[-1].major==TK_PLUS ? TK_UPLUS : TK_UMINUS, yymsp[0].minor.yy102, 0);
152437 152594     /*A-overwrites-B*/
152438 152595   }
152439 152596           break;
152440         -      case 197: /* between_op ::= BETWEEN */
152441         -      case 200: /* in_op ::= IN */ yytestcase(yyruleno==200);
152442         -{yymsp[0].minor.yy494 = 0;}
       152597  +      case 198: /* between_op ::= BETWEEN */
       152598  +      case 201: /* in_op ::= IN */ yytestcase(yyruleno==201);
       152599  +{yymsp[0].minor.yy100 = 0;}
152443 152600           break;
152444         -      case 199: /* expr ::= expr between_op expr AND expr */
       152601  +      case 200: /* expr ::= expr between_op expr AND expr */
152445 152602   {
152446         -  ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy524);
152447         -  pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy524);
152448         -  yymsp[-4].minor.yy524 = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy524, 0);
152449         -  if( yymsp[-4].minor.yy524 ){
152450         -    yymsp[-4].minor.yy524->x.pList = pList;
       152603  +  ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy102);
       152604  +  pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy102);
       152605  +  yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy102, 0);
       152606  +  if( yymsp[-4].minor.yy102 ){
       152607  +    yymsp[-4].minor.yy102->x.pList = pList;
152451 152608     }else{
152452 152609       sqlite3ExprListDelete(pParse->db, pList);
152453 152610     } 
152454         -  if( yymsp[-3].minor.yy494 ) yymsp[-4].minor.yy524 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy524, 0);
       152611  +  if( yymsp[-3].minor.yy100 ) yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy102, 0);
152455 152612   }
152456 152613           break;
152457         -      case 202: /* expr ::= expr in_op LP exprlist RP */
       152614  +      case 203: /* expr ::= expr in_op LP exprlist RP */
152458 152615   {
152459         -    if( yymsp[-1].minor.yy434==0 ){
       152616  +    if( yymsp[-1].minor.yy94==0 ){
152460 152617         /* Expressions of the form
152461 152618         **
152462 152619         **      expr1 IN ()
152463 152620         **      expr1 NOT IN ()
152464 152621         **
152465 152622         ** simplify to constants 0 (false) and 1 (true), respectively,
152466 152623         ** regardless of the value of expr1.
152467 152624         */
152468 152625         if( IN_RENAME_OBJECT==0 ){
152469         -        sqlite3ExprDelete(pParse->db, yymsp[-4].minor.yy524);
152470         -        yymsp[-4].minor.yy524 = sqlite3ExprAlloc(pParse->db, TK_INTEGER,&sqlite3IntTokens[yymsp[-3].minor.yy494],1);
       152626  +        sqlite3ExprDelete(pParse->db, yymsp[-4].minor.yy102);
       152627  +        yymsp[-4].minor.yy102 = sqlite3ExprAlloc(pParse->db, TK_INTEGER,&sqlite3IntTokens[yymsp[-3].minor.yy100],1);
152471 152628         }
152472         -    }else if( yymsp[-1].minor.yy434->nExpr==1 ){
       152629  +    }else if( yymsp[-1].minor.yy94->nExpr==1 ){
152473 152630         /* Expressions of the form:
152474 152631         **
152475 152632         **      expr1 IN (?1)
152476 152633         **      expr1 NOT IN (?2)
152477 152634         **
152478 152635         ** with exactly one value on the RHS can be simplified to something
152479 152636         ** like this:
................................................................................
152482 152639         **      expr1 <> ?2
152483 152640         **
152484 152641         ** But, the RHS of the == or <> is marked with the EP_Generic flag
152485 152642         ** so that it may not contribute to the computation of comparison
152486 152643         ** affinity or the collating sequence to use for comparison.  Otherwise,
152487 152644         ** the semantics would be subtly different from IN or NOT IN.
152488 152645         */
152489         -      Expr *pRHS = yymsp[-1].minor.yy434->a[0].pExpr;
152490         -      yymsp[-1].minor.yy434->a[0].pExpr = 0;
152491         -      sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy434);
       152646  +      Expr *pRHS = yymsp[-1].minor.yy94->a[0].pExpr;
       152647  +      yymsp[-1].minor.yy94->a[0].pExpr = 0;
       152648  +      sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy94);
152492 152649         /* pRHS cannot be NULL because a malloc error would have been detected
152493 152650         ** before now and control would have never reached this point */
152494 152651         if( ALWAYS(pRHS) ){
152495 152652           pRHS->flags &= ~EP_Collate;
152496 152653           pRHS->flags |= EP_Generic;
152497 152654         }
152498         -      yymsp[-4].minor.yy524 = sqlite3PExpr(pParse, yymsp[-3].minor.yy494 ? TK_NE : TK_EQ, yymsp[-4].minor.yy524, pRHS);
152499         -    }else{
152500         -      yymsp[-4].minor.yy524 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy524, 0);
152501         -      if( yymsp[-4].minor.yy524 ){
152502         -        yymsp[-4].minor.yy524->x.pList = yymsp[-1].minor.yy434;
152503         -        sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy524);
152504         -      }else{
152505         -        sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy434);
152506         -      }
152507         -      if( yymsp[-3].minor.yy494 ) yymsp[-4].minor.yy524 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy524, 0);
152508         -    }
152509         -  }
152510         -        break;
152511         -      case 203: /* expr ::= LP select RP */
152512         -{
152513         -    yymsp[-2].minor.yy524 = sqlite3PExpr(pParse, TK_SELECT, 0, 0);
152514         -    sqlite3PExprAddSelect(pParse, yymsp[-2].minor.yy524, yymsp[-1].minor.yy457);
152515         -  }
152516         -        break;
152517         -      case 204: /* expr ::= expr in_op LP select RP */
152518         -{
152519         -    yymsp[-4].minor.yy524 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy524, 0);
152520         -    sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy524, yymsp[-1].minor.yy457);
152521         -    if( yymsp[-3].minor.yy494 ) yymsp[-4].minor.yy524 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy524, 0);
152522         -  }
152523         -        break;
152524         -      case 205: /* expr ::= expr in_op nm dbnm paren_exprlist */
       152655  +      yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, yymsp[-3].minor.yy100 ? TK_NE : TK_EQ, yymsp[-4].minor.yy102, pRHS);
       152656  +    }else{
       152657  +      yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy102, 0);
       152658  +      if( yymsp[-4].minor.yy102 ){
       152659  +        yymsp[-4].minor.yy102->x.pList = yymsp[-1].minor.yy94;
       152660  +        sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy102);
       152661  +      }else{
       152662  +        sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy94);
       152663  +      }
       152664  +      if( yymsp[-3].minor.yy100 ) yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy102, 0);
       152665  +    }
       152666  +  }
       152667  +        break;
       152668  +      case 204: /* expr ::= LP select RP */
       152669  +{
       152670  +    yymsp[-2].minor.yy102 = sqlite3PExpr(pParse, TK_SELECT, 0, 0);
       152671  +    sqlite3PExprAddSelect(pParse, yymsp[-2].minor.yy102, yymsp[-1].minor.yy391);
       152672  +  }
       152673  +        break;
       152674  +      case 205: /* expr ::= expr in_op LP select RP */
       152675  +{
       152676  +    yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy102, 0);
       152677  +    sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy102, yymsp[-1].minor.yy391);
       152678  +    if( yymsp[-3].minor.yy100 ) yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy102, 0);
       152679  +  }
       152680  +        break;
       152681  +      case 206: /* expr ::= expr in_op nm dbnm paren_exprlist */
152525 152682   {
152526 152683       SrcList *pSrc = sqlite3SrcListAppend(pParse, 0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);
152527 152684       Select *pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0);
152528         -    if( yymsp[0].minor.yy434 )  sqlite3SrcListFuncArgs(pParse, pSelect ? pSrc : 0, yymsp[0].minor.yy434);
152529         -    yymsp[-4].minor.yy524 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy524, 0);
152530         -    sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy524, pSelect);
152531         -    if( yymsp[-3].minor.yy494 ) yymsp[-4].minor.yy524 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy524, 0);
       152685  +    if( yymsp[0].minor.yy94 )  sqlite3SrcListFuncArgs(pParse, pSelect ? pSrc : 0, yymsp[0].minor.yy94);
       152686  +    yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy102, 0);
       152687  +    sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy102, pSelect);
       152688  +    if( yymsp[-3].minor.yy100 ) yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy102, 0);
152532 152689     }
152533 152690           break;
152534         -      case 206: /* expr ::= EXISTS LP select RP */
       152691  +      case 207: /* expr ::= EXISTS LP select RP */
152535 152692   {
152536 152693       Expr *p;
152537         -    p = yymsp[-3].minor.yy524 = sqlite3PExpr(pParse, TK_EXISTS, 0, 0);
152538         -    sqlite3PExprAddSelect(pParse, p, yymsp[-1].minor.yy457);
152539         -  }
152540         -        break;
152541         -      case 207: /* expr ::= CASE case_operand case_exprlist case_else END */
152542         -{
152543         -  yymsp[-4].minor.yy524 = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy524, 0);
152544         -  if( yymsp[-4].minor.yy524 ){
152545         -    yymsp[-4].minor.yy524->x.pList = yymsp[-1].minor.yy524 ? sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy434,yymsp[-1].minor.yy524) : yymsp[-2].minor.yy434;
152546         -    sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy524);
152547         -  }else{
152548         -    sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy434);
152549         -    sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy524);
152550         -  }
152551         -}
152552         -        break;
152553         -      case 208: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
152554         -{
152555         -  yymsp[-4].minor.yy434 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy434, yymsp[-2].minor.yy524);
152556         -  yymsp[-4].minor.yy434 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy434, yymsp[0].minor.yy524);
152557         -}
152558         -        break;
152559         -      case 209: /* case_exprlist ::= WHEN expr THEN expr */
152560         -{
152561         -  yymsp[-3].minor.yy434 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy524);
152562         -  yymsp[-3].minor.yy434 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy434, yymsp[0].minor.yy524);
152563         -}
152564         -        break;
152565         -      case 212: /* case_operand ::= expr */
152566         -{yymsp[0].minor.yy524 = yymsp[0].minor.yy524; /*A-overwrites-X*/}
152567         -        break;
152568         -      case 215: /* nexprlist ::= nexprlist COMMA expr */
152569         -{yymsp[-2].minor.yy434 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy434,yymsp[0].minor.yy524);}
152570         -        break;
152571         -      case 216: /* nexprlist ::= expr */
152572         -{yymsp[0].minor.yy434 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy524); /*A-overwrites-Y*/}
152573         -        break;
152574         -      case 218: /* paren_exprlist ::= LP exprlist RP */
152575         -      case 223: /* eidlist_opt ::= LP eidlist RP */ yytestcase(yyruleno==223);
152576         -{yymsp[-2].minor.yy434 = yymsp[-1].minor.yy434;}
152577         -        break;
152578         -      case 219: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
       152694  +    p = yymsp[-3].minor.yy102 = sqlite3PExpr(pParse, TK_EXISTS, 0, 0);
       152695  +    sqlite3PExprAddSelect(pParse, p, yymsp[-1].minor.yy391);
       152696  +  }
       152697  +        break;
       152698  +      case 208: /* expr ::= CASE case_operand case_exprlist case_else END */
       152699  +{
       152700  +  yymsp[-4].minor.yy102 = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy102, 0);
       152701  +  if( yymsp[-4].minor.yy102 ){
       152702  +    yymsp[-4].minor.yy102->x.pList = yymsp[-1].minor.yy102 ? sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy94,yymsp[-1].minor.yy102) : yymsp[-2].minor.yy94;
       152703  +    sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy102);
       152704  +  }else{
       152705  +    sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy94);
       152706  +    sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy102);
       152707  +  }
       152708  +}
       152709  +        break;
       152710  +      case 209: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
       152711  +{
       152712  +  yymsp[-4].minor.yy94 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy94, yymsp[-2].minor.yy102);
       152713  +  yymsp[-4].minor.yy94 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy94, yymsp[0].minor.yy102);
       152714  +}
       152715  +        break;
       152716  +      case 210: /* case_exprlist ::= WHEN expr THEN expr */
       152717  +{
       152718  +  yymsp[-3].minor.yy94 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy102);
       152719  +  yymsp[-3].minor.yy94 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy94, yymsp[0].minor.yy102);
       152720  +}
       152721  +        break;
       152722  +      case 213: /* case_operand ::= expr */
       152723  +{yymsp[0].minor.yy102 = yymsp[0].minor.yy102; /*A-overwrites-X*/}
       152724  +        break;
       152725  +      case 216: /* nexprlist ::= nexprlist COMMA expr */
       152726  +{yymsp[-2].minor.yy94 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy94,yymsp[0].minor.yy102);}
       152727  +        break;
       152728  +      case 217: /* nexprlist ::= expr */
       152729  +{yymsp[0].minor.yy94 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy102); /*A-overwrites-Y*/}
       152730  +        break;
       152731  +      case 219: /* paren_exprlist ::= LP exprlist RP */
       152732  +      case 224: /* eidlist_opt ::= LP eidlist RP */ yytestcase(yyruleno==224);
       152733  +{yymsp[-2].minor.yy94 = yymsp[-1].minor.yy94;}
       152734  +        break;
       152735  +      case 220: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
152579 152736   {
152580 152737     sqlite3CreateIndex(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, 
152581         -                     sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,0), yymsp[-2].minor.yy434, yymsp[-10].minor.yy494,
152582         -                      &yymsp[-11].minor.yy0, yymsp[0].minor.yy524, SQLITE_SO_ASC, yymsp[-8].minor.yy494, SQLITE_IDXTYPE_APPDEF);
       152738  +                     sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,0), yymsp[-2].minor.yy94, yymsp[-10].minor.yy100,
       152739  +                      &yymsp[-11].minor.yy0, yymsp[0].minor.yy102, SQLITE_SO_ASC, yymsp[-8].minor.yy100, SQLITE_IDXTYPE_APPDEF);
152583 152740     if( IN_RENAME_OBJECT && pParse->pNewIndex ){
152584 152741       sqlite3RenameTokenMap(pParse, pParse->pNewIndex->zName, &yymsp[-4].minor.yy0);
152585 152742     }
152586 152743   }
152587 152744           break;
152588         -      case 220: /* uniqueflag ::= UNIQUE */
152589         -      case 262: /* raisetype ::= ABORT */ yytestcase(yyruleno==262);
152590         -{yymsp[0].minor.yy494 = OE_Abort;}
152591         -        break;
152592         -      case 221: /* uniqueflag ::= */
152593         -{yymsp[1].minor.yy494 = OE_None;}
152594         -        break;
152595         -      case 224: /* eidlist ::= eidlist COMMA nm collate sortorder */
152596         -{
152597         -  yymsp[-4].minor.yy434 = parserAddExprIdListTerm(pParse, yymsp[-4].minor.yy434, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy494, yymsp[0].minor.yy494);
152598         -}
152599         -        break;
152600         -      case 225: /* eidlist ::= nm collate sortorder */
152601         -{
152602         -  yymsp[-2].minor.yy434 = parserAddExprIdListTerm(pParse, 0, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy494, yymsp[0].minor.yy494); /*A-overwrites-Y*/
152603         -}
152604         -        break;
152605         -      case 228: /* cmd ::= DROP INDEX ifexists fullname */
152606         -{sqlite3DropIndex(pParse, yymsp[0].minor.yy483, yymsp[-1].minor.yy494);}
152607         -        break;
152608         -      case 229: /* cmd ::= VACUUM vinto */
152609         -{sqlite3Vacuum(pParse,0,yymsp[0].minor.yy524);}
152610         -        break;
152611         -      case 230: /* cmd ::= VACUUM nm vinto */
152612         -{sqlite3Vacuum(pParse,&yymsp[-1].minor.yy0,yymsp[0].minor.yy524);}
152613         -        break;
152614         -      case 233: /* cmd ::= PRAGMA nm dbnm */
       152745  +      case 221: /* uniqueflag ::= UNIQUE */
       152746  +      case 263: /* raisetype ::= ABORT */ yytestcase(yyruleno==263);
       152747  +{yymsp[0].minor.yy100 = OE_Abort;}
       152748  +        break;
       152749  +      case 222: /* uniqueflag ::= */
       152750  +{yymsp[1].minor.yy100 = OE_None;}
       152751  +        break;
       152752  +      case 225: /* eidlist ::= eidlist COMMA nm collate sortorder */
       152753  +{
       152754  +  yymsp[-4].minor.yy94 = parserAddExprIdListTerm(pParse, yymsp[-4].minor.yy94, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy100, yymsp[0].minor.yy100);
       152755  +}
       152756  +        break;
       152757  +      case 226: /* eidlist ::= nm collate sortorder */
       152758  +{
       152759  +  yymsp[-2].minor.yy94 = parserAddExprIdListTerm(pParse, 0, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy100, yymsp[0].minor.yy100); /*A-overwrites-Y*/
       152760  +}
       152761  +        break;
       152762  +      case 229: /* cmd ::= DROP INDEX ifexists fullname */
       152763  +{sqlite3DropIndex(pParse, yymsp[0].minor.yy407, yymsp[-1].minor.yy100);}
       152764  +        break;
       152765  +      case 230: /* cmd ::= VACUUM vinto */
       152766  +{sqlite3Vacuum(pParse,0,yymsp[0].minor.yy102);}
       152767  +        break;
       152768  +      case 231: /* cmd ::= VACUUM nm vinto */
       152769  +{sqlite3Vacuum(pParse,&yymsp[-1].minor.yy0,yymsp[0].minor.yy102);}
       152770  +        break;
       152771  +      case 234: /* cmd ::= PRAGMA nm dbnm */
152615 152772   {sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);}
152616 152773           break;
152617         -      case 234: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
       152774  +      case 235: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
152618 152775   {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);}
152619 152776           break;
152620         -      case 235: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
       152777  +      case 236: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
152621 152778   {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);}
152622 152779           break;
152623         -      case 236: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
       152780  +      case 237: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
152624 152781   {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);}
152625 152782           break;
152626         -      case 237: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */
       152783  +      case 238: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */
152627 152784   {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);}
152628 152785           break;
152629         -      case 240: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
       152786  +      case 241: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
152630 152787   {
152631 152788     Token all;
152632 152789     all.z = yymsp[-3].minor.yy0.z;
152633 152790     all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n;
152634         -  sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy455, &all);
       152791  +  sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy11, &all);
152635 152792   }
152636 152793           break;
152637         -      case 241: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
       152794  +      case 242: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
152638 152795   {
152639         -  sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy494, yymsp[-4].minor.yy90.a, yymsp[-4].minor.yy90.b, yymsp[-2].minor.yy483, yymsp[0].minor.yy524, yymsp[-10].minor.yy494, yymsp[-8].minor.yy494);
       152796  +  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);
152640 152797     yymsp[-10].minor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0); /*A-overwrites-T*/
152641 152798   }
152642 152799           break;
152643         -      case 242: /* trigger_time ::= BEFORE|AFTER */
152644         -{ yymsp[0].minor.yy494 = yymsp[0].major; /*A-overwrites-X*/ }
152645         -        break;
152646         -      case 243: /* trigger_time ::= INSTEAD OF */
152647         -{ yymsp[-1].minor.yy494 = TK_INSTEAD;}
152648         -        break;
152649         -      case 244: /* trigger_time ::= */
152650         -{ yymsp[1].minor.yy494 = TK_BEFORE; }
152651         -        break;
152652         -      case 245: /* trigger_event ::= DELETE|INSERT */
152653         -      case 246: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==246);
152654         -{yymsp[0].minor.yy90.a = yymsp[0].major; /*A-overwrites-X*/ yymsp[0].minor.yy90.b = 0;}
152655         -        break;
152656         -      case 247: /* trigger_event ::= UPDATE OF idlist */
152657         -{yymsp[-2].minor.yy90.a = TK_UPDATE; yymsp[-2].minor.yy90.b = yymsp[0].minor.yy62;}
152658         -        break;
152659         -      case 248: /* when_clause ::= */
152660         -      case 267: /* key_opt ::= */ yytestcase(yyruleno==267);
152661         -      case 315: /* filter_opt ::= */ yytestcase(yyruleno==315);
152662         -{ yymsp[1].minor.yy524 = 0; }
152663         -        break;
152664         -      case 249: /* when_clause ::= WHEN expr */
152665         -      case 268: /* key_opt ::= KEY expr */ yytestcase(yyruleno==268);
152666         -{ yymsp[-1].minor.yy524 = yymsp[0].minor.yy524; }
152667         -        break;
152668         -      case 250: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
152669         -{
152670         -  assert( yymsp[-2].minor.yy455!=0 );
152671         -  yymsp[-2].minor.yy455->pLast->pNext = yymsp[-1].minor.yy455;
152672         -  yymsp[-2].minor.yy455->pLast = yymsp[-1].minor.yy455;
152673         -}
152674         -        break;
152675         -      case 251: /* trigger_cmd_list ::= trigger_cmd SEMI */
152676         -{ 
152677         -  assert( yymsp[-1].minor.yy455!=0 );
152678         -  yymsp[-1].minor.yy455->pLast = yymsp[-1].minor.yy455;
152679         -}
152680         -        break;
152681         -      case 252: /* trnm ::= nm DOT nm */
       152800  +      case 243: /* trigger_time ::= BEFORE|AFTER */
       152801  +{ yymsp[0].minor.yy100 = yymsp[0].major; /*A-overwrites-X*/ }
       152802  +        break;
       152803  +      case 244: /* trigger_time ::= INSTEAD OF */
       152804  +{ yymsp[-1].minor.yy100 = TK_INSTEAD;}
       152805  +        break;
       152806  +      case 245: /* trigger_time ::= */
       152807  +{ yymsp[1].minor.yy100 = TK_BEFORE; }
       152808  +        break;
       152809  +      case 246: /* trigger_event ::= DELETE|INSERT */
       152810  +      case 247: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==247);
       152811  +{yymsp[0].minor.yy298.a = yymsp[0].major; /*A-overwrites-X*/ yymsp[0].minor.yy298.b = 0;}
       152812  +        break;
       152813  +      case 248: /* trigger_event ::= UPDATE OF idlist */
       152814  +{yymsp[-2].minor.yy298.a = TK_UPDATE; yymsp[-2].minor.yy298.b = yymsp[0].minor.yy76;}
       152815  +        break;
       152816  +      case 249: /* when_clause ::= */
       152817  +      case 268: /* key_opt ::= */ yytestcase(yyruleno==268);
       152818  +      case 316: /* filter_opt ::= */ yytestcase(yyruleno==316);
       152819  +{ yymsp[1].minor.yy102 = 0; }
       152820  +        break;
       152821  +      case 250: /* when_clause ::= WHEN expr */
       152822  +      case 269: /* key_opt ::= KEY expr */ yytestcase(yyruleno==269);
       152823  +{ yymsp[-1].minor.yy102 = yymsp[0].minor.yy102; }
       152824  +        break;
       152825  +      case 251: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
       152826  +{
       152827  +  assert( yymsp[-2].minor.yy11!=0 );
       152828  +  yymsp[-2].minor.yy11->pLast->pNext = yymsp[-1].minor.yy11;
       152829  +  yymsp[-2].minor.yy11->pLast = yymsp[-1].minor.yy11;
       152830  +}
       152831  +        break;
       152832  +      case 252: /* trigger_cmd_list ::= trigger_cmd SEMI */
       152833  +{ 
       152834  +  assert( yymsp[-1].minor.yy11!=0 );
       152835  +  yymsp[-1].minor.yy11->pLast = yymsp[-1].minor.yy11;
       152836  +}
       152837  +        break;
       152838  +      case 253: /* trnm ::= nm DOT nm */
152682 152839   {
152683 152840     yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;
152684 152841     sqlite3ErrorMsg(pParse, 
152685 152842           "qualified table names are not allowed on INSERT, UPDATE, and DELETE "
152686 152843           "statements within triggers");
152687 152844   }
152688 152845           break;
152689         -      case 253: /* tridxby ::= INDEXED BY nm */
       152846  +      case 254: /* tridxby ::= INDEXED BY nm */
152690 152847   {
152691 152848     sqlite3ErrorMsg(pParse,
152692 152849           "the INDEXED BY clause is not allowed on UPDATE or DELETE statements "
152693 152850           "within triggers");
152694 152851   }
152695 152852           break;
152696         -      case 254: /* tridxby ::= NOT INDEXED */
       152853  +      case 255: /* tridxby ::= NOT INDEXED */
152697 152854   {
152698 152855     sqlite3ErrorMsg(pParse,
152699 152856           "the NOT INDEXED clause is not allowed on UPDATE or DELETE statements "
152700 152857           "within triggers");
152701 152858   }
152702 152859           break;
152703         -      case 255: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt */
152704         -{yylhsminor.yy455 = sqlite3TriggerUpdateStep(pParse, &yymsp[-5].minor.yy0, yymsp[-2].minor.yy434, yymsp[-1].minor.yy524, yymsp[-6].minor.yy494, yymsp[-7].minor.yy0.z, yymsp[0].minor.yy294);}
152705         -  yymsp[-7].minor.yy455 = yylhsminor.yy455;
152706         -        break;
152707         -      case 256: /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
152708         -{
152709         -   yylhsminor.yy455 = sqlite3TriggerInsertStep(pParse,&yymsp[-4].minor.yy0,yymsp[-3].minor.yy62,yymsp[-2].minor.yy457,yymsp[-6].minor.yy494,yymsp[-1].minor.yy136,yymsp[-7].minor.yy294,yymsp[0].minor.yy294);/*yylhsminor.yy455-overwrites-yymsp[-6].minor.yy494*/
152710         -}
152711         -  yymsp[-7].minor.yy455 = yylhsminor.yy455;
152712         -        break;
152713         -      case 257: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
152714         -{yylhsminor.yy455 = sqlite3TriggerDeleteStep(pParse, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy524, yymsp[-5].minor.yy0.z, yymsp[0].minor.yy294);}
152715         -  yymsp[-5].minor.yy455 = yylhsminor.yy455;
152716         -        break;
152717         -      case 258: /* trigger_cmd ::= scanpt select scanpt */
152718         -{yylhsminor.yy455 = sqlite3TriggerSelectStep(pParse->db, yymsp[-1].minor.yy457, yymsp[-2].minor.yy294, yymsp[0].minor.yy294); /*yylhsminor.yy455-overwrites-yymsp[-1].minor.yy457*/}
152719         -  yymsp[-2].minor.yy455 = yylhsminor.yy455;
152720         -        break;
152721         -      case 259: /* expr ::= RAISE LP IGNORE RP */
152722         -{
152723         -  yymsp[-3].minor.yy524 = sqlite3PExpr(pParse, TK_RAISE, 0, 0); 
152724         -  if( yymsp[-3].minor.yy524 ){
152725         -    yymsp[-3].minor.yy524->affinity = OE_Ignore;
152726         -  }
152727         -}
152728         -        break;
152729         -      case 260: /* expr ::= RAISE LP raisetype COMMA nm RP */
152730         -{
152731         -  yymsp[-5].minor.yy524 = sqlite3ExprAlloc(pParse->db, TK_RAISE, &yymsp[-1].minor.yy0, 1); 
152732         -  if( yymsp[-5].minor.yy524 ) {
152733         -    yymsp[-5].minor.yy524->affinity = (char)yymsp[-3].minor.yy494;
152734         -  }
152735         -}
152736         -        break;
152737         -      case 261: /* raisetype ::= ROLLBACK */
152738         -{yymsp[0].minor.yy494 = OE_Rollback;}
152739         -        break;
152740         -      case 263: /* raisetype ::= FAIL */
152741         -{yymsp[0].minor.yy494 = OE_Fail;}
152742         -        break;
152743         -      case 264: /* cmd ::= DROP TRIGGER ifexists fullname */
152744         -{
152745         -  sqlite3DropTrigger(pParse,yymsp[0].minor.yy483,yymsp[-1].minor.yy494);
152746         -}
152747         -        break;
152748         -      case 265: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
152749         -{
152750         -  sqlite3Attach(pParse, yymsp[-3].minor.yy524, yymsp[-1].minor.yy524, yymsp[0].minor.yy524);
152751         -}
152752         -        break;
152753         -      case 266: /* cmd ::= DETACH database_kw_opt expr */
152754         -{
152755         -  sqlite3Detach(pParse, yymsp[0].minor.yy524);
152756         -}
152757         -        break;
152758         -      case 269: /* cmd ::= REINDEX */
       152860  +      case 256: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt */
       152861  +{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);}
       152862  +  yymsp[-7].minor.yy11 = yylhsminor.yy11;
       152863  +        break;
       152864  +      case 257: /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
       152865  +{
       152866  +   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*/
       152867  +}
       152868  +  yymsp[-7].minor.yy11 = yylhsminor.yy11;
       152869  +        break;
       152870  +      case 258: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
       152871  +{yylhsminor.yy11 = sqlite3TriggerDeleteStep(pParse, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy102, yymsp[-5].minor.yy0.z, yymsp[0].minor.yy528);}
       152872  +  yymsp[-5].minor.yy11 = yylhsminor.yy11;
       152873  +        break;
       152874  +      case 259: /* trigger_cmd ::= scanpt select scanpt */
       152875  +{yylhsminor.yy11 = sqlite3TriggerSelectStep(pParse->db, yymsp[-1].minor.yy391, yymsp[-2].minor.yy528, yymsp[0].minor.yy528); /*yylhsminor.yy11-overwrites-yymsp[-1].minor.yy391*/}
       152876  +  yymsp[-2].minor.yy11 = yylhsminor.yy11;
       152877  +        break;
       152878  +      case 260: /* expr ::= RAISE LP IGNORE RP */
       152879  +{
       152880  +  yymsp[-3].minor.yy102 = sqlite3PExpr(pParse, TK_RAISE, 0, 0); 
       152881  +  if( yymsp[-3].minor.yy102 ){
       152882  +    yymsp[-3].minor.yy102->affinity = OE_Ignore;
       152883  +  }
       152884  +}
       152885  +        break;
       152886  +      case 261: /* expr ::= RAISE LP raisetype COMMA nm RP */
       152887  +{
       152888  +  yymsp[-5].minor.yy102 = sqlite3ExprAlloc(pParse->db, TK_RAISE, &yymsp[-1].minor.yy0, 1); 
       152889  +  if( yymsp[-5].minor.yy102 ) {
       152890  +    yymsp[-5].minor.yy102->affinity = (char)yymsp[-3].minor.yy100;
       152891  +  }
       152892  +}
       152893  +        break;
       152894  +      case 262: /* raisetype ::= ROLLBACK */
       152895  +{yymsp[0].minor.yy100 = OE_Rollback;}
       152896  +        break;
       152897  +      case 264: /* raisetype ::= FAIL */
       152898  +{yymsp[0].minor.yy100 = OE_Fail;}
       152899  +        break;
       152900  +      case 265: /* cmd ::= DROP TRIGGER ifexists fullname */
       152901  +{
       152902  +  sqlite3DropTrigger(pParse,yymsp[0].minor.yy407,yymsp[-1].minor.yy100);
       152903  +}
       152904  +        break;
       152905  +      case 266: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
       152906  +{
       152907  +  sqlite3Attach(pParse, yymsp[-3].minor.yy102, yymsp[-1].minor.yy102, yymsp[0].minor.yy102);
       152908  +}
       152909  +        break;
       152910  +      case 267: /* cmd ::= DETACH database_kw_opt expr */
       152911  +{
       152912  +  sqlite3Detach(pParse, yymsp[0].minor.yy102);
       152913  +}
       152914  +        break;
       152915  +      case 270: /* cmd ::= REINDEX */
152759 152916   {sqlite3Reindex(pParse, 0, 0);}
152760 152917           break;
152761         -      case 270: /* cmd ::= REINDEX nm dbnm */
       152918  +      case 271: /* cmd ::= REINDEX nm dbnm */
152762 152919   {sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
152763 152920           break;
152764         -      case 271: /* cmd ::= ANALYZE */
       152921  +      case 272: /* cmd ::= ANALYZE */
152765 152922   {sqlite3Analyze(pParse, 0, 0);}
152766 152923           break;
152767         -      case 272: /* cmd ::= ANALYZE nm dbnm */
       152924  +      case 273: /* cmd ::= ANALYZE nm dbnm */
152768 152925   {sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
152769 152926           break;
152770         -      case 273: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
       152927  +      case 274: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
152771 152928   {
152772         -  sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy483,&yymsp[0].minor.yy0);
       152929  +  sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy407,&yymsp[0].minor.yy0);
152773 152930   }
152774 152931           break;
152775         -      case 274: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
       152932  +      case 275: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
152776 152933   {
152777 152934     yymsp[-1].minor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-1].minor.yy0.z) + pParse->sLastToken.n;
152778 152935     sqlite3AlterFinishAddColumn(pParse, &yymsp[-1].minor.yy0);
152779 152936   }
152780 152937           break;
152781         -      case 275: /* add_column_fullname ::= fullname */
       152938  +      case 276: /* add_column_fullname ::= fullname */
152782 152939   {
152783 152940     disableLookaside(pParse);
152784         -  sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy483);
       152941  +  sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy407);
152785 152942   }
152786 152943           break;
152787         -      case 276: /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
       152944  +      case 277: /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
152788 152945   {
152789         -  sqlite3AlterRenameColumn(pParse, yymsp[-5].minor.yy483, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
       152946  +  sqlite3AlterRenameColumn(pParse, yymsp[-5].minor.yy407, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
152790 152947   }
152791 152948           break;
152792         -      case 277: /* cmd ::= create_vtab */
       152949  +      case 278: /* cmd ::= create_vtab */
152793 152950   {sqlite3VtabFinishParse(pParse,0);}
152794 152951           break;
152795         -      case 278: /* cmd ::= create_vtab LP vtabarglist RP */
       152952  +      case 279: /* cmd ::= create_vtab LP vtabarglist RP */
152796 152953   {sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}
152797 152954           break;
152798         -      case 279: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
       152955  +      case 280: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
152799 152956   {
152800         -    sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy494);
       152957  +    sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy100);
152801 152958   }
152802 152959           break;
152803         -      case 280: /* vtabarg ::= */
       152960  +      case 281: /* vtabarg ::= */
152804 152961   {sqlite3VtabArgInit(pParse);}
152805 152962           break;
152806         -      case 281: /* vtabargtoken ::= ANY */
152807         -      case 282: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==282);
152808         -      case 283: /* lp ::= LP */ yytestcase(yyruleno==283);
       152963  +      case 282: /* vtabargtoken ::= ANY */
       152964  +      case 283: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==283);
       152965  +      case 284: /* lp ::= LP */ yytestcase(yyruleno==284);
152809 152966   {sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}
152810 152967           break;
152811         -      case 284: /* with ::= WITH wqlist */
152812         -      case 285: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==285);
152813         -{ sqlite3WithPush(pParse, yymsp[0].minor.yy59, 1); }
152814         -        break;
152815         -      case 286: /* wqlist ::= nm eidlist_opt AS LP select RP */
152816         -{
152817         -  yymsp[-5].minor.yy59 = sqlite3WithAdd(pParse, 0, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy434, yymsp[-1].minor.yy457); /*A-overwrites-X*/
152818         -}
152819         -        break;
152820         -      case 287: /* wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
152821         -{
152822         -  yymsp[-7].minor.yy59 = sqlite3WithAdd(pParse, yymsp[-7].minor.yy59, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy434, yymsp[-1].minor.yy457);
152823         -}
152824         -        break;
152825         -      case 288: /* windowdefn_list ::= windowdefn */
152826         -{ yylhsminor.yy295 = yymsp[0].minor.yy295; }
152827         -  yymsp[0].minor.yy295 = yylhsminor.yy295;
152828         -        break;
152829         -      case 289: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */
152830         -{
152831         -  assert( yymsp[0].minor.yy295!=0 );
152832         -  sqlite3WindowChain(pParse, yymsp[0].minor.yy295, yymsp[-2].minor.yy295);
152833         -  yymsp[0].minor.yy295->pNextWin = yymsp[-2].minor.yy295;
152834         -  yylhsminor.yy295 = yymsp[0].minor.yy295;
152835         -}
152836         -  yymsp[-2].minor.yy295 = yylhsminor.yy295;
152837         -        break;
152838         -      case 290: /* windowdefn ::= nm AS LP window RP */
152839         -{
152840         -  if( ALWAYS(yymsp[-1].minor.yy295) ){
152841         -    yymsp[-1].minor.yy295->zName = sqlite3DbStrNDup(pParse->db, yymsp[-4].minor.yy0.z, yymsp[-4].minor.yy0.n);
152842         -  }
152843         -  yylhsminor.yy295 = yymsp[-1].minor.yy295;
152844         -}
152845         -  yymsp[-4].minor.yy295 = yylhsminor.yy295;
152846         -        break;
152847         -      case 291: /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */
152848         -{
152849         -  yymsp[-4].minor.yy295 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy295, yymsp[-2].minor.yy434, yymsp[-1].minor.yy434, 0);
152850         -}
152851         -        break;
152852         -      case 292: /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
152853         -{
152854         -  yylhsminor.yy295 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy295, yymsp[-2].minor.yy434, yymsp[-1].minor.yy434, &yymsp[-5].minor.yy0);
152855         -}
152856         -  yymsp[-5].minor.yy295 = yylhsminor.yy295;
152857         -        break;
152858         -      case 293: /* window ::= ORDER BY sortlist frame_opt */
152859         -{
152860         -  yymsp[-3].minor.yy295 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy295, 0, yymsp[-1].minor.yy434, 0);
152861         -}
152862         -        break;
152863         -      case 294: /* window ::= nm ORDER BY sortlist frame_opt */
152864         -{
152865         -  yylhsminor.yy295 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy295, 0, yymsp[-1].minor.yy434, &yymsp[-4].minor.yy0);
152866         -}
152867         -  yymsp[-4].minor.yy295 = yylhsminor.yy295;
152868         -        break;
152869         -      case 295: /* window ::= frame_opt */
152870         -{
152871         -  yylhsminor.yy295 = yymsp[0].minor.yy295;
152872         -}
152873         -  yymsp[0].minor.yy295 = yylhsminor.yy295;
152874         -        break;
152875         -      case 296: /* window ::= nm frame_opt */
152876         -{
152877         -  yylhsminor.yy295 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy295, 0, 0, &yymsp[-1].minor.yy0);
152878         -}
152879         -  yymsp[-1].minor.yy295 = yylhsminor.yy295;
152880         -        break;
152881         -      case 297: /* frame_opt ::= */
       152968  +      case 285: /* with ::= WITH wqlist */
       152969  +      case 286: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==286);
       152970  +{ sqlite3WithPush(pParse, yymsp[0].minor.yy243, 1); }
       152971  +        break;
       152972  +      case 287: /* wqlist ::= nm eidlist_opt AS LP select RP */
       152973  +{
       152974  +  yymsp[-5].minor.yy243 = sqlite3WithAdd(pParse, 0, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy94, yymsp[-1].minor.yy391); /*A-overwrites-X*/
       152975  +}
       152976  +        break;
       152977  +      case 288: /* wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */
       152978  +{
       152979  +  yymsp[-7].minor.yy243 = sqlite3WithAdd(pParse, yymsp[-7].minor.yy243, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy94, yymsp[-1].minor.yy391);
       152980  +}
       152981  +        break;
       152982  +      case 289: /* windowdefn_list ::= windowdefn */
       152983  +{ yylhsminor.yy379 = yymsp[0].minor.yy379; }
       152984  +  yymsp[0].minor.yy379 = yylhsminor.yy379;
       152985  +        break;
       152986  +      case 290: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */
       152987  +{
       152988  +  assert( yymsp[0].minor.yy379!=0 );
       152989  +  sqlite3WindowChain(pParse, yymsp[0].minor.yy379, yymsp[-2].minor.yy379);
       152990  +  yymsp[0].minor.yy379->pNextWin = yymsp[-2].minor.yy379;
       152991  +  yylhsminor.yy379 = yymsp[0].minor.yy379;
       152992  +}
       152993  +  yymsp[-2].minor.yy379 = yylhsminor.yy379;
       152994  +        break;
       152995  +      case 291: /* windowdefn ::= nm AS LP window RP */
       152996  +{
       152997  +  if( ALWAYS(yymsp[-1].minor.yy379) ){
       152998  +    yymsp[-1].minor.yy379->zName = sqlite3DbStrNDup(pParse->db, yymsp[-4].minor.yy0.z, yymsp[-4].minor.yy0.n);
       152999  +  }
       153000  +  yylhsminor.yy379 = yymsp[-1].minor.yy379;
       153001  +}
       153002  +  yymsp[-4].minor.yy379 = yylhsminor.yy379;
       153003  +        break;
       153004  +      case 292: /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */
       153005  +{
       153006  +  yymsp[-4].minor.yy379 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy379, yymsp[-2].minor.yy94, yymsp[-1].minor.yy94, 0);
       153007  +}
       153008  +        break;
       153009  +      case 293: /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
       153010  +{
       153011  +  yylhsminor.yy379 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy379, yymsp[-2].minor.yy94, yymsp[-1].minor.yy94, &yymsp[-5].minor.yy0);
       153012  +}
       153013  +  yymsp[-5].minor.yy379 = yylhsminor.yy379;
       153014  +        break;
       153015  +      case 294: /* window ::= ORDER BY sortlist frame_opt */
       153016  +{
       153017  +  yymsp[-3].minor.yy379 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy379, 0, yymsp[-1].minor.yy94, 0);
       153018  +}
       153019  +        break;
       153020  +      case 295: /* window ::= nm ORDER BY sortlist frame_opt */
       153021  +{
       153022  +  yylhsminor.yy379 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy379, 0, yymsp[-1].minor.yy94, &yymsp[-4].minor.yy0);
       153023  +}
       153024  +  yymsp[-4].minor.yy379 = yylhsminor.yy379;
       153025  +        break;
       153026  +      case 296: /* window ::= frame_opt */
       153027  +{
       153028  +  yylhsminor.yy379 = yymsp[0].minor.yy379;
       153029  +}
       153030  +  yymsp[0].minor.yy379 = yylhsminor.yy379;
       153031  +        break;
       153032  +      case 297: /* window ::= nm frame_opt */
       153033  +{
       153034  +  yylhsminor.yy379 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy379, 0, 0, &yymsp[-1].minor.yy0);
       153035  +}
       153036  +  yymsp[-1].minor.yy379 = yylhsminor.yy379;
       153037  +        break;
       153038  +      case 298: /* frame_opt ::= */
       153039  +{ 
       153040  +  yymsp[1].minor.yy379 = sqlite3WindowAlloc(pParse, 0, TK_UNBOUNDED, 0, TK_CURRENT, 0, 0);
       153041  +}
       153042  +        break;
       153043  +      case 299: /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
       153044  +{ 
       153045  +  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);
       153046  +}
       153047  +  yymsp[-2].minor.yy379 = yylhsminor.yy379;
       153048  +        break;
       153049  +      case 300: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
152882 153050   { 
152883         -  yymsp[1].minor.yy295 = sqlite3WindowAlloc(pParse, 0, TK_UNBOUNDED, 0, TK_CURRENT, 0, 0);
152884         -}
152885         -        break;
152886         -      case 298: /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
152887         -{ 
152888         -  yylhsminor.yy295 = sqlite3WindowAlloc(pParse, yymsp[-2].minor.yy494, yymsp[-1].minor.yy201.eType, yymsp[-1].minor.yy201.pExpr, TK_CURRENT, 0, yymsp[0].minor.yy238);
152889         -}
152890         -  yymsp[-2].minor.yy295 = yylhsminor.yy295;
152891         -        break;
152892         -      case 299: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
152893         -{ 
152894         -  yylhsminor.yy295 = sqlite3WindowAlloc(pParse, yymsp[-5].minor.yy494, yymsp[-3].minor.yy201.eType, yymsp[-3].minor.yy201.pExpr, yymsp[-1].minor.yy201.eType, yymsp[-1].minor.yy201.pExpr, yymsp[0].minor.yy238);
152895         -}
152896         -  yymsp[-5].minor.yy295 = yylhsminor.yy295;
152897         -        break;
152898         -      case 301: /* frame_bound_s ::= frame_bound */
152899         -      case 303: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==303);
152900         -{yylhsminor.yy201 = yymsp[0].minor.yy201;}
152901         -  yymsp[0].minor.yy201 = yylhsminor.yy201;
152902         -        break;
152903         -      case 302: /* frame_bound_s ::= UNBOUNDED PRECEDING */
152904         -      case 304: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==304);
152905         -      case 306: /* frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==306);
152906         -{yylhsminor.yy201.eType = yymsp[-1].major; yylhsminor.yy201.pExpr = 0;}
152907         -  yymsp[-1].minor.yy201 = yylhsminor.yy201;
152908         -        break;
152909         -      case 305: /* frame_bound ::= expr PRECEDING|FOLLOWING */
152910         -{yylhsminor.yy201.eType = yymsp[0].major; yylhsminor.yy201.pExpr = yymsp[-1].minor.yy524;}
152911         -  yymsp[-1].minor.yy201 = yylhsminor.yy201;
152912         -        break;
152913         -      case 307: /* frame_exclude_opt ::= */
152914         -{yymsp[1].minor.yy238 = 0;}
152915         -        break;
152916         -      case 308: /* frame_exclude_opt ::= EXCLUDE frame_exclude */
152917         -{yymsp[-1].minor.yy238 = yymsp[0].minor.yy238;}
152918         -        break;
152919         -      case 309: /* frame_exclude ::= NO OTHERS */
152920         -      case 310: /* frame_exclude ::= CURRENT ROW */ yytestcase(yyruleno==310);
152921         -{yymsp[-1].minor.yy238 = yymsp[-1].major; /*A-overwrites-X*/}
152922         -        break;
152923         -      case 311: /* frame_exclude ::= GROUP|TIES */
152924         -{yymsp[0].minor.yy238 = yymsp[0].major; /*A-overwrites-X*/}
152925         -        break;
152926         -      case 312: /* window_clause ::= WINDOW windowdefn_list */
152927         -{ yymsp[-1].minor.yy295 = yymsp[0].minor.yy295; }
152928         -        break;
152929         -      case 313: /* over_clause ::= filter_opt OVER LP window RP */
152930         -{
152931         -  yylhsminor.yy295 = yymsp[-1].minor.yy295;
152932         -  assert( yylhsminor.yy295!=0 );
152933         -  yylhsminor.yy295->pFilter = yymsp[-4].minor.yy524;
152934         -}
152935         -  yymsp[-4].minor.yy295 = yylhsminor.yy295;
152936         -        break;
152937         -      case 314: /* over_clause ::= filter_opt OVER nm */
152938         -{
152939         -  yylhsminor.yy295 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
152940         -  if( yylhsminor.yy295 ){
152941         -    yylhsminor.yy295->zName = sqlite3DbStrNDup(pParse->db, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n);
152942         -    yylhsminor.yy295->pFilter = yymsp[-2].minor.yy524;
152943         -  }else{
152944         -    sqlite3ExprDelete(pParse->db, yymsp[-2].minor.yy524);
152945         -  }
152946         -}
152947         -  yymsp[-2].minor.yy295 = yylhsminor.yy295;
152948         -        break;
152949         -      case 316: /* filter_opt ::= FILTER LP WHERE expr RP */
152950         -{ yymsp[-4].minor.yy524 = yymsp[-1].minor.yy524; }
       153051  +  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);
       153052  +}
       153053  +  yymsp[-5].minor.yy379 = yylhsminor.yy379;
       153054  +        break;
       153055  +      case 302: /* frame_bound_s ::= frame_bound */
       153056  +      case 304: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==304);
       153057  +{yylhsminor.yy389 = yymsp[0].minor.yy389;}
       153058  +  yymsp[0].minor.yy389 = yylhsminor.yy389;
       153059  +        break;
       153060  +      case 303: /* frame_bound_s ::= UNBOUNDED PRECEDING */
       153061  +      case 305: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==305);
       153062  +      case 307: /* frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==307);
       153063  +{yylhsminor.yy389.eType = yymsp[-1].major; yylhsminor.yy389.pExpr = 0;}
       153064  +  yymsp[-1].minor.yy389 = yylhsminor.yy389;
       153065  +        break;
       153066  +      case 306: /* frame_bound ::= expr PRECEDING|FOLLOWING */
       153067  +{yylhsminor.yy389.eType = yymsp[0].major; yylhsminor.yy389.pExpr = yymsp[-1].minor.yy102;}
       153068  +  yymsp[-1].minor.yy389 = yylhsminor.yy389;
       153069  +        break;
       153070  +      case 308: /* frame_exclude_opt ::= */
       153071  +{yymsp[1].minor.yy218 = 0;}
       153072  +        break;
       153073  +      case 309: /* frame_exclude_opt ::= EXCLUDE frame_exclude */
       153074  +{yymsp[-1].minor.yy218 = yymsp[0].minor.yy218;}
       153075  +        break;
       153076  +      case 310: /* frame_exclude ::= NO OTHERS */
       153077  +      case 311: /* frame_exclude ::= CURRENT ROW */ yytestcase(yyruleno==311);
       153078  +{yymsp[-1].minor.yy218 = yymsp[-1].major; /*A-overwrites-X*/}
       153079  +        break;
       153080  +      case 312: /* frame_exclude ::= GROUP|TIES */
       153081  +{yymsp[0].minor.yy218 = yymsp[0].major; /*A-overwrites-X*/}
       153082  +        break;
       153083  +      case 313: /* window_clause ::= WINDOW windowdefn_list */
       153084  +{ yymsp[-1].minor.yy379 = yymsp[0].minor.yy379; }
       153085  +        break;
       153086  +      case 314: /* over_clause ::= filter_opt OVER LP window RP */
       153087  +{
       153088  +  yylhsminor.yy379 = yymsp[-1].minor.yy379;
       153089  +  assert( yylhsminor.yy379!=0 );
       153090  +  yylhsminor.yy379->pFilter = yymsp[-4].minor.yy102;
       153091  +}
       153092  +  yymsp[-4].minor.yy379 = yylhsminor.yy379;
       153093  +        break;
       153094  +      case 315: /* over_clause ::= filter_opt OVER nm */
       153095  +{
       153096  +  yylhsminor.yy379 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
       153097  +  if( yylhsminor.yy379 ){
       153098  +    yylhsminor.yy379->zName = sqlite3DbStrNDup(pParse->db, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n);
       153099  +    yylhsminor.yy379->pFilter = yymsp[-2].minor.yy102;
       153100  +  }else{
       153101  +    sqlite3ExprDelete(pParse->db, yymsp[-2].minor.yy102);
       153102  +  }
       153103  +}
       153104  +  yymsp[-2].minor.yy379 = yylhsminor.yy379;
       153105  +        break;
       153106  +      case 317: /* filter_opt ::= FILTER LP WHERE expr RP */
       153107  +{ yymsp[-4].minor.yy102 = yymsp[-1].minor.yy102; }
152951 153108           break;
152952 153109         default:
152953         -      /* (317) input ::= cmdlist */ yytestcase(yyruleno==317);
152954         -      /* (318) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==318);
152955         -      /* (319) cmdlist ::= ecmd (OPTIMIZED OUT) */ assert(yyruleno!=319);
152956         -      /* (320) ecmd ::= SEMI */ yytestcase(yyruleno==320);
152957         -      /* (321) ecmd ::= cmdx SEMI */ yytestcase(yyruleno==321);
152958         -      /* (322) ecmd ::= explain cmdx */ yytestcase(yyruleno==322);
152959         -      /* (323) trans_opt ::= */ yytestcase(yyruleno==323);
152960         -      /* (324) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==324);
152961         -      /* (325) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==325);
152962         -      /* (326) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==326);
152963         -      /* (327) savepoint_opt ::= */ yytestcase(yyruleno==327);
152964         -      /* (328) cmd ::= create_table create_table_args */ yytestcase(yyruleno==328);
152965         -      /* (329) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==329);
152966         -      /* (330) columnlist ::= columnname carglist */ yytestcase(yyruleno==330);
152967         -      /* (331) nm ::= ID|INDEXED */ yytestcase(yyruleno==331);
152968         -      /* (332) nm ::= STRING */ yytestcase(yyruleno==332);
152969         -      /* (333) nm ::= JOIN_KW */ yytestcase(yyruleno==333);
152970         -      /* (334) typetoken ::= typename */ yytestcase(yyruleno==334);
152971         -      /* (335) typename ::= ID|STRING */ yytestcase(yyruleno==335);
152972         -      /* (336) signed ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=336);
152973         -      /* (337) signed ::= minus_num (OPTIMIZED OUT) */ assert(yyruleno!=337);
152974         -      /* (338) carglist ::= carglist ccons */ yytestcase(yyruleno==338);
152975         -      /* (339) carglist ::= */ yytestcase(yyruleno==339);
152976         -      /* (340) ccons ::= NULL onconf */ yytestcase(yyruleno==340);
152977         -      /* (341) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==341);
152978         -      /* (342) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==342);
152979         -      /* (343) conslist ::= tcons (OPTIMIZED OUT) */ assert(yyruleno!=343);
152980         -      /* (344) tconscomma ::= */ yytestcase(yyruleno==344);
152981         -      /* (345) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=345);
152982         -      /* (346) resolvetype ::= raisetype (OPTIMIZED OUT) */ assert(yyruleno!=346);
152983         -      /* (347) selectnowith ::= oneselect (OPTIMIZED OUT) */ assert(yyruleno!=347);
152984         -      /* (348) oneselect ::= values */ yytestcase(yyruleno==348);
152985         -      /* (349) sclp ::= selcollist COMMA */ yytestcase(yyruleno==349);
152986         -      /* (350) as ::= ID|STRING */ yytestcase(yyruleno==350);
152987         -      /* (351) expr ::= term (OPTIMIZED OUT) */ assert(yyruleno!=351);
152988         -      /* (352) likeop ::= LIKE_KW|MATCH */ yytestcase(yyruleno==352);
152989         -      /* (353) exprlist ::= nexprlist */ yytestcase(yyruleno==353);
152990         -      /* (354) nmnum ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=354);
152991         -      /* (355) nmnum ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=355);
152992         -      /* (356) nmnum ::= ON */ yytestcase(yyruleno==356);
152993         -      /* (357) nmnum ::= DELETE */ yytestcase(yyruleno==357);
152994         -      /* (358) nmnum ::= DEFAULT */ yytestcase(yyruleno==358);
152995         -      /* (359) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==359);
152996         -      /* (360) foreach_clause ::= */ yytestcase(yyruleno==360);
152997         -      /* (361) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==361);
152998         -      /* (362) trnm ::= nm */ yytestcase(yyruleno==362);
152999         -      /* (363) tridxby ::= */ yytestcase(yyruleno==363);
153000         -      /* (364) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==364);
153001         -      /* (365) database_kw_opt ::= */ yytestcase(yyruleno==365);
153002         -      /* (366) kwcolumn_opt ::= */ yytestcase(yyruleno==366);
153003         -      /* (367) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==367);
153004         -      /* (368) vtabarglist ::= vtabarg */ yytestcase(yyruleno==368);
153005         -      /* (369) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==369);
153006         -      /* (370) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==370);
153007         -      /* (371) anylist ::= */ yytestcase(yyruleno==371);
153008         -      /* (372) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==372);
153009         -      /* (373) anylist ::= anylist ANY */ yytestcase(yyruleno==373);
153010         -      /* (374) with ::= */ yytestcase(yyruleno==374);
       153110  +      /* (318) input ::= cmdlist */ yytestcase(yyruleno==318);
       153111  +      /* (319) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==319);
       153112  +      /* (320) cmdlist ::= ecmd (OPTIMIZED OUT) */ assert(yyruleno!=320);
       153113  +      /* (321) ecmd ::= SEMI */ yytestcase(yyruleno==321);
       153114  +      /* (322) ecmd ::= cmdx SEMI */ yytestcase(yyruleno==322);
       153115  +      /* (323) ecmd ::= explain cmdx */ yytestcase(yyruleno==323);
       153116  +      /* (324) trans_opt ::= */ yytestcase(yyruleno==324);
       153117  +      /* (325) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==325);
       153118  +      /* (326) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==326);
       153119  +      /* (327) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==327);
       153120  +      /* (328) savepoint_opt ::= */ yytestcase(yyruleno==328);
       153121  +      /* (329) cmd ::= create_table create_table_args */ yytestcase(yyruleno==329);
       153122  +      /* (330) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==330);
       153123  +      /* (331) columnlist ::= columnname carglist */ yytestcase(yyruleno==331);
       153124  +      /* (332) nm ::= ID|INDEXED */ yytestcase(yyruleno==332);
       153125  +      /* (333) nm ::= STRING */ yytestcase(yyruleno==333);
       153126  +      /* (334) nm ::= JOIN_KW */ yytestcase(yyruleno==334);
       153127  +      /* (335) typetoken ::= typename */ yytestcase(yyruleno==335);
       153128  +      /* (336) typename ::= ID|STRING */ yytestcase(yyruleno==336);
       153129  +      /* (337) signed ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=337);
       153130  +      /* (338) signed ::= minus_num (OPTIMIZED OUT) */ assert(yyruleno!=338);
       153131  +      /* (339) carglist ::= carglist ccons */ yytestcase(yyruleno==339);
       153132  +      /* (340) carglist ::= */ yytestcase(yyruleno==340);
       153133  +      /* (341) ccons ::= NULL onconf */ yytestcase(yyruleno==341);
       153134  +      /* (342) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==342);
       153135  +      /* (343) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==343);
       153136  +      /* (344) conslist ::= tcons (OPTIMIZED OUT) */ assert(yyruleno!=344);
       153137  +      /* (345) tconscomma ::= */ yytestcase(yyruleno==345);
       153138  +      /* (346) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=346);
       153139  +      /* (347) resolvetype ::= raisetype (OPTIMIZED OUT) */ assert(yyruleno!=347);
       153140  +      /* (348) selectnowith ::= oneselect (OPTIMIZED OUT) */ assert(yyruleno!=348);
       153141  +      /* (349) oneselect ::= values */ yytestcase(yyruleno==349);
       153142  +      /* (350) sclp ::= selcollist COMMA */ yytestcase(yyruleno==350);
       153143  +      /* (351) as ::= ID|STRING */ yytestcase(yyruleno==351);
       153144  +      /* (352) expr ::= term (OPTIMIZED OUT) */ assert(yyruleno!=352);
       153145  +      /* (353) likeop ::= LIKE_KW|MATCH */ yytestcase(yyruleno==353);
       153146  +      /* (354) exprlist ::= nexprlist */ yytestcase(yyruleno==354);
       153147  +      /* (355) nmnum ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=355);
       153148  +      /* (356) nmnum ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=356);
       153149  +      /* (357) nmnum ::= ON */ yytestcase(yyruleno==357);
       153150  +      /* (358) nmnum ::= DELETE */ yytestcase(yyruleno==358);
       153151  +      /* (359) nmnum ::= DEFAULT */ yytestcase(yyruleno==359);
       153152  +      /* (360) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==360);
       153153  +      /* (361) foreach_clause ::= */ yytestcase(yyruleno==361);
       153154  +      /* (362) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==362);
       153155  +      /* (363) trnm ::= nm */ yytestcase(yyruleno==363);
       153156  +      /* (364) tridxby ::= */ yytestcase(yyruleno==364);
       153157  +      /* (365) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==365);
       153158  +      /* (366) database_kw_opt ::= */ yytestcase(yyruleno==366);
       153159  +      /* (367) kwcolumn_opt ::= */ yytestcase(yyruleno==367);
       153160  +      /* (368) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==368);
       153161  +      /* (369) vtabarglist ::= vtabarg */ yytestcase(yyruleno==369);
       153162  +      /* (370) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==370);
       153163  +      /* (371) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==371);
       153164  +      /* (372) anylist ::= */ yytestcase(yyruleno==372);
       153165  +      /* (373) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==373);
       153166  +      /* (374) anylist ::= anylist ANY */ yytestcase(yyruleno==374);
       153167  +      /* (375) with ::= */ yytestcase(yyruleno==375);
153011 153168           break;
153012 153169   /********** End reduce actions ************************************************/
153013 153170     };
153014 153171     assert( yyruleno<sizeof(yyRuleInfoLhs)/sizeof(yyRuleInfoLhs[0]) );
153015 153172     yygoto = yyRuleInfoLhs[yyruleno];
153016 153173     yysize = yyRuleInfoNRhs[yyruleno];
153017 153174     yyact = yy_find_reduce_action(yymsp[yysize].stateno,(YYCODETYPE)yygoto);
................................................................................
173298 173455       if( iCol==iCurrent ){
173299 173456         nList = (int)(p - pList);
173300 173457         break;
173301 173458       }
173302 173459   
173303 173460       nList -= (int)(p - pList);
173304 173461       pList = p;
173305         -    if( nList==0 ){
       173462  +    if( nList<=0 ){
173306 173463         break;
173307 173464       }
173308 173465       p = &pList[1];
173309 173466       p += fts3GetVarint32(p, &iCurrent);
173310 173467     }
173311 173468   
173312         -  if( bZero && &pList[nList]!=pEnd ){
       173469  +  if( bZero && (pEnd - &pList[nList])>0){
173313 173470       memset(&pList[nList], 0, pEnd - &pList[nList]);
173314 173471     }
173315 173472     *ppList = pList;
173316 173473     *pnList = nList;
173317 173474   }
173318 173475   
173319 173476   /*
................................................................................
193870 194027         rc = xControl(p->pReal, SQLITE_FCNTL_ZIPVFS, &dummy);
193871 194028         if( rc==SQLITE_OK ){
193872 194029           rc = SQLITE_ERROR;
193873 194030           pRbu->zErrmsg = sqlite3_mprintf("rbu/zipvfs setup error");
193874 194031         }else if( rc==SQLITE_NOTFOUND ){
193875 194032           pRbu->pTargetFd = p;
193876 194033           p->pRbu = pRbu;
193877         -        if( p->openFlags & SQLITE_OPEN_MAIN_DB ){
193878         -          rbuMainlistAdd(p);
193879         -        }
       194034  +        rbuMainlistAdd(p);
193880 194035           if( p->pWalFd ) p->pWalFd->pRbu = pRbu;
193881 194036           rc = SQLITE_OK;
193882 194037         }
193883 194038       }
193884 194039       return rc;
193885 194040     }
193886 194041     else if( op==SQLITE_FCNTL_RBUCNT ){
................................................................................
193935 194090       /* Magic number 1 is the WAL_CKPT_LOCK lock. Preventing SQLite from
193936 194091       ** taking this lock also prevents any checkpoints from occurring. 
193937 194092       ** todo: really, it's not clear why this might occur, as 
193938 194093       ** wal_autocheckpoint ought to be turned off.  */
193939 194094       if( ofst==WAL_LOCK_CKPT && n==1 ) rc = SQLITE_BUSY;
193940 194095     }else{
193941 194096       int bCapture = 0;
193942         -    if( n==1 && (flags & SQLITE_SHM_EXCLUSIVE)
193943         -     && pRbu && pRbu->eStage==RBU_STAGE_CAPTURE
193944         -     && (ofst==WAL_LOCK_WRITE || ofst==WAL_LOCK_CKPT || ofst==WAL_LOCK_READ0)
193945         -    ){
       194097  +    if( pRbu && pRbu->eStage==RBU_STAGE_CAPTURE ){
193946 194098         bCapture = 1;
193947 194099       }
193948 194100   
193949 194101       if( bCapture==0 || 0==(flags & SQLITE_SHM_UNLOCK) ){
193950 194102         rc = p->pReal->pMethods->xShmLock(p->pReal, ofst, n, flags);
193951 194103         if( bCapture && rc==SQLITE_OK ){
193952 194104           pRbu->mLock |= (1 << ofst);
................................................................................
193971 194123     int rc = SQLITE_OK;
193972 194124     int eStage = (p->pRbu ? p->pRbu->eStage : 0);
193973 194125   
193974 194126     /* If not in RBU_STAGE_OAL, allow this call to pass through. Or, if this
193975 194127     ** rbu is in the RBU_STAGE_OAL state, use heap memory for *-shm space 
193976 194128     ** instead of a file on disk.  */
193977 194129     assert( p->openFlags & (SQLITE_OPEN_MAIN_DB|SQLITE_OPEN_TEMP_DB) );
193978         -  if( eStage==RBU_STAGE_OAL || eStage==RBU_STAGE_MOVE ){
193979         -    if( iRegion<=p->nShm ){
193980         -      sqlite3_int64 nByte = (iRegion+1) * sizeof(char*);
193981         -      char **apNew = (char**)sqlite3_realloc64(p->apShm, nByte);
193982         -      if( apNew==0 ){
193983         -        rc = SQLITE_NOMEM;
193984         -      }else{
193985         -        memset(&apNew[p->nShm], 0, sizeof(char*) * (1 + iRegion - p->nShm));
193986         -        p->apShm = apNew;
193987         -        p->nShm = iRegion+1;
193988         -      }
       194130  +  if( eStage==RBU_STAGE_OAL ){
       194131  +    sqlite3_int64 nByte = (iRegion+1) * sizeof(char*);
       194132  +    char **apNew = (char**)sqlite3_realloc64(p->apShm, nByte);
       194133  +
       194134  +    /* This is an RBU connection that uses its own heap memory for the
       194135  +    ** pages of the *-shm file. Since no other process can have run
       194136  +    ** recovery, the connection must request *-shm pages in order
       194137  +    ** from start to finish.  */
       194138  +    assert( iRegion==p->nShm );
       194139  +    if( apNew==0 ){
       194140  +      rc = SQLITE_NOMEM;
       194141  +    }else{
       194142  +      memset(&apNew[p->nShm], 0, sizeof(char*) * (1 + iRegion - p->nShm));
       194143  +      p->apShm = apNew;
       194144  +      p->nShm = iRegion+1;
193989 194145       }
193990 194146   
193991         -    if( rc==SQLITE_OK && p->apShm[iRegion]==0 ){
       194147  +    if( rc==SQLITE_OK ){
193992 194148         char *pNew = (char*)sqlite3_malloc64(szRegion);
193993 194149         if( pNew==0 ){
193994 194150           rc = SQLITE_NOMEM;
193995 194151         }else{
193996 194152           memset(pNew, 0, szRegion);
193997 194153           p->apShm[iRegion] = pNew;
193998 194154         }
................................................................................
197207 197363               if( sqlite3_stricmp(azCol[i], pTo->azCol[i]) ) bMismatch = 1;
197208 197364               if( abPK[i] ) bHasPk = 1;
197209 197365             }
197210 197366           }
197211 197367         }
197212 197368         sqlite3_free((char*)azCol);
197213 197369         if( bMismatch ){
197214         -        *pzErrMsg = sqlite3_mprintf("table schemas do not match");
       197370  +        if( pzErrMsg ){
       197371  +          *pzErrMsg = sqlite3_mprintf("table schemas do not match");
       197372  +        }
197215 197373           rc = SQLITE_SCHEMA;
197216 197374         }
197217 197375         if( bHasPk==0 ){
197218 197376           /* Ignore tables with no primary keys */
197219 197377           goto diff_out;
197220 197378         }
197221 197379       }
................................................................................
197413 197571   ** Ensure that there is room in the buffer to append nByte bytes of data.
197414 197572   ** If not, use sqlite3_realloc() to grow the buffer so that there is.
197415 197573   **
197416 197574   ** If successful, return zero. Otherwise, if an OOM condition is encountered,
197417 197575   ** set *pRc to SQLITE_NOMEM and return non-zero.
197418 197576   */
197419 197577   static int sessionBufferGrow(SessionBuffer *p, size_t nByte, int *pRc){
197420         -  if( *pRc==SQLITE_OK && p->nAlloc-p->nBuf<nByte ){
       197578  +  if( *pRc==SQLITE_OK && (size_t)(p->nAlloc-p->nBuf)<nByte ){
197421 197579       u8 *aNew;
197422 197580       i64 nNew = p->nAlloc ? p->nAlloc : 128;
197423 197581       do {
197424 197582         nNew = nNew*2;
197425 197583       }while( (nNew-p->nBuf)<nByte );
197426 197584   
197427 197585       aNew = (u8 *)sqlite3_realloc64(p->aBuf, nNew);
................................................................................
204846 205004         if( iVal==0 ){
204847 205005           *pi = i;
204848 205006           return 0;
204849 205007         }
204850 205008         fts5FastGetVarint32(a, i, iVal);
204851 205009         iOff = ((i64)iVal) << 32;
204852 205010         fts5FastGetVarint32(a, i, iVal);
       205011  +      if( iVal<2 ){
       205012  +        /* This is a corrupt record. So stop parsing it here. */
       205013  +        *piOff = -1;
       205014  +        return 1;
       205015  +      }
204853 205016       }
204854 205017       *piOff = iOff + ((iVal-2) & 0x7FFFFFFF);
204855 205018       *pi = i;
204856 205019       return 0;
204857 205020     }
204858 205021   }
204859 205022   
................................................................................
214389 214552       Fts5Buffer tmp = {0, 0, 0};
214390 214553   
214391 214554       /* The maximum size of the output is equal to the sum of the two 
214392 214555       ** input sizes + 1 varint (9 bytes). The extra varint is because if the
214393 214556       ** first rowid in one input is a large negative number, and the first in
214394 214557       ** the other a non-negative number, the delta for the non-negative
214395 214558       ** number will be larger on disk than the literal integer value
214396         -    ** was.  */
214397         -    if( sqlite3Fts5BufferSize(&p->rc, &out, p1->n + p2->n + 9) ) return;
       214559  +    ** was.  
       214560  +    **
       214561  +    ** Or, if the input position-lists are corrupt, then the output might
       214562  +    ** include up to 2 extra 10-byte positions created by interpreting -1
       214563  +    ** (the value PoslistNext64() uses for EOF) as a position and appending
       214564  +    ** it to the output. This can happen at most once for each input 
       214565  +    ** position-list, hence two 10 byte paddings.  */
       214566  +    if( sqlite3Fts5BufferSize(&p->rc, &out, p1->n + p2->n + 9+10+10) ) return;
214398 214567       fts5DoclistIterInit(p1, &i1);
214399 214568       fts5DoclistIterInit(p2, &i2);
214400 214569   
214401 214570       while( 1 ){
214402 214571         if( i1.iRowid<i2.iRowid ){
214403 214572           /* Copy entry from i1 */
214404 214573           fts5MergeAppendDocid(&out, iLastRowid, i1.iRowid);
214405 214574           fts5BufferSafeAppendBlob(&out, i1.aPoslist, i1.nPoslist+i1.nSize);
214406 214575           fts5DoclistIterNext(&i1);
214407 214576           if( i1.aPoslist==0 ) break;
       214577  +        assert( out.n<=((i1.aPoslist-p1->p) + (i2.aPoslist-p2->p)+9+10+10) );
214408 214578         }
214409 214579         else if( i2.iRowid!=i1.iRowid ){
214410 214580           /* Copy entry from i2 */
214411 214581           fts5MergeAppendDocid(&out, iLastRowid, i2.iRowid);
214412 214582           fts5BufferSafeAppendBlob(&out, i2.aPoslist, i2.nPoslist+i2.nSize);
214413 214583           fts5DoclistIterNext(&i2);
214414 214584           if( i2.aPoslist==0 ) break;
       214585  +        assert( out.n<=((i1.aPoslist-p1->p) + (i2.aPoslist-p2->p)+9+10+10) );
214415 214586         }
214416 214587         else{
214417 214588           /* Merge the two position lists. */ 
214418 214589           i64 iPos1 = 0;
214419 214590           i64 iPos2 = 0;
214420 214591           int iOff1 = 0;
214421 214592           int iOff2 = 0;
................................................................................
214431 214602           fts5MergeAppendDocid(&out, iLastRowid, i2.iRowid);
214432 214603           fts5BufferZero(&tmp);
214433 214604           sqlite3Fts5BufferSize(&p->rc, &tmp, i1.nPoslist + i2.nPoslist);
214434 214605           if( p->rc ) break;
214435 214606   
214436 214607           sqlite3Fts5PoslistNext64(a1, i1.nPoslist, &iOff1, &iPos1);
214437 214608           sqlite3Fts5PoslistNext64(a2, i2.nPoslist, &iOff2, &iPos2);
214438         -        assert( iPos1>=0 && iPos2>=0 );
       214609  +        assert_nc( iPos1>=0 && iPos2>=0 );
214439 214610   
214440 214611           if( iPos1<iPos2 ){
214441 214612             sqlite3Fts5PoslistSafeAppend(&tmp, &iPrev, iPos1);
214442 214613             sqlite3Fts5PoslistNext64(a1, i1.nPoslist, &iOff1, &iPos1);
214443 214614           }else{
214444 214615             sqlite3Fts5PoslistSafeAppend(&tmp, &iPrev, iPos2);
214445 214616             sqlite3Fts5PoslistNext64(a2, i2.nPoslist, &iOff2, &iPos2);
214446 214617           }
214447         -
214448 214618           if( iPos1>=0 && iPos2>=0 ){
214449 214619             while( 1 ){
214450 214620               if( iPos1<iPos2 ){
214451 214621                 if( iPos1!=iPrev ){
214452 214622                   sqlite3Fts5PoslistSafeAppend(&tmp, &iPrev, iPos1);
214453 214623                 }
214454 214624                 sqlite3Fts5PoslistNext64(a1, i1.nPoslist, &iOff1, &iPos1);
................................................................................
214465 214635           if( iPos1>=0 ){
214466 214636             if( iPos1!=iPrev ){
214467 214637               sqlite3Fts5PoslistSafeAppend(&tmp, &iPrev, iPos1);
214468 214638             }
214469 214639             aCopy = &a1[iOff1];
214470 214640             nCopy = i1.nPoslist - iOff1;
214471 214641           }else{
214472         -          assert( iPos2>=0 && iPos2!=iPrev );
       214642  +          assert_nc( iPos2>=0 && iPos2!=iPrev );
214473 214643             sqlite3Fts5PoslistSafeAppend(&tmp, &iPrev, iPos2);
214474 214644             aCopy = &a2[iOff2];
214475 214645             nCopy = i2.nPoslist - iOff2;
214476 214646           }
214477 214647           if( nCopy>0 ){
214478 214648             fts5BufferSafeAppendBlob(&tmp, aCopy, nCopy);
214479 214649           }
214480 214650   
214481 214651           /* WRITEPOSLISTSIZE */
214482 214652           fts5BufferSafeAppendVarint(&out, tmp.n * 2);
214483 214653           fts5BufferSafeAppendBlob(&out, tmp.p, tmp.n);
214484 214654           fts5DoclistIterNext(&i1);
214485 214655           fts5DoclistIterNext(&i2);
214486         -        assert( out.n<=(p1->n+p2->n+9) );
       214656  +        assert_nc( out.n<=(p1->n+p2->n+9) );
214487 214657           if( i1.aPoslist==0 || i2.aPoslist==0 ) break;
       214658  +        assert( out.n<=((i1.aPoslist-p1->p) + (i2.aPoslist-p2->p)+9+10+10) );
214488 214659         }
214489 214660       }
214490 214661   
214491 214662       if( i1.aPoslist ){
214492 214663         fts5MergeAppendDocid(&out, iLastRowid, i1.iRowid);
214493 214664         fts5BufferSafeAppendBlob(&out, i1.aPoslist, i1.aEof - i1.aPoslist);
214494 214665       }
214495 214666       else if( i2.aPoslist ){
214496 214667         fts5MergeAppendDocid(&out, iLastRowid, i2.iRowid);
214497 214668         fts5BufferSafeAppendBlob(&out, i2.aPoslist, i2.aEof - i2.aPoslist);
214498 214669       }
214499         -    assert( out.n<=(p1->n+p2->n+9) );
       214670  +    assert_nc( out.n<=(p1->n+p2->n+9) );
214500 214671   
214501 214672       fts5BufferSet(&p->rc, p1, out.n, out.p);
214502 214673       fts5BufferFree(&tmp);
214503 214674       fts5BufferFree(&out);
214504 214675     }
214505 214676   }
214506 214677   
................................................................................
218658 218829   static void fts5SourceIdFunc(
218659 218830     sqlite3_context *pCtx,          /* Function call context */
218660 218831     int nArg,                       /* Number of args */
218661 218832     sqlite3_value **apUnused        /* Function arguments */
218662 218833   ){
218663 218834     assert( nArg==0 );
218664 218835     UNUSED_PARAM2(nArg, apUnused);
218665         -  sqlite3_result_text(pCtx, "fts5: 2019-05-10 17:50:33 2846bc0429c0956473bfe99dde135f2c206720f0be4c2800118b280e446ce325", -1, SQLITE_TRANSIENT);
       218836  +  sqlite3_result_text(pCtx, "fts5: 2019-05-23 16:38:12 d2fe370cafa9b11f6c3eb4e1c3be48d9d2610b9d2f9d9ebf9e50267f9079dfc0", -1, SQLITE_TRANSIENT);
218666 218837   }
218667 218838   
218668 218839   /*
218669 218840   ** Return true if zName is the extension on one of the shadow tables used
218670 218841   ** by this module.
218671 218842   */
218672 218843   static int fts5ShadowName(const char *zName){
................................................................................
222917 223088             if( sqlite3Fts5IterEof(pCsr->pIter) ) break;
222918 223089           }
222919 223090         }
222920 223091       }
222921 223092     }
222922 223093   
222923 223094     if( rc==SQLITE_OK && pCsr->bEof==0 && pTab->eType==FTS5_VOCAB_COL ){
222924         -    while( pCsr->aDoc[pCsr->iCol]==0 ) pCsr->iCol++;
222925         -    assert( pCsr->iCol<pCsr->pFts5->pConfig->nCol );
       223095  +    for(/* noop */; pCsr->iCol<nCol && pCsr->aDoc[pCsr->iCol]==0; pCsr->iCol++);
       223096  +    if( pCsr->iCol==nCol ){
       223097  +      rc = FTS5_CORRUPT;
       223098  +    }
222926 223099     }
222927 223100     return rc;
222928 223101   }
222929 223102   
222930 223103   /*
222931 223104   ** This is the xFilter implementation for the virtual table.
222932 223105   */
................................................................................
223422 223595   #endif
223423 223596     return rc;
223424 223597   }
223425 223598   #endif /* SQLITE_CORE */
223426 223599   #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */
223427 223600   
223428 223601   /************** End of stmt.c ************************************************/
223429         -#if __LINE__!=223429
       223602  +#if __LINE__!=223602
223430 223603   #undef SQLITE_SOURCE_ID
223431         -#define SQLITE_SOURCE_ID      "2019-05-10 17:54:58 956ca2a452aa3707bca553007a7ef221af3d4f6b0af747d17070926e000falt2"
       223604  +#define SQLITE_SOURCE_ID      "2019-05-23 16:38:12 d2fe370cafa9b11f6c3eb4e1c3be48d9d2610b9d2f9d9ebf9e50267f9079alt2"
223432 223605   #endif
223433 223606   /* Return the source-id for this library */
223434 223607   SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
223435 223608   /************************** End of sqlite3.c ******************************/

Changes to src/sqlite3.h.

   121    121   **
   122    122   ** See also: [sqlite3_libversion()],
   123    123   ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
   124    124   ** [sqlite_version()] and [sqlite_source_id()].
   125    125   */
   126    126   #define SQLITE_VERSION        "3.29.0"
   127    127   #define SQLITE_VERSION_NUMBER 3029000
   128         -#define SQLITE_SOURCE_ID      "2019-05-10 17:54:58 956ca2a452aa3707bca553007a7ef221af3d4f6b0af747d17070926e000f2362"
          128  +#define SQLITE_SOURCE_ID      "2019-05-23 16:38:12 d2fe370cafa9b11f6c3eb4e1c3be48d9d2610b9d2f9d9ebf9e50267f9079dfc0"
   129    129   
   130    130   /*
   131    131   ** CAPI3REF: Run-Time Library Version Numbers
   132    132   ** KEYWORDS: sqlite3_version sqlite3_sourceid
   133    133   **
   134    134   ** These interfaces provide the same information as the [SQLITE_VERSION],
   135    135   ** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros
................................................................................
  2194   2194   ** <dd>The SQLITE_DBCONFIG_DEFENSIVE option activates or deactivates the
  2195   2195   ** "defensive" flag for a database connection.  When the defensive
  2196   2196   ** flag is enabled, language features that allow ordinary SQL to 
  2197   2197   ** deliberately corrupt the database file are disabled.  The disabled
  2198   2198   ** features include but are not limited to the following:
  2199   2199   ** <ul>
  2200   2200   ** <li> The [PRAGMA writable_schema=ON] statement.
         2201  +** <li> The [PRAGMA journal_mode=OFF] statement.
  2201   2202   ** <li> Writes to the [sqlite_dbpage] virtual table.
  2202   2203   ** <li> Direct writes to [shadow tables].
  2203   2204   ** </ul>
  2204   2205   ** </dd>
  2205   2206   **
  2206   2207   ** [[SQLITE_DBCONFIG_WRITABLE_SCHEMA]] <dt>SQLITE_DBCONFIG_WRITABLE_SCHEMA</dt>
  2207   2208   ** <dd>The SQLITE_DBCONFIG_WRITABLE_SCHEMA option activates or deactivates the