sqllogictest
Check-in [28ed264df2]
Not logged in

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

Overview
Comment:Update SQLite to version 3.6.10.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:28ed264df2f538f0b37bec79b59acc550fbaf19b
User & Date: drh 2009-01-16 14:11:30
Context
2009-01-16
16:15
Adjust the Makefile to omit unused features of SQLite. This makes coverage testing easier. check-in: 8a016b9169 user: drh tags: trunk
14:11
Update SQLite to version 3.6.10. check-in: 28ed264df2 user: drh tags: trunk
2009-01-14
01:14
Check-in [6173]. Version 3.6.8+. check-in: 47cf08460b user: shaneh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/sqlite3.c.

1
2
3
4
5
6
7
8
9
10
..
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
..
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
...
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436










437
438
439
440
441
442
443
...
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
....
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
....
8972
8973
8974
8975
8976
8977
8978

8979
8980
8981
8982
8983
8984
8985
.....
21578
21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
.....
21723
21724
21725
21726
21727
21728
21729












21730
21731
21732
21733
21734
21735
21736
.....
23082
23083
23084
23085
23086
23087
23088


















23089
23090
23091
23092
23093
23094
23095
.....
23131
23132
23133
23134
23135
23136
23137

















23138
23139
23140
23141
23142
23143
23144
.....
24463
24464
24465
24466
24467
24468
24469























24470
24471
24472
24473
24474
24475
24476
.....
24572
24573
24574
24575
24576
24577
24578

24579
24580
24581

24582
24583
24584
24585
24586
24587
24588
.....
24722
24723
24724
24725
24726
24727
24728











24729
24730
24731
24732
24733
24734
24735
.....
30677
30678
30679
30680
30681
30682
30683
30684
30685
30686
30687
30688
30689
30690
30691
.....
31763
31764
31765
31766
31767
31768
31769

31770
31771
31772
31773
31774
31775
31776
.....
32380
32381
32382
32383
32384
32385
32386










32387
32388
32389
32390
32391
32392
32393
.....
82967
82968
82969
82970
82971
82972
82973
82974
82975
82976
82977
82978
82979
82980
82981
82982
82983
82984
82985
82986
82987
82988
82989
82990
82991
82992
82993
82994
82995
82996
82997
82998
82999
83000
83001
83002
83003
83004
83005
83006
83007
83008
83009
83010
83011
83012
83013
83014
83015
83016
83017
83018
83019
83020
83021
83022
83023
83024
83025
83026
83027
83028
83029
83030
83031
83032
83033
83034
83035
83036
83037
83038
83039
83040
83041
83042
83043
83044
83045
83046
83047
83048
83049
83050
83051
83052
83053
83054
83055
83056
83057
83058
83059
83060
83061
83062
83063
83064
83065
83066
83067
83068
83069
83070
83071
83072
83073
83074
83075
83076
83077
83078
83079
83080
83081
83082
83083
83084
83085
83086
83087
83088
83089
83090
83091
83092
83093
83094
83095
83096
83097
83098
83099
83100
83101
83102
83103
83104
83105
83106
83107
83108
83109
83110
83111
83112
83113
83114
83115
83116
83117
83118
83119
83120
83121
83122
83123
83124
83125
83126
83127
83128
83129
83130
83131
83132
83133
83134
83135
83136
83137
83138
83139
83140
83141
83142
83143
83144
83145
83146
83147
83148
83149
83150
83151
83152
83153
83154
83155
83156
83157
83158
83159
83160
83161
83162
83163
83164
83165
83166
83167
83168
83169
83170
83171
83172
83173
83174
83175
83176
83177
83178
83179
83180
83181
83182
83183
83184
83185
83186
83187
83188
83189
83190
83191
83192
83193
83194
83195
83196
83197
83198
83199
83200
83201
83202
83203
83204
83205
83206
83207
83208
83209
83210
83211
83212
83213
83214
83215
83216
83217
83218
83219
83220
83221
83222
83223
83224
83225
83226
83227
83228
83229
83230
83231
83232
83233
83234
83235
83236
83237
83238
83239
83240
83241
83242
83243
83244
83245
83246
83247
83248
83249
83250
83251
83252
83253
83254
83255
83256
83257
83258
83259
83260
83261
83262
83263
83264
83265
83266
83267
83268
83269
83270
83271
83272
83273
83274
83275
83276
83277
83278
83279
83280
83281
83282
83283
83284
83285
83286
83287
83288
83289
83290
83291
83292
83293
83294
83295
83296
83297
83298
83299
83300
83301
83302
83303
83304
83305
83306
83307
83308
83309
83310
83311
83312
83313
83314
83315
83316
83317
83318
83319
83320
83321
83322
83323
83324
83325
83326
83327
83328
83329
83330
83331
83332
83333
83334
83335
83336
83337
83338
83339
83340
83341
83342
83343
83344
83345
83346
83347
83348
83349
83350
83351
83352
83353
83354


83355
83356
83357
83358
83359
83360
83361
83362
83363
83364
83365
83366
83367

83368
83369
83370
83371
83372
83373
83374
83375
83376
83377
83378
83379
83380
83381
83382
83383
83384
83385
83386
83387
83388
83389
83390
83391
83392
83393
83394
83395
83396
83397
83398
83399
83400
83401
.....
86134
86135
86136
86137
86138
86139
86140
86141
86142
86143
86144
86145
86146
86147
86148
86149
86150
86151
86152
86153
86154
86155
86156
86157
86158
86159
86160
86161
86162
86163
86164
86165
86166
86167
86168
86169
86170
86171
86172
86173
86174
86175
86176
.....
86183
86184
86185
86186
86187
86188
86189
86190
86191
86192
86193
86194
86195
86196
86197
86198
86199
86200
86201
86202
86203
86204
86205
86206
86207
.....
86223
86224
86225
86226
86227
86228
86229
86230
86231
86232
86233
86234
86235
86236
86237
86238
.....
86269
86270
86271
86272
86273
86274
86275
86276
86277
86278
86279
86280
86281
86282
86283
86284
.....
89507
89508
89509
89510
89511
89512
89513
89514
89515
89516
89517
89518
89519
89520
89521
89522
......
102013
102014
102015
102016
102017
102018
102019
102020
102021
102022
102023
102024
102025
102026
102027
/******************************************************************************
** This file is an amalgamation of many separate C source files from SQLite
** version 3.6.8.  By combining all the individual C code files into this 
** single large file, the entire code can be compiled as a one translation
** unit.  This allows many compilers to do optimizations that would not be
** possible if the files were compiled separately.  Performance improvements
** of 5% are more are commonly seen when SQLite is compiled as a single
** translation unit.
**
** This file is all you need to compile SQLite.  To use SQLite in other
................................................................................
** the "sqlite3.h" header file at hand, you will find a copy in the first
** 6736 lines past this header comment.)  Additional code files may be
** needed if you want a wrapper to interface SQLite with your choice of
** programming language.  The code for the "sqlite3" command-line shell
** is also in a separate file.  This file contains only code for the core
** SQLite library.
**
** This amalgamation was generated on 2009-01-14 01:00:38 UTC.
*/
#define SQLITE_CORE 1
#define SQLITE_AMALGAMATION 1
#ifndef SQLITE_PRIVATE
# define SQLITE_PRIVATE static
#endif
#ifndef SQLITE_API
................................................................................
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Internal interface definitions for SQLite.
**
** @(#) $Id: sqliteInt.h,v 1.823 2009/01/10 16:15:22 drh Exp $
*/
#ifndef _SQLITEINT_H_
#define _SQLITEINT_H_

/*
** Include the configuration header output by 'configure' if we're using the
** autoconf-based build
................................................................................
** condition/decision coverage is inadequate.  For example, testcase()
** can be used to make sure boundary values are tested.  For
** bitmask tests, testcase() can be used to make sure each bit
** is significant and used at least once.  On switch statements
** where multiple cases go to the same block of code, testcase()
** can insure that all cases are evaluated.
**
** The TESTONLY macro is used to enclose variable declarations or
** other bits of code that are needed to support the arguments
** within testcase() macros.
*/
#ifdef SQLITE_COVERAGE_TEST
SQLITE_PRIVATE   void sqlite3Coverage(int);
# define testcase(X)  if( X ){ sqlite3Coverage(__LINE__); }
# define TESTONLY(X)  X
#else
# define testcase(X)










# define TESTONLY(X)
#endif

/*
** The ALWAYS and NEVER macros surround boolean expressions which 
** are intended to always be true or false, respectively.  Such
** expressions could be omitted from the code completely.  But they
................................................................................
**          evaluate to a string literal that is the SQLite version
**          with which the header file is associated.
**
** {H10014} The SQLITE_VERSION_NUMBER #define shall resolve to an integer
**          with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z
**          are the major version, minor version, and release number.
*/
#define SQLITE_VERSION         "3.6.8"
#define SQLITE_VERSION_NUMBER  3006008

/*
** CAPI3REF: Run-Time Library Version Numbers {H10020} <S60100>
** KEYWORDS: sqlite3_version
**
** These features provide the same information as the [SQLITE_VERSION]
** and [SQLITE_VERSION_NUMBER] #defines in the header, but are associated
................................................................................
** This header file (together with is companion C source-code file
** "os.c") attempt to abstract the underlying operating system so that
** the SQLite library will work on both POSIX and windows systems.
**
** This header file is #include-ed by sqliteInt.h and thus ends up
** being included by every source file.
**
** $Id: os.h,v 1.106 2008/12/08 18:19:18 drh Exp $
*/
#ifndef _SQLITE_OS_H_
#define _SQLITE_OS_H_

/*
** Figure out if we are dealing with Unix, Windows, or some other
** operating system.  After the following block of preprocess macros,
................................................................................
SQLITE_PRIVATE int sqlite3OsTruncate(sqlite3_file*, i64 size);
SQLITE_PRIVATE int sqlite3OsSync(sqlite3_file*, int);
SQLITE_PRIVATE int sqlite3OsFileSize(sqlite3_file*, i64 *pSize);
SQLITE_PRIVATE int sqlite3OsLock(sqlite3_file*, int);
SQLITE_PRIVATE int sqlite3OsUnlock(sqlite3_file*, int);
SQLITE_PRIVATE int sqlite3OsCheckReservedLock(sqlite3_file *id, int *pResOut);
SQLITE_PRIVATE int sqlite3OsFileControl(sqlite3_file*,int,void*);

SQLITE_PRIVATE int sqlite3OsSectorSize(sqlite3_file *id);
SQLITE_PRIVATE int sqlite3OsDeviceCharacteristics(sqlite3_file *id);

/* 
** Functions for accessing sqlite3_vfs methods 
*/
SQLITE_PRIVATE int sqlite3OsOpen(sqlite3_vfs *, const char *, sqlite3_file*, int, int *);
................................................................................
**   *  Definitions of sqlite3_io_methods objects for all locking
**      methods plus "finder" functions for each locking method.
**   *  sqlite3_vfs method implementations.
**   *  Locking primitives for the proxy uber-locking-method. (MacOSX only)
**   *  Definitions of sqlite3_vfs objects for all locking methods
**      plus implementations of sqlite3_os_init() and sqlite3_os_end().
**
** $Id: os_unix.c,v 1.235 2009/01/09 21:41:17 drh Exp $
*/
#if SQLITE_OS_UNIX              /* This file is used on unix only */

/*
** There are various methods for file locking used for concurrency
** control:
**
................................................................................
#if SQLITE_THREADSAFE && defined(__linux__)
  pthread_t tid;                   /* The thread that "owns" this unixFile */
#endif
#if OS_VXWORKS
  int isDelete;                    /* Delete on close if true */
  struct vxworksFileId *pId;       /* Unique file ID */
#endif












#ifdef SQLITE_TEST
  /* In test mode, increase the size of this structure a bit so that 
  ** it is larger than the struct CrashFile defined in test6.c.
  */
  char aPadding[32];
#endif
};
................................................................................
      rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_LOCK);
      if( IS_LOCK_ERROR(rc) ){
        pFile->lastErrno = tErrno;
      }
    }
  }
  


















  if( rc==SQLITE_OK ){
    pFile->locktype = locktype;
    pLock->locktype = locktype;
  }else if( locktype==EXCLUSIVE_LOCK ){
    pFile->locktype = PENDING_LOCK;
    pLock->locktype = PENDING_LOCK;
  }
................................................................................
  pLock = pFile->pLock;
  assert( pLock->cnt!=0 );
  if( pFile->locktype>SHARED_LOCK ){
    assert( pLock->locktype==pFile->locktype );
    SimulateIOErrorBenign(1);
    SimulateIOError( h=(-1) )
    SimulateIOErrorBenign(0);

















    if( locktype==SHARED_LOCK ){
      lock.l_type = F_RDLCK;
      lock.l_whence = SEEK_SET;
      lock.l_start = SHARED_FIRST;
      lock.l_len = SHARED_SIZE;
      if( fcntl(h, F_SETLK, &lock)==(-1) ){
        int tErrno = errno;
................................................................................
  const void *pBuf, 
  int amt,
  sqlite3_int64 offset 
){
  int wrote = 0;
  assert( id );
  assert( amt>0 );























  while( amt>0 && (wrote = seekAndWrite((unixFile*)id, offset, pBuf, amt))>0 ){
    amt -= wrote;
    offset += wrote;
    pBuf = &((char*)pBuf)[wrote];
  }
  SimulateIOError(( wrote=(-1), amt=1 ));
  SimulateDiskfullError(( wrote=0, amt=1 ));
................................................................................
  ** the fcntl call every time sync is called.
  */
  if( rc ) rc = fsync(fd);

#else 
  if( dataOnly ){
    rc = fdatasync(fd);

    if( OS_VXWORKS && rc==-1 && errno==ENOTSUP ){
      rc = fsync(fd);
    }

  }else{
    rc = fsync(fd);
  }
#endif /* ifdef SQLITE_NO_SYNC elif HAVE_FULLFSYNC */

  if( OS_VXWORKS && rc!= -1 ){
    rc = 0;
................................................................................
      *(int*)pArg = ((unixFile*)id)->locktype;
      return SQLITE_OK;
    }
    case SQLITE_LAST_ERRNO: {
      *(int*)pArg = ((unixFile*)id)->lastErrno;
      return SQLITE_OK;
    }











#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)
    case SQLITE_SET_LOCKPROXYFILE:
    case SQLITE_GET_LOCKPROXYFILE: {
      return proxyFileControl(id,op,pArg);
    }
#endif /* SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__) */
  }
................................................................................
** The pager is used to access a database disk file.  It implements
** atomic commit and rollback through the use of a journal file that
** is separate from the database file.  The pager also implements file
** locking to prevent two processes from writing the same database
** file simultaneously, or one process from reading the database while
** another is writing.
**
** @(#) $Id: pager.c,v 1.549 2009/01/13 16:03:44 danielk1977 Exp $
*/
#ifndef SQLITE_OMIT_DISKIO

/*
** Macros for troubleshooting.  Normally turned off
*/
#if 0
................................................................................
  }else{
    assert( pPager->pInJournal==0 );
  }

  if( !pPager->exclusiveMode ){
    rc2 = osUnlock(pPager->fd, SHARED_LOCK);
    pPager->state = PAGER_SHARED;

  }else if( pPager->state==PAGER_SYNCED ){
    pPager->state = PAGER_EXCLUSIVE;
  }
  pPager->dbOrigSize = 0;
  pPager->setMaster = 0;
  pPager->needSync = 0;
  /* lruListSetFirstSynced(pPager); */
................................................................................
      }
    }
  }
  /*NOTREACHED*/
  assert( 0 );

end_playback:










  if( rc==SQLITE_OK ){
    zMaster = pPager->pTmpSpace;
    rc = readMasterJournal(pPager->jfd, zMaster, pPager->pVfs->mxPathname+1);
  }
  if( rc==SQLITE_OK ){
    rc = pager_end_transaction(pPager, zMaster[0]!='\0');
  }
