os/persistentdata/persistentstorage/sqlite3api/SQLite/parse.c
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
/* Driver template for the LEMON parser generator.
sl@0
     2
** The author disclaims copyright to this source code.
sl@0
     3
*/
sl@0
     4
/* First off, code is included that follows the "include" declaration
sl@0
     5
** in the input grammar file. */
sl@0
     6
#include <stdio.h>
sl@0
     7
#line 51 "parse.y"
sl@0
     8
sl@0
     9
#include "sqliteInt.h"
sl@0
    10
sl@0
    11
/*
sl@0
    12
** An instance of this structure holds information about the
sl@0
    13
** LIMIT clause of a SELECT statement.
sl@0
    14
*/
sl@0
    15
struct LimitVal {
sl@0
    16
  Expr *pLimit;    /* The LIMIT expression.  NULL if there is no limit */
sl@0
    17
  Expr *pOffset;   /* The OFFSET expression.  NULL if there is none */
sl@0
    18
};
sl@0
    19
sl@0
    20
/*
sl@0
    21
** An instance of this structure is used to store the LIKE,
sl@0
    22
** GLOB, NOT LIKE, and NOT GLOB operators.
sl@0
    23
*/
sl@0
    24
struct LikeOp {
sl@0
    25
  Token eOperator;  /* "like" or "glob" or "regexp" */
sl@0
    26
  int not;         /* True if the NOT keyword is present */
sl@0
    27
};
sl@0
    28
sl@0
    29
/*
sl@0
    30
** An instance of the following structure describes the event of a
sl@0
    31
** TRIGGER.  "a" is the event type, one of TK_UPDATE, TK_INSERT,
sl@0
    32
** TK_DELETE, or TK_INSTEAD.  If the event is of the form
sl@0
    33
**
sl@0
    34
**      UPDATE ON (a,b,c)
sl@0
    35
**
sl@0
    36
** Then the "b" IdList records the list "a,b,c".
sl@0
    37
*/
sl@0
    38
struct TrigEvent { int a; IdList * b; };
sl@0
    39
sl@0
    40
/*
sl@0
    41
** An instance of this structure holds the ATTACH key and the key type.
sl@0
    42
*/
sl@0
    43
struct AttachKey { int type;  Token key; };
sl@0
    44
sl@0
    45
#line 48 "parse.c"
sl@0
    46
/* Next is all token values, in a form suitable for use by makeheaders.
sl@0
    47
** This section will be null unless lemon is run with the -m switch.
sl@0
    48
*/
sl@0
    49
/* 
sl@0
    50
** These constants (all generated automatically by the parser generator)
sl@0
    51
** specify the various kinds of tokens (terminals) that the parser
sl@0
    52
** understands. 
sl@0
    53
**
sl@0
    54
** Each symbol here is a terminal symbol in the grammar.
sl@0
    55
*/
sl@0
    56
/* Make sure the INTERFACE macro is defined.
sl@0
    57
*/
sl@0
    58
#ifndef INTERFACE
sl@0
    59
# define INTERFACE 1
sl@0
    60
#endif
sl@0
    61
/* The next thing included is series of defines which control
sl@0
    62
** various aspects of the generated parser.
sl@0
    63
**    YYCODETYPE         is the data type used for storing terminal
sl@0
    64
**                       and nonterminal numbers.  "unsigned char" is
sl@0
    65
**                       used if there are fewer than 250 terminals
sl@0
    66
**                       and nonterminals.  "int" is used otherwise.
sl@0
    67
**    YYNOCODE           is a number of type YYCODETYPE which corresponds
sl@0
    68
**                       to no legal terminal or nonterminal number.  This
sl@0
    69
**                       number is used to fill in empty slots of the hash 
sl@0
    70
**                       table.
sl@0
    71
**    YYFALLBACK         If defined, this indicates that one or more tokens
sl@0
    72
**                       have fall-back values which should be used if the
sl@0
    73
**                       original value of the token will not parse.
sl@0
    74
**    YYACTIONTYPE       is the data type used for storing terminal
sl@0
    75
**                       and nonterminal numbers.  "unsigned char" is
sl@0
    76
**                       used if there are fewer than 250 rules and
sl@0
    77
**                       states combined.  "int" is used otherwise.
sl@0
    78
**    sqlite3ParserTOKENTYPE     is the data type used for minor tokens given 
sl@0
    79
**                       directly to the parser from the tokenizer.
sl@0
    80
**    YYMINORTYPE        is the data type used for all minor tokens.
sl@0
    81
**                       This is typically a union of many types, one of
sl@0
    82
**                       which is sqlite3ParserTOKENTYPE.  The entry in the union
sl@0
    83
**                       for base tokens is called "yy0".
sl@0
    84
**    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If
sl@0
    85
**                       zero the stack is dynamically sized using realloc()
sl@0
    86
**    sqlite3ParserARG_SDECL     A static variable declaration for the %extra_argument
sl@0
    87
**    sqlite3ParserARG_PDECL     A parameter declaration for the %extra_argument
sl@0
    88
**    sqlite3ParserARG_STORE     Code to store %extra_argument into yypParser
sl@0
    89
**    sqlite3ParserARG_FETCH     Code to extract %extra_argument from yypParser
sl@0
    90
**    YYNSTATE           the combined number of states.
sl@0
    91
**    YYNRULE            the number of rules in the grammar
sl@0
    92
**    YYERRORSYMBOL      is the code number of the error symbol.  If not
sl@0
    93
**                       defined, then do no error processing.
sl@0
    94
*/
sl@0
    95
#define YYCODETYPE unsigned char
sl@0
    96
#define YYNOCODE 241
sl@0
    97
#define YYACTIONTYPE unsigned short int
sl@0
    98
#define YYWILDCARD 59
sl@0
    99
#define sqlite3ParserTOKENTYPE Token
sl@0
   100
typedef union {
sl@0
   101
  sqlite3ParserTOKENTYPE yy0;
sl@0
   102
  Expr* yy2;
sl@0
   103
  struct {int value; int mask;} yy47;
sl@0
   104
  SrcList* yy67;
sl@0
   105
  ExprList* yy82;
sl@0
   106
  struct TrigEvent yy210;
sl@0
   107
  IdList* yy240;
sl@0
   108
  struct LimitVal yy244;
sl@0
   109
  TriggerStep* yy347;
sl@0
   110
  int yy412;
sl@0
   111
  struct LikeOp yy438;
sl@0
   112
  Select* yy459;
sl@0
   113
} YYMINORTYPE;
sl@0
   114
#ifndef YYSTACKDEPTH
sl@0
   115
#define YYSTACKDEPTH 100
sl@0
   116
#endif
sl@0
   117
#define sqlite3ParserARG_SDECL Parse *pParse;
sl@0
   118
#define sqlite3ParserARG_PDECL ,Parse *pParse
sl@0
   119
#define sqlite3ParserARG_FETCH Parse *pParse = yypParser->pParse
sl@0
   120
#define sqlite3ParserARG_STORE yypParser->pParse = pParse
sl@0
   121
#define YYNSTATE 570
sl@0
   122
#define YYNRULE 300
sl@0
   123
#define YYFALLBACK 1
sl@0
   124
#define YY_NO_ACTION      (YYNSTATE+YYNRULE+2)
sl@0
   125
#define YY_ACCEPT_ACTION  (YYNSTATE+YYNRULE+1)
sl@0
   126
#define YY_ERROR_ACTION   (YYNSTATE+YYNRULE)
sl@0
   127
sl@0
   128
/* The yyzerominor constant is used to initialize instances of
sl@0
   129
** YYMINORTYPE objects to zero. */
sl@0
   130
#ifdef __cplusplus
sl@0
   131
static YYMINORTYPE yyzerominor;
sl@0
   132
#else
sl@0
   133
static const YYMINORTYPE yyzerominor;
sl@0
   134
#endif
sl@0
   135
sl@0
   136
/* Next are the tables used to determine what action to take based on the
sl@0
   137
** current state and lookahead token.  These tables are used to implement
sl@0
   138
** functions that take a state number and lookahead value and return an
sl@0
   139
** action integer.  
sl@0
   140
**
sl@0
   141
** Suppose the action integer is N.  Then the action is determined as
sl@0
   142
** follows
sl@0
   143
**
sl@0
   144
**   0 <= N < YYNSTATE                  Shift N.  That is, push the lookahead
sl@0
   145
**                                      token onto the stack and goto state N.
sl@0
   146
**
sl@0
   147
**   YYNSTATE <= N < YYNSTATE+YYNRULE   Reduce by rule N-YYNSTATE.
sl@0
   148
**
sl@0
   149
**   N == YYNSTATE+YYNRULE              A syntax error has occurred.
sl@0
   150
**
sl@0
   151
**   N == YYNSTATE+YYNRULE+1            The parser accepts its input.
sl@0
   152
**
sl@0
   153
**   N == YYNSTATE+YYNRULE+2            No such action.  Denotes unused
sl@0
   154
**                                      slots in the yy_action[] table.
sl@0
   155
**
sl@0
   156
** The action table is constructed as a single large table named yy_action[].
sl@0
   157
** Given state S and lookahead X, the action is computed as
sl@0
   158
**
sl@0
   159
**      yy_action[ yy_shift_ofst[S] + X ]
sl@0
   160
**
sl@0
   161
** If the index value yy_shift_ofst[S]+X is out of range or if the value
sl@0
   162
** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
sl@0
   163
** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
sl@0
   164
** and that yy_default[S] should be used instead.  
sl@0
   165
**
sl@0
   166
** The formula above is for computing the action when the lookahead is
sl@0
   167
** a terminal symbol.  If the lookahead is a non-terminal (as occurs after
sl@0
   168
** a reduce action) then the yy_reduce_ofst[] array is used in place of
sl@0
   169
** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of
sl@0
   170
** YY_SHIFT_USE_DFLT.
sl@0
   171
**
sl@0
   172
** The following are the tables generated in this section:
sl@0
   173
**
sl@0
   174
**  yy_action[]        A single table containing all actions.
sl@0
   175
**  yy_lookahead[]     A table containing the lookahead for each entry in
sl@0
   176
**                     yy_action.  Used to detect hash collisions.
sl@0
   177
**  yy_shift_ofst[]    For each state, the offset into yy_action for
sl@0
   178
**                     shifting terminals.
sl@0
   179
**  yy_reduce_ofst[]   For each state, the offset into yy_action for
sl@0
   180
**                     shifting non-terminals after a reduce.
sl@0
   181
**  yy_default[]       Default action for each state.
sl@0
   182
*/
sl@0
   183
static const YYACTIONTYPE yy_action[] = {
sl@0
   184
 /*     0 */   284,  871,  118,  569,    2,  169,  406,  406,   62,   62,
sl@0
   185
 /*    10 */    62,   62,  204,   64,   64,   64,   64,   65,   65,   66,
sl@0
   186
 /*    20 */    66,   66,   67,  206,  379,  376,  413,  419,   69,   64,
sl@0
   187
 /*    30 */    64,   64,   64,   65,   65,   66,   66,   66,   67,  206,
sl@0
   188
 /*    40 */   435,  208,  384,  439,   61,   60,  289,  423,  424,  420,
sl@0
   189
 /*    50 */   420,   63,   63,   62,   62,   62,   62,  259,   64,   64,
sl@0
   190
 /*    60 */    64,   64,   65,   65,   66,   66,   66,   67,  206,  284,
sl@0
   191
 /*    70 */   401,  406,  406,  477,  400,   83,   68,  408,   70,  151,
sl@0
   192
 /*    80 */    64,   64,   64,   64,   65,   65,   66,   66,   66,   67,
sl@0
   193
 /*    90 */   206,   68,  450,   70,  151,  413,  419,  435,  260,   59,
sl@0
   194
 /*   100 */    65,   65,   66,   66,   66,   67,  206,  385,  386,  410,
sl@0
   195
 /*   110 */   410,  410,  284,   61,   60,  289,  423,  424,  420,  420,
sl@0
   196
 /*   120 */    63,   63,   62,   62,   62,   62,  307,   64,   64,   64,
sl@0
   197
 /*   130 */    64,   65,   65,   66,   66,   66,   67,  206,  413,  419,
sl@0
   198
 /*   140 */    95,   66,   66,   66,   67,  206,  384,  206,  402,   35,
sl@0
   199
 /*   150 */    57,  174,  384,  519,  398,  462,   61,   60,  289,  423,
sl@0
   200
 /*   160 */   424,  420,  420,   63,   63,   62,   62,   62,   62,  171,
sl@0
   201
 /*   170 */    64,   64,   64,   64,   65,   65,   66,   66,   66,   67,
sl@0
   202
 /*   180 */   206,  284,  437,  313,  165,   68,  109,   70,  151,  439,
sl@0
   203
 /*   190 */   321,  307,  303,  381,  235,  330,  192,  203,  290,  430,
sl@0
   204
 /*   200 */   431,  435,  208,  403,  196,  561,  286,  413,  419,  146,
sl@0
   205
 /*   210 */   147,  385,  386,  402,   42,  172,  157,  385,  386,  477,
sl@0
   206
 /*   220 */   328,  555,  556,  408,  284,   61,   60,  289,  423,  424,
sl@0
   207
 /*   230 */   420,  420,   63,   63,   62,   62,   62,   62,  403,   64,
sl@0
   208
 /*   240 */    64,   64,   64,   65,   65,   66,   66,   66,   67,  206,
sl@0
   209
 /*   250 */   413,  419,  476,  323,  211,  410,  410,  410,   67,  206,
sl@0
   210
 /*   260 */   281,  207,  368,  437,  510,  165,  478,  284,   61,   60,
sl@0
   211
 /*   270 */   289,  423,  424,  420,  420,   63,   63,   62,   62,   62,
sl@0
   212
 /*   280 */    62,  384,   64,   64,   64,   64,   65,   65,   66,   66,
sl@0
   213
 /*   290 */    66,   67,  206,  413,  419,   85,  292,  511,  462,  396,
sl@0
   214
 /*   300 */   509,  479,  169,  225,  406,  253,  521,   21,  506,   19,
sl@0
   215
 /*   310 */   399,   61,   60,  289,  423,  424,  420,  420,   63,   63,
sl@0
   216
 /*   320 */    62,   62,   62,   62,  259,   64,   64,   64,   64,   65,
sl@0
   217
 /*   330 */    65,   66,   66,   66,   67,  206,  466,  468,  307,   78,
sl@0
   218
 /*   340 */   284,  397,  292,  257,  472,  255,  385,  386,  179,  506,
sl@0
   219
 /*   350 */   384,  335,  338,  339,   68,  149,   70,  151,    8,  559,
sl@0
   220
 /*   360 */   402,   36,  340,  559,  217,  544,  413,  419,  512,  406,
sl@0
   221
 /*   370 */   161,  114,  239,  333,  244,  334,  173,  558,  557,  481,
sl@0
   222
 /*   380 */   482,  558,   81,  248,   61,   60,  289,  423,  424,  420,
sl@0
   223
 /*   390 */   420,   63,   63,   62,   62,   62,   62,  291,   64,   64,
sl@0
   224
 /*   400 */    64,   64,   65,   65,   66,   66,   66,   67,  206,  284,
sl@0
   225
 /*   410 */   217,  537,  232,  475,  162,  385,  386,  114,  239,  333,
sl@0
   226
 /*   420 */   244,  334,  173,  179,  307,  226,  335,  338,  339,  248,
sl@0
   227
 /*   430 */   414,  415,  152,  536,  318,  413,  419,  340,  554,  207,
sl@0
   228
 /*   440 */   233,  458,  371,  207,  534,  482,  402,   35,  462,  536,
sl@0
   229
 /*   450 */   156,  417,  418,   61,   60,  289,  423,  424,  420,  420,
sl@0
   230
 /*   460 */    63,   63,   62,   62,   62,   62,  403,   64,   64,   64,
sl@0
   231
 /*   470 */    64,   65,   65,   66,   66,   66,   67,  206,  284,  471,
sl@0
   232
 /*   480 */   416,  511,  492,  363,  265,  264,  307,  237,  321,  360,
sl@0
   233
 /*   490 */   395,   21,  179,  320,  204,  335,  338,  339,  384,  363,
sl@0
   234
 /*   500 */   265,  264,  378,    2,  413,  419,  340,  604,  402,   42,
sl@0
   235
 /*   510 */   204,  511,  518,  493,  148,  520,  312,  430,  431,  517,
sl@0
   236
 /*   520 */   566,   21,   61,   60,  289,  423,  424,  420,  420,   63,
sl@0
   237
 /*   530 */    63,   62,   62,   62,   62,  197,   64,   64,   64,   64,
sl@0
   238
 /*   540 */    65,   65,   66,   66,   66,   67,  206,  284,  307,  210,
sl@0
   239
 /*   550 */   444,  251,  427,  360,  219,  470,  150,  343,  307,  440,
sl@0
   240
 /*   560 */   307,  326,  445,  385,  386,  310,  307,  426,  426,  403,
sl@0
   241
 /*   570 */   402,   28,  287,  413,  419,  446,  234,  483,  259,  207,
sl@0
   242
 /*   580 */   402,   35,  402,   50,  174,  433,  433,  484,  402,   50,
sl@0
   243
 /*   590 */   403,   61,   60,  289,  423,  424,  420,  420,   63,   63,
sl@0
   244
 /*   600 */    62,   62,   62,   62,  308,   64,   64,   64,   64,   65,
sl@0
   245
 /*   610 */    65,   66,   66,   66,   67,  206,  284,  268,  220,  546,
sl@0
   246
 /*   620 */     1,   94,  325,   10,  384,  444,  466,  384,  300,  205,
sl@0
   247
 /*   630 */   310,  329,  426,  426,  301,  221,   56,  445,  310,  286,
sl@0
   248
 /*   640 */   426,  426,  413,  419,  248,  310,  353,  426,  426,  452,
sl@0
   249
 /*   650 */   446,  356,  317,  402,    3,  271,  453,  269,  531,  284,
sl@0
   250
 /*   660 */    61,   60,  289,  423,  424,  420,  420,   63,   63,   62,
sl@0
   251
 /*   670 */    62,   62,   62,  307,   64,   64,   64,   64,   65,   65,
sl@0
   252
 /*   680 */    66,   66,   66,   67,  206,  413,  419,  351,  455,  385,
sl@0
   253
 /*   690 */   386,  259,  385,  386,  383,  402,   29,  570,  379,  376,
sl@0
   254
 /*   700 */   115,  190,  284,   61,   60,  289,  423,  424,  420,  420,
sl@0
   255
 /*   710 */    63,   63,   62,   62,   62,   62,  307,   64,   64,   64,
sl@0
   256
 /*   720 */    64,   65,   65,   66,   66,   66,   67,  206,  413,  419,
sl@0
   257
 /*   730 */   204,   20,  373,  142,  533,  403,  270,  409,  402,   24,
sl@0
   258
 /*   740 */   387,  388,  389,  362,  190,  284,   61,   71,  289,  423,
sl@0
   259
 /*   750 */   424,  420,  420,   63,   63,   62,   62,   62,   62,  361,
sl@0
   260
 /*   760 */    64,   64,   64,   64,   65,   65,   66,   66,   66,   67,
sl@0
   261
 /*   770 */   206,  413,  419,  806,  168,  157,   18,    5,  403,  145,
sl@0
   262
 /*   780 */   436,  364,  375,  527,  350,  527,  487,  488,  284,  194,
sl@0
   263
 /*   790 */    60,  289,  423,  424,  420,  420,   63,   63,   62,   62,
sl@0
   264
 /*   800 */    62,   62,  361,   64,   64,   64,   64,   65,   65,   66,
sl@0
   265
 /*   810 */    66,   66,   67,  206,  413,  419,  384,  529,  175,  176,
sl@0
   266
 /*   820 */   177,  528,  319,  403,  357,  259,   22,  247,  259,  448,
sl@0
   267
 /*   830 */   406,  153,  247,  352,  289,  423,  424,  420,  420,   63,
sl@0
   268
 /*   840 */    63,   62,   62,   62,   62,  181,   64,   64,   64,   64,
sl@0
   269
 /*   850 */    65,   65,   66,   66,   66,   67,  206,   73,  314,  178,
sl@0
   270
 /*   860 */     4,  307,  295,  307,  288,  403,  547,  218,  307,  548,
sl@0
   271
 /*   870 */   307,  247,  311,   73,  314,  307,    4,  247,  461,  403,
sl@0
   272
 /*   880 */   288,  385,  386,  402,   33,  402,   54,  307,  311,  316,
sl@0
   273
 /*   890 */   402,   53,  402,   99,  307,  406,  247,  402,   97,  439,
sl@0
   274
 /*   900 */   307,  498,  307,  466,  307,  316,  296,  459,  456,  402,
sl@0
   275
 /*   910 */   102,  428,  297,   23,  309,  439,  402,  103,  307,   76,
sl@0
   276
 /*   920 */    75,  499,  402,  108,  402,  110,  402,   17,   74,  305,
sl@0
   277
 /*   930 */   306,  298,  331,  408,  490,   76,   75,  469,  307,  370,
sl@0
   278
 /*   940 */   402,  100,  497,  496,   74,  305,  306,   73,  314,  408,
sl@0
   279
 /*   950 */     4,  204,  307,  184,  288,  307,  465,  245,  204,  401,
sl@0
   280
 /*   960 */   402,   34,  311,  400,  299,  410,  410,  410,  411,  412,
sl@0
   281
 /*   970 */    12,  369,  307,  294,  402,   98,  494,  402,   25,  316,
sl@0
   282
 /*   980 */   495,  410,  410,  410,  411,  412,   12,  403,  393,  439,
sl@0
   283
 /*   990 */   421,  159,  240,  500,  402,   55,  222,  223,  224,  105,
sl@0
   284
 /*  1000 */   259,  501,  307,  241,  187,  307,  259,  246,  307,   76,
sl@0
   285
 /*  1010 */    75,   77,  201,   79,  276,  513,  252,  457,   74,  305,
sl@0
   286
 /*  1020 */   306,  277,  307,  408,  402,  111,  254,  402,  112,  307,
sl@0
   287
 /*  1030 */   402,  113,  464,  199,  170,  536,  256,  259,  347,  198,
sl@0
   288
 /*  1040 */   307,  272,  200,  258,  402,   26,  307,  367,  307,  263,
sl@0
   289
 /*  1050 */   307,  402,   37,  307,  355,  410,  410,  410,  411,  412,
sl@0
   290
 /*  1060 */    12,  358,  402,   38,  359,  502,  307,  178,  402,   27,
sl@0
   291
 /*  1070 */   402,   39,  402,   40,  266,  402,   41,  307,  274,  267,
sl@0
   292
 /*  1080 */   250,  307,  178,  307,  155,  366,  273,  264,  402,   43,
sl@0
   293
 /*  1090 */   553,  285,  307,  342,  307,  178,  204,  275,  278,  402,
sl@0
   294
 /*  1100 */    44,  279,  307,  402,   45,  402,   30,  565,  307,  457,
sl@0
   295
 /*  1110 */   307,  144,  432,  307,  402,   31,  402,   46,  307,  227,
sl@0
   296
 /*  1120 */   372,  532,  307,  178,  402,   47,  307,  540,  407,  170,
sl@0
   297
 /*  1130 */   402,   48,  402,   49,  315,  402,   32,  541,  434,   92,
sl@0
   298
 /*  1140 */   402,   11,  451,  504,  402,   51,  454,  539,  402,   52,
sl@0
   299
 /*  1150 */   551,  507,   92,  242,  493,  503,  505,  160,  337,  550,
sl@0
   300
 /*  1160 */   382,  390,  391,  392,    7,  304,  228,  404,   85,  324,
sl@0
   301
 /*  1170 */   322,  229,   84,   80,  209,   58,  230,  167,  449,  119,
sl@0
   302
 /*  1180 */    86,  327,  332,  293,  231,  486,  405,  490,  122,  480,
sl@0
   303
 /*  1190 */   485,  243,  215,  236,  489,  491,  463,  238,  214,  467,
sl@0
   304
 /*  1200 */   514,  508,  282,  515,  516,  283,  344,  182,  348,  522,
sl@0
   305
 /*  1210 */   183,   89,  117,  346,  185,  130,  186,  216,  535,  524,
sl@0
   306
 /*  1220 */   188,  191,  354,  140,  542,  365,  131,  132,  133,  261,
sl@0
   307
 /*  1230 */   549,  525,  136,  134,  562,  302,   93,  139,   96,  563,
sl@0
   308
 /*  1240 */   564,  567,  107,  213,  101,  380,  104,  394,  605,  606,
sl@0
   309
 /*  1250 */   163,  164,  422,  425,   72,  166,  429,  438,  141,  441,
sl@0
   310
 /*  1260 */   154,    6,  442,  443,   14,  447,  158,  460,   82,   13,
sl@0
   311
 /*  1270 */   120,  180,  121,  473,  474,  212,   87,  123,  336,  249,
sl@0
   312
 /*  1280 */   124,  116,   88,  125,  341,  241,  345,  143,  523,  526,
sl@0
   313
 /*  1290 */   126,  349,  262,  189,  170,  127,  128,    9,  538,  129,
sl@0
   314
 /*  1300 */    90,  530,  193,   15,  543,  545,  195,  135,  137,  138,
sl@0
   315
 /*  1310 */    16,  552,  106,  560,  202,  377,  872,  280,  568,  374,
sl@0
   316
 /*  1320 */   872,  872,  872,  872,  872,  872,  872,  872,   91,
sl@0
   317
};
sl@0
   318
