System.Data.SQLite

Check-in [d9c4970b26]
Login

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

Overview
Comment:3.3.0 alpha
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | sourceforge
Files: files | file ages | folders
SHA1: d9c4970b26eeb6b742e74ad046803e32e5fda6c9
User & Date: rmsimpson 2006-01-11 03:22:29.000
Context
2006-01-11
05:00
1.0.24.3 refresh check-in: 944e15b0fa user: rmsimpson tags: sourceforge
03:22
3.3.0 alpha check-in: d9c4970b26 user: rmsimpson tags: sourceforge
2006-01-10
23:32
Fix a rollback bug check-in: e9bd66e344 user: rmsimpson tags: sourceforge
Changes
Unified Diff Show Whitespace Changes Patch
Changes to SQLite.Interop/src/alter.c.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains C code routines that used to generate VDBE code
** that implements the ALTER TABLE command.
**
** $Id: alter.c,v 1.12 2006/01/10 21:09:54 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>

/*
** The code in this file only exists if we are not omitting the
** ALTER TABLE logic from the build.







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains C code routines that used to generate VDBE code
** that implements the ALTER TABLE command.
**
** $Id: alter.c,v 1.13 2006/01/11 03:22:29 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>

/*
** The code in this file only exists if we are not omitting the
** ALTER TABLE logic from the build.
Changes to SQLite.Interop/src/analyze.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
** 2005 July 8
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code associated with the ANALYZE command.
**
** @(#) $Id: analyze.c,v 1.6 2006/01/10 21:09:54 rmsimpson Exp $
*/
#ifndef SQLITE_OMIT_ANALYZE
#include "sqliteInt.h"

/*
** This routine generates code that opens the sqlite_stat1 table on cursor
** iStatCur.













|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
** 2005 July 8
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code associated with the ANALYZE command.
**
** @(#) $Id: analyze.c,v 1.7 2006/01/11 03:22:29 rmsimpson Exp $
*/
#ifndef SQLITE_OMIT_ANALYZE
#include "sqliteInt.h"

/*
** This routine generates code that opens the sqlite_stat1 table on cursor
** iStatCur.
Changes to SQLite.Interop/src/attach.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
** 2003 April 6
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code used to implement the ATTACH and DETACH commands.
**
** $Id: attach.c,v 1.12 2006/01/10 21:09:54 rmsimpson Exp $
*/
#include "sqliteInt.h"

/*
** Resolve an expression that was part of an ATTACH or DETACH statement. This
** is slightly different from resolving a normal SQL expression, because simple
** identifiers are treated as strings, not possible column names or aliases.













|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
** 2003 April 6
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code used to implement the ATTACH and DETACH commands.
**
** $Id: attach.c,v 1.13 2006/01/11 03:22:29 rmsimpson Exp $
*/
#include "sqliteInt.h"

/*
** Resolve an expression that was part of an ATTACH or DETACH statement. This
** is slightly different from resolving a normal SQL expression, because simple
** identifiers are treated as strings, not possible column names or aliases.
Changes to SQLite.Interop/src/auth.c.
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
**
*************************************************************************
** This file contains code used to implement the sqlite3_set_authorizer()
** API.  This facility is an optional feature of the library.  Embedded
** systems that do not need this facility may omit it by recompiling
** the library with -DSQLITE_OMIT_AUTHORIZATION=1
**
** $Id: auth.c,v 1.12 2006/01/10 21:09:54 rmsimpson Exp $
*/
#include "sqliteInt.h"

/*
** All of the code in this file may be omitted by defining a single
** macro.
*/







|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
**
*************************************************************************
** This file contains code used to implement the sqlite3_set_authorizer()
** API.  This facility is an optional feature of the library.  Embedded
** systems that do not need this facility may omit it by recompiling
** the library with -DSQLITE_OMIT_AUTHORIZATION=1
**
** $Id: auth.c,v 1.13 2006/01/11 03:22:29 rmsimpson Exp $
*/
#include "sqliteInt.h"

/*
** All of the code in this file may be omitted by defining a single
** macro.
*/
Changes to SQLite.Interop/src/btree.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
** 2004 April 6
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.14 2006/01/10 21:09:54 rmsimpson Exp $
**
** This file implements a external (disk-based) database using BTrees.
** For a detailed discussion of BTrees, refer to
**
**     Donald E. Knuth, THE ART OF COMPUTER PROGRAMMING, Volume 3:
**     "Sorting And Searching", pages 473-480. Addison-Wesley
**     Publishing Company, Reading, Massachusetts.