................................................................................
**  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.
*/
static const YYACTIONTYPE yy_action[] = {
 /*     0 */   304,  930,  121,  429,    2,  212,  575,  496,   68,   68,
 /*    10 */    68,   68,  116,   70,   70,   70,   70,   71,   71,   72,
 /*    20 */    72,   72,   73,  223,  393,  597,  480,  465,   77,   70,
 /*    30 */    70,   70,   70,   71,   71,   72,   72,   72,   73,  223,
 /*    40 */   584,  598,  220,  219,   67,   65,  320,  448,  439,  461,
 /*    50 */   461,   69,   69,   68,   68,   68,   68,  392,   70,   70,
 /*    60 */    70,   70,   71,   71,   72,   72,   72,   73,  223,  304,
 /*    70 */   519,  309,  496,   13,  493,   94,   70,   70,   70,   70,
 /*    80 */    71,   71,   72,   72,   72,   73,  223,   71,   71,   72,
 /*    90 */    72,   72,   73,  223,  221,  480,  465,  373,  420,   64,
 /*   100 */   177,   56,   62,  230,  555,  440,  531,  485,  485,  485,
 /*   110 */   178,   73,  223,   67,   65,  320,  448,  439,  461,  461,
 /*   120 */    69,   69,   68,   68,   68,   68,  560,   70,   70,   70,
 /*   130 */    70,   71,   71,   72,   72,   72,   73,  223,  304,  213,
 /*   140 */   503,  584,  570,  309,  507,  167,  114,  257,  328,  262,
 /*   150 */   331,  207,  540,   20,  545,  307,  153,  227,  266,  598,
 /*   160 */   220,  150,  151,  326,  480,  465,   58,  314,  390,  552,
 /*   170 */   454,  519,  534,  568,  546,  493,  152,  606,    6,  407,
 /*   180 */   411,  563,   67,   65,  320,  448,  439,  461,  461,   69,
 /*   190 */    69,   68,   68,   68,   68,  371,   70,   70,   70,   70,
 /*   200 */    71,   71,   72,   72,   72,   73,  223,  304,  485,  485,
 /*   210 */   485,  213,  555,  578,  515,  299,  416,  551,  114,  257,
 /*   220 */   328,  262,  331,  207,  196,  440,  310,  340,  343,  344,
 /*   230 */   266,  149,  549,  480,  465,  414,  412,  443,  346,  570,
 /*   240 */    72,   72,   72,   73,  223,  547,  241,  337,  587,  607,
 /*   250 */    20,   67,   65,  320,  448,  439,  461,  461,   69,   69,
 /*   260 */    68,   68,   68,   68,  466,   70,   70,   70,   70,   71,
 /*   270 */    71,   72,   72,   72,   73,  223,  255,  552,  454,  196,
 /*   280 */   304,  349,  340,  343,  344,  109,  196,  364,  380,  340,
 /*   290 */   343,  344,  336,  346,  380,  496,  602,  228,  380,  360,
 /*   300 */   346,  426,  426,  158,  169,  464,  480,  465,  177,  203,
 /*   310 */   427,  511,   34,  445,  212,  443,  496,  511,   34,  527,
 /*   320 */   555,  511,   38,   89,   67,   65,  320,  448,  439,  461,
 /*   330 */   461,   69,   69,   68,   68,   68,   68,  507,   70,   70,
 /*   340 */    70,   70,   71,   71,   72,   72,   72,   73,  223,  304,
 /*   350 */   383,  135,  551,  332,  513,  381,  282,  281,  403,  332,
 /*   360 */   496,  327,  233,  307,  333,  376,  219,  549,  266,  476,
 /*   370 */   474,   76,  175,   78,  157,  480,  465,  533,   93,  532,
 /*   380 */   547,  496,  535,  464,  459,  552,  454,  563,  555,  456,
 /*   390 */   472,  470,  528,   67,   65,  320,  448,  439,  461,  461,
 /*   400 */    69,   69,   68,   68,   68,   68,  507,   70,   70,   70,
 /*   410 */    70,   71,   71,   72,   72,   72,   73,  223,  380,  473,
 /*   420 */   300,  409,  304,  590,  569,  197,  564,  164,  555,  853,
 /*   430 */   377,  216,  380,  381,  282,  281,  123,  360,  489,  426,
 /*   440 */   426,  511,   27,   76,  219,   78,  157,   17,  480,  465,
 /*   450 */   604,  542,  382,  552,  454,  511,   46,  603,    1,  270,
 /*   460 */   555,  507,  555,  580,   57,   92,   67,   65,  320,  448,
 /*   470 */   439,  461,  461,   69,   69,   68,   68,   68,   68,  469,
 /*   480 */    70,   70,   70,   70,   71,   71,   72,   72,   72,   73,
 /*   490 */   223,  304,  380,  552,  454,  268,  537,  274,  380,  272,
 /*   500 */   380,  313,  437,  363,  437,  155,  356,  408,  609,  322,
 /*   510 */   408,  609,  424,  425,    2,  511,   46,  480,  465,  471,
 /*   520 */   539,  511,   38,  511,   44,  552,  454,  552,  454,   76,
 /*   530 */   489,   78,  157,  286,  190,   67,   65,  320,  448,  439,
 /*   540 */   461,  461,   69,   69,   68,   68,   68,   68,  202,   70,
 /*   550 */    70,   70,   70,   71,   71,   72,   72,   72,   73,  223,
 /*   560 */   304,  318,  226,  306,  443,   60,  380,  489,  507,  228,
 /*   570 */    23,  289,  228,  287,  555,  248,   76,  406,   78,  157,
 /*   580 */   555,  440,  360,  175,  426,  426,  480,  465,  376,  511,
 /*   590 */    34,  591,  593,  920,  491,  920,  593,  921,  360,  921,
 /*   600 */   426,  426,  265,  253,   67,   65,  320,  448,  439,  461,
 /*   610 */   461,   69,   69,   68,   68,   68,   68,  507,   70,   70,
 /*   620 */    70,   70,   71,   71,   72,   72,   72,   73,  223,  304,
 /*   630 */   416,  400,  518,  467,  155,  598,  518,  366,  308,  552,
 /*   640 */   454,  377,  370,  315,  442,  552,  454,   22,  441,  414,
 /*   650 */   265,  496,  554,  288,  231,  480,  465,  594,  574,  489,
 /*   660 */   365,  479,  360,  372,  426,  426,  161,  509,  526,  497,
 /*   670 */   176,  206,  205,   67,   65,  320,  448,  439,  461,  461,
 /*   680 */    69,   69,   68,   68,   68,   68,  323,   70,   70,   70,
 /*   690 */    70,   71,   71,   72,   72,   72,   73,  223,  304,  443,
 /*   700 */   507,  404,  596,  590,  345,  197,  401,  561,  570,  219,
 /*   710 */   394,  228,  156,  159,  462,  574,  496,  380,  447,   20,
 /*   720 */   610,  510,  330,  379,  480,  465,  276,  276,  522,  511,
 /*   730 */     3,  276,  524,  276,  265,  276,  162,  180,  222,  276,
 /*   740 */   511,   33,   67,   65,  320,  448,  439,  461,  461,   69,
 /*   750 */    69,   68,   68,   68,   68,  380,   70,   70,   70,   70,
 /*   760 */    71,   71,   72,   72,   72,   73,  223,  304,  225,  232,
 /*   770 */   321,  507,  380,  523,  380,  520,  380,  517,  511,   51,
 /*   780 */   380,  277,  380,  475,  380,   19,  380,  144,  317,  118,
 /*   790 */   457,  210,  159,  480,  465,  511,   45,  511,   10,  511,
 /*   800 */    28,  265,  276,  511,   29,  511,   24,  511,   52,  511,
 /*   810 */    55,   67,   65,  320,  448,  439,  461,  461,   69,   69,
 /*   820 */    68,   68,   68,   68,  380,   70,   70,   70,   70,   71,
 /*   830 */    71,   72,   72,   72,   73,  223,  304,  319,   88,  191,
 /*   840 */    90,  380,  265,  380,  512,  380,  522,  511,   47,  380,
 /*   850 */   524,  380,  417,  380,  608,  608,  510,  330,  348,  495,
 /*   860 */   203,   66,  480,  465,  511,   53,  511,  100,  511,   98,
 /*   870 */   572,  276,  511,  102,  511,  103,  511,  108,  217,   18,
 /*   880 */    67,   79,  320,  448,  439,  461,  461,   69,   69,   68,
 /*   890 */    68,   68,   68,  380,   70,   70,   70,   70,   71,   71,
 /*   900 */    72,   72,   72,   73,  223,  304,  380,  399,  258,  186,
 /*   910 */   380,  160,  380,  292,  380,  397,  511,  110,  380,  259,
 /*   920 */   544,  543,  209,  380,  341,  380,  492,  486,    8,  511,
 /*   930 */    50,  480,  465,  511,   48,  511,   16,  511,   99,   96,
 /*   940 */   141,  511,   36,  507,  192,  507,  511,   97,  511,   35,
 /*   950 */    65,  320,  448,  439,  461,  461,   69,   69,   68,   68,
 /*   960 */    68,   68,  380,   70,   70,   70,   70,   71,   71,   72,
 /*   970 */    72,   72,   73,  223,  304,  380,  145,    7,  507,  380,
 /*   980 */   487,  380,  198,  380,  126,  511,   26,  380,  434,  499,
 /*   990 */   198,  303,  380,  576,  380,   66,  194,  165,  511,   31,
 /*  1000 */   480,  465,  511,   54,  511,  111,  511,  112,  369,  530,
 /*  1010 */   511,  113,  391,   82,  396,  511,   37,  511,   30,  276,
 /*  1020 */   320,  448,  439,  461,  461,   69,   69,   68,   68,   68,
 /*  1030 */    68,  380,   70,   70,   70,   70,   71,   71,   72,   72,
 /*  1040 */    72,   73,  223,   83,  342,  380,    4,  380,  556,  380,
 /*  1050 */   324,  219,  586,  380,  511,   43,  380,  553,  357,  203,
 /*  1060 */   455,  353,  203,  380,  419,  380,   21,  504,  511,   42,
 /*  1070 */   511,   32,  511,   39,  347,  338,  511,   25,   96,  511,
 /*  1080 */    40,  234,  122,  203,  458,  584,  511,   49,  511,   41,
 /*  1090 */   649,  244,  185,  402,  259,  107,   95,  245,  352,  329,
 /*  1100 */   246,  413,  354,  247,  199,   86,   85,   63,  146,  498,
 /*  1110 */   415,  359,   81,   91,   84,  387,  386,  224,  136,  493,
 /*  1120 */   211,  298,  432,  600,  362,  184,  436,   59,  142,  252,
 /*  1130 */   236,  237,  238,  208,  240,  198,  105,  219,  395,  133,
 /*  1140 */   444,  435,  254,  279,  174,  132,  451,  482,    9,  170,
 /*  1150 */   148,  294,  485,  485,  485,  483,  481,   14,  295,  256,
 /*  1160 */   468,  430,  127,  181,   75,  433,  501,   74,  312,  521,
 /*  1170 */   201,  183,  464,   11,   83,  342,  193,    4,  505,  171,
 /*  1180 */   179,  324,  173,  261,  502,  166,  459,  477,  172,  357,
 /*  1190 */   514,  421,  651,  137,  215,  650,  139,   83,  342,  302,
 /*  1200 */     4,   12,  134,  218,  324,  558,  338,  423,  567,  214,
 /*  1210 */   125,  138,  357,  582,  188,  579,  584,  460,  452,  592,
 /*  1220 */   239,  351,  388,  291,  281,  301,  154,   15,  305,  338,
 /*  1230 */   187,  418,  410,  219,  450,  361,   86,   85,  516,  584,
 /*  1240 */   278,  463,  431,   80,  117,   84,  387,  386,  120,  182,
 /*  1250 */   493,  143,  500,  189,  385,  131,  355,  195,  350,   86,
 /*  1260 */    85,  200,  428,  242,  130,  129,  484,  168,   84,  387,
 /*  1270 */   386,  367,  384,  493,  128,  316,   61,  140,  566,   87,
 /*  1280 */   529,  449,  599,  485,  485,  485,  483,  481,   14,  106,
 /*  1290 */   101,  124,  585,  104,  446,  422,  229,  565,  311,  163,
 /*  1300 */   223,  119,  204,  559,  378,  562,  485,  485,  485,  483,
 /*  1310 */   481,   14,  293,  325,  334,  573,  478,  264,  605,  147,
 /*  1320 */   490,  577,  557,  494,  249,  506,  595,  263,  243,  251,
 /*  1330 */   438,  267,  550,  525,  235,  548,  601,  542,  571,  260,
 /*  1340 */   589,  538,  368,  488,  931,  389,  284,  374,  541,  508,
 /*  1350 */   283,  296,  297,  931,  269,  290,  581,  280,  931,  271,
 /*  1360 */   115,  931,  339,  536,  453,  285,  273,    5,  375,  398,
 /*  1370 */   358,  405,  588,  583,  275,  250,  931,  335,
};
static const YYCODETYPE yy_lookahead[] = {
 /*     0 */    19,  142,  143,  144,  145,   24,  150,   26,   72,   73,
 /*    10 */    74,   75,   35,   77,   78,   79,   80,   81,   82,   83,
 /*    20 */    84,   85,   86,   87,   94,  150,   45,   46,   76,   77,
 /*    30 */    78,   79,   80,   81,   82,   83,   84,   85,   86,   87,
 /*    40 */    61,   81,   82,  113,   63,   64,   65,   66,   67,   68,
 /*    50 */    69,   70,   71,   72,   73,   74,   75,  127,   77,   78,
 /*    60 */    79,   80,   81,   82,   83,   84,   85,   86,   87,   19,
 /*    70 */    91,   19,   91,   25,   95,   25,   77,   78,   79,   80,
 /*    80 */    81,   82,   83,   84,   85,   86,   87,   81,   82,   83,
 /*    90 */    84,   85,   86,   87,  196,   45,   46,  146,  147,   49,
 /*   100 */    46,  203,   22,  152,   26,  150,   26,  128,  129,  130,
 /*   110 */   159,   86,   87,   63,   64,   65,   66,   67,   68,   69,
 /*   120 */    70,   71,   72,   73,   74,   75,  176,   77,   78,   79,
 /*   130 */    80,   81,   82,   83,   84,   85,   86,   87,   19,   87,
 /*   140 */    25,   61,  150,   19,  193,   93,   94,   95,   96,   97,
 /*   150 */    98,   99,  160,  161,   33,  101,   25,   47,  106,   81,
 /*   160 */    82,   81,   82,  101,   45,   46,   47,  212,  217,   91,
 /*   170 */    92,   91,  171,  172,   53,   95,  184,  185,  119,  101,
 /*   180 */   102,  180,   63,   64,   65,   66,   67,   68,   69,   70,
 /*   190 */    71,   72,   73,   74,   75,  244,   77,   78,   79,   80,
 /*   200 */    81,   82,   83,   84,   85,   86,   87,   19,  128,  129,
 /*   210 */   130,   87,   26,   23,  247,  248,  150,   12,   94,   95,
 /*   220 */    96,   97,   98,   99,   93,  150,  105,   96,   97,   98,
 /*   230 */   106,  116,   27,   45,   46,  169,  170,  165,  107,  150,
 /*   240 */    83,   84,   85,   86,   87,   40,  157,   42,  175,  160,
 /*   250 */   161,   63,   64,   65,   66,   67,   68,   69,   70,   71,
 /*   260 */    72,   73,   74,   75,   11,   77,   78,   79,   80,   81,
 /*   270 */    82,   83,   84,   85,   86,   87,  204,   91,   92,   93,
 /*   280 */    19,   19,   96,   97,   98,   24,   93,  212,  150,   96,
 /*   290 */    97,   98,    3,  107,  150,   26,  230,  231,  150,  109,
 /*   300 */   107,  111,  112,  159,    6,   52,   45,   46,   46,   25,
 /*   310 */   164,  173,  174,   21,   24,  165,   26,  173,  174,  173,
 /*   320 */    26,  173,  174,  135,   63,   64,   65,   66,   67,   68,
 /*   330 */    69,   70,   71,   72,   73,   74,   75,  193,   77,   78,
 /*   340 */    79,   80,   81,   82,   83,   84,   85,   86,   87,   19,
 /*   350 */    58,   23,   12,  215,  204,  102,  103,  104,  220,  215,
 /*   360 */    91,  213,  214,  101,  220,  150,  113,   27,  106,   45,
 /*   370 */    46,  221,  159,  223,  224,   45,   46,   83,   22,  172,
 /*   380 */    40,   91,   42,   52,  100,   91,   92,  180,   26,   97,
 /*   390 */    66,   67,   52,   63,   64,   65,   66,   67,   68,   69,
 /*   400 */    70,   71,   72,   73,   74,   75,  193,   77,   78,   79,
 /*   410 */    80,   81,   82,   83,   84,   85,   86,   87,  150,   95,
 /*   420 */   162,  149,   19,  165,  166,  167,   23,  159,   26,  137,
 /*   430 */   217,  216,  150,  102,  103,  104,   23,  109,   25,  111,
 /*   440 */   112,  173,  174,  221,  113,  223,  224,  234,   45,   46,
 /*   450 */   180,  181,  239,   91,   92,  173,  174,  187,   22,   17,
 /*   460 */    26,  193,   26,  241,   25,  135,   63,   64,   65,   66,
 /*   470 */    67,   68,   69,   70,   71,   72,   73,   74,   75,  117,
 /*   480 */    77,   78,   79,   80,   81,   82,   83,   84,   85,   86,
 /*   490 */    87,   19,  150,   91,   92,   23,   23,   55,  150,   57,
 /*   500 */   150,  219,  102,  103,  104,   92,  168,  169,  170,  168,
 /*   510 */   169,  170,   23,  144,  145,  173,  174,   45,   46,  117,
 /*   520 */    23,  173,  174,  173,  174,   91,   92,   91,   92,  221,
 /*   530 */   117,  223,  224,   17,  159,   63,   64,   65,   66,   67,
 /*   540 */    68,   69,   70,   71,   72,   73,   74,   75,   25,   77,
 /*   550 */    78,   79,   80,   81,   82,   83,   84,   85,   86,   87,
 /*   560 */    19,  219,  214,  154,  165,   24,  150,   25,  193,  231,
 /*   570 */    22,   55,  231,   57,   26,  225,  221,  222,  223,  224,
 /*   580 */    26,  150,  109,  159,  111,  112,   45,   46,  150,  173,
 /*   590 */   174,    4,   22,   23,  149,   25,   22,   23,  109,   25,
 /*   600 */   111,  112,  150,  204,   63,   64,   65,   66,   67,   68,
 /*   610 */    69,   70,   71,   72,   73,   74,   75,  193,   77,   78,
 /*   620 */    79,   80,   81,   82,   83,   84,   85,   86,   87,   19,
 /*   630 */   150,  215,   62,   23,   92,   81,   62,  228,  186,   91,
 /*   640 */    92,  217,  233,  212,   28,   91,   92,   22,   32,  169,
 /*   650 */   150,   26,   23,  137,  216,   45,   46,  189,  190,  117,
 /*   660 */    44,  149,  109,  239,  111,  112,  159,    7,    8,    9,
 /*   670 */   102,  103,  104,   63,   64,   65,   66,   67,   68,   69,
 /*   680 */    70,   71,   72,   73,   74,   75,  186,   77,   78,   79,
 /*   690 */    80,   81,   82,   83,   84,   85,   86,   87,   19,  165,
 /*   700 */   193,   83,   23,  165,  166,  167,  150,   23,  150,  113,
 /*   710 */   230,  231,  205,  206,  189,  190,   91,  150,  160,  161,
 /*   720 */     0,    1,    2,  127,   45,   46,  150,  150,  110,  173,
 /*   730 */   174,  150,  114,  150,  150,  150,   22,  159,  204,  150,
 /*   740 */   173,  174,   63,   64,   65,   66,   67,   68,   69,   70,
 /*   750 */    71,   72,   73,   74,   75,  150,   77,   78,   79,   80,
 /*   760 */    81,   82,   83,   84,   85,   86,   87,   19,  192,  192,
 /*   770 */   186,  193,  150,  192,  150,  192,  150,  192,  173,  174,
 /*   780 */   150,  192,  150,   30,  150,   22,  150,   24,  245,  246,
 /*   790 */    37,  205,  206,   45,   46,  173,  174,  173,  174,  173,
 /*   800 */   174,  150,  150,  173,  174,  173,  174,  173,  174,  173,
 /*   810 */   174,   63,   64,   65,   66,   67,   68,   69,   70,   71,
 /*   820 */    72,   73,   74,   75,  150,   77,   78,   79,   80,   81,
 /*   830 */    82,   83,   84,   85,   86,   87,   19,  186,  134,   25,
 /*   840 */   136,  150,  150,  150,  192,  150,  110,  173,  174,  150,
 /*   850 */   114,  150,   13,  150,  128,  129,    1,    2,   23,   23,
 /*   860 */    25,   25,   45,   46,  173,  174,  173,  174,  173,  174,
 /*   870 */    11,  150,  173,  174,  173,  174,  173,  174,  186,   22,
 /*   880 */    63,   64,   65,   66,   67,   68,   69,   70,   71,   72,
 /*   890 */    73,   74,   75,  150,   77,   78,   79,   80,   81,   82,
 /*   900 */    83,   84,   85,   86,   87,   19,  150,  149,   95,  159,
 /*   910 */   150,  159,  150,  192,  150,   19,  173,  174,  150,  106,
 /*   920 */    94,   95,  151,  150,   47,  150,    7,    8,   71,  173,
 /*   930 */   174,   45,   46,  173,  174,  173,  174,  173,  174,  125,
 /*   940 */    22,  173,  174,  193,  159,  193,  173,  174,  173,  174,
 /*   950 */    64,   65,   66,   67,   68,   69,   70,   71,   72,   73,
 /*   960 */    74,   75,  150,   77,   78,   79,   80,   81,   82,   83,
 /*   970 */    84,   85,   86,   87,   19,  150,   22,   25,  193,  150,
 /*   980 */    23,  150,   25,  150,   22,  173,  174,  150,   23,   23,
 /*   990 */    25,   25,  150,   23,  150,   25,  151,   22,  173,  174,
 /*  1000 */    45,   46,  173,  174,  173,  174,  173,  174,   19,   23,
 /*  1010 */   173,  174,  158,   22,  118,  173,  174,  173,  174,  150,
 /*  1020 */    65,   66,   67,   68,   69,   70,   71,   72,   73,   74,
 /*  1030 */    75,  150,   77,   78,   79,   80,   81,   82,   83,   84,
 /*  1040 */    85,   86,   87,   19,   20,  150,   22,  150,   62,  150,
 /*  1050 */    26,  113,   23,  150,  173,  174,  150,   23,   34,   25,
 /*  1060 */    23,  192,   25,  150,   23,  150,   25,  193,  173,  174,
 /*  1070 */   173,  174,  173,  174,   47,   51,  173,  174,  125,  173,
 /*  1080 */   174,   23,   22,   25,   95,   61,  173,  174,  173,  174,
 /*  1090 */   115,  198,   99,  122,  106,   17,  123,  199,   19,  121,
 /*  1100 */   200,   20,   60,  201,   15,   81,   82,  124,   24,  202,
 /*  1110 */    23,  242,   22,  134,   90,   91,   92,  226,  101,   95,
 /*  1120 */   115,  139,  110,  156,   39,    5,   54,  101,  156,  209,
 /*  1130 */    10,   11,   12,   13,   14,   25,   16,  113,  120,   48,
 /*  1140 */    48,  210,  209,  137,  101,   22,   95,  210,    5,   29,
 /*  1150 */    22,   31,  128,  129,  130,  131,  132,  133,   38,  209,
 /*  1160 */     1,    1,  105,  115,   71,  175,  210,   71,   43,  175,
 /*  1170 */    50,  126,   52,   22,   19,   20,   56,   22,  183,   59,
 /*  1180 */   115,   26,  116,  175,    1,   17,  100,  177,  120,   34,
 /*  1190 */    20,  175,  115,   22,   87,  115,  126,   19,   20,  178,
 /*  1200 */    22,   22,  105,  229,   26,   23,   51,   23,  183,  229,
 /*  1210 */   116,   22,   34,  175,  119,  127,   61,  118,  117,  175,
 /*  1220 */    15,   18,  102,  103,  104,  178,  115,  119,  108,   51,
 /*  1230 */   155,   23,  156,  113,   23,   41,   81,   82,   83,   61,
 /*  1240 */   237,  188,  238,  134,   63,   90,   91,   92,   22,  188,
 /*  1250 */    95,  218,  198,  155,   18,  191,  156,  155,  138,   81,
 /*  1260 */    82,  156,  156,  194,  191,  191,   36,  155,   90,   91,
 /*  1270 */    92,  156,  156,   95,  191,  156,  240,  218,  156,  240,
 /*  1280 */   198,  140,  156,  128,  129,  130,  131,  132,  133,  243,
 /*  1290 */   163,  188,  150,  179,  150,  150,  179,  165,  249,  150,
 /*  1300 */    87,  246,  235,  165,  150,  176,  128,  129,  130,  131,
 /*  1310 */   132,  133,  150,  177,  150,  185,  198,  150,  185,  195,
 /*  1320 */   207,  173,  176,  165,  150,  173,  165,  150,  197,  208,
 /*  1330 */   150,   23,  182,  176,  148,  182,  232,  181,  153,  176,
 /*  1340 */   150,  150,  150,  150,  250,  208,  150,  150,  182,  150,
 /*  1350 */   150,  150,  150,  250,  150,  208,  150,  150,  250,  150,
 /*  1360 */   150,  250,  227,  198,  150,  150,  150,  195,  150,  150,
 /*  1370 */   236,  232,  150,  150,  150,  150,  250,  190,
};
#define YY_SHIFT_USE_DFLT (-71)
#define YY_SHIFT_MAX 404
static const short yy_shift_ofst[] = {
 /*     0 */   855, 1024, 1120,  -19, 1024, 1178, 1178,  186,   78,  331,
 /*    10 */   119, 1178, 1178, 1178, 1178, 1178,  -48,  253,  554,  434,
 /*    20 */   269,  -40,  -40,  938,   50,  679,  261,  403,  541,  610,
 /*    30 */   188,  472,  330,  748,  748,  748,  817,  748,  748,  748,
 /*    40 */   748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
 /*    50 */   748,  748,  748,  886,  955,  955, 1155, 1178, 1178, 1178,
 /*    60 */  1178, 1178, 1178, 1178, 1178, 1178, 1178, 1178, 1178, 1178,
 /*    70 */  1178, 1178, 1178, 1178, 1178, 1178, 1178, 1178, 1178, 1178,
 /*    80 */  1178, 1178, 1178, 1178, 1178, 1178, 1178, 1178, 1178, 1178,
 /*    90 */  1178, 1178, 1178, 1178, 1178, 1178, 1178,  -64,  -64,   -1,
 /*   100 */    -1,   52,    6,  157,  262,  292,  434,  434,   25,  269,
 /*   110 */  1213,  -71,  -71,  -71,   80,  124,  340,  340,  570,  574,
 /*   120 */   434,  720,  434,  290,  434,  434,  434,  434,  434,  434,
 /*   130 */   434,  434,  434,  434,  434,  290,  434,  434,  434,  434,
 /*   140 */   -70,  434,  290,  596,  938,  938,  938,  -71,  -71,  -71,
 /*   150 */   -21,  -21,  131,  193,  294,  402,  413,  436,  489,  548,
 /*   160 */   190,  328,  205,  362,  473,  618,  434,  434,  434,  434,
 /*   170 */   434,  434,  434,  434,  434,  553,  121,  434,  553,  434,
 /*   180 */   553,  434,  434,  434,  660,  434,  553,  434,  434,  434,
 /*   190 */   553,  434,  553,  434,  434,  434,  434,  625,  434,  434,
 /*   200 */   616,  434,  434,  434,  400,  121,  121,  434,  434,  434,
 /*   210 */   542,  434,  434,  269,  753,  269,  814,  284,  753,  736,
 /*   220 */   726,  115,  896,  269,  704,  896,  753,  753,  726,   54,
 /*   230 */   763,  814,  896,  753,   62,  298,  298,  298,  298,  839,
 /*   240 */   839,  952,  938,  953,  971,  973,  978,  983,  979, 1005,
 /*   250 */  1005, 1026, 1018, 1026, 1018, 1026, 1018,   62,   62, 1125,
 /*   260 */    62, 1086,   62, 1171, 1107, 1107, 1125,   62,   62, 1171,
 /*   270 */  1203, 1005, 1203, 1005, 1203, 1005, 1005, 1194, 1109, 1203,
 /*   280 */  1005, 1181, 1181, 1226,  953, 1005, 1236, 1236, 1236, 1236,
 /*   290 */   953, 1181, 1226, 1005, 1230, 1230, 1005, 1005, 1141,  -71,
 /*   300 */   -71,  -71,  -71,  -71,  324,  516,  442,  568,  835,  813,
 /*   310 */   826,  986,  919,  836,  957,  965,  857,  966,  970, 1034,
 /*   320 */   989, 1037, 1041, 1058,  975, 1308,  -23,   48,  110,   59,
 /*   330 */   289,  356,  439,  497,  629,  523,  587,  684,  714,  859,
 /*   340 */   877,  918,  954,  962,  991, 1029, 1027, 1060,  993,  988,
 /*   350 */  1078, 1079, 1081, 1042, 1089, 1084, 1087, 1090, 1017,  982,
 /*   360 */  1012, 1085, 1072, 1091, 1110, 1092, 1006, 1043, 1123, 1051,
 /*   370 */  1143, 1128, 1159, 1160, 1057, 1093, 1096, 1045, 1048, 1151,
 /*   380 */  1065, 1066, 1183, 1168, 1068, 1170, 1077, 1080, 1094, 1097,
 /*   390 */  1070, 1182, 1179, 1088, 1184, 1189, 1095, 1099, 1101, 1205,
 /*   400 */   439, 1111, 1108, 1208, 1211,
};
#define YY_REDUCE_USE_DFLT (-145)
#define YY_REDUCE_MAX 303
static const short yy_reduce_ofst[] = {
 /*     0 */  -141,  144,  -49,  150,  268,  138,  148,   -8,   66,  213,
 /*    10 */   222,  282,  342,  348,  350,  416,  355,  424,  480,   89,
 /*    20 */   258,  338,  341,  507,  308,  308,  308,  308,  308,  308,
 /*    30 */   308,  308,  308,  308,  308,  308,  308,  308,  308,  308,
 /*    40 */   308,  308,  308,  308,  308,  308,  308,  308,  308,  308,
 /*    50 */   308,  308,  308,  308,  308,  308,  556,  567,  605,  622,
 /*    60 */   624,  626,  630,  632,  634,  636,  674,  691,  693,  695,
 /*    70 */   699,  701,  703,  743,  756,  760,  762,  764,  768,  773,
 /*    80 */   775,  812,  825,  829,  831,  833,  837,  842,  844,  881,
 /*    90 */   895,  897,  899,  903,  906,  913,  915,  308,  308,  308,
 /*   100 */   308,    1,  308,  308,  270,  409,  558,  869,  308,  538,
 /*   110 */   308,  308,  308,  308,  146,  207,  468,  525,  -33,  -33,
 /*   120 */   -45,  369,  452,   72,  576,  577,  500,  215,  581,  583,
 /*   130 */   585,  652,  584,   75,  438,  399,  589,  651,  431,  721,
 /*   140 */   375,  692,  534,  578,  750,  752,  785, -102,  543,  586,
 /*   150 */  1152, 1148, 1133, 1130, 1154, 1149, 1113, 1174, 1069, 1225,
 /*   160 */  1069, 1069, 1187, 1219, 1069, 1172, 1215, 1210, 1207, 1206,
 /*   170 */  1202, 1201, 1199, 1196, 1192, 1069, 1166, 1191, 1069, 1154,
 /*   180 */  1069, 1193, 1197, 1200, 1186, 1204, 1069, 1209, 1214, 1216,
 /*   190 */  1069, 1218, 1069, 1222, 1223, 1224, -144, 1161, 1180, 1145,
 /*   200 */  1067, 1162, 1164, 1167, 1134, 1150, 1153, 1177, 1190, -125,
 /*   210 */  1113, 1142, 1144, 1132, 1129, 1138, 1118, 1136, 1146, 1124,
 /*   220 */  1104, 1131, 1121, 1158, 1135, 1137, 1157, 1163, 1139, 1156,
 /*   230 */  1185, 1165, 1147,  -50,   73,  272,  445,  512,  758,  771,
 /*   240 */   845,  854,  874,  893,  898,  900,  902,  907,  891,  967,
 /*   250 */   972,  920,  931,  933,  937,  950,  956,  990,  994,  995,
 /*   260 */  1008, 1010, 1016, 1021,  974,  980, 1025, 1038, 1044, 1047,
 /*   270 */  1075, 1076, 1098, 1100, 1102, 1105, 1106, 1003, 1004, 1112,
 /*   280 */  1115, 1053, 1061, 1033, 1054, 1116, 1064, 1073, 1074, 1083,
 /*   290 */  1082, 1103, 1059, 1119, 1036, 1039, 1122, 1126, 1046, 1049,
 /*   300 */  1127, 1114, 1117, 1055,
};
static const YYACTIONTYPE yy_default[] = {
 /*     0 */   615,  848,  929,  736,  929,  848,  929,  929,  875,  929,
 /*    10 */   904,  929,  929,  929,  846,  929,  820,  929,  875,  929,
 /*    20 */   652,  875,  875,  740,  771,  929,  929,  929,  929,  929,
 /*    30 */   929,  929,  929,  849,  850,  888,  929,  903,  762,  842,
 /*    40 */   773,  776,  843,  841,  845,  751,  786,  785,  778,  769,
 /*    50 */   779,  905,  772,  808,  826,  807,  929,  929,  929,  929,
 /*    60 */   929,  929,  929,  929,  929,  929,  929,  929,  929,  929,
 /*    70 */   929,  929,  929,  929,  929,  929,  929,  929,  929,  929,
 /*    80 */   929,  929,  929,  929,  929,  929,  929,  929,  929,  929,
 /*    90 */   929,  929,  929,  929,  929,  929,  929,  832,  810,  819,
 /*   100 */   809,  645,  811,  812,  705,  640,  929,  929,  813,  929,
 /*   110 */   814,  827,  828,  829,  929,  929,  929,  929,  929,  929,
 /*   120 */   929,  615,  929,  736,  929,  929,  929,  929,  929,  929,
 /*   130 */   929,  929,  929,  929,  929,  736,  929,  929,  929,  929,
 /*   140 */   929,  929,  736,  929,  929,  929,  929,  730,  922,  740,
 /*   150 */   929,  929,  696,  929,  929,  929,  929,  929,  929,  929,
 /*   160 */   929,  929,  929,  929,  929,  728,  929,  929,  929,  621,
 /*   170 */   910,  908,  929,  929,  929,  895,  929,  929,  719,  929,
 /*   180 */   893,  929,  929,  929,  623,  929,  642,  929,  929,  929,
 /*   190 */   781,  929,  717,  861,  929,  929,  929,  654,  929,  929,
 /*   200 */   881,  929,  929,  929,  929,  929,  929,  929,  929,  929,


 /*   210 */   738,  929,  929,  929,  765,  929,  775,  678,  765,  728,
 /*   220 */   929,  737,  753,  929,  844,  753,  765,  765,  929,  675,
 /*   230 */   929,  775,  753,  765,  707,  620,  620,  620,  620,  631,
 /*   240 */   631,  695,  929,  775,  766,  768,  758,  770,  929,  744,
 /*   250 */   744,  752,  757,  752,  757,  752,  757,  707,  707,  692,
 /*   260 */   707,  678,  707,  854,  858,  858,  692,  707,  707,  854,
 /*   270 */   637,  744,  637,  744,  637,  744,  744,  885,  887,  637,
 /*   280 */   744,  709,  709,  787,  775,  744,  716,  716,  716,  716,
 /*   290 */   775,  709,  787,  744,  907,  907,  744,  744,  915,  927,
 /*   300 */   662,  680,  680,  922,  929,  929,  929,  929,  929,  929,
 /*   310 */   929,  929,  929,  929,  929,  929,  868,  929,  929,  929,
 /*   320 */   929,  929,  929,  929,  794,  929,  929,  759,  929,  929,
 /*   330 */   616,  929,  847,  929,  929,  929,  929,  929,  929,  929,

 /*   340 */   929,  929,  929,  929,  929,  929,  929,  929,  929,  929,
 /*   350 */   929,  929,  929,  914,  929,  929,  929,  929,  929,  929,
 /*   360 */   722,  929,  929,  883,  884,  929,  929,  929,  929,  929,
 /*   370 */   929,  917,  929,  929,  929,  929,  929,  929,  796,  929,
 /*   380 */   929,  929,  929,  929,  929,  929,  795,  799,  929,  929,
 /*   390 */   929,  929,  929,  929,  929,  929,  929,  929,  929,  629,
 /*   400 */   767,  929,  929,  929,  929,  871,  821,  864,  659,  619,
 /*   410 */   636,  865,  866,  638,  869,  656,  870,  630,  804,  655,
 /*   420 */   618,  673,  912,  867,  837,  611,  724,  669,  746,  612,
 /*   430 */   614,  877,  723,  670,  756,  741,  886,  882,  789,  833,
 /*   440 */   790,  878,  879,  735,  880,  639,  734,  913,  830,  916,
 /*   450 */   805,  825,  750,  754,  651,  851,  852,  764,  823,  679,
 /*   460 */   755,  822,  710,  783,  784,  817,  876,  666,  889,  749,
 /*   470 */   834,  748,  831,  824,  818,  763,  816,  672,  891,  628,
 /*   480 */   815,  801,  742,  800,  906,  798,  694,  788,  797,  747,
 /*   490 */   739,  627,  693,  793,  802,  892,  648,  626,  725,  918,
 /*   500 */   894,  743,  890,  729,  721,  690,  667,  720,  919,  624,
 /*   510 */   613,  791,  714,  731,  715,  923,  732,  718,  924,  799,
 /*   520 */   860,  671,  727,  901,  726,  760,  625,  665,  713,  774,
 /*   530 */   925,  647,  663,  733,  661,  712,  777,  836,  682,  835,
 /*   540 */   643,  683,  681,  686,  687,  688,  689,  900,  684,  899,
 /*   550 */   685,  898,  650,  855,  897,  649,  928,  856,  641,  859,
 /*   560 */   761,  896,  857,  676,  792,  677,  909,  691,  664,  653,
 /*   570 */   646,  635,  840,  697,  711,  700,  780,  668,  839,  782,
 /*   580 */   902,  622,  701,  633,  806,  745,  803,  702,  862,  632,
 /*   590 */   657,  617,  703,  926,  708,  658,  674,  634,  874,  911,
 /*   600 */   838,  872,  863,  704,  706,  698,  699,  644,  873,  660,
};
#define YY_SZ_ACTTAB (int)(sizeof(yy_action)/sizeof(yy_action[0]))