static const YYCODETYPE yy_lookahead[] = {
sl@0
   319
 /*     0 */    16,  139,  140,  141,  142,   21,   23,   23,   69,   70,
sl@0
   320
 /*    10 */    71,   72,  110,   74,   75,   76,   77,   78,   79,   80,
sl@0
   321
 /*    20 */    81,   82,   83,   84,    1,    2,   42,   43,   73,   74,
sl@0
   322
 /*    30 */    75,   76,   77,   78,   79,   80,   81,   82,   83,   84,
sl@0
   323
 /*    40 */    78,   79,   23,   58,   60,   61,   62,   63,   64,   65,
sl@0
   324
 /*    50 */    66,   67,   68,   69,   70,   71,   72,  147,   74,   75,
sl@0
   325
 /*    60 */    76,   77,   78,   79,   80,   81,   82,   83,   84,   16,
sl@0
   326
 /*    70 */   107,   88,   88,   88,  111,   22,  217,   92,  219,  220,
sl@0
   327
 /*    80 */    74,   75,   76,   77,   78,   79,   80,   81,   82,   83,
sl@0
   328
 /*    90 */    84,  217,  218,  219,  220,   42,   43,   78,  188,   46,
sl@0
   329
 /*   100 */    78,   79,   80,   81,   82,   83,   84,   88,   89,  124,
sl@0
   330
 /*   110 */   125,  126,   16,   60,   61,   62,   63,   64,   65,   66,
sl@0
   331
 /*   120 */    67,   68,   69,   70,   71,   72,  147,   74,   75,   76,
sl@0
   332
 /*   130 */    77,   78,   79,   80,   81,   82,   83,   84,   42,   43,
sl@0
   333
 /*   140 */    44,   80,   81,   82,   83,   84,   23,   84,  169,  170,
sl@0
   334
 /*   150 */    19,   43,   23,  181,   23,  161,   60,   61,   62,   63,
sl@0
   335
 /*   160 */    64,   65,   66,   67,   68,   69,   70,   71,   72,  155,
sl@0
   336
 /*   170 */    74,   75,   76,   77,   78,   79,   80,   81,   82,   83,
sl@0
   337
 /*   180 */    84,   16,  161,  162,  163,  217,   21,  219,  220,   58,
sl@0
   338
 /*   190 */   211,  147,  143,  144,  200,  216,   22,  148,  164,  165,
sl@0
   339
 /*   200 */   166,   78,   79,  189,  155,  237,   98,   42,   43,   78,
sl@0
   340
 /*   210 */    79,   88,   89,  169,  170,  201,  202,   88,   89,   88,
sl@0
   341
 /*   220 */   206,   98,   99,   92,   16,   60,   61,   62,   63,   64,
sl@0
   342
 /*   230 */    65,   66,   67,   68,   69,   70,   71,   72,  189,   74,
sl@0
   343
 /*   240 */    75,   76,   77,   78,   79,   80,   81,   82,   83,   84,
sl@0
   344
 /*   250 */    42,   43,  169,  209,  210,  124,  125,  126,   83,   84,
sl@0
   345
 /*   260 */   158,  227,  213,  161,  162,  163,  169,   16,   60,   61,
sl@0
   346
 /*   270 */    62,   63,   64,   65,   66,   67,   68,   69,   70,   71,
sl@0
   347
 /*   280 */    72,   23,   74,   75,   76,   77,   78,   79,   80,   81,
sl@0
   348
 /*   290 */    82,   83,   84,   42,   43,  121,   16,  147,  161,  167,
sl@0
   349
 /*   300 */   168,  160,   21,  153,   23,   14,  156,  157,  176,   19,
sl@0
   350
 /*   310 */   169,   60,   61,   62,   63,   64,   65,   66,   67,   68,
sl@0
   351
 /*   320 */    69,   70,   71,   72,  147,   74,   75,   76,   77,   78,
sl@0
   352
 /*   330 */    79,   80,   81,   82,   83,   84,  147,  200,  147,  131,
sl@0
   353
 /*   340 */    16,  168,   16,   52,   20,   54,   88,   89,   90,  176,
sl@0
   354
 /*   350 */    23,   93,   94,   95,  217,   22,  219,  220,   68,  147,
sl@0
   355
 /*   360 */   169,  170,  104,  147,   84,  188,   42,   43,  181,   88,
sl@0
   356
 /*   370 */    90,   91,   92,   93,   94,   95,   96,  165,  166,  185,
sl@0
   357
 /*   380 */   186,  165,  131,  103,   60,   61,   62,   63,   64,   65,
sl@0
   358
 /*   390 */    66,   67,   68,   69,   70,   71,   72,  208,   74,   75,
sl@0
   359
 /*   400 */    76,   77,   78,   79,   80,   81,   82,   83,   84,   16,
sl@0
   360
 /*   410 */    84,   11,  221,   20,   19,   88,   89,   91,   92,   93,
sl@0
   361
 /*   420 */    94,   95,   96,   90,  147,  190,   93,   94,   95,  103,
sl@0
   362
 /*   430 */    42,   43,  155,   49,  186,   42,   43,  104,  226,  227,
sl@0
   363
 /*   440 */   147,  114,  226,  227,  185,  186,  169,  170,  161,   49,
sl@0
   364
 /*   450 */   147,   63,   64,   60,   61,   62,   63,   64,   65,   66,
sl@0
   365
 /*   460 */    67,   68,   69,   70,   71,   72,  189,   74,   75,   76,
sl@0
   366
 /*   470 */    77,   78,   79,   80,   81,   82,   83,   84,   16,   20,
sl@0
   367
 /*   480 */    92,  147,   20,   99,  100,  101,  147,  200,  211,  147,
sl@0
   368
 /*   490 */   156,  157,   90,  216,  110,   93,   94,   95,   23,   99,
sl@0
   369
 /*   500 */   100,  101,  141,  142,   42,   43,  104,  112,  169,  170,
sl@0
   370
 /*   510 */   110,  147,  176,  177,  180,  181,  164,  165,  166,  183,
sl@0
   371
 /*   520 */   156,  157,   60,   61,   62,   63,   64,   65,   66,   67,
sl@0
   372
 /*   530 */    68,   69,   70,   71,   72,  155,   74,   75,   76,   77,
sl@0
   373
 /*   540 */    78,   79,   80,   81,   82,   83,   84,   16,  147,  210,
sl@0
   374
 /*   550 */    12,   20,   20,  147,  212,   80,  155,   16,  147,   20,
sl@0
   375
 /*   560 */   147,  147,   24,   88,   89,  106,  147,  108,  109,  189,
sl@0
   376
 /*   570 */   169,  170,  150,   42,   43,   37,  147,   39,  147,  227,
sl@0
   377
 /*   580 */   169,  170,  169,  170,   43,  124,  125,   49,  169,  170,
sl@0
   378
 /*   590 */   189,   60,   61,   62,   63,   64,   65,   66,   67,   68,
sl@0
   379
 /*   600 */    69,   70,   71,   72,  147,   74,   75,   76,   77,   78,
sl@0
   380
 /*   610 */    79,   80,   81,   82,   83,   84,   16,   14,  212,  188,
sl@0
   381
 /*   620 */    19,   21,  211,   19,   23,   12,  147,   23,  215,  192,
sl@0
   382
 /*   630 */   106,  147,  108,  109,  215,  145,  199,   24,  106,   98,
sl@0
   383
 /*   640 */   108,  109,   42,   43,  103,  106,  224,  108,  109,   27,
sl@0
   384
 /*   650 */    37,  229,   39,  169,  170,   52,   34,   54,   18,   16,
sl@0
   385
 /*   660 */    60,   61,   62,   63,   64,   65,   66,   67,   68,   69,
sl@0
   386
 /*   670 */    70,   71,   72,  147,   74,   75,   76,   77,   78,   79,
sl@0
   387
 /*   680 */    80,   81,   82,   83,   84,   42,   43,  208,   22,   88,
sl@0
   388
 /*   690 */    89,  147,   88,   89,  147,  169,  170,    0,    1,    2,
sl@0
   389
 /*   700 */   147,  155,   16,   60,   61,   62,   63,   64,   65,   66,
sl@0
   390
 /*   710 */    67,   68,   69,   70,   71,   72,  147,   74,   75,   76,
sl@0
   391
 /*   720 */    77,   78,   79,   80,   81,   82,   83,   84,   42,   43,
sl@0
   392
 /*   730 */   110,   19,  188,   21,   94,  189,  133,  147,  169,  170,
sl@0
   393
 /*   740 */     7,    8,    9,  123,  155,   16,   60,   61,   62,   63,
sl@0
   394
 /*   750 */    64,   65,   66,   67,   68,   69,   70,   71,   72,  213,
sl@0
   395
 /*   760 */    74,   75,   76,   77,   78,   79,   80,   81,   82,   83,
sl@0
   396
 /*   770 */    84,   42,   43,  133,  201,  202,  230,  191,  189,  113,
sl@0
   397
 /*   780 */   161,  235,  238,   99,  100,  101,    7,    8,   16,  155,
sl@0
   398
 /*   790 */    61,   62,   63,   64,   65,   66,   67,   68,   69,   70,
sl@0
   399
 /*   800 */    71,   72,  213,   74,   75,   76,   77,   78,   79,   80,
sl@0
   400
 /*   810 */    81,   82,   83,   84,   42,   43,   23,   25,   99,  100,
sl@0
   401
 /*   820 */   101,   29,  147,  189,  235,  147,   19,  147,  147,  147,
sl@0
   402
 /*   830 */    23,  155,  147,   41,   62,   63,   64,   65,   66,   67,
sl@0
   403
 /*   840 */    68,   69,   70,   71,   72,  155,   74,   75,   76,   77,
sl@0
   404
 /*   850 */    78,   79,   80,   81,   82,   83,   84,   16,   17,   22,
sl@0
   405
 /*   860 */    19,  147,  182,  147,   23,  189,  188,  182,  147,  188,
sl@0
   406
 /*   870 */   147,  147,   31,   16,   17,  147,   19,  147,  147,  189,
sl@0
   407
 /*   880 */    23,   88,   89,  169,  170,  169,  170,  147,   31,   48,
sl@0
   408
 /*   890 */   169,  170,  169,  170,  147,   88,  147,  169,  170,   58,
sl@0
   409
 /*   900 */   147,   30,  147,  147,  147,   48,  182,  114,  203,  169,
sl@0
   410
 /*   910 */   170,   20,  182,   22,   16,   58,  169,  170,  147,   78,
sl@0
   411
 /*   920 */    79,   50,  169,  170,  169,  170,  169,  170,   87,   88,
sl@0
   412
 /*   930 */    89,  182,   80,   92,   97,   78,   79,   80,  147,   91,
sl@0
   413
 /*   940 */   169,  170,   91,   92,   87,   88,   89,   16,   17,   92,
sl@0
   414
 /*   950 */    19,  110,  147,  155,   23,  147,  147,  147,  110,  107,
sl@0
   415
 /*   960 */   169,  170,   31,  111,  208,  124,  125,  126,  127,  128,
sl@0
   416
 /*   970 */   129,  123,  147,  102,  169,  170,  147,  169,  170,   48,
sl@0
   417
 /*   980 */   178,  124,  125,  126,  127,  128,  129,  189,  149,   58,
sl@0
   418
 /*   990 */    92,    5,   92,  178,  169,  170,   10,   11,   12,   13,
sl@0
   419
 /*  1000 */   147,  178,  147,  103,  231,  147,  147,  147,  147,   78,
sl@0
   420
 /*  1010 */    79,  130,   26,  132,   28,  147,  147,   22,   87,   88,
sl@0
   421
 /*  1020 */    89,   35,  147,   92,  169,  170,  147,  169,  170,  147,
sl@0
   422
 /*  1030 */   169,  170,   20,   47,   22,   49,  147,  147,  232,   53,
sl@0
   423
 /*  1040 */   147,  188,   56,  147,  169,  170,  147,  188,  147,  147,
sl@0
   424
 /*  1050 */   147,  169,  170,  147,  147,  124,  125,  126,  127,  128,
sl@0
   425
 /*  1060 */   129,  147,  169,  170,  147,   20,  147,   22,  169,  170,
sl@0
   426
 /*  1070 */   169,  170,  169,  170,  147,  169,  170,  147,  188,  147,
sl@0
   427
 /*  1080 */    20,  147,   22,  147,   89,   99,  100,  101,  169,  170,
sl@0
   428
 /*  1090 */   147,  105,  147,   20,  147,   22,  110,  147,  147,  169,
sl@0
   429
 /*  1100 */   170,  147,  147,  169,  170,  169,  170,  147,  147,  114,
sl@0
   430
 /*  1110 */   147,  191,  228,  147,  169,  170,  169,  170,  147,  193,
sl@0
   431
 /*  1120 */   134,   20,  147,   22,  169,  170,  147,   20,  161,   22,
sl@0
   432
 /*  1130 */   169,  170,  169,  170,  223,  169,  170,   20,  228,   22,
sl@0
   433
 /*  1140 */   169,  170,  172,  161,  169,  170,  172,  194,  169,  170,
sl@0
   434
 /*  1150 */    20,  161,   22,  172,  177,  172,  172,    6,  173,  194,
sl@0
   435
 /*  1160 */   146,  146,  146,  146,   22,  154,  194,  189,  121,  118,
sl@0
   436
 /*  1170 */   116,  195,  119,  130,  222,  120,  196,  112,  152,  152,
sl@0
   437
 /*  1180 */    98,  115,   98,   40,  197,  179,  198,   97,   19,  171,
sl@0
   438
 /*  1190 */   171,  171,   84,  204,  173,  171,  205,  204,  225,  205,
sl@0
   439
 /*  1200 */   171,  179,  174,  171,  171,  174,   15,  151,   38,  152,
sl@0
   440
 /*  1210 */   151,  130,   60,  152,  151,   19,  152,  225,  184,  152,
sl@0
   441
 /*  1220 */   151,  184,  152,  214,  194,   15,  187,  187,  187,  233,
sl@0
   442
 /*  1230 */   194,  234,  184,  187,   33,  152,  236,  214,  236,  152,
sl@0
   443
 /*  1240 */   152,  137,  239,  175,  159,    1,  175,   20,  112,  112,
sl@0
   444
 /*  1250 */   112,  112,   92,  107,   19,   22,   20,   20,   19,   11,
sl@0
   445
 /*  1260 */    19,  117,   20,   20,  117,   20,  112,  114,   22,   22,
sl@0
   446
 /*  1270 */    19,   96,   20,   20,   20,   44,   19,   19,   44,   20,
sl@0
   447
 /*  1280 */    19,   32,   19,   19,   44,  103,   16,   21,   17,   51,
sl@0
   448
 /*  1290 */    98,   36,  133,   98,   22,   45,   19,    5,    1,  102,
sl@0
   449
 /*  1300 */    68,   45,  122,   19,    1,   17,  113,  113,  102,  122,
sl@0
   450
 /*  1310 */    19,  123,   14,   20,  135,    3,  240,  136,    4,   57,
sl@0
   451
 /*  1320 */   240,  240,  240,  240,  240,  240,  240,  240,   68,
sl@0
   452
};
sl@0
   453
#define YY_SHIFT_USE_DFLT (-99)
sl@0
   454
#define YY_SHIFT_MAX 377
sl@0
   455
static const short yy_shift_ofst[] = {
sl@0
   456
 /*     0 */    23,  841,  986,  -16,  841,  931,  931,  258,  123,  384,
sl@0
   457
 /*    10 */   -98,   96,  931,  931,  931,  931,  931,  -45,  400,   19,
sl@0
   458
 /*    20 */   129,  -17,  -38,  -38,   53,  165,  208,  251,  324,  393,
sl@0
   459
 /*    30 */   462,  531,  600,  643,  686,  643,  643,  643,  643,  643,
sl@0
   460
 /*    40 */   643,  643,  643,  643,  643,  643,  643,  643,  643,  643,
sl@0
   461
 /*    50 */   643,  643,  643,  729,  772,  772,  857,  931,  931,  931,
sl@0
   462
 /*    60 */   931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
sl@0
   463
 /*    70 */   931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
sl@0
   464
 /*    80 */   931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
sl@0
   465
 /*    90 */   931,  931,  931,  931,  931,  931,  931,  -61,  -61,    6,
sl@0
   466
 /*   100 */     6,  280,   22,   61,  541,  640,  129,  129,  175,  -17,
sl@0
   467
 /*   110 */    63,  -99,  -99,  -99,  131,  326,  538,  538,  697,  281,
sl@0
   468
 /*   120 */   129,  281,  129,  129,  129,  129,  129,  129,  129,  129,
sl@0
   469
 /*   130 */   129,  129,  129,  129,  129,  129,  129,  129,  129,  848,
sl@0
   470
 /*   140 */   620,  -98,  -98,  -98,  -99,  -99,  -15,  -15,  333,  402,
sl@0
   471
 /*   150 */   459,  601,  532,  539,  613,  327,  793,  604,  475,  733,
sl@0
   472
 /*   160 */   129,  129,  852,  129,  129,  807,  129,  129,  995,  129,
sl@0
   473
 /*   170 */   129,  524,  995,  129,  129,  871,  871,  871,  129,  129,
sl@0
   474
 /*   180 */   129,  524,  129,  129,  524,  129,  792,  684,  129,  129,
sl@0
   475
 /*   190 */   524,  129,  129,  129,  524,  129,  524,  524,  129,  129,
sl@0
   476
 /*   200 */   129,  129,  129,  712,  -37,  666,  -17,  461,  461,  881,
sl@0
   477
 /*   210 */   622,  622,  622,  108,  622,  -17,  622,  -17,  837,  174,
sl@0
   478
 /*   220 */   174, 1151, 1151, 1151, 1151, 1142,  -98, 1047, 1051, 1053,
sl@0
   479
 /*   230 */  1054, 1055, 1043, 1065, 1065, 1082, 1066, 1082, 1066, 1084,
sl@0
   480
 /*   240 */  1084, 1143, 1084, 1090, 1084, 1169, 1108, 1108, 1143, 1084,
sl@0
   481
 /*   250 */  1084, 1084, 1169, 1191, 1065, 1191, 1065, 1191, 1065, 1065,
sl@0
   482
 /*   260 */  1170, 1081, 1191, 1065, 1152, 1152, 1196, 1047, 1210, 1210,
sl@0
   483
 /*   270 */  1210, 1210, 1047, 1152, 1196, 1065, 1201, 1201, 1065, 1065,
sl@0
   484
 /*   280 */  1104,  -99,  -99,  -99,  388,  603,  719,  291,  395,  898,
sl@0
   485
 /*   290 */   891, 1012,  900,  779,  851, 1045, 1060, 1073, 1101, 1107,
sl@0
   486
 /*   300 */  1117, 1130,  290, 1244, 1227, 1136, 1137, 1138, 1139, 1160,
sl@0
   487
 /*   310 */  1146, 1235, 1236, 1237, 1239, 1248, 1241, 1242, 1233, 1243,
sl@0
   488
 /*   320 */  1245, 1246, 1144, 1247, 1147, 1246, 1153, 1251, 1252, 1154,
sl@0
   489
 /*   330 */  1253, 1254, 1249, 1231, 1257, 1234, 1258, 1259, 1261, 1263,
sl@0
   490
 /*   340 */  1240, 1264, 1175, 1182, 1270, 1271, 1266, 1192, 1255, 1238,
sl@0
   491
 /*   350 */  1250, 1272, 1256, 1159, 1195, 1277, 1292, 1297, 1197, 1232,
sl@0
   492
 /*   360 */  1260, 1180, 1284, 1193, 1303, 1288, 1194, 1206, 1187, 1291,
sl@0
   493
 /*   370 */  1188, 1293, 1298, 1262, 1179, 1181, 1312, 1314,
sl@0
   494
};
sl@0
   495
#define YY_REDUCE_USE_DFLT (-142)
sl@0
   496
#define YY_REDUCE_MAX 283
sl@0
   497
static const short yy_reduce_ofst[] = {
sl@0
   498
 /*     0 */  -138,  277,   49,  137,  401,  -21,   44,  334,  212,  546,
sl@0
   499
 /*    10 */    14,  -32,  191,  339,  411,  413,  419, -126,  589,  216,
sl@0
   500
 /*    20 */   150,  102,   34,  352, -141, -141, -141, -141, -141, -141,
sl@0
   501
 /*    30 */  -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
sl@0
   502
 /*    40 */  -141, -141, -141, -141, -141, -141, -141, -141, -141, -141,
sl@0
   503
 /*    50 */  -141, -141, -141, -141, -141, -141,  484,  526,  569,  714,
sl@0
   504
 /*    60 */   716,  721,  723,  728,  740,  747,  753,  755,  757,  771,
sl@0
   505
 /*    70 */   791,  805,  808,  825,  855,  858,  861,  875,  882,  893,
sl@0
   506
 /*    80 */   899,  901,  903,  906,  919,  930,  934,  936,  945,  947,
sl@0
   507
 /*    90 */   955,  961,  963,  966,  971,  975,  979, -141, -141, -141,
sl@0
   508
 /*   100 */  -141,  132, -141, -141,  336,  422,  544,  364, -141,   21,
sl@0
   509
 /*   110 */  -141, -141, -141, -141,  141,  173,  194,  259,  361,   -6,
sl@0
   510
 /*   120 */   189,  287,  680,  685,  724,  730,  -90,  479,  749,  342,
sl@0
   511
 /*   130 */   756,  177,  431,  678,  681,  853,  859,  406,  890,  380,
sl@0
   512
 /*   140 */   634,  676,  690,  798,  437,  573,   83,   97,  -28,  187,
sl@0
   513
 /*   150 */   235,  293,  235,  235,  248,  303,  414,  429,  457,  490,
sl@0
   514
 /*   160 */   547,  553,  586,  457,  590,  619,  675,  682,  705,  731,
sl@0
   515
 /*   170 */   809,  235,  705,  810,  829,  802,  815,  823,  860,  868,
sl@0
   516
 /*   180 */   869,  235,  879,  889,  235,  896,  773,  806,  902,  907,
sl@0
   517
 /*   190 */   235,  914,  917,  927,  235,  932,  235,  235,  943,  950,
sl@0
   518
 /*   200 */   951,  954,  960,  839,  920,  926,  967,  884,  910,  911,
sl@0
   519
 /*   210 */   970,  974,  981,  977,  983,  982,  984,  990,  985,  953,
sl@0
   520
 /*   220 */   965, 1014, 1015, 1016, 1017, 1011,  978,  972,  976,  980,
sl@0
   521
 /*   230 */   987,  988,  952, 1026, 1027,  989,  991,  993,  994, 1018,
sl@0
   522
 /*   240 */  1019, 1006, 1020, 1021, 1024, 1028,  973,  992, 1022, 1029,
sl@0
   523
 /*   250 */  1032, 1033, 1031, 1056, 1057, 1059, 1061, 1063, 1064, 1067,
sl@0
   524
 /*   260 */   996,  997, 1069, 1070, 1034, 1037, 1009, 1030, 1039, 1040,
sl@0
   525
 /*   270 */  1041, 1046, 1036, 1048, 1023, 1083, 1000, 1002, 1087, 1088,
sl@0
   526
 /*   280 */  1003, 1085, 1068, 1071,
sl@0
   527
};
sl@0
   528
static const YYACTIONTYPE yy_default[] = {
sl@0
   529
 /*     0 */   575,  801,  870,  691,  870,  801,  870,  870,  828,  870,
sl@0
   530
 /*    10 */   695,  857,  799,  870,  870,  870,  870,  773,  870,  828,
sl@0
   531
 /*    20 */   870,  607,  828,  828,  724,  870,  870,  870,  870,  870,
sl@0
   532
 /*    30 */   870,  870,  870,  725,  870,  803,  798,  794,  796,  795,
sl@0
   533
 /*    40 */   802,  726,  715,  722,  729,  707,  841,  731,  732,  738,
sl@0
   534
 /*    50 */   739,  858,  856,  761,  760,  779,  870,  870,  870,  870,
sl@0
   535
 /*    60 */   870,  870,  870,  870,  870,  870,  870,  870,  870,  870,
sl@0
   536
 /*    70 */   870,  870,  870,  870,  870,  870,  870,  870,  870,  870,
sl@0
   537
 /*    80 */   870,  870,  870,  870,  870,  870,  870,  870,  870,  870,
sl@0
   538
 /*    90 */   870,  870,  870,  870,  870,  870,  870,  763,  785,  762,
sl@0
   539
 /*   100 */   772,  600,  764,  765,  660,  595,  870,  870,  766,  870,
sl@0
   540
 /*   110 */   767,  780,  781,  782,  870,  870,  870,  870,  575,  691,
sl@0
   541
 /*   120 */   870,  691,  870,  870,  870,  870,  870,  870,  870,  870,
sl@0
   542
 /*   130 */   870,  870,  870,  870,  870,  870,  870,  870,  870,  870,
sl@0
   543
 /*   140 */   870,  870,  870,  870,  685,  695,  870,  870,  651,  870,
sl@0
   544
 /*   150 */   870,  870,  870,  870,  870,  870,  870,  870,  870,  583,
sl@0
   545
 /*   160 */   581,  870,  683,  870,  870,  609,  870,  870,  693,  870,
sl@0
   546
 /*   170 */   870,  698,  699,  870,  870,  870,  870,  870,  870,  870,
sl@0
   547
 /*   180 */   870,  597,  870,  870,  672,  870,  834,  870,  870,  870,
sl@0
   548
 /*   190 */   848,  870,  870,  870,  846,  870,  674,  734,  814,  870,
sl@0
   549
 /*   200 */   861,  863,  870,  870,  683,  692,  870,  870,  870,  797,
sl@0
   550
 /*   210 */   718,  718,  718,  630,  718,  870,  718,  870,  633,  728,
sl@0
   551
 /*   220 */   728,  580,  580,  580,  580,  650,  870,  728,  719,  721,
sl@0
   552
 /*   230 */   711,  723,  870,  700,  700,  708,  710,  708,  710,  662,
sl@0
   553
 /*   240 */   662,  647,  662,  633,  662,  807,  811,  811,  647,  662,
sl@0
   554
 /*   250 */   662,  662,  807,  592,  700,  592,  700,  592,  700,  700,
sl@0
   555
 /*   260 */   838,  840,  592,  700,  664,  664,  740,  728,  671,  671,
sl@0
   556
 /*   270 */   671,  671,  728,  664,  740,  700,  860,  860,  700,  700,
sl@0
   557
 /*   280 */   868,  617,  635,  635,  870,  870,  870,  870,  747,  870,
sl@0
   558
 /*   290 */   870,  870,  870,  870,  870,  870,  870,  870,  870,  870,
sl@0
   559
 /*   300 */   870,  870,  821,  870,  870,  752,  748,  870,  749,  870,
sl@0
   560
 /*   310 */   677,  870,  870,  870,  870,  870,  870,  870,  870,  870,
sl@0
   561
 /*   320 */   870,  800,  870,  712,  870,  720,  870,  870,  870,  870,
sl@0
   562
 /*   330 */   870,  870,  870,  870,  870,  870,  870,  870,  870,  870,
sl@0
   563
 /*   340 */   870,  870,  870,  870,  870,  870,  870,  870,  870,  870,
sl@0
   564
 /*   350 */   836,  837,  870,  870,  870,  870,  870,  870,  870,  870,
sl@0
   565
 /*   360 */   870,  870,  870,  870,  870,  870,  870,  870,  870,  870,
sl@0
   566
 /*   370 */   870,  870,  870,  867,  870,  870,  576,  870,  571,  573,
sl@0
   567
 /*   380 */   574,  578,  579,  582,  604,  605,  606,  584,  585,  586,
sl@0
   568
 /*   390 */   587,  588,  589,  590,  596,  598,  616,  618,  602,  620,
sl@0
   569
 /*   400 */   681,  682,  744,  675,  676,  680,  603,  755,  746,  750,
sl@0
   570
 /*   410 */   751,  753,  754,  768,  769,  771,  777,  784,  787,  770,
sl@0
   571
 /*   420 */   775,  776,  778,  783,  786,  678,  679,  790,  610,  611,
sl@0
   572
 /*   430 */   614,  615,  824,  826,  825,  827,  613,  612,  756,  759,
sl@0
   573
 /*   440 */   792,  793,  849,  850,  851,  852,  853,  788,  701,  791,
sl@0
   574
 /*   450 */   774,  713,  716,  717,  714,  684,  694,  703,  704,  705,
sl@0
   575
 /*   460 */   706,  689,  690,  696,  709,  742,  743,  697,  686,  687,
sl@0
   576
 /*   470 */   688,  789,  745,  757,  758,  621,  622,  752,  623,  624,
sl@0
   577
 /*   480 */   625,  663,  666,  667,  668,  626,  645,  648,  649,  627,
sl@0
   578
 /*   490 */   634,  628,  629,  636,  637,  638,  641,  642,  643,  644,
sl@0
   579
 /*   500 */   639,  640,  808,  809,  812,  810,  631,  632,  646,  619,
sl@0
   580
 /*   510 */   608,  601,  652,  655,  656,  657,  658,  659,  661,  653,
sl@0
   581
 /*   520 */   654,  599,  591,  593,  702,  830,  839,  835,  831,  832,
sl@0
   582
 /*   530 */   833,  594,  804,  805,  665,  736,  737,  829,  842,  844,
sl@0
   583
 /*   540 */   741,  845,  847,  843,  669,  670,  673,  813,  854,  727,
sl@0
   584
 /*   550 */   730,  733,  735,  815,  816,  817,  818,  819,  822,  823,
sl@0
   585
 /*   560 */   820,  855,  859,  862,  864,  865,  866,  869,  577,  572,
sl@0
   586
};
sl@0
   587
#define YY_SZ_ACTTAB (int)(sizeof(yy_action)/sizeof(yy_action[0]))
sl@0
   588
sl@0
   589
/* The next table maps tokens into fallback tokens.  If a construct
sl@0
   590
** like the following:
sl@0
   591
** 
sl@0
   592
**      %fallback ID X Y Z.
sl@0
   593
**
sl@0
   594
** appears in the grammar, then ID becomes a fallback token for X, Y,
sl@0
   595
** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser
sl@0
   596
** but it does not parse, the type of the token is changed to ID and
sl@0
   597
** the parse is retried before an error is thrown.
sl@0
   598
*/
sl@0
   599
#ifdef YYFALLBACK
sl@0
   600
