Fossil

Check-in [04b725d9bf]
Login

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

Overview
Comment:Update the built-in SQLite to the latest 3.37.0 alpha, for testing.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 04b725d9bf814faa24b0a35255eebfc13d7f25c3220553c18f68f07a04928542
User & Date: drh 2021-09-06 13:06:26.550
Context
2021-09-06
13:22
Expand the 'fossil wiki export --technote' interface to support technote retrieval via tag name as discussed in the chat. The query looks to match against both 'sym-TAG' and 'TAG' as technote tags are presently prefixed with 'sym-'. This identifier should be reserved for branches, however, so may be removed from technotes, at which point this query should be changed. check-in: d71b648c6c user: jamsek tags: trunk
13:06
Update the built-in SQLite to the latest 3.37.0 alpha, for testing. check-in: 04b725d9bf user: drh tags: trunk
12:00
Improvement to the ticket customization documentation suggested by [forum:/forumpost/31e44444cda1a7821912|forum post 31e44444cda1a7821912] check-in: 3fcdfb0cd8 user: drh tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/shell.c.
12060
12061
12062
12063
12064
12065
12066


12067
12068
12069
12070
12071
12072
12073
  u8 autoEQPtest;        /* autoEQP is in test mode */
  u8 autoEQPtrace;       /* autoEQP is in trace mode */
  u8 scanstatsOn;        /* True to display scan stats before each finalize */
  u8 openMode;           /* SHELL_OPEN_NORMAL, _APPENDVFS, or _ZIPFILE */
  u8 doXdgOpen;          /* Invoke start/open/xdg-open in output_reset() */
  u8 nEqpLevel;          /* Depth of the EQP output graph */
  u8 eTraceType;         /* SHELL_TRACE_* value for type of trace */


  unsigned statsOn;      /* True to display memory stats before each finalize */
  unsigned mEqpLines;    /* Mask of veritical lines in the EQP output graph */
  int outCount;          /* Revert to stdout when reaching zero */
  int cnt;               /* Number of records displayed so far */
  int lineno;            /* Line number of last line read from in */
  int openFlags;         /* Additional flags to open.  (SQLITE_OPEN_NOFOLLOW) */
  FILE *in;              /* Read commands from this stream */







>
>







12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
  u8 autoEQPtest;        /* autoEQP is in test mode */
  u8 autoEQPtrace;       /* autoEQP is in trace mode */
  u8 scanstatsOn;        /* True to display scan stats before each finalize */
  u8 openMode;           /* SHELL_OPEN_NORMAL, _APPENDVFS, or _ZIPFILE */
  u8 doXdgOpen;          /* Invoke start/open/xdg-open in output_reset() */
  u8 nEqpLevel;          /* Depth of the EQP output graph */
  u8 eTraceType;         /* SHELL_TRACE_* value for type of trace */
  u8 bSafeMode;          /* True to prohibit unsafe operations */
  u8 bSafeModePersist;   /* The long-term value of bSafeMode */
  unsigned statsOn;      /* True to display memory stats before each finalize */
  unsigned mEqpLines;    /* Mask of veritical lines in the EQP output graph */
  int outCount;          /* Revert to stdout when reaching zero */
  int cnt;               /* Number of records displayed so far */
  int lineno;            /* Line number of last line read from in */
  int openFlags;         /* Additional flags to open.  (SQLITE_OPEN_NOFOLLOW) */
  FILE *in;              /* Read commands from this stream */
12111
12112
12113
12114
12115
12116
12117

12118
12119
12120
12121
12122
12123
12124
12125
12126
    OpenSession aSession[4];   /* Array of sessions.  [0] is in focus. */
#endif
  } aAuxDb[5],           /* Array of all database connections */
    *pAuxDb;             /* Currently active database connection */
  int *aiIndent;         /* Array of indents used in MODE_Explain */
  int nIndent;           /* Size of array aiIndent[] */
  int iIndent;           /* Index of current op in aiIndent[] */

  EQPGraph sGraph;       /* Information for the graphical EXPLAIN QUERY PLAN */
  ExpertInfo expert;        /* Valid if previous command was ".expert OPT..." */
};


/* Allowed values for ShellState.autoEQP
*/
#define AUTOEQP_off      0           /* Automatic EXPLAIN QUERY PLAN is off */
#define AUTOEQP_on       1           /* Automatic EQP is on */







>

|







12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
    OpenSession aSession[4];   /* Array of sessions.  [0] is in focus. */
#endif
  } aAuxDb[5],           /* Array of all database connections */
    *pAuxDb;             /* Currently active database connection */
  int *aiIndent;         /* Array of indents used in MODE_Explain */
  int nIndent;           /* Size of array aiIndent[] */
  int iIndent;           /* Index of current op in aiIndent[] */
  char *zNonce;          /* Nonce for temporary safe-mode excapes */
  EQPGraph sGraph;       /* Information for the graphical EXPLAIN QUERY PLAN */
  ExpertInfo expert;     /* Valid if previous command was ".expert OPT..." */
};


/* Allowed values for ShellState.autoEQP
*/
#define AUTOEQP_off      0           /* Automatic EXPLAIN QUERY PLAN is off */
#define AUTOEQP_on       1           /* Automatic EQP is on */
12247
12248
12249
12250
12251
12252
12253





















12254
12255
12256
12257
12258
12259
12260
  sqlite3_value **apVal
){
  ShellState *p = (ShellState*)sqlite3_user_data(pCtx);
  (void)nVal;
  utf8_printf(p->out, "%s\n", sqlite3_value_text(apVal[0]));
  sqlite3_result_value(pCtx, apVal[0]);
}






















/*
** SQL function:   edit(VALUE)
**                 edit(VALUE,EDITOR)
**
** These steps:
**







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
  sqlite3_value **apVal
){
  ShellState *p = (ShellState*)sqlite3_user_data(pCtx);
  (void)nVal;
  utf8_printf(p->out, "%s\n", sqlite3_value_text(apVal[0]));
  sqlite3_result_value(pCtx, apVal[0]);
}

/*
** If in safe mode, print an error message described by the arguments
** and exit immediately.
*/
static void failIfSafeMode(
  ShellState *p,
  const char *zErrMsg,
  ...
){
  if( p->bSafeMode ){
    va_list ap;
    char *zMsg;
    va_start(ap, zErrMsg);
    zMsg = sqlite3_vmprintf(zErrMsg, ap);
    va_end(ap);
    raw_printf(stderr, "line %d: ", p->lineno);
    utf8_printf(stderr, "%s\n", zMsg);
    exit(1);
  }
}

/*
** SQL function:   edit(VALUE)
**                 edit(VALUE,EDITOR)
**
** These steps:
**
12725
12726
12727
12728
12729
12730
12731











































12732
12733
12734
12735
12736
12737
12738
    return TRUE;
  }
  return FALSE;
}
#endif

#ifndef SQLITE_OMIT_AUTHORIZATION











































/*
** When the ".auth ON" is set, the following authorizer callback is
** invoked.  It always returns SQLITE_OK.
*/
static int shellAuth(
  void *pClientData,
  int op,







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
    return TRUE;
  }
  return FALSE;
}
#endif

#ifndef SQLITE_OMIT_AUTHORIZATION
/*
** This authorizer runs in safe mode.
*/
static int safeModeAuth(
  void *pClientData,
  int op,
  const char *zA1,
  const char *zA2,
  const char *zA3,
  const char *zA4
){
  ShellState *p = (ShellState*)pClientData;
  static const char *azProhibitedFunctions[] = {
    "edit",
    "fts3_tokenizer",
    "load_extension",
    "readfile",
    "writefile",
    "zipfile",
    "zipfile_cds",
  };
  UNUSED_PARAMETER(zA2);
  UNUSED_PARAMETER(zA3);
  UNUSED_PARAMETER(zA4);
  switch( op ){
    case SQLITE_ATTACH: {
      failIfSafeMode(p, "cannot run ATTACH in safe mode");
      break;
    }
    case SQLITE_FUNCTION: {
      int i;
      for(i=0; i<ArraySize(azProhibitedFunctions); i++){
        if( sqlite3_stricmp(zA1, azProhibitedFunctions[i])==0 ){
          failIfSafeMode(p, "cannot use the %s() function in safe mode",
                         azProhibitedFunctions[i]);
        }
      }
      break;
    }
  }
  return SQLITE_OK;
}

/*
** When the ".auth ON" is set, the following authorizer callback is
** invoked.  It always returns SQLITE_OK.
*/
static int shellAuth(
  void *pClientData,
  int op,
12767
12768
12769
12770
12771
12772
12773

12774
12775
12776
12777
12778
12779
12780
    if( az[i] ){
      output_c_string(p->out, az[i]);
    }else{
      raw_printf(p->out, "NULL");
    }
  }
  raw_printf(p->out, "\n");

  return SQLITE_OK;
}
#endif

/*
** Print a schema statement.  Part of MODE_Semi and MODE_Pretty output.
**







>







12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
    if( az[i] ){
      output_c_string(p->out, az[i]);
    }else{
      raw_printf(p->out, "NULL");
    }
  }
  raw_printf(p->out, "\n");
  if( p->bSafeMode ) (void)safeModeAuth(pClientData, op, zA1, zA2, zA3, zA4);
  return SQLITE_OK;
}
#endif

/*
** Print a schema statement.  Part of MODE_Semi and MODE_Pretty output.
**
14940
14941
14942
14943
14944
14945
14946

14947
14948
14949
14950
14951
14952
14953
  "     line      One value per line",
  "     list      Values delimited by \"|\"",
  "     markdown  Markdown table format",
  "     quote     Escape answers as for SQL",
  "     table     ASCII-art table",
  "     tabs      Tab-separated values",
  "     tcl       TCL list elements",

  ".nullvalue STRING        Use STRING in place of NULL values",
  ".once ?OPTIONS? ?FILE?   Output for the next SQL command only to FILE",
  "     If FILE begins with '|' then open as a pipe",
  "       --bom  Put a UTF8 byte-order mark at the beginning",
  "       -e     Send output to the system text editor",
  "       -x     Send output as CSV to a spreadsheet (same as \".excel\")",
#ifdef SQLITE_DEBUG







>







15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
  "     line      One value per line",
  "     list      Values delimited by \"|\"",
  "     markdown  Markdown table format",
  "     quote     Escape answers as for SQL",
  "     table     ASCII-art table",
  "     tabs      Tab-separated values",
  "     tcl       TCL list elements",
  ".nonce STRING            Disable safe mode for one command if the nonce matches",
  ".nullvalue STRING        Use STRING in place of NULL values",
  ".once ?OPTIONS? ?FILE?   Output for the next SQL command only to FILE",
  "     If FILE begins with '|' then open as a pipe",
  "       --bom  Put a UTF8 byte-order mark at the beginning",
  "       -e     Send output to the system text editor",
  "       -x     Send output as CSV to a spreadsheet (same as \".excel\")",
#ifdef SQLITE_DEBUG
15654
15655
15656
15657
15658
15659
15660



15661
15662
15663
15664
15665
15666
15667
      }
      if( p->szMax>0 ){
        sqlite3_file_control(p->db, "main", SQLITE_FCNTL_SIZE_LIMIT, &p->szMax);
      }
    }
#endif
  }



}

/*
** Attempt to close the databaes connection.  Report errors.
*/
void close_db(sqlite3 *db){
  int rc = sqlite3_close(db);







>
>
>







15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
      }
      if( p->szMax>0 ){
        sqlite3_file_control(p->db, "main", SQLITE_FCNTL_SIZE_LIMIT, &p->szMax);
      }
    }
#endif
  }
  if( p->bSafeModePersist && p->db!=0 ){
    sqlite3_set_authorizer(p->db, safeModeAuth, p);
  }
}

/*
** Attempt to close the databaes connection.  Report errors.
*/
void close_db(sqlite3 *db){
  int rc = sqlite3_close(db);
18417
18418
18419
18420
18421
18422
18423


18424
18425
18426
18427
18428
18429
18430
18431
18432

18433
18434
18435
18436
18437
18438
18439
18440
18441
18442
18443
18444
18445
18446

18447
18448
18449
18450
18451
18452
18453
      raw_printf(stderr, "Usage: .auth ON|OFF\n");
      rc = 1;
      goto meta_command_exit;
    }
    open_db(p, 0);
    if( booleanValue(azArg[1]) ){
      sqlite3_set_authorizer(p->db, shellAuth, p);


    }else{
      sqlite3_set_authorizer(p->db, 0, 0);
    }
  }else
#endif

#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
  if( c=='a' && strncmp(azArg[0], "archive", n)==0 ){
    open_db(p, 0);

    rc = arDotCommand(p, 0, azArg, nArg);
  }else
#endif

  if( (c=='b' && n>=3 && strncmp(azArg[0], "backup", n)==0)
   || (c=='s' && n>=3 && strncmp(azArg[0], "save", n)==0)
  ){
    const char *zDestFile = 0;
    const char *zDb = 0;
    sqlite3 *pDest;
    sqlite3_backup *pBackup;
    int j;
    int bAsync = 0;
    const char *zVfs = 0;

    for(j=1; j<nArg; j++){
      const char *z = azArg[j];
      if( z[0]=='-' ){
        if( z[1]=='-' ) z++;
        if( strcmp(z, "-append")==0 ){
          zVfs = "apndvfs";
        }else







>
>









>














>







18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
18525
18526
18527
18528
18529
      raw_printf(stderr, "Usage: .auth ON|OFF\n");
      rc = 1;
      goto meta_command_exit;
    }
    open_db(p, 0);
    if( booleanValue(azArg[1]) ){
      sqlite3_set_authorizer(p->db, shellAuth, p);
    }else if( p->bSafeModePersist ){
      sqlite3_set_authorizer(p->db, safeModeAuth, p);
    }else{
      sqlite3_set_authorizer(p->db, 0, 0);
    }
  }else
#endif

#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
  if( c=='a' && strncmp(azArg[0], "archive", n)==0 ){
    open_db(p, 0);
    failIfSafeMode(p, "cannot run .archive in safe mode");
    rc = arDotCommand(p, 0, azArg, nArg);
  }else
#endif

  if( (c=='b' && n>=3 && strncmp(azArg[0], "backup", n)==0)
   || (c=='s' && n>=3 && strncmp(azArg[0], "save", n)==0)
  ){
    const char *zDestFile = 0;
    const char *zDb = 0;
    sqlite3 *pDest;
    sqlite3_backup *pBackup;
    int j;
    int bAsync = 0;
    const char *zVfs = 0;
    failIfSafeMode(p, "cannot run .%s in safe mode", azArg[0]);
    for(j=1; j<nArg; j++){
      const char *z = azArg[j];
      if( z[0]=='-' ){
        if( z[1]=='-' ) z++;
        if( strcmp(z, "-append")==0 ){
          zVfs = "apndvfs";
        }else
18528
18529
18530
18531
18532
18533
18534

18535
18536
18537
18538
18539
18540
18541
  ** routine named test_breakpoint().
  */
  if( c=='b' && n>=3 && strncmp(azArg[0], "breakpoint", n)==0 ){
    test_breakpoint();
  }else

  if( c=='c' && strcmp(azArg[0],"cd")==0 ){

    if( nArg==2 ){
#if defined(_WIN32) || defined(WIN32)
      wchar_t *z = sqlite3_win32_utf8_to_unicode(azArg[1]);
      rc = !SetCurrentDirectoryW(z);
      sqlite3_free(z);
#else
      rc = chdir(azArg[1]);







>







18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617
18618
  ** routine named test_breakpoint().
  */
  if( c=='b' && n>=3 && strncmp(azArg[0], "breakpoint", n)==0 ){
    test_breakpoint();
  }else

  if( c=='c' && strcmp(azArg[0],"cd")==0 ){
    failIfSafeMode(p, "cannot run .cd in safe mode");
    if( nArg==2 ){
#if defined(_WIN32) || defined(WIN32)
      wchar_t *z = sqlite3_win32_utf8_to_unicode(azArg[1]);
      rc = !SetCurrentDirectoryW(z);
      sqlite3_free(z);
#else
      rc = chdir(azArg[1]);
18581
18582
18583
18584
18585
18586
18587

18588
18589
18590
18591
18592
18593
18594
      utf8_printf(stdout, "testcase-%s ok\n", p->zTestcase);
      p->nCheck++;
    }
    sqlite3_free(zRes);
  }else

  if( c=='c' && strncmp(azArg[0], "clone", n)==0 ){

    if( nArg==2 ){
      tryToClone(p, azArg[1]);
    }else{
      raw_printf(stderr, "Usage: .clone FILENAME\n");
      rc = 1;
    }
  }else







>







18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
      utf8_printf(stdout, "testcase-%s ok\n", p->zTestcase);
      p->nCheck++;
    }
    sqlite3_free(zRes);
  }else

  if( c=='c' && strncmp(azArg[0], "clone", n)==0 ){
    failIfSafeMode(p, "cannot run .clone in safe mode");
    if( nArg==2 ){
      tryToClone(p, azArg[1]);
    }else{
      raw_printf(stderr, "Usage: .clone FILENAME\n");
      rc = 1;
    }
  }else
19142
19143
19144
19145
19146
19147
19148

19149
19150
19151
19152
19153
19154
19155
    char *zSql;                 /* An SQL statement */
    ImportCtx sCtx;             /* Reader context */
    char *(SQLITE_CDECL *xRead)(ImportCtx*); /* Func to read one value */
    int eVerbose = 0;           /* Larger for more console output */
    int nSkip = 0;              /* Initial lines to skip */
    int useOutputMode = 1;      /* Use output mode to determine separators */


    memset(&sCtx, 0, sizeof(sCtx));
    if( p->mode==MODE_Ascii ){
      xRead = ascii_read_one_field;
    }else{
      xRead = csv_read_one_field;
    }
    for(i=1; i<nArg; i++){







>







19220
19221
19222
19223
19224
19225
19226
19227
19228
19229
19230
19231
19232
19233
19234
    char *zSql;                 /* An SQL statement */
    ImportCtx sCtx;             /* Reader context */
    char *(SQLITE_CDECL *xRead)(ImportCtx*); /* Func to read one value */
    int eVerbose = 0;           /* Larger for more console output */
    int nSkip = 0;              /* Initial lines to skip */
    int useOutputMode = 1;      /* Use output mode to determine separators */

    failIfSafeMode(p, "cannot run .import in safe mode");
    memset(&sCtx, 0, sizeof(sCtx));
    if( p->mode==MODE_Ascii ){
      xRead = ascii_read_one_field;
    }else{
      xRead = csv_read_one_field;
    }
    for(i=1; i<nArg; i++){
19593
19594
19595
19596
19597
19598
19599

19600
19601
19602
19603
19604
19605
19606
19607
19608
19609
19610
19611
19612
19613
19614
19615
19616
19617

19618
19619
19620
19621
19622
19623
19624
    lintDotCommand(p, azArg, nArg);
  }else

#ifndef SQLITE_OMIT_LOAD_EXTENSION
  if( c=='l' && strncmp(azArg[0], "load", n)==0 ){
    const char *zFile, *zProc;
    char *zErrMsg = 0;

    if( nArg<2 ){
      raw_printf(stderr, "Usage: .load FILE ?ENTRYPOINT?\n");
      rc = 1;
      goto meta_command_exit;
    }
    zFile = azArg[1];
    zProc = nArg>=3 ? azArg[2] : 0;
    open_db(p, 0);
    rc = sqlite3_load_extension(p->db, zFile, zProc, &zErrMsg);
    if( rc!=SQLITE_OK ){
      utf8_printf(stderr, "Error: %s\n", zErrMsg);
      sqlite3_free(zErrMsg);
      rc = 1;
    }
  }else
#endif

  if( c=='l' && strncmp(azArg[0], "log", n)==0 ){

    if( nArg!=2 ){
      raw_printf(stderr, "Usage: .log FILENAME\n");
      rc = 1;
    }else{
      const char *zFile = azArg[1];
      output_file_close(p->pLog);
      p->pLog = output_file_open(zFile, 0);







>


















>







19672
19673
19674
19675
19676
19677
19678
19679
19680
19681
19682
19683
19684
19685
19686
19687
19688
19689
19690
19691
19692
19693
19694
19695
19696
19697
19698
19699
19700
19701
19702
19703
19704
19705
    lintDotCommand(p, azArg, nArg);
  }else

#ifndef SQLITE_OMIT_LOAD_EXTENSION
  if( c=='l' && strncmp(azArg[0], "load", n)==0 ){
    const char *zFile, *zProc;
    char *zErrMsg = 0;
    failIfSafeMode(p, "cannot run .load in safe mode");
    if( nArg<2 ){
      raw_printf(stderr, "Usage: .load FILE ?ENTRYPOINT?\n");
      rc = 1;
      goto meta_command_exit;
    }
    zFile = azArg[1];
    zProc = nArg>=3 ? azArg[2] : 0;
    open_db(p, 0);
    rc = sqlite3_load_extension(p->db, zFile, zProc, &zErrMsg);
    if( rc!=SQLITE_OK ){
      utf8_printf(stderr, "Error: %s\n", zErrMsg);
      sqlite3_free(zErrMsg);
      rc = 1;
    }
  }else
#endif

  if( c=='l' && strncmp(azArg[0], "log", n)==0 ){
    failIfSafeMode(p, "cannot run .log in safe mode");
    if( nArg!=2 ){
      raw_printf(stderr, "Usage: .log FILENAME\n");
      rc = 1;
    }else{
      const char *zFile = azArg[1];
      output_file_close(p->pLog);
      p->pLog = output_file_open(zFile, 0);
19680
19681
19682
19683
19684
19685
19686













19687
19688
19689
19690
19691
19692
19693
      raw_printf(stderr, "Error: mode should be one of: "
         "ascii box column csv html insert json line list markdown "
         "quote table tabs tcl\n");
      rc = 1;
    }
    p->cMode = p->mode;
  }else














  if( c=='n' && strncmp(azArg[0], "nullvalue", n)==0 ){
    if( nArg==2 ){
      sqlite3_snprintf(sizeof(p->nullValue), p->nullValue,
                       "%.*s", (int)ArraySize(p->nullValue)-1, azArg[1]);
    }else{
      raw_printf(stderr, "Usage: .nullvalue STRING\n");







>
>
>
>
>
>
>
>
>
>
>
>
>







19761
19762
19763
19764
19765
19766
19767
19768
19769
19770
19771
19772
19773
19774
19775
19776
19777
19778
19779
19780
19781
19782
19783
19784
19785
19786
19787
      raw_printf(stderr, "Error: mode should be one of: "
         "ascii box column csv html insert json line list markdown "
         "quote table tabs tcl\n");
      rc = 1;
    }
    p->cMode = p->mode;
  }else

  if( c=='n' && strcmp(azArg[0], "nonce")==0 ){
    if( nArg!=2 ){
      raw_printf(stderr, "Usage: .nonce NONCE\n");
      rc = 1;
    }else if( p->zNonce==0 || strcmp(azArg[1],p->zNonce)!=0 ){
      raw_printf(stderr, "line %d: incorrect nonce: \"%s\"\n", p->lineno, azArg[1]);
      exit(1);
    }
    p->bSafeMode = 0;
    return 0;  /* Return immediately to bypass the safe mode reset
               ** at the end of this procedure */
  }else

  if( c=='n' && strncmp(azArg[0], "nullvalue", n)==0 ){
    if( nArg==2 ){
      sqlite3_snprintf(sizeof(p->nullValue), p->nullValue,
                       "%.*s", (int)ArraySize(p->nullValue)-1, azArg[1]);
    }else{
      raw_printf(stderr, "Usage: .nullvalue STRING\n");
19772
19773
19774
19775
19776
19777
19778
19779







19780
19781
19782
19783
19784
19785
19786
        goto meta_command_exit;
      }else{
        zNewFilename = sqlite3_mprintf("%s", z);
      }
    }
    /* If a filename is specified, try to open it first */
    if( zNewFilename || p->openMode==SHELL_OPEN_HEXDB ){
      if( newFlag ) shellDeleteFile(zNewFilename);







      p->pAuxDb->zDbFilename = zNewFilename;
      open_db(p, OPEN_DB_KEEPALIVE);
      if( p->db==0 ){
        utf8_printf(stderr, "Error: cannot open '%s'\n", zNewFilename);
        sqlite3_free(zNewFilename);
      }else{
        p->pAuxDb->zFreeOnClose = zNewFilename;







|
>
>
>
>
>
>
>







19866
19867
19868
19869
19870
19871
19872
19873
19874
19875
19876
19877
19878
19879
19880
19881
19882
19883
19884
19885
19886
19887
        goto meta_command_exit;
      }else{
        zNewFilename = sqlite3_mprintf("%s", z);
      }
    }
    /* If a filename is specified, try to open it first */
    if( zNewFilename || p->openMode==SHELL_OPEN_HEXDB ){
      if( newFlag && !p->bSafeMode ) shellDeleteFile(zNewFilename);
      if( p->bSafeMode
       && p->openMode!=SHELL_OPEN_HEXDB
       && zNewFilename
       && strcmp(zNewFilename,":memory:")!=0
      ){
        failIfSafeMode(p, "cannot open disk-based database files in safe mode");
      }
      p->pAuxDb->zDbFilename = zNewFilename;
      open_db(p, OPEN_DB_KEEPALIVE);
      if( p->db==0 ){
        utf8_printf(stderr, "Error: cannot open '%s'\n", zNewFilename);
        sqlite3_free(zNewFilename);
      }else{
        p->pAuxDb->zFreeOnClose = zNewFilename;
19800
19801
19802
19803
19804
19805
19806

19807
19808
19809
19810
19811
19812
19813
    char *zFile = 0;
    int bTxtMode = 0;
    int i;
    int eMode = 0;
    int bBOM = 0;
    int bOnce = 0;  /* 0: .output, 1: .once, 2: .excel */


    if( c=='e' ){
      eMode = 'x';
      bOnce = 2;
    }else if( strncmp(azArg[0],"once",n)==0 ){
      bOnce = 1;
    }
    for(i=1; i<nArg; i++){







>







19901
19902
19903
19904
19905
19906
19907
19908
19909
19910
19911
19912
19913
19914
19915
    char *zFile = 0;
    int bTxtMode = 0;
    int i;
    int eMode = 0;
    int bBOM = 0;
    int bOnce = 0;  /* 0: .output, 1: .once, 2: .excel */

    failIfSafeMode(p, "cannot run .%s in safe mode", azArg[0]);
    if( c=='e' ){
      eMode = 'x';
      bOnce = 2;
    }else if( strncmp(azArg[0],"once",n)==0 ){
      bOnce = 1;
    }
    for(i=1; i<nArg; i++){
20072
20073
20074
20075
20076
20077
20078

20079
20080
20081
20082
20083
20084
20085
  if( c=='q' && strncmp(azArg[0], "quit", n)==0 ){
    rc = 2;
  }else

  if( c=='r' && n>=3 && strncmp(azArg[0], "read", n)==0 ){
    FILE *inSaved = p->in;
    int savedLineno = p->lineno;

    if( nArg!=2 ){
      raw_printf(stderr, "Usage: .read FILE\n");
      rc = 1;
      goto meta_command_exit;
    }
    if( azArg[1][0]=='|' ){
#ifdef SQLITE_OMIT_POPEN







>







20174
20175
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
  if( c=='q' && strncmp(azArg[0], "quit", n)==0 ){
    rc = 2;
  }else

  if( c=='r' && n>=3 && strncmp(azArg[0], "read", n)==0 ){
    FILE *inSaved = p->in;
    int savedLineno = p->lineno;
    failIfSafeMode(p, "cannot run .read in safe mode");
    if( nArg!=2 ){
      raw_printf(stderr, "Usage: .read FILE\n");
      rc = 1;
      goto meta_command_exit;
    }
    if( azArg[1][0]=='|' ){
#ifdef SQLITE_OMIT_POPEN
20110
20111
20112
20113
20114
20115
20116

20117
20118
20119
20120
20121
20122
20123
  if( c=='r' && n>=3 && strncmp(azArg[0], "restore", n)==0 ){
    const char *zSrcFile;
    const char *zDb;
    sqlite3 *pSrc;
    sqlite3_backup *pBackup;
    int nTimeout = 0;


    if( nArg==2 ){
      zSrcFile = azArg[1];
      zDb = "main";
    }else if( nArg==3 ){
      zSrcFile = azArg[2];
      zDb = azArg[1];
    }else{







>







20213
20214
20215
20216
20217
20218
20219
20220
20221
20222
20223
20224
20225
20226
20227
  if( c=='r' && n>=3 && strncmp(azArg[0], "restore", n)==0 ){
    const char *zSrcFile;
    const char *zDb;
    sqlite3 *pSrc;
    sqlite3_backup *pBackup;
    int nTimeout = 0;

    failIfSafeMode(p, "cannot run .restore in safe mode");
    if( nArg==2 ){
      zSrcFile = azArg[1];
      zDb = "main";
    }else if( nArg==3 ){
      zSrcFile = azArg[2];
      zDb = azArg[1];
    }else{
20359
20360
20361
20362
20363
20364
20365

20366
20367
20368
20369
20370
20371
20372

    /* .session changeset FILE
    ** .session patchset FILE
    ** Write a changeset or patchset into a file.  The file is overwritten.
    */
    if( strcmp(azCmd[0],"changeset")==0 || strcmp(azCmd[0],"patchset")==0 ){
      FILE *out = 0;

      if( nCmd!=2 ) goto session_syntax_error;
      if( pSession->p==0 ) goto session_not_open;
      out = fopen(azCmd[1], "wb");
      if( out==0 ){
        utf8_printf(stderr, "ERROR: cannot open \"%s\" for writing\n",
                    azCmd[1]);
      }else{







>







20463
20464
20465
20466
20467
20468
20469
20470
20471
20472
20473
20474
20475
20476
20477

    /* .session changeset FILE
    ** .session patchset FILE
    ** Write a changeset or patchset into a file.  The file is overwritten.
    */
    if( strcmp(azCmd[0],"changeset")==0 || strcmp(azCmd[0],"patchset")==0 ){
      FILE *out = 0;
      failIfSafeMode(p, "cannot run \".session %s\" in safe mode", azCmd[0]);
      if( nCmd!=2 ) goto session_syntax_error;
      if( pSession->p==0 ) goto session_not_open;
      out = fopen(azCmd[1], "wb");
      if( out==0 ){
        utf8_printf(stderr, "ERROR: cannot open \"%s\" for writing\n",
                    azCmd[1]);
      }else{
20773
20774
20775
20776
20777
20778
20779

20780
20781
20782
20783
20784
20785
20786

#ifndef SQLITE_NOHAVE_SYSTEM
  if( c=='s'
   && (strncmp(azArg[0], "shell", n)==0 || strncmp(azArg[0],"system",n)==0)
  ){
    char *zCmd;
    int i, x;

    if( nArg<2 ){
      raw_printf(stderr, "Usage: .system COMMAND\n");
      rc = 1;
      goto meta_command_exit;
    }
    zCmd = sqlite3_mprintf(strchr(azArg[1],' ')==0?"%s":"\"%s\"", azArg[1]);
    for(i=2; i<nArg; i++){







>







20878
20879
20880
20881
20882
20883
20884
20885
20886
20887
20888
20889
20890
20891
20892

#ifndef SQLITE_NOHAVE_SYSTEM
  if( c=='s'
   && (strncmp(azArg[0], "shell", n)==0 || strncmp(azArg[0],"system",n)==0)
  ){
    char *zCmd;
    int i, x;
    failIfSafeMode(p, "cannot run .%s in safe mode", azArg[0]);
    if( nArg<2 ){
      raw_printf(stderr, "Usage: .system COMMAND\n");
      rc = 1;
      goto meta_command_exit;
    }
    zCmd = sqlite3_mprintf(strchr(azArg[1],' ')==0?"%s":"\"%s\"", azArg[1]);
    for(i=2; i<nArg; i++){
21444
21445
21446
21447
21448
21449
21450

21451
21452
21453
21454
21455
21456
21457
  }

meta_command_exit:
  if( p->outCount ){
    p->outCount--;
    if( p->outCount==0 ) output_reset(p);
  }

  return rc;
}

/*
** Return TRUE if a semicolon occurs anywhere in the first N characters
** of string z[].
*/







>







21550
21551
21552
21553
21554
21555
21556
21557
21558
21559
21560
21561
21562
21563
21564
  }

meta_command_exit:
  if( p->outCount ){
    p->outCount--;
    if( p->outCount==0 ) output_reset(p);
  }
  p->bSafeMode = p->bSafeModePersist;
  return rc;
}

/*
** Return TRUE if a semicolon occurs anywhere in the first N characters
** of string z[].
*/
21641
21642
21643
21644
21645
21646
21647

21648
21649
21650
21651
21652
21653
21654
      nSql = 0;
      if( p->outCount ){
        output_reset(p);
        p->outCount = 0;
      }else{
        clearTempFile(p);
      }

    }else if( nSql && _all_whitespace(zSql) ){
      if( ShellHasFlag(p, SHFLG_Echo) ) printf("%s\n", zSql);
      nSql = 0;
    }
  }
  if( nSql && !_all_whitespace(zSql) ){
    errCnt += runOneSqlLine(p, zSql, p->in, startline);







>







21748
21749
21750
21751
21752
21753
21754
21755
21756
21757
21758
21759
21760
21761
21762
      nSql = 0;
      if( p->outCount ){
        output_reset(p);
        p->outCount = 0;
      }else{
        clearTempFile(p);
      }
      p->bSafeMode = p->bSafeModePersist;
    }else if( nSql && _all_whitespace(zSql) ){
      if( ShellHasFlag(p, SHFLG_Echo) ) printf("%s\n", zSql);
      nSql = 0;
    }
  }
  if( nSql && !_all_whitespace(zSql) ){
    errCnt += runOneSqlLine(p, zSql, p->in, startline);
21807
21808
21809
21810
21811
21812
21813

21814
21815
21816
21817

21818
21819
21820
21821
21822
21823
21824
  "   -memtrace            trace all memory allocations and deallocations\n"
  "   -mmap N              default mmap size set to N\n"
#ifdef SQLITE_ENABLE_MULTIPLEX
  "   -multiplex           enable the multiplexor VFS\n"
#endif
  "   -newline SEP         set output row separator. Default: '\\n'\n"
  "   -nofollow            refuse to open symbolic links to database files\n"

  "   -nullvalue TEXT      set text string for NULL values. Default ''\n"
  "   -pagecache SIZE N    use N slots of SZ bytes each for page cache memory\n"
  "   -quote               set output mode to 'quote'\n"
  "   -readonly            open the database read-only\n"

  "   -separator SEP       set output column separator. Default: '|'\n"
#ifdef SQLITE_ENABLE_SORTER_REFERENCES
  "   -sorterref SIZE      sorter references threshold size\n"
#endif
  "   -stats               print memory stats before each finalize\n"
  "   -table               set output mode to 'table'\n"
  "   -tabs                set output mode to 'tabs'\n"







>




>







21915
21916
21917
21918
21919
21920
21921
21922
21923
21924
21925
21926
21927
21928
21929
21930
21931
21932
21933
21934
  "   -memtrace            trace all memory allocations and deallocations\n"
  "   -mmap N              default mmap size set to N\n"
#ifdef SQLITE_ENABLE_MULTIPLEX
  "   -multiplex           enable the multiplexor VFS\n"
#endif
  "   -newline SEP         set output row separator. Default: '\\n'\n"
  "   -nofollow            refuse to open symbolic links to database files\n"
  "   -nonce STRING        set the safe-mode escape nonce\n"
  "   -nullvalue TEXT      set text string for NULL values. Default ''\n"
  "   -pagecache SIZE N    use N slots of SZ bytes each for page cache memory\n"
  "   -quote               set output mode to 'quote'\n"
  "   -readonly            open the database read-only\n"
  "   -safe                enable safe-mode\n"
  "   -separator SEP       set output column separator. Default: '|'\n"
#ifdef SQLITE_ENABLE_SORTER_REFERENCES
  "   -sorterref SIZE      sorter references threshold size\n"
#endif
  "   -stats               print memory stats before each finalize\n"
  "   -table               set output mode to 'table'\n"
  "   -tabs                set output mode to 'tabs'\n"
22096
22097
22098
22099
22100
22101
22102








22103
22104
22105
22106
22107
22108
22109
      int n, sz;
      sz = (int)integerValue(cmdline_option_value(argc,argv,++i));
      if( sz<0 ) sz = 0;
      n = (int)integerValue(cmdline_option_value(argc,argv,++i));
      if( n<0 ) n = 0;
      sqlite3_config(SQLITE_CONFIG_LOOKASIDE, sz, n);
      if( sz*n==0 ) data.shellFlgs &= ~SHFLG_Lookaside;








#ifdef SQLITE_ENABLE_VFSTRACE
    }else if( strcmp(z,"-vfstrace")==0 ){
      extern int vfstrace_register(
         const char *zTraceName,
         const char *zOldVfsName,
         int (*xOut)(const char*,void*),
         void *pOutArg,







>
>
>
>
>
>
>
>







22206
22207
22208
22209
22210
22211
22212
22213
22214
22215
22216
22217
22218
22219
22220
22221
22222
22223
22224
22225
22226
22227
      int n, sz;
      sz = (int)integerValue(cmdline_option_value(argc,argv,++i));
      if( sz<0 ) sz = 0;
      n = (int)integerValue(cmdline_option_value(argc,argv,++i));
      if( n<0 ) n = 0;
      sqlite3_config(SQLITE_CONFIG_LOOKASIDE, sz, n);
      if( sz*n==0 ) data.shellFlgs &= ~SHFLG_Lookaside;
    }else if( strcmp(z,"-threadsafe")==0 ){
      int n;
      n = (int)integerValue(cmdline_option_value(argc,argv,++i));
      switch( n ){
         case 0:  sqlite3_config(SQLITE_CONFIG_SINGLETHREAD);  break;
         case 2:  sqlite3_config(SQLITE_CONFIG_MULTITHREAD);   break;
         default: sqlite3_config(SQLITE_CONFIG_SERIALIZED);    break;
      }
#ifdef SQLITE_ENABLE_VFSTRACE
    }else if( strcmp(z,"-vfstrace")==0 ){
      extern int vfstrace_register(
         const char *zTraceName,
         const char *zOldVfsName,
         int (*xOut)(const char*,void*),
         void *pOutArg,
22148
22149
22150
22151
22152
22153
22154





22155
22156
22157
22158
22159
22160
22161
      ** command, so ignore them */
      break;
#endif
    }else if( strcmp(z, "-memtrace")==0 ){
      sqlite3MemTraceActivate(stderr);
    }else if( strcmp(z,"-bail")==0 ){
      bail_on_error = 1;





    }
  }
  verify_uninitialized();


#ifdef SQLITE_SHELL_INIT_PROC
  {







>
>
>
>
>







22266
22267
22268
22269
22270
22271
22272
22273
22274
22275
22276
22277
22278
22279
22280
22281
22282
22283
22284
      ** command, so ignore them */
      break;
#endif
    }else if( strcmp(z, "-memtrace")==0 ){
      sqlite3MemTraceActivate(stderr);
    }else if( strcmp(z,"-bail")==0 ){
      bail_on_error = 1;
    }else if( strcmp(z,"-nonce")==0 ){
      free(data.zNonce);
      data.zNonce = strdup(argv[++i]);
    }else if( strcmp(z,"-safe")==0 ){
      /* no-op - catch this on the second pass */
    }
  }
  verify_uninitialized();


#ifdef SQLITE_SHELL_INIT_PROC
  {
22308
22309
22310
22311
22312
22313
22314




22315
22316
22317
22318
22319
22320
22321
      stdin_is_interactive = 0;
    }else if( strcmp(z,"-heap")==0 ){
      i++;
    }else if( strcmp(z,"-pagecache")==0 ){
      i+=2;
    }else if( strcmp(z,"-lookaside")==0 ){
      i+=2;




    }else if( strcmp(z,"-mmap")==0 ){
      i++;
    }else if( strcmp(z,"-memtrace")==0 ){
      i++;
#ifdef SQLITE_ENABLE_SORTER_REFERENCES
    }else if( strcmp(z,"-sorterref")==0 ){
      i++;







>
>
>
>







22431
22432
22433
22434
22435
22436
22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448
      stdin_is_interactive = 0;
    }else if( strcmp(z,"-heap")==0 ){
      i++;
    }else if( strcmp(z,"-pagecache")==0 ){
      i+=2;
    }else if( strcmp(z,"-lookaside")==0 ){
      i+=2;
    }else if( strcmp(z,"-threadsafe")==0 ){
      i+=2;
    }else if( strcmp(z,"-nonce")==0 ){
      i += 2;
    }else if( strcmp(z,"-mmap")==0 ){
      i++;
    }else if( strcmp(z,"-memtrace")==0 ){
      i++;
#ifdef SQLITE_ENABLE_SORTER_REFERENCES
    }else if( strcmp(z,"-sorterref")==0 ){
      i++;
22366
22367
22368
22369
22370
22371
22372


22373
22374
22375
22376
22377
22378
22379
        arDotCommand(&data, 1, argv+(i-1), argc-(i-1));
      }else{
        arDotCommand(&data, 1, argv+i, argc-i);
      }
      readStdin = 0;
      break;
#endif


    }else{
      utf8_printf(stderr,"%s: Error: unknown option: %s\n", Argv0, z);
      raw_printf(stderr,"Use -help for a list of options.\n");
      return 1;
    }
    data.cMode = data.mode;
  }







>
>







22493
22494
22495
22496
22497
22498
22499
22500
22501
22502
22503
22504
22505
22506
22507
22508
        arDotCommand(&data, 1, argv+(i-1), argc-(i-1));
      }else{
        arDotCommand(&data, 1, argv+i, argc-i);
      }
      readStdin = 0;
      break;
#endif
    }else if( strcmp(z,"-safe")==0 ){
      data.bSafeMode = data.bSafeModePersist = 1;
    }else{
      utf8_printf(stderr,"%s: Error: unknown option: %s\n", Argv0, z);
      raw_printf(stderr,"Use -help for a list of options.\n");
      return 1;
    }
    data.cMode = data.mode;
  }
22468
22469
22470
22471
22472
22473
22474

22475
22476
22477
22478
22479
  data.doXdgOpen = 0;
  clearTempFile(&data);
#if !SQLITE_SHELL_IS_UTF8
  for(i=0; i<argcToFree; i++) free(argvToFree[i]);
  free(argvToFree);
#endif
  free(data.colWidth);

  /* Clear the global data structure so that valgrind will detect memory
  ** leaks */
  memset(&data, 0, sizeof(data));
  return rc;
}







>





22597
22598
22599
22600
22601
22602
22603
22604
22605
22606
22607
22608
22609
  data.doXdgOpen = 0;
  clearTempFile(&data);
#if !SQLITE_SHELL_IS_UTF8
  for(i=0; i<argcToFree; i++) free(argvToFree[i]);
  free(argvToFree);
#endif
  free(data.colWidth);
  free(data.zNonce);
  /* Clear the global data structure so that valgrind will detect memory
  ** leaks */
  memset(&data, 0, sizeof(data));
  return rc;
}
Changes to src/sqlite3.c.
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
**
** See also: [sqlite3_libversion()],
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
#define SQLITE_VERSION        "3.37.0"
#define SQLITE_VERSION_NUMBER 3037000
#define SQLITE_SOURCE_ID      "2021-08-06 20:17:39 087b8b41c6ed76b55c11315e7e95679d67590be20ae21108b593d00bb7d1c57a"

/*
** CAPI3REF: Run-Time Library Version Numbers
** KEYWORDS: sqlite3_version sqlite3_sourceid
**
** These interfaces provide the same information as the [SQLITE_VERSION],
** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros







|







450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
**
** See also: [sqlite3_libversion()],
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
#define SQLITE_VERSION        "3.37.0"
#define SQLITE_VERSION_NUMBER 3037000
#define SQLITE_SOURCE_ID      "2021-09-06 11:44:19 b3cfe23bec0b95ca673802526704200e2396df715fdded72aa71addd7f47e0e1"

/*
** CAPI3REF: Run-Time Library Version Numbers
** KEYWORDS: sqlite3_version sqlite3_sourceid
**
** These interfaces provide the same information as the [SQLITE_VERSION],
** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros
863
864
865
866
867
868
869

870
871
872
873
874
875
876
#define SQLITE_CONSTRAINT_NOTNULL      (SQLITE_CONSTRAINT | (5<<8))
#define SQLITE_CONSTRAINT_PRIMARYKEY   (SQLITE_CONSTRAINT | (6<<8))
#define SQLITE_CONSTRAINT_TRIGGER      (SQLITE_CONSTRAINT | (7<<8))
#define SQLITE_CONSTRAINT_UNIQUE       (SQLITE_CONSTRAINT | (8<<8))
#define SQLITE_CONSTRAINT_VTAB         (SQLITE_CONSTRAINT | (9<<8))
#define SQLITE_CONSTRAINT_ROWID        (SQLITE_CONSTRAINT |(10<<8))
#define SQLITE_CONSTRAINT_PINNED       (SQLITE_CONSTRAINT |(11<<8))

#define SQLITE_NOTICE_RECOVER_WAL      (SQLITE_NOTICE | (1<<8))
#define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8))
#define SQLITE_WARNING_AUTOINDEX       (SQLITE_WARNING | (1<<8))
#define SQLITE_AUTH_USER               (SQLITE_AUTH | (1<<8))
#define SQLITE_OK_LOAD_PERMANENTLY     (SQLITE_OK | (1<<8))
#define SQLITE_OK_SYMLINK              (SQLITE_OK | (2<<8))








>







863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
#define SQLITE_CONSTRAINT_NOTNULL      (SQLITE_CONSTRAINT | (5<<8))
#define SQLITE_CONSTRAINT_PRIMARYKEY   (SQLITE_CONSTRAINT | (6<<8))
#define SQLITE_CONSTRAINT_TRIGGER      (SQLITE_CONSTRAINT | (7<<8))
#define SQLITE_CONSTRAINT_UNIQUE       (SQLITE_CONSTRAINT | (8<<8))
#define SQLITE_CONSTRAINT_VTAB         (SQLITE_CONSTRAINT | (9<<8))
#define SQLITE_CONSTRAINT_ROWID        (SQLITE_CONSTRAINT |(10<<8))
#define SQLITE_CONSTRAINT_PINNED       (SQLITE_CONSTRAINT |(11<<8))
#define SQLITE_CONSTRAINT_DATATYPE     (SQLITE_CONSTRAINT |(12<<8))
#define SQLITE_NOTICE_RECOVER_WAL      (SQLITE_NOTICE | (1<<8))
#define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8))
#define SQLITE_WARNING_AUTOINDEX       (SQLITE_WARNING | (1<<8))
#define SQLITE_AUTH_USER               (SQLITE_AUTH | (1<<8))
#define SQLITE_OK_LOAD_PERMANENTLY     (SQLITE_OK | (1<<8))
#define SQLITE_OK_SYMLINK              (SQLITE_OK | (2<<8))

13444
13445
13446
13447
13448
13449
13450
13451
13452

13453
13454
13455
13456
13457
13458
13459
#define TK_IF                              18
#define TK_NOT                             19
#define TK_EXISTS                          20
#define TK_TEMP                            21
#define TK_LP                              22
#define TK_RP                              23
#define TK_AS                              24
#define TK_WITHOUT                         25
#define TK_COMMA                           26

#define TK_ABORT                           27
#define TK_ACTION                          28
#define TK_AFTER                           29
#define TK_ANALYZE                         30
#define TK_ASC                             31
#define TK_ATTACH                          32
#define TK_BEFORE                          33







<
|
>







13445
13446
13447
13448
13449
13450
13451

13452
13453
13454
13455
13456
13457
13458
13459
13460
#define TK_IF                              18
#define TK_NOT                             19
#define TK_EXISTS                          20
#define TK_TEMP                            21
#define TK_LP                              22
#define TK_RP                              23
#define TK_AS                              24

#define TK_COMMA                           25
#define TK_WITHOUT                         26
#define TK_ABORT                           27
#define TK_ACTION                          28
#define TK_AFTER                           29
#define TK_ANALYZE                         30
#define TK_ASC                             31
#define TK_ATTACH                          32
#define TK_BEFORE                          33
15107
15108
15109
15110
15111
15112
15113

15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137

15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151

15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184

15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209


15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245


15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
#define OP_Yield          14 /* jump                                       */
#define OP_MustBeInt      15 /* jump                                       */
#define OP_Jump           16 /* jump                                       */
#define OP_Once           17 /* jump                                       */
#define OP_If             18 /* jump                                       */
#define OP_Not            19 /* same as TK_NOT, synopsis: r[P2]= !r[P1]    */
#define OP_IfNot          20 /* jump                                       */

#define OP_IfNullRow      21 /* jump, synopsis: if P1.nullRow then r[P3]=NULL, goto P2 */
#define OP_SeekLT         22 /* jump, synopsis: key=r[P3@P4]               */
#define OP_SeekLE         23 /* jump, synopsis: key=r[P3@P4]               */
#define OP_SeekGE         24 /* jump, synopsis: key=r[P3@P4]               */
#define OP_SeekGT         25 /* jump, synopsis: key=r[P3@P4]               */
#define OP_IfNotOpen      26 /* jump, synopsis: if( !csr[P1] ) goto P2     */
#define OP_IfNoHope       27 /* jump, synopsis: key=r[P3@P4]               */
#define OP_NoConflict     28 /* jump, synopsis: key=r[P3@P4]               */
#define OP_NotFound       29 /* jump, synopsis: key=r[P3@P4]               */
#define OP_Found          30 /* jump, synopsis: key=r[P3@P4]               */
#define OP_SeekRowid      31 /* jump, synopsis: intkey=r[P3]               */
#define OP_NotExists      32 /* jump, synopsis: intkey=r[P3]               */
#define OP_Last           33 /* jump                                       */
#define OP_IfSmaller      34 /* jump                                       */
#define OP_SorterSort     35 /* jump                                       */
#define OP_Sort           36 /* jump                                       */
#define OP_Rewind         37 /* jump                                       */
#define OP_IdxLE          38 /* jump, synopsis: key=r[P3@P4]               */
#define OP_IdxGT          39 /* jump, synopsis: key=r[P3@P4]               */
#define OP_IdxLT          40 /* jump, synopsis: key=r[P3@P4]               */
#define OP_IdxGE          41 /* jump, synopsis: key=r[P3@P4]               */
#define OP_RowSetRead     42 /* jump, synopsis: r[P3]=rowset(P1)           */
#define OP_Or             43 /* same as TK_OR, synopsis: r[P3]=(r[P1] || r[P2]) */
#define OP_And            44 /* same as TK_AND, synopsis: r[P3]=(r[P1] && r[P2]) */

#define OP_RowSetTest     45 /* jump, synopsis: if r[P3] in rowset(P1) goto P2 */
#define OP_Program        46 /* jump                                       */
#define OP_FkIfZero       47 /* jump, synopsis: if fkctr[P1]==0 goto P2    */
#define OP_IfPos          48 /* jump, synopsis: if r[P1]>0 then r[P1]-=P3, goto P2 */
#define OP_IfNotZero      49 /* jump, synopsis: if r[P1]!=0 then r[P1]--, goto P2 */
#define OP_IsNull         50 /* jump, same as TK_ISNULL, synopsis: if r[P1]==NULL goto P2 */
#define OP_NotNull        51 /* jump, same as TK_NOTNULL, synopsis: if r[P1]!=NULL goto P2 */
#define OP_Ne             52 /* jump, same as TK_NE, synopsis: IF r[P3]!=r[P1] */
#define OP_Eq             53 /* jump, same as TK_EQ, synopsis: IF r[P3]==r[P1] */
#define OP_Gt             54 /* jump, same as TK_GT, synopsis: IF r[P3]>r[P1] */
#define OP_Le             55 /* jump, same as TK_LE, synopsis: IF r[P3]<=r[P1] */
#define OP_Lt             56 /* jump, same as TK_LT, synopsis: IF r[P3]<r[P1] */
#define OP_Ge             57 /* jump, same as TK_GE, synopsis: IF r[P3]>=r[P1] */
#define OP_ElseEq         58 /* jump, same as TK_ESCAPE                    */

#define OP_DecrJumpZero   59 /* jump, synopsis: if (--r[P1])==0 goto P2    */
#define OP_IncrVacuum     60 /* jump                                       */
#define OP_VNext          61 /* jump                                       */
#define OP_Init           62 /* jump, synopsis: Start at P2                */
#define OP_PureFunc       63 /* synopsis: r[P3]=func(r[P2@NP])             */
#define OP_Function       64 /* synopsis: r[P3]=func(r[P2@NP])             */
#define OP_Return         65
#define OP_EndCoroutine   66
#define OP_HaltIfNull     67 /* synopsis: if r[P3]=null halt               */
#define OP_Halt           68
#define OP_Integer        69 /* synopsis: r[P2]=P1                         */
#define OP_Int64          70 /* synopsis: r[P2]=P4                         */
#define OP_String         71 /* synopsis: r[P2]='P4' (len=P1)              */
#define OP_Null           72 /* synopsis: r[P2..P3]=NULL                   */
#define OP_SoftNull       73 /* synopsis: r[P1]=NULL                       */
#define OP_Blob           74 /* synopsis: r[P2]=P4 (len=P1)                */
#define OP_Variable       75 /* synopsis: r[P2]=parameter(P1,P4)           */
#define OP_Move           76 /* synopsis: r[P2@P3]=r[P1@P3]                */
#define OP_Copy           77 /* synopsis: r[P2@P3+1]=r[P1@P3+1]            */
#define OP_SCopy          78 /* synopsis: r[P2]=r[P1]                      */
#define OP_IntCopy        79 /* synopsis: r[P2]=r[P1]                      */
#define OP_ChngCntRow     80 /* synopsis: output=r[P1]                     */
#define OP_ResultRow      81 /* synopsis: output=r[P1@P2]                  */
#define OP_CollSeq        82
#define OP_AddImm         83 /* synopsis: r[P1]=r[P1]+P2                   */
#define OP_RealAffinity   84
#define OP_Cast           85 /* synopsis: affinity(r[P1])                  */
#define OP_Permutation    86
#define OP_Compare        87 /* synopsis: r[P1@P3] <-> r[P2@P3]            */
#define OP_IsTrue         88 /* synopsis: r[P2] = coalesce(r[P1]==TRUE,P3) ^ P4 */
#define OP_ZeroOrNull     89 /* synopsis: r[P2] = 0 OR NULL                */
#define OP_Offset         90 /* synopsis: r[P3] = sqlite_offset(P1)        */
#define OP_Column         91 /* synopsis: r[P3]=PX                         */

#define OP_Affinity       92 /* synopsis: affinity(r[P1@P2])               */
#define OP_MakeRecord     93 /* synopsis: r[P3]=mkrec(r[P1@P2])            */
#define OP_Count          94 /* synopsis: r[P2]=count()                    */
#define OP_ReadCookie     95
#define OP_SetCookie      96
#define OP_ReopenIdx      97 /* synopsis: root=P2 iDb=P3                   */
#define OP_OpenRead       98 /* synopsis: root=P2 iDb=P3                   */
#define OP_OpenWrite      99 /* synopsis: root=P2 iDb=P3                   */
#define OP_OpenDup       100
#define OP_OpenAutoindex 101 /* synopsis: nColumn=P2                       */
#define OP_BitAnd        102 /* same as TK_BITAND, synopsis: r[P3]=r[P1]&r[P2] */
#define OP_BitOr         103 /* same as TK_BITOR, synopsis: r[P3]=r[P1]|r[P2] */
#define OP_ShiftLeft     104 /* same as TK_LSHIFT, synopsis: r[P3]=r[P2]<<r[P1] */
#define OP_ShiftRight    105 /* same as TK_RSHIFT, synopsis: r[P3]=r[P2]>>r[P1] */
#define OP_Add           106 /* same as TK_PLUS, synopsis: r[P3]=r[P1]+r[P2] */
#define OP_Subtract      107 /* same as TK_MINUS, synopsis: r[P3]=r[P2]-r[P1] */
#define OP_Multiply      108 /* same as TK_STAR, synopsis: r[P3]=r[P1]*r[P2] */
#define OP_Divide        109 /* same as TK_SLASH, synopsis: r[P3]=r[P2]/r[P1] */
#define OP_Remainder     110 /* same as TK_REM, synopsis: r[P3]=r[P2]%r[P1] */
#define OP_Concat        111 /* same as TK_CONCAT, synopsis: r[P3]=r[P2]+r[P1] */
#define OP_OpenEphemeral 112 /* synopsis: nColumn=P2                       */
#define OP_BitNot        113 /* same as TK_BITNOT, synopsis: r[P2]= ~r[P1] */
#define OP_SorterOpen    114
#define OP_SequenceTest  115 /* synopsis: if( cursor[P1].ctr++ ) pc = P2   */
#define OP_String8       116 /* same as TK_STRING, synopsis: r[P2]='P4'    */


#define OP_OpenPseudo    117 /* synopsis: P3 columns in r[P2]              */
#define OP_Close         118
#define OP_ColumnsUsed   119
#define OP_SeekScan      120 /* synopsis: Scan-ahead up to P1 rows         */
#define OP_SeekHit       121 /* synopsis: set P2<=seekHit<=P3              */
#define OP_Sequence      122 /* synopsis: r[P2]=cursor[P1].ctr++           */
#define OP_NewRowid      123 /* synopsis: r[P2]=rowid                      */
#define OP_Insert        124 /* synopsis: intkey=r[P3] data=r[P2]          */
#define OP_RowCell       125
#define OP_Delete        126
#define OP_ResetCount    127
#define OP_SorterCompare 128 /* synopsis: if key(P1)!=trim(r[P3],P4) goto P2 */
#define OP_SorterData    129 /* synopsis: r[P2]=data                       */
#define OP_RowData       130 /* synopsis: r[P2]=data                       */
#define OP_Rowid         131 /* synopsis: r[P2]=rowid                      */
#define OP_NullRow       132
#define OP_SeekEnd       133
#define OP_IdxInsert     134 /* synopsis: key=r[P2]                        */
#define OP_SorterInsert  135 /* synopsis: key=r[P2]                        */
#define OP_IdxDelete     136 /* synopsis: key=r[P2@P3]                     */
#define OP_DeferredSeek  137 /* synopsis: Move P3 to P1.rowid if needed    */
#define OP_IdxRowid      138 /* synopsis: r[P2]=rowid                      */
#define OP_FinishSeek    139
#define OP_Destroy       140
#define OP_Clear         141
#define OP_ResetSorter   142
#define OP_CreateBtree   143 /* synopsis: r[P2]=root iDb=P1 flags=P3       */
#define OP_SqlExec       144
#define OP_ParseSchema   145
#define OP_LoadAnalysis  146
#define OP_DropTable     147
#define OP_DropIndex     148
#define OP_DropTrigger   149
#define OP_IntegrityCk   150
#define OP_RowSetAdd     151 /* synopsis: rowset(P1)=r[P2]                 */
#define OP_Real          152 /* same as TK_FLOAT, synopsis: r[P2]=P4       */


#define OP_Param         153
#define OP_FkCounter     154 /* synopsis: fkctr[P1]+=P2                    */
#define OP_MemMax        155 /* synopsis: r[P1]=max(r[P1],r[P2])           */
#define OP_OffsetLimit   156 /* synopsis: if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1) */
#define OP_AggInverse    157 /* synopsis: accum=r[P3] inverse(r[P2@P5])    */
#define OP_AggStep       158 /* synopsis: accum=r[P3] step(r[P2@P5])       */
#define OP_AggStep1      159 /* synopsis: accum=r[P3] step(r[P2@P5])       */
#define OP_AggValue      160 /* synopsis: r[P3]=value N=P2                 */
#define OP_AggFinal      161 /* synopsis: accum=r[P1] N=P2                 */
#define OP_Expire        162
#define OP_CursorLock    163
#define OP_CursorUnlock  164
#define OP_TableLock     165 /* synopsis: iDb=P1 root=P2 write=P3          */
#define OP_VBegin        166
#define OP_VCreate       167
#define OP_VDestroy      168
#define OP_VOpen         169
#define OP_VColumn       170 /* synopsis: r[P3]=vcolumn(P2)                */
#define OP_VRename       171
#define OP_Pagecount     172
#define OP_MaxPgcnt      173
#define OP_Trace         174
#define OP_CursorHint    175
#define OP_ReleaseReg    176 /* synopsis: release r[P1@P2] mask P3         */
#define OP_Noop          177
#define OP_Explain       178
#define OP_Abortable     179

/* Properties such as "out2" or "jump" that are specified in
** comments following the "case" for each opcode in the vdbe.c
** are encoded into bitvectors as follows:
*/
#define OPFLG_JUMP        0x01  /* jump:  P2 holds jmp target */
#define OPFLG_IN1         0x02  /* in1:   P1 is an input */
#define OPFLG_IN2         0x04  /* in2:   P2 is an input */
#define OPFLG_IN3         0x08  /* in3:   P3 is an input */
#define OPFLG_OUT2        0x10  /* out2:  P2 is an output */
#define OPFLG_OUT3        0x20  /* out3:  P3 is an output */
#define OPFLG_INITIALIZER {\
/*   0 */ 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x10,\
/*   8 */ 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x03, 0x03,\
/*  16 */ 0x01, 0x01, 0x03, 0x12, 0x03, 0x01, 0x09, 0x09,\
/*  24 */ 0x09, 0x09, 0x01, 0x09, 0x09, 0x09, 0x09, 0x09,\
/*  32 */ 0x09, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\
/*  40 */ 0x01, 0x01, 0x23, 0x26, 0x26, 0x0b, 0x01, 0x01,\
/*  48 */ 0x03, 0x03, 0x03, 0x03, 0x0b, 0x0b, 0x0b, 0x0b,\
/*  56 */ 0x0b, 0x0b, 0x01, 0x03, 0x01, 0x01, 0x01, 0x00,\
/*  64 */ 0x00, 0x02, 0x02, 0x08, 0x00, 0x10, 0x10, 0x10,\
/*  72 */ 0x10, 0x00, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10,\
/*  80 */ 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x00, 0x00,\
/*  88 */ 0x12, 0x1e, 0x20, 0x00, 0x00, 0x00, 0x10, 0x10,\
/*  96 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x26,\
/* 104 */ 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26,\
/* 112 */ 0x00, 0x12, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,\
/* 120 */ 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00,\
/* 128 */ 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x04, 0x04,\
/* 136 */ 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x10,\
/* 144 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,\
/* 152 */ 0x10, 0x10, 0x00, 0x04, 0x1a, 0x00, 0x00, 0x00,\
/* 160 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
/* 168 */ 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,\
/* 176 */ 0x00, 0x00, 0x00, 0x00,}

/* The resolve3P2Values() routine is able to run faster if it knows
** the value of the largest JUMP opcode.  The smaller the maximum
** JUMP opcode the better, so the mkopcodeh.tcl script that
** generated this include file strives to group all JUMP opcodes
** together near the beginning of the list.
*/
#define SQLITE_MX_JUMP_OPCODE  62  /* Maximum JUMP opcode */

/************** End of opcodes.h *********************************************/
/************** Continuing where we left off in vdbe.h ***********************/

/*
** Additional non-public SQLITE_PREPARE_* flags
*/







>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<


>
|
|
|
|
<









>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<
<










|

|
|

>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<

>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|














|
|
|
|
|
|
|
|
|
|
|


|
|
|
|
|

|
|







|







15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136

15137
15138
15139
15140
15141
15142
15143

15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195


15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245


15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
#define OP_Yield          14 /* jump                                       */
#define OP_MustBeInt      15 /* jump                                       */
#define OP_Jump           16 /* jump                                       */
#define OP_Once           17 /* jump                                       */
#define OP_If             18 /* jump                                       */
#define OP_Not            19 /* same as TK_NOT, synopsis: r[P2]= !r[P1]    */
#define OP_IfNot          20 /* jump                                       */
#define OP_IsNullOrType   21 /* jump, synopsis: if typeof(r[P1]) IN (P3,5) goto P2 */
#define OP_IfNullRow      22 /* jump, synopsis: if P1.nullRow then r[P3]=NULL, goto P2 */
#define OP_SeekLT         23 /* jump, synopsis: key=r[P3@P4]               */
#define OP_SeekLE         24 /* jump, synopsis: key=r[P3@P4]               */
#define OP_SeekGE         25 /* jump, synopsis: key=r[P3@P4]               */
#define OP_SeekGT         26 /* jump, synopsis: key=r[P3@P4]               */
#define OP_IfNotOpen      27 /* jump, synopsis: if( !csr[P1] ) goto P2     */
#define OP_IfNoHope       28 /* jump, synopsis: key=r[P3@P4]               */
#define OP_NoConflict     29 /* jump, synopsis: key=r[P3@P4]               */
#define OP_NotFound       30 /* jump, synopsis: key=r[P3@P4]               */
#define OP_Found          31 /* jump, synopsis: key=r[P3@P4]               */
#define OP_SeekRowid      32 /* jump, synopsis: intkey=r[P3]               */
#define OP_NotExists      33 /* jump, synopsis: intkey=r[P3]               */
#define OP_Last           34 /* jump                                       */
#define OP_IfSmaller      35 /* jump                                       */
#define OP_SorterSort     36 /* jump                                       */
#define OP_Sort           37 /* jump                                       */
#define OP_Rewind         38 /* jump                                       */
#define OP_IdxLE          39 /* jump, synopsis: key=r[P3@P4]               */
#define OP_IdxGT          40 /* jump, synopsis: key=r[P3@P4]               */
#define OP_IdxLT          41 /* jump, synopsis: key=r[P3@P4]               */
#define OP_IdxGE          42 /* jump, synopsis: key=r[P3@P4]               */

#define OP_Or             43 /* same as TK_OR, synopsis: r[P3]=(r[P1] || r[P2]) */
#define OP_And            44 /* same as TK_AND, synopsis: r[P3]=(r[P1] && r[P2]) */
#define OP_RowSetRead     45 /* jump, synopsis: r[P3]=rowset(P1)           */
#define OP_RowSetTest     46 /* jump, synopsis: if r[P3] in rowset(P1) goto P2 */
#define OP_Program        47 /* jump                                       */
#define OP_FkIfZero       48 /* jump, synopsis: if fkctr[P1]==0 goto P2    */
#define OP_IfPos          49 /* jump, synopsis: if r[P1]>0 then r[P1]-=P3, goto P2 */

#define OP_IsNull         50 /* jump, same as TK_ISNULL, synopsis: if r[P1]==NULL goto P2 */
#define OP_NotNull        51 /* jump, same as TK_NOTNULL, synopsis: if r[P1]!=NULL goto P2 */
#define OP_Ne             52 /* jump, same as TK_NE, synopsis: IF r[P3]!=r[P1] */
#define OP_Eq             53 /* jump, same as TK_EQ, synopsis: IF r[P3]==r[P1] */
#define OP_Gt             54 /* jump, same as TK_GT, synopsis: IF r[P3]>r[P1] */
#define OP_Le             55 /* jump, same as TK_LE, synopsis: IF r[P3]<=r[P1] */
#define OP_Lt             56 /* jump, same as TK_LT, synopsis: IF r[P3]<r[P1] */
#define OP_Ge             57 /* jump, same as TK_GE, synopsis: IF r[P3]>=r[P1] */
#define OP_ElseEq         58 /* jump, same as TK_ESCAPE                    */
#define OP_IfNotZero      59 /* jump, synopsis: if r[P1]!=0 then r[P1]--, goto P2 */
#define OP_DecrJumpZero   60 /* jump, synopsis: if (--r[P1])==0 goto P2    */
#define OP_IncrVacuum     61 /* jump                                       */
#define OP_VNext          62 /* jump                                       */
#define OP_Init           63 /* jump, synopsis: Start at P2                */
#define OP_PureFunc       64 /* synopsis: r[P3]=func(r[P2@NP])             */
#define OP_Function       65 /* synopsis: r[P3]=func(r[P2@NP])             */
#define OP_Return         66
#define OP_EndCoroutine   67
#define OP_HaltIfNull     68 /* synopsis: if r[P3]=null halt               */
#define OP_Halt           69
#define OP_Integer        70 /* synopsis: r[P2]=P1                         */
#define OP_Int64          71 /* synopsis: r[P2]=P4                         */
#define OP_String         72 /* synopsis: r[P2]='P4' (len=P1)              */
#define OP_Null           73 /* synopsis: r[P2..P3]=NULL                   */
#define OP_SoftNull       74 /* synopsis: r[P1]=NULL                       */
#define OP_Blob           75 /* synopsis: r[P2]=P4 (len=P1)                */
#define OP_Variable       76 /* synopsis: r[P2]=parameter(P1,P4)           */
#define OP_Move           77 /* synopsis: r[P2@P3]=r[P1@P3]                */
#define OP_Copy           78 /* synopsis: r[P2@P3+1]=r[P1@P3+1]            */
#define OP_SCopy          79 /* synopsis: r[P2]=r[P1]                      */
#define OP_IntCopy        80 /* synopsis: r[P2]=r[P1]                      */
#define OP_ChngCntRow     81 /* synopsis: output=r[P1]                     */
#define OP_ResultRow      82 /* synopsis: output=r[P1@P2]                  */
#define OP_CollSeq        83
#define OP_AddImm         84 /* synopsis: r[P1]=r[P1]+P2                   */
#define OP_RealAffinity   85
#define OP_Cast           86 /* synopsis: affinity(r[P1])                  */
#define OP_Permutation    87
#define OP_Compare        88 /* synopsis: r[P1@P3] <-> r[P2@P3]            */
#define OP_IsTrue         89 /* synopsis: r[P2] = coalesce(r[P1]==TRUE,P3) ^ P4 */
#define OP_ZeroOrNull     90 /* synopsis: r[P2] = 0 OR NULL                */
#define OP_Offset         91 /* synopsis: r[P3] = sqlite_offset(P1)        */
#define OP_Column         92 /* synopsis: r[P3]=PX                         */
#define OP_TypeCheck      93 /* synopsis: typecheck(r[P1@P2])              */
#define OP_Affinity       94 /* synopsis: affinity(r[P1@P2])               */
#define OP_MakeRecord     95 /* synopsis: r[P3]=mkrec(r[P1@P2])            */
#define OP_Count          96 /* synopsis: r[P2]=count()                    */
#define OP_ReadCookie     97
#define OP_SetCookie      98
#define OP_ReopenIdx      99 /* synopsis: root=P2 iDb=P3                   */
#define OP_OpenRead      100 /* synopsis: root=P2 iDb=P3                   */
#define OP_OpenWrite     101 /* synopsis: root=P2 iDb=P3                   */


#define OP_BitAnd        102 /* same as TK_BITAND, synopsis: r[P3]=r[P1]&r[P2] */
#define OP_BitOr         103 /* same as TK_BITOR, synopsis: r[P3]=r[P1]|r[P2] */
#define OP_ShiftLeft     104 /* same as TK_LSHIFT, synopsis: r[P3]=r[P2]<<r[P1] */
#define OP_ShiftRight    105 /* same as TK_RSHIFT, synopsis: r[P3]=r[P2]>>r[P1] */
#define OP_Add           106 /* same as TK_PLUS, synopsis: r[P3]=r[P1]+r[P2] */
#define OP_Subtract      107 /* same as TK_MINUS, synopsis: r[P3]=r[P2]-r[P1] */
#define OP_Multiply      108 /* same as TK_STAR, synopsis: r[P3]=r[P1]*r[P2] */
#define OP_Divide        109 /* same as TK_SLASH, synopsis: r[P3]=r[P2]/r[P1] */
#define OP_Remainder     110 /* same as TK_REM, synopsis: r[P3]=r[P2]%r[P1] */
#define OP_Concat        111 /* same as TK_CONCAT, synopsis: r[P3]=r[P2]+r[P1] */
#define OP_OpenDup       112
#define OP_BitNot        113 /* same as TK_BITNOT, synopsis: r[P2]= ~r[P1] */
#define OP_OpenAutoindex 114 /* synopsis: nColumn=P2                       */
#define OP_OpenEphemeral 115 /* synopsis: nColumn=P2                       */
#define OP_String8       116 /* same as TK_STRING, synopsis: r[P2]='P4'    */
#define OP_SorterOpen    117
#define OP_SequenceTest  118 /* synopsis: if( cursor[P1].ctr++ ) pc = P2   */
#define OP_OpenPseudo    119 /* synopsis: P3 columns in r[P2]              */
#define OP_Close         120
#define OP_ColumnsUsed   121
#define OP_SeekScan      122 /* synopsis: Scan-ahead up to P1 rows         */
#define OP_SeekHit       123 /* synopsis: set P2<=seekHit<=P3              */
#define OP_Sequence      124 /* synopsis: r[P2]=cursor[P1].ctr++           */
#define OP_NewRowid      125 /* synopsis: r[P2]=rowid                      */
#define OP_Insert        126 /* synopsis: intkey=r[P3] data=r[P2]          */
#define OP_RowCell       127
#define OP_Delete        128
#define OP_ResetCount    129
#define OP_SorterCompare 130 /* synopsis: if key(P1)!=trim(r[P3],P4) goto P2 */
#define OP_SorterData    131 /* synopsis: r[P2]=data                       */
#define OP_RowData       132 /* synopsis: r[P2]=data                       */
#define OP_Rowid         133 /* synopsis: r[P2]=rowid                      */
#define OP_NullRow       134
#define OP_SeekEnd       135
#define OP_IdxInsert     136 /* synopsis: key=r[P2]                        */
#define OP_SorterInsert  137 /* synopsis: key=r[P2]                        */
#define OP_IdxDelete     138 /* synopsis: key=r[P2@P3]                     */
#define OP_DeferredSeek  139 /* synopsis: Move P3 to P1.rowid if needed    */
#define OP_IdxRowid      140 /* synopsis: r[P2]=rowid                      */
#define OP_FinishSeek    141
#define OP_Destroy       142
#define OP_Clear         143
#define OP_ResetSorter   144
#define OP_CreateBtree   145 /* synopsis: r[P2]=root iDb=P1 flags=P3       */
#define OP_SqlExec       146
#define OP_ParseSchema   147
#define OP_LoadAnalysis  148
#define OP_DropTable     149
#define OP_DropIndex     150
#define OP_DropTrigger   151


#define OP_Real          152 /* same as TK_FLOAT, synopsis: r[P2]=P4       */
#define OP_IntegrityCk   153
#define OP_RowSetAdd     154 /* synopsis: rowset(P1)=r[P2]                 */
#define OP_Param         155
#define OP_FkCounter     156 /* synopsis: fkctr[P1]+=P2                    */
#define OP_MemMax        157 /* synopsis: r[P1]=max(r[P1],r[P2])           */
#define OP_OffsetLimit   158 /* synopsis: if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1) */
#define OP_AggInverse    159 /* synopsis: accum=r[P3] inverse(r[P2@P5])    */
#define OP_AggStep       160 /* synopsis: accum=r[P3] step(r[P2@P5])       */
#define OP_AggStep1      161 /* synopsis: accum=r[P3] step(r[P2@P5])       */
#define OP_AggValue      162 /* synopsis: r[P3]=value N=P2                 */
#define OP_AggFinal      163 /* synopsis: accum=r[P1] N=P2                 */
#define OP_Expire        164
#define OP_CursorLock    165
#define OP_CursorUnlock  166
#define OP_TableLock     167 /* synopsis: iDb=P1 root=P2 write=P3          */
#define OP_VBegin        168
#define OP_VCreate       169
#define OP_VDestroy      170
#define OP_VOpen         171
#define OP_VColumn       172 /* synopsis: r[P3]=vcolumn(P2)                */
#define OP_VRename       173
#define OP_Pagecount     174
#define OP_MaxPgcnt      175
#define OP_Trace         176
#define OP_CursorHint    177
#define OP_ReleaseReg    178 /* synopsis: release r[P1@P2] mask P3         */
#define OP_Noop          179
#define OP_Explain       180
#define OP_Abortable     181

/* Properties such as "out2" or "jump" that are specified in
** comments following the "case" for each opcode in the vdbe.c
** are encoded into bitvectors as follows:
*/
#define OPFLG_JUMP        0x01  /* jump:  P2 holds jmp target */
#define OPFLG_IN1         0x02  /* in1:   P1 is an input */
#define OPFLG_IN2         0x04  /* in2:   P2 is an input */
#define OPFLG_IN3         0x08  /* in3:   P3 is an input */
#define OPFLG_OUT2        0x10  /* out2:  P2 is an output */
#define OPFLG_OUT3        0x20  /* out3:  P3 is an output */
#define OPFLG_INITIALIZER {\
/*   0 */ 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x10,\
/*   8 */ 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x03, 0x03,\
/*  16 */ 0x01, 0x01, 0x03, 0x12, 0x03, 0x03, 0x01, 0x09,\
/*  24 */ 0x09, 0x09, 0x09, 0x01, 0x09, 0x09, 0x09, 0x09,\
/*  32 */ 0x09, 0x09, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,\
/*  40 */ 0x01, 0x01, 0x01, 0x26, 0x26, 0x23, 0x0b, 0x01,\
/*  48 */ 0x01, 0x03, 0x03, 0x03, 0x0b, 0x0b, 0x0b, 0x0b,\
/*  56 */ 0x0b, 0x0b, 0x01, 0x03, 0x03, 0x01, 0x01, 0x01,\
/*  64 */ 0x00, 0x00, 0x02, 0x02, 0x08, 0x00, 0x10, 0x10,\
/*  72 */ 0x10, 0x10, 0x00, 0x10, 0x10, 0x00, 0x00, 0x10,\
/*  80 */ 0x10, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x00,\
/*  88 */ 0x00, 0x12, 0x1e, 0x20, 0x00, 0x00, 0x00, 0x00,\
/*  96 */ 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x26,\
/* 104 */ 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26,\
/* 112 */ 0x00, 0x12, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,\
/* 120 */ 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00,\
/* 128 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,\
/* 136 */ 0x04, 0x04, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00,\
/* 144 */ 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
/* 152 */ 0x10, 0x00, 0x06, 0x10, 0x00, 0x04, 0x1a, 0x00,\
/* 160 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
/* 168 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10,\
/* 176 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}

/* The resolve3P2Values() routine is able to run faster if it knows
** the value of the largest JUMP opcode.  The smaller the maximum
** JUMP opcode the better, so the mkopcodeh.tcl script that
** generated this include file strives to group all JUMP opcodes
** together near the beginning of the list.
*/
#define SQLITE_MX_JUMP_OPCODE  63  /* Maximum JUMP opcode */

/************** End of opcodes.h *********************************************/
/************** Continuing where we left off in vdbe.h ***********************/

/*
** Additional non-public SQLITE_PREPARE_* flags
*/
16385
16386
16387
16388
16389
16390
16391

16392
16393
16394
16395
16396
16397
16398
16399
16400
  signed char nextAutovac;      /* Autovac setting after VACUUM if >=0 */
  u8 suppressErr;               /* Do not issue error messages if true */
  u8 vtabOnConflict;            /* Value to return for s3_vtab_on_conflict() */
  u8 isTransactionSavepoint;    /* True if the outermost savepoint is a TS */
  u8 mTrace;                    /* zero or more SQLITE_TRACE flags */
  u8 noSharedCache;             /* True if no shared-cache backends */
  u8 nSqlExec;                  /* Number of pending OP_SqlExec opcodes */

  int nextPagesize;             /* Pagesize after VACUUM if >0 */
  u32 magic;                    /* Magic number for detect library misuse */
  i64 nChange;                  /* Value returned by sqlite3_changes() */
  i64 nTotalChange;             /* Value returned by sqlite3_total_changes() */
  int aLimit[SQLITE_N_LIMIT];   /* Limits */
  int nMaxSorterMmap;           /* Maximum size of regions mapped by sorter */
  struct sqlite3InitInfo {      /* Information used during initialization */
    Pgno newTnum;               /* Rootpage of table being initialized */
    u8 iDb;                     /* Which db file is being initialized */







>

<







16388
16389
16390
16391
16392
16393
16394
16395
16396

16397
16398
16399
16400
16401
16402
16403
  signed char nextAutovac;      /* Autovac setting after VACUUM if >=0 */
  u8 suppressErr;               /* Do not issue error messages if true */
  u8 vtabOnConflict;            /* Value to return for s3_vtab_on_conflict() */
  u8 isTransactionSavepoint;    /* True if the outermost savepoint is a TS */
  u8 mTrace;                    /* zero or more SQLITE_TRACE flags */
  u8 noSharedCache;             /* True if no shared-cache backends */
  u8 nSqlExec;                  /* Number of pending OP_SqlExec opcodes */
  u8 eOpenState;                /* Current condition of the connection */
  int nextPagesize;             /* Pagesize after VACUUM if >0 */

  i64 nChange;                  /* Value returned by sqlite3_changes() */
  i64 nTotalChange;             /* Value returned by sqlite3_total_changes() */
  int aLimit[SQLITE_N_LIMIT];   /* Limits */
  int nMaxSorterMmap;           /* Maximum size of regions mapped by sorter */
  struct sqlite3InitInfo {      /* Information used during initialization */
    Pgno newTnum;               /* Rootpage of table being initialized */
    u8 iDb;                     /* Which db file is being initialized */
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623

16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637

/*
** Return true if it OK to factor constant expressions into the initialization
** code. The argument is a Parse object for the code generator.
*/
#define ConstFactorOk(P) ((P)->okConstFactor)

/*
** Possible values for the sqlite.magic field.
** The numbers are obtained at random and have no special meaning, other
** than being distinct from one another.

*/
#define SQLITE_MAGIC_OPEN     0xa029a697  /* Database is open */
#define SQLITE_MAGIC_CLOSED   0x9f3c2d33  /* Database is closed */
#define SQLITE_MAGIC_SICK     0x4b771290  /* Error and awaiting close */
#define SQLITE_MAGIC_BUSY     0xf03b7906  /* Database currently in use */
#define SQLITE_MAGIC_ERROR    0xb5357930  /* An SQLITE_MISUSE error occurred */
#define SQLITE_MAGIC_ZOMBIE   0x64cffc7f  /* Close with last statement close */

/*
** Each SQL function is defined by an instance of the following
** structure.  For global built-in functions (ex: substr(), max(), count())
** a pointer to this structure is held in the sqlite3BuiltinFunctions object.
** For per-connection application-defined functions, a pointer to this
** structure is held in the db->aHash hash table.







<
|
|
<
>

|
|
|
|
|
|







16616
16617
16618
16619
16620
16621
16622

16623
16624

16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639

/*
** Return true if it OK to factor constant expressions into the initialization
** code. The argument is a Parse object for the code generator.
*/
#define ConstFactorOk(P) ((P)->okConstFactor)


/* Possible values for the sqlite3.eOpenState field.
** The numbers are randomly selected such that a minimum of three bits must

** change to convert any number to another or to zero
*/
#define SQLITE_STATE_OPEN     0x76  /* Database is open */
#define SQLITE_STATE_CLOSED   0xce  /* Database is closed */
#define SQLITE_STATE_SICK     0xba  /* Error and awaiting close */
#define SQLITE_STATE_BUSY     0x6d  /* Database currently in use */
#define SQLITE_STATE_ERROR    0xd5  /* An SQLITE_MISUSE error occurred */
#define SQLITE_STATE_ZOMBIE   0xa7  /* Close with last statement close */

/*
** Each SQL function is defined by an instance of the following
** structure.  For global built-in functions (ex: substr(), max(), count())
** a pointer to this structure is held in the sqlite3BuiltinFunctions object.
** For per-connection application-defined functions, a pointer to this
** structure is held in the db->aHash hash table.
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914

16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
** is only included if the COLFLAG_HASTYPE bit of colFlags is set and the
** collating sequence name is only included if the COLFLAG_HASCOLL bit is
** set.
*/
struct Column {
  char *zCnName;        /* Name of this column */
  unsigned notNull :4;  /* An OE_ code for handling a NOT NULL constraint */
  unsigned eType :4;    /* One of the standard types */
  char affinity;        /* One of the SQLITE_AFF_... values */
  u8 szEst;             /* Est size of value in this column. sizeof(INT)==1 */
  u8 hName;             /* Column name hash for faster lookup */
  u16 iDflt;            /* 1-based index of DEFAULT.  0 means "none" */
  u16 colFlags;         /* Boolean properties.  See COLFLAG_ defines below */
};

/* Allowed values for Column.eType.
**
** Values must match entries in the global constant arrays
** sqlite3StdTypeLen[] and sqlite3StdType[].  Each value is one more
** than the offset into these arrays for the corresponding name.
** Adjust the SQLITE_N_STDTYPE value if adding or removing entries.
*/
#define COLTYPE_CUSTOM      0   /* Type appended to zName */

#define COLTYPE_BLOB        1
#define COLTYPE_INT         2
#define COLTYPE_INTEGER     3
#define COLTYPE_REAL        4
#define COLTYPE_TEXT        5
#define SQLITE_N_STDTYPE    5  /* Number of standard types */

/* Allowed values for Column.colFlags.
**
** Constraints:
**         TF_HasVirtual == COLFLAG_VIRTUAL
**         TF_HasStored  == COLFLAG_STORED
**         TF_HasHidden  == COLFLAG_HIDDEN







|







|







>
|
|
|
|
|
|







16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
** is only included if the COLFLAG_HASTYPE bit of colFlags is set and the
** collating sequence name is only included if the COLFLAG_HASCOLL bit is
** set.
*/
struct Column {
  char *zCnName;        /* Name of this column */
  unsigned notNull :4;  /* An OE_ code for handling a NOT NULL constraint */
  unsigned eCType :4;   /* One of the standard types */
  char affinity;        /* One of the SQLITE_AFF_... values */
  u8 szEst;             /* Est size of value in this column. sizeof(INT)==1 */
  u8 hName;             /* Column name hash for faster lookup */
  u16 iDflt;            /* 1-based index of DEFAULT.  0 means "none" */
  u16 colFlags;         /* Boolean properties.  See COLFLAG_ defines below */
};

/* Allowed values for Column.eCType.
**
** Values must match entries in the global constant arrays
** sqlite3StdTypeLen[] and sqlite3StdType[].  Each value is one more
** than the offset into these arrays for the corresponding name.
** Adjust the SQLITE_N_STDTYPE value if adding or removing entries.
*/
#define COLTYPE_CUSTOM      0   /* Type appended to zName */
#define COLTYPE_ANY         1
#define COLTYPE_BLOB        2
#define COLTYPE_INT         3
#define COLTYPE_INTEGER     4
#define COLTYPE_REAL        5
#define COLTYPE_TEXT        6
#define SQLITE_N_STDTYPE    6  /* Number of standard types */

/* Allowed values for Column.colFlags.
**
** Constraints:
**         TF_HasVirtual == COLFLAG_VIRTUAL
**         TF_HasStored  == COLFLAG_STORED
**         TF_HasHidden  == COLFLAG_HIDDEN
17137
17138
17139
17140
17141
17142
17143

17144
17145
17146
17147
17148
17149
17150
#define TF_NoVisibleRowid 0x00000200 /* No user-visible "rowid" column */
#define TF_OOOHidden      0x00000400 /* Out-of-Order hidden columns */
#define TF_HasNotNull     0x00000800 /* Contains NOT NULL constraints */
#define TF_Shadow         0x00001000 /* True for a shadow table */
#define TF_HasStat4       0x00002000 /* STAT4 info available for this table */
#define TF_Ephemeral      0x00004000 /* An ephemeral table */
#define TF_Eponymous      0x00008000 /* An eponymous virtual table */


/*
** Allowed values for Table.eTabType
*/
#define TABTYP_NORM      0     /* Ordinary table */
#define TABTYP_VTAB      1     /* Virtual table */
#define TABTYP_VIEW      2     /* A view */







>







17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
#define TF_NoVisibleRowid 0x00000200 /* No user-visible "rowid" column */
#define TF_OOOHidden      0x00000400 /* Out-of-Order hidden columns */
#define TF_HasNotNull     0x00000800 /* Contains NOT NULL constraints */
#define TF_Shadow         0x00001000 /* True for a shadow table */
#define TF_HasStat4       0x00002000 /* STAT4 info available for this table */
#define TF_Ephemeral      0x00004000 /* An ephemeral table */
#define TF_Eponymous      0x00008000 /* An eponymous virtual table */
#define TF_Strict         0x00010000 /* STRICT mode */

/*
** Allowed values for Table.eTabType
*/
#define TABTYP_NORM      0     /* Ordinary table */
#define TABTYP_VTAB      1     /* Virtual table */
#define TABTYP_VIEW      2     /* A view */
19288
19289
19290
19291
19292
19293
19294
19295
19296
19297
19298
19299
19300
19301
19302
SQLITE_PRIVATE void sqlite3AddColumn(Parse*,Token,Token);
SQLITE_PRIVATE void sqlite3AddNotNull(Parse*, int);
SQLITE_PRIVATE void sqlite3AddPrimaryKey(Parse*, ExprList*, int, int, int);
SQLITE_PRIVATE void sqlite3AddCheckConstraint(Parse*, Expr*, const char*, const char*);
SQLITE_PRIVATE void sqlite3AddDefaultValue(Parse*,Expr*,const char*,const char*);
SQLITE_PRIVATE void sqlite3AddCollateType(Parse*, Token*);
SQLITE_PRIVATE void sqlite3AddGenerated(Parse*,Expr*,Token*);
SQLITE_PRIVATE void sqlite3EndTable(Parse*,Token*,Token*,u8,Select*);
SQLITE_PRIVATE void sqlite3AddReturning(Parse*,ExprList*);
SQLITE_PRIVATE int sqlite3ParseUri(const char*,const char*,unsigned int*,
                    sqlite3_vfs**,char**,char **);
#define sqlite3CodecQueryParameters(A,B,C) 0
SQLITE_PRIVATE Btree *sqlite3DbNameToBtree(sqlite3*,const char*);

#ifdef SQLITE_UNTESTABLE







|







19292
19293
19294
19295
19296
19297
19298
19299
19300
19301
19302
19303
19304
19305
19306
SQLITE_PRIVATE void sqlite3AddColumn(Parse*,Token,Token);
SQLITE_PRIVATE void sqlite3AddNotNull(Parse*, int);
SQLITE_PRIVATE void sqlite3AddPrimaryKey(Parse*, ExprList*, int, int, int);
SQLITE_PRIVATE void sqlite3AddCheckConstraint(Parse*, Expr*, const char*, const char*);
SQLITE_PRIVATE void sqlite3AddDefaultValue(Parse*,Expr*,const char*,const char*);
SQLITE_PRIVATE void sqlite3AddCollateType(Parse*, Token*);
SQLITE_PRIVATE void sqlite3AddGenerated(Parse*,Expr*,Token*);
SQLITE_PRIVATE void sqlite3EndTable(Parse*,Token*,Token*,u32,Select*);
SQLITE_PRIVATE void sqlite3AddReturning(Parse*,ExprList*);
SQLITE_PRIVATE int sqlite3ParseUri(const char*,const char*,unsigned int*,
                    sqlite3_vfs**,char**,char **);
#define sqlite3CodecQueryParameters(A,B,C) 0
SQLITE_PRIVATE Btree *sqlite3DbNameToBtree(sqlite3*,const char*);

#ifdef SQLITE_UNTESTABLE
19693
19694
19695
19696
19697
19698
19699

19700
19701
19702
19703
19704
19705
19706
SQLITE_PRIVATE int sqlite3ValueFromExpr(sqlite3 *, Expr *, u8, u8, sqlite3_value **);
SQLITE_PRIVATE void sqlite3ValueApplyAffinity(sqlite3_value *, u8, u8);
#ifndef SQLITE_AMALGAMATION
SQLITE_PRIVATE const unsigned char sqlite3OpcodeProperty[];
SQLITE_PRIVATE const char sqlite3StrBINARY[];
SQLITE_PRIVATE const unsigned char sqlite3StdTypeLen[];
SQLITE_PRIVATE const char sqlite3StdTypeAffinity[];

SQLITE_PRIVATE const char *sqlite3StdType[];
SQLITE_PRIVATE const unsigned char sqlite3UpperToLower[];
SQLITE_PRIVATE const unsigned char *sqlite3aLTb;
SQLITE_PRIVATE const unsigned char *sqlite3aEQb;
SQLITE_PRIVATE const unsigned char *sqlite3aGTb;
SQLITE_PRIVATE const unsigned char sqlite3CtypeMap[];
SQLITE_PRIVATE SQLITE_WSD struct Sqlite3Config sqlite3Config;







>







19697
19698
19699
19700
19701
19702
19703
19704
19705
19706
19707
19708
19709
19710
19711
SQLITE_PRIVATE int sqlite3ValueFromExpr(sqlite3 *, Expr *, u8, u8, sqlite3_value **);
SQLITE_PRIVATE void sqlite3ValueApplyAffinity(sqlite3_value *, u8, u8);
#ifndef SQLITE_AMALGAMATION
SQLITE_PRIVATE const unsigned char sqlite3OpcodeProperty[];
SQLITE_PRIVATE const char sqlite3StrBINARY[];
SQLITE_PRIVATE const unsigned char sqlite3StdTypeLen[];
SQLITE_PRIVATE const char sqlite3StdTypeAffinity[];
SQLITE_PRIVATE const char sqlite3StdTypeMap[];
SQLITE_PRIVATE const char *sqlite3StdType[];
SQLITE_PRIVATE const unsigned char sqlite3UpperToLower[];
SQLITE_PRIVATE const unsigned char *sqlite3aLTb;
SQLITE_PRIVATE const unsigned char *sqlite3aEQb;
SQLITE_PRIVATE const unsigned char *sqlite3aGTb;
SQLITE_PRIVATE const unsigned char sqlite3CtypeMap[];
SQLITE_PRIVATE SQLITE_WSD struct Sqlite3Config sqlite3Config;
21462
21463
21464
21465
21466
21467
21468












21469
21470
21471

21472
21473
21474
21475
21476
21477








21478

21479
21480
21481
21482
21483
21484
21485
** Name of the default collating sequence
*/
SQLITE_PRIVATE const char sqlite3StrBINARY[] = "BINARY";

/*
** Standard typenames.  These names must match the COLTYPE_* definitions.
** Adjust the SQLITE_N_STDTYPE value if adding or removing entries.












*/
SQLITE_PRIVATE const unsigned char sqlite3StdTypeLen[] = { 4, 3, 7, 4, 4 };
SQLITE_PRIVATE const char sqlite3StdTypeAffinity[] = {

  SQLITE_AFF_BLOB,
  SQLITE_AFF_INTEGER,
  SQLITE_AFF_INTEGER,
  SQLITE_AFF_REAL,
  SQLITE_AFF_TEXT
};








SQLITE_PRIVATE const char *sqlite3StdType[] = {

  "BLOB",
  "INT",
  "INTEGER",
  "REAL",
  "TEXT"
};








>
>
>
>
>
>
>
>
>
>
>
>

|

>






>
>
>
>
>
>
>
>

>







21467
21468
21469
21470
21471
21472
21473
21474
21475
21476
21477
21478
21479
21480
21481
21482
21483
21484
21485
21486
21487
21488
21489
21490
21491
21492
21493
21494
21495
21496
21497
21498
21499
21500
21501
21502
21503
21504
21505
21506
21507
21508
21509
21510
21511
21512
** Name of the default collating sequence
*/
SQLITE_PRIVATE const char sqlite3StrBINARY[] = "BINARY";

/*
** Standard typenames.  These names must match the COLTYPE_* definitions.
** Adjust the SQLITE_N_STDTYPE value if adding or removing entries.
**
**    sqlite3StdType[]            The actual names of the datatypes.
**
**    sqlite3StdTypeLen[]         The length (in bytes) of each entry
**                                in sqlite3StdType[].
**
**    sqlite3StdTypeAffinity[]    The affinity associated with each entry
**                                in sqlite3StdType[].
**
**    sqlite3StdTypeMap[]         The type value (as returned from
**                                sqlite3_column_type() or sqlite3_value_type())
**                                for each entry in sqlite3StdType[].
*/
SQLITE_PRIVATE const unsigned char sqlite3StdTypeLen[] = { 3, 4, 3, 7, 4, 4 };
SQLITE_PRIVATE const char sqlite3StdTypeAffinity[] = {
  SQLITE_AFF_NUMERIC,
  SQLITE_AFF_BLOB,
  SQLITE_AFF_INTEGER,
  SQLITE_AFF_INTEGER,
  SQLITE_AFF_REAL,
  SQLITE_AFF_TEXT
};
SQLITE_PRIVATE const char sqlite3StdTypeMap[] = {
  0,
  SQLITE_BLOB,
  SQLITE_INTEGER,
  SQLITE_INTEGER,
  SQLITE_FLOAT,
  SQLITE_TEXT
};
SQLITE_PRIVATE const char *sqlite3StdType[] = {
  "ANY",
  "BLOB",
  "INT",
  "INTEGER",
  "REAL",
  "TEXT"
};

31894
31895
31896
31897
31898
31899
31900



31901
31902


31903
31904





31905
31906
31907
31908
31909
31910
31911
31912
  return xCallback ? xCallback(iTest) : SQLITE_OK;
}
#endif

#ifndef SQLITE_OMIT_FLOATING_POINT
/*
** Return true if the floating point value is Not a Number (NaN).



*/
SQLITE_PRIVATE int sqlite3IsNaN(double x){


  u64 y;
  memcpy(&y,&x,sizeof(y));





  return IsNaN(y);
}
#endif /* SQLITE_OMIT_FLOATING_POINT */

/*
** Compute a string length that is limited to what can be stored in
** lower 30 bits of a 32-bit signed integer.
**







>
>
>


>
>


>
>
>
>
>
|







31921
31922
31923
31924
31925
31926
31927
31928
31929
31930
31931
31932
31933
31934
31935
31936
31937
31938
31939
31940
31941
31942
31943
31944
31945
31946
31947
31948
31949
  return xCallback ? xCallback(iTest) : SQLITE_OK;
}
#endif

#ifndef SQLITE_OMIT_FLOATING_POINT
/*
** Return true if the floating point value is Not a Number (NaN).
**
** Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN.
** Otherwise, we have our own implementation that works on most systems.
*/
SQLITE_PRIVATE int sqlite3IsNaN(double x){
  int rc;   /* The value return */
#if !SQLITE_HAVE_ISNAN && !HAVE_ISNAN
  u64 y;
  memcpy(&y,&x,sizeof(y));
  rc = IsNaN(y);
#else
  rc = isnan(x);
#endif /* HAVE_ISNAN */
  testcase( rc );
  return rc;
}
#endif /* SQLITE_OMIT_FLOATING_POINT */

/*
** Compute a string length that is limited to what can be stored in
** lower 30 bits of a 32-bit signed integer.
**
31925
31926
31927
31928
31929
31930
31931
31932
31933
31934
31935
31936
31937
31938
31939
31940
31941
**
** The column type is an extra string stored after the zero-terminator on
** the column name if and only if the COLFLAG_HASTYPE flag is set.
*/
SQLITE_PRIVATE char *sqlite3ColumnType(Column *pCol, char *zDflt){
  if( pCol->colFlags & COLFLAG_HASTYPE ){
    return pCol->zCnName + strlen(pCol->zCnName) + 1;
  }else if( pCol->eType ){
    assert( pCol->eType<=SQLITE_N_STDTYPE );
    return (char*)sqlite3StdType[pCol->eType-1];
  }else{
    return zDflt;
  }
}

/*
** Helper function for sqlite3Error() - called rarely.  Broken out into







|
|
|







31962
31963
31964
31965
31966
31967
31968
31969
31970
31971
31972
31973
31974
31975
31976
31977
31978
**
** The column type is an extra string stored after the zero-terminator on
** the column name if and only if the COLFLAG_HASTYPE flag is set.
*/
SQLITE_PRIVATE char *sqlite3ColumnType(Column *pCol, char *zDflt){
  if( pCol->colFlags & COLFLAG_HASTYPE ){
    return pCol->zCnName + strlen(pCol->zCnName) + 1;
  }else if( pCol->eCType ){
    assert( pCol->eCType<=SQLITE_N_STDTYPE );
    return (char*)sqlite3StdType[pCol->eCType-1];
  }else{
    return zDflt;
  }
}

/*
** Helper function for sqlite3Error() - called rarely.  Broken out into
33233
33234
33235
33236
33237
33238
33239
33240
33241
33242
33243
33244
33245
33246
33247
33248
33249
33250
33251
33252
33253
33254
33255
33256
33257
33258
33259
33260
33261
33262
33263
33264
33265
33266
33267
33268
**
** sqlite3SafetyCheckOk() requires that the db pointer be valid for
** use.  sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to
** open properly and is not fit for general use but which can be
** used as an argument to sqlite3_errmsg() or sqlite3_close().
*/
SQLITE_PRIVATE int sqlite3SafetyCheckOk(sqlite3 *db){
  u32 magic;
  if( db==0 ){
    logBadConnection("NULL");
    return 0;
  }
  magic = db->magic;
  if( magic!=SQLITE_MAGIC_OPEN ){
    if( sqlite3SafetyCheckSickOrOk(db) ){
      testcase( sqlite3GlobalConfig.xLog!=0 );
      logBadConnection("unopened");
    }
    return 0;
  }else{
    return 1;
  }
}
SQLITE_PRIVATE int sqlite3SafetyCheckSickOrOk(sqlite3 *db){
  u32 magic;
  magic = db->magic;
  if( magic!=SQLITE_MAGIC_SICK &&
      magic!=SQLITE_MAGIC_OPEN &&
      magic!=SQLITE_MAGIC_BUSY ){
    testcase( sqlite3GlobalConfig.xLog!=0 );
    logBadConnection("invalid");
    return 0;
  }else{
    return 1;
  }
}







|




|
|










|
|
|
|
|







33270
33271
33272
33273
33274
33275
33276
33277
33278
33279
33280
33281
33282
33283
33284
33285
33286
33287
33288
33289
33290
33291
33292
33293
33294
33295
33296
33297
33298
33299
33300
33301
33302
33303
33304
33305
**
** sqlite3SafetyCheckOk() requires that the db pointer be valid for
** use.  sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to
** open properly and is not fit for general use but which can be
** used as an argument to sqlite3_errmsg() or sqlite3_close().
*/
SQLITE_PRIVATE int sqlite3SafetyCheckOk(sqlite3 *db){
  u8 eOpenState;
  if( db==0 ){
    logBadConnection("NULL");
    return 0;
  }
  eOpenState = db->eOpenState;
  if( eOpenState!=SQLITE_STATE_OPEN ){
    if( sqlite3SafetyCheckSickOrOk(db) ){
      testcase( sqlite3GlobalConfig.xLog!=0 );
      logBadConnection("unopened");
    }
    return 0;
  }else{
    return 1;
  }
}
SQLITE_PRIVATE int sqlite3SafetyCheckSickOrOk(sqlite3 *db){
  u8 eOpenState;
  eOpenState = db->eOpenState;
  if( eOpenState!=SQLITE_STATE_SICK &&
      eOpenState!=SQLITE_STATE_OPEN &&
      eOpenState!=SQLITE_STATE_BUSY ){
    testcase( sqlite3GlobalConfig.xLog!=0 );
    logBadConnection("invalid");
    return 0;
  }else{
    return 1;
  }
}
33873
33874
33875
33876
33877
33878
33879

33880
33881
33882
33883
33884
33885
33886
33887
33888
33889
33890
33891
33892
33893
33894
33895
33896
33897
33898
33899
33900
33901
33902
33903

33904
33905
33906
33907
33908
33909
33910
33911
33912
33913
33914
33915
33916
33917

33918
33919
33920
33921
33922
33923
33924
33925
33926
33927
33928
33929
33930
33931
33932
33933
33934
33935
33936
33937
33938
33939
33940
33941
33942
33943
33944
33945
33946
33947
33948
33949
33950

33951
33952
33953
33954
33955
33956
33957
33958
33959
33960
33961
33962
33963
33964
33965
33966
33967
33968
33969
33970
33971
33972
33973
33974
33975


33976
33977
33978
33979
33980
33981
33982
33983
33984
33985
33986
33987
33988
33989
33990
33991
33992
33993
33994
33995
33996
33997
33998
33999
34000
34001
34002
34003
34004
34005
34006
34007
34008
34009
34010
34011


34012
34013
34014
34015
34016
34017
34018
34019
34020
34021
34022
34023
34024
34025
34026
34027
34028
34029
34030
34031
34032
34033
34034
34035
34036
34037
34038
34039
34040
34041
34042
34043
34044
34045
    /*  14 */ "Yield"            OpHelp(""),
    /*  15 */ "MustBeInt"        OpHelp(""),
    /*  16 */ "Jump"             OpHelp(""),
    /*  17 */ "Once"             OpHelp(""),
    /*  18 */ "If"               OpHelp(""),
    /*  19 */ "Not"              OpHelp("r[P2]= !r[P1]"),
    /*  20 */ "IfNot"            OpHelp(""),

    /*  21 */ "IfNullRow"        OpHelp("if P1.nullRow then r[P3]=NULL, goto P2"),
    /*  22 */ "SeekLT"           OpHelp("key=r[P3@P4]"),
    /*  23 */ "SeekLE"           OpHelp("key=r[P3@P4]"),
    /*  24 */ "SeekGE"           OpHelp("key=r[P3@P4]"),
    /*  25 */ "SeekGT"           OpHelp("key=r[P3@P4]"),
    /*  26 */ "IfNotOpen"        OpHelp("if( !csr[P1] ) goto P2"),
    /*  27 */ "IfNoHope"         OpHelp("key=r[P3@P4]"),
    /*  28 */ "NoConflict"       OpHelp("key=r[P3@P4]"),
    /*  29 */ "NotFound"         OpHelp("key=r[P3@P4]"),
    /*  30 */ "Found"            OpHelp("key=r[P3@P4]"),
    /*  31 */ "SeekRowid"        OpHelp("intkey=r[P3]"),
    /*  32 */ "NotExists"        OpHelp("intkey=r[P3]"),
    /*  33 */ "Last"             OpHelp(""),
    /*  34 */ "IfSmaller"        OpHelp(""),
    /*  35 */ "SorterSort"       OpHelp(""),
    /*  36 */ "Sort"             OpHelp(""),
    /*  37 */ "Rewind"           OpHelp(""),
    /*  38 */ "IdxLE"            OpHelp("key=r[P3@P4]"),
    /*  39 */ "IdxGT"            OpHelp("key=r[P3@P4]"),
    /*  40 */ "IdxLT"            OpHelp("key=r[P3@P4]"),
    /*  41 */ "IdxGE"            OpHelp("key=r[P3@P4]"),
    /*  42 */ "RowSetRead"       OpHelp("r[P3]=rowset(P1)"),
    /*  43 */ "Or"               OpHelp("r[P3]=(r[P1] || r[P2])"),
    /*  44 */ "And"              OpHelp("r[P3]=(r[P1] && r[P2])"),

    /*  45 */ "RowSetTest"       OpHelp("if r[P3] in rowset(P1) goto P2"),
    /*  46 */ "Program"          OpHelp(""),
    /*  47 */ "FkIfZero"         OpHelp("if fkctr[P1]==0 goto P2"),
    /*  48 */ "IfPos"            OpHelp("if r[P1]>0 then r[P1]-=P3, goto P2"),
    /*  49 */ "IfNotZero"        OpHelp("if r[P1]!=0 then r[P1]--, goto P2"),
    /*  50 */ "IsNull"           OpHelp("if r[P1]==NULL goto P2"),
    /*  51 */ "NotNull"          OpHelp("if r[P1]!=NULL goto P2"),
    /*  52 */ "Ne"               OpHelp("IF r[P3]!=r[P1]"),
    /*  53 */ "Eq"               OpHelp("IF r[P3]==r[P1]"),
    /*  54 */ "Gt"               OpHelp("IF r[P3]>r[P1]"),
    /*  55 */ "Le"               OpHelp("IF r[P3]<=r[P1]"),
    /*  56 */ "Lt"               OpHelp("IF r[P3]<r[P1]"),
    /*  57 */ "Ge"               OpHelp("IF r[P3]>=r[P1]"),
    /*  58 */ "ElseEq"           OpHelp(""),

    /*  59 */ "DecrJumpZero"     OpHelp("if (--r[P1])==0 goto P2"),
    /*  60 */ "IncrVacuum"       OpHelp(""),
    /*  61 */ "VNext"            OpHelp(""),
    /*  62 */ "Init"             OpHelp("Start at P2"),
    /*  63 */ "PureFunc"         OpHelp("r[P3]=func(r[P2@NP])"),
    /*  64 */ "Function"         OpHelp("r[P3]=func(r[P2@NP])"),
    /*  65 */ "Return"           OpHelp(""),
    /*  66 */ "EndCoroutine"     OpHelp(""),
    /*  67 */ "HaltIfNull"       OpHelp("if r[P3]=null halt"),
    /*  68 */ "Halt"             OpHelp(""),
    /*  69 */ "Integer"          OpHelp("r[P2]=P1"),
    /*  70 */ "Int64"            OpHelp("r[P2]=P4"),
    /*  71 */ "String"           OpHelp("r[P2]='P4' (len=P1)"),
    /*  72 */ "Null"             OpHelp("r[P2..P3]=NULL"),
    /*  73 */ "SoftNull"         OpHelp("r[P1]=NULL"),
    /*  74 */ "Blob"             OpHelp("r[P2]=P4 (len=P1)"),
    /*  75 */ "Variable"         OpHelp("r[P2]=parameter(P1,P4)"),
    /*  76 */ "Move"             OpHelp("r[P2@P3]=r[P1@P3]"),
    /*  77 */ "Copy"             OpHelp("r[P2@P3+1]=r[P1@P3+1]"),
    /*  78 */ "SCopy"            OpHelp("r[P2]=r[P1]"),
    /*  79 */ "IntCopy"          OpHelp("r[P2]=r[P1]"),
    /*  80 */ "ChngCntRow"       OpHelp("output=r[P1]"),
    /*  81 */ "ResultRow"        OpHelp("output=r[P1@P2]"),
    /*  82 */ "CollSeq"          OpHelp(""),
    /*  83 */ "AddImm"           OpHelp("r[P1]=r[P1]+P2"),
    /*  84 */ "RealAffinity"     OpHelp(""),
    /*  85 */ "Cast"             OpHelp("affinity(r[P1])"),
    /*  86 */ "Permutation"      OpHelp(""),
    /*  87 */ "Compare"          OpHelp("r[P1@P3] <-> r[P2@P3]"),
    /*  88 */ "IsTrue"           OpHelp("r[P2] = coalesce(r[P1]==TRUE,P3) ^ P4"),
    /*  89 */ "ZeroOrNull"       OpHelp("r[P2] = 0 OR NULL"),
    /*  90 */ "Offset"           OpHelp("r[P3] = sqlite_offset(P1)"),
    /*  91 */ "Column"           OpHelp("r[P3]=PX"),

    /*  92 */ "Affinity"         OpHelp("affinity(r[P1@P2])"),
    /*  93 */ "MakeRecord"       OpHelp("r[P3]=mkrec(r[P1@P2])"),
    /*  94 */ "Count"            OpHelp("r[P2]=count()"),
    /*  95 */ "ReadCookie"       OpHelp(""),
    /*  96 */ "SetCookie"        OpHelp(""),
    /*  97 */ "ReopenIdx"        OpHelp("root=P2 iDb=P3"),
    /*  98 */ "OpenRead"         OpHelp("root=P2 iDb=P3"),
    /*  99 */ "OpenWrite"        OpHelp("root=P2 iDb=P3"),
    /* 100 */ "OpenDup"          OpHelp(""),
    /* 101 */ "OpenAutoindex"    OpHelp("nColumn=P2"),
    /* 102 */ "BitAnd"           OpHelp("r[P3]=r[P1]&r[P2]"),
    /* 103 */ "BitOr"            OpHelp("r[P3]=r[P1]|r[P2]"),
    /* 104 */ "ShiftLeft"        OpHelp("r[P3]=r[P2]<<r[P1]"),
    /* 105 */ "ShiftRight"       OpHelp("r[P3]=r[P2]>>r[P1]"),
    /* 106 */ "Add"              OpHelp("r[P3]=r[P1]+r[P2]"),
    /* 107 */ "Subtract"         OpHelp("r[P3]=r[P2]-r[P1]"),
    /* 108 */ "Multiply"         OpHelp("r[P3]=r[P1]*r[P2]"),
    /* 109 */ "Divide"           OpHelp("r[P3]=r[P2]/r[P1]"),
    /* 110 */ "Remainder"        OpHelp("r[P3]=r[P2]%r[P1]"),
    /* 111 */ "Concat"           OpHelp("r[P3]=r[P2]+r[P1]"),
    /* 112 */ "OpenEphemeral"    OpHelp("nColumn=P2"),
    /* 113 */ "BitNot"           OpHelp("r[P2]= ~r[P1]"),
    /* 114 */ "SorterOpen"       OpHelp(""),
    /* 115 */ "SequenceTest"     OpHelp("if( cursor[P1].ctr++ ) pc = P2"),
    /* 116 */ "String8"          OpHelp("r[P2]='P4'"),


    /* 117 */ "OpenPseudo"       OpHelp("P3 columns in r[P2]"),
    /* 118 */ "Close"            OpHelp(""),
    /* 119 */ "ColumnsUsed"      OpHelp(""),
    /* 120 */ "SeekScan"         OpHelp("Scan-ahead up to P1 rows"),
    /* 121 */ "SeekHit"          OpHelp("set P2<=seekHit<=P3"),
    /* 122 */ "Sequence"         OpHelp("r[P2]=cursor[P1].ctr++"),
    /* 123 */ "NewRowid"         OpHelp("r[P2]=rowid"),
    /* 124 */ "Insert"           OpHelp("intkey=r[P3] data=r[P2]"),
    /* 125 */ "RowCell"          OpHelp(""),
    /* 126 */ "Delete"           OpHelp(""),
    /* 127 */ "ResetCount"       OpHelp(""),
    /* 128 */ "SorterCompare"    OpHelp("if key(P1)!=trim(r[P3],P4) goto P2"),
    /* 129 */ "SorterData"       OpHelp("r[P2]=data"),
    /* 130 */ "RowData"          OpHelp("r[P2]=data"),
    /* 131 */ "Rowid"            OpHelp("r[P2]=rowid"),
    /* 132 */ "NullRow"          OpHelp(""),
    /* 133 */ "SeekEnd"          OpHelp(""),
    /* 134 */ "IdxInsert"        OpHelp("key=r[P2]"),
    /* 135 */ "SorterInsert"     OpHelp("key=r[P2]"),
    /* 136 */ "IdxDelete"        OpHelp("key=r[P2@P3]"),
    /* 137 */ "DeferredSeek"     OpHelp("Move P3 to P1.rowid if needed"),
    /* 138 */ "IdxRowid"         OpHelp("r[P2]=rowid"),
    /* 139 */ "FinishSeek"       OpHelp(""),
    /* 140 */ "Destroy"          OpHelp(""),
    /* 141 */ "Clear"            OpHelp(""),
    /* 142 */ "ResetSorter"      OpHelp(""),
    /* 143 */ "CreateBtree"      OpHelp("r[P2]=root iDb=P1 flags=P3"),
    /* 144 */ "SqlExec"          OpHelp(""),
    /* 145 */ "ParseSchema"      OpHelp(""),
    /* 146 */ "LoadAnalysis"     OpHelp(""),
    /* 147 */ "DropTable"        OpHelp(""),
    /* 148 */ "DropIndex"        OpHelp(""),
    /* 149 */ "DropTrigger"      OpHelp(""),
    /* 150 */ "IntegrityCk"      OpHelp(""),
    /* 151 */ "RowSetAdd"        OpHelp("rowset(P1)=r[P2]"),
    /* 152 */ "Real"             OpHelp("r[P2]=P4"),


    /* 153 */ "Param"            OpHelp(""),
    /* 154 */ "FkCounter"        OpHelp("fkctr[P1]+=P2"),
    /* 155 */ "MemMax"           OpHelp("r[P1]=max(r[P1],r[P2])"),
    /* 156 */ "OffsetLimit"      OpHelp("if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1)"),
    /* 157 */ "AggInverse"       OpHelp("accum=r[P3] inverse(r[P2@P5])"),
    /* 158 */ "AggStep"          OpHelp("accum=r[P3] step(r[P2@P5])"),
    /* 159 */ "AggStep1"         OpHelp("accum=r[P3] step(r[P2@P5])"),
    /* 160 */ "AggValue"         OpHelp("r[P3]=value N=P2"),
    /* 161 */ "AggFinal"         OpHelp("accum=r[P1] N=P2"),
    /* 162 */ "Expire"           OpHelp(""),
    /* 163 */ "CursorLock"       OpHelp(""),
    /* 164 */ "CursorUnlock"     OpHelp(""),
    /* 165 */ "TableLock"        OpHelp("iDb=P1 root=P2 write=P3"),
    /* 166 */ "VBegin"           OpHelp(""),
    /* 167 */ "VCreate"          OpHelp(""),
    /* 168 */ "VDestroy"         OpHelp(""),
    /* 169 */ "VOpen"            OpHelp(""),
    /* 170 */ "VColumn"          OpHelp("r[P3]=vcolumn(P2)"),
    /* 171 */ "VRename"          OpHelp(""),
    /* 172 */ "Pagecount"        OpHelp(""),
    /* 173 */ "MaxPgcnt"         OpHelp(""),
    /* 174 */ "Trace"            OpHelp(""),
    /* 175 */ "CursorHint"       OpHelp(""),
    /* 176 */ "ReleaseReg"       OpHelp("release r[P1@P2] mask P3"),
    /* 177 */ "Noop"             OpHelp(""),
    /* 178 */ "Explain"          OpHelp(""),
    /* 179 */ "Abortable"        OpHelp(""),
  };
  return azName[i];
}
#endif

/************** End of opcodes.c *********************************************/
/************** Begin file os_unix.c *****************************************/







>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<


>
|
|
|
|
<









>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<
<










|

|
|

>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<

>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|







33910
33911
33912
33913
33914
33915
33916
33917
33918
33919
33920
33921
33922
33923
33924
33925
33926
33927
33928
33929
33930
33931
33932
33933
33934
33935
33936
33937
33938

33939
33940
33941
33942
33943
33944
33945

33946
33947
33948
33949
33950
33951
33952
33953
33954
33955
33956
33957
33958
33959
33960
33961
33962
33963
33964
33965
33966
33967
33968
33969
33970
33971
33972
33973
33974
33975
33976
33977
33978
33979
33980
33981
33982
33983
33984
33985
33986
33987
33988
33989
33990
33991
33992
33993
33994
33995
33996
33997


33998
33999
34000
34001
34002
34003
34004
34005
34006
34007
34008
34009
34010
34011
34012
34013
34014
34015
34016
34017
34018
34019
34020
34021
34022
34023
34024
34025
34026
34027
34028
34029
34030
34031
34032
34033
34034
34035
34036
34037
34038
34039
34040
34041
34042
34043
34044
34045
34046
34047


34048
34049
34050
34051
34052
34053
34054
34055
34056
34057
34058
34059
34060
34061
34062
34063
34064
34065
34066
34067
34068
34069
34070
34071
34072
34073
34074
34075
34076
34077
34078
34079
34080
34081
34082
34083
34084
    /*  14 */ "Yield"            OpHelp(""),
    /*  15 */ "MustBeInt"        OpHelp(""),
    /*  16 */ "Jump"             OpHelp(""),
    /*  17 */ "Once"             OpHelp(""),
    /*  18 */ "If"               OpHelp(""),
    /*  19 */ "Not"              OpHelp("r[P2]= !r[P1]"),
    /*  20 */ "IfNot"            OpHelp(""),
    /*  21 */ "IsNullOrType"     OpHelp("if typeof(r[P1]) IN (P3,5) goto P2"),
    /*  22 */ "IfNullRow"        OpHelp("if P1.nullRow then r[P3]=NULL, goto P2"),
    /*  23 */ "SeekLT"           OpHelp("key=r[P3@P4]"),
    /*  24 */ "SeekLE"           OpHelp("key=r[P3@P4]"),
    /*  25 */ "SeekGE"           OpHelp("key=r[P3@P4]"),
    /*  26 */ "SeekGT"           OpHelp("key=r[P3@P4]"),
    /*  27 */ "IfNotOpen"        OpHelp("if( !csr[P1] ) goto P2"),
    /*  28 */ "IfNoHope"         OpHelp("key=r[P3@P4]"),
    /*  29 */ "NoConflict"       OpHelp("key=r[P3@P4]"),
    /*  30 */ "NotFound"         OpHelp("key=r[P3@P4]"),
    /*  31 */ "Found"            OpHelp("key=r[P3@P4]"),
    /*  32 */ "SeekRowid"        OpHelp("intkey=r[P3]"),
    /*  33 */ "NotExists"        OpHelp("intkey=r[P3]"),
    /*  34 */ "Last"             OpHelp(""),
    /*  35 */ "IfSmaller"        OpHelp(""),
    /*  36 */ "SorterSort"       OpHelp(""),
    /*  37 */ "Sort"             OpHelp(""),
    /*  38 */ "Rewind"           OpHelp(""),
    /*  39 */ "IdxLE"            OpHelp("key=r[P3@P4]"),
    /*  40 */ "IdxGT"            OpHelp("key=r[P3@P4]"),
    /*  41 */ "IdxLT"            OpHelp("key=r[P3@P4]"),
    /*  42 */ "IdxGE"            OpHelp("key=r[P3@P4]"),

    /*  43 */ "Or"               OpHelp("r[P3]=(r[P1] || r[P2])"),
    /*  44 */ "And"              OpHelp("r[P3]=(r[P1] && r[P2])"),
    /*  45 */ "RowSetRead"       OpHelp("r[P3]=rowset(P1)"),
    /*  46 */ "RowSetTest"       OpHelp("if r[P3] in rowset(P1) goto P2"),
    /*  47 */ "Program"          OpHelp(""),
    /*  48 */ "FkIfZero"         OpHelp("if fkctr[P1]==0 goto P2"),
    /*  49 */ "IfPos"            OpHelp("if r[P1]>0 then r[P1]-=P3, goto P2"),

    /*  50 */ "IsNull"           OpHelp("if r[P1]==NULL goto P2"),
    /*  51 */ "NotNull"          OpHelp("if r[P1]!=NULL goto P2"),
    /*  52 */ "Ne"               OpHelp("IF r[P3]!=r[P1]"),
    /*  53 */ "Eq"               OpHelp("IF r[P3]==r[P1]"),
    /*  54 */ "Gt"               OpHelp("IF r[P3]>r[P1]"),
    /*  55 */ "Le"               OpHelp("IF r[P3]<=r[P1]"),
    /*  56 */ "Lt"               OpHelp("IF r[P3]<r[P1]"),
    /*  57 */ "Ge"               OpHelp("IF r[P3]>=r[P1]"),
    /*  58 */ "ElseEq"           OpHelp(""),
    /*  59 */ "IfNotZero"        OpHelp("if r[P1]!=0 then r[P1]--, goto P2"),
    /*  60 */ "DecrJumpZero"     OpHelp("if (--r[P1])==0 goto P2"),
    /*  61 */ "IncrVacuum"       OpHelp(""),
    /*  62 */ "VNext"            OpHelp(""),
    /*  63 */ "Init"             OpHelp("Start at P2"),
    /*  64 */ "PureFunc"         OpHelp("r[P3]=func(r[P2@NP])"),
    /*  65 */ "Function"         OpHelp("r[P3]=func(r[P2@NP])"),
    /*  66 */ "Return"           OpHelp(""),
    /*  67 */ "EndCoroutine"     OpHelp(""),
    /*  68 */ "HaltIfNull"       OpHelp("if r[P3]=null halt"),
    /*  69 */ "Halt"             OpHelp(""),
    /*  70 */ "Integer"          OpHelp("r[P2]=P1"),
    /*  71 */ "Int64"            OpHelp("r[P2]=P4"),
    /*  72 */ "String"           OpHelp("r[P2]='P4' (len=P1)"),
    /*  73 */ "Null"             OpHelp("r[P2..P3]=NULL"),
    /*  74 */ "SoftNull"         OpHelp("r[P1]=NULL"),
    /*  75 */ "Blob"             OpHelp("r[P2]=P4 (len=P1)"),
    /*  76 */ "Variable"         OpHelp("r[P2]=parameter(P1,P4)"),
    /*  77 */ "Move"             OpHelp("r[P2@P3]=r[P1@P3]"),
    /*  78 */ "Copy"             OpHelp("r[P2@P3+1]=r[P1@P3+1]"),
    /*  79 */ "SCopy"            OpHelp("r[P2]=r[P1]"),
    /*  80 */ "IntCopy"          OpHelp("r[P2]=r[P1]"),
    /*  81 */ "ChngCntRow"       OpHelp("output=r[P1]"),
    /*  82 */ "ResultRow"        OpHelp("output=r[P1@P2]"),
    /*  83 */ "CollSeq"          OpHelp(""),
    /*  84 */ "AddImm"           OpHelp("r[P1]=r[P1]+P2"),
    /*  85 */ "RealAffinity"     OpHelp(""),
    /*  86 */ "Cast"             OpHelp("affinity(r[P1])"),
    /*  87 */ "Permutation"      OpHelp(""),
    /*  88 */ "Compare"          OpHelp("r[P1@P3] <-> r[P2@P3]"),
    /*  89 */ "IsTrue"           OpHelp("r[P2] = coalesce(r[P1]==TRUE,P3) ^ P4"),
    /*  90 */ "ZeroOrNull"       OpHelp("r[P2] = 0 OR NULL"),
    /*  91 */ "Offset"           OpHelp("r[P3] = sqlite_offset(P1)"),
    /*  92 */ "Column"           OpHelp("r[P3]=PX"),
    /*  93 */ "TypeCheck"        OpHelp("typecheck(r[P1@P2])"),
    /*  94 */ "Affinity"         OpHelp("affinity(r[P1@P2])"),
    /*  95 */ "MakeRecord"       OpHelp("r[P3]=mkrec(r[P1@P2])"),
    /*  96 */ "Count"            OpHelp("r[P2]=count()"),
    /*  97 */ "ReadCookie"       OpHelp(""),
    /*  98 */ "SetCookie"        OpHelp(""),
    /*  99 */ "ReopenIdx"        OpHelp("root=P2 iDb=P3"),
    /* 100 */ "OpenRead"         OpHelp("root=P2 iDb=P3"),
    /* 101 */ "OpenWrite"        OpHelp("root=P2 iDb=P3"),


    /* 102 */ "BitAnd"           OpHelp("r[P3]=r[P1]&r[P2]"),
    /* 103 */ "BitOr"            OpHelp("r[P3]=r[P1]|r[P2]"),
    /* 104 */ "ShiftLeft"        OpHelp("r[P3]=r[P2]<<r[P1]"),
    /* 105 */ "ShiftRight"       OpHelp("r[P3]=r[P2]>>r[P1]"),
    /* 106 */ "Add"              OpHelp("r[P3]=r[P1]+r[P2]"),
    /* 107 */ "Subtract"         OpHelp("r[P3]=r[P2]-r[P1]"),
    /* 108 */ "Multiply"         OpHelp("r[P3]=r[P1]*r[P2]"),
    /* 109 */ "Divide"           OpHelp("r[P3]=r[P2]/r[P1]"),
    /* 110 */ "Remainder"        OpHelp("r[P3]=r[P2]%r[P1]"),
    /* 111 */ "Concat"           OpHelp("r[P3]=r[P2]+r[P1]"),
    /* 112 */ "OpenDup"          OpHelp(""),
    /* 113 */ "BitNot"           OpHelp("r[P2]= ~r[P1]"),
    /* 114 */ "OpenAutoindex"    OpHelp("nColumn=P2"),
    /* 115 */ "OpenEphemeral"    OpHelp("nColumn=P2"),
    /* 116 */ "String8"          OpHelp("r[P2]='P4'"),
    /* 117 */ "SorterOpen"       OpHelp(""),
    /* 118 */ "SequenceTest"     OpHelp("if( cursor[P1].ctr++ ) pc = P2"),
    /* 119 */ "OpenPseudo"       OpHelp("P3 columns in r[P2]"),
    /* 120 */ "Close"            OpHelp(""),
    /* 121 */ "ColumnsUsed"      OpHelp(""),
    /* 122 */ "SeekScan"         OpHelp("Scan-ahead up to P1 rows"),
    /* 123 */ "SeekHit"          OpHelp("set P2<=seekHit<=P3"),
    /* 124 */ "Sequence"         OpHelp("r[P2]=cursor[P1].ctr++"),
    /* 125 */ "NewRowid"         OpHelp("r[P2]=rowid"),
    /* 126 */ "Insert"           OpHelp("intkey=r[P3] data=r[P2]"),
    /* 127 */ "RowCell"          OpHelp(""),
    /* 128 */ "Delete"           OpHelp(""),
    /* 129 */ "ResetCount"       OpHelp(""),
    /* 130 */ "SorterCompare"    OpHelp("if key(P1)!=trim(r[P3],P4) goto P2"),
    /* 131 */ "SorterData"       OpHelp("r[P2]=data"),
    /* 132 */ "RowData"          OpHelp("r[P2]=data"),
    /* 133 */ "Rowid"            OpHelp("r[P2]=rowid"),
    /* 134 */ "NullRow"          OpHelp(""),
    /* 135 */ "SeekEnd"          OpHelp(""),
    /* 136 */ "IdxInsert"        OpHelp("key=r[P2]"),
    /* 137 */ "SorterInsert"     OpHelp("key=r[P2]"),
    /* 138 */ "IdxDelete"        OpHelp("key=r[P2@P3]"),
    /* 139 */ "DeferredSeek"     OpHelp("Move P3 to P1.rowid if needed"),
    /* 140 */ "IdxRowid"         OpHelp("r[P2]=rowid"),
    /* 141 */ "FinishSeek"       OpHelp(""),
    /* 142 */ "Destroy"          OpHelp(""),
    /* 143 */ "Clear"            OpHelp(""),
    /* 144 */ "ResetSorter"      OpHelp(""),
    /* 145 */ "CreateBtree"      OpHelp("r[P2]=root iDb=P1 flags=P3"),
    /* 146 */ "SqlExec"          OpHelp(""),
    /* 147 */ "ParseSchema"      OpHelp(""),
    /* 148 */ "LoadAnalysis"     OpHelp(""),
    /* 149 */ "DropTable"        OpHelp(""),
    /* 150 */ "DropIndex"        OpHelp(""),
    /* 151 */ "DropTrigger"      OpHelp(""),


    /* 152 */ "Real"             OpHelp("r[P2]=P4"),
    /* 153 */ "IntegrityCk"      OpHelp(""),
    /* 154 */ "RowSetAdd"        OpHelp("rowset(P1)=r[P2]"),
    /* 155 */ "Param"            OpHelp(""),
    /* 156 */ "FkCounter"        OpHelp("fkctr[P1]+=P2"),
    /* 157 */ "MemMax"           OpHelp("r[P1]=max(r[P1],r[P2])"),
    /* 158 */ "OffsetLimit"      OpHelp("if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1)"),
    /* 159 */ "AggInverse"       OpHelp("accum=r[P3] inverse(r[P2@P5])"),
    /* 160 */ "AggStep"          OpHelp("accum=r[P3] step(r[P2@P5])"),
    /* 161 */ "AggStep1"         OpHelp("accum=r[P3] step(r[P2@P5])"),
    /* 162 */ "AggValue"         OpHelp("r[P3]=value N=P2"),
    /* 163 */ "AggFinal"         OpHelp("accum=r[P1] N=P2"),
    /* 164 */ "Expire"           OpHelp(""),
    /* 165 */ "CursorLock"       OpHelp(""),
    /* 166 */ "CursorUnlock"     OpHelp(""),
    /* 167 */ "TableLock"        OpHelp("iDb=P1 root=P2 write=P3"),
    /* 168 */ "VBegin"           OpHelp(""),
    /* 169 */ "VCreate"          OpHelp(""),
    /* 170 */ "VDestroy"         OpHelp(""),
    /* 171 */ "VOpen"            OpHelp(""),
    /* 172 */ "VColumn"          OpHelp("r[P3]=vcolumn(P2)"),
    /* 173 */ "VRename"          OpHelp(""),
    /* 174 */ "Pagecount"        OpHelp(""),
    /* 175 */ "MaxPgcnt"         OpHelp(""),
    /* 176 */ "Trace"            OpHelp(""),
    /* 177 */ "CursorHint"       OpHelp(""),
    /* 178 */ "ReleaseReg"       OpHelp("release r[P1@P2] mask P3"),
    /* 179 */ "Noop"             OpHelp(""),
    /* 180 */ "Explain"          OpHelp(""),
    /* 181 */ "Abortable"        OpHelp(""),
  };
  return azName[i];
}
#endif

/************** End of opcodes.c *********************************************/
/************** Begin file os_unix.c *****************************************/
49844
49845
49846
49847
49848
49849
49850

49851
49852
49853
49854
49855


49856
49857
49858
49859
49860
49861
49862
*/
static int numberOfCachePages(PCache *p){
  if( p->szCache>=0 ){
    /* IMPLEMENTATION-OF: R-42059-47211 If the argument N is positive then the
    ** suggested cache size is set to N. */
    return p->szCache;
  }else{

    /* IMPLEMANTATION-OF: R-59858-46238 If the argument N is negative, then the
    ** number of cache pages is adjusted to be a number of pages that would
    ** use approximately abs(N*1024) bytes of memory based on the current
    ** page size. */
    return (int)((-1024*(i64)p->szCache)/(p->szPage+p->szExtra));


  }
}

/*************************************************** General Interfaces ******
**
** Initialize and shutdown the page cache subsystem. Neither of these
** functions are threadsafe.







>




|
>
>







49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
*/
static int numberOfCachePages(PCache *p){
  if( p->szCache>=0 ){
    /* IMPLEMENTATION-OF: R-42059-47211 If the argument N is positive then the
    ** suggested cache size is set to N. */
    return p->szCache;
  }else{
    i64 n;
    /* IMPLEMANTATION-OF: R-59858-46238 If the argument N is negative, then the
    ** number of cache pages is adjusted to be a number of pages that would
    ** use approximately abs(N*1024) bytes of memory based on the current
    ** page size. */
    n = ((-1024*(i64)p->szCache)/(p->szPage+p->szExtra));
    if( n>1000000000 ) n = 1000000000;
    return (int)n;
  }
}

/*************************************************** General Interfaces ******
**
** Initialize and shutdown the page cache subsystem. Neither of these
** functions are threadsafe.
51303
51304
51305
51306
51307
51308
51309


51310
51311
51312




51313
51314
51315
51316
51317
51318
51319
51320
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338
/*
** Implementation of the sqlite3_pcache.xCachesize method.
**
** Configure the cache_size limit for a cache.
*/
static void pcache1Cachesize(sqlite3_pcache *p, int nMax){
  PCache1 *pCache = (PCache1 *)p;


  if( pCache->bPurgeable ){
    PGroup *pGroup = pCache->pGroup;
    pcache1EnterMutex(pGroup);




    pGroup->nMaxPage += (nMax - pCache->nMax);
    pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
    pCache->nMax = nMax;
    pCache->n90pct = pCache->nMax*9/10;
    pcache1EnforceMaxPage(pCache);
    pcache1LeaveMutex(pGroup);
  }
}

/*
** Implementation of the sqlite3_pcache.xShrink method.
**
** Free up as much memory as possible.
*/
static void pcache1Shrink(sqlite3_pcache *p){
  PCache1 *pCache = (PCache1*)p;
  if( pCache->bPurgeable ){
    PGroup *pGroup = pCache->pGroup;
    int savedMaxPage;
    pcache1EnterMutex(pGroup);
    savedMaxPage = pGroup->nMaxPage;
    pGroup->nMaxPage = 0;
    pcache1EnforceMaxPage(pCache);
    pGroup->nMaxPage = savedMaxPage;
    pcache1LeaveMutex(pGroup);
  }







>
>



>
>
>
>
|

|















|







51345
51346
51347
51348
51349
51350
51351
51352
51353
51354
51355
51356
51357
51358
51359
51360
51361
51362
51363
51364
51365
51366
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383
51384
51385
51386
/*
** Implementation of the sqlite3_pcache.xCachesize method.
**
** Configure the cache_size limit for a cache.
*/
static void pcache1Cachesize(sqlite3_pcache *p, int nMax){
  PCache1 *pCache = (PCache1 *)p;
  u32 n;
  assert( nMax>=0 );
  if( pCache->bPurgeable ){
    PGroup *pGroup = pCache->pGroup;
    pcache1EnterMutex(pGroup);
    n = (u32)nMax;
    if( n > 0x7fff0000 - pGroup->nMaxPage + pCache->nMax ){
      n = 0x7fff0000 - pGroup->nMaxPage + pCache->nMax;
    }
    pGroup->nMaxPage += (n - pCache->nMax);
    pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
    pCache->nMax = n;
    pCache->n90pct = pCache->nMax*9/10;
    pcache1EnforceMaxPage(pCache);
    pcache1LeaveMutex(pGroup);
  }
}

/*
** Implementation of the sqlite3_pcache.xShrink method.
**
** Free up as much memory as possible.
*/
static void pcache1Shrink(sqlite3_pcache *p){
  PCache1 *pCache = (PCache1*)p;
  if( pCache->bPurgeable ){
    PGroup *pGroup = pCache->pGroup;
    unsigned int savedMaxPage;
    pcache1EnterMutex(pGroup);
    savedMaxPage = pGroup->nMaxPage;
    pGroup->nMaxPage = 0;
    pcache1EnforceMaxPage(pCache);
    pGroup->nMaxPage = savedMaxPage;
    pcache1LeaveMutex(pGroup);
  }
68478
68479
68480
68481
68482
68483
68484
68485
68486
68487
68488
68489
68490
68491
68492
    if( page1[18]>2 ){
      pBt->btsFlags |= BTS_READ_ONLY;
    }
    if( page1[19]>2 ){
      goto page1_init_failed;
    }

    /* If the write version is set to 2, this database should be accessed
    ** in WAL mode. If the log is not already open, open it now. Then
    ** return SQLITE_OK and return without populating BtShared.pPage1.
    ** The caller detects this and calls this function again. This is
    ** required as the version of page 1 currently in the page1 buffer
    ** may not be the latest version - there may be a newer one in the log
    ** file.
    */







|







68526
68527
68528
68529
68530
68531
68532
68533
68534
68535
68536
68537
68538
68539
68540
    if( page1[18]>2 ){
      pBt->btsFlags |= BTS_READ_ONLY;
    }
    if( page1[19]>2 ){
      goto page1_init_failed;
    }

    /* If the read version is set to 2, this database should be accessed
    ** in WAL mode. If the log is not already open, open it now. Then
    ** return SQLITE_OK and return without populating BtShared.pPage1.
    ** The caller detects this and calls this function again. This is
    ** required as the version of page 1 currently in the page1 buffer
    ** may not be the latest version - there may be a newer one in the log
    ** file.
    */
81881
81882
81883
81884
81885
81886
81887
81888
81889
81890
81891
81892
81893
81894
81895
81896
81897
#endif

/*
** This routine is called the when a VDBE tries to halt.  If the VDBE
** has made changes and is in autocommit mode, then commit those
** changes.  If a rollback is needed, then do the rollback.
**
** This routine is the only way to move the state of a VM from
** SQLITE_MAGIC_RUN to SQLITE_MAGIC_HALT.  It is harmless to
** call this on a VM that is in the SQLITE_MAGIC_HALT state.
**
** Return an error code.  If the commit could not complete because of
** lock contention, return SQLITE_BUSY.  If SQLITE_BUSY is returned, it
** means the close did not happen and needs to be repeated.
*/
SQLITE_PRIVATE int sqlite3VdbeHalt(Vdbe *p){
  int rc;                         /* Used to store transient return codes */







|
|
|







81929
81930
81931
81932
81933
81934
81935
81936
81937
81938
81939
81940
81941
81942
81943
81944
81945
#endif

/*
** This routine is called the when a VDBE tries to halt.  If the VDBE
** has made changes and is in autocommit mode, then commit those
** changes.  If a rollback is needed, then do the rollback.
**
** This routine is the only way to move the sqlite3eOpenState of a VM from
** SQLITE_STATE_RUN to SQLITE_STATE_HALT.  It is harmless to
** call this on a VM that is in the SQLITE_STATE_HALT state.
**
** Return an error code.  If the commit could not complete because of
** lock contention, return SQLITE_BUSY.  If SQLITE_BUSY is returned, it
** means the close did not happen and needs to be repeated.
*/
SQLITE_PRIVATE int sqlite3VdbeHalt(Vdbe *p){
  int rc;                         /* Used to store transient return codes */
87049
87050
87051
87052
87053
87054
87055













87056
87057
87058
87059
87060
87061
87062
    return out2PrereleaseWithClear(pOut);
  }else{
    pOut->flags = MEM_Int;
    return pOut;
  }
}















/*
** Execute as much of a VDBE program as we can.
** This is the core of sqlite3_step().
*/
SQLITE_PRIVATE int sqlite3VdbeExec(
  Vdbe *p                    /* The VDBE */







>
>
>
>
>
>
>
>
>
>
>
>
>







87097
87098
87099
87100
87101
87102
87103
87104
87105
87106
87107
87108
87109
87110
87111
87112
87113
87114
87115
87116
87117
87118
87119
87120
87121
87122
87123
    return out2PrereleaseWithClear(pOut);
  }else{
    pOut->flags = MEM_Int;
    return pOut;
  }
}

/*
** Return the symbolic name for the data type of a pMem
*/
static const char *vdbeMemTypeName(Mem *pMem){
  static const char *azTypes[] = {
      /* SQLITE_INTEGER */ "INT",
      /* SQLITE_FLOAT   */ "REAL",
      /* SQLITE_TEXT    */ "TEXT",
      /* SQLITE_BLOB    */ "BLOB",
      /* SQLITE_NULL    */ "NULL"
  };
  return azTypes[sqlite3_value_type(pMem)-1];
}

/*
** Execute as much of a VDBE program as we can.
** This is the core of sqlite3_step().
*/
SQLITE_PRIVATE int sqlite3VdbeExec(
  Vdbe *p                    /* The VDBE */
88879
88880
88881
88882
88883
88884
88885
















88886
88887
88888
88889
88890
88891
88892
  pIn1 = &aMem[pOp->p1];
  VdbeBranchTaken( (pIn1->flags & MEM_Null)!=0, 2);
  if( (pIn1->flags & MEM_Null)!=0 ){
    goto jump_to_p2;
  }
  break;
}

















/* Opcode: ZeroOrNull P1 P2 P3 * *
** Synopsis: r[P2] = 0 OR NULL
**
** If all both registers P1 and P3 are NOT NULL, then store a zero in
** register P2.  If either registers P1 or P3 are NULL then put
** a NULL in register P2.







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







88940
88941
88942
88943
88944
88945
88946
88947
88948
88949
88950
88951
88952
88953
88954
88955
88956
88957
88958
88959
88960
88961
88962
88963
88964
88965
88966
88967
88968
88969
  pIn1 = &aMem[pOp->p1];
  VdbeBranchTaken( (pIn1->flags & MEM_Null)!=0, 2);
  if( (pIn1->flags & MEM_Null)!=0 ){
    goto jump_to_p2;
  }
  break;
}

/* Opcode: IsNullOrType P1 P2 P3 * *
** Synopsis: if typeof(r[P1]) IN (P3,5) goto P2
**
** Jump to P2 if the value in register P1 is NULL or has a datatype P3.
** P3 is an integer which should be one of SQLITE_INTEGER, SQLITE_FLOAT,
** SQLITE_BLOB, SQLITE_NULL, or SQLITE_TEXT.
*/
case OP_IsNullOrType: {      /* jump, in1 */
  int doTheJump;
  pIn1 = &aMem[pOp->p1];
  doTheJump = (pIn1->flags & MEM_Null)!=0 || sqlite3_value_type(pIn1)==pOp->p3;
  VdbeBranchTaken( doTheJump, 2);
  if( doTheJump ) goto jump_to_p2;
  break;
}

/* Opcode: ZeroOrNull P1 P2 P3 * *
** Synopsis: r[P2] = 0 OR NULL
**
** If all both registers P1 and P3 are NOT NULL, then store a zero in
** register P2.  If either registers P1 or P3 are NULL then put
** a NULL in register P2.
89247
89248
89249
89250
89251
89252
89253






























































































89254
89255
89256
89257
89258
89259
89260
    pOp = &aOp[aOp[0].p3-1];
    break;
  }else{
    rc = SQLITE_CORRUPT_BKPT;
    goto abort_due_to_error;
  }
}































































































/* Opcode: Affinity P1 P2 * P4 *
** Synopsis: affinity(r[P1@P2])
**
** Apply affinities to a range of P2 registers starting with P1.
**
** P4 is a string that is P2 characters long. The N-th character of the







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







89324
89325
89326
89327
89328
89329
89330
89331
89332
89333
89334
89335
89336
89337
89338
89339
89340
89341
89342
89343
89344
89345
89346
89347
89348
89349
89350
89351
89352
89353
89354
89355
89356
89357
89358
89359
89360
89361
89362
89363
89364
89365
89366
89367
89368
89369
89370
89371
89372
89373
89374
89375
89376
89377
89378
89379
89380
89381
89382
89383
89384
89385
89386
89387
89388
89389
89390
89391
89392
89393
89394
89395
89396
89397
89398
89399
89400
89401
89402
89403
89404
89405
89406
89407
89408
89409
89410
89411
89412
89413
89414
89415
89416
89417
89418
89419
89420
89421
89422
89423
89424
89425
89426
89427
89428
89429
89430
89431
    pOp = &aOp[aOp[0].p3-1];
    break;
  }else{
    rc = SQLITE_CORRUPT_BKPT;
    goto abort_due_to_error;
  }
}

/* Opcode: TypeCheck P1 P2 * P4 *
** Synopsis: typecheck(r[P1@P2])
**
** Apply affinities to the range of P2 registers beginning with P1.
** Take the affinities from the Table object in P4.  If any value
** cannot be coerced into the correct type, then raise an error.
**
** This opcode is similar to OP_Affinity except that this opcode
** forces the register type to the Table column type.  This is used
** to implement "strict affinity".
**
** Preconditions:
**
** <ul>
** <li> P2 should be the number of non-virtual columns in the
**      table of P4.
** <li> Table P4 should be a STRICT table.
** </ul>
**
** If any precondition is false, an assertion fault occurs.
*/
case OP_TypeCheck: {
  Table *pTab;
  Column *aCol;
  int i;

  assert( pOp->p4type==P4_TABLE );
  pTab = pOp->p4.pTab;
  assert( pTab->tabFlags & TF_Strict );
  assert( pTab->nNVCol==pOp->p2 );
  aCol = pTab->aCol;
  pIn1 = &aMem[pOp->p1];
  for(i=0; i<pTab->nCol; i++){
    if( aCol[i].colFlags & COLFLAG_VIRTUAL ) continue;
    assert( pIn1 < &aMem[pOp->p1+pOp->p2] );
    applyAffinity(pIn1, aCol[i].affinity, encoding);
    if( (pIn1->flags & MEM_Null)==0 ){
      switch( aCol[i].eCType ){
        case COLTYPE_BLOB: {
          if( (pIn1->flags & MEM_Blob)==0 ) goto vdbe_type_error;
          break;
        }
        case COLTYPE_INTEGER:
        case COLTYPE_INT: {
          if( (pIn1->flags & MEM_Int)==0 ) goto vdbe_type_error;
          break;
        }
        case COLTYPE_TEXT: {
          if( (pIn1->flags & MEM_Str)==0 ) goto vdbe_type_error;
          break;
        }
        case COLTYPE_REAL: {
          if( pIn1->flags & MEM_Int ){
            /* When applying REAL affinity, if the result is still an MEM_Int
            ** that will fit in 6 bytes, then change the type to MEM_IntReal
            ** so that we keep the high-resolution integer value but know that
            ** the type really wants to be REAL. */
            testcase( pIn1->u.i==140737488355328LL );
            testcase( pIn1->u.i==140737488355327LL );
            testcase( pIn1->u.i==-140737488355328LL );
            testcase( pIn1->u.i==-140737488355329LL );
            if( pIn1->u.i<=140737488355327LL && pIn1->u.i>=-140737488355328LL){
              pIn1->flags |= MEM_IntReal;
              pIn1->flags &= ~MEM_Int;
            }else{
              pIn1->u.r = (double)pIn1->u.i;
              pIn1->flags |= MEM_Real;
              pIn1->flags &= ~MEM_Int;
            }
          }else if( (pIn1->flags & MEM_Real)==0 ){
            goto vdbe_type_error;
          }
          break;
        }
        default: {
          /* COLTYPE_ANY.  Accept anything. */
          break;
        }
      }
    }
    REGISTER_TRACE((int)(pIn1-aMem), pIn1);
    pIn1++;
  }
  assert( pIn1 == &aMem[pOp->p1+pOp->p2] );
  break;

vdbe_type_error:
  sqlite3VdbeError(p, "cannot store %s value in %s column %s.%s",
     vdbeMemTypeName(pIn1), sqlite3StdType[aCol[i].eCType-1],
     pTab->zName, aCol[i].zCnName);
  rc = SQLITE_CONSTRAINT_DATATYPE;
  goto abort_due_to_error;
}

/* Opcode: Affinity P1 P2 * P4 *
** Synopsis: affinity(r[P1@P2])
**
** Apply affinities to a range of P2 registers starting with P1.
**
** P4 is a string that is P2 characters long. The N-th character of the
92298
92299
92300
92301
92302
92303
92304
92305

92306
92307
92308
92309
92310
92311
92312
** index opened by cursor P1.
**
** If P5 is not zero, then raise an SQLITE_CORRUPT_INDEX error
** if no matching index entry is found.  This happens when running
** an UPDATE or DELETE statement and the index entry to be updated
** or deleted is not found.  For some uses of IdxDelete
** (example:  the EXCEPT operator) it does not matter that no matching
** entry is found.  For those cases, P5 is zero.

*/
case OP_IdxDelete: {
  VdbeCursor *pC;
  BtCursor *pCrsr;
  int res;
  UnpackedRecord r;








|
>







92469
92470
92471
92472
92473
92474
92475
92476
92477
92478
92479
92480
92481
92482
92483
92484
** index opened by cursor P1.
**
** If P5 is not zero, then raise an SQLITE_CORRUPT_INDEX error
** if no matching index entry is found.  This happens when running
** an UPDATE or DELETE statement and the index entry to be updated
** or deleted is not found.  For some uses of IdxDelete
** (example:  the EXCEPT operator) it does not matter that no matching
** entry is found.  For those cases, P5 is zero.  Also, do not raise
** this (self-correcting and non-critical) error if in writable_schema mode.
*/
case OP_IdxDelete: {
  VdbeCursor *pC;
  BtCursor *pCrsr;
  int res;
  UnpackedRecord r;

92324
92325
92326
92327
92328
92329
92330
92331
92332
92333
92334
92335
92336
92337
92338
  r.default_rc = 0;
  r.aMem = &aMem[pOp->p2];
  rc = sqlite3BtreeIndexMoveto(pCrsr, &r, &res);
  if( rc ) goto abort_due_to_error;
  if( res==0 ){
    rc = sqlite3BtreeDelete(pCrsr, BTREE_AUXDELETE);
    if( rc ) goto abort_due_to_error;
  }else if( pOp->p5 ){
    rc = sqlite3ReportError(SQLITE_CORRUPT_INDEX, __LINE__, "index corruption");
    goto abort_due_to_error;
  }
  assert( pC->deferredMoveto==0 );
  pC->cacheStatus = CACHE_STALE;
  pC->seekResult = 0;
  break;







|







92496
92497
92498
92499
92500
92501
92502
92503
92504
92505
92506
92507
92508
92509
92510
  r.default_rc = 0;
  r.aMem = &aMem[pOp->p2];
  rc = sqlite3BtreeIndexMoveto(pCrsr, &r, &res);
  if( rc ) goto abort_due_to_error;
  if( res==0 ){
    rc = sqlite3BtreeDelete(pCrsr, BTREE_AUXDELETE);
    if( rc ) goto abort_due_to_error;
  }else if( pOp->p5 && !sqlite3WritableSchema(db) ){
    rc = sqlite3ReportError(SQLITE_CORRUPT_INDEX, __LINE__, "index corruption");
    goto abort_due_to_error;
  }
  assert( pC->deferredMoveto==0 );
  pC->cacheStatus = CACHE_STALE;
  pC->seekResult = 0;
  break;
113940
113941
113942
113943
113944
113945
113946
113947
113948
113949
113950
113951
113952
113953
113954
  pCol->hName = hName;
  sqlite3ColumnPropertiesFromName(p, pCol);

  if( sType.n==0 ){
    /* If there is no type specified, columns have the default affinity
    ** 'BLOB' with a default size of 4 bytes. */
    pCol->affinity = affinity;
    pCol->eType = eType;
    pCol->szEst = szEst;
#ifdef SQLITE_ENABLE_SORTER_REFERENCES
    if( affinity==SQLITE_AFF_BLOB ){
      if( 4>=sqlite3GlobalConfig.szSorterRef ){
        pCol->colFlags |= COLFLAG_SORTERREF;
      }
    }







|







114112
114113
114114
114115
114116
114117
114118
114119
114120
114121
114122
114123
114124
114125
114126
  pCol->hName = hName;
  sqlite3ColumnPropertiesFromName(p, pCol);

  if( sType.n==0 ){
    /* If there is no type specified, columns have the default affinity
    ** 'BLOB' with a default size of 4 bytes. */
    pCol->affinity = affinity;
    pCol->eCType = eType;
    pCol->szEst = szEst;
#ifdef SQLITE_ENABLE_SORTER_REFERENCES
    if( affinity==SQLITE_AFF_BLOB ){
      if( 4>=sqlite3GlobalConfig.szSorterRef ){
        pCol->colFlags |= COLFLAG_SORTERREF;
      }
    }
114235
114236
114237
114238
114239
114240
114241
114242
114243
114244
114245
114246
114247
114248
114249
          }
        }
      }
    }
  }
  if( nTerm==1
   && pCol
   && pCol->eType==COLTYPE_INTEGER
   && sortOrder!=SQLITE_SO_DESC
  ){
    if( IN_RENAME_OBJECT && pList ){
      Expr *pCExpr = sqlite3ExprSkipCollate(pList->a[0].pExpr);
      sqlite3RenameTokenRemap(pParse, &pTab->iPKey, pCExpr);
    }
    pTab->iPKey = iCol;







|







114407
114408
114409
114410
114411
114412
114413
114414
114415
114416
114417
114418
114419
114420
114421
          }
        }
      }
    }
  }
  if( nTerm==1
   && pCol
   && pCol->eCType==COLTYPE_INTEGER
   && sortOrder!=SQLITE_SO_DESC
  ){
    if( IN_RENAME_OBJECT && pList ){
      Expr *pCExpr = sqlite3ExprSkipCollate(pList->a[0].pExpr);
      sqlite3RenameTokenRemap(pParse, &pTab->iPKey, pCExpr);
    }
    pTab->iPKey = iCol;
114707
114708
114709
114710
114711
114712
114713
114714


114715
114716
114717
114718
114719
114720
114721
  sqlite3 *db = pParse->db;
  Vdbe *v = pParse->pVdbe;

  /* Mark every PRIMARY KEY column as NOT NULL (except for imposter tables)
  */
  if( !db->init.imposterTable ){
    for(i=0; i<pTab->nCol; i++){
      if( (pTab->aCol[i].colFlags & COLFLAG_PRIMKEY)!=0 ){


        pTab->aCol[i].notNull = OE_Abort;
      }
    }
    pTab->tabFlags |= TF_HasNotNull;
  }

  /* Convert the P3 operand of the OP_CreateBtree opcode from BTREE_INTKEY







|
>
>







114879
114880
114881
114882
114883
114884
114885
114886
114887
114888
114889
114890
114891
114892
114893
114894
114895
  sqlite3 *db = pParse->db;
  Vdbe *v = pParse->pVdbe;

  /* Mark every PRIMARY KEY column as NOT NULL (except for imposter tables)
  */
  if( !db->init.imposterTable ){
    for(i=0; i<pTab->nCol; i++){
      if( (pTab->aCol[i].colFlags & COLFLAG_PRIMKEY)!=0
       && (pTab->aCol[i].notNull==OE_None)
      ){
        pTab->aCol[i].notNull = OE_Abort;
      }
    }
    pTab->tabFlags |= TF_HasNotNull;
  }

  /* Convert the P3 operand of the OP_CreateBtree opcode from BTREE_INTKEY
114940
114941
114942
114943
114944
114945
114946
114947
114948
114949
114950
114951
114952
114953
114954
** "CREATE TABLE ... AS SELECT ..." statement.  The column names of
** the new table will match the result set of the SELECT.
*/
SQLITE_PRIVATE void sqlite3EndTable(
  Parse *pParse,          /* Parse context */
  Token *pCons,           /* The ',' token after the last column defn. */
  Token *pEnd,            /* The ')' before options in the CREATE TABLE */
  u8 tabOpts,             /* Extra table options. Usually 0. */
  Select *pSelect         /* Select from a "CREATE ... AS SELECT" */
){
  Table *p;                 /* The new table */
  sqlite3 *db = pParse->db; /* The database connection */
  int iDb;                  /* Database in which the table lives */
  Index *pIdx;              /* An implied index of the table */








|







115114
115115
115116
115117
115118
115119
115120
115121
115122
115123
115124
115125
115126
115127
115128
** "CREATE TABLE ... AS SELECT ..." statement.  The column names of
** the new table will match the result set of the SELECT.
*/
SQLITE_PRIVATE void sqlite3EndTable(
  Parse *pParse,          /* Parse context */
  Token *pCons,           /* The ',' token after the last column defn. */
  Token *pEnd,            /* The ')' before options in the CREATE TABLE */
  u32 tabOpts,            /* Extra table options. Usually 0. */
  Select *pSelect         /* Select from a "CREATE ... AS SELECT" */
){
  Table *p;                 /* The new table */
  sqlite3 *db = pParse->db; /* The database connection */
  int iDb;                  /* Database in which the table lives */
  Index *pIdx;              /* An implied index of the table */

114975
114976
114977
114978
114979
114980
114981






































114982
114983
114984
114985
114986
114987
114988
    if( pSelect ){
      sqlite3ErrorMsg(pParse, "");
      return;
    }
    p->tnum = db->init.newTnum;
    if( p->tnum==1 ) p->tabFlags |= TF_Readonly;
  }







































  assert( (p->tabFlags & TF_HasPrimaryKey)==0
       || p->iPKey>=0 || sqlite3PrimaryKeyIndex(p)!=0 );
  assert( (p->tabFlags & TF_HasPrimaryKey)!=0
       || (p->iPKey<0 && sqlite3PrimaryKeyIndex(p)==0) );

  /* Special processing for WITHOUT ROWID Tables */







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







115149
115150
115151
115152
115153
115154
115155
115156
115157
115158
115159
115160
115161
115162
115163
115164
115165
115166
115167
115168
115169
115170
115171
115172
115173
115174
115175
115176
115177
115178
115179
115180
115181
115182
115183
115184
115185
115186
115187
115188
115189
115190
115191
115192
115193
115194
115195
115196
115197
115198
115199
115200
    if( pSelect ){
      sqlite3ErrorMsg(pParse, "");
      return;
    }
    p->tnum = db->init.newTnum;
    if( p->tnum==1 ) p->tabFlags |= TF_Readonly;
  }

  /* Special processing for tables that include the STRICT keyword:
  **
  **   *  Do not allow custom column datatypes.  Every column must have
  **      a datatype that is one of INT, INTEGER, REAL, TEXT, or BLOB.
  **
  **   *  If a PRIMARY KEY is defined, other than the INTEGER PRIMARY KEY,
  **      then all columns of the PRIMARY KEY must have a NOT NULL
  **      constraint.
  */
  if( tabOpts & TF_Strict ){
    int ii;
    p->tabFlags |= TF_Strict;
    for(ii=0; ii<p->nCol; ii++){
      Column *pCol = &p->aCol[ii];
      if( pCol->eCType==COLTYPE_CUSTOM ){
        if( pCol->colFlags & COLFLAG_HASTYPE ){
          sqlite3ErrorMsg(pParse,
            "unknown datatype for %s.%s: \"%s\"",
            p->zName, pCol->zCnName, sqlite3ColumnType(pCol, "")
          );
        }else{
          sqlite3ErrorMsg(pParse, "missing datatype for %s.%s",
                          p->zName, pCol->zCnName);
        }
        return;
      }else if( pCol->eCType==COLTYPE_ANY ){
        pCol->affinity = SQLITE_AFF_BLOB;
      }
      if( (pCol->colFlags & COLFLAG_PRIMKEY)!=0
       && p->iPKey!=ii
       && pCol->notNull == OE_None
      ){
        pCol->notNull = OE_Abort;
        p->tabFlags |= TF_HasNotNull;
      }
    }
  }

  assert( (p->tabFlags & TF_HasPrimaryKey)==0
       || p->iPKey>=0 || sqlite3PrimaryKeyIndex(p)!=0 );
  assert( (p->tabFlags & TF_HasPrimaryKey)!=0
       || (p->iPKey<0 && sqlite3PrimaryKeyIndex(p)==0) );

  /* Special processing for WITHOUT ROWID Tables */
123284
123285
123286
123287
123288
123289
123290






123291
123292
123293
123294


123295
123296
123297
123298
123299
123300
123301
123302
123303
123304
123305
123306
123307
123308












123309
123310
123311




















123312
123313
123314
123315
123316
123317
123318
123319
    pIdx->zColAff[n] = 0;
  }

  return pIdx->zColAff;
}

/*






** Compute the affinity string for table pTab, if it has not already been
** computed.  As an optimization, omit trailing SQLITE_AFF_BLOB affinities.
**
** If the affinity exists (if it is not entirely SQLITE_AFF_BLOB values) and


** if iReg>0 then code an OP_Affinity opcode that will set the affinities
** for register iReg and following.  Or if affinities exists and iReg==0,
** then just set the P4 operand of the previous opcode (which should  be
** an OP_MakeRecord) to the affinity string.
**
** A column affinity string has one character per column:
**
**  Character      Column affinity
**  ------------------------------
**  'A'            BLOB
**  'B'            TEXT
**  'C'            NUMERIC
**  'D'            INTEGER
**  'E'            REAL












*/
SQLITE_PRIVATE void sqlite3TableAffinity(Vdbe *v, Table *pTab, int iReg){
  int i, j;




















  char *zColAff = pTab->zColAff;
  if( zColAff==0 ){
    sqlite3 *db = sqlite3VdbeDb(v);
    zColAff = (char *)sqlite3DbMallocRaw(0, pTab->nCol+1);
    if( !zColAff ){
      sqlite3OomFault(db);
      return;
    }







>
>
>
>
>
>



|
>
>
|
|





|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>



>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|







123496
123497
123498
123499
123500
123501
123502
123503
123504
123505
123506
123507
123508
123509
123510
123511
123512
123513
123514
123515
123516
123517
123518
123519
123520
123521
123522
123523
123524
123525
123526
123527
123528
123529
123530
123531
123532
123533
123534
123535
123536
123537
123538
123539
123540
123541
123542
123543
123544
123545
123546
123547
123548
123549
123550
123551
123552
123553
123554
123555
123556
123557
123558
123559
123560
123561
123562
123563
123564
123565
123566
123567
123568
123569
123570
123571
    pIdx->zColAff[n] = 0;
  }

  return pIdx->zColAff;
}

/*
** Make changes to the evolving bytecode to do affinity transformations
** of values that are about to be gathered into a row for table pTab.
**
** For ordinary (legacy, non-strict) tables:
** -----------------------------------------
**
** Compute the affinity string for table pTab, if it has not already been
** computed.  As an optimization, omit trailing SQLITE_AFF_BLOB affinities.
**
** If the affinity string is empty (because it was all SQLITE_AFF_BLOB entries
** which were then optimized out) then this routine becomes a no-op.
**
** Otherwise if iReg>0 then code an OP_Affinity opcode that will set the
** affinities for register iReg and following.  Or if iReg==0,
** then just set the P4 operand of the previous opcode (which should  be
** an OP_MakeRecord) to the affinity string.
**
** A column affinity string has one character per column:
**
**    Character      Column affinity
**    ---------      ---------------
**    'A'            BLOB
**    'B'            TEXT
**    'C'            NUMERIC
**    'D'            INTEGER
**    'E'            REAL
**
** For STRICT tables:
** ------------------
**
** Generate an appropropriate OP_TypeCheck opcode that will verify the
** datatypes against the column definitions in pTab.  If iReg==0, that
** means an OP_MakeRecord opcode has already been generated and should be
** the last opcode generated.  The new OP_TypeCheck needs to be inserted
** before the OP_MakeRecord.  The new OP_TypeCheck should use the same
** register set as the OP_MakeRecord.  If iReg>0 then register iReg is
** the first of a series of registers that will form the new record.
** Apply the type checking to that array of registers.
*/
SQLITE_PRIVATE void sqlite3TableAffinity(Vdbe *v, Table *pTab, int iReg){
  int i, j;
  char *zColAff;
  if( pTab->tabFlags & TF_Strict ){
    if( iReg==0 ){
      /* Move the previous opcode (which should be OP_MakeRecord) forward
      ** by one slot and insert a new OP_TypeCheck where the current
      ** OP_MakeRecord is found */
      VdbeOp *pPrev;
      sqlite3VdbeAppendP4(v, pTab, P4_TABLE);
      pPrev = sqlite3VdbeGetOp(v, -1);
      assert( pPrev!=0 );
      assert( pPrev->opcode==OP_MakeRecord || sqlite3VdbeDb(v)->mallocFailed );
      pPrev->opcode = OP_TypeCheck;
      sqlite3VdbeAddOp3(v, OP_MakeRecord, pPrev->p1, pPrev->p2, pPrev->p3);
    }else{
      /* Insert an isolated OP_Typecheck */
      sqlite3VdbeAddOp2(v, OP_TypeCheck, iReg, pTab->nNVCol);
      sqlite3VdbeAppendP4(v, pTab, P4_TABLE);
    }
    return;
  }
  zColAff = pTab->zColAff;
  if( zColAff==0 ){
    sqlite3 *db = sqlite3VdbeDb(v);
    zColAff = (char *)sqlite3DbMallocRaw(0, pTab->nCol+1);
    if( !zColAff ){
      sqlite3OomFault(db);
      return;
    }
123331
123332
123333
123334
123335
123336
123337


123338
123339
123340
123341
123342
123343
123344
  }
  assert( zColAff!=0 );
  i = sqlite3Strlen30NN(zColAff);
  if( i ){
    if( iReg ){
      sqlite3VdbeAddOp4(v, OP_Affinity, iReg, i, 0, zColAff, i);
    }else{


      sqlite3VdbeChangeP4(v, -1, zColAff, i);
    }
  }
}

/*
** Return non-zero if the table pTab in database iDb or any of its indices







>
>







123583
123584
123585
123586
123587
123588
123589
123590
123591
123592
123593
123594
123595
123596
123597
123598
  }
  assert( zColAff!=0 );
  i = sqlite3Strlen30NN(zColAff);
  if( i ){
    if( iReg ){
      sqlite3VdbeAddOp4(v, OP_Affinity, iReg, i, 0, zColAff, i);
    }else{
      assert( sqlite3VdbeGetOp(v, -1)->opcode==OP_MakeRecord
              || sqlite3VdbeDb(v)->mallocFailed );
      sqlite3VdbeChangeP4(v, -1, zColAff, i);
    }
  }
}

/*
** Return non-zero if the table pTab in database iDb or any of its indices
125968
125969
125970
125971
125972
125973
125974



125975
125976
125977
125978
125979
125980
125981
    return 0;   /* tab2 may not be a view or virtual table */
  }
  if( pDest->nCol!=pSrc->nCol ){
    return 0;   /* Number of columns must be the same in tab1 and tab2 */
  }
  if( pDest->iPKey!=pSrc->iPKey ){
    return 0;   /* Both tables must have the same INTEGER PRIMARY KEY */



  }
  for(i=0; i<pDest->nCol; i++){
    Column *pDestCol = &pDest->aCol[i];
    Column *pSrcCol = &pSrc->aCol[i];
#ifdef SQLITE_ENABLE_HIDDEN_COLUMNS
    if( (db->mDbFlags & DBFLAG_Vacuum)==0
     && (pDestCol->colFlags | pSrcCol->colFlags) & COLFLAG_HIDDEN







>
>
>







126222
126223
126224
126225
126226
126227
126228
126229
126230
126231
126232
126233
126234
126235
126236
126237
126238
    return 0;   /* tab2 may not be a view or virtual table */
  }
  if( pDest->nCol!=pSrc->nCol ){
    return 0;   /* Number of columns must be the same in tab1 and tab2 */
  }
  if( pDest->iPKey!=pSrc->iPKey ){
    return 0;   /* Both tables must have the same INTEGER PRIMARY KEY */
  }
  if( (pDest->tabFlags & TF_Strict)!=0 && (pSrc->tabFlags & TF_Strict)==0 ){
    return 0;   /* Cannot feed from a non-strict into a strict table */
  }
  for(i=0; i<pDest->nCol; i++){
    Column *pDestCol = &pDest->aCol[i];
    Column *pSrcCol = &pSrc->aCol[i];
#ifdef SQLITE_ENABLE_HIDDEN_COLUMNS
    if( (db->mDbFlags & DBFLAG_Vacuum)==0
     && (pDestCol->colFlags | pSrcCol->colFlags) & COLFLAG_HIDDEN
130235
130236
130237
130238
130239
130240
130241

130242
130243
130244
130245
130246
130247
130248
      for(x=sqliteHashFirst(pTbls); x; x=sqliteHashNext(x)){
        Table *pTab = sqliteHashData(x);
        Index *pIdx, *pPk;
        Index *pPrior = 0;
        int loopTop;
        int iDataCur, iIdxCur;
        int r1 = -1;


        if( pTab->tnum<1 ) continue;  /* Skip VIEWs or VIRTUAL TABLEs */
        if( pObjTab && pObjTab!=pTab ) continue;
        pPk = HasRowid(pTab) ? 0 : sqlite3PrimaryKeyIndex(pTab);
        sqlite3OpenTableAndIndices(pParse, pTab, OP_OpenRead, 0,
                                   1, 0, &iDataCur, &iIdxCur);
        /* reg[7] counts the number of entries in the table.







>







130492
130493
130494
130495
130496
130497
130498
130499
130500
130501
130502
130503
130504
130505
130506
      for(x=sqliteHashFirst(pTbls); x; x=sqliteHashNext(x)){
        Table *pTab = sqliteHashData(x);
        Index *pIdx, *pPk;
        Index *pPrior = 0;
        int loopTop;
        int iDataCur, iIdxCur;
        int r1 = -1;
        int bStrict;

        if( pTab->tnum<1 ) continue;  /* Skip VIEWs or VIRTUAL TABLEs */
        if( pObjTab && pObjTab!=pTab ) continue;
        pPk = HasRowid(pTab) ? 0 : sqlite3PrimaryKeyIndex(pTab);
        sqlite3OpenTableAndIndices(pParse, pTab, OP_OpenRead, 0,
                                   1, 0, &iDataCur, &iIdxCur);
        /* reg[7] counts the number of entries in the table.
130256
130257
130258
130259
130260
130261
130262

130263
130264


130265
130266

130267
130268
130269

130270
130271
130272
130273

130274
130275















130276
130277

130278
130279

130280
130281
130282
130283
130284
130285
130286
        assert( sqlite3NoTempsInRange(pParse,1,7+j) );
        sqlite3VdbeAddOp2(v, OP_Rewind, iDataCur, 0); VdbeCoverage(v);
        loopTop = sqlite3VdbeAddOp2(v, OP_AddImm, 7, 1);
        if( !isQuick ){
          /* Sanity check on record header decoding */
          sqlite3VdbeAddOp3(v, OP_Column, iDataCur, pTab->nNVCol-1,3);
          sqlite3VdbeChangeP5(v, OPFLAG_TYPEOFARG);

        }
        /* Verify that all NOT NULL columns really are NOT NULL */


        for(j=0; j<pTab->nCol; j++){
          char *zErr;

          int jmp2;
          if( j==pTab->iPKey ) continue;
          if( pTab->aCol[j].notNull==0 ) continue;

          sqlite3ExprCodeGetColumnOfTable(v, pTab, iDataCur, j, 3);
          if( sqlite3VdbeGetOp(v,-1)->opcode==OP_Column ){
            sqlite3VdbeChangeP5(v, OPFLAG_TYPEOFARG);
          }

          jmp2 = sqlite3VdbeAddOp1(v, OP_NotNull, 3); VdbeCoverage(v);
          zErr = sqlite3MPrintf(db, "NULL value in %s.%s", pTab->zName,















                              pTab->aCol[j].zCnName);
          sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, zErr, P4_DYNAMIC);

          integrityCheckResultRow(v);
          sqlite3VdbeJumpHere(v, jmp2);

        }
        /* Verify CHECK constraints */
        if( pTab->pCheck && (db->flags & SQLITE_IgnoreChecks)==0 ){
          ExprList *pCheck = sqlite3ExprListDup(db, pTab->pCheck, 0);
          if( db->mallocFailed==0 ){
            int addrCkFault = sqlite3VdbeMakeLabel(pParse);
            int addrCkOk = sqlite3VdbeMakeLabel(pParse);







>

|
>
>


>
|

|
>




>
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
>
|
|
>







130514
130515
130516
130517
130518
130519
130520
130521
130522
130523
130524
130525
130526
130527
130528
130529
130530
130531
130532
130533
130534
130535
130536
130537
130538
130539
130540
130541
130542
130543
130544
130545
130546
130547
130548
130549
130550
130551
130552
130553
130554
130555
130556
130557
130558
130559
130560
130561
130562
130563
130564
130565
130566
130567
        assert( sqlite3NoTempsInRange(pParse,1,7+j) );
        sqlite3VdbeAddOp2(v, OP_Rewind, iDataCur, 0); VdbeCoverage(v);
        loopTop = sqlite3VdbeAddOp2(v, OP_AddImm, 7, 1);
        if( !isQuick ){
          /* Sanity check on record header decoding */
          sqlite3VdbeAddOp3(v, OP_Column, iDataCur, pTab->nNVCol-1,3);
          sqlite3VdbeChangeP5(v, OPFLAG_TYPEOFARG);
          VdbeComment((v, "(right-most column)"));
        }
        /* Verify that all NOT NULL columns really are NOT NULL.  At the
        ** same time verify the type of the content of STRICT tables */
        bStrict = (pTab->tabFlags & TF_Strict)!=0;
        for(j=0; j<pTab->nCol; j++){
          char *zErr;
          Column *pCol = pTab->aCol + j;
          int doError, jmp2;
          if( j==pTab->iPKey ) continue;
          if( pCol->notNull==0 && !bStrict ) continue;
          doError = bStrict ? sqlite3VdbeMakeLabel(pParse) : 0;
          sqlite3ExprCodeGetColumnOfTable(v, pTab, iDataCur, j, 3);
          if( sqlite3VdbeGetOp(v,-1)->opcode==OP_Column ){
            sqlite3VdbeChangeP5(v, OPFLAG_TYPEOFARG);
          }
          if( pCol->notNull ){
            jmp2 = sqlite3VdbeAddOp1(v, OP_NotNull, 3); VdbeCoverage(v);
            zErr = sqlite3MPrintf(db, "NULL value in %s.%s", pTab->zName,
                                pCol->zCnName);
            sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, zErr, P4_DYNAMIC);
            if( bStrict ){
              sqlite3VdbeGoto(v, doError);
            }else{
              integrityCheckResultRow(v);
            }
            sqlite3VdbeJumpHere(v, jmp2);
          }
          if( pTab->tabFlags & TF_Strict ){
            jmp2 = sqlite3VdbeAddOp3(v, OP_IsNullOrType, 3, 0,
                                     sqlite3StdTypeMap[pCol->eCType-1]);
            VdbeCoverage(v);
            zErr = sqlite3MPrintf(db, "non-%s value in %s.%s",
                                  sqlite3StdType[pCol->eCType-1],
                                  pTab->zName, pTab->aCol[j].zCnName);
            sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, zErr, P4_DYNAMIC);
            sqlite3VdbeResolveLabel(v, doError);
            integrityCheckResultRow(v);
            sqlite3VdbeJumpHere(v, jmp2);
          }
        }
        /* Verify CHECK constraints */
        if( pTab->pCheck && (db->flags & SQLITE_IgnoreChecks)==0 ){
          ExprList *pCheck = sqlite3ExprListDup(db, pTab->pCheck, 0);
          if( db->mallocFailed==0 ){
            int addrCkFault = sqlite3VdbeMakeLabel(pParse);
            int addrCkOk = sqlite3VdbeMakeLabel(pParse);
134399
134400
134401
134402
134403
134404
134405
134406
134407
134408
134409
134410
134411
134412
134413
      if( pCol->zCnName ){
        memcpy(&pCol->zCnName[n+1], zType, m+1);
        pCol->colFlags |= COLFLAG_HASTYPE;
      }
    }
    if( pCol->affinity<=SQLITE_AFF_NONE ) pCol->affinity = aff;
    pColl = sqlite3ExprCollSeq(pParse, p);
    if( pColl && (pCol->colFlags & COLFLAG_HASCOLL)==0 ){
      assert( pTab->pIndex==0 );
      sqlite3ColumnSetColl(db, pCol, pColl->zName);
    }
  }
  pTab->szTabRow = 1; /* Any non-zero value works */
}








|







134680
134681
134682
134683
134684
134685
134686
134687
134688
134689
134690
134691
134692
134693
134694
      if( pCol->zCnName ){
        memcpy(&pCol->zCnName[n+1], zType, m+1);
        pCol->colFlags |= COLFLAG_HASTYPE;
      }
    }
    if( pCol->affinity<=SQLITE_AFF_NONE ) pCol->affinity = aff;
    pColl = sqlite3ExprCollSeq(pParse, p);
    if( pColl ){
      assert( pTab->pIndex==0 );
      sqlite3ColumnSetColl(db, pCol, pColl->zName);
    }
  }
  pTab->szTabRow = 1; /* Any non-zero value works */
}

135221
135222
135223
135224
135225
135226
135227


135228


135229
135230
135231
135232
135233
135234
135235
    }
    sqlite3KeyInfoUnref(pKeyInfo);
  }

multi_select_end:
  pDest->iSdst = dest.iSdst;
  pDest->nSdst = dest.nSdst;


  sqlite3SelectDelete(db, pDelete);


  return rc;
}
#endif /* SQLITE_OMIT_COMPOUND_SELECT */

/*
** Error message for when two or more terms of a compound select have different
** size result sets.







>
>
|
>
>







135502
135503
135504
135505
135506
135507
135508
135509
135510
135511
135512
135513
135514
135515
135516
135517
135518
135519
135520
    }
    sqlite3KeyInfoUnref(pKeyInfo);
  }

multi_select_end:
  pDest->iSdst = dest.iSdst;
  pDest->nSdst = dest.nSdst;
  if( pDelete ){
    sqlite3ParserAddCleanup(pParse,
        (void(*)(sqlite3*,void*))sqlite3SelectDelete,
        pDelete);
  }
  return rc;
}
#endif /* SQLITE_OMIT_COMPOUND_SELECT */

/*
** Error message for when two or more terms of a compound select have different
** size result sets.
138789
138790
138791
138792
138793
138794
138795
138796

138797
138798
138799
138800
138801
138802
138803
    */
    pParse->nHeight += sqlite3SelectExprHeight(p);

    /* Make copies of constant WHERE-clause terms in the outer query down
    ** inside the subquery.  This can help the subquery to run more efficiently.
    */
    if( OptimizationEnabled(db, SQLITE_PushDown)
     && (pItem->fg.isCte==0 || pItem->u2.pCteUse->eM10d!=M10d_Yes)

     && pushDownWhereTerms(pParse, pSub, p->pWhere, pItem->iCursor,
                           (pItem->fg.jointype & JT_OUTER)!=0)
    ){
#if SELECTTRACE_ENABLED
      if( sqlite3SelectTrace & 0x100 ){
        SELECTTRACE(0x100,pParse,p,
            ("After WHERE-clause push-down into subquery %d:\n", pSub->selId));







|
>







139074
139075
139076
139077
139078
139079
139080
139081
139082
139083
139084
139085
139086
139087
139088
139089
    */
    pParse->nHeight += sqlite3SelectExprHeight(p);

    /* Make copies of constant WHERE-clause terms in the outer query down
    ** inside the subquery.  This can help the subquery to run more efficiently.
    */
    if( OptimizationEnabled(db, SQLITE_PushDown)
     && (pItem->fg.isCte==0
         || (pItem->u2.pCteUse->eM10d!=M10d_Yes && pItem->u2.pCteUse->nUse<2))
     && pushDownWhereTerms(pParse, pSub, p->pWhere, pItem->iCursor,
                           (pItem->fg.jointype & JT_OUTER)!=0)
    ){
#if SELECTTRACE_ENABLED
      if( sqlite3SelectTrace & 0x100 ){
        SELECTTRACE(0x100,pParse,p,
            ("After WHERE-clause push-down into subquery %d:\n", pSub->selId));
138850
138851
138852
138853
138854
138855
138856

138857
138858
138859
138860
138861
138862
138863
      ** generated.  Invoke the subroutine to compute the materialization,
      ** the make the pItem->iCursor be a copy of the ephemerial table that
      ** holds the result of the materialization. */
      CteUse *pCteUse = pItem->u2.pCteUse;
      sqlite3VdbeAddOp2(v, OP_Gosub, pCteUse->regRtn, pCteUse->addrM9e);
      if( pItem->iCursor!=pCteUse->iCur ){
        sqlite3VdbeAddOp2(v, OP_OpenDup, pItem->iCursor, pCteUse->iCur);

      }
      pSub->nSelectRow = pCteUse->nRowEst;
    }else if( (pPrior = isSelfJoinView(pTabList, pItem))!=0 ){
      /* This view has already been materialized by a prior entry in
      ** this same FROM clause.  Reuse it. */
      if( pPrior->addrFillSub ){
        sqlite3VdbeAddOp2(v, OP_Gosub, pPrior->regReturn, pPrior->addrFillSub);







>







139136
139137
139138
139139
139140
139141
139142
139143
139144
139145
139146
139147
139148
139149
139150
      ** generated.  Invoke the subroutine to compute the materialization,
      ** the make the pItem->iCursor be a copy of the ephemerial table that
      ** holds the result of the materialization. */
      CteUse *pCteUse = pItem->u2.pCteUse;
      sqlite3VdbeAddOp2(v, OP_Gosub, pCteUse->regRtn, pCteUse->addrM9e);
      if( pItem->iCursor!=pCteUse->iCur ){
        sqlite3VdbeAddOp2(v, OP_OpenDup, pItem->iCursor, pCteUse->iCur);
        VdbeComment((v, "%!S", pItem));
      }
      pSub->nSelectRow = pCteUse->nRowEst;
    }else if( (pPrior = isSelfJoinView(pTabList, pItem))!=0 ){
      /* This view has already been materialized by a prior entry in
      ** this same FROM clause.  Reuse it. */
      if( pPrior->addrFillSub ){
        sqlite3VdbeAddOp2(v, OP_Gosub, pPrior->regReturn, pPrior->addrFillSub);
143565
143566
143567
143568
143569
143570
143571
143572

143573
143574
143575
143576
143577
143578
143579
** reaches zero, call the xDisconnect() method to delete the object.
*/
SQLITE_PRIVATE void sqlite3VtabUnlock(VTable *pVTab){
  sqlite3 *db = pVTab->db;

  assert( db );
  assert( pVTab->nRef>0 );
  assert( db->magic==SQLITE_MAGIC_OPEN || db->magic==SQLITE_MAGIC_ZOMBIE );


  pVTab->nRef--;
  if( pVTab->nRef==0 ){
    sqlite3_vtab *p = pVTab->pVtab;
    sqlite3VtabModuleUnref(pVTab->db, pVTab->pMod);
    if( p ){
      p->pModule->xDisconnect(p);







|
>







143852
143853
143854
143855
143856
143857
143858
143859
143860
143861
143862
143863
143864
143865
143866
143867
** reaches zero, call the xDisconnect() method to delete the object.
*/
SQLITE_PRIVATE void sqlite3VtabUnlock(VTable *pVTab){
  sqlite3 *db = pVTab->db;

  assert( db );
  assert( pVTab->nRef>0 );
  assert( db->eOpenState==SQLITE_STATE_OPEN
       || db->eOpenState==SQLITE_STATE_ZOMBIE );

  pVTab->nRef--;
  if( pVTab->nRef==0 ){
    sqlite3_vtab *p = pVTab->pVtab;
    sqlite3VtabModuleUnref(pVTab->db, pVTab->pMod);
    if( p ){
      p->pModule->xDisconnect(p);
146797
146798
146799
146800
146801
146802
146803
146804
146805
146806
146807
146808
146809
146810
146811
146812
146813
    iReleaseReg = ++pParse->nMem;
    iRowidReg = codeEqualityTerm(pParse, pTerm, pLevel, 0, bRev, iReleaseReg);
    if( iRowidReg!=iReleaseReg ) sqlite3ReleaseTempReg(pParse, iReleaseReg);
    addrNxt = pLevel->addrNxt;
    sqlite3VdbeAddOp3(v, OP_SeekRowid, iCur, addrNxt, iRowidReg);
    VdbeCoverage(v);
    pLevel->op = OP_Noop;
    if( (pTerm->prereqAll & pLevel->notReady)==0 ){
      pTerm->wtFlags |= TERM_CODED;
    }
  }else if( (pLoop->wsFlags & WHERE_IPK)!=0
         && (pLoop->wsFlags & WHERE_COLUMN_RANGE)!=0
  ){
    /* Case 3:  We have an inequality comparison against the ROWID field.
    */
    int testOp = OP_Noop;
    int start;







<
<
<







147085
147086
147087
147088
147089
147090
147091



147092
147093
147094
147095
147096
147097
147098
    iReleaseReg = ++pParse->nMem;
    iRowidReg = codeEqualityTerm(pParse, pTerm, pLevel, 0, bRev, iReleaseReg);
    if( iRowidReg!=iReleaseReg ) sqlite3ReleaseTempReg(pParse, iReleaseReg);
    addrNxt = pLevel->addrNxt;
    sqlite3VdbeAddOp3(v, OP_SeekRowid, iCur, addrNxt, iRowidReg);
    VdbeCoverage(v);
    pLevel->op = OP_Noop;



  }else if( (pLoop->wsFlags & WHERE_IPK)!=0
         && (pLoop->wsFlags & WHERE_COLUMN_RANGE)!=0
  ){
    /* Case 3:  We have an inequality comparison against the ROWID field.
    */
    int testOp = OP_Noop;
    int start;
151456
151457
151458
151459
151460
151461
151462
151463

151464
151465
151466
151467
151468
151469
151470
    sqlite3DbFree(pWInfo->pParse->db, p);
  }
}

/*
** Return TRUE if all of the following are true:
**
**   (1)  X has the same or lower cost that Y

**   (2)  X uses fewer WHERE clause terms than Y
**   (3)  Every WHERE clause term used by X is also used by Y
**   (4)  X skips at least as many columns as Y
**   (5)  If X is a covering index, than Y is too
**
** Conditions (2) and (3) mean that X is a "proper subset" of Y.
** If X is a proper subset of Y then Y is a better choice and ought







|
>







151741
151742
151743
151744
151745
151746
151747
151748
151749
151750
151751
151752
151753
151754
151755
151756
    sqlite3DbFree(pWInfo->pParse->db, p);
  }
}

/*
** Return TRUE if all of the following are true:
**
**   (1)  X has the same or lower cost, or returns the same or fewer rows,
**        than Y.
**   (2)  X uses fewer WHERE clause terms than Y
**   (3)  Every WHERE clause term used by X is also used by Y
**   (4)  X skips at least as many columns as Y
**   (5)  If X is a covering index, than Y is too
**
** Conditions (2) and (3) mean that X is a "proper subset" of Y.
** If X is a proper subset of Y then Y is a better choice and ought
151479
151480
151481
151482
151483
151484
151485

151486
151487
151488
151489
151490
151491
151492
151493
151494
151495
151496
151497
151498
151499
151500
151501
151502
151503
151504
151505
151506
151507
151508
151509
151510
151511
151512
151513
151514
151515
151516
151517
151518
151519
151520
151521
151522
151523
151524
151525
151526
151527
151528


151529
151530
151531
151532
151533
151534
151535


151536
151537
151538
151539
151540
151541
151542
151543
151544
  const WhereLoop *pX,       /* First WhereLoop to compare */
  const WhereLoop *pY        /* Compare against this WhereLoop */
){
  int i, j;
  if( pX->nLTerm-pX->nSkip >= pY->nLTerm-pY->nSkip ){
    return 0; /* X is not a subset of Y */
  }

  if( pY->nSkip > pX->nSkip ) return 0;
  if( pX->rRun >= pY->rRun ){
    if( pX->rRun > pY->rRun ) return 0;    /* X costs more than Y */
    if( pX->nOut > pY->nOut ) return 0;    /* X costs more than Y */
  }
  for(i=pX->nLTerm-1; i>=0; i--){
    if( pX->aLTerm[i]==0 ) continue;
    for(j=pY->nLTerm-1; j>=0; j--){
      if( pY->aLTerm[j]==pX->aLTerm[i] ) break;
    }
    if( j<0 ) return 0;  /* X not a subset of Y since term X[i] not used by Y */
  }
  if( (pX->wsFlags&WHERE_IDX_ONLY)!=0
   && (pY->wsFlags&WHERE_IDX_ONLY)==0 ){
    return 0;  /* Constraint (5) */
  }
  return 1;  /* All conditions meet */
}

/*
** Try to adjust the cost of WhereLoop pTemplate upwards or downwards so
** that:
**
**   (1) pTemplate costs less than any other WhereLoops that are a proper
**       subset of pTemplate
**
**   (2) pTemplate costs more than any other WhereLoops for which pTemplate
**       is a proper subset.
**
** To say "WhereLoop X is a proper subset of Y" means that X uses fewer
** WHERE clause terms than Y and that every WHERE clause term used by X is
** also used by Y.
*/
static void whereLoopAdjustCost(const WhereLoop *p, WhereLoop *pTemplate){
  if( (pTemplate->wsFlags & WHERE_INDEXED)==0 ) return;
  for(; p; p=p->pNextLoop){
    if( p->iTab!=pTemplate->iTab ) continue;
    if( (p->wsFlags & WHERE_INDEXED)==0 ) continue;
    if( whereLoopCheaperProperSubset(p, pTemplate) ){
      /* Adjust pTemplate cost downward so that it is cheaper than its
      ** subset p. */
      WHERETRACE(0x80,("subset cost adjustment %d,%d to %d,%d\n",
                       pTemplate->rRun, pTemplate->nOut, p->rRun, p->nOut-1));


      pTemplate->rRun = p->rRun;
      pTemplate->nOut = p->nOut - 1;
    }else if( whereLoopCheaperProperSubset(pTemplate, p) ){
      /* Adjust pTemplate cost upward so that it is costlier than p since
      ** pTemplate is a proper subset of p */
      WHERETRACE(0x80,("subset cost adjustment %d,%d to %d,%d\n",
                       pTemplate->rRun, pTemplate->nOut, p->rRun, p->nOut+1));


      pTemplate->rRun = p->rRun;
      pTemplate->nOut = p->nOut + 1;
    }
  }
}

/*
** Search the list of WhereLoops in *ppPrev looking for one that can be
** replaced by pTemplate.







>

<
<
<
<















|
|




















|
>
>
|
|




|
>
>
|
|







151765
151766
151767
151768
151769
151770
151771
151772
151773




151774
151775
151776
151777
151778
151779
151780
151781
151782
151783
151784
151785
151786
151787
151788
151789
151790
151791
151792
151793
151794
151795
151796
151797
151798
151799
151800
151801
151802
151803
151804
151805
151806
151807
151808
151809
151810
151811
151812
151813
151814
151815
151816
151817
151818
151819
151820
151821
151822
151823
151824
151825
151826
151827
151828
151829
151830
151831
  const WhereLoop *pX,       /* First WhereLoop to compare */
  const WhereLoop *pY        /* Compare against this WhereLoop */
){
  int i, j;
  if( pX->nLTerm-pX->nSkip >= pY->nLTerm-pY->nSkip ){
    return 0; /* X is not a subset of Y */
  }
  if( pX->rRun>pY->rRun && pX->nOut>pY->nOut ) return 0;
  if( pY->nSkip > pX->nSkip ) return 0;




  for(i=pX->nLTerm-1; i>=0; i--){
    if( pX->aLTerm[i]==0 ) continue;
    for(j=pY->nLTerm-1; j>=0; j--){
      if( pY->aLTerm[j]==pX->aLTerm[i] ) break;
    }
    if( j<0 ) return 0;  /* X not a subset of Y since term X[i] not used by Y */
  }
  if( (pX->wsFlags&WHERE_IDX_ONLY)!=0
   && (pY->wsFlags&WHERE_IDX_ONLY)==0 ){
    return 0;  /* Constraint (5) */
  }
  return 1;  /* All conditions meet */
}

/*
** Try to adjust the cost and number of output rows of WhereLoop pTemplate
** upwards or downwards so that:
**
**   (1) pTemplate costs less than any other WhereLoops that are a proper
**       subset of pTemplate
**
**   (2) pTemplate costs more than any other WhereLoops for which pTemplate
**       is a proper subset.
**
** To say "WhereLoop X is a proper subset of Y" means that X uses fewer
** WHERE clause terms than Y and that every WHERE clause term used by X is
** also used by Y.
*/
static void whereLoopAdjustCost(const WhereLoop *p, WhereLoop *pTemplate){
  if( (pTemplate->wsFlags & WHERE_INDEXED)==0 ) return;
  for(; p; p=p->pNextLoop){
    if( p->iTab!=pTemplate->iTab ) continue;
    if( (p->wsFlags & WHERE_INDEXED)==0 ) continue;
    if( whereLoopCheaperProperSubset(p, pTemplate) ){
      /* Adjust pTemplate cost downward so that it is cheaper than its
      ** subset p. */
      WHERETRACE(0x80,("subset cost adjustment %d,%d to %d,%d\n",
                       pTemplate->rRun, pTemplate->nOut,
                       MIN(p->rRun, pTemplate->rRun),
                       MIN(p->nOut - 1, pTemplate->nOut)));
      pTemplate->rRun = MIN(p->rRun, pTemplate->rRun);
      pTemplate->nOut = MIN(p->nOut - 1, pTemplate->nOut);
    }else if( whereLoopCheaperProperSubset(pTemplate, p) ){
      /* Adjust pTemplate cost upward so that it is costlier than p since
      ** pTemplate is a proper subset of p */
      WHERETRACE(0x80,("subset cost adjustment %d,%d to %d,%d\n",
                       pTemplate->rRun, pTemplate->nOut,
                       MAX(p->rRun, pTemplate->rRun),
                       MAX(p->nOut + 1, pTemplate->nOut)));
      pTemplate->rRun = MAX(p->rRun, pTemplate->rRun);
      pTemplate->nOut = MAX(p->nOut + 1, pTemplate->nOut);
    }
  }
}

/*
** Search the list of WhereLoops in *ppPrev looking for one that can be
** replaced by pTemplate.
158472
158473
158474
158475
158476
158477
158478
158479
158480

158481
158482
158483
158484
158485
158486
158487
#define TK_IF                             18
#define TK_NOT                            19
#define TK_EXISTS                         20
#define TK_TEMP                           21
#define TK_LP                             22
#define TK_RP                             23
#define TK_AS                             24
#define TK_WITHOUT                        25
#define TK_COMMA                          26

#define TK_ABORT                          27
#define TK_ACTION                         28
#define TK_AFTER                          29
#define TK_ANALYZE                        30
#define TK_ASC                            31
#define TK_ATTACH                         32
#define TK_BEFORE                         33







<
|
>







158759
158760
158761
158762
158763
158764
158765

158766
158767
158768
158769
158770
158771
158772
158773
158774
#define TK_IF                             18
#define TK_NOT                            19
#define TK_EXISTS                         20
#define TK_TEMP                           21
#define TK_LP                             22
#define TK_RP                             23
#define TK_AS                             24

#define TK_COMMA                          25
#define TK_WITHOUT                        26
#define TK_ABORT                          27
#define TK_ACTION                         28
#define TK_AFTER                          29
#define TK_ANALYZE                        30
#define TK_ASC                            31
#define TK_ATTACH                         32
#define TK_BEFORE                         33
158690
158691
158692
158693
158694
158695
158696
158697
158698
158699
158700
158701
158702
158703
158704
158705
158706
158707
158708
158709
158710
158711
158712
158713
158714

158715
158716
158717

158718

158719
158720
158721
158722
158723
158724
158725
158726
158727
158728
158729
158730
158731
158732
158733
158734
158735
158736
158737
158738
158739
158740
158741
158742
158743
158744
158745
158746
158747
158748
158749
158750
158751
158752
158753
**    YY_MAX_REDUCE      Maximum value for reduce actions
*/
#ifndef INTERFACE
# define INTERFACE 1
#endif
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned short int
#define YYNOCODE 317
#define YYACTIONTYPE unsigned short int
#define YYWILDCARD 101
#define sqlite3ParserTOKENTYPE Token
typedef union {
  int yyinit;
  sqlite3ParserTOKENTYPE yy0;
  Window* yy49;
  ExprList* yy70;
  Select* yy81;
  With* yy103;
  struct FrameBound yy117;
  struct {int value; int mask;} yy139;
  SrcList* yy153;
  TriggerStep* yy157;
  Upsert* yy190;
  struct TrigEvent yy262;
  Cte* yy329;

  int yy376;
  Expr* yy404;
  IdList* yy436;

  const char* yy504;

  u8 yy552;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
#endif
#define sqlite3ParserARG_SDECL
#define sqlite3ParserARG_PDECL
#define sqlite3ParserARG_PARAM
#define sqlite3ParserARG_FETCH
#define sqlite3ParserARG_STORE
#define sqlite3ParserCTX_SDECL Parse *pParse;
#define sqlite3ParserCTX_PDECL ,Parse *pParse
#define sqlite3ParserCTX_PARAM ,pParse
#define sqlite3ParserCTX_FETCH Parse *pParse=yypParser->pParse;
#define sqlite3ParserCTX_STORE yypParser->pParse=pParse;
#define YYFALLBACK 1
#define YYNSTATE             570
#define YYNRULE              398
#define YYNRULE_WITH_ACTION  337
#define YYNTOKEN             184
#define YY_MAX_SHIFT         569
#define YY_MIN_SHIFTREDUCE   825
#define YY_MAX_SHIFTREDUCE   1222
#define YY_ERROR_ACTION      1223
#define YY_ACCEPT_ACTION     1224
#define YY_NO_ACTION         1225
#define YY_MIN_REDUCE        1226
#define YY_MAX_REDUCE        1623
/************* End control #defines *******************************************/
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))

/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
**
** Applications can choose to define yytestcase() in the %include section







|






|
<
|
|
|
|
<
|
|
|
|
>
|
|
|
>
|
>
|















|
|
|

|
|
|
|
|
|
|
|







158977
158978
158979
158980
158981
158982
158983
158984
158985
158986
158987
158988
158989
158990
158991

158992
158993
158994
158995

158996
158997
158998
158999
159000
159001
159002
159003
159004
159005
159006
159007
159008
159009
159010
159011
159012
159013
159014
159015
159016
159017
159018
159019
159020
159021
159022
159023
159024
159025
159026
159027
159028
159029
159030
159031
159032
159033
159034
159035
159036
159037
159038
159039
159040
159041
**    YY_MAX_REDUCE      Maximum value for reduce actions
*/
#ifndef INTERFACE
# define INTERFACE 1
#endif
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned short int
#define YYNOCODE 318
#define YYACTIONTYPE unsigned short int
#define YYWILDCARD 101
#define sqlite3ParserTOKENTYPE Token
typedef union {
  int yyinit;
  sqlite3ParserTOKENTYPE yy0;
  With* yy43;

  u32 yy51;
  int yy64;
  struct FrameBound yy81;
  struct {int value; int mask;} yy83;

  TriggerStep* yy95;
  Upsert* yy138;
  IdList* yy240;
  Cte* yy255;
  Select* yy303;
  Window* yy375;
  u8 yy534;
  ExprList* yy562;
  struct TrigEvent yy570;
  const char* yy600;
  SrcList* yy607;
  Expr* yy626;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
#endif
#define sqlite3ParserARG_SDECL
#define sqlite3ParserARG_PDECL
#define sqlite3ParserARG_PARAM
#define sqlite3ParserARG_FETCH
#define sqlite3ParserARG_STORE
#define sqlite3ParserCTX_SDECL Parse *pParse;
#define sqlite3ParserCTX_PDECL ,Parse *pParse
#define sqlite3ParserCTX_PARAM ,pParse
#define sqlite3ParserCTX_FETCH Parse *pParse=yypParser->pParse;
#define sqlite3ParserCTX_STORE yypParser->pParse=pParse;
#define YYFALLBACK 1
#define YYNSTATE             572
#define YYNRULE              401
#define YYNRULE_WITH_ACTION  339
#define YYNTOKEN             184
#define YY_MAX_SHIFT         571
#define YY_MIN_SHIFTREDUCE   829
#define YY_MAX_SHIFTREDUCE   1229
#define YY_ERROR_ACTION      1230
#define YY_ACCEPT_ACTION     1231
#define YY_NO_ACTION         1232
#define YY_MIN_REDUCE        1233
#define YY_MAX_REDUCE        1633
/************* End control #defines *******************************************/
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))

/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
**
** Applications can choose to define yytestcase() in the %include section
158806
158807
158808
158809
158810
158811
158812
158813
158814
158815
158816
158817
158818
158819
158820
158821
158822
158823
158824
158825
158826
158827
158828
158829
158830
158831
158832
158833
158834
158835
158836
158837
158838
158839
158840
158841
158842
158843
158844
158845
158846
158847
158848
158849
158850
158851
158852
158853
158854
158855
158856
158857
158858
158859
158860
158861
158862
158863
158864
158865
158866
158867
158868
158869
158870
158871
158872
158873
158874
158875
158876
158877
158878
158879
158880
158881
158882
158883
158884
158885
158886
158887
158888
158889
158890
158891
158892
158893
158894
158895
158896
158897
158898
158899
158900
158901
158902
158903
158904
158905
158906
158907
158908




158909
158910
158911
158912
158913
158914
158915
158916
158917
158918
158919
158920
158921
158922
158923
158924
158925
158926
158927
158928
158929
158930
158931
158932
158933
158934
158935
158936
158937
158938
158939
158940
158941
158942
158943
158944
158945
158946
158947
158948
158949
158950
158951
158952
158953
158954
158955
158956
158957
158958
158959
158960
158961
158962
158963
158964
158965
158966
158967
158968
158969
158970
158971
158972
158973
158974
158975
158976
158977
158978
158979
158980
158981
158982
158983
158984
158985
158986
158987
158988
158989
158990
158991
158992
158993
158994
158995
158996
158997
158998
158999
159000
159001
159002
159003
159004
159005
159006
159007
159008
159009
159010
159011
159012
159013
159014
159015
159016
159017

159018
159019
159020
159021
159022
159023
159024
159025
159026
159027
159028
159029
159030
159031
159032
159033
159034
159035
159036
159037
159038
159039
159040
159041
159042
159043
159044
159045
159046
159047
159048
159049
159050
159051
159052
159053
159054
159055
159056
159057
159058
159059
159060
159061
159062
159063
159064
159065
159066
159067
159068
159069
159070
159071
159072
159073
159074
159075
159076
159077
159078
159079
159080
159081
159082
159083
159084
159085
159086
159087
159088
159089
159090
159091
159092
159093
159094
159095
159096
159097
159098
159099
159100
159101
159102
159103
159104
159105
159106
159107
159108
159109
159110
159111
159112
159113
159114
159115
159116
159117
159118
159119
159120
159121
159122
159123
159124
159125
159126
159127
159128
159129
159130
159131
159132
159133
159134
159135
159136
159137
159138
159139
159140
159141
159142
159143
159144
159145
159146
159147
159148
159149
159150
159151
159152
159153
159154
159155
159156
159157
159158
159159
159160
159161
159162
159163
159164
159165
159166
159167
159168
159169
159170
159171
159172
159173
159174
159175
159176
159177
159178
159179
159180
159181
159182
159183
159184
159185
159186
159187
159188
159189
159190
159191
159192
159193
159194
159195
159196
159197
159198
159199
159200
159201
159202
159203
159204
159205
159206
159207
159208

159209
159210
159211
159212
159213
159214
159215
159216
159217
159218
159219
159220
159221
159222
159223
159224
159225
159226
159227
159228
159229
159230
159231
159232
159233
159234
159235
159236
159237
159238
159239
159240


159241
159242
159243
159244
159245
159246
159247
159248
159249
159250
159251
159252
159253
159254
159255
159256
159257
159258
159259
159260
159261
159262
159263
159264
159265
159266
159267
159268
159269
159270
159271
159272
159273
159274
159275
159276
159277
159278
159279
159280
159281
159282
159283
159284
159285
159286
159287
159288
159289
159290
159291
159292
159293
159294
159295
159296
159297
159298
159299
159300
159301
159302

159303
159304
159305
159306
159307
159308
159309
159310
159311
159312
159313
159314
159315
159316
159317
159318
159319
159320
159321
159322
159323
159324
159325
159326
159327
159328
159329
159330
159331
159332
159333
159334
159335
159336
159337
159338
159339
159340
159341
159342
159343
159344
159345
159346
159347
159348
159349
159350
159351
159352
159353
159354
159355
159356
159357
159358
159359
159360
159361
159362
159363
159364
159365
159366
159367
159368
159369
159370
159371
159372
159373
159374
159375
159376
159377
159378
159379
159380
159381
159382
159383
159384
159385
159386
159387
159388
159389
159390
159391
159392
159393
159394
159395
159396
159397
159398
159399
159400
159401
159402
159403
159404
159405
159406
159407

159408
159409
159410
159411
159412
159413
159414
**  yy_shift_ofst[]    For each state, the offset into yy_action for
**                     shifting terminals.
**  yy_reduce_ofst[]   For each state, the offset into yy_action for
**                     shifting non-terminals after a reduce.
**  yy_default[]       Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (2023)
static const YYACTIONTYPE yy_action[] = {
 /*     0 */   563, 1295,  563, 1274,  168, 1257,  115,  112,  218,  373,
 /*    10 */   563, 1295,  374,  563,  488,  563,  115,  112,  218,  406,
 /*    20 */  1300, 1300,   41,   41,   41,   41,  514, 1504,  520, 1298,
 /*    30 */  1298,  959,   41,   41, 1260,   71,   71,   51,   51,  960,
 /*    40 */   557,  557,  557,  122,  123,  113, 1200, 1200, 1035, 1038,
 /*    50 */  1028, 1028,  120,  120,  121,  121,  121,  121,  414,  406,
 /*    60 */   273,  273,  273,  273,  115,  112,  218,  115,  112,  218,
 /*    70 */   197,  268,  545,  560,  515,  560,  211,  563,  385,  248,
 /*    80 */   215,  521,  399,  122,  123,  113, 1200, 1200, 1035, 1038,
 /*    90 */  1028, 1028,  120,  120,  121,  121,  121,  121,  540,   13,
 /*   100 */    13, 1259,  119,  119,  119,  119,  118,  118,  117,  117,
 /*   110 */   117,  116,  441, 1176,  419,  197,  446,  320,  512, 1539,
 /*   120 */  1545,  372, 1547,    6,  371, 1176, 1148,  394, 1148,  406,
 /*   130 */  1545,  534,  115,  112,  218, 1415,   99,   30,  121,  121,
 /*   140 */   121,  121,  119,  119,  119,  119,  118,  118,  117,  117,
 /*   150 */   117,  116,  441,  122,  123,  113, 1200, 1200, 1035, 1038,
 /*   160 */  1028, 1028,  120,  120,  121,  121,  121,  121,   31, 1176,
 /*   170 */  1177, 1178,  241,  357, 1558,  501,  498,  497,  317,  124,
 /*   180 */   319, 1176, 1177, 1178, 1176,  496,  119,  119,  119,  119,
 /*   190 */   118,  118,  117,  117,  117,  116,  441,  139,   96,  406,
 /*   200 */   121,  121,  121,  121,  114,  117,  117,  117,  116,  441,
 /*   210 */   541, 1532,  119,  119,  119,  119,  118,  118,  117,  117,
 /*   220 */   117,  116,  441,  122,  123,  113, 1200, 1200, 1035, 1038,
 /*   230 */  1028, 1028,  120,  120,  121,  121,  121,  121,  406,  441,
 /*   240 */  1176, 1177, 1178,   81,  439,  439,  439,   80,  119,  119,
 /*   250 */   119,  119,  118,  118,  117,  117,  117,  116,  441,  488,
 /*   260 */  1176,  318,  122,  123,  113, 1200, 1200, 1035, 1038, 1028,
 /*   270 */  1028,  120,  120,  121,  121,  121,  121,  493, 1025, 1025,
 /*   280 */  1036, 1039,  119,  119,  119,  119,  118,  118,  117,  117,
 /*   290 */   117,  116,  441, 1584,  995, 1224,    1,    1,  569,    2,
 /*   300 */  1228, 1267,  137, 1503,  245,  305,  473,  140,  406,  860,
 /*   310 */   561, 1176,  914,  914, 1308,  359, 1176, 1177, 1178,  462,
 /*   320 */   330,  119,  119,  119,  119,  118,  118,  117,  117,  117,
 /*   330 */   116,  441,  122,  123,  113, 1200, 1200, 1035, 1038, 1028,
 /*   340 */  1028,  120,  120,  121,  121,  121,  121,  328,  273,  273,
 /*   350 */  1015,   83, 1029,  425, 1564,  569,    2, 1228,  304,  554,
 /*   360 */   925,  560,  305,  944,  140,  860, 1006, 1176, 1177, 1178,
 /*   370 */  1005, 1308,  411,  213,  511,  229,  119,  119,  119,  119,
 /*   380 */   118,  118,  117,  117,  117,  116,  441,  519,  347,  116,
 /*   390 */   441,  119,  119,  119,  119,  118,  118,  117,  117,  117,
 /*   400 */   116,  441, 1005, 1005, 1007,  273,  273,  445,  563,   16,
 /*   410 */    16, 1590,  563, 1540,  563,  406, 1176,    6,  560,  344,
 /*   420 */   182,  118,  118,  117,  117,  117,  116,  441,  416,  142,
 /*   430 */    71,   71,  229,  563,   71,   71,   55,   55,  203,  122,
 /*   440 */   123,  113, 1200, 1200, 1035, 1038, 1028, 1028,  120,  120,
 /*   450 */   121,  121,  121,  121,  217,   13,   13, 1176,  406,  568,
 /*   460 */  1400, 1228,  502,  137,  445,  168,  305,  545,  140, 1180,
 /*   470 */   424,  545, 1176, 1177, 1178, 1308,  544,  438,  437,  944,
 /*   480 */   513,  452,  122,  123,  113, 1200, 1200, 1035, 1038, 1028,
 /*   490 */  1028,  120,  120,  121,  121,  121,  121,  315,  119,  119,
 /*   500 */   119,  119,  118,  118,  117,  117,  117,  116,  441,  273,
 /*   510 */   273, 1143,  416, 1176, 1177, 1178,  543,  563, 1143,  304,
 /*   520 */   554, 1561,  560, 1207, 1143, 1207, 1180, 1143,  406,  530,
 /*   530 */   421, 1143,  864,  183, 1143,  143,  229,  562,   32,   71,
 /*   540 */    71,  119,  119,  119,  119,  118,  118,  117,  117,  117,
 /*   550 */   116,  441,  122,  123,  113, 1200, 1200, 1035, 1038, 1028,
 /*   560 */  1028,  120,  120,  121,  121,  121,  121,  406,  445,  241,
 /*   570 */  1176,  857,  501,  498,  497, 1176,  526,  189,  245,  538,
 /*   580 */  1539,  282,  496,  370,    6,  563,  529,  477,    5,  279,
 /*   590 */  1015,  122,  123,  113, 1200, 1200, 1035, 1038, 1028, 1028,
 /*   600 */   120,  120,  121,  121,  121,  121, 1006,   13,   13, 1414,
 /*   610 */  1005,  119,  119,  119,  119,  118,  118,  117,  117,  117,
 /*   620 */   116,  441,  426,  273,  273, 1176, 1176, 1177, 1178, 1619,
 /*   630 */   392, 1176, 1177, 1178, 1176,  342,  560,  406,  525,  361,
 /*   640 */   430, 1161, 1005, 1005, 1007,  348,  411,  357, 1558,  488,
 /*   650 */   119,  119,  119,  119,  118,  118,  117,  117,  117,  116,
 /*   660 */   441,  122,  123,  113, 1200, 1200, 1035, 1038, 1028, 1028,
 /*   670 */   120,  120,  121,  121,  121,  121,  406,  830,  831,  832,
 /*   680 */  1016, 1176, 1177, 1178,  396,  285,  148, 1312,  304,  554,
 /*   690 */  1176, 1177, 1178, 1467,  216,    3,  337,  137,  340,  560,
 /*   700 */   122,  123,  113, 1200, 1200, 1035, 1038, 1028, 1028,  120,
 /*   710 */   120,  121,  121,  121,  121,  563,  504,  946,  273,  273,
 /*   720 */   119,  119,  119,  119,  118,  118,  117,  117,  117,  116,
 /*   730 */   441,  560, 1176,  427,  563,  451,   98,   13,   13,  259,
 /*   740 */   276,  356,  507,  351,  506,  246,  406,  361,  469, 1530,
 /*   750 */  1000,  347,  293,  304,  554, 1589,   71,   71,  889,  119,
 /*   760 */   119,  119,  119,  118,  118,  117,  117,  117,  116,  441,
 /*   770 */   122,  123,  113, 1200, 1200, 1035, 1038, 1028, 1028,  120,
 /*   780 */   120,  121,  121,  121,  121,  406, 1143, 1078, 1176, 1177,
 /*   790 */  1178,  416, 1080,  300,  150,  995, 1080,  361,  361, 1143,
 /*   800 */   361,  378, 1143,  477,  563,  244,  243,  242, 1278,  122,
 /*   810 */   123,  113, 1200, 1200, 1035, 1038, 1028, 1028,  120,  120,
 /*   820 */   121,  121,  121,  121,  563,  880,   13,   13,  483,  119,
 /*   830 */   119,  119,  119,  118,  118,  117,  117,  117,  116,  441,
 /*   840 */  1176,  191,  540,  563,  147,  149,   13,   13,  328,  457,
 /*   850 */   316, 1083, 1083,  485, 1537,  406,  505, 1530,    6, 1514,
 /*   860 */   284,  192, 1277,  145,  881,   71,   71,  488,  119,  119,
 /*   870 */   119,  119,  118,  118,  117,  117,  117,  116,  441,  122,
 /*   880 */   123,  113, 1200, 1200, 1035, 1038, 1028, 1028,  120,  120,
 /*   890 */   121,  121,  121,  121,  563,  471, 1176, 1177, 1178,  406,
 /*   900 */   852,  327,  301,  462,  330, 1516,  270, 1530, 1530,  944,
 /*   910 */  1531, 1307,  313,    9,  842,  251,   71,   71,  477,  428,
 /*   920 */   146,  488,   38,  945,  101,  113, 1200, 1200, 1035, 1038,
 /*   930 */  1028, 1028,  120,  120,  121,  121,  121,  121,  119,  119,




 /*   940 */   119,  119,  118,  118,  117,  117,  117,  116,  441,  563,
 /*   950 */  1197, 1099,  563,  436,  563, 1533,  563,  852, 1122, 1617,
 /*   960 */   454,  290, 1617,  546,  251, 1303, 1100,  267,  267,  281,
 /*   970 */   404,   70,   70,  460,   71,   71,   71,   71,   13,   13,
 /*   980 */   560, 1101,  119,  119,  119,  119,  118,  118,  117,  117,
 /*   990 */   117,  116,  441,  542,  104,  273,  273,  273,  273, 1197,
 /*  1000 */   217, 1468,  900,  471,  450,  563, 1473, 1197,  560,  447,
 /*  1010 */   560,  545,  901,  440,  406, 1058,  292,  274,  274,  198,
 /*  1020 */   547,  450,  449, 1473, 1475,  944,  455,   56,   56,  410,
 /*  1030 */   560, 1122, 1618,  379,  406, 1618,  404, 1120,  122,  123,
 /*  1040 */   113, 1200, 1200, 1035, 1038, 1028, 1028,  120,  120,  121,
 /*  1050 */   121,  121,  121, 1460,  406,   12, 1197, 1512,  122,  123,
 /*  1060 */   113, 1200, 1200, 1035, 1038, 1028, 1028,  120,  120,  121,
 /*  1070 */   121,  121,  121,  308,  471,  126,  359,  286,  122,  111,
 /*  1080 */   113, 1200, 1200, 1035, 1038, 1028, 1028,  120,  120,  121,
 /*  1090 */   121,  121,  121,  309,  450,  471, 1473,  119,  119,  119,
 /*  1100 */   119,  118,  118,  117,  117,  117,  116,  441, 1176,  563,
 /*  1110 */  1120,  482,  563,  312,  433,  479,  197,  119,  119,  119,
 /*  1120 */   119,  118,  118,  117,  117,  117,  116,  441,  405,   12,
 /*  1130 */   536,   15,   15,  478,   43,   43,  509,  119,  119,  119,
 /*  1140 */   119,  118,  118,  117,  117,  117,  116,  441,  289,  535,
 /*  1150 */   294,  563,  294,  391, 1220,  438,  437,  406, 1154,  403,
 /*  1160 */   402, 1400,  920, 1204, 1176, 1177, 1178,  919, 1206,  291,
 /*  1170 */  1306, 1249,  412,   57,   57,  488, 1205,  563,  556,  412,
 /*  1180 */  1176, 1344,  123,  113, 1200, 1200, 1035, 1038, 1028, 1028,
 /*  1190 */   120,  120,  121,  121,  121,  121, 1400, 1143,  563,   44,
 /*  1200 */    44, 1207,  194, 1207,  273,  273, 1400,  461,  537, 1154,
 /*  1210 */  1143,  108,  555, 1143,    4,  391, 1121,  560, 1538,  335,
 /*  1220 */    58,   58,    6, 1246, 1099,  380, 1400,  376,  558, 1536,
 /*  1230 */   563,  422, 1221,    6,  304,  554, 1176, 1177, 1178, 1100,
 /*  1240 */   119,  119,  119,  119,  118,  118,  117,  117,  117,  116,
 /*  1250 */   441,  442,   59,   59, 1101,  516, 1535,  273,  273,  563,
 /*  1260 */     6,  563,  110,  552,  563,  528,  423,  413,  169,  548,
 /*  1270 */   560,  108,  555,  137,    4,  551,  484,  272,  215,  222,
 /*  1280 */   211,   60,   60,   61,   61,   98,   62,   62,  558,  273,
 /*  1290 */   273,  563, 1015,  467, 1221,  563,  434,  563,  106,  106,
 /*  1300 */     8,  920,  560,  273,  273,  107,  919,  442,  565,  564,
 /*  1310 */   563,  442, 1005,   45,   45,  464,  560,   46,   46,   47,
 /*  1320 */    47,   84,  202,  552, 1215,  404,  468,  563,  205,  304,
 /*  1330 */   554,  563,   49,   49,  563,  522,  404,  532,  563,  867,
 /*  1340 */   563,  105,  531,  103, 1005, 1005, 1007, 1008,   27,   50,
 /*  1350 */    50,  563, 1015,   63,   63,  475,   64,   64,  106,  106,
 /*  1360 */    65,   65,   14,   14,   17,  107,  563,  442,  565,  564,
 /*  1370 */   563,  303, 1005,   66,   66,  563,  226,  563,  959,  563,
 /*  1380 */   543,  404, 1196, 1343,  871,  278,  960,  456,  128,  128,
 /*  1390 */   563, 1065,   67,   67,  563,  206,  867,   52,   52,   68,
 /*  1400 */    68,   69,   69,  417, 1005, 1005, 1007, 1008,   27, 1563,
 /*  1410 */  1165,  444,   53,   53,  277, 1519,  156,  156,  307,  389,
 /*  1420 */   389,  388,  262,  386, 1165,  444,  839,  321,  277,  108,
 /*  1430 */   555,  523,    4,  389,  389,  388,  262,  386,  563,  223,
 /*  1440 */   839,  311,  326, 1492, 1117,   98,  558,  393, 1065,  310,
 /*  1450 */   563,  476,  563,  223,  563,  311,  879,  878, 1009,  277,
 /*  1460 */   157,  157,  463,  310,  389,  389,  388,  262,  386,  442,
 /*  1470 */   518,  839,   76,   76,   54,   54,   72,   72,  355,  225,
 /*  1480 */   563,  552,  275,  563,  223,  325,  311,  161,  354,  465,
 /*  1490 */   135,  563,  228,  225,  310,  532,  563,  206,  886,  887,
 /*  1500 */   533,  161,  129,  129,  135,   73,   73,  224,  962,  963,
 /*  1510 */  1015,  563,  287,  130,  130, 1009,  106,  106,  131,  131,
 /*  1520 */   563,  224,  563,  107,  225,  442,  565,  564,  997, 1276,
 /*  1530 */  1005,  250,  161,  127,  127,  135,  108,  555, 1077,    4,
 /*  1540 */  1077,  407,  155,  155,  154,  154,  304,  554, 1126,  563,
 /*  1550 */  1331,  563,  224,  558,  470,  407,  563,  250,  563, 1491,
 /*  1560 */   304,  554, 1005, 1005, 1007, 1008,   27,  563,  480,  332,
 /*  1570 */   448,  136,  136,  134,  134, 1340,  442,  336,  132,  132,
 /*  1580 */   133,  133,  563, 1076,  448, 1076,  407,  563,  552,   75,
 /*  1590 */    75,  304,  554,  339,  341,  343,  108,  555,  563,    4,
 /*  1600 */  1577,  299,  532,  563,   77,   77, 1291,  531,  472,   74,
 /*  1610 */    74,  250, 1275,  558,  350,  448,  331, 1015,  360,   98,
 /*  1620 */    42,   42, 1352,  106,  106,   48,   48, 1399,  494, 1327,
 /*  1630 */   107,  247,  442,  565,  564,  345,  442, 1005,   98, 1061,
 /*  1640 */   953,  917,  247,  250,  110, 1552,  550,  850,  552,  918,
 /*  1650 */   144, 1338,  110,  549, 1405, 1256, 1248, 1237, 1236, 1238,
 /*  1660 */  1571, 1324,  208,  390,  489,  265,  363,  200,  365, 1005,
 /*  1670 */  1005, 1007, 1008,   27,   11,  280,  221, 1015,  323,  474,
 /*  1680 */  1274,  367,  212,  106,  106,  924, 1386,  324,  288, 1381,
 /*  1690 */   107,  453,  442,  565,  564,  283,  329, 1005, 1391,  499,
 /*  1700 */   353, 1374, 1464,  108,  555, 1463,    4, 1574, 1390,  397,
 /*  1710 */  1215,  171,  254,  369,  383,  207,  195,  196, 1511,  553,
 /*  1720 */   558, 1509,  415, 1212,  100,  555,   83,    4,  204, 1005,
 /*  1730 */  1005, 1007, 1008,   27,  180,  166,  173,  219,   79,   82,
 /*  1740 */   458,  558,  175,  442,   35, 1387,  176,  459,  177,  178,
 /*  1750 */   492,  231,   96, 1469,  395,  552, 1393, 1392,   36,  466,
 /*  1760 */  1395,  184,  398,  481,  442, 1458,  235,   89, 1480,  487,
 /*  1770 */   266,  334,  237,  188,  490,  400,  552,  338,  238,  508,
 /*  1780 */  1239,  239, 1294, 1293, 1015, 1292, 1285,  429,   91,  871,
 /*  1790 */   106,  106, 1588,  213,  401, 1587,  431,  107, 1264,  442,
 /*  1800 */   565,  564, 1263,  352, 1005, 1015, 1262, 1586, 1557,  517,
 /*  1810 */   432,  106,  106, 1284,  297,  298,  358,  524,  107, 1335,
 /*  1820 */   442,  565,  564,   95, 1336, 1005,  252,  253,  435,  125,
 /*  1830 */   543, 1543,   10, 1444,  377, 1542, 1005, 1005, 1007, 1008,
 /*  1840 */    27,   97,  527,  375,  362,  102,  260,  364,  381, 1317,
 /*  1850 */   382, 1334,  366, 1245, 1333, 1316,  368, 1005, 1005, 1007,
 /*  1860 */  1008,   27, 1359, 1358,   34,  199, 1171,  566,  261,  263,
 /*  1870 */   264,  567, 1234,  158, 1229,  141,  295,  159, 1496,  302,
 /*  1880 */  1497, 1495, 1494,  160,  826,  209,  443,  201,  306,  210,
 /*  1890 */    78,  220, 1075,  138, 1073,  314,  162,  172, 1196,  227,
 /*  1900 */   174,  903,  322,  230, 1089,  179,  163,  164,  418,  408,
 /*  1910 */   409,  170,  181,   85,   86,  420,   87,  165, 1092,   88,
 /*  1920 */   233,  232, 1088,  151,   18,  234, 1081,  250,  333, 1209,
 /*  1930 */   185,  486,  236,  186,   37,  841,  491,  354,  240,  346,
 /*  1940 */   495,  187,   90,  869,   19,   20,  500,  503,  349,   92,
 /*  1950 */   167,  152,  296,  882,   93,  510,   94, 1159,  153, 1041,
 /*  1960 */  1128,   39,  214,  269, 1127,  271,  249,  952,  190,  947,
 /*  1970 */   110, 1149,   21,    7, 1153,   22, 1145,   23, 1147,   24,
 /*  1980 */  1133,   25, 1152,   33,  539,  193,   26, 1056,   98, 1042,
 /*  1990 */  1040, 1044, 1098, 1045, 1097,  256,  255,   28,   40,  257,
 /*  2000 */  1010,  851,  109,   29,  913,  559,  384,  387,  258, 1167,
 /*  2010 */  1166, 1225, 1225, 1225, 1579, 1225, 1225, 1225, 1225, 1225,
 /*  2020 */  1225, 1225, 1578,

};
static const YYCODETYPE yy_lookahead[] = {
 /*     0 */   192,  221,  192,  223,  192,  214,  272,  273,  274,  217,
 /*    10 */   192,  231,  217,  192,  192,  192,  272,  273,  274,   19,
 /*    20 */   233,  234,  214,  215,  214,  215,  203,  293,  203,  233,
 /*    30 */   234,   31,  214,  215,  214,  214,  215,  214,  215,   39,
 /*    40 */   208,  209,  210,   43,   44,   45,   46,   47,   48,   49,
 /*    50 */    50,   51,   52,   53,   54,   55,   56,   57,  236,   19,
 /*    60 */   237,  238,  237,  238,  272,  273,  274,  272,  273,  274,
 /*    70 */   192,  211,  251,  250,  251,  250,   26,  192,  200,  254,
 /*    80 */   255,  260,  204,   43,   44,   45,   46,   47,   48,   49,
 /*    90 */    50,   51,   52,   53,   54,   55,   56,   57,  192,  214,
 /*   100 */   215,  214,  102,  103,  104,  105,  106,  107,  108,  109,
 /*   110 */   110,  111,  112,   59,  229,  192,  294,   16,  306,  307,
 /*   120 */   312,  313,  312,  311,  314,   59,   86,  204,   88,   19,
 /*   130 */   312,  313,  272,  273,  274,  271,   26,   22,   54,   55,
 /*   140 */    56,   57,  102,  103,  104,  105,  106,  107,  108,  109,
 /*   150 */   110,  111,  112,   43,   44,   45,   46,   47,   48,   49,
 /*   160 */    50,   51,   52,   53,   54,   55,   56,   57,   53,  115,
 /*   170 */   116,  117,  118,  309,  310,  121,  122,  123,   77,   69,
 /*   180 */    79,  115,  116,  117,   59,  131,  102,  103,  104,  105,
 /*   190 */   106,  107,  108,  109,  110,  111,  112,   72,  148,   19,
 /*   200 */    54,   55,   56,   57,   58,  108,  109,  110,  111,  112,
 /*   210 */   304,  305,  102,  103,  104,  105,  106,  107,  108,  109,
 /*   220 */   110,  111,  112,   43,   44,   45,   46,   47,   48,   49,
 /*   230 */    50,   51,   52,   53,   54,   55,   56,   57,   19,  112,
 /*   240 */   115,  116,  117,   24,  208,  209,  210,   67,  102,  103,
 /*   250 */   104,  105,  106,  107,  108,  109,  110,  111,  112,  192,
 /*   260 */    59,  160,   43,   44,   45,   46,   47,   48,   49,   50,
 /*   270 */    51,   52,   53,   54,   55,   56,   57,   19,   46,   47,
 /*   280 */    48,   49,  102,  103,  104,  105,  106,  107,  108,  109,
 /*   290 */   110,  111,  112,  213,   73,  184,  185,  186,  187,  188,
 /*   300 */   189,  221,   81,  236,   46,  194,  192,  196,   19,   59,
 /*   310 */   133,   59,  135,  136,  203,  192,  115,  116,  117,  127,
 /*   320 */   128,  102,  103,  104,  105,  106,  107,  108,  109,  110,
 /*   330 */   111,  112,   43,   44,   45,   46,   47,   48,   49,   50,
 /*   340 */    51,   52,   53,   54,   55,   56,   57,  126,  237,  238,
 /*   350 */   100,  150,  120,  230,  186,  187,  188,  189,  137,  138,
 /*   360 */   108,  250,  194,   26,  196,  115,  116,  115,  116,  117,
 /*   370 */   120,  203,  114,  164,  165,  264,  102,  103,  104,  105,
 /*   380 */   106,  107,  108,  109,  110,  111,  112,  192,  130,  111,
 /*   390 */   112,  102,  103,  104,  105,  106,  107,  108,  109,  110,
 /*   400 */   111,  112,  152,  153,  154,  237,  238,  296,  192,  214,
 /*   410 */   215,  228,  192,  307,  192,   19,   59,  311,  250,   23,
 /*   420 */    22,  106,  107,  108,  109,  110,  111,  112,  192,   72,
 /*   430 */   214,  215,  264,  192,  214,  215,  214,  215,  149,   43,
 /*   440 */    44,   45,   46,   47,   48,   49,   50,   51,   52,   53,
 /*   450 */    54,   55,   56,   57,  117,  214,  215,   59,   19,  187,
 /*   460 */   192,  189,   23,   81,  296,  192,  194,  251,  196,   59,
 /*   470 */   229,  251,  115,  116,  117,  203,  260,  106,  107,  142,
 /*   480 */   260,  267,   43,   44,   45,   46,   47,   48,   49,   50,
 /*   490 */    51,   52,   53,   54,   55,   56,   57,  261,  102,  103,
 /*   500 */   104,  105,  106,  107,  108,  109,  110,  111,  112,  237,
 /*   510 */   238,   76,  192,  115,  116,  117,  144,  192,   76,  137,
 /*   520 */   138,  192,  250,  152,   89,  154,  116,   92,   19,   87,
 /*   530 */   262,   89,   23,   22,   92,  163,  264,  192,   22,  214,
 /*   540 */   215,  102,  103,  104,  105,  106,  107,  108,  109,  110,
 /*   550 */   111,  112,   43,   44,   45,   46,   47,   48,   49,   50,
 /*   560 */    51,   52,   53,   54,   55,   56,   57,   19,  296,  118,
 /*   570 */    59,   23,  121,  122,  123,   59,  251,   26,   46,  306,
 /*   580 */   307,  261,  131,  192,  311,  192,  144,  192,   22,  203,
 /*   590 */   100,   43,   44,   45,   46,   47,   48,   49,   50,   51,
 /*   600 */    52,   53,   54,   55,   56,   57,  116,  214,  215,  271,
 /*   610 */   120,  102,  103,  104,  105,  106,  107,  108,  109,  110,
 /*   620 */   111,  112,  229,  237,  238,   59,  115,  116,  117,  299,
 /*   630 */   300,  115,  116,  117,   59,   16,  250,   19,  192,  192,
 /*   640 */    19,   23,  152,  153,  154,   24,  114,  309,  310,  192,
 /*   650 */   102,  103,  104,  105,  106,  107,  108,  109,  110,  111,
 /*   660 */   112,   43,   44,   45,   46,   47,   48,   49,   50,   51,
 /*   670 */    52,   53,   54,   55,   56,   57,   19,    7,    8,    9,
 /*   680 */    23,  115,  116,  117,  203,  290,  239,  238,  137,  138,
 /*   690 */   115,  116,  117,  236,  192,   22,   77,   81,   79,  250,
 /*   700 */    43,   44,   45,   46,   47,   48,   49,   50,   51,   52,
 /*   710 */    53,   54,   55,   56,   57,  192,   95,  142,  237,  238,
 /*   720 */   102,  103,  104,  105,  106,  107,  108,  109,  110,  111,
 /*   730 */   112,  250,   59,  112,  192,  119,   26,  214,  215,  118,
 /*   740 */   119,  120,  121,  122,  123,  124,   19,  192,  267,  302,
 /*   750 */    23,  130,  229,  137,  138,   23,  214,  215,   26,  102,
 /*   760 */   103,  104,  105,  106,  107,  108,  109,  110,  111,  112,
 /*   770 */    43,   44,   45,   46,   47,   48,   49,   50,   51,   52,
 /*   780 */    53,   54,   55,   56,   57,   19,   76,   11,  115,  116,
 /*   790 */   117,  192,   29,  251,  239,   73,   33,  192,  192,   89,
 /*   800 */   192,  192,   92,  192,  192,  126,  127,  128,  224,   43,
 /*   810 */    44,   45,   46,   47,   48,   49,   50,   51,   52,   53,
 /*   820 */    54,   55,   56,   57,  192,   35,  214,  215,   65,  102,
 /*   830 */   103,  104,  105,  106,  107,  108,  109,  110,  111,  112,
 /*   840 */    59,  229,  192,  192,  239,  239,  214,  215,  126,  127,
 /*   850 */   128,  126,  127,  128,  307,   19,   66,  302,  311,  192,
 /*   860 */   261,  229,  224,   22,   74,  214,  215,  192,  102,  103,
 /*   870 */   104,  105,  106,  107,  108,  109,  110,  111,  112,   43,
 /*   880 */    44,   45,   46,   47,   48,   49,   50,   51,   52,   53,
 /*   890 */    54,   55,   56,   57,  192,  192,  115,  116,  117,   19,
 /*   900 */    59,  290,  251,  127,  128,  192,   23,  302,  302,   26,
 /*   910 */   302,  236,  192,   22,   21,   24,  214,  215,  192,  129,
 /*   920 */    22,  192,   24,  142,  158,   45,   46,   47,   48,   49,
 /*   930 */    50,   51,   52,   53,   54,   55,   56,   57,  102,  103,
 /*   940 */   104,  105,  106,  107,  108,  109,  110,  111,  112,  192,
 /*   950 */    59,   12,  192,  251,  192,  305,  192,  116,   22,   23,
 /*   960 */   242,  203,   26,  203,   24,  236,   27,  237,  238,  266,
 /*   970 */   252,  214,  215,   80,  214,  215,  214,  215,  214,  215,
 /*   980 */   250,   42,  102,  103,  104,  105,  106,  107,  108,  109,
 /*   990 */   110,  111,  112,  229,  158,  237,  238,  237,  238,   59,
 /*  1000 */   117,  281,   63,  192,  192,  192,  192,  116,  250,  192,
 /*  1010 */   250,  251,   73,  251,   19,  122,  290,  237,  238,   24,
 /*  1020 */   260,  209,  210,  209,  210,  142,  242,  214,  215,  197,
 /*  1030 */   250,   22,   23,  276,   19,   26,  252,  101,   43,   44,
 /*  1040 */    45,   46,   47,   48,   49,   50,   51,   52,   53,   54,
 /*  1050 */    55,   56,   57,  160,   19,  211,  116,  192,   43,   44,
 /*  1060 */    45,   46,   47,   48,   49,   50,   51,   52,   53,   54,
 /*  1070 */    55,   56,   57,  192,  192,   22,  192,  266,   43,   44,
 /*  1080 */    45,   46,   47,   48,   49,   50,   51,   52,   53,   54,
 /*  1090 */    55,   56,   57,  192,  282,  192,  282,  102,  103,  104,
 /*  1100 */   105,  106,  107,  108,  109,  110,  111,  112,   59,  192,
 /*  1110 */   101,  279,  192,  192,  230,  283,  192,  102,  103,  104,
 /*  1120 */   105,  106,  107,  108,  109,  110,  111,  112,  204,  211,
 /*  1130 */    66,  214,  215,  289,  214,  215,  108,  102,  103,  104,
 /*  1140 */   105,  106,  107,  108,  109,  110,  111,  112,  266,   85,
 /*  1150 */   226,  192,  228,   22,   23,  106,  107,   19,   94,  106,
 /*  1160 */   107,  192,  134,  114,  115,  116,  117,  139,  119,  266,
 /*  1170 */   203,  206,  207,  214,  215,  192,  127,  192,  206,  207,
 /*  1180 */    59,  192,   44,   45,   46,   47,   48,   49,   50,   51,
 /*  1190 */    52,   53,   54,   55,   56,   57,  192,   76,  192,  214,
 /*  1200 */   215,  152,  284,  154,  237,  238,  192,  289,   87,  145,
 /*  1210 */    89,   19,   20,   92,   22,   22,   23,  250,  307,  236,
 /*  1220 */   214,  215,  311,  203,   12,  247,  192,  249,   36,  307,
 /*  1230 */   192,  262,  101,  311,  137,  138,  115,  116,  117,   27,
 /*  1240 */   102,  103,  104,  105,  106,  107,  108,  109,  110,  111,
 /*  1250 */   112,   59,  214,  215,   42,  203,  307,  237,  238,  192,
 /*  1260 */   311,  192,   26,   71,  192,  144,  262,  297,  298,  203,
 /*  1270 */   250,   19,   20,   81,   22,   63,  262,  254,  255,   15,
 /*  1280 */    26,  214,  215,  214,  215,   26,  214,  215,   36,  237,
 /*  1290 */   238,  192,  100,  114,  101,  192,  262,  192,  106,  107,
 /*  1300 */    48,  134,  250,  237,  238,  113,  139,  115,  116,  117,
 /*  1310 */   192,   59,  120,  214,  215,  242,  250,  214,  215,  214,
 /*  1320 */   215,  148,  149,   71,   60,  252,  242,  192,  149,  137,
 /*  1330 */   138,  192,  214,  215,  192,   19,  252,   85,  192,   59,
 /*  1340 */   192,  157,   90,  159,  152,  153,  154,  155,  156,  214,
 /*  1350 */   215,  192,  100,  214,  215,   19,  214,  215,  106,  107,
 /*  1360 */   214,  215,  214,  215,   22,  113,  192,  115,  116,  117,
 /*  1370 */   192,  242,  120,  214,  215,  192,   24,  192,   31,  192,
 /*  1380 */   144,  252,   26,  192,  125,   99,   39,  192,  214,  215,
 /*  1390 */   192,   59,  214,  215,  192,  141,  116,  214,  215,  214,
 /*  1400 */   215,  214,  215,   61,  152,  153,  154,  155,  156,    0,
 /*  1410 */     1,    2,  214,  215,    5,  192,  214,  215,  132,   10,
 /*  1420 */    11,   12,   13,   14,    1,    2,   17,  192,    5,   19,
 /*  1430 */    20,  115,   22,   10,   11,   12,   13,   14,  192,   30,
 /*  1440 */    17,   32,   23,  192,   23,   26,   36,   26,  116,   40,
 /*  1450 */   192,  115,  192,   30,  192,   32,  119,  120,   59,    5,
 /*  1460 */   214,  215,  128,   40,   10,   11,   12,   13,   14,   59,
 /*  1470 */    19,   17,  214,  215,  214,  215,  214,  215,  120,   70,
 /*  1480 */   192,   71,   22,  192,   30,  151,   32,   78,  130,  128,
 /*  1490 */    81,  192,  140,   70,   40,   85,  192,  141,    7,    8,
 /*  1500 */    90,   78,  214,  215,   81,  214,  215,   98,   83,   84,
 /*  1510 */   100,  192,  151,  214,  215,  116,  106,  107,  214,  215,
 /*  1520 */   192,   98,  192,  113,   70,  115,  116,  117,   23,  224,
 /*  1530 */   120,   26,   78,  214,  215,   81,   19,   20,  152,   22,
 /*  1540 */   154,  132,  214,  215,  214,  215,  137,  138,   97,  192,
 /*  1550 */   256,  192,   98,   36,   23,  132,  192,   26,  192,  192,
 /*  1560 */   137,  138,  152,  153,  154,  155,  156,  192,  192,  192,
 /*  1570 */   161,  214,  215,  214,  215,  192,   59,  192,  214,  215,
 /*  1580 */   214,  215,  192,  152,  161,  154,  132,  192,   71,  214,
 /*  1590 */   215,  137,  138,  192,  192,  192,   19,   20,  192,   22,
 /*  1600 */   140,  253,   85,  192,  214,  215,  192,   90,   23,  214,
 /*  1610 */   215,   26,  192,   36,  192,  161,   23,  100,  192,   26,
 /*  1620 */   214,  215,  192,  106,  107,  214,  215,  192,   23,  192,
 /*  1630 */   113,   26,  115,  116,  117,   23,   59,  120,   26,   23,
 /*  1640 */    23,   23,   26,   26,   26,  316,  234,   23,   71,   23,
 /*  1650 */    26,  192,   26,  192,  192,  192,  192,  192,  192,  192,
 /*  1660 */   192,  253,  212,  190,  286,  285,  253,  240,  253,  152,
 /*  1670 */   153,  154,  155,  156,  241,  243,  295,  100,  291,  291,
 /*  1680 */   223,  253,  227,  106,  107,  108,  269,  244,  244,  265,
 /*  1690 */   113,  257,  115,  116,  117,  257,  243,  120,  269,  218,
 /*  1700 */   217,  265,  217,   19,   20,  217,   22,  195,  269,  269,
 /*  1710 */    60,  295,  140,  257,  243,  241,  247,  247,  199,  278,
 /*  1720 */    36,  199,  199,   38,   19,   20,  150,   22,  149,  152,
 /*  1730 */   153,  154,  155,  156,   22,   43,  232,  295,  292,  292,
 /*  1740 */    18,   36,  235,   59,  268,  270,  235,  199,  235,  235,
 /*  1750 */    18,  198,  148,  281,  244,   71,  270,  270,  268,  244,
 /*  1760 */   232,  232,  244,  199,   59,  244,  198,  157,  288,   62,
 /*  1770 */   199,  287,  198,   22,  219,  219,   71,  199,  198,  114,
 /*  1780 */   199,  198,  216,  216,  100,  216,  225,   64,   22,  125,
 /*  1790 */   106,  107,  222,  164,  219,  222,   24,  113,  216,  115,
 /*  1800 */   116,  117,  218,  216,  120,  100,  216,  216,  310,  303,
 /*  1810 */   112,  106,  107,  225,  280,  280,  219,  143,  113,  259,
 /*  1820 */   115,  116,  117,  114,  259,  120,  199,   91,   82,  147,
 /*  1830 */   144,  315,   22,  275,  199,  315,  152,  153,  154,  155,
 /*  1840 */   156,  146,  145,  247,  258,  157,   25,  258,  245,  248,
 /*  1850 */   244,  259,  258,  202,  259,  248,  258,  152,  153,  154,
 /*  1860 */   155,  156,  263,  263,   26,  246,   13,  201,  193,  193,
 /*  1870 */     6,  191,  191,  205,  191,  220,  220,  205,  211,  277,
 /*  1880 */   211,  211,  211,  205,    4,  212,    3,   22,  162,  212,

 /*  1890 */   211,   15,   23,   16,   23,  138,  129,  150,   26,   24,
 /*  1900 */   141,   20,   16,  143,    1,  141,  129,  129,   61,  301,
 /*  1910 */   301,  298,  150,   53,   53,   37,   53,  129,  115,   53,
 /*  1920 */   140,   34,    1,    5,   22,  114,   68,   26,  160,   75,
 /*  1930 */    68,   41,  140,  114,   24,   20,   19,  130,  124,   23,
 /*  1940 */    67,   22,   22,   59,   22,   22,   67,   96,   24,   22,
 /*  1950 */    37,   23,   67,   28,  148,   22,   26,   23,   23,   23,
 /*  1960 */    23,   22,  140,   23,   97,   23,   34,  115,   22,  142,
 /*  1970 */    26,   75,   34,   44,   75,   34,   88,   34,   86,   34,
 /*  1980 */    23,   34,   93,   22,   24,   26,   34,   23,   26,   23,
 /*  1990 */    23,   23,   23,   11,   23,   22,   26,   22,   22,  140,
 /*  2000 */    23,   23,   22,   22,  134,   26,   23,   15,  140,    1,
 /*  2010 */     1,  317,  317,  317,  140,  317,  317,  317,  317,  317,
 /*  2020 */   317,  317,  140,  317,  317,  317,  317,  317,  317,  317,
 /*  2030 */   317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
 /*  2040 */   317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
 /*  2050 */   317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
 /*  2060 */   317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
 /*  2070 */   317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
 /*  2080 */   317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
 /*  2090 */   317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
 /*  2100 */   317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
 /*  2110 */   317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
 /*  2120 */   317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
 /*  2130 */   317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
 /*  2140 */   317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
 /*  2150 */   317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
 /*  2160 */   317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
 /*  2170 */   317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
 /*  2180 */   317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
 /*  2190 */   317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
 /*  2200 */   317,  317,  317,  317,  317,  317,  317,


};
#define YY_SHIFT_COUNT    (569)
#define YY_SHIFT_MIN      (0)
#define YY_SHIFT_MAX      (2009)
static const unsigned short int yy_shift_ofst[] = {
 /*     0 */  1423, 1409, 1454, 1192, 1192,  382, 1252, 1410, 1517, 1684,
 /*    10 */  1684, 1684,  221,    0,    0,  180, 1015, 1684, 1684, 1684,
 /*    20 */  1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684,
 /*    30 */  1049, 1049, 1121, 1121,   54,  616,  382,  382,  382,  382,
 /*    40 */   382,   40,  110,  219,  289,  396,  439,  509,  548,  618,
 /*    50 */   657,  727,  766,  836,  995, 1015, 1015, 1015, 1015, 1015,
 /*    60 */  1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015,
 /*    70 */  1015, 1015, 1015, 1035, 1015, 1138,  880,  880, 1577, 1684,
 /*    80 */  1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684,
 /*    90 */  1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684,
 /*   100 */  1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684,
 /*   110 */  1684, 1684, 1684, 1705, 1684, 1684, 1684, 1684, 1684, 1684,
 /*   120 */  1684, 1684, 1684, 1684, 1684, 1684, 1684,  146,   84,   84,
 /*   130 */    84,   84,   84,  274,  315,  125,   97,  357,   66,   66,
 /*   140 */   893,  258,   66,   66,  371,  371,   66,  551,  551,  551,
 /*   150 */   551,  192,  209,  209,  278,  127, 2023, 2023,  621,  621,
 /*   160 */   621,  201,  398,  398,  398,  398,  939,  939,  442,  936,
 /*   170 */  1009,   66,   66,   66,   66,   66,   66,   66,   66,   66,
 /*   180 */    66,   66,   66,   66,   66,   66,   66,   66,   66,   66,
 /*   190 */    66,  710,  710,   66,  776,  435,  435,  410,  410,  372,
 /*   200 */  1097, 2023, 2023, 2023, 2023, 2023, 2023, 2023,  250,  490,
 /*   210 */   490,  511,  451,  516,  252,  566,  575,  781,  673,   66,
 /*   220 */    66,   66,   66,   66,   66,   66,   66,   66,   66,  722,
 /*   230 */    66,   66,   66,   66,   66,   66,   66,   66,   66,   66,
 /*   240 */    66,   66,  790,  790,  790,   66,   66,   66,  883,   66,
 /*   250 */    66,   66,  891, 1064,   66,   66, 1212,   66,   66,   66,
 /*   260 */    66,   66,   66,   66,   66,  725,  763,  177,  940,  940,
 /*   270 */   940,  940,  337,  177,  177, 1028, 1053,  670, 1264, 1179,
 /*   280 */  1173, 1254, 1316, 1173, 1316, 1336,   50, 1179, 1179,   50,
 /*   290 */  1179, 1254, 1336, 1259,  732,  532, 1347, 1347, 1347, 1316,
 /*   300 */  1236, 1236, 1184, 1356, 1167,  898, 1650, 1650, 1572, 1572,
 /*   310 */  1685, 1685, 1572, 1576, 1579, 1712, 1692, 1722, 1722, 1722,
 /*   320 */  1722, 1572, 1732, 1604, 1579, 1579, 1604, 1712, 1692, 1604,
 /*   330 */  1692, 1604, 1572, 1732, 1610, 1707, 1572, 1732, 1751, 1572,
 /*   340 */  1732, 1572, 1732, 1751, 1665, 1665, 1665, 1723, 1766, 1766,
 /*   350 */  1751, 1665, 1664, 1665, 1723, 1665, 1665, 1629, 1772, 1698,
 /*   360 */  1698, 1751, 1674, 1709, 1674, 1709, 1674, 1709, 1674, 1709,
 /*   370 */  1572, 1736, 1736, 1746, 1746, 1682, 1686, 1810, 1572, 1688,
 /*   380 */  1682, 1695, 1697, 1604, 1821, 1838, 1853, 1853, 1864, 1864,
 /*   390 */  1864, 2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023, 2023,
 /*   400 */  2023, 2023, 2023, 2023, 2023, 2023,  232,  101, 1131, 1193,
 /*   410 */   619,  679,  841, 1421, 1286,  115, 1352, 1334, 1361, 1419,
 /*   420 */  1342, 1505, 1531, 1585, 1593, 1605, 1612, 1280, 1337, 1491,
 /*   430 */  1358, 1451, 1332, 1616, 1617, 1425, 1618, 1386, 1431, 1624,
 /*   440 */  1626, 1399, 1460, 1880, 1883, 1865, 1726, 1876, 1877, 1869,
 /*   450 */  1871, 1757, 1747, 1767, 1872, 1872, 1875, 1759, 1881, 1760,
 /*   460 */  1886, 1903, 1764, 1777, 1872, 1778, 1847, 1878, 1872, 1762,
 /*   470 */  1860, 1861, 1863, 1866, 1788, 1803, 1887, 1780, 1921, 1918,
 /*   480 */  1902, 1811, 1768, 1858, 1901, 1862, 1854, 1890, 1792, 1819,
 /*   490 */  1910, 1915, 1917, 1807, 1814, 1919, 1873, 1920, 1922, 1916,
 /*   500 */  1923, 1879, 1884, 1924, 1851, 1925, 1927, 1885, 1913, 1928,
 /*   510 */  1806, 1933, 1934, 1935, 1936, 1930, 1937, 1939, 1867, 1822,
 /*   520 */  1940, 1942, 1852, 1932, 1946, 1827, 1944, 1938, 1941, 1943,
 /*   530 */  1945, 1888, 1896, 1892, 1929, 1899, 1889, 1947, 1957, 1961,
 /*   540 */  1960, 1959, 1962, 1952, 1964, 1944, 1966, 1967, 1968, 1969,
 /*   550 */  1970, 1971, 1973, 1982, 1975, 1976, 1977, 1978, 1980, 1981,
 /*   560 */  1979, 1870, 1859, 1868, 1874, 1882, 1983, 1992, 2008, 2009,

};
#define YY_REDUCE_COUNT (405)
#define YY_REDUCE_MIN   (-266)
#define YY_REDUCE_MAX   (1683)
static const short yy_reduce_ofst[] = {
 /*     0 */   111,  168,  272,  760, -177, -175, -192, -190, -182, -179,
 /*    10 */   216,  220,  481, -208, -205, -266, -140, -115,  241,  393,
 /*    20 */   523,  325,  612,  632,  542,  651,  764,  757,  702,  762,
 /*    30 */   812,  814, -188,  273,  924,  386,  758,  967, 1020, 1052,
 /*    40 */  1066, -256, -256, -256, -256, -256, -256, -256, -256, -256,
 /*    50 */  -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
 /*    60 */  -256, -256, -256, -256, -256, -256, -256, -256, -256, -256,
 /*    70 */  -256, -256, -256, -256, -256, -256, -256, -256,  195,  222,
 /*    80 */   813,  917,  920,  959,  985, 1006, 1038, 1067, 1069, 1072,
 /*    90 */  1099, 1103, 1105, 1118, 1135, 1139, 1142, 1146, 1148, 1159,
 /*   100 */  1174, 1178, 1183, 1185, 1187, 1198, 1202, 1246, 1258, 1260,
 /*   110 */  1262, 1288, 1291, 1299, 1304, 1319, 1328, 1330, 1357, 1359,
 /*   120 */  1364, 1366, 1375, 1390, 1395, 1406, 1411, -256, -256, -256,
 /*   130 */  -256, -256, -256, -256, -256,  447, -256,  555, -178,  605,
 /*   140 */   832, -220,  606,  -94, -168,   36, -122,  730,  780,  730,
 /*   150 */   780,  918, -136,  338, -256, -256, -256, -256,   80,   80,
 /*   160 */    80,  720,  703,  811,  882,  903, -213, -204,  106,  330,
 /*   170 */   330,  -77,  236,  320,  599,   67,  457,  675,  729,  395,
 /*   180 */   268,  611,  969, 1004,  726, 1014,  983,  123,  884,  608,
 /*   190 */  1034,  547,  911,  650,  844,  922,  949,  965,  972,  978,
 /*   200 */   449,  970,  718,  784, 1073, 1084, 1023, 1129, -209, -180,
 /*   210 */  -113,  114,  183,  329,  345,  391,  446,  502,  609,  667,
 /*   220 */   713,  817,  865,  881,  901,  921,  989, 1191, 1195,  214,
 /*   230 */  1223, 1235, 1251, 1367, 1376, 1377, 1383, 1385, 1401, 1402,
 /*   240 */  1403, 1414,  584,  638, 1305, 1420, 1422, 1426, 1294, 1430,
 /*   250 */  1435, 1437, 1348, 1329, 1459, 1461, 1412, 1462,  345, 1463,
 /*   260 */  1464, 1465, 1466, 1467, 1468, 1378, 1380, 1427, 1408, 1413,
 /*   270 */  1415, 1428, 1294, 1427, 1427, 1433, 1450, 1473, 1381, 1417,
 /*   280 */  1424, 1432, 1434, 1436, 1438, 1387, 1443, 1429, 1439, 1444,
 /*   290 */  1440, 1453, 1388, 1481, 1455, 1457, 1483, 1485, 1488, 1456,
 /*   300 */  1469, 1470, 1441, 1471, 1474, 1512, 1416, 1442, 1519, 1522,
 /*   310 */  1446, 1447, 1523, 1472, 1475, 1476, 1504, 1507, 1511, 1513,
 /*   320 */  1514, 1548, 1553, 1510, 1486, 1487, 1515, 1490, 1528, 1518,
 /*   330 */  1529, 1521, 1564, 1568, 1480, 1484, 1571, 1574, 1555, 1578,
 /*   340 */  1580, 1581, 1583, 1556, 1566, 1567, 1569, 1561, 1570, 1573,
 /*   350 */  1575, 1582, 1584, 1587, 1588, 1590, 1591, 1498, 1506, 1534,
 /*   360 */  1535, 1597, 1560, 1586, 1565, 1589, 1592, 1594, 1595, 1598,
 /*   370 */  1627, 1516, 1520, 1599, 1600, 1601, 1596, 1558, 1635, 1602,
 /*   380 */  1607, 1619, 1603, 1606, 1651, 1666, 1675, 1676, 1680, 1681,
 /*   390 */  1683, 1608, 1609, 1613, 1668, 1667, 1669, 1670, 1671, 1672,
 /*   400 */  1655, 1656, 1673, 1677, 1679, 1678,
};
static const YYACTIONTYPE yy_default[] = {
 /*     0 */  1623, 1623, 1623, 1453, 1223, 1332, 1223, 1223, 1223, 1453,
 /*    10 */  1453, 1453, 1223, 1362, 1362, 1506, 1254, 1223, 1223, 1223,
 /*    20 */  1223, 1223, 1223, 1223, 1223, 1223, 1223, 1452, 1223, 1223,
 /*    30 */  1223, 1223, 1541, 1541, 1223, 1223, 1223, 1223, 1223, 1223,
 /*    40 */  1223, 1223, 1371, 1223, 1378, 1223, 1223, 1223, 1223, 1223,
 /*    50 */  1454, 1455, 1223, 1223, 1223, 1505, 1507, 1470, 1385, 1384,
 /*    60 */  1383, 1382, 1488, 1349, 1376, 1369, 1373, 1448, 1449, 1447,
 /*    70 */  1451, 1455, 1454, 1223, 1372, 1419, 1433, 1418, 1223, 1223,
 /*    80 */  1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
 /*    90 */  1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
 /*   100 */  1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
 /*   110 */  1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
 /*   120 */  1223, 1223, 1223, 1223, 1223, 1223, 1223, 1427, 1432, 1438,
 /*   130 */  1431, 1428, 1421, 1420, 1422, 1223, 1423, 1223, 1223, 1223,
 /*   140 */  1244, 1296, 1223, 1223, 1223, 1223, 1223, 1525, 1524, 1223,
 /*   150 */  1223, 1254, 1413, 1412, 1424, 1425, 1435, 1434, 1513, 1576,
 /*   160 */  1575, 1471, 1223, 1223, 1223, 1223, 1223, 1223, 1541, 1223,
 /*   170 */  1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
 /*   180 */  1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
 /*   190 */  1223, 1541, 1541, 1223, 1254, 1541, 1541, 1250, 1250, 1356,
 /*   200 */  1223, 1520, 1323, 1323, 1323, 1323, 1332, 1323, 1223, 1223,
 /*   210 */  1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
 /*   220 */  1223, 1223, 1223, 1510, 1508, 1223, 1223, 1223, 1223, 1223,
 /*   230 */  1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
 /*   240 */  1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
 /*   250 */  1223, 1223, 1328, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
 /*   260 */  1223, 1223, 1223, 1223, 1570, 1223, 1483, 1310, 1328, 1328,
 /*   270 */  1328, 1328, 1330, 1311, 1309, 1322, 1255, 1230, 1615, 1388,
 /*   280 */  1377, 1329, 1351, 1377, 1351, 1612, 1375, 1388, 1388, 1375,
 /*   290 */  1388, 1329, 1612, 1271, 1592, 1266, 1362, 1362, 1362, 1351,
 /*   300 */  1356, 1356, 1450, 1329, 1322, 1223, 1615, 1615, 1337, 1337,
 /*   310 */  1614, 1614, 1337, 1471, 1599, 1397, 1299, 1305, 1305, 1305,
 /*   320 */  1305, 1337, 1241, 1375, 1599, 1599, 1375, 1397, 1299, 1375,
 /*   330 */  1299, 1375, 1337, 1241, 1487, 1609, 1337, 1241, 1461, 1337,
 /*   340 */  1241, 1337, 1241, 1461, 1297, 1297, 1297, 1286, 1223, 1223,
 /*   350 */  1461, 1297, 1271, 1297, 1286, 1297, 1297, 1559, 1223, 1465,
 /*   360 */  1465, 1461, 1355, 1350, 1355, 1350, 1355, 1350, 1355, 1350,
 /*   370 */  1337, 1551, 1551, 1365, 1365, 1370, 1356, 1456, 1337, 1223,
 /*   380 */  1370, 1368, 1366, 1375, 1247, 1289, 1573, 1573, 1569, 1569,
 /*   390 */  1569, 1620, 1620, 1520, 1585, 1254, 1254, 1254, 1254, 1585,
 /*   400 */  1273, 1273, 1255, 1255, 1254, 1585, 1223, 1223, 1223, 1223,
 /*   410 */  1223, 1223, 1580, 1223, 1515, 1472, 1341, 1223, 1223, 1223,
 /*   420 */  1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
 /*   430 */  1223, 1526, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
 /*   440 */  1223, 1223, 1402, 1223, 1226, 1517, 1223, 1223, 1223, 1223,
 /*   450 */  1223, 1223, 1223, 1223, 1379, 1380, 1342, 1223, 1223, 1223,
 /*   460 */  1223, 1223, 1223, 1223, 1394, 1223, 1223, 1223, 1389, 1223,
 /*   470 */  1223, 1223, 1223, 1223, 1223, 1223, 1223, 1611, 1223, 1223,
 /*   480 */  1223, 1223, 1223, 1223, 1486, 1485, 1223, 1223, 1339, 1223,
 /*   490 */  1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
 /*   500 */  1223, 1223, 1269, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
 /*   510 */  1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
 /*   520 */  1223, 1223, 1223, 1223, 1223, 1223, 1367, 1223, 1223, 1223,
 /*   530 */  1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
 /*   540 */  1223, 1556, 1357, 1223, 1223, 1602, 1223, 1223, 1223, 1223,
 /*   550 */  1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
 /*   560 */  1596, 1313, 1404, 1223, 1403, 1407, 1223, 1235, 1223, 1223,

};
/********** End of lemon-generated parsing tables *****************************/

/* The next table maps tokens (terminal symbols) into fallback tokens.
** If a construct like the following:
**
**      %fallback ID X Y Z.







|

|
|
|
|
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
<
<
<
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>


|
|
|
|
|
|
|
|
|
|
|
|
|
|


|
|
|
|

|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|


|
|
|

|

|
|
|


|
|
|

|

|
|
|


|
|
|
|

|
|
|
|
|
|
|
|
|
|

|

|

|

|
|
|
|
|
|
|

|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>

|

|

|
|

|
|








|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>

|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|


|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>







159094
159095
159096
159097
159098
159099
159100
159101
159102
159103
159104
159105
159106
159107
159108
159109
159110
159111
159112
159113
159114
159115
159116
159117
159118
159119
159120
159121
159122
159123
159124
159125
159126
159127
159128
159129
159130
159131
159132
159133
159134
159135
159136
159137
159138
159139
159140
159141
159142
159143
159144
159145
159146
159147
159148
159149
159150
159151
159152
159153
159154
159155
159156
159157
159158
159159
159160
159161
159162
159163
159164
159165
159166
159167
159168
159169
159170
159171
159172
159173
159174
159175
159176
159177
159178
159179
159180
159181
159182
159183
159184
159185
159186
159187
159188
159189
159190
159191
159192
159193
159194
159195
159196
159197
159198
159199
159200




159201
159202
159203
159204
159205
159206
159207
159208
159209
159210
159211
159212
159213
159214
159215
159216
159217
159218
159219
159220
159221
159222
159223
159224
159225
159226
159227
159228
159229
159230
159231
159232
159233
159234
159235
159236
159237
159238
159239
159240
159241
159242
159243
159244
159245
159246
159247
159248
159249
159250
159251
159252
159253
159254
159255
159256
159257
159258
159259
159260
159261
159262
159263
159264
159265
159266
159267
159268
159269
159270
159271
159272
159273
159274
159275
159276
159277
159278
159279
159280
159281
159282
159283
159284
159285
159286
159287
159288
159289
159290
159291
159292
159293
159294
159295
159296
159297
159298
159299
159300
159301
159302
159303
159304
159305
159306
159307
159308
159309
159310
159311
159312
159313
159314
159315
159316
159317
159318
159319
159320
159321
159322
159323
159324
159325
159326
159327
159328
159329
159330
159331
159332
159333
159334
159335
159336
159337
159338
159339
159340
159341
159342
159343
159344
159345
159346
159347
159348
159349
159350
159351
159352
159353
159354
159355
159356
159357
159358
159359
159360
159361
159362
159363
159364
159365
159366
159367
159368
159369
159370
159371
159372
159373
159374
159375
159376
159377
159378
159379
159380
159381
159382
159383
159384
159385
159386
159387
159388
159389
159390
159391
159392
159393
159394
159395
159396
159397
159398
159399
159400
159401
159402
159403
159404
159405
159406
159407
159408
159409
159410
159411
159412
159413
159414
159415
159416
159417
159418
159419
159420
159421
159422
159423
159424
159425
159426
159427
159428
159429
159430
159431
159432
159433
159434
159435
159436
159437
159438
159439
159440
159441
159442
159443
159444
159445
159446
159447
159448
159449
159450
159451
159452
159453
159454
159455
159456
159457
159458
159459
159460
159461
159462
159463
159464
159465
159466
159467
159468
159469
159470
159471
159472
159473
159474
159475
159476
159477
159478
159479
159480
159481
159482
159483
159484
159485
159486
159487
159488
159489
159490
159491
159492
159493
159494
159495
159496
159497
159498
159499
159500
159501
159502
159503
159504

159505
159506
159507
159508
159509
159510
159511
159512
159513
159514
159515
159516
159517
159518
159519
159520
159521
159522
159523
159524
159525
159526
159527
159528
159529
159530
159531
159532
159533
159534
159535
159536
159537
159538
159539
159540
159541
159542
159543
159544
159545
159546
159547
159548
159549
159550
159551
159552
159553
159554
159555
159556
159557
159558
159559
159560
159561
159562
159563
159564
159565
159566
159567
159568
159569
159570
159571
159572
159573
159574
159575
159576
159577
159578
159579
159580
159581
159582
159583
159584
159585
159586
159587
159588
159589
159590
159591
159592
159593
159594
159595
159596
159597
159598
159599
159600
159601
159602
159603
159604
159605
159606
159607
159608
159609
159610
159611
159612
159613
159614
159615
159616
159617
159618
159619
159620
159621
159622
159623
159624
159625
159626
159627
159628
159629
159630
159631
159632
159633
159634
159635
159636
159637
159638
159639
159640
159641
159642
159643
159644
159645
159646
159647
159648
159649
159650
159651
159652
159653
159654
159655
159656
159657
159658
159659
159660
159661
159662
159663
159664
159665
159666
159667
159668
159669
159670
159671
159672
159673
159674
159675
159676
159677
159678
159679
159680
159681
159682
159683
159684
159685
159686
159687
159688
159689
159690
159691
159692
159693
159694
159695
159696
159697
159698
159699
159700
159701
159702
159703
159704
159705
159706
159707
**  yy_shift_ofst[]    For each state, the offset into yy_action for
**                     shifting terminals.
**  yy_reduce_ofst[]   For each state, the offset into yy_action for
**                     shifting non-terminals after a reduce.
**  yy_default[]       Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (2037)
static const YYACTIONTYPE yy_action[] = {
 /*     0 */   564,  115,  112,  220,  169,  199,  115,  112,  220,  564,
 /*    10 */   375, 1266,  564,  376,  564,  270, 1309, 1309,  406,  407,
 /*    20 */  1084,  199, 1513,   41,   41,  515,  489,  521,  558,  558,
 /*    30 */   558,  965,   41,   41,  395,   41,   41,   51,   51,  966,
 /*    40 */   296, 1269,  296,  122,  123,  113, 1207, 1207, 1041, 1044,
 /*    50 */  1034, 1034,  120,  120,  121,  121,  121,  121,  564,  407,
 /*    60 */   275,  275,  275,  275, 1268,  115,  112,  220,  115,  112,
 /*    70 */   220, 1512,  846,  561,  516,  561,  115,  112,  220,  250,
 /*    80 */   217,   71,   71,  122,  123,  113, 1207, 1207, 1041, 1044,
 /*    90 */  1034, 1034,  120,  120,  121,  121,  121,  121,  440,  440,
 /*   100 */   440, 1149,  119,  119,  119,  119,  118,  118,  117,  117,
 /*   110 */   117,  116,  442, 1183, 1149,  116,  442, 1149,  546,  513,
 /*   120 */  1548, 1554,  374,  442,    6, 1183, 1154,  522, 1154,  407,
 /*   130 */  1556,  461,  373, 1554,  535,   99,  463,  332,  121,  121,
 /*   140 */   121,  121,  119,  119,  119,  119,  118,  118,  117,  117,
 /*   150 */   117,  116,  442,  122,  123,  113, 1207, 1207, 1041, 1044,
 /*   160 */  1034, 1034,  120,  120,  121,  121,  121,  121, 1257, 1183,
 /*   170 */  1184, 1185,  243, 1064,  564,  502,  499,  498,  567,  124,
 /*   180 */   567, 1183, 1184, 1185,  474,  497,  119,  119,  119,  119,
 /*   190 */   118,  118,  117,  117,  117,  116,  442,   70,   70,  407,
 /*   200 */   121,  121,  121,  121,  114,  117,  117,  117,  116,  442,
 /*   210 */  1409, 1469,  119,  119,  119,  119,  118,  118,  117,  117,
 /*   220 */   117,  116,  442,  122,  123,  113, 1207, 1207, 1041, 1044,
 /*   230 */  1034, 1034,  120,  120,  121,  121,  121,  121,  407, 1031,
 /*   240 */  1031, 1042, 1045,   81,  382,  541,  378,   80,  119,  119,
 /*   250 */   119,  119,  118,  118,  117,  117,  117,  116,  442,  381,
 /*   260 */   463,  332,  122,  123,  113, 1207, 1207, 1041, 1044, 1034,
 /*   270 */  1034,  120,  120,  121,  121,  121,  121,  262,  215,  512,
 /*   280 */  1424,  422,  119,  119,  119,  119,  118,  118,  117,  117,
 /*   290 */   117,  116,  442, 1231,    1,    1,  571,    2, 1235, 1573,
 /*   300 */   571,    2, 1235,  307, 1149,  141, 1600,  307,  407,  141,
 /*   310 */  1183,  361, 1317, 1035,  866,  531, 1317, 1149,  359, 1567,
 /*   320 */  1149,  119,  119,  119,  119,  118,  118,  117,  117,  117,
 /*   330 */   116,  442,  122,  123,  113, 1207, 1207, 1041, 1044, 1034,
 /*   340 */  1034,  120,  120,  121,  121,  121,  121,  275,  275, 1001,
 /*   350 */   426,  275,  275, 1128, 1627, 1021, 1627,  137,  542, 1541,
 /*   360 */   561,  272,  950,  950,  561, 1423, 1183, 1184, 1185, 1594,
 /*   370 */   866, 1012,  530,  315,  231, 1011,  468, 1276,  231,  119,
 /*   380 */   119,  119,  119,  118,  118,  117,  117,  117,  116,  442,
 /*   390 */  1570,  119,  119,  119,  119,  118,  118,  117,  117,  117,
 /*   400 */   116,  442,  330,  359, 1567,  564,  446, 1011, 1011, 1013,
 /*   410 */   446,  207,  564,  306,  555,  407,  363, 1021,  363,  346,
 /*   420 */   184,  118,  118,  117,  117,  117,  116,  442,   71,   71,
 /*   430 */   439,  438, 1126, 1012,  472,   71,   71, 1011,  205,  122,
 /*   440 */   123,  113, 1207, 1207, 1041, 1044, 1034, 1034,  120,  120,
 /*   450 */   121,  121,  121,  121,  219,  219,  472, 1183,  407,  570,
 /*   460 */  1183, 1235,  503, 1477,  149,  546,  307,  489,  141, 1011,
 /*   470 */  1011, 1013,  546,  140,  545, 1317, 1214,  191, 1214,  950,
 /*   480 */   950,  514,  122,  123,  113, 1207, 1207, 1041, 1044, 1034,
 /*   490 */  1034,  120,  120,  121,  121,  121,  121,  563,  119,  119,
 /*   500 */   119,  119,  118,  118,  117,  117,  117,  116,  442,  283,
 /*   510 */   275,  275,  415, 1183, 1184, 1185, 1183, 1184, 1185,  372,
 /*   520 */  1183,  243,  344,  561,  502,  499,  498, 1539,  407, 1540,
 /*   530 */  1183,  288,  870,  143,  497, 1549,  185,  231,    9,    6,
 /*   540 */   253,  119,  119,  119,  119,  118,  118,  117,  117,  117,
 /*   550 */   116,  442,  122,  123,  113, 1207, 1207, 1041, 1044, 1034,
 /*   560 */  1034,  120,  120,  121,  121,  121,  121,  407,  137,  446,
 /*   570 */   447,  863,  169, 1183,  397, 1204, 1183, 1184, 1185,  931,
 /*   580 */   526, 1001,   98,  339,  564,  342, 1183, 1184, 1185,  306,
 /*   590 */   555,  122,  123,  113, 1207, 1207, 1041, 1044, 1034, 1034,
 /*   600 */   120,  120,  121,  121,  121,  121,  452,   71,   71,  275,
 /*   610 */   275,  119,  119,  119,  119,  118,  118,  117,  117,  117,
 /*   620 */   116,  442,  561,  417,  306,  555, 1183, 1307, 1307, 1183,
 /*   630 */  1184, 1185, 1204, 1149,  330,  458,  318,  407,  363,  470,
 /*   640 */   431, 1167,   32,  541,  527,  350, 1149, 1629,  393, 1149,
 /*   650 */   119,  119,  119,  119,  118,  118,  117,  117,  117,  116,
 /*   660 */   442,  122,  123,  113, 1207, 1207, 1041, 1044, 1034, 1034,
 /*   670 */   120,  120,  121,  121,  121,  121,  407,  199,  472, 1183,
 /*   680 */  1022,  472, 1183, 1184, 1185,  386,  151,  539, 1548,  277,
 /*   690 */   400,  137,    6,  317,    5,  564,  562,    3,  920,  920,
 /*   700 */   122,  123,  113, 1207, 1207, 1041, 1044, 1034, 1034,  120,
 /*   710 */   120,  121,  121,  121,  121,  411,  505,   83,   71,   71,
 /*   720 */   119,  119,  119,  119,  118,  118,  117,  117,  117,  116,
 /*   730 */   442, 1183,  218,  428, 1183, 1183, 1184, 1185,  363,  261,
 /*   740 */   278,  358,  508,  353,  507,  248,  407,  306,  555, 1539,
 /*   750 */  1006,  349,  363,  291,  489,  302,  293, 1542,  281,  119,
 /*   760 */   119,  119,  119,  118,  118,  117,  117,  117,  116,  442,
 /*   770 */   122,  123,  113, 1207, 1207, 1041, 1044, 1034, 1034,  120,
 /*   780 */   120,  121,  121,  121,  121,  407,  148, 1183, 1184, 1185,
 /*   790 */  1183, 1184, 1185,  275,  275, 1304, 1257, 1283,  483, 1476,
 /*   800 */   150,  489,  480,  564, 1187, 1304,  561, 1587, 1255,  122,
 /*   810 */   123,  113, 1207, 1207, 1041, 1044, 1034, 1034,  120,  120,
 /*   820 */   121,  121,  121,  121,  564,  886,   13,   13,  520,  119,
 /*   830 */   119,  119,  119,  118,  118,  117,  117,  117,  116,  442,
 /*   840 */  1183,  420,  417,  564,  269,  269, 1316,   13,   13, 1539,
 /*   850 */  1546,   16,   16,  322,    6,  407,  506,  561, 1089, 1089,
 /*   860 */   486, 1187,  425, 1539,  887,  292,   71,   71,  119,  119,
 /*   870 */   119,  119,  118,  118,  117,  117,  117,  116,  442,  122,
 /*   880 */   123,  113, 1207, 1207, 1041, 1044, 1034, 1034,  120,  120,
 /*   890 */   121,  121,  121,  121,  564,   12, 1183, 1184, 1185,  407,
 /*   900 */   275,  275,  451,  303,  834,  835,  836,  417,  489,  276,
 /*   910 */   276, 1547,  284,  561,  319,    6,  321,   71,   71,  429,
 /*   920 */   451,  450,  561,  952,  101,  113, 1207, 1207, 1041, 1044,
 /*   930 */  1034, 1034,  120,  120,  121,  121,  121,  121,  119,  119,
 /*   940 */   119,  119,  118,  118,  117,  117,  117,  116,  442, 1105,
 /*   950 */  1183,  489,  564, 1312,  437,  455,  478,  564,  246,  245,
 /*   960 */   244, 1409, 1545,  547, 1106,  405,    6, 1544,  196, 1258,
 /*   970 */   413,    6,  105,  462,  103,   71,   71,  286,  564, 1107,




 /*   980 */    13,   13,  119,  119,  119,  119,  118,  118,  117,  117,
 /*   990 */   117,  116,  442,  451,  104,  427,  337,  320,  275,  275,
 /*  1000 */   906,   13,   13,  564, 1482, 1105, 1183, 1184, 1185,  126,
 /*  1010 */   907,  561,  546,  564,  407,  478,  295, 1321,  253,  200,
 /*  1020 */  1106,  548, 1482, 1484,  280, 1409,   55,   55, 1287,  561,
 /*  1030 */   478,  380,  423,  951,  407, 1107,   71,   71,  122,  123,
 /*  1040 */   113, 1207, 1207, 1041, 1044, 1034, 1034,  120,  120,  121,
 /*  1050 */   121,  121,  121, 1204,  407,  287,  552,  309,  122,  123,
 /*  1060 */   113, 1207, 1207, 1041, 1044, 1034, 1034,  120,  120,  121,
 /*  1070 */   121,  121,  121,  441, 1128, 1628,  146, 1628,  122,  111,
 /*  1080 */   113, 1207, 1207, 1041, 1044, 1034, 1034,  120,  120,  121,
 /*  1090 */   121,  121,  121,  404,  403, 1482,  424,  119,  119,  119,
 /*  1100 */   119,  118,  118,  117,  117,  117,  116,  442, 1183,  564,
 /*  1110 */  1204,  544, 1086,  858,  329,  361, 1086,  119,  119,  119,
 /*  1120 */   119,  118,  118,  117,  117,  117,  116,  442,  564,  294,
 /*  1130 */   144,  523,   56,   56,  224,  564,  510,  119,  119,  119,
 /*  1140 */   119,  118,  118,  117,  117,  117,  116,  442,  484, 1409,
 /*  1150 */   537,   15,   15, 1126,  434,  439,  438,  407,   13,   13,
 /*  1160 */  1523,   12,  926, 1211, 1183, 1184, 1185,  925, 1213,  536,
 /*  1170 */   858,  557,  413,  193, 1525,  494, 1212,  448, 1160, 1222,
 /*  1180 */  1183,  564,  123,  113, 1207, 1207, 1041, 1044, 1034, 1034,
 /*  1190 */   120,  120,  121,  121,  121,  121, 1521, 1149,  564,  965,
 /*  1200 */   564, 1214,  247, 1214,   13,   13, 1409,  966,  538,  564,
 /*  1210 */  1149,  108,  556, 1149,    4,  310,  392, 1227,   17,  194,
 /*  1220 */   485,   43,   43,   57,   57,  306,  555,  524,  559, 1160,
 /*  1230 */   464,  564,   44,   44,  392, 1127, 1183, 1184, 1185,  479,
 /*  1240 */   119,  119,  119,  119,  118,  118,  117,  117,  117,  116,
 /*  1250 */   442,  443,  564,  327,   13,   13,  564,  418, 1315,  414,
 /*  1260 */   171,  564,  311,  553,  213,  529, 1253,  564,  517,  543,
 /*  1270 */   412,  108,  556,  137,    4,   58,   58,  435,  314,   59,
 /*  1280 */    59,  274,  217,  549,   60,   60,  349,  476,  559, 1353,
 /*  1290 */    61,   61, 1021,  275,  275, 1228,  213,  564,  106,  106,
 /*  1300 */     8,  275,  275,  275,  275,  107,  561,  443,  566,  565,
 /*  1310 */   564,  443, 1011, 1228,  561,  564,  561,  564,  275,  275,
 /*  1320 */    62,   62, 1352,  553,  247,  456,  564,   98,  110,  306,
 /*  1330 */   555,  561,  564,   45,   45,  405, 1203,  533,   46,   46,
 /*  1340 */    47,   47,  532,  465, 1011, 1011, 1013, 1014,   27,   49,
 /*  1350 */    49,  564, 1021,  405,  469,   50,   50,  564,  106,  106,
 /*  1360 */   305,  564,   84,  204,  405,  107,  564,  443,  566,  565,
 /*  1370 */   405,  564, 1011,  564,   63,   63,  564, 1599,  564,  895,
 /*  1380 */    64,   64,  457,  477,   65,   65,  147,   96,   38,   14,
 /*  1390 */    14, 1528,  412,  564,   66,   66,  128,  128,  926,   67,
 /*  1400 */    67,   52,   52,  925, 1011, 1011, 1013, 1014,   27, 1572,
 /*  1410 */  1171,  445,  208, 1123,  279,  394,   68,   68,  228,  390,
 /*  1420 */   390,  389,  264,  387, 1171,  445,  843,  877,  279,  108,
 /*  1430 */   556,  453,    4,  390,  390,  389,  264,  387,  564,  225,
 /*  1440 */   843,  313,  328, 1003,   98,  252,  559,  544,  471,  312,
 /*  1450 */   252,  564,  208,  225,  564,  313,  473,   30,  252,  279,
 /*  1460 */   466,   69,   69,  312,  390,  390,  389,  264,  387,  443,
 /*  1470 */   333,  843,   98,  564,   53,   53,  323,  157,  157,  227,
 /*  1480 */   495,  553,  249,  289,  225,  564,  313,  162,   31, 1501,
 /*  1490 */   135,  564, 1500,  227,  312,  533,  158,  158,  885,  884,
 /*  1500 */   534,  162,  873,  301,  135,  564,  481,  226,   76,   76,
 /*  1510 */  1021,  347, 1071,   98,   54,   54,  106,  106, 1067,  564,
 /*  1520 */   249,  226,  519,  107,  227,  443,  566,  565,   72,   72,
 /*  1530 */  1011,  334,  162,  564,  230,  135,  108,  556,  959,    4,
 /*  1540 */   252,  408,  129,  129,  564, 1349,  306,  555,  564,  923,
 /*  1550 */   564,  110,  226,  559,  564,  408,   73,   73,  564,  873,
 /*  1560 */   306,  555, 1011, 1011, 1013, 1014,   27,  130,  130, 1071,
 /*  1570 */   449,  131,  131,  127,  127,  357,  443,  156,  156,  892,
 /*  1580 */   893,  155,  155,  338,  449,  356,  408,  564,  553,  968,
 /*  1590 */   969,  306,  555, 1015,  341,  564,  108,  556,  564,    4,
 /*  1600 */  1132, 1286,  533,  564,  856,  343,  145,  532,  345, 1300,
 /*  1610 */   136,  136, 1083,  559, 1083,  449,  564, 1021,  134,  134,
 /*  1620 */  1284,  132,  132,  106,  106, 1285,  133,  133,  564,  352,
 /*  1630 */   107,  564,  443,  566,  565, 1340,  443, 1011,  362,   75,
 /*  1640 */    75, 1082,  564, 1082,  564,  924, 1561,  110,  553,  551,
 /*  1650 */  1015,   77,   77, 1361,   74,   74, 1408, 1336, 1347,  550,
 /*  1660 */  1414, 1265, 1256, 1244, 1243,   42,   42,   48,   48, 1011,
 /*  1670 */  1011, 1013, 1014,   27, 1245, 1580,  490, 1021,  267,  202,
 /*  1680 */  1333,  365,   11,  106,  106,  930,  367,  210,  369,  391,
 /*  1690 */   107, 1395,  443,  566,  565,  223, 1390, 1011,  500,  454,
 /*  1700 */   282, 1400,  285,  108,  556,  214,    4,  325, 1383, 1283,
 /*  1710 */   475,  355, 1473, 1583, 1472, 1399,  371, 1222,  326,  398,
 /*  1720 */   559,  290,  331,  197,  100,  556,  209,    4,  198, 1011,
 /*  1730 */  1011, 1013, 1014,   27,  385,  256, 1520, 1518,  554, 1219,
 /*  1740 */   416,  559,   83,  443,  173,  206,  182,  221,  459,  167,
 /*  1750 */   177,  460,  175,  493,  233,  553,   79,  178, 1396,  179,
 /*  1760 */    35,  180,   96, 1402,  443,  396,   36,  467, 1478, 1401,
 /*  1770 */   482,  237, 1404,  399,   82,  186,  553, 1467,   89,  488,
 /*  1780 */   190,  268,  239,  491, 1021,  340,  240,  401, 1246, 1489,
 /*  1790 */   106,  106,  336,  509, 1294,  241, 1303,  107,  430,  443,
 /*  1800 */   566,  565, 1302,   91, 1011, 1021, 1598, 1301, 1273,  215,
 /*  1810 */  1597,  106,  106,  402,  877,  432,  354, 1272,  107, 1271,
 /*  1820 */   443,  566,  565, 1596, 1566, 1011, 1293,  433,  518,  299,
 /*  1830 */   300,  360,   95,  525, 1344,  364, 1011, 1011, 1013, 1014,
 /*  1840 */    27,  254,  255, 1552,  436, 1551,  125,  544,   10,  379,
 /*  1850 */  1326, 1453,  102,   97, 1345,  528,  304, 1011, 1011, 1013,
 /*  1860 */  1014,   27,  366,  377, 1343, 1342,  368,  370, 1325,  384,
 /*  1870 */   201,  383,   34, 1368, 1367,  568, 1177,  266,  263,  265,
 /*  1880 */  1505,  159,  569, 1241, 1236, 1506,  160,  142, 1504, 1503,
 /*  1890 */   297,  211,  830,  161,  212,   78,  444,  203,  308,  222,
 /*  1900 */  1081,  139, 1079,  316,  174,  163, 1203,  229,  176,  909,
 /*  1910 */   324,  232, 1095,  181,  409,  410,  172,  164,  165,  419,
 /*  1920 */   183,   85,   86,  421,  166,   87,   88, 1098, 1094,  234,
 /*  1930 */   235,  152,   18,  236,  335, 1087, 1216,  252,  187,  487,
 /*  1940 */   238,  188,   37,  845,  492,  356,  242,  496,  351,  501,
 /*  1950 */   189,   90,   19,  504,  348,   20,  875,   92,  298,  168,
 /*  1960 */   888,  153,   93,  511,   94, 1165,  154, 1047, 1134,   39,
 /*  1970 */   216, 1133,  271,  273,  958,  192,  953,  110, 1151, 1155,
 /*  1980 */   251,    7,   21, 1159, 1139,   22, 1153,   33,   23,   24,
 /*  1990 */    25,  540, 1158,  195,   98, 1062,   26, 1048, 1046, 1050,
 /*  2000 */  1104, 1051, 1103,  257,  258,   28,   40, 1173, 1016,  857,
 /*  2010 */   109,   29,  560,  388,  138, 1172,  259,  170,  260, 1232,
 /*  2020 */  1232,  919, 1232, 1232, 1232, 1232, 1232, 1232, 1232, 1232,
 /*  2030 */  1232, 1232, 1589, 1232, 1232, 1232, 1588,
};
static const YYCODETYPE yy_lookahead[] = {
 /*     0 */   192,  273,  274,  275,  192,  192,  273,  274,  275,  192,
 /*    10 */   218,  215,  192,  218,  192,  212,  234,  235,  205,   19,
 /*    20 */    11,  192,  294,  215,  216,  203,  192,  203,  209,  210,
 /*    30 */   211,   31,  215,  216,  205,  215,  216,  215,  216,   39,
 /*    40 */   227,  215,  229,   43,   44,   45,   46,   47,   48,   49,
 /*    50 */    50,   51,   52,   53,   54,   55,   56,   57,  192,   19,
 /*    60 */   238,  239,  238,  239,  215,  273,  274,  275,  273,  274,
 /*    70 */   275,  237,   21,  251,  252,  251,  273,  274,  275,  255,
 /*    80 */   256,  215,  216,   43,   44,   45,   46,   47,   48,   49,
 /*    90 */    50,   51,   52,   53,   54,   55,   56,   57,  209,  210,
 /*   100 */   211,   76,  102,  103,  104,  105,  106,  107,  108,  109,
 /*   110 */   110,  111,  112,   59,   89,  111,  112,   92,  252,  307,
 /*   120 */   308,  313,  314,  112,  312,   59,   86,  261,   88,   19,
 /*   130 */   313,   80,  315,  313,  314,   25,  127,  128,   54,   55,
 /*   140 */    56,   57,  102,  103,  104,  105,  106,  107,  108,  109,
 /*   150 */   110,  111,  112,   43,   44,   45,   46,   47,   48,   49,
 /*   160 */    50,   51,   52,   53,   54,   55,   56,   57,  192,  115,
 /*   170 */   116,  117,  118,  122,  192,  121,  122,  123,  202,   69,
 /*   180 */   204,  115,  116,  117,  192,  131,  102,  103,  104,  105,
 /*   190 */   106,  107,  108,  109,  110,  111,  112,  215,  216,   19,
 /*   200 */    54,   55,   56,   57,   58,  108,  109,  110,  111,  112,
 /*   210 */   192,  160,  102,  103,  104,  105,  106,  107,  108,  109,
 /*   220 */   110,  111,  112,   43,   44,   45,   46,   47,   48,   49,
 /*   230 */    50,   51,   52,   53,   54,   55,   56,   57,   19,   46,
 /*   240 */    47,   48,   49,   24,  248,  192,  250,   67,  102,  103,
 /*   250 */   104,  105,  106,  107,  108,  109,  110,  111,  112,  277,
 /*   260 */   127,  128,   43,   44,   45,   46,   47,   48,   49,   50,
 /*   270 */    51,   52,   53,   54,   55,   56,   57,   26,  164,  165,
 /*   280 */   272,  263,  102,  103,  104,  105,  106,  107,  108,  109,
 /*   290 */   110,  111,  112,  184,  185,  186,  187,  188,  189,  186,
 /*   300 */   187,  188,  189,  194,   76,  196,  229,  194,   19,  196,
 /*   310 */    59,  192,  203,  120,   59,   87,  203,   89,  310,  311,
 /*   320 */    92,  102,  103,  104,  105,  106,  107,  108,  109,  110,
 /*   330 */   111,  112,   43,   44,   45,   46,   47,   48,   49,   50,
 /*   340 */    51,   52,   53,   54,   55,   56,   57,  238,  239,   73,
 /*   350 */   231,  238,  239,   22,   23,  100,   25,   81,  305,  306,
 /*   360 */   251,   23,   25,   25,  251,  272,  115,  116,  117,  214,
 /*   370 */   115,  116,  144,  192,  265,  120,  114,  222,  265,  102,
 /*   380 */   103,  104,  105,  106,  107,  108,  109,  110,  111,  112,
 /*   390 */   192,  102,  103,  104,  105,  106,  107,  108,  109,  110,
 /*   400 */   111,  112,  126,  310,  311,  192,  297,  152,  153,  154,
 /*   410 */   297,  149,  192,  137,  138,   19,  192,  100,  192,   23,
 /*   420 */    22,  106,  107,  108,  109,  110,  111,  112,  215,  216,
 /*   430 */   106,  107,  101,  116,  192,  215,  216,  120,  149,   43,
 /*   440 */    44,   45,   46,   47,   48,   49,   50,   51,   52,   53,
 /*   450 */    54,   55,   56,   57,  117,  117,  192,   59,   19,  187,
 /*   460 */    59,  189,   23,  282,  240,  252,  194,  192,  196,  152,
 /*   470 */   153,  154,  252,   72,  261,  203,  152,   25,  154,  142,
 /*   480 */   142,  261,   43,   44,   45,   46,   47,   48,   49,   50,
 /*   490 */    51,   52,   53,   54,   55,   56,   57,  192,  102,  103,
 /*   500 */   104,  105,  106,  107,  108,  109,  110,  111,  112,  267,
 /*   510 */   238,  239,  237,  115,  116,  117,  115,  116,  117,  192,
 /*   520 */    59,  118,   16,  251,  121,  122,  123,  303,   19,  303,
 /*   530 */    59,  267,   23,   72,  131,  308,   22,  265,   22,  312,
 /*   540 */    24,  102,  103,  104,  105,  106,  107,  108,  109,  110,
 /*   550 */   111,  112,   43,   44,   45,   46,   47,   48,   49,   50,
 /*   560 */    51,   52,   53,   54,   55,   56,   57,   19,   81,  297,
 /*   570 */   295,   23,  192,   59,  203,   59,  115,  116,  117,  108,
 /*   580 */   192,   73,   25,   77,  192,   79,  115,  116,  117,  137,
 /*   590 */   138,   43,   44,   45,   46,   47,   48,   49,   50,   51,
 /*   600 */    52,   53,   54,   55,   56,   57,  119,  215,  216,  238,
 /*   610 */   239,  102,  103,  104,  105,  106,  107,  108,  109,  110,
 /*   620 */   111,  112,  251,  192,  137,  138,   59,  234,  235,  115,
 /*   630 */   116,  117,  116,   76,  126,  127,  128,   19,  192,  268,
 /*   640 */    19,   23,   22,  192,  252,   24,   89,  300,  301,   92,
 /*   650 */   102,  103,  104,  105,  106,  107,  108,  109,  110,  111,
 /*   660 */   112,   43,   44,   45,   46,   47,   48,   49,   50,   51,
 /*   670 */    52,   53,   54,   55,   56,   57,   19,  192,  192,   59,
 /*   680 */    23,  192,  115,  116,  117,  200,  240,  307,  308,   22,
 /*   690 */   205,   81,  312,  262,   22,  192,  133,   22,  135,  136,
 /*   700 */    43,   44,   45,   46,   47,   48,   49,   50,   51,   52,
 /*   710 */    53,   54,   55,   56,   57,  197,   95,  150,  215,  216,
 /*   720 */   102,  103,  104,  105,  106,  107,  108,  109,  110,  111,
 /*   730 */   112,   59,  192,  112,   59,  115,  116,  117,  192,  118,
 /*   740 */   119,  120,  121,  122,  123,  124,   19,  137,  138,  303,
 /*   750 */    23,  130,  192,  267,  192,  252,  267,  306,  203,  102,
 /*   760 */   103,  104,  105,  106,  107,  108,  109,  110,  111,  112,
 /*   770 */    43,   44,   45,   46,   47,   48,   49,   50,   51,   52,
 /*   780 */    53,   54,   55,   56,   57,   19,  240,  115,  116,  117,
 /*   790 */   115,  116,  117,  238,  239,  222,  192,  224,  280,  237,
 /*   800 */   240,  192,  284,  192,   59,  232,  251,  140,  204,   43,
 /*   810 */    44,   45,   46,   47,   48,   49,   50,   51,   52,   53,
 /*   820 */    54,   55,   56,   57,  192,   35,  215,  216,  192,  102,
 /*   830 */   103,  104,  105,  106,  107,  108,  109,  110,  111,  112,
 /*   840 */    59,  230,  192,  192,  238,  239,  237,  215,  216,  303,
 /*   850 */   308,  215,  216,   16,  312,   19,   66,  251,  126,  127,
 /*   860 */   128,  116,  230,  303,   74,  203,  215,  216,  102,  103,
 /*   870 */   104,  105,  106,  107,  108,  109,  110,  111,  112,   43,
 /*   880 */    44,   45,   46,   47,   48,   49,   50,   51,   52,   53,
 /*   890 */    54,   55,   56,   57,  192,  212,  115,  116,  117,   19,
 /*   900 */   238,  239,  192,  252,    7,    8,    9,  192,  192,  238,
 /*   910 */   239,  308,  262,  251,   77,  312,   79,  215,  216,  129,
 /*   920 */   210,  211,  251,  142,  158,   45,   46,   47,   48,   49,
 /*   930 */    50,   51,   52,   53,   54,   55,   56,   57,  102,  103,
 /*   940 */   104,  105,  106,  107,  108,  109,  110,  111,  112,   12,
 /*   950 */    59,  192,  192,  237,  252,  243,  192,  192,  126,  127,
 /*   960 */   128,  192,  308,  203,   27,  253,  312,  308,  285,  207,
 /*   970 */   208,  312,  157,  290,  159,  215,  216,  262,  192,   42,
 /*   980 */   215,  216,  102,  103,  104,  105,  106,  107,  108,  109,
 /*   990 */   110,  111,  112,  283,  158,  230,  237,  160,  238,  239,
 /*  1000 */    63,  215,  216,  192,  192,   12,  115,  116,  117,   22,
 /*  1010 */    73,  251,  252,  192,   19,  192,  230,  239,   24,   24,
 /*  1020 */    27,  261,  210,  211,   99,  192,  215,  216,  225,  251,
 /*  1030 */   192,  192,  263,  142,   19,   42,  215,  216,   43,   44,
 /*  1040 */    45,   46,   47,   48,   49,   50,   51,   52,   53,   54,
 /*  1050 */    55,   56,   57,   59,   19,  291,   63,  132,   43,   44,
 /*  1060 */    45,   46,   47,   48,   49,   50,   51,   52,   53,   54,
 /*  1070 */    55,   56,   57,  252,   22,   23,   22,   25,   43,   44,
 /*  1080 */    45,   46,   47,   48,   49,   50,   51,   52,   53,   54,
 /*  1090 */    55,   56,   57,  106,  107,  283,  263,  102,  103,  104,
 /*  1100 */   105,  106,  107,  108,  109,  110,  111,  112,   59,  192,
 /*  1110 */   116,  144,   29,   59,  291,  192,   33,  102,  103,  104,
 /*  1120 */   105,  106,  107,  108,  109,  110,  111,  112,  192,  291,
 /*  1130 */   163,   19,  215,  216,   15,  192,  108,  102,  103,  104,
 /*  1140 */   105,  106,  107,  108,  109,  110,  111,  112,   65,  192,
 /*  1150 */    66,  215,  216,  101,  231,  106,  107,   19,  215,  216,
 /*  1160 */   192,  212,  134,  114,  115,  116,  117,  139,  119,   85,
 /*  1170 */   116,  207,  208,  230,  192,   19,  127,  192,   94,   60,
 /*  1180 */    59,  192,   44,   45,   46,   47,   48,   49,   50,   51,
 /*  1190 */    52,   53,   54,   55,   56,   57,  192,   76,  192,   31,
 /*  1200 */   192,  152,   46,  154,  215,  216,  192,   39,   87,  192,
 /*  1210 */    89,   19,   20,   92,   22,  192,   22,   23,   22,  230,
 /*  1220 */   263,  215,  216,  215,  216,  137,  138,  115,   36,  145,
 /*  1230 */   128,  192,  215,  216,   22,   23,  115,  116,  117,  290,
 /*  1240 */   102,  103,  104,  105,  106,  107,  108,  109,  110,  111,
 /*  1250 */   112,   59,  192,  151,  215,  216,  192,   61,  203,  298,
 /*  1260 */   299,  192,  192,   71,   25,  144,  203,  192,  203,  230,
 /*  1270 */   114,   19,   20,   81,   22,  215,  216,  263,  192,  215,
 /*  1280 */   216,  255,  256,  203,  215,  216,  130,   19,   36,  192,
 /*  1290 */   215,  216,  100,  238,  239,  101,   25,  192,  106,  107,
 /*  1300 */    48,  238,  239,  238,  239,  113,  251,  115,  116,  117,
 /*  1310 */   192,   59,  120,  101,  251,  192,  251,  192,  238,  239,
 /*  1320 */   215,  216,  192,   71,   46,  243,  192,   25,   25,  137,
 /*  1330 */   138,  251,  192,  215,  216,  253,   25,   85,  215,  216,
 /*  1340 */   215,  216,   90,  243,  152,  153,  154,  155,  156,  215,
 /*  1350 */   216,  192,  100,  253,  243,  215,  216,  192,  106,  107,
 /*  1360 */   243,  192,  148,  149,  253,  113,  192,  115,  116,  117,
 /*  1370 */   253,  192,  120,  192,  215,  216,  192,   23,  192,   25,
 /*  1380 */   215,  216,  192,  115,  215,  216,   22,  148,   24,  215,
 /*  1390 */   216,  192,  114,  192,  215,  216,  215,  216,  134,  215,
 /*  1400 */   216,  215,  216,  139,  152,  153,  154,  155,  156,    0,
 /*  1410 */     1,    2,  141,   23,    5,   25,  215,  216,   24,   10,
 /*  1420 */    11,   12,   13,   14,    1,    2,   17,  125,    5,   19,
 /*  1430 */    20,  268,   22,   10,   11,   12,   13,   14,  192,   30,
 /*  1440 */    17,   32,   23,   23,   25,   25,   36,  144,   23,   40,
 /*  1450 */    25,  192,  141,   30,  192,   32,   23,   22,   25,    5,
 /*  1460 */   128,  215,  216,   40,   10,   11,   12,   13,   14,   59,
 /*  1470 */    23,   17,   25,  192,  215,  216,  192,  215,  216,   70,
 /*  1480 */    23,   71,   25,  151,   30,  192,   32,   78,   53,  192,
 /*  1490 */    81,  192,  192,   70,   40,   85,  215,  216,  119,  120,
 /*  1500 */    90,   78,   59,  254,   81,  192,  192,   98,  215,  216,
 /*  1510 */   100,   23,   59,   25,  215,  216,  106,  107,   23,  192,
 /*  1520 */    25,   98,   19,  113,   70,  115,  116,  117,  215,  216,
 /*  1530 */   120,  192,   78,  192,  140,   81,   19,   20,   23,   22,
 /*  1540 */    25,  132,  215,  216,  192,  192,  137,  138,  192,   23,
 /*  1550 */   192,   25,   98,   36,  192,  132,  215,  216,  192,  116,
 /*  1560 */   137,  138,  152,  153,  154,  155,  156,  215,  216,  116,
 /*  1570 */   161,  215,  216,  215,  216,  120,   59,  215,  216,    7,
 /*  1580 */     8,  215,  216,  192,  161,  130,  132,  192,   71,   83,
 /*  1590 */    84,  137,  138,   59,  192,  192,   19,   20,  192,   22,
 /*  1600 */    97,  225,   85,  192,   23,  192,   25,   90,  192,  192,
 /*  1610 */   215,  216,  152,   36,  154,  161,  192,  100,  215,  216,
 /*  1620 */   192,  215,  216,  106,  107,  225,  215,  216,  192,  192,
 /*  1630 */   113,  192,  115,  116,  117,  257,   59,  120,  192,  215,
 /*  1640 */   216,  152,  192,  154,  192,   23,  317,   25,   71,  235,
 /*  1650 */   116,  215,  216,  192,  215,  216,  192,  192,  192,  192,
 /*  1660 */   192,  192,  192,  192,  192,  215,  216,  215,  216,  152,
 /*  1670 */   153,  154,  155,  156,  192,  192,  287,  100,  286,  241,
 /*  1680 */   254,  254,  242,  106,  107,  108,  254,  213,  254,  190,
 /*  1690 */   113,  270,  115,  116,  117,  296,  266,  120,  219,  258,
 /*  1700 */   244,  270,  258,   19,   20,  228,   22,  292,  266,  224,
 /*  1710 */   292,  218,  218,  195,  218,  270,  258,   60,  245,  270,
 /*  1720 */    36,  245,  244,  248,   19,   20,  242,   22,  248,  152,
 /*  1730 */   153,  154,  155,  156,  244,  140,  199,  199,  279,   38,
 /*  1740 */   199,   36,  150,   59,  296,  149,   22,  296,   18,   43,
 /*  1750 */   236,  199,  233,   18,  198,   71,  293,  236,  271,  236,
 /*  1760 */   269,  236,  148,  271,   59,  245,  269,  245,  282,  271,
 /*  1770 */   199,  198,  233,  245,  293,  233,   71,  245,  157,   62,
 /*  1780 */    22,  199,  198,  220,  100,  199,  198,  220,  199,  289,
 /*  1790 */   106,  107,  288,  114,  226,  198,  217,  113,   64,  115,
 /*  1800 */   116,  117,  217,   22,  120,  100,  223,  217,  217,  164,
 /*  1810 */   223,  106,  107,  220,  125,   24,  217,  219,  113,  217,
 /*  1820 */   115,  116,  117,  217,  311,  120,  226,  112,  304,  281,
 /*  1830 */   281,  220,  114,  143,  260,  259,  152,  153,  154,  155,
 /*  1840 */   156,  199,   91,  316,   82,  316,  147,  144,   22,  199,
 /*  1850 */   249,  276,  157,  146,  260,  145,  278,  152,  153,  154,
 /*  1860 */   155,  156,  259,  248,  260,  260,  259,  259,  249,  245,
 /*  1870 */   247,  246,   25,  264,  264,  201,   13,    6,  193,  193,
 /*  1880 */   212,  206,  191,  191,  191,  212,  206,  221,  212,  212,
 /*  1890 */   221,  213,    4,  206,  213,  212,    3,   22,  162,   15,
 /*  1900 */    23,   16,   23,  138,  150,  129,   25,   24,  141,   20,
 /*  1910 */    16,  143,    1,  141,  302,  302,  299,  129,  129,   61,
 /*  1920 */   150,   53,   53,   37,  129,   53,   53,  115,    1,   34,
 /*  1930 */   140,    5,   22,  114,  160,   68,   75,   25,   68,   41,
 /*  1940 */   140,  114,   24,   20,   19,  130,  124,   67,   24,   67,
 /*  1950 */    22,   22,   22,   96,   23,   22,   59,   22,   67,   37,

 /*  1960 */    28,   23,  148,   22,   25,   23,   23,   23,   23,   22,
 /*  1970 */   140,   97,   23,   23,  115,   22,  142,   25,   88,   75,
 /*  1980 */    34,   44,   34,   75,   23,   34,   86,   22,   34,   34,
 /*  1990 */    34,   24,   93,   25,   25,   23,   34,   23,   23,   23,
 /*  2000 */    23,   11,   23,   25,   22,   22,   22,    1,   23,   23,
 /*  2010 */    22,   22,   25,   15,   23,    1,  140,   25,  140,  318,
 /*  2020 */   318,  134,  318,  318,  318,  318,  318,  318,  318,  318,
 /*  2030 */   318,  318,  140,  318,  318,  318,  140,  318,  318,  318,
 /*  2040 */   318,  318,  318,  318,  318,  318,  318,  318,  318,  318,
 /*  2050 */   318,  318,  318,  318,  318,  318,  318,  318,  318,  318,
 /*  2060 */   318,  318,  318,  318,  318,  318,  318,  318,  318,  318,
 /*  2070 */   318,  318,  318,  318,  318,  318,  318,  318,  318,  318,
 /*  2080 */   318,  318,  318,  318,  318,  318,  318,  318,  318,  318,
 /*  2090 */   318,  318,  318,  318,  318,  318,  318,  318,  318,  318,
 /*  2100 */   318,  318,  318,  318,  318,  318,  318,  318,  318,  318,
 /*  2110 */   318,  318,  318,  318,  318,  318,  318,  318,  318,  318,
 /*  2120 */   318,  318,  318,  318,  318,  318,  318,  318,  318,  318,
 /*  2130 */   318,  318,  318,  318,  318,  318,  318,  318,  318,  318,
 /*  2140 */   318,  318,  318,  318,  318,  318,  318,  318,  318,  318,
 /*  2150 */   318,  318,  318,  318,  318,  318,  318,  318,  318,  318,
 /*  2160 */   318,  318,  318,  318,  318,  318,  318,  318,  318,  318,
 /*  2170 */   318,  318,  318,  318,  318,  318,  318,  318,  318,  318,
 /*  2180 */   318,  318,  318,  318,  318,  318,  318,  318,  318,  318,
 /*  2190 */   318,  318,  318,  318,  318,  318,  318,  318,  318,  318,
 /*  2200 */   318,  318,  318,  318,  318,  318,  318,  318,  318,  318,
 /*  2210 */   318,  318,  318,  318,  318,  318,  318,  318,  318,  318,
 /*  2220 */   318,
};
#define YY_SHIFT_COUNT    (571)
#define YY_SHIFT_MIN      (0)
#define YY_SHIFT_MAX      (2014)
static const unsigned short int yy_shift_ofst[] = {
 /*     0 */  1423, 1409, 1454, 1192, 1192,  610, 1252, 1410, 1517, 1684,
 /*    10 */  1684, 1684,  276,    0,    0,  180, 1015, 1684, 1684, 1684,
 /*    20 */  1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684,
 /*    30 */  1049, 1049, 1121, 1121,   54,  487,  610,  610,  610,  610,
 /*    40 */   610,   40,  110,  219,  289,  396,  439,  509,  548,  618,
 /*    50 */   657,  727,  766,  836,  995, 1015, 1015, 1015, 1015, 1015,
 /*    60 */  1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015,
 /*    70 */  1015, 1015, 1015, 1035, 1015, 1138,  880,  880, 1577, 1684,
 /*    80 */  1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684,
 /*    90 */  1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684,
 /*   100 */  1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684,
 /*   110 */  1684, 1684, 1684, 1705, 1684, 1684, 1684, 1684, 1684, 1684,
 /*   120 */  1684, 1684, 1684, 1684, 1684, 1684, 1684,  146,   84,   84,
 /*   130 */    84,   84,   84,  277,  315,  401,   97,  461,  251,   66,
 /*   140 */    66,   51, 1156,   66,   66,  324,  324,   66,  452,  452,
 /*   150 */   452,  452,  133,  114,  114,    4,   11, 2037, 2037,  621,
 /*   160 */   621,  621,  567,  398,  398,  398,  398,  937,  937,  228,
 /*   170 */   251,  331, 1052,   66,   66,   66,   66,   66,   66,   66,
 /*   180 */    66,   66,   66,   66,   66,   66,   66,   66,   66,   66,
 /*   190 */    66,   66,   66,  557,  557,   66,    9,   25,   25,  745,
 /*   200 */   745,  967, 1088, 2037, 2037, 2037, 2037, 2037, 2037, 2037,
 /*   210 */   255,  317,  317,  514,  403,  620,  471,  672,  781,  891,
 /*   220 */   675,   66,   66,   66,   66,   66,   66,   66,   66,   66,
 /*   230 */    66,  508,   66,   66,   66,   66,   66,   66,   66,   66,
 /*   240 */    66,   66,   66,   66,  790,  790,  790,   66,   66,   66,
 /*   250 */   338,   66,   66,   66,  516, 1084,   66,   66,  993,   66,
 /*   260 */    66,   66,   66,   66,   66,   66,   66,  732, 1083,  563,
 /*   270 */   994,  994,  994,  994,  337,  563,  563, 1028,  987,  897,
 /*   280 */  1119,  262, 1214, 1271, 1112, 1214, 1112, 1268, 1239,  262,
 /*   290 */   262, 1239,  262, 1271, 1268, 1302, 1354, 1278, 1168, 1168,
 /*   300 */  1168, 1112, 1303, 1303,  815, 1311, 1264, 1364, 1657, 1657,
 /*   310 */  1595, 1595, 1701, 1701, 1595, 1592, 1596, 1724, 1706, 1730,
 /*   320 */  1730, 1730, 1730, 1595, 1735, 1614, 1596, 1596, 1614, 1724,
 /*   330 */  1706, 1614, 1706, 1614, 1595, 1735, 1621, 1717, 1595, 1735,
 /*   340 */  1758, 1595, 1735, 1595, 1735, 1758, 1679, 1679, 1679, 1734,
 /*   350 */  1781, 1781, 1758, 1679, 1689, 1679, 1734, 1679, 1679, 1645,
 /*   360 */  1791, 1715, 1715, 1758, 1690, 1718, 1690, 1718, 1690, 1718,
 /*   370 */  1690, 1718, 1595, 1751, 1751, 1762, 1762, 1699, 1703, 1826,
 /*   380 */  1595, 1695, 1699, 1707, 1710, 1614, 1847, 1863, 1863, 1871,
 /*   390 */  1871, 1871, 2037, 2037, 2037, 2037, 2037, 2037, 2037, 2037,
 /*   400 */  2037, 2037, 2037, 2037, 2037, 2037, 2037,  193,  837, 1194,
 /*   410 */  1212,  506,  832, 1054, 1390,  925, 1435, 1394, 1102, 1332,
 /*   420 */  1419, 1196, 1420, 1425, 1433, 1447, 1457, 1488, 1443, 1379,
 /*   430 */  1572, 1455, 1503, 1453, 1495, 1515, 1506, 1526, 1460, 1489,
 /*   440 */  1581, 1622, 1534,  667, 1888, 1893, 1875, 1736, 1884, 1885,
 /*   450 */  1877, 1879, 1765, 1754, 1776, 1881, 1881, 1883, 1767, 1889,
 /*   460 */  1768, 1894, 1911, 1772, 1788, 1881, 1789, 1858, 1886, 1881,
 /*   470 */  1770, 1868, 1869, 1872, 1873, 1795, 1812, 1895, 1790, 1927,
 /*   480 */  1926, 1910, 1819, 1774, 1867, 1912, 1870, 1861, 1898, 1800,
 /*   490 */  1827, 1918, 1923, 1925, 1815, 1822, 1928, 1880, 1929, 1930,
 /*   500 */  1931, 1933, 1882, 1897, 1924, 1857, 1932, 1935, 1891, 1922,
 /*   510 */  1938, 1814, 1941, 1942, 1943, 1944, 1939, 1945, 1947, 1874,
 /*   520 */  1830, 1949, 1950, 1859, 1946, 1953, 1834, 1952, 1948, 1951,
 /*   530 */  1954, 1955, 1890, 1904, 1900, 1937, 1908, 1899, 1956, 1961,
 /*   540 */  1965, 1967, 1968, 1969, 1962, 1972, 1952, 1974, 1975, 1976,
 /*   550 */  1977, 1978, 1979, 1982, 1990, 1983, 1984, 1985, 1986, 1988,
 /*   560 */  1989, 1987, 1887, 1876, 1878, 1892, 1896, 1992, 1991, 1998,
 /*   570 */  2006, 2014,
};
#define YY_REDUCE_COUNT (406)
#define YY_REDUCE_MIN   (-272)
#define YY_REDUCE_MAX   (1693)
static const short yy_reduce_ofst[] = {
 /*     0 */   109,  113,  272,  760, -178, -176, -192, -183, -180, -134,
 /*    10 */   213,  220,  371, -208, -205, -272, -197,  611,  632,  765,
 /*    20 */   786,  392,  943,  989,  503,  651, 1039,  -18,  702,  821,
 /*    30 */   710,  812, -188,  380, -187,  555,  662, 1055, 1063, 1065,
 /*    40 */  1080, -267, -267, -267, -267, -267, -267, -267, -267, -267,
 /*    50 */  -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
 /*    60 */  -267, -267, -267, -267, -267, -267, -267, -267, -267, -267,
 /*    70 */  -267, -267, -267, -267, -267, -267, -267, -267,  636,  811,
 /*    80 */   917,  936, 1006, 1008, 1017, 1060, 1064, 1069, 1075, 1105,
 /*    90 */  1118, 1123, 1125, 1134, 1140, 1159, 1165, 1169, 1174, 1179,
 /*   100 */  1181, 1184, 1186, 1201, 1246, 1259, 1262, 1281, 1293, 1299,
 /*   110 */  1313, 1327, 1341, 1352, 1356, 1358, 1362, 1366, 1395, 1403,
 /*   120 */  1406, 1411, 1424, 1436, 1439, 1450, 1452, -267, -267, -267,
 /*   130 */  -267, -267, -267, -267, -267,  224, -267,  446,  -24,  275,
 /*   140 */   546,  518,  573,  560,   53, -181, -111,  485,  606,  671,
 /*   150 */   606,  671,  683,    8,   93, -267, -267, -267, -267,  155,
 /*   160 */   155,  155,  181,  242,  264,  486,  489, -218,  393,  227,
 /*   170 */   604,  347,  347, -171,  431,  650,  715, -166,  562,  609,
 /*   180 */   716,  764,   18,  823,  769,  833,  838,  957,  759,  119,
 /*   190 */   923,  226, 1014,  542,  603,  451,  949,  654,  659,  762,
 /*   200 */   964,   -4,  778,  961,  712, 1082, 1100, 1111, 1026, 1117,
 /*   210 */  -204, -174, -151,   -8,   77,  198,  305,  327,  388,  540,
 /*   220 */   839,  968,  982,  985, 1004, 1023, 1070, 1086, 1097, 1130,
 /*   230 */  1190, 1163, 1199, 1284, 1297, 1300, 1314, 1339, 1353, 1391,
 /*   240 */  1402, 1413, 1416, 1417,  803, 1376, 1400, 1428, 1437, 1446,
 /*   250 */  1378, 1461, 1464, 1465, 1249, 1329, 1466, 1467, 1414, 1468,
 /*   260 */   305, 1469, 1470, 1471, 1472, 1482, 1483, 1389, 1392, 1438,
 /*   270 */  1426, 1427, 1432, 1434, 1378, 1438, 1438, 1440, 1474, 1499,
 /*   280 */  1399, 1421, 1430, 1456, 1441, 1442, 1444, 1415, 1473, 1431,
 /*   290 */  1445, 1476, 1449, 1478, 1418, 1479, 1477, 1485, 1493, 1494,
 /*   300 */  1496, 1458, 1475, 1480, 1459, 1490, 1484, 1518, 1448, 1451,
 /*   310 */  1537, 1538, 1463, 1481, 1541, 1486, 1487, 1491, 1519, 1514,
 /*   320 */  1521, 1523, 1525, 1552, 1556, 1520, 1492, 1498, 1522, 1497,
 /*   330 */  1539, 1528, 1542, 1532, 1571, 1573, 1500, 1504, 1582, 1584,
 /*   340 */  1563, 1586, 1588, 1589, 1597, 1567, 1579, 1585, 1590, 1568,
 /*   350 */  1583, 1587, 1593, 1591, 1598, 1599, 1600, 1602, 1606, 1513,
 /*   360 */  1524, 1548, 1549, 1611, 1574, 1576, 1594, 1603, 1604, 1607,
 /*   370 */  1605, 1608, 1642, 1527, 1529, 1609, 1610, 1601, 1615, 1575,
 /*   380 */  1650, 1578, 1619, 1623, 1625, 1624, 1674, 1685, 1686, 1691,
 /*   390 */  1692, 1693, 1612, 1613, 1617, 1675, 1668, 1673, 1676, 1677,
 /*   400 */  1680, 1666, 1669, 1678, 1681, 1683, 1687,
};
static const YYACTIONTYPE yy_default[] = {
 /*     0 */  1633, 1633, 1633, 1462, 1230, 1341, 1230, 1230, 1230, 1462,
 /*    10 */  1462, 1462, 1230, 1371, 1371, 1515, 1263, 1230, 1230, 1230,
 /*    20 */  1230, 1230, 1230, 1230, 1230, 1230, 1230, 1461, 1230, 1230,
 /*    30 */  1230, 1230, 1550, 1550, 1230, 1230, 1230, 1230, 1230, 1230,
 /*    40 */  1230, 1230, 1380, 1230, 1387, 1230, 1230, 1230, 1230, 1230,
 /*    50 */  1463, 1464, 1230, 1230, 1230, 1514, 1516, 1479, 1394, 1393,
 /*    60 */  1392, 1391, 1497, 1358, 1385, 1378, 1382, 1457, 1458, 1456,
 /*    70 */  1460, 1464, 1463, 1230, 1381, 1428, 1442, 1427, 1230, 1230,
 /*    80 */  1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230,
 /*    90 */  1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230,
 /*   100 */  1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230,
 /*   110 */  1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230,
 /*   120 */  1230, 1230, 1230, 1230, 1230, 1230, 1230, 1436, 1441, 1447,
 /*   130 */  1440, 1437, 1430, 1429, 1431, 1230, 1432, 1230, 1254, 1230,
 /*   140 */  1230, 1251, 1305, 1230, 1230, 1230, 1230, 1230, 1534, 1533,
 /*   150 */  1230, 1230, 1263, 1422, 1421, 1433, 1434, 1444, 1443, 1522,
 /*   160 */  1586, 1585, 1480, 1230, 1230, 1230, 1230, 1230, 1230, 1550,
 /*   170 */  1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230,
 /*   180 */  1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230,
 /*   190 */  1230, 1230, 1230, 1550, 1550, 1230, 1263, 1550, 1550, 1259,
 /*   200 */  1259, 1365, 1230, 1529, 1332, 1332, 1332, 1332, 1341, 1332,
 /*   210 */  1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230,
 /*   220 */  1230, 1230, 1230, 1230, 1230, 1519, 1517, 1230, 1230, 1230,
 /*   230 */  1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230,
 /*   240 */  1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230,
 /*   250 */  1230, 1230, 1230, 1230, 1337, 1230, 1230, 1230, 1230, 1230,
 /*   260 */  1230, 1230, 1230, 1230, 1230, 1230, 1579, 1230, 1492, 1319,
 /*   270 */  1337, 1337, 1337, 1337, 1339, 1320, 1318, 1331, 1264, 1237,
 /*   280 */  1625, 1397, 1386, 1338, 1360, 1386, 1360, 1622, 1384, 1397,
 /*   290 */  1397, 1384, 1397, 1338, 1622, 1280, 1602, 1275, 1371, 1371,
 /*   300 */  1371, 1360, 1365, 1365, 1459, 1338, 1331, 1230, 1625, 1625,
 /*   310 */  1346, 1346, 1624, 1624, 1346, 1480, 1609, 1406, 1308, 1314,
 /*   320 */  1314, 1314, 1314, 1346, 1248, 1384, 1609, 1609, 1384, 1406,
 /*   330 */  1308, 1384, 1308, 1384, 1346, 1248, 1496, 1619, 1346, 1248,
 /*   340 */  1470, 1346, 1248, 1346, 1248, 1470, 1306, 1306, 1306, 1295,
 /*   350 */  1230, 1230, 1470, 1306, 1280, 1306, 1295, 1306, 1306, 1568,
 /*   360 */  1230, 1474, 1474, 1470, 1364, 1359, 1364, 1359, 1364, 1359,
 /*   370 */  1364, 1359, 1346, 1560, 1560, 1374, 1374, 1379, 1365, 1465,
 /*   380 */  1346, 1230, 1379, 1377, 1375, 1384, 1298, 1582, 1582, 1578,
 /*   390 */  1578, 1578, 1630, 1630, 1529, 1595, 1263, 1263, 1263, 1263,
 /*   400 */  1595, 1282, 1282, 1264, 1264, 1263, 1595, 1230, 1230, 1230,
 /*   410 */  1230, 1230, 1230, 1590, 1230, 1524, 1481, 1350, 1230, 1230,
 /*   420 */  1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230,
 /*   430 */  1230, 1230, 1535, 1230, 1230, 1230, 1230, 1230, 1230, 1230,
 /*   440 */  1230, 1230, 1230, 1411, 1230, 1233, 1526, 1230, 1230, 1230,
 /*   450 */  1230, 1230, 1230, 1230, 1230, 1388, 1389, 1351, 1230, 1230,
 /*   460 */  1230, 1230, 1230, 1230, 1230, 1403, 1230, 1230, 1230, 1398,
 /*   470 */  1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1621, 1230,
 /*   480 */  1230, 1230, 1230, 1230, 1230, 1495, 1494, 1230, 1230, 1348,
 /*   490 */  1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230,
 /*   500 */  1230, 1230, 1230, 1278, 1230, 1230, 1230, 1230, 1230, 1230,
 /*   510 */  1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230,
 /*   520 */  1230, 1230, 1230, 1230, 1230, 1230, 1230, 1376, 1230, 1230,
 /*   530 */  1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230,
 /*   540 */  1230, 1230, 1565, 1366, 1230, 1230, 1612, 1230, 1230, 1230,
 /*   550 */  1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230, 1230,
 /*   560 */  1230, 1606, 1322, 1413, 1230, 1412, 1416, 1252, 1230, 1242,
 /*   570 */  1230, 1230,
};
/********** End of lemon-generated parsing tables *****************************/

/* The next table maps tokens (terminal symbols) into fallback tokens.
** If a construct like the following:
**
**      %fallback ID X Y Z.
159445
159446
159447
159448
159449
159450
159451
159452
159453

159454
159455
159456
159457
159458
159459
159460
   59,  /*         IF => ID */
    0,  /*        NOT => nothing */
    0,  /*     EXISTS => nothing */
   59,  /*       TEMP => ID */
    0,  /*         LP => nothing */
    0,  /*         RP => nothing */
    0,  /*         AS => nothing */
   59,  /*    WITHOUT => ID */
    0,  /*      COMMA => nothing */

   59,  /*      ABORT => ID */
   59,  /*     ACTION => ID */
   59,  /*      AFTER => ID */
   59,  /*    ANALYZE => ID */
   59,  /*        ASC => ID */
   59,  /*     ATTACH => ID */
   59,  /*     BEFORE => ID */







<

>







159738
159739
159740
159741
159742
159743
159744

159745
159746
159747
159748
159749
159750
159751
159752
159753
   59,  /*         IF => ID */
    0,  /*        NOT => nothing */
    0,  /*     EXISTS => nothing */
   59,  /*       TEMP => ID */
    0,  /*         LP => nothing */
    0,  /*         RP => nothing */
    0,  /*         AS => nothing */

    0,  /*      COMMA => nothing */
   59,  /*    WITHOUT => ID */
   59,  /*      ABORT => ID */
   59,  /*     ACTION => ID */
   59,  /*      AFTER => ID */
   59,  /*    ANALYZE => ID */
   59,  /*        ASC => ID */
   59,  /*     ATTACH => ID */
   59,  /*     BEFORE => ID */
159717
159718
159719
159720
159721
159722
159723
159724
159725
159726
159727
159728
159729
159730
159731
159732
  /*   18 */ "IF",
  /*   19 */ "NOT",
  /*   20 */ "EXISTS",
  /*   21 */ "TEMP",
  /*   22 */ "LP",
  /*   23 */ "RP",
  /*   24 */ "AS",
  /*   25 */ "WITHOUT",
  /*   26 */ "COMMA",
  /*   27 */ "ABORT",
  /*   28 */ "ACTION",
  /*   29 */ "AFTER",
  /*   30 */ "ANALYZE",
  /*   31 */ "ASC",
  /*   32 */ "ATTACH",
  /*   33 */ "BEFORE",







|
|







160010
160011
160012
160013
160014
160015
160016
160017
160018
160019
160020
160021
160022
160023
160024
160025
  /*   18 */ "IF",
  /*   19 */ "NOT",
  /*   20 */ "EXISTS",
  /*   21 */ "TEMP",
  /*   22 */ "LP",
  /*   23 */ "RP",
  /*   24 */ "AS",
  /*   25 */ "COMMA",
  /*   26 */ "WITHOUT",
  /*   27 */ "ABORT",
  /*   28 */ "ACTION",
  /*   29 */ "AFTER",
  /*   30 */ "ANALYZE",
  /*   31 */ "ASC",
  /*   32 */ "ATTACH",
  /*   33 */ "BEFORE",
159894
159895
159896
159897
159898
159899
159900
159901
159902
159903
159904
159905
159906
159907
159908
159909
159910
159911
159912
159913
159914
159915
159916
159917
159918
159919
159920
159921
159922
159923
159924
159925
159926
159927
159928
159929
159930
159931
159932
159933
159934
159935
159936
159937
159938
159939
159940
159941
159942
159943
159944
159945
159946
159947
159948
159949
159950
159951
159952
159953
159954
159955
159956
159957
159958
159959
159960
159961
159962
159963
159964
159965
159966
159967
159968
159969
159970
159971
159972
159973
159974
159975
159976
159977
159978
159979
159980
159981
159982
159983
159984
159985

159986
159987
159988
159989
159990
159991
159992
159993
159994
159995
159996
159997
159998
159999
160000
160001
160002
160003
160004
160005
160006
160007
160008
160009
160010
160011
160012
160013
160014
160015

160016
160017
160018
160019
160020
160021
160022
  /*  195 */ "create_table_args",
  /*  196 */ "createkw",
  /*  197 */ "temp",
  /*  198 */ "ifnotexists",
  /*  199 */ "dbnm",
  /*  200 */ "columnlist",
  /*  201 */ "conslist_opt",
  /*  202 */ "table_options",
  /*  203 */ "select",
  /*  204 */ "columnname",
  /*  205 */ "carglist",
  /*  206 */ "typetoken",
  /*  207 */ "typename",
  /*  208 */ "signed",
  /*  209 */ "plus_num",
  /*  210 */ "minus_num",
  /*  211 */ "scanpt",
  /*  212 */ "scantok",
  /*  213 */ "ccons",
  /*  214 */ "term",
  /*  215 */ "expr",
  /*  216 */ "onconf",
  /*  217 */ "sortorder",
  /*  218 */ "autoinc",
  /*  219 */ "eidlist_opt",
  /*  220 */ "refargs",
  /*  221 */ "defer_subclause",
  /*  222 */ "generated",
  /*  223 */ "refarg",
  /*  224 */ "refact",
  /*  225 */ "init_deferred_pred_opt",
  /*  226 */ "conslist",
  /*  227 */ "tconscomma",
  /*  228 */ "tcons",
  /*  229 */ "sortlist",
  /*  230 */ "eidlist",
  /*  231 */ "defer_subclause_opt",
  /*  232 */ "orconf",
  /*  233 */ "resolvetype",
  /*  234 */ "raisetype",
  /*  235 */ "ifexists",
  /*  236 */ "fullname",
  /*  237 */ "selectnowith",
  /*  238 */ "oneselect",
  /*  239 */ "wqlist",
  /*  240 */ "multiselect_op",
  /*  241 */ "distinct",
  /*  242 */ "selcollist",
  /*  243 */ "from",
  /*  244 */ "where_opt",
  /*  245 */ "groupby_opt",
  /*  246 */ "having_opt",
  /*  247 */ "orderby_opt",
  /*  248 */ "limit_opt",
  /*  249 */ "window_clause",
  /*  250 */ "values",
  /*  251 */ "nexprlist",
  /*  252 */ "sclp",
  /*  253 */ "as",
  /*  254 */ "seltablist",
  /*  255 */ "stl_prefix",
  /*  256 */ "joinop",
  /*  257 */ "indexed_opt",
  /*  258 */ "on_opt",
  /*  259 */ "using_opt",
  /*  260 */ "exprlist",
  /*  261 */ "xfullname",
  /*  262 */ "idlist",
  /*  263 */ "nulls",
  /*  264 */ "with",
  /*  265 */ "where_opt_ret",
  /*  266 */ "setlist",
  /*  267 */ "insert_cmd",
  /*  268 */ "idlist_opt",
  /*  269 */ "upsert",
  /*  270 */ "returning",
  /*  271 */ "filter_over",
  /*  272 */ "likeop",
  /*  273 */ "between_op",
  /*  274 */ "in_op",
  /*  275 */ "paren_exprlist",
  /*  276 */ "case_operand",
  /*  277 */ "case_exprlist",
  /*  278 */ "case_else",
  /*  279 */ "uniqueflag",
  /*  280 */ "collate",
  /*  281 */ "vinto",
  /*  282 */ "nmnum",
  /*  283 */ "trigger_decl",
  /*  284 */ "trigger_cmd_list",
  /*  285 */ "trigger_time",
  /*  286 */ "trigger_event",

  /*  287 */ "foreach_clause",
  /*  288 */ "when_clause",
  /*  289 */ "trigger_cmd",
  /*  290 */ "trnm",
  /*  291 */ "tridxby",
  /*  292 */ "database_kw_opt",
  /*  293 */ "key_opt",
  /*  294 */ "add_column_fullname",
  /*  295 */ "kwcolumn_opt",
  /*  296 */ "create_vtab",
  /*  297 */ "vtabarglist",
  /*  298 */ "vtabarg",
  /*  299 */ "vtabargtoken",
  /*  300 */ "lp",
  /*  301 */ "anylist",
  /*  302 */ "wqitem",
  /*  303 */ "wqas",
  /*  304 */ "windowdefn_list",
  /*  305 */ "windowdefn",
  /*  306 */ "window",
  /*  307 */ "frame_opt",
  /*  308 */ "part_opt",
  /*  309 */ "filter_clause",
  /*  310 */ "over_clause",
  /*  311 */ "range_or_rows",
  /*  312 */ "frame_bound",
  /*  313 */ "frame_bound_s",
  /*  314 */ "frame_bound_e",
  /*  315 */ "frame_exclude_opt",
  /*  316 */ "frame_exclude",

};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {







|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
|
|
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>







160187
160188
160189
160190
160191
160192
160193
160194
160195
160196
160197
160198
160199
160200
160201
160202
160203
160204
160205
160206
160207
160208
160209
160210
160211
160212
160213
160214
160215
160216
160217
160218
160219
160220
160221
160222
160223
160224
160225
160226
160227
160228
160229
160230
160231
160232
160233
160234
160235
160236
160237
160238
160239
160240
160241
160242
160243
160244
160245
160246
160247
160248
160249
160250
160251
160252
160253
160254
160255
160256
160257
160258
160259
160260
160261
160262
160263
160264
160265
160266
160267
160268
160269
160270
160271
160272
160273
160274
160275
160276
160277
160278
160279
160280
160281

160282
160283
160284
160285
160286
160287
160288
160289
160290
160291
160292
160293
160294
160295
160296
160297
160298
160299
160300
160301
160302
160303
160304
160305
160306
160307
160308
160309
160310
160311
160312
160313
160314
160315
160316
  /*  195 */ "create_table_args",
  /*  196 */ "createkw",
  /*  197 */ "temp",
  /*  198 */ "ifnotexists",
  /*  199 */ "dbnm",
  /*  200 */ "columnlist",
  /*  201 */ "conslist_opt",
  /*  202 */ "table_option_set",
  /*  203 */ "select",
  /*  204 */ "table_option",
  /*  205 */ "columnname",
  /*  206 */ "carglist",
  /*  207 */ "typetoken",
  /*  208 */ "typename",
  /*  209 */ "signed",
  /*  210 */ "plus_num",
  /*  211 */ "minus_num",
  /*  212 */ "scanpt",
  /*  213 */ "scantok",
  /*  214 */ "ccons",
  /*  215 */ "term",
  /*  216 */ "expr",
  /*  217 */ "onconf",
  /*  218 */ "sortorder",
  /*  219 */ "autoinc",
  /*  220 */ "eidlist_opt",
  /*  221 */ "refargs",
  /*  222 */ "defer_subclause",
  /*  223 */ "generated",
  /*  224 */ "refarg",
  /*  225 */ "refact",
  /*  226 */ "init_deferred_pred_opt",
  /*  227 */ "conslist",
  /*  228 */ "tconscomma",
  /*  229 */ "tcons",
  /*  230 */ "sortlist",
  /*  231 */ "eidlist",
  /*  232 */ "defer_subclause_opt",
  /*  233 */ "orconf",
  /*  234 */ "resolvetype",
  /*  235 */ "raisetype",
  /*  236 */ "ifexists",
  /*  237 */ "fullname",
  /*  238 */ "selectnowith",
  /*  239 */ "oneselect",
  /*  240 */ "wqlist",
  /*  241 */ "multiselect_op",
  /*  242 */ "distinct",
  /*  243 */ "selcollist",
  /*  244 */ "from",
  /*  245 */ "where_opt",
  /*  246 */ "groupby_opt",
  /*  247 */ "having_opt",
  /*  248 */ "orderby_opt",
  /*  249 */ "limit_opt",
  /*  250 */ "window_clause",
  /*  251 */ "values",
  /*  252 */ "nexprlist",
  /*  253 */ "sclp",
  /*  254 */ "as",
  /*  255 */ "seltablist",
  /*  256 */ "stl_prefix",
  /*  257 */ "joinop",
  /*  258 */ "indexed_opt",
  /*  259 */ "on_opt",
  /*  260 */ "using_opt",
  /*  261 */ "exprlist",
  /*  262 */ "xfullname",
  /*  263 */ "idlist",
  /*  264 */ "nulls",
  /*  265 */ "with",
  /*  266 */ "where_opt_ret",
  /*  267 */ "setlist",
  /*  268 */ "insert_cmd",
  /*  269 */ "idlist_opt",
  /*  270 */ "upsert",
  /*  271 */ "returning",
  /*  272 */ "filter_over",
  /*  273 */ "likeop",
  /*  274 */ "between_op",
  /*  275 */ "in_op",
  /*  276 */ "paren_exprlist",
  /*  277 */ "case_operand",
  /*  278 */ "case_exprlist",
  /*  279 */ "case_else",
  /*  280 */ "uniqueflag",
  /*  281 */ "collate",
  /*  282 */ "vinto",
  /*  283 */ "nmnum",
  /*  284 */ "trigger_decl",
  /*  285 */ "trigger_cmd_list",
  /*  286 */ "trigger_time",
  /*  287 */ "trigger_event",
  /*  288 */ "foreach_clause",
  /*  289 */ "when_clause",

  /*  290 */ "trigger_cmd",
  /*  291 */ "trnm",
  /*  292 */ "tridxby",
  /*  293 */ "database_kw_opt",
  /*  294 */ "key_opt",
  /*  295 */ "add_column_fullname",
  /*  296 */ "kwcolumn_opt",
  /*  297 */ "create_vtab",
  /*  298 */ "vtabarglist",
  /*  299 */ "vtabarg",
  /*  300 */ "vtabargtoken",
  /*  301 */ "lp",
  /*  302 */ "anylist",
  /*  303 */ "wqitem",
  /*  304 */ "wqas",
  /*  305 */ "windowdefn_list",
  /*  306 */ "windowdefn",
  /*  307 */ "window",
  /*  308 */ "frame_opt",
  /*  309 */ "part_opt",
  /*  310 */ "filter_clause",
  /*  311 */ "over_clause",
  /*  312 */ "range_or_rows",
  /*  313 */ "frame_bound",
  /*  314 */ "frame_bound_s",
  /*  315 */ "frame_bound_e",
  /*  316 */ "frame_exclude_opt",
  /*  317 */ "frame_exclude",
};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
160035
160036
160037
160038
160039
160040
160041
160042
160043
160044
160045


160046
160047
160048
160049
160050
160051
160052
160053
160054
160055
160056
160057
160058
160059
160060
160061
160062
160063
160064
160065
160066
160067
160068
160069
160070
160071
160072
160073
160074
160075
160076
160077
160078
160079
160080
160081
160082
160083
160084
160085
160086
160087
160088
160089
160090
160091
160092
160093
160094
160095
160096
160097
160098
160099
160100
160101
160102
160103
160104
160105
160106
160107
160108
160109
160110
160111
160112
160113
160114
160115
160116
160117
160118
160119
160120
160121
160122
160123
160124
160125
160126
160127
160128
160129
160130
160131
160132
160133
160134
160135
160136
160137
160138
160139
160140
160141
160142
160143
160144
160145
160146
160147
160148
160149
160150
160151
160152
160153
160154
160155
160156
160157
160158
160159
160160
160161
160162


160163
160164
160165
160166
160167
160168
160169
160170
160171
160172
160173
160174
160175
160176
160177
160178
160179
160180
160181
160182
160183
160184
160185
160186
160187
160188
160189
160190
160191
160192
160193
160194
160195
160196
160197
160198
160199
160200
160201
160202
160203
160204
160205
160206
160207
160208
160209
160210
160211
160212
160213
160214
160215
160216
160217
160218
160219
160220
160221
160222
160223
160224
160225
160226
160227
160228
160229
160230
160231
160232
160233
160234
160235
160236
160237
160238
160239
160240
160241
160242
160243
160244
160245
160246
160247
160248
160249
160250
160251
160252
160253
160254
160255
160256
160257
160258
160259
160260
160261
160262
160263
160264
160265
160266
160267
160268
160269
160270
160271
160272
160273
160274
160275
160276
160277
160278
160279
160280
160281
160282
160283
160284
160285
160286
160287
160288
160289
160290
160291
160292
160293
160294
160295
160296
160297
160298
160299
160300
160301
160302
160303
160304
160305
160306
160307
160308
160309
160310
160311
160312
160313
160314
160315
160316
160317
160318
160319
160320
160321
160322
160323
160324
160325
160326
160327
160328
160329
160330
160331
160332
160333
160334
160335
160336
160337
160338
160339
160340
160341
160342
160343
160344
160345
160346
160347
160348
160349
160350
160351
160352


160353
160354
160355
160356
160357
160358
160359
160360
160361
160362
160363
160364
160365
160366
160367
160368
160369
160370
160371

160372
160373
160374
160375
160376
160377
160378
160379
160380
160381
160382
160383
160384
160385
160386
160387
160388
160389
160390
160391
160392
160393
160394
160395
160396
160397
160398
160399
160400
160401
160402
160403
160404
160405
160406
160407
160408
160409
160410
160411
160412
160413
160414
160415
160416
160417
160418
160419
160420
160421
160422
160423
160424
160425
160426
160427
 /*  12 */ "cmd ::= ROLLBACK trans_opt TO savepoint_opt nm",
 /*  13 */ "create_table ::= createkw temp TABLE ifnotexists nm dbnm",
 /*  14 */ "createkw ::= CREATE",
 /*  15 */ "ifnotexists ::=",
 /*  16 */ "ifnotexists ::= IF NOT EXISTS",
 /*  17 */ "temp ::= TEMP",
 /*  18 */ "temp ::=",
 /*  19 */ "create_table_args ::= LP columnlist conslist_opt RP table_options",
 /*  20 */ "create_table_args ::= AS select",
 /*  21 */ "table_options ::=",
 /*  22 */ "table_options ::= WITHOUT nm",


 /*  23 */ "columnname ::= nm typetoken",
 /*  24 */ "typetoken ::=",
 /*  25 */ "typetoken ::= typename LP signed RP",
 /*  26 */ "typetoken ::= typename LP signed COMMA signed RP",
 /*  27 */ "typename ::= typename ID|STRING",
 /*  28 */ "scanpt ::=",
 /*  29 */ "scantok ::=",
 /*  30 */ "ccons ::= CONSTRAINT nm",
 /*  31 */ "ccons ::= DEFAULT scantok term",
 /*  32 */ "ccons ::= DEFAULT LP expr RP",
 /*  33 */ "ccons ::= DEFAULT PLUS scantok term",
 /*  34 */ "ccons ::= DEFAULT MINUS scantok term",
 /*  35 */ "ccons ::= DEFAULT scantok ID|INDEXED",
 /*  36 */ "ccons ::= NOT NULL onconf",
 /*  37 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc",
 /*  38 */ "ccons ::= UNIQUE onconf",
 /*  39 */ "ccons ::= CHECK LP expr RP",
 /*  40 */ "ccons ::= REFERENCES nm eidlist_opt refargs",
 /*  41 */ "ccons ::= defer_subclause",
 /*  42 */ "ccons ::= COLLATE ID|STRING",
 /*  43 */ "generated ::= LP expr RP",
 /*  44 */ "generated ::= LP expr RP ID",
 /*  45 */ "autoinc ::=",
 /*  46 */ "autoinc ::= AUTOINCR",
 /*  47 */ "refargs ::=",
 /*  48 */ "refargs ::= refargs refarg",
 /*  49 */ "refarg ::= MATCH nm",
 /*  50 */ "refarg ::= ON INSERT refact",
 /*  51 */ "refarg ::= ON DELETE refact",
 /*  52 */ "refarg ::= ON UPDATE refact",
 /*  53 */ "refact ::= SET NULL",
 /*  54 */ "refact ::= SET DEFAULT",
 /*  55 */ "refact ::= CASCADE",
 /*  56 */ "refact ::= RESTRICT",
 /*  57 */ "refact ::= NO ACTION",
 /*  58 */ "defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt",
 /*  59 */ "defer_subclause ::= DEFERRABLE init_deferred_pred_opt",
 /*  60 */ "init_deferred_pred_opt ::=",
 /*  61 */ "init_deferred_pred_opt ::= INITIALLY DEFERRED",
 /*  62 */ "init_deferred_pred_opt ::= INITIALLY IMMEDIATE",
 /*  63 */ "conslist_opt ::=",
 /*  64 */ "tconscomma ::= COMMA",
 /*  65 */ "tcons ::= CONSTRAINT nm",
 /*  66 */ "tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf",
 /*  67 */ "tcons ::= UNIQUE LP sortlist RP onconf",
 /*  68 */ "tcons ::= CHECK LP expr RP onconf",
 /*  69 */ "tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt",
 /*  70 */ "defer_subclause_opt ::=",
 /*  71 */ "onconf ::=",
 /*  72 */ "onconf ::= ON CONFLICT resolvetype",
 /*  73 */ "orconf ::=",
 /*  74 */ "orconf ::= OR resolvetype",
 /*  75 */ "resolvetype ::= IGNORE",
 /*  76 */ "resolvetype ::= REPLACE",
 /*  77 */ "cmd ::= DROP TABLE ifexists fullname",
 /*  78 */ "ifexists ::= IF EXISTS",
 /*  79 */ "ifexists ::=",
 /*  80 */ "cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select",
 /*  81 */ "cmd ::= DROP VIEW ifexists fullname",
 /*  82 */ "cmd ::= select",
 /*  83 */ "select ::= WITH wqlist selectnowith",
 /*  84 */ "select ::= WITH RECURSIVE wqlist selectnowith",
 /*  85 */ "select ::= selectnowith",
 /*  86 */ "selectnowith ::= selectnowith multiselect_op oneselect",
 /*  87 */ "multiselect_op ::= UNION",
 /*  88 */ "multiselect_op ::= UNION ALL",
 /*  89 */ "multiselect_op ::= EXCEPT|INTERSECT",
 /*  90 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt",
 /*  91 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt",
 /*  92 */ "values ::= VALUES LP nexprlist RP",
 /*  93 */ "values ::= values COMMA LP nexprlist RP",
 /*  94 */ "distinct ::= DISTINCT",
 /*  95 */ "distinct ::= ALL",
 /*  96 */ "distinct ::=",
 /*  97 */ "sclp ::=",
 /*  98 */ "selcollist ::= sclp scanpt expr scanpt as",
 /*  99 */ "selcollist ::= sclp scanpt STAR",
 /* 100 */ "selcollist ::= sclp scanpt nm DOT STAR",
 /* 101 */ "as ::= AS nm",
 /* 102 */ "as ::=",
 /* 103 */ "from ::=",
 /* 104 */ "from ::= FROM seltablist",
 /* 105 */ "stl_prefix ::= seltablist joinop",
 /* 106 */ "stl_prefix ::=",
 /* 107 */ "seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt",
 /* 108 */ "seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt",
 /* 109 */ "seltablist ::= stl_prefix LP select RP as on_opt using_opt",
 /* 110 */ "seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt",
 /* 111 */ "dbnm ::=",
 /* 112 */ "dbnm ::= DOT nm",
 /* 113 */ "fullname ::= nm",
 /* 114 */ "fullname ::= nm DOT nm",
 /* 115 */ "xfullname ::= nm",
 /* 116 */ "xfullname ::= nm DOT nm",
 /* 117 */ "xfullname ::= nm DOT nm AS nm",
 /* 118 */ "xfullname ::= nm AS nm",
 /* 119 */ "joinop ::= COMMA|JOIN",
 /* 120 */ "joinop ::= JOIN_KW JOIN",
 /* 121 */ "joinop ::= JOIN_KW nm JOIN",
 /* 122 */ "joinop ::= JOIN_KW nm nm JOIN",
 /* 123 */ "on_opt ::= ON expr",
 /* 124 */ "on_opt ::=",
 /* 125 */ "indexed_opt ::=",
 /* 126 */ "indexed_opt ::= INDEXED BY nm",
 /* 127 */ "indexed_opt ::= NOT INDEXED",
 /* 128 */ "using_opt ::= USING LP idlist RP",
 /* 129 */ "using_opt ::=",
 /* 130 */ "orderby_opt ::=",
 /* 131 */ "orderby_opt ::= ORDER BY sortlist",
 /* 132 */ "sortlist ::= sortlist COMMA expr sortorder nulls",
 /* 133 */ "sortlist ::= expr sortorder nulls",
 /* 134 */ "sortorder ::= ASC",
 /* 135 */ "sortorder ::= DESC",
 /* 136 */ "sortorder ::=",
 /* 137 */ "nulls ::= NULLS FIRST",
 /* 138 */ "nulls ::= NULLS LAST",
 /* 139 */ "nulls ::=",


 /* 140 */ "groupby_opt ::=",
 /* 141 */ "groupby_opt ::= GROUP BY nexprlist",
 /* 142 */ "having_opt ::=",
 /* 143 */ "having_opt ::= HAVING expr",
 /* 144 */ "limit_opt ::=",
 /* 145 */ "limit_opt ::= LIMIT expr",
 /* 146 */ "limit_opt ::= LIMIT expr OFFSET expr",
 /* 147 */ "limit_opt ::= LIMIT expr COMMA expr",
 /* 148 */ "cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret",
 /* 149 */ "where_opt ::=",
 /* 150 */ "where_opt ::= WHERE expr",
 /* 151 */ "where_opt_ret ::=",
 /* 152 */ "where_opt_ret ::= WHERE expr",
 /* 153 */ "where_opt_ret ::= RETURNING selcollist",
 /* 154 */ "where_opt_ret ::= WHERE expr RETURNING selcollist",
 /* 155 */ "cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret",
 /* 156 */ "setlist ::= setlist COMMA nm EQ expr",
 /* 157 */ "setlist ::= setlist COMMA LP idlist RP EQ expr",
 /* 158 */ "setlist ::= nm EQ expr",
 /* 159 */ "setlist ::= LP idlist RP EQ expr",
 /* 160 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert",
 /* 161 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning",
 /* 162 */ "upsert ::=",
 /* 163 */ "upsert ::= RETURNING selcollist",
 /* 164 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert",
 /* 165 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert",
 /* 166 */ "upsert ::= ON CONFLICT DO NOTHING returning",
 /* 167 */ "upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning",
 /* 168 */ "returning ::= RETURNING selcollist",
 /* 169 */ "insert_cmd ::= INSERT orconf",
 /* 170 */ "insert_cmd ::= REPLACE",
 /* 171 */ "idlist_opt ::=",
 /* 172 */ "idlist_opt ::= LP idlist RP",
 /* 173 */ "idlist ::= idlist COMMA nm",
 /* 174 */ "idlist ::= nm",
 /* 175 */ "expr ::= LP expr RP",
 /* 176 */ "expr ::= ID|INDEXED",
 /* 177 */ "expr ::= JOIN_KW",
 /* 178 */ "expr ::= nm DOT nm",
 /* 179 */ "expr ::= nm DOT nm DOT nm",
 /* 180 */ "term ::= NULL|FLOAT|BLOB",
 /* 181 */ "term ::= STRING",
 /* 182 */ "term ::= INTEGER",
 /* 183 */ "expr ::= VARIABLE",
 /* 184 */ "expr ::= expr COLLATE ID|STRING",
 /* 185 */ "expr ::= CAST LP expr AS typetoken RP",
 /* 186 */ "expr ::= ID|INDEXED LP distinct exprlist RP",
 /* 187 */ "expr ::= ID|INDEXED LP STAR RP",
 /* 188 */ "expr ::= ID|INDEXED LP distinct exprlist RP filter_over",
 /* 189 */ "expr ::= ID|INDEXED LP STAR RP filter_over",
 /* 190 */ "term ::= CTIME_KW",
 /* 191 */ "expr ::= LP nexprlist COMMA expr RP",
 /* 192 */ "expr ::= expr AND expr",
 /* 193 */ "expr ::= expr OR expr",
 /* 194 */ "expr ::= expr LT|GT|GE|LE expr",
 /* 195 */ "expr ::= expr EQ|NE expr",
 /* 196 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr",
 /* 197 */ "expr ::= expr PLUS|MINUS expr",
 /* 198 */ "expr ::= expr STAR|SLASH|REM expr",
 /* 199 */ "expr ::= expr CONCAT expr",
 /* 200 */ "likeop ::= NOT LIKE_KW|MATCH",
 /* 201 */ "expr ::= expr likeop expr",
 /* 202 */ "expr ::= expr likeop expr ESCAPE expr",
 /* 203 */ "expr ::= expr ISNULL|NOTNULL",
 /* 204 */ "expr ::= expr NOT NULL",
 /* 205 */ "expr ::= expr IS expr",
 /* 206 */ "expr ::= expr IS NOT expr",
 /* 207 */ "expr ::= NOT expr",
 /* 208 */ "expr ::= BITNOT expr",
 /* 209 */ "expr ::= PLUS|MINUS expr",
 /* 210 */ "between_op ::= BETWEEN",
 /* 211 */ "between_op ::= NOT BETWEEN",
 /* 212 */ "expr ::= expr between_op expr AND expr",
 /* 213 */ "in_op ::= IN",
 /* 214 */ "in_op ::= NOT IN",
 /* 215 */ "expr ::= expr in_op LP exprlist RP",
 /* 216 */ "expr ::= LP select RP",
 /* 217 */ "expr ::= expr in_op LP select RP",
 /* 218 */ "expr ::= expr in_op nm dbnm paren_exprlist",
 /* 219 */ "expr ::= EXISTS LP select RP",
 /* 220 */ "expr ::= CASE case_operand case_exprlist case_else END",
 /* 221 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr",
 /* 222 */ "case_exprlist ::= WHEN expr THEN expr",
 /* 223 */ "case_else ::= ELSE expr",
 /* 224 */ "case_else ::=",
 /* 225 */ "case_operand ::= expr",
 /* 226 */ "case_operand ::=",
 /* 227 */ "exprlist ::=",
 /* 228 */ "nexprlist ::= nexprlist COMMA expr",
 /* 229 */ "nexprlist ::= expr",
 /* 230 */ "paren_exprlist ::=",
 /* 231 */ "paren_exprlist ::= LP exprlist RP",
 /* 232 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt",
 /* 233 */ "uniqueflag ::= UNIQUE",
 /* 234 */ "uniqueflag ::=",
 /* 235 */ "eidlist_opt ::=",
 /* 236 */ "eidlist_opt ::= LP eidlist RP",
 /* 237 */ "eidlist ::= eidlist COMMA nm collate sortorder",
 /* 238 */ "eidlist ::= nm collate sortorder",
 /* 239 */ "collate ::=",
 /* 240 */ "collate ::= COLLATE ID|STRING",
 /* 241 */ "cmd ::= DROP INDEX ifexists fullname",
 /* 242 */ "cmd ::= VACUUM vinto",
 /* 243 */ "cmd ::= VACUUM nm vinto",
 /* 244 */ "vinto ::= INTO expr",
 /* 245 */ "vinto ::=",
 /* 246 */ "cmd ::= PRAGMA nm dbnm",
 /* 247 */ "cmd ::= PRAGMA nm dbnm EQ nmnum",
 /* 248 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP",
 /* 249 */ "cmd ::= PRAGMA nm dbnm EQ minus_num",
 /* 250 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP",
 /* 251 */ "plus_num ::= PLUS INTEGER|FLOAT",
 /* 252 */ "minus_num ::= MINUS INTEGER|FLOAT",
 /* 253 */ "cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END",
 /* 254 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause",
 /* 255 */ "trigger_time ::= BEFORE|AFTER",
 /* 256 */ "trigger_time ::= INSTEAD OF",
 /* 257 */ "trigger_time ::=",
 /* 258 */ "trigger_event ::= DELETE|INSERT",
 /* 259 */ "trigger_event ::= UPDATE",
 /* 260 */ "trigger_event ::= UPDATE OF idlist",
 /* 261 */ "when_clause ::=",
 /* 262 */ "when_clause ::= WHEN expr",
 /* 263 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI",
 /* 264 */ "trigger_cmd_list ::= trigger_cmd SEMI",
 /* 265 */ "trnm ::= nm DOT nm",
 /* 266 */ "tridxby ::= INDEXED BY nm",
 /* 267 */ "tridxby ::= NOT INDEXED",
 /* 268 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt",
 /* 269 */ "trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt",
 /* 270 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt",
 /* 271 */ "trigger_cmd ::= scanpt select scanpt",
 /* 272 */ "expr ::= RAISE LP IGNORE RP",
 /* 273 */ "expr ::= RAISE LP raisetype COMMA nm RP",
 /* 274 */ "raisetype ::= ROLLBACK",
 /* 275 */ "raisetype ::= ABORT",
 /* 276 */ "raisetype ::= FAIL",
 /* 277 */ "cmd ::= DROP TRIGGER ifexists fullname",
 /* 278 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt",
 /* 279 */ "cmd ::= DETACH database_kw_opt expr",
 /* 280 */ "key_opt ::=",
 /* 281 */ "key_opt ::= KEY expr",
 /* 282 */ "cmd ::= REINDEX",
 /* 283 */ "cmd ::= REINDEX nm dbnm",
 /* 284 */ "cmd ::= ANALYZE",
 /* 285 */ "cmd ::= ANALYZE nm dbnm",
 /* 286 */ "cmd ::= ALTER TABLE fullname RENAME TO nm",
 /* 287 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist",
 /* 288 */ "cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm",
 /* 289 */ "add_column_fullname ::= fullname",
 /* 290 */ "cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm",
 /* 291 */ "cmd ::= create_vtab",
 /* 292 */ "cmd ::= create_vtab LP vtabarglist RP",
 /* 293 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm",
 /* 294 */ "vtabarg ::=",
 /* 295 */ "vtabargtoken ::= ANY",
 /* 296 */ "vtabargtoken ::= lp anylist RP",
 /* 297 */ "lp ::= LP",
 /* 298 */ "with ::= WITH wqlist",
 /* 299 */ "with ::= WITH RECURSIVE wqlist",
 /* 300 */ "wqas ::= AS",
 /* 301 */ "wqas ::= AS MATERIALIZED",
 /* 302 */ "wqas ::= AS NOT MATERIALIZED",
 /* 303 */ "wqitem ::= nm eidlist_opt wqas LP select RP",
 /* 304 */ "wqlist ::= wqitem",
 /* 305 */ "wqlist ::= wqlist COMMA wqitem",
 /* 306 */ "windowdefn_list ::= windowdefn",
 /* 307 */ "windowdefn_list ::= windowdefn_list COMMA windowdefn",
 /* 308 */ "windowdefn ::= nm AS LP window RP",
 /* 309 */ "window ::= PARTITION BY nexprlist orderby_opt frame_opt",
 /* 310 */ "window ::= nm PARTITION BY nexprlist orderby_opt frame_opt",
 /* 311 */ "window ::= ORDER BY sortlist frame_opt",
 /* 312 */ "window ::= nm ORDER BY sortlist frame_opt",
 /* 313 */ "window ::= frame_opt",
 /* 314 */ "window ::= nm frame_opt",
 /* 315 */ "frame_opt ::=",
 /* 316 */ "frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt",
 /* 317 */ "frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt",
 /* 318 */ "range_or_rows ::= RANGE|ROWS|GROUPS",
 /* 319 */ "frame_bound_s ::= frame_bound",
 /* 320 */ "frame_bound_s ::= UNBOUNDED PRECEDING",
 /* 321 */ "frame_bound_e ::= frame_bound",
 /* 322 */ "frame_bound_e ::= UNBOUNDED FOLLOWING",
 /* 323 */ "frame_bound ::= expr PRECEDING|FOLLOWING",
 /* 324 */ "frame_bound ::= CURRENT ROW",
 /* 325 */ "frame_exclude_opt ::=",
 /* 326 */ "frame_exclude_opt ::= EXCLUDE frame_exclude",
 /* 327 */ "frame_exclude ::= NO OTHERS",
 /* 328 */ "frame_exclude ::= CURRENT ROW",
 /* 329 */ "frame_exclude ::= GROUP|TIES",


 /* 330 */ "window_clause ::= WINDOW windowdefn_list",
 /* 331 */ "filter_over ::= filter_clause over_clause",
 /* 332 */ "filter_over ::= over_clause",
 /* 333 */ "filter_over ::= filter_clause",
 /* 334 */ "over_clause ::= OVER LP window RP",
 /* 335 */ "over_clause ::= OVER nm",
 /* 336 */ "filter_clause ::= FILTER LP WHERE expr RP",
 /* 337 */ "input ::= cmdlist",
 /* 338 */ "cmdlist ::= cmdlist ecmd",
 /* 339 */ "cmdlist ::= ecmd",
 /* 340 */ "ecmd ::= SEMI",
 /* 341 */ "ecmd ::= cmdx SEMI",
 /* 342 */ "ecmd ::= explain cmdx SEMI",
 /* 343 */ "trans_opt ::=",
 /* 344 */ "trans_opt ::= TRANSACTION",
 /* 345 */ "trans_opt ::= TRANSACTION nm",
 /* 346 */ "savepoint_opt ::= SAVEPOINT",
 /* 347 */ "savepoint_opt ::=",
 /* 348 */ "cmd ::= create_table create_table_args",

 /* 349 */ "columnlist ::= columnlist COMMA columnname carglist",
 /* 350 */ "columnlist ::= columnname carglist",
 /* 351 */ "nm ::= ID|INDEXED",
 /* 352 */ "nm ::= STRING",
 /* 353 */ "nm ::= JOIN_KW",
 /* 354 */ "typetoken ::= typename",
 /* 355 */ "typename ::= ID|STRING",
 /* 356 */ "signed ::= plus_num",
 /* 357 */ "signed ::= minus_num",
 /* 358 */ "carglist ::= carglist ccons",
 /* 359 */ "carglist ::=",
 /* 360 */ "ccons ::= NULL onconf",
 /* 361 */ "ccons ::= GENERATED ALWAYS AS generated",
 /* 362 */ "ccons ::= AS generated",
 /* 363 */ "conslist_opt ::= COMMA conslist",
 /* 364 */ "conslist ::= conslist tconscomma tcons",
 /* 365 */ "conslist ::= tcons",
 /* 366 */ "tconscomma ::=",
 /* 367 */ "defer_subclause_opt ::= defer_subclause",
 /* 368 */ "resolvetype ::= raisetype",
 /* 369 */ "selectnowith ::= oneselect",
 /* 370 */ "oneselect ::= values",
 /* 371 */ "sclp ::= selcollist COMMA",
 /* 372 */ "as ::= ID|STRING",
 /* 373 */ "returning ::=",
 /* 374 */ "expr ::= term",
 /* 375 */ "likeop ::= LIKE_KW|MATCH",
 /* 376 */ "exprlist ::= nexprlist",
 /* 377 */ "nmnum ::= plus_num",
 /* 378 */ "nmnum ::= nm",
 /* 379 */ "nmnum ::= ON",
 /* 380 */ "nmnum ::= DELETE",
 /* 381 */ "nmnum ::= DEFAULT",
 /* 382 */ "plus_num ::= INTEGER|FLOAT",
 /* 383 */ "foreach_clause ::=",
 /* 384 */ "foreach_clause ::= FOR EACH ROW",
 /* 385 */ "trnm ::= nm",
 /* 386 */ "tridxby ::=",
 /* 387 */ "database_kw_opt ::= DATABASE",
 /* 388 */ "database_kw_opt ::=",
 /* 389 */ "kwcolumn_opt ::=",
 /* 390 */ "kwcolumn_opt ::= COLUMNKW",
 /* 391 */ "vtabarglist ::= vtabarg",
 /* 392 */ "vtabarglist ::= vtabarglist COMMA vtabarg",
 /* 393 */ "vtabarg ::= vtabarg vtabargtoken",
 /* 394 */ "anylist ::=",
 /* 395 */ "anylist ::= anylist LP anylist RP",
 /* 396 */ "anylist ::= anylist ANY",
 /* 397 */ "with ::=",
};
#endif /* NDEBUG */


#if YYSTACKDEPTH<=0
/*
** Try to increase the size of the parser stack.  Return the number







|

|
|
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
|
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
|
|
|
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|







160329
160330
160331
160332
160333
160334
160335
160336
160337
160338
160339
160340
160341
160342
160343
160344
160345
160346
160347
160348
160349
160350
160351
160352
160353
160354
160355
160356
160357
160358
160359
160360
160361
160362
160363
160364
160365
160366
160367
160368
160369
160370
160371
160372
160373
160374
160375
160376
160377
160378
160379
160380
160381
160382
160383
160384
160385
160386
160387
160388
160389
160390
160391
160392
160393
160394
160395
160396
160397
160398
160399
160400
160401
160402
160403
160404
160405
160406
160407
160408
160409
160410
160411
160412
160413
160414
160415
160416
160417
160418
160419
160420
160421
160422
160423
160424
160425
160426
160427
160428
160429
160430
160431
160432
160433
160434
160435
160436
160437
160438
160439
160440
160441
160442
160443
160444
160445
160446
160447
160448
160449
160450
160451
160452
160453
160454
160455


160456
160457
160458
160459
160460
160461
160462
160463
160464
160465
160466
160467
160468
160469
160470
160471
160472
160473
160474
160475
160476
160477
160478
160479
160480
160481
160482
160483
160484
160485
160486
160487
160488
160489
160490
160491
160492
160493
160494
160495
160496
160497
160498
160499
160500
160501
160502
160503
160504
160505
160506
160507
160508
160509
160510
160511
160512
160513
160514
160515
160516
160517
160518
160519
160520
160521
160522
160523
160524
160525
160526
160527
160528
160529
160530
160531
160532
160533
160534
160535
160536
160537
160538
160539
160540
160541
160542
160543
160544
160545
160546
160547
160548
160549
160550
160551
160552
160553
160554
160555
160556
160557
160558
160559
160560
160561
160562
160563
160564
160565
160566
160567
160568
160569
160570
160571
160572
160573
160574
160575
160576
160577
160578
160579
160580
160581
160582
160583
160584
160585
160586
160587
160588
160589
160590
160591
160592
160593
160594
160595
160596
160597
160598
160599
160600
160601
160602
160603
160604
160605
160606
160607
160608
160609
160610
160611
160612
160613
160614
160615
160616
160617
160618
160619
160620
160621
160622
160623
160624
160625
160626
160627
160628
160629
160630
160631
160632
160633
160634
160635
160636
160637
160638
160639
160640
160641
160642
160643


160644
160645
160646
160647
160648
160649
160650
160651
160652
160653
160654
160655
160656
160657
160658
160659
160660
160661
160662
160663
160664
160665
160666
160667
160668
160669
160670
160671
160672
160673
160674
160675
160676
160677
160678
160679
160680
160681
160682
160683
160684
160685
160686
160687
160688
160689
160690
160691
160692
160693
160694
160695
160696
160697
160698
160699
160700
160701
160702
160703
160704
160705
160706
160707
160708
160709
160710
160711
160712
160713
160714
160715
160716
160717
160718
160719
160720
160721
160722
160723
160724
 /*  12 */ "cmd ::= ROLLBACK trans_opt TO savepoint_opt nm",
 /*  13 */ "create_table ::= createkw temp TABLE ifnotexists nm dbnm",
 /*  14 */ "createkw ::= CREATE",
 /*  15 */ "ifnotexists ::=",
 /*  16 */ "ifnotexists ::= IF NOT EXISTS",
 /*  17 */ "temp ::= TEMP",
 /*  18 */ "temp ::=",
 /*  19 */ "create_table_args ::= LP columnlist conslist_opt RP table_option_set",
 /*  20 */ "create_table_args ::= AS select",
 /*  21 */ "table_option_set ::=",
 /*  22 */ "table_option_set ::= table_option_set COMMA table_option",
 /*  23 */ "table_option ::= WITHOUT nm",
 /*  24 */ "table_option ::= nm",
 /*  25 */ "columnname ::= nm typetoken",
 /*  26 */ "typetoken ::=",
 /*  27 */ "typetoken ::= typename LP signed RP",
 /*  28 */ "typetoken ::= typename LP signed COMMA signed RP",
 /*  29 */ "typename ::= typename ID|STRING",
 /*  30 */ "scanpt ::=",
 /*  31 */ "scantok ::=",
 /*  32 */ "ccons ::= CONSTRAINT nm",
 /*  33 */ "ccons ::= DEFAULT scantok term",
 /*  34 */ "ccons ::= DEFAULT LP expr RP",
 /*  35 */ "ccons ::= DEFAULT PLUS scantok term",
 /*  36 */ "ccons ::= DEFAULT MINUS scantok term",
 /*  37 */ "ccons ::= DEFAULT scantok ID|INDEXED",
 /*  38 */ "ccons ::= NOT NULL onconf",
 /*  39 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc",
 /*  40 */ "ccons ::= UNIQUE onconf",
 /*  41 */ "ccons ::= CHECK LP expr RP",
 /*  42 */ "ccons ::= REFERENCES nm eidlist_opt refargs",
 /*  43 */ "ccons ::= defer_subclause",
 /*  44 */ "ccons ::= COLLATE ID|STRING",
 /*  45 */ "generated ::= LP expr RP",
 /*  46 */ "generated ::= LP expr RP ID",
 /*  47 */ "autoinc ::=",
 /*  48 */ "autoinc ::= AUTOINCR",
 /*  49 */ "refargs ::=",
 /*  50 */ "refargs ::= refargs refarg",
 /*  51 */ "refarg ::= MATCH nm",
 /*  52 */ "refarg ::= ON INSERT refact",
 /*  53 */ "refarg ::= ON DELETE refact",
 /*  54 */ "refarg ::= ON UPDATE refact",
 /*  55 */ "refact ::= SET NULL",
 /*  56 */ "refact ::= SET DEFAULT",
 /*  57 */ "refact ::= CASCADE",
 /*  58 */ "refact ::= RESTRICT",
 /*  59 */ "refact ::= NO ACTION",
 /*  60 */ "defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt",
 /*  61 */ "defer_subclause ::= DEFERRABLE init_deferred_pred_opt",
 /*  62 */ "init_deferred_pred_opt ::=",
 /*  63 */ "init_deferred_pred_opt ::= INITIALLY DEFERRED",
 /*  64 */ "init_deferred_pred_opt ::= INITIALLY IMMEDIATE",
 /*  65 */ "conslist_opt ::=",
 /*  66 */ "tconscomma ::= COMMA",
 /*  67 */ "tcons ::= CONSTRAINT nm",
 /*  68 */ "tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf",
 /*  69 */ "tcons ::= UNIQUE LP sortlist RP onconf",
 /*  70 */ "tcons ::= CHECK LP expr RP onconf",
 /*  71 */ "tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt",
 /*  72 */ "defer_subclause_opt ::=",
 /*  73 */ "onconf ::=",
 /*  74 */ "onconf ::= ON CONFLICT resolvetype",
 /*  75 */ "orconf ::=",
 /*  76 */ "orconf ::= OR resolvetype",
 /*  77 */ "resolvetype ::= IGNORE",
 /*  78 */ "resolvetype ::= REPLACE",
 /*  79 */ "cmd ::= DROP TABLE ifexists fullname",
 /*  80 */ "ifexists ::= IF EXISTS",
 /*  81 */ "ifexists ::=",
 /*  82 */ "cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select",
 /*  83 */ "cmd ::= DROP VIEW ifexists fullname",
 /*  84 */ "cmd ::= select",
 /*  85 */ "select ::= WITH wqlist selectnowith",
 /*  86 */ "select ::= WITH RECURSIVE wqlist selectnowith",
 /*  87 */ "select ::= selectnowith",
 /*  88 */ "selectnowith ::= selectnowith multiselect_op oneselect",
 /*  89 */ "multiselect_op ::= UNION",
 /*  90 */ "multiselect_op ::= UNION ALL",
 /*  91 */ "multiselect_op ::= EXCEPT|INTERSECT",
 /*  92 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt",
 /*  93 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt",
 /*  94 */ "values ::= VALUES LP nexprlist RP",
 /*  95 */ "values ::= values COMMA LP nexprlist RP",
 /*  96 */ "distinct ::= DISTINCT",
 /*  97 */ "distinct ::= ALL",
 /*  98 */ "distinct ::=",
 /*  99 */ "sclp ::=",
 /* 100 */ "selcollist ::= sclp scanpt expr scanpt as",
 /* 101 */ "selcollist ::= sclp scanpt STAR",
 /* 102 */ "selcollist ::= sclp scanpt nm DOT STAR",
 /* 103 */ "as ::= AS nm",
 /* 104 */ "as ::=",
 /* 105 */ "from ::=",
 /* 106 */ "from ::= FROM seltablist",
 /* 107 */ "stl_prefix ::= seltablist joinop",
 /* 108 */ "stl_prefix ::=",
 /* 109 */ "seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt",
 /* 110 */ "seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt",
 /* 111 */ "seltablist ::= stl_prefix LP select RP as on_opt using_opt",
 /* 112 */ "seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt",
 /* 113 */ "dbnm ::=",
 /* 114 */ "dbnm ::= DOT nm",
 /* 115 */ "fullname ::= nm",
 /* 116 */ "fullname ::= nm DOT nm",
 /* 117 */ "xfullname ::= nm",
 /* 118 */ "xfullname ::= nm DOT nm",
 /* 119 */ "xfullname ::= nm DOT nm AS nm",
 /* 120 */ "xfullname ::= nm AS nm",
 /* 121 */ "joinop ::= COMMA|JOIN",
 /* 122 */ "joinop ::= JOIN_KW JOIN",
 /* 123 */ "joinop ::= JOIN_KW nm JOIN",
 /* 124 */ "joinop ::= JOIN_KW nm nm JOIN",
 /* 125 */ "on_opt ::= ON expr",
 /* 126 */ "on_opt ::=",
 /* 127 */ "indexed_opt ::=",
 /* 128 */ "indexed_opt ::= INDEXED BY nm",
 /* 129 */ "indexed_opt ::= NOT INDEXED",
 /* 130 */ "using_opt ::= USING LP idlist RP",
 /* 131 */ "using_opt ::=",
 /* 132 */ "orderby_opt ::=",
 /* 133 */ "orderby_opt ::= ORDER BY sortlist",
 /* 134 */ "sortlist ::= sortlist COMMA expr sortorder nulls",
 /* 135 */ "sortlist ::= expr sortorder nulls",
 /* 136 */ "sortorder ::= ASC",
 /* 137 */ "sortorder ::= DESC",
 /* 138 */ "sortorder ::=",


 /* 139 */ "nulls ::= NULLS FIRST",
 /* 140 */ "nulls ::= NULLS LAST",
 /* 141 */ "nulls ::=",
 /* 142 */ "groupby_opt ::=",
 /* 143 */ "groupby_opt ::= GROUP BY nexprlist",
 /* 144 */ "having_opt ::=",
 /* 145 */ "having_opt ::= HAVING expr",
 /* 146 */ "limit_opt ::=",
 /* 147 */ "limit_opt ::= LIMIT expr",
 /* 148 */ "limit_opt ::= LIMIT expr OFFSET expr",
 /* 149 */ "limit_opt ::= LIMIT expr COMMA expr",
 /* 150 */ "cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret",
 /* 151 */ "where_opt ::=",
 /* 152 */ "where_opt ::= WHERE expr",
 /* 153 */ "where_opt_ret ::=",
 /* 154 */ "where_opt_ret ::= WHERE expr",
 /* 155 */ "where_opt_ret ::= RETURNING selcollist",
 /* 156 */ "where_opt_ret ::= WHERE expr RETURNING selcollist",
 /* 157 */ "cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret",
 /* 158 */ "setlist ::= setlist COMMA nm EQ expr",
 /* 159 */ "setlist ::= setlist COMMA LP idlist RP EQ expr",
 /* 160 */ "setlist ::= nm EQ expr",
 /* 161 */ "setlist ::= LP idlist RP EQ expr",
 /* 162 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert",
 /* 163 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning",
 /* 164 */ "upsert ::=",
 /* 165 */ "upsert ::= RETURNING selcollist",
 /* 166 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert",
 /* 167 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert",
 /* 168 */ "upsert ::= ON CONFLICT DO NOTHING returning",
 /* 169 */ "upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning",
 /* 170 */ "returning ::= RETURNING selcollist",
 /* 171 */ "insert_cmd ::= INSERT orconf",
 /* 172 */ "insert_cmd ::= REPLACE",
 /* 173 */ "idlist_opt ::=",
 /* 174 */ "idlist_opt ::= LP idlist RP",
 /* 175 */ "idlist ::= idlist COMMA nm",
 /* 176 */ "idlist ::= nm",
 /* 177 */ "expr ::= LP expr RP",
 /* 178 */ "expr ::= ID|INDEXED",
 /* 179 */ "expr ::= JOIN_KW",
 /* 180 */ "expr ::= nm DOT nm",
 /* 181 */ "expr ::= nm DOT nm DOT nm",
 /* 182 */ "term ::= NULL|FLOAT|BLOB",
 /* 183 */ "term ::= STRING",
 /* 184 */ "term ::= INTEGER",
 /* 185 */ "expr ::= VARIABLE",
 /* 186 */ "expr ::= expr COLLATE ID|STRING",
 /* 187 */ "expr ::= CAST LP expr AS typetoken RP",
 /* 188 */ "expr ::= ID|INDEXED LP distinct exprlist RP",
 /* 189 */ "expr ::= ID|INDEXED LP STAR RP",
 /* 190 */ "expr ::= ID|INDEXED LP distinct exprlist RP filter_over",
 /* 191 */ "expr ::= ID|INDEXED LP STAR RP filter_over",
 /* 192 */ "term ::= CTIME_KW",
 /* 193 */ "expr ::= LP nexprlist COMMA expr RP",
 /* 194 */ "expr ::= expr AND expr",
 /* 195 */ "expr ::= expr OR expr",
 /* 196 */ "expr ::= expr LT|GT|GE|LE expr",
 /* 197 */ "expr ::= expr EQ|NE expr",
 /* 198 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr",
 /* 199 */ "expr ::= expr PLUS|MINUS expr",
 /* 200 */ "expr ::= expr STAR|SLASH|REM expr",
 /* 201 */ "expr ::= expr CONCAT expr",
 /* 202 */ "likeop ::= NOT LIKE_KW|MATCH",
 /* 203 */ "expr ::= expr likeop expr",
 /* 204 */ "expr ::= expr likeop expr ESCAPE expr",
 /* 205 */ "expr ::= expr ISNULL|NOTNULL",
 /* 206 */ "expr ::= expr NOT NULL",
 /* 207 */ "expr ::= expr IS expr",
 /* 208 */ "expr ::= expr IS NOT expr",
 /* 209 */ "expr ::= NOT expr",
 /* 210 */ "expr ::= BITNOT expr",
 /* 211 */ "expr ::= PLUS|MINUS expr",
 /* 212 */ "between_op ::= BETWEEN",
 /* 213 */ "between_op ::= NOT BETWEEN",
 /* 214 */ "expr ::= expr between_op expr AND expr",
 /* 215 */ "in_op ::= IN",
 /* 216 */ "in_op ::= NOT IN",
 /* 217 */ "expr ::= expr in_op LP exprlist RP",
 /* 218 */ "expr ::= LP select RP",
 /* 219 */ "expr ::= expr in_op LP select RP",
 /* 220 */ "expr ::= expr in_op nm dbnm paren_exprlist",
 /* 221 */ "expr ::= EXISTS LP select RP",
 /* 222 */ "expr ::= CASE case_operand case_exprlist case_else END",
 /* 223 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr",
 /* 224 */ "case_exprlist ::= WHEN expr THEN expr",
 /* 225 */ "case_else ::= ELSE expr",
 /* 226 */ "case_else ::=",
 /* 227 */ "case_operand ::= expr",
 /* 228 */ "case_operand ::=",
 /* 229 */ "exprlist ::=",
 /* 230 */ "nexprlist ::= nexprlist COMMA expr",
 /* 231 */ "nexprlist ::= expr",
 /* 232 */ "paren_exprlist ::=",
 /* 233 */ "paren_exprlist ::= LP exprlist RP",
 /* 234 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt",
 /* 235 */ "uniqueflag ::= UNIQUE",
 /* 236 */ "uniqueflag ::=",
 /* 237 */ "eidlist_opt ::=",
 /* 238 */ "eidlist_opt ::= LP eidlist RP",
 /* 239 */ "eidlist ::= eidlist COMMA nm collate sortorder",
 /* 240 */ "eidlist ::= nm collate sortorder",
 /* 241 */ "collate ::=",
 /* 242 */ "collate ::= COLLATE ID|STRING",
 /* 243 */ "cmd ::= DROP INDEX ifexists fullname",
 /* 244 */ "cmd ::= VACUUM vinto",
 /* 245 */ "cmd ::= VACUUM nm vinto",
 /* 246 */ "vinto ::= INTO expr",
 /* 247 */ "vinto ::=",
 /* 248 */ "cmd ::= PRAGMA nm dbnm",
 /* 249 */ "cmd ::= PRAGMA nm dbnm EQ nmnum",
 /* 250 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP",
 /* 251 */ "cmd ::= PRAGMA nm dbnm EQ minus_num",
 /* 252 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP",
 /* 253 */ "plus_num ::= PLUS INTEGER|FLOAT",
 /* 254 */ "minus_num ::= MINUS INTEGER|FLOAT",
 /* 255 */ "cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END",
 /* 256 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause",
 /* 257 */ "trigger_time ::= BEFORE|AFTER",
 /* 258 */ "trigger_time ::= INSTEAD OF",
 /* 259 */ "trigger_time ::=",
 /* 260 */ "trigger_event ::= DELETE|INSERT",
 /* 261 */ "trigger_event ::= UPDATE",
 /* 262 */ "trigger_event ::= UPDATE OF idlist",
 /* 263 */ "when_clause ::=",
 /* 264 */ "when_clause ::= WHEN expr",
 /* 265 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI",
 /* 266 */ "trigger_cmd_list ::= trigger_cmd SEMI",
 /* 267 */ "trnm ::= nm DOT nm",
 /* 268 */ "tridxby ::= INDEXED BY nm",
 /* 269 */ "tridxby ::= NOT INDEXED",
 /* 270 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt",
 /* 271 */ "trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt",
 /* 272 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt",
 /* 273 */ "trigger_cmd ::= scanpt select scanpt",
 /* 274 */ "expr ::= RAISE LP IGNORE RP",
 /* 275 */ "expr ::= RAISE LP raisetype COMMA nm RP",
 /* 276 */ "raisetype ::= ROLLBACK",
 /* 277 */ "raisetype ::= ABORT",
 /* 278 */ "raisetype ::= FAIL",
 /* 279 */ "cmd ::= DROP TRIGGER ifexists fullname",
 /* 280 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt",
 /* 281 */ "cmd ::= DETACH database_kw_opt expr",
 /* 282 */ "key_opt ::=",
 /* 283 */ "key_opt ::= KEY expr",
 /* 284 */ "cmd ::= REINDEX",
 /* 285 */ "cmd ::= REINDEX nm dbnm",
 /* 286 */ "cmd ::= ANALYZE",
 /* 287 */ "cmd ::= ANALYZE nm dbnm",
 /* 288 */ "cmd ::= ALTER TABLE fullname RENAME TO nm",
 /* 289 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist",
 /* 290 */ "cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm",
 /* 291 */ "add_column_fullname ::= fullname",
 /* 292 */ "cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm",
 /* 293 */ "cmd ::= create_vtab",
 /* 294 */ "cmd ::= create_vtab LP vtabarglist RP",
 /* 295 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm",
 /* 296 */ "vtabarg ::=",
 /* 297 */ "vtabargtoken ::= ANY",
 /* 298 */ "vtabargtoken ::= lp anylist RP",
 /* 299 */ "lp ::= LP",
 /* 300 */ "with ::= WITH wqlist",
 /* 301 */ "with ::= WITH RECURSIVE wqlist",
 /* 302 */ "wqas ::= AS",
 /* 303 */ "wqas ::= AS MATERIALIZED",
 /* 304 */ "wqas ::= AS NOT MATERIALIZED",
 /* 305 */ "wqitem ::= nm eidlist_opt wqas LP select RP",
 /* 306 */ "wqlist ::= wqitem",
 /* 307 */ "wqlist ::= wqlist COMMA wqitem",
 /* 308 */ "windowdefn_list ::= windowdefn",
 /* 309 */ "windowdefn_list ::= windowdefn_list COMMA windowdefn",
 /* 310 */ "windowdefn ::= nm AS LP window RP",
 /* 311 */ "window ::= PARTITION BY nexprlist orderby_opt frame_opt",
 /* 312 */ "window ::= nm PARTITION BY nexprlist orderby_opt frame_opt",
 /* 313 */ "window ::= ORDER BY sortlist frame_opt",
 /* 314 */ "window ::= nm ORDER BY sortlist frame_opt",
 /* 315 */ "window ::= frame_opt",
 /* 316 */ "window ::= nm frame_opt",
 /* 317 */ "frame_opt ::=",
 /* 318 */ "frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt",
 /* 319 */ "frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt",
 /* 320 */ "range_or_rows ::= RANGE|ROWS|GROUPS",
 /* 321 */ "frame_bound_s ::= frame_bound",
 /* 322 */ "frame_bound_s ::= UNBOUNDED PRECEDING",
 /* 323 */ "frame_bound_e ::= frame_bound",
 /* 324 */ "frame_bound_e ::= UNBOUNDED FOLLOWING",
 /* 325 */ "frame_bound ::= expr PRECEDING|FOLLOWING",
 /* 326 */ "frame_bound ::= CURRENT ROW",


 /* 327 */ "frame_exclude_opt ::=",
 /* 328 */ "frame_exclude_opt ::= EXCLUDE frame_exclude",
 /* 329 */ "frame_exclude ::= NO OTHERS",
 /* 330 */ "frame_exclude ::= CURRENT ROW",
 /* 331 */ "frame_exclude ::= GROUP|TIES",
 /* 332 */ "window_clause ::= WINDOW windowdefn_list",
 /* 333 */ "filter_over ::= filter_clause over_clause",
 /* 334 */ "filter_over ::= over_clause",
 /* 335 */ "filter_over ::= filter_clause",
 /* 336 */ "over_clause ::= OVER LP window RP",
 /* 337 */ "over_clause ::= OVER nm",
 /* 338 */ "filter_clause ::= FILTER LP WHERE expr RP",
 /* 339 */ "input ::= cmdlist",
 /* 340 */ "cmdlist ::= cmdlist ecmd",
 /* 341 */ "cmdlist ::= ecmd",
 /* 342 */ "ecmd ::= SEMI",
 /* 343 */ "ecmd ::= cmdx SEMI",
 /* 344 */ "ecmd ::= explain cmdx SEMI",
 /* 345 */ "trans_opt ::=",
 /* 346 */ "trans_opt ::= TRANSACTION",
 /* 347 */ "trans_opt ::= TRANSACTION nm",
 /* 348 */ "savepoint_opt ::= SAVEPOINT",
 /* 349 */ "savepoint_opt ::=",
 /* 350 */ "cmd ::= create_table create_table_args",
 /* 351 */ "table_option_set ::= table_option",
 /* 352 */ "columnlist ::= columnlist COMMA columnname carglist",
 /* 353 */ "columnlist ::= columnname carglist",
 /* 354 */ "nm ::= ID|INDEXED",
 /* 355 */ "nm ::= STRING",
 /* 356 */ "nm ::= JOIN_KW",
 /* 357 */ "typetoken ::= typename",
 /* 358 */ "typename ::= ID|STRING",
 /* 359 */ "signed ::= plus_num",
 /* 360 */ "signed ::= minus_num",
 /* 361 */ "carglist ::= carglist ccons",
 /* 362 */ "carglist ::=",
 /* 363 */ "ccons ::= NULL onconf",
 /* 364 */ "ccons ::= GENERATED ALWAYS AS generated",
 /* 365 */ "ccons ::= AS generated",
 /* 366 */ "conslist_opt ::= COMMA conslist",
 /* 367 */ "conslist ::= conslist tconscomma tcons",
 /* 368 */ "conslist ::= tcons",
 /* 369 */ "tconscomma ::=",
 /* 370 */ "defer_subclause_opt ::= defer_subclause",
 /* 371 */ "resolvetype ::= raisetype",
 /* 372 */ "selectnowith ::= oneselect",
 /* 373 */ "oneselect ::= values",
 /* 374 */ "sclp ::= selcollist COMMA",
 /* 375 */ "as ::= ID|STRING",
 /* 376 */ "returning ::=",
 /* 377 */ "expr ::= term",
 /* 378 */ "likeop ::= LIKE_KW|MATCH",
 /* 379 */ "exprlist ::= nexprlist",
 /* 380 */ "nmnum ::= plus_num",
 /* 381 */ "nmnum ::= nm",
 /* 382 */ "nmnum ::= ON",
 /* 383 */ "nmnum ::= DELETE",
 /* 384 */ "nmnum ::= DEFAULT",
 /* 385 */ "plus_num ::= INTEGER|FLOAT",
 /* 386 */ "foreach_clause ::=",
 /* 387 */ "foreach_clause ::= FOR EACH ROW",
 /* 388 */ "trnm ::= nm",
 /* 389 */ "tridxby ::=",
 /* 390 */ "database_kw_opt ::= DATABASE",
 /* 391 */ "database_kw_opt ::=",
 /* 392 */ "kwcolumn_opt ::=",
 /* 393 */ "kwcolumn_opt ::= COLUMNKW",
 /* 394 */ "vtabarglist ::= vtabarg",
 /* 395 */ "vtabarglist ::= vtabarglist COMMA vtabarg",
 /* 396 */ "vtabarg ::= vtabarg vtabargtoken",
 /* 397 */ "anylist ::=",
 /* 398 */ "anylist ::= anylist LP anylist RP",
 /* 399 */ "anylist ::= anylist ANY",
 /* 400 */ "with ::=",
};
#endif /* NDEBUG */


#if YYSTACKDEPTH<=0
/*
** Try to increase the size of the parser stack.  Return the number
160540
160541
160542
160543
160544
160545
160546
160547
160548
160549
160550
160551
160552
160553
160554
160555
160556
160557
160558
160559
160560
160561
160562
160563
160564
160565
160566
160567
160568
160569
160570
160571
160572
160573
160574
160575
160576
160577
160578
160579
160580
160581
160582
160583
160584
160585
160586
160587
160588
160589
160590
160591
160592
160593
160594
160595
160596
160597
160598
160599
160600
160601
160602
160603
160604
160605
160606
160607
160608
160609
160610
160611
160612
160613
160614
160615
160616
160617

160618
160619
160620
160621
160622
160623
160624
160625
160626
160627
160628
160629
160630
160631
160632
160633
160634
160635
160636
160637
160638
160639
160640
160641
160642
160643
160644
160645
    **
    ** Note: during a reduce, the only symbols destroyed are those
    ** which appear on the RHS of the rule, but which are *not* used
    ** inside the C code.
    */
/********* Begin destructor definitions ***************************************/
    case 203: /* select */
    case 237: /* selectnowith */
    case 238: /* oneselect */
    case 250: /* values */
{
sqlite3SelectDelete(pParse->db, (yypminor->yy81));
}
      break;
    case 214: /* term */
    case 215: /* expr */
    case 244: /* where_opt */
    case 246: /* having_opt */
    case 258: /* on_opt */
    case 265: /* where_opt_ret */
    case 276: /* case_operand */
    case 278: /* case_else */
    case 281: /* vinto */
    case 288: /* when_clause */
    case 293: /* key_opt */
    case 309: /* filter_clause */
{
sqlite3ExprDelete(pParse->db, (yypminor->yy404));
}
      break;
    case 219: /* eidlist_opt */
    case 229: /* sortlist */
    case 230: /* eidlist */
    case 242: /* selcollist */
    case 245: /* groupby_opt */
    case 247: /* orderby_opt */
    case 251: /* nexprlist */
    case 252: /* sclp */
    case 260: /* exprlist */
    case 266: /* setlist */
    case 275: /* paren_exprlist */
    case 277: /* case_exprlist */
    case 308: /* part_opt */
{
sqlite3ExprListDelete(pParse->db, (yypminor->yy70));
}
      break;
    case 236: /* fullname */
    case 243: /* from */
    case 254: /* seltablist */
    case 255: /* stl_prefix */
    case 261: /* xfullname */
{
sqlite3SrcListDelete(pParse->db, (yypminor->yy153));
}
      break;
    case 239: /* wqlist */
{
sqlite3WithDelete(pParse->db, (yypminor->yy103));
}
      break;
    case 249: /* window_clause */
    case 304: /* windowdefn_list */
{
sqlite3WindowListDelete(pParse->db, (yypminor->yy49));
}
      break;
    case 259: /* using_opt */
    case 262: /* idlist */
    case 268: /* idlist_opt */
{
sqlite3IdListDelete(pParse->db, (yypminor->yy436));
}
      break;
    case 271: /* filter_over */
    case 305: /* windowdefn */
    case 306: /* window */
    case 307: /* frame_opt */

    case 310: /* over_clause */
{
sqlite3WindowDelete(pParse->db, (yypminor->yy49));
}
      break;
    case 284: /* trigger_cmd_list */
    case 289: /* trigger_cmd */
{
sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy157));
}
      break;
    case 286: /* trigger_event */
{
sqlite3IdListDelete(pParse->db, (yypminor->yy262).b);
}
      break;
    case 312: /* frame_bound */
    case 313: /* frame_bound_s */
    case 314: /* frame_bound_e */
{
sqlite3ExprDelete(pParse->db, (yypminor->yy117).pExpr);
}
      break;
/********* End destructor definitions *****************************************/
    default:  break;   /* If no destructor action specified: do nothing */
  }
}








|
|
|

|


|
|
|
|
|
|
|
|
|
|
|
|

|


|
|
|
|
|
|
|
|
|
|
|
|
|

|


|
|
|
|
|

|


|

|


|
|

|


|
|
|

|


|
<
|
|
>
|

|


|
|

|


|

|


|
|
|

|







160837
160838
160839
160840
160841
160842
160843
160844
160845
160846
160847
160848
160849
160850
160851
160852
160853
160854
160855
160856
160857
160858
160859
160860
160861
160862
160863
160864
160865
160866
160867
160868
160869
160870
160871
160872
160873
160874
160875
160876
160877
160878
160879
160880
160881
160882
160883
160884
160885
160886
160887
160888
160889
160890
160891
160892
160893
160894
160895
160896
160897
160898
160899
160900
160901
160902
160903
160904
160905
160906
160907
160908
160909
160910
160911

160912
160913
160914
160915
160916
160917
160918
160919
160920
160921
160922
160923
160924
160925
160926
160927
160928
160929
160930
160931
160932
160933
160934
160935
160936
160937
160938
160939
160940
160941
160942
    **
    ** Note: during a reduce, the only symbols destroyed are those
    ** which appear on the RHS of the rule, but which are *not* used
    ** inside the C code.
    */
/********* Begin destructor definitions ***************************************/
    case 203: /* select */
    case 238: /* selectnowith */
    case 239: /* oneselect */
    case 251: /* values */
{
sqlite3SelectDelete(pParse->db, (yypminor->yy303));
}
      break;
    case 215: /* term */
    case 216: /* expr */
    case 245: /* where_opt */
    case 247: /* having_opt */
    case 259: /* on_opt */
    case 266: /* where_opt_ret */
    case 277: /* case_operand */
    case 279: /* case_else */
    case 282: /* vinto */
    case 289: /* when_clause */
    case 294: /* key_opt */
    case 310: /* filter_clause */
{
sqlite3ExprDelete(pParse->db, (yypminor->yy626));
}
      break;
    case 220: /* eidlist_opt */
    case 230: /* sortlist */
    case 231: /* eidlist */
    case 243: /* selcollist */
    case 246: /* groupby_opt */
    case 248: /* orderby_opt */
    case 252: /* nexprlist */
    case 253: /* sclp */
    case 261: /* exprlist */
    case 267: /* setlist */
    case 276: /* paren_exprlist */
    case 278: /* case_exprlist */
    case 309: /* part_opt */
{
sqlite3ExprListDelete(pParse->db, (yypminor->yy562));
}
      break;
    case 237: /* fullname */
    case 244: /* from */
    case 255: /* seltablist */
    case 256: /* stl_prefix */
    case 262: /* xfullname */
{
sqlite3SrcListDelete(pParse->db, (yypminor->yy607));
}
      break;
    case 240: /* wqlist */
{
sqlite3WithDelete(pParse->db, (yypminor->yy43));
}
      break;
    case 250: /* window_clause */
    case 305: /* windowdefn_list */
{
sqlite3WindowListDelete(pParse->db, (yypminor->yy375));
}
      break;
    case 260: /* using_opt */
    case 263: /* idlist */
    case 269: /* idlist_opt */
{
sqlite3IdListDelete(pParse->db, (yypminor->yy240));
}
      break;
    case 272: /* filter_over */

    case 306: /* windowdefn */
    case 307: /* window */
    case 308: /* frame_opt */
    case 311: /* over_clause */
{
sqlite3WindowDelete(pParse->db, (yypminor->yy375));
}
      break;
    case 285: /* trigger_cmd_list */
    case 290: /* trigger_cmd */
{
sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy95));
}
      break;
    case 287: /* trigger_event */
{
sqlite3IdListDelete(pParse->db, (yypminor->yy570).b);
}
      break;
    case 313: /* frame_bound */
    case 314: /* frame_bound_s */
    case 315: /* frame_bound_e */
{
sqlite3ExprDelete(pParse->db, (yypminor->yy81).pExpr);
}
      break;
/********* End destructor definitions *****************************************/
    default:  break;   /* If no destructor action specified: do nothing */
  }
}

160941
160942
160943
160944
160945
160946
160947
160948
160949
160950
160951


160952
160953
160954
160955
160956
160957
160958
160959
160960
160961
160962
160963
160964
160965
160966
160967
160968
160969
160970
160971
160972
160973
160974
160975
160976
160977
160978
160979
160980
160981
160982
160983
160984
160985
160986
160987
160988
160989
160990
160991
160992
160993
160994
160995
160996
160997
160998
160999
161000
161001
161002
161003
161004
161005
161006
161007
161008
161009
161010
161011
161012
161013
161014
161015
161016
161017
161018
161019
161020
161021
161022
161023
161024
161025
161026
161027
161028
161029
161030
161031
161032
161033
161034
161035
161036
161037
161038
161039
161040
161041
161042
161043
161044
161045
161046
161047
161048
161049
161050
161051
161052
161053
161054
161055
161056
161057
161058
161059
161060
161061
161062
161063
161064
161065
161066
161067
161068
161069
161070
161071
161072
161073
161074
161075
161076
161077
161078
161079
161080
161081
161082
161083
161084
161085
161086
161087
161088
161089
161090
161091
161092
161093
161094
161095
161096
161097
161098
161099
161100
161101
161102
161103
161104
161105
161106
161107
161108
161109
161110
161111
161112
161113
161114
161115
161116
161117
161118
161119
161120
161121
161122
161123
161124
161125
161126
161127
161128
161129
161130
161131
161132
161133
161134
161135
161136
161137
161138
161139
161140
161141
161142
161143
161144
161145
161146
161147
161148
161149
161150
161151
161152
161153
161154
161155
161156
161157
161158
161159
161160
161161
161162
161163
161164
161165
161166
161167
161168
161169
161170
161171
161172
161173
161174
161175
161176
161177
161178
161179
161180
161181
161182
161183
161184
161185
161186
161187
161188
161189
161190
161191
161192
161193
161194
161195
161196
161197
161198
161199
161200
161201
161202
161203
161204
161205
161206
161207
161208
161209
161210
161211
161212
161213
161214
161215
161216
161217
161218
161219
161220
161221
161222
161223
161224
161225
161226
161227
161228
161229
161230
161231
161232
161233
161234
161235
161236
161237
161238
161239
161240
161241
161242
161243
161244
161245
161246
161247
161248
161249
161250
161251
161252
161253
161254
161255
161256
161257
161258
161259
161260
161261
161262
161263
161264
161265
161266
161267
161268
161269
161270
161271
161272
161273
161274
161275
161276
161277

161278
161279
161280
161281
161282
161283
161284
161285
161286
161287
161288
161289
161290
161291
161292
161293
161294
161295
161296
161297
161298
161299
161300
161301
161302
161303
161304
161305
161306
161307
161308
161309
161310
161311
161312
161313
161314
161315
161316
161317
161318
161319
161320
161321
161322
161323
161324
161325
161326
161327
161328
161329
161330
161331
161332
161333
   189,  /* (12) cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
   194,  /* (13) create_table ::= createkw temp TABLE ifnotexists nm dbnm */
   196,  /* (14) createkw ::= CREATE */
   198,  /* (15) ifnotexists ::= */
   198,  /* (16) ifnotexists ::= IF NOT EXISTS */
   197,  /* (17) temp ::= TEMP */
   197,  /* (18) temp ::= */
   195,  /* (19) create_table_args ::= LP columnlist conslist_opt RP table_options */
   195,  /* (20) create_table_args ::= AS select */
   202,  /* (21) table_options ::= */
   202,  /* (22) table_options ::= WITHOUT nm */


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

   200,  /* (349) columnlist ::= columnlist COMMA columnname carglist */
   200,  /* (350) columnlist ::= columnname carglist */
   192,  /* (351) nm ::= ID|INDEXED */
   192,  /* (352) nm ::= STRING */
   192,  /* (353) nm ::= JOIN_KW */
   206,  /* (354) typetoken ::= typename */
   207,  /* (355) typename ::= ID|STRING */
   208,  /* (356) signed ::= plus_num */
   208,  /* (357) signed ::= minus_num */
   205,  /* (358) carglist ::= carglist ccons */
   205,  /* (359) carglist ::= */
   213,  /* (360) ccons ::= NULL onconf */
   213,  /* (361) ccons ::= GENERATED ALWAYS AS generated */
   213,  /* (362) ccons ::= AS generated */
   201,  /* (363) conslist_opt ::= COMMA conslist */
   226,  /* (364) conslist ::= conslist tconscomma tcons */
   226,  /* (365) conslist ::= tcons */
   227,  /* (366) tconscomma ::= */
   231,  /* (367) defer_subclause_opt ::= defer_subclause */
   233,  /* (368) resolvetype ::= raisetype */
   237,  /* (369) selectnowith ::= oneselect */
   238,  /* (370) oneselect ::= values */
   252,  /* (371) sclp ::= selcollist COMMA */
   253,  /* (372) as ::= ID|STRING */
   270,  /* (373) returning ::= */
   215,  /* (374) expr ::= term */
   272,  /* (375) likeop ::= LIKE_KW|MATCH */
   260,  /* (376) exprlist ::= nexprlist */
   282,  /* (377) nmnum ::= plus_num */
   282,  /* (378) nmnum ::= nm */
   282,  /* (379) nmnum ::= ON */
   282,  /* (380) nmnum ::= DELETE */
   282,  /* (381) nmnum ::= DEFAULT */
   209,  /* (382) plus_num ::= INTEGER|FLOAT */
   287,  /* (383) foreach_clause ::= */
   287,  /* (384) foreach_clause ::= FOR EACH ROW */
   290,  /* (385) trnm ::= nm */
   291,  /* (386) tridxby ::= */
   292,  /* (387) database_kw_opt ::= DATABASE */
   292,  /* (388) database_kw_opt ::= */
   295,  /* (389) kwcolumn_opt ::= */
   295,  /* (390) kwcolumn_opt ::= COLUMNKW */
   297,  /* (391) vtabarglist ::= vtabarg */
   297,  /* (392) vtabarglist ::= vtabarglist COMMA vtabarg */
   298,  /* (393) vtabarg ::= vtabarg vtabargtoken */
   301,  /* (394) anylist ::= */
   301,  /* (395) anylist ::= anylist LP anylist RP */
   301,  /* (396) anylist ::= anylist ANY */
   264,  /* (397) with ::= */
};

/* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
** of symbols on the right-hand side of that rule. */
static const signed char yyRuleInfoNRhs[] = {
   -1,  /* (0) explain ::= EXPLAIN */
   -3,  /* (1) explain ::= EXPLAIN QUERY PLAN */







|

|
|
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|







161238
161239
161240
161241
161242
161243
161244
161245
161246
161247
161248
161249
161250
161251
161252
161253
161254
161255
161256
161257
161258
161259
161260
161261
161262
161263
161264
161265
161266
161267
161268
161269
161270
161271
161272
161273
161274
161275
161276
161277
161278
161279
161280
161281
161282
161283
161284
161285
161286
161287
161288
161289
161290
161291
161292
161293
161294
161295
161296
161297
161298
161299
161300
161301
161302
161303
161304
161305
161306
161307
161308
161309
161310
161311
161312
161313
161314
161315
161316
161317
161318
161319
161320
161321
161322
161323
161324
161325
161326
161327
161328
161329
161330
161331
161332
161333
161334
161335
161336
161337
161338
161339
161340
161341
161342
161343
161344
161345
161346
161347
161348
161349
161350
161351
161352
161353
161354
161355
161356
161357
161358
161359
161360
161361
161362
161363
161364
161365
161366
161367
161368
161369
161370
161371
161372
161373
161374
161375
161376
161377
161378
161379
161380
161381
161382
161383
161384
161385
161386
161387
161388
161389
161390
161391
161392
161393
161394
161395
161396
161397
161398
161399
161400
161401
161402
161403
161404
161405
161406
161407
161408
161409
161410
161411
161412
161413
161414
161415
161416
161417
161418
161419
161420
161421
161422
161423
161424
161425
161426
161427
161428
161429
161430
161431
161432
161433
161434
161435
161436
161437
161438
161439
161440
161441
161442
161443
161444
161445
161446
161447
161448
161449
161450
161451
161452
161453
161454
161455
161456
161457
161458
161459
161460
161461
161462
161463
161464
161465
161466
161467
161468
161469
161470
161471
161472
161473
161474
161475
161476
161477
161478
161479
161480
161481
161482
161483
161484
161485
161486
161487
161488
161489
161490
161491
161492
161493
161494
161495
161496
161497
161498
161499
161500
161501
161502
161503
161504
161505
161506
161507
161508
161509
161510
161511
161512
161513
161514
161515
161516
161517
161518
161519
161520
161521
161522
161523
161524
161525
161526
161527
161528
161529
161530
161531
161532
161533
161534
161535
161536
161537
161538
161539
161540
161541
161542
161543
161544
161545
161546
161547
161548
161549
161550
161551
161552
161553
161554
161555
161556
161557
161558
161559
161560
161561
161562
161563
161564
161565
161566
161567
161568
161569
161570
161571
161572
161573
161574
161575
161576
161577
161578
161579
161580
161581
161582
161583
161584
161585
161586
161587
161588
161589
161590
161591
161592
161593
161594
161595
161596
161597
161598
161599
161600
161601
161602
161603
161604
161605
161606
161607
161608
161609
161610
161611
161612
161613
161614
161615
161616
161617
161618
161619
161620
161621
161622
161623
161624
161625
161626
161627
161628
161629
161630
161631
161632
161633
   189,  /* (12) cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
   194,  /* (13) create_table ::= createkw temp TABLE ifnotexists nm dbnm */
   196,  /* (14) createkw ::= CREATE */
   198,  /* (15) ifnotexists ::= */
   198,  /* (16) ifnotexists ::= IF NOT EXISTS */
   197,  /* (17) temp ::= TEMP */
   197,  /* (18) temp ::= */
   195,  /* (19) create_table_args ::= LP columnlist conslist_opt RP table_option_set */
   195,  /* (20) create_table_args ::= AS select */
   202,  /* (21) table_option_set ::= */
   202,  /* (22) table_option_set ::= table_option_set COMMA table_option */
   204,  /* (23) table_option ::= WITHOUT nm */
   204,  /* (24) table_option ::= nm */
   205,  /* (25) columnname ::= nm typetoken */
   207,  /* (26) typetoken ::= */
   207,  /* (27) typetoken ::= typename LP signed RP */
   207,  /* (28) typetoken ::= typename LP signed COMMA signed RP */
   208,  /* (29) typename ::= typename ID|STRING */
   212,  /* (30) scanpt ::= */
   213,  /* (31) scantok ::= */
   214,  /* (32) ccons ::= CONSTRAINT nm */
   214,  /* (33) ccons ::= DEFAULT scantok term */
   214,  /* (34) ccons ::= DEFAULT LP expr RP */
   214,  /* (35) ccons ::= DEFAULT PLUS scantok term */
   214,  /* (36) ccons ::= DEFAULT MINUS scantok term */
   214,  /* (37) ccons ::= DEFAULT scantok ID|INDEXED */
   214,  /* (38) ccons ::= NOT NULL onconf */
   214,  /* (39) ccons ::= PRIMARY KEY sortorder onconf autoinc */
   214,  /* (40) ccons ::= UNIQUE onconf */
   214,  /* (41) ccons ::= CHECK LP expr RP */
   214,  /* (42) ccons ::= REFERENCES nm eidlist_opt refargs */
   214,  /* (43) ccons ::= defer_subclause */
   214,  /* (44) ccons ::= COLLATE ID|STRING */
   223,  /* (45) generated ::= LP expr RP */
   223,  /* (46) generated ::= LP expr RP ID */
   219,  /* (47) autoinc ::= */
   219,  /* (48) autoinc ::= AUTOINCR */
   221,  /* (49) refargs ::= */
   221,  /* (50) refargs ::= refargs refarg */
   224,  /* (51) refarg ::= MATCH nm */
   224,  /* (52) refarg ::= ON INSERT refact */
   224,  /* (53) refarg ::= ON DELETE refact */
   224,  /* (54) refarg ::= ON UPDATE refact */
   225,  /* (55) refact ::= SET NULL */
   225,  /* (56) refact ::= SET DEFAULT */
   225,  /* (57) refact ::= CASCADE */
   225,  /* (58) refact ::= RESTRICT */
   225,  /* (59) refact ::= NO ACTION */
   222,  /* (60) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
   222,  /* (61) defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
   226,  /* (62) init_deferred_pred_opt ::= */
   226,  /* (63) init_deferred_pred_opt ::= INITIALLY DEFERRED */
   226,  /* (64) init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
   201,  /* (65) conslist_opt ::= */
   228,  /* (66) tconscomma ::= COMMA */
   229,  /* (67) tcons ::= CONSTRAINT nm */
   229,  /* (68) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
   229,  /* (69) tcons ::= UNIQUE LP sortlist RP onconf */
   229,  /* (70) tcons ::= CHECK LP expr RP onconf */
   229,  /* (71) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
   232,  /* (72) defer_subclause_opt ::= */
   217,  /* (73) onconf ::= */
   217,  /* (74) onconf ::= ON CONFLICT resolvetype */
   233,  /* (75) orconf ::= */
   233,  /* (76) orconf ::= OR resolvetype */
   234,  /* (77) resolvetype ::= IGNORE */
   234,  /* (78) resolvetype ::= REPLACE */
   189,  /* (79) cmd ::= DROP TABLE ifexists fullname */
   236,  /* (80) ifexists ::= IF EXISTS */
   236,  /* (81) ifexists ::= */
   189,  /* (82) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
   189,  /* (83) cmd ::= DROP VIEW ifexists fullname */
   189,  /* (84) cmd ::= select */
   203,  /* (85) select ::= WITH wqlist selectnowith */
   203,  /* (86) select ::= WITH RECURSIVE wqlist selectnowith */
   203,  /* (87) select ::= selectnowith */
   238,  /* (88) selectnowith ::= selectnowith multiselect_op oneselect */
   241,  /* (89) multiselect_op ::= UNION */
   241,  /* (90) multiselect_op ::= UNION ALL */
   241,  /* (91) multiselect_op ::= EXCEPT|INTERSECT */
   239,  /* (92) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
   239,  /* (93) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
   251,  /* (94) values ::= VALUES LP nexprlist RP */
   251,  /* (95) values ::= values COMMA LP nexprlist RP */
   242,  /* (96) distinct ::= DISTINCT */
   242,  /* (97) distinct ::= ALL */
   242,  /* (98) distinct ::= */
   253,  /* (99) sclp ::= */
   243,  /* (100) selcollist ::= sclp scanpt expr scanpt as */
   243,  /* (101) selcollist ::= sclp scanpt STAR */
   243,  /* (102) selcollist ::= sclp scanpt nm DOT STAR */
   254,  /* (103) as ::= AS nm */
   254,  /* (104) as ::= */
   244,  /* (105) from ::= */
   244,  /* (106) from ::= FROM seltablist */
   256,  /* (107) stl_prefix ::= seltablist joinop */
   256,  /* (108) stl_prefix ::= */
   255,  /* (109) seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
   255,  /* (110) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */
   255,  /* (111) seltablist ::= stl_prefix LP select RP as on_opt using_opt */
   255,  /* (112) seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
   199,  /* (113) dbnm ::= */
   199,  /* (114) dbnm ::= DOT nm */
   237,  /* (115) fullname ::= nm */
   237,  /* (116) fullname ::= nm DOT nm */
   262,  /* (117) xfullname ::= nm */
   262,  /* (118) xfullname ::= nm DOT nm */
   262,  /* (119) xfullname ::= nm DOT nm AS nm */
   262,  /* (120) xfullname ::= nm AS nm */
   257,  /* (121) joinop ::= COMMA|JOIN */
   257,  /* (122) joinop ::= JOIN_KW JOIN */
   257,  /* (123) joinop ::= JOIN_KW nm JOIN */
   257,  /* (124) joinop ::= JOIN_KW nm nm JOIN */
   259,  /* (125) on_opt ::= ON expr */
   259,  /* (126) on_opt ::= */
   258,  /* (127) indexed_opt ::= */
   258,  /* (128) indexed_opt ::= INDEXED BY nm */
   258,  /* (129) indexed_opt ::= NOT INDEXED */
   260,  /* (130) using_opt ::= USING LP idlist RP */
   260,  /* (131) using_opt ::= */
   248,  /* (132) orderby_opt ::= */
   248,  /* (133) orderby_opt ::= ORDER BY sortlist */
   230,  /* (134) sortlist ::= sortlist COMMA expr sortorder nulls */
   230,  /* (135) sortlist ::= expr sortorder nulls */
   218,  /* (136) sortorder ::= ASC */
   218,  /* (137) sortorder ::= DESC */
   218,  /* (138) sortorder ::= */
   264,  /* (139) nulls ::= NULLS FIRST */
   264,  /* (140) nulls ::= NULLS LAST */
   264,  /* (141) nulls ::= */
   246,  /* (142) groupby_opt ::= */
   246,  /* (143) groupby_opt ::= GROUP BY nexprlist */
   247,  /* (144) having_opt ::= */
   247,  /* (145) having_opt ::= HAVING expr */
   249,  /* (146) limit_opt ::= */
   249,  /* (147) limit_opt ::= LIMIT expr */
   249,  /* (148) limit_opt ::= LIMIT expr OFFSET expr */
   249,  /* (149) limit_opt ::= LIMIT expr COMMA expr */
   189,  /* (150) cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */
   245,  /* (151) where_opt ::= */
   245,  /* (152) where_opt ::= WHERE expr */
   266,  /* (153) where_opt_ret ::= */
   266,  /* (154) where_opt_ret ::= WHERE expr */
   266,  /* (155) where_opt_ret ::= RETURNING selcollist */
   266,  /* (156) where_opt_ret ::= WHERE expr RETURNING selcollist */
   189,  /* (157) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */
   267,  /* (158) setlist ::= setlist COMMA nm EQ expr */
   267,  /* (159) setlist ::= setlist COMMA LP idlist RP EQ expr */
   267,  /* (160) setlist ::= nm EQ expr */
   267,  /* (161) setlist ::= LP idlist RP EQ expr */
   189,  /* (162) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
   189,  /* (163) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */
   270,  /* (164) upsert ::= */
   270,  /* (165) upsert ::= RETURNING selcollist */
   270,  /* (166) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */
   270,  /* (167) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */
   270,  /* (168) upsert ::= ON CONFLICT DO NOTHING returning */
   270,  /* (169) upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */
   271,  /* (170) returning ::= RETURNING selcollist */
   268,  /* (171) insert_cmd ::= INSERT orconf */
   268,  /* (172) insert_cmd ::= REPLACE */
   269,  /* (173) idlist_opt ::= */
   269,  /* (174) idlist_opt ::= LP idlist RP */
   263,  /* (175) idlist ::= idlist COMMA nm */
   263,  /* (176) idlist ::= nm */
   216,  /* (177) expr ::= LP expr RP */
   216,  /* (178) expr ::= ID|INDEXED */
   216,  /* (179) expr ::= JOIN_KW */
   216,  /* (180) expr ::= nm DOT nm */
   216,  /* (181) expr ::= nm DOT nm DOT nm */
   215,  /* (182) term ::= NULL|FLOAT|BLOB */
   215,  /* (183) term ::= STRING */
   215,  /* (184) term ::= INTEGER */
   216,  /* (185) expr ::= VARIABLE */
   216,  /* (186) expr ::= expr COLLATE ID|STRING */
   216,  /* (187) expr ::= CAST LP expr AS typetoken RP */
   216,  /* (188) expr ::= ID|INDEXED LP distinct exprlist RP */
   216,  /* (189) expr ::= ID|INDEXED LP STAR RP */
   216,  /* (190) expr ::= ID|INDEXED LP distinct exprlist RP filter_over */
   216,  /* (191) expr ::= ID|INDEXED LP STAR RP filter_over */
   215,  /* (192) term ::= CTIME_KW */
   216,  /* (193) expr ::= LP nexprlist COMMA expr RP */
   216,  /* (194) expr ::= expr AND expr */
   216,  /* (195) expr ::= expr OR expr */
   216,  /* (196) expr ::= expr LT|GT|GE|LE expr */
   216,  /* (197) expr ::= expr EQ|NE expr */
   216,  /* (198) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */
   216,  /* (199) expr ::= expr PLUS|MINUS expr */
   216,  /* (200) expr ::= expr STAR|SLASH|REM expr */
   216,  /* (201) expr ::= expr CONCAT expr */
   273,  /* (202) likeop ::= NOT LIKE_KW|MATCH */
   216,  /* (203) expr ::= expr likeop expr */
   216,  /* (204) expr ::= expr likeop expr ESCAPE expr */
   216,  /* (205) expr ::= expr ISNULL|NOTNULL */
   216,  /* (206) expr ::= expr NOT NULL */
   216,  /* (207) expr ::= expr IS expr */
   216,  /* (208) expr ::= expr IS NOT expr */
   216,  /* (209) expr ::= NOT expr */
   216,  /* (210) expr ::= BITNOT expr */
   216,  /* (211) expr ::= PLUS|MINUS expr */
   274,  /* (212) between_op ::= BETWEEN */
   274,  /* (213) between_op ::= NOT BETWEEN */
   216,  /* (214) expr ::= expr between_op expr AND expr */
   275,  /* (215) in_op ::= IN */
   275,  /* (216) in_op ::= NOT IN */
   216,  /* (217) expr ::= expr in_op LP exprlist RP */
   216,  /* (218) expr ::= LP select RP */
   216,  /* (219) expr ::= expr in_op LP select RP */
   216,  /* (220) expr ::= expr in_op nm dbnm paren_exprlist */
   216,  /* (221) expr ::= EXISTS LP select RP */
   216,  /* (222) expr ::= CASE case_operand case_exprlist case_else END */
   278,  /* (223) case_exprlist ::= case_exprlist WHEN expr THEN expr */
   278,  /* (224) case_exprlist ::= WHEN expr THEN expr */
   279,  /* (225) case_else ::= ELSE expr */
   279,  /* (226) case_else ::= */
   277,  /* (227) case_operand ::= expr */
   277,  /* (228) case_operand ::= */
   261,  /* (229) exprlist ::= */
   252,  /* (230) nexprlist ::= nexprlist COMMA expr */
   252,  /* (231) nexprlist ::= expr */
   276,  /* (232) paren_exprlist ::= */
   276,  /* (233) paren_exprlist ::= LP exprlist RP */
   189,  /* (234) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
   280,  /* (235) uniqueflag ::= UNIQUE */
   280,  /* (236) uniqueflag ::= */
   220,  /* (237) eidlist_opt ::= */
   220,  /* (238) eidlist_opt ::= LP eidlist RP */
   231,  /* (239) eidlist ::= eidlist COMMA nm collate sortorder */
   231,  /* (240) eidlist ::= nm collate sortorder */
   281,  /* (241) collate ::= */
   281,  /* (242) collate ::= COLLATE ID|STRING */
   189,  /* (243) cmd ::= DROP INDEX ifexists fullname */
   189,  /* (244) cmd ::= VACUUM vinto */
   189,  /* (245) cmd ::= VACUUM nm vinto */
   282,  /* (246) vinto ::= INTO expr */
   282,  /* (247) vinto ::= */
   189,  /* (248) cmd ::= PRAGMA nm dbnm */
   189,  /* (249) cmd ::= PRAGMA nm dbnm EQ nmnum */
   189,  /* (250) cmd ::= PRAGMA nm dbnm LP nmnum RP */
   189,  /* (251) cmd ::= PRAGMA nm dbnm EQ minus_num */
   189,  /* (252) cmd ::= PRAGMA nm dbnm LP minus_num RP */
   210,  /* (253) plus_num ::= PLUS INTEGER|FLOAT */
   211,  /* (254) minus_num ::= MINUS INTEGER|FLOAT */
   189,  /* (255) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
   284,  /* (256) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
   286,  /* (257) trigger_time ::= BEFORE|AFTER */
   286,  /* (258) trigger_time ::= INSTEAD OF */
   286,  /* (259) trigger_time ::= */
   287,  /* (260) trigger_event ::= DELETE|INSERT */
   287,  /* (261) trigger_event ::= UPDATE */
   287,  /* (262) trigger_event ::= UPDATE OF idlist */
   289,  /* (263) when_clause ::= */
   289,  /* (264) when_clause ::= WHEN expr */
   285,  /* (265) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
   285,  /* (266) trigger_cmd_list ::= trigger_cmd SEMI */
   291,  /* (267) trnm ::= nm DOT nm */
   292,  /* (268) tridxby ::= INDEXED BY nm */
   292,  /* (269) tridxby ::= NOT INDEXED */
   290,  /* (270) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */
   290,  /* (271) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
   290,  /* (272) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
   290,  /* (273) trigger_cmd ::= scanpt select scanpt */
   216,  /* (274) expr ::= RAISE LP IGNORE RP */
   216,  /* (275) expr ::= RAISE LP raisetype COMMA nm RP */
   235,  /* (276) raisetype ::= ROLLBACK */
   235,  /* (277) raisetype ::= ABORT */
   235,  /* (278) raisetype ::= FAIL */
   189,  /* (279) cmd ::= DROP TRIGGER ifexists fullname */
   189,  /* (280) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
   189,  /* (281) cmd ::= DETACH database_kw_opt expr */
   294,  /* (282) key_opt ::= */
   294,  /* (283) key_opt ::= KEY expr */
   189,  /* (284) cmd ::= REINDEX */
   189,  /* (285) cmd ::= REINDEX nm dbnm */
   189,  /* (286) cmd ::= ANALYZE */
   189,  /* (287) cmd ::= ANALYZE nm dbnm */
   189,  /* (288) cmd ::= ALTER TABLE fullname RENAME TO nm */
   189,  /* (289) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
   189,  /* (290) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
   295,  /* (291) add_column_fullname ::= fullname */
   189,  /* (292) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
   189,  /* (293) cmd ::= create_vtab */
   189,  /* (294) cmd ::= create_vtab LP vtabarglist RP */
   297,  /* (295) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
   299,  /* (296) vtabarg ::= */
   300,  /* (297) vtabargtoken ::= ANY */
   300,  /* (298) vtabargtoken ::= lp anylist RP */
   301,  /* (299) lp ::= LP */
   265,  /* (300) with ::= WITH wqlist */
   265,  /* (301) with ::= WITH RECURSIVE wqlist */
   304,  /* (302) wqas ::= AS */
   304,  /* (303) wqas ::= AS MATERIALIZED */
   304,  /* (304) wqas ::= AS NOT MATERIALIZED */
   303,  /* (305) wqitem ::= nm eidlist_opt wqas LP select RP */
   240,  /* (306) wqlist ::= wqitem */
   240,  /* (307) wqlist ::= wqlist COMMA wqitem */
   305,  /* (308) windowdefn_list ::= windowdefn */
   305,  /* (309) windowdefn_list ::= windowdefn_list COMMA windowdefn */
   306,  /* (310) windowdefn ::= nm AS LP window RP */
   307,  /* (311) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
   307,  /* (312) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
   307,  /* (313) window ::= ORDER BY sortlist frame_opt */
   307,  /* (314) window ::= nm ORDER BY sortlist frame_opt */
   307,  /* (315) window ::= frame_opt */
   307,  /* (316) window ::= nm frame_opt */
   308,  /* (317) frame_opt ::= */
   308,  /* (318) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
   308,  /* (319) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
   312,  /* (320) range_or_rows ::= RANGE|ROWS|GROUPS */
   314,  /* (321) frame_bound_s ::= frame_bound */
   314,  /* (322) frame_bound_s ::= UNBOUNDED PRECEDING */
   315,  /* (323) frame_bound_e ::= frame_bound */
   315,  /* (324) frame_bound_e ::= UNBOUNDED FOLLOWING */
   313,  /* (325) frame_bound ::= expr PRECEDING|FOLLOWING */
   313,  /* (326) frame_bound ::= CURRENT ROW */
   316,  /* (327) frame_exclude_opt ::= */
   316,  /* (328) frame_exclude_opt ::= EXCLUDE frame_exclude */
   317,  /* (329) frame_exclude ::= NO OTHERS */
   317,  /* (330) frame_exclude ::= CURRENT ROW */
   317,  /* (331) frame_exclude ::= GROUP|TIES */
   250,  /* (332) window_clause ::= WINDOW windowdefn_list */
   272,  /* (333) filter_over ::= filter_clause over_clause */
   272,  /* (334) filter_over ::= over_clause */
   272,  /* (335) filter_over ::= filter_clause */
   311,  /* (336) over_clause ::= OVER LP window RP */
   311,  /* (337) over_clause ::= OVER nm */
   310,  /* (338) filter_clause ::= FILTER LP WHERE expr RP */
   184,  /* (339) input ::= cmdlist */
   185,  /* (340) cmdlist ::= cmdlist ecmd */
   185,  /* (341) cmdlist ::= ecmd */
   186,  /* (342) ecmd ::= SEMI */
   186,  /* (343) ecmd ::= cmdx SEMI */
   186,  /* (344) ecmd ::= explain cmdx SEMI */
   191,  /* (345) trans_opt ::= */
   191,  /* (346) trans_opt ::= TRANSACTION */
   191,  /* (347) trans_opt ::= TRANSACTION nm */
   193,  /* (348) savepoint_opt ::= SAVEPOINT */
   193,  /* (349) savepoint_opt ::= */
   189,  /* (350) cmd ::= create_table create_table_args */
   202,  /* (351) table_option_set ::= table_option */
   200,  /* (352) columnlist ::= columnlist COMMA columnname carglist */
   200,  /* (353) columnlist ::= columnname carglist */
   192,  /* (354) nm ::= ID|INDEXED */
   192,  /* (355) nm ::= STRING */
   192,  /* (356) nm ::= JOIN_KW */
   207,  /* (357) typetoken ::= typename */
   208,  /* (358) typename ::= ID|STRING */
   209,  /* (359) signed ::= plus_num */
   209,  /* (360) signed ::= minus_num */
   206,  /* (361) carglist ::= carglist ccons */
   206,  /* (362) carglist ::= */
   214,  /* (363) ccons ::= NULL onconf */
   214,  /* (364) ccons ::= GENERATED ALWAYS AS generated */
   214,  /* (365) ccons ::= AS generated */
   201,  /* (366) conslist_opt ::= COMMA conslist */
   227,  /* (367) conslist ::= conslist tconscomma tcons */
   227,  /* (368) conslist ::= tcons */
   228,  /* (369) tconscomma ::= */
   232,  /* (370) defer_subclause_opt ::= defer_subclause */
   234,  /* (371) resolvetype ::= raisetype */
   238,  /* (372) selectnowith ::= oneselect */
   239,  /* (373) oneselect ::= values */
   253,  /* (374) sclp ::= selcollist COMMA */
   254,  /* (375) as ::= ID|STRING */
   271,  /* (376) returning ::= */
   216,  /* (377) expr ::= term */
   273,  /* (378) likeop ::= LIKE_KW|MATCH */
   261,  /* (379) exprlist ::= nexprlist */
   283,  /* (380) nmnum ::= plus_num */
   283,  /* (381) nmnum ::= nm */
   283,  /* (382) nmnum ::= ON */
   283,  /* (383) nmnum ::= DELETE */
   283,  /* (384) nmnum ::= DEFAULT */
   210,  /* (385) plus_num ::= INTEGER|FLOAT */
   288,  /* (386) foreach_clause ::= */
   288,  /* (387) foreach_clause ::= FOR EACH ROW */
   291,  /* (388) trnm ::= nm */
   292,  /* (389) tridxby ::= */
   293,  /* (390) database_kw_opt ::= DATABASE */
   293,  /* (391) database_kw_opt ::= */
   296,  /* (392) kwcolumn_opt ::= */
   296,  /* (393) kwcolumn_opt ::= COLUMNKW */
   298,  /* (394) vtabarglist ::= vtabarg */
   298,  /* (395) vtabarglist ::= vtabarglist COMMA vtabarg */
   299,  /* (396) vtabarg ::= vtabarg vtabargtoken */
   302,  /* (397) anylist ::= */
   302,  /* (398) anylist ::= anylist LP anylist RP */
   302,  /* (399) anylist ::= anylist ANY */
   265,  /* (400) with ::= */
};

/* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
** of symbols on the right-hand side of that rule. */
static const signed char yyRuleInfoNRhs[] = {
   -1,  /* (0) explain ::= EXPLAIN */
   -3,  /* (1) explain ::= EXPLAIN QUERY PLAN */
161344
161345
161346
161347
161348
161349
161350
161351
161352
161353
161354


161355
161356
161357
161358
161359
161360
161361
161362
161363
161364
161365
161366
161367
161368
161369
161370
161371
161372
161373
161374
161375
161376
161377
161378
161379
161380
161381
161382
161383
161384
161385
161386
161387
161388
161389
161390
161391
161392
161393
161394
161395
161396
161397
161398
161399
161400
161401
161402
161403
161404
161405
161406
161407
161408
161409
161410
161411
161412
161413
161414
161415
161416
161417
161418
161419
161420
161421
161422
161423
161424
161425
161426
161427
161428
161429
161430
161431
161432
161433
161434
161435
161436
161437
161438
161439
161440
161441
161442
161443
161444
161445
161446
161447
161448
161449
161450
161451
161452
161453
161454
161455
161456
161457
161458
161459
161460
161461
161462
161463
161464
161465
161466
161467
161468
161469
161470
161471
161472
161473
161474
161475
161476
161477
161478
161479
161480
161481
161482
161483
161484
161485
161486
161487
161488
161489
161490
161491
161492
161493
161494
161495
161496
161497
161498
161499
161500
161501
161502
161503
161504
161505
161506
161507
161508
161509
161510
161511
161512
161513
161514
161515
161516
161517
161518
161519
161520
161521
161522
161523
161524
161525
161526
161527
161528
161529
161530
161531
161532
161533
161534
161535
161536
161537
161538
161539
161540
161541
161542
161543
161544
161545
161546
161547
161548
161549
161550
161551
161552
161553
161554
161555
161556
161557
161558
161559
161560
161561
161562
161563
161564
161565
161566
161567
161568
161569
161570
161571
161572
161573
161574
161575
161576
161577
161578
161579
161580
161581
161582
161583
161584
161585
161586
161587
161588
161589
161590
161591
161592
161593
161594
161595
161596
161597
161598
161599
161600
161601
161602
161603
161604
161605
161606
161607
161608
161609
161610
161611
161612
161613
161614
161615
161616
161617
161618
161619
161620
161621
161622
161623
161624
161625
161626
161627
161628
161629
161630
161631
161632
161633
161634
161635
161636
161637
161638
161639
161640
161641
161642
161643
161644
161645
161646
161647
161648
161649
161650
161651
161652
161653
161654
161655
161656
161657
161658
161659
161660
161661
161662
161663
161664
161665
161666
161667
161668
161669
161670
161671
161672
161673
161674
161675
161676
161677
161678
161679
161680

161681
161682
161683
161684
161685
161686
161687
161688
161689
161690
161691
161692
161693
161694
161695
161696
161697
161698
161699
161700
161701
161702
161703
161704
161705
161706
161707
161708
161709
161710
161711
161712
161713
161714
161715
161716
161717
161718
161719
161720
161721
161722
161723
161724
161725
161726
161727
161728
161729
161730
161731
161732
161733
161734
161735
161736
   -5,  /* (12) cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
   -6,  /* (13) create_table ::= createkw temp TABLE ifnotexists nm dbnm */
   -1,  /* (14) createkw ::= CREATE */
    0,  /* (15) ifnotexists ::= */
   -3,  /* (16) ifnotexists ::= IF NOT EXISTS */
   -1,  /* (17) temp ::= TEMP */
    0,  /* (18) temp ::= */
   -5,  /* (19) create_table_args ::= LP columnlist conslist_opt RP table_options */
   -2,  /* (20) create_table_args ::= AS select */
    0,  /* (21) table_options ::= */
   -2,  /* (22) table_options ::= WITHOUT nm */


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

   -4,  /* (349) columnlist ::= columnlist COMMA columnname carglist */
   -2,  /* (350) columnlist ::= columnname carglist */
   -1,  /* (351) nm ::= ID|INDEXED */
   -1,  /* (352) nm ::= STRING */
   -1,  /* (353) nm ::= JOIN_KW */
   -1,  /* (354) typetoken ::= typename */
   -1,  /* (355) typename ::= ID|STRING */
   -1,  /* (356) signed ::= plus_num */
   -1,  /* (357) signed ::= minus_num */
   -2,  /* (358) carglist ::= carglist ccons */
    0,  /* (359) carglist ::= */
   -2,  /* (360) ccons ::= NULL onconf */
   -4,  /* (361) ccons ::= GENERATED ALWAYS AS generated */
   -2,  /* (362) ccons ::= AS generated */
   -2,  /* (363) conslist_opt ::= COMMA conslist */
   -3,  /* (364) conslist ::= conslist tconscomma tcons */
   -1,  /* (365) conslist ::= tcons */
    0,  /* (366) tconscomma ::= */
   -1,  /* (367) defer_subclause_opt ::= defer_subclause */
   -1,  /* (368) resolvetype ::= raisetype */
   -1,  /* (369) selectnowith ::= oneselect */
   -1,  /* (370) oneselect ::= values */
   -2,  /* (371) sclp ::= selcollist COMMA */
   -1,  /* (372) as ::= ID|STRING */
    0,  /* (373) returning ::= */
   -1,  /* (374) expr ::= term */
   -1,  /* (375) likeop ::= LIKE_KW|MATCH */
   -1,  /* (376) exprlist ::= nexprlist */
   -1,  /* (377) nmnum ::= plus_num */
   -1,  /* (378) nmnum ::= nm */
   -1,  /* (379) nmnum ::= ON */
   -1,  /* (380) nmnum ::= DELETE */
   -1,  /* (381) nmnum ::= DEFAULT */
   -1,  /* (382) plus_num ::= INTEGER|FLOAT */
    0,  /* (383) foreach_clause ::= */
   -3,  /* (384) foreach_clause ::= FOR EACH ROW */
   -1,  /* (385) trnm ::= nm */
    0,  /* (386) tridxby ::= */
   -1,  /* (387) database_kw_opt ::= DATABASE */
    0,  /* (388) database_kw_opt ::= */
    0,  /* (389) kwcolumn_opt ::= */
   -1,  /* (390) kwcolumn_opt ::= COLUMNKW */
   -1,  /* (391) vtabarglist ::= vtabarg */
   -3,  /* (392) vtabarglist ::= vtabarglist COMMA vtabarg */
   -2,  /* (393) vtabarg ::= vtabarg vtabargtoken */
    0,  /* (394) anylist ::= */
   -4,  /* (395) anylist ::= anylist LP anylist RP */
   -2,  /* (396) anylist ::= anylist ANY */
    0,  /* (397) with ::= */
};

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

/*
** Perform a reduce action and the shift that must immediately
** follow the reduce.







|

|
|
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|







161644
161645
161646
161647
161648
161649
161650
161651
161652
161653
161654
161655
161656
161657
161658
161659
161660
161661
161662
161663
161664
161665
161666
161667
161668
161669
161670
161671
161672
161673
161674
161675
161676
161677
161678
161679
161680
161681
161682
161683
161684
161685
161686
161687
161688
161689
161690
161691
161692
161693
161694
161695
161696
161697
161698
161699
161700
161701
161702
161703
161704
161705
161706
161707
161708
161709
161710
161711
161712
161713
161714
161715
161716
161717
161718
161719
161720
161721
161722
161723
161724
161725
161726
161727
161728
161729
161730
161731
161732
161733
161734
161735
161736
161737
161738
161739
161740
161741
161742
161743
161744
161745
161746
161747
161748
161749
161750
161751
161752
161753
161754
161755
161756
161757
161758
161759
161760
161761
161762
161763
161764
161765
161766
161767
161768
161769
161770
161771
161772
161773
161774
161775
161776
161777
161778
161779
161780
161781
161782
161783
161784
161785
161786
161787
161788
161789
161790
161791
161792
161793
161794
161795
161796
161797
161798
161799
161800
161801
161802
161803
161804
161805
161806
161807
161808
161809
161810
161811
161812
161813
161814
161815
161816
161817
161818
161819
161820
161821
161822
161823
161824
161825
161826
161827
161828
161829
161830
161831
161832
161833
161834
161835
161836
161837
161838
161839
161840
161841
161842
161843
161844
161845
161846
161847
161848
161849
161850
161851
161852
161853
161854
161855
161856
161857
161858
161859
161860
161861
161862
161863
161864
161865
161866
161867
161868
161869
161870
161871
161872
161873
161874
161875
161876
161877
161878
161879
161880
161881
161882
161883
161884
161885
161886
161887
161888
161889
161890
161891
161892
161893
161894
161895
161896
161897
161898
161899
161900
161901
161902
161903
161904
161905
161906
161907
161908
161909
161910
161911
161912
161913
161914
161915
161916
161917
161918
161919
161920
161921
161922
161923
161924
161925
161926
161927
161928
161929
161930
161931
161932
161933
161934
161935
161936
161937
161938
161939
161940
161941
161942
161943
161944
161945
161946
161947
161948
161949
161950
161951
161952
161953
161954
161955
161956
161957
161958
161959
161960
161961
161962
161963
161964
161965
161966
161967
161968
161969
161970
161971
161972
161973
161974
161975
161976
161977
161978
161979
161980
161981
161982
161983
161984
161985
161986
161987
161988
161989
161990
161991
161992
161993
161994
161995
161996
161997
161998
161999
162000
162001
162002
162003
162004
162005
162006
162007
162008
162009
162010
162011
162012
162013
162014
162015
162016
162017
162018
162019
162020
162021
162022
162023
162024
162025
162026
162027
162028
162029
162030
162031
162032
162033
162034
162035
162036
162037
162038
162039
   -5,  /* (12) cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
   -6,  /* (13) create_table ::= createkw temp TABLE ifnotexists nm dbnm */
   -1,  /* (14) createkw ::= CREATE */
    0,  /* (15) ifnotexists ::= */
   -3,  /* (16) ifnotexists ::= IF NOT EXISTS */
   -1,  /* (17) temp ::= TEMP */
    0,  /* (18) temp ::= */
   -5,  /* (19) create_table_args ::= LP columnlist conslist_opt RP table_option_set */
   -2,  /* (20) create_table_args ::= AS select */
    0,  /* (21) table_option_set ::= */
   -3,  /* (22) table_option_set ::= table_option_set COMMA table_option */
   -2,  /* (23) table_option ::= WITHOUT nm */
   -1,  /* (24) table_option ::= nm */
   -2,  /* (25) columnname ::= nm typetoken */
    0,  /* (26) typetoken ::= */
   -4,  /* (27) typetoken ::= typename LP signed RP */
   -6,  /* (28) typetoken ::= typename LP signed COMMA signed RP */
   -2,  /* (29) typename ::= typename ID|STRING */
    0,  /* (30) scanpt ::= */
    0,  /* (31) scantok ::= */
   -2,  /* (32) ccons ::= CONSTRAINT nm */
   -3,  /* (33) ccons ::= DEFAULT scantok term */
   -4,  /* (34) ccons ::= DEFAULT LP expr RP */
   -4,  /* (35) ccons ::= DEFAULT PLUS scantok term */
   -4,  /* (36) ccons ::= DEFAULT MINUS scantok term */
   -3,  /* (37) ccons ::= DEFAULT scantok ID|INDEXED */
   -3,  /* (38) ccons ::= NOT NULL onconf */
   -5,  /* (39) ccons ::= PRIMARY KEY sortorder onconf autoinc */
   -2,  /* (40) ccons ::= UNIQUE onconf */
   -4,  /* (41) ccons ::= CHECK LP expr RP */
   -4,  /* (42) ccons ::= REFERENCES nm eidlist_opt refargs */
   -1,  /* (43) ccons ::= defer_subclause */
   -2,  /* (44) ccons ::= COLLATE ID|STRING */
   -3,  /* (45) generated ::= LP expr RP */
   -4,  /* (46) generated ::= LP expr RP ID */
    0,  /* (47) autoinc ::= */
   -1,  /* (48) autoinc ::= AUTOINCR */
    0,  /* (49) refargs ::= */
   -2,  /* (50) refargs ::= refargs refarg */
   -2,  /* (51) refarg ::= MATCH nm */
   -3,  /* (52) refarg ::= ON INSERT refact */
   -3,  /* (53) refarg ::= ON DELETE refact */
   -3,  /* (54) refarg ::= ON UPDATE refact */
   -2,  /* (55) refact ::= SET NULL */
   -2,  /* (56) refact ::= SET DEFAULT */
   -1,  /* (57) refact ::= CASCADE */
   -1,  /* (58) refact ::= RESTRICT */
   -2,  /* (59) refact ::= NO ACTION */
   -3,  /* (60) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
   -2,  /* (61) defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
    0,  /* (62) init_deferred_pred_opt ::= */
   -2,  /* (63) init_deferred_pred_opt ::= INITIALLY DEFERRED */
   -2,  /* (64) init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
    0,  /* (65) conslist_opt ::= */
   -1,  /* (66) tconscomma ::= COMMA */
   -2,  /* (67) tcons ::= CONSTRAINT nm */
   -7,  /* (68) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
   -5,  /* (69) tcons ::= UNIQUE LP sortlist RP onconf */
   -5,  /* (70) tcons ::= CHECK LP expr RP onconf */
  -10,  /* (71) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
    0,  /* (72) defer_subclause_opt ::= */
    0,  /* (73) onconf ::= */
   -3,  /* (74) onconf ::= ON CONFLICT resolvetype */
    0,  /* (75) orconf ::= */
   -2,  /* (76) orconf ::= OR resolvetype */
   -1,  /* (77) resolvetype ::= IGNORE */
   -1,  /* (78) resolvetype ::= REPLACE */
   -4,  /* (79) cmd ::= DROP TABLE ifexists fullname */
   -2,  /* (80) ifexists ::= IF EXISTS */
    0,  /* (81) ifexists ::= */
   -9,  /* (82) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
   -4,  /* (83) cmd ::= DROP VIEW ifexists fullname */
   -1,  /* (84) cmd ::= select */
   -3,  /* (85) select ::= WITH wqlist selectnowith */
   -4,  /* (86) select ::= WITH RECURSIVE wqlist selectnowith */
   -1,  /* (87) select ::= selectnowith */
   -3,  /* (88) selectnowith ::= selectnowith multiselect_op oneselect */
   -1,  /* (89) multiselect_op ::= UNION */
   -2,  /* (90) multiselect_op ::= UNION ALL */
   -1,  /* (91) multiselect_op ::= EXCEPT|INTERSECT */
   -9,  /* (92) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
  -10,  /* (93) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
   -4,  /* (94) values ::= VALUES LP nexprlist RP */
   -5,  /* (95) values ::= values COMMA LP nexprlist RP */
   -1,  /* (96) distinct ::= DISTINCT */
   -1,  /* (97) distinct ::= ALL */
    0,  /* (98) distinct ::= */
    0,  /* (99) sclp ::= */
   -5,  /* (100) selcollist ::= sclp scanpt expr scanpt as */
   -3,  /* (101) selcollist ::= sclp scanpt STAR */
   -5,  /* (102) selcollist ::= sclp scanpt nm DOT STAR */
   -2,  /* (103) as ::= AS nm */
    0,  /* (104) as ::= */
    0,  /* (105) from ::= */
   -2,  /* (106) from ::= FROM seltablist */
   -2,  /* (107) stl_prefix ::= seltablist joinop */
    0,  /* (108) stl_prefix ::= */
   -7,  /* (109) seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
   -9,  /* (110) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */
   -7,  /* (111) seltablist ::= stl_prefix LP select RP as on_opt using_opt */
   -7,  /* (112) seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
    0,  /* (113) dbnm ::= */
   -2,  /* (114) dbnm ::= DOT nm */
   -1,  /* (115) fullname ::= nm */
   -3,  /* (116) fullname ::= nm DOT nm */
   -1,  /* (117) xfullname ::= nm */
   -3,  /* (118) xfullname ::= nm DOT nm */
   -5,  /* (119) xfullname ::= nm DOT nm AS nm */
   -3,  /* (120) xfullname ::= nm AS nm */
   -1,  /* (121) joinop ::= COMMA|JOIN */
   -2,  /* (122) joinop ::= JOIN_KW JOIN */
   -3,  /* (123) joinop ::= JOIN_KW nm JOIN */
   -4,  /* (124) joinop ::= JOIN_KW nm nm JOIN */
   -2,  /* (125) on_opt ::= ON expr */
    0,  /* (126) on_opt ::= */
    0,  /* (127) indexed_opt ::= */
   -3,  /* (128) indexed_opt ::= INDEXED BY nm */
   -2,  /* (129) indexed_opt ::= NOT INDEXED */
   -4,  /* (130) using_opt ::= USING LP idlist RP */
    0,  /* (131) using_opt ::= */
    0,  /* (132) orderby_opt ::= */
   -3,  /* (133) orderby_opt ::= ORDER BY sortlist */
   -5,  /* (134) sortlist ::= sortlist COMMA expr sortorder nulls */
   -3,  /* (135) sortlist ::= expr sortorder nulls */
   -1,  /* (136) sortorder ::= ASC */
   -1,  /* (137) sortorder ::= DESC */
    0,  /* (138) sortorder ::= */
   -2,  /* (139) nulls ::= NULLS FIRST */
   -2,  /* (140) nulls ::= NULLS LAST */
    0,  /* (141) nulls ::= */
    0,  /* (142) groupby_opt ::= */
   -3,  /* (143) groupby_opt ::= GROUP BY nexprlist */
    0,  /* (144) having_opt ::= */
   -2,  /* (145) having_opt ::= HAVING expr */
    0,  /* (146) limit_opt ::= */
   -2,  /* (147) limit_opt ::= LIMIT expr */
   -4,  /* (148) limit_opt ::= LIMIT expr OFFSET expr */
   -4,  /* (149) limit_opt ::= LIMIT expr COMMA expr */
   -6,  /* (150) cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */
    0,  /* (151) where_opt ::= */
   -2,  /* (152) where_opt ::= WHERE expr */
    0,  /* (153) where_opt_ret ::= */
   -2,  /* (154) where_opt_ret ::= WHERE expr */
   -2,  /* (155) where_opt_ret ::= RETURNING selcollist */
   -4,  /* (156) where_opt_ret ::= WHERE expr RETURNING selcollist */
   -9,  /* (157) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */
   -5,  /* (158) setlist ::= setlist COMMA nm EQ expr */
   -7,  /* (159) setlist ::= setlist COMMA LP idlist RP EQ expr */
   -3,  /* (160) setlist ::= nm EQ expr */
   -5,  /* (161) setlist ::= LP idlist RP EQ expr */
   -7,  /* (162) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
   -8,  /* (163) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */
    0,  /* (164) upsert ::= */
   -2,  /* (165) upsert ::= RETURNING selcollist */
  -12,  /* (166) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */
   -9,  /* (167) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */
   -5,  /* (168) upsert ::= ON CONFLICT DO NOTHING returning */
   -8,  /* (169) upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */
   -2,  /* (170) returning ::= RETURNING selcollist */
   -2,  /* (171) insert_cmd ::= INSERT orconf */
   -1,  /* (172) insert_cmd ::= REPLACE */
    0,  /* (173) idlist_opt ::= */
   -3,  /* (174) idlist_opt ::= LP idlist RP */
   -3,  /* (175) idlist ::= idlist COMMA nm */
   -1,  /* (176) idlist ::= nm */
   -3,  /* (177) expr ::= LP expr RP */
   -1,  /* (178) expr ::= ID|INDEXED */
   -1,  /* (179) expr ::= JOIN_KW */
   -3,  /* (180) expr ::= nm DOT nm */
   -5,  /* (181) expr ::= nm DOT nm DOT nm */
   -1,  /* (182) term ::= NULL|FLOAT|BLOB */
   -1,  /* (183) term ::= STRING */
   -1,  /* (184) term ::= INTEGER */
   -1,  /* (185) expr ::= VARIABLE */
   -3,  /* (186) expr ::= expr COLLATE ID|STRING */
   -6,  /* (187) expr ::= CAST LP expr AS typetoken RP */
   -5,  /* (188) expr ::= ID|INDEXED LP distinct exprlist RP */
   -4,  /* (189) expr ::= ID|INDEXED LP STAR RP */
   -6,  /* (190) expr ::= ID|INDEXED LP distinct exprlist RP filter_over */
   -5,  /* (191) expr ::= ID|INDEXED LP STAR RP filter_over */
   -1,  /* (192) term ::= CTIME_KW */
   -5,  /* (193) expr ::= LP nexprlist COMMA expr RP */
   -3,  /* (194) expr ::= expr AND expr */
   -3,  /* (195) expr ::= expr OR expr */
   -3,  /* (196) expr ::= expr LT|GT|GE|LE expr */
   -3,  /* (197) expr ::= expr EQ|NE expr */
   -3,  /* (198) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */
   -3,  /* (199) expr ::= expr PLUS|MINUS expr */
   -3,  /* (200) expr ::= expr STAR|SLASH|REM expr */
   -3,  /* (201) expr ::= expr CONCAT expr */
   -2,  /* (202) likeop ::= NOT LIKE_KW|MATCH */
   -3,  /* (203) expr ::= expr likeop expr */
   -5,  /* (204) expr ::= expr likeop expr ESCAPE expr */
   -2,  /* (205) expr ::= expr ISNULL|NOTNULL */
   -3,  /* (206) expr ::= expr NOT NULL */
   -3,  /* (207) expr ::= expr IS expr */
   -4,  /* (208) expr ::= expr IS NOT expr */
   -2,  /* (209) expr ::= NOT expr */
   -2,  /* (210) expr ::= BITNOT expr */
   -2,  /* (211) expr ::= PLUS|MINUS expr */
   -1,  /* (212) between_op ::= BETWEEN */
   -2,  /* (213) between_op ::= NOT BETWEEN */
   -5,  /* (214) expr ::= expr between_op expr AND expr */
   -1,  /* (215) in_op ::= IN */
   -2,  /* (216) in_op ::= NOT IN */
   -5,  /* (217) expr ::= expr in_op LP exprlist RP */
   -3,  /* (218) expr ::= LP select RP */
   -5,  /* (219) expr ::= expr in_op LP select RP */
   -5,  /* (220) expr ::= expr in_op nm dbnm paren_exprlist */
   -4,  /* (221) expr ::= EXISTS LP select RP */
   -5,  /* (222) expr ::= CASE case_operand case_exprlist case_else END */
   -5,  /* (223) case_exprlist ::= case_exprlist WHEN expr THEN expr */
   -4,  /* (224) case_exprlist ::= WHEN expr THEN expr */
   -2,  /* (225) case_else ::= ELSE expr */
    0,  /* (226) case_else ::= */
   -1,  /* (227) case_operand ::= expr */
    0,  /* (228) case_operand ::= */
    0,  /* (229) exprlist ::= */
   -3,  /* (230) nexprlist ::= nexprlist COMMA expr */
   -1,  /* (231) nexprlist ::= expr */
    0,  /* (232) paren_exprlist ::= */
   -3,  /* (233) paren_exprlist ::= LP exprlist RP */
  -12,  /* (234) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
   -1,  /* (235) uniqueflag ::= UNIQUE */
    0,  /* (236) uniqueflag ::= */
    0,  /* (237) eidlist_opt ::= */
   -3,  /* (238) eidlist_opt ::= LP eidlist RP */
   -5,  /* (239) eidlist ::= eidlist COMMA nm collate sortorder */
   -3,  /* (240) eidlist ::= nm collate sortorder */
    0,  /* (241) collate ::= */
   -2,  /* (242) collate ::= COLLATE ID|STRING */
   -4,  /* (243) cmd ::= DROP INDEX ifexists fullname */
   -2,  /* (244) cmd ::= VACUUM vinto */
   -3,  /* (245) cmd ::= VACUUM nm vinto */
   -2,  /* (246) vinto ::= INTO expr */
    0,  /* (247) vinto ::= */
   -3,  /* (248) cmd ::= PRAGMA nm dbnm */
   -5,  /* (249) cmd ::= PRAGMA nm dbnm EQ nmnum */
   -6,  /* (250) cmd ::= PRAGMA nm dbnm LP nmnum RP */
   -5,  /* (251) cmd ::= PRAGMA nm dbnm EQ minus_num */
   -6,  /* (252) cmd ::= PRAGMA nm dbnm LP minus_num RP */
   -2,  /* (253) plus_num ::= PLUS INTEGER|FLOAT */
   -2,  /* (254) minus_num ::= MINUS INTEGER|FLOAT */
   -5,  /* (255) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
  -11,  /* (256) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
   -1,  /* (257) trigger_time ::= BEFORE|AFTER */
   -2,  /* (258) trigger_time ::= INSTEAD OF */
    0,  /* (259) trigger_time ::= */
   -1,  /* (260) trigger_event ::= DELETE|INSERT */
   -1,  /* (261) trigger_event ::= UPDATE */
   -3,  /* (262) trigger_event ::= UPDATE OF idlist */
    0,  /* (263) when_clause ::= */
   -2,  /* (264) when_clause ::= WHEN expr */
   -3,  /* (265) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
   -2,  /* (266) trigger_cmd_list ::= trigger_cmd SEMI */
   -3,  /* (267) trnm ::= nm DOT nm */
   -3,  /* (268) tridxby ::= INDEXED BY nm */
   -2,  /* (269) tridxby ::= NOT INDEXED */
   -9,  /* (270) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */
   -8,  /* (271) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
   -6,  /* (272) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
   -3,  /* (273) trigger_cmd ::= scanpt select scanpt */
   -4,  /* (274) expr ::= RAISE LP IGNORE RP */
   -6,  /* (275) expr ::= RAISE LP raisetype COMMA nm RP */
   -1,  /* (276) raisetype ::= ROLLBACK */
   -1,  /* (277) raisetype ::= ABORT */
   -1,  /* (278) raisetype ::= FAIL */
   -4,  /* (279) cmd ::= DROP TRIGGER ifexists fullname */
   -6,  /* (280) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
   -3,  /* (281) cmd ::= DETACH database_kw_opt expr */
    0,  /* (282) key_opt ::= */
   -2,  /* (283) key_opt ::= KEY expr */
   -1,  /* (284) cmd ::= REINDEX */
   -3,  /* (285) cmd ::= REINDEX nm dbnm */
   -1,  /* (286) cmd ::= ANALYZE */
   -3,  /* (287) cmd ::= ANALYZE nm dbnm */
   -6,  /* (288) cmd ::= ALTER TABLE fullname RENAME TO nm */
   -7,  /* (289) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
   -6,  /* (290) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
   -1,  /* (291) add_column_fullname ::= fullname */
   -8,  /* (292) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
   -1,  /* (293) cmd ::= create_vtab */
   -4,  /* (294) cmd ::= create_vtab LP vtabarglist RP */
   -8,  /* (295) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
    0,  /* (296) vtabarg ::= */
   -1,  /* (297) vtabargtoken ::= ANY */
   -3,  /* (298) vtabargtoken ::= lp anylist RP */
   -1,  /* (299) lp ::= LP */
   -2,  /* (300) with ::= WITH wqlist */
   -3,  /* (301) with ::= WITH RECURSIVE wqlist */
   -1,  /* (302) wqas ::= AS */
   -2,  /* (303) wqas ::= AS MATERIALIZED */
   -3,  /* (304) wqas ::= AS NOT MATERIALIZED */
   -6,  /* (305) wqitem ::= nm eidlist_opt wqas LP select RP */
   -1,  /* (306) wqlist ::= wqitem */
   -3,  /* (307) wqlist ::= wqlist COMMA wqitem */
   -1,  /* (308) windowdefn_list ::= windowdefn */
   -3,  /* (309) windowdefn_list ::= windowdefn_list COMMA windowdefn */
   -5,  /* (310) windowdefn ::= nm AS LP window RP */
   -5,  /* (311) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
   -6,  /* (312) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
   -4,  /* (313) window ::= ORDER BY sortlist frame_opt */
   -5,  /* (314) window ::= nm ORDER BY sortlist frame_opt */
   -1,  /* (315) window ::= frame_opt */
   -2,  /* (316) window ::= nm frame_opt */
    0,  /* (317) frame_opt ::= */
   -3,  /* (318) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
   -6,  /* (319) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
   -1,  /* (320) range_or_rows ::= RANGE|ROWS|GROUPS */
   -1,  /* (321) frame_bound_s ::= frame_bound */
   -2,  /* (322) frame_bound_s ::= UNBOUNDED PRECEDING */
   -1,  /* (323) frame_bound_e ::= frame_bound */
   -2,  /* (324) frame_bound_e ::= UNBOUNDED FOLLOWING */
   -2,  /* (325) frame_bound ::= expr PRECEDING|FOLLOWING */
   -2,  /* (326) frame_bound ::= CURRENT ROW */
    0,  /* (327) frame_exclude_opt ::= */
   -2,  /* (328) frame_exclude_opt ::= EXCLUDE frame_exclude */
   -2,  /* (329) frame_exclude ::= NO OTHERS */
   -2,  /* (330) frame_exclude ::= CURRENT ROW */
   -1,  /* (331) frame_exclude ::= GROUP|TIES */
   -2,  /* (332) window_clause ::= WINDOW windowdefn_list */
   -2,  /* (333) filter_over ::= filter_clause over_clause */
   -1,  /* (334) filter_over ::= over_clause */
   -1,  /* (335) filter_over ::= filter_clause */
   -4,  /* (336) over_clause ::= OVER LP window RP */
   -2,  /* (337) over_clause ::= OVER nm */
   -5,  /* (338) filter_clause ::= FILTER LP WHERE expr RP */
   -1,  /* (339) input ::= cmdlist */
   -2,  /* (340) cmdlist ::= cmdlist ecmd */
   -1,  /* (341) cmdlist ::= ecmd */
   -1,  /* (342) ecmd ::= SEMI */
   -2,  /* (343) ecmd ::= cmdx SEMI */
   -3,  /* (344) ecmd ::= explain cmdx SEMI */
    0,  /* (345) trans_opt ::= */
   -1,  /* (346) trans_opt ::= TRANSACTION */
   -2,  /* (347) trans_opt ::= TRANSACTION nm */
   -1,  /* (348) savepoint_opt ::= SAVEPOINT */
    0,  /* (349) savepoint_opt ::= */
   -2,  /* (350) cmd ::= create_table create_table_args */
   -1,  /* (351) table_option_set ::= table_option */
   -4,  /* (352) columnlist ::= columnlist COMMA columnname carglist */
   -2,  /* (353) columnlist ::= columnname carglist */
   -1,  /* (354) nm ::= ID|INDEXED */
   -1,  /* (355) nm ::= STRING */
   -1,  /* (356) nm ::= JOIN_KW */
   -1,  /* (357) typetoken ::= typename */
   -1,  /* (358) typename ::= ID|STRING */
   -1,  /* (359) signed ::= plus_num */
   -1,  /* (360) signed ::= minus_num */
   -2,  /* (361) carglist ::= carglist ccons */
    0,  /* (362) carglist ::= */
   -2,  /* (363) ccons ::= NULL onconf */
   -4,  /* (364) ccons ::= GENERATED ALWAYS AS generated */
   -2,  /* (365) ccons ::= AS generated */
   -2,  /* (366) conslist_opt ::= COMMA conslist */
   -3,  /* (367) conslist ::= conslist tconscomma tcons */
   -1,  /* (368) conslist ::= tcons */
    0,  /* (369) tconscomma ::= */
   -1,  /* (370) defer_subclause_opt ::= defer_subclause */
   -1,  /* (371) resolvetype ::= raisetype */
   -1,  /* (372) selectnowith ::= oneselect */
   -1,  /* (373) oneselect ::= values */
   -2,  /* (374) sclp ::= selcollist COMMA */
   -1,  /* (375) as ::= ID|STRING */
    0,  /* (376) returning ::= */
   -1,  /* (377) expr ::= term */
   -1,  /* (378) likeop ::= LIKE_KW|MATCH */
   -1,  /* (379) exprlist ::= nexprlist */
   -1,  /* (380) nmnum ::= plus_num */
   -1,  /* (381) nmnum ::= nm */
   -1,  /* (382) nmnum ::= ON */
   -1,  /* (383) nmnum ::= DELETE */
   -1,  /* (384) nmnum ::= DEFAULT */
   -1,  /* (385) plus_num ::= INTEGER|FLOAT */
    0,  /* (386) foreach_clause ::= */
   -3,  /* (387) foreach_clause ::= FOR EACH ROW */
   -1,  /* (388) trnm ::= nm */
    0,  /* (389) tridxby ::= */
   -1,  /* (390) database_kw_opt ::= DATABASE */
    0,  /* (391) database_kw_opt ::= */
    0,  /* (392) kwcolumn_opt ::= */
   -1,  /* (393) kwcolumn_opt ::= COLUMNKW */
   -1,  /* (394) vtabarglist ::= vtabarg */
   -3,  /* (395) vtabarglist ::= vtabarglist COMMA vtabarg */
   -2,  /* (396) vtabarg ::= vtabarg vtabargtoken */
    0,  /* (397) anylist ::= */
   -4,  /* (398) anylist ::= anylist LP anylist RP */
   -2,  /* (399) anylist ::= anylist ANY */
    0,  /* (400) with ::= */
};

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

/*
** Perform a reduce action and the shift that must immediately
** follow the reduce.
161774
161775
161776
161777
161778
161779
161780
161781
161782
161783
161784
161785
161786
161787
161788
161789
161790
161791
161792
161793
161794
161795
161796
161797
      case 1: /* explain ::= EXPLAIN QUERY PLAN */
{ pParse->explain = 2; }
        break;
      case 2: /* cmdx ::= cmd */
{ sqlite3FinishCoding(pParse); }
        break;
      case 3: /* cmd ::= BEGIN transtype trans_opt */
{sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy376);}
        break;
      case 4: /* transtype ::= */
{yymsp[1].minor.yy376 = TK_DEFERRED;}
        break;
      case 5: /* transtype ::= DEFERRED */
      case 6: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==6);
      case 7: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==7);
      case 318: /* range_or_rows ::= RANGE|ROWS|GROUPS */ yytestcase(yyruleno==318);
{yymsp[0].minor.yy376 = yymsp[0].major; /*A-overwrites-X*/}
        break;
      case 8: /* cmd ::= COMMIT|END trans_opt */
      case 9: /* cmd ::= ROLLBACK trans_opt */ yytestcase(yyruleno==9);
{sqlite3EndTransaction(pParse,yymsp[-1].major);}
        break;
      case 10: /* cmd ::= SAVEPOINT nm */
{







|


|




|
|







162077
162078
162079
162080
162081
162082
162083
162084
162085
162086
162087
162088
162089
162090
162091
162092
162093
162094
162095
162096
162097
162098
162099
162100
      case 1: /* explain ::= EXPLAIN QUERY PLAN */
{ pParse->explain = 2; }
        break;
      case 2: /* cmdx ::= cmd */
{ sqlite3FinishCoding(pParse); }
        break;
      case 3: /* cmd ::= BEGIN transtype trans_opt */
{sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy64);}
        break;
      case 4: /* transtype ::= */
{yymsp[1].minor.yy64 = TK_DEFERRED;}
        break;
      case 5: /* transtype ::= DEFERRED */
      case 6: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==6);
      case 7: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==7);
      case 320: /* range_or_rows ::= RANGE|ROWS|GROUPS */ yytestcase(yyruleno==320);
{yymsp[0].minor.yy64 = yymsp[0].major; /*A-overwrites-X*/}
        break;
      case 8: /* cmd ::= COMMIT|END trans_opt */
      case 9: /* cmd ::= ROLLBACK trans_opt */ yytestcase(yyruleno==9);
{sqlite3EndTransaction(pParse,yymsp[-1].major);}
        break;
      case 10: /* cmd ::= SAVEPOINT nm */
{
161806
161807
161808
161809
161810
161811
161812
161813
161814
161815
161816
161817
161818
161819
161820
161821
161822
161823
161824
161825
161826
161827
161828
161829
161830
161831
161832
161833
161834
161835
161836
161837
161838
161839
161840
161841
161842
161843
161844
161845
161846



161847




161848
161849
161850
161851
161852










161853
161854
161855

161856
161857
161858
161859
161860
161861
161862
161863
161864
161865
161866
161867
161868
161869
161870
161871
161872
161873
161874
161875
161876
161877
161878
161879
161880
161881
161882
161883
161884
161885
161886
161887
161888
161889
161890
161891
161892
161893
161894
161895
161896
161897
161898
161899
161900
161901
161902
161903
161904
161905
161906
161907
161908
161909
161910
161911
161912
161913
161914
161915
161916
161917
161918
161919
161920
161921
161922
161923
161924
161925
161926
161927
161928
161929
161930
161931
161932
161933
161934
161935
161936
161937
161938
161939
161940
161941
161942
161943
161944
161945
161946
161947
161948
161949
161950
161951
161952
161953
161954
161955
161956
161957
161958
161959
161960
161961
161962
161963
161964
161965
161966
161967
161968
161969
161970
161971
161972
161973
161974
161975
161976
161977
161978
161979
161980
161981
161982
161983
161984
161985
161986
161987
161988
161989
161990
161991
161992
161993
161994
161995
161996
161997
161998
161999
162000
162001
162002
162003
162004
162005
162006
162007
162008
162009
162010
162011
162012
162013
162014
162015
162016
162017
162018
162019
162020
162021
162022
162023
162024
162025
162026
162027
162028
162029
162030
162031
162032
162033
162034
162035
162036
162037
162038
162039
162040
162041
162042
162043
162044
162045
162046
162047
162048
162049
162050
162051
162052
162053
162054
162055
162056
162057
162058
162059
162060
162061
162062
162063
162064
162065
162066
162067
162068
162069
162070
162071
162072
162073
162074
162075
162076
162077
162078
162079
162080
162081
162082
162083
162084
162085
162086
162087
162088
162089
162090
162091
162092
162093
162094
162095
162096
162097
162098
162099
162100
162101
162102
162103
162104
162105
162106
162107
162108
162109
162110
162111
162112
162113
162114
162115
162116
162117
162118
162119
162120
162121
162122
162123
162124
162125
162126
162127
162128
162129
162130
162131
162132
162133
162134
162135
162136
162137
162138
162139
162140
162141
162142
162143
162144
162145
162146
162147
162148
162149
162150
162151
162152
162153
162154
162155
162156
162157
162158
162159
162160
162161
162162
162163
162164
162165
162166
162167
162168
162169
162170
162171
162172
162173
162174
162175
162176
162177
162178
162179
162180
162181
162182
162183
162184
162185
162186
162187
162188
162189
162190
162191
162192
162193
162194
162195
162196
162197
162198
162199
162200
162201
162202
162203
162204
162205
162206
162207
162208
162209
162210
162211
162212
162213
162214
162215
162216
162217
162218
162219
162220
162221
162222
162223
162224
162225
162226
162227
162228
162229
162230
162231
162232
162233
162234
162235
162236
162237
162238
162239
162240
162241
162242
162243
162244
162245
162246
162247
162248
162249
162250
162251
162252
162253
162254
162255
162256
162257
162258
162259
162260
162261
162262
162263
162264
162265
162266
162267
162268
162269
162270
162271
162272
162273
162274
162275
162276
162277
162278
162279
162280
162281
162282
162283
162284
162285
162286
162287
162288
162289
162290
162291
162292
162293
162294
162295
162296
162297
162298
162299
162300
162301
162302
162303
162304
162305
162306
162307
162308
162309
162310
162311
162312
162313
162314
162315
162316
162317
162318
162319
162320
162321
162322
162323
162324
162325
162326
162327
162328
162329
162330
162331
162332
162333
162334
162335
162336
162337
162338
162339
162340
162341
162342
162343
162344
162345
162346
162347
162348
162349
162350
162351
162352
162353
162354
162355
162356
162357
162358
162359
162360
162361
162362
162363
162364
162365
162366
162367
162368
162369
162370
162371
162372
162373
162374
162375
162376
162377
162378
162379
162380
162381
162382
162383
162384
162385
162386
162387
162388
162389
162390
162391
162392
162393
162394
162395
162396
162397
162398
162399
162400
162401
162402
162403
162404
162405
162406
162407
162408
162409
162410
162411
162412
162413
162414
162415
162416
162417
162418
162419
162420
162421
162422
162423
162424
162425
162426
162427
162428
162429
162430
162431
162432
162433
162434
162435
162436
162437
162438
162439
162440
162441
162442
162443
162444
162445
162446
162447
162448
162449
162450
162451
162452
162453
162454
162455
162456
162457
162458
162459
162460
162461
162462
162463
162464
162465
162466
162467
162468
162469
162470
162471
162472
162473
162474
162475
162476
162477
162478
162479
162480
162481
162482
162483
162484
162485
162486
162487
162488
162489
162490
162491
162492
162493
162494
162495
162496
162497
162498
162499
162500
162501
162502
162503
162504
162505
162506
162507
162508
162509
162510
162511
162512
162513
162514
162515
162516
162517
162518
162519
162520
162521
162522
162523
162524
162525
162526
162527
162528
162529
162530
162531
162532
162533
162534
162535
162536
162537
162538
162539
162540
162541
162542
162543
162544
162545
162546
162547
162548
162549
162550
162551
162552
162553
162554
162555
162556
162557
162558
162559
162560
162561
162562
162563
162564
162565
162566
162567
162568
162569
162570
162571
162572
162573
162574
162575
162576
162577
162578
162579
162580
162581
162582
162583
162584
162585
162586
162587
162588
162589
162590
162591
162592
162593
162594
162595
162596
162597
162598
162599
162600
162601
162602
162603
162604
162605
162606
162607
162608
162609
162610
162611
162612
162613
162614
162615
162616
162617
162618
162619
162620
162621
162622
162623
162624
162625
162626
162627
162628
162629
162630
162631
162632
162633
162634
162635
162636
162637
162638
162639
162640
162641
162642
162643
162644
162645
162646
162647
162648
162649
162650
162651
162652
162653
162654
162655
162656
162657
162658
162659
162660
162661
162662
162663
162664
162665
162666
162667
162668
162669
162670
162671
162672
162673
162674
162675
162676
162677
162678
162679
162680
162681
162682
162683
162684
162685
162686
162687
162688
162689
162690
162691
162692
162693
162694
162695
162696
162697
162698
162699
162700
162701
162702
162703
162704
162705
162706
162707
162708
162709
162710
162711
162712
162713
162714
162715
162716
162717
162718
162719
162720
162721
162722
162723
162724
162725
162726
162727
162728
162729
162730
162731
162732
162733
162734
162735
162736
162737
162738
162739
162740
162741
162742
162743
162744
162745
162746
162747
162748
162749
162750
162751
162752
162753
162754
162755
162756
162757
162758
162759
162760
162761
162762
162763
162764
162765
162766
162767
162768
162769
162770
162771
162772
162773
162774
162775
162776
162777
162778
162779
162780
162781
162782
162783
162784
162785
162786
162787
162788
162789
162790
162791
162792
162793
162794
162795
162796
162797
162798
162799
162800
162801
162802
162803
162804
162805
162806
162807
162808
162809
162810
162811
162812
162813
162814
162815
162816
162817
162818
162819
162820
162821
162822
162823
162824
162825
162826
162827
162828
162829
162830
162831
162832
162833
162834
162835
162836
162837
162838
162839
162840
162841
162842
162843
162844
162845
162846
162847
162848
162849
162850
162851
162852
162853
162854
162855
162856
162857
162858
162859
162860
162861
162862
162863
162864
162865
162866
162867
162868
162869
162870
162871
162872
162873
162874
162875
162876
162877
162878
162879
162880
162881
162882
162883
162884
162885
162886
162887
162888
162889
162890
162891
162892
162893
162894
162895
162896
162897
162898
162899
162900
162901
162902
162903
162904
162905
162906
162907
162908
162909
162910
162911
162912
162913
162914
162915
162916
162917
162918
162919
162920
162921
162922
162923
162924
162925
162926
162927
162928
162929
162930
162931
162932
162933
162934
162935
162936
162937
162938
162939
162940
162941
162942
162943
162944
162945
162946
162947
162948
162949
162950
162951
162952
162953
162954
162955
162956
162957
162958
162959
162960
162961
162962
162963
162964
162965
162966
162967
162968
162969
162970
162971
162972
162973
162974
162975
162976
162977
162978
162979
162980
162981
162982
162983
162984
162985
162986
162987
162988
162989
162990
162991
162992
162993
162994
162995
162996
162997
162998
162999
163000
163001
163002
163003
163004
163005
163006
163007
163008
163009
163010
163011
163012
163013
163014
163015
163016
163017
163018
163019
163020
163021
163022
163023
163024
163025
163026
163027
163028
163029
163030
163031
163032
163033
163034
163035
163036
163037
163038
163039
163040
163041
163042
163043
163044
163045
163046
163047
163048
163049
163050
163051
163052
163053
163054
163055
163056
163057
163058
163059
163060
163061
163062
163063
163064
163065
163066
163067
163068
163069
163070
163071
163072
163073
163074
163075
163076
163077
163078
163079
163080
163081
163082
163083
163084
163085
163086
163087
163088
163089
163090
163091
163092
163093
163094
163095
163096
163097
163098
163099
163100
163101
163102
163103
163104
163105
163106
163107
163108
163109
163110
163111
163112
163113
163114
163115
163116
163117
163118
163119
163120
163121
163122
163123
163124
163125
163126
163127
163128
163129
163130
163131
163132
163133
163134
163135
163136
163137
163138
163139
163140
163141
163142
163143
163144
163145
163146
163147
163148
163149
163150
163151
163152
163153
163154
163155
163156
163157
163158
163159
163160
163161
163162
163163
163164
163165
163166
163167
163168
163169
163170
163171
163172
163173
163174
163175
163176
163177
163178

163179
163180
163181
163182
163183
163184
163185
163186
163187
163188
163189
163190
163191
163192
163193
163194
163195
163196
163197
163198
163199
163200
163201
163202
163203
163204
163205
163206
163207
163208
163209
163210
163211
163212
163213
163214
163215
163216
163217
163218
163219
163220
163221
163222
163223
163224
163225
163226
163227
163228
163229
163230
163231
163232
163233
163234
      case 12: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
{
  sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0);
}
        break;
      case 13: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */
{
   sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy376,0,0,yymsp[-2].minor.yy376);
}
        break;
      case 14: /* createkw ::= CREATE */
{disableLookaside(pParse);}
        break;
      case 15: /* ifnotexists ::= */
      case 18: /* temp ::= */ yytestcase(yyruleno==18);
      case 21: /* table_options ::= */ yytestcase(yyruleno==21);
      case 45: /* autoinc ::= */ yytestcase(yyruleno==45);
      case 60: /* init_deferred_pred_opt ::= */ yytestcase(yyruleno==60);
      case 70: /* defer_subclause_opt ::= */ yytestcase(yyruleno==70);
      case 79: /* ifexists ::= */ yytestcase(yyruleno==79);
      case 96: /* distinct ::= */ yytestcase(yyruleno==96);
      case 239: /* collate ::= */ yytestcase(yyruleno==239);
{yymsp[1].minor.yy376 = 0;}
        break;
      case 16: /* ifnotexists ::= IF NOT EXISTS */
{yymsp[-2].minor.yy376 = 1;}
        break;
      case 17: /* temp ::= TEMP */
{yymsp[0].minor.yy376 = pParse->db->init.busy==0;}
        break;
      case 19: /* create_table_args ::= LP columnlist conslist_opt RP table_options */
{
  sqlite3EndTable(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,yymsp[0].minor.yy376,0);
}
        break;
      case 20: /* create_table_args ::= AS select */
{
  sqlite3EndTable(pParse,0,0,0,yymsp[0].minor.yy81);
  sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy81);
}
        break;



      case 22: /* table_options ::= WITHOUT nm */




{
  if( yymsp[0].minor.yy0.n==5 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,"rowid",5)==0 ){
    yymsp[-1].minor.yy376 = TF_WithoutRowid | TF_NoVisibleRowid;
  }else{
    yymsp[-1].minor.yy376 = 0;










    sqlite3ErrorMsg(pParse, "unknown table option: %.*s", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z);
  }
}

        break;
      case 23: /* columnname ::= nm typetoken */
{sqlite3AddColumn(pParse,yymsp[-1].minor.yy0,yymsp[0].minor.yy0);}
        break;
      case 24: /* typetoken ::= */
      case 63: /* conslist_opt ::= */ yytestcase(yyruleno==63);
      case 102: /* as ::= */ yytestcase(yyruleno==102);
{yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = 0;}
        break;
      case 25: /* typetoken ::= typename LP signed RP */
{
  yymsp[-3].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z);
}
        break;
      case 26: /* typetoken ::= typename LP signed COMMA signed RP */
{
  yymsp[-5].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z);
}
        break;
      case 27: /* typename ::= typename ID|STRING */
{yymsp[-1].minor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);}
        break;
      case 28: /* scanpt ::= */
{
  assert( yyLookahead!=YYNOCODE );
  yymsp[1].minor.yy504 = yyLookaheadToken.z;
}
        break;
      case 29: /* scantok ::= */
{
  assert( yyLookahead!=YYNOCODE );
  yymsp[1].minor.yy0 = yyLookaheadToken;
}
        break;
      case 30: /* ccons ::= CONSTRAINT nm */
      case 65: /* tcons ::= CONSTRAINT nm */ yytestcase(yyruleno==65);
{pParse->constraintName = yymsp[0].minor.yy0;}
        break;
      case 31: /* ccons ::= DEFAULT scantok term */
{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy404,yymsp[-1].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}
        break;
      case 32: /* ccons ::= DEFAULT LP expr RP */
{sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy404,yymsp[-2].minor.yy0.z+1,yymsp[0].minor.yy0.z);}
        break;
      case 33: /* ccons ::= DEFAULT PLUS scantok term */
{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy404,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}
        break;
      case 34: /* ccons ::= DEFAULT MINUS scantok term */
{
  Expr *p = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy404, 0);
  sqlite3AddDefaultValue(pParse,p,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);
}
        break;
      case 35: /* ccons ::= DEFAULT scantok ID|INDEXED */
{
  Expr *p = tokenExpr(pParse, TK_STRING, yymsp[0].minor.yy0);
  if( p ){
    sqlite3ExprIdToTrueFalse(p);
    testcase( p->op==TK_TRUEFALSE && sqlite3ExprTruthValue(p) );
  }
    sqlite3AddDefaultValue(pParse,p,yymsp[0].minor.yy0.z,yymsp[0].minor.yy0.z+yymsp[0].minor.yy0.n);
}
        break;
      case 36: /* ccons ::= NOT NULL onconf */
{sqlite3AddNotNull(pParse, yymsp[0].minor.yy376);}
        break;
      case 37: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */
{sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy376,yymsp[0].minor.yy376,yymsp[-2].minor.yy376);}
        break;
      case 38: /* ccons ::= UNIQUE onconf */
{sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy376,0,0,0,0,
                                   SQLITE_IDXTYPE_UNIQUE);}
        break;
      case 39: /* ccons ::= CHECK LP expr RP */
{sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy404,yymsp[-2].minor.yy0.z,yymsp[0].minor.yy0.z);}
        break;
      case 40: /* ccons ::= REFERENCES nm eidlist_opt refargs */
{sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy70,yymsp[0].minor.yy376);}
        break;
      case 41: /* ccons ::= defer_subclause */
{sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy376);}
        break;
      case 42: /* ccons ::= COLLATE ID|STRING */
{sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);}
        break;
      case 43: /* generated ::= LP expr RP */
{sqlite3AddGenerated(pParse,yymsp[-1].minor.yy404,0);}
        break;
      case 44: /* generated ::= LP expr RP ID */
{sqlite3AddGenerated(pParse,yymsp[-2].minor.yy404,&yymsp[0].minor.yy0);}
        break;
      case 46: /* autoinc ::= AUTOINCR */
{yymsp[0].minor.yy376 = 1;}
        break;
      case 47: /* refargs ::= */
{ yymsp[1].minor.yy376 = OE_None*0x0101; /* EV: R-19803-45884 */}
        break;
      case 48: /* refargs ::= refargs refarg */
{ yymsp[-1].minor.yy376 = (yymsp[-1].minor.yy376 & ~yymsp[0].minor.yy139.mask) | yymsp[0].minor.yy139.value; }
        break;
      case 49: /* refarg ::= MATCH nm */
{ yymsp[-1].minor.yy139.value = 0;     yymsp[-1].minor.yy139.mask = 0x000000; }
        break;
      case 50: /* refarg ::= ON INSERT refact */
{ yymsp[-2].minor.yy139.value = 0;     yymsp[-2].minor.yy139.mask = 0x000000; }
        break;
      case 51: /* refarg ::= ON DELETE refact */
{ yymsp[-2].minor.yy139.value = yymsp[0].minor.yy376;     yymsp[-2].minor.yy139.mask = 0x0000ff; }
        break;
      case 52: /* refarg ::= ON UPDATE refact */
{ yymsp[-2].minor.yy139.value = yymsp[0].minor.yy376<<8;  yymsp[-2].minor.yy139.mask = 0x00ff00; }
        break;
      case 53: /* refact ::= SET NULL */
{ yymsp[-1].minor.yy376 = OE_SetNull;  /* EV: R-33326-45252 */}
        break;
      case 54: /* refact ::= SET DEFAULT */
{ yymsp[-1].minor.yy376 = OE_SetDflt;  /* EV: R-33326-45252 */}
        break;
      case 55: /* refact ::= CASCADE */
{ yymsp[0].minor.yy376 = OE_Cascade;  /* EV: R-33326-45252 */}
        break;
      case 56: /* refact ::= RESTRICT */
{ yymsp[0].minor.yy376 = OE_Restrict; /* EV: R-33326-45252 */}
        break;
      case 57: /* refact ::= NO ACTION */
{ yymsp[-1].minor.yy376 = OE_None;     /* EV: R-33326-45252 */}
        break;
      case 58: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
{yymsp[-2].minor.yy376 = 0;}
        break;
      case 59: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
      case 74: /* orconf ::= OR resolvetype */ yytestcase(yyruleno==74);
      case 169: /* insert_cmd ::= INSERT orconf */ yytestcase(yyruleno==169);
{yymsp[-1].minor.yy376 = yymsp[0].minor.yy376;}
        break;
      case 61: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */
      case 78: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==78);
      case 211: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==211);
      case 214: /* in_op ::= NOT IN */ yytestcase(yyruleno==214);
      case 240: /* collate ::= COLLATE ID|STRING */ yytestcase(yyruleno==240);
{yymsp[-1].minor.yy376 = 1;}
        break;
      case 62: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
{yymsp[-1].minor.yy376 = 0;}
        break;
      case 64: /* tconscomma ::= COMMA */
{pParse->constraintName.n = 0;}
        break;
      case 66: /* tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
{sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy70,yymsp[0].minor.yy376,yymsp[-2].minor.yy376,0);}
        break;
      case 67: /* tcons ::= UNIQUE LP sortlist RP onconf */
{sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy70,yymsp[0].minor.yy376,0,0,0,0,
                                       SQLITE_IDXTYPE_UNIQUE);}
        break;
      case 68: /* tcons ::= CHECK LP expr RP onconf */
{sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy404,yymsp[-3].minor.yy0.z,yymsp[-1].minor.yy0.z);}
        break;
      case 69: /* tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
{
    sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy70, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy70, yymsp[-1].minor.yy376);
    sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy376);
}
        break;
      case 71: /* onconf ::= */
      case 73: /* orconf ::= */ yytestcase(yyruleno==73);
{yymsp[1].minor.yy376 = OE_Default;}
        break;
      case 72: /* onconf ::= ON CONFLICT resolvetype */
{yymsp[-2].minor.yy376 = yymsp[0].minor.yy376;}
        break;
      case 75: /* resolvetype ::= IGNORE */
{yymsp[0].minor.yy376 = OE_Ignore;}
        break;
      case 76: /* resolvetype ::= REPLACE */
      case 170: /* insert_cmd ::= REPLACE */ yytestcase(yyruleno==170);
{yymsp[0].minor.yy376 = OE_Replace;}
        break;
      case 77: /* cmd ::= DROP TABLE ifexists fullname */
{
  sqlite3DropTable(pParse, yymsp[0].minor.yy153, 0, yymsp[-1].minor.yy376);
}
        break;
      case 80: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
{
  sqlite3CreateView(pParse, &yymsp[-8].minor.yy0, &yymsp[-4].minor.yy0, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy70, yymsp[0].minor.yy81, yymsp[-7].minor.yy376, yymsp[-5].minor.yy376);
}
        break;
      case 81: /* cmd ::= DROP VIEW ifexists fullname */
{
  sqlite3DropTable(pParse, yymsp[0].minor.yy153, 1, yymsp[-1].minor.yy376);
}
        break;
      case 82: /* cmd ::= select */
{
  SelectDest dest = {SRT_Output, 0, 0, 0, 0, 0, 0};
  sqlite3Select(pParse, yymsp[0].minor.yy81, &dest);
  sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy81);
}
        break;
      case 83: /* select ::= WITH wqlist selectnowith */
{yymsp[-2].minor.yy81 = attachWithToSelect(pParse,yymsp[0].minor.yy81,yymsp[-1].minor.yy103);}
        break;
      case 84: /* select ::= WITH RECURSIVE wqlist selectnowith */
{yymsp[-3].minor.yy81 = attachWithToSelect(pParse,yymsp[0].minor.yy81,yymsp[-1].minor.yy103);}
        break;
      case 85: /* select ::= selectnowith */
{
  Select *p = yymsp[0].minor.yy81;
  if( p ){
    parserDoubleLinkSelect(pParse, p);
  }
  yymsp[0].minor.yy81 = p; /*A-overwrites-X*/
}
        break;
      case 86: /* selectnowith ::= selectnowith multiselect_op oneselect */
{
  Select *pRhs = yymsp[0].minor.yy81;
  Select *pLhs = yymsp[-2].minor.yy81;
  if( pRhs && pRhs->pPrior ){
    SrcList *pFrom;
    Token x;
    x.n = 0;
    parserDoubleLinkSelect(pParse, pRhs);
    pFrom = sqlite3SrcListAppendFromTerm(pParse,0,0,0,&x,pRhs,0,0);
    pRhs = sqlite3SelectNew(pParse,0,pFrom,0,0,0,0,0,0);
  }
  if( pRhs ){
    pRhs->op = (u8)yymsp[-1].minor.yy376;
    pRhs->pPrior = pLhs;
    if( ALWAYS(pLhs) ) pLhs->selFlags &= ~SF_MultiValue;
    pRhs->selFlags &= ~SF_MultiValue;
    if( yymsp[-1].minor.yy376!=TK_ALL ) pParse->hasCompound = 1;
  }else{
    sqlite3SelectDelete(pParse->db, pLhs);
  }
  yymsp[-2].minor.yy81 = pRhs;
}
        break;
      case 87: /* multiselect_op ::= UNION */
      case 89: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==89);
{yymsp[0].minor.yy376 = yymsp[0].major; /*A-overwrites-OP*/}
        break;
      case 88: /* multiselect_op ::= UNION ALL */
{yymsp[-1].minor.yy376 = TK_ALL;}
        break;
      case 90: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
{
  yymsp[-8].minor.yy81 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy70,yymsp[-5].minor.yy153,yymsp[-4].minor.yy404,yymsp[-3].minor.yy70,yymsp[-2].minor.yy404,yymsp[-1].minor.yy70,yymsp[-7].minor.yy376,yymsp[0].minor.yy404);
}
        break;
      case 91: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
{
  yymsp[-9].minor.yy81 = sqlite3SelectNew(pParse,yymsp[-7].minor.yy70,yymsp[-6].minor.yy153,yymsp[-5].minor.yy404,yymsp[-4].minor.yy70,yymsp[-3].minor.yy404,yymsp[-1].minor.yy70,yymsp[-8].minor.yy376,yymsp[0].minor.yy404);
  if( yymsp[-9].minor.yy81 ){
    yymsp[-9].minor.yy81->pWinDefn = yymsp[-2].minor.yy49;
  }else{
    sqlite3WindowListDelete(pParse->db, yymsp[-2].minor.yy49);
  }
}
        break;
      case 92: /* values ::= VALUES LP nexprlist RP */
{
  yymsp[-3].minor.yy81 = sqlite3SelectNew(pParse,yymsp[-1].minor.yy70,0,0,0,0,0,SF_Values,0);
}
        break;
      case 93: /* values ::= values COMMA LP nexprlist RP */
{
  Select *pRight, *pLeft = yymsp[-4].minor.yy81;
  pRight = sqlite3SelectNew(pParse,yymsp[-1].minor.yy70,0,0,0,0,0,SF_Values|SF_MultiValue,0);
  if( ALWAYS(pLeft) ) pLeft->selFlags &= ~SF_MultiValue;
  if( pRight ){
    pRight->op = TK_ALL;
    pRight->pPrior = pLeft;
    yymsp[-4].minor.yy81 = pRight;
  }else{
    yymsp[-4].minor.yy81 = pLeft;
  }
}
        break;
      case 94: /* distinct ::= DISTINCT */
{yymsp[0].minor.yy376 = SF_Distinct;}
        break;
      case 95: /* distinct ::= ALL */
{yymsp[0].minor.yy376 = SF_All;}
        break;
      case 97: /* sclp ::= */
      case 130: /* orderby_opt ::= */ yytestcase(yyruleno==130);
      case 140: /* groupby_opt ::= */ yytestcase(yyruleno==140);
      case 227: /* exprlist ::= */ yytestcase(yyruleno==227);
      case 230: /* paren_exprlist ::= */ yytestcase(yyruleno==230);
      case 235: /* eidlist_opt ::= */ yytestcase(yyruleno==235);
{yymsp[1].minor.yy70 = 0;}
        break;
      case 98: /* selcollist ::= sclp scanpt expr scanpt as */
{
   yymsp[-4].minor.yy70 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy70, yymsp[-2].minor.yy404);
   if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy70, &yymsp[0].minor.yy0, 1);
   sqlite3ExprListSetSpan(pParse,yymsp[-4].minor.yy70,yymsp[-3].minor.yy504,yymsp[-1].minor.yy504);
}
        break;
      case 99: /* selcollist ::= sclp scanpt STAR */
{
  Expr *p = sqlite3Expr(pParse->db, TK_ASTERISK, 0);
  yymsp[-2].minor.yy70 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy70, p);
}
        break;
      case 100: /* selcollist ::= sclp scanpt nm DOT STAR */
{
  Expr *pRight = sqlite3PExpr(pParse, TK_ASTERISK, 0, 0);
  Expr *pLeft = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-2].minor.yy0, 1);
  Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight);
  yymsp[-4].minor.yy70 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy70, pDot);
}
        break;
      case 101: /* as ::= AS nm */
      case 112: /* dbnm ::= DOT nm */ yytestcase(yyruleno==112);
      case 251: /* plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==251);
      case 252: /* minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==252);
{yymsp[-1].minor.yy0 = yymsp[0].minor.yy0;}
        break;
      case 103: /* from ::= */
      case 106: /* stl_prefix ::= */ yytestcase(yyruleno==106);
{yymsp[1].minor.yy153 = 0;}
        break;
      case 104: /* from ::= FROM seltablist */
{
  yymsp[-1].minor.yy153 = yymsp[0].minor.yy153;
  sqlite3SrcListShiftJoinType(yymsp[-1].minor.yy153);
}
        break;
      case 105: /* stl_prefix ::= seltablist joinop */
{
   if( ALWAYS(yymsp[-1].minor.yy153 && yymsp[-1].minor.yy153->nSrc>0) ) yymsp[-1].minor.yy153->a[yymsp[-1].minor.yy153->nSrc-1].fg.jointype = (u8)yymsp[0].minor.yy376;
}
        break;
      case 107: /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
{
  yymsp[-6].minor.yy153 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy153,&yymsp[-5].minor.yy0,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,0,yymsp[-1].minor.yy404,yymsp[0].minor.yy436);
  sqlite3SrcListIndexedBy(pParse, yymsp[-6].minor.yy153, &yymsp[-2].minor.yy0);
}
        break;
      case 108: /* seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */
{
  yymsp[-8].minor.yy153 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-8].minor.yy153,&yymsp[-7].minor.yy0,&yymsp[-6].minor.yy0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy404,yymsp[0].minor.yy436);
  sqlite3SrcListFuncArgs(pParse, yymsp[-8].minor.yy153, yymsp[-4].minor.yy70);
}
        break;
      case 109: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */
{
    yymsp[-6].minor.yy153 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy153,0,0,&yymsp[-2].minor.yy0,yymsp[-4].minor.yy81,yymsp[-1].minor.yy404,yymsp[0].minor.yy436);
  }
        break;
      case 110: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
{
    if( yymsp[-6].minor.yy153==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy404==0 && yymsp[0].minor.yy436==0 ){
      yymsp[-6].minor.yy153 = yymsp[-4].minor.yy153;
    }else if( yymsp[-4].minor.yy153->nSrc==1 ){
      yymsp[-6].minor.yy153 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy153,0,0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy404,yymsp[0].minor.yy436);
      if( yymsp[-6].minor.yy153 ){
        SrcItem *pNew = &yymsp[-6].minor.yy153->a[yymsp[-6].minor.yy153->nSrc-1];
        SrcItem *pOld = yymsp[-4].minor.yy153->a;
        pNew->zName = pOld->zName;
        pNew->zDatabase = pOld->zDatabase;
        pNew->pSelect = pOld->pSelect;
        if( pOld->fg.isTabFunc ){
          pNew->u1.pFuncArg = pOld->u1.pFuncArg;
          pOld->u1.pFuncArg = 0;
          pOld->fg.isTabFunc = 0;
          pNew->fg.isTabFunc = 1;
        }
        pOld->zName = pOld->zDatabase = 0;
        pOld->pSelect = 0;
      }
      sqlite3SrcListDelete(pParse->db, yymsp[-4].minor.yy153);
    }else{
      Select *pSubquery;
      sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy153);
      pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy153,0,0,0,0,SF_NestedFrom,0);
      yymsp[-6].minor.yy153 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy153,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy404,yymsp[0].minor.yy436);
    }
  }
        break;
      case 111: /* dbnm ::= */
      case 125: /* indexed_opt ::= */ yytestcase(yyruleno==125);
{yymsp[1].minor.yy0.z=0; yymsp[1].minor.yy0.n=0;}
        break;
      case 113: /* fullname ::= nm */
{
  yylhsminor.yy153 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0);
  if( IN_RENAME_OBJECT && yylhsminor.yy153 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy153->a[0].zName, &yymsp[0].minor.yy0);
}
  yymsp[0].minor.yy153 = yylhsminor.yy153;
        break;
      case 114: /* fullname ::= nm DOT nm */
{
  yylhsminor.yy153 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
  if( IN_RENAME_OBJECT && yylhsminor.yy153 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy153->a[0].zName, &yymsp[0].minor.yy0);
}
  yymsp[-2].minor.yy153 = yylhsminor.yy153;
        break;
      case 115: /* xfullname ::= nm */
{yymsp[0].minor.yy153 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0); /*A-overwrites-X*/}
        break;
      case 116: /* xfullname ::= nm DOT nm */
{yymsp[-2].minor.yy153 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/}
        break;
      case 117: /* xfullname ::= nm DOT nm AS nm */
{
   yymsp[-4].minor.yy153 = sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,&yymsp[-2].minor.yy0); /*A-overwrites-X*/
   if( yymsp[-4].minor.yy153 ) yymsp[-4].minor.yy153->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
}
        break;
      case 118: /* xfullname ::= nm AS nm */
{
   yymsp[-2].minor.yy153 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,0); /*A-overwrites-X*/
   if( yymsp[-2].minor.yy153 ) yymsp[-2].minor.yy153->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
}
        break;
      case 119: /* joinop ::= COMMA|JOIN */
{ yymsp[0].minor.yy376 = JT_INNER; }
        break;
      case 120: /* joinop ::= JOIN_KW JOIN */
{yymsp[-1].minor.yy376 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0);  /*X-overwrites-A*/}
        break;
      case 121: /* joinop ::= JOIN_KW nm JOIN */
{yymsp[-2].minor.yy376 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); /*X-overwrites-A*/}
        break;
      case 122: /* joinop ::= JOIN_KW nm nm JOIN */
{yymsp[-3].minor.yy376 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);/*X-overwrites-A*/}
        break;
      case 123: /* on_opt ::= ON expr */
      case 143: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==143);
      case 150: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==150);
      case 152: /* where_opt_ret ::= WHERE expr */ yytestcase(yyruleno==152);
      case 223: /* case_else ::= ELSE expr */ yytestcase(yyruleno==223);
      case 244: /* vinto ::= INTO expr */ yytestcase(yyruleno==244);
{yymsp[-1].minor.yy404 = yymsp[0].minor.yy404;}
        break;
      case 124: /* on_opt ::= */
      case 142: /* having_opt ::= */ yytestcase(yyruleno==142);
      case 144: /* limit_opt ::= */ yytestcase(yyruleno==144);
      case 149: /* where_opt ::= */ yytestcase(yyruleno==149);
      case 151: /* where_opt_ret ::= */ yytestcase(yyruleno==151);
      case 224: /* case_else ::= */ yytestcase(yyruleno==224);
      case 226: /* case_operand ::= */ yytestcase(yyruleno==226);
      case 245: /* vinto ::= */ yytestcase(yyruleno==245);
{yymsp[1].minor.yy404 = 0;}
        break;
      case 126: /* indexed_opt ::= INDEXED BY nm */
{yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;}
        break;
      case 127: /* indexed_opt ::= NOT INDEXED */
{yymsp[-1].minor.yy0.z=0; yymsp[-1].minor.yy0.n=1;}
        break;
      case 128: /* using_opt ::= USING LP idlist RP */
{yymsp[-3].minor.yy436 = yymsp[-1].minor.yy436;}
        break;
      case 129: /* using_opt ::= */
      case 171: /* idlist_opt ::= */ yytestcase(yyruleno==171);
{yymsp[1].minor.yy436 = 0;}
        break;
      case 131: /* orderby_opt ::= ORDER BY sortlist */
      case 141: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==141);
{yymsp[-2].minor.yy70 = yymsp[0].minor.yy70;}
        break;
      case 132: /* sortlist ::= sortlist COMMA expr sortorder nulls */
{
  yymsp[-4].minor.yy70 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy70,yymsp[-2].minor.yy404);
  sqlite3ExprListSetSortOrder(yymsp[-4].minor.yy70,yymsp[-1].minor.yy376,yymsp[0].minor.yy376);
}
        break;
      case 133: /* sortlist ::= expr sortorder nulls */
{
  yymsp[-2].minor.yy70 = sqlite3ExprListAppend(pParse,0,yymsp[-2].minor.yy404); /*A-overwrites-Y*/
  sqlite3ExprListSetSortOrder(yymsp[-2].minor.yy70,yymsp[-1].minor.yy376,yymsp[0].minor.yy376);
}
        break;
      case 134: /* sortorder ::= ASC */
{yymsp[0].minor.yy376 = SQLITE_SO_ASC;}
        break;
      case 135: /* sortorder ::= DESC */
{yymsp[0].minor.yy376 = SQLITE_SO_DESC;}
        break;
      case 136: /* sortorder ::= */
      case 139: /* nulls ::= */ yytestcase(yyruleno==139);
{yymsp[1].minor.yy376 = SQLITE_SO_UNDEFINED;}
        break;
      case 137: /* nulls ::= NULLS FIRST */
{yymsp[-1].minor.yy376 = SQLITE_SO_ASC;}
        break;
      case 138: /* nulls ::= NULLS LAST */
{yymsp[-1].minor.yy376 = SQLITE_SO_DESC;}
        break;
      case 145: /* limit_opt ::= LIMIT expr */
{yymsp[-1].minor.yy404 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy404,0);}
        break;
      case 146: /* limit_opt ::= LIMIT expr OFFSET expr */
{yymsp[-3].minor.yy404 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[-2].minor.yy404,yymsp[0].minor.yy404);}
        break;
      case 147: /* limit_opt ::= LIMIT expr COMMA expr */
{yymsp[-3].minor.yy404 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy404,yymsp[-2].minor.yy404);}
        break;
      case 148: /* cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */
{
  sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy153, &yymsp[-1].minor.yy0);
  sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy153,yymsp[0].minor.yy404,0,0);
}
        break;
      case 153: /* where_opt_ret ::= RETURNING selcollist */
{sqlite3AddReturning(pParse,yymsp[0].minor.yy70); yymsp[-1].minor.yy404 = 0;}
        break;
      case 154: /* where_opt_ret ::= WHERE expr RETURNING selcollist */
{sqlite3AddReturning(pParse,yymsp[0].minor.yy70); yymsp[-3].minor.yy404 = yymsp[-2].minor.yy404;}
        break;
      case 155: /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */
{
  sqlite3SrcListIndexedBy(pParse, yymsp[-5].minor.yy153, &yymsp[-4].minor.yy0);
  sqlite3ExprListCheckLength(pParse,yymsp[-2].minor.yy70,"set list");
  yymsp[-5].minor.yy153 = sqlite3SrcListAppendList(pParse, yymsp[-5].minor.yy153, yymsp[-1].minor.yy153);
  sqlite3Update(pParse,yymsp[-5].minor.yy153,yymsp[-2].minor.yy70,yymsp[0].minor.yy404,yymsp[-6].minor.yy376,0,0,0);
}
        break;
      case 156: /* setlist ::= setlist COMMA nm EQ expr */
{
  yymsp[-4].minor.yy70 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy70, yymsp[0].minor.yy404);
  sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy70, &yymsp[-2].minor.yy0, 1);
}
        break;
      case 157: /* setlist ::= setlist COMMA LP idlist RP EQ expr */
{
  yymsp[-6].minor.yy70 = sqlite3ExprListAppendVector(pParse, yymsp[-6].minor.yy70, yymsp[-3].minor.yy436, yymsp[0].minor.yy404);
}
        break;
      case 158: /* setlist ::= nm EQ expr */
{
  yylhsminor.yy70 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy404);
  sqlite3ExprListSetName(pParse, yylhsminor.yy70, &yymsp[-2].minor.yy0, 1);
}
  yymsp[-2].minor.yy70 = yylhsminor.yy70;
        break;
      case 159: /* setlist ::= LP idlist RP EQ expr */
{
  yymsp[-4].minor.yy70 = sqlite3ExprListAppendVector(pParse, 0, yymsp[-3].minor.yy436, yymsp[0].minor.yy404);
}
        break;
      case 160: /* cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
{
  sqlite3Insert(pParse, yymsp[-3].minor.yy153, yymsp[-1].minor.yy81, yymsp[-2].minor.yy436, yymsp[-5].minor.yy376, yymsp[0].minor.yy190);
}
        break;
      case 161: /* cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */
{
  sqlite3Insert(pParse, yymsp[-4].minor.yy153, 0, yymsp[-3].minor.yy436, yymsp[-6].minor.yy376, 0);
}
        break;
      case 162: /* upsert ::= */
{ yymsp[1].minor.yy190 = 0; }
        break;
      case 163: /* upsert ::= RETURNING selcollist */
{ yymsp[-1].minor.yy190 = 0; sqlite3AddReturning(pParse,yymsp[0].minor.yy70); }
        break;
      case 164: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */
{ yymsp[-11].minor.yy190 = sqlite3UpsertNew(pParse->db,yymsp[-8].minor.yy70,yymsp[-6].minor.yy404,yymsp[-2].minor.yy70,yymsp[-1].minor.yy404,yymsp[0].minor.yy190);}
        break;
      case 165: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */
{ yymsp[-8].minor.yy190 = sqlite3UpsertNew(pParse->db,yymsp[-5].minor.yy70,yymsp[-3].minor.yy404,0,0,yymsp[0].minor.yy190); }
        break;
      case 166: /* upsert ::= ON CONFLICT DO NOTHING returning */
{ yymsp[-4].minor.yy190 = sqlite3UpsertNew(pParse->db,0,0,0,0,0); }
        break;
      case 167: /* upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */
{ yymsp[-7].minor.yy190 = sqlite3UpsertNew(pParse->db,0,0,yymsp[-2].minor.yy70,yymsp[-1].minor.yy404,0);}
        break;
      case 168: /* returning ::= RETURNING selcollist */
{sqlite3AddReturning(pParse,yymsp[0].minor.yy70);}
        break;
      case 172: /* idlist_opt ::= LP idlist RP */
{yymsp[-2].minor.yy436 = yymsp[-1].minor.yy436;}
        break;
      case 173: /* idlist ::= idlist COMMA nm */
{yymsp[-2].minor.yy436 = sqlite3IdListAppend(pParse,yymsp[-2].minor.yy436,&yymsp[0].minor.yy0);}
        break;
      case 174: /* idlist ::= nm */
{yymsp[0].minor.yy436 = sqlite3IdListAppend(pParse,0,&yymsp[0].minor.yy0); /*A-overwrites-Y*/}
        break;
      case 175: /* expr ::= LP expr RP */
{yymsp[-2].minor.yy404 = yymsp[-1].minor.yy404;}
        break;
      case 176: /* expr ::= ID|INDEXED */
      case 177: /* expr ::= JOIN_KW */ yytestcase(yyruleno==177);
{yymsp[0].minor.yy404=tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0); /*A-overwrites-X*/}
        break;
      case 178: /* expr ::= nm DOT nm */
{
  Expr *temp1 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-2].minor.yy0, 1);
  Expr *temp2 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[0].minor.yy0, 1);
  if( IN_RENAME_OBJECT ){
    sqlite3RenameTokenMap(pParse, (void*)temp2, &yymsp[0].minor.yy0);
    sqlite3RenameTokenMap(pParse, (void*)temp1, &yymsp[-2].minor.yy0);
  }
  yylhsminor.yy404 = sqlite3PExpr(pParse, TK_DOT, temp1, temp2);
}
  yymsp[-2].minor.yy404 = yylhsminor.yy404;
        break;
      case 179: /* expr ::= nm DOT nm DOT nm */
{
  Expr *temp1 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-4].minor.yy0, 1);
  Expr *temp2 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-2].minor.yy0, 1);
  Expr *temp3 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[0].minor.yy0, 1);
  Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3);
  if( IN_RENAME_OBJECT ){
    sqlite3RenameTokenMap(pParse, (void*)temp3, &yymsp[0].minor.yy0);
    sqlite3RenameTokenMap(pParse, (void*)temp2, &yymsp[-2].minor.yy0);
  }
  yylhsminor.yy404 = sqlite3PExpr(pParse, TK_DOT, temp1, temp4);
}
  yymsp[-4].minor.yy404 = yylhsminor.yy404;
        break;
      case 180: /* term ::= NULL|FLOAT|BLOB */
      case 181: /* term ::= STRING */ yytestcase(yyruleno==181);
{yymsp[0].minor.yy404=tokenExpr(pParse,yymsp[0].major,yymsp[0].minor.yy0); /*A-overwrites-X*/}
        break;
      case 182: /* term ::= INTEGER */
{
  yylhsminor.yy404 = sqlite3ExprAlloc(pParse->db, TK_INTEGER, &yymsp[0].minor.yy0, 1);
}
  yymsp[0].minor.yy404 = yylhsminor.yy404;
        break;
      case 183: /* expr ::= VARIABLE */
{
  if( !(yymsp[0].minor.yy0.z[0]=='#' && sqlite3Isdigit(yymsp[0].minor.yy0.z[1])) ){
    u32 n = yymsp[0].minor.yy0.n;
    yymsp[0].minor.yy404 = tokenExpr(pParse, TK_VARIABLE, yymsp[0].minor.yy0);
    sqlite3ExprAssignVarNumber(pParse, yymsp[0].minor.yy404, n);
  }else{
    /* When doing a nested parse, one can include terms in an expression
    ** that look like this:   #1 #2 ...  These terms refer to registers
    ** in the virtual machine.  #N is the N-th register. */
    Token t = yymsp[0].minor.yy0; /*A-overwrites-X*/
    assert( t.n>=2 );
    if( pParse->nested==0 ){
      sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &t);
      yymsp[0].minor.yy404 = 0;
    }else{
      yymsp[0].minor.yy404 = sqlite3PExpr(pParse, TK_REGISTER, 0, 0);
      if( yymsp[0].minor.yy404 ) sqlite3GetInt32(&t.z[1], &yymsp[0].minor.yy404->iTable);
    }
  }
}
        break;
      case 184: /* expr ::= expr COLLATE ID|STRING */
{
  yymsp[-2].minor.yy404 = sqlite3ExprAddCollateToken(pParse, yymsp[-2].minor.yy404, &yymsp[0].minor.yy0, 1);
}
        break;
      case 185: /* expr ::= CAST LP expr AS typetoken RP */
{
  yymsp[-5].minor.yy404 = sqlite3ExprAlloc(pParse->db, TK_CAST, &yymsp[-1].minor.yy0, 1);
  sqlite3ExprAttachSubtrees(pParse->db, yymsp[-5].minor.yy404, yymsp[-3].minor.yy404, 0);
}
        break;
      case 186: /* expr ::= ID|INDEXED LP distinct exprlist RP */
{
  yylhsminor.yy404 = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy70, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy376);
}
  yymsp[-4].minor.yy404 = yylhsminor.yy404;
        break;
      case 187: /* expr ::= ID|INDEXED LP STAR RP */
{
  yylhsminor.yy404 = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0, 0);
}
  yymsp[-3].minor.yy404 = yylhsminor.yy404;
        break;
      case 188: /* expr ::= ID|INDEXED LP distinct exprlist RP filter_over */
{
  yylhsminor.yy404 = sqlite3ExprFunction(pParse, yymsp[-2].minor.yy70, &yymsp[-5].minor.yy0, yymsp[-3].minor.yy376);
  sqlite3WindowAttach(pParse, yylhsminor.yy404, yymsp[0].minor.yy49);
}
  yymsp[-5].minor.yy404 = yylhsminor.yy404;
        break;
      case 189: /* expr ::= ID|INDEXED LP STAR RP filter_over */
{
  yylhsminor.yy404 = sqlite3ExprFunction(pParse, 0, &yymsp[-4].minor.yy0, 0);
  sqlite3WindowAttach(pParse, yylhsminor.yy404, yymsp[0].minor.yy49);
}
  yymsp[-4].minor.yy404 = yylhsminor.yy404;
        break;
      case 190: /* term ::= CTIME_KW */
{
  yylhsminor.yy404 = sqlite3ExprFunction(pParse, 0, &yymsp[0].minor.yy0, 0);
}
  yymsp[0].minor.yy404 = yylhsminor.yy404;
        break;
      case 191: /* expr ::= LP nexprlist COMMA expr RP */
{
  ExprList *pList = sqlite3ExprListAppend(pParse, yymsp[-3].minor.yy70, yymsp[-1].minor.yy404);
  yymsp[-4].minor.yy404 = sqlite3PExpr(pParse, TK_VECTOR, 0, 0);
  if( yymsp[-4].minor.yy404 ){
    yymsp[-4].minor.yy404->x.pList = pList;
    if( ALWAYS(pList->nExpr) ){
      yymsp[-4].minor.yy404->flags |= pList->a[0].pExpr->flags & EP_Propagate;
    }
  }else{
    sqlite3ExprListDelete(pParse->db, pList);
  }
}
        break;
      case 192: /* expr ::= expr AND expr */
{yymsp[-2].minor.yy404=sqlite3ExprAnd(pParse,yymsp[-2].minor.yy404,yymsp[0].minor.yy404);}
        break;
      case 193: /* expr ::= expr OR expr */
      case 194: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==194);
      case 195: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==195);
      case 196: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==196);
      case 197: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==197);
      case 198: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==198);
      case 199: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==199);
{yymsp[-2].minor.yy404=sqlite3PExpr(pParse,yymsp[-1].major,yymsp[-2].minor.yy404,yymsp[0].minor.yy404);}
        break;
      case 200: /* likeop ::= NOT LIKE_KW|MATCH */
{yymsp[-1].minor.yy0=yymsp[0].minor.yy0; yymsp[-1].minor.yy0.n|=0x80000000; /*yymsp[-1].minor.yy0-overwrite-yymsp[0].minor.yy0*/}
        break;
      case 201: /* expr ::= expr likeop expr */
{
  ExprList *pList;
  int bNot = yymsp[-1].minor.yy0.n & 0x80000000;
  yymsp[-1].minor.yy0.n &= 0x7fffffff;
  pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy404);
  pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy404);
  yymsp[-2].minor.yy404 = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy0, 0);
  if( bNot ) yymsp[-2].minor.yy404 = sqlite3PExpr(pParse, TK_NOT, yymsp[-2].minor.yy404, 0);
  if( yymsp[-2].minor.yy404 ) yymsp[-2].minor.yy404->flags |= EP_InfixFunc;
}
        break;
      case 202: /* expr ::= expr likeop expr ESCAPE expr */
{
  ExprList *pList;
  int bNot = yymsp[-3].minor.yy0.n & 0x80000000;
  yymsp[-3].minor.yy0.n &= 0x7fffffff;
  pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy404);
  pList = sqlite3ExprListAppend(pParse,pList, yymsp[-4].minor.yy404);
  pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy404);
  yymsp[-4].minor.yy404 = sqlite3ExprFunction(pParse, pList, &yymsp[-3].minor.yy0, 0);
  if( bNot ) yymsp[-4].minor.yy404 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy404, 0);
  if( yymsp[-4].minor.yy404 ) yymsp[-4].minor.yy404->flags |= EP_InfixFunc;
}
        break;
      case 203: /* expr ::= expr ISNULL|NOTNULL */
{yymsp[-1].minor.yy404 = sqlite3PExpr(pParse,yymsp[0].major,yymsp[-1].minor.yy404,0);}
        break;
      case 204: /* expr ::= expr NOT NULL */
{yymsp[-2].minor.yy404 = sqlite3PExpr(pParse,TK_NOTNULL,yymsp[-2].minor.yy404,0);}
        break;
      case 205: /* expr ::= expr IS expr */
{
  yymsp[-2].minor.yy404 = sqlite3PExpr(pParse,TK_IS,yymsp[-2].minor.yy404,yymsp[0].minor.yy404);
  binaryToUnaryIfNull(pParse, yymsp[0].minor.yy404, yymsp[-2].minor.yy404, TK_ISNULL);
}
        break;
      case 206: /* expr ::= expr IS NOT expr */
{
  yymsp[-3].minor.yy404 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-3].minor.yy404,yymsp[0].minor.yy404);
  binaryToUnaryIfNull(pParse, yymsp[0].minor.yy404, yymsp[-3].minor.yy404, TK_NOTNULL);
}
        break;
      case 207: /* expr ::= NOT expr */
      case 208: /* expr ::= BITNOT expr */ yytestcase(yyruleno==208);
{yymsp[-1].minor.yy404 = sqlite3PExpr(pParse, yymsp[-1].major, yymsp[0].minor.yy404, 0);/*A-overwrites-B*/}
        break;
      case 209: /* expr ::= PLUS|MINUS expr */
{
  yymsp[-1].minor.yy404 = sqlite3PExpr(pParse, yymsp[-1].major==TK_PLUS ? TK_UPLUS : TK_UMINUS, yymsp[0].minor.yy404, 0);
  /*A-overwrites-B*/
}
        break;
      case 210: /* between_op ::= BETWEEN */
      case 213: /* in_op ::= IN */ yytestcase(yyruleno==213);
{yymsp[0].minor.yy376 = 0;}
        break;
      case 212: /* expr ::= expr between_op expr AND expr */
{
  ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy404);
  pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy404);
  yymsp[-4].minor.yy404 = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy404, 0);
  if( yymsp[-4].minor.yy404 ){
    yymsp[-4].minor.yy404->x.pList = pList;
  }else{
    sqlite3ExprListDelete(pParse->db, pList);
  }
  if( yymsp[-3].minor.yy376 ) yymsp[-4].minor.yy404 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy404, 0);
}
        break;
      case 215: /* expr ::= expr in_op LP exprlist RP */
{
    if( yymsp[-1].minor.yy70==0 ){
      /* Expressions of the form
      **
      **      expr1 IN ()
      **      expr1 NOT IN ()
      **
      ** simplify to constants 0 (false) and 1 (true), respectively,
      ** regardless of the value of expr1.
      */
      sqlite3ExprUnmapAndDelete(pParse, yymsp[-4].minor.yy404);
      yymsp[-4].minor.yy404 = sqlite3Expr(pParse->db, TK_INTEGER, yymsp[-3].minor.yy376 ? "1" : "0");
    }else{
      Expr *pRHS = yymsp[-1].minor.yy70->a[0].pExpr;
      if( yymsp[-1].minor.yy70->nExpr==1 && sqlite3ExprIsConstant(pRHS) && yymsp[-4].minor.yy404->op!=TK_VECTOR ){
        yymsp[-1].minor.yy70->a[0].pExpr = 0;
        sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy70);
        pRHS = sqlite3PExpr(pParse, TK_UPLUS, pRHS, 0);
        yymsp[-4].minor.yy404 = sqlite3PExpr(pParse, TK_EQ, yymsp[-4].minor.yy404, pRHS);
      }else{
        yymsp[-4].minor.yy404 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy404, 0);
        if( yymsp[-4].minor.yy404==0 ){
          sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy70);
        }else if( yymsp[-4].minor.yy404->pLeft->op==TK_VECTOR ){
          int nExpr = yymsp[-4].minor.yy404->pLeft->x.pList->nExpr;
          Select *pSelectRHS = sqlite3ExprListToValues(pParse, nExpr, yymsp[-1].minor.yy70);
          if( pSelectRHS ){
            parserDoubleLinkSelect(pParse, pSelectRHS);
            sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy404, pSelectRHS);
          }
        }else{
          yymsp[-4].minor.yy404->x.pList = yymsp[-1].minor.yy70;
          sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy404);
        }
      }
      if( yymsp[-3].minor.yy376 ) yymsp[-4].minor.yy404 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy404, 0);
    }
  }
        break;
      case 216: /* expr ::= LP select RP */
{
    yymsp[-2].minor.yy404 = sqlite3PExpr(pParse, TK_SELECT, 0, 0);
    sqlite3PExprAddSelect(pParse, yymsp[-2].minor.yy404, yymsp[-1].minor.yy81);
  }
        break;
      case 217: /* expr ::= expr in_op LP select RP */
{
    yymsp[-4].minor.yy404 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy404, 0);
    sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy404, yymsp[-1].minor.yy81);
    if( yymsp[-3].minor.yy376 ) yymsp[-4].minor.yy404 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy404, 0);
  }
        break;
      case 218: /* expr ::= expr in_op nm dbnm paren_exprlist */
{
    SrcList *pSrc = sqlite3SrcListAppend(pParse, 0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);
    Select *pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0);
    if( yymsp[0].minor.yy70 )  sqlite3SrcListFuncArgs(pParse, pSelect ? pSrc : 0, yymsp[0].minor.yy70);
    yymsp[-4].minor.yy404 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy404, 0);
    sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy404, pSelect);
    if( yymsp[-3].minor.yy376 ) yymsp[-4].minor.yy404 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy404, 0);
  }
        break;
      case 219: /* expr ::= EXISTS LP select RP */
{
    Expr *p;
    p = yymsp[-3].minor.yy404 = sqlite3PExpr(pParse, TK_EXISTS, 0, 0);
    sqlite3PExprAddSelect(pParse, p, yymsp[-1].minor.yy81);
  }
        break;
      case 220: /* expr ::= CASE case_operand case_exprlist case_else END */
{
  yymsp[-4].minor.yy404 = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy404, 0);
  if( yymsp[-4].minor.yy404 ){
    yymsp[-4].minor.yy404->x.pList = yymsp[-1].minor.yy404 ? sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy70,yymsp[-1].minor.yy404) : yymsp[-2].minor.yy70;
    sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy404);
  }else{
    sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy70);
    sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy404);
  }
}
        break;
      case 221: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
{
  yymsp[-4].minor.yy70 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy70, yymsp[-2].minor.yy404);
  yymsp[-4].minor.yy70 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy70, yymsp[0].minor.yy404);
}
        break;
      case 222: /* case_exprlist ::= WHEN expr THEN expr */
{
  yymsp[-3].minor.yy70 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy404);
  yymsp[-3].minor.yy70 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy70, yymsp[0].minor.yy404);
}
        break;
      case 225: /* case_operand ::= expr */
{yymsp[0].minor.yy404 = yymsp[0].minor.yy404; /*A-overwrites-X*/}
        break;
      case 228: /* nexprlist ::= nexprlist COMMA expr */
{yymsp[-2].minor.yy70 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy70,yymsp[0].minor.yy404);}
        break;
      case 229: /* nexprlist ::= expr */
{yymsp[0].minor.yy70 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy404); /*A-overwrites-Y*/}
        break;
      case 231: /* paren_exprlist ::= LP exprlist RP */
      case 236: /* eidlist_opt ::= LP eidlist RP */ yytestcase(yyruleno==236);
{yymsp[-2].minor.yy70 = yymsp[-1].minor.yy70;}
        break;
      case 232: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
{
  sqlite3CreateIndex(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0,
                     sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,0), yymsp[-2].minor.yy70, yymsp[-10].minor.yy376,
                      &yymsp[-11].minor.yy0, yymsp[0].minor.yy404, SQLITE_SO_ASC, yymsp[-8].minor.yy376, SQLITE_IDXTYPE_APPDEF);
  if( IN_RENAME_OBJECT && pParse->pNewIndex ){
    sqlite3RenameTokenMap(pParse, pParse->pNewIndex->zName, &yymsp[-4].minor.yy0);
  }
}
        break;
      case 233: /* uniqueflag ::= UNIQUE */
      case 275: /* raisetype ::= ABORT */ yytestcase(yyruleno==275);
{yymsp[0].minor.yy376 = OE_Abort;}
        break;
      case 234: /* uniqueflag ::= */
{yymsp[1].minor.yy376 = OE_None;}
        break;
      case 237: /* eidlist ::= eidlist COMMA nm collate sortorder */
{
  yymsp[-4].minor.yy70 = parserAddExprIdListTerm(pParse, yymsp[-4].minor.yy70, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy376, yymsp[0].minor.yy376);
}
        break;
      case 238: /* eidlist ::= nm collate sortorder */
{
  yymsp[-2].minor.yy70 = parserAddExprIdListTerm(pParse, 0, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy376, yymsp[0].minor.yy376); /*A-overwrites-Y*/
}
        break;
      case 241: /* cmd ::= DROP INDEX ifexists fullname */
{sqlite3DropIndex(pParse, yymsp[0].minor.yy153, yymsp[-1].minor.yy376);}
        break;
      case 242: /* cmd ::= VACUUM vinto */
{sqlite3Vacuum(pParse,0,yymsp[0].minor.yy404);}
        break;
      case 243: /* cmd ::= VACUUM nm vinto */
{sqlite3Vacuum(pParse,&yymsp[-1].minor.yy0,yymsp[0].minor.yy404);}
        break;
      case 246: /* cmd ::= PRAGMA nm dbnm */
{sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);}
        break;
      case 247: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);}
        break;
      case 248: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);}
        break;
      case 249: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);}
        break;
      case 250: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);}
        break;
      case 253: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
{
  Token all;
  all.z = yymsp[-3].minor.yy0.z;
  all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n;
  sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy157, &all);
}
        break;
      case 254: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
{
  sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy376, yymsp[-4].minor.yy262.a, yymsp[-4].minor.yy262.b, yymsp[-2].minor.yy153, yymsp[0].minor.yy404, yymsp[-10].minor.yy376, yymsp[-8].minor.yy376);
  yymsp[-10].minor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0); /*A-overwrites-T*/
}
        break;
      case 255: /* trigger_time ::= BEFORE|AFTER */
{ yymsp[0].minor.yy376 = yymsp[0].major; /*A-overwrites-X*/ }
        break;
      case 256: /* trigger_time ::= INSTEAD OF */
{ yymsp[-1].minor.yy376 = TK_INSTEAD;}
        break;
      case 257: /* trigger_time ::= */
{ yymsp[1].minor.yy376 = TK_BEFORE; }
        break;
      case 258: /* trigger_event ::= DELETE|INSERT */
      case 259: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==259);
{yymsp[0].minor.yy262.a = yymsp[0].major; /*A-overwrites-X*/ yymsp[0].minor.yy262.b = 0;}
        break;
      case 260: /* trigger_event ::= UPDATE OF idlist */
{yymsp[-2].minor.yy262.a = TK_UPDATE; yymsp[-2].minor.yy262.b = yymsp[0].minor.yy436;}
        break;
      case 261: /* when_clause ::= */
      case 280: /* key_opt ::= */ yytestcase(yyruleno==280);
{ yymsp[1].minor.yy404 = 0; }
        break;
      case 262: /* when_clause ::= WHEN expr */
      case 281: /* key_opt ::= KEY expr */ yytestcase(yyruleno==281);
{ yymsp[-1].minor.yy404 = yymsp[0].minor.yy404; }
        break;
      case 263: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
{
  assert( yymsp[-2].minor.yy157!=0 );
  yymsp[-2].minor.yy157->pLast->pNext = yymsp[-1].minor.yy157;
  yymsp[-2].minor.yy157->pLast = yymsp[-1].minor.yy157;
}
        break;
      case 264: /* trigger_cmd_list ::= trigger_cmd SEMI */
{
  assert( yymsp[-1].minor.yy157!=0 );
  yymsp[-1].minor.yy157->pLast = yymsp[-1].minor.yy157;
}
        break;
      case 265: /* trnm ::= nm DOT nm */
{
  yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;
  sqlite3ErrorMsg(pParse,
        "qualified table names are not allowed on INSERT, UPDATE, and DELETE "
        "statements within triggers");
}
        break;
      case 266: /* tridxby ::= INDEXED BY nm */
{
  sqlite3ErrorMsg(pParse,
        "the INDEXED BY clause is not allowed on UPDATE or DELETE statements "
        "within triggers");
}
        break;
      case 267: /* tridxby ::= NOT INDEXED */
{
  sqlite3ErrorMsg(pParse,
        "the NOT INDEXED clause is not allowed on UPDATE or DELETE statements "
        "within triggers");
}
        break;
      case 268: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */
{yylhsminor.yy157 = sqlite3TriggerUpdateStep(pParse, &yymsp[-6].minor.yy0, yymsp[-2].minor.yy153, yymsp[-3].minor.yy70, yymsp[-1].minor.yy404, yymsp[-7].minor.yy376, yymsp[-8].minor.yy0.z, yymsp[0].minor.yy504);}
  yymsp[-8].minor.yy157 = yylhsminor.yy157;
        break;
      case 269: /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
{
   yylhsminor.yy157 = sqlite3TriggerInsertStep(pParse,&yymsp[-4].minor.yy0,yymsp[-3].minor.yy436,yymsp[-2].minor.yy81,yymsp[-6].minor.yy376,yymsp[-1].minor.yy190,yymsp[-7].minor.yy504,yymsp[0].minor.yy504);/*yylhsminor.yy157-overwrites-yymsp[-6].minor.yy376*/
}
  yymsp[-7].minor.yy157 = yylhsminor.yy157;
        break;
      case 270: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
{yylhsminor.yy157 = sqlite3TriggerDeleteStep(pParse, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy404, yymsp[-5].minor.yy0.z, yymsp[0].minor.yy504);}
  yymsp[-5].minor.yy157 = yylhsminor.yy157;
        break;
      case 271: /* trigger_cmd ::= scanpt select scanpt */
{yylhsminor.yy157 = sqlite3TriggerSelectStep(pParse->db, yymsp[-1].minor.yy81, yymsp[-2].minor.yy504, yymsp[0].minor.yy504); /*yylhsminor.yy157-overwrites-yymsp[-1].minor.yy81*/}
  yymsp[-2].minor.yy157 = yylhsminor.yy157;
        break;
      case 272: /* expr ::= RAISE LP IGNORE RP */
{
  yymsp[-3].minor.yy404 = sqlite3PExpr(pParse, TK_RAISE, 0, 0);
  if( yymsp[-3].minor.yy404 ){
    yymsp[-3].minor.yy404->affExpr = OE_Ignore;
  }
}
        break;
      case 273: /* expr ::= RAISE LP raisetype COMMA nm RP */
{
  yymsp[-5].minor.yy404 = sqlite3ExprAlloc(pParse->db, TK_RAISE, &yymsp[-1].minor.yy0, 1);
  if( yymsp[-5].minor.yy404 ) {
    yymsp[-5].minor.yy404->affExpr = (char)yymsp[-3].minor.yy376;
  }
}
        break;
      case 274: /* raisetype ::= ROLLBACK */
{yymsp[0].minor.yy376 = OE_Rollback;}
        break;
      case 276: /* raisetype ::= FAIL */
{yymsp[0].minor.yy376 = OE_Fail;}
        break;
      case 277: /* cmd ::= DROP TRIGGER ifexists fullname */
{
  sqlite3DropTrigger(pParse,yymsp[0].minor.yy153,yymsp[-1].minor.yy376);
}
        break;
      case 278: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
{
  sqlite3Attach(pParse, yymsp[-3].minor.yy404, yymsp[-1].minor.yy404, yymsp[0].minor.yy404);
}
        break;
      case 279: /* cmd ::= DETACH database_kw_opt expr */
{
  sqlite3Detach(pParse, yymsp[0].minor.yy404);
}
        break;
      case 282: /* cmd ::= REINDEX */
{sqlite3Reindex(pParse, 0, 0);}
        break;
      case 283: /* cmd ::= REINDEX nm dbnm */
{sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
        break;
      case 284: /* cmd ::= ANALYZE */
{sqlite3Analyze(pParse, 0, 0);}
        break;
      case 285: /* cmd ::= ANALYZE nm dbnm */
{sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
        break;
      case 286: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
{
  sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy153,&yymsp[0].minor.yy0);
}
        break;
      case 287: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
{
  yymsp[-1].minor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-1].minor.yy0.z) + pParse->sLastToken.n;
  sqlite3AlterFinishAddColumn(pParse, &yymsp[-1].minor.yy0);
}
        break;
      case 288: /* cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
{
  sqlite3AlterDropColumn(pParse, yymsp[-3].minor.yy153, &yymsp[0].minor.yy0);
}
        break;
      case 289: /* add_column_fullname ::= fullname */
{
  disableLookaside(pParse);
  sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy153);
}
        break;
      case 290: /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
{
  sqlite3AlterRenameColumn(pParse, yymsp[-5].minor.yy153, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
}
        break;
      case 291: /* cmd ::= create_vtab */
{sqlite3VtabFinishParse(pParse,0);}
        break;
      case 292: /* cmd ::= create_vtab LP vtabarglist RP */
{sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}
        break;
      case 293: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
{
    sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy376);
}
        break;
      case 294: /* vtabarg ::= */
{sqlite3VtabArgInit(pParse);}
        break;
      case 295: /* vtabargtoken ::= ANY */
      case 296: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==296);
      case 297: /* lp ::= LP */ yytestcase(yyruleno==297);
{sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}
        break;
      case 298: /* with ::= WITH wqlist */
      case 299: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==299);
{ sqlite3WithPush(pParse, yymsp[0].minor.yy103, 1); }
        break;
      case 300: /* wqas ::= AS */
{yymsp[0].minor.yy552 = M10d_Any;}
        break;
      case 301: /* wqas ::= AS MATERIALIZED */
{yymsp[-1].minor.yy552 = M10d_Yes;}
        break;
      case 302: /* wqas ::= AS NOT MATERIALIZED */
{yymsp[-2].minor.yy552 = M10d_No;}
        break;
      case 303: /* wqitem ::= nm eidlist_opt wqas LP select RP */
{
  yymsp[-5].minor.yy329 = sqlite3CteNew(pParse, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy70, yymsp[-1].minor.yy81, yymsp[-3].minor.yy552); /*A-overwrites-X*/
}
        break;
      case 304: /* wqlist ::= wqitem */
{
  yymsp[0].minor.yy103 = sqlite3WithAdd(pParse, 0, yymsp[0].minor.yy329); /*A-overwrites-X*/
}
        break;
      case 305: /* wqlist ::= wqlist COMMA wqitem */
{
  yymsp[-2].minor.yy103 = sqlite3WithAdd(pParse, yymsp[-2].minor.yy103, yymsp[0].minor.yy329);
}
        break;
      case 306: /* windowdefn_list ::= windowdefn */
{ yylhsminor.yy49 = yymsp[0].minor.yy49; }
  yymsp[0].minor.yy49 = yylhsminor.yy49;
        break;
      case 307: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */
{
  assert( yymsp[0].minor.yy49!=0 );
  sqlite3WindowChain(pParse, yymsp[0].minor.yy49, yymsp[-2].minor.yy49);
  yymsp[0].minor.yy49->pNextWin = yymsp[-2].minor.yy49;
  yylhsminor.yy49 = yymsp[0].minor.yy49;
}
  yymsp[-2].minor.yy49 = yylhsminor.yy49;
        break;
      case 308: /* windowdefn ::= nm AS LP window RP */
{
  if( ALWAYS(yymsp[-1].minor.yy49) ){
    yymsp[-1].minor.yy49->zName = sqlite3DbStrNDup(pParse->db, yymsp[-4].minor.yy0.z, yymsp[-4].minor.yy0.n);
  }
  yylhsminor.yy49 = yymsp[-1].minor.yy49;
}
  yymsp[-4].minor.yy49 = yylhsminor.yy49;
        break;
      case 309: /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */
{
  yymsp[-4].minor.yy49 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy49, yymsp[-2].minor.yy70, yymsp[-1].minor.yy70, 0);
}
        break;
      case 310: /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
{
  yylhsminor.yy49 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy49, yymsp[-2].minor.yy70, yymsp[-1].minor.yy70, &yymsp[-5].minor.yy0);
}
  yymsp[-5].minor.yy49 = yylhsminor.yy49;
        break;
      case 311: /* window ::= ORDER BY sortlist frame_opt */
{
  yymsp[-3].minor.yy49 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy49, 0, yymsp[-1].minor.yy70, 0);
}
        break;
      case 312: /* window ::= nm ORDER BY sortlist frame_opt */
{
  yylhsminor.yy49 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy49, 0, yymsp[-1].minor.yy70, &yymsp[-4].minor.yy0);
}
  yymsp[-4].minor.yy49 = yylhsminor.yy49;
        break;
      case 313: /* window ::= frame_opt */
      case 332: /* filter_over ::= over_clause */ yytestcase(yyruleno==332);
{
  yylhsminor.yy49 = yymsp[0].minor.yy49;
}
  yymsp[0].minor.yy49 = yylhsminor.yy49;
        break;
      case 314: /* window ::= nm frame_opt */
{
  yylhsminor.yy49 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy49, 0, 0, &yymsp[-1].minor.yy0);
}
  yymsp[-1].minor.yy49 = yylhsminor.yy49;
        break;
      case 315: /* frame_opt ::= */
{
  yymsp[1].minor.yy49 = sqlite3WindowAlloc(pParse, 0, TK_UNBOUNDED, 0, TK_CURRENT, 0, 0);
}
        break;
      case 316: /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
{
  yylhsminor.yy49 = sqlite3WindowAlloc(pParse, yymsp[-2].minor.yy376, yymsp[-1].minor.yy117.eType, yymsp[-1].minor.yy117.pExpr, TK_CURRENT, 0, yymsp[0].minor.yy552);
}
  yymsp[-2].minor.yy49 = yylhsminor.yy49;
        break;
      case 317: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
{
  yylhsminor.yy49 = sqlite3WindowAlloc(pParse, yymsp[-5].minor.yy376, yymsp[-3].minor.yy117.eType, yymsp[-3].minor.yy117.pExpr, yymsp[-1].minor.yy117.eType, yymsp[-1].minor.yy117.pExpr, yymsp[0].minor.yy552);
}
  yymsp[-5].minor.yy49 = yylhsminor.yy49;
        break;
      case 319: /* frame_bound_s ::= frame_bound */
      case 321: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==321);
{yylhsminor.yy117 = yymsp[0].minor.yy117;}
  yymsp[0].minor.yy117 = yylhsminor.yy117;
        break;
      case 320: /* frame_bound_s ::= UNBOUNDED PRECEDING */
      case 322: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==322);
      case 324: /* frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==324);
{yylhsminor.yy117.eType = yymsp[-1].major; yylhsminor.yy117.pExpr = 0;}
  yymsp[-1].minor.yy117 = yylhsminor.yy117;
        break;
      case 323: /* frame_bound ::= expr PRECEDING|FOLLOWING */
{yylhsminor.yy117.eType = yymsp[0].major; yylhsminor.yy117.pExpr = yymsp[-1].minor.yy404;}
  yymsp[-1].minor.yy117 = yylhsminor.yy117;
        break;
      case 325: /* frame_exclude_opt ::= */
{yymsp[1].minor.yy552 = 0;}
        break;
      case 326: /* frame_exclude_opt ::= EXCLUDE frame_exclude */
{yymsp[-1].minor.yy552 = yymsp[0].minor.yy552;}
        break;
      case 327: /* frame_exclude ::= NO OTHERS */
      case 328: /* frame_exclude ::= CURRENT ROW */ yytestcase(yyruleno==328);
{yymsp[-1].minor.yy552 = yymsp[-1].major; /*A-overwrites-X*/}
        break;
      case 329: /* frame_exclude ::= GROUP|TIES */
{yymsp[0].minor.yy552 = yymsp[0].major; /*A-overwrites-X*/}
        break;
      case 330: /* window_clause ::= WINDOW windowdefn_list */
{ yymsp[-1].minor.yy49 = yymsp[0].minor.yy49; }
        break;
      case 331: /* filter_over ::= filter_clause over_clause */
{
  if( yymsp[0].minor.yy49 ){
    yymsp[0].minor.yy49->pFilter = yymsp[-1].minor.yy404;
  }else{
    sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy404);
  }
  yylhsminor.yy49 = yymsp[0].minor.yy49;
}
  yymsp[-1].minor.yy49 = yylhsminor.yy49;
        break;
      case 333: /* filter_over ::= filter_clause */
{
  yylhsminor.yy49 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
  if( yylhsminor.yy49 ){
    yylhsminor.yy49->eFrmType = TK_FILTER;
    yylhsminor.yy49->pFilter = yymsp[0].minor.yy404;
  }else{
    sqlite3ExprDelete(pParse->db, yymsp[0].minor.yy404);
  }
}
  yymsp[0].minor.yy49 = yylhsminor.yy49;
        break;
      case 334: /* over_clause ::= OVER LP window RP */
{
  yymsp[-3].minor.yy49 = yymsp[-1].minor.yy49;
  assert( yymsp[-3].minor.yy49!=0 );
}
        break;
      case 335: /* over_clause ::= OVER nm */
{
  yymsp[-1].minor.yy49 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
  if( yymsp[-1].minor.yy49 ){
    yymsp[-1].minor.yy49->zName = sqlite3DbStrNDup(pParse->db, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n);
  }
}
        break;
      case 336: /* filter_clause ::= FILTER LP WHERE expr RP */
{ yymsp[-4].minor.yy404 = yymsp[-1].minor.yy404; }
        break;
      default:
      /* (337) input ::= cmdlist */ yytestcase(yyruleno==337);
      /* (338) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==338);
      /* (339) cmdlist ::= ecmd (OPTIMIZED OUT) */ assert(yyruleno!=339);
      /* (340) ecmd ::= SEMI */ yytestcase(yyruleno==340);
      /* (341) ecmd ::= cmdx SEMI */ yytestcase(yyruleno==341);
      /* (342) ecmd ::= explain cmdx SEMI (NEVER REDUCES) */ assert(yyruleno!=342);
      /* (343) trans_opt ::= */ yytestcase(yyruleno==343);
      /* (344) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==344);
      /* (345) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==345);
      /* (346) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==346);
      /* (347) savepoint_opt ::= */ yytestcase(yyruleno==347);
      /* (348) cmd ::= create_table create_table_args */ yytestcase(yyruleno==348);

      /* (349) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==349);
      /* (350) columnlist ::= columnname carglist */ yytestcase(yyruleno==350);
      /* (351) nm ::= ID|INDEXED */ yytestcase(yyruleno==351);
      /* (352) nm ::= STRING */ yytestcase(yyruleno==352);
      /* (353) nm ::= JOIN_KW */ yytestcase(yyruleno==353);
      /* (354) typetoken ::= typename */ yytestcase(yyruleno==354);
      /* (355) typename ::= ID|STRING */ yytestcase(yyruleno==355);
      /* (356) signed ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=356);
      /* (357) signed ::= minus_num (OPTIMIZED OUT) */ assert(yyruleno!=357);
      /* (358) carglist ::= carglist ccons */ yytestcase(yyruleno==358);
      /* (359) carglist ::= */ yytestcase(yyruleno==359);
      /* (360) ccons ::= NULL onconf */ yytestcase(yyruleno==360);
      /* (361) ccons ::= GENERATED ALWAYS AS generated */ yytestcase(yyruleno==361);
      /* (362) ccons ::= AS generated */ yytestcase(yyruleno==362);
      /* (363) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==363);
      /* (364) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==364);
      /* (365) conslist ::= tcons (OPTIMIZED OUT) */ assert(yyruleno!=365);
      /* (366) tconscomma ::= */ yytestcase(yyruleno==366);
      /* (367) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=367);
      /* (368) resolvetype ::= raisetype (OPTIMIZED OUT) */ assert(yyruleno!=368);
      /* (369) selectnowith ::= oneselect (OPTIMIZED OUT) */ assert(yyruleno!=369);
      /* (370) oneselect ::= values */ yytestcase(yyruleno==370);
      /* (371) sclp ::= selcollist COMMA */ yytestcase(yyruleno==371);
      /* (372) as ::= ID|STRING */ yytestcase(yyruleno==372);
      /* (373) returning ::= */ yytestcase(yyruleno==373);
      /* (374) expr ::= term (OPTIMIZED OUT) */ assert(yyruleno!=374);
      /* (375) likeop ::= LIKE_KW|MATCH */ yytestcase(yyruleno==375);
      /* (376) exprlist ::= nexprlist */ yytestcase(yyruleno==376);
      /* (377) nmnum ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=377);
      /* (378) nmnum ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=378);
      /* (379) nmnum ::= ON */ yytestcase(yyruleno==379);
      /* (380) nmnum ::= DELETE */ yytestcase(yyruleno==380);
      /* (381) nmnum ::= DEFAULT */ yytestcase(yyruleno==381);
      /* (382) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==382);
      /* (383) foreach_clause ::= */ yytestcase(yyruleno==383);
      /* (384) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==384);
      /* (385) trnm ::= nm */ yytestcase(yyruleno==385);
      /* (386) tridxby ::= */ yytestcase(yyruleno==386);
      /* (387) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==387);
      /* (388) database_kw_opt ::= */ yytestcase(yyruleno==388);
      /* (389) kwcolumn_opt ::= */ yytestcase(yyruleno==389);
      /* (390) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==390);
      /* (391) vtabarglist ::= vtabarg */ yytestcase(yyruleno==391);
      /* (392) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==392);
      /* (393) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==393);
      /* (394) anylist ::= */ yytestcase(yyruleno==394);
      /* (395) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==395);
      /* (396) anylist ::= anylist ANY */ yytestcase(yyruleno==396);
      /* (397) with ::= */ yytestcase(yyruleno==397);
        break;
/********** End reduce actions ************************************************/
  };
  assert( yyruleno<sizeof(yyRuleInfoLhs)/sizeof(yyRuleInfoLhs[0]) );
  yygoto = yyRuleInfoLhs[yyruleno];
  yysize = yyRuleInfoNRhs[yyruleno];
  yyact = yy_find_reduce_action(yymsp[yysize].stateno,(YYCODETYPE)yygoto);







|







<
|
|
|
|
|
|
|


|


|

|

|




|
|


>
>
>
|
>
>
>
>


|

|
>
>
>
>
>
>
>
>
>
>



>

|


|
|
|


|




|




|


|


|


|





|
|


|
|

|
|

|
|

|

|



|









|
|

|
|

|
|


|
|

|
|

|
|

|


|
|

|
|

|
|

|
|

|
|

|
|

|
|

|
|

|
|

|
|

|
|

|
|

|
|

|
|

|
|

|
|
|
|

|
|
|
|
|
|

|
|

|


|
|

|
|


|
|

|

|
|


|
|
|

|
|

|
|

|
|
|

|

|


|

|


|

|


|


|
|


|
|

|
|

|

|



|


|

|
|









|



|



|


|
|
|

|
|

|

|


|

|
|
|

|



|

|


|

|
|




|

|



|
|

|
|

|
|
|
|
|
|
|

|

|
|
|


|


|


|




|


|
|
|
|


|
|
|

|

|
|


|

|


|

|
|


|

|
|


|

|


|

|
|
|
|
|
|
|












|


|
|
|



|
|


|

|
|

|

|

|
|

|

|
|

|
|

|

|
|


|

|
|


|
|

|
|

|
|

|
|

|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|

|


|


|
|

|
|
|

|
|
|

|

|
|


|

|
|


|
|

|
|

|
|
|

|
|

|
|

|
|

|
|

|
|

|

|
|


|
|

|
|

|

|
|
|
|


|

|
|


|

|


|

|
|

|

|

|


|

|


|

|


|
|

|
|

|
|

|
|

|
|

|
|

|
|

|
|

|
|

|
|

|
|

|
|
|

|







|

|

|









|

|

|
|
|

|

|

|

|



|
|








|

|
|




|

|


|

|
|


|

|

|

|

|

|

|

|
|

|

|

|
|

|

|

|

|

|

|
|
|
|

|






|
|

|
|
|
|
|
|
|
|

|


|




|
|
|
|
|


|




|
|
|
|
|
|


|
|

|
|

|

|
|


|

|
|


|
|
|

|

|



|
|
|

|

|
|
|
|
|



|


|

|








|
|

|
|
|
|

|

|
|
|
|
|
|


|


|
|


|



|

|
|


|

|
|
|


|



|
|
|
|


|


|
|


|

|
|
|
|

|
|



|

|
|


|

|
|


|
|

|
|

|
|

|
|
|

|


|
|





|
|
|

|
|

|

|


|

|


|
|

|
|

|
|

|


|


|


|


|


|




|


|

|



|
|

|
|

|
|

|
|
|

|
|

|
|
|

|
|
|

|

|
|
|


|

|
|


|







|






|






|
|
|

|

|

|

|
|
|

|
|
|

|

|
|
|



|

|
|
|



|
|

|
|

|

|


|

|


|

|


|


|


|


|


|

|


|





|

|


|


|


|

|


|


|


|

|


|


|
|
|


|
|
|

|
|

|
|

|
|

|

|


|

|


|

|


|
|
|

|

|
|
|
|

|

|

|
|

|

|

|

|


|

|

|

|

|


|

|

|

|
|

|

|

|

|

|

|

|


|

|

|

|

|

|

|
|
|
|

|
|
|
|
|

|
|
|

|
|

|
|

|
|
|

|
|

|
|

|

|
|

|

|

|

|

|
|
|
|

|


|

|

|
|


|

|
|
|



|
|


|
|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|







162109
162110
162111
162112
162113
162114
162115
162116
162117
162118
162119
162120
162121
162122
162123

162124
162125
162126
162127
162128
162129
162130
162131
162132
162133
162134
162135
162136
162137
162138
162139
162140
162141
162142
162143
162144
162145
162146
162147
162148
162149
162150
162151
162152
162153
162154
162155
162156
162157
162158
162159
162160
162161
162162
162163
162164
162165
162166
162167
162168
162169
162170
162171
162172
162173
162174
162175
162176
162177
162178
162179
162180
162181
162182
162183
162184
162185
162186
162187
162188
162189
162190
162191
162192
162193
162194
162195
162196
162197
162198
162199
162200
162201
162202
162203
162204
162205
162206
162207
162208
162209
162210
162211
162212
162213
162214
162215
162216
162217
162218
162219
162220
162221
162222
162223
162224
162225
162226
162227
162228
162229
162230
162231
162232
162233
162234
162235
162236
162237
162238
162239
162240
162241
162242
162243
162244
162245
162246
162247
162248
162249
162250
162251
162252
162253
162254
162255
162256
162257
162258
162259
162260
162261
162262
162263
162264
162265
162266
162267
162268
162269
162270
162271
162272
162273
162274
162275
162276
162277
162278
162279
162280
162281
162282
162283
162284
162285
162286
162287
162288
162289
162290
162291
162292
162293
162294
162295
162296
162297
162298
162299
162300
162301
162302
162303
162304
162305
162306
162307
162308
162309
162310
162311
162312
162313
162314
162315
162316
162317
162318
162319
162320
162321
162322
162323
162324
162325
162326
162327
162328
162329
162330
162331
162332
162333
162334
162335
162336
162337
162338
162339
162340
162341
162342
162343
162344
162345
162346
162347
162348
162349
162350
162351
162352
162353
162354
162355
162356
162357
162358
162359
162360
162361
162362
162363
162364
162365
162366
162367
162368
162369
162370
162371
162372
162373
162374
162375
162376
162377
162378
162379
162380
162381
162382
162383
162384
162385
162386
162387
162388
162389
162390
162391
162392
162393
162394
162395
162396
162397
162398
162399
162400
162401
162402
162403
162404
162405
162406
162407
162408
162409
162410
162411
162412
162413
162414
162415
162416
162417
162418
162419
162420
162421
162422
162423
162424
162425
162426
162427
162428
162429
162430
162431
162432
162433
162434
162435
162436
162437
162438
162439
162440
162441
162442
162443
162444
162445
162446
162447
162448
162449
162450
162451
162452
162453
162454
162455
162456
162457
162458
162459
162460
162461
162462
162463
162464
162465
162466
162467
162468
162469
162470
162471
162472
162473
162474
162475
162476
162477
162478
162479
162480
162481
162482
162483
162484
162485
162486
162487
162488
162489
162490
162491
162492
162493
162494
162495
162496
162497
162498
162499
162500
162501
162502
162503
162504
162505
162506
162507
162508
162509
162510
162511
162512
162513
162514
162515
162516
162517
162518
162519
162520
162521
162522
162523
162524
162525
162526
162527
162528
162529
162530
162531
162532
162533
162534
162535
162536
162537
162538
162539
162540
162541
162542
162543
162544
162545
162546
162547
162548
162549
162550
162551
162552
162553
162554
162555
162556
162557
162558
162559
162560
162561
162562
162563
162564
162565
162566
162567
162568
162569
162570
162571
162572
162573
162574
162575
162576
162577
162578
162579
162580
162581
162582
162583
162584
162585
162586
162587
162588
162589
162590
162591
162592
162593
162594
162595
162596
162597
162598
162599
162600
162601
162602
162603
162604
162605
162606
162607
162608
162609
162610
162611
162612
162613
162614
162615
162616
162617
162618
162619
162620
162621
162622
162623
162624
162625
162626
162627
162628
162629
162630
162631
162632
162633
162634
162635
162636
162637
162638
162639
162640
162641
162642
162643
162644
162645
162646
162647
162648
162649
162650
162651
162652
162653
162654
162655
162656
162657
162658
162659
162660
162661
162662
162663
162664
162665
162666
162667
162668
162669
162670
162671
162672
162673
162674
162675
162676
162677
162678
162679
162680
162681
162682
162683
162684
162685
162686
162687
162688
162689
162690
162691
162692
162693
162694
162695
162696
162697
162698
162699
162700
162701
162702
162703
162704
162705
162706
162707
162708
162709
162710
162711
162712
162713
162714
162715
162716
162717
162718
162719
162720
162721
162722
162723
162724
162725
162726
162727
162728
162729
162730
162731
162732
162733
162734
162735
162736
162737
162738
162739
162740
162741
162742
162743
162744
162745
162746
162747
162748
162749
162750
162751
162752
162753
162754
162755
162756
162757
162758
162759
162760
162761
162762
162763
162764
162765
162766
162767
162768
162769
162770
162771
162772
162773
162774
162775
162776
162777
162778
162779
162780
162781
162782
162783
162784
162785
162786
162787
162788
162789
162790
162791
162792
162793
162794
162795
162796
162797
162798
162799
162800
162801
162802
162803
162804
162805
162806
162807
162808
162809
162810
162811
162812
162813
162814
162815
162816
162817
162818
162819
162820
162821
162822
162823
162824
162825
162826
162827
162828
162829
162830
162831
162832
162833
162834
162835
162836
162837
162838
162839
162840
162841
162842
162843
162844
162845
162846
162847
162848
162849
162850
162851
162852
162853
162854
162855
162856
162857
162858
162859
162860
162861
162862
162863
162864
162865
162866
162867
162868
162869
162870
162871
162872
162873
162874
162875
162876
162877
162878
162879
162880
162881
162882
162883
162884
162885
162886
162887
162888
162889
162890
162891
162892
162893
162894
162895
162896
162897
162898
162899
162900
162901
162902
162903
162904
162905
162906
162907
162908
162909
162910
162911
162912
162913
162914
162915
162916
162917
162918
162919
162920
162921
162922
162923
162924
162925
162926
162927
162928
162929
162930
162931
162932
162933
162934
162935
162936
162937
162938
162939
162940
162941
162942
162943
162944
162945
162946
162947
162948
162949
162950
162951
162952
162953
162954
162955
162956
162957
162958
162959
162960
162961
162962
162963
162964
162965
162966
162967
162968
162969
162970
162971
162972
162973
162974
162975
162976
162977
162978
162979
162980
162981
162982
162983
162984
162985
162986
162987
162988
162989
162990
162991
162992
162993
162994
162995
162996
162997
162998
162999
163000
163001
163002
163003
163004
163005
163006
163007
163008
163009
163010
163011
163012
163013
163014
163015
163016
163017
163018
163019
163020
163021
163022
163023
163024
163025
163026
163027
163028
163029
163030
163031
163032
163033
163034
163035
163036
163037
163038
163039
163040
163041
163042
163043
163044
163045
163046
163047
163048
163049
163050
163051
163052
163053
163054
163055
163056
163057
163058
163059
163060
163061
163062
163063
163064
163065
163066
163067
163068
163069
163070
163071
163072
163073
163074
163075
163076
163077
163078
163079
163080
163081
163082
163083
163084
163085
163086
163087
163088
163089
163090
163091
163092
163093
163094
163095
163096
163097
163098
163099
163100
163101
163102
163103
163104
163105
163106
163107
163108
163109
163110
163111
163112
163113
163114
163115
163116
163117
163118
163119
163120
163121
163122
163123
163124
163125
163126
163127
163128
163129
163130
163131
163132
163133
163134
163135
163136
163137
163138
163139
163140
163141
163142
163143
163144
163145
163146
163147
163148
163149
163150
163151
163152
163153
163154
163155
163156
163157
163158
163159
163160
163161
163162
163163
163164
163165
163166
163167
163168
163169
163170
163171
163172
163173
163174
163175
163176
163177
163178
163179
163180
163181
163182
163183
163184
163185
163186
163187
163188
163189
163190
163191
163192
163193
163194
163195
163196
163197
163198
163199
163200
163201
163202
163203
163204
163205
163206
163207
163208
163209
163210
163211
163212
163213
163214
163215
163216
163217
163218
163219
163220
163221
163222
163223
163224
163225
163226
163227
163228
163229
163230
163231
163232
163233
163234
163235
163236
163237
163238
163239
163240
163241
163242
163243
163244
163245
163246
163247
163248
163249
163250
163251
163252
163253
163254
163255
163256
163257
163258
163259
163260
163261
163262
163263
163264
163265
163266
163267
163268
163269
163270
163271
163272
163273
163274
163275
163276
163277
163278
163279
163280
163281
163282
163283
163284
163285
163286
163287
163288
163289
163290
163291
163292
163293
163294
163295
163296
163297
163298
163299
163300
163301
163302
163303
163304
163305
163306
163307
163308
163309
163310
163311
163312
163313
163314
163315
163316
163317
163318
163319
163320
163321
163322
163323
163324
163325
163326
163327
163328
163329
163330
163331
163332
163333
163334
163335
163336
163337
163338
163339
163340
163341
163342
163343
163344
163345
163346
163347
163348
163349
163350
163351
163352
163353
163354
163355
163356
163357
163358
163359
163360
163361
163362
163363
163364
163365
163366
163367
163368
163369
163370
163371
163372
163373
163374
163375
163376
163377
163378
163379
163380
163381
163382
163383
163384
163385
163386
163387
163388
163389
163390
163391
163392
163393
163394
163395
163396
163397
163398
163399
163400
163401
163402
163403
163404
163405
163406
163407
163408
163409
163410
163411
163412
163413
163414
163415
163416
163417
163418
163419
163420
163421
163422
163423
163424
163425
163426
163427
163428
163429
163430
163431
163432
163433
163434
163435
163436
163437
163438
163439
163440
163441
163442
163443
163444
163445
163446
163447
163448
163449
163450
163451
163452
163453
163454
163455
163456
163457
163458
163459
163460
163461
163462
163463
163464
163465
163466
163467
163468
163469
163470
163471
163472
163473
163474
163475
163476
163477
163478
163479
163480
163481
163482
163483
163484
163485
163486
163487
163488
163489
163490
163491
163492
163493
163494
163495
163496
163497
163498
163499
163500
163501
163502
163503
163504
163505
163506
163507
163508
163509
163510
163511
163512
163513
163514
163515
163516
163517
163518
163519
163520
163521
163522
163523
163524
163525
163526
163527
163528
163529
163530
163531
163532
163533
163534
163535
163536
163537
163538
163539
163540
163541
163542
163543
163544
163545
163546
163547
163548
163549
163550
163551
163552
163553
163554
163555
      case 12: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
{
  sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0);
}
        break;
      case 13: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */
{
   sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy64,0,0,yymsp[-2].minor.yy64);
}
        break;
      case 14: /* createkw ::= CREATE */
{disableLookaside(pParse);}
        break;
      case 15: /* ifnotexists ::= */
      case 18: /* temp ::= */ yytestcase(yyruleno==18);

      case 47: /* autoinc ::= */ yytestcase(yyruleno==47);
      case 62: /* init_deferred_pred_opt ::= */ yytestcase(yyruleno==62);
      case 72: /* defer_subclause_opt ::= */ yytestcase(yyruleno==72);
      case 81: /* ifexists ::= */ yytestcase(yyruleno==81);
      case 98: /* distinct ::= */ yytestcase(yyruleno==98);
      case 241: /* collate ::= */ yytestcase(yyruleno==241);
{yymsp[1].minor.yy64 = 0;}
        break;
      case 16: /* ifnotexists ::= IF NOT EXISTS */
{yymsp[-2].minor.yy64 = 1;}
        break;
      case 17: /* temp ::= TEMP */
{yymsp[0].minor.yy64 = pParse->db->init.busy==0;}
        break;
      case 19: /* create_table_args ::= LP columnlist conslist_opt RP table_option_set */
{
  sqlite3EndTable(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,yymsp[0].minor.yy51,0);
}
        break;
      case 20: /* create_table_args ::= AS select */
{
  sqlite3EndTable(pParse,0,0,0,yymsp[0].minor.yy303);
  sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy303);
}
        break;
      case 21: /* table_option_set ::= */
{yymsp[1].minor.yy51 = 0;}
        break;
      case 22: /* table_option_set ::= table_option_set COMMA table_option */
{yylhsminor.yy51 = yymsp[-2].minor.yy51|yymsp[0].minor.yy51;}
  yymsp[-2].minor.yy51 = yylhsminor.yy51;
        break;
      case 23: /* table_option ::= WITHOUT nm */
{
  if( yymsp[0].minor.yy0.n==5 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,"rowid",5)==0 ){
    yymsp[-1].minor.yy51 = TF_WithoutRowid | TF_NoVisibleRowid;
  }else{
    yymsp[-1].minor.yy51 = 0;
    sqlite3ErrorMsg(pParse, "unknown table option: %.*s", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z);
  }
}
        break;
      case 24: /* table_option ::= nm */
{
  if( yymsp[0].minor.yy0.n==6 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,"strict",6)==0 ){
    yylhsminor.yy51 = TF_Strict;
  }else{
    yylhsminor.yy51 = 0;
    sqlite3ErrorMsg(pParse, "unknown table option: %.*s", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z);
  }
}
  yymsp[0].minor.yy51 = yylhsminor.yy51;
        break;
      case 25: /* columnname ::= nm typetoken */
{sqlite3AddColumn(pParse,yymsp[-1].minor.yy0,yymsp[0].minor.yy0);}
        break;
      case 26: /* typetoken ::= */
      case 65: /* conslist_opt ::= */ yytestcase(yyruleno==65);
      case 104: /* as ::= */ yytestcase(yyruleno==104);
{yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = 0;}
        break;
      case 27: /* typetoken ::= typename LP signed RP */
{
  yymsp[-3].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z);
}
        break;
      case 28: /* typetoken ::= typename LP signed COMMA signed RP */
{
  yymsp[-5].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z);
}
        break;
      case 29: /* typename ::= typename ID|STRING */
{yymsp[-1].minor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);}
        break;
      case 30: /* scanpt ::= */
{
  assert( yyLookahead!=YYNOCODE );
  yymsp[1].minor.yy600 = yyLookaheadToken.z;
}
        break;
      case 31: /* scantok ::= */
{
  assert( yyLookahead!=YYNOCODE );
  yymsp[1].minor.yy0 = yyLookaheadToken;
}
        break;
      case 32: /* ccons ::= CONSTRAINT nm */
      case 67: /* tcons ::= CONSTRAINT nm */ yytestcase(yyruleno==67);
{pParse->constraintName = yymsp[0].minor.yy0;}
        break;
      case 33: /* ccons ::= DEFAULT scantok term */
{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy626,yymsp[-1].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}
        break;
      case 34: /* ccons ::= DEFAULT LP expr RP */
{sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy626,yymsp[-2].minor.yy0.z+1,yymsp[0].minor.yy0.z);}
        break;
      case 35: /* ccons ::= DEFAULT PLUS scantok term */
{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy626,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}
        break;
      case 36: /* ccons ::= DEFAULT MINUS scantok term */
{
  Expr *p = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy626, 0);
  sqlite3AddDefaultValue(pParse,p,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);
}
        break;
      case 37: /* ccons ::= DEFAULT scantok ID|INDEXED */
{
  Expr *p = tokenExpr(pParse, TK_STRING, yymsp[0].minor.yy0);
  if( p ){
    sqlite3ExprIdToTrueFalse(p);
    testcase( p->op==TK_TRUEFALSE && sqlite3ExprTruthValue(p) );
  }
    sqlite3AddDefaultValue(pParse,p,yymsp[0].minor.yy0.z,yymsp[0].minor.yy0.z+yymsp[0].minor.yy0.n);
}
        break;
      case 38: /* ccons ::= NOT NULL onconf */
{sqlite3AddNotNull(pParse, yymsp[0].minor.yy64);}
        break;
      case 39: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */
{sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy64,yymsp[0].minor.yy64,yymsp[-2].minor.yy64);}
        break;
      case 40: /* ccons ::= UNIQUE onconf */
{sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy64,0,0,0,0,
                                   SQLITE_IDXTYPE_UNIQUE);}
        break;
      case 41: /* ccons ::= CHECK LP expr RP */
{sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy626,yymsp[-2].minor.yy0.z,yymsp[0].minor.yy0.z);}
        break;
      case 42: /* ccons ::= REFERENCES nm eidlist_opt refargs */
{sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy562,yymsp[0].minor.yy64);}
        break;
      case 43: /* ccons ::= defer_subclause */
{sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy64);}
        break;
      case 44: /* ccons ::= COLLATE ID|STRING */
{sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);}
        break;
      case 45: /* generated ::= LP expr RP */
{sqlite3AddGenerated(pParse,yymsp[-1].minor.yy626,0);}
        break;
      case 46: /* generated ::= LP expr RP ID */
{sqlite3AddGenerated(pParse,yymsp[-2].minor.yy626,&yymsp[0].minor.yy0);}
        break;
      case 48: /* autoinc ::= AUTOINCR */
{yymsp[0].minor.yy64 = 1;}
        break;
      case 49: /* refargs ::= */
{ yymsp[1].minor.yy64 = OE_None*0x0101; /* EV: R-19803-45884 */}
        break;
      case 50: /* refargs ::= refargs refarg */
{ yymsp[-1].minor.yy64 = (yymsp[-1].minor.yy64 & ~yymsp[0].minor.yy83.mask) | yymsp[0].minor.yy83.value; }
        break;
      case 51: /* refarg ::= MATCH nm */
{ yymsp[-1].minor.yy83.value = 0;     yymsp[-1].minor.yy83.mask = 0x000000; }
        break;
      case 52: /* refarg ::= ON INSERT refact */
{ yymsp[-2].minor.yy83.value = 0;     yymsp[-2].minor.yy83.mask = 0x000000; }
        break;
      case 53: /* refarg ::= ON DELETE refact */
{ yymsp[-2].minor.yy83.value = yymsp[0].minor.yy64;     yymsp[-2].minor.yy83.mask = 0x0000ff; }
        break;
      case 54: /* refarg ::= ON UPDATE refact */
{ yymsp[-2].minor.yy83.value = yymsp[0].minor.yy64<<8;  yymsp[-2].minor.yy83.mask = 0x00ff00; }
        break;
      case 55: /* refact ::= SET NULL */
{ yymsp[-1].minor.yy64 = OE_SetNull;  /* EV: R-33326-45252 */}
        break;
      case 56: /* refact ::= SET DEFAULT */
{ yymsp[-1].minor.yy64 = OE_SetDflt;  /* EV: R-33326-45252 */}
        break;
      case 57: /* refact ::= CASCADE */
{ yymsp[0].minor.yy64 = OE_Cascade;  /* EV: R-33326-45252 */}
        break;
      case 58: /* refact ::= RESTRICT */
{ yymsp[0].minor.yy64 = OE_Restrict; /* EV: R-33326-45252 */}
        break;
      case 59: /* refact ::= NO ACTION */
{ yymsp[-1].minor.yy64 = OE_None;     /* EV: R-33326-45252 */}
        break;
      case 60: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
{yymsp[-2].minor.yy64 = 0;}
        break;
      case 61: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
      case 76: /* orconf ::= OR resolvetype */ yytestcase(yyruleno==76);
      case 171: /* insert_cmd ::= INSERT orconf */ yytestcase(yyruleno==171);
{yymsp[-1].minor.yy64 = yymsp[0].minor.yy64;}
        break;
      case 63: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */
      case 80: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==80);
      case 213: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==213);
      case 216: /* in_op ::= NOT IN */ yytestcase(yyruleno==216);
      case 242: /* collate ::= COLLATE ID|STRING */ yytestcase(yyruleno==242);
{yymsp[-1].minor.yy64 = 1;}
        break;
      case 64: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
{yymsp[-1].minor.yy64 = 0;}
        break;
      case 66: /* tconscomma ::= COMMA */
{pParse->constraintName.n = 0;}
        break;
      case 68: /* tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
{sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy562,yymsp[0].minor.yy64,yymsp[-2].minor.yy64,0);}
        break;
      case 69: /* tcons ::= UNIQUE LP sortlist RP onconf */
{sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy562,yymsp[0].minor.yy64,0,0,0,0,
                                       SQLITE_IDXTYPE_UNIQUE);}
        break;
      case 70: /* tcons ::= CHECK LP expr RP onconf */
{sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy626,yymsp[-3].minor.yy0.z,yymsp[-1].minor.yy0.z);}
        break;
      case 71: /* tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
{
    sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy562, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy562, yymsp[-1].minor.yy64);
    sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy64);
}
        break;
      case 73: /* onconf ::= */
      case 75: /* orconf ::= */ yytestcase(yyruleno==75);
{yymsp[1].minor.yy64 = OE_Default;}
        break;
      case 74: /* onconf ::= ON CONFLICT resolvetype */
{yymsp[-2].minor.yy64 = yymsp[0].minor.yy64;}
        break;
      case 77: /* resolvetype ::= IGNORE */
{yymsp[0].minor.yy64 = OE_Ignore;}
        break;
      case 78: /* resolvetype ::= REPLACE */
      case 172: /* insert_cmd ::= REPLACE */ yytestcase(yyruleno==172);
{yymsp[0].minor.yy64 = OE_Replace;}
        break;
      case 79: /* cmd ::= DROP TABLE ifexists fullname */
{
  sqlite3DropTable(pParse, yymsp[0].minor.yy607, 0, yymsp[-1].minor.yy64);
}
        break;
      case 82: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
{
  sqlite3CreateView(pParse, &yymsp[-8].minor.yy0, &yymsp[-4].minor.yy0, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy562, yymsp[0].minor.yy303, yymsp[-7].minor.yy64, yymsp[-5].minor.yy64);
}
        break;
      case 83: /* cmd ::= DROP VIEW ifexists fullname */
{
  sqlite3DropTable(pParse, yymsp[0].minor.yy607, 1, yymsp[-1].minor.yy64);
}
        break;
      case 84: /* cmd ::= select */
{
  SelectDest dest = {SRT_Output, 0, 0, 0, 0, 0, 0};
  sqlite3Select(pParse, yymsp[0].minor.yy303, &dest);
  sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy303);
}
        break;
      case 85: /* select ::= WITH wqlist selectnowith */
{yymsp[-2].minor.yy303 = attachWithToSelect(pParse,yymsp[0].minor.yy303,yymsp[-1].minor.yy43);}
        break;
      case 86: /* select ::= WITH RECURSIVE wqlist selectnowith */
{yymsp[-3].minor.yy303 = attachWithToSelect(pParse,yymsp[0].minor.yy303,yymsp[-1].minor.yy43);}
        break;
      case 87: /* select ::= selectnowith */
{
  Select *p = yymsp[0].minor.yy303;
  if( p ){
    parserDoubleLinkSelect(pParse, p);
  }
  yymsp[0].minor.yy303 = p; /*A-overwrites-X*/
}
        break;
      case 88: /* selectnowith ::= selectnowith multiselect_op oneselect */
{
  Select *pRhs = yymsp[0].minor.yy303;
  Select *pLhs = yymsp[-2].minor.yy303;
  if( pRhs && pRhs->pPrior ){
    SrcList *pFrom;
    Token x;
    x.n = 0;
    parserDoubleLinkSelect(pParse, pRhs);
    pFrom = sqlite3SrcListAppendFromTerm(pParse,0,0,0,&x,pRhs,0,0);
    pRhs = sqlite3SelectNew(pParse,0,pFrom,0,0,0,0,0,0);
  }
  if( pRhs ){
    pRhs->op = (u8)yymsp[-1].minor.yy64;
    pRhs->pPrior = pLhs;
    if( ALWAYS(pLhs) ) pLhs->selFlags &= ~SF_MultiValue;
    pRhs->selFlags &= ~SF_MultiValue;
    if( yymsp[-1].minor.yy64!=TK_ALL ) pParse->hasCompound = 1;
  }else{
    sqlite3SelectDelete(pParse->db, pLhs);
  }
  yymsp[-2].minor.yy303 = pRhs;
}
        break;
      case 89: /* multiselect_op ::= UNION */
      case 91: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==91);
{yymsp[0].minor.yy64 = yymsp[0].major; /*A-overwrites-OP*/}
        break;
      case 90: /* multiselect_op ::= UNION ALL */
{yymsp[-1].minor.yy64 = TK_ALL;}
        break;
      case 92: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
{
  yymsp[-8].minor.yy303 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy562,yymsp[-5].minor.yy607,yymsp[-4].minor.yy626,yymsp[-3].minor.yy562,yymsp[-2].minor.yy626,yymsp[-1].minor.yy562,yymsp[-7].minor.yy64,yymsp[0].minor.yy626);
}
        break;
      case 93: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
{
  yymsp[-9].minor.yy303 = sqlite3SelectNew(pParse,yymsp[-7].minor.yy562,yymsp[-6].minor.yy607,yymsp[-5].minor.yy626,yymsp[-4].minor.yy562,yymsp[-3].minor.yy626,yymsp[-1].minor.yy562,yymsp[-8].minor.yy64,yymsp[0].minor.yy626);
  if( yymsp[-9].minor.yy303 ){
    yymsp[-9].minor.yy303->pWinDefn = yymsp[-2].minor.yy375;
  }else{
    sqlite3WindowListDelete(pParse->db, yymsp[-2].minor.yy375);
  }
}
        break;
      case 94: /* values ::= VALUES LP nexprlist RP */
{
  yymsp[-3].minor.yy303 = sqlite3SelectNew(pParse,yymsp[-1].minor.yy562,0,0,0,0,0,SF_Values,0);
}
        break;
      case 95: /* values ::= values COMMA LP nexprlist RP */
{
  Select *pRight, *pLeft = yymsp[-4].minor.yy303;
  pRight = sqlite3SelectNew(pParse,yymsp[-1].minor.yy562,0,0,0,0,0,SF_Values|SF_MultiValue,0);
  if( ALWAYS(pLeft) ) pLeft->selFlags &= ~SF_MultiValue;
  if( pRight ){
    pRight->op = TK_ALL;
    pRight->pPrior = pLeft;
    yymsp[-4].minor.yy303 = pRight;
  }else{
    yymsp[-4].minor.yy303 = pLeft;
  }
}
        break;
      case 96: /* distinct ::= DISTINCT */
{yymsp[0].minor.yy64 = SF_Distinct;}
        break;
      case 97: /* distinct ::= ALL */
{yymsp[0].minor.yy64 = SF_All;}
        break;
      case 99: /* sclp ::= */
      case 132: /* orderby_opt ::= */ yytestcase(yyruleno==132);
      case 142: /* groupby_opt ::= */ yytestcase(yyruleno==142);
      case 229: /* exprlist ::= */ yytestcase(yyruleno==229);
      case 232: /* paren_exprlist ::= */ yytestcase(yyruleno==232);
      case 237: /* eidlist_opt ::= */ yytestcase(yyruleno==237);
{yymsp[1].minor.yy562 = 0;}
        break;
      case 100: /* selcollist ::= sclp scanpt expr scanpt as */
{
   yymsp[-4].minor.yy562 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy562, yymsp[-2].minor.yy626);
   if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy562, &yymsp[0].minor.yy0, 1);
   sqlite3ExprListSetSpan(pParse,yymsp[-4].minor.yy562,yymsp[-3].minor.yy600,yymsp[-1].minor.yy600);
}
        break;
      case 101: /* selcollist ::= sclp scanpt STAR */
{
  Expr *p = sqlite3Expr(pParse->db, TK_ASTERISK, 0);
  yymsp[-2].minor.yy562 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy562, p);
}
        break;
      case 102: /* selcollist ::= sclp scanpt nm DOT STAR */
{
  Expr *pRight = sqlite3PExpr(pParse, TK_ASTERISK, 0, 0);
  Expr *pLeft = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-2].minor.yy0, 1);
  Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight);
  yymsp[-4].minor.yy562 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy562, pDot);
}
        break;
      case 103: /* as ::= AS nm */
      case 114: /* dbnm ::= DOT nm */ yytestcase(yyruleno==114);
      case 253: /* plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==253);
      case 254: /* minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==254);
{yymsp[-1].minor.yy0 = yymsp[0].minor.yy0;}
        break;
      case 105: /* from ::= */
      case 108: /* stl_prefix ::= */ yytestcase(yyruleno==108);
{yymsp[1].minor.yy607 = 0;}
        break;
      case 106: /* from ::= FROM seltablist */
{
  yymsp[-1].minor.yy607 = yymsp[0].minor.yy607;
  sqlite3SrcListShiftJoinType(yymsp[-1].minor.yy607);
}
        break;
      case 107: /* stl_prefix ::= seltablist joinop */
{
   if( ALWAYS(yymsp[-1].minor.yy607 && yymsp[-1].minor.yy607->nSrc>0) ) yymsp[-1].minor.yy607->a[yymsp[-1].minor.yy607->nSrc-1].fg.jointype = (u8)yymsp[0].minor.yy64;
}
        break;
      case 109: /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
{
  yymsp[-6].minor.yy607 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy607,&yymsp[-5].minor.yy0,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,0,yymsp[-1].minor.yy626,yymsp[0].minor.yy240);
  sqlite3SrcListIndexedBy(pParse, yymsp[-6].minor.yy607, &yymsp[-2].minor.yy0);
}
        break;
      case 110: /* seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */
{
  yymsp[-8].minor.yy607 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-8].minor.yy607,&yymsp[-7].minor.yy0,&yymsp[-6].minor.yy0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy626,yymsp[0].minor.yy240);
  sqlite3SrcListFuncArgs(pParse, yymsp[-8].minor.yy607, yymsp[-4].minor.yy562);
}
        break;
      case 111: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */
{
    yymsp[-6].minor.yy607 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy607,0,0,&yymsp[-2].minor.yy0,yymsp[-4].minor.yy303,yymsp[-1].minor.yy626,yymsp[0].minor.yy240);
  }
        break;
      case 112: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
{
    if( yymsp[-6].minor.yy607==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy626==0 && yymsp[0].minor.yy240==0 ){
      yymsp[-6].minor.yy607 = yymsp[-4].minor.yy607;
    }else if( yymsp[-4].minor.yy607->nSrc==1 ){
      yymsp[-6].minor.yy607 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy607,0,0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy626,yymsp[0].minor.yy240);
      if( yymsp[-6].minor.yy607 ){
        SrcItem *pNew = &yymsp[-6].minor.yy607->a[yymsp[-6].minor.yy607->nSrc-1];
        SrcItem *pOld = yymsp[-4].minor.yy607->a;
        pNew->zName = pOld->zName;
        pNew->zDatabase = pOld->zDatabase;
        pNew->pSelect = pOld->pSelect;
        if( pOld->fg.isTabFunc ){
          pNew->u1.pFuncArg = pOld->u1.pFuncArg;
          pOld->u1.pFuncArg = 0;
          pOld->fg.isTabFunc = 0;
          pNew->fg.isTabFunc = 1;
        }
        pOld->zName = pOld->zDatabase = 0;
        pOld->pSelect = 0;
      }
      sqlite3SrcListDelete(pParse->db, yymsp[-4].minor.yy607);
    }else{
      Select *pSubquery;
      sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy607);
      pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy607,0,0,0,0,SF_NestedFrom,0);
      yymsp[-6].minor.yy607 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy607,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy626,yymsp[0].minor.yy240);
    }
  }
        break;
      case 113: /* dbnm ::= */
      case 127: /* indexed_opt ::= */ yytestcase(yyruleno==127);
{yymsp[1].minor.yy0.z=0; yymsp[1].minor.yy0.n=0;}
        break;
      case 115: /* fullname ::= nm */
{
  yylhsminor.yy607 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0);
  if( IN_RENAME_OBJECT && yylhsminor.yy607 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy607->a[0].zName, &yymsp[0].minor.yy0);
}
  yymsp[0].minor.yy607 = yylhsminor.yy607;
        break;
      case 116: /* fullname ::= nm DOT nm */
{
  yylhsminor.yy607 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
  if( IN_RENAME_OBJECT && yylhsminor.yy607 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy607->a[0].zName, &yymsp[0].minor.yy0);
}
  yymsp[-2].minor.yy607 = yylhsminor.yy607;
        break;
      case 117: /* xfullname ::= nm */
{yymsp[0].minor.yy607 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0); /*A-overwrites-X*/}
        break;
      case 118: /* xfullname ::= nm DOT nm */
{yymsp[-2].minor.yy607 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/}
        break;
      case 119: /* xfullname ::= nm DOT nm AS nm */
{
   yymsp[-4].minor.yy607 = sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,&yymsp[-2].minor.yy0); /*A-overwrites-X*/
   if( yymsp[-4].minor.yy607 ) yymsp[-4].minor.yy607->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
}
        break;
      case 120: /* xfullname ::= nm AS nm */
{
   yymsp[-2].minor.yy607 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,0); /*A-overwrites-X*/
   if( yymsp[-2].minor.yy607 ) yymsp[-2].minor.yy607->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
}
        break;
      case 121: /* joinop ::= COMMA|JOIN */
{ yymsp[0].minor.yy64 = JT_INNER; }
        break;
      case 122: /* joinop ::= JOIN_KW JOIN */
{yymsp[-1].minor.yy64 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0);  /*X-overwrites-A*/}
        break;
      case 123: /* joinop ::= JOIN_KW nm JOIN */
{yymsp[-2].minor.yy64 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); /*X-overwrites-A*/}
        break;
      case 124: /* joinop ::= JOIN_KW nm nm JOIN */
{yymsp[-3].minor.yy64 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);/*X-overwrites-A*/}
        break;
      case 125: /* on_opt ::= ON expr */
      case 145: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==145);
      case 152: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==152);
      case 154: /* where_opt_ret ::= WHERE expr */ yytestcase(yyruleno==154);
      case 225: /* case_else ::= ELSE expr */ yytestcase(yyruleno==225);
      case 246: /* vinto ::= INTO expr */ yytestcase(yyruleno==246);
{yymsp[-1].minor.yy626 = yymsp[0].minor.yy626;}
        break;
      case 126: /* on_opt ::= */
      case 144: /* having_opt ::= */ yytestcase(yyruleno==144);
      case 146: /* limit_opt ::= */ yytestcase(yyruleno==146);
      case 151: /* where_opt ::= */ yytestcase(yyruleno==151);
      case 153: /* where_opt_ret ::= */ yytestcase(yyruleno==153);
      case 226: /* case_else ::= */ yytestcase(yyruleno==226);
      case 228: /* case_operand ::= */ yytestcase(yyruleno==228);
      case 247: /* vinto ::= */ yytestcase(yyruleno==247);
{yymsp[1].minor.yy626 = 0;}
        break;
      case 128: /* indexed_opt ::= INDEXED BY nm */
{yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;}
        break;
      case 129: /* indexed_opt ::= NOT INDEXED */
{yymsp[-1].minor.yy0.z=0; yymsp[-1].minor.yy0.n=1;}
        break;
      case 130: /* using_opt ::= USING LP idlist RP */
{yymsp[-3].minor.yy240 = yymsp[-1].minor.yy240;}
        break;
      case 131: /* using_opt ::= */
      case 173: /* idlist_opt ::= */ yytestcase(yyruleno==173);
{yymsp[1].minor.yy240 = 0;}
        break;
      case 133: /* orderby_opt ::= ORDER BY sortlist */
      case 143: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==143);
{yymsp[-2].minor.yy562 = yymsp[0].minor.yy562;}
        break;
      case 134: /* sortlist ::= sortlist COMMA expr sortorder nulls */
{
  yymsp[-4].minor.yy562 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy562,yymsp[-2].minor.yy626);
  sqlite3ExprListSetSortOrder(yymsp[-4].minor.yy562,yymsp[-1].minor.yy64,yymsp[0].minor.yy64);
}
        break;
      case 135: /* sortlist ::= expr sortorder nulls */
{
  yymsp[-2].minor.yy562 = sqlite3ExprListAppend(pParse,0,yymsp[-2].minor.yy626); /*A-overwrites-Y*/
  sqlite3ExprListSetSortOrder(yymsp[-2].minor.yy562,yymsp[-1].minor.yy64,yymsp[0].minor.yy64);
}
        break;
      case 136: /* sortorder ::= ASC */
{yymsp[0].minor.yy64 = SQLITE_SO_ASC;}
        break;
      case 137: /* sortorder ::= DESC */
{yymsp[0].minor.yy64 = SQLITE_SO_DESC;}
        break;
      case 138: /* sortorder ::= */
      case 141: /* nulls ::= */ yytestcase(yyruleno==141);
{yymsp[1].minor.yy64 = SQLITE_SO_UNDEFINED;}
        break;
      case 139: /* nulls ::= NULLS FIRST */
{yymsp[-1].minor.yy64 = SQLITE_SO_ASC;}
        break;
      case 140: /* nulls ::= NULLS LAST */
{yymsp[-1].minor.yy64 = SQLITE_SO_DESC;}
        break;
      case 147: /* limit_opt ::= LIMIT expr */
{yymsp[-1].minor.yy626 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy626,0);}
        break;
      case 148: /* limit_opt ::= LIMIT expr OFFSET expr */
{yymsp[-3].minor.yy626 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[-2].minor.yy626,yymsp[0].minor.yy626);}
        break;
      case 149: /* limit_opt ::= LIMIT expr COMMA expr */
{yymsp[-3].minor.yy626 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy626,yymsp[-2].minor.yy626);}
        break;
      case 150: /* cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */
{
  sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy607, &yymsp[-1].minor.yy0);
  sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy607,yymsp[0].minor.yy626,0,0);
}
        break;
      case 155: /* where_opt_ret ::= RETURNING selcollist */
{sqlite3AddReturning(pParse,yymsp[0].minor.yy562); yymsp[-1].minor.yy626 = 0;}
        break;
      case 156: /* where_opt_ret ::= WHERE expr RETURNING selcollist */
{sqlite3AddReturning(pParse,yymsp[0].minor.yy562); yymsp[-3].minor.yy626 = yymsp[-2].minor.yy626;}
        break;
      case 157: /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */
{
  sqlite3SrcListIndexedBy(pParse, yymsp[-5].minor.yy607, &yymsp[-4].minor.yy0);
  sqlite3ExprListCheckLength(pParse,yymsp[-2].minor.yy562,"set list");
  yymsp[-5].minor.yy607 = sqlite3SrcListAppendList(pParse, yymsp[-5].minor.yy607, yymsp[-1].minor.yy607);
  sqlite3Update(pParse,yymsp[-5].minor.yy607,yymsp[-2].minor.yy562,yymsp[0].minor.yy626,yymsp[-6].minor.yy64,0,0,0);
}
        break;
      case 158: /* setlist ::= setlist COMMA nm EQ expr */
{
  yymsp[-4].minor.yy562 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy562, yymsp[0].minor.yy626);
  sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy562, &yymsp[-2].minor.yy0, 1);
}
        break;
      case 159: /* setlist ::= setlist COMMA LP idlist RP EQ expr */
{
  yymsp[-6].minor.yy562 = sqlite3ExprListAppendVector(pParse, yymsp[-6].minor.yy562, yymsp[-3].minor.yy240, yymsp[0].minor.yy626);
}
        break;
      case 160: /* setlist ::= nm EQ expr */
{
  yylhsminor.yy562 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy626);
  sqlite3ExprListSetName(pParse, yylhsminor.yy562, &yymsp[-2].minor.yy0, 1);
}
  yymsp[-2].minor.yy562 = yylhsminor.yy562;
        break;
      case 161: /* setlist ::= LP idlist RP EQ expr */
{
  yymsp[-4].minor.yy562 = sqlite3ExprListAppendVector(pParse, 0, yymsp[-3].minor.yy240, yymsp[0].minor.yy626);
}
        break;
      case 162: /* cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
{
  sqlite3Insert(pParse, yymsp[-3].minor.yy607, yymsp[-1].minor.yy303, yymsp[-2].minor.yy240, yymsp[-5].minor.yy64, yymsp[0].minor.yy138);
}
        break;
      case 163: /* cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */
{
  sqlite3Insert(pParse, yymsp[-4].minor.yy607, 0, yymsp[-3].minor.yy240, yymsp[-6].minor.yy64, 0);
}
        break;
      case 164: /* upsert ::= */
{ yymsp[1].minor.yy138 = 0; }
        break;
      case 165: /* upsert ::= RETURNING selcollist */
{ yymsp[-1].minor.yy138 = 0; sqlite3AddReturning(pParse,yymsp[0].minor.yy562); }
        break;
      case 166: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */
{ yymsp[-11].minor.yy138 = sqlite3UpsertNew(pParse->db,yymsp[-8].minor.yy562,yymsp[-6].minor.yy626,yymsp[-2].minor.yy562,yymsp[-1].minor.yy626,yymsp[0].minor.yy138);}
        break;
      case 167: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */
{ yymsp[-8].minor.yy138 = sqlite3UpsertNew(pParse->db,yymsp[-5].minor.yy562,yymsp[-3].minor.yy626,0,0,yymsp[0].minor.yy138); }
        break;
      case 168: /* upsert ::= ON CONFLICT DO NOTHING returning */
{ yymsp[-4].minor.yy138 = sqlite3UpsertNew(pParse->db,0,0,0,0,0); }
        break;
      case 169: /* upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */
{ yymsp[-7].minor.yy138 = sqlite3UpsertNew(pParse->db,0,0,yymsp[-2].minor.yy562,yymsp[-1].minor.yy626,0);}
        break;
      case 170: /* returning ::= RETURNING selcollist */
{sqlite3AddReturning(pParse,yymsp[0].minor.yy562);}
        break;
      case 174: /* idlist_opt ::= LP idlist RP */
{yymsp[-2].minor.yy240 = yymsp[-1].minor.yy240;}
        break;
      case 175: /* idlist ::= idlist COMMA nm */
{yymsp[-2].minor.yy240 = sqlite3IdListAppend(pParse,yymsp[-2].minor.yy240,&yymsp[0].minor.yy0);}
        break;
      case 176: /* idlist ::= nm */
{yymsp[0].minor.yy240 = sqlite3IdListAppend(pParse,0,&yymsp[0].minor.yy0); /*A-overwrites-Y*/}
        break;
      case 177: /* expr ::= LP expr RP */
{yymsp[-2].minor.yy626 = yymsp[-1].minor.yy626;}
        break;
      case 178: /* expr ::= ID|INDEXED */
      case 179: /* expr ::= JOIN_KW */ yytestcase(yyruleno==179);
{yymsp[0].minor.yy626=tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0); /*A-overwrites-X*/}
        break;
      case 180: /* expr ::= nm DOT nm */
{
  Expr *temp1 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-2].minor.yy0, 1);
  Expr *temp2 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[0].minor.yy0, 1);
  if( IN_RENAME_OBJECT ){
    sqlite3RenameTokenMap(pParse, (void*)temp2, &yymsp[0].minor.yy0);
    sqlite3RenameTokenMap(pParse, (void*)temp1, &yymsp[-2].minor.yy0);
  }
  yylhsminor.yy626 = sqlite3PExpr(pParse, TK_DOT, temp1, temp2);
}
  yymsp[-2].minor.yy626 = yylhsminor.yy626;
        break;
      case 181: /* expr ::= nm DOT nm DOT nm */
{
  Expr *temp1 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-4].minor.yy0, 1);
  Expr *temp2 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-2].minor.yy0, 1);
  Expr *temp3 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[0].minor.yy0, 1);
  Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3);
  if( IN_RENAME_OBJECT ){
    sqlite3RenameTokenMap(pParse, (void*)temp3, &yymsp[0].minor.yy0);
    sqlite3RenameTokenMap(pParse, (void*)temp2, &yymsp[-2].minor.yy0);
  }
  yylhsminor.yy626 = sqlite3PExpr(pParse, TK_DOT, temp1, temp4);
}
  yymsp[-4].minor.yy626 = yylhsminor.yy626;
        break;
      case 182: /* term ::= NULL|FLOAT|BLOB */
      case 183: /* term ::= STRING */ yytestcase(yyruleno==183);
{yymsp[0].minor.yy626=tokenExpr(pParse,yymsp[0].major,yymsp[0].minor.yy0); /*A-overwrites-X*/}
        break;
      case 184: /* term ::= INTEGER */
{
  yylhsminor.yy626 = sqlite3ExprAlloc(pParse->db, TK_INTEGER, &yymsp[0].minor.yy0, 1);
}
  yymsp[0].minor.yy626 = yylhsminor.yy626;
        break;
      case 185: /* expr ::= VARIABLE */
{
  if( !(yymsp[0].minor.yy0.z[0]=='#' && sqlite3Isdigit(yymsp[0].minor.yy0.z[1])) ){
    u32 n = yymsp[0].minor.yy0.n;
    yymsp[0].minor.yy626 = tokenExpr(pParse, TK_VARIABLE, yymsp[0].minor.yy0);
    sqlite3ExprAssignVarNumber(pParse, yymsp[0].minor.yy626, n);
  }else{
    /* When doing a nested parse, one can include terms in an expression
    ** that look like this:   #1 #2 ...  These terms refer to registers
    ** in the virtual machine.  #N is the N-th register. */
    Token t = yymsp[0].minor.yy0; /*A-overwrites-X*/
    assert( t.n>=2 );
    if( pParse->nested==0 ){
      sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &t);
      yymsp[0].minor.yy626 = 0;
    }else{
      yymsp[0].minor.yy626 = sqlite3PExpr(pParse, TK_REGISTER, 0, 0);
      if( yymsp[0].minor.yy626 ) sqlite3GetInt32(&t.z[1], &yymsp[0].minor.yy626->iTable);
    }
  }
}
        break;
      case 186: /* expr ::= expr COLLATE ID|STRING */
{
  yymsp[-2].minor.yy626 = sqlite3ExprAddCollateToken(pParse, yymsp[-2].minor.yy626, &yymsp[0].minor.yy0, 1);
}
        break;
      case 187: /* expr ::= CAST LP expr AS typetoken RP */
{
  yymsp[-5].minor.yy626 = sqlite3ExprAlloc(pParse->db, TK_CAST, &yymsp[-1].minor.yy0, 1);
  sqlite3ExprAttachSubtrees(pParse->db, yymsp[-5].minor.yy626, yymsp[-3].minor.yy626, 0);
}
        break;
      case 188: /* expr ::= ID|INDEXED LP distinct exprlist RP */
{
  yylhsminor.yy626 = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy562, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy64);
}
  yymsp[-4].minor.yy626 = yylhsminor.yy626;
        break;
      case 189: /* expr ::= ID|INDEXED LP STAR RP */
{
  yylhsminor.yy626 = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0, 0);
}
  yymsp[-3].minor.yy626 = yylhsminor.yy626;
        break;
      case 190: /* expr ::= ID|INDEXED LP distinct exprlist RP filter_over */
{
  yylhsminor.yy626 = sqlite3ExprFunction(pParse, yymsp[-2].minor.yy562, &yymsp[-5].minor.yy0, yymsp[-3].minor.yy64);
  sqlite3WindowAttach(pParse, yylhsminor.yy626, yymsp[0].minor.yy375);
}
  yymsp[-5].minor.yy626 = yylhsminor.yy626;
        break;
      case 191: /* expr ::= ID|INDEXED LP STAR RP filter_over */
{
  yylhsminor.yy626 = sqlite3ExprFunction(pParse, 0, &yymsp[-4].minor.yy0, 0);
  sqlite3WindowAttach(pParse, yylhsminor.yy626, yymsp[0].minor.yy375);
}
  yymsp[-4].minor.yy626 = yylhsminor.yy626;
        break;
      case 192: /* term ::= CTIME_KW */
{
  yylhsminor.yy626 = sqlite3ExprFunction(pParse, 0, &yymsp[0].minor.yy0, 0);
}
  yymsp[0].minor.yy626 = yylhsminor.yy626;
        break;
      case 193: /* expr ::= LP nexprlist COMMA expr RP */
{
  ExprList *pList = sqlite3ExprListAppend(pParse, yymsp[-3].minor.yy562, yymsp[-1].minor.yy626);
  yymsp[-4].minor.yy626 = sqlite3PExpr(pParse, TK_VECTOR, 0, 0);
  if( yymsp[-4].minor.yy626 ){
    yymsp[-4].minor.yy626->x.pList = pList;
    if( ALWAYS(pList->nExpr) ){
      yymsp[-4].minor.yy626->flags |= pList->a[0].pExpr->flags & EP_Propagate;
    }
  }else{
    sqlite3ExprListDelete(pParse->db, pList);
  }
}
        break;
      case 194: /* expr ::= expr AND expr */
{yymsp[-2].minor.yy626=sqlite3ExprAnd(pParse,yymsp[-2].minor.yy626,yymsp[0].minor.yy626);}
        break;
      case 195: /* expr ::= expr OR expr */
      case 196: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==196);
      case 197: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==197);
      case 198: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==198);
      case 199: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==199);
      case 200: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==200);
      case 201: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==201);
{yymsp[-2].minor.yy626=sqlite3PExpr(pParse,yymsp[-1].major,yymsp[-2].minor.yy626,yymsp[0].minor.yy626);}
        break;
      case 202: /* likeop ::= NOT LIKE_KW|MATCH */
{yymsp[-1].minor.yy0=yymsp[0].minor.yy0; yymsp[-1].minor.yy0.n|=0x80000000; /*yymsp[-1].minor.yy0-overwrite-yymsp[0].minor.yy0*/}
        break;
      case 203: /* expr ::= expr likeop expr */
{
  ExprList *pList;
  int bNot = yymsp[-1].minor.yy0.n & 0x80000000;
  yymsp[-1].minor.yy0.n &= 0x7fffffff;
  pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy626);
  pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy626);
  yymsp[-2].minor.yy626 = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy0, 0);
  if( bNot ) yymsp[-2].minor.yy626 = sqlite3PExpr(pParse, TK_NOT, yymsp[-2].minor.yy626, 0);
  if( yymsp[-2].minor.yy626 ) yymsp[-2].minor.yy626->flags |= EP_InfixFunc;
}
        break;
      case 204: /* expr ::= expr likeop expr ESCAPE expr */
{
  ExprList *pList;
  int bNot = yymsp[-3].minor.yy0.n & 0x80000000;
  yymsp[-3].minor.yy0.n &= 0x7fffffff;
  pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy626);
  pList = sqlite3ExprListAppend(pParse,pList, yymsp[-4].minor.yy626);
  pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy626);
  yymsp[-4].minor.yy626 = sqlite3ExprFunction(pParse, pList, &yymsp[-3].minor.yy0, 0);
  if( bNot ) yymsp[-4].minor.yy626 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy626, 0);
  if( yymsp[-4].minor.yy626 ) yymsp[-4].minor.yy626->flags |= EP_InfixFunc;
}
        break;
      case 205: /* expr ::= expr ISNULL|NOTNULL */
{yymsp[-1].minor.yy626 = sqlite3PExpr(pParse,yymsp[0].major,yymsp[-1].minor.yy626,0);}
        break;
      case 206: /* expr ::= expr NOT NULL */
{yymsp[-2].minor.yy626 = sqlite3PExpr(pParse,TK_NOTNULL,yymsp[-2].minor.yy626,0);}
        break;
      case 207: /* expr ::= expr IS expr */
{
  yymsp[-2].minor.yy626 = sqlite3PExpr(pParse,TK_IS,yymsp[-2].minor.yy626,yymsp[0].minor.yy626);
  binaryToUnaryIfNull(pParse, yymsp[0].minor.yy626, yymsp[-2].minor.yy626, TK_ISNULL);
}
        break;
      case 208: /* expr ::= expr IS NOT expr */
{
  yymsp[-3].minor.yy626 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-3].minor.yy626,yymsp[0].minor.yy626);
  binaryToUnaryIfNull(pParse, yymsp[0].minor.yy626, yymsp[-3].minor.yy626, TK_NOTNULL);
}
        break;
      case 209: /* expr ::= NOT expr */
      case 210: /* expr ::= BITNOT expr */ yytestcase(yyruleno==210);
{yymsp[-1].minor.yy626 = sqlite3PExpr(pParse, yymsp[-1].major, yymsp[0].minor.yy626, 0);/*A-overwrites-B*/}
        break;
      case 211: /* expr ::= PLUS|MINUS expr */
{
  yymsp[-1].minor.yy626 = sqlite3PExpr(pParse, yymsp[-1].major==TK_PLUS ? TK_UPLUS : TK_UMINUS, yymsp[0].minor.yy626, 0);
  /*A-overwrites-B*/
}
        break;
      case 212: /* between_op ::= BETWEEN */
      case 215: /* in_op ::= IN */ yytestcase(yyruleno==215);
{yymsp[0].minor.yy64 = 0;}
        break;
      case 214: /* expr ::= expr between_op expr AND expr */
{
  ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy626);
  pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy626);
  yymsp[-4].minor.yy626 = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy626, 0);
  if( yymsp[-4].minor.yy626 ){
    yymsp[-4].minor.yy626->x.pList = pList;
  }else{
    sqlite3ExprListDelete(pParse->db, pList);
  }
  if( yymsp[-3].minor.yy64 ) yymsp[-4].minor.yy626 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy626, 0);
}
        break;
      case 217: /* expr ::= expr in_op LP exprlist RP */
{
    if( yymsp[-1].minor.yy562==0 ){
      /* Expressions of the form
      **
      **      expr1 IN ()
      **      expr1 NOT IN ()
      **
      ** simplify to constants 0 (false) and 1 (true), respectively,
      ** regardless of the value of expr1.
      */
      sqlite3ExprUnmapAndDelete(pParse, yymsp[-4].minor.yy626);
      yymsp[-4].minor.yy626 = sqlite3Expr(pParse->db, TK_INTEGER, yymsp[-3].minor.yy64 ? "1" : "0");
    }else{
      Expr *pRHS = yymsp[-1].minor.yy562->a[0].pExpr;
      if( yymsp[-1].minor.yy562->nExpr==1 && sqlite3ExprIsConstant(pRHS) && yymsp[-4].minor.yy626->op!=TK_VECTOR ){
        yymsp[-1].minor.yy562->a[0].pExpr = 0;
        sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy562);
        pRHS = sqlite3PExpr(pParse, TK_UPLUS, pRHS, 0);
        yymsp[-4].minor.yy626 = sqlite3PExpr(pParse, TK_EQ, yymsp[-4].minor.yy626, pRHS);
      }else{
        yymsp[-4].minor.yy626 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy626, 0);
        if( yymsp[-4].minor.yy626==0 ){
          sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy562);
        }else if( yymsp[-4].minor.yy626->pLeft->op==TK_VECTOR ){
          int nExpr = yymsp[-4].minor.yy626->pLeft->x.pList->nExpr;
          Select *pSelectRHS = sqlite3ExprListToValues(pParse, nExpr, yymsp[-1].minor.yy562);
          if( pSelectRHS ){
            parserDoubleLinkSelect(pParse, pSelectRHS);
            sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy626, pSelectRHS);
          }
        }else{
          yymsp[-4].minor.yy626->x.pList = yymsp[-1].minor.yy562;
          sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy626);
        }
      }
      if( yymsp[-3].minor.yy64 ) yymsp[-4].minor.yy626 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy626, 0);
    }
  }
        break;
      case 218: /* expr ::= LP select RP */
{
    yymsp[-2].minor.yy626 = sqlite3PExpr(pParse, TK_SELECT, 0, 0);
    sqlite3PExprAddSelect(pParse, yymsp[-2].minor.yy626, yymsp[-1].minor.yy303);
  }
        break;
      case 219: /* expr ::= expr in_op LP select RP */
{
    yymsp[-4].minor.yy626 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy626, 0);
    sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy626, yymsp[-1].minor.yy303);
    if( yymsp[-3].minor.yy64 ) yymsp[-4].minor.yy626 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy626, 0);
  }
        break;
      case 220: /* expr ::= expr in_op nm dbnm paren_exprlist */
{
    SrcList *pSrc = sqlite3SrcListAppend(pParse, 0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);
    Select *pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0);
    if( yymsp[0].minor.yy562 )  sqlite3SrcListFuncArgs(pParse, pSelect ? pSrc : 0, yymsp[0].minor.yy562);
    yymsp[-4].minor.yy626 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy626, 0);
    sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy626, pSelect);
    if( yymsp[-3].minor.yy64 ) yymsp[-4].minor.yy626 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy626, 0);
  }
        break;
      case 221: /* expr ::= EXISTS LP select RP */
{
    Expr *p;
    p = yymsp[-3].minor.yy626 = sqlite3PExpr(pParse, TK_EXISTS, 0, 0);
    sqlite3PExprAddSelect(pParse, p, yymsp[-1].minor.yy303);
  }
        break;
      case 222: /* expr ::= CASE case_operand case_exprlist case_else END */
{
  yymsp[-4].minor.yy626 = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy626, 0);
  if( yymsp[-4].minor.yy626 ){
    yymsp[-4].minor.yy626->x.pList = yymsp[-1].minor.yy626 ? sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy562,yymsp[-1].minor.yy626) : yymsp[-2].minor.yy562;
    sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy626);
  }else{
    sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy562);
    sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy626);
  }
}
        break;
      case 223: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
{
  yymsp[-4].minor.yy562 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy562, yymsp[-2].minor.yy626);
  yymsp[-4].minor.yy562 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy562, yymsp[0].minor.yy626);
}
        break;
      case 224: /* case_exprlist ::= WHEN expr THEN expr */
{
  yymsp[-3].minor.yy562 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy626);
  yymsp[-3].minor.yy562 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy562, yymsp[0].minor.yy626);
}
        break;
      case 227: /* case_operand ::= expr */
{yymsp[0].minor.yy626 = yymsp[0].minor.yy626; /*A-overwrites-X*/}
        break;
      case 230: /* nexprlist ::= nexprlist COMMA expr */
{yymsp[-2].minor.yy562 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy562,yymsp[0].minor.yy626);}
        break;
      case 231: /* nexprlist ::= expr */
{yymsp[0].minor.yy562 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy626); /*A-overwrites-Y*/}
        break;
      case 233: /* paren_exprlist ::= LP exprlist RP */
      case 238: /* eidlist_opt ::= LP eidlist RP */ yytestcase(yyruleno==238);
{yymsp[-2].minor.yy562 = yymsp[-1].minor.yy562;}
        break;
      case 234: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
{
  sqlite3CreateIndex(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0,
                     sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,0), yymsp[-2].minor.yy562, yymsp[-10].minor.yy64,
                      &yymsp[-11].minor.yy0, yymsp[0].minor.yy626, SQLITE_SO_ASC, yymsp[-8].minor.yy64, SQLITE_IDXTYPE_APPDEF);
  if( IN_RENAME_OBJECT && pParse->pNewIndex ){
    sqlite3RenameTokenMap(pParse, pParse->pNewIndex->zName, &yymsp[-4].minor.yy0);
  }
}
        break;
      case 235: /* uniqueflag ::= UNIQUE */
      case 277: /* raisetype ::= ABORT */ yytestcase(yyruleno==277);
{yymsp[0].minor.yy64 = OE_Abort;}
        break;
      case 236: /* uniqueflag ::= */
{yymsp[1].minor.yy64 = OE_None;}
        break;
      case 239: /* eidlist ::= eidlist COMMA nm collate sortorder */
{
  yymsp[-4].minor.yy562 = parserAddExprIdListTerm(pParse, yymsp[-4].minor.yy562, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy64, yymsp[0].minor.yy64);
}
        break;
      case 240: /* eidlist ::= nm collate sortorder */
{
  yymsp[-2].minor.yy562 = parserAddExprIdListTerm(pParse, 0, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy64, yymsp[0].minor.yy64); /*A-overwrites-Y*/
}
        break;
      case 243: /* cmd ::= DROP INDEX ifexists fullname */
{sqlite3DropIndex(pParse, yymsp[0].minor.yy607, yymsp[-1].minor.yy64);}
        break;
      case 244: /* cmd ::= VACUUM vinto */
{sqlite3Vacuum(pParse,0,yymsp[0].minor.yy626);}
        break;
      case 245: /* cmd ::= VACUUM nm vinto */
{sqlite3Vacuum(pParse,&yymsp[-1].minor.yy0,yymsp[0].minor.yy626);}
        break;
      case 248: /* cmd ::= PRAGMA nm dbnm */
{sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);}
        break;
      case 249: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);}
        break;
      case 250: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);}
        break;
      case 251: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);}
        break;
      case 252: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);}
        break;
      case 255: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
{
  Token all;
  all.z = yymsp[-3].minor.yy0.z;
  all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n;
  sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy95, &all);
}
        break;
      case 256: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
{
  sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy64, yymsp[-4].minor.yy570.a, yymsp[-4].minor.yy570.b, yymsp[-2].minor.yy607, yymsp[0].minor.yy626, yymsp[-10].minor.yy64, yymsp[-8].minor.yy64);
  yymsp[-10].minor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0); /*A-overwrites-T*/
}
        break;
      case 257: /* trigger_time ::= BEFORE|AFTER */
{ yymsp[0].minor.yy64 = yymsp[0].major; /*A-overwrites-X*/ }
        break;
      case 258: /* trigger_time ::= INSTEAD OF */
{ yymsp[-1].minor.yy64 = TK_INSTEAD;}
        break;
      case 259: /* trigger_time ::= */
{ yymsp[1].minor.yy64 = TK_BEFORE; }
        break;
      case 260: /* trigger_event ::= DELETE|INSERT */
      case 261: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==261);
{yymsp[0].minor.yy570.a = yymsp[0].major; /*A-overwrites-X*/ yymsp[0].minor.yy570.b = 0;}
        break;
      case 262: /* trigger_event ::= UPDATE OF idlist */
{yymsp[-2].minor.yy570.a = TK_UPDATE; yymsp[-2].minor.yy570.b = yymsp[0].minor.yy240;}
        break;
      case 263: /* when_clause ::= */
      case 282: /* key_opt ::= */ yytestcase(yyruleno==282);
{ yymsp[1].minor.yy626 = 0; }
        break;
      case 264: /* when_clause ::= WHEN expr */
      case 283: /* key_opt ::= KEY expr */ yytestcase(yyruleno==283);
{ yymsp[-1].minor.yy626 = yymsp[0].minor.yy626; }
        break;
      case 265: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
{
  assert( yymsp[-2].minor.yy95!=0 );
  yymsp[-2].minor.yy95->pLast->pNext = yymsp[-1].minor.yy95;
  yymsp[-2].minor.yy95->pLast = yymsp[-1].minor.yy95;
}
        break;
      case 266: /* trigger_cmd_list ::= trigger_cmd SEMI */
{
  assert( yymsp[-1].minor.yy95!=0 );
  yymsp[-1].minor.yy95->pLast = yymsp[-1].minor.yy95;
}
        break;
      case 267: /* trnm ::= nm DOT nm */
{
  yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;
  sqlite3ErrorMsg(pParse,
        "qualified table names are not allowed on INSERT, UPDATE, and DELETE "
        "statements within triggers");
}
        break;
      case 268: /* tridxby ::= INDEXED BY nm */
{
  sqlite3ErrorMsg(pParse,
        "the INDEXED BY clause is not allowed on UPDATE or DELETE statements "
        "within triggers");
}
        break;
      case 269: /* tridxby ::= NOT INDEXED */
{
  sqlite3ErrorMsg(pParse,
        "the NOT INDEXED clause is not allowed on UPDATE or DELETE statements "
        "within triggers");
}
        break;
      case 270: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */
{yylhsminor.yy95 = sqlite3TriggerUpdateStep(pParse, &yymsp[-6].minor.yy0, yymsp[-2].minor.yy607, yymsp[-3].minor.yy562, yymsp[-1].minor.yy626, yymsp[-7].minor.yy64, yymsp[-8].minor.yy0.z, yymsp[0].minor.yy600);}
  yymsp[-8].minor.yy95 = yylhsminor.yy95;
        break;
      case 271: /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
{
   yylhsminor.yy95 = sqlite3TriggerInsertStep(pParse,&yymsp[-4].minor.yy0,yymsp[-3].minor.yy240,yymsp[-2].minor.yy303,yymsp[-6].minor.yy64,yymsp[-1].minor.yy138,yymsp[-7].minor.yy600,yymsp[0].minor.yy600);/*yylhsminor.yy95-overwrites-yymsp[-6].minor.yy64*/
}
  yymsp[-7].minor.yy95 = yylhsminor.yy95;
        break;
      case 272: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
{yylhsminor.yy95 = sqlite3TriggerDeleteStep(pParse, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy626, yymsp[-5].minor.yy0.z, yymsp[0].minor.yy600);}
  yymsp[-5].minor.yy95 = yylhsminor.yy95;
        break;
      case 273: /* trigger_cmd ::= scanpt select scanpt */
{yylhsminor.yy95 = sqlite3TriggerSelectStep(pParse->db, yymsp[-1].minor.yy303, yymsp[-2].minor.yy600, yymsp[0].minor.yy600); /*yylhsminor.yy95-overwrites-yymsp[-1].minor.yy303*/}
  yymsp[-2].minor.yy95 = yylhsminor.yy95;
        break;
      case 274: /* expr ::= RAISE LP IGNORE RP */
{
  yymsp[-3].minor.yy626 = sqlite3PExpr(pParse, TK_RAISE, 0, 0);
  if( yymsp[-3].minor.yy626 ){
    yymsp[-3].minor.yy626->affExpr = OE_Ignore;
  }
}
        break;
      case 275: /* expr ::= RAISE LP raisetype COMMA nm RP */
{
  yymsp[-5].minor.yy626 = sqlite3ExprAlloc(pParse->db, TK_RAISE, &yymsp[-1].minor.yy0, 1);
  if( yymsp[-5].minor.yy626 ) {
    yymsp[-5].minor.yy626->affExpr = (char)yymsp[-3].minor.yy64;
  }
}
        break;
      case 276: /* raisetype ::= ROLLBACK */
{yymsp[0].minor.yy64 = OE_Rollback;}
        break;
      case 278: /* raisetype ::= FAIL */
{yymsp[0].minor.yy64 = OE_Fail;}
        break;
      case 279: /* cmd ::= DROP TRIGGER ifexists fullname */
{
  sqlite3DropTrigger(pParse,yymsp[0].minor.yy607,yymsp[-1].minor.yy64);
}
        break;
      case 280: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
{
  sqlite3Attach(pParse, yymsp[-3].minor.yy626, yymsp[-1].minor.yy626, yymsp[0].minor.yy626);
}
        break;
      case 281: /* cmd ::= DETACH database_kw_opt expr */
{
  sqlite3Detach(pParse, yymsp[0].minor.yy626);
}
        break;
      case 284: /* cmd ::= REINDEX */
{sqlite3Reindex(pParse, 0, 0);}
        break;
      case 285: /* cmd ::= REINDEX nm dbnm */
{sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
        break;
      case 286: /* cmd ::= ANALYZE */
{sqlite3Analyze(pParse, 0, 0);}
        break;
      case 287: /* cmd ::= ANALYZE nm dbnm */
{sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
        break;
      case 288: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
{
  sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy607,&yymsp[0].minor.yy0);
}
        break;
      case 289: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
{
  yymsp[-1].minor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-1].minor.yy0.z) + pParse->sLastToken.n;
  sqlite3AlterFinishAddColumn(pParse, &yymsp[-1].minor.yy0);
}
        break;
      case 290: /* cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
{
  sqlite3AlterDropColumn(pParse, yymsp[-3].minor.yy607, &yymsp[0].minor.yy0);
}
        break;
      case 291: /* add_column_fullname ::= fullname */
{
  disableLookaside(pParse);
  sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy607);
}
        break;
      case 292: /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
{
  sqlite3AlterRenameColumn(pParse, yymsp[-5].minor.yy607, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
}
        break;
      case 293: /* cmd ::= create_vtab */
{sqlite3VtabFinishParse(pParse,0);}
        break;
      case 294: /* cmd ::= create_vtab LP vtabarglist RP */
{sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}
        break;
      case 295: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
{
    sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy64);
}
        break;
      case 296: /* vtabarg ::= */
{sqlite3VtabArgInit(pParse);}
        break;
      case 297: /* vtabargtoken ::= ANY */
      case 298: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==298);
      case 299: /* lp ::= LP */ yytestcase(yyruleno==299);
{sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}
        break;
      case 300: /* with ::= WITH wqlist */
      case 301: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==301);
{ sqlite3WithPush(pParse, yymsp[0].minor.yy43, 1); }
        break;
      case 302: /* wqas ::= AS */
{yymsp[0].minor.yy534 = M10d_Any;}
        break;
      case 303: /* wqas ::= AS MATERIALIZED */
{yymsp[-1].minor.yy534 = M10d_Yes;}
        break;
      case 304: /* wqas ::= AS NOT MATERIALIZED */
{yymsp[-2].minor.yy534 = M10d_No;}
        break;
      case 305: /* wqitem ::= nm eidlist_opt wqas LP select RP */
{
  yymsp[-5].minor.yy255 = sqlite3CteNew(pParse, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy562, yymsp[-1].minor.yy303, yymsp[-3].minor.yy534); /*A-overwrites-X*/
}
        break;
      case 306: /* wqlist ::= wqitem */
{
  yymsp[0].minor.yy43 = sqlite3WithAdd(pParse, 0, yymsp[0].minor.yy255); /*A-overwrites-X*/
}
        break;
      case 307: /* wqlist ::= wqlist COMMA wqitem */
{
  yymsp[-2].minor.yy43 = sqlite3WithAdd(pParse, yymsp[-2].minor.yy43, yymsp[0].minor.yy255);
}
        break;
      case 308: /* windowdefn_list ::= windowdefn */
{ yylhsminor.yy375 = yymsp[0].minor.yy375; }
  yymsp[0].minor.yy375 = yylhsminor.yy375;
        break;
      case 309: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */
{
  assert( yymsp[0].minor.yy375!=0 );
  sqlite3WindowChain(pParse, yymsp[0].minor.yy375, yymsp[-2].minor.yy375);
  yymsp[0].minor.yy375->pNextWin = yymsp[-2].minor.yy375;
  yylhsminor.yy375 = yymsp[0].minor.yy375;
}
  yymsp[-2].minor.yy375 = yylhsminor.yy375;
        break;
      case 310: /* windowdefn ::= nm AS LP window RP */
{
  if( ALWAYS(yymsp[-1].minor.yy375) ){
    yymsp[-1].minor.yy375->zName = sqlite3DbStrNDup(pParse->db, yymsp[-4].minor.yy0.z, yymsp[-4].minor.yy0.n);
  }
  yylhsminor.yy375 = yymsp[-1].minor.yy375;
}
  yymsp[-4].minor.yy375 = yylhsminor.yy375;
        break;
      case 311: /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */
{
  yymsp[-4].minor.yy375 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy375, yymsp[-2].minor.yy562, yymsp[-1].minor.yy562, 0);
}
        break;
      case 312: /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
{
  yylhsminor.yy375 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy375, yymsp[-2].minor.yy562, yymsp[-1].minor.yy562, &yymsp[-5].minor.yy0);
}
  yymsp[-5].minor.yy375 = yylhsminor.yy375;
        break;
      case 313: /* window ::= ORDER BY sortlist frame_opt */
{
  yymsp[-3].minor.yy375 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy375, 0, yymsp[-1].minor.yy562, 0);
}
        break;
      case 314: /* window ::= nm ORDER BY sortlist frame_opt */
{
  yylhsminor.yy375 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy375, 0, yymsp[-1].minor.yy562, &yymsp[-4].minor.yy0);
}
  yymsp[-4].minor.yy375 = yylhsminor.yy375;
        break;
      case 315: /* window ::= frame_opt */
      case 334: /* filter_over ::= over_clause */ yytestcase(yyruleno==334);
{
  yylhsminor.yy375 = yymsp[0].minor.yy375;
}
  yymsp[0].minor.yy375 = yylhsminor.yy375;
        break;
      case 316: /* window ::= nm frame_opt */
{
  yylhsminor.yy375 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy375, 0, 0, &yymsp[-1].minor.yy0);
}
  yymsp[-1].minor.yy375 = yylhsminor.yy375;
        break;
      case 317: /* frame_opt ::= */
{
  yymsp[1].minor.yy375 = sqlite3WindowAlloc(pParse, 0, TK_UNBOUNDED, 0, TK_CURRENT, 0, 0);
}
        break;
      case 318: /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
{
  yylhsminor.yy375 = sqlite3WindowAlloc(pParse, yymsp[-2].minor.yy64, yymsp[-1].minor.yy81.eType, yymsp[-1].minor.yy81.pExpr, TK_CURRENT, 0, yymsp[0].minor.yy534);
}
  yymsp[-2].minor.yy375 = yylhsminor.yy375;
        break;
      case 319: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
{
  yylhsminor.yy375 = sqlite3WindowAlloc(pParse, yymsp[-5].minor.yy64, yymsp[-3].minor.yy81.eType, yymsp[-3].minor.yy81.pExpr, yymsp[-1].minor.yy81.eType, yymsp[-1].minor.yy81.pExpr, yymsp[0].minor.yy534);
}
  yymsp[-5].minor.yy375 = yylhsminor.yy375;
        break;
      case 321: /* frame_bound_s ::= frame_bound */
      case 323: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==323);
{yylhsminor.yy81 = yymsp[0].minor.yy81;}
  yymsp[0].minor.yy81 = yylhsminor.yy81;
        break;
      case 322: /* frame_bound_s ::= UNBOUNDED PRECEDING */
      case 324: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==324);
      case 326: /* frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==326);
{yylhsminor.yy81.eType = yymsp[-1].major; yylhsminor.yy81.pExpr = 0;}
  yymsp[-1].minor.yy81 = yylhsminor.yy81;
        break;
      case 325: /* frame_bound ::= expr PRECEDING|FOLLOWING */
{yylhsminor.yy81.eType = yymsp[0].major; yylhsminor.yy81.pExpr = yymsp[-1].minor.yy626;}
  yymsp[-1].minor.yy81 = yylhsminor.yy81;
        break;
      case 327: /* frame_exclude_opt ::= */
{yymsp[1].minor.yy534 = 0;}
        break;
      case 328: /* frame_exclude_opt ::= EXCLUDE frame_exclude */
{yymsp[-1].minor.yy534 = yymsp[0].minor.yy534;}
        break;
      case 329: /* frame_exclude ::= NO OTHERS */
      case 330: /* frame_exclude ::= CURRENT ROW */ yytestcase(yyruleno==330);
{yymsp[-1].minor.yy534 = yymsp[-1].major; /*A-overwrites-X*/}
        break;
      case 331: /* frame_exclude ::= GROUP|TIES */
{yymsp[0].minor.yy534 = yymsp[0].major; /*A-overwrites-X*/}
        break;
      case 332: /* window_clause ::= WINDOW windowdefn_list */
{ yymsp[-1].minor.yy375 = yymsp[0].minor.yy375; }
        break;
      case 333: /* filter_over ::= filter_clause over_clause */
{
  if( yymsp[0].minor.yy375 ){
    yymsp[0].minor.yy375->pFilter = yymsp[-1].minor.yy626;
  }else{
    sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy626);
  }
  yylhsminor.yy375 = yymsp[0].minor.yy375;
}
  yymsp[-1].minor.yy375 = yylhsminor.yy375;
        break;
      case 335: /* filter_over ::= filter_clause */
{
  yylhsminor.yy375 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
  if( yylhsminor.yy375 ){
    yylhsminor.yy375->eFrmType = TK_FILTER;
    yylhsminor.yy375->pFilter = yymsp[0].minor.yy626;
  }else{
    sqlite3ExprDelete(pParse->db, yymsp[0].minor.yy626);
  }
}
  yymsp[0].minor.yy375 = yylhsminor.yy375;
        break;
      case 336: /* over_clause ::= OVER LP window RP */
{
  yymsp[-3].minor.yy375 = yymsp[-1].minor.yy375;
  assert( yymsp[-3].minor.yy375!=0 );
}
        break;
      case 337: /* over_clause ::= OVER nm */
{
  yymsp[-1].minor.yy375 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
  if( yymsp[-1].minor.yy375 ){
    yymsp[-1].minor.yy375->zName = sqlite3DbStrNDup(pParse->db, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n);
  }
}
        break;
      case 338: /* filter_clause ::= FILTER LP WHERE expr RP */
{ yymsp[-4].minor.yy626 = yymsp[-1].minor.yy626; }
        break;
      default:
      /* (339) input ::= cmdlist */ yytestcase(yyruleno==339);
      /* (340) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==340);
      /* (341) cmdlist ::= ecmd (OPTIMIZED OUT) */ assert(yyruleno!=341);
      /* (342) ecmd ::= SEMI */ yytestcase(yyruleno==342);
      /* (343) ecmd ::= cmdx SEMI */ yytestcase(yyruleno==343);
      /* (344) ecmd ::= explain cmdx SEMI (NEVER REDUCES) */ assert(yyruleno!=344);
      /* (345) trans_opt ::= */ yytestcase(yyruleno==345);
      /* (346) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==346);
      /* (347) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==347);
      /* (348) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==348);
      /* (349) savepoint_opt ::= */ yytestcase(yyruleno==349);
      /* (350) cmd ::= create_table create_table_args */ yytestcase(yyruleno==350);
      /* (351) table_option_set ::= table_option (OPTIMIZED OUT) */ assert(yyruleno!=351);
      /* (352) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==352);
      /* (353) columnlist ::= columnname carglist */ yytestcase(yyruleno==353);
      /* (354) nm ::= ID|INDEXED */ yytestcase(yyruleno==354);
      /* (355) nm ::= STRING */ yytestcase(yyruleno==355);
      /* (356) nm ::= JOIN_KW */ yytestcase(yyruleno==356);
      /* (357) typetoken ::= typename */ yytestcase(yyruleno==357);
      /* (358) typename ::= ID|STRING */ yytestcase(yyruleno==358);
      /* (359) signed ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=359);
      /* (360) signed ::= minus_num (OPTIMIZED OUT) */ assert(yyruleno!=360);
      /* (361) carglist ::= carglist ccons */ yytestcase(yyruleno==361);
      /* (362) carglist ::= */ yytestcase(yyruleno==362);
      /* (363) ccons ::= NULL onconf */ yytestcase(yyruleno==363);
      /* (364) ccons ::= GENERATED ALWAYS AS generated */ yytestcase(yyruleno==364);
      /* (365) ccons ::= AS generated */ yytestcase(yyruleno==365);
      /* (366) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==366);
      /* (367) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==367);
      /* (368) conslist ::= tcons (OPTIMIZED OUT) */ assert(yyruleno!=368);
      /* (369) tconscomma ::= */ yytestcase(yyruleno==369);
      /* (370) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=370);
      /* (371) resolvetype ::= raisetype (OPTIMIZED OUT) */ assert(yyruleno!=371);
      /* (372) selectnowith ::= oneselect (OPTIMIZED OUT) */ assert(yyruleno!=372);
      /* (373) oneselect ::= values */ yytestcase(yyruleno==373);
      /* (374) sclp ::= selcollist COMMA */ yytestcase(yyruleno==374);
      /* (375) as ::= ID|STRING */ yytestcase(yyruleno==375);
      /* (376) returning ::= */ yytestcase(yyruleno==376);
      /* (377) expr ::= term (OPTIMIZED OUT) */ assert(yyruleno!=377);
      /* (378) likeop ::= LIKE_KW|MATCH */ yytestcase(yyruleno==378);
      /* (379) exprlist ::= nexprlist */ yytestcase(yyruleno==379);
      /* (380) nmnum ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=380);
      /* (381) nmnum ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=381);
      /* (382) nmnum ::= ON */ yytestcase(yyruleno==382);
      /* (383) nmnum ::= DELETE */ yytestcase(yyruleno==383);
      /* (384) nmnum ::= DEFAULT */ yytestcase(yyruleno==384);
      /* (385) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==385);
      /* (386) foreach_clause ::= */ yytestcase(yyruleno==386);
      /* (387) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==387);
      /* (388) trnm ::= nm */ yytestcase(yyruleno==388);
      /* (389) tridxby ::= */ yytestcase(yyruleno==389);
      /* (390) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==390);
      /* (391) database_kw_opt ::= */ yytestcase(yyruleno==391);
      /* (392) kwcolumn_opt ::= */ yytestcase(yyruleno==392);
      /* (393) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==393);
      /* (394) vtabarglist ::= vtabarg */ yytestcase(yyruleno==394);
      /* (395) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==395);
      /* (396) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==396);
      /* (397) anylist ::= */ yytestcase(yyruleno==397);
      /* (398) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==398);
      /* (399) anylist ::= anylist ANY */ yytestcase(yyruleno==399);
      /* (400) with ::= */ yytestcase(yyruleno==400);
        break;
/********** End reduce actions ************************************************/
  };
  assert( yyruleno<sizeof(yyRuleInfoLhs)/sizeof(yyRuleInfoLhs[0]) );
  yygoto = yyRuleInfoLhs[yyruleno];
  yysize = yyRuleInfoNRhs[yyruleno];
  yyact = yy_find_reduce_action(yymsp[yysize].stateno,(YYCODETYPE)yygoto);
163477
163478
163479
163480
163481
163482
163483
163484
163485
163486
163487
163488

163489
163490
163491
163492
163493
163494
163495
163496
163497
163498
          fprintf(yyTraceFILE,"%sDiscard input token %s\n",
             yyTracePrompt,yyTokenName[yymajor]);
        }
#endif
        yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);
        yymajor = YYNOCODE;
      }else{
        while( yypParser->yytos >= yypParser->yystack
            && (yyact = yy_find_reduce_action(
                        yypParser->yytos->stateno,
                        YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE
        ){

          yy_pop_parser_stack(yypParser);
        }
        if( yypParser->yytos < yypParser->yystack || yymajor==0 ){
          yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
          yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
          yypParser->yyerrcnt = -1;
#endif
          yymajor = YYNOCODE;
        }else if( yymx!=YYERRORSYMBOL ){







|
|
<
|
<
>


|







163798
163799
163800
163801
163802
163803
163804
163805
163806

163807

163808
163809
163810
163811
163812
163813
163814
163815
163816
163817
163818
          fprintf(yyTraceFILE,"%sDiscard input token %s\n",
             yyTracePrompt,yyTokenName[yymajor]);
        }
#endif
        yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);
        yymajor = YYNOCODE;
      }else{
        while( yypParser->yytos > yypParser->yystack ){
          yyact = yy_find_reduce_action(yypParser->yytos->stateno,

                                        YYERRORSYMBOL);

          if( yyact<=YY_MAX_SHIFTREDUCE ) break;
          yy_pop_parser_stack(yypParser);
        }
        if( yypParser->yytos <= yypParser->yystack || yymajor==0 ){
          yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
          yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
          yypParser->yyerrcnt = -1;
#endif
          yymajor = YYNOCODE;
        }else if( yymx!=YYERRORSYMBOL ){
166551
166552
166553
166554
166555
166556
166557
166558
166559
166560
166561
166562
166563
166564
166565
    /* Closing the handle. Fourth parameter is passed the value 2. */
    sqlite3GlobalConfig.xSqllog(sqlite3GlobalConfig.pSqllogArg, db, 0, 2);
  }
#endif

  /* Convert the connection into a zombie and then close it.
  */
  db->magic = SQLITE_MAGIC_ZOMBIE;
  sqlite3LeaveMutexAndCloseZombie(db);
  return SQLITE_OK;
}

/*
** Return the transaction state for a single databse, or the maximum
** transaction state over all attached databases if zSchema is null.







|







166871
166872
166873
166874
166875
166876
166877
166878
166879
166880
166881
166882
166883
166884
166885
    /* Closing the handle. Fourth parameter is passed the value 2. */
    sqlite3GlobalConfig.xSqllog(sqlite3GlobalConfig.pSqllogArg, db, 0, 2);
  }
#endif

  /* Convert the connection into a zombie and then close it.
  */
  db->eOpenState = SQLITE_STATE_ZOMBIE;
  sqlite3LeaveMutexAndCloseZombie(db);
  return SQLITE_OK;
}

/*
** Return the transaction state for a single databse, or the maximum
** transaction state over all attached databases if zSchema is null.
166615
166616
166617
166618
166619
166620
166621
166622
166623
166624
166625
166626
166627
166628
166629
  HashElem *i;                    /* Hash table iterator */
  int j;

  /* If there are outstanding sqlite3_stmt or sqlite3_backup objects
  ** or if the connection has not yet been closed by sqlite3_close_v2(),
  ** then just leave the mutex and return.
  */
  if( db->magic!=SQLITE_MAGIC_ZOMBIE || connectionIsBusy(db) ){
    sqlite3_mutex_leave(db->mutex);
    return;
  }

  /* If we reach this point, it means that the database connection has
  ** closed all sqlite3_stmt and sqlite3_backup objects and has been
  ** passed to sqlite3_close (meaning that it is a zombie).  Therefore,







|







166935
166936
166937
166938
166939
166940
166941
166942
166943
166944
166945
166946
166947
166948
166949
  HashElem *i;                    /* Hash table iterator */
  int j;

  /* If there are outstanding sqlite3_stmt or sqlite3_backup objects
  ** or if the connection has not yet been closed by sqlite3_close_v2(),
  ** then just leave the mutex and return.
  */
  if( db->eOpenState!=SQLITE_STATE_ZOMBIE || connectionIsBusy(db) ){
    sqlite3_mutex_leave(db->mutex);
    return;
  }

  /* If we reach this point, it means that the database connection has
  ** closed all sqlite3_stmt and sqlite3_backup objects and has been
  ** passed to sqlite3_close (meaning that it is a zombie).  Therefore,
166701
166702
166703
166704
166705
166706
166707
166708
166709
166710
166711
166712
166713
166714
166715
166716
166717
166718
166719
166720
166721
166722
166723
166724
166725
  sqlite3ValueFree(db->pErr);
  sqlite3CloseExtensions(db);
#if SQLITE_USER_AUTHENTICATION
  sqlite3_free(db->auth.zAuthUser);
  sqlite3_free(db->auth.zAuthPW);
#endif

  db->magic = SQLITE_MAGIC_ERROR;

  /* The temp-database schema is allocated differently from the other schema
  ** objects (using sqliteMalloc() directly, instead of sqlite3BtreeSchema()).
  ** So it needs to be freed here. Todo: Why not roll the temp schema into
  ** the same sqliteMalloc() as the one that allocates the database
  ** structure?
  */
  sqlite3DbFree(db, db->aDb[1].pSchema);
  sqlite3_mutex_leave(db->mutex);
  db->magic = SQLITE_MAGIC_CLOSED;
  sqlite3_mutex_free(db->mutex);
  assert( sqlite3LookasideUsed(db,0)==0 );
  if( db->lookaside.bMalloced ){
    sqlite3_free(db->lookaside.pStart);
  }
  sqlite3_free(db);
}







|









|







167021
167022
167023
167024
167025
167026
167027
167028
167029
167030
167031
167032
167033
167034
167035
167036
167037
167038
167039
167040
167041
167042
167043
167044
167045
  sqlite3ValueFree(db->pErr);
  sqlite3CloseExtensions(db);
#if SQLITE_USER_AUTHENTICATION
  sqlite3_free(db->auth.zAuthUser);
  sqlite3_free(db->auth.zAuthPW);
#endif

  db->eOpenState = SQLITE_STATE_ERROR;

  /* The temp-database schema is allocated differently from the other schema
  ** objects (using sqliteMalloc() directly, instead of sqlite3BtreeSchema()).
  ** So it needs to be freed here. Todo: Why not roll the temp schema into
  ** the same sqliteMalloc() as the one that allocates the database
  ** structure?
  */
  sqlite3DbFree(db, db->aDb[1].pSchema);
  sqlite3_mutex_leave(db->mutex);
  db->eOpenState = SQLITE_STATE_CLOSED;
  sqlite3_mutex_free(db->mutex);
  assert( sqlite3LookasideUsed(db,0)==0 );
  if( db->lookaside.bMalloced ){
    sqlite3_free(db->lookaside.pStart);
  }
  sqlite3_free(db);
}
167099
167100
167101
167102
167103
167104
167105
167106
167107
167108
167109
167110
167111
167112
167113
}

/*
** Cause any pending operation to stop at its earliest opportunity.
*/
SQLITE_API void sqlite3_interrupt(sqlite3 *db){
#ifdef SQLITE_ENABLE_API_ARMOR
  if( !sqlite3SafetyCheckOk(db) && (db==0 || db->magic!=SQLITE_MAGIC_ZOMBIE) ){
    (void)SQLITE_MISUSE_BKPT;
    return;
  }
#endif
  AtomicStore(&db->u1.isInterrupted, 1);
}








|







167419
167420
167421
167422
167423
167424
167425
167426
167427
167428
167429
167430
167431
167432
167433
}

/*
** Cause any pending operation to stop at its earliest opportunity.
*/
SQLITE_API void sqlite3_interrupt(sqlite3 *db){
#ifdef SQLITE_ENABLE_API_ARMOR
  if( !sqlite3SafetyCheckOk(db) && (db==0 || db->eOpenState!=SQLITE_STATE_ZOMBIE) ){
    (void)SQLITE_MISUSE_BKPT;
    return;
  }
#endif
  AtomicStore(&db->u1.isInterrupted, 1);
}

168502
168503
168504
168505
168506
168507
168508
168509
168510
168511
168512
168513
168514
168515
168516
168517
168518
168519
168520






168521

168522
168523
168524
168525
168526
168527
168528
    if( isThreadsafe==0 ){
      sqlite3MutexWarnOnContention(db->mutex);
    }
  }
  sqlite3_mutex_enter(db->mutex);
  db->errMask = 0xff;
  db->nDb = 2;
  db->magic = SQLITE_MAGIC_BUSY;
  db->aDb = db->aDbStatic;
  db->lookaside.bDisable = 1;
  db->lookaside.sz = 0;

  assert( sizeof(db->aLimit)==sizeof(aHardLimit) );
  memcpy(db->aLimit, aHardLimit, sizeof(db->aLimit));
  db->aLimit[SQLITE_LIMIT_WORKER_THREADS] = SQLITE_DEFAULT_WORKER_THREADS;
  db->autoCommit = 1;
  db->nextAutovac = -1;
  db->szMmap = sqlite3GlobalConfig.szMmap;
  db->nextPagesize = 0;






  db->nMaxSorterMmap = 0x7FFFFFFF;

  db->flags |= SQLITE_ShortColNames
                 | SQLITE_EnableTrigger
                 | SQLITE_EnableView
                 | SQLITE_CacheSpill
#if !defined(SQLITE_TRUSTED_SCHEMA) || SQLITE_TRUSTED_SCHEMA+0!=0
                 | SQLITE_TrustedSchema
#endif







|











>
>
>
>
>
>

>







168822
168823
168824
168825
168826
168827
168828
168829
168830
168831
168832
168833
168834
168835
168836
168837
168838
168839
168840
168841
168842
168843
168844
168845
168846
168847
168848
168849
168850
168851
168852
168853
168854
168855
    if( isThreadsafe==0 ){
      sqlite3MutexWarnOnContention(db->mutex);
    }
  }
  sqlite3_mutex_enter(db->mutex);
  db->errMask = 0xff;
  db->nDb = 2;
  db->eOpenState = SQLITE_STATE_BUSY;
  db->aDb = db->aDbStatic;
  db->lookaside.bDisable = 1;
  db->lookaside.sz = 0;

  assert( sizeof(db->aLimit)==sizeof(aHardLimit) );
  memcpy(db->aLimit, aHardLimit, sizeof(db->aLimit));
  db->aLimit[SQLITE_LIMIT_WORKER_THREADS] = SQLITE_DEFAULT_WORKER_THREADS;
  db->autoCommit = 1;
  db->nextAutovac = -1;
  db->szMmap = sqlite3GlobalConfig.szMmap;
  db->nextPagesize = 0;
#ifdef SQLITE_ENABLE_SORTER_MMAP
  /* Beginning with version 3.37.0, using the VFS xFetch() API to memory-map
  ** the temporary files used to do external sorts (see code in vdbesort.c)
  ** is disabled. It can still be used either by defining
  ** SQLITE_ENABLE_SORTER_MMAP at compile time or by using the
  ** SQLITE_TESTCTRL_SORTER_MMAP test-control at runtime. */
  db->nMaxSorterMmap = 0x7FFFFFFF;
#endif
  db->flags |= SQLITE_ShortColNames
                 | SQLITE_EnableTrigger
                 | SQLITE_EnableView
                 | SQLITE_CacheSpill
#if !defined(SQLITE_TRUSTED_SCHEMA) || SQLITE_TRUSTED_SCHEMA+0!=0
                 | SQLITE_TrustedSchema
#endif
168662
168663
168664
168665
168666
168667
168668
168669
168670
168671
168672
168673
168674
168675
168676
  ** database it is OFF. This matches the pager layer defaults.
  */
  db->aDb[0].zDbSName = "main";
  db->aDb[0].safety_level = SQLITE_DEFAULT_SYNCHRONOUS+1;
  db->aDb[1].zDbSName = "temp";
  db->aDb[1].safety_level = PAGER_SYNCHRONOUS_OFF;

  db->magic = SQLITE_MAGIC_OPEN;
  if( db->mallocFailed ){
    goto opendb_out;
  }

  /* Register all built-in functions, but do not attempt to read the
  ** database schema yet. This is delayed until the first time the database
  ** is accessed.







|







168989
168990
168991
168992
168993
168994
168995
168996
168997
168998
168999
169000
169001
169002
169003
  ** database it is OFF. This matches the pager layer defaults.
  */
  db->aDb[0].zDbSName = "main";
  db->aDb[0].safety_level = SQLITE_DEFAULT_SYNCHRONOUS+1;
  db->aDb[1].zDbSName = "temp";
  db->aDb[1].safety_level = PAGER_SYNCHRONOUS_OFF;

  db->eOpenState = SQLITE_STATE_OPEN;
  if( db->mallocFailed ){
    goto opendb_out;
  }

  /* Register all built-in functions, but do not attempt to read the
  ** database schema yet. This is delayed until the first time the database
  ** is accessed.
168729
168730
168731
168732
168733
168734
168735
168736
168737
168738
168739
168740
168741
168742
168743
  }
  rc = sqlite3_errcode(db);
  assert( db!=0 || rc==SQLITE_NOMEM );
  if( rc==SQLITE_NOMEM ){
    sqlite3_close(db);
    db = 0;
  }else if( rc!=SQLITE_OK ){
    db->magic = SQLITE_MAGIC_SICK;
  }
  *ppDb = db;
#ifdef SQLITE_ENABLE_SQLLOG
  if( sqlite3GlobalConfig.xSqllog ){
    /* Opening a db handle. Fourth parameter is passed 0. */
    void *pArg = sqlite3GlobalConfig.pSqllogArg;
    sqlite3GlobalConfig.xSqllog(pArg, db, zFilename, 0);







|







169056
169057
169058
169059
169060
169061
169062
169063
169064
169065
169066
169067
169068
169069
169070
  }
  rc = sqlite3_errcode(db);
  assert( db!=0 || rc==SQLITE_NOMEM );
  if( rc==SQLITE_NOMEM ){
    sqlite3_close(db);
    db = 0;
  }else if( rc!=SQLITE_OK ){
    db->eOpenState = SQLITE_STATE_SICK;
  }
  *ppDb = db;
#ifdef SQLITE_ENABLE_SQLLOG
  if( sqlite3GlobalConfig.xSqllog ){
    /* Opening a db handle. Fourth parameter is passed 0. */
    void *pArg = sqlite3GlobalConfig.pSqllogArg;
    sqlite3GlobalConfig.xSqllog(pArg, db, zFilename, 0);
215508
215509
215510
215511
215512
215513
215514
215515
215516
215517
215518
215519

215520
215521
215522
215523
215524
215525
215526
215527
215528
215529
          fprintf(fts5yyTraceFILE,"%sDiscard input token %s\n",
             fts5yyTracePrompt,fts5yyTokenName[fts5yymajor]);
        }
#endif
        fts5yy_destructor(fts5yypParser, (fts5YYCODETYPE)fts5yymajor, &fts5yyminorunion);
        fts5yymajor = fts5YYNOCODE;
      }else{
        while( fts5yypParser->fts5yytos >= fts5yypParser->fts5yystack
            && (fts5yyact = fts5yy_find_reduce_action(
                        fts5yypParser->fts5yytos->stateno,
                        fts5YYERRORSYMBOL)) > fts5YY_MAX_SHIFTREDUCE
        ){

          fts5yy_pop_parser_stack(fts5yypParser);
        }
        if( fts5yypParser->fts5yytos < fts5yypParser->fts5yystack || fts5yymajor==0 ){
          fts5yy_destructor(fts5yypParser,(fts5YYCODETYPE)fts5yymajor,&fts5yyminorunion);
          fts5yy_parse_failed(fts5yypParser);
#ifndef fts5YYNOERRORRECOVERY
          fts5yypParser->fts5yyerrcnt = -1;
#endif
          fts5yymajor = fts5YYNOCODE;
        }else if( fts5yymx!=fts5YYERRORSYMBOL ){







|
|
<
|
<
>


|







215835
215836
215837
215838
215839
215840
215841
215842
215843

215844

215845
215846
215847
215848
215849
215850
215851
215852
215853
215854
215855
          fprintf(fts5yyTraceFILE,"%sDiscard input token %s\n",
             fts5yyTracePrompt,fts5yyTokenName[fts5yymajor]);
        }
#endif
        fts5yy_destructor(fts5yypParser, (fts5YYCODETYPE)fts5yymajor, &fts5yyminorunion);
        fts5yymajor = fts5YYNOCODE;
      }else{
        while( fts5yypParser->fts5yytos > fts5yypParser->fts5yystack ){
          fts5yyact = fts5yy_find_reduce_action(fts5yypParser->fts5yytos->stateno,

                                        fts5YYERRORSYMBOL);

          if( fts5yyact<=fts5YY_MAX_SHIFTREDUCE ) break;
          fts5yy_pop_parser_stack(fts5yypParser);
        }
        if( fts5yypParser->fts5yytos <= fts5yypParser->fts5yystack || fts5yymajor==0 ){
          fts5yy_destructor(fts5yypParser,(fts5YYCODETYPE)fts5yymajor,&fts5yyminorunion);
          fts5yy_parse_failed(fts5yypParser);
#ifndef fts5YYNOERRORRECOVERY
          fts5yypParser->fts5yyerrcnt = -1;
#endif
          fts5yymajor = fts5YYNOCODE;
        }else if( fts5yymx!=fts5YYERRORSYMBOL ){
230847
230848
230849
230850
230851
230852
230853
230854
230855
230856
230857
230858
230859
230860
230861
static void fts5SourceIdFunc(
  sqlite3_context *pCtx,          /* Function call context */
  int nArg,                       /* Number of args */
  sqlite3_value **apUnused        /* Function arguments */
){
  assert( nArg==0 );
  UNUSED_PARAM2(nArg, apUnused);
  sqlite3_result_text(pCtx, "fts5: 2021-08-06 20:17:39 087b8b41c6ed76b55c11315e7e95679d67590be20ae21108b593d00bb7d1c57a", -1, SQLITE_TRANSIENT);
}

/*
** Return true if zName is the extension on one of the shadow tables used
** by this module.
*/
static int fts5ShadowName(const char *zName){







|







231173
231174
231175
231176
231177
231178
231179
231180
231181
231182
231183
231184
231185
231186
231187
static void fts5SourceIdFunc(
  sqlite3_context *pCtx,          /* Function call context */
  int nArg,                       /* Number of args */
  sqlite3_value **apUnused        /* Function arguments */
){
  assert( nArg==0 );
  UNUSED_PARAM2(nArg, apUnused);
  sqlite3_result_text(pCtx, "fts5: 2021-09-06 11:44:19 b3cfe23bec0b95ca673802526704200e2396df715fdded72aa71addd7f47e0e1", -1, SQLITE_TRANSIENT);
}

/*
** Return true if zName is the extension on one of the shadow tables used
** by this module.
*/
static int fts5ShadowName(const char *zName){
Changes to src/sqlite3.h.
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
**
** See also: [sqlite3_libversion()],
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
#define SQLITE_VERSION        "3.37.0"
#define SQLITE_VERSION_NUMBER 3037000
#define SQLITE_SOURCE_ID      "2021-08-06 20:17:39 087b8b41c6ed76b55c11315e7e95679d67590be20ae21108b593d00bb7d1c57a"

/*
** CAPI3REF: Run-Time Library Version Numbers
** KEYWORDS: sqlite3_version sqlite3_sourceid
**
** These interfaces provide the same information as the [SQLITE_VERSION],
** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros







|







144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
**
** See also: [sqlite3_libversion()],
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
#define SQLITE_VERSION        "3.37.0"
#define SQLITE_VERSION_NUMBER 3037000
#define SQLITE_SOURCE_ID      "2021-09-06 11:44:19 b3cfe23bec0b95ca673802526704200e2396df715fdded72aa71addd7f47e0e1"

/*
** CAPI3REF: Run-Time Library Version Numbers
** KEYWORDS: sqlite3_version sqlite3_sourceid
**
** These interfaces provide the same information as the [SQLITE_VERSION],
** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros
557
558
559
560
561
562
563

564
565
566
567
568
569
570
#define SQLITE_CONSTRAINT_NOTNULL      (SQLITE_CONSTRAINT | (5<<8))
#define SQLITE_CONSTRAINT_PRIMARYKEY   (SQLITE_CONSTRAINT | (6<<8))
#define SQLITE_CONSTRAINT_TRIGGER      (SQLITE_CONSTRAINT | (7<<8))
#define SQLITE_CONSTRAINT_UNIQUE       (SQLITE_CONSTRAINT | (8<<8))
#define SQLITE_CONSTRAINT_VTAB         (SQLITE_CONSTRAINT | (9<<8))
#define SQLITE_CONSTRAINT_ROWID        (SQLITE_CONSTRAINT |(10<<8))
#define SQLITE_CONSTRAINT_PINNED       (SQLITE_CONSTRAINT |(11<<8))

#define SQLITE_NOTICE_RECOVER_WAL      (SQLITE_NOTICE | (1<<8))
#define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8))
#define SQLITE_WARNING_AUTOINDEX       (SQLITE_WARNING | (1<<8))
#define SQLITE_AUTH_USER               (SQLITE_AUTH | (1<<8))
#define SQLITE_OK_LOAD_PERMANENTLY     (SQLITE_OK | (1<<8))
#define SQLITE_OK_SYMLINK              (SQLITE_OK | (2<<8))








>







557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
#define SQLITE_CONSTRAINT_NOTNULL      (SQLITE_CONSTRAINT | (5<<8))
#define SQLITE_CONSTRAINT_PRIMARYKEY   (SQLITE_CONSTRAINT | (6<<8))
#define SQLITE_CONSTRAINT_TRIGGER      (SQLITE_CONSTRAINT | (7<<8))
#define SQLITE_CONSTRAINT_UNIQUE       (SQLITE_CONSTRAINT | (8<<8))
#define SQLITE_CONSTRAINT_VTAB         (SQLITE_CONSTRAINT | (9<<8))
#define SQLITE_CONSTRAINT_ROWID        (SQLITE_CONSTRAINT |(10<<8))
#define SQLITE_CONSTRAINT_PINNED       (SQLITE_CONSTRAINT |(11<<8))
#define SQLITE_CONSTRAINT_DATATYPE     (SQLITE_CONSTRAINT |(12<<8))
#define SQLITE_NOTICE_RECOVER_WAL      (SQLITE_NOTICE | (1<<8))
#define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8))
#define SQLITE_WARNING_AUTOINDEX       (SQLITE_WARNING | (1<<8))
#define SQLITE_AUTH_USER               (SQLITE_AUTH | (1<<8))
#define SQLITE_OK_LOAD_PERMANENTLY     (SQLITE_OK | (1<<8))
#define SQLITE_OK_SYMLINK              (SQLITE_OK | (2<<8))