/* The next table maps tokens into fallback tokens.  If a construct
** like the following:
** 
**      %fallback ID X Y Z.
................................................................................
    'D','R','O','P','F','A','I','L','F','R','O','M','F','U','L','L','G','L',
    'O','B','Y','I','F','I','S','N','U','L','L','O','R','D','E','R','E','S',
    'T','R','I','C','T','O','U','T','E','R','I','G','H','T','R','O','L','L',
    'B','A','C','K','R','O','W','U','N','I','O','N','U','S','I','N','G','V',
    'A','C','U','U','M','V','I','E','W','I','N','I','T','I','A','L','L','Y',
  };
  static const unsigned char aHash[127] = {
      70,  99, 112,  68,   0,  44,   0,   0,  76,   0,  71,   0,   0,
      41,  12,  72,  15,   0, 111,  79,  49, 106,   0,  19,   0,   0,
     116,   0, 114, 109,   0,  22,  87,   0,   9,   0,   0,  64,  65,
       0,  63,   6,   0,  47,  84,  96,   0, 113,  95,   0,   0,  43,
       0,  97,  24,   0,  17,   0, 117,  48,  23,   0,   5, 104,  25,
      90,   0,   0, 119, 100,  55, 118,  52,   7,  50,   0,  85,   0,
      94,  26,   0,  93,   0,   0,   0,  89,  86,  91,  82, 103,  14,
      38, 102,   0,  75,   0,  18,  83, 105,  31,   0, 115,  74, 107,
      56,  45,  78,   0,   0,  88,  39,   0, 110,   0,  35,   0,   0,
      28,   0,  80,  53,  58,   0,  20,  57,   0,  51,
  };
  static const unsigned char aNext[119] = {
       0,   0,   0,   0,   4,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   2,   0,   0,   0,   0,   0,   0,  13,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,  32,   0,  21,   0,   0,   0,  42,   3,  46,   0,
       0,   0,   0,   0,  29,   0,  37,   0,   0,   0,   1,  60,   0,
       0,  61,   0,  40,   0,   0,   0,   0,   0,   0,   0,  59,   0,
       0,   0,   0,  30,  54,  16,  33,  11,   0,   0,   0,   0,   0,
       0,   0,  10,  66,  73,   0,   8,   0,  98,  92,   0, 101,   0,
      81,   0,  69,   0,   0, 108,  27,  36,  67,  77,   0,  34,  62,
       0,   0,
  };
  static const unsigned char aLen[119] = {
       7,   7,   5,   4,   6,   4,   5,   3,   6,   3,   7,   6,   6,
       7,   7,   3,   8,   2,   6,   5,   4,   4,   3,  10,   4,   6,
      11,   2,   7,   5,   5,   9,   6,   9,   9,   7,  10,  10,   4,
       6,   2,   3,   9,   4,   2,   6,   5,   6,   6,   5,   6,   5,
       5,   7,   7,   3,   7,   4,   4,   7,   3,   6,   4,   7,   6,
      12,   6,   9,   4,   6,   5,   4,   7,   6,   5,   6,   7,   5,
       4,   5,   6,   5,   7,   3,   7,  13,   2,   2,   4,   6,   6,
       8,   5,  17,  12,   7,   8,   8,   2,   4,   4,   4,   4,   4,
       2,   2,   6,   5,   8,   5,   5,   8,   3,   5,   5,   6,   4,
       9,   3,
  };
  static const unsigned short int aOffset[119] = {
................................................................................
     337, 341, 344, 350, 354, 361, 363, 370, 372, 374, 383, 387, 393,
     399, 407, 412, 412, 428, 435, 442, 443, 450, 454, 458, 462, 466,
     469, 471, 473, 479, 483, 491, 495, 500, 508, 511, 516, 521, 527,
     531, 536,
  };
  static const unsigned char aCode[119] = {
    TK_REINDEX,    TK_INDEXED,    TK_INDEX,      TK_DESC,       TK_ESCAPE,     
    TK_EACH,       TK_CHECK,      TK_KEY,        TK_BEFORE,     TK_FOR,        
    TK_FOREIGN,    TK_IGNORE,     TK_LIKE_KW,    TK_EXPLAIN,    TK_INSTEAD,    
    TK_ADD,        TK_DATABASE,   TK_AS,         TK_SELECT,     TK_TABLE,      
    TK_JOIN_KW,    TK_THEN,       TK_END,        TK_DEFERRABLE, TK_ELSE,       
    TK_EXCEPT,     TK_TRANSACTION,TK_ON,         TK_JOIN_KW,    TK_ALTER,      
    TK_RAISE,      TK_EXCLUSIVE,  TK_EXISTS,     TK_SAVEPOINT,  TK_INTERSECT,  
    TK_TRIGGER,    TK_REFERENCES, TK_CONSTRAINT, TK_INTO,       TK_OFFSET,     
    TK_OF,         TK_SET,        TK_TEMP,       TK_TEMP,       TK_OR,         
    TK_UNIQUE,     TK_QUERY,      TK_ATTACH,     TK_HAVING,     TK_GROUP,      
    TK_UPDATE,     TK_BEGIN,      TK_JOIN_KW,    TK_RELEASE,    TK_BETWEEN,    
    TK_NOT,        TK_NOTNULL,    TK_NULL,       TK_LIKE_KW,    TK_CASCADE,    
    TK_ASC,        TK_DELETE,     TK_CASE,       TK_COLLATE,    TK_CREATE,     
    TK_CTIME_KW,   TK_DETACH,     TK_IMMEDIATE,  TK_JOIN,       TK_INSERT,     
    TK_MATCH,      TK_PLAN,       TK_ANALYZE,    TK_PRAGMA,     TK_ABORT,      
    TK_VALUES,     TK_VIRTUAL,    TK_LIMIT,      TK_WHEN,       TK_WHERE,      
    TK_RENAME,     TK_AFTER,      TK_REPLACE,    TK_AND,        TK_DEFAULT,    
    TK_AUTOINCR,   TK_TO,         TK_IN,         TK_CAST,       TK_COLUMNKW,   
    TK_COMMIT,     TK_CONFLICT,   TK_JOIN_KW,    TK_CTIME_KW,   TK_CTIME_KW,   
................................................................................
      testcase( i==2 ); /* TK_INDEX */
      testcase( i==3 ); /* TK_DESC */
      testcase( i==4 ); /* TK_ESCAPE */
      testcase( i==5 ); /* TK_EACH */
      testcase( i==6 ); /* TK_CHECK */
      testcase( i==7 ); /* TK_KEY */
      testcase( i==8 ); /* TK_BEFORE */
      testcase( i==9 ); /* TK_FOR */
      testcase( i==10 ); /* TK_FOREIGN */
      testcase( i==11 ); /* TK_IGNORE */
      testcase( i==12 ); /* TK_LIKE_KW */
      testcase( i==13 ); /* TK_EXPLAIN */
      testcase( i==14 ); /* TK_INSTEAD */
      testcase( i==15 ); /* TK_ADD */
      testcase( i==16 ); /* TK_DATABASE */
      testcase( i==17 ); /* TK_AS */