static const YYCODETYPE yyFallback[] = {
sl@0
   601
    0,  /*          $ => nothing */
sl@0
   602
    0,  /*       SEMI => nothing */
sl@0
   603
   23,  /*    EXPLAIN => ID */
sl@0
   604
   23,  /*      QUERY => ID */
sl@0
   605
   23,  /*       PLAN => ID */
sl@0
   606
   23,  /*      BEGIN => ID */
sl@0
   607
    0,  /* TRANSACTION => nothing */
sl@0
   608
   23,  /*   DEFERRED => ID */
sl@0
   609
   23,  /*  IMMEDIATE => ID */
sl@0
   610
   23,  /*  EXCLUSIVE => ID */
sl@0
   611
    0,  /*     COMMIT => nothing */
sl@0
   612
   23,  /*        END => ID */
sl@0
   613
    0,  /*   ROLLBACK => nothing */
sl@0
   614
    0,  /*     CREATE => nothing */
sl@0
   615
    0,  /*      TABLE => nothing */
sl@0
   616
   23,  /*         IF => ID */
sl@0
   617
    0,  /*        NOT => nothing */
sl@0
   618
    0,  /*     EXISTS => nothing */
sl@0
   619
   23,  /*       TEMP => ID */
sl@0
   620
    0,  /*         LP => nothing */
sl@0
   621
    0,  /*         RP => nothing */
sl@0
   622
    0,  /*         AS => nothing */
sl@0
   623
    0,  /*      COMMA => nothing */
sl@0
   624
    0,  /*         ID => nothing */
sl@0
   625
   23,  /*      ABORT => ID */
sl@0
   626
   23,  /*      AFTER => ID */
sl@0
   627
   23,  /*    ANALYZE => ID */
sl@0
   628
   23,  /*        ASC => ID */
sl@0
   629
   23,  /*     ATTACH => ID */
sl@0
   630
   23,  /*     BEFORE => ID */
sl@0
   631
   23,  /*    CASCADE => ID */
sl@0
   632
   23,  /*       CAST => ID */
sl@0
   633
   23,  /*   CONFLICT => ID */
sl@0
   634
   23,  /*   DATABASE => ID */
sl@0
   635
   23,  /*       DESC => ID */
sl@0
   636
   23,  /*     DETACH => ID */
sl@0
   637
   23,  /*       EACH => ID */
sl@0
   638
   23,  /*       FAIL => ID */
sl@0
   639
   23,  /*        FOR => ID */
sl@0
   640
   23,  /*     IGNORE => ID */
sl@0
   641
   23,  /*  INITIALLY => ID */
sl@0
   642
   23,  /*    INSTEAD => ID */
sl@0
   643
   23,  /*    LIKE_KW => ID */
sl@0
   644
   23,  /*      MATCH => ID */
sl@0
   645
   23,  /*        KEY => ID */
sl@0
   646
   23,  /*         OF => ID */
sl@0
   647
   23,  /*     OFFSET => ID */
sl@0
   648
   23,  /*     PRAGMA => ID */
sl@0
   649
   23,  /*      RAISE => ID */
sl@0
   650
   23,  /*    REPLACE => ID */
sl@0
   651
   23,  /*   RESTRICT => ID */
sl@0
   652
   23,  /*        ROW => ID */
sl@0
   653
   23,  /*    TRIGGER => ID */
sl@0
   654
   23,  /*     VACUUM => ID */
sl@0
   655
   23,  /*       VIEW => ID */
sl@0
   656
   23,  /*    VIRTUAL => ID */
sl@0
   657
   23,  /*    REINDEX => ID */
sl@0
   658
   23,  /*     RENAME => ID */
sl@0
   659
   23,  /*   CTIME_KW => ID */
sl@0
   660
    0,  /*        ANY => nothing */
sl@0
   661
    0,  /*         OR => nothing */
sl@0
   662
    0,  /*        AND => nothing */
sl@0
   663
    0,  /*         IS => nothing */
sl@0
   664
    0,  /*    BETWEEN => nothing */
sl@0
   665
    0,  /*         IN => nothing */
sl@0
   666
    0,  /*     ISNULL => nothing */
sl@0
   667
    0,  /*    NOTNULL => nothing */
sl@0
   668
    0,  /*         NE => nothing */
sl@0
   669
    0,  /*         EQ => nothing */
sl@0
   670
    0,  /*         GT => nothing */
sl@0
   671
    0,  /*         LE => nothing */
sl@0
   672
    0,  /*         LT => nothing */
sl@0
   673
    0,  /*         GE => nothing */
sl@0
   674
    0,  /*     ESCAPE => nothing */
sl@0
   675
    0,  /*     BITAND => nothing */
sl@0
   676
    0,  /*      BITOR => nothing */
sl@0
   677
    0,  /*     LSHIFT => nothing */
sl@0
   678
    0,  /*     RSHIFT => nothing */
sl@0
   679
    0,  /*       PLUS => nothing */
sl@0
   680
    0,  /*      MINUS => nothing */
sl@0
   681
    0,  /*       STAR => nothing */
sl@0
   682
    0,  /*      SLASH => nothing */
sl@0
   683
    0,  /*        REM => nothing */
sl@0
   684
    0,  /*     CONCAT => nothing */
sl@0
   685
    0,  /*    COLLATE => nothing */
sl@0
   686
    0,  /*     UMINUS => nothing */
sl@0
   687
    0,  /*      UPLUS => nothing */
sl@0
   688
    0,  /*     BITNOT => nothing */
sl@0
   689
    0,  /*     STRING => nothing */
sl@0
   690
    0,  /*    JOIN_KW => nothing */
sl@0
   691
    0,  /* CONSTRAINT => nothing */
sl@0
   692
    0,  /*    DEFAULT => nothing */
sl@0
   693
    0,  /*       NULL => nothing */
sl@0
   694
    0,  /*    PRIMARY => nothing */
sl@0
   695
    0,  /*     UNIQUE => nothing */
sl@0
   696
    0,  /*      CHECK => nothing */
sl@0
   697
    0,  /* REFERENCES => nothing */
sl@0
   698
    0,  /*   AUTOINCR => nothing */
sl@0
   699
    0,  /*         ON => nothing */
sl@0
   700
    0,  /*     DELETE => nothing */
sl@0
   701
    0,  /*     UPDATE => nothing */
sl@0
   702
    0,  /*     INSERT => nothing */
sl@0
   703
    0,  /*        SET => nothing */
sl@0
   704
    0,  /* DEFERRABLE => nothing */
sl@0
   705
    0,  /*    FOREIGN => nothing */
sl@0
   706
    0,  /*       DROP => nothing */
sl@0
   707
    0,  /*      UNION => nothing */
sl@0
   708
    0,  /*        ALL => nothing */
sl@0
   709
    0,  /*     EXCEPT => nothing */
sl@0
   710
    0,  /*  INTERSECT => nothing */
sl@0
   711
    0,  /*     SELECT => nothing */
sl@0
   712
    0,  /*   DISTINCT => nothing */
sl@0
   713
    0,  /*        DOT => nothing */
sl@0
   714
    0,  /*       FROM => nothing */
sl@0
   715
    0,  /*       JOIN => nothing */
sl@0
   716
    0,  /*      USING => nothing */
sl@0
   717
    0,  /*      ORDER => nothing */
sl@0
   718
    0,  /*         BY => nothing */
sl@0
   719
    0,  /*      GROUP => nothing */
sl@0
   720
    0,  /*     HAVING => nothing */
sl@0
   721
    0,  /*      LIMIT => nothing */
sl@0
   722
    0,  /*      WHERE => nothing */
sl@0
   723
    0,  /*       INTO => nothing */
sl@0
   724
    0,  /*     VALUES => nothing */
sl@0
   725
    0,  /*    INTEGER => nothing */
sl@0
   726
    0,  /*      FLOAT => nothing */
sl@0
   727
    0,  /*       BLOB => nothing */
sl@0
   728
    0,  /*   REGISTER => nothing */
sl@0
   729
    0,  /*   VARIABLE => nothing */
sl@0
   730
    0,  /*       CASE => nothing */
sl@0
   731
    0,  /*       WHEN => nothing */
sl@0
   732
    0,  /*       THEN => nothing */
sl@0
   733
    0,  /*       ELSE => nothing */
sl@0
   734
    0,  /*      INDEX => nothing */
sl@0
   735
    0,  /*      ALTER => nothing */
sl@0
   736
    0,  /*         TO => nothing */
sl@0
   737
    0,  /*        ADD => nothing */
sl@0
   738
    0,  /*   COLUMNKW => nothing */
sl@0
   739
};
sl@0
   740
#endif /* YYFALLBACK */
sl@0
   741
sl@0
   742
/* The following structure represents a single element of the
sl@0
   743
** parser's stack.  Information stored includes:
sl@0
   744
**
sl@0
   745
**   +  The state number for the parser at this level of the stack.
sl@0
   746
**
sl@0
   747
**   +  The value of the token stored at this level of the stack.
sl@0
   748
**      (In other words, the "major" token.)
sl@0
   749
**
sl@0
   750
**   +  The semantic value stored at this level of the stack.  This is
sl@0
   751
**      the information used by the action routines in the grammar.
sl@0
   752
**      It is sometimes called the "minor" token.
sl@0
   753
*/
sl@0
   754
struct yyStackEntry {
sl@0
   755
  YYACTIONTYPE stateno;  /* The state-number */
sl@0
   756
  YYCODETYPE major;      /* The major token value.  This is the code
sl@0
   757
                         ** number for the token at this stack level */
sl@0
   758
  YYMINORTYPE minor;     /* The user-supplied minor token value.  This
sl@0
   759
                         ** is the value of the token  */
sl@0
   760
};
sl@0
   761
typedef struct yyStackEntry yyStackEntry;
sl@0
   762
sl@0
   763
/* The state of the parser is completely contained in an instance of
sl@0
   764
** the following structure */
sl@0
   765
struct yyParser {
sl@0
   766
  int yyidx;                    /* Index of top element in stack */
sl@0
   767
#ifdef YYTRACKMAXSTACKDEPTH
sl@0
   768
  int yyidxMax;                 /* Maximum value of yyidx */
sl@0
   769
#endif
sl@0
   770
  int yyerrcnt;                 /* Shifts left before out of the error */
sl@0
   771
  sqlite3ParserARG_SDECL                /* A place to hold %extra_argument */
sl@0
   772
#if YYSTACKDEPTH<=0
sl@0
   773
  int yystksz;                  /* Current side of the stack */
sl@0
   774
  yyStackEntry *yystack;        /* The parser's stack */
sl@0
   775
#else
sl@0
   776
  yyStackEntry yystack[YYSTACKDEPTH];  /* The parser's stack */
sl@0
   777
#endif
sl@0
   778
};
sl@0
   779
typedef struct yyParser yyParser;
sl@0
   780
sl@0
   781
#ifndef NDEBUG
sl@0
   782
#include <stdio.h>
sl@0
   783
static FILE *yyTraceFILE = 0;
sl@0
   784
static char *yyTracePrompt = 0;
sl@0
   785
#endif /* NDEBUG */
sl@0
   786
sl@0
   787
#ifndef NDEBUG
sl@0
   788
/* 
sl@0
   789
** Turn parser tracing on by giving a stream to which to write the trace
sl@0
   790
** and a prompt to preface each trace message.  Tracing is turned off
sl@0
   791
** by making either argument NULL 
sl@0
   792
**
sl@0
   793
** Inputs:
sl@0
   794
** <ul>
sl@0
   795
** <li> A FILE* to which trace output should be written.
sl@0
   796
**      If NULL, then tracing is turned off.
sl@0
   797
** <li> A prefix string written at the beginning of every
sl@0
   798
**      line of trace output.  If NULL, then tracing is
sl@0
   799
**      turned off.
sl@0
   800
** </ul>
sl@0
   801
**
sl@0
   802
** Outputs:
sl@0
   803
** None.
sl@0
   804
*/
sl@0
   805
void sqlite3ParserTrace(FILE *TraceFILE, char *zTracePrompt){
sl@0
   806
  yyTraceFILE = TraceFILE;
sl@0
   807
  yyTracePrompt = zTracePrompt;
sl@0
   808
  if( yyTraceFILE==0 ) yyTracePrompt = 0;
sl@0
   809
  else if( yyTracePrompt==0 ) yyTraceFILE = 0;
sl@0
   810
}
sl@0
   811
#endif /* NDEBUG */
sl@0
   812
sl@0
   813
#ifndef NDEBUG
sl@0
   814
/* For tracing shifts, the names of all terminals and nonterminals
sl@0
   815
** are required.  The following table supplies these names */
sl@0
   816
static const char *const yyTokenName[] = { 
sl@0
   817
  "$",             "SEMI",          "EXPLAIN",       "QUERY",       
sl@0
   818
  "PLAN",          "BEGIN",         "TRANSACTION",   "DEFERRED",    
sl@0
   819
  "IMMEDIATE",     "EXCLUSIVE",     "COMMIT",        "END",         
sl@0
   820
  "ROLLBACK",      "CREATE",        "TABLE",         "IF",          
sl@0
   821
  "NOT",           "EXISTS",        "TEMP",          "LP",          
sl@0
   822
  "RP",            "AS",            "COMMA",         "ID",          
sl@0
   823
  "ABORT",         "AFTER",         "ANALYZE",       "ASC",         
sl@0
   824
  "ATTACH",        "BEFORE",        "CASCADE",       "CAST",        
sl@0
   825
  "CONFLICT",      "DATABASE",      "DESC",          "DETACH",      
sl@0
   826
  "EACH",          "FAIL",          "FOR",           "IGNORE",      
sl@0
   827
  "INITIALLY",     "INSTEAD",       "LIKE_KW",       "MATCH",       
sl@0
   828
  "KEY",           "OF",            "OFFSET",        "PRAGMA",      
sl@0
   829
  "RAISE",         "REPLACE",       "RESTRICT",      "ROW",         
sl@0
   830
  "TRIGGER",       "VACUUM",        "VIEW",          "VIRTUAL",     
sl@0
   831
  "REINDEX",       "RENAME",        "CTIME_KW",      "ANY",         
sl@0
   832
  "OR",            "AND",           "IS",            "BETWEEN",     
sl@0
   833
  "IN",            "ISNULL",        "NOTNULL",       "NE",          
sl@0
   834
  "EQ",            "GT",            "LE",            "LT",          
sl@0
   835
  "GE",            "ESCAPE",        "BITAND",        "BITOR",       
sl@0
   836
  "LSHIFT",        "RSHIFT",        "PLUS",          "MINUS",       
sl@0
   837
  "STAR",          "SLASH",         "REM",           "CONCAT",      
sl@0
   838
  "COLLATE",       "UMINUS",        "UPLUS",         "BITNOT",      
sl@0
   839
  "STRING",        "JOIN_KW",       "CONSTRAINT",    "DEFAULT",     
sl@0
   840
  "NULL",          "PRIMARY",       "UNIQUE",        "CHECK",       
sl@0
   841
  "REFERENCES",    "AUTOINCR",      "ON",            "DELETE",      
sl@0
   842
  "UPDATE",        "INSERT",        "SET",           "DEFERRABLE",  
sl@0
   843
  "FOREIGN",       "DROP",          "UNION",         "ALL",         
sl@0
   844
  "EXCEPT",        "INTERSECT",     "SELECT",        "DISTINCT",    
sl@0
   845
  "DOT",           "FROM",          "JOIN",          "USING",       
sl@0
   846
  "ORDER",         "BY",            "GROUP",         "HAVING",      
sl@0
   847
  "LIMIT",         "WHERE",         "INTO",          "VALUES",      
sl@0
   848
  "INTEGER",       "FLOAT",         "BLOB",          "REGISTER",    
sl@0
   849
  "VARIABLE",      "CASE",          "WHEN",          "THEN",        
sl@0
   850
  "ELSE",          "INDEX",         "ALTER",         "TO",          
sl@0
   851
  "ADD",           "COLUMNKW",      "error",         "input",       
sl@0
   852
  "cmdlist",       "ecmd",          "explain",       "cmdx",        
sl@0
   853
  "cmd",           "transtype",     "trans_opt",     "nm",          
sl@0
   854
  "create_table",  "create_table_args",  "temp",          "ifnotexists", 
sl@0
   855
  "dbnm",          "columnlist",    "conslist_opt",  "select",      
sl@0
   856
  "column",        "columnid",      "type",          "carglist",    
sl@0
   857
  "id",            "ids",           "typetoken",     "typename",    
sl@0
   858
  "signed",        "plus_num",      "minus_num",     "carg",        
sl@0
   859
  "ccons",         "term",          "expr",          "onconf",      
sl@0
   860
  "sortorder",     "autoinc",       "idxlist_opt",   "refargs",     
sl@0
   861
  "defer_subclause",  "refarg",        "refact",        "init_deferred_pred_opt",
sl@0
   862
  "conslist",      "tcons",         "idxlist",       "defer_subclause_opt",
sl@0
   863
  "orconf",        "resolvetype",   "raisetype",     "ifexists",    
sl@0
   864
  "fullname",      "oneselect",     "multiselect_op",  "distinct",    
sl@0
   865
  "selcollist",    "from",          "where_opt",     "groupby_opt", 
sl@0
   866
  "having_opt",    "orderby_opt",   "limit_opt",     "sclp",        
sl@0
   867
  "as",            "seltablist",    "stl_prefix",    "joinop",      
sl@0
   868
  "on_opt",        "using_opt",     "seltablist_paren",  "joinop2",     
sl@0
   869
  "inscollist",    "sortlist",      "sortitem",      "nexprlist",   
sl@0
   870
  "setlist",       "insert_cmd",    "inscollist_opt",  "itemlist",    
sl@0
   871
  "exprlist",      "likeop",        "escape",        "between_op",  
sl@0
   872
  "in_op",         "case_operand",  "case_exprlist",  "case_else",   
sl@0
   873
  "uniqueflag",    "collate",       "nmnum",         "plus_opt",    
sl@0
   874
  "number",        "trigger_decl",  "trigger_cmd_list",  "trigger_time",
sl@0
   875
  "trigger_event",  "foreach_clause",  "when_clause",   "trigger_cmd", 
sl@0
   876
  "database_kw_opt",  "key_opt",       "add_column_fullname",  "kwcolumn_opt",
sl@0
   877
};
sl@0
   878
#endif /* NDEBUG */
sl@0
   879
sl@0
   880
#ifndef NDEBUG
sl@0
   881
/* For tracing reduce actions, the names of all rules are required.
sl@0
   882
*/
sl@0
   883
static const char *const yyRuleName[] = {
sl@0
   884
 /*   0 */ "input ::= cmdlist",
sl@0
   885
 /*   1 */ "cmdlist ::= cmdlist ecmd",
sl@0
   886
 /*   2 */ "cmdlist ::= ecmd",
sl@0
   887
 /*   3 */ "ecmd ::= SEMI",
sl@0
   888
 /*   4 */ "ecmd ::= explain cmdx SEMI",
sl@0
   889
 /*   5 */ "explain ::=",
sl@0
   890
 /*   6 */ "explain ::= EXPLAIN",
sl@0
   891
 /*   7 */ "explain ::= EXPLAIN QUERY PLAN",
sl@0
   892
 /*   8 */ "cmdx ::= cmd",
sl@0
   893
 /*   9 */ "cmd ::= BEGIN transtype trans_opt",
sl@0
   894
 /*  10 */ "trans_opt ::=",
sl@0
   895
 /*  11 */ "trans_opt ::= TRANSACTION",
sl@0
   896
 /*  12 */ "trans_opt ::= TRANSACTION nm",
sl@0
   897
 /*  13 */ "transtype ::=",
sl@0
   898
 /*  14 */ "transtype ::= DEFERRED",
sl@0
   899
 /*  15 */ "transtype ::= IMMEDIATE",
sl@0
   900
 /*  16 */ "transtype ::= EXCLUSIVE",
sl@0
   901
 /*  17 */ "cmd ::= COMMIT trans_opt",
sl@0
   902
 /*  18 */ "cmd ::= END trans_opt",
sl@0
   903
 /*  19 */ "cmd ::= ROLLBACK trans_opt",
sl@0
   904
 /*  20 */ "cmd ::= create_table create_table_args",
sl@0
   905
 /*  21 */ "create_table ::= CREATE temp TABLE ifnotexists nm dbnm",
sl@0
   906
 /*  22 */ "ifnotexists ::=",
sl@0
   907
 /*  23 */ "ifnotexists ::= IF NOT EXISTS",
sl@0
   908
 /*  24 */ "temp ::= TEMP",
sl@0
   909
 /*  25 */ "temp ::=",
sl@0
   910
 /*  26 */ "create_table_args ::= LP columnlist conslist_opt RP",
sl@0
   911
 /*  27 */ "create_table_args ::= AS select",
sl@0
   912
 /*  28 */ "columnlist ::= columnlist COMMA column",
sl@0
   913
 /*  29 */ "columnlist ::= column",
sl@0
   914
 /*  30 */ "column ::= columnid type carglist",
sl@0
   915
 /*  31 */ "columnid ::= nm",
sl@0
   916
 /*  32 */ "id ::= ID",
sl@0
   917
 /*  33 */ "ids ::= ID|STRING",
sl@0
   918
 /*  34 */ "nm ::= ID",
sl@0
   919
 /*  35 */ "nm ::= STRING",
sl@0
   920
 /*  36 */ "nm ::= JOIN_KW",
sl@0
   921
 /*  37 */ "type ::=",
sl@0
   922
 /*  38 */ "type ::= typetoken",
sl@0
   923
 /*  39 */ "typetoken ::= typename",
sl@0
   924
 /*  40 */ "typetoken ::= typename LP signed RP",
sl@0
   925
 /*  41 */ "typetoken ::= typename LP signed COMMA signed RP",
sl@0
   926
 /*  42 */ "typename ::= ids",
sl@0
   927
 /*  43 */ "typename ::= typename ids",
sl@0
   928
 /*  44 */ "signed ::= plus_num",
sl@0
   929
 /*  45 */ "signed ::= minus_num",
sl@0
   930
 /*  46 */ "carglist ::= carglist carg",
sl@0
   931
 /*  47 */ "carglist ::=",
sl@0
   932
 /*  48 */ "carg ::= CONSTRAINT nm ccons",
sl@0
   933
 /*  49 */ "carg ::= ccons",
sl@0
   934
 /*  50 */ "ccons ::= DEFAULT term",
sl@0
   935
 /*  51 */ "ccons ::= DEFAULT LP expr RP",
sl@0
   936
 /*  52 */ "ccons ::= DEFAULT PLUS term",
sl@0
   937
 /*  53 */ "ccons ::= DEFAULT MINUS term",
sl@0
   938
 /*  54 */ "ccons ::= DEFAULT id",
sl@0
   939
 /*  55 */ "ccons ::= NULL onconf",
sl@0
   940
 /*  56 */ "ccons ::= NOT NULL onconf",
sl@0
   941
 /*  57 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc",
sl@0
   942
 /*  58 */ "ccons ::= UNIQUE onconf",
sl@0
   943
 /*  59 */ "ccons ::= CHECK LP expr RP",
sl@0
   944
 /*  60 */ "ccons ::= REFERENCES nm idxlist_opt refargs",
sl@0
   945
 /*  61 */ "ccons ::= defer_subclause",
sl@0
   946
 /*  62 */ "ccons ::= COLLATE ids",
sl@0
   947
 /*  63 */ "autoinc ::=",
sl@0
   948
 /*  64 */ "autoinc ::= AUTOINCR",
sl@0
   949
 /*  65 */ "refargs ::=",
sl@0
   950
 /*  66 */ "refargs ::= refargs refarg",
sl@0
   951
 /*  67 */ "refarg ::= MATCH nm",
sl@0
   952
 /*  68 */ "refarg ::= ON DELETE refact",
sl@0
   953
 /*  69 */ "refarg ::= ON UPDATE refact",
sl@0
   954
 /*  70 */ "refarg ::= ON INSERT refact",
sl@0
   955
 /*  71 */ "refact ::= SET NULL",
sl@0
   956
 /*  72 */ "refact ::= SET DEFAULT",
sl@0
   957
 /*  73 */ "refact ::= CASCADE",
sl@0
   958
 /*  74 */ "refact ::= RESTRICT",
sl@0
   959
 /*  75 */ "defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt",
sl@0
   960
 /*  76 */ "defer_subclause ::= DEFERRABLE init_deferred_pred_opt",
sl@0
   961
 /*  77 */ "init_deferred_pred_opt ::=",
sl@0
   962
 /*  78 */ "init_deferred_pred_opt ::= INITIALLY DEFERRED",
sl@0
   963
 /*  79 */ "init_deferred_pred_opt ::= INITIALLY IMMEDIATE",
sl@0
   964
 /*  80 */ "conslist_opt ::=",
sl@0
   965
 /*  81 */ "conslist_opt ::= COMMA conslist",
sl@0
   966
 /*  82 */ "conslist ::= conslist COMMA tcons",
sl@0
   967
 /*  83 */ "conslist ::= conslist tcons",
sl@0
   968
 /*  84 */ "conslist ::= tcons",
sl@0
   969
 /*  85 */ "tcons ::= CONSTRAINT nm",
sl@0
   970
 /*  86 */ "tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf",
sl@0
   971
 /*  87 */ "tcons ::= UNIQUE LP idxlist RP onconf",
sl@0
   972
 /*  88 */ "tcons ::= CHECK LP expr RP onconf",
sl@0
   973
 /*  89 */ "tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt",
sl@0
   974
 /*  90 */ "defer_subclause_opt ::=",
sl@0
   975
 /*  91 */ "defer_subclause_opt ::= defer_subclause",
sl@0
   976
 /*  92 */ "onconf ::=",
sl@0
   977
 /*  93 */ "onconf ::= ON CONFLICT resolvetype",
sl@0
   978
 /*  94 */ "orconf ::=",
sl@0
   979
 /*  95 */ "orconf ::= OR resolvetype",
sl@0
   980
 /*  96 */ "resolvetype ::= raisetype",
sl@0
   981
 /*  97 */ "resolvetype ::= IGNORE",
sl@0
   982
 /*  98 */ "resolvetype ::= REPLACE",
sl@0
   983
 /*  99 */ "cmd ::= DROP TABLE ifexists fullname",
sl@0
   984
 /* 100 */ "ifexists ::= IF EXISTS",
sl@0
   985
 /* 101 */ "ifexists ::=",
sl@0
   986
 /* 102 */ "cmd ::= CREATE temp VIEW ifnotexists nm dbnm AS select",
sl@0
   987
 /* 103 */ "cmd ::= DROP VIEW ifexists fullname",
sl@0
   988
 /* 104 */ "cmd ::= select",
sl@0
   989
 /* 105 */ "select ::= oneselect",
sl@0
   990
 /* 106 */ "select ::= select multiselect_op oneselect",
sl@0
   991
 /* 107 */ "multiselect_op ::= UNION",
sl@0
   992
 /* 108 */ "multiselect_op ::= UNION ALL",
sl@0
   993
 /* 109 */ "multiselect_op ::= EXCEPT|INTERSECT",
sl@0
   994
 /* 110 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt",
sl@0
   995
 /* 111 */ "distinct ::= DISTINCT",
sl@0
   996
 /* 112 */ "distinct ::= ALL",
sl@0
   997
 /* 113 */ "distinct ::=",
sl@0
   998
 /* 114 */ "sclp ::= selcollist COMMA",
sl@0
   999
 /* 115 */ "sclp ::=",
sl@0
  1000
 /* 116 */ "selcollist ::= sclp expr as",
sl@0
  1001
 /* 117 */ "selcollist ::= sclp STAR",
sl@0
  1002
 /* 118 */ "selcollist ::= sclp nm DOT STAR",
sl@0
  1003
 /* 119 */ "as ::= AS nm",
sl@0
  1004
 /* 120 */ "as ::= ids",
sl@0
  1005
 /* 121 */ "as ::=",
sl@0
  1006
 /* 122 */ "from ::=",
sl@0
  1007
 /* 123 */ "from ::= FROM seltablist",
sl@0
  1008
 /* 124 */ "stl_prefix ::= seltablist joinop",
sl@0
  1009
 /* 125 */ "stl_prefix ::=",
sl@0
  1010
 /* 126 */ "seltablist ::= stl_prefix nm dbnm as on_opt using_opt",
sl@0
  1011
 /* 127 */ "seltablist ::= stl_prefix LP seltablist_paren RP as on_opt using_opt",
sl@0
  1012
 /* 128 */ "seltablist_paren ::= select",
sl@0
  1013
 /* 129 */ "seltablist_paren ::= seltablist",
sl@0
  1014
 /* 130 */ "dbnm ::=",
sl@0
  1015
 /* 131 */ "dbnm ::= DOT nm",
sl@0
  1016
 /* 132 */ "fullname ::= nm dbnm",
sl@0
  1017
 /* 133 */ "joinop ::= COMMA|JOIN",
sl@0
  1018
 /* 134 */ "joinop ::= JOIN_KW JOIN",
sl@0
  1019
 /* 135 */ "joinop ::= JOIN_KW nm JOIN",
sl@0
  1020
 /* 136 */ "joinop ::= JOIN_KW nm nm JOIN",
sl@0
  1021
 /* 137 */ "on_opt ::= ON expr",
sl@0
  1022
 /* 138 */ "on_opt ::=",
sl@0
  1023
 /* 139 */ "using_opt ::= USING LP inscollist RP",
sl@0
  1024
 /* 140 */ "using_opt ::=",
sl@0
  1025
 /* 141 */ "orderby_opt ::=",
sl@0
  1026
 /* 142 */ "orderby_opt ::= ORDER BY sortlist",
sl@0
  1027
 /* 143 */ "sortlist ::= sortlist COMMA sortitem sortorder",
sl@0
  1028
 /* 144 */ "sortlist ::= sortitem sortorder",
sl@0
  1029
 /* 145 */ "sortitem ::= expr",
sl@0
  1030
 /* 146 */ "sortorder ::= ASC",
sl@0
  1031
 /* 147 */ "sortorder ::= DESC",
sl@0
  1032
 /* 148 */ "sortorder ::=",
sl@0
  1033
 /* 149 */ "groupby_opt ::=",
sl@0
  1034
 /* 150 */ "groupby_opt ::= GROUP BY nexprlist",
sl@0
  1035
 /* 151 */ "having_opt ::=",
sl@0
  1036
 /* 152 */ "having_opt ::= HAVING expr",
sl@0
  1037
 /* 153 */ "limit_opt ::=",
sl@0
  1038
 /* 154 */ "limit_opt ::= LIMIT expr",
sl@0
  1039
 /* 155 */ "limit_opt ::= LIMIT expr OFFSET expr",
sl@0
  1040
 /* 156 */ "limit_opt ::= LIMIT expr COMMA expr",
sl@0
  1041
 /* 157 */ "cmd ::= DELETE FROM fullname where_opt",
sl@0
  1042
 /* 158 */ "where_opt ::=",
sl@0
  1043
 /* 159 */ "where_opt ::= WHERE expr",
sl@0
  1044
 /* 160 */ "cmd ::= UPDATE orconf fullname SET setlist where_opt",
sl@0
  1045
 /* 161 */ "setlist ::= setlist COMMA nm EQ expr",
sl@0
  1046
 /* 162 */ "setlist ::= nm EQ expr",
sl@0
  1047
 /* 163 */ "cmd ::= insert_cmd INTO fullname inscollist_opt VALUES LP itemlist RP",
sl@0
  1048
 /* 164 */ "cmd ::= insert_cmd INTO fullname inscollist_opt select",
sl@0
  1049
 /* 165 */ "cmd ::= insert_cmd INTO fullname inscollist_opt DEFAULT VALUES",
sl@0
  1050
 /* 166 */ "insert_cmd ::= INSERT orconf",
sl@0
  1051
 /* 167 */ "insert_cmd ::= REPLACE",
sl@0
  1052
 /* 168 */ "itemlist ::= itemlist COMMA expr",
sl@0
  1053
 /* 169 */ "itemlist ::= expr",
sl@0
  1054
 /* 170 */ "inscollist_opt ::=",
sl@0
  1055
 /* 171 */ "inscollist_opt ::= LP inscollist RP",
sl@0
  1056
 /* 172 */ "inscollist ::= inscollist COMMA nm",
sl@0
  1057
 /* 173 */ "inscollist ::= nm",
sl@0
  1058
 /* 174 */ "expr ::= term",
sl@0
  1059
 /* 175 */ "expr ::= LP expr RP",
sl@0
  1060
 /* 176 */ "term ::= NULL",
sl@0
  1061
 /* 177 */ "expr ::= ID",
sl@0
  1062
 /* 178 */ "expr ::= JOIN_KW",
sl@0
  1063
 /* 179 */ "expr ::= nm DOT nm",
sl@0
  1064
 /* 180 */ "expr ::= nm DOT nm DOT nm",
sl@0
  1065
 /* 181 */ "term ::= INTEGER|FLOAT|BLOB",
sl@0
  1066
 /* 182 */ "term ::= STRING",
sl@0
  1067
 /* 183 */ "expr ::= REGISTER",
sl@0
  1068
 /* 184 */ "expr ::= VARIABLE",
sl@0
  1069
 /* 185 */ "expr ::= expr COLLATE ids",
sl@0
  1070
 /* 186 */ "expr ::= CAST LP expr AS typetoken RP",
sl@0
  1071
 /* 187 */ "expr ::= ID LP distinct exprlist RP",
sl@0
  1072
 /* 188 */ "expr ::= ID LP STAR RP",
sl@0
  1073
 /* 189 */ "term ::= CTIME_KW",
sl@0
  1074
 /* 190 */ "expr ::= expr AND expr",
sl@0
  1075
 /* 191 */ "expr ::= expr OR expr",
sl@0
  1076
 /* 192 */ "expr ::= expr LT|GT|GE|LE expr",
sl@0
  1077
 /* 193 */ "expr ::= expr EQ|NE expr",
sl@0
  1078
 /* 194 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr",
sl@0
  1079
 /* 195 */ "expr ::= expr PLUS|MINUS expr",
sl@0
  1080
 /* 196 */ "expr ::= expr STAR|SLASH|REM expr",
sl@0
  1081
 /* 197 */ "expr ::= expr CONCAT expr",
sl@0
  1082
 /* 198 */ "likeop ::= LIKE_KW",
sl@0
  1083
 /* 199 */ "likeop ::= NOT LIKE_KW",
sl@0
  1084
 /* 200 */ "likeop ::= MATCH",
sl@0
  1085
 /* 201 */ "likeop ::= NOT MATCH",
sl@0
  1086
 /* 202 */ "escape ::= ESCAPE expr",
sl@0
  1087
 /* 203 */ "escape ::=",
sl@0
  1088
 /* 204 */ "expr ::= expr likeop expr escape",
sl@0
  1089
 /* 205 */ "expr ::= expr ISNULL|NOTNULL",
sl@0
  1090
 /* 206 */ "expr ::= expr IS NULL",
sl@0
  1091
 /* 207 */ "expr ::= expr NOT NULL",
sl@0
  1092
 /* 208 */ "expr ::= expr IS NOT NULL",
sl@0
  1093
 /* 209 */ "expr ::= NOT expr",
sl@0
  1094
 /* 210 */ "expr ::= BITNOT expr",
sl@0
  1095
 /* 211 */ "expr ::= MINUS expr",
sl@0
  1096
 /* 212 */ "expr ::= PLUS expr",
sl@0
  1097
 /* 213 */ "between_op ::= BETWEEN",
sl@0
  1098
 /* 214 */ "between_op ::= NOT BETWEEN",
sl@0
  1099
 /* 215 */ "expr ::= expr between_op expr AND expr",
sl@0
  1100
 /* 216 */ "in_op ::= IN",
sl@0
  1101
 /* 217 */ "in_op ::= NOT IN",
sl@0
  1102
 /* 218 */ "expr ::= expr in_op LP exprlist RP",
sl@0
  1103
 /* 219 */ "expr ::= LP select RP",
sl@0
  1104
 /* 220 */ "expr ::= expr in_op LP select RP",
sl@0
  1105
 /* 221 */ "expr ::= expr in_op nm dbnm",
sl@0
  1106
 /* 222 */ "expr ::= EXISTS LP select RP",
sl@0
  1107
 /* 223 */ "expr ::= CASE case_operand case_exprlist case_else END",
sl@0
  1108
 /* 224 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr",
sl@0
  1109
 /* 225 */ "case_exprlist ::= WHEN expr THEN expr",
sl@0
  1110
 /* 226 */ "case_else ::= ELSE expr",
sl@0
  1111
 /* 227 */ "case_else ::=",
sl@0
  1112
 /* 228 */ "case_operand ::= expr",
sl@0
  1113
 /* 229 */ "case_operand ::=",
sl@0
  1114
 /* 230 */ "exprlist ::= nexprlist",
sl@0
  1115
 /* 231 */ "exprlist ::=",
sl@0
  1116
 /* 232 */ "nexprlist ::= nexprlist COMMA expr",
sl@0
  1117
 /* 233 */ "nexprlist ::= expr",
sl@0
  1118
 /* 234 */ "cmd ::= CREATE uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP",
sl@0
  1119
 /* 235 */ "uniqueflag ::= UNIQUE",
sl@0
  1120
 /* 236 */ "uniqueflag ::=",
sl@0
  1121
 /* 237 */ "idxlist_opt ::=",
sl@0
  1122
 /* 238 */ "idxlist_opt ::= LP idxlist RP",
sl@0
  1123
 /* 239 */ "idxlist ::= idxlist COMMA nm collate sortorder",
sl@0
  1124
 /* 240 */ "idxlist ::= nm collate sortorder",
sl@0
  1125
 /* 241 */ "collate ::=",
sl@0
  1126
 /* 242 */ "collate ::= COLLATE ids",
sl@0
  1127
 /* 243 */ "cmd ::= DROP INDEX ifexists fullname",
sl@0
  1128
 /* 244 */ "cmd ::= VACUUM",
sl@0
  1129
 /* 245 */ "cmd ::= VACUUM nm",
sl@0
  1130
 /* 246 */ "cmd ::= PRAGMA nm dbnm EQ nmnum",
sl@0
  1131
 /* 247 */ "cmd ::= PRAGMA nm dbnm EQ ON",
sl@0
  1132
 /* 248 */ "cmd ::= PRAGMA nm dbnm EQ DELETE",
sl@0
  1133
 /* 249 */ "cmd ::= PRAGMA nm dbnm EQ minus_num",
sl@0
  1134
 /* 250 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP",
sl@0
  1135
 /* 251 */ "cmd ::= PRAGMA nm dbnm",
sl@0
  1136
 /* 252 */ "nmnum ::= plus_num",
sl@0
  1137
 /* 253 */ "nmnum ::= nm",
sl@0
  1138
 /* 254 */ "plus_num ::= plus_opt number",
sl@0
  1139
 /* 255 */ "minus_num ::= MINUS number",
sl@0
  1140
 /* 256 */ "number ::= INTEGER|FLOAT",
sl@0
  1141
 /* 257 */ "plus_opt ::= PLUS",
sl@0
  1142
 /* 258 */ "plus_opt ::=",
sl@0
  1143
 /* 259 */ "cmd ::= CREATE trigger_decl BEGIN trigger_cmd_list END",
sl@0
  1144
 /* 260 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause",
sl@0
  1145
 /* 261 */ "trigger_time ::= BEFORE",
sl@0
  1146
 /* 262 */ "trigger_time ::= AFTER",
sl@0
  1147
 /* 263 */ "trigger_time ::= INSTEAD OF",
sl@0
  1148
 /* 264 */ "trigger_time ::=",
sl@0
  1149
 /* 265 */ "trigger_event ::= DELETE|INSERT",
sl@0
  1150
 /* 266 */ "trigger_event ::= UPDATE",
sl@0
  1151
 /* 267 */ "trigger_event ::= UPDATE OF inscollist",
sl@0
  1152
 /* 268 */ "foreach_clause ::=",
sl@0
  1153
 /* 269 */ "foreach_clause ::= FOR EACH ROW",
sl@0
  1154
 /* 270 */ "when_clause ::=",
sl@0
  1155
 /* 271 */ "when_clause ::= WHEN expr",
sl@0
  1156
 /* 272 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI",
sl@0
  1157
 /* 273 */ "trigger_cmd_list ::= trigger_cmd SEMI",
sl@0
  1158
 /* 274 */ "trigger_cmd ::= UPDATE orconf nm SET setlist where_opt",
sl@0
  1159
 /* 275 */ "trigger_cmd ::= insert_cmd INTO nm inscollist_opt VALUES LP itemlist RP",
sl@0
  1160
 /* 276 */ "trigger_cmd ::= insert_cmd INTO nm inscollist_opt select",
sl@0
  1161
 /* 277 */ "trigger_cmd ::= DELETE FROM nm where_opt",
sl@0
  1162
 /* 278 */ "trigger_cmd ::= select",
sl@0
  1163
 /* 279 */ "expr ::= RAISE LP IGNORE RP",
sl@0
  1164
 /* 280 */ "expr ::= RAISE LP raisetype COMMA nm RP",
sl@0
  1165
 /* 281 */ "raisetype ::= ROLLBACK",
sl@0
  1166
 /* 282 */ "raisetype ::= ABORT",
sl@0
  1167
 /* 283 */ "raisetype ::= FAIL",
sl@0
  1168
 /* 284 */ "cmd ::= DROP TRIGGER ifexists fullname",
sl@0
  1169
 /* 285 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt",
sl@0
  1170
 /* 286 */ "cmd ::= DETACH database_kw_opt expr",
sl@0
  1171
 /* 287 */ "key_opt ::=",
sl@0
  1172
 /* 288 */ "key_opt ::= KEY expr",
sl@0
  1173
 /* 289 */ "database_kw_opt ::= DATABASE",
sl@0
  1174
 /* 290 */ "database_kw_opt ::=",
sl@0
  1175
 /* 291 */ "cmd ::= REINDEX",
sl@0
  1176
 /* 292 */ "cmd ::= REINDEX nm dbnm",
sl@0
  1177
 /* 293 */ "cmd ::= ANALYZE",
sl@0
  1178
 /* 294 */ "cmd ::= ANALYZE nm dbnm",
sl@0
  1179
 /* 295 */ "cmd ::= ALTER TABLE fullname RENAME TO nm",
sl@0
  1180
 /* 296 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column",
sl@0
  1181
 /* 297 */ "add_column_fullname ::= fullname",
sl@0
  1182
 /* 298 */ "kwcolumn_opt ::=",
sl@0
  1183
 /* 299 */ "kwcolumn_opt ::= COLUMNKW",
sl@0
  1184
};
sl@0
  1185
