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