................................................................................
      testcase( i==48 ); /* TK_HAVING */
      testcase( i==49 ); /* TK_GROUP */
      testcase( i==50 ); /* TK_UPDATE */
      testcase( i==51 ); /* TK_BEGIN */
      testcase( i==52 ); /* TK_JOIN_KW */
      testcase( i==53 ); /* TK_RELEASE */
      testcase( i==54 ); /* TK_BETWEEN */
      testcase( i==55 ); /* TK_NOT */
      testcase( i==56 ); /* TK_NOTNULL */
      testcase( i==57 ); /* TK_NULL */
      testcase( i==58 ); /* TK_LIKE_KW */
      testcase( i==59 ); /* TK_CASCADE */
      testcase( i==60 ); /* TK_ASC */
      testcase( i==61 ); /* TK_DELETE */
      testcase( i==62 ); /* TK_CASE */
      testcase( i==63 ); /* TK_COLLATE */
................................................................................
**   root                - contents of root node
**
** If the root node is a leaf node, then start_block,
** leaves_end_block, and end_block are all 0.
**
**
**** Segment merging ****
** To amortize update costs, segments are groups into levels and
** merged in matches.  Each increase in level represents exponentially
** more documents.
**
** New documents (actually, document updates) are tokenized and
** written individually (using LeafWriter) to a level 0 segment, with
** incrementing idx.  When idx reaches MERGE_COUNT (default 16), all
** level 0 segments are merged into a single level 1 segment.  Level 1
** is populated like level 0, and eventually MERGE_COUNT level 1
................................................................................
    rc = sqlite3_create_module_v2(db, "rtree_i32", &rtreeModule, c, 0);
  }

  return rc;
}

#if !SQLITE_CORE
__declspec(dllexport) int sqlite3_extension_init(
  sqlite3 *db,
  char **pzErrMsg,
  const sqlite3_api_routines *pApi
){
  SQLITE_EXTENSION_INIT2(pApi)
  return sqlite3RtreeInit(db);
}


|







 







|







 







|







 







<
<
<




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







 







|
|







 







|







 







>







 







|







 







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







 







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







 







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







 







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







 







>
|
|
|
>







 







>
>
>
>
>
>
>
>
>
>
>







 







|







 







>







 







>
>
>
>
>
>
>
>
>
>







 







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



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







 







|
|
|
|




|
|





|
|
|
|
|




|
|
|
|
|







 







|
|








|







 







|
|







 







|
|







 







|
|







 







|







1
2
3
4
5
6
7
8
9
10
..
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
..
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
...
420
421
422
423
424
425
426



427
428
429
430

431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
...
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
....
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
....
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
.....
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599
.....
21730
21731
21732
21733
21734
21735
21736
21737
21738
21739
21740
21741
21742
21743
21744
21745
21746
21747
21748
21749
21750
21751
21752
21753
21754
21755
.....
23101
23102
23103
23104
23105
23106
23107
23108
23109
23110
23111
23112
23113
23114
23115
23116
23117
23118
23119
23120
23121
23122
23123
23124
23125
23126
23127
23128
23129
23130
23131
23132
.....
23168
23169
23170
23171
23172
23173
23174
23175
23176
23177
23178
23179
23180
23181
23182
23183
23184
23185
23186
23187
23188
23189
23190
23191
23192
23193
23194
23195
23196
23197
23198
.....
24517
24518
24519
24520
24521
24522
24523
24524
24525
24526
24527
24528
24529
24530
24531
24532
24533
24534
24535
24536
24537
24538
24539
24540
24541
24542
24543
24544
24545
24546
24547
24548
24549
24550
24551
24552
24553
.....
24649
24650
24651
24652
24653
24654
24655
24656
24657
24658
24659
24660
24661
24662
24663
24664
24665
24666
24667
.....
24801
24802
24803
24804
24805
24806
24807
24808
24809
24810
24811
24812
24813
24814
24815
24816
24817
24818
24819
24820
24821
24822
24823
24824
24825
.....
30767
30768
30769
30770
30771
30772
30773
30774
30775
30776
30777
30778
30779
30780
30781
.....
31853
31854
31855
31856
31857
31858
31859
31860
31861
31862
31863
31864
31865
31866
31867
.....
32471
32472
32473
32474
32475
32476
32477
32478
32479
32480
32481
32482
32483
32484
32485
32486
32487
32488
32489
32490
32491
32492
32493
32494
.....
83068
83069
83070
83071
83072
83073
83074
83075
83076
83077
83078
83079
83080
83081
83082
83083
83084
83085
83086
83087
83088
83089
83090
83091
83092
83093
83094
83095
83096
83097
83098
83099
83100
83101
83102
83103
83104
83105
83106
83107
83108
83109
83110
83111
83112
83113
83114
83115
83116
83117
83118
83119
83120
83121
83122
83123
83124
83125
83126
83127
83128
83129
83130
83131
83132
83133
83134
83135
83136
83137
83138
83139
83140
83141
83142
83143
83144
83145
83146
83147
83148
83149
83150
83151
83152
83153
83154
83155
83156
83157
83158
83159
83160
83161
83162
83163
83164
83165
83166
83167
83168
83169
83170
83171
83172
83173
83174
83175
83176
83177
83178
83179
83180
83181
83182
83183
83184
83185
83186
83187
83188
83189
83190
83191
83192
83193
83194
83195
83196
83197
83198
83199
83200
83201
83202
83203
83204
83205
83206
83207
83208
83209
83210
83211
83212
83213
83214
83215
83216
83217
83218
83219
83220
83221
83222
83223
83224
83225
83226
83227
83228
83229
83230
83231
83232
83233
83234
83235
83236
83237
83238
83239
83240
83241
83242
83243
83244
83245
83246
83247
83248
83249
83250
83251
83252
83253
83254
83255
83256
83257
83258
83259
83260
83261
83262
83263
83264
83265
83266
83267
83268
83269
83270
83271
83272
83273
83274
83275
83276
83277
83278
83279
83280
83281
83282
83283
83284
83285
83286
83287
83288
83289
83290
83291
83292
83293
83294
83295
83296
83297
83298
83299
83300
83301
83302
83303
83304
83305
83306
83307
83308
83309
83310
83311
83312
83313
83314
83315
83316
83317
83318
83319
83320
83321
83322
83323
83324
83325
83326
83327
83328
83329
83330
83331
83332
83333
83334
83335
83336
83337
83338
83339
83340
83341
83342
83343
83344
83345
83346
83347
83348
83349
83350
83351
83352
83353
83354
83355
83356
83357
83358
83359
83360
83361
83362
83363
83364
83365
83366
83367
83368
83369
83370
83371
83372
83373
83374
83375
83376
83377
83378
83379
83380
83381
83382
83383
83384
83385
83386
83387
83388
83389
83390
83391
83392
83393
83394
83395
83396
83397
83398
83399
83400
83401
83402
83403
83404
83405
83406
83407
83408
83409
83410
83411
83412
83413
83414
83415
83416
83417
83418
83419
83420
83421
83422
83423
83424
83425
83426
83427
83428
83429
83430
83431
83432
83433
83434
83435
83436
83437
83438
83439
83440
83441
83442
83443
83444
83445
83446
83447
83448
83449
83450
83451
83452