#endif /* NDEBUG */
sl@0
  1186
sl@0
  1187
sl@0
  1188
#if YYSTACKDEPTH<=0
sl@0
  1189
/*
sl@0
  1190
** Try to increase the size of the parser stack.
sl@0
  1191
*/
sl@0
  1192
static void yyGrowStack(yyParser *p){
sl@0
  1193
  int newSize;
sl@0
  1194
  yyStackEntry *pNew;
sl@0
  1195
sl@0
  1196
  newSize = p->yystksz*2 + 100;
sl@0
  1197
  pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
sl@0
  1198
  if( pNew ){
sl@0
  1199
    p->yystack = pNew;
sl@0
  1200
    p->yystksz = newSize;
sl@0
  1201
#ifndef NDEBUG
sl@0
  1202
    if( yyTraceFILE ){
sl@0
  1203
      fprintf(yyTraceFILE,"%sStack grows to %d entries!\n",
sl@0
  1204
              yyTracePrompt, p->yystksz);
sl@0
  1205
    }
sl@0
  1206
#endif
sl@0
  1207
  }
sl@0
  1208
}
sl@0
  1209
#endif
sl@0
  1210
sl@0
  1211
/* 
sl@0
  1212
** This function allocates a new parser.
sl@0
  1213
** The only argument is a pointer to a function which works like
sl@0
  1214
** malloc.
sl@0
  1215
**
sl@0
  1216
** Inputs:
sl@0
  1217
** A pointer to the function used to allocate memory.
sl@0
  1218
**
sl@0
  1219
** Outputs:
sl@0
  1220
** A pointer to a parser.  This pointer is used in subsequent calls
sl@0
  1221
** to sqlite3Parser and sqlite3ParserFree.
sl@0
  1222
*/
sl@0
  1223
void *sqlite3ParserAlloc(void *(*mallocProc)(size_t)){
sl@0
  1224
  yyParser *pParser;
sl@0
  1225
  pParser = (yyParser*)(*mallocProc)( (size_t)sizeof(yyParser) );
sl@0
  1226
  if( pParser ){
sl@0
  1227
    pParser->yyidx = -1;
sl@0
  1228
#ifdef YYTRACKMAXSTACKDEPTH
sl@0
  1229
    pParser->yyidxMax = 0;
sl@0
  1230
#endif
sl@0
  1231
#if YYSTACKDEPTH<=0
sl@0
  1232
    yyGrowStack(pParser);
sl@0
  1233
#endif
sl@0
  1234
  }
sl@0
  1235
  return pParser;
sl@0
  1236
}
sl@0
  1237
sl@0
  1238
/* The following function deletes the value associated with a
sl@0
  1239
** symbol.  The symbol can be either a terminal or nonterminal.
sl@0
  1240
** "yymajor" is the symbol code, and "yypminor" is a pointer to
sl@0
  1241
** the value.
sl@0
  1242
*/
sl@0
  1243
static void yy_destructor(
sl@0
  1244
  yyParser *yypParser,    /* The parser */
sl@0
  1245
  YYCODETYPE yymajor,     /* Type code for object to destroy */
sl@0
  1246
  YYMINORTYPE *yypminor   /* The object to be destroyed */
sl@0
  1247
){
sl@0
  1248
  sqlite3ParserARG_FETCH;
sl@0
  1249
  switch( yymajor ){
sl@0
  1250
    /* Here is inserted the actions which take place when a
sl@0
  1251
    ** terminal or non-terminal is destroyed.  This can happen
sl@0
  1252
    ** when the symbol is popped from the stack during a
sl@0
  1253
    ** reduce or during error processing or when a parser is 
sl@0
  1254
    ** being destroyed before it is finished parsing.
sl@0
  1255
    **
sl@0
  1256
    ** Note: during a reduce, the only symbols destroyed are those
sl@0
  1257
    ** which appear on the RHS of the rule, but which are not used
sl@0
  1258
    ** inside the C code.
sl@0
  1259
    */
sl@0
  1260
    case 155: /* select */
sl@0
  1261
    case 189: /* oneselect */
sl@0
  1262
    case 206: /* seltablist_paren */
sl@0
  1263
{
sl@0
  1264
#line 369 "parse.y"
sl@0
  1265
sqlite3SelectDelete(pParse->db, (yypminor->yy459));
sl@0
  1266
#line 1270 "parse.c"
sl@0
  1267
}
sl@0
  1268
      break;
sl@0
  1269
    case 169: /* term */
sl@0
  1270
    case 170: /* expr */
sl@0
  1271
    case 194: /* where_opt */
sl@0
  1272
    case 196: /* having_opt */
sl@0
  1273
    case 204: /* on_opt */
sl@0
  1274
    case 210: /* sortitem */
sl@0
  1275
    case 218: /* escape */
sl@0
  1276
    case 221: /* case_operand */
sl@0
  1277
    case 223: /* case_else */
sl@0
  1278
    case 234: /* when_clause */
sl@0
  1279
    case 237: /* key_opt */
sl@0
  1280
{
sl@0
  1281
#line 629 "parse.y"
sl@0
  1282
sqlite3ExprDelete(pParse->db, (yypminor->yy2));
sl@0
  1283
#line 1287 "parse.c"
sl@0
  1284
}
sl@0
  1285
      break;
sl@0
  1286
    case 174: /* idxlist_opt */
sl@0
  1287
    case 182: /* idxlist */
sl@0
  1288
    case 192: /* selcollist */
sl@0
  1289
    case 195: /* groupby_opt */
sl@0
  1290
    case 197: /* orderby_opt */
sl@0
  1291
    case 199: /* sclp */
sl@0
  1292
    case 209: /* sortlist */
sl@0
  1293
    case 211: /* nexprlist */
sl@0
  1294
    case 212: /* setlist */
sl@0
  1295
    case 215: /* itemlist */
sl@0
  1296
    case 216: /* exprlist */
sl@0
  1297
    case 222: /* case_exprlist */
sl@0
  1298
{
sl@0
  1299
#line 887 "parse.y"
sl@0
  1300
sqlite3ExprListDelete(pParse->db, (yypminor->yy82));
sl@0
  1301
#line 1305 "parse.c"
sl@0
  1302
}
sl@0
  1303
      break;
sl@0
  1304
    case 188: /* fullname */
sl@0
  1305
    case 193: /* from */
sl@0
  1306
    case 201: /* seltablist */
sl@0
  1307
    case 202: /* stl_prefix */
sl@0
  1308
{
sl@0
  1309
#line 486 "parse.y"
sl@0
  1310
sqlite3SrcListDelete(pParse->db, (yypminor->yy67));
sl@0
  1311
#line 1315 "parse.c"
sl@0
  1312
}
sl@0
  1313
      break;
sl@0
  1314
    case 205: /* using_opt */
sl@0
  1315
    case 208: /* inscollist */
sl@0
  1316
    case 214: /* inscollist_opt */
sl@0
  1317
{
sl@0
  1318
#line 503 "parse.y"
sl@0
  1319
sqlite3IdListDelete(pParse->db, (yypminor->yy240));
sl@0
  1320
#line 1324 "parse.c"
sl@0
  1321
}
sl@0
  1322
      break;
sl@0
  1323
    case 230: /* trigger_cmd_list */
sl@0
  1324
    case 235: /* trigger_cmd */
sl@0
  1325
{
sl@0
  1326
#line 991 "parse.y"
sl@0
  1327
sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy347));
sl@0
  1328
#line 1332 "parse.c"
sl@0
  1329
}
sl@0
  1330
      break;
sl@0
  1331
    case 232: /* trigger_event */
sl@0
  1332
{
sl@0
  1333
#line 977 "parse.y"
sl@0
  1334
sqlite3IdListDelete(pParse->db, (yypminor->yy210).b);
sl@0
  1335
#line 1339 "parse.c"
sl@0
  1336
}
sl@0
  1337
      break;
sl@0
  1338
    default:  break;   /* If no destructor action specified: do nothing */
sl@0
  1339
  }
sl@0
  1340
}
sl@0
  1341
sl@0
  1342
/*
sl@0
  1343
** Pop the parser's stack once.
sl@0
  1344
**
sl@0
  1345
** If there is a destructor routine associated with the token which
sl@0
  1346
** is popped from the stack, then call it.
sl@0
  1347
**
sl@0
  1348
** Return the major token number for the symbol popped.
sl@0
  1349
*/
sl@0
  1350
static int yy_pop_parser_stack(yyParser *pParser){
sl@0
  1351
  YYCODETYPE yymajor;
sl@0
  1352
  yyStackEntry *yytos = &pParser->yystack[pParser->yyidx];
sl@0
  1353
sl@0
  1354
  if( pParser->yyidx<0 ) return 0;
sl@0
  1355
#ifndef NDEBUG
sl@0
  1356
  if( yyTraceFILE && pParser->yyidx>=0 ){
sl@0
  1357
    fprintf(yyTraceFILE,"%sPopping %s\n",
sl@0
  1358
      yyTracePrompt,
sl@0
  1359
      yyTokenName[yytos->major]);
sl@0
  1360
  }
sl@0
  1361
#endif
sl@0
  1362
  yymajor = yytos->major;
sl@0
  1363
  yy_destructor(pParser, yymajor, &yytos->minor);
sl@0
  1364
  pParser->yyidx--;
sl@0
  1365
  return yymajor;
sl@0
  1366
}
sl@0
  1367
sl@0
  1368
/* 
sl@0
  1369
** Deallocate and destroy a parser.  Destructors are all called for
sl@0
  1370
** all stack elements before shutting the parser down.
sl@0
  1371
**
sl@0
  1372
** Inputs:
sl@0
  1373
** <ul>
sl@0
  1374
** <li>  A pointer to the parser.  This should be a pointer
sl@0
  1375
**       obtained from sqlite3ParserAlloc.
sl@0
  1376
** <li>  A pointer to a function used to reclaim memory obtained
sl@0
  1377
**       from malloc.
sl@0
  1378
** </ul>
sl@0
  1379
*/
sl@0
  1380
void sqlite3ParserFree(
sl@0
  1381
  void *p,                    /* The parser to be deleted */
sl@0
  1382
  void (*freeProc)(void*)     /* Function used to reclaim memory */
sl@0
  1383
){
sl@0
  1384
  yyParser *pParser = (yyParser*)p;
sl@0
  1385
  if( pParser==0 ) return;
sl@0
  1386
  while( pParser->yyidx>=0 ) yy_pop_parser_stack(pParser);
sl@0
  1387
#if YYSTACKDEPTH<=0
sl@0
  1388
  free(pParser->yystack);
sl@0
  1389
#endif
sl@0
  1390
  (*freeProc)((void*)pParser);
sl@0
  1391
}
sl@0
  1392
sl@0
  1393
/*
sl@0
  1394
** Return the peak depth of the stack for a parser.
sl@0
  1395
*/
sl@0
  1396
#ifdef YYTRACKMAXSTACKDEPTH
sl@0
  1397
int sqlite3ParserStackPeak(void *p){
sl@0
  1398
  yyParser *pParser = (yyParser*)p;
sl@0
  1399
  return pParser->yyidxMax;
sl@0
  1400
}
sl@0
  1401
#endif
sl@0
  1402
sl@0
  1403
/*
sl@0
  1404
** Find the appropriate action for a parser given the terminal
sl@0
  1405
** look-ahead token iLookAhead.
sl@0
  1406
**
sl@0
  1407
** If the look-ahead token is YYNOCODE, then check to see if the action is
sl@0
  1408
** independent of the look-ahead.  If it is, return the action, otherwise
sl@0
  1409
** return YY_NO_ACTION.
sl@0
  1410
*/
sl@0
  1411
static int yy_find_shift_action(
sl@0
  1412
  yyParser *pParser,        /* The parser */
sl@0
  1413
  YYCODETYPE iLookAhead     /* The look-ahead token */
sl@0
  1414
){
sl@0
  1415
  int i;
sl@0
  1416
  int stateno = pParser->yystack[pParser->yyidx].stateno;
sl@0
  1417
 
sl@0
  1418
  if( stateno>YY_SHIFT_MAX || (i = yy_shift_ofst[stateno])==YY_SHIFT_USE_DFLT ){
sl@0
  1419
    return yy_default[stateno];
sl@0
  1420
  }
sl@0
  1421
  assert( iLookAhead!=YYNOCODE );
sl@0
  1422
  i += iLookAhead;
sl@0
  1423
  if( i<0 || i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
sl@0
  1424
    if( iLookAhead>0 ){
sl@0
  1425
#ifdef YYFALLBACK
sl@0
  1426
      int iFallback;            /* Fallback token */
sl@0
  1427
      if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
sl@0
  1428
             && (iFallback = yyFallback[iLookAhead])!=0 ){
sl@0
  1429
#ifndef NDEBUG
sl@0
  1430
        if( yyTraceFILE ){
sl@0
  1431
          fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
sl@0
  1432
             yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
sl@0
  1433
        }
sl@0
  1434
#endif
sl@0
  1435
        return yy_find_shift_action(pParser, iFallback);
sl@0
  1436
      }
sl@0
  1437
#endif
sl@0
  1438
#ifdef YYWILDCARD
sl@0
  1439
      {
sl@0
  1440
        int j = i - iLookAhead + YYWILDCARD;
sl@0
  1441
        if( j>=0 && j<YY_SZ_ACTTAB && yy_lookahead[j]==YYWILDCARD ){
sl@0
  1442
#ifndef NDEBUG
sl@0
  1443
          if( yyTraceFILE ){
sl@0
  1444
            fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
sl@0
  1445
               yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[YYWILDCARD]);
sl@0
  1446
          }
sl@0
  1447
#endif /* NDEBUG */
sl@0
  1448
          return yy_action[j];
sl@0
  1449
        }
sl@0
  1450
      }
sl@0
  1451
#endif /* YYWILDCARD */
sl@0
  1452
    }
sl@0
  1453
    return yy_default[stateno];
sl@0
  1454
  }else{
sl@0
  1455
    return yy_action[i];
sl@0
  1456
  }
sl@0
  1457
}
sl@0
  1458
sl@0
  1459
/*
sl@0
  1460
** Find the appropriate action for a parser given the non-terminal
sl@0
  1461
** look-ahead token iLookAhead.
sl@0
  1462
**
sl@0
  1463
** If the look-ahead token is YYNOCODE, then check to see if the action is
sl@0
  1464
** independent of the look-ahead.  If it is, return the action, otherwise
sl@0
  1465
** return YY_NO_ACTION.
sl@0
  1466
*/
sl@0
  1467
static int yy_find_reduce_action(
sl@0
  1468
  int stateno,              /* Current state number */
sl@0
  1469
  YYCODETYPE iLookAhead     /* The look-ahead token */
sl@0
  1470
){
sl@0
  1471
  int i;
sl@0
  1472
#ifdef YYERRORSYMBOL
sl@0
  1473
  if( stateno>YY_REDUCE_MAX ){
sl@0
  1474
    return yy_default[stateno];
sl@0
  1475
  }
sl@0
  1476
#else
sl@0
  1477
  assert( stateno<=YY_REDUCE_MAX );
sl@0
  1478
#endif
sl@0
  1479
  i = yy_reduce_ofst[stateno];
sl@0
  1480
  assert( i!=YY_REDUCE_USE_DFLT );
sl@0
  1481
  assert( iLookAhead!=YYNOCODE );
sl@0
  1482
  i += iLookAhead;
sl@0
  1483
#ifdef YYERRORSYMBOL
sl@0
  1484
  if( i<0 || i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
sl@0
  1485
    return yy_default[stateno];
sl@0
  1486
  }
sl@0
  1487
#else
sl@0
  1488
  assert( i>=0 && i<YY_SZ_ACTTAB );
sl@0
  1489
  assert( yy_lookahead[i]==iLookAhead );
sl@0
  1490
#endif
sl@0
  1491
  return yy_action[i];
sl@0
  1492
}
sl@0
  1493
sl@0
  1494
/*
sl@0
  1495
** The following routine is called if the stack overflows.
sl@0
  1496
*/
sl@0
  1497
static void yyStackOverflow(yyParser *yypParser, YYMINORTYPE *yypMinor){
sl@0
  1498
   sqlite3ParserARG_FETCH;
sl@0
  1499
   yypParser->yyidx--;
sl@0
  1500
#ifndef NDEBUG
sl@0
  1501
   if( yyTraceFILE ){
sl@0
  1502
     fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
sl@0
  1503
   }
sl@0
  1504
#endif
sl@0
  1505
   while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
sl@0
  1506
   /* Here code is inserted which will execute if the parser
sl@0
  1507
   ** stack every overflows */
sl@0
  1508
#line 39 "parse.y"
sl@0
  1509
sl@0
  1510
  sqlite3ErrorMsg(pParse, "parser stack overflow");
sl@0
  1511
  pParse->parseError = 1;
sl@0
  1512
#line 1517 "parse.c"
sl@0
  1513
   sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument var */
sl@0
  1514
}
sl@0
  1515
sl@0
  1516
/*
sl@0
  1517
** Perform a shift action.
sl@0
  1518
*/
sl@0
  1519