|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
** 2004 April 6
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.15 2006/01/11 03:22:29 rmsimpson Exp $
**
** This file implements a external (disk-based) database using BTrees.
** For a detailed discussion of BTrees, refer to
**
**     Donald E. Knuth, THE ART OF COMPUTER PROGRAMMING, Volume 3:
**     "Sorting And Searching", pages 473-480. Addison-Wesley
**     Publishing Company, Reading, Massachusetts.
Changes to SQLite.Interop/src/btree.h.
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This header file defines the interface that the sqlite B-Tree file
** subsystem.  See comments in the source code for a detailed description
** of what each interface routine does.
**
** @(#) $Id: btree.h,v 1.13 2006/01/10 21:09:54 rmsimpson Exp $
*/
#ifndef _BTREE_H_
#define _BTREE_H_

/* TODO: This definition is just included so other modules compile. It
** needs to be revisited.
*/







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This header file defines the interface that the sqlite B-Tree file
** subsystem.  See comments in the source code for a detailed description
** of what each interface routine does.
**
** @(#) $Id: btree.h,v 1.14 2006/01/11 03:22:29 rmsimpson Exp $
*/
#ifndef _BTREE_H_
#define _BTREE_H_

/* TODO: This definition is just included so other modules compile. It
** needs to be revisited.
*/
Changes to SQLite.Interop/src/build.c.
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
**     CREATE INDEX
**     DROP INDEX
**     creating ID lists
**     BEGIN TRANSACTION
**     COMMIT
**     ROLLBACK
**
** $Id: build.c,v 1.12 2006/01/10 21:09:54 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>

/*
** This routine is called when a new SQL statement is beginning to
** be parsed.  Initialize the pParse structure as needed.







|







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
**     CREATE INDEX
**     DROP INDEX
**     creating ID lists
**     BEGIN TRANSACTION
**     COMMIT
**     ROLLBACK
**
** $Id: build.c,v 1.13 2006/01/11 03:22:29 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>

/*
** This routine is called when a new SQL statement is beginning to
** be parsed.  Initialize the pParse structure as needed.
Changes to SQLite.Interop/src/callback.c.
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
**    May you share freely, never taking more than you give.
**
*************************************************************************
**
** This file contains functions used to access the internal hash tables
** of user defined functions and collation sequences.
**
** $Id: callback.c,v 1.8 2006/01/10 21:09:55 rmsimpson Exp $
*/

#include "sqliteInt.h"

/*
** Invoke the 'collation needed' callback to request a collation sequence
** in the database text encoding of name zName, length nName.







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
**    May you share freely, never taking more than you give.
**
*************************************************************************
**
** This file contains functions used to access the internal hash tables
** of user defined functions and collation sequences.
**
** $Id: callback.c,v 1.9 2006/01/11 03:22:29 rmsimpson Exp $
*/

#include "sqliteInt.h"

/*
** Invoke the 'collation needed' callback to request a collation sequence
** in the database text encoding of name zName, length nName.
Changes to SQLite.Interop/src/complete.c.
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
** An tokenizer for SQL
**
** This file contains C code that implements the sqlite3_complete() API.
** This code used to be part of the tokenizer.c source file.  But by
** separating it out, the code will be automatically omitted from
** static links that do not use it.
**
** $Id: complete.c,v 1.6 2006/01/10 21:09:55 rmsimpson Exp $
*/
#include "sqliteInt.h"
#ifndef SQLITE_OMIT_COMPLETE

/*
** This is defined in tokenize.c.  We just have to import the definition.
*/







|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
** An tokenizer for SQL
**
** This file contains C code that implements the sqlite3_complete() API.
** This code used to be part of the tokenizer.c source file.  But by
** separating it out, the code will be automatically omitted from
** static links that do not use it.
**
** $Id: complete.c,v 1.7 2006/01/11 03:22:29 rmsimpson Exp $
*/
#include "sqliteInt.h"
#ifndef SQLITE_OMIT_COMPLETE

/*
** This is defined in tokenize.c.  We just have to import the definition.
*/
Changes to SQLite.Interop/src/date.c.
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
** This file contains the C functions that implement date and time
** functions for SQLite.  
**
** There is only one exported symbol in this file - the function
** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: date.c,v 1.12 2006/01/10 21:09:55 rmsimpson Exp $
**
** NOTES:
**
** SQLite processes all times and dates as Julian Day numbers.  The
** dates and times are stored as the number of days since noon
** in Greenwich on November 24, 4714 B.C. according to the Gregorian
** calendar system.







|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
** This file contains the C functions that implement date and time
** functions for SQLite.  
**
** There is only one exported symbol in this file - the function
** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: date.c,v 1.13 2006/01/11 03:22:29 rmsimpson Exp $
**
** NOTES:
**
** SQLite processes all times and dates as Julian Day numbers.  The
** dates and times are stored as the number of days since noon
** in Greenwich on November 24, 4714 B.C. according to the Gregorian
** calendar system.
Changes to SQLite.Interop/src/delete.c.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains C code routines that are called by the parser
** in order to generate code for DELETE FROM statements.
**
** $Id: delete.c,v 1.12 2006/01/10 21:09:55 rmsimpson Exp $
*/
#include "sqliteInt.h"

/*
** Look up every table that is named in pSrc.  If any table is not found,
** add an error message to pParse->zErrMsg and return NULL.  If all tables
** are found, return a pointer to the last table.







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains C code routines that are called by the parser
** in order to generate code for DELETE FROM statements.
**
** $Id: delete.c,v 1.13 2006/01/11 03:22:29 rmsimpson Exp $
*/
#include "sqliteInt.h"

/*
** Look up every table that is named in pSrc.  If any table is not found,
** add an error message to pParse->zErrMsg and return NULL.  If all tables
** are found, return a pointer to the last table.
Changes to SQLite.Interop/src/experimental.c.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains C code routines that are not a part of the official
** SQLite API.  These routines are unsupported.
**
** $Id: experimental.c,v 1.2 2006/01/10 21:09:55 rmsimpson Exp $
*/
#include "sqliteInt.h"

/*
** Set all the parameters in the compiled SQL statement to NULL.
*/
int sqlite3_clear_bindings(sqlite3_stmt *pStmt){







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains C code routines that are not a part of the official
** SQLite API.  These routines are unsupported.
**
** $Id: experimental.c,v 1.3 2006/01/11 03:22:30 rmsimpson Exp $
*/
#include "sqliteInt.h"

/*
** Set all the parameters in the compiled SQL statement to NULL.
*/
int sqlite3_clear_bindings(sqlite3_stmt *pStmt){
Changes to SQLite.Interop/src/expr.c.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
** $Id: expr.c,v 1.19 2006/01/10 21:09:55 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>

/*
** Return the 'affinity' of the expression pExpr if any.
**







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
** $Id: expr.c,v 1.20 2006/01/11 03:22:29 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>

/*
** Return the 'affinity' of the expression pExpr if any.
**
Changes to SQLite.Interop/src/func.c.
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
** This file contains the C functions that implement various SQL
** functions of SQLite.  
**
** There is only one exported symbol in this file - the function
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: func.c,v 1.13 2006/01/10 21:09:55 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
/* #include <math.h> */
#include <stdlib.h>
#include <assert.h>
#include "vdbeInt.h"







|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
** This file contains the C functions that implement various SQL
** functions of SQLite.  
**
** There is only one exported symbol in this file - the function
** sqliteRegisterBuildinFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: func.c,v 1.14 2006/01/11 03:22:29 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
/* #include <math.h> */
#include <stdlib.h>
#include <assert.h>
#include "vdbeInt.h"
Changes to SQLite.Interop/src/hash.c.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This is the implementation of generic hash-tables
** used in SQLite.
**
** $Id: hash.c,v 1.12 2006/01/10 21:09:55 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include <assert.h>

/* Turn bulk memory into a hash table object by initializing the
** fields of the Hash structure.
**







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This is the implementation of generic hash-tables
** used in SQLite.
**
** $Id: hash.c,v 1.13 2006/01/11 03:22:29 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include <assert.h>

/* Turn bulk memory into a hash table object by initializing the
** fields of the Hash structure.
**
Changes to SQLite.Interop/src/hash.h.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This is the header file for the generic hash-table implemenation
** used in SQLite.
**
** $Id: hash.h,v 1.12 2006/01/10 21:09:55 rmsimpson Exp $
*/
#ifndef _SQLITE_HASH_H_
#define _SQLITE_HASH_H_

/* Forward declarations of structures. */
typedef struct Hash Hash;
typedef struct HashElem HashElem;







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This is the header file for the generic hash-table implemenation
** used in SQLite.
**
** $Id: hash.h,v 1.13 2006/01/11 03:22:29 rmsimpson Exp $
*/
#ifndef _SQLITE_HASH_H_
#define _SQLITE_HASH_H_

/* Forward declarations of structures. */
typedef struct Hash Hash;
typedef struct HashElem HashElem;
Changes to SQLite.Interop/src/insert.c.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains C code routines that are called by the parser
** to handle INSERT statements in SQLite.
**
** $Id: insert.c,v 1.12 2006/01/10 21:09:55 rmsimpson Exp $
*/
#include "sqliteInt.h"

/*
** Set P3 of the most recently inserted opcode to a column affinity
** string for index pIdx. A column affinity string has one character
** for each column in the table, according to the affinity of the column:







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains C code routines that are called by the parser
** to handle INSERT statements in SQLite.
**
** $Id: insert.c,v 1.13 2006/01/11 03:22:29 rmsimpson Exp $
*/
#include "sqliteInt.h"

/*
** Set P3 of the most recently inserted opcode to a column affinity
** string for index pIdx. A column affinity string has one character
** for each column in the table, according to the affinity of the column:
Changes to SQLite.Interop/src/keywordhash.h.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
    "CASECASTCOLLATECOLUMNCOMMITCONFLICTCONSTRAINTERSECTCREATECROSS"
    "CURRENT_DATECURRENT_TIMESTAMPLANDESCDETACHDISTINCTDROPRAGMATCH"
    "FAILIMITFROMFULLGROUPDATEIFIMMEDIATEINSERTINSTEADINTOFFSETISNULL"
    "JOINORDEREPLACEOUTERESTRICTPRIMARYQUERYRIGHTROLLBACKROWHENUNION"
    "UNIQUEUSINGVACUUMVALUESVIEWHERE";
  static const unsigned char aHash[127] = {
      92,  80, 107,  91,   0,   4,   0,   0, 114,   0,  83,   0,   0,
      96,  44,  76,  93,   0, 106, 109,  97,  90,   0,  10,   0,   0,
     113,   0, 110, 103,   0,  28,  48,   0,  41,   0,   0,  65,  71,
       0,  63,  19,   0, 105,  36, 104,   0, 108,  75,   0,   0,  33,
       0,  61,  37,   0,   8,   0, 115,  38,  12,   0,  77,  40,  25,
      66,   0,   0,  31,  81,  53,  30,  50,  20,  88,   0,  34,   0,
      74,  26,   0,  72,   0,   0,   0,  64,  47,  67,  22,  87,  29,
      69,  86,   0,   1,   0,   9, 101,  58,  18,   0, 112,  82,  99,
      55,   6,  85,   0,   0,  49,  94,   0, 102,   0,  70,   0,   0,
      15,   0, 116,  51,  56,   0,   2,  54,   0, 111,
  };
  static const unsigned char aNext[116] = {
       0,   0,   0,   0,   0,   3,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,  17,   0,   0,   0,   0,
       0,  11,   0,   0,   0,   0,   5,  13,   0,   7,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,  42,   0,   0,   0,   0,   0,
       0,  16,   0,   0,  23,  52,   0,   0,   0,   0,  45,   0,  59,
       0,   0,   0,   0,   0,   0,   0,   0,  43,  73,   0,  24,  60,
      21,   0,  79,   0,   0,  68,   0,   0,  84,  46,   0,   0,   0,
       0,   0,   0,   0,   0,  39,  95,  98,   0,   0, 100,   0,  32,
       0,  14,  27,  78,   0,  57,  89,   0,  35,   0,  62,   0,
  };
  static const unsigned char aLen[116] = {
       5,   5,   4,   4,   9,   2,   3,   8,   2,   6,   4,   3,   7,
      11,   2,   7,   5,   5,   4,   5,   3,   5,  10,   6,   4,   6,
       7,   6,   7,   9,   3,   7,   9,   6,   9,   3,  10,   6,   6,
       4,   6,   7,   3,   6,   7,   5,  13,   2,   2,   5,   5,   6,
       7,   7,   3,   4,   4,   2,   7,   3,   8,   6,   4,   4,   7,
       6,   6,   8,  10,   9,   6,   5,  12,  17,  12,   4,   4,   6,
       8,   2,   4,   6,   5,   4,   5,   4,   4,   5,   6,   2,   9,
       6,   7,   4,   6,   2,   3,   6,   4,   5,   7,   5,   8,   7,
       5,   5,   8,   3,   4,   5,   6,   5,   6,   6,   4,   5,
  };
  static const unsigned short int aOffset[116] = {
       0,   4,   7,  10,  10,  14,  19,  21,  26,  27,  32,  34,  36,
      42,  51,  52,  57,  61,  65,  67,  71,  74,  78,  86,  91,  94,
      99, 105, 108, 113, 118, 122, 128, 136, 141, 150, 152, 162, 167,
     172, 175, 177, 177, 181, 185, 187, 192, 194, 196, 205, 208, 212,







|

|


|

|
|





|
|
|

|






|
|
|

|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
    "CASECASTCOLLATECOLUMNCOMMITCONFLICTCONSTRAINTERSECTCREATECROSS"
    "CURRENT_DATECURRENT_TIMESTAMPLANDESCDETACHDISTINCTDROPRAGMATCH"
    "FAILIMITFROMFULLGROUPDATEIFIMMEDIATEINSERTINSTEADINTOFFSETISNULL"
    "JOINORDEREPLACEOUTERESTRICTPRIMARYQUERYRIGHTROLLBACKROWHENUNION"
    "UNIQUEUSINGVACUUMVALUESVIEWHERE";
  static const unsigned char aHash[127] = {
      92,  80, 107,  91,   0,   4,   0,   0, 114,   0,  83,   0,   0,
      95,  44,  76,  93,   0, 106, 109,  97,  90,   0,  10,   0,   0,
     113,   0, 110, 103,   0,  28,  48,   0,  41,   0,   0,  65,  71,
       0,  63,  19,   0, 105,  36, 104,   0, 108,  74,   0,   0,  33,
       0,  61,  37,   0,   8,   0, 115,  38,  12,   0,  77,  40,  25,
      66,   0,   0,  31,  81,  53,  30,  50,  20,  88,   0,  34,   0,
      75,  26,   0,  72,   0,   0,   0,  64,  47,  67,  22,  87,  29,
      69,  86,   0,   1,   0,   9, 101,  58,  18,   0, 112,  82,  99,
      54,   6,  85,   0,   0,  49,  94,   0, 102,   0,  70,   0,   0,
      15,   0, 116,  51,  56,   0,   2,  55,   0, 111,
  };
  static const unsigned char aNext[116] = {
       0,   0,   0,   0,   0,   3,   0,   0,   0,   0,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,   0,  17,   0,   0,   0,   0,
       0,  11,   0,   0,   0,   0,   5,  13,   0,   7,   0,   0,   0,
       0,   0,   0,   0,   0,   0,   0,  43,   0,   0,   0,   0,   0,
       0,   0,  16,   0,  23,  52,   0,   0,   0,   0,  45,   0,  59,
       0,   0,   0,   0,   0,   0,   0,   0,  73,  42,   0,  24,  60,
      21,   0,  79,   0,   0,  68,   0,   0,  84,  46,   0,   0,   0,
       0,   0,   0,   0,   0,  39,  96,  98,   0,   0, 100,   0,  32,
       0,  14,  27,  78,   0,  57,  89,   0,  35,   0,  62,   0,
  };
  static const unsigned char aLen[116] = {
       5,   5,   4,   4,   9,   2,   3,   8,   2,   6,   4,   3,   7,
      11,   2,   7,   5,   5,   4,   5,   3,   5,  10,   6,   4,   6,
       7,   6,   7,   9,   3,   7,   9,   6,   9,   3,  10,   6,   6,
       4,   6,   3,   7,   6,   7,   5,  13,   2,   2,   5,   5,   6,
       7,   3,   7,   4,   4,   2,   7,   3,   8,   6,   4,   4,   7,
       6,   6,   8,  10,   9,   6,   5,  12,  12,  17,   4,   4,   6,
       8,   2,   4,   6,   5,   4,   5,   4,   4,   5,   6,   2,   9,
       6,   7,   4,   2,   6,   3,   6,   4,   5,   7,   5,   8,   7,
       5,   5,   8,   3,   4,   5,   6,   5,   6,   6,   4,   5,
  };
  static const unsigned short int aOffset[116] = {
       0,   4,   7,  10,  10,  14,  19,  21,  26,  27,  32,  34,  36,
      42,  51,  52,  57,  61,  65,  67,  71,  74,  78,  86,  91,  94,
      99, 105, 108, 113, 118, 122, 128, 136, 141, 150, 152, 162, 167,
     172, 175, 177, 177, 181, 185, 187, 192, 194, 196, 205, 208, 212,
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
    TK_OR,         TK_ADD,        TK_DATABASE,   TK_AS,         TK_SELECT,     
    TK_THEN,       TK_END,        TK_DEFAULT,    TK_TRANSACTION,TK_ON,         
    TK_JOIN_KW,    TK_ALTER,      TK_RAISE,      TK_EACH,       TK_CHECK,      
    TK_KEY,        TK_AFTER,      TK_REFERENCES, TK_ESCAPE,     TK_ELSE,       
    TK_EXCEPT,     TK_TRIGGER,    TK_LIKE_KW,    TK_EXPLAIN,    TK_INITIALLY,  
    TK_ALL,        TK_ANALYZE,    TK_EXCLUSIVE,  TK_EXISTS,     TK_STATEMENT,  
    TK_AND,        TK_DEFERRABLE, TK_ATTACH,     TK_HAVING,     TK_LIKE_KW,    
    TK_BEFORE,     TK_FOREIGN,    TK_FOR,        TK_IGNORE,     TK_REINDEX,    
    TK_INDEX,      TK_AUTOINCR,   TK_TO,         TK_IN,         TK_BEGIN,      
    TK_JOIN_KW,    TK_RENAME,     TK_BETWEEN,    TK_NOTNULL,    TK_NOT,        
    TK_NULL,       TK_LIKE_KW,    TK_BY,         TK_CASCADE,    TK_ASC,        
    TK_DEFERRED,   TK_DELETE,     TK_CASE,       TK_CAST,       TK_COLLATE,    
    TK_COLUMNKW,   TK_COMMIT,     TK_CONFLICT,   TK_CONSTRAINT, TK_INTERSECT,  
    TK_CREATE,     TK_JOIN_KW,    TK_CTIME_KW,   TK_CTIME_KW,   TK_CTIME_KW,   
    TK_PLAN,       TK_DESC,       TK_DETACH,     TK_DISTINCT,   TK_IS,         
    TK_DROP,       TK_PRAGMA,     TK_MATCH,      TK_FAIL,       TK_LIMIT,      
    TK_FROM,       TK_JOIN_KW,    TK_GROUP,      TK_UPDATE,     TK_IF,         
    TK_IMMEDIATE,  TK_INSERT,     TK_INSTEAD,    TK_INTO,       TK_OFFSET,     
    TK_OF,         TK_SET,        TK_ISNULL,     TK_JOIN,       TK_ORDER,      
    TK_REPLACE,    TK_JOIN_KW,    TK_RESTRICT,   TK_PRIMARY,    TK_QUERY,      
    TK_JOIN_KW,    TK_ROLLBACK,   TK_ROW,        TK_WHEN,       TK_UNION,      
    TK_UNIQUE,     TK_USING,      TK_VACUUM,     TK_VALUES,     TK_VIEW,       
    TK_WHERE,      
  };
  int h, i;
  if( n<2 ) return TK_ID;







|

|







|
|







60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
    TK_OR,         TK_ADD,        TK_DATABASE,   TK_AS,         TK_SELECT,     
    TK_THEN,       TK_END,        TK_DEFAULT,    TK_TRANSACTION,TK_ON,         
    TK_JOIN_KW,    TK_ALTER,      TK_RAISE,      TK_EACH,       TK_CHECK,      
    TK_KEY,        TK_AFTER,      TK_REFERENCES, TK_ESCAPE,     TK_ELSE,       
    TK_EXCEPT,     TK_TRIGGER,    TK_LIKE_KW,    TK_EXPLAIN,    TK_INITIALLY,  
    TK_ALL,        TK_ANALYZE,    TK_EXCLUSIVE,  TK_EXISTS,     TK_STATEMENT,  
    TK_AND,        TK_DEFERRABLE, TK_ATTACH,     TK_HAVING,     TK_LIKE_KW,    
    TK_BEFORE,     TK_FOR,        TK_FOREIGN,    TK_IGNORE,     TK_REINDEX,    
    TK_INDEX,      TK_AUTOINCR,   TK_TO,         TK_IN,         TK_BEGIN,      
    TK_JOIN_KW,    TK_RENAME,     TK_BETWEEN,    TK_NOT,        TK_NOTNULL,    
    TK_NULL,       TK_LIKE_KW,    TK_BY,         TK_CASCADE,    TK_ASC,        
    TK_DEFERRED,   TK_DELETE,     TK_CASE,       TK_CAST,       TK_COLLATE,    
    TK_COLUMNKW,   TK_COMMIT,     TK_CONFLICT,   TK_CONSTRAINT, TK_INTERSECT,  
    TK_CREATE,     TK_JOIN_KW,    TK_CTIME_KW,   TK_CTIME_KW,   TK_CTIME_KW,   
    TK_PLAN,       TK_DESC,       TK_DETACH,     TK_DISTINCT,   TK_IS,         
    TK_DROP,       TK_PRAGMA,     TK_MATCH,      TK_FAIL,       TK_LIMIT,      
    TK_FROM,       TK_JOIN_KW,    TK_GROUP,      TK_UPDATE,     TK_IF,         
    TK_IMMEDIATE,  TK_INSERT,     TK_INSTEAD,    TK_INTO,       TK_OF,         
    TK_OFFSET,     TK_SET,        TK_ISNULL,     TK_JOIN,       TK_ORDER,      
    TK_REPLACE,    TK_JOIN_KW,    TK_RESTRICT,   TK_PRIMARY,    TK_QUERY,      
    TK_JOIN_KW,    TK_ROLLBACK,   TK_ROW,        TK_WHEN,       TK_UNION,      
    TK_UNIQUE,     TK_USING,      TK_VACUUM,     TK_VALUES,     TK_VIEW,       
    TK_WHERE,      
  };
  int h, i;
  if( n<2 ) return TK_ID;
Changes to SQLite.Interop/src/legacy.c.
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
**
*************************************************************************
** Main file for the SQLite library.  The routines in this file
** implement the programmer interface to the library.  Routines in
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: legacy.c,v 1.12 2006/01/10 21:10:18 rmsimpson Exp $
*/

#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>

/*







|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
**
*************************************************************************
** Main file for the SQLite library.  The routines in this file
** implement the programmer interface to the library.  Routines in
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: legacy.c,v 1.13 2006/01/11 03:22:29 rmsimpson Exp $
*/

#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>

/*
Changes to SQLite.Interop/src/main.c.
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
**
*************************************************************************
** Main file for the SQLite library.  The routines in this file
** implement the programmer interface to the library.  Routines in
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.12 2006/01/10 21:10:18 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>

/*
** The following constant value is used by the SQLITE_BIGENDIAN and







|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
**
*************************************************************************
** Main file for the SQLite library.  The routines in this file
** implement the programmer interface to the library.  Routines in
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.13 2006/01/11 03:22:29 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>

/*
** The following constant value is used by the SQLITE_BIGENDIAN and
Changes to SQLite.Interop/src/opcodes.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80


81
82
83








84











85


86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134


135
136
137
138
139
140
141
142
143
144
145





146
147
/* Automatically generated.  Do not edit */
/* See the mkopcodec.awk script for details. */
#if !defined(SQLITE_OMIT_EXPLAIN) || !defined(NDEBUG) || defined(VDBE_PROFILE) || defined(SQLITE_DEBUG)
const char *const sqlite3OpcodeNames[] = { "?",
 /*   1 */ "MemLoad",
 /* 125 */ "HexBlob",
 /*   2 */ "Column",
 /*   3 */ "SetCookie",
 /*   4 */ "IfMemPos",
 /* 124 */ "Real",
 /*   5 */ "Sequence",
 /*   6 */ "MoveGt",
 /*  71 */ "Ge",
 /*   7 */ "RowKey",
 /*  67 */ "Eq",
 /*   8 */ "OpenWrite",
 /*  65 */ "NotNull",
 /*   9 */ "If",
 /* 140 */ "ToInt",
 /*  86 */ "String8",
 /*  10 */ "Pop",
 /*  11 */ "CollSeq",
 /*  12 */ "OpenRead",
 /*  13 */ "Expire",
 /*  14 */ "AutoCommit",
 /*  68 */ "Gt",
 /*  15 */ "IntegrityCk",

 /*  17 */ "Sort",
 /*  18 */ "Function",
 /*  60 */ "And",
 /*  78 */ "Subtract",
 /*  19 */ "Noop",
 /*  20 */ "Return",
 /*  81 */ "Remainder",
 /*  21 */ "NewRowid",
 /*  79 */ "Multiply",
 /*  22 */ "IfMemNeg",
 /*  23 */ "Variable",
 /*  24 */ "String",
 /*  25 */ "RealAffinity",
 /*  26 */ "ParseSchema",
 /*  27 */ "Close",
 /*  28 */ "CreateIndex",
 /*  29 */ "IsUnique",
 /*  30 */ "IdxIsNull",
 /*  31 */ "NotFound",
 /*  32 */ "Int64",
 /*  33 */ "MustBeInt",
 /*  34 */ "Halt",
 /*  35 */ "Rowid",
 /*  36 */ "IdxLT",
 /*  37 */ "AddImm",
 /*  38 */ "Statement",
 /*  39 */ "RowData",
 /*  40 */ "MemMax",
 /*  41 */ "Push",
 /*  59 */ "Or",
 /*  42 */ "NotExists",
 /*  43 */ "MemIncr",
 /*  44 */ "Gosub",
 /*  80 */ "Divide",
 /*  45 */ "Integer",
 /* 139 */ "ToNumeric",
 /*  46 */ "MemInt",
 /*  47 */ "Prev",
 /*  82 */ "Concat",
 /*  73 */ "BitAnd",
 /*  48 */ "CreateTable",
 /*  49 */ "Last",
 /*  64 */ "IsNull",
 /*  50 */ "IdxRowid",
 /*  51 */ "MakeIdxRec",
 /*  76 */ "ShiftRight",
 /*  52 */ "ResetCount",
 /*  53 */ "FifoWrite",
 /*  54 */ "Callback",
 /*  55 */ "ContextPush",
 /*  56 */ "DropTrigger",
 /*  57 */ "DropIndex",
 /*  58 */ "IdxGE",


 /*  61 */ "IdxDelete",
 /*  62 */ "Vacuum",
 /*  63 */ "MoveLe",








 /*  72 */ "IfNot",











 /*  84 */ "DropTable",


 /*  87 */ "MakeRecord",
 /* 138 */ "ToBlob",
 /*  88 */ "Delete",
 /*  89 */ "AggFinal",
 /*  75 */ "ShiftLeft",
 /*  90 */ "Dup",
 /*  91 */ "Goto",
 /*  92 */ "TableLock",
 /*  93 */ "FifoRead",
 /*  94 */ "Clear",
 /*  95 */ "IdxGT",
 /*  96 */ "MoveLt",
 /*  69 */ "Le",
 /*  97 */ "VerifyCookie",
 /*  98 */ "AggStep",
 /*  99 */ "Pull",
 /* 137 */ "ToText",
 /*  16 */ "Not",
 /* 141 */ "ToReal",
 /* 100 */ "SetNumColumns",
 /* 101 */ "AbsValue",
 /* 102 */ "Transaction",
 /*  83 */ "Negative",
 /*  66 */ "Ne",
 /* 103 */ "ContextPop",
 /*  74 */ "BitOr",
 /* 104 */ "Next",
 /* 105 */ "IdxInsert",
 /* 106 */ "Distinct",
 /*  70 */ "Lt",
 /* 107 */ "Insert",
 /* 108 */ "Destroy",
 /* 109 */ "ReadCookie",
 /* 110 */ "ForceInt",
 /* 111 */ "LoadAnalysis",
 /* 112 */ "OpenVirtual",
 /* 113 */ "Explain",
 /* 114 */ "IfMemZero",
 /* 115 */ "OpenPseudo",
 /* 116 */ "Null",
 /* 117 */ "Blob",
 /*  77 */ "Add",
 /* 118 */ "MemStore",
 /* 119 */ "Rewind",
 /* 120 */ "MoveGe",
 /*  85 */ "BitNot",
 /* 121 */ "MemMove",
 /* 122 */ "MemNull",
 /* 123 */ "Found",


 /* 126 */ "NullRow",
 /* 127 */ "NotUsed_127",
 /* 128 */ "NotUsed_128",
 /* 129 */ "NotUsed_129",
 /* 130 */ "NotUsed_130",
 /* 131 */ "NotUsed_131",
 /* 132 */ "NotUsed_132",
 /* 133 */ "NotUsed_133",
 /* 134 */ "NotUsed_134",
 /* 135 */ "NotUsed_135",
 /* 136 */ "NotUsed_136",





};
#endif





<



<


<

<

<

<
<





<

>


<
<


<

<




















<



<

<


<
<


<


<







>
>



>
>
>
>
>
>
>
>

>
>
>
>
>
>
>
>
>
>
>

>
>

<


<







<



<
<
<



<
<

<



<











<



<



>
>











>
>
>
>
>


1
2
3
4
5

6
7
8

9
10

11

12

13


14
15
16
17
18

19
20
21
22


23
24

25

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

46
47
48

49

50
51


52
53

54
55

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91

92
93

94
95
96
97
98
99
100

101
102
103



104
105
106


107

108
109
110

111
112
113
114
115
116
117
118
119
120
121

122
123
124

125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
/* Automatically generated.  Do not edit */
/* See the mkopcodec.awk script for details. */
#if !defined(SQLITE_OMIT_EXPLAIN) || !defined(NDEBUG) || defined(VDBE_PROFILE) || defined(SQLITE_DEBUG)
const char *const sqlite3OpcodeNames[] = { "?",
 /*   1 */ "MemLoad",

 /*   2 */ "Column",
 /*   3 */ "SetCookie",
 /*   4 */ "IfMemPos",

 /*   5 */ "Sequence",
 /*   6 */ "MoveGt",

 /*   7 */ "RowKey",

 /*   8 */ "OpenWrite",

 /*   9 */ "If",


 /*  10 */ "Pop",
 /*  11 */ "CollSeq",
 /*  12 */ "OpenRead",
 /*  13 */ "Expire",
 /*  14 */ "AutoCommit",

 /*  15 */ "IntegrityCk",
 /*  16 */ "Not",
 /*  17 */ "Sort",
 /*  18 */ "Function",


 /*  19 */ "Noop",
 /*  20 */ "Return",

 /*  21 */ "NewRowid",

 /*  22 */ "IfMemNeg",
 /*  23 */ "Variable",
 /*  24 */ "String",
 /*  25 */ "RealAffinity",
 /*  26 */ "ParseSchema",
 /*  27 */ "Close",
 /*  28 */ "CreateIndex",
 /*  29 */ "IsUnique",
 /*  30 */ "IdxIsNull",
 /*  31 */ "NotFound",
 /*  32 */ "Int64",
 /*  33 */ "MustBeInt",
 /*  34 */ "Halt",
 /*  35 */ "Rowid",
 /*  36 */ "IdxLT",
 /*  37 */ "AddImm",
 /*  38 */ "Statement",
 /*  39 */ "RowData",
 /*  40 */ "MemMax",
 /*  41 */ "Push",

 /*  42 */ "NotExists",
 /*  43 */ "MemIncr",
 /*  44 */ "Gosub",

 /*  45 */ "Integer",

 /*  46 */ "MemInt",
 /*  47 */ "Prev",


 /*  48 */ "CreateTable",
 /*  49 */ "Last",

 /*  50 */ "IdxRowid",
 /*  51 */ "MakeIdxRec",

 /*  52 */ "ResetCount",
 /*  53 */ "FifoWrite",
 /*  54 */ "Callback",
 /*  55 */ "ContextPush",
 /*  56 */ "DropTrigger",
 /*  57 */ "DropIndex",
 /*  58 */ "IdxGE",
 /*  59 */ "Or",
 /*  60 */ "And",
 /*  61 */ "IdxDelete",
 /*  62 */ "Vacuum",
 /*  63 */ "MoveLe",
 /*  64 */ "IsNull",
 /*  65 */ "NotNull",
 /*  66 */ "Ne",
 /*  67 */ "Eq",
 /*  68 */ "Gt",
 /*  69 */ "Le",
 /*  70 */ "Lt",
 /*  71 */ "Ge",
 /*  72 */ "IfNot",
 /*  73 */ "BitAnd",
 /*  74 */ "BitOr",
 /*  75 */ "ShiftLeft",
 /*  76 */ "ShiftRight",
 /*  77 */ "Add",
 /*  78 */ "Subtract",
 /*  79 */ "Multiply",
 /*  80 */ "Divide",
 /*  81 */ "Remainder",
 /*  82 */ "Concat",
 /*  83 */ "Negative",
 /*  84 */ "DropTable",
 /*  85 */ "BitNot",
 /*  86 */ "String8",
 /*  87 */ "MakeRecord",

 /*  88 */ "Delete",
 /*  89 */ "AggFinal",

 /*  90 */ "Dup",
 /*  91 */ "Goto",
 /*  92 */ "TableLock",
 /*  93 */ "FifoRead",
 /*  94 */ "Clear",
 /*  95 */ "IdxGT",
 /*  96 */ "MoveLt",

 /*  97 */ "VerifyCookie",
 /*  98 */ "AggStep",
 /*  99 */ "Pull",



 /* 100 */ "SetNumColumns",
 /* 101 */ "AbsValue",
 /* 102 */ "Transaction",


 /* 103 */ "ContextPop",

 /* 104 */ "Next",
 /* 105 */ "IdxInsert",
 /* 106 */ "Distinct",

 /* 107 */ "Insert",
 /* 108 */ "Destroy",
 /* 109 */ "ReadCookie",
 /* 110 */ "ForceInt",
 /* 111 */ "LoadAnalysis",
 /* 112 */ "OpenVirtual",
 /* 113 */ "Explain",
 /* 114 */ "IfMemZero",
 /* 115 */ "OpenPseudo",
 /* 116 */ "Null",
 /* 117 */ "Blob",

 /* 118 */ "MemStore",
 /* 119 */ "Rewind",
 /* 120 */ "MoveGe",

 /* 121 */ "MemMove",
 /* 122 */ "MemNull",
 /* 123 */ "Found",
 /* 124 */ "Real",
 /* 125 */ "HexBlob",
 /* 126 */ "NullRow",
 /* 127 */ "NotUsed_127",
 /* 128 */ "NotUsed_128",
 /* 129 */ "NotUsed_129",
 /* 130 */ "NotUsed_130",
 /* 131 */ "NotUsed_131",
 /* 132 */ "NotUsed_132",
 /* 133 */ "NotUsed_133",
 /* 134 */ "NotUsed_134",
 /* 135 */ "NotUsed_135",
 /* 136 */ "NotUsed_136",
 /* 137 */ "ToText",
 /* 138 */ "ToBlob",
 /* 139 */ "ToNumeric",
 /* 140 */ "ToInt",
 /* 141 */ "ToReal",
};
#endif
Changes to SQLite.Interop/src/os_win.c.
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
  WCHAR *pszName = utf8ToUnicode(pszFilename);
  BOOL bInit = TRUE;

  /* Initialize the local lockdata */
  ZeroMemory(&pLocks->local, sizeof(LOCKDATA));

  /* Create a unique global name for the mutex and subsequently the shared memory */
  _wcslwr(pszName);
  while (pszTok = wcschr(pszName, '\\'))
  {
    *pszTok = '_';
  }

  /* Create/open the named mutex */
  pLocks->hMutex = CreateMutexW(NULL, FALSE, pszName);
  if (!pLocks->hMutex)
  {
    sqliteFree(pszName);
    return FALSE;
  }

  /* Acquire the mutex before continuing */
  MUTEX_ACQUIRE(pLocks->hMutex);
  
  /* Create/open the shared memory */
  _wcsupr(pszName);
  pLocks->hShared = CreateFileMappingW(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(LOCKDATA), pszName);  

  /* Set a flag that indicates we're the first to create the memory so it must be zero-initialized */
  if (GetLastError() == ERROR_ALREADY_EXISTS)
  {
    bInit = FALSE;
  }







|

















|







240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
  WCHAR *pszName = utf8ToUnicode(pszFilename);
  BOOL bInit = TRUE;

  /* Initialize the local lockdata */
  ZeroMemory(&pLocks->local, sizeof(LOCKDATA));

  /* Create a unique global name for the mutex and subsequently the shared memory */
  CharLowerW(pszName);
  while (pszTok = wcschr(pszName, '\\'))
  {
    *pszTok = '_';
  }

  /* Create/open the named mutex */
  pLocks->hMutex = CreateMutexW(NULL, FALSE, pszName);
  if (!pLocks->hMutex)
  {
    sqliteFree(pszName);
    return FALSE;
  }

  /* Acquire the mutex before continuing */
  MUTEX_ACQUIRE(pLocks->hMutex);
  
  /* Create/open the shared memory */
  CharUpperW(pszName);
  pLocks->hShared = CreateFileMappingW(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(LOCKDATA), pszName);  

  /* Set a flag that indicates we're the first to create the memory so it must be zero-initialized */
  if (GetLastError() == ERROR_ALREADY_EXISTS)
  {
    bInit = FALSE;
  }
Changes to SQLite.Interop/src/pager.c.
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
** 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.13 2006/01/10 21:10:18 rmsimpson Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
#include "os.h"
#include "pager.h"
#include <assert.h>
#include <string.h>







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
** 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.14 2006/01/11 03:22:29 rmsimpson Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
#include "os.h"
#include "pager.h"
#include <assert.h>
#include <string.h>
438
439
440
441
442
443
444










445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
    unsigned char ac[4];
    memcpy(ac, &res, 4);
    res = (ac[0]<<24) | (ac[1]<<16) | (ac[2]<<8) | ac[3];
  }
  *pRes = res;
  return rc;
}











/*
** Write a 32-bit integer into the given file descriptor.  Return SQLITE_OK
** on success or an error code is something goes wrong.
*/
static int write32bits(OsFile *fd, u32 val){
  unsigned char ac[4];
  ac[0] = (val>>24) & 0xff;
  ac[1] = (val>>16) & 0xff;
  ac[2] = (val>>8) & 0xff;
  ac[3] = val & 0xff;
  return sqlite3OsWrite(fd, ac, 4);
}

/*
** Write the 32-bit integer 'val' into the page identified by page header
** 'p' at offset 'offset'.
*/
static void store32bits(u32 val, PgHdr *p, int offset){
  unsigned char *ac;
  ac = &((unsigned char*)PGHDR_TO_DATA(p))[offset];
  ac[0] = (val>>24) & 0xff;
  ac[1] = (val>>16) & 0xff;
  ac[2] = (val>>8) & 0xff;
  ac[3] = val & 0xff;
}

/*
** Read a 32-bit integer at offset 'offset' from the page identified by
** page header 'p'.
*/
static u32 retrieve32bits(PgHdr *p, int offset){







>
>
>
>
>
>
>
>
>
>







<
<
<
|










<
<
<
|







438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461



462
463
464
465
466
467
468
469
470
471
472



473
474
475
476
477
478
479
480
    unsigned char ac[4];
    memcpy(ac, &res, 4);
    res = (ac[0]<<24) | (ac[1]<<16) | (ac[2]<<8) | ac[3];
  }
  *pRes = res;
  return rc;
}

/*
** Write a 32-bit integer into a string buffer in big-endian byte order.
*/
static void put32bits(char *ac, u32 val){
  ac[0] = (val>>24) & 0xff;
  ac[1] = (val>>16) & 0xff;
  ac[2] = (val>>8) & 0xff;
  ac[3] = val & 0xff;
}

/*
** Write a 32-bit integer into the given file descriptor.  Return SQLITE_OK
** on success or an error code is something goes wrong.
*/
static int write32bits(OsFile *fd, u32 val){
  unsigned char ac[4];



  put32bits(ac, val);
  return sqlite3OsWrite(fd, ac, 4);
}

/*
** Write the 32-bit integer 'val' into the page identified by page header
** 'p' at offset 'offset'.
*/
static void store32bits(u32 val, PgHdr *p, int offset){
  unsigned char *ac;
  ac = &((unsigned char*)PGHDR_TO_DATA(p))[offset];



  put32bits(ac, val);
}

/*
** Read a 32-bit integer at offset 'offset' from the page identified by
** page header 'p'.
*/
static u32 retrieve32bits(PgHdr *p, int offset){
652
653
654
655
656
657
658

659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695

696
697
698
699
700
701
702
** - 4 bytes: Random number used for page hash.
** - 4 bytes: Initial database page count.
** - 4 bytes: Sector size used by the process that wrote this journal.
** 
** Followed by (JOURNAL_HDR_SZ - 24) bytes of unused space.
*/
static int writeJournalHdr(Pager *pPager){


  int rc = seekJournalHdr(pPager);
  if( rc ) return rc;

  pPager->journalHdr = pPager->journalOff;
  if( pPager->stmtHdrOff==0 ){
    pPager->stmtHdrOff = pPager->journalHdr;
  }
  pPager->journalOff += JOURNAL_HDR_SZ(pPager);

  /* FIX ME: 
  **
  ** Possibly for a pager not in no-sync mode, the journal magic should not
  ** be written until nRec is filled in as part of next syncJournal(). 
  **
  ** Actually maybe the whole journal header should be delayed until that
  ** point. Think about this.
  */
  rc = sqlite3OsWrite(pPager->jfd, aJournalMagic, sizeof(aJournalMagic));

  if( rc==SQLITE_OK ){
    /* The nRec Field. 0xFFFFFFFF for no-sync journals. */
    rc = write32bits(pPager->jfd, pPager->noSync ? 0xffffffff : 0);
  }
  if( rc==SQLITE_OK ){
    /* The random check-hash initialiser */ 
    sqlite3Randomness(sizeof(pPager->cksumInit), &pPager->cksumInit);
    rc = write32bits(pPager->jfd, pPager->cksumInit);
  }
  if( rc==SQLITE_OK ){
    /* The initial database size */
    rc = write32bits(pPager->jfd, pPager->dbSize);
  }
  if( rc==SQLITE_OK ){
    /* The assumed sector size for this process */
    rc = write32bits(pPager->jfd, pPager->sectorSize);
  }


  /* The journal header has been written successfully. Seek the journal
  ** file descriptor to the end of the journal header sector.
  */
  if( rc==SQLITE_OK ){
    rc = sqlite3OsSeek(pPager->jfd, pPager->journalOff-1);
    if( rc==SQLITE_OK ){







>


















|
<
<

|
<
<


|
<
<

|
<
<

|
<
>







656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682


683
684


685
686
687


688
689


690
691

692
693
694
695
696
697
698
699
** - 4 bytes: Random number used for page hash.
** - 4 bytes: Initial database page count.
** - 4 bytes: Sector size used by the process that wrote this journal.
** 
** Followed by (JOURNAL_HDR_SZ - 24) bytes of unused space.
*/
static int writeJournalHdr(Pager *pPager){
  char zHeader[sizeof(aJournalMagic)+16];

  int rc = seekJournalHdr(pPager);
  if( rc ) return rc;

  pPager->journalHdr = pPager->journalOff;
  if( pPager->stmtHdrOff==0 ){
    pPager->stmtHdrOff = pPager->journalHdr;
  }
  pPager->journalOff += JOURNAL_HDR_SZ(pPager);

  /* FIX ME: 
  **
  ** Possibly for a pager not in no-sync mode, the journal magic should not
  ** be written until nRec is filled in as part of next syncJournal(). 
  **
  ** Actually maybe the whole journal header should be delayed until that
  ** point. Think about this.
  */
  memcpy(zHeader, aJournalMagic, sizeof(aJournalMagic));


    /* The nRec Field. 0xFFFFFFFF for no-sync journals. */
  put32bits(&zHeader[sizeof(aJournalMagic)], pPager->noSync ? 0xffffffff : 0);


    /* The random check-hash initialiser */ 
    sqlite3Randomness(sizeof(pPager->cksumInit), &pPager->cksumInit);
  put32bits(&zHeader[sizeof(aJournalMagic)+4], pPager->cksumInit);


    /* The initial database size */
  put32bits(&zHeader[sizeof(aJournalMagic)+8], pPager->dbSize);


    /* The assumed sector size for this process */
  put32bits(&zHeader[sizeof(aJournalMagic)+12], pPager->sectorSize);

  rc = sqlite3OsWrite(pPager->jfd, zHeader, sizeof(zHeader));

  /* The journal header has been written successfully. Seek the journal
  ** file descriptor to the end of the journal header sector.
  */
  if( rc==SQLITE_OK ){
    rc = sqlite3OsSeek(pPager->jfd, pPager->journalOff-1);
    if( rc==SQLITE_OK ){
789
790
791
792
793
794
795

796
797
798
799
800
801
802
** this call is a no-op.
*/
static int writeMasterJournal(Pager *pPager, const char *zMaster){
  int rc;
  int len; 
  int i; 
  u32 cksum = 0; 


  if( !zMaster || pPager->setMaster) return SQLITE_OK;
  pPager->setMaster = 1;

  len = strlen(zMaster);
  for(i=0; i<len; i++){
    cksum += zMaster[i];







>







786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
** this call is a no-op.
*/
static int writeMasterJournal(Pager *pPager, const char *zMaster){
  int rc;
  int len; 
  int i; 
  u32 cksum = 0; 
  char zBuf[sizeof(aJournalMagic)+2*4];

  if( !zMaster || pPager->setMaster) return SQLITE_OK;
  pPager->setMaster = 1;

  len = strlen(zMaster);
  for(i=0; i<len; i++){
    cksum += zMaster[i];
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834

  rc = write32bits(pPager->jfd, PAGER_MJ_PGNO(pPager));
  if( rc!=SQLITE_OK ) return rc;

  rc = sqlite3OsWrite(pPager->jfd, zMaster, len);
  if( rc!=SQLITE_OK ) return rc;

  rc = write32bits(pPager->jfd, len);
  if( rc!=SQLITE_OK ) return rc;

  rc = write32bits(pPager->jfd, cksum);
  if( rc!=SQLITE_OK ) return rc;

  rc = sqlite3OsWrite(pPager->jfd, aJournalMagic, sizeof(aJournalMagic));
  pPager->needSync = !pPager->noSync;
  return rc;
}

/*
** Add or remove a page from the list of all pages that are in the
** statement journal.







<
<
|
|
<
|
|







812
813
814
815
816
817
818


819
820

821
822
823
824
825
826
827
828
829

  rc = write32bits(pPager->jfd, PAGER_MJ_PGNO(pPager));
  if( rc!=SQLITE_OK ) return rc;

  rc = sqlite3OsWrite(pPager->jfd, zMaster, len);
  if( rc!=SQLITE_OK ) return rc;



  put32bits(zBuf, len);
  put32bits(&zBuf[4], cksum);

  memcpy(&zBuf[8], aJournalMagic, sizeof(aJournalMagic));
  rc = sqlite3OsWrite(pPager->jfd, zBuf, 8+sizeof(aJournalMagic));
  pPager->needSync = !pPager->noSync;
  return rc;
}

/*
** Add or remove a page from the list of all pages that are in the
** statement journal.
Changes to SQLite.Interop/src/pager.h.
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This header file defines the interface that the sqlite page cache
** subsystem.  The page cache subsystem reads and writes a file a page
** at a time and provides a journal for rollback.
**
** @(#) $Id: pager.h,v 1.13 2006/01/10 21:10:18 rmsimpson Exp $
*/

#ifndef _PAGER_H_
#define _PAGER_H_

/*
** The default size of a database page.







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This header file defines the interface that the sqlite page cache
** subsystem.  The page cache subsystem reads and writes a file a page
** at a time and provides a journal for rollback.
**
** @(#) $Id: pager.h,v 1.14 2006/01/11 03:22:29 rmsimpson Exp $
*/

#ifndef _PAGER_H_
#define _PAGER_H_

/*
** The default size of a database page.
Changes to SQLite.Interop/src/parse.c.
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359

360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
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
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523

524
525
526
527
528
529
530

531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
**  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 */   281,   67,  344,   80,  150,  157,  225,  517,   92,   92,
 /*    10 */    92,   92,  288,   59,   59,   59,   59,   58,   58,   57,
 /*    20 */    57,   57,   65,  346,  478,   48,  544,   86,   59,   59,
 /*    30 */    59,   59,   58,   58,   57,   57,   57,   65,   67,  481,
 /*    40 */    80,  150,  231,   64,   88,  295,  525,  518,  530,  530,
 /*    50 */    72,   72,   92,   92,   92,   92,  219,   59,   59,   59,
 /*    60 */    59,   58,   58,   57,   57,   57,   65,  281,  252,  189,
 /*    70 */   517,  296,  344,   81,   59,   59,   59,   59,   58,   58,
 /*    80 */    57,   57,   57,   65,  166,  115,  246,  303,  264,  323,
 /*    90 */   196,  236,  158,  544,  478,   49,  387,   69,  228,  857,
 /*   100 */   128,  560,  247,   56,    2,  381,   22,  476,  456,  363,
 /*   110 */    64,   88,  295,  525,  518,  530,  530,   72,   72,   92,
 /*   120 */    92,   92,   92,  283,   59,   59,   59,   59,   58,   58,
 /*   130 */    57,   57,   57,   65,  281,  344,  279,  386,  395,  553,
 /*   140 */   388,  165,  386,  276,  361,  288,  223,  439,  520,  451,
 /*   150 */   344,   58,   58,   57,   57,   57,   65,  478,   38,  365,
 /*   160 */   544,  145,  143,  282,   67,  393,   80,  150,  451,  500,
 /*   170 */   393,  189,  478,   36,  500,  424,  425,   64,   88,  295,
 /*   180 */   525,  518,  530,  530,   72,   72,   92,   92,   92,   92,
 /*   190 */    71,   59,   59,   59,   59,   58,   58,   57,   57,   57,
 /*   200 */    65,  281,  508,  508,  508,  429,  146,  508,  508,  508,
 /*   210 */   294,  512,  507,  198,  344,  520,  350,  357,  362,  246,
 /*   220 */   303,  264,  323,  196,  236,  283,  221,  544,  367,  310,
 /*   230 */   228,  228,   57,   57,   57,   65,  478,   48,  308,  299,
 /*   240 */   534,  537,  306,  417,   64,   88,  295,  525,  518,  530,
 /*   250 */   530,   72,   72,   92,   92,   92,   92,  551,   59,   59,
 /*   260 */    59,   59,   58,   58,   57,   57,   57,   65,  281,  550,
 /*   270 */   202,  416,  198,  375,  520,  350,  357,  362,  512,  507,
 /*   280 */   413,  414,  344,  293,  344,  372,   21,  367,  198,  522,
 /*   290 */   517,  350,  357,  362,  544,  359,  539,  371,  374,  126,
 /*   300 */   403,  209,  200,  367,  478,   18,  478,   43,  194,  169,
 /*   310 */   384,   64,   88,  295,  525,  518,  530,  530,   72,   72,
 /*   320 */    92,   92,   92,   92,  232,   59,   59,   59,   59,   58,
 /*   330 */    58,   57,   57,   57,   65,  511,  344,  512,  507,  427,
 /*   340 */   281,  420,  479,  479,  148,  419,  331,  233,  344,   67,
 /*   350 */   344,   80,  150,  517,  344,  176,  155,  309,  478,   32,
 /*   360 */   315,  436,  149,  184,  464,  195,  544,  348,   78,  533,
 /*   370 */   478,   51,  478,   51,  378,  428,  478,   51,  479,  443,
 /*   380 */   158,  377,   85,   64,   88,  295,  525,  518,  530,  530,
 /*   390 */    72,   72,   92,   92,   92,   92,  479,   59,   59,   59,
 /*   400 */    59,   58,   58,   57,   57,   57,   65,  281,  387,  467,
 /*   410 */   504,  162,   77,  324,  344,  290,  521,  457,   22,  300,
 /*   420 */   353,  520,  513,  513,  432,  487,   14,  487,  329,  271,
 /*   430 */   257,  487,  426,  544,  523,  524,  478,   51,  217,  208,
 /*   440 */   206,  144,  380,  355,  534,  537,  353,   55,  513,  513,
 /*   450 */    64,   88,  295,  525,  518,  530,  530,   72,   72,   92,
 /*   460 */    92,   92,   92,  375,   59,   59,   59,   59,   58,   58,
 /*   470 */    57,   57,   57,   65,  281,  372,   11,  127,   71,  218,
 /*   480 */   520,  241,  182,  126,  512,  507,  164,  155,  374,  520,
 /*   490 */   338,  488,  452,  398,  543,  353,  200,  513,  513,    1,
 /*   500 */   544,  401,  353,  520,  513,  513,  200,  553,  366,  165,
 /*   510 */   157,  463,  517,  358,  540,  538,  479,   64,   88,  295,
 /*   520 */   525,  518,  530,  530,   72,   72,   92,   92,   92,   92,
 /*   530 */   468,   59,   59,   59,   59,   58,   58,   57,   57,   57,
 /*   540 */    65,  370,  541,  512,  507,  437,  281,  344,  172,  506,
 /*   550 */   239,  344,  512,  507,  344,  387,  224,  448,   93,  344,
 /*   560 */    89,  344,  313,  344,  555,   22,  512,  507,  182,  478,
 /*   570 */    27,  520,  544,  478,   43,  517,  478,   50,  561,  547,
 /*   580 */   369,  478,   47,  478,  114,  478,   95,  528,   91,   64,
 /*   590 */    88,  295,  525,  518,  530,  530,   72,   72,   92,   92,
 /*   600 */    92,   92,  479,   59,   59,   59,   59,   58,   58,   57,
 /*   610 */    57,   57,   65,  281,  226,  344,  251,  174,  110,  344,
 /*   620 */   141,  147,  344,  465,  344,  449,  325,  370,  270,  344,
 /*   630 */   421,  344,  450,  554,  512,  507,    2,  478,   52,  544,
 /*   640 */   595,  478,   44,  311,  478,   30,  478,   45,  313,  173,
 /*   650 */   418,  478,   53,  478,   25,  479,   64,   88,  295,  525,
 /*   660 */   518,  530,  530,   72,   72,   92,   92,   92,   92,  344,
 /*   670 */    59,   59,   59,   59,   58,   58,   57,   57,   57,   65,
 /*   680 */   281,  344,  404,  479,  433,  344,  470,  344,  152,  344,
 /*   690 */   469,  478,  112,  344,  415,  314,  415,  344,  411,  344,
 /*   700 */   126,  287,  161,  478,   94,  440,  544,  478,  113,  478,
 /*   710 */    12,  478,   99,  401,  465,  478,   41,  292,  456,  478,
 /*   720 */   100,  478,   46,   64,   88,  295,  525,  518,  530,  530,
 /*   730 */    72,   72,   92,   92,   92,   92,  344,   59,   59,   59,
 /*   740 */    59,   58,   58,   57,   57,   57,   65,  281,  344,  485,
 /*   750 */    19,  404,  344,  514,  344,   79,  307,  260,  478,  111,
 /*   760 */   344,  242,  344,  548,  548,  344,  503,  501,  497,  466,
 /*   770 */   478,   42,  404,  544,  478,   26,  478,   39,  478,    3,
 /*   780 */   304,  423,  478,   31,  478,   40,  291,  478,   37,  305,
 /*   790 */    64,   88,  295,  525,  518,  530,  530,   72,   72,   92,
 /*   800 */    92,   92,   92,  344,   59,   59,   59,   59,   58,   58,
 /*   810 */    57,   57,   57,   65,  281,  344,  470,  404,  126,  344,
 /*   820 */   469,  344,   20,  344,  139,  478,   97,  344,  320,    7,
 /*   830 */   242,  344,  190,  181,  180,  208,  451,  478,   28,  258,
 /*   840 */   544,  478,   54,  478,   35,  478,   33,  222,  327,  478,
 /*   850 */    34,  262,  204,  478,   29,  435,  191,   64,   76,  295,
 /*   860 */   525,  518,  530,  530,   72,   72,   92,   92,   92,   92,
 /*   870 */   404,   59,   59,   59,   59,   58,   58,   57,   57,   57,
 /*   880 */    65,  281,  404,  454,  177,  162,  344,  208,  344,  175,
 /*   890 */   479,  320,  447,  235,  211,  794,  242,  286,  456,  516,
 /*   900 */   352,  441,  409,  410,  409,  298,  385,  544,  478,   24,
 /*   910 */   478,   98,  252,  252,  252,  252,  275,  284,  479,  252,
 /*   920 */   334,  252,  252,  479,  281,   88,  295,  525,  518,  530,
 /*   930 */   530,   72,   72,   92,   92,   92,   92,  274,   59,   59,
 /*   940 */    59,   59,   58,   58,   57,   57,   57,   65,  517,  242,
 /*   950 */   544,  244,  252,  237,  340,  215,  494,  214,  390,  546,
 /*   960 */   492,  242,  256,  489,  475,  406,   79,  397,  273,  295,
 /*   970 */   525,  518,  530,  530,   72,   72,   92,   92,   92,   92,
 /*   980 */   116,   59,   59,   59,   59,   58,   58,   57,   57,   57,
 /*   990 */    65,   62,  345,  484,    4,  407,  412,  269,  289,  126,
 /*  1000 */   519,  259,   23,  550,  202,  552,  349,   62,  345,  549,
 /*  1010 */     4,  517,  354,  493,  289,   14,  547,  369,  402,  316,
 /*  1020 */   240,  453,  349,  339,  472,  356,  142,  266,  471,  477,
 /*  1030 */   249,  319,  505,  386,  459,  343,  529,  428,  255,  339,
 /*  1040 */    71,  458,  499,  118,  333,  130,  121,  192,  389,  386,
 /*  1050 */   123,  156,   60,   61,  483,  103,   87,  125,  212,  480,
 /*  1060 */    62,  328,  330,  178,  277,  500,  229,  210,   60,   61,
 /*  1070 */   438,  297,  399,  491,  476,  473,   62,  328,  330,   62,
 /*  1080 */   345,  500,    4,  474,  208,  302,  289,  342,  207,  186,
 /*  1090 */   498,   68,  278,  120,  349,  136,  400,  556,  508,  508,
 /*  1100 */   508,  509,  510,   17,  312,  106,  243,  326,  205,  245,
 /*  1110 */   373,  339,  434,  285,  508,  508,  508,  509,  510,   17,
 /*  1120 */    74,  386,  160,  431,  248,    8,  321,  227,  220,  230,
 /*  1130 */   102,  332,  137,  382,  383,  536,  405,  234,   75,  183,
 /*  1140 */    60,   61,  317,  170,  265,  254,  135,  336,   62,  328,
 /*  1150 */   330,  442,  267,  500,  263,   66,  318,  261,  201,  455,
 /*  1160 */   447,   73,  461,  408,  168,  531,  443,   83,  482,  446,
 /*  1170 */   376,  171,  396,  167,  444,  542,  545,  208,  238,  272,
 /*  1180 */   213,  163,  188,  101,  364,   96,  508,  508,  508,  509,
 /*  1190 */   510,   17,  490,   63,  270,  322,  153,  105,  335,  535,
 /*  1200 */   526,  108,  558,  394,  527,  532,  250,  515,  379,  391,
 /*  1210 */    13,  368,  557,  107,  351,  337,  216,  257,   82,  132,
 /*  1220 */   559,  280,  109,  179,  347,  140,  208,  159,   65,  185,
 /*  1230 */   502,  341,  268,  193,  392,  131,  129,  203,  496,  151,
 /*  1240 */    10,  104,  154,  430,  486,  138,  253,  199,  495,  422,
 /*  1250 */   360,  162,  445,    5,   15,  597,    9,  187,  117,  122,
 /*  1260 */   596,  119,  133,   16,    6,  124,  301,  134,   14,   90,
 /*  1270 */    70,  462,   84,  460,  197,
};
static const YYCODETYPE yy_lookahead[] = {
 /*     0 */    16,  216,  146,  218,  219,   21,  146,   23,   68,   69,
 /*    10 */    70,   71,   16,   73,   74,   75,   76,   77,   78,   79,
 /*    20 */    80,   81,   82,  146,  168,  169,   42,   72,   73,   74,
 /*    30 */    75,   76,   77,   78,   79,   80,   81,   82,  216,  217,
 /*    40 */   218,  219,  146,   59,   60,   61,   62,   63,   64,   65,
 /*    50 */    66,   67,   68,   69,   70,   71,  146,   73,   74,   75,
 /*    60 */    76,   77,   78,   79,   80,   81,   82,   16,  146,   43,
 /*    70 */    86,  215,  146,   22,   73,   74,   75,   76,   77,   78,
 /*    80 */    79,   80,   81,   82,   88,   89,   90,   91,   92,   93,
 /*    90 */    94,   95,   22,   42,  168,  169,  146,   46,  102,  138,
 /*   100 */   139,  140,  152,   19,  143,  155,  156,   23,  160,  187,
 /*   110 */    59,   60,   61,   62,   63,   64,   65,   66,   67,   68,
 /*   120 */    69,   70,   71,   97,   73,   74,   75,   76,   77,   78,
 /*   130 */    79,   80,   81,   82,   16,  146,  157,   58,   20,  160,
 /*   140 */   161,  162,   58,  189,   16,   16,  220,  199,   23,  146,
 /*   150 */   146,   77,   78,   79,   80,   81,   82,  168,  169,  237,
 /*   160 */    42,   77,   78,  149,  216,   86,  218,  219,  146,   90,
 /*   170 */    86,   43,  168,  169,   90,   89,   90,   59,   60,   61,
 /*   180 */    62,   63,   64,   65,   66,   67,   68,   69,   70,   71,
 /*   190 */   120,   73,   74,   75,   76,   77,   78,   79,   80,   81,
 /*   200 */    82,   16,  123,  124,  125,   20,   22,  123,  124,  125,
 /*   210 */   207,   86,   87,   88,  146,   23,   91,   92,   93,   90,
 /*   220 */    91,   92,   93,   94,   95,   97,  146,   42,  103,  207,
 /*   230 */   102,  102,   79,   80,   81,   82,  168,  169,  224,  163,
 /*   240 */   164,  165,  228,  177,   59,   60,   61,   62,   63,   64,
 /*   250 */    65,   66,   67,   68,   69,   70,   71,  146,   73,   74,
 /*   260 */    75,   76,   77,   78,   79,   80,   81,   82,   16,   77,
 /*   270 */    78,  177,   88,   12,   23,   91,   92,   93,   86,   87,
 /*   280 */    51,   52,  146,  215,  146,   24,   19,  103,   88,   97,
 /*   290 */    23,   91,   92,   93,   42,  141,  142,   20,   37,   22,
 /*   300 */    39,  147,  226,  103,  168,  169,  168,  169,  154,  154,
 /*   310 */    49,   59,   60,   61,   62,   63,   64,   65,   66,   67,
 /*   320 */    68,   69,   70,   71,   14,   73,   74,   75,   76,   77,
 /*   330 */    78,   79,   80,   81,   82,   20,  146,   86,   87,  146,
 /*   340 */    16,   25,  188,  188,  154,   29,  208,  209,  146,  216,
 /*   350 */   146,  218,  219,   86,  146,  200,  201,   41,  168,  169,
 /*   360 */   205,   20,  154,   53,  113,   55,   42,  213,   44,  236,
 /*   370 */   168,  169,  168,  169,  175,  176,  168,  169,  188,   49,
 /*   380 */    22,  182,  130,   59,   60,   61,   62,   63,   64,   65,
 /*   390 */    66,   67,   68,   69,   70,   71,  188,   73,   74,   75,
 /*   400 */    76,   77,   78,   79,   80,   81,   82,   16,  146,   20,
 /*   410 */    20,   22,   21,  211,  146,  211,  146,  155,  156,  211,
 /*   420 */   105,   23,  107,  108,   20,  223,   22,  223,   98,   99,
 /*   430 */   100,  223,  177,   42,  164,  165,  168,  169,   14,  109,
 /*   440 */   191,  179,  180,  163,  164,  165,  105,  198,  107,  108,
 /*   450 */    59,   60,   61,   62,   63,   64,   65,   66,   67,   68,
 /*   460 */    69,   70,   71,   12,   73,   74,   75,   76,   77,   78,
 /*   470 */    79,   80,   81,   82,   16,   24,   19,   53,  120,   55,
 /*   480 */    23,   20,  154,   22,   86,   87,  200,  201,   37,   23,
 /*   490 */    39,  223,  166,  167,   42,  105,  226,  107,  108,   19,
 /*   500 */    42,  175,  105,   23,  107,  108,  226,  160,  161,  162,
 /*   510 */    21,  113,   23,   16,   62,   63,  188,   59,   60,   61,

 /*   520 */    62,   63,   64,   65,   66,   67,   68,   69,   70,   71,
 /*   530 */    22,   73,   74,   75,   76,   77,   78,   79,   80,   81,
 /*   540 */    82,  213,   90,   86,   87,   79,   16,  146,   19,  146,
 /*   550 */    20,  146,   86,   87,  146,  146,  132,  229,  129,  146,
 /*   560 */   131,  146,  234,  146,  155,  156,   86,   87,  154,  168,
 /*   570 */   169,   23,   42,  168,  169,   86,  168,  169,    0,    1,
 /*   580 */     2,  168,  169,  168,  169,  168,  169,   90,  130,   59,
 /*   590 */    60,   61,   62,   63,   64,   65,   66,   67,   68,   69,
 /*   600 */    70,   71,  188,   73,   74,   75,   76,   77,   78,   79,
 /*   610 */    80,   81,   82,   16,  209,  146,   90,  230,   21,  146,
 /*   620 */   112,  154,  146,   22,  146,   27,  231,  213,  102,  146,
 /*   630 */    30,  146,   34,  140,   86,   87,  143,  168,  169,   42,
 /*   640 */   111,  168,  169,  229,  168,  169,  168,  169,  234,  154,
 /*   650 */    50,  168,  169,  168,  169,  188,   59,   60,   61,   62,
 /*   660 */    63,   64,   65,   66,   67,   68,   69,   70,   71,  146,
 /*   670 */    73,   74,   75,   76,   77,   78,   79,   80,   81,   82,
 /*   680 */    16,  146,  146,  188,   20,  146,  106,  146,   87,  146,
 /*   690 */   110,  168,  169,  146,   98,   99,  100,  146,   20,  146,
 /*   700 */    22,  101,   19,  168,  169,  167,   42,  168,  169,  168,
 /*   710 */   169,  168,  169,  175,  113,  168,  169,  181,  160,  168,
 /*   720 */   169,  168,  169,   59,   60,   61,   62,   63,   64,   65,
 /*   730 */    66,   67,   68,   69,   70,   71,  146,   73,   74,   75,
 /*   740 */    76,   77,   78,   79,   80,   81,   82,   16,  146,  146,
 /*   750 */    67,  146,  146,   20,  146,   22,  146,  199,  168,  169,
 /*   760 */   146,  225,  146,  123,  124,  146,    7,    8,    9,  202,
 /*   770 */   168,  169,  146,   42,  168,  169,  168,  169,  168,  169,
 /*   780 */   146,   18,  168,  169,  168,  169,  181,  168,  169,   79,
 /*   790 */    59,   60,   61,   62,   63,   64,   65,   66,   67,   68,
 /*   800 */    69,   70,   71,  146,   73,   74,   75,   76,   77,   78,
 /*   810 */    79,   80,   81,   82,   16,  146,  106,  146,   22,  146,
 /*   820 */   110,  146,   19,  146,   21,  168,  169,  146,  146,  190,
 /*   830 */   225,  146,   98,   99,  100,  109,  146,  168,  169,  146,
 /*   840 */    42,  168,  169,  168,  169,  168,  169,  146,  122,  168,
 /*   850 */   169,  225,  181,  168,  169,   92,  154,   59,   60,   61,
 /*   860 */    62,   63,   64,   65,   66,   67,   68,   69,   70,   71,
 /*   870 */   146,   73,   74,   75,   76,   77,   78,   79,   80,   81,
 /*   880 */    82,   16,  146,   20,  154,   22,  146,  109,  146,  154,
 /*   890 */   188,  146,   96,  146,  212,  132,  225,  207,  160,  146,
 /*   900 */   122,  184,  185,  184,  185,  181,  146,   42,  168,  169,
 /*   910 */   168,  169,  146,  146,  146,  146,  146,  181,  188,  146,
 /*   920 */   146,  146,  146,  188,   16,   60,   61,   62,   63,   64,
 /*   930 */    65,   66,   67,   68,   69,   70,   71,  199,   73,   74,
 /*   940 */    75,   76,   77,   78,   79,   80,   81,   82,   23,  225,
 /*   950 */    42,  146,  146,  187,  187,  187,  187,  212,  159,  227,
 /*   960 */   187,  225,  187,  187,   20,  171,   22,  168,  146,   61,
 /*   970 */    62,   63,   64,   65,   66,   67,   68,   69,   70,   71,
 /*   980 */   146,   73,   74,   75,   76,   77,   78,   79,   80,   81,
 /*   990 */    82,   16,   17,  187,   19,    7,    8,   20,   23,   22,
 /*  1000 */    20,  171,   22,   77,   78,  160,   31,   16,   17,  227,
 /*  1010 */    19,   86,  172,   20,   23,   22,    1,    2,  171,  146,
 /*  1020 */   192,  146,   31,   48,  171,  146,  190,  144,  148,  171,
 /*  1030 */   146,  146,  193,   58,  146,  222,  146,  176,  146,   48,
 /*  1040 */   120,  193,  193,   59,   15,  183,  186,  111,  151,   58,
 /*  1050 */   186,    6,   77,   78,  145,   19,  129,  186,  221,  193,
 /*  1060 */    85,   86,   87,  151,  173,   90,   95,  210,   77,   78,
 /*  1070 */    79,   40,  178,  145,   23,  159,   85,   86,   87,   16,
 /*  1080 */    17,   90,   19,  145,  109,  151,   23,   15,  210,  150,
 /*  1090 */   197,  119,  173,   19,   31,  214,  159,  136,  123,  124,
 /*  1100 */   125,  126,  127,  128,   97,  238,  193,  117,  210,  194,
 /*  1110 */   170,   48,  170,  151,  123,  124,  125,  126,  127,  128,
 /*  1120 */   118,   58,    5,  170,  195,   22,  153,   10,   11,   12,
 /*  1130 */    13,  115,  214,  170,  170,   33,  151,  196,  235,  150,
 /*  1140 */    77,   78,   38,   26,  170,   28,  151,  151,   85,   86,
 /*  1150 */    87,  183,   35,   90,  232,   97,  114,  203,  210,  204,
 /*  1160 */    96,  129,  170,  233,   47,  145,   49,  235,  151,  172,
 /*  1170 */   170,   54,  178,   56,  204,  151,  151,  109,  135,  203,
 /*  1180 */   174,  183,  134,  174,   57,  158,  123,  124,  125,  126,
 /*  1190 */   127,  128,  188,   19,  102,  146,  146,   14,  185,    1,
 /*  1200 */    90,   19,  180,  168,   20,   20,   20,  106,  180,  168,
 /*  1210 */    19,   44,   20,   19,   44,   98,   99,  100,   19,  121,
 /*  1220 */     4,  104,   19,  111,    3,   19,  109,  121,   82,  111,
 /*  1230 */    11,   16,  146,   97,   17,  101,  112,   44,   20,   19,
 /*  1240 */     5,   19,  111,   20,   17,   21,  132,   22,   20,   45,
 /*  1250 */   133,   22,   11,  116,   22,  111,    1,  112,   32,   45,
 /*  1260 */   111,  101,   20,   19,  116,   97,   36,   19,   22,   67,
 /*  1270 */    19,  113,   67,   20,   94,
};
#define YY_SHIFT_USE_DFLT (-61)
#define YY_SHIFT_MAX 371
static const short yy_shift_ofst[] = {
 /*     0 */  1015,  975, 1117,  -16,  975, 1063, 1063, 1063,  125,  330,
 /*    10 */   330, 1068,  324, 1063, 1063, 1063, 1063, 1063,  -45,  192,
 /*    20 */   548,  926,  925,  926,   51,  391,  118,  185,  252,  458,
 /*    30 */   530,  597,  664,  731,  731,  731,  731,  731,  731,  731,
 /*    40 */   731,  731,  798,  731,  731,  731,  731,  731,  731,  731,
 /*    50 */   731,  731,  865,  908,  908,  991, 1063, 1063, 1063, 1063,
 /*    60 */  1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
 /*    70 */  1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
 /*    80 */  1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
 /*    90 */  1063, 1063, 1063, 1063,  -60,  -60,   -4,    1,    1,   74,
 /*   100 */   153,  128,  763,  548,  548,  548,  548,  548,  548,  548,
 /*   110 */   925, 1146,  -61,  -61,  -61,   84,  129,  261,  261,  548,
 /*   120 */   548,  548,  548,  548,  548,  548,  548,  548,  578,  548,
 /*   130 */   548,  548,  548,  489,  548,  489,  778,  726, 1068, 1068,
 /*   140 */  1068,  -61,  -61,   79,  184,   79,  200,  390,  341,  315,
 /*   150 */   480,  451,  251,  398,  466,  457,  548,  548,  548,  548,
 /*   160 */   759,  548,  548,  548,  601,  267,  548,  548,  548,  397,
 /*   170 */   548,  548,  710,  397,  596,  397,  601,  397,  316,  548,
 /*   180 */   600,  600,  397,  548,  548,  548,  548,  548,  548,  548,
 /*   190 */   600,  397,  548,  548,  397,  548,  548,  548,  548,  548,
 /*   200 */   640,  598,  640,  598,  796,  598,  508,  598,  580,  803,
 /*   210 */   598,   70,  429,   26,  358,  920,  984, 1029, 1029,  936,
 /*   220 */  1045,  920, 1036,  927, 1029,  936,  971, 1045, 1031, 1051,
 /*   230 */  1045,  936, 1072,  971,  972, 1036, 1051, 1074,  961, 1007,
 /*   240 */   920, 1007,  971,  990,  936, 1002, 1007, 1103, 1016, 1074,
 /*   250 */  1007, 1007,  936, 1072, 1102,  936, 1104,  984,  936, 1007,
 /*   260 */  1058, 1042,  971, 1032, 1007, 1064, 1045, 1102,  936, 1007,
 /*   270 */  1031,  984, 1042,  936, 1058,  936, 1068,  -61,  -61,  -61,
 /*   280 */   424,  452,  310,  734,  277,  683,  389,   86,  526,  529,
 /*   290 */   404,  461,  678,  733,  863,  497,  944,  988,  977,  980,
 /*   300 */   993,  229, 1136, 1193, 1222, 1223, 1235, 1131, 1114, 1204,
 /*   310 */  1229, 1241, 1226, 1255, 1214, 1242, 1160, 1230, 1248, 1202,
 /*   320 */  1205, 1253, 1158, 1251, 1246, 1168, 1148, 1244, 1149, 1145,
 /*   330 */  1144, 1232, 1137, 1227, 1228, 1225, 1224, 1124, 1218, 1220,
 /*   340 */  1134, 1217, 1215, 1219, 1118, 1206, 1112, 1216, 1098, 1199,
 /*   350 */  1170, 1194, 1191, 1101, 1186, 1185, 1184, 1182, 1110, 1198,
 /*   360 */  1183, 1092, 1174, 1127, 1048, 1043, 1192, 1167, 1203, 1221,
 /*   370 */  1106, 1180,
};
#define YY_REDUCE_USE_DFLT (-216)
#define YY_REDUCE_MAX 279
static const short yy_reduce_ofst[] = {
 /*     0 */   -39,  208,  154,  -52,  190,  138,  202,  204,  262,  328,
 /*    10 */   414,  155,  133,   68,  268,  405, -144,  -74, -178,  270,
 /*    20 */   -50,   76,  -21,  280, -215, -215, -215, -215, -215, -215,
 /*    30 */  -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
 /*    40 */  -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
 /*    50 */  -215, -215, -215, -215, -215,  610,  606,  590,  551,  543,
 /*    60 */   539,  523,  483,  476,  469,  415,  408,  136,  740,  -11,
 /*    70 */   401,  413,  417,  473,  478,  485,  535,  541,  547,  553,
 /*    80 */   602,  608,  614,    4,  616,  619,  657,  669,  673,  675,
 /*    90 */   677,  681,  742,  685, -215, -215,  326, -215, -215, -215,
 /*   100 */  -215,  199,   14,  536,  605,  -78,  409,  671,  724,  736,
 /*   110 */   347, -215, -215, -215, -215,  799,  538,  719,  717,  745,
 /*   120 */   690,  806,   22,  776,  775,  773,  626,  769,  493,  768,
 /*   130 */   767,  682,  766,  738,    3,  558,  735,  730,  702,  495,
 /*   140 */   467,  286,  249, 1041, 1028, 1035, 1022,  -46,  -46,  -46,
 /*   150 */  1086, 1013, 1050, 1049, -123,  892,  890,  888,  885,  884,
 /*   160 */   883,  879,  875,  873,  567,  845,  834,  822,  805,  -46,
 /*   170 */   770,  753,  639,  -46,  395,  -46,  567,  -46,  387,  403,
 /*   180 */    94,   66,  -46, -104, -140, -123,  -90,   80,  111,  193,
 /*   190 */   255,  -46,  603,  634,  -46,  693,  701,  747,  760,  774,
 /*   200 */   732,  794,  782,  830,  840,  847,  828,  853,  836,  880,
 /*   210 */   858,  839,  813,  861,  848,  849,  862,  860,  864,  897,
 /*   220 */   909,  866,  891,  837,  871,  912,  857,  928,  894,  916,
 /*   230 */   938,  934,  939,  878,  893,  919,  937,  881,  867,  940,
 /*   240 */   913,  942,  898,  915,  962,  929,  953,  973,  941,  918,
 /*   250 */   963,  964,  985,  989,  903,  995,  922,  968,  996,  974,
 /*   260 */   954,  955,  948,  930,  992,  997, 1020,  932, 1017, 1000,
 /*   270 */   994,  998,  970, 1024,  976, 1025, 1004, 1006, 1009, 1027,
};
static const YYACTIONTYPE yy_default[] = {
 /*     0 */   567,  791,  856,  682,  856,  856,  791,  791,  856,  829,
 /*    10 */   829,  686,  842,  856,  791,  856,  856,  787,  762,  813,
 /*    20 */   856,  813,  598,  813,  717,  856,  856,  856,  856,  856,
 /*    30 */   856,  856,  856,  724,  782,  784,  846,  783,  718,  719,
 /*    40 */   725,  843,  856,  706,  827,  715,  730,  722,  731,  786,
 /*    50 */   698,  790,  752,  768,  751,  856,  856,  856,  856,  856,
 /*    60 */   856,  856,  856,  856,  856,  856,  856,  856,  856,  856,
 /*    70 */   856,  856,  856,  856,  856,  856,  856,  856,  856,  856,
 /*    80 */   856,  856,  856,  856,  856,  856,  856,  856,  856,  856,
 /*    90 */   856,  856,  856,  856,  773,  754,  591,  761,  753,  755,
 /*   100 */   756,  651,  586,  856,  856,  856,  856,  856,  856,  856,
 /*   110 */   856,  757,  769,  770,  758,  856,  856,  856,  856,  856,

 /*   120 */   856,  856,  856,  856,  856,  856,  856,  856,  567,  856,
 /*   130 */   856,  856,  856,  682,  856,  682,  856,  856,  856,  856,
 /*   140 */   856,  686,  676,  856,  642,  856,  856,  856,  856,  856,
 /*   150 */   856,  856,  856,  856,  856,  856,  572,  856,  856,  856,
 /*   160 */   574,  856,  856,  856,  684,  600,  856,  847,  856,  689,
 /*   170 */   849,  801,  674,  588,  856,  727,  690,  832,  819,  856,
 /*   180 */   856,  856,  834,  856,  856,  856,  856,  856,  856,  856,

 /*   190 */   856,  663,  856,  856,  665,  856,  856,  856,  856,  856,
 /*   200 */   856,  709,  856,  709,  624,  709,  683,  709,  674,  856,
 /*   210 */   709,  721,  785,  621,  721,  721,  655,  662,  662,  691,
 /*   220 */   571,  721,  795,  856,  662,  691,  710,  571,  638,  856,
 /*   230 */   571,  691,  583,  710,  716,  795,  856,  732,  854,  653,
 /*   240 */   721,  653,  710,  712,  691,  714,  653,  641,  702,  732,
 /*   250 */   653,  653,  691,  583,  845,  691,  823,  655,  691,  653,
 /*   260 */   699,  701,  710,  826,  653,  624,  571,  845,  691,  653,
 /*   270 */   638,  655,  701,  691,  699,  691,  856,  626,  626,  608,
 /*   280 */   856,  856,  856,  856,  856,  808,  856,  856,  856,  739,
 /*   290 */   856,  856,  856,  856,  856,  856,  856,  856,  856,  856,
 /*   300 */   856,  856,  856,  856,  856,  856,  856,  856,  856,  856,
 /*   310 */   822,  856,  856,  856,  821,  856,  856,  856,  856,  856,
 /*   320 */   856,  856,  856,  856,  713,  856,  856,  856,  744,  856,
 /*   330 */   740,  703,  856,  856,  856,  856,  856,  856,  856,  856,
 /*   340 */   856,  856,  856,  856,  856,  856,  741,  856,  856,  856,
 /*   350 */   856,  856,  856,  668,  856,  856,  856,  856,  856,  856,
 /*   360 */   856,  856,  856,  853,  856,  856,  856,  856,  856,  568,
 /*   370 */   856,  856,  838,  649,  839,  837,  648,  650,  652,  644,
 /*   380 */   645,  590,  647,  617,  659,  646,  750,  592,  599,  582,
 /*   390 */   615,  614,  584,  744,  613,  612,  636,  611,  610,  637,
 /*   400 */   623,  622,  798,  658,  799,  693,  797,  639,  815,  657,
 /*   410 */   654,  796,  640,  824,  825,  820,  631,  630,  635,  816,
 /*   420 */   817,  634,  818,  585,  633,  632,  629,  628,  627,  620,
 /*   430 */   749,  616,  748,  737,  792,  793,  777,  679,  678,  677,
 /*   440 */   609,  656,  728,  729,  688,  814,  618,  625,  828,  707,
 /*   450 */   708,  735,  607,  734,  700,  687,  681,  589,  830,  680,
 /*   460 */   587,  619,  697,  696,  695,  694,  685,  733,  675,  672,
 /*   470 */   673,  581,  705,  711,  580,  831,  593,  704,  736,  666,
 /*   480 */   833,  763,  779,  579,  660,  692,  661,  789,  788,  664,
 /*   490 */   667,  578,  800,  776,  840,  836,  835,  577,  671,  720,
 /*   500 */   738,  576,  781,  575,  780,  723,  742,  597,  743,  745,
 /*   510 */   746,  778,  596,  670,  726,  669,  802,  594,  774,  601,
 /*   520 */   595,  803,  804,  805,  806,  771,  767,  807,  765,  573,
 /*   530 */   764,  570,  602,  841,  605,  566,  844,  606,  775,  564,
 /*   540 */   772,  766,  848,  760,  759,  850,  809,  565,  811,  810,
 /*   550 */   812,  851,  604,  603,  562,  852,  855,  747,  643,  569,
 /*   560 */   563,
};
#define YY_SZ_ACTTAB (sizeof(yy_action)/sizeof(yy_action[0]))

/* The next table maps tokens into fallback tokens.  If a construct
** like the following:
** 







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


|
|
|

|
|
|
|
|
|
|

|
|
|
|
|
|

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

|
|
|
|
|
|


|
|
|
|
|


|
|

|


|
|
|
|
|


|
|
|
|
|
|
|
|
|

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

|


|
|
|
|
|




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




|
|
|


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


|
|
|
|
|
|



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

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







171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362

363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
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
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526

527
528

529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
**  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 */   280,   68,  284,   70,  148,  166,  547,  420,   62,   62,
 /*    10 */    62,   62,  202,   64,   64,   64,   64,   65,   65,   66,
 /*    20 */    66,   66,   67,   67,  549,  550,  433,   69,   64,   64,
 /*    30 */    64,   64,   65,   65,   66,   66,   66,   67,   68,  455,
 /*    40 */    70,  148,  500,   61,   59,  288,  441,  442,  438,  438,
 /*    50 */    63,   63,   62,   62,   62,   62,  502,   64,   64,   64,
 /*    60 */    64,   65,   65,   66,   66,   66,   67,  280,  372,  284,
 /*    70 */   420,    2,  378,   80,  158,  115,  220,  305,  225,  306,
 /*    80 */   170,  245,  857,  119,  560,  505,  204,    2,  246,  390,
 /*    90 */   497,  219,   22,  433,  515,   21,  420,   58,  494,  171,
 /*   100 */    64,   64,   64,   64,   65,   65,   66,   66,   66,   67,
 /*   110 */    61,   59,  288,  441,  442,  438,  438,   63,   63,   62,
 /*   120 */    62,   62,   62,  513,   64,   64,   64,   64,   65,   65,
 /*   130 */    66,   66,   66,   67,  280,  379,  380,  175,  202,  378,
 /*   140 */   331,  334,  335,  220,  305,  225,  306,  170,  245,  203,
 /*   150 */   146,  358,  336,  282,  378,  246,   55,  302,  374,  420,
 /*   160 */   433,  506,   92,  200,  531,   66,   66,   66,   67,  526,
 /*   170 */   192,   65,   65,   66,   66,   66,   67,   61,   59,  288,
 /*   180 */   441,  442,  438,  438,   63,   63,   62,   62,   62,   62,
 /*   190 */   434,   64,   64,   64,   64,   65,   65,   66,   66,   66,
 /*   200 */    67,  280,  379,  380,  412,  432,  110,  226,  428,  205,
 /*   210 */   436,  437,  309,  359,  262,  261,  175,  379,  380,  331,
 /*   220 */   334,  335,  373,  370,  202,  512,  481,  433,  548,  363,
 /*   230 */   467,  336,  511,  501,  411,   41,  277,  415,  435,  430,
 /*   240 */   504,  162,  233,  528,   61,   59,  288,  441,  442,  438,
 /*   250 */   438,   63,   63,   62,   62,   62,   62,  320,   64,   64,
 /*   260 */    64,   64,   65,   65,   66,   66,   66,   67,  280,  473,
 /*   270 */   417,  417,  417,  309,  323,  236,  309,   68,  309,   70,
 /*   280 */   148,    1,  309,  794,  309,  378,   68,  153,   70,  148,
 /*   290 */   149,  378,  326,  283,  433,  411,   35,  552,  411,   35,
 /*   300 */   411,   36,  428,  205,  411,   35,  411,   35,  287,  423,
 /*   310 */   424,   61,   59,  288,  441,  442,  438,  438,   63,   63,
 /*   320 */    62,   62,   62,   62,  412,   64,   64,   64,   64,   65,
 /*   330 */    65,   66,   66,   66,   67,  309,  505,  467,  291,  255,
 /*   340 */   280,  325,  486,  147,  237,  389,   21,  289,  379,  380,
 /*   350 */   452,  420,  232,  452,  379,  380,  309,  411,   28,  452,
 /*   360 */   175,  451,  487,  331,  334,  335,  433,  215,  348,  145,
 /*   370 */   514,  204,  351,  186,  168,  336,  238,  412,  411,   41,
 /*   380 */   256,  463,   76,   61,   59,  288,  441,  442,  438,  438,
 /*   390 */    63,   63,   62,   62,   62,   62,  310,   64,   64,   64,
 /*   400 */    64,   65,   65,   66,   66,   66,   67,  412,  412,  186,
 /*   410 */   397,  309,  280,  292,  420,  339,  477,  309,  391,  234,
 /*   420 */   169,  154,  398,  476,  397,  328,  494,  312,  423,  424,
 /*   430 */   445,  378,  357,  411,   49,  399,  398,  395,  433,  411,
 /*   440 */    49,  503,  171,  412,  430,  313,  162,  396,  352,  399,
 /*   450 */   498,  319,  471,  353,   79,   61,   59,  288,  441,  442,
 /*   460 */   438,  438,   63,   63,   62,   62,   62,   62,  357,   64,
 /*   470 */    64,   64,   64,   65,   65,   66,   66,   66,   67,  280,
 /*   480 */   299,  446,  377,  480,  533,  406,  300,   11,  505,  353,
 /*   490 */   204,  378,  407,  378,  379,  380,  282,  557,   21,  492,
 /*   500 */   492,  246,  561,  373,  370,  433,  393,  394,  315,  123,
 /*   510 */   444,  444,  166,  290,  420,  315,  116,  444,  444,  251,
 /*   520 */   265,  464,   61,   59,  288,  441,  442,  438,  438,   63,
 /*   530 */    63,   62,   62,   62,   62,  293,   64,   64,   64,   64,
 /*   540 */    65,   65,   66,   66,   66,   67,  280,  460,  329,  475,
 /*   550 */   499,  309,  202,  309,  379,  380,  379,  380,  181,  131,
 /*   560 */   179,  266,  309,    5,  309,  364,  315,  356,  444,  444,
 /*   570 */   411,    3,  433,  411,   29,  411,   24,  420,  243,  244,
 /*   580 */   381,  382,  383,  405,  411,   33,  411,   54,  467,   61,
 /*   590 */    59,  288,  441,  442,  438,  438,   63,   63,   62,   62,
 /*   600 */    62,   62,  309,   64,   64,   64,   64,   65,   65,   66,
 /*   610 */    66,   66,   67,  280,  522,  345,  522,  249,  309,  492,
 /*   620 */   309,  471,  309,  471,  411,   25,  309,  240,  309,  315,
 /*   630 */   309,  444,  444,  213,  172,  173,  174,  142,  267,  433,
 /*   640 */   411,   52,  411,   97,  411,   94,  529,  394,  411,   99,
 /*   650 */   411,  100,  411,  111,  212,  255,   61,   59,  288,  441,
 /*   660 */   442,  438,  438,   63,   63,   62,   62,   62,   62,  309,
 /*   670 */    64,   64,   64,   64,   65,   65,   66,   66,   66,   67,
 /*   680 */   280,  309,  346,  188,  298,   91,  309,  492,  309,  416,
 /*   690 */   309,  411,  112,  309,  429,  309,  538,  309,  244,  165,
 /*   700 */   154,  410,  356,  411,   18,  409,  433,  321,  411,   98,
 /*   710 */   411,   34,  411,   95,  314,  411,   53,  411,  113,  411,
 /*   720 */   114,  255,  294,   61,   59,  288,  441,  442,  438,  438,
 /*   730 */    63,   63,   62,   62,   62,   62,  309,   64,   64,   64,
 /*   740 */    64,   65,   65,   66,   66,   66,   67,  280,  309,  492,
 /*   750 */   492,  524,  309,  453,  309,  523,  309,  462,  411,   26,
 /*   760 */   309,   75,  540,   77,  309,  461,  244,  347,  214,  466,
 /*   770 */   411,   37,  470,  433,  411,   38,  411,   27,  411,   39,
 /*   780 */   242,   82,  411,   40,  295,  297,  411,   42,  439,  330,
 /*   790 */    61,   59,  288,  441,  442,  438,  438,   63,   63,   62,
 /*   800 */    62,   62,   62,  309,   64,   64,   64,   64,   65,   65,
 /*   810 */    66,   66,   66,   67,  280,  309,  410,  190,  221,  309,
 /*   820 */   409,  309,  152,  309,  159,  411,   43,  309,  244,  244,
 /*   830 */   222,   20,  309,  139,  426,  426,  482,  411,   44,  483,
 /*   840 */   433,  411,   30,  411,   31,  411,   45,  488,  462,  411,
 /*   850 */    46,  412,  507,  255,  411,   47,  489,   61,   71,  288,
 /*   860 */   441,  442,  438,  438,   63,   63,   62,   62,   62,   62,
 /*   870 */   309,   64,   64,   64,   64,   65,   65,   66,   66,   66,
 /*   880 */    67,  280,  309,  402,  403,  250,  309,  193,  309,  421,
 /*   890 */   309,   23,  411,   48,  541,  450,  255,   14,  469,  478,
 /*   900 */   167,   14,  485,  484,  411,   32,  252,  433,  411,   12,
 /*   910 */   411,   50,  411,   51,  255,  255,  595,  255,  255,  150,
 /*   920 */   490,  412,  123,  253,  280,   59,  288,  441,  442,  438,
 /*   930 */   438,   63,   63,   62,   62,   62,   62,  542,   64,   64,
 /*   940 */    64,   64,   65,   65,   66,   66,   66,   67,  254,  248,
 /*   950 */   433,  123,  338,  412,  123,  268,  270,  196,  362,  367,
 /*   960 */   183,  177,  180,  520,  521,  260,  535,  123,  167,  288,
 /*   970 */   441,  442,  438,  438,   63,   63,   62,   62,   62,   62,
 /*   980 */   343,   64,   64,   64,   64,   65,   65,   66,   66,   66,
 /*   990 */    67,   72,  316,  259,    4,  412,  412,  536,  286,   89,
 /*  1000 */   545,  350,   89,  354,  355,   19,  311,   72,  316,  369,
 /*  1010 */     4,  387,  263,  264,  286,  223,  546,  271,  365,  274,
 /*  1020 */   275,  141,  311,  318,  227,  317,  556,  425,  427,  481,
 /*  1030 */   456,  459,  491,  432,  333,  493,  534,  157,  544,  318,
 /*  1040 */   376,  384,  385,  386,    8,  303,  304,  392,  285,  432,
 /*  1050 */   405,  400,   74,   73,  224,  404,  408,   82,  324,  322,
 /*  1060 */    72,  307,  308,  401,  231,  415,   81,  206,   74,   73,
 /*  1070 */   474,   57,   78,  164,  454,  413,   72,  307,  308,   72,
 /*  1080 */   316,  415,    4,  228,  202,  229,  286,  235,  230,  457,
 /*  1090 */   458,  414,  207,  120,  311,   83,  327,  102,  417,  417,
 /*  1100 */   417,  418,  419,   13,  239,  496,  468,  241,  278,  208,
 /*  1110 */   472,  318,  495,  210,  417,  417,  417,  418,  419,   13,
 /*  1120 */   211,  432,  156,  279,  340,  508,  509,  216,  217,  218,
 /*  1130 */   106,  510,  516,  178,  344,   84,  342,  182,  518,  457,
 /*  1140 */    74,   73,   86,  198,  519,  272,  257,  184,   72,  307,
 /*  1150 */   308,  349,  273,  415,  527,  530,  118,  187,  127,  537,
 /*  1160 */   360,  136,  128,  543,  195,  129,  531,  301,  553,   90,
 /*  1170 */   554,  194,  137,  197,  432,  130,  133,  555,  558,   96,
 /*  1180 */   209,  101,  375,  388,  117,  201,  417,  417,  417,  418,
 /*  1190 */   419,   13,   93,  143,  144,   56,  596,  109,  597,  160,
 /*  1200 */   161,   60,  501,  422,  431,  440,  415,  443,  138,  447,
 /*  1210 */   151,    6,  448,  449,    7,  361,  269,  261,  163,   15,
 /*  1220 */   465,  281,   14,  121,  155,  122,  202,  479,  103,  332,
 /*  1230 */   247,  104,   85,  105,  337,  222,  176,  341,  140,  417,
 /*  1240 */   417,  417,  517,  124,  296,  167,  125,  525,  185,  107,
 /*  1250 */   366,  258,    9,  532,   10,  126,   16,  189,  539,  191,
 /*  1260 */   132,   87,   88,  134,  135,   17,  108,  276,  551,  371,
 /*  1270 */   536,  199,  368,  559,
};
static const YYCODETYPE yy_lookahead[] = {
 /*     0 */    16,  216,   16,  218,  219,   21,  146,   23,   68,   69,
 /*    10 */    70,   71,  109,   73,   74,   75,   76,   77,   78,   79,
 /*    20 */    80,   81,   82,   82,  164,  165,   42,   72,   73,   74,
 /*    30 */    75,   76,   77,   78,   79,   80,   81,   82,  216,  217,
 /*    40 */   218,  219,  168,   59,   60,   61,   62,   63,   64,   65,
 /*    50 */    66,   67,   68,   69,   70,   71,  168,   73,   74,   75,
 /*    60 */    76,   77,   78,   79,   80,   81,   82,   16,  140,   16,
 /*    70 */    86,  143,   23,   22,   88,   89,   90,   91,   92,   93,
 /*    80 */    94,   95,  138,  139,  140,  146,  226,  143,  102,  166,
 /*    90 */   167,  152,   19,   42,  155,  156,   23,   46,  175,   43,
 /*   100 */    73,   74,   75,   76,   77,   78,   79,   80,   81,   82,
 /*   110 */    59,   60,   61,   62,   63,   64,   65,   66,   67,   68,
 /*   120 */    69,   70,   71,  180,   73,   74,   75,   76,   77,   78,
 /*   130 */    79,   80,   81,   82,   16,   86,   87,   88,  109,   23,
 /*   140 */    91,   92,   93,   90,   91,   92,   93,   94,   95,  191,
 /*   150 */    22,  122,  103,   97,   23,  102,  198,  141,  142,   86,
 /*   160 */    42,  180,   44,  147,   49,   79,   80,   81,   82,   18,
 /*   170 */   154,   77,   78,   79,   80,   81,   82,   59,   60,   61,
 /*   180 */    62,   63,   64,   65,   66,   67,   68,   69,   70,   71,
 /*   190 */    42,   73,   74,   75,   76,   77,   78,   79,   80,   81,
 /*   200 */    82,   16,   86,   87,  188,   58,   21,  189,   77,   78,
 /*   210 */    62,   63,  146,   98,   99,  100,   88,   86,   87,   91,
 /*   220 */    92,   93,    1,    2,  109,  175,  176,   42,   97,  213,
 /*   230 */   160,  103,  182,   86,  168,  169,  157,   90,   90,  160,
 /*   240 */   161,  162,  146,   92,   59,   60,   61,   62,   63,   64,
 /*   250 */    65,   66,   67,   68,   69,   70,   71,  185,   73,   74,
 /*   260 */    75,   76,   77,   78,   79,   80,   81,   82,   16,  199,
 /*   270 */   123,  124,  125,  146,  208,  209,  146,  216,  146,  218,
 /*   280 */   219,   19,  146,  132,  146,   23,  216,  146,  218,  219,
 /*   290 */   154,   23,  146,  149,   42,  168,  169,  236,  168,  169,
 /*   300 */   168,  169,   77,   78,  168,  169,  168,  169,  163,  164,
 /*   310 */   165,   59,   60,   61,   62,   63,   64,   65,   66,   67,
 /*   320 */    68,   69,   70,   71,  188,   73,   74,   75,   76,   77,
 /*   330 */    78,   79,   80,   81,   82,  146,  146,  160,  211,  146,
 /*   340 */    16,  211,   30,  154,  146,  155,  156,  211,   86,   87,
 /*   350 */   223,   23,  220,  223,   86,   87,  146,  168,  169,  223,
 /*   360 */    88,  223,   50,   91,   92,   93,   42,  144,  224,  179,
 /*   370 */   180,  226,  228,  154,  154,  103,  199,  188,  168,  169,
 /*   380 */   187,  113,  130,   59,   60,   61,   62,   63,   64,   65,
 /*   390 */    66,   67,   68,   69,   70,   71,  146,   73,   74,   75,
 /*   400 */    76,   77,   78,   79,   80,   81,   82,  188,  188,  154,
 /*   410 */    12,  146,   16,  101,   86,   16,   20,  146,  167,  209,
 /*   420 */   200,  201,   24,   20,   12,  205,  175,  163,  164,  165,
 /*   430 */    20,   23,  213,  168,  169,   37,   24,   39,   42,  168,
 /*   440 */   169,  159,   43,  188,  160,  161,  162,   49,  229,   37,
 /*   450 */   168,   39,  146,  234,  130,   59,   60,   61,   62,   63,
 /*   460 */    64,   65,   66,   67,   68,   69,   70,   71,  213,   73,
 /*   470 */    74,   75,   76,   77,   78,   79,   80,   81,   82,   16,
 /*   480 */   215,   20,  146,   20,  229,   27,  215,   19,  146,  234,
 /*   490 */   226,   23,   34,   23,   86,   87,   97,  155,  156,  146,
 /*   500 */   146,  102,    0,    1,    2,   42,  184,  185,  105,   22,
 /*   510 */   107,  108,   21,  207,   23,  105,  146,  107,  108,   14,
 /*   520 */    14,  113,   59,   60,   61,   62,   63,   64,   65,   66,
 /*   530 */    67,   68,   69,   70,   71,  181,   73,   74,   75,   76,
 /*   540 */    77,   78,   79,   80,   81,   82,   16,   22,  146,   79,

 /*   550 */    20,  146,  109,  146,   86,   87,   86,   87,   53,   53,
 /*   560 */    55,   55,  146,  190,  146,  122,  105,  146,  107,  108,
 /*   570 */   168,  169,   42,  168,  169,  168,  169,   86,  225,  225,
 /*   580 */     7,    8,    9,   96,  168,  169,  168,  169,  160,   59,
 /*   590 */    60,   61,   62,   63,   64,   65,   66,   67,   68,   69,
 /*   600 */    70,   71,  146,   73,   74,   75,   76,   77,   78,   79,
 /*   610 */    80,   81,   82,   16,   98,   99,  100,   20,  146,  146,
 /*   620 */   146,  146,  146,  146,  168,  169,  146,  199,  146,  105,
 /*   630 */   146,  107,  108,  212,   98,   99,  100,  112,  132,   42,
 /*   640 */   168,  169,  168,  169,  168,  169,  184,  185,  168,  169,
 /*   650 */   168,  169,  168,  169,  181,  146,   59,   60,   61,   62,
 /*   660 */    63,   64,   65,   66,   67,   68,   69,   70,   71,  146,
 /*   670 */    73,   74,   75,   76,   77,   78,   79,   80,   81,   82,
 /*   680 */    16,  146,  207,   22,  207,   21,  146,  146,  146,  146,
 /*   690 */   146,  168,  169,  146,  160,  146,  187,  146,  225,  200,
 /*   700 */   201,  106,  146,  168,  169,  110,   42,  146,  168,  169,
 /*   710 */   168,  169,  168,  169,   16,  168,  169,  168,  169,  168,
 /*   720 */   169,  146,  181,   59,   60,   61,   62,   63,   64,   65,
 /*   730 */    66,   67,   68,   69,   70,   71,  146,   73,   74,   75,
 /*   740 */    76,   77,   78,   79,   80,   81,   82,   16,  146,  146,
 /*   750 */   146,   25,  146,  146,  146,   29,  146,   22,  168,  169,
 /*   760 */   146,  129,  187,  131,  146,  202,  225,   41,  212,  146,
 /*   770 */   168,  169,  146,   42,  168,  169,  168,  169,  168,  169,
 /*   780 */   146,  120,  168,  169,  181,  181,  168,  169,   90,   79,
 /*   790 */    59,   60,   61,   62,   63,   64,   65,   66,   67,   68,
 /*   800 */    69,   70,   71,  146,   73,   74,   75,   76,   77,   78,
 /*   810 */    79,   80,   81,   82,   16,  146,  106,  154,   90,  146,
 /*   820 */   110,  146,   87,  146,   19,  168,  169,  146,  225,  225,
 /*   830 */   102,   19,  146,   21,  123,  124,  146,  168,  169,  177,
 /*   840 */    42,  168,  169,  168,  169,  168,  169,  177,  113,  168,
 /*   850 */   169,  188,  146,  146,  168,  169,  177,   59,   60,   61,
 /*   860 */    62,   63,   64,   65,   66,   67,   68,   69,   70,   71,
 /*   870 */   146,   73,   74,   75,   76,   77,   78,   79,   80,   81,
 /*   880 */    82,   16,  146,    7,    8,  146,  146,  154,  146,   20,
 /*   890 */   146,   22,  168,  169,  187,   20,  146,   22,   20,   20,
 /*   900 */    22,   22,   89,   90,  168,  169,  146,   42,  168,  169,
 /*   910 */   168,  169,  168,  169,  146,  146,  111,  146,  146,  154,
 /*   920 */    20,  188,   22,  146,   16,   60,   61,   62,   63,   64,
 /*   930 */    65,   66,   67,   68,   69,   70,   71,  187,   73,   74,
 /*   940 */    75,   76,   77,   78,   79,   80,   81,   82,  146,   20,
 /*   950 */    42,   22,   20,  188,   22,  187,  187,   19,  187,  187,
 /*   960 */   230,  154,  154,   51,   52,   20,   20,   22,   22,   61,
 /*   970 */    62,   63,   64,   65,   66,   67,   68,   69,   70,   71,
 /*   980 */   231,   73,   74,   75,   76,   77,   78,   79,   80,   81,
 /*   990 */    82,   16,   17,  146,   19,  188,  188,   20,   23,   22,
 /*  1000 */    20,  146,   22,  146,  146,   67,   31,   16,   17,  237,
 /*  1010 */    19,  148,  146,  146,   23,  171,  146,  146,  146,  146,
 /*  1020 */   146,  190,   31,   48,  192,  222,  146,  227,  227,  176,
 /*  1030 */   171,  171,  171,   58,  172,  171,  193,    6,  193,   48,
 /*  1040 */   145,  145,  145,  145,   22,  153,   97,  170,   40,   58,
 /*  1050 */    96,  170,   77,   78,  170,  172,  170,  120,  117,  115,
 /*  1060 */    85,   86,   87,  178,  196,   90,  118,  221,   77,   78,
 /*  1070 */    79,  119,  129,  111,  151,  188,   85,   86,   87,   16,
 /*  1080 */    17,   90,   19,  193,  109,  194,   23,   95,  195,   23,
 /*  1090 */   159,  197,  210,  151,   31,   97,  114,   19,  123,  124,
 /*  1100 */   125,  126,  127,  128,  203,  178,  204,  203,  173,  210,
 /*  1110 */   204,   48,  159,  210,  123,  124,  125,  126,  127,  128,
 /*  1120 */   210,   58,    5,  173,   15,  170,  170,   10,   11,   12,
 /*  1130 */    13,  170,  151,  150,   38,   19,  151,  151,  151,   23,
 /*  1140 */    77,   78,  129,   26,  233,   28,  232,  150,   85,   86,
 /*  1150 */    87,  151,   35,   90,  170,  183,   59,  183,   19,  193,
 /*  1160 */    15,  214,  186,  193,   47,  186,   49,  151,   33,  235,
 /*  1170 */   151,   54,  214,   56,   58,  186,  183,  151,  136,  158,
 /*  1180 */   174,  174,    1,   20,   32,   44,  123,  124,  125,  126,
 /*  1190 */   127,  128,  235,   77,   78,   19,  111,  238,  111,  111,
 /*  1200 */   111,   19,   86,   20,   20,   90,   90,  106,   19,   11,
 /*  1210 */    19,  116,   20,   20,  116,   98,   99,  100,   22,   22,
 /*  1220 */   113,  104,   22,   19,  111,   20,  109,   20,   19,   44,
 /*  1230 */    20,   19,   19,   19,   44,  102,   94,   16,   21,  123,
 /*  1240 */   124,  125,   17,   97,   36,   22,   45,   45,   97,   19,
 /*  1250 */   133,  132,    5,   11,    1,  101,   19,  121,   17,  112,
 /*  1260 */   112,   67,   67,  101,  121,   19,   14,  135,   20,    3,
 /*  1270 */   239,  134,   57,    4,
};
#define YY_SHIFT_USE_DFLT (-98)
#define YY_SHIFT_MAX 371
static const short yy_shift_ofst[] = {
 /*     0 */   221,  975, 1117,  -16,  975, 1063, 1063, 1063,   49,  115,
 /*    10 */   115,  -97,  118, 1063, 1063, 1063, 1063, 1063,  -45,  131,
 /*    20 */   116,  328,  225,  225,   51,  185,  252,  324,  396,  463,
 /*    30 */   530,  597,  664,  731,  798,  731,  731,  731,  731,  731,
 /*    40 */   731,  731,  731,  731,  731,  731,  731,  731,  731,  731,
 /*    50 */   731,  731,  865,  908,  908,  991, 1063, 1063, 1063, 1063,
 /*    60 */  1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
 /*    70 */  1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
 /*    80 */  1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
 /*    90 */  1063, 1063, 1063, 1063,  -60,  -60,  -14,   27,   27,   94,
 /*   100 */    86,  399,  116,  116,  116,  116,  151,  116,  116,  116,
 /*   110 */   328,  -59,  -98,  -98,  -98, 1116,   53,  398,  398,  502,
 /*   120 */   491,  116,  491,  116,  116,  116,  116,  116,  116,  116,
 /*   130 */   116,  116,  116,  116,  116,  116,   29,  443,  -97,  -97,
 /*   140 */   -97,  -98,  -98,  147,  147,  128,  272,  403,  262,  410,
 /*   150 */   461,  412,  268,  408,  468,  470,  573,  116,  116,  710,
 /*   160 */   116,  116,   73,  116,  116,  735,  116,  116,  524,  735,
 /*   170 */   116,  116,  312,  312,  312,  116,  116,  524,  116,  116,
 /*   180 */   524,  116,  726,  516,  116,  116,  524,  116,  116,  116,
 /*   190 */   524,  116,  524,  524,  116,  116,  116,  116,  116,  116,
 /*   200 */   812,  458,  595,  525,  711,  711,  632,  458,  458,   56,
 /*   210 */   458,  458,  487,  661,  661, 1031, 1031, 1031, 1031, 1022,
 /*   220 */   949,  949, 1008,  949,  954,  949,  -97,  937,  941,  948,
 /*   230 */   944,  952,  943,  962,  992, 1066,  992,  962,  998,  982,
 /*   240 */   998,  982, 1078,  992,  992, 1066, 1008,  949,  949,  949,
 /*   250 */  1078, 1109,  962,  962,  962,  962, 1096, 1013, 1109,  962,
 /*   260 */   949, 1097, 1097, 1139,  937, 1145, 1145, 1145,  937, 1097,
 /*   270 */  1139,  962, 1135, 1135,  962,  962, 1042,  -98,  -98,  -98,
 /*   280 */   148,  506,  536,  505,  728,  876,  805,  869,  698,  875,
 /*   290 */   878,  879,  813,  900,  929,  932,  912,  945,  946,  977,
 /*   300 */   980,  938, 1181, 1163, 1152, 1141, 1176, 1085, 1087, 1088,
 /*   310 */  1089, 1182, 1183, 1184, 1115, 1101, 1189, 1198, 1191, 1192,
 /*   320 */  1196, 1193, 1095, 1197, 1098, 1200, 1107, 1204, 1205, 1113,
 /*   330 */  1207, 1185, 1209, 1210, 1212, 1213, 1190, 1214, 1142, 1133,
 /*   340 */  1221, 1225, 1217, 1146, 1208, 1201, 1223, 1202, 1119, 1151,
 /*   350 */  1230, 1247, 1242, 1253, 1154, 1194, 1195, 1136, 1237, 1147,
 /*   360 */  1241, 1148, 1162, 1143, 1246, 1248, 1252, 1215, 1137, 1132,
 /*   370 */  1266, 1269,
};
#define YY_REDUCE_USE_DFLT (-216)
#define YY_REDUCE_MAX 279
static const short yy_reduce_ofst[] = {
 /*     0 */   -56,  136,   16,   70,  189,  127,   66,  130,  190,  219,
 /*    10 */   255,  220,   61,  132,  138,  210,  265,  271, -178, -140,
 /*    20 */   -61,   79,  145,  264, -215, -215, -215, -215, -215, -215,
 /*    30 */  -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
 /*    40 */  -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
 /*    50 */  -215, -215, -215, -215, -215,  402,  405,  407,  416,  418,
 /*    60 */   456,  472,  474,  476,  480,  482,  484,  523,  535,  540,
 /*    70 */   542,  544,  547,  549,  551,  590,  602,  606,  608,  610,
 /*    80 */   614,  618,  657,  669,  673,  675,  677,  681,  686,  724,
 /*    90 */   736,  740,  742,  744, -215, -215,  -77, -215, -215, -215,
 /*   100 */  -215,   50,  354,  473,  541,  603,  144,  604,  772,  342,
 /*   110 */   284, -215, -215, -215, -215,  282,  251,  322,  462,  -72,
 /*   120 */   177,  306,  428,  353,  193,  475,  421,  477,  509,  575,
 /*   130 */   707,  750,  768,  771,  556,  769,  663,  733,  765,  807,
 /*   140 */   808,  -42,  499, -126, -112,  -57,  -19,   18,   96,   18,
 /*   150 */    18,   72,  141,  146,  198,  250,  223,  336,  370,  373,
 /*   160 */   250,  543,  534,  561,  607,  563,  623,  626,   18,  563,
 /*   170 */   634,  690,  662,  670,  679,  706,  739,   18,  760,  777,
 /*   180 */    18,  802,  730,  749,  847,  855,   18,  857,  858,  866,
 /*   190 */    18,  867,   18,   18,  870,  871,  872,  873,  874,  880,
 /*   200 */   863,  844,  831,  832,  800,  801,  803,  859,  860,  853,
 /*   210 */   861,  864,  862,  843,  845,  895,  896,  897,  898,  892,
 /*   220 */   877,  881,  885,  884,  883,  886,  887,  890,  891,  893,
 /*   230 */   868,  894,  846,  923,  882,  931,  899,  942,  901,  902,
 /*   240 */   904,  906,  935,  903,  910,  953,  927,  955,  956,  961,
 /*   250 */   950,  983,  981,  985,  986,  987,  914,  911,  997, 1000,
 /*   260 */   984,  972,  974,  947,  966,  976,  979,  989,  970,  993,
 /*   270 */   958, 1016,  934,  957, 1019, 1026,  959, 1021, 1006, 1007,
};
static const YYACTIONTYPE yy_default[] = {
 /*     0 */   567,  791,  856,  682,  856,  791,  856,  791,  856,  829,
 /*    10 */   829,  686,  842,  787,  791,  856,  856,  856,  762,  813,
 /*    20 */   856,  598,  813,  813,  717,  856,  856,  856,  856,  856,
 /*    30 */   856,  856,  856,  718,  856,  790,  786,  782,  784,  783,
 /*    40 */   719,  706,  715,  722,  698,  827,  724,  725,  730,  731,
 /*    50 */   843,  846,  752,  768,  751,  856,  856,  856,  856,  856,
 /*    60 */   856,  856,  856,  856,  856,  856,  856,  856,  856,  856,
 /*    70 */   856,  856,  856,  856,  856,  856,  856,  856,  856,  856,
 /*    80 */   856,  856,  856,  856,  856,  856,  856,  856,  856,  856,
 /*    90 */   856,  856,  856,  856,  754,  773,  591,  753,  761,  755,
 /*   100 */   756,  651,  856,  856,  856,  856,  586,  856,  856,  856,
 /*   110 */   856,  757,  758,  769,  770,  856,  856,  856,  856,  567,
 /*   120 */   682,  856,  682,  856,  856,  856,  856,  856,  856,  856,
 /*   130 */   856,  856,  856,  856,  856,  856,  856,  856,  856,  856,
 /*   140 */   856,  676,  686,  856,  856,  642,  856,  856,  856,  856,

 /*   150 */   856,  856,  856,  856,  856,  856,  574,  572,  856,  674,
 /*   160 */   856,  856,  600,  856,  856,  684,  856,  856,  689,  690,

 /*   170 */   856,  856,  856,  856,  856,  856,  856,  588,  856,  856,
 /*   180 */   663,  856,  819,  856,  856,  856,  834,  856,  856,  856,
 /*   190 */   832,  856,  665,  727,  801,  856,  856,  847,  849,  856,
 /*   200 */   856,  709,  674,  683,  856,  856,  785,  709,  709,  621,
 /*   210 */   709,  709,  624,  721,  721,  571,  571,  571,  571,  641,
 /*   220 */   653,  653,  638,  653,  624,  653,  856,  721,  712,  714,
 /*   230 */   702,  716,  856,  691,  710,  856,  710,  691,  699,  701,
 /*   240 */   699,  701,  795,  710,  710,  856,  638,  653,  653,  653,
 /*   250 */   795,  583,  691,  691,  691,  691,  823,  826,  583,  691,
 /*   260 */   653,  655,  655,  732,  721,  662,  662,  662,  721,  655,
 /*   270 */   732,  691,  845,  845,  691,  691,  854,  608,  626,  626,
 /*   280 */   856,  856,  856,  856,  856,  856,  739,  856,  856,  856,
 /*   290 */   856,  856,  856,  856,  856,  856,  856,  856,  856,  856,
 /*   300 */   856,  808,  856,  856,  856,  856,  856,  744,  740,  856,
 /*   310 */   741,  856,  856,  856,  856,  668,  856,  856,  856,  856,
 /*   320 */   856,  856,  856,  703,  856,  713,  856,  856,  856,  856,
 /*   330 */   856,  856,  856,  856,  856,  856,  856,  856,  856,  856,
 /*   340 */   856,  856,  856,  856,  856,  821,  822,  856,  856,  856,
 /*   350 */   856,  856,  856,  856,  856,  856,  856,  856,  856,  856,
 /*   360 */   856,  856,  856,  856,  856,  856,  856,  853,  856,  856,
 /*   370 */   568,  856,  562,  565,  564,  566,  570,  573,  595,  596,
 /*   380 */   597,  575,  576,  577,  578,  579,  580,  581,  587,  589,
 /*   390 */   607,  609,  616,  654,  657,  658,  659,  837,  838,  839,
 /*   400 */   617,  636,  639,  640,  618,  625,  707,  708,  619,  672,
 /*   410 */   673,  736,  666,  667,  671,  738,  742,  743,  745,  746,
 /*   420 */   594,  601,  602,  605,  606,  809,  811,  810,  812,  604,
 /*   430 */   603,  747,  750,  759,  760,  766,  772,  775,  764,  765,
 /*   440 */   767,  771,  774,  669,  670,  778,  780,  781,  835,  836,
 /*   450 */   776,  788,  789,  692,  779,  763,  704,  593,  711,  705,
 /*   460 */   675,  685,  694,  695,  696,  697,  680,  681,  687,  700,
 /*   470 */   734,  735,  688,  677,  678,  679,  777,  737,  748,  749,
 /*   480 */   620,  627,  628,  629,  632,  633,  634,  635,  630,  631,
 /*   490 */   796,  797,  799,  798,  622,  623,  637,  610,  611,  612,
 /*   500 */   613,  744,  614,  615,  599,  592,  643,  646,  647,  648,
 /*   510 */   649,  650,  652,  644,  645,  590,  582,  584,  693,  815,
 /*   520 */   824,  825,  820,  816,  817,  818,  585,  792,  793,  656,
 /*   530 */   728,  729,  814,  828,  830,  733,  831,  833,  660,  661,
 /*   540 */   664,  800,  840,  720,  723,  726,  802,  803,  804,  805,
 /*   550 */   806,  807,  841,  844,  848,  850,  851,  852,  855,  569,
 /*   560 */   563,
};
#define YY_SZ_ACTTAB (sizeof(yy_action)/sizeof(yy_action[0]))

/* The next table maps tokens into fallback tokens.  If a construct
** like the following:
** 
Changes to SQLite.Interop/src/pragma.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
** 2003 April 6
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code used to implement the PRAGMA command.
**
** $Id: pragma.c,v 1.12 2006/01/10 21:10:18 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>

/* Ignore this whole file if pragmas are disabled
*/













|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
** 2003 April 6
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code used to implement the PRAGMA command.
**
** $Id: pragma.c,v 1.13 2006/01/11 03:22:29 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>

/* Ignore this whole file if pragmas are disabled
*/
Changes to SQLite.Interop/src/prepare.c.
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains the implementation of the sqlite3_prepare()
** interface, and routines that contribute to loading the database schema
** from disk.
**
** $Id: prepare.c,v 1.8 2006/01/10 21:10:18 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>

/*
** Fill the InitData structure with an error message that indicates







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains the implementation of the sqlite3_prepare()
** interface, and routines that contribute to loading the database schema
** from disk.
**
** $Id: prepare.c,v 1.9 2006/01/11 03:22:29 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>

/*
** Fill the InitData structure with an error message that indicates
Changes to SQLite.Interop/src/random.c.
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
*************************************************************************
** This file contains code to implement a pseudo-random number
** generator (PRNG) for SQLite.
**
** Random numbers are used by some of the database backends in order
** to generate random integer keys for tables or random filenames.
**
** $Id: random.c,v 1.12 2006/01/10 21:10:18 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include "os.h"


/*
** Get a single 8-bit random value from the RC4 PRNG.  The Mutex







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
*************************************************************************
** This file contains code to implement a pseudo-random number
** generator (PRNG) for SQLite.
**
** Random numbers are used by some of the database backends in order
** to generate random integer keys for tables or random filenames.
**
** $Id: random.c,v 1.13 2006/01/11 03:22:29 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include "os.h"


/*
** Get a single 8-bit random value from the RC4 PRNG.  The Mutex
Changes to SQLite.Interop/src/select.c.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains C code routines that are called by the parser
** to handle SELECT statements in SQLite.
**
** $Id: select.c,v 1.12 2006/01/10 21:10:18 rmsimpson Exp $
*/
#include "sqliteInt.h"


/*
** Allocate a new Select structure and return a pointer to that
** structure.







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains C code routines that are called by the parser
** to handle SELECT statements in SQLite.
**
** $Id: select.c,v 1.13 2006/01/11 03:22:30 rmsimpson Exp $
*/
#include "sqliteInt.h"


/*
** Allocate a new Select structure and return a pointer to that
** structure.
Changes to SQLite.Interop/src/server.c.
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
** This routine implements the server.  To start the server, first
** make sure g.serverHalt is false, then create a new detached thread
** on this procedure.  See the sqlite3_server_start() routine below
** for an example.  This procedure loops until g.serverHalt becomes
** true.
*/
void *sqlite3_server(void *NotUsed){
  sqlite3_enable_shared_cache(1);
  if( pthread_mutex_trylock(&g.serverMutex) ){
    return 0;  /* Another server is already running */
  }
  while( !g.serverHalt ){
    SqlMessage *pMsg;

    /* Remove the last message from the message queue.







<







327
328
329
330
331
332
333

334
335
336
337
338
339
340
** This routine implements the server.  To start the server, first
** make sure g.serverHalt is false, then create a new detached thread
** on this procedure.  See the sqlite3_server_start() routine below
** for an example.  This procedure loops until g.serverHalt becomes
** true.
*/
void *sqlite3_server(void *NotUsed){

  if( pthread_mutex_trylock(&g.serverMutex) ){
    return 0;  /* Another server is already running */
  }
  while( !g.serverHalt ){
    SqlMessage *pMsg;

    /* Remove the last message from the message queue.
Changes to SQLite.Interop/src/shell.c.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code to implement the "sqlite" command line
** utility for accessing SQLite databases.
**
** $Id: shell.c,v 1.12 2006/01/10 21:10:18 rmsimpson Exp $
*/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "sqlite3.h"
#include <ctype.h>







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code to implement the "sqlite" command line
** utility for accessing SQLite databases.
**
** $Id: shell.c,v 1.13 2006/01/11 03:22:29 rmsimpson Exp $
*/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "sqlite3.h"
#include <ctype.h>
Changes to SQLite.Interop/src/sqlite3.def.
36
37
38
39
40
41
42


43
44
45
46
47
48
49
sqlite3_complete16
sqlite3_create_collation
sqlite3_create_collation16
sqlite3_create_function
sqlite3_create_function16
sqlite3_data_count
sqlite3_db_handle


sqlite3_errcode
sqlite3_errmsg
sqlite3_errmsg16
sqlite3_exec
sqlite3_expired
sqlite3_finalize
sqlite3_free







>
>







36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
sqlite3_complete16
sqlite3_create_collation
sqlite3_create_collation16
sqlite3_create_function
sqlite3_create_function16
sqlite3_data_count
sqlite3_db_handle
sqlite3_enable_memory_management
sqlite3_enable_shared_cache
sqlite3_errcode
sqlite3_errmsg
sqlite3_errmsg16
sqlite3_exec
sqlite3_expired
sqlite3_finalize
sqlite3_free
58
59
60
61
62
63
64

65
66
67
68
69
70
71
72
73
74
75
76
77

78
79
80

81
82
83
84

85
86
87
88
89
90
91
92
93
94
95
96
97
sqlite3_libversion_number
sqlite3_mprintf
sqlite3_open
sqlite3_open16
sqlite3_prepare
sqlite3_prepare16
sqlite3_progress_handler

sqlite3_reset
sqlite3_result_blob
sqlite3_result_double
sqlite3_result_error
sqlite3_result_error16
sqlite3_result_int
sqlite3_result_int64
sqlite3_result_null
sqlite3_result_text
sqlite3_result_text16
sqlite3_result_text16be
sqlite3_result_text16le
sqlite3_result_value

sqlite3_set_authorizer
sqlite3_set_auxdata
sqlite3_snprintf

sqlite3_step
sqlite3_total_changes
sqlite3_trace
sqlite3_transfer_bindings

sqlite3_user_data
sqlite3_value_blob
sqlite3_value_bytes
sqlite3_value_bytes16
sqlite3_value_double
sqlite3_value_int
sqlite3_value_int64
sqlite3_value_text
sqlite3_value_text16
sqlite3_value_text16be
sqlite3_value_text16le
sqlite3_value_type
sqlite3_vmprintf







>













>



>




>













60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
sqlite3_libversion_number
sqlite3_mprintf
sqlite3_open
sqlite3_open16
sqlite3_prepare
sqlite3_prepare16
sqlite3_progress_handler
sqlite3_release_memory
sqlite3_reset
sqlite3_result_blob
sqlite3_result_double
sqlite3_result_error
sqlite3_result_error16
sqlite3_result_int
sqlite3_result_int64
sqlite3_result_null
sqlite3_result_text
sqlite3_result_text16
sqlite3_result_text16be
sqlite3_result_text16le
sqlite3_result_value
sqlite3_rollback_hook
sqlite3_set_authorizer
sqlite3_set_auxdata
sqlite3_snprintf
sqlite3_soft_heap_limit
sqlite3_step
sqlite3_total_changes
sqlite3_trace
sqlite3_transfer_bindings
sqlite3_update_hook
sqlite3_user_data
sqlite3_value_blob
sqlite3_value_bytes
sqlite3_value_bytes16
sqlite3_value_double
sqlite3_value_int
sqlite3_value_int64
sqlite3_value_text
sqlite3_value_text16
sqlite3_value_text16be
sqlite3_value_text16le
sqlite3_value_type
sqlite3_vmprintf
Changes to SQLite.Interop/src/sqlite3.h.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This header file defines the interface that the SQLite library
** presents to client programs.
**
** @(#) $Id: sqlite3.h,v 1.13 2006/01/10 21:10:18 rmsimpson 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++.
*/
#ifdef __cplusplus
extern "C" {
#endif

/*
** The version of the SQLite library.
*/
#ifdef SQLITE_VERSION
# undef SQLITE_VERSION
#endif
#define SQLITE_VERSION         "3.2.8beta"

/*
** The format of the version string is "X.Y.Z<trailing string>", where
** X is the major version number, Y is the minor version number and Z
** is the release number. The trailing string is often "alpha" or "beta".
** For example "3.1.1beta".
**
** The SQLITE_VERSION_NUMBER is an integer with the value 
** (X*100000 + Y*1000 + Z). For example, for version "3.1.1beta", 
** SQLITE_VERSION_NUMBER is set to 3001001. To detect if they are using 
** version 3.1.1 or greater at compile time, programs may use the test 
** (SQLITE_VERSION_NUMBER>=3001001).
*/
#ifdef SQLITE_VERSION_NUMBER
# undef SQLITE_VERSION_NUMBER
#endif
#define SQLITE_VERSION_NUMBER 3002008

/*
** The version string is also compiled into the library so that a program
** can check to make sure that the lib*.a file and the *.h file are from
** the same version.  The sqlite3_libversion() function returns a pointer
** to the sqlite3_version variable - useful in DLLs which cannot access
** global variables.







|


















|
















|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This header file defines the interface that the SQLite library
** presents to client programs.
**
** @(#) $Id: sqlite3.h,v 1.14 2006/01/11 03:22:30 rmsimpson 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++.
*/
#ifdef __cplusplus
extern "C" {
#endif

/*
** The version of the SQLite library.
*/
#ifdef SQLITE_VERSION
# undef SQLITE_VERSION
#endif
#define SQLITE_VERSION         "3.3.0"

/*
** The format of the version string is "X.Y.Z<trailing string>", where
** X is the major version number, Y is the minor version number and Z
** is the release number. The trailing string is often "alpha" or "beta".
** For example "3.1.1beta".
**
** The SQLITE_VERSION_NUMBER is an integer with the value 
** (X*100000 + Y*1000 + Z). For example, for version "3.1.1beta", 
** SQLITE_VERSION_NUMBER is set to 3001001. To detect if they are using 
** version 3.1.1 or greater at compile time, programs may use the test 
** (SQLITE_VERSION_NUMBER>=3001001).
*/
#ifdef SQLITE_VERSION_NUMBER
# undef SQLITE_VERSION_NUMBER
#endif
#define SQLITE_VERSION_NUMBER 3003000

/*
** The version string is also compiled into the library so that a program
** can check to make sure that the lib*.a file and the *.h file are from
** the same version.  The sqlite3_libversion() function returns a pointer
** to the sqlite3_version variable - useful in DLLs which cannot access
** global variables.
Changes to SQLite.Interop/src/sqliteInt.h.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
** 2001 September 15
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Internal interface definitions for SQLite.
**
** @(#) $Id: sqliteInt.h,v 1.12 2006/01/10 21:10:18 rmsimpson Exp $
*/
#ifndef _SQLITEINT_H_
#define _SQLITEINT_H_

/*
** Extra interface definitions for those who need them
*/













|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
** 2001 September 15
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Internal interface definitions for SQLite.
**
** @(#) $Id: sqliteInt.h,v 1.13 2006/01/11 03:22:30 rmsimpson Exp $
*/
#ifndef _SQLITEINT_H_
#define _SQLITEINT_H_

/*
** Extra interface definitions for those who need them
*/
Changes to SQLite.Interop/src/tclsqlite.c.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
** 2001 September 15
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** A TCL Interface to SQLite
**
** $Id: tclsqlite.c,v 1.12 2006/01/10 21:10:18 rmsimpson Exp $
*/
#ifndef NO_TCL     /* Omit this whole file if TCL is unavailable */

#include "sqliteInt.h"
#include "hash.h"
#include "tcl.h"
#include <stdlib.h>













|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
** 2001 September 15
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** A TCL Interface to SQLite
**
** $Id: tclsqlite.c,v 1.13 2006/01/11 03:22:30 rmsimpson Exp $
*/
#ifndef NO_TCL     /* Omit this whole file if TCL is unavailable */

#include "sqliteInt.h"
#include "hash.h"
#include "tcl.h"
#include <stdlib.h>
Changes to SQLite.Interop/src/tokenize.c.
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
*************************************************************************
** An tokenizer for SQL
**
** This file contains C code that splits an SQL input string up into
** individual tokens and sends those tokens one-by-one over to the
** parser for analysis.
**
** $Id: tokenize.c,v 1.15 2006/01/10 21:10:18 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>
#include <stdlib.h>

/*







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
*************************************************************************
** An tokenizer for SQL
**
** This file contains C code that splits an SQL input string up into
** individual tokens and sends those tokens one-by-one over to the
** parser for analysis.
**
** $Id: tokenize.c,v 1.16 2006/01/11 03:22:30 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>
#include <stdlib.h>

/*
Changes to SQLite.Interop/src/update.c.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains C code routines that are called by the parser
** to handle UPDATE statements.
**
** $Id: update.c,v 1.12 2006/01/10 21:10:18 rmsimpson Exp $
*/
#include "sqliteInt.h"

/*
** The most recently coded instruction was an OP_Column to retrieve the
** i-th column of table pTab. This routine sets the P3 parameter of the 
** OP_Column to the default value, if any.







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains C code routines that are called by the parser
** to handle UPDATE statements.
**
** $Id: update.c,v 1.13 2006/01/11 03:22:30 rmsimpson Exp $
*/
#include "sqliteInt.h"

/*
** The most recently coded instruction was an OP_Column to retrieve the
** i-th column of table pTab. This routine sets the P3 parameter of the 
** OP_Column to the default value, if any.
Changes to SQLite.Interop/src/utf.c.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains routines used to translate between UTF-8, 
** UTF-16, UTF-16BE, and UTF-16LE.
**
** $Id: utf.c,v 1.12 2006/01/10 21:10:18 rmsimpson Exp $
**
** Notes on UTF-8:
**
**   Byte-0    Byte-1    Byte-2    Byte-3    Value
**  0xxxxxxx                                 00000000 00000000 0xxxxxxx
**  110yyyyy  10xxxxxx                       00000000 00000yyy yyxxxxxx
**  1110zzzz  10yyyyyy  10xxxxxx             00000000 zzzzyyyy yyxxxxxx







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains routines used to translate between UTF-8, 
** UTF-16, UTF-16BE, and UTF-16LE.
**
** $Id: utf.c,v 1.13 2006/01/11 03:22:30 rmsimpson Exp $
**
** Notes on UTF-8:
**
**   Byte-0    Byte-1    Byte-2    Byte-3    Value
**  0xxxxxxx                                 00000000 00000000 0xxxxxxx
**  110yyyyy  10xxxxxx                       00000000 00000yyy yyxxxxxx
**  1110zzzz  10yyyyyy  10xxxxxx             00000000 zzzzyyyy yyxxxxxx
Changes to SQLite.Interop/src/util.c.
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
**
*************************************************************************
** Utility functions used throughout sqlite.
**
** This file contains functions for allocating memory, comparing
** strings, and stuff like that.
**
** $Id: util.c,v 1.13 2006/01/10 21:10:18 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <stdarg.h>
#include <ctype.h>

/*







|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
**
*************************************************************************
** Utility functions used throughout sqlite.
**
** This file contains functions for allocating memory, comparing
** strings, and stuff like that.
**
** $Id: util.c,v 1.14 2006/01/11 03:22:30 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <stdarg.h>
#include <ctype.h>

/*
Changes to SQLite.Interop/src/vacuum.c.
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
**
*************************************************************************
** This file contains code used to implement the VACUUM command.
**
** Most of the code in this file may be omitted by defining the
** SQLITE_OMIT_VACUUM macro.
**
** $Id: vacuum.c,v 1.12 2006/01/10 21:10:18 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include "vdbeInt.h"
#include "os.h"

#ifndef SQLITE_OMIT_VACUUM
/*







|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
**
*************************************************************************
** This file contains code used to implement the VACUUM command.
**
** Most of the code in this file may be omitted by defining the
** SQLITE_OMIT_VACUUM macro.
**
** $Id: vacuum.c,v 1.13 2006/01/11 03:22:30 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include "vdbeInt.h"
#include "os.h"

#ifndef SQLITE_OMIT_VACUUM
/*
Changes to SQLite.Interop/src/vdbe.c.
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
**
** Various scripts scan this source file in order to generate HTML
** documentation, headers files, or other derived files.  The formatting
** of the code in this file is, therefore, important.  See other comments
** in this file for details.  If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
** $Id: vdbe.c,v 1.12 2006/01/10 21:10:18 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>
#include "vdbeInt.h"

/*







|







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
**
** Various scripts scan this source file in order to generate HTML
** documentation, headers files, or other derived files.  The formatting
** of the code in this file is, therefore, important.  See other comments
** in this file for details.  If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
** $Id: vdbe.c,v 1.13 2006/01/11 03:22:30 rmsimpson Exp $
*/
#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>
#include "vdbeInt.h"

/*
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
  }
  pC->rowidIsValid = 0;
  break;
}

/* Opcode: IdxInsert P1 * *
**
** The top of the stack holds a SQL index key made using the
** MakeIdxRec instruction.  This opcode writes that key into the
** index P1.  Data for the entry is nil.
**
** This instruction only works for indices.  The equivalent instruction
** for tables is OP_Insert.
*/
case OP_IdxInsert: {        /* no-push */
  int i = pOp->p1;
  Cursor *pC;







|
|
|







3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
  }
  pC->rowidIsValid = 0;
  break;
}

/* Opcode: IdxInsert P1 * *
**
** The top of the stack holds a SQL index key made using either the
** MakeIdxRec or MakeRecord instructions.  This opcode writes that key
** into the index P1.  Data for the entry is nil.
**
** This instruction only works for indices.  The equivalent instruction
** for tables is OP_Insert.
*/
case OP_IdxInsert: {        /* no-push */
  int i = pOp->p1;
  Cursor *pC;
3680
3681
3682
3683
3684
3685
3686
3687

3688
3689
3690
3691
3692
3693
3694
  Release(pTos);
  pTos--;
  break;
}

/* Opcode: IdxDelete P1 * *
**
** The top of the stack is an index key built using the MakeIdxRec opcode.

** This opcode removes that entry from the index.
*/
case OP_IdxDelete: {        /* no-push */
  int i = pOp->p1;
  Cursor *pC;
  BtCursor *pCrsr;
  assert( pTos>=p->aStack );







|
>







3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
  Release(pTos);
  pTos--;
  break;
}

/* Opcode: IdxDelete P1 * *
**
** The top of the stack is an index key built using the either the
** MakeIdxRec or MakeRecord opcodes.
** This opcode removes that entry from the index.
*/
case OP_IdxDelete: {        /* no-push */
  int i = pOp->p1;
  Cursor *pC;
  BtCursor *pCrsr;
  assert( pTos>=p->aStack );
Changes to SQLite.Interop/src/vdbe.h.
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
*************************************************************************
** Header file for the Virtual DataBase Engine (VDBE)
**
** This header defines the interface to the virtual database engine
** or VDBE.  The VDBE implements an abstract machine that runs a
** simple program to access and modify the underlying database.
**
** $Id: vdbe.h,v 1.12 2006/01/10 21:10:18 rmsimpson Exp $
*/
#ifndef _SQLITE_VDBE_H_
#define _SQLITE_VDBE_H_
#include <stdio.h>

/*
** A single VDBE is an opaque structure named "Vdbe".  Only routines







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
*************************************************************************
** Header file for the Virtual DataBase Engine (VDBE)
**
** This header defines the interface to the virtual database engine
** or VDBE.  The VDBE implements an abstract machine that runs a
** simple program to access and modify the underlying database.
**
** $Id: vdbe.h,v 1.13 2006/01/11 03:22:30 rmsimpson Exp $
*/
#ifndef _SQLITE_VDBE_H_
#define _SQLITE_VDBE_H_
#include <stdio.h>

/*
** A single VDBE is an opaque structure named "Vdbe".  Only routines
Changes to SQLite.Interop/src/where.c.
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
** This module contains C code that generates VDBE code used to process
** the WHERE clause of SQL statements.  This module is reponsible for
** generating the code that loops through a table looking for applicable
** rows.  Indices are selected and used to speed the search when doing
** so is applicable.  Because this module is responsible for selecting
** indices, you might also think of this module as the "query optimizer".
**
** $Id: where.c,v 1.14 2006/01/10 21:10:18 rmsimpson Exp $
*/
#include "sqliteInt.h"

/*
** The number of bits in a Bitmask.  "BMS" means "BitMask Size".
*/
#define BMS  (sizeof(Bitmask)*8)







|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
** This module contains C code that generates VDBE code used to process
** the WHERE clause of SQL statements.  This module is reponsible for
** generating the code that loops through a table looking for applicable
** rows.  Indices are selected and used to speed the search when doing
** so is applicable.  Because this module is responsible for selecting
** indices, you might also think of this module as the "query optimizer".
**
** $Id: where.c,v 1.15 2006/01/11 03:22:30 rmsimpson Exp $
*/
#include "sqliteInt.h"

/*
** The number of bits in a Bitmask.  "BMS" means "BitMask Size".
*/
#define BMS  (sizeof(Bitmask)*8)