83453
83454
83455
83456
83457
83458
83459
83460
83461
83462
83463
83464
83465
83466
83467
83468
83469
83470
83471
83472

83473
83474
83475
83476
83477
83478
83479
83480
83481
83482
83483
83484
83485
83486
83487
83488
83489
83490
83491
83492
83493
83494
83495
83496
83497
83498
83499
83500
83501
83502
.....
86235
86236
86237
86238
86239
86240
86241
86242
86243
86244
86245
86246
86247
86248
86249
86250
86251
86252
86253
86254
86255
86256
86257
86258
86259
86260
86261
86262
86263
86264
86265
86266
86267
86268
86269
86270
86271
86272
86273
86274
86275
86276
86277
.....
86284
86285
86286
86287
86288
86289
86290
86291
86292
86293
86294
86295
86296
86297
86298
86299
86300
86301
86302
86303
86304
86305
86306
86307
86308
.....
86324
86325
86326
86327
86328
86329
86330
86331
86332
86333
86334
86335
86336
86337
86338
86339
.....
86370
86371
86372
86373
86374
86375
86376
86377
86378
86379
86380
86381
86382
86383
86384
86385
.....
89608
89609
89610
89611
89612
89613
89614
89615
89616
89617
89618
89619
89620
89621
89622
89623
......
102114
102115
102116
102117
102118
102119
102120
102121
102122
102123
102124
102125
102126
102127
102128
/******************************************************************************
** This file is an amalgamation of many separate C source files from SQLite
** version 3.6.10.  By combining all the individual C code files into this 
** single large file, the entire code can be compiled as a one translation
** unit.  This allows many compilers to do optimizations that would not be
** possible if the files were compiled separately.  Performance improvements
** of 5% are more are commonly seen when SQLite is compiled as a single
** translation unit.
**
** This file is all you need to compile SQLite.  To use SQLite in other
................................................................................
** the "sqlite3.h" header file at hand, you will find a copy in the first
** 6736 lines past this header comment.)  Additional code files may be
** needed if you want a wrapper to interface SQLite with your choice of
** programming language.  The code for the "sqlite3" command-line shell
** is also in a separate file.  This file contains only code for the core
** SQLite library.
**
** This amalgamation was generated on 2009-01-15 16:00:39 UTC.
*/
#define SQLITE_CORE 1
#define SQLITE_AMALGAMATION 1
#ifndef SQLITE_PRIVATE
# define SQLITE_PRIVATE static
#endif
#ifndef SQLITE_API
................................................................................
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Internal interface definitions for SQLite.
**
** @(#) $Id: sqliteInt.h,v 1.824 2009/01/14 23:03:41 drh Exp $
*/
#ifndef _SQLITEINT_H_
#define _SQLITEINT_H_

/*
** Include the configuration header output by 'configure' if we're using the
** autoconf-based build
................................................................................
** condition/decision coverage is inadequate.  For example, testcase()
** can be used to make sure boundary values are tested.  For
** bitmask tests, testcase() can be used to make sure each bit
** is significant and used at least once.  On switch statements
** where multiple cases go to the same block of code, testcase()
** can insure that all cases are evaluated.
**



*/
#ifdef SQLITE_COVERAGE_TEST
SQLITE_PRIVATE   void sqlite3Coverage(int);
# define testcase(X)  if( X ){ sqlite3Coverage(__LINE__); }

#else
# define testcase(X)
#endif

/*
** The TESTONLY macro is used to enclose variable declarations or
** other bits of code that are needed to support the arguments
** within testcase() and assert() macros.
*/
#if !defined(NDEBUG) || defined(SQLITE_COVERAGE_TEST)
# define TESTONLY(X)  X
#else
# define TESTONLY(X)
#endif

/*
** The ALWAYS and NEVER macros surround boolean expressions which 
** are intended to always be true or false, respectively.  Such
** expressions could be omitted from the code completely.  But they
................................................................................
**          evaluate to a string literal that is the SQLite version
**          with which the header file is associated.
**
** {H10014} The SQLITE_VERSION_NUMBER #define shall resolve to an integer
**          with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z
**          are the major version, minor version, and release number.
*/
#define SQLITE_VERSION         "3.6.10"
#define SQLITE_VERSION_NUMBER  3006010

/*
** CAPI3REF: Run-Time Library Version Numbers {H10020} <S60100>
** KEYWORDS: sqlite3_version
**
** These features provide the same information as the [SQLITE_VERSION]
** and [SQLITE_VERSION_NUMBER] #defines in the header, but are associated
................................................................................
** This header file (together with is companion C source-code file
** "os.c") attempt to abstract the underlying operating system so that
** the SQLite library will work on both POSIX and windows systems.
**
** This header file is #include-ed by sqliteInt.h and thus ends up
** being included by every source file.
**
** $Id: os.h,v 1.107 2009/01/14 23:03:41 drh Exp $
*/
#ifndef _SQLITE_OS_H_
#define _SQLITE_OS_H_

/*
** Figure out if we are dealing with Unix, Windows, or some other
** operating system.  After the following block of preprocess macros,
................................................................................
SQLITE_PRIVATE int sqlite3OsTruncate(sqlite3_file*, i64 size);
SQLITE_PRIVATE int sqlite3OsSync(sqlite3_file*, int);
SQLITE_PRIVATE int sqlite3OsFileSize(sqlite3_file*, i64 *pSize);
SQLITE_PRIVATE int sqlite3OsLock(sqlite3_file*, int);
SQLITE_PRIVATE int sqlite3OsUnlock(sqlite3_file*, int);
SQLITE_PRIVATE int sqlite3OsCheckReservedLock(sqlite3_file *id, int *pResOut);
SQLITE_PRIVATE int sqlite3OsFileControl(sqlite3_file*,int,void*);
#define SQLITE_FCNTL_DB_UNCHANGED 0xca093fa0
SQLITE_PRIVATE int sqlite3OsSectorSize(sqlite3_file *id);
SQLITE_PRIVATE int sqlite3OsDeviceCharacteristics(sqlite3_file *id);

/* 
** Functions for accessing sqlite3_vfs methods 
*/
SQLITE_PRIVATE int sqlite3OsOpen(sqlite3_vfs *, const char *, sqlite3_file*, int, int *);
................................................................................
**   *  Definitions of sqlite3_io_methods objects for all locking
**      methods plus "finder" functions for each locking method.
**   *  sqlite3_vfs method implementations.
**   *  Locking primitives for the proxy uber-locking-method. (MacOSX only)
**   *  Definitions of sqlite3_vfs objects for all locking methods
**      plus implementations of sqlite3_os_init() and sqlite3_os_end().
**
** $Id: os_unix.c,v 1.237 2009/01/15 04:30:03 drh Exp $
*/
#if SQLITE_OS_UNIX              /* This file is used on unix only */

/*
** There are various methods for file locking used for concurrency
** control:
**
................................................................................
#if SQLITE_THREADSAFE && defined(__linux__)
  pthread_t tid;                   /* The thread that "owns" this unixFile */
#endif
#if OS_VXWORKS
  int isDelete;                    /* Delete on close if true */
  struct vxworksFileId *pId;       /* Unique file ID */
#endif
#ifndef NDEBUG
  /* The next group of variables are used to track whether or not the
  ** transaction counter in bytes 24-27 of database files are updated
  ** whenever any part of the database changes.  An assertion fault will
  ** occur if a file is updated without also updating the transaction
  ** counter.  This test is made to avoid new problems similar to the
  ** one described by ticket #3584. 
  */
  unsigned char transCntrChng;   /* True if the transaction counter changed */
  unsigned char dbUpdate;        /* True if any part of database file changed */
  unsigned char inNormalWrite;   /* True if in a normal write operation */
#endif
#ifdef SQLITE_TEST
  /* In test mode, increase the size of this structure a bit so that 
  ** it is larger than the struct CrashFile defined in test6.c.
  */
  char aPadding[32];
#endif
};
................................................................................
      rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_LOCK);
      if( IS_LOCK_ERROR(rc) ){
        pFile->lastErrno = tErrno;
      }
    }
  }
  

#ifndef NDEBUG
  /* Set up the transaction-counter change checking flags when
  ** transitioning from a SHARED to a RESERVED lock.  The change
  ** from SHARED to RESERVED marks the beginning of a normal
  ** write operation (not a hot journal rollback).
  */
  if( rc==SQLITE_OK
   && pFile->locktype<=SHARED_LOCK
   && locktype==RESERVED_LOCK
  ){
    pFile->transCntrChng = 0;
    pFile->dbUpdate = 0;
    pFile->inNormalWrite = 1;
  }
#endif


  if( rc==SQLITE_OK ){
    pFile->locktype = locktype;
    pLock->locktype = locktype;
  }else if( locktype==EXCLUSIVE_LOCK ){
    pFile->locktype = PENDING_LOCK;
    pLock->locktype = PENDING_LOCK;
  }
................................................................................
  pLock = pFile->pLock;
  assert( pLock->cnt!=0 );
  if( pFile->locktype>SHARED_LOCK ){
    assert( pLock->locktype==pFile->locktype );
    SimulateIOErrorBenign(1);
    SimulateIOError( h=(-1) )
    SimulateIOErrorBenign(0);

#ifndef NDEBUG
    /* When reducing a lock such that other processes can start
    ** reading the database file again, make sure that the
    ** transaction counter was updated if any part of the database
    ** file changed.  If the transaction counter is not updated,
    ** other connections to the same file might not realize that
    ** the file has changed and hence might not know to flush their
    ** cache.  The use of a stale cache can lead to database corruption.
    */
    assert( pFile->inNormalWrite==0
         || pFile->dbUpdate==0
         || pFile->transCntrChng==1 );
    pFile->inNormalWrite = 0;
#endif


    if( locktype==SHARED_LOCK ){
      lock.l_type = F_RDLCK;
      lock.l_whence = SEEK_SET;
      lock.l_start = SHARED_FIRST;
      lock.l_len = SHARED_SIZE;
      if( fcntl(h, F_SETLK, &lock)==(-1) ){
        int tErrno = errno;
................................................................................
  const void *pBuf, 
  int amt,
  sqlite3_int64 offset 
){
  int wrote = 0;
  assert( id );
  assert( amt>0 );

#ifndef NDEBUG
  /* If we are doing a normal write to a database file (as opposed to
  ** doing a hot-journal rollback or a write to some file other than a
  ** normal database file) then record the fact that the database
  ** has changed.  If the transaction counter is modified, record that
  ** fact too.
  */
  if( ((unixFile*)id)->inNormalWrite ){
    unixFile *pFile = (unixFile*)id;
    pFile->dbUpdate = 1;  /* The database has been modified */
    if( offset<=24 && offset+amt>=27 ){
      char oldCntr[4];
      SimulateIOErrorBenign(1);
      seekAndRead(pFile, 24, oldCntr, 4);
      SimulateIOErrorBenign(0);
      if( memcmp(oldCntr, &((char*)pBuf)[24-offset], 4)!=0 ){
        pFile->transCntrChng = 1;  /* The transaction counter has changed */
      }
    }
  }
#endif

  while( amt>0 && (wrote = seekAndWrite((unixFile*)id, offset, pBuf, amt))>0 ){
    amt -= wrote;
    offset += wrote;
    pBuf = &((char*)pBuf)[wrote];
  }
  SimulateIOError(( wrote=(-1), amt=1 ));
  SimulateDiskfullError(( wrote=0, amt=1 ));
................................................................................
  ** the fcntl call every time sync is called.
  */
  if( rc ) rc = fsync(fd);

#else 
  if( dataOnly ){
    rc = fdatasync(fd);
#if OS_VXWORKS
    if( rc==-1 && errno==ENOTSUP ){
      rc = fsync(fd);
    }
#endif
  }else{
    rc = fsync(fd);
  }
#endif /* ifdef SQLITE_NO_SYNC elif HAVE_FULLFSYNC */

  if( OS_VXWORKS && rc!= -1 ){
    rc = 0;
................................................................................
      *(int*)pArg = ((unixFile*)id)->locktype;
      return SQLITE_OK;
    }
    case SQLITE_LAST_ERRNO: {
      *(int*)pArg = ((unixFile*)id)->lastErrno;
      return SQLITE_OK;
    }
#ifndef NDEBUG
    /* The pager calls this method to signal that it has done
    ** a rollback and that the database is therefore unchanged and
    ** it hence it is OK for the transaction change counter to be
    ** unchanged.
    */
    case SQLITE_FCNTL_DB_UNCHANGED: {
      ((unixFile*)id)->dbUpdate = 0;
      return SQLITE_OK;
    }
#endif
#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)
    case SQLITE_SET_LOCKPROXYFILE:
    case SQLITE_GET_LOCKPROXYFILE: {
      return proxyFileControl(id,op,pArg);
    }
#endif /* SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__) */
  }
................................................................................
** The pager is used to access a database disk file.  It implements
** atomic commit and rollback through the use of a journal file that
** is separate from the database file.  The pager also implements file
** locking to prevent two processes from writing the same database
** file simultaneously, or one process from reading the database while
** another is writing.
**
** @(#) $Id: pager.c,v 1.551 2009/01/14 23:03:41 drh Exp $
*/
#ifndef SQLITE_OMIT_DISKIO

/*
** Macros for troubleshooting.  Normally turned off
*/
#if 0
................................................................................
  }else{
    assert( pPager->pInJournal==0 );
  }

  if( !pPager->exclusiveMode ){
    rc2 = osUnlock(pPager->fd, SHARED_LOCK);
    pPager->state = PAGER_SHARED;
    pPager->changeCountDone = 0;
  }else if( pPager->state==PAGER_SYNCED ){
    pPager->state = PAGER_EXCLUSIVE;
  }
  pPager->dbOrigSize = 0;
  pPager->setMaster = 0;
  pPager->needSync = 0;
  /* lruListSetFirstSynced(pPager); */
................................................................................
      }
    }
  }
  /*NOTREACHED*/
  assert( 0 );

end_playback:
  /* Following a rollback, the database file should be back in its original
  ** state prior to the start of the transaction, so invoke the
  ** SQLITE_FCNTL_DB_UNCHANGED file-control method to disable the
  ** assertion that the transaction counter was modified.
  */
  assert(
    pPager->fd->pMethods==0 ||
    sqlite3OsFileControl(pPager->fd,SQLITE_FCNTL_DB_UNCHANGED,0)>=SQLITE_OK
  );

  if( rc==SQLITE_OK ){
    zMaster = pPager->pTmpSpace;
    rc = readMasterJournal(pPager->jfd, zMaster, pPager->pVfs->mxPathname+1);
  }
  if( rc==SQLITE_OK ){
    rc = pager_end_transaction(pPager, zMaster[0]!='\0');
  }