static void yy_shift(
sl@0
  1520
  yyParser *yypParser,          /* The parser to be shifted */
sl@0
  1521
  int yyNewState,               /* The new state to shift in */
sl@0
  1522
  int yyMajor,                  /* The major token to shift in */
sl@0
  1523
  YYMINORTYPE *yypMinor         /* Pointer to the minor token to shift in */
sl@0
  1524
){
sl@0
  1525
  yyStackEntry *yytos;
sl@0
  1526
  yypParser->yyidx++;
sl@0
  1527
#ifdef YYTRACKMAXSTACKDEPTH
sl@0
  1528
  if( yypParser->yyidx>yypParser->yyidxMax ){
sl@0
  1529
    yypParser->yyidxMax = yypParser->yyidx;
sl@0
  1530
  }
sl@0
  1531
#endif
sl@0
  1532
#if YYSTACKDEPTH>0 
sl@0
  1533
  if( yypParser->yyidx>=YYSTACKDEPTH ){
sl@0
  1534
    yyStackOverflow(yypParser, yypMinor);
sl@0
  1535
    return;
sl@0
  1536
  }
sl@0
  1537
#else
sl@0
  1538
  if( yypParser->yyidx>=yypParser->yystksz ){
sl@0
  1539
    yyGrowStack(yypParser);
sl@0
  1540
    if( yypParser->yyidx>=yypParser->yystksz ){
sl@0
  1541
      yyStackOverflow(yypParser, yypMinor);
sl@0
  1542
      return;
sl@0
  1543
    }
sl@0
  1544
  }
sl@0
  1545
#endif
sl@0
  1546
  yytos = &yypParser->yystack[yypParser->yyidx];
sl@0
  1547
  yytos->stateno = yyNewState;
sl@0
  1548
  yytos->major = yyMajor;
sl@0
  1549
  yytos->minor = *yypMinor;
sl@0
  1550
#ifndef NDEBUG
sl@0
  1551
  if( yyTraceFILE && yypParser->yyidx>0 ){
sl@0
  1552
    int i;
sl@0
  1553
    fprintf(yyTraceFILE,"%sShift %d\n",yyTracePrompt,yyNewState);
sl@0
  1554
    fprintf(yyTraceFILE,"%sStack:",yyTracePrompt);
sl@0
  1555
    for(i=1; i<=yypParser->yyidx; i++)
sl@0
  1556
      fprintf(yyTraceFILE," %s",yyTokenName[yypParser->yystack[i].major]);
sl@0
  1557
    fprintf(yyTraceFILE,"\n");
sl@0
  1558
  }
sl@0
  1559
#endif
sl@0
  1560
}
sl@0
  1561
sl@0
  1562
/* The following table contains information about every rule that
sl@0
  1563
** is used during the reduce.
sl@0
  1564
*/
sl@0
  1565
static const struct {
sl@0
  1566
  YYCODETYPE lhs;         /* Symbol on the left-hand side of the rule */
sl@0
  1567
  unsigned char nrhs;     /* Number of right-hand side symbols in the rule */
sl@0
  1568
} yyRuleInfo[] = {
sl@0
  1569
  { 139, 1 },
sl@0
  1570
  { 140, 2 },
sl@0
  1571
  { 140, 1 },
sl@0
  1572
  { 141, 1 },
sl@0
  1573
  { 141, 3 },
sl@0
  1574
  { 142, 0 },
sl@0
  1575
  { 142, 1 },
sl@0
  1576
  { 142, 3 },
sl@0
  1577
  { 143, 1 },
sl@0
  1578
  { 144, 3 },
sl@0
  1579
  { 146, 0 },
sl@0
  1580
  { 146, 1 },
sl@0
  1581
  { 146, 2 },
sl@0
  1582
  { 145, 0 },
sl@0
  1583
  { 145, 1 },
sl@0
  1584
  { 145, 1 },
sl@0
  1585
  { 145, 1 },
sl@0
  1586
  { 144, 2 },
sl@0
  1587
  { 144, 2 },
sl@0
  1588
  { 144, 2 },
sl@0
  1589
  { 144, 2 },
sl@0
  1590
  { 148, 6 },
sl@0
  1591
  { 151, 0 },
sl@0
  1592
  { 151, 3 },
sl@0
  1593
  { 150, 1 },
sl@0
  1594
  { 150, 0 },
sl@0
  1595
  { 149, 4 },
sl@0
  1596
  { 149, 2 },
sl@0
  1597
  { 153, 3 },
sl@0
  1598
  { 153, 1 },
sl@0
  1599
  { 156, 3 },
sl@0
  1600
  { 157, 1 },
sl@0
  1601
  { 160, 1 },
sl@0
  1602
  { 161, 1 },
sl@0
  1603
  { 147, 1 },
sl@0
  1604
  { 147, 1 },
sl@0
  1605
  { 147, 1 },
sl@0
  1606
  { 158, 0 },
sl@0
  1607
  { 158, 1 },
sl@0
  1608
  { 162, 1 },
sl@0
  1609
  { 162, 4 },
sl@0
  1610
  { 162, 6 },
sl@0
  1611
  { 163, 1 },
sl@0
  1612
  { 163, 2 },
sl@0
  1613
  { 164, 1 },
sl@0
  1614
  { 164, 1 },
sl@0
  1615
  { 159, 2 },
sl@0
  1616
  { 159, 0 },
sl@0
  1617
  { 167, 3 },
sl@0
  1618
  { 167, 1 },
sl@0
  1619
  { 168, 2 },
sl@0
  1620
  { 168, 4 },
sl@0
  1621
  { 168, 3 },
sl@0
  1622
  { 168, 3 },
sl@0
  1623
  { 168, 2 },
sl@0
  1624
  { 168, 2 },
sl@0
  1625
  { 168, 3 },
sl@0
  1626
  { 168, 5 },
sl@0
  1627
  { 168, 2 },
sl@0
  1628
  { 168, 4 },
sl@0
  1629
  { 168, 4 },
sl@0
  1630
  { 168, 1 },
sl@0
  1631
  { 168, 2 },
sl@0
  1632
  { 173, 0 },
sl@0
  1633
  { 173, 1 },
sl@0
  1634
  { 175, 0 },
sl@0
  1635
  { 175, 2 },
sl@0
  1636
  { 177, 2 },
sl@0
  1637
  { 177, 3 },
sl@0
  1638
  { 177, 3 },
sl@0
  1639
  { 177, 3 },
sl@0
  1640
  { 178, 2 },
sl@0
  1641
  { 178, 2 },
sl@0
  1642
  { 178, 1 },
sl@0
  1643
  { 178, 1 },
sl@0
  1644
  { 176, 3 },
sl@0
  1645
  { 176, 2 },
sl@0
  1646
  { 179, 0 },
sl@0
  1647
  { 179, 2 },
sl@0
  1648
  { 179, 2 },
sl@0
  1649
  { 154, 0 },
sl@0
  1650
  { 154, 2 },
sl@0
  1651
  { 180, 3 },
sl@0
  1652
  { 180, 2 },
sl@0
  1653
  { 180, 1 },
sl@0
  1654
  { 181, 2 },
sl@0
  1655
  { 181, 7 },
sl@0
  1656
  { 181, 5 },
sl@0
  1657
  { 181, 5 },
sl@0
  1658
  { 181, 10 },
sl@0
  1659
  { 183, 0 },
sl@0
  1660
  { 183, 1 },
sl@0
  1661
  { 171, 0 },
sl@0
  1662
  { 171, 3 },
sl@0
  1663
  { 184, 0 },
sl@0
  1664
  { 184, 2 },
sl@0
  1665
  { 185, 1 },
sl@0
  1666
  { 185, 1 },
sl@0
  1667
  { 185, 1 },
sl@0
  1668
  { 144, 4 },
sl@0
  1669
  { 187, 2 },
sl@0
  1670
  { 187, 0 },
sl@0
  1671
  { 144, 8 },
sl@0
  1672
  { 144, 4 },
sl@0
  1673
  { 144, 1 },
sl@0
  1674
  { 155, 1 },
sl@0
  1675
  { 155, 3 },
sl@0
  1676
  { 190, 1 },
sl@0
  1677
  { 190, 2 },
sl@0
  1678
  { 190, 1 },
sl@0
  1679
  { 189, 9 },
sl@0
  1680
  { 191, 1 },
sl@0
  1681
  { 191, 1 },
sl@0
  1682
  { 191, 0 },
sl@0
  1683
  { 199, 2 },
sl@0
  1684
  { 199, 0 },
sl@0
  1685
  { 192, 3 },
sl@0
  1686
  { 192, 2 },
sl@0
  1687
  { 192, 4 },
sl@0
  1688
  { 200, 2 },
sl@0
  1689
  { 200, 1 },
sl@0
  1690
  { 200, 0 },
sl@0
  1691
  { 193, 0 },
sl@0
  1692
  { 193, 2 },
sl@0
  1693
  { 202, 2 },
sl@0
  1694
  { 202, 0 },
sl@0
  1695
  { 201, 6 },
sl@0
  1696
  { 201, 7 },
sl@0
  1697
  { 206, 1 },
sl@0
  1698
  { 206, 1 },
sl@0
  1699
  { 152, 0 },
sl@0
  1700
  { 152, 2 },
sl@0
  1701
  { 188, 2 },
sl@0
  1702
  { 203, 1 },
sl@0
  1703
  { 203, 2 },
sl@0
  1704
  { 203, 3 },
sl@0
  1705
  { 203, 4 },
sl@0
  1706
  { 204, 2 },
sl@0
  1707
  { 204, 0 },
sl@0
  1708
  { 205, 4 },
sl@0
  1709
  { 205, 0 },
sl@0
  1710
  { 197, 0 },
sl@0
  1711
  { 197, 3 },
sl@0
  1712
  { 209, 4 },
sl@0
  1713
  { 209, 2 },
sl@0
  1714
  { 210, 1 },
sl@0
  1715
  { 172, 1 },
sl@0
  1716
  { 172, 1 },
sl@0
  1717
  { 172, 0 },
sl@0
  1718
  { 195, 0 },
sl@0
  1719
  { 195, 3 },
sl@0
  1720
  { 196, 0 },
sl@0
  1721
  { 196, 2 },
sl@0
  1722
  { 198, 0 },
sl@0
  1723
  { 198, 2 },
sl@0
  1724
  { 198, 4 },
sl@0
  1725
  { 198, 4 },
sl@0
  1726
  { 144, 4 },
sl@0
  1727
  { 194, 0 },
sl@0
  1728
  { 194, 2 },
sl@0
  1729
  { 144, 6 },
sl@0
  1730
  { 212, 5 },
sl@0
  1731
  { 212, 3 },
sl@0
  1732
  { 144, 8 },
sl@0
  1733
  { 144, 5 },
sl@0
  1734
  { 144, 6 },
sl@0
  1735
  { 213, 2 },
sl@0
  1736
  { 213, 1 },
sl@0
  1737
  { 215, 3 },
sl@0
  1738
  { 215, 1 },
sl@0
  1739
  { 214, 0 },
sl@0
  1740
  { 214, 3 },
sl@0
  1741
  { 208, 3 },
sl@0
  1742
  { 208, 1 },
sl@0
  1743
  { 170, 1 },
sl@0
  1744
  { 170, 3 },
sl@0
  1745
  { 169, 1 },
sl@0
  1746
  { 170, 1 },
sl@0
  1747
  { 170, 1 },
sl@0
  1748
  { 170, 3 },
sl@0
  1749
  { 170, 5 },
sl@0
  1750
  { 169, 1 },
sl@0
  1751
  { 169, 1 },
sl@0
  1752
  { 170, 1 },
sl@0
  1753
  { 170, 1 },
sl@0
  1754
  { 170, 3 },
sl@0
  1755
  { 170, 6 },
sl@0
  1756
  { 170, 5 },
sl@0
  1757
  { 170, 4 },
sl@0
  1758
  { 169, 1 },
sl@0
  1759
  { 170, 3 },
sl@0
  1760
  { 170, 3 },
sl@0
  1761
  { 170, 3 },
sl@0
  1762
  { 170, 3 },
sl@0
  1763
  { 170, 3 },
sl@0
  1764
  { 170, 3 },
sl@0
  1765
  { 170, 3 },
sl@0
  1766
  { 170, 3 },
sl@0
  1767
  { 217, 1 },
sl@0
  1768
  { 217, 2 },
sl@0
  1769
  { 217, 1 },
sl@0
  1770
  { 217, 2 },
sl@0
  1771
  { 218, 2 },
sl@0
  1772
  { 218, 0 },
sl@0
  1773
  { 170, 4 },
sl@0
  1774
  { 170, 2 },
sl@0
  1775
  { 170, 3 },
sl@0
  1776
  { 170, 3 },
sl@0
  1777
  { 170, 4 },
sl@0
  1778
  { 170, 2 },
sl@0
  1779
  { 170, 2 },
sl@0
  1780
  { 170, 2 },
sl@0
  1781
  { 170, 2 },
sl@0
  1782
  { 219, 1 },
sl@0
  1783
  { 219, 2 },
sl@0
  1784
  { 170, 5 },
sl@0
  1785
  { 220, 1 },
sl@0
  1786
  { 220, 2 },
sl@0
  1787
  { 170, 5 },
sl@0
  1788
  { 170, 3 },
sl@0
  1789
  { 170, 5 },
sl@0
  1790
  { 170, 4 },
sl@0
  1791
  { 170, 4 },
sl@0
  1792
  { 170, 5 },
sl@0
  1793
  { 222, 5 },
sl@0
  1794
  { 222, 4 },
sl@0
  1795
  { 223, 2 },
sl@0
  1796
  { 223, 0 },
sl@0
  1797
  { 221, 1 },
sl@0
  1798
  { 221, 0 },
sl@0
  1799
  { 216, 1 },
sl@0
  1800
  { 216, 0 },
sl@0
  1801
  { 211, 3 },
sl@0
  1802
  { 211, 1 },
sl@0
  1803
  { 144, 11 },
sl@0
  1804
  { 224, 1 },
sl@0
  1805
  { 224, 0 },
sl@0
  1806
  { 174, 0 },
sl@0
  1807
  { 174, 3 },
sl@0
  1808
  { 182, 5 },
sl@0
  1809
  { 182, 3 },
sl@0
  1810
  { 225, 0 },
sl@0
  1811
  { 225, 2 },
sl@0
  1812
  { 144, 4 },
sl@0
  1813
  { 144, 1 },
sl@0
  1814
  { 144, 2 },
sl@0
  1815
  { 144, 5 },
sl@0
  1816
  { 144, 5 },
sl@0
  1817
  { 144, 5 },
sl@0
  1818
  { 144, 5 },
sl@0
  1819
  { 144, 6 },
sl@0
  1820
  { 144, 3 },
sl@0
  1821
  { 226, 1 },
sl@0
  1822
  { 226, 1 },
sl@0
  1823
  { 165, 2 },
sl@0
  1824
  { 166, 2 },
sl@0
  1825
  { 228, 1 },
sl@0
  1826
  { 227, 1 },
sl@0
  1827
  { 227, 0 },
sl@0
  1828
  { 144, 5 },
sl@0
  1829
  { 229, 11 },
sl@0
  1830
  { 231, 1 },
sl@0
  1831
  { 231, 1 },
sl@0
  1832
  { 231, 2 },
sl@0
  1833
  { 231, 0 },
sl@0
  1834
  { 232, 1 },
sl@0
  1835
  { 232, 1 },
sl@0
  1836
  { 232, 3 },
sl@0
  1837
  { 233, 0 },
sl@0
  1838
  { 233, 3 },
sl@0
  1839
  { 234, 0 },
sl@0
  1840
  { 234, 2 },
sl@0
  1841
  { 230, 3 },
sl@0
  1842
  { 230, 2 },
sl@0
  1843
  { 235, 6 },
sl@0
  1844
  { 235, 8 },
sl@0
  1845
  { 235, 5 },
sl@0
  1846
  { 235, 4 },
sl@0
  1847
  { 235, 1 },
sl@0
  1848
  { 170, 4 },
sl@0
  1849
  { 170, 6 },
sl@0
  1850
  { 186, 1 },
sl@0
  1851
  { 186, 1 },
sl@0
  1852
  { 186, 1 },
sl@0
  1853
  { 144, 4 },
sl@0
  1854
  { 144, 6 },
sl@0
  1855
  { 144, 3 },
sl@0
  1856
  { 237, 0 },
sl@0
  1857
  { 237, 2 },
sl@0
  1858
  { 236, 1 },
sl@0
  1859
  { 236, 0 },
sl@0
  1860
  { 144, 1 },
sl@0
  1861
  { 144, 3 },
sl@0
  1862
  { 144, 1 },
sl@0
  1863
  { 144, 3 },
sl@0
  1864
  { 144, 6 },
sl@0
  1865
  { 144, 6 },
sl@0
  1866
  { 238, 1 },
sl@0
  1867
  { 239, 0 },
sl@0
  1868
  { 239, 1 },
sl@0
  1869
};
sl@0
  1870
sl@0
  1871
static void yy_accept(yyParser*);  /* Forward Declaration */
sl@0
  1872
sl@0
  1873
/*
sl@0
  1874
** Perform a reduce action and the shift that must immediately
sl@0
  1875
** follow the reduce.
sl@0
  1876
*/
sl@0
  1877
static void yy_reduce(
sl@0
  1878
  yyParser *yypParser,         /* The parser */
sl@0
  1879
  int yyruleno                 /* Number of the rule by which to reduce */
sl@0
  1880
){
sl@0
  1881
  int yygoto;                     /* The next state */
sl@0
  1882
  int yyact;                      /* The next action */
sl@0
  1883
  YYMINORTYPE yygotominor;        /* The LHS of the rule reduced */
sl@0
  1884
  yyStackEntry *yymsp;            /* The top of the parser's stack */
sl@0
  1885
  int yysize;                     /* Amount to pop the stack */
sl@0
  1886
  sqlite3ParserARG_FETCH;
sl@0
  1887
  yymsp = &yypParser->yystack[yypParser->yyidx];
sl@0
  1888
#ifndef NDEBUG
sl@0
  1889
  if( yyTraceFILE && yyruleno>=0 
sl@0
  1890
        && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
sl@0
  1891
    fprintf(yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt,
sl@0
  1892
      yyRuleName[yyruleno]);
sl@0
  1893
  }
sl@0
  1894
#endif /* NDEBUG */
sl@0
  1895
sl@0
  1896
  /* Silence complaints from purify about yygotominor being uninitialized
sl@0
  1897
  ** in some cases when it is copied into the stack after the following
sl@0
  1898
  ** switch.  yygotominor is uninitialized when a rule reduces that does
sl@0
  1899
  ** not set the value of its left-hand side nonterminal.  Leaving the
sl@0
  1900
  ** value of the nonterminal uninitialized is utterly harmless as long
sl@0
  1901
  ** as the value is never used.  So really the only thing this code
sl@0
  1902
  ** accomplishes is to quieten purify.  
sl@0
  1903
  **
sl@0
  1904
  ** 2007-01-16:  The wireshark project (www.wireshark.org) reports that
sl@0
  1905
  ** without this code, their parser segfaults.  I'm not sure what there
sl@0
  1906
  ** parser is doing to make this happen.  This is the second bug report
sl@0
  1907
  ** from wireshark this week.  Clearly they are stressing Lemon in ways
sl@0
  1908
  ** that it has not been previously stressed...  (SQLite ticket #2172)
sl@0
  1909
  */
sl@0
  1910
  /*memset(&yygotominor, 0, sizeof(yygotominor));*/
sl@0
  1911
  yygotominor = yyzerominor;
sl@0
  1912
sl@0
  1913
sl@0
  1914
  switch( yyruleno ){
sl@0
  1915
  /* Beginning here are the reduction cases.  A typical example
sl@0
  1916
  ** follows:
sl@0
  1917
  **   case 0:
sl@0
  1918
  **  #line <lineno> <grammarfile>
sl@0
  1919
  **     { ... }           // User supplied code
sl@0
  1920
  **  #line <lineno> <thisfile>
sl@0
  1921
  **     break;
sl@0
  1922
  */
sl@0
  1923
      case 0: /* input ::= cmdlist */
sl@0
  1924
      case 1: /* cmdlist ::= cmdlist ecmd */
sl@0
  1925
      case 2: /* cmdlist ::= ecmd */
sl@0
  1926
      case 3: /* ecmd ::= SEMI */
sl@0
  1927
      case 4: /* ecmd ::= explain cmdx SEMI */
sl@0
  1928
      case 10: /* trans_opt ::= */
sl@0
  1929
      case 11: /* trans_opt ::= TRANSACTION */
sl@0
  1930
      case 12: /* trans_opt ::= TRANSACTION nm */
sl@0
  1931
      case 20: /* cmd ::= create_table create_table_args */
sl@0
  1932
      case 28: /* columnlist ::= columnlist COMMA column */
sl@0
  1933
      case 29: /* columnlist ::= column */
sl@0
  1934
      case 37: /* type ::= */
sl@0
  1935
      case 44: /* signed ::= plus_num */
sl@0
  1936
      case 45: /* signed ::= minus_num */
sl@0
  1937
      case 46: /* carglist ::= carglist carg */
sl@0
  1938
      case 47: /* carglist ::= */
sl@0
  1939
      case 48: /* carg ::= CONSTRAINT nm ccons */
sl@0
  1940
      case 49: /* carg ::= ccons */
sl@0
  1941
      case 55: /* ccons ::= NULL onconf */
sl@0
  1942
      case 82: /* conslist ::= conslist COMMA tcons */
sl@0
  1943
      case 83: /* conslist ::= conslist tcons */
sl@0
  1944
      case 84: /* conslist ::= tcons */
sl@0
  1945
      case 85: /* tcons ::= CONSTRAINT nm */
sl@0
  1946
      case 257: /* plus_opt ::= PLUS */
sl@0
  1947
      case 258: /* plus_opt ::= */
sl@0
  1948
      case 268: /* foreach_clause ::= */
sl@0
  1949
      case 269: /* foreach_clause ::= FOR EACH ROW */
sl@0
  1950
      case 289: /* database_kw_opt ::= DATABASE */
sl@0
  1951
      case 290: /* database_kw_opt ::= */
sl@0
  1952
      case 298: /* kwcolumn_opt ::= */
sl@0
  1953
      case 299: /* kwcolumn_opt ::= COLUMNKW */
sl@0
  1954
#line 91 "parse.y"
sl@0
  1955
{
sl@0
  1956
}
sl@0
  1957
#line 1962 "parse.c"
sl@0
  1958
        break;
sl@0
  1959
      case 5: /* explain ::= */
sl@0
  1960
#line 96 "parse.y"
sl@0
  1961
{ sqlite3BeginParse(pParse, 0); }
sl@0
  1962
#line 1967 "parse.c"
sl@0
  1963
        break;
sl@0
  1964
      case 6: /* explain ::= EXPLAIN */
sl@0
  1965
#line 98 "parse.y"
sl@0
  1966
{ sqlite3BeginParse(pParse, 1); }
sl@0
  1967
#line 1972 "parse.c"
sl@0
  1968
        break;
sl@0
  1969
      case 7: /* explain ::= EXPLAIN QUERY PLAN */
sl@0
  1970
#line 99 "parse.y"
sl@0
  1971
{ sqlite3BeginParse(pParse, 2); }
sl@0
  1972
#line 1977 "parse.c"
sl@0
  1973
        break;
sl@0
  1974
      case 8: /* cmdx ::= cmd */
sl@0
  1975
#line 101 "parse.y"
sl@0
  1976
{ sqlite3FinishCoding(pParse); }
sl@0
  1977
#line 1982 "parse.c"
sl@0
  1978
        break;
sl@0
  1979
      case 9: /* cmd ::= BEGIN transtype trans_opt */
sl@0
  1980
#line 106 "parse.y"
sl@0
  1981
{sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy412);}
sl@0
  1982
#line 1987 "parse.c"
sl@0
  1983
        break;
sl@0
  1984
      case 13: /* transtype ::= */
sl@0
  1985
#line 111 "parse.y"
sl@0
  1986
{yygotominor.yy412 = TK_DEFERRED;}
sl@0
  1987
#line 1992 "parse.c"
sl@0
  1988
        break;
sl@0
  1989
      case 14: /* transtype ::= DEFERRED */
sl@0
  1990
      case 15: /* transtype ::= IMMEDIATE */
sl@0
  1991
      case 16: /* transtype ::= EXCLUSIVE */
sl@0
  1992
      case 107: /* multiselect_op ::= UNION */
sl@0
  1993
      case 109: /* multiselect_op ::= EXCEPT|INTERSECT */
sl@0
  1994
#line 112 "parse.y"
sl@0
  1995
{yygotominor.yy412 = yymsp[0].major;}
sl@0
  1996
#line 2001 "parse.c"
sl@0
  1997
        break;
sl@0
  1998
      case 17: /* cmd ::= COMMIT trans_opt */
sl@0
  1999
      case 18: /* cmd ::= END trans_opt */
sl@0
  2000
#line 115 "parse.y"
sl@0
  2001
{sqlite3CommitTransaction(pParse);}
sl@0
  2002
#line 2007 "parse.c"
sl@0
  2003
        break;
sl@0
  2004
      case 19: /* cmd ::= ROLLBACK trans_opt */
sl@0
  2005
#line 117 "parse.y"
sl@0
  2006
{sqlite3RollbackTransaction(pParse);}
sl@0
  2007
#line 2012 "parse.c"
sl@0
  2008
        break;
sl@0
  2009
      case 21: /* create_table ::= CREATE temp TABLE ifnotexists nm dbnm */
sl@0
  2010
#line 122 "parse.y"
sl@0
  2011
{
sl@0
  2012
   sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy412,0,0,yymsp[-2].minor.yy412);
sl@0
  2013
}
sl@0
  2014
#line 2019 "parse.c"
sl@0
  2015
        break;
sl@0
  2016
      case 22: /* ifnotexists ::= */
sl@0
  2017
      case 25: /* temp ::= */
sl@0
  2018
      case 63: /* autoinc ::= */
sl@0
  2019
      case 77: /* init_deferred_pred_opt ::= */
sl@0
  2020
      case 79: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
sl@0
  2021
      case 90: /* defer_subclause_opt ::= */
sl@0
  2022
      case 101: /* ifexists ::= */
sl@0
  2023
      case 112: /* distinct ::= ALL */
sl@0
  2024
      case 113: /* distinct ::= */
sl@0
  2025
      case 213: /* between_op ::= BETWEEN */
sl@0
  2026
      case 216: /* in_op ::= IN */
sl@0
  2027
#line 126 "parse.y"
sl@0
  2028
{yygotominor.yy412 = 0;}
sl@0
  2029
#line 2034 "parse.c"
sl@0
  2030
        break;
sl@0
  2031
      case 23: /* ifnotexists ::= IF NOT EXISTS */
sl@0
  2032
      case 24: /* temp ::= TEMP */
sl@0
  2033
      case 64: /* autoinc ::= AUTOINCR */
sl@0
  2034
      case 78: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */
sl@0
  2035
      case 100: /* ifexists ::= IF EXISTS */
sl@0
  2036
      case 111: /* distinct ::= DISTINCT */
sl@0
  2037
      case 214: /* between_op ::= NOT BETWEEN */
sl@0
  2038
      case 217: /* in_op ::= NOT IN */
sl@0
  2039
#line 127 "parse.y"
sl@0
  2040
{yygotominor.yy412 = 1;}
sl@0
  2041
#line 2046 "parse.c"
sl@0
  2042
        break;
sl@0
  2043
      case 26: /* create_table_args ::= LP columnlist conslist_opt RP */
sl@0
  2044
#line 133 "parse.y"
sl@0
  2045
{
sl@0
  2046
  sqlite3EndTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0);
sl@0
  2047
}
sl@0
  2048
#line 2053 "parse.c"
sl@0
  2049
        break;
sl@0
  2050
      case 27: /* create_table_args ::= AS select */
sl@0
  2051
#line 136 "parse.y"
sl@0
  2052
{
sl@0
  2053
  sqlite3EndTable(pParse,0,0,yymsp[0].minor.yy459);
sl@0
  2054
  sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy459);
sl@0
  2055
}
sl@0
  2056
#line 2061 "parse.c"
sl@0
  2057
        break;
sl@0
  2058
      case 30: /* column ::= columnid type carglist */
sl@0
  2059
#line 148 "parse.y"
sl@0
  2060
{
sl@0
  2061
  yygotominor.yy0.z = yymsp[-2].minor.yy0.z;
sl@0
  2062
  yygotominor.yy0.n = (pParse->sLastToken.z-yymsp[-2].minor.yy0.z) + pParse->sLastToken.n;
sl@0
  2063
}
sl@0
  2064
#line 2069 "parse.c"
sl@0
  2065
        break;
sl@0
  2066
      case 31: /* columnid ::= nm */
sl@0
  2067
#line 152 "parse.y"
sl@0
  2068
{
sl@0
  2069
  sqlite3AddColumn(pParse,&yymsp[0].minor.yy0);
sl@0
  2070
  yygotominor.yy0 = yymsp[0].minor.yy0;
sl@0
  2071
}
sl@0
  2072
#line 2077 "parse.c"
sl@0
  2073
        break;
sl@0
  2074
      case 32: /* id ::= ID */
sl@0
  2075
      case 33: /* ids ::= ID|STRING */
sl@0
  2076
      case 34: /* nm ::= ID */
sl@0
  2077
      case 35: /* nm ::= STRING */
sl@0
  2078
      case 36: /* nm ::= JOIN_KW */
sl@0
  2079
      case 39: /* typetoken ::= typename */
sl@0
  2080
      case 42: /* typename ::= ids */
sl@0
  2081
      case 119: /* as ::= AS nm */
sl@0
  2082
      case 120: /* as ::= ids */
sl@0
  2083
      case 131: /* dbnm ::= DOT nm */
sl@0
  2084
      case 242: /* collate ::= COLLATE ids */
sl@0
  2085
      case 252: /* nmnum ::= plus_num */
sl@0
  2086
      case 253: /* nmnum ::= nm */
sl@0
  2087
      case 254: /* plus_num ::= plus_opt number */
sl@0
  2088
      case 255: /* minus_num ::= MINUS number */
sl@0
  2089
      case 256: /* number ::= INTEGER|FLOAT */
sl@0
  2090
#line 162 "parse.y"
sl@0
  2091
{yygotominor.yy0 = yymsp[0].minor.yy0;}
sl@0
  2092
#line 2097 "parse.c"
sl@0
  2093
        break;
sl@0
  2094
      case 38: /* type ::= typetoken */
sl@0
  2095
#line 223 "parse.y"
sl@0
  2096
{sqlite3AddColumnType(pParse,&yymsp[0].minor.yy0);}
sl@0
  2097
#line 2102 "parse.c"
sl@0
  2098
        break;
sl@0
  2099
      case 40: /* typetoken ::= typename LP signed RP */
sl@0
  2100
#line 225 "parse.y"
sl@0
  2101
{
sl@0
  2102
  yygotominor.yy0.z = yymsp[-3].minor.yy0.z;
sl@0
  2103
  yygotominor.yy0.n = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z;
sl@0
  2104
}
sl@0
  2105
#line 2110 "parse.c"
sl@0
  2106
        break;
sl@0
  2107
      case 41: /* typetoken ::= typename LP signed COMMA signed RP */
sl@0
  2108
#line 229 "parse.y"
sl@0
  2109
{
sl@0
  2110
  yygotominor.yy0.z = yymsp[-5].minor.yy0.z;
sl@0
  2111
  yygotominor.yy0.n = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z;
sl@0
  2112
}
sl@0
  2113
#line 2118 "parse.c"
sl@0
  2114
        break;
sl@0
  2115
      case 43: /* typename ::= typename ids */
sl@0
  2116
#line 235 "parse.y"
sl@0
  2117
{yygotominor.yy0.z=yymsp[-1].minor.yy0.z; yygotominor.yy0.n=yymsp[0].minor.yy0.n+(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);}
sl@0
  2118
#line 2123 "parse.c"
sl@0
  2119
        break;
sl@0
  2120
      case 50: /* ccons ::= DEFAULT term */
sl@0
  2121
      case 52: /* ccons ::= DEFAULT PLUS term */
sl@0
  2122
#line 246 "parse.y"
sl@0
  2123
{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy2);}
sl@0
  2124
#line 2129 "parse.c"
sl@0
  2125
        break;
sl@0
  2126
      case 51: /* ccons ::= DEFAULT LP expr RP */
sl@0
  2127
#line 247 "parse.y"
sl@0
  2128
{sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy2);}
sl@0
  2129
#line 2134 "parse.c"
sl@0
  2130
        break;
sl@0
  2131
      case 53: /* ccons ::= DEFAULT MINUS term */
sl@0
  2132
#line 249 "parse.y"
sl@0
  2133
{
sl@0
  2134
  Expr *p = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy2, 0, 0);
sl@0
  2135
  sqlite3AddDefaultValue(pParse,p);
sl@0
  2136
}
sl@0
  2137
#line 2142 "parse.c"
sl@0
  2138
        break;
sl@0
  2139
      case 54: /* ccons ::= DEFAULT id */
sl@0
  2140
#line 253 "parse.y"
sl@0
  2141
{
sl@0
  2142
  Expr *p = sqlite3PExpr(pParse, TK_STRING, 0, 0, &yymsp[0].minor.yy0);
sl@0
  2143
  sqlite3AddDefaultValue(pParse,p);
sl@0
  2144
}
sl@0
  2145
#line 2150 "parse.c"
sl@0
  2146
        break;
sl@0
  2147
      case 56: /* ccons ::= NOT NULL onconf */
sl@0
  2148
#line 262 "parse.y"
sl@0
  2149
{sqlite3AddNotNull(pParse, yymsp[0].minor.yy412);}
sl@0
  2150
#line 2155 "parse.c"
sl@0
  2151
        break;
sl@0
  2152
      case 57: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */
sl@0
  2153
#line 264 "parse.y"
sl@0
  2154
{sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy412,yymsp[0].minor.yy412,yymsp[-2].minor.yy412);}
sl@0
  2155
#line 2160 "parse.c"
sl@0
  2156
        break;
sl@0
  2157
      case 58: /* ccons ::= UNIQUE onconf */
sl@0
  2158
#line 265 "parse.y"
sl@0
  2159
{sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy412,0,0,0,0);}
sl@0
  2160
#line 2165 "parse.c"
sl@0
  2161
        break;
sl@0
  2162
      case 59: /* ccons ::= CHECK LP expr RP */
sl@0
  2163
#line 266 "parse.y"
sl@0
  2164
{sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy2);}
sl@0
  2165
#line 2170 "parse.c"
sl@0
  2166
        break;
sl@0
  2167
      case 60: /* ccons ::= REFERENCES nm idxlist_opt refargs */
sl@0
  2168
#line 268 "parse.y"
sl@0
  2169
{sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy82,yymsp[0].minor.yy412);}
sl@0
  2170
#line 2175 "parse.c"
sl@0
  2171
        break;
sl@0
  2172
      case 61: /* ccons ::= defer_subclause */
sl@0
  2173
#line 269 "parse.y"
sl@0
  2174
{sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy412);}
sl@0
  2175
#line 2180 "parse.c"
sl@0
  2176
        break;
sl@0
  2177
      case 62: /* ccons ::= COLLATE ids */
sl@0
  2178
#line 270 "parse.y"
sl@0
  2179
{sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);}
sl@0
  2180
#line 2185 "parse.c"
sl@0
  2181
        break;
sl@0
  2182
      case 65: /* refargs ::= */
sl@0
  2183
#line 283 "parse.y"
sl@0
  2184
{ yygotominor.yy412 = OE_Restrict * 0x010101; }
sl@0
  2185
#line 2190 "parse.c"
sl@0
  2186
        break;
sl@0
  2187
      case 66: /* refargs ::= refargs refarg */
sl@0
  2188
#line 284 "parse.y"
sl@0
  2189
{ yygotominor.yy412 = (yymsp[-1].minor.yy412 & yymsp[0].minor.yy47.mask) | yymsp[0].minor.yy47.value; }
sl@0
  2190
#line 2195 "parse.c"
sl@0
  2191
        break;
sl@0
  2192
      case 67: /* refarg ::= MATCH nm */
sl@0
  2193
#line 286 "parse.y"
sl@0
  2194
{ yygotominor.yy47.value = 0;     yygotominor.yy47.mask = 0x000000; }
sl@0
  2195
#line 2200 "parse.c"
sl@0
  2196
        break;
sl@0
  2197
      case 68: /* refarg ::= ON DELETE refact */
sl@0
  2198
#line 287 "parse.y"
sl@0
  2199
{ yygotominor.yy47.value = yymsp[0].minor.yy412;     yygotominor.yy47.mask = 0x0000ff; }
sl@0
  2200
#line 2205 "parse.c"
sl@0
  2201
        break;
sl@0
  2202
      case 69: /* refarg ::= ON UPDATE refact */
sl@0
  2203
#line 288 "parse.y"
sl@0
  2204
{ yygotominor.yy47.value = yymsp[0].minor.yy412<<8;  yygotominor.yy47.mask = 0x00ff00; }
sl@0
  2205
#line 2210 "parse.c"
sl@0
  2206
        break;
sl@0
  2207
      case 70: /* refarg ::= ON INSERT refact */
sl@0
  2208
#line 289 "parse.y"
sl@0
  2209
{ yygotominor.yy47.value = yymsp[0].minor.yy412<<16; yygotominor.yy47.mask = 0xff0000; }
sl@0
  2210
#line 2215 "parse.c"
sl@0
  2211
        break;
sl@0
  2212
      case 71: /* refact ::= SET NULL */
sl@0
  2213
#line 291 "parse.y"
sl@0
  2214
{ yygotominor.yy412 = OE_SetNull; }
sl@0
  2215
#line 2220 "parse.c"
sl@0
  2216
        break;
sl@0
  2217
      case 72: /* refact ::= SET DEFAULT */
sl@0
  2218
#line 292 "parse.y"
sl@0
  2219
{ yygotominor.yy412 = OE_SetDflt; }
sl@0
  2220
#line 2225 "parse.c"
sl@0
  2221
        break;
sl@0
  2222
      case 73: /* refact ::= CASCADE */
sl@0
  2223
#line 293 "parse.y"
sl@0
  2224
{ yygotominor.yy412 = OE_Cascade; }
sl@0
  2225
#line 2230 "parse.c"
sl@0
  2226
        break;
sl@0
  2227
      case 74: /* refact ::= RESTRICT */
sl@0
  2228
#line 294 "parse.y"
sl@0
  2229
{ yygotominor.yy412 = OE_Restrict; }
sl@0
  2230
#line 2235 "parse.c"
sl@0
  2231
        break;
sl@0
  2232
      case 75: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
sl@0
  2233
      case 76: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
sl@0
  2234
      case 91: /* defer_subclause_opt ::= defer_subclause */
sl@0
  2235
      case 93: /* onconf ::= ON CONFLICT resolvetype */
sl@0
  2236
      case 95: /* orconf ::= OR resolvetype */
sl@0
  2237
      case 96: /* resolvetype ::= raisetype */
sl@0
  2238
      case 166: /* insert_cmd ::= INSERT orconf */
sl@0
  2239
#line 296 "parse.y"
sl@0
  2240
{yygotominor.yy412 = yymsp[0].minor.yy412;}
sl@0
  2241
#line 2246 "parse.c"
sl@0
  2242
        break;
sl@0
  2243
      case 80: /* conslist_opt ::= */
sl@0
  2244
#line 306 "parse.y"
sl@0
  2245
{yygotominor.yy0.n = 0; yygotominor.yy0.z = 0;}
sl@0
  2246
#line 2251 "parse.c"
sl@0
  2247
        break;
sl@0
  2248
      case 81: /* conslist_opt ::= COMMA conslist */
sl@0
  2249
#line 307 "parse.y"
sl@0
  2250
{yygotominor.yy0 = yymsp[-1].minor.yy0;}
sl@0
  2251
#line 2256 "parse.c"
sl@0
  2252
        break;
sl@0
  2253
      case 86: /* tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf */
sl@0
  2254
#line 313 "parse.y"
sl@0
  2255
{sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy82,yymsp[0].minor.yy412,yymsp[-2].minor.yy412,0);}
sl@0
  2256
#line 2261 "parse.c"
sl@0
  2257
        break;
sl@0
  2258
      case 87: /* tcons ::= UNIQUE LP idxlist RP onconf */
sl@0
  2259
#line 315 "parse.y"
sl@0
  2260
{sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy82,yymsp[0].minor.yy412,0,0,0,0);}
sl@0
  2261
#line 2266 "parse.c"
sl@0
  2262
        break;
sl@0
  2263
      case 88: /* tcons ::= CHECK LP expr RP onconf */
sl@0
  2264
#line 316 "parse.y"
sl@0
  2265
{sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy2);}
sl@0
  2266
#line 2271 "parse.c"
sl@0
  2267
        break;
sl@0
  2268
      case 89: /* tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt */
sl@0
  2269
#line 318 "parse.y"
sl@0
  2270
{
sl@0
  2271
    sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy82, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy82, yymsp[-1].minor.yy412);
sl@0
  2272
    sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy412);
sl@0
  2273
}
sl@0
  2274
#line 2279 "parse.c"
sl@0
  2275
        break;
sl@0
  2276
      case 92: /* onconf ::= */
sl@0
  2277
      case 94: /* orconf ::= */
sl@0
  2278
#line 332 "parse.y"
sl@0
  2279
{yygotominor.yy412 = OE_Default;}
sl@0
  2280
#line 2285 "parse.c"
sl@0
  2281
        break;
sl@0
  2282
      case 97: /* resolvetype ::= IGNORE */
sl@0
  2283
#line 337 "parse.y"
sl@0
  2284
{yygotominor.yy412 = OE_Ignore;}
sl@0
  2285
#line 2290 "parse.c"
sl@0
  2286
        break;
sl@0
  2287
      case 98: /* resolvetype ::= REPLACE */
sl@0
  2288
      case 167: /* insert_cmd ::= REPLACE */
sl@0
  2289
#line 338 "parse.y"
sl@0
  2290
{yygotominor.yy412 = OE_Replace;}
sl@0
  2291
#line 2296 "parse.c"
sl@0
  2292
        break;
sl@0
  2293
      case 99: /* cmd ::= DROP TABLE ifexists fullname */
sl@0
  2294
#line 342 "parse.y"
sl@0
  2295
{
sl@0
  2296
  sqlite3DropTable(pParse, yymsp[0].minor.yy67, 0, yymsp[-1].minor.yy412);
sl@0
  2297
}
sl@0
  2298
#line 2303 "parse.c"
sl@0
  2299
        break;
sl@0
  2300
      case 102: /* cmd ::= CREATE temp VIEW ifnotexists nm dbnm AS select */
sl@0
  2301
#line 352 "parse.y"
sl@0
  2302
{
sl@0
  2303
  sqlite3CreateView(pParse, &yymsp[-7].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, yymsp[0].minor.yy459, yymsp[-6].minor.yy412, yymsp[-4].minor.yy412);
sl@0
  2304
}
sl@0
  2305
#line 2310 "parse.c"
sl@0
  2306
        break;
sl@0
  2307
      case 103: /* cmd ::= DROP VIEW ifexists fullname */
sl@0
  2308
#line 355 "parse.y"
sl@0
  2309
{
sl@0
  2310
  sqlite3DropTable(pParse, yymsp[0].minor.yy67, 1, yymsp[-1].minor.yy412);
sl@0
  2311
}
sl@0
  2312
#line 2317 "parse.c"
sl@0
  2313
        break;
sl@0
  2314
      case 104: /* cmd ::= select */
sl@0
  2315
#line 362 "parse.y"
sl@0
  2316
{
sl@0
  2317
  SelectDest dest = {SRT_Output, 0, 0, 0, 0};
sl@0
  2318
  sqlite3Select(pParse, yymsp[0].minor.yy459, &dest);
sl@0
  2319
  sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy459);
sl@0
  2320
}
sl@0
  2321
#line 2326 "parse.c"
sl@0
  2322
        break;
sl@0
  2323
      case 105: /* select ::= oneselect */
sl@0
  2324
      case 128: /* seltablist_paren ::= select */
sl@0
  2325
#line 373 "parse.y"
sl@0
  2326
{yygotominor.yy459 = yymsp[0].minor.yy459;}
sl@0
  2327
#line 2332 "parse.c"
sl@0
  2328
        break;
sl@0
  2329
      case 106: /* select ::= select multiselect_op oneselect */
sl@0
  2330
#line 375 "parse.y"
sl@0
  2331
{
sl@0
  2332
  if( yymsp[0].minor.yy459 ){
sl@0
  2333
    yymsp[0].minor.yy459->op = yymsp[-1].minor.yy412;
sl@0
  2334
    yymsp[0].minor.yy459->pPrior = yymsp[-2].minor.yy459;
sl@0
  2335
  }else{
sl@0
  2336
    sqlite3SelectDelete(pParse->db, yymsp[-2].minor.yy459);
sl@0
  2337
  }
sl@0
  2338
  yygotominor.yy459 = yymsp[0].minor.yy459;
sl@0
  2339
}
sl@0
  2340
#line 2345 "parse.c"
sl@0
  2341
        break;
sl@0
  2342
      case 108: /* multiselect_op ::= UNION ALL */
sl@0
  2343
#line 386 "parse.y"
sl@0
  2344
{yygotominor.yy412 = TK_ALL;}
sl@0
  2345
#line 2350 "parse.c"
sl@0
  2346
        break;
sl@0
  2347
      case 110: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
sl@0
  2348
#line 390 "parse.y"
sl@0
  2349
{
sl@0
  2350
  yygotominor.yy459 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy82,yymsp[-5].minor.yy67,yymsp[-4].minor.yy2,yymsp[-3].minor.yy82,yymsp[-2].minor.yy2,yymsp[-1].minor.yy82,yymsp[-7].minor.yy412,yymsp[0].minor.yy244.pLimit,yymsp[0].minor.yy244.pOffset);
sl@0
  2351
}
sl@0
  2352
#line 2357 "parse.c"
sl@0
  2353
        break;
sl@0
  2354
      case 114: /* sclp ::= selcollist COMMA */
sl@0
  2355
      case 238: /* idxlist_opt ::= LP idxlist RP */
sl@0
  2356
#line 411 "parse.y"
sl@0
  2357
{yygotominor.yy82 = yymsp[-1].minor.yy82;}
sl@0
  2358
#line 2363 "parse.c"
sl@0
  2359
        break;
sl@0
  2360
      case 115: /* sclp ::= */
sl@0
  2361
      case 141: /* orderby_opt ::= */
sl@0
  2362
      case 149: /* groupby_opt ::= */
sl@0
  2363
      case 231: /* exprlist ::= */
sl@0
  2364
      case 237: /* idxlist_opt ::= */
sl@0
  2365
#line 412 "parse.y"
sl@0
  2366
{yygotominor.yy82 = 0;}
sl@0
  2367
#line 2372 "parse.c"
sl@0
  2368
        break;
sl@0
  2369
      case 116: /* selcollist ::= sclp expr as */
sl@0
  2370
#line 413 "parse.y"
sl@0
  2371
{
sl@0
  2372
   yygotominor.yy82 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy82,yymsp[-1].minor.yy2,yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0);
sl@0
  2373
}
sl@0
  2374
#line 2379 "parse.c"
sl@0
  2375
        break;
sl@0
  2376
      case 117: /* selcollist ::= sclp STAR */
sl@0
  2377
#line 416 "parse.y"
sl@0
  2378
{
sl@0
  2379
  Expr *p = sqlite3PExpr(pParse, TK_ALL, 0, 0, 0);
sl@0
  2380
  yygotominor.yy82 = sqlite3ExprListAppend(pParse, yymsp[-1].minor.yy82, p, 0);
sl@0
  2381
}
sl@0
  2382
#line 2387 "parse.c"
sl@0
  2383
        break;
sl@0
  2384
      case 118: /* selcollist ::= sclp nm DOT STAR */
sl@0
  2385
#line 420 "parse.y"
sl@0
  2386
{
sl@0
  2387
  Expr *pRight = sqlite3PExpr(pParse, TK_ALL, 0, 0, &yymsp[0].minor.yy0);
sl@0
  2388
  Expr *pLeft = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
sl@0
  2389
  Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight, 0);
sl@0
  2390
  yygotominor.yy82 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy82, pDot, 0);
sl@0
  2391
}
sl@0
  2392
#line 2397 "parse.c"
sl@0
  2393
        break;
sl@0
  2394
      case 121: /* as ::= */
sl@0
  2395
#line 433 "parse.y"
sl@0
  2396
{yygotominor.yy0.n = 0;}
sl@0
  2397
#line 2402 "parse.c"
sl@0
  2398
        break;
sl@0
  2399
      case 122: /* from ::= */
sl@0
  2400
#line 445 "parse.y"
sl@0
  2401
{yygotominor.yy67 = sqlite3DbMallocZero(pParse->db, sizeof(*yygotominor.yy67));}
sl@0
  2402
#line 2407 "parse.c"
sl@0
  2403
        break;
sl@0
  2404
      case 123: /* from ::= FROM seltablist */
sl@0
  2405
#line 446 "parse.y"
sl@0
  2406
{
sl@0
  2407
  yygotominor.yy67 = yymsp[0].minor.yy67;
sl@0
  2408
  sqlite3SrcListShiftJoinType(yygotominor.yy67);
sl@0
  2409
}
sl@0
  2410
#line 2415 "parse.c"
sl@0
  2411
        break;
sl@0
  2412
      case 124: /* stl_prefix ::= seltablist joinop */
sl@0
  2413
#line 454 "parse.y"
sl@0
  2414
{
sl@0
  2415
   yygotominor.yy67 = yymsp[-1].minor.yy67;
sl@0
  2416
   if( yygotominor.yy67 && yygotominor.yy67->nSrc>0 ) yygotominor.yy67->a[yygotominor.yy67->nSrc-1].jointype = yymsp[0].minor.yy412;
sl@0
  2417
}
sl@0
  2418
#line 2423 "parse.c"
sl@0
  2419
        break;
sl@0
  2420
      case 125: /* stl_prefix ::= */
sl@0
  2421
#line 458 "parse.y"
sl@0
  2422
{yygotominor.yy67 = 0;}
sl@0
  2423
#line 2428 "parse.c"
sl@0
  2424
        break;
sl@0
  2425
      case 126: /* seltablist ::= stl_prefix nm dbnm as on_opt using_opt */
sl@0
  2426
#line 459 "parse.y"
sl@0
  2427
{
sl@0
  2428
  yygotominor.yy67 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-5].minor.yy67,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy2,yymsp[0].minor.yy240);
sl@0
  2429
}
sl@0
  2430
#line 2435 "parse.c"
sl@0
  2431
        break;
sl@0
  2432
      case 127: /* seltablist ::= stl_prefix LP seltablist_paren RP as on_opt using_opt */
sl@0
  2433
#line 464 "parse.y"
sl@0
  2434
{
sl@0
  2435
    yygotominor.yy67 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy67,0,0,&yymsp[-2].minor.yy0,yymsp[-4].minor.yy459,yymsp[-1].minor.yy2,yymsp[0].minor.yy240);
sl@0
  2436
  }
sl@0
  2437
#line 2442 "parse.c"
sl@0
  2438
        break;
sl@0
  2439
      case 129: /* seltablist_paren ::= seltablist */
sl@0
  2440
#line 475 "parse.y"
sl@0
  2441
{
sl@0
  2442
     sqlite3SrcListShiftJoinType(yymsp[0].minor.yy67);
sl@0
  2443
     yygotominor.yy459 = sqlite3SelectNew(pParse,0,yymsp[0].minor.yy67,0,0,0,0,0,0,0);
sl@0
  2444
  }
sl@0
  2445
#line 2450 "parse.c"
sl@0
  2446
        break;
sl@0
  2447
      case 130: /* dbnm ::= */
sl@0
  2448
#line 482 "parse.y"
sl@0
  2449
{yygotominor.yy0.z=0; yygotominor.yy0.n=0;}
sl@0
  2450
#line 2455 "parse.c"
sl@0
  2451
        break;
sl@0
  2452
      case 132: /* fullname ::= nm dbnm */
sl@0
  2453
#line 487 "parse.y"
sl@0
  2454
{yygotominor.yy67 = sqlite3SrcListAppend(pParse->db,0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);}
sl@0
  2455
#line 2460 "parse.c"
sl@0
  2456
        break;
sl@0
  2457
      case 133: /* joinop ::= COMMA|JOIN */
sl@0
  2458
#line 491 "parse.y"
sl@0
  2459
{ yygotominor.yy412 = JT_INNER; }
sl@0
  2460
#line 2465 "parse.c"
sl@0
  2461
        break;
sl@0
  2462
      case 134: /* joinop ::= JOIN_KW JOIN */
sl@0
  2463
#line 492 "parse.y"
sl@0
  2464
{ yygotominor.yy412 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); }
sl@0
  2465
#line 2470 "parse.c"
sl@0
  2466
        break;
sl@0
  2467
      case 135: /* joinop ::= JOIN_KW nm JOIN */
sl@0
  2468
#line 493 "parse.y"
sl@0
  2469
{ yygotominor.yy412 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); }
sl@0
  2470
#line 2475 "parse.c"
sl@0
  2471
        break;
sl@0
  2472
      case 136: /* joinop ::= JOIN_KW nm nm JOIN */
sl@0
  2473
#line 495 "parse.y"
sl@0
  2474
{ yygotominor.yy412 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0); }
sl@0
  2475
#line 2480 "parse.c"
sl@0
  2476
        break;
sl@0
  2477
      case 137: /* on_opt ::= ON expr */
sl@0
  2478
      case 145: /* sortitem ::= expr */
sl@0
  2479
      case 152: /* having_opt ::= HAVING expr */
sl@0
  2480
      case 159: /* where_opt ::= WHERE expr */
sl@0
  2481
      case 174: /* expr ::= term */
sl@0
  2482
      case 202: /* escape ::= ESCAPE expr */
sl@0
  2483
      case 226: /* case_else ::= ELSE expr */
sl@0
  2484
      case 228: /* case_operand ::= expr */
sl@0
  2485
#line 499 "parse.y"
sl@0
  2486
{yygotominor.yy2 = yymsp[0].minor.yy2;}
sl@0
  2487
#line 2492 "parse.c"
sl@0
  2488
        break;
sl@0
  2489
      case 138: /* on_opt ::= */
sl@0
  2490
      case 151: /* having_opt ::= */
sl@0
  2491
      case 158: /* where_opt ::= */
sl@0
  2492
      case 203: /* escape ::= */
sl@0
  2493
      case 227: /* case_else ::= */
sl@0
  2494
      case 229: /* case_operand ::= */
sl@0
  2495
#line 500 "parse.y"
sl@0
  2496
{yygotominor.yy2 = 0;}
sl@0
  2497
#line 2502 "parse.c"
sl@0
  2498
        break;
sl@0
  2499
      case 139: /* using_opt ::= USING LP inscollist RP */
sl@0
  2500
      case 171: /* inscollist_opt ::= LP inscollist RP */
sl@0
  2501
#line 504 "parse.y"
sl@0
  2502
{yygotominor.yy240 = yymsp[-1].minor.yy240;}
sl@0
  2503
#line 2508 "parse.c"
sl@0
  2504
        break;
sl@0
  2505
      case 140: /* using_opt ::= */
sl@0
  2506
      case 170: /* inscollist_opt ::= */
sl@0
  2507
#line 505 "parse.y"
sl@0
  2508
{yygotominor.yy240 = 0;}
sl@0
  2509
#line 2514 "parse.c"
sl@0
  2510
        break;
sl@0
  2511
      case 142: /* orderby_opt ::= ORDER BY sortlist */
sl@0
  2512
      case 150: /* groupby_opt ::= GROUP BY nexprlist */
sl@0
  2513
      case 230: /* exprlist ::= nexprlist */
sl@0
  2514
#line 516 "parse.y"
sl@0
  2515
{yygotominor.yy82 = yymsp[0].minor.yy82;}
sl@0
  2516
#line 2521 "parse.c"
sl@0
  2517
        break;
sl@0
  2518
      case 143: /* sortlist ::= sortlist COMMA sortitem sortorder */
sl@0
  2519
#line 517 "parse.y"
sl@0
  2520
{
sl@0
  2521
  yygotominor.yy82 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy82,yymsp[-1].minor.yy2,0);
sl@0
  2522
  if( yygotominor.yy82 ) yygotominor.yy82->a[yygotominor.yy82->nExpr-1].sortOrder = yymsp[0].minor.yy412;
sl@0
  2523
}
sl@0
  2524
#line 2529 "parse.c"
sl@0
  2525
        break;
sl@0
  2526
      case 144: /* sortlist ::= sortitem sortorder */
sl@0
  2527
#line 521 "parse.y"
sl@0
  2528
{
sl@0
  2529
  yygotominor.yy82 = sqlite3ExprListAppend(pParse,0,yymsp[-1].minor.yy2,0);
sl@0
  2530
  if( yygotominor.yy82 && yygotominor.yy82->a ) yygotominor.yy82->a[0].sortOrder = yymsp[0].minor.yy412;
sl@0
  2531
}
sl@0
  2532
#line 2537 "parse.c"
sl@0
  2533
        break;
sl@0
  2534
      case 146: /* sortorder ::= ASC */
sl@0
  2535
      case 148: /* sortorder ::= */
sl@0
  2536
#line 529 "parse.y"
sl@0
  2537
{yygotominor.yy412 = SQLITE_SO_ASC;}
sl@0
  2538
#line 2543 "parse.c"
sl@0
  2539
        break;
sl@0
  2540
      case 147: /* sortorder ::= DESC */
sl@0
  2541
#line 530 "parse.y"
sl@0
  2542
{yygotominor.yy412 = SQLITE_SO_DESC;}
sl@0
  2543
#line 2548 "parse.c"
sl@0
  2544
        break;
sl@0
  2545
      case 153: /* limit_opt ::= */
sl@0
  2546
#line 556 "parse.y"
sl@0
  2547
{yygotominor.yy244.pLimit = 0; yygotominor.yy244.pOffset = 0;}
sl@0
  2548
#line 2553 "parse.c"
sl@0
  2549
        break;