................................................................................
**  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.
*/
static const YYACTIONTYPE yy_action[] = {
 /*     0 */   304,  930,  120,  609,    1,  178,  214,  436,   62,   62,
 /*    10 */    62,   62,  216,   64,   64,   64,   64,   65,   65,   66,
 /*    20 */    66,   66,   67,  216,  406,  403,  443,  449,   69,   64,
 /*    30 */    64,   64,   64,   65,   65,   66,   66,   66,   67,  216,
 /*    40 */   469,  467,  336,  174,   61,   60,  309,  453,  454,  450,
 /*    50 */   450,   63,   63,   62,   62,   62,   62,  200,   64,   64,
 /*    60 */    64,   64,   65,   65,   66,   66,   66,   67,  216,  304,
 /*    70 */   510,  312,  436,  509,  438,   83,   64,   64,   64,   64,
 /*    80 */    65,   65,   66,   66,   66,   67,  216,   65,   65,   66,
 /*    90 */    66,   66,   67,  216,  511,  443,  449,  325,  408,   59,
 /*   100 */   465,  218,   57,  213,  411,  496,  428,  440,  440,  440,
 /*   110 */   206,   67,  216,   61,   60,  309,  453,  454,  450,  450,
 /*   120 */    63,   63,   62,   62,   62,   62,  552,   64,   64,   64,
 /*   130 */    64,   65,   65,   66,   66,   66,   67,  216,  304,  228,
 /*   140 */   186,  469,  544,  312,  433,  170,  114,  256,  357,  261,
 /*   150 */   358,  181,  425,   20,  426,  542,  153,   85,  265,  465,
 /*   160 */   218,  150,  151,  539,  443,  449,   95,  311,  394,  412,
 /*   170 */   413,  510,  276,  427,  436,  438,  152,  553,  545,  589,
 /*   180 */   590,  539,   61,   60,  309,  453,  454,  450,  450,   63,
 /*   190 */    63,   62,   62,   62,   62,  402,   64,   64,   64,   64,
 /*   200 */    65,   65,   66,   66,   66,   67,  216,  304,  440,  440,
 /*   210 */   440,  228,  109,  411,  399,  523,  593,  330,  114,  256,
 /*   220 */   357,  261,  358,  181,  187,  330,  485,  359,  362,  363,
 /*   230 */   265,  593,  241,  443,  449,  592,  591,  248,  364,  436,
 /*   240 */   432,   35,  492,   66,   66,   66,   67,  216,  432,   42,
 /*   250 */   592,   61,   60,  309,  453,  454,  450,  450,   63,   63,
 /*   260 */    62,   62,   62,   62,  401,   64,   64,   64,   64,   65,
 /*   270 */    65,   66,   66,   66,   67,  216,  304,  570,  412,  413,
 /*   280 */   187,  501,  344,  359,  362,  363,  215,  354,  346,  221,
 /*   290 */   330,  341,  330,   56,  364,  569,  588,  217,   68,  156,
 /*   300 */    70,  155,  443,  449,   68,  187,   70,  155,  359,  362,
 /*   310 */   363,  397,  217,  432,   35,  432,   36,  148,  569,  364,
 /*   320 */    61,   60,  309,  453,  454,  450,  450,   63,   63,   62,
 /*   330 */    62,   62,   62,  433,   64,   64,   64,   64,   65,   65,
 /*   340 */    66,   66,   66,   67,  216,  387,  282,  281,  330,  304,
 /*   350 */   474,   68,  480,   70,  155,  344,  214,  154,  299,  330,
 /*   360 */   343,  467,  543,  174,  384,  475,  257,  247,  387,  282,
 /*   370 */   281,  432,   28,  411,  160,  443,  449,  258,  476,  214,
 /*   380 */   516,  496,  432,   42,  198,  492,   68,  162,   70,  155,
 /*   390 */   517,  433,   78,   61,   60,  309,  453,  454,  450,  450,
 /*   400 */    63,   63,   62,   62,   62,   62,  595,   64,   64,   64,
 /*   410 */    64,   65,   65,   66,   66,   66,   67,  216,  433,  367,
 /*   420 */   349,  433,  304,  220,  222,  544,  505,  330,  465,  330,
 /*   430 */   230,  330,  240,  163,  161,  554,   20,  431,  412,  413,
 /*   440 */     2,  430,  385,  375,  411,  198,  182,  249,  443,  449,
 /*   450 */   432,   35,  432,   50,  432,   50,  310,  460,  461,   17,
 /*   460 */   207,  335,  460,  461,  388,   81,   61,   60,  309,  453,
 /*   470 */   454,  450,  450,   63,   63,   62,   62,   62,   62,  433,
 /*   480 */    64,   64,   64,   64,   65,   65,   66,   66,   66,   67,
 /*   490 */   216,  304,  348,  504,  433,  508,  531,  486,  320,  353,
 /*   500 */   321,  306,  457,  385,   23,  331,  265,  470,  411,  412,
 /*   510 */   413,  444,  445,  551,  526,  307,  532,  443,  449,  217,
 /*   520 */   550,  496,  432,    3,  217,  381,  607,  921,  333,  921,
 /*   530 */   456,  456,  447,  448,  276,   61,   60,  309,  453,  454,
 /*   540 */   450,  450,   63,   63,   62,   62,   62,   62,  410,   64,
 /*   550 */    64,   64,   64,   65,   65,   66,   66,   66,   67,  216,
 /*   560 */   304,  446,  607,  920,  525,  920,  604,  264,  314,  474,
 /*   570 */   411,  123,  411,  412,  413,  124,  277,  487,  234,  333,
 /*   580 */   411,  456,  456,  319,  475,  411,  443,  449,  333,  377,
 /*   590 */   456,  456,  286,  333,  380,  456,  456,  476,  178,  340,
 /*   600 */   436,  420,  604,  315,   61,   60,  309,  453,  454,  450,
 /*   610 */   450,   63,   63,   62,   62,   62,   62,  330,   64,   64,
 /*   620 */    64,   64,   65,   65,   66,   66,   66,   67,  216,  304,
 /*   630 */   289,    5,  287,  268,  466,  412,  413,  412,  413,  396,
 /*   640 */   432,   29,  503,  330,  159,  412,  413,  610,  406,  403,
 /*   650 */   412,  413,  414,  415,  416,  443,  449,  333,  214,  456,
 /*   660 */   456,  488,  276,  489,   21,  436,  432,   24,  436,  487,
 /*   670 */   514,  515,  395,   61,   60,  309,  453,  454,  450,  450,
 /*   680 */    63,   63,   62,   62,   62,   62,  330,   64,   64,   64,
 /*   690 */    64,   65,   65,   66,   66,   66,   67,  216,  304,  560,
 /*   700 */   374,  560,  352,   94,  578,  330,  567,  515,  330,  432,
 /*   710 */    33,  330,  288,  330,  562,  330,  544,  330,  561,  183,
 /*   720 */   184,  185,  603,  303,  443,  449,  600,   20,  432,   54,
 /*   730 */   376,  432,   53,  436,  432,   99,  432,   97,  432,  102,
 /*   740 */   432,  103,   61,   60,  309,  453,  454,  450,  450,   63,
 /*   750 */    63,   62,   62,   62,   62,  330,   64,   64,   64,   64,
 /*   760 */    65,   65,   66,   66,   66,   67,  216,  304,  330,  405,
 /*   770 */     1,  202,  330,  512,  330,  214,  330,  171,  432,  108,
 /*   780 */   330,  421,  429,  330,  487,  342,  330,  384,   19,  386,
 /*   790 */   145,  432,  110,  443,  449,  432,   16,  432,  100,  432,
 /*   800 */    34,  351,  270,  432,   98,  433,  432,   25,  276,  432,
 /*   810 */    55,   61,   60,  309,  453,  454,  450,  450,   63,   63,
 /*   820 */    62,   62,   62,   62,  330,   64,   64,   64,   64,   65,
 /*   830 */    65,   66,   66,   66,   67,  216,  304,  330,  323,  119,
 /*   840 */   274,  330,  272,  330,  355,  330,  422,  432,  111,  330,
 /*   850 */   580,  159,  115,  233,  330,  177,  161,  439,  463,  463,
 /*   860 */   432,  112,  443,  449,  432,  113,  432,   26,  432,   37,
 /*   870 */   649,  431,  432,   38,  492,  430,  487,  432,   27,  264,
 /*   880 */    61,   71,  309,  453,  454,  450,  450,   63,   63,   62,
 /*   890 */    62,   62,   62,  330,   64,   64,   64,   64,   65,   65,
 /*   900 */    66,   66,   66,   67,  216,  304,  330,  264,  264,  528,
 /*   910 */   330,  157,  330,  252,  330,  229,  432,   39,  330,  482,
 /*   920 */   332,  478,   77,  330,   79,  330,  483,  520,  521,  432,
 /*   930 */    40,  443,  449,  432,   41,  432,   43,  432,   44,  492,
 /*   940 */   491,  432,   45,  316,  317,  433,  432,   30,  432,   31,
 /*   950 */    60,  309,  453,  454,  450,  450,   63,   63,   62,   62,
 /*   960 */    62,   62,  330,   64,   64,   64,   64,   65,   65,   66,
 /*   970 */    66,   66,   67,  216,  304,  330,  264,  564,  254,  330,
 /*   980 */   458,  330,   22,  330,  495,  432,   46,  330,  494,  535,
 /*   990 */   179,  186,  330,  267,  330,  186,  451,  497,  432,   47,
 /*  1000 */   443,  449,  432,   48,  432,   49,  432,   32,  182,  262,
 /*  1010 */   432,   10,  318,  276,  389,  432,   51,  432,   52,  276,
 /*  1020 */   309,  453,  454,  450,  450,   63,   63,   62,   62,   62,
 /*  1030 */    62,  276,   64,   64,   64,   64,   65,   65,   66,   66,
 /*  1040 */    66,   67,  216,  165,  276,  276,  189,  192,  235,  236,
 /*  1050 */   237,  168,  239,  566,  105,  581,   18,  530,  529,   73,
 /*  1060 */   337,  582,    4,  306,  605,  527,  308,  211,  366,  294,
 /*  1070 */   186,  263,  533,  231,  334,  565,  295,  186,  534,  546,
 /*  1080 */   433,  433,  573,  574,  179,   92,  232,  292,  209,  269,
 /*  1090 */   569,  339,  271,  853,  208,  273,  275,  210,  585,  195,
 /*  1100 */    92,  469,  371,  606,  602,    8,  302,  423,  280,  379,
 /*  1110 */   382,  383,  147,  242,  283,  437,  462,  284,  285,  577,
 /*  1120 */   338,   76,   75,  587,  293,  296,  297,  599,  481,  464,
 /*  1130 */    74,  328,  329,  250,  526,  438,  572,  166,  290,  393,
 /*  1140 */   392,  291,  281,  409,  537,  584,  305,  484,  259,  540,
 /*  1150 */   417,  214,  418,  214,  536,  326,  538,  419,  361,  167,
 /*  1160 */    73,  337,  169,    4,    7,  327,  347,  308,  440,  440,
 /*  1170 */   440,  441,  442,   11,   85,  334,  398,   84,  434,  345,
 /*  1180 */   243,   58,  244,   73,  337,   80,    4,  245,  435,  246,
 /*  1190 */   308,  176,  339,  479,   86,  121,  356,  350,  334,  493,
 /*  1200 */   251,  253,  469,  499,  255,  513,  500,  518,  313,  519,
 /*  1210 */   260,  523,  125,  522,  226,  339,  219,  524,  368,  190,
 /*  1220 */   191,  300,   76,   75,  502,  469,  225,  227,  547,  541,
 /*  1230 */   548,   74,  328,  329,  301,  555,  438,  549,  370,  193,
 /*  1240 */   372,  194,  557,   89,  196,   76,   75,  278,  378,  117,
 /*  1250 */   558,  568,  133,  390,   74,  328,  329,  199,  391,  438,
 /*  1260 */   322,  134,  135,  136,  575,  143,  583,  596,  139,  440,
 /*  1270 */   440,  440,  441,  442,   11,  597,  598,  601,  137,  142,
 /*  1280 */   101,  224,  104,  407,  238,  424,  650,  651,   93,  172,
 /*  1290 */    96,  173,  440,  440,  440,  441,  442,   11,  452,  455,
 /*  1300 */    72,  471,  459,  468,  472,  144,  158,    6,  473,  490,
 /*  1310 */   107,  175,  477,   82,   13,  122,   12,  180,  506,  118,
 /*  1320 */   498,  164,  507,  324,  223,   87,  126,  116,  266,  127,
 /*  1330 */    88,  128,  188,  258,  360,  369,  146,  556,  129,  373,
 /*  1340 */   179,  365,  279,  197,  131,  130,  563,    9,  571,  132,
 /*  1350 */   559,  201,   14,  576,  203,  204,  205,  579,  140,  138,
 /*  1360 */   141,   15,  586,  594,  212,  106,  400,  298,  149,  404,
 /*  1370 */   931,  608,   90,   91,
};
static const YYCODETYPE yy_lookahead[] = {
 /*     0 */    19,  142,  143,  144,  145,   24,  113,   26,   72,   73,
 /*    10 */    74,   75,   87,   77,   78,   79,   80,   81,   82,   83,
 /*    20 */    84,   85,   86,   87,    1,    2,   45,   46,   76,   77,
 /*    30 */    78,   79,   80,   81,   82,   83,   84,   85,   86,   87,
 /*    40 */    61,  165,  166,  167,   63,   64,   65,   66,   67,   68,
 /*    50 */    69,   70,   71,   72,   73,   74,   75,   25,   77,   78,
 /*    60 */    79,   80,   81,   82,   83,   84,   85,   86,   87,   19,
 /*    70 */    91,   19,   91,  173,   95,   25,   77,   78,   79,   80,
 /*    80 */    81,   82,   83,   84,   85,   86,   87,   81,   82,   83,
 /*    90 */    84,   85,   86,   87,  173,   45,   46,  146,  147,   49,
 /*   100 */    81,   82,   22,  152,   26,  150,   26,  128,  129,  130,
 /*   110 */   159,   86,   87,   63,   64,   65,   66,   67,   68,   69,
 /*   120 */    70,   71,   72,   73,   74,   75,  185,   77,   78,   79,
 /*   130 */    80,   81,   82,   83,   84,   85,   86,   87,   19,   87,
 /*   140 */    25,   61,  150,   19,  193,   93,   94,   95,   96,   97,
 /*   150 */    98,   99,  160,  161,  171,  172,   25,  125,  106,   81,
 /*   160 */    82,   81,   82,  180,   45,   46,   47,  212,  217,   91,
 /*   170 */    92,   91,  150,  172,   26,   95,  184,  185,  185,  101,
 /*   180 */   102,  180,   63,   64,   65,   66,   67,   68,   69,   70,
 /*   190 */    71,   72,   73,   74,   75,  244,   77,   78,   79,   80,
 /*   200 */    81,   82,   83,   84,   85,   86,   87,   19,  128,  129,
 /*   210 */   130,   87,   24,   26,  192,  100,  150,  150,   94,   95,
 /*   220 */    96,   97,   98,   99,   93,  150,   25,   96,   97,   98,
 /*   230 */   106,  150,  194,   45,   46,  169,  170,  150,  107,   91,
 /*   240 */   173,  174,  165,   83,   84,   85,   86,   87,  173,  174,
 /*   250 */   169,   63,   64,   65,   66,   67,   68,   69,   70,   71,
 /*   260 */    72,   73,   74,   75,  242,   77,   78,   79,   80,   81,
 /*   270 */    82,   83,   84,   85,   86,   87,   19,   11,   91,   92,
 /*   280 */    93,  204,  215,   96,   97,   98,  196,  220,  213,  214,
 /*   290 */   150,  190,  150,  203,  107,   52,  230,  231,  221,  159,
 /*   300 */   223,  224,   45,   46,  221,   93,  223,  224,   96,   97,
 /*   310 */    98,  230,  231,  173,  174,  173,  174,  116,   52,  107,
 /*   320 */    63,   64,   65,   66,   67,   68,   69,   70,   71,   72,
 /*   330 */    73,   74,   75,  193,   77,   78,   79,   80,   81,   82,
 /*   340 */    83,   84,   85,   86,   87,  102,  103,  104,  150,   19,
 /*   350 */    12,  221,  222,  223,  224,  215,  113,  159,  162,  150,
 /*   360 */   220,  165,  166,  167,  150,   27,   95,  225,  102,  103,
 /*   370 */   104,  173,  174,   26,  150,   45,   46,  106,   40,  113,
 /*   380 */    42,  150,  173,  174,  159,  165,  221,  159,  223,  224,
 /*   390 */    52,  193,  135,   63,   64,   65,   66,   67,   68,   69,
 /*   400 */    70,   71,   72,   73,   74,   75,  241,   77,   78,   79,
 /*   410 */    80,   81,   82,   83,   84,   85,   86,   87,  193,   19,
 /*   420 */   150,  193,   19,  214,  204,  150,   23,  150,   81,  150,
 /*   430 */   216,  150,  157,  205,  206,  160,  161,  110,   91,   92,
 /*   440 */    22,  114,  217,  212,   26,  159,   46,  150,   45,   46,
 /*   450 */   173,  174,  173,  174,  173,  174,  168,  169,  170,  234,
 /*   460 */   159,  168,  169,  170,  239,  135,   63,   64,   65,   66,
 /*   470 */    67,   68,   69,   70,   71,   72,   73,   74,   75,  193,
 /*   480 */    77,   78,   79,   80,   81,   82,   83,   84,   85,   86,
 /*   490 */    87,   19,  215,   23,  193,   23,   33,  207,  219,  150,
 /*   500 */   219,  101,   23,  217,   22,  150,  106,   23,   26,   91,
 /*   510 */    92,   45,   46,  180,  181,  154,   53,   45,   46,  231,
 /*   520 */   187,  150,  173,  174,  231,  239,   22,   23,  109,   25,
 /*   530 */   111,  112,   66,   67,  150,   63,   64,   65,   66,   67,
 /*   540 */    68,   69,   70,   71,   72,   73,   74,   75,  150,   77,
 /*   550 */    78,   79,   80,   81,   82,   83,   84,   85,   86,   87,
 /*   560 */    19,   95,   22,   23,   23,   25,   62,  150,  105,   12,
 /*   570 */    26,   23,   26,   91,   92,   23,  192,   25,  148,  109,
 /*   580 */    26,  111,  112,  212,   27,   26,   45,   46,  109,  228,
 /*   590 */   111,  112,   17,  109,  233,  111,  112,   40,   24,   42,
 /*   600 */    26,  150,   62,  186,   63,   64,   65,   66,   67,   68,
 /*   610 */    69,   70,   71,   72,   73,   74,   75,  150,   77,   78,
 /*   620 */    79,   80,   81,   82,   83,   84,   85,   86,   87,   19,
 /*   630 */    55,  195,   57,   23,  165,   91,   92,   91,   92,   94,
 /*   640 */   173,  174,   83,  150,   92,   91,   92,    0,    1,    2,
 /*   650 */    91,   92,    7,    8,    9,   45,   46,  109,  113,  111,
 /*   660 */   112,  117,  150,  117,   22,   91,  173,  174,   26,  117,
 /*   670 */   189,  190,  127,   63,   64,   65,   66,   67,   68,   69,
 /*   680 */    70,   71,   72,   73,   74,   75,  150,   77,   78,   79,
 /*   690 */    80,   81,   82,   83,   84,   85,   86,   87,   19,  102,
 /*   700 */   103,  104,   19,   24,  192,  150,  189,  190,  150,  173,
 /*   710 */   174,  150,  137,  150,   28,  150,  150,  150,   32,  102,
 /*   720 */   103,  104,  247,  248,   45,   46,  160,  161,  173,  174,
 /*   730 */    44,  173,  174,   91,  173,  174,  173,  174,  173,  174,
 /*   740 */   173,  174,   63,   64,   65,   66,   67,   68,   69,   70,
 /*   750 */    71,   72,   73,   74,   75,  150,   77,   78,   79,   80,
 /*   760 */    81,   82,   83,   84,   85,   86,   87,   19,  150,  144,
 /*   770 */   145,  159,  150,  164,  150,  113,  150,   22,  173,  174,
 /*   780 */   150,  150,  173,  150,   25,  150,  150,  150,   22,  127,
 /*   790 */    24,  173,  174,   45,   46,  173,  174,  173,  174,  173,
 /*   800 */   174,  118,   17,  173,  174,  193,  173,  174,  150,  173,
 /*   810 */   174,   63,   64,   65,   66,   67,   68,   69,   70,   71,
 /*   820 */    72,   73,   74,   75,  150,   77,   78,   79,   80,   81,
 /*   830 */    82,   83,   84,   85,   86,   87,   19,  150,  245,  246,
 /*   840 */    55,  150,   57,  150,   83,  150,  150,  173,  174,  150,
 /*   850 */   192,   92,  150,  216,  150,  205,  206,  150,  128,  129,
 /*   860 */   173,  174,   45,   46,  173,  174,  173,  174,  173,  174,
 /*   870 */   115,  110,  173,  174,  165,  114,  117,  173,  174,  150,
 /*   880 */    63,   64,   65,   66,   67,   68,   69,   70,   71,   72,
 /*   890 */    73,   74,   75,  150,   77,   78,   79,   80,   81,   82,
 /*   900 */    83,   84,   85,   86,   87,   19,  150,  150,  150,  182,
 /*   910 */   150,  159,  150,  204,  150,  186,  173,  174,  150,   30,
 /*   920 */    19,  150,  134,  150,  136,  150,   37,    7,    8,  173,
 /*   930 */   174,   45,   46,  173,  174,  173,  174,  173,  174,  165,
 /*   940 */   150,  173,  174,  186,  186,  193,  173,  174,  173,  174,
 /*   950 */    64,   65,   66,   67,   68,   69,   70,   71,   72,   73,
 /*   960 */    74,   75,  150,   77,   78,   79,   80,   81,   82,   83,
 /*   970 */    84,   85,   86,   87,   19,  150,  150,   21,  204,  150,
 /*   980 */    23,  150,   25,  150,  150,  173,  174,  150,   23,   23,
 /*   990 */    25,   25,  150,   23,  150,   25,   95,  150,  173,  174,
 /*  1000 */    45,   46,  173,  174,  173,  174,  173,  174,   46,  150,
 /*  1010 */   173,  174,  186,  150,   58,  173,  174,  173,  174,  150,
 /*  1020 */    65,   66,   67,   68,   69,   70,   71,   72,   73,   74,
 /*  1030 */    75,  150,   77,   78,   79,   80,   81,   82,   83,   84,
 /*  1040 */    85,   86,   87,    5,  150,  150,  159,  159,   10,   11,
 /*  1050 */    12,   13,   14,   97,   16,  192,   22,   94,   95,   19,
 /*  1060 */    20,  192,   22,  101,   23,  150,   26,   29,   23,   31,
 /*  1070 */    25,  150,  182,  192,   34,   23,   38,   25,  182,  150,
 /*  1080 */   193,  193,   23,   23,   25,   25,  192,  192,   50,  150,
 /*  1090 */    52,   51,  150,  137,   56,  150,  150,   59,   23,  235,
 /*  1100 */    25,   61,  236,   62,   23,   71,   25,  153,  150,  150,
 /*  1110 */   150,  150,  195,  197,  150,  165,  232,  150,  150,  150,
 /*  1120 */   227,   81,   82,  150,  150,  150,  150,  150,  176,  232,
 /*  1130 */    90,   91,   92,  208,  181,   95,  198,    6,  208,  208,
 /*  1140 */   102,  103,  104,  149,  165,  198,  108,  176,  176,  165,
 /*  1150 */   149,  113,  149,  113,  176,  149,  176,   13,  177,  151,
 /*  1160 */    19,   20,  151,   22,   25,  158,  122,   26,  128,  129,
 /*  1170 */   130,  131,  132,  133,  125,   34,  138,  123,  193,  121,
 /*  1180 */   198,  124,  199,   19,   20,  134,   22,  200,  202,  201,
 /*  1190 */    26,  115,   51,  156,  101,  156,  101,  120,   34,  210,
 /*  1200 */   209,  209,   61,  210,  209,  175,  210,  175,   43,  183,
 /*  1210 */   175,  100,   22,  177,   87,   51,  226,  175,   18,  155,
 /*  1220 */   155,  178,   81,   82,   83,   61,  229,  229,  175,  183,
 /*  1230 */   175,   90,   91,   92,  178,  156,   95,  175,  156,  155,
 /*  1240 */    41,  156,  156,  134,  155,   81,   82,  237,  156,   63,
 /*  1250 */   238,  188,   22,  156,   90,   91,   92,  188,   18,   95,
 /*  1260 */   156,  191,  191,  191,  198,  218,  198,   36,  188,  128,
 /*  1270 */   129,  130,  131,  132,  133,  156,  156,  140,  191,  218,
 /*  1280 */   163,  179,  179,    1,   15,   23,  115,  115,  240,  115,
 /*  1290 */   240,  115,  128,  129,  130,  131,  132,  133,   95,  110,
 /*  1300 */    22,   11,   23,   23,   23,   22,   22,  119,   23,  117,
 /*  1310 */   243,   25,   23,   25,  119,   22,   25,  119,   23,  246,
 /*  1320 */   118,  115,   23,  249,   47,   22,   22,   35,   23,   22,
 /*  1330 */    22,   22,   99,  106,   47,   19,   24,   20,  101,   39,
 /*  1340 */    25,   47,  137,  101,   22,   48,   48,    5,    1,  105,
 /*  1350 */    54,  126,   22,    1,  116,   17,  120,   20,  105,  116,
 /*  1360 */   126,   22,  127,   23,   15,   17,   60,  139,   22,    3,
 /*  1370 */   250,    4,   71,   71,
};
#define YY_SHIFT_USE_DFLT (-108)
#define YY_SHIFT_MAX 404
static const short yy_shift_ofst[] = {
 /*     0 */    23, 1038, 1040,  -19, 1040, 1164, 1164,  187,   78,  243,
 /*    10 */   119, 1164, 1164, 1164, 1164, 1164,  -48,  266,  347,  554,
 /*    20 */   148,   19,   19, -107,   50,  188,  257,  330,  403,  472,
 /*    30 */   541,  610,  679,  748,  817,  748,  748,  748,  748,  748,
 /*    40 */   748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
 /*    50 */   748,  748,  748,  886,  955,  955, 1141, 1164, 1164, 1164,
 /*    60 */  1164, 1164, 1164, 1164, 1164, 1164, 1164, 1164, 1164, 1164,
 /*    70 */  1164, 1164, 1164, 1164, 1164, 1164, 1164, 1164, 1164, 1164,
 /*    80 */  1164, 1164, 1164, 1164, 1164, 1164, 1164, 1164, 1164, 1164,
 /*    90 */  1164, 1164, 1164, 1164, 1164, 1164, 1164,  -64,  -64,   -1,
 /*   100 */    -1,   52,    6,  160,  400,  956,  554,  554,   25,  148,
 /*   110 */   -75, -108, -108, -108,   80,  124,  338,  338,  504,  540,
 /*   120 */   647,  574,  554,  574,  574,  554,  554,  554,  554,  554,
 /*   130 */   554,  554,  554,  554,  554,  554,  554,  554,  554,  554,
 /*   140 */   554,  554,  545,  662, -107, -107, -107, -108, -108, -108,
 /*   150 */   -21,  -21,  131,  212,  470,  418,  479,  484,  557,  544,
 /*   160 */   546,  482,  548,  552,  559,  645,  554,  554,  554,  554,
 /*   170 */   554,  761,  554,  554,  642,  554,  554,  759,  554,  554,
 /*   180 */   554,  554,  554,  463,  463,  463,  554,  554,  554,  419,
 /*   190 */   554,  554,  419,  554,  686,  597,  554,  554,  419,  554,
 /*   200 */   554,  554,  419,  554,  554,  554,  419,  419,  554,  554,
 /*   210 */   554,  554,  554,  766,  327,  201,  148,  730,  730,  788,
 /*   220 */   889,  889,  683,  889,  962,  889,  148,  889,  148,  115,
 /*   230 */    32,  683,  683,   32, 1131, 1131, 1131, 1131, 1144, 1144,
 /*   240 */  1139, -107, 1049, 1044, 1054, 1058, 1057, 1051, 1076, 1076,
 /*   250 */  1093, 1077, 1093, 1077, 1093, 1077, 1095, 1095, 1165, 1095,
 /*   260 */  1111, 1095, 1190, 1127, 1127, 1165, 1095, 1095, 1095, 1190,
 /*   270 */  1200, 1076, 1200, 1076, 1200, 1076, 1076, 1199, 1109, 1200,
 /*   280 */  1076, 1186, 1186, 1230, 1049, 1076, 1240, 1240, 1240, 1240,
 /*   290 */  1049, 1186, 1230, 1076, 1231, 1231, 1076, 1076, 1137, -108,
 /*   300 */  -108, -108, -108, -108,  466,  575,  617,  785,  755,  901,
 /*   310 */   957,  965,  271,  920,  963,  966,  970, 1045, 1052, 1059,
 /*   320 */  1060, 1075, 1034, 1081, 1041, 1282, 1269, 1262, 1171, 1172,
 /*   330 */  1174, 1176, 1203, 1189, 1278, 1279, 1280, 1283, 1290, 1284,
 /*   340 */  1281, 1286, 1285, 1289, 1288, 1188, 1291, 1195, 1288, 1192,
 /*   350 */  1293, 1198, 1202, 1206, 1295, 1299, 1292, 1277, 1303, 1287,
 /*   360 */  1304, 1305, 1307, 1308, 1294, 1309, 1233, 1227, 1316, 1317,
 /*   370 */  1312, 1237, 1300, 1296, 1297, 1315, 1298, 1205, 1242, 1322,
 /*   380 */  1342, 1347, 1244, 1301, 1302, 1225, 1330, 1238, 1352, 1338,
 /*   390 */  1236, 1337, 1243, 1253, 1234, 1339, 1235, 1340, 1348, 1306,
 /*   400 */  1349, 1228, 1346, 1366, 1367,
};
#define YY_REDUCE_USE_DFLT (-142)
#define YY_REDUCE_MAX 303
static const short yy_reduce_ofst[] = {
 /*     0 */  -141,  -49,  140,   77,  198,   67,   75,   -8,   66,  225,
 /*    10 */   165,  142,  209,  277,  279,  281,  130,  286,   81,  275,
 /*    20 */   196,  288,  293,  228,   83,   83,   83,   83,   83,   83,
 /*    30 */    83,   83,   83,   83,   83,   83,   83,   83,   83,   83,
 /*    40 */    83,   83,   83,   83,   83,   83,   83,   83,   83,   83,
 /*    50 */    83,   83,   83,   83,   83,   83,  349,  467,  493,  536,
 /*    60 */   555,  558,  561,  563,  565,  567,  605,  618,  622,  624,
 /*    70 */   626,  630,  633,  636,  674,  687,  691,  693,  695,  699,
 /*    80 */   704,  743,  756,  760,  762,  764,  768,  773,  775,  812,
 /*    90 */   825,  829,  831,  833,  837,  842,  844,   83,   83,   83,
 /*   100 */    83,  -17,   83,   83,  333,  361,   22,  566,   83, -124,
 /*   110 */    83,   83,   83,   83,  609,    1,  481,  517,  475,  475,
 /*   120 */   625,  220,  -45,  709,  774,  417,  729,  757,  758,  384,
 /*   130 */   231,  826,  214,  371,  512,  658,  863,  869,  881,  894,
 /*   140 */   637,  895,  301,  612,  752,  887,  888,   90,  650,  593,
 /*   150 */  -100,  -79,  -59,   -7,   38,   87,   38,   38,  101,  224,
 /*   160 */   270,  297,   38,  290,  355,  430,  398,  451,  631,  696,
 /*   170 */   702,  436,  355,  707,  469,  635,  771,  290,  790,  834,
 /*   180 */   847,  859,  915,  727,  890,  896,  921,  929,  939,   38,
 /*   190 */   942,  945,   38,  946,  864,  866,  958,  959,   38,  960,
 /*   200 */   961,  964,   38,  967,  968,  969,   38,   38,  973,  974,
 /*   210 */   975,  976,  977,  954,  917,  916,  950,  884,  897,  893,
 /*   220 */   952,  971,  925,  972,  953,  978,  979,  980,  984,  981,
 /*   230 */   938,  930,  931,  947,  994, 1001, 1003, 1006, 1008, 1011,
 /*   240 */  1007,  985,  982,  983,  987,  988,  986,  990, 1037, 1039,
 /*   250 */   991,  989,  992,  993,  995,  996, 1030, 1032, 1026, 1035,
 /*   260 */  1036, 1042, 1043,  997,  998, 1046, 1053, 1055, 1062, 1056,
 /*   270 */  1064, 1079, 1065, 1082, 1084, 1085, 1086, 1010, 1012, 1089,
 /*   280 */  1092, 1063, 1069, 1047, 1066, 1097, 1070, 1071, 1072, 1087,
 /*   290 */  1068, 1080, 1061, 1104, 1048, 1050, 1119, 1120, 1067, 1117,
 /*   300 */  1102, 1103, 1073, 1074,
};
static const YYACTIONTYPE yy_default[] = {
 /*     0 */   615,  929,  848,  736,  929,  848,  929,  929,  875,  929,
 /*    10 */   904,  846,  929,  929,  929,  929,  820,  929,  875,  929,
 /*    20 */   652,  875,  875,  740,  771,  929,  929,  929,  929,  929,
 /*    30 */   929,  929,  929,  772,  929,  850,  845,  841,  843,  842,
 /*    40 */   849,  773,  762,  769,  776,  751,  888,  778,  779,  785,
 /*    50 */   786,  905,  903,  808,  807,  826,  929,  929,  929,  929,
 /*    60 */   929,  929,  929,  929,  929,  929,  929,  929,  929,  929,
 /*    70 */   929,  929,  929,  929,  929,  929,  929,  929,  929,  929,
 /*    80 */   929,  929,  929,  929,  929,  929,  929,  929,  929,  929,
 /*    90 */   929,  929,  929,  929,  929,  929,  929,  810,  832,  809,
 /*   100 */   819,  645,  811,  812,  705,  640,  929,  929,  813,  929,
 /*   110 */   814,  827,  828,  829,  929,  929,  929,  929,  929,  929,
 /*   120 */   615,  736,  929,  736,  736,  929,  929,  929,  929,  929,
 /*   130 */   929,  929,  929,  929,  929,  929,  929,  929,  929,  929,
 /*   140 */   929,  929,  929,  929,  929,  929,  929,  730,  740,  922,
 /*   150 */   929,  929,  696,  929,  929,  929,  929,  929,  929,  929,
 /*   160 */   929,  929,  929,  929,  929,  623,  621,  929,  929,  929,
 /*   170 */   929,  728,  929,  929,  654,  929,  929,  738,  929,  929,


 /*   180 */   929,  929,  929,  929,  929,  929,  929,  929,  929,  642,
 /*   190 */   929,  929,  717,  929,  881,  929,  929,  929,  895,  929,
 /*   200 */   929,  929,  893,  929,  929,  929,  719,  781,  861,  929,
 /*   210 */   908,  910,  929,  929,  728,  737,  929,  929,  929,  844,
 /*   220 */   765,  765,  753,  765,  675,  765,  929,  765,  929,  678,
 /*   230 */   775,  753,  753,  775,  620,  620,  620,  620,  631,  631,
 /*   240 */   695,  929,  775,  766,  768,  758,  770,  929,  744,  744,
 /*   250 */   752,  757,  752,  757,  752,  757,  707,  707,  692,  707,
 /*   260 */   678,  707,  854,  858,  858,  692,  707,  707,  707,  854,
 /*   270 */   637,  744,  637,  744,  637,  744,  744,  885,  887,  637,
 /*   280 */   744,  709,  709,  787,  775,  744,  716,  716,  716,  716,
 /*   290 */   775,  709,  787,  744,  907,  907,  744,  744,  915,  662,
 /*   300 */   680,  680,  922,  927,  929,  929,  929,  929,  794,  929,
 /*   310 */   929,  929,  929,  929,  929,  929,  929,  929,  929,  929,
 /*   320 */   929,  929,  868,  929,  929,  929,  629,  929,  799,  795,
 /*   330 */   929,  796,  929,  722,  929,  929,  929,  929,  929,  929,
 /*   340 */   929,  929,  929,  929,  847,  929,  759,  929,  767,  929,
 /*   350 */   929,  929,  929,  929,  929,  929,  929,  929,  929,  929,
 /*   360 */   929,  929,  929,  929,  929,  929,  929,  929,  929,  929,
 /*   370 */   929,  929,  929,  929,  883,  884,  929,  929,  929,  929,

 /*   380 */   929,  929,  929,  929,  929,  929,  929,  929,  929,  929,
 /*   390 */   929,  929,  929,  929,  929,  929,  929,  929,  929,  914,
 /*   400 */   929,  929,  917,  616,  929,  611,  613,  614,  618,  619,
 /*   410 */   622,  649,  650,  651,  624,  625,  626,  627,  628,  630,
 /*   420 */   634,  632,  633,  635,  641,  643,  661,  663,  647,  665,
 /*   430 */   726,  727,  791,  720,  721,  725,  648,  802,  793,  797,
 /*   440 */   798,  800,  801,  815,  816,  818,  824,  831,  834,  817,
 /*   450 */   822,  823,  825,  830,  833,  723,  724,  837,  655,  656,
 /*   460 */   659,  660,  871,  873,  872,  874,  658,  657,  803,  806,
 /*   470 */   839,  840,  896,  897,  898,  899,  900,  835,  745,  838,
 /*   480 */   821,  760,  763,  764,  761,  729,  739,  747,  748,  749,
 /*   490 */   750,  734,  735,  741,  756,  789,  790,  754,  755,  742,
 /*   500 */   743,  731,  732,  733,  836,  792,  804,  805,  666,  667,
 /*   510 */   799,  668,  669,  670,  708,  711,  712,  713,  671,  690,
 /*   520 */   693,  694,  672,  679,  673,  674,  681,  682,  683,  686,
 /*   530 */   687,  688,  689,  684,  685,  855,  856,  859,  857,  676,
 /*   540 */   677,  691,  664,  653,  646,  697,  700,  701,  702,  703,
 /*   550 */   704,  706,  698,  699,  644,  636,  638,  746,  877,  886,
 /*   560 */   882,  878,  879,  880,  639,  851,  852,  710,  783,  784,
 /*   570 */   876,  889,  891,  788,  892,  894,  890,  919,  714,  715,
 /*   580 */   718,  860,  901,  774,  777,  780,  782,  862,  863,  864,
 /*   590 */   865,  866,  869,  870,  867,  902,  906,  909,  911,  912,
 /*   600 */   913,  916,  918,  923,  924,  925,  928,  926,  617,  612,
};
#define YY_SZ_ACTTAB (int)(sizeof(yy_action)/sizeof(yy_action[0]))