sl@0
  2550
      case 154: /* limit_opt ::= LIMIT expr */
sl@0
  2551
#line 557 "parse.y"
sl@0
  2552
{yygotominor.yy244.pLimit = yymsp[0].minor.yy2; yygotominor.yy244.pOffset = 0;}
sl@0
  2553
#line 2558 "parse.c"
sl@0
  2554
        break;
sl@0
  2555
      case 155: /* limit_opt ::= LIMIT expr OFFSET expr */
sl@0
  2556
#line 559 "parse.y"
sl@0
  2557
{yygotominor.yy244.pLimit = yymsp[-2].minor.yy2; yygotominor.yy244.pOffset = yymsp[0].minor.yy2;}
sl@0
  2558
#line 2563 "parse.c"
sl@0
  2559
        break;
sl@0
  2560
      case 156: /* limit_opt ::= LIMIT expr COMMA expr */
sl@0
  2561
#line 561 "parse.y"
sl@0
  2562
{yygotominor.yy244.pOffset = yymsp[-2].minor.yy2; yygotominor.yy244.pLimit = yymsp[0].minor.yy2;}
sl@0
  2563
#line 2568 "parse.c"
sl@0
  2564
        break;
sl@0
  2565
      case 157: /* cmd ::= DELETE FROM fullname where_opt */
sl@0
  2566
#line 565 "parse.y"
sl@0
  2567
{sqlite3DeleteFrom(pParse,yymsp[-1].minor.yy67,yymsp[0].minor.yy2);}
sl@0
  2568
#line 2573 "parse.c"
sl@0
  2569
        break;
sl@0
  2570
      case 160: /* cmd ::= UPDATE orconf fullname SET setlist where_opt */
sl@0
  2571
#line 575 "parse.y"
sl@0
  2572
{
sl@0
  2573
  sqlite3ExprListCheckLength(pParse,yymsp[-1].minor.yy82,"set list"); 
sl@0
  2574
  sqlite3Update(pParse,yymsp[-3].minor.yy67,yymsp[-1].minor.yy82,yymsp[0].minor.yy2,yymsp[-4].minor.yy412);
sl@0
  2575
}
sl@0
  2576
#line 2581 "parse.c"
sl@0
  2577
        break;
sl@0
  2578
      case 161: /* setlist ::= setlist COMMA nm EQ expr */
sl@0
  2579
#line 584 "parse.y"
sl@0
  2580
{yygotominor.yy82 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy82,yymsp[0].minor.yy2,&yymsp[-2].minor.yy0);}
sl@0
  2581
#line 2586 "parse.c"
sl@0
  2582
        break;
sl@0
  2583
      case 162: /* setlist ::= nm EQ expr */
sl@0
  2584
#line 586 "parse.y"
sl@0
  2585
{yygotominor.yy82 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy2,&yymsp[-2].minor.yy0);}
sl@0
  2586
#line 2591 "parse.c"
sl@0
  2587
        break;
sl@0
  2588
      case 163: /* cmd ::= insert_cmd INTO fullname inscollist_opt VALUES LP itemlist RP */
sl@0
  2589
#line 592 "parse.y"
sl@0
  2590
{sqlite3Insert(pParse, yymsp[-5].minor.yy67, yymsp[-1].minor.yy82, 0, yymsp[-4].minor.yy240, yymsp[-7].minor.yy412);}
sl@0
  2591
#line 2596 "parse.c"
sl@0
  2592
        break;
sl@0
  2593
      case 164: /* cmd ::= insert_cmd INTO fullname inscollist_opt select */
sl@0
  2594
#line 594 "parse.y"
sl@0
  2595
{sqlite3Insert(pParse, yymsp[-2].minor.yy67, 0, yymsp[0].minor.yy459, yymsp[-1].minor.yy240, yymsp[-4].minor.yy412);}
sl@0
  2596
#line 2601 "parse.c"
sl@0
  2597
        break;
sl@0
  2598
      case 165: /* cmd ::= insert_cmd INTO fullname inscollist_opt DEFAULT VALUES */
sl@0
  2599
#line 596 "parse.y"
sl@0
  2600
{sqlite3Insert(pParse, yymsp[-3].minor.yy67, 0, 0, yymsp[-2].minor.yy240, yymsp[-5].minor.yy412);}
sl@0
  2601
#line 2606 "parse.c"
sl@0
  2602
        break;
sl@0
  2603
      case 168: /* itemlist ::= itemlist COMMA expr */
sl@0
  2604
      case 232: /* nexprlist ::= nexprlist COMMA expr */
sl@0
  2605
#line 607 "parse.y"
sl@0
  2606
{yygotominor.yy82 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy82,yymsp[0].minor.yy2,0);}
sl@0
  2607
#line 2612 "parse.c"
sl@0
  2608
        break;
sl@0
  2609
      case 169: /* itemlist ::= expr */
sl@0
  2610
      case 233: /* nexprlist ::= expr */
sl@0
  2611
#line 609 "parse.y"
sl@0
  2612
{yygotominor.yy82 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy2,0);}
sl@0
  2613
#line 2618 "parse.c"
sl@0
  2614
        break;
sl@0
  2615
      case 172: /* inscollist ::= inscollist COMMA nm */
sl@0
  2616
#line 619 "parse.y"
sl@0
  2617
{yygotominor.yy240 = sqlite3IdListAppend(pParse->db,yymsp[-2].minor.yy240,&yymsp[0].minor.yy0);}
sl@0
  2618
#line 2623 "parse.c"
sl@0
  2619
        break;
sl@0
  2620
      case 173: /* inscollist ::= nm */
sl@0
  2621
#line 621 "parse.y"
sl@0
  2622
{yygotominor.yy240 = sqlite3IdListAppend(pParse->db,0,&yymsp[0].minor.yy0);}
sl@0
  2623
#line 2628 "parse.c"
sl@0
  2624
        break;
sl@0
  2625
      case 175: /* expr ::= LP expr RP */
sl@0
  2626
#line 632 "parse.y"
sl@0
  2627
{yygotominor.yy2 = yymsp[-1].minor.yy2; sqlite3ExprSpan(yygotominor.yy2,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); }
sl@0
  2628
#line 2633 "parse.c"
sl@0
  2629
        break;
sl@0
  2630
      case 176: /* term ::= NULL */
sl@0
  2631
      case 181: /* term ::= INTEGER|FLOAT|BLOB */
sl@0
  2632
      case 182: /* term ::= STRING */
sl@0
  2633
#line 633 "parse.y"
sl@0
  2634
{yygotominor.yy2 = sqlite3PExpr(pParse, yymsp[0].major, 0, 0, &yymsp[0].minor.yy0);}
sl@0
  2635
#line 2640 "parse.c"
sl@0
  2636
        break;
sl@0
  2637
      case 177: /* expr ::= ID */
sl@0
  2638
      case 178: /* expr ::= JOIN_KW */
sl@0
  2639
#line 634 "parse.y"
sl@0
  2640
{yygotominor.yy2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0);}
sl@0
  2641
#line 2646 "parse.c"
sl@0
  2642
        break;
sl@0
  2643
      case 179: /* expr ::= nm DOT nm */
sl@0
  2644
#line 636 "parse.y"
sl@0
  2645
{
sl@0
  2646
  Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
sl@0
  2647
  Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0);
sl@0
  2648
  yygotominor.yy2 = sqlite3PExpr(pParse, TK_DOT, temp1, temp2, 0);
sl@0
  2649
}
sl@0
  2650
#line 2655 "parse.c"
sl@0
  2651
        break;
sl@0
  2652
      case 180: /* expr ::= nm DOT nm DOT nm */
sl@0
  2653
#line 641 "parse.y"
sl@0
  2654
{
sl@0
  2655
  Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-4].minor.yy0);
sl@0
  2656
  Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
sl@0
  2657
  Expr *temp3 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0);
sl@0
  2658
  Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3, 0);
sl@0
  2659
  yygotominor.yy2 = sqlite3PExpr(pParse, TK_DOT, temp1, temp4, 0);
sl@0
  2660
}
sl@0
  2661
#line 2666 "parse.c"
sl@0
  2662
        break;
sl@0
  2663
      case 183: /* expr ::= REGISTER */
sl@0
  2664
#line 650 "parse.y"
sl@0
  2665
{yygotominor.yy2 = sqlite3RegisterExpr(pParse, &yymsp[0].minor.yy0);}
sl@0
  2666
#line 2671 "parse.c"
sl@0
  2667
        break;
sl@0
  2668
      case 184: /* expr ::= VARIABLE */
sl@0
  2669
#line 651 "parse.y"
sl@0
  2670
{
sl@0
  2671
  Token *pToken = &yymsp[0].minor.yy0;
sl@0
  2672
  Expr *pExpr = yygotominor.yy2 = sqlite3PExpr(pParse, TK_VARIABLE, 0, 0, pToken);
sl@0
  2673
  sqlite3ExprAssignVarNumber(pParse, pExpr);
sl@0
  2674
}
sl@0
  2675
#line 2680 "parse.c"
sl@0
  2676
        break;
sl@0
  2677
      case 185: /* expr ::= expr COLLATE ids */
sl@0
  2678
#line 656 "parse.y"
sl@0
  2679
{
sl@0
  2680
  yygotominor.yy2 = sqlite3ExprSetColl(pParse, yymsp[-2].minor.yy2, &yymsp[0].minor.yy0);
sl@0
  2681
}
sl@0
  2682
#line 2687 "parse.c"
sl@0
  2683
        break;
sl@0
  2684
      case 186: /* expr ::= CAST LP expr AS typetoken RP */
sl@0
  2685
#line 660 "parse.y"
sl@0
  2686
{
sl@0
  2687
  yygotominor.yy2 = sqlite3PExpr(pParse, TK_CAST, yymsp[-3].minor.yy2, 0, &yymsp[-1].minor.yy0);
sl@0
  2688
  sqlite3ExprSpan(yygotominor.yy2,&yymsp[-5].minor.yy0,&yymsp[0].minor.yy0);
sl@0
  2689
}
sl@0
  2690
#line 2695 "parse.c"
sl@0
  2691
        break;
sl@0
  2692
      case 187: /* expr ::= ID LP distinct exprlist RP */
sl@0
  2693
#line 665 "parse.y"
sl@0
  2694
{
sl@0
  2695
  if( yymsp[-1].minor.yy82 && yymsp[-1].minor.yy82->nExpr>SQLITE_MAX_FUNCTION_ARG ){
sl@0
  2696
    sqlite3ErrorMsg(pParse, "too many arguments on function %T", &yymsp[-4].minor.yy0);
sl@0
  2697
  }
sl@0
  2698
  yygotominor.yy2 = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy82, &yymsp[-4].minor.yy0);
sl@0
  2699
  sqlite3ExprSpan(yygotominor.yy2,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0);
sl@0
  2700
  if( yymsp[-2].minor.yy412 && yygotominor.yy2 ){
sl@0
  2701
    yygotominor.yy2->flags |= EP_Distinct;
sl@0
  2702
  }
sl@0
  2703
}
sl@0
  2704
#line 2709 "parse.c"
sl@0
  2705
        break;
sl@0
  2706
      case 188: /* expr ::= ID LP STAR RP */
sl@0
  2707
#line 675 "parse.y"
sl@0
  2708
{
sl@0
  2709
  yygotominor.yy2 = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0);
sl@0
  2710
  sqlite3ExprSpan(yygotominor.yy2,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0);
sl@0
  2711
}
sl@0
  2712
#line 2717 "parse.c"
sl@0
  2713
        break;
sl@0
  2714
      case 189: /* term ::= CTIME_KW */
sl@0
  2715
#line 679 "parse.y"
sl@0
  2716
{
sl@0
  2717
  /* The CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP values are
sl@0
  2718
  ** treated as functions that return constants */
sl@0
  2719
  yygotominor.yy2 = sqlite3ExprFunction(pParse, 0,&yymsp[0].minor.yy0);
sl@0
  2720
  if( yygotominor.yy2 ){
sl@0
  2721
    yygotominor.yy2->op = TK_CONST_FUNC;  
sl@0
  2722
    yygotominor.yy2->span = yymsp[0].minor.yy0;
sl@0
  2723
  }
sl@0
  2724
}
sl@0
  2725
#line 2730 "parse.c"
sl@0
  2726
        break;
sl@0
  2727
      case 190: /* expr ::= expr AND expr */
sl@0
  2728
      case 191: /* expr ::= expr OR expr */
sl@0
  2729
      case 192: /* expr ::= expr LT|GT|GE|LE expr */
sl@0
  2730
      case 193: /* expr ::= expr EQ|NE expr */
sl@0
  2731
      case 194: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */
sl@0
  2732
      case 195: /* expr ::= expr PLUS|MINUS expr */
sl@0
  2733
      case 196: /* expr ::= expr STAR|SLASH|REM expr */
sl@0
  2734
      case 197: /* expr ::= expr CONCAT expr */
sl@0
  2735
#line 688 "parse.y"
sl@0
  2736
{yygotominor.yy2 = sqlite3PExpr(pParse,yymsp[-1].major,yymsp[-2].minor.yy2,yymsp[0].minor.yy2,0);}
sl@0
  2737
#line 2742 "parse.c"
sl@0
  2738
        break;
sl@0
  2739
      case 198: /* likeop ::= LIKE_KW */
sl@0
  2740
      case 200: /* likeop ::= MATCH */
sl@0
  2741
#line 700 "parse.y"
sl@0
  2742
{yygotominor.yy438.eOperator = yymsp[0].minor.yy0; yygotominor.yy438.not = 0;}
sl@0
  2743
#line 2748 "parse.c"
sl@0
  2744
        break;
sl@0
  2745
      case 199: /* likeop ::= NOT LIKE_KW */
sl@0
  2746
      case 201: /* likeop ::= NOT MATCH */
sl@0
  2747
#line 701 "parse.y"
sl@0
  2748
{yygotominor.yy438.eOperator = yymsp[0].minor.yy0; yygotominor.yy438.not = 1;}
sl@0
  2749
#line 2754 "parse.c"
sl@0
  2750
        break;
sl@0
  2751
      case 204: /* expr ::= expr likeop expr escape */
sl@0
  2752
#line 708 "parse.y"
sl@0
  2753
{
sl@0
  2754
  ExprList *pList;
sl@0
  2755
  pList = sqlite3ExprListAppend(pParse,0, yymsp[-1].minor.yy2, 0);
sl@0
  2756
  pList = sqlite3ExprListAppend(pParse,pList, yymsp[-3].minor.yy2, 0);
sl@0
  2757
  if( yymsp[0].minor.yy2 ){
sl@0
  2758
    pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy2, 0);
sl@0
  2759
  }
sl@0
  2760
  yygotominor.yy2 = sqlite3ExprFunction(pParse, pList, &yymsp[-2].minor.yy438.eOperator);
sl@0
  2761
  if( yymsp[-2].minor.yy438.not ) yygotominor.yy2 = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy2, 0, 0);
sl@0
  2762
  sqlite3ExprSpan(yygotominor.yy2, &yymsp[-3].minor.yy2->span, &yymsp[-1].minor.yy2->span);
sl@0
  2763
  if( yygotominor.yy2 ) yygotominor.yy2->flags |= EP_InfixFunc;
sl@0
  2764
}
sl@0
  2765
#line 2770 "parse.c"
sl@0
  2766
        break;
sl@0
  2767
      case 205: /* expr ::= expr ISNULL|NOTNULL */
sl@0
  2768
#line 721 "parse.y"
sl@0
  2769
{
sl@0
  2770
  yygotominor.yy2 = sqlite3PExpr(pParse, yymsp[0].major, yymsp[-1].minor.yy2, 0, 0);
sl@0
  2771
  sqlite3ExprSpan(yygotominor.yy2,&yymsp[-1].minor.yy2->span,&yymsp[0].minor.yy0);
sl@0
  2772
}
sl@0
  2773
#line 2778 "parse.c"
sl@0
  2774
        break;
sl@0
  2775
      case 206: /* expr ::= expr IS NULL */
sl@0
  2776
#line 725 "parse.y"
sl@0
  2777
{
sl@0
  2778
  yygotominor.yy2 = sqlite3PExpr(pParse, TK_ISNULL, yymsp[-2].minor.yy2, 0, 0);
sl@0
  2779
  sqlite3ExprSpan(yygotominor.yy2,&yymsp[-2].minor.yy2->span,&yymsp[0].minor.yy0);
sl@0
  2780
}
sl@0
  2781
#line 2786 "parse.c"
sl@0
  2782
        break;
sl@0
  2783
      case 207: /* expr ::= expr NOT NULL */
sl@0
  2784
#line 729 "parse.y"
sl@0
  2785
{
sl@0
  2786
  yygotominor.yy2 = sqlite3PExpr(pParse, TK_NOTNULL, yymsp[-2].minor.yy2, 0, 0);
sl@0
  2787
  sqlite3ExprSpan(yygotominor.yy2,&yymsp[-2].minor.yy2->span,&yymsp[0].minor.yy0);
sl@0
  2788
}
sl@0
  2789
#line 2794 "parse.c"
sl@0
  2790
        break;
sl@0
  2791
      case 208: /* expr ::= expr IS NOT NULL */
sl@0
  2792
#line 733 "parse.y"
sl@0
  2793
{
sl@0
  2794
  yygotominor.yy2 = sqlite3PExpr(pParse, TK_NOTNULL, yymsp[-3].minor.yy2, 0, 0);
sl@0
  2795
  sqlite3ExprSpan(yygotominor.yy2,&yymsp[-3].minor.yy2->span,&yymsp[0].minor.yy0);
sl@0
  2796
}
sl@0
  2797
#line 2802 "parse.c"
sl@0
  2798
        break;
sl@0
  2799
      case 209: /* expr ::= NOT expr */
sl@0
  2800
      case 210: /* expr ::= BITNOT expr */
sl@0
  2801
#line 737 "parse.y"
sl@0
  2802
{
sl@0
  2803
  yygotominor.yy2 = sqlite3PExpr(pParse, yymsp[-1].major, yymsp[0].minor.yy2, 0, 0);
sl@0
  2804
  sqlite3ExprSpan(yygotominor.yy2,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy2->span);
sl@0
  2805
}
sl@0
  2806
#line 2811 "parse.c"
sl@0
  2807
        break;
sl@0
  2808
      case 211: /* expr ::= MINUS expr */
sl@0
  2809
#line 745 "parse.y"
sl@0
  2810
{
sl@0
  2811
  yygotominor.yy2 = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy2, 0, 0);
sl@0
  2812
  sqlite3ExprSpan(yygotominor.yy2,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy2->span);
sl@0
  2813
}
sl@0
  2814
#line 2819 "parse.c"
sl@0
  2815
        break;
sl@0
  2816
      case 212: /* expr ::= PLUS expr */
sl@0
  2817
#line 749 "parse.y"
sl@0
  2818
{
sl@0
  2819
  yygotominor.yy2 = sqlite3PExpr(pParse, TK_UPLUS, yymsp[0].minor.yy2, 0, 0);
sl@0
  2820
  sqlite3ExprSpan(yygotominor.yy2,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy2->span);
sl@0
  2821
}
sl@0
  2822
#line 2827 "parse.c"
sl@0
  2823
        break;
sl@0
  2824
      case 215: /* expr ::= expr between_op expr AND expr */
sl@0
  2825
#line 756 "parse.y"
sl@0
  2826
{
sl@0
  2827
  ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy2, 0);
sl@0
  2828
  pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy2, 0);
sl@0
  2829
  yygotominor.yy2 = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy2, 0, 0);
sl@0
  2830
  if( yygotominor.yy2 ){
sl@0
  2831
    yygotominor.yy2->pList = pList;
sl@0
  2832
  }else{
sl@0
  2833
    sqlite3ExprListDelete(pParse->db, pList);
sl@0
  2834
  } 
sl@0
  2835
  if( yymsp[-3].minor.yy412 ) yygotominor.yy2 = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy2, 0, 0);
sl@0
  2836
  sqlite3ExprSpan(yygotominor.yy2,&yymsp[-4].minor.yy2->span,&yymsp[0].minor.yy2->span);
sl@0
  2837
}
sl@0
  2838
#line 2843 "parse.c"
sl@0
  2839
        break;
sl@0
  2840
      case 218: /* expr ::= expr in_op LP exprlist RP */
sl@0
  2841
#line 772 "parse.y"
sl@0
  2842
{
sl@0
  2843
    yygotominor.yy2 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy2, 0, 0);
sl@0
  2844
    if( yygotominor.yy2 ){
sl@0
  2845
      yygotominor.yy2->pList = yymsp[-1].minor.yy82;
sl@0
  2846
      sqlite3ExprSetHeight(pParse, yygotominor.yy2);
sl@0
  2847
    }else{
sl@0
  2848
      sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy82);
sl@0
  2849
    }
sl@0
  2850
    if( yymsp[-3].minor.yy412 ) yygotominor.yy2 = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy2, 0, 0);
sl@0
  2851
    sqlite3ExprSpan(yygotominor.yy2,&yymsp[-4].minor.yy2->span,&yymsp[0].minor.yy0);
sl@0
  2852
  }
sl@0
  2853
#line 2858 "parse.c"
sl@0
  2854
        break;
sl@0
  2855
      case 219: /* expr ::= LP select RP */
sl@0
  2856
#line 783 "parse.y"
sl@0
  2857
{
sl@0
  2858
    yygotominor.yy2 = sqlite3PExpr(pParse, TK_SELECT, 0, 0, 0);
sl@0
  2859
    if( yygotominor.yy2 ){
sl@0
  2860
      yygotominor.yy2->pSelect = yymsp[-1].minor.yy459;
sl@0
  2861
      sqlite3ExprSetHeight(pParse, yygotominor.yy2);
sl@0
  2862
    }else{
sl@0
  2863
      sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy459);
sl@0
  2864
    }
sl@0
  2865
    sqlite3ExprSpan(yygotominor.yy2,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
sl@0
  2866
  }
sl@0
  2867
#line 2872 "parse.c"
sl@0
  2868
        break;
sl@0
  2869
      case 220: /* expr ::= expr in_op LP select RP */
sl@0
  2870
#line 793 "parse.y"
sl@0
  2871
{
sl@0
  2872
    yygotominor.yy2 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy2, 0, 0);
sl@0
  2873
    if( yygotominor.yy2 ){
sl@0
  2874
      yygotominor.yy2->pSelect = yymsp[-1].minor.yy459;
sl@0
  2875
      sqlite3ExprSetHeight(pParse, yygotominor.yy2);
sl@0
  2876
    }else{
sl@0
  2877
      sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy459);
sl@0
  2878
    }
sl@0
  2879
    if( yymsp[-3].minor.yy412 ) yygotominor.yy2 = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy2, 0, 0);
sl@0
  2880
    sqlite3ExprSpan(yygotominor.yy2,&yymsp[-4].minor.yy2->span,&yymsp[0].minor.yy0);
sl@0
  2881
  }
sl@0
  2882
#line 2887 "parse.c"
sl@0
  2883
        break;
sl@0
  2884
      case 221: /* expr ::= expr in_op nm dbnm */
sl@0
  2885
#line 804 "parse.y"
sl@0
  2886
{
sl@0
  2887
    SrcList *pSrc = sqlite3SrcListAppend(pParse->db, 0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);
sl@0
  2888
    yygotominor.yy2 = sqlite3PExpr(pParse, TK_IN, yymsp[-3].minor.yy2, 0, 0);
sl@0
  2889
    if( yygotominor.yy2 ){
sl@0
  2890
      yygotominor.yy2->pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0,0);
sl@0
  2891
      sqlite3ExprSetHeight(pParse, yygotominor.yy2);
sl@0
  2892
    }else{
sl@0
  2893
      sqlite3SrcListDelete(pParse->db, pSrc);
sl@0
  2894
    }
sl@0
  2895
    if( yymsp[-2].minor.yy412 ) yygotominor.yy2 = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy2, 0, 0);
sl@0
  2896
    sqlite3ExprSpan(yygotominor.yy2,&yymsp[-3].minor.yy2->span,yymsp[0].minor.yy0.z?&yymsp[0].minor.yy0:&yymsp[-1].minor.yy0);
sl@0
  2897
  }
sl@0
  2898
#line 2903 "parse.c"
sl@0
  2899
        break;
sl@0
  2900
      case 222: /* expr ::= EXISTS LP select RP */
sl@0
  2901
#line 816 "parse.y"
sl@0
  2902
{
sl@0
  2903
    Expr *p = yygotominor.yy2 = sqlite3PExpr(pParse, TK_EXISTS, 0, 0, 0);
sl@0
  2904
    if( p ){
sl@0
  2905
      p->pSelect = yymsp[-1].minor.yy459;
sl@0
  2906
      sqlite3ExprSpan(p,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0);
sl@0
  2907
      sqlite3ExprSetHeight(pParse, yygotominor.yy2);
sl@0
  2908
    }else{
sl@0
  2909
      sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy459);
sl@0
  2910
    }
sl@0
  2911
  }
sl@0
  2912
#line 2917 "parse.c"
sl@0
  2913
        break;
sl@0
  2914
      case 223: /* expr ::= CASE case_operand case_exprlist case_else END */
sl@0
  2915
#line 829 "parse.y"
sl@0
  2916
{
sl@0
  2917
  yygotominor.yy2 = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy2, yymsp[-1].minor.yy2, 0);
sl@0
  2918
  if( yygotominor.yy2 ){
sl@0
  2919
    yygotominor.yy2->pList = yymsp[-2].minor.yy82;
sl@0
  2920
    sqlite3ExprSetHeight(pParse, yygotominor.yy2);
sl@0
  2921
  }else{
sl@0
  2922
    sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy82);
sl@0
  2923
  }
sl@0
  2924
  sqlite3ExprSpan(yygotominor.yy2, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0);
sl@0
  2925
}
sl@0
  2926
#line 2931 "parse.c"
sl@0
  2927
        break;
sl@0
  2928
      case 224: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
sl@0
  2929
#line 841 "parse.y"
sl@0
  2930
{
sl@0
  2931
  yygotominor.yy82 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy82, yymsp[-2].minor.yy2, 0);
sl@0
  2932
  yygotominor.yy82 = sqlite3ExprListAppend(pParse,yygotominor.yy82, yymsp[0].minor.yy2, 0);
sl@0
  2933
}
sl@0
  2934
#line 2939 "parse.c"
sl@0
  2935
        break;
sl@0
  2936
      case 225: /* case_exprlist ::= WHEN expr THEN expr */
sl@0
  2937
#line 845 "parse.y"
sl@0
  2938
{
sl@0
  2939
  yygotominor.yy82 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy2, 0);
sl@0
  2940
  yygotominor.yy82 = sqlite3ExprListAppend(pParse,yygotominor.yy82, yymsp[0].minor.yy2, 0);
sl@0
  2941
}
sl@0
  2942
#line 2947 "parse.c"
sl@0
  2943
        break;
sl@0
  2944
      case 234: /* cmd ::= CREATE uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP */
sl@0
  2945
#line 874 "parse.y"
sl@0
  2946
{
sl@0
  2947
  sqlite3CreateIndex(pParse, &yymsp[-6].minor.yy0, &yymsp[-5].minor.yy0, 
sl@0
  2948
                     sqlite3SrcListAppend(pParse->db,0,&yymsp[-3].minor.yy0,0), yymsp[-1].minor.yy82, yymsp[-9].minor.yy412,
sl@0
  2949
                      &yymsp[-10].minor.yy0, &yymsp[0].minor.yy0, SQLITE_SO_ASC, yymsp[-7].minor.yy412);
sl@0
  2950
}
sl@0
  2951
#line 2956 "parse.c"
sl@0
  2952
        break;
sl@0
  2953
      case 235: /* uniqueflag ::= UNIQUE */
sl@0
  2954
      case 282: /* raisetype ::= ABORT */
sl@0
  2955
#line 881 "parse.y"
sl@0
  2956
{yygotominor.yy412 = OE_Abort;}
sl@0
  2957
#line 2962 "parse.c"
sl@0
  2958
        break;
sl@0
  2959
      case 236: /* uniqueflag ::= */
sl@0
  2960
#line 882 "parse.y"
sl@0
  2961
{yygotominor.yy412 = OE_None;}
sl@0
  2962
#line 2967 "parse.c"
sl@0
  2963
        break;
sl@0
  2964
      case 239: /* idxlist ::= idxlist COMMA nm collate sortorder */
sl@0
  2965
#line 891 "parse.y"
sl@0
  2966
{
sl@0
  2967
  Expr *p = 0;
sl@0
  2968
  if( yymsp[-1].minor.yy0.n>0 ){
sl@0
  2969
    p = sqlite3PExpr(pParse, TK_COLUMN, 0, 0, 0);
sl@0
  2970
    sqlite3ExprSetColl(pParse, p, &yymsp[-1].minor.yy0);
sl@0
  2971
  }
sl@0
  2972
  yygotominor.yy82 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy82, p, &yymsp[-2].minor.yy0);
sl@0
  2973
  sqlite3ExprListCheckLength(pParse, yygotominor.yy82, "index");
sl@0
  2974
  if( yygotominor.yy82 ) yygotominor.yy82->a[yygotominor.yy82->nExpr-1].sortOrder = yymsp[0].minor.yy412;
sl@0
  2975
}
sl@0
  2976
#line 2981 "parse.c"
sl@0
  2977
        break;
sl@0
  2978
      case 240: /* idxlist ::= nm collate sortorder */
sl@0
  2979
#line 901 "parse.y"
sl@0
  2980
{
sl@0
  2981
  Expr *p = 0;
sl@0
  2982
  if( yymsp[-1].minor.yy0.n>0 ){
sl@0
  2983
    p = sqlite3PExpr(pParse, TK_COLUMN, 0, 0, 0);
sl@0
  2984
    sqlite3ExprSetColl(pParse, p, &yymsp[-1].minor.yy0);
sl@0
  2985
  }
sl@0
  2986
  yygotominor.yy82 = sqlite3ExprListAppend(pParse,0, p, &yymsp[-2].minor.yy0);
sl@0
  2987
  sqlite3ExprListCheckLength(pParse, yygotominor.yy82, "index");
sl@0
  2988
  if( yygotominor.yy82 ) yygotominor.yy82->a[yygotominor.yy82->nExpr-1].sortOrder = yymsp[0].minor.yy412;
sl@0
  2989
}
sl@0
  2990
#line 2995 "parse.c"
sl@0
  2991
        break;
sl@0
  2992
      case 241: /* collate ::= */
sl@0
  2993
#line 913 "parse.y"
sl@0
  2994
{yygotominor.yy0.z = 0; yygotominor.yy0.n = 0;}
sl@0
  2995
#line 3000 "parse.c"
sl@0
  2996
        break;
sl@0
  2997
      case 243: /* cmd ::= DROP INDEX ifexists fullname */
sl@0
  2998
#line 919 "parse.y"
sl@0
  2999
{sqlite3DropIndex(pParse, yymsp[0].minor.yy67, yymsp[-1].minor.yy412);}
sl@0
  3000
#line 3005 "parse.c"
sl@0
  3001
        break;
sl@0
  3002
      case 244: /* cmd ::= VACUUM */
sl@0
  3003
      case 245: /* cmd ::= VACUUM nm */
sl@0
  3004
#line 925 "parse.y"
sl@0
  3005
{sqlite3Vacuum(pParse);}
sl@0
  3006
#line 3011 "parse.c"
sl@0
  3007
        break;
sl@0
  3008
      case 246: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
sl@0
  3009
      case 247: /* cmd ::= PRAGMA nm dbnm EQ ON */
sl@0
  3010
      case 248: /* cmd ::= PRAGMA nm dbnm EQ DELETE */
sl@0
  3011
#line 934 "parse.y"
sl@0
  3012
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);}
sl@0
  3013
#line 3018 "parse.c"
sl@0
  3014
        break;
sl@0
  3015
      case 249: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
sl@0
  3016
#line 937 "parse.y"
sl@0
  3017
{
sl@0
  3018
  sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);
sl@0
  3019
}
sl@0
  3020
#line 3025 "parse.c"
sl@0
  3021
        break;
sl@0
  3022
      case 250: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
sl@0
  3023
#line 940 "parse.y"
sl@0
  3024
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);}
sl@0
  3025
#line 3030 "parse.c"
sl@0
  3026
        break;
sl@0
  3027
      case 251: /* cmd ::= PRAGMA nm dbnm */
sl@0
  3028
#line 941 "parse.y"
sl@0
  3029
{sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);}
sl@0
  3030
#line 3035 "parse.c"
sl@0
  3031
        break;
sl@0
  3032
      case 259: /* cmd ::= CREATE trigger_decl BEGIN trigger_cmd_list END */
sl@0
  3033
#line 956 "parse.y"
sl@0
  3034
{
sl@0
  3035
  Token all;
sl@0
  3036
  all.z = yymsp[-3].minor.yy0.z;
sl@0
  3037
  all.n = (yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n;
sl@0
  3038
  sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy347, &all);
sl@0
  3039
}
sl@0
  3040
#line 3045 "parse.c"
sl@0
  3041
        break;
sl@0
  3042
      case 260: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
sl@0
  3043
#line 965 "parse.y"
sl@0
  3044
{
sl@0
  3045
  sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy412, yymsp[-4].minor.yy210.a, yymsp[-4].minor.yy210.b, yymsp[-2].minor.yy67, yymsp[0].minor.yy2, yymsp[-10].minor.yy412, yymsp[-8].minor.yy412);
sl@0
  3046
  yygotominor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0);
sl@0
  3047
}
sl@0
  3048
#line 3053 "parse.c"
sl@0
  3049
        break;
sl@0
  3050
      case 261: /* trigger_time ::= BEFORE */
sl@0
  3051
      case 264: /* trigger_time ::= */
sl@0
  3052
#line 971 "parse.y"
sl@0
  3053
{ yygotominor.yy412 = TK_BEFORE; }
sl@0
  3054
#line 3059 "parse.c"
sl@0
  3055
        break;
sl@0
  3056
      case 262: /* trigger_time ::= AFTER */
sl@0
  3057
#line 972 "parse.y"
sl@0
  3058
{ yygotominor.yy412 = TK_AFTER;  }
sl@0
  3059
#line 3064 "parse.c"
sl@0
  3060
        break;
sl@0
  3061
      case 263: /* trigger_time ::= INSTEAD OF */
sl@0
  3062
#line 973 "parse.y"
sl@0
  3063
{ yygotominor.yy412 = TK_INSTEAD;}
sl@0
  3064
#line 3069 "parse.c"
sl@0
  3065
        break;
sl@0
  3066
      case 265: /* trigger_event ::= DELETE|INSERT */
sl@0
  3067
      case 266: /* trigger_event ::= UPDATE */
sl@0
  3068
#line 978 "parse.y"
sl@0
  3069
{yygotominor.yy210.a = yymsp[0].major; yygotominor.yy210.b = 0;}
sl@0
  3070
#line 3075 "parse.c"
sl@0
  3071
        break;
sl@0
  3072
      case 267: /* trigger_event ::= UPDATE OF inscollist */
sl@0
  3073
#line 980 "parse.y"
sl@0
  3074
{yygotominor.yy210.a = TK_UPDATE; yygotominor.yy210.b = yymsp[0].minor.yy240;}
sl@0
  3075
#line 3080 "parse.c"
sl@0
  3076
        break;
sl@0
  3077
      case 270: /* when_clause ::= */
sl@0
  3078
      case 287: /* key_opt ::= */
sl@0
  3079
#line 987 "parse.y"
sl@0
  3080
{ yygotominor.yy2 = 0; }
sl@0
  3081
#line 3086 "parse.c"
sl@0
  3082
        break;
sl@0
  3083
      case 271: /* when_clause ::= WHEN expr */
sl@0
  3084
      case 288: /* key_opt ::= KEY expr */
sl@0
  3085
#line 988 "parse.y"
sl@0
  3086
{ yygotominor.yy2 = yymsp[0].minor.yy2; }
sl@0
  3087
#line 3092 "parse.c"
sl@0
  3088
        break;
sl@0
  3089
      case 272: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
sl@0
  3090
#line 992 "parse.y"
sl@0
  3091
{
sl@0
  3092
/*
sl@0
  3093
  if( yymsp[-2].minor.yy347 ){
sl@0
  3094
    yymsp[-2].minor.yy347->pLast->pNext = yymsp[-1].minor.yy347;
sl@0
  3095
  }else{
sl@0
  3096
    yymsp[-2].minor.yy347 = yymsp[-1].minor.yy347;
sl@0
  3097
  }
sl@0
  3098
*/
sl@0
  3099
  assert( yymsp[-2].minor.yy347!=0 );
sl@0
  3100
  yymsp[-2].minor.yy347->pLast->pNext = yymsp[-1].minor.yy347;
sl@0
  3101
  yymsp[-2].minor.yy347->pLast = yymsp[-1].minor.yy347;
sl@0
  3102
  yygotominor.yy347 = yymsp[-2].minor.yy347;
sl@0
  3103
}
sl@0
  3104
#line 3109 "parse.c"
sl@0
  3105
        break;
sl@0
  3106
      case 273: /* trigger_cmd_list ::= trigger_cmd SEMI */
sl@0
  3107
#line 1005 "parse.y"
sl@0
  3108
{ 
sl@0
  3109
  /* if( yymsp[-1].minor.yy347 ) */
sl@0
  3110
  assert( yymsp[-1].minor.yy347!=0 );
sl@0
  3111
  yymsp[-1].minor.yy347->pLast = yymsp[-1].minor.yy347;
sl@0
  3112
  yygotominor.yy347 = yymsp[-1].minor.yy347;
sl@0
  3113
}
sl@0
  3114
#line 3119 "parse.c"
sl@0
  3115
        break;
sl@0
  3116
      case 274: /* trigger_cmd ::= UPDATE orconf nm SET setlist where_opt */
sl@0
  3117
#line 1016 "parse.y"
sl@0
  3118
{ yygotominor.yy347 = sqlite3TriggerUpdateStep(pParse->db, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy82, yymsp[0].minor.yy2, yymsp[-4].minor.yy412); }
sl@0
  3119
#line 3124 "parse.c"
sl@0
  3120
        break;
sl@0
  3121
      case 275: /* trigger_cmd ::= insert_cmd INTO nm inscollist_opt VALUES LP itemlist RP */
sl@0
  3122
#line 1021 "parse.y"
sl@0
  3123
{yygotominor.yy347 = sqlite3TriggerInsertStep(pParse->db, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy240, yymsp[-1].minor.yy82, 0, yymsp[-7].minor.yy412);}
sl@0
  3124
#line 3129 "parse.c"
sl@0
  3125
        break;
sl@0
  3126
      case 276: /* trigger_cmd ::= insert_cmd INTO nm inscollist_opt select */
sl@0
  3127
#line 1024 "parse.y"
sl@0
  3128
{yygotominor.yy347 = sqlite3TriggerInsertStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy240, 0, yymsp[0].minor.yy459, yymsp[-4].minor.yy412);}
sl@0
  3129
#line 3134 "parse.c"
sl@0
  3130
        break;
sl@0
  3131
      case 277: /* trigger_cmd ::= DELETE FROM nm where_opt */
sl@0
  3132
#line 1028 "parse.y"
sl@0
  3133
{yygotominor.yy347 = sqlite3TriggerDeleteStep(pParse->db, &yymsp[-1].minor.yy0, yymsp[0].minor.yy2);}
sl@0
  3134
#line 3139 "parse.c"
sl@0
  3135
        break;
sl@0
  3136
      case 278: /* trigger_cmd ::= select */
sl@0
  3137
#line 1031 "parse.y"
sl@0
  3138
{yygotominor.yy347 = sqlite3TriggerSelectStep(pParse->db, yymsp[0].minor.yy459); }
sl@0
  3139
#line 3144 "parse.c"
sl@0
  3140
        break;
sl@0
  3141
      case 279: /* expr ::= RAISE LP IGNORE RP */
sl@0
  3142
#line 1034 "parse.y"
sl@0
  3143
{
sl@0
  3144
  yygotominor.yy2 = sqlite3PExpr(pParse, TK_RAISE, 0, 0, 0); 
sl@0
  3145
  if( yygotominor.yy2 ){
sl@0
  3146
    yygotominor.yy2->iColumn = OE_Ignore;
sl@0
  3147
    sqlite3ExprSpan(yygotominor.yy2, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0);
sl@0
  3148
  }
sl@0
  3149
}
sl@0
  3150
#line 3155 "parse.c"
sl@0
  3151
        break;
sl@0
  3152
      case 280: /* expr ::= RAISE LP raisetype COMMA nm RP */
sl@0
  3153
#line 1041 "parse.y"
sl@0
  3154
{
sl@0
  3155
  yygotominor.yy2 = sqlite3PExpr(pParse, TK_RAISE, 0, 0, &yymsp[-1].minor.yy0); 
sl@0
  3156
  if( yygotominor.yy2 ) {
sl@0
  3157
    yygotominor.yy2->iColumn = yymsp[-3].minor.yy412;
sl@0
  3158
    sqlite3ExprSpan(yygotominor.yy2, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0);
sl@0
  3159
  }
sl@0
  3160
}
sl@0
  3161
#line 3166 "parse.c"
sl@0
  3162
        break;
sl@0
  3163
      case 281: /* raisetype ::= ROLLBACK */
sl@0
  3164
#line 1051 "parse.y"
sl@0
  3165
{yygotominor.yy412 = OE_Rollback;}
sl@0
  3166
#line 3171 "parse.c"
sl@0
  3167
        break;
sl@0
  3168
      case 283: /* raisetype ::= FAIL */
sl@0
  3169
#line 1053 "parse.y"
sl@0
  3170
{yygotominor.yy412 = OE_Fail;}
sl@0
  3171
#line 3176 "parse.c"
sl@0
  3172
        break;
sl@0
  3173
      case 284: /* cmd ::= DROP TRIGGER ifexists fullname */
sl@0
  3174
#line 1058 "parse.y"
sl@0
  3175
{
sl@0
  3176
  sqlite3DropTrigger(pParse,yymsp[0].minor.yy67,yymsp[-1].minor.yy412);
sl@0
  3177
}
sl@0
  3178
#line 3183 "parse.c"
sl@0
  3179
        break;
sl@0
  3180
      case 285: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
sl@0
  3181
#line 1065 "parse.y"
sl@0
  3182
{
sl@0
  3183
  sqlite3Attach(pParse, yymsp[-3].minor.yy2, yymsp[-1].minor.yy2, yymsp[0].minor.yy2);
sl@0
  3184
}
sl@0
  3185
#line 3190 "parse.c"
sl@0
  3186
        break;
sl@0
  3187
      case 286: /* cmd ::= DETACH database_kw_opt expr */
sl@0
  3188
#line 1068 "parse.y"
sl@0
  3189
{
sl@0
  3190
  sqlite3Detach(pParse, yymsp[0].minor.yy2);
sl@0
  3191
}
sl@0
  3192
#line 3197 "parse.c"
sl@0
  3193
        break;
sl@0
  3194
      case 291: /* cmd ::= REINDEX */
sl@0
  3195
#line 1083 "parse.y"
sl@0
  3196
{sqlite3Reindex(pParse, 0, 0);}
sl@0
  3197
#line 3202 "parse.c"
sl@0
  3198
        break;
sl@0
  3199
      case 292: /* cmd ::= REINDEX nm dbnm */
sl@0
  3200
#line 1084 "parse.y"
sl@0
  3201
{sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
sl@0
  3202
#line 3207 "parse.c"
sl@0
  3203
        break;
sl@0
  3204
      case 293: /* cmd ::= ANALYZE */
sl@0
  3205
#line 1089 "parse.y"
sl@0
  3206
{sqlite3Analyze(pParse, 0, 0);}
sl@0
  3207
#line 3212 "parse.c"
sl@0
  3208
        break;
sl@0
  3209
      case 294: /* cmd ::= ANALYZE nm dbnm */
sl@0
  3210
#line 1090 "parse.y"
sl@0
  3211
{sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
sl@0
  3212
#line 3217 "parse.c"
sl@0
  3213
        break;
sl@0
  3214
      case 295: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
sl@0
  3215
#line 1095 "parse.y"
sl@0
  3216
{
sl@0
  3217
  sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy67,&yymsp[0].minor.yy0);
sl@0
  3218
}
sl@0
  3219
#line 3224 "parse.c"
sl@0
  3220
        break;
sl@0
  3221
      case 296: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column */
sl@0
  3222
#line 1098 "parse.y"
sl@0
  3223
{
sl@0
  3224
  sqlite3AlterFinishAddColumn(pParse, &yymsp[0].minor.yy0);
sl@0
  3225
}
sl@0
  3226
#line 3231 "parse.c"
sl@0
  3227
        break;
sl@0
  3228
      case 297: /* add_column_fullname ::= fullname */
sl@0
  3229
#line 1101 "parse.y"
sl@0
  3230
{
sl@0
  3231
  sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy67);
sl@0
  3232
}
sl@0
  3233
#line 3238 "parse.c"
sl@0
  3234
        break;
sl@0
  3235
  };
sl@0
  3236
  yygoto = yyRuleInfo[yyruleno].lhs;
sl@0
  3237
  yysize = yyRuleInfo[yyruleno].nrhs;
sl@0
  3238
  yypParser->yyidx -= yysize;
sl@0
  3239
  yyact = yy_find_reduce_action(yymsp[-yysize].stateno,yygoto);
sl@0
  3240
  if( yyact < YYNSTATE ){
sl@0
  3241
#ifdef NDEBUG
sl@0
  3242
    /* If we are not debugging and the reduce action popped at least
sl@0
  3243
    ** one element off the stack, then we can push the new element back
sl@0
  3244
    ** onto the stack here, and skip the stack overflow test in yy_shift().
sl@0
  3245
    ** That gives a significant speed improvement. */
sl@0
  3246
    if( yysize ){
sl@0
  3247
      yypParser->yyidx++;
sl@0
  3248
      yymsp -= yysize-1;
sl@0
  3249
      yymsp->stateno = yyact;
sl@0
  3250
      yymsp->major = yygoto;
sl@0
  3251
      yymsp->minor = yygotominor;
sl@0
  3252
    }else
sl@0
  3253
#endif
sl@0
  3254
    {
sl@0
  3255
      yy_shift(yypParser,yyact,yygoto,&yygotominor);
sl@0
  3256
    }
sl@0
  3257
  }else{
sl@0
  3258
    assert( yyact == YYNSTATE + YYNRULE + 1 );
sl@0
  3259
    yy_accept(yypParser);
sl@0
  3260
  }
sl@0
  3261
}
sl@0
  3262
sl@0
  3263
/*
sl@0
  3264
** The following code executes when the parse fails
sl@0
  3265
*/
sl@0
  3266
static void yy_parse_failed(
sl@0
  3267
  yyParser *yypParser           /* The parser */
sl@0
  3268
){
sl@0
  3269
  sqlite3ParserARG_FETCH;
sl@0
  3270
#ifndef NDEBUG
sl@0
  3271
  if( yyTraceFILE ){
sl@0
  3272
    fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
sl@0
  3273
  }
sl@0
  3274
#endif
sl@0
  3275
  while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
sl@0
  3276
  /* Here code is inserted which will be executed whenever the
sl@0
  3277
  ** parser fails */
sl@0
  3278
  sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
sl@0
  3279
}
sl@0
  3280
sl@0
  3281
/*
sl@0
  3282
** The following code executes when a syntax error first occurs.
sl@0
  3283
*/
sl@0
  3284
static void yy_syntax_error(
sl@0
  3285
  yyParser *yypParser,           /* The parser */
sl@0
  3286
  int yymajor,                   /* The major type of the error token */
sl@0
  3287
  YYMINORTYPE yyminor            /* The minor type of the error token */
sl@0
  3288
){
sl@0
  3289
  sqlite3ParserARG_FETCH;
sl@0
  3290
#define TOKEN (yyminor.yy0)
sl@0
  3291
#line 34 "parse.y"
sl@0
  3292
sl@0
  3293
  assert( TOKEN.z[0] );  /* The tokenizer always gives us a token */
sl@0
  3294
  sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
sl@0
  3295
  pParse->parseError = 1;
sl@0
  3296
#line 3303 "parse.c"
sl@0
  3297
  sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
sl@0
  3298
}
sl@0
  3299
sl@0
  3300
/*
sl@0
  3301
** The following is executed when the parser accepts
sl@0
  3302
*/
sl@0
  3303
static void yy_accept(
sl@0
  3304
  yyParser *yypParser           /* The parser */
sl@0
  3305
){
sl@0
  3306
  sqlite3ParserARG_FETCH;
sl@0
  3307
#ifndef NDEBUG
sl@0
  3308
  if( yyTraceFILE ){
sl@0
  3309
    fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
sl@0
  3310
  }
sl@0
  3311
#endif
sl@0
  3312
  while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
sl@0
  3313
  /* Here code is inserted which will be executed whenever the
sl@0
  3314
  ** parser accepts */
sl@0
  3315
  sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
sl@0
  3316
}
sl@0
  3317
sl@0
  3318
/* The main parser program.
sl@0
  3319
** The first argument is a pointer to a structure obtained from
sl@0
  3320
** "sqlite3ParserAlloc" which describes the current state of the parser.
sl@0
  3321
** The second argument is the major token number.  The third is
sl@0
  3322
** the minor token.  The fourth optional argument is whatever the
sl@0
  3323
** user wants (and specified in the grammar) and is available for
sl@0
  3324
** use by the action routines.
sl@0
  3325
**
sl@0
  3326
** Inputs:
sl@0
  3327
** <ul>
sl@0
  3328
** <li> A pointer to the parser (an opaque structure.)
sl@0
  3329
** <li> The major token number.
sl@0
  3330
** <li> The minor token number.
sl@0
  3331
** <li> An option argument of a grammar-specified type.
sl@0
  3332
** </ul>
sl@0
  3333
**
sl@0
  3334
** Outputs:
sl@0
  3335
** None.
sl@0
  3336
*/
sl@0
  3337
void sqlite3Parser(
sl@0
  3338
  void *yyp,                   /* The parser */
sl@0
  3339
  int yymajor,                 /* The major token code number */
sl@0
  3340
  sqlite3ParserTOKENTYPE yyminor       /* The value for the token */
sl@0
  3341
  sqlite3ParserARG_PDECL               /* Optional %extra_argument parameter */
sl@0
  3342
){
sl@0
  3343
  YYMINORTYPE yyminorunion;
sl@0
  3344
  int yyact;            /* The parser action. */
sl@0
  3345
  int yyendofinput;     /* True if we are at the end of input */
sl@0
  3346
#ifdef YYERRORSYMBOL
sl@0
  3347
  int yyerrorhit = 0;   /* True if yymajor has invoked an error */
sl@0
  3348
#endif
sl@0
  3349
  yyParser *yypParser;  /* The parser */
sl@0
  3350
sl@0
  3351
  /* (re)initialize the parser, if necessary */
sl@0
  3352
  yypParser = (yyParser*)yyp;
sl@0
  3353
  if( yypParser->yyidx<0 ){
sl@0
  3354
#if YYSTACKDEPTH<=0
sl@0
  3355
    if( yypParser->yystksz <=0 ){
sl@0
  3356
      /*memset(&yyminorunion, 0, sizeof(yyminorunion));*/
sl@0
  3357
      yyminorunion = yyzerominor;
sl@0
  3358
      yyStackOverflow(yypParser, &yyminorunion);
sl@0
  3359
      return;
sl@0
  3360
    }
sl@0
  3361
#endif
sl@0
  3362
    yypParser->yyidx = 0;
sl@0
  3363
    yypParser->yyerrcnt = -1;
sl@0
  3364
    yypParser->yystack[0].stateno = 0;
sl@0
  3365
    yypParser->yystack[0].major = 0;
sl@0
  3366
  }
sl@0
  3367
  yyminorunion.yy0 = yyminor;
sl@0
  3368
  yyendofinput = (yymajor==0);
sl@0
  3369
  sqlite3ParserARG_STORE;
sl@0
  3370
sl@0
  3371
#ifndef NDEBUG
sl@0
  3372
  if( yyTraceFILE ){
sl@0
  3373
    fprintf(yyTraceFILE,"%sInput %s\n",yyTracePrompt,yyTokenName[yymajor]);
sl@0
  3374
  }
sl@0
  3375
#endif
sl@0
  3376
sl@0
  3377
  do{
sl@0
  3378
    yyact = yy_find_shift_action(yypParser,yymajor);
sl@0
  3379
    if( yyact<YYNSTATE ){
sl@0
  3380
      assert( !yyendofinput );  /* Impossible to shift the $ token */
sl@0
  3381
      yy_shift(yypParser,yyact,yymajor,&yyminorunion);
sl@0
  3382
      yypParser->yyerrcnt--;
sl@0
  3383
      yymajor = YYNOCODE;
sl@0
  3384
    }else if( yyact < YYNSTATE + YYNRULE ){
sl@0
  3385
      yy_reduce(yypParser,yyact-YYNSTATE);
sl@0
  3386
    }else{
sl@0
  3387
      assert( yyact == YY_ERROR_ACTION );
sl@0
  3388
#ifdef YYERRORSYMBOL
sl@0
  3389
      int yymx;
sl@0
  3390
#endif
sl@0
  3391
#ifndef NDEBUG
sl@0
  3392
      if( yyTraceFILE ){
sl@0
  3393
        fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
sl@0
  3394
      }
sl@0
  3395
#endif
sl@0
  3396
#ifdef YYERRORSYMBOL
sl@0
  3397
      /* A syntax error has occurred.
sl@0
  3398
      ** The response to an error depends upon whether or not the
sl@0
  3399
      ** grammar defines an error token "ERROR".  
sl@0
  3400
      **
sl@0
  3401
      ** This is what we do if the grammar does define ERROR:
sl@0
  3402
      **
sl@0
  3403
      **  * Call the %syntax_error function.
sl@0
  3404
      **
sl@0
  3405
      **  * Begin popping the stack until we enter a state where
sl@0
  3406
      **    it is legal to shift the error symbol, then shift
sl@0
  3407
      **    the error symbol.
sl@0
  3408
      **
sl@0
  3409
      **  * Set the error count to three.
sl@0
  3410
      **
sl@0
  3411
      **  * Begin accepting and shifting new tokens.  No new error
sl@0
  3412
      **    processing will occur until three tokens have been
sl@0
  3413
      **    shifted successfully.
sl@0
  3414
      **
sl@0
  3415
      */
sl@0
  3416
      if( yypParser->yyerrcnt<0 ){
sl@0
  3417
        yy_syntax_error(yypParser,yymajor,yyminorunion);
sl@0
  3418
      }
sl@0
  3419
      yymx = yypParser->yystack[yypParser->yyidx].major;
sl@0
  3420
      if( yymx==YYERRORSYMBOL || yyerrorhit ){
sl@0
  3421
#ifndef NDEBUG
sl@0
  3422
        if( yyTraceFILE ){
sl@0
  3423
          fprintf(yyTraceFILE,"%sDiscard input token %s\n",
sl@0
  3424
             yyTracePrompt,yyTokenName[yymajor]);
sl@0
  3425
        }
sl@0
  3426
#endif
sl@0
  3427
        yy_destructor(yypParser, yymajor,&yyminorunion);
sl@0
  3428
        yymajor = YYNOCODE;
sl@0
  3429
      }else{
sl@0
  3430
         while(
sl@0
  3431
          yypParser->yyidx >= 0 &&
sl@0
  3432
          yymx != YYERRORSYMBOL &&
sl@0
  3433
          (yyact = yy_find_reduce_action(
sl@0
  3434
                        yypParser->yystack[yypParser->yyidx].stateno,
sl@0
  3435
                        YYERRORSYMBOL)) >= YYNSTATE
sl@0
  3436
        ){
sl@0
  3437
          yy_pop_parser_stack(yypParser);
sl@0
  3438
        }
sl@0
  3439
        if( yypParser->yyidx < 0 || yymajor==0 ){
sl@0
  3440
          yy_destructor(yypParser,yymajor,&yyminorunion);
sl@0
  3441
          yy_parse_failed(yypParser);
sl@0
  3442
          yymajor = YYNOCODE;
sl@0
  3443
        }else if( yymx!=YYERRORSYMBOL ){
sl@0
  3444
          YYMINORTYPE u2;
sl@0
  3445
          u2.YYERRSYMDT = 0;
sl@0
  3446
          yy_shift(yypParser,yyact,YYERRORSYMBOL,&u2);
sl@0
  3447
        }
sl@0
  3448
      }
sl@0
  3449
      yypParser->yyerrcnt = 3;
sl@0
  3450
      yyerrorhit = 1;
sl@0
  3451
#else  /* YYERRORSYMBOL is not defined */
sl@0
  3452
      /* This is what we do if the grammar does not define ERROR:
sl@0
  3453
      **
sl@0
  3454
      **  * Report an error message, and throw away the input token.
sl@0
  3455
      **
sl@0
  3456
      **  * If the input token is $, then fail the parse.
sl@0
  3457
      **
sl@0
  3458
      ** As before, subsequent error messages are suppressed until
sl@0
  3459
      ** three input tokens have been successfully shifted.
sl@0
  3460
      */
sl@0
  3461
      if( yypParser->yyerrcnt<=0 ){
sl@0
  3462
        yy_syntax_error(yypParser,yymajor,yyminorunion);
sl@0
  3463
      }
sl@0
  3464
      yypParser->yyerrcnt = 3;
sl@0
  3465
      yy_destructor(yypParser,yymajor,&yyminorunion);
sl@0
  3466
      if( yyendofinput ){
sl@0
  3467
        yy_parse_failed(yypParser);
sl@0
  3468
      }
sl@0
  3469
      yymajor = YYNOCODE;
sl@0
  3470
#endif
sl@0
  3471
    }
sl@0
  3472
  }while( yymajor!=YYNOCODE && yypParser->yyidx>=0 );
sl@0
  3473
  return;
sl@0
  3474
}