/* The next table maps tokens into fallback tokens.  If a construct
** like the following:
** 
**      %fallback ID X Y Z.
................................................................................
    'D','R','O','P','F','A','I','L','F','R','O','M','F','U','L','L','G','L',
    'O','B','Y','I','F','I','S','N','U','L','L','O','R','D','E','R','E','S',
    'T','R','I','C','T','O','U','T','E','R','I','G','H','T','R','O','L','L',
    'B','A','C','K','R','O','W','U','N','I','O','N','U','S','I','N','G','V',
    'A','C','U','U','M','V','I','E','W','I','N','I','T','I','A','L','L','Y',
  };
  static const unsigned char aHash[127] = {
      70,  99, 112,  68,   0,  43,   0,   0,  76,   0,  71,   0,   0,
      41,  12,  72,  15,   0, 111,  79,  49, 106,   0,  19,   0,   0,
     116,   0, 114, 109,   0,  22,  87,   0,   9,   0,   0,  64,  65,
       0,  63,   6,   0,  47,  84,  96,   0, 113,  95,   0,   0,  44,
       0,  97,  24,   0,  17,   0, 117,  48,  23,   0,   5, 104,  25,
      90,   0,   0, 119, 100,  55, 118,  52,   7,  50,   0,  85,   0,
      94,  26,   0,  93,   0,   0,   0,  89,  86,  91,  82, 103,  14,
      38, 102,   0,  75,   0,  18,  83, 105,  31,   0, 115,  74, 107,
      57,  45,  78,   0,   0,  88,  39,   0, 110,   0,  35,   0,   0,
      28,   0,  80,  53,  58,   0,  20,  56,   0,  51,
  };
  static const unsigned char aNext[119] = {
       0,   0,   0,   0,   4,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   2,   0,   0,   0,   0,   0,   0,  13,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,  32,  21,   0,   0,   0,  42,   3,  46,   0,
       0,   0,   0,  29,   0,   0,  37,   0,   0,   0,   1,  60,   0,
       0,  61,   0,  40,   0,   0,   0,   0,   0,   0,   0,  59,   0,
       0,   0,   0,  30,  54,  16,  33,  10,   0,   0,   0,   0,   0,
       0,   0,  11,  66,  73,   0,   8,   0,  98,  92,   0, 101,   0,
      81,   0,  69,   0,   0, 108,  27,  36,  67,  77,   0,  34,  62,
       0,   0,
  };
  static const unsigned char aLen[119] = {
       7,   7,   5,   4,   6,   4,   5,   3,   6,   7,   3,   6,   6,
       7,   7,   3,   8,   2,   6,   5,   4,   4,   3,  10,   4,   6,
      11,   2,   7,   5,   5,   9,   6,   9,   9,   7,  10,  10,   4,
       6,   2,   3,   4,   9,   2,   6,   5,   6,   6,   5,   6,   5,
       5,   7,   7,   7,   3,   4,   4,   7,   3,   6,   4,   7,   6,
      12,   6,   9,   4,   6,   5,   4,   7,   6,   5,   6,   7,   5,
       4,   5,   6,   5,   7,   3,   7,  13,   2,   2,   4,   6,   6,
       8,   5,  17,  12,   7,   8,   8,   2,   4,   4,   4,   4,   4,
       2,   2,   6,   5,   8,   5,   5,   8,   3,   5,   5,   6,   4,
       9,   3,
  };
  static const unsigned short int aOffset[119] = {
................................................................................
     337, 341, 344, 350, 354, 361, 363, 370, 372, 374, 383, 387, 393,
     399, 407, 412, 412, 428, 435, 442, 443, 450, 454, 458, 462, 466,
     469, 471, 473, 479, 483, 491, 495, 500, 508, 511, 516, 521, 527,
     531, 536,
  };
  static const unsigned char aCode[119] = {
    TK_REINDEX,    TK_INDEXED,    TK_INDEX,      TK_DESC,       TK_ESCAPE,     
    TK_EACH,       TK_CHECK,      TK_KEY,        TK_BEFORE,     TK_FOREIGN,    
    TK_FOR,        TK_IGNORE,     TK_LIKE_KW,    TK_EXPLAIN,    TK_INSTEAD,    
    TK_ADD,        TK_DATABASE,   TK_AS,         TK_SELECT,     TK_TABLE,      
    TK_JOIN_KW,    TK_THEN,       TK_END,        TK_DEFERRABLE, TK_ELSE,       
    TK_EXCEPT,     TK_TRANSACTION,TK_ON,         TK_JOIN_KW,    TK_ALTER,      
    TK_RAISE,      TK_EXCLUSIVE,  TK_EXISTS,     TK_SAVEPOINT,  TK_INTERSECT,  
    TK_TRIGGER,    TK_REFERENCES, TK_CONSTRAINT, TK_INTO,       TK_OFFSET,     
    TK_OF,         TK_SET,        TK_TEMP,       TK_TEMP,       TK_OR,         
    TK_UNIQUE,     TK_QUERY,      TK_ATTACH,     TK_HAVING,     TK_GROUP,      
    TK_UPDATE,     TK_BEGIN,      TK_JOIN_KW,    TK_RELEASE,    TK_BETWEEN,    
    TK_NOTNULL,    TK_NOT,        TK_NULL,       TK_LIKE_KW,    TK_CASCADE,    
    TK_ASC,        TK_DELETE,     TK_CASE,       TK_COLLATE,    TK_CREATE,     
    TK_CTIME_KW,   TK_DETACH,     TK_IMMEDIATE,  TK_JOIN,       TK_INSERT,     
    TK_MATCH,      TK_PLAN,       TK_ANALYZE,    TK_PRAGMA,     TK_ABORT,      
    TK_VALUES,     TK_VIRTUAL,    TK_LIMIT,      TK_WHEN,       TK_WHERE,      
    TK_RENAME,     TK_AFTER,      TK_REPLACE,    TK_AND,        TK_DEFAULT,    
    TK_AUTOINCR,   TK_TO,         TK_IN,         TK_CAST,       TK_COLUMNKW,   
    TK_COMMIT,     TK_CONFLICT,   TK_JOIN_KW,    TK_CTIME_KW,   TK_CTIME_KW,   
................................................................................
      testcase( i==2 ); /* TK_INDEX */
      testcase( i==3 ); /* TK_DESC */
      testcase( i==4 ); /* TK_ESCAPE */
      testcase( i==5 ); /* TK_EACH */
      testcase( i==6 ); /* TK_CHECK */
      testcase( i==7 ); /* TK_KEY */
      testcase( i==8 ); /* TK_BEFORE */
      testcase( i==9 ); /* TK_FOREIGN */
      testcase( i==10 ); /* TK_FOR */
      testcase( i==11 ); /* TK_IGNORE */
      testcase( i==12 ); /* TK_LIKE_KW */
      testcase( i==13 ); /* TK_EXPLAIN */
      testcase( i==14 ); /* TK_INSTEAD */
      testcase( i==15 ); /* TK_ADD */
      testcase( i==16 ); /* TK_DATABASE */
      testcase( i==17 ); /* TK_AS */
................................................................................
      testcase( i==48 ); /* TK_HAVING */
      testcase( i==49 ); /* TK_GROUP */
      testcase( i==50 ); /* TK_UPDATE */
      testcase( i==51 ); /* TK_BEGIN */
      testcase( i==52 ); /* TK_JOIN_KW */
      testcase( i==53 ); /* TK_RELEASE */
      testcase( i==54 ); /* TK_BETWEEN */
      testcase( i==55 ); /* TK_NOTNULL */
      testcase( i==56 ); /* TK_NOT */
      testcase( i==57 ); /* TK_NULL */
      testcase( i==58 ); /* TK_LIKE_KW */
      testcase( i==59 ); /* TK_CASCADE */
      testcase( i==60 ); /* TK_ASC */
      testcase( i==61 ); /* TK_DELETE */
      testcase( i==62 ); /* TK_CASE */
      testcase( i==63 ); /* TK_COLLATE */
................................................................................
**   root                - contents of root node
**
** If the root node is a leaf node, then start_block,
** leaves_end_block, and end_block are all 0.
**
**
**** Segment merging ****
** To amortize update costs, segments are grouped into levels and
** merged in batches.  Each increase in level represents exponentially
** more documents.
**
** New documents (actually, document updates) are tokenized and
** written individually (using LeafWriter) to a level 0 segment, with
** incrementing idx.  When idx reaches MERGE_COUNT (default 16), all
** level 0 segments are merged into a single level 1 segment.  Level 1
** is populated like level 0, and eventually MERGE_COUNT level 1
................................................................................
    rc = sqlite3_create_module_v2(db, "rtree_i32", &rtreeModule, c, 0);
  }

  return rc;
}

#if !SQLITE_CORE
SQLITE_API int sqlite3_extension_init(
  sqlite3 *db,
  char **pzErrMsg,
  const sqlite3_api_routines *pApi
){
  SQLITE_EXTENSION_INIT2(pApi)
  return sqlite3RtreeInit(db);
}

Changes to src/sqlite3.h.

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
...
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
....
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409

2410
2411
2412
2413
2414
2415
2416
** on how SQLite interfaces are suppose to operate.
**
** The name of this file under configuration management is "sqlite.h.in".
** The makefile makes some minor changes to this file (such as inserting
** the version number) and changes its name to "sqlite3.h" as
** part of the build process.
**
** @(#) $Id: sqlite.h.in,v 1.420 2008/12/16 13:46:30 drh Exp $
*/
#ifndef _SQLITE3_H_
#define _SQLITE3_H_
#include <stdarg.h>     /* Needed for the definition of va_list */

/*
** Make sure we can call this stuff from C++.
................................................................................
**          evaluate to a string literal that is the SQLite version
**          with which the header file is associated.
**
** {H10014} The SQLITE_VERSION_NUMBER #define shall resolve to an integer
**          with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z
**          are the major version, minor version, and release number.
*/
#define SQLITE_VERSION         "3.6.7"
#define SQLITE_VERSION_NUMBER  3006007

/*
** CAPI3REF: Run-Time Library Version Numbers {H10020} <S60100>
** KEYWORDS: sqlite3_version
**
** These features provide the same information as the [SQLITE_VERSION]
** and [SQLITE_VERSION_NUMBER] #defines in the header, but are associated
................................................................................
#define SQLITE_DROP_TEMP_VIEW       15   /* View Name       NULL            */
#define SQLITE_DROP_TRIGGER         16   /* Trigger Name    Table Name      */
#define SQLITE_DROP_VIEW            17   /* View Name       NULL            */
#define SQLITE_INSERT               18   /* Table Name      NULL            */
#define SQLITE_PRAGMA               19   /* Pragma Name     1st arg or NULL */
#define SQLITE_READ                 20   /* Table Name      Column Name     */
#define SQLITE_SELECT               21   /* NULL            NULL            */
#define SQLITE_TRANSACTION          22   /* NULL            NULL            */
#define SQLITE_UPDATE               23   /* Table Name      Column Name     */
#define SQLITE_ATTACH               24   /* Filename        NULL            */
#define SQLITE_DETACH               25   /* Database Name   NULL            */
#define SQLITE_ALTER_TABLE          26   /* Database Name   Table Name      */
#define SQLITE_REINDEX              27   /* Index Name      NULL            */
#define SQLITE_ANALYZE              28   /* Table Name      NULL            */
#define SQLITE_CREATE_VTABLE        29   /* Table Name      Module Name     */
#define SQLITE_DROP_VTABLE          30   /* Table Name      Module Name     */
#define SQLITE_FUNCTION             31   /* NULL            Function Name   */

#define SQLITE_COPY                  0   /* No longer used */

/*
** CAPI3REF: Tracing And Profiling Functions {H12280} <S60400>
** EXPERIMENTAL
**
** These routines register callback functions that can be used for







|







 







|
|







 







|









>







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
...
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
....
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
** on how SQLite interfaces are suppose to operate.
**
** The name of this file under configuration management is "sqlite.h.in".
** The makefile makes some minor changes to this file (such as inserting
** the version number) and changes its name to "sqlite3.h" as
** part of the build process.
**
** @(#) $Id: sqlite.h.in,v 1.421 2008/12/30 06:24:58 danielk1977 Exp $
*/
#ifndef _SQLITE3_H_
#define _SQLITE3_H_
#include <stdarg.h>     /* Needed for the definition of va_list */

/*
** Make sure we can call this stuff from C++.
................................................................................
**          evaluate to a string literal that is the SQLite version
**          with which the header file is associated.
**
** {H10014} The SQLITE_VERSION_NUMBER #define shall resolve to an integer
**          with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z
**          are the major version, minor version, and release number.
*/
#define SQLITE_VERSION         "3.6.10"
#define SQLITE_VERSION_NUMBER  3006010

/*
** CAPI3REF: Run-Time Library Version Numbers {H10020} <S60100>
** KEYWORDS: sqlite3_version
**
** These features provide the same information as the [SQLITE_VERSION]
** and [SQLITE_VERSION_NUMBER] #defines in the header, but are associated
................................................................................
#define SQLITE_DROP_TEMP_VIEW       15   /* View Name       NULL            */
#define SQLITE_DROP_TRIGGER         16   /* Trigger Name    Table Name      */
#define SQLITE_DROP_VIEW            17   /* View Name       NULL            */
#define SQLITE_INSERT               18   /* Table Name      NULL            */
#define SQLITE_PRAGMA               19   /* Pragma Name     1st arg or NULL */
#define SQLITE_READ                 20   /* Table Name      Column Name     */
#define SQLITE_SELECT               21   /* NULL            NULL            */
#define SQLITE_TRANSACTION          22   /* Operation       NULL            */
#define SQLITE_UPDATE               23   /* Table Name      Column Name     */
#define SQLITE_ATTACH               24   /* Filename        NULL            */
#define SQLITE_DETACH               25   /* Database Name   NULL            */
#define SQLITE_ALTER_TABLE          26   /* Database Name   Table Name      */
#define SQLITE_REINDEX              27   /* Index Name      NULL            */
#define SQLITE_ANALYZE              28   /* Table Name      NULL            */
#define SQLITE_CREATE_VTABLE        29   /* Table Name      Module Name     */
#define SQLITE_DROP_VTABLE          30   /* Table Name      Module Name     */
#define SQLITE_FUNCTION             31   /* NULL            Function Name   */
#define SQLITE_SAVEPOINT            32   /* Operation       Savepoint Name  */
#define SQLITE_COPY                  0   /* No longer used */

/*
** CAPI3REF: Tracing And Profiling Functions {H12280} <S60400>
** EXPERIMENTAL
**
** These routines register callback functions that can be used for