Back to index

lightning-sunbird  0.9+nobinonly
parse.c
Go to the documentation of this file.
00001 /* Driver template for the LEMON parser generator.
00002 ** The author disclaims copyright to this source code.
00003 */
00004 /* First off, code is include which follows the "include" declaration
00005 ** in the input file. */
00006 #include <stdio.h>
00007 #line 54 "parse.y"
00008 
00009 #include "sqliteInt.h"
00010 #include "parse.h"
00011 
00012 /*
00013 ** An instance of this structure holds information about the
00014 ** LIMIT clause of a SELECT statement.
00015 */
00016 struct LimitVal {
00017   Expr *pLimit;    /* The LIMIT expression.  NULL if there is no limit */
00018   Expr *pOffset;   /* The OFFSET expression.  NULL if there is none */
00019 };
00020 
00021 /*
00022 ** An instance of this structure is used to store the LIKE,
00023 ** GLOB, NOT LIKE, and NOT GLOB operators.
00024 */
00025 struct LikeOp {
00026   Token eOperator;  /* "like" or "glob" or "regexp" */
00027   int not;         /* True if the NOT keyword is present */
00028 };
00029 
00030 /*
00031 ** An instance of the following structure describes the event of a
00032 ** TRIGGER.  "a" is the event type, one of TK_UPDATE, TK_INSERT,
00033 ** TK_DELETE, or TK_INSTEAD.  If the event is of the form
00034 **
00035 **      UPDATE ON (a,b,c)
00036 **
00037 ** Then the "b" IdList records the list "a,b,c".
00038 */
00039 struct TrigEvent { int a; IdList * b; };
00040 
00041 /*
00042 ** An instance of this structure holds the ATTACH key and the key type.
00043 */
00044 struct AttachKey { int type;  Token key; };
00045 
00046 #line 48 "parse.c"
00047 /* Next is all token values, in a form suitable for use by makeheaders.
00048 ** This section will be null unless lemon is run with the -m switch.
00049 */
00050 /* 
00051 ** These constants (all generated automatically by the parser generator)
00052 ** specify the various kinds of tokens (terminals) that the parser
00053 ** understands. 
00054 **
00055 ** Each symbol here is a terminal symbol in the grammar.
00056 */
00057 /* Make sure the INTERFACE macro is defined.
00058 */
00059 #ifndef INTERFACE
00060 # define INTERFACE 1
00061 #endif
00062 /* The next thing included is series of defines which control
00063 ** various aspects of the generated parser.
00064 **    YYCODETYPE         is the data type used for storing terminal
00065 **                       and nonterminal numbers.  "unsigned char" is
00066 **                       used if there are fewer than 250 terminals
00067 **                       and nonterminals.  "int" is used otherwise.
00068 **    YYNOCODE           is a number of type YYCODETYPE which corresponds
00069 **                       to no legal terminal or nonterminal number.  This
00070 **                       number is used to fill in empty slots of the hash 
00071 **                       table.
00072 **    YYFALLBACK         If defined, this indicates that one or more tokens
00073 **                       have fall-back values which should be used if the
00074 **                       original value of the token will not parse.
00075 **    YYACTIONTYPE       is the data type used for storing terminal
00076 **                       and nonterminal numbers.  "unsigned char" is
00077 **                       used if there are fewer than 250 rules and
00078 **                       states combined.  "int" is used otherwise.
00079 **    sqlite3ParserTOKENTYPE     is the data type used for minor tokens given 
00080 **                       directly to the parser from the tokenizer.
00081 **    YYMINORTYPE        is the data type used for all minor tokens.
00082 **                       This is typically a union of many types, one of
00083 **                       which is sqlite3ParserTOKENTYPE.  The entry in the union
00084 **                       for base tokens is called "yy0".
00085 **    YYSTACKDEPTH       is the maximum depth of the parser's stack.
00086 **    sqlite3ParserARG_SDECL     A static variable declaration for the %extra_argument
00087 **    sqlite3ParserARG_PDECL     A parameter declaration for the %extra_argument
00088 **    sqlite3ParserARG_STORE     Code to store %extra_argument into yypParser
00089 **    sqlite3ParserARG_FETCH     Code to extract %extra_argument from yypParser
00090 **    YYNSTATE           the combined number of states.
00091 **    YYNRULE            the number of rules in the grammar
00092 **    YYERRORSYMBOL      is the code number of the error symbol.  If not
00093 **                       defined, then do no error processing.
00094 */
00095 #define YYCODETYPE unsigned char
00096 #define YYNOCODE 240
00097 #define YYACTIONTYPE unsigned short int
00098 #define sqlite3ParserTOKENTYPE Token
00099 typedef union {
00100   sqlite3ParserTOKENTYPE yy0;
00101   struct {int value; int mask;} yy13;
00102   struct TrigEvent yy132;
00103   IdList* yy160;
00104   Expr* yy178;
00105   int yy230;
00106   Select* yy239;
00107   TriggerStep* yy247;
00108   struct LimitVal yy270;
00109   SrcList* yy285;
00110   Expr * yy292;
00111   Token yy384;
00112   struct LikeOp yy440;
00113   ExprList* yy462;
00114   int yy479;
00115 } YYMINORTYPE;
00116 #define YYSTACKDEPTH 100
00117 #define sqlite3ParserARG_SDECL Parse *pParse;
00118 #define sqlite3ParserARG_PDECL ,Parse *pParse
00119 #define sqlite3ParserARG_FETCH Parse *pParse = yypParser->pParse
00120 #define sqlite3ParserARG_STORE yypParser->pParse = pParse
00121 #define YYNSTATE 559
00122 #define YYNRULE 295
00123 #define YYERRORSYMBOL 137
00124 #define YYERRSYMDT yy479
00125 #define YYFALLBACK 1
00126 #define YY_NO_ACTION      (YYNSTATE+YYNRULE+2)
00127 #define YY_ACCEPT_ACTION  (YYNSTATE+YYNRULE+1)
00128 #define YY_ERROR_ACTION   (YYNSTATE+YYNRULE)
00129 
00130 /* Next are that tables used to determine what action to take based on the
00131 ** current state and lookahead token.  These tables are used to implement
00132 ** functions that take a state number and lookahead value and return an
00133 ** action integer.  
00134 **
00135 ** Suppose the action integer is N.  Then the action is determined as
00136 ** follows
00137 **
00138 **   0 <= N < YYNSTATE                  Shift N.  That is, push the lookahead
00139 **                                      token onto the stack and goto state N.
00140 **
00141 **   YYNSTATE <= N < YYNSTATE+YYNRULE   Reduce by rule N-YYNSTATE.
00142 **
00143 **   N == YYNSTATE+YYNRULE              A syntax error has occurred.
00144 **
00145 **   N == YYNSTATE+YYNRULE+1            The parser accepts its input.
00146 **
00147 **   N == YYNSTATE+YYNRULE+2            No such action.  Denotes unused
00148 **                                      slots in the yy_action[] table.
00149 **
00150 ** The action table is constructed as a single large table named yy_action[].
00151 ** Given state S and lookahead X, the action is computed as
00152 **
00153 **      yy_action[ yy_shift_ofst[S] + X ]
00154 **
00155 ** If the index value yy_shift_ofst[S]+X is out of range or if the value
00156 ** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
00157 ** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
00158 ** and that yy_default[S] should be used instead.  
00159 **
00160 ** The formula above is for computing the action when the lookahead is
00161 ** a terminal symbol.  If the lookahead is a non-terminal (as occurs after
00162 ** a reduce action) then the yy_reduce_ofst[] array is used in place of
00163 ** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of
00164 ** YY_SHIFT_USE_DFLT.
00165 **
00166 ** The following are the tables generated in this section:
00167 **
00168 **  yy_action[]        A single table containing all actions.
00169 **  yy_lookahead[]     A table containing the lookahead for each entry in
00170 **                     yy_action.  Used to detect hash collisions.
00171 **  yy_shift_ofst[]    For each state, the offset into yy_action for
00172 **                     shifting terminals.
00173 **  yy_reduce_ofst[]   For each state, the offset into yy_action for
00174 **                     shifting non-terminals after a reduce.
00175 **  yy_default[]       Default action for each state.
00176 */
00177 static const YYACTIONTYPE yy_action[] = {
00178  /*     0 */   279,   67,  283,   69,  147,  165,  545,  418,   61,   61,
00179  /*    10 */    61,   61,  201,   63,   63,   63,   63,   64,   64,   65,
00180  /*    20 */    65,   65,   66,   66,  547,  548,  431,   68,   63,   63,
00181  /*    30 */    63,   63,   64,   64,   65,   65,   65,   66,   67,  453,
00182  /*    40 */    69,  147,  498,   60,   58,  287,  439,  440,  436,  436,
00183  /*    50 */    62,   62,   61,   61,   61,   61,  500,   63,   63,   63,
00184  /*    60 */    63,   64,   64,   65,   65,   65,   66,  279,  370,  283,
00185  /*    70 */   418,    2,  376,   79,  157,  114,  219,  304,  224,  305,
00186  /*    80 */   169,  244,  855,  118,  558,  503,  203,    2,  245,  388,
00187  /*    90 */   495,  218,   21,  431,  513,   20,  418,   57,  492,  511,
00188  /*   100 */    63,   63,   63,   63,   64,   64,   65,   65,   65,   66,
00189  /*   110 */    60,   58,  287,  439,  440,  436,  436,   62,   62,   61,
00190  /*   120 */    61,   61,   61,  530,   63,   63,   63,   63,   64,   64,
00191  /*   130 */    65,   65,   65,   66,  279,  377,  378,  174,  371,  368,
00192  /*   140 */   330,  333,  334,  219,  304,  224,  305,  169,  244,  510,
00193  /*   150 */   479,   19,  335,  138,  376,  245,  509,  301,  372,  418,
00194  /*   160 */   431,  529,   91,  199,   65,   65,   65,   66,  504,  167,
00195  /*   170 */   191,   64,   64,   65,   65,   65,   66,   60,   58,  287,
00196  /*   180 */   439,  440,  436,  436,   62,   62,   61,   61,   61,   61,
00197  /*   190 */   254,   63,   63,   63,   63,   64,   64,   65,   65,   65,
00198  /*   200 */    66,  279,  250,  410,  410,  430,  109,  395,  426,  204,
00199  /*   210 */   357,  260,  259,  308,  145,  168,  153,  377,  378,  396,
00200  /*   220 */   327,  201,   67,  189,   69,  147,  225,  431,  546,  361,
00201  /*   230 */   465,  365,  397,  499,  318,  409,   40,  413,  428,  312,
00202  /*   240 */   161,  180,  550,  178,   60,   58,  287,  439,  440,  436,
00203  /*   250 */   436,   62,   62,   61,   61,   61,   61,  410,   63,   63,
00204  /*   260 */    63,   63,   64,   64,   65,   65,   65,   66,  279,  471,
00205  /*   270 */   415,  415,  415,  282,  308,  322,  235,  426,  204,  308,
00206  /*   280 */   174,  367,  308,  330,  333,  334,   67,  308,   69,  147,
00207  /*   290 */   148,  559,  371,  368,  431,  335,  409,   34,  165,  465,
00208  /*   300 */   418,  409,   34,  275,  409,   34,  428,  502,  161,  409,
00209  /*   310 */    35,   60,   58,  287,  439,  440,  436,  436,   62,   62,
00210  /*   320 */    61,   61,   61,   61,  410,   63,   63,   63,   63,   64,
00211  /*   330 */    64,   65,   65,   65,   66,  308,  503,  395,  237,  290,
00212  /*   340 */   279,  391,  392,  146,  324,  387,   20,  288,  347,  396,
00213  /*   350 */   174,  450,  350,  330,  333,  334,  450,  409,   27,  450,
00214  /*   360 */   474,  231,  397,  418,  393,  335,  431,  501,  354,  144,
00215  /*   370 */   512,  503,  524,  232,  394,  465,  496,  410,  527,  392,
00216  /*   380 */   555,   20,   75,   60,   58,  287,  439,  440,  436,  436,
00217  /*   390 */    62,   62,   61,   61,   61,   61,  220,   63,   63,   63,
00218  /*   400 */    63,   64,   64,   65,   65,   65,   66,  308,  221,  185,
00219  /*   410 */   338,  254,  279,  308,  239,  443,  475,  308,  319,  308,
00220  /*   420 */   389,  444,  286,  421,  422,  379,  380,  381,  492,  409,
00221  /*   430 */    34,  311,  421,  422,  212,  409,   48,  170,  431,  409,
00222  /*   440 */    40,  409,   48,  410,  122,  314,  526,  442,  442,    1,
00223  /*   450 */   376,  469,  255,  376,   78,   60,   58,  287,  439,  440,
00224  /*   460 */   436,  436,   62,   62,   61,   61,   61,   61,  355,   63,
00225  /*   470 */    63,   63,   63,   64,   64,   65,   65,   65,   66,  279,
00226  /*   480 */   233,  152,  298,  478,  449,  203,  792,  192,  299,  351,
00227  /*   490 */   376,  281,  376,    9,  203,  376,  245,  376,  201,  432,
00228  /*   500 */   314,  376,  442,  442,  490,  431,  314,  325,  442,  442,
00229  /*   510 */   418,  356,  289,  377,  378,  354,  377,  378,  403,  434,
00230  /*   520 */   435,  410,   60,   58,  287,  439,  440,  436,  436,   62,
00231  /*   530 */    62,   61,   61,   61,   61,  263,   63,   63,   63,   63,
00232  /*   540 */    64,   64,   65,   65,   65,   66,  279,  433,  328,  236,
00233  /*   550 */   497,  473,  490,  377,  378,  377,  378,  484,  377,  378,
00234  /*   560 */   377,  378,  308,  522,  377,  378,  314,  521,  442,  442,
00235  /*   570 */   409,    3,  431,  418,  130,  254,  264,  485,  309,  346,
00236  /*   580 */   461,  213,  462,  242,  409,   28,  469,  292,  214,   60,
00237  /*   590 */    58,  287,  439,  440,  436,  436,   62,   62,   61,   61,
00238  /*   600 */    61,   61,  308,   63,   63,   63,   63,   64,   64,   65,
00239  /*   610 */    65,   65,   66,  279,  308,  458,  536,  248,    5,  308,
00240  /*   620 */   201,  308,  469,  308,  409,   23,  308,  202,  291,  308,
00241  /*   630 */   375,  243,  308,  362,   54,  115,  409,   32,   74,  431,
00242  /*   640 */    76,  409,   53,  409,   24,  409,   51,  345,  409,   96,
00243  /*   650 */   149,  409,   93,  265,  409,   98,   60,   58,  287,  439,
00244  /*   660 */   440,  436,  436,   62,   62,   61,   61,   61,   61,  308,
00245  /*   670 */    63,   63,   63,   63,   64,   64,   65,   65,   65,   66,
00246  /*   680 */   279,  308,  404,  297,  410,   90,  308,  176,  308,  405,
00247  /*   690 */   308,  409,   99,  308,  419,  308,   22,  308,  520,  344,
00248  /*   700 */   520,  164,  153,  409,  110,  141,  431,  313,  409,  111,
00249  /*   710 */   409,   16,  409,   97,  254,  409,   33,  409,   94,  409,
00250  /*   720 */    52,  410,  187,   60,   58,  287,  439,  440,  436,  436,
00251  /*   730 */    62,   62,   61,   61,   61,   61,  308,   63,   63,   63,
00252  /*   740 */    63,   64,   64,   65,   65,   65,   66,  279,  308,  490,
00253  /*   750 */   490,  414,  308,  320,  308,  538,  308,  460,  409,  112,
00254  /*   760 */   308,  171,  172,  173,  308,  408,  308,  424,  424,  407,
00255  /*   770 */   409,  113,  427,  431,  409,   25,  409,   36,  409,   37,
00256  /*   780 */   170,  437,  409,   26,  211,  293,  409,   38,  409,   39,
00257  /*   790 */    60,   58,  287,  439,  440,  436,  436,   62,   62,   61,
00258  /*   800 */    61,   61,   61,  308,   63,   63,   63,   63,   64,   64,
00259  /*   810 */    65,   65,   65,   66,  279,  308,  490,  490,  451,  308,
00260  /*   820 */    81,  308,  151,  308,  459,  409,   41,  308,  243,  243,
00261  /*   830 */   400,  401,  308,  448,  281,   12,  464,  409,   42,  468,
00262  /*   840 */   431,  409,   43,  409,   29,  409,   30,  241,  460,  409,
00263  /*   850 */    44,  294,  296,  480,  409,   45,  329,   60,   70,  287,
00264  /*   860 */   439,  440,  436,  436,   62,   62,   61,   61,   61,   61,
00265  /*   870 */   308,   63,   63,   63,   63,   64,   64,   65,   65,   65,
00266  /*   880 */    66,  279,  308,  408,  483,  482,  308,  407,  308,  467,
00267  /*   890 */   308,  166,  409,   46,  308,  243,  243,  476,  488,   12,
00268  /*   900 */   122,  518,  519,  179,  409,   47,  481,  431,  409,   31,
00269  /*   910 */   409,   10,  409,   49,  505,  486,  409,   50,  254,  249,
00270  /*   920 */   254,  254,  254,  158,  279,   58,  287,  439,  440,  436,
00271  /*   930 */   436,   62,   62,   61,   61,   61,   61,  410,   63,   63,
00272  /*   940 */    63,   63,   64,   64,   65,   65,   65,   66,  487,  247,
00273  /*   950 */   431,  122,  254,  337,  525,  122,  122,  251,  533,  539,
00274  /*   960 */   166,  540,  266,  360,  534,  543,   88,   88,  252,  287,
00275  /*   970 */   439,  440,  436,  436,   62,   62,   61,   61,   61,   61,
00276  /*   980 */   195,   63,   63,   63,   63,   64,   64,   65,   65,   65,
00277  /*   990 */    66,   71,  315,  268,    4,  253,  182,  258,  285,  349,
00278  /*  1000 */   342,  352,  353,  261,  262,  544,  310,   71,  315,  269,
00279  /*  1010 */     4,  222,  363,  272,  285,  593,  273,  554,  140,  226,
00280  /*  1020 */   385,  423,  310,  317,  425,  316,  532,  542,   18,  156,
00281  /*  1030 */   479,  454,  457,  430,  332,  489,  374,  382,  383,  317,
00282  /*  1040 */   384,    8,  302,  303,  491,  390,  398,  284,  403,  430,
00283  /*  1050 */   223,  406,   73,   72,  402,   81,  411,  399,  323,   56,
00284  /*  1060 */    71,  306,  307,  205,  321,  413,   80,  227,   73,   72,
00285  /*  1070 */   472,   77,  452,  163,  234,  455,   71,  306,  307,   71,
00286  /*  1080 */   315,  413,    4,  229,  201,  456,  285,  412,  228,   82,
00287  /*  1090 */   119,  326,  230,  206,  310,  207,  101,  276,  415,  415,
00288  /*  1100 */   415,  416,  417,   11,  238,  494,  466,  470,  240,  209,
00289  /*  1110 */   210,  317,  493,  506,  415,  415,  415,  416,  417,   11,
00290  /*  1120 */   507,  430,  155,  339,  508,  514,  177,  215,  216,  217,
00291  /*  1130 */   105,  277,  341,  181,  516,   83,  343,   85,  256,  455,
00292  /*  1140 */    73,   72,  517,  197,  183,  270,  348,  117,   71,  306,
00293  /*  1150 */   307,  528,  271,  413,  186,  126,  535,  358,  127,  128,
00294  /*  1160 */   541,  135,  300,  132,  194,  136,  529,  551,  552,  553,
00295  /*  1170 */   129,  193,   89,  196,  430,  556,  208,  100,   95,  373,
00296  /*  1180 */   386,  116,  200,   55,   17,  594,  415,  415,  415,  416,
00297  /*  1190 */   417,   11,   92,  142,  143,  595,  159,  108,  160,   59,
00298  /*  1200 */   438,  420,  499,  429,  137,  441,  413,  445,  150,  162,
00299  /*  1210 */   446,  447,    6,    7,   13,  359,  267,  259,  463,   12,
00300  /*  1220 */   120,  280,  121,  154,  477,  102,  201,  246,  331,  103,
00301  /*  1230 */    84,  104,  336,  175,  221,  340,  139,  515,  123,  415,
00302  /*  1240 */   415,  415,  184,  124,  295,  166,  257,  106,  523,  278,
00303  /*  1250 */   364,  531,  125,   86,  188,   14,  190,  537,  131,  133,
00304  /*  1260 */    87,  134,   15,  107,  198,  549,  366,  369,  536,  557,
00305  /*  1270 */   274,
00306 };
00307 static const YYCODETYPE yy_lookahead[] = {
00308  /*     0 */    16,  216,   16,  218,  219,   21,  146,   23,   68,   69,
00309  /*    10 */    70,   71,  109,   73,   74,   75,   76,   77,   78,   79,
00310  /*    20 */    80,   81,   82,   82,  164,  165,   42,   72,   73,   74,
00311  /*    30 */    75,   76,   77,   78,   79,   80,   81,   82,  216,  217,
00312  /*    40 */   218,  219,  168,   59,   60,   61,   62,   63,   64,   65,
00313  /*    50 */    66,   67,   68,   69,   70,   71,  168,   73,   74,   75,
00314  /*    60 */    76,   77,   78,   79,   80,   81,   82,   16,  140,   16,
00315  /*    70 */    86,  143,   23,   22,   88,   89,   90,   91,   92,   93,
00316  /*    80 */    94,   95,  138,  139,  140,  146,  226,  143,  102,  166,
00317  /*    90 */   167,  152,   19,   42,  155,  156,   23,   46,  175,  180,
00318  /*   100 */    73,   74,   75,   76,   77,   78,   79,   80,   81,   82,
00319  /*   110 */    59,   60,   61,   62,   63,   64,   65,   66,   67,   68,
00320  /*   120 */    69,   70,   71,   11,   73,   74,   75,   76,   77,   78,
00321  /*   130 */    79,   80,   81,   82,   16,   86,   87,   88,    1,    2,
00322  /*   140 */    91,   92,   93,   90,   91,   92,   93,   94,   95,  175,
00323  /*   150 */   176,   19,  103,   21,   23,  102,  182,  141,  142,   86,
00324  /*   160 */    42,   49,   44,  147,   79,   80,   81,   82,  180,  154,
00325  /*   170 */   154,   77,   78,   79,   80,   81,   82,   59,   60,   61,
00326  /*   180 */    62,   63,   64,   65,   66,   67,   68,   69,   70,   71,
00327  /*   190 */   146,   73,   74,   75,   76,   77,   78,   79,   80,   81,
00328  /*   200 */    82,   16,   14,  188,  188,   58,   21,   12,   77,   78,
00329  /*   210 */    98,   99,  100,  146,   22,  200,  201,   86,   87,   24,
00330  /*   220 */   205,  109,  216,  154,  218,  219,  189,   42,   97,  213,
00331  /*   230 */   160,  187,   37,   86,   39,  168,  169,   90,  160,  161,
00332  /*   240 */   162,   53,  236,   55,   59,   60,   61,   62,   63,   64,
00333  /*   250 */    65,   66,   67,   68,   69,   70,   71,  188,   73,   74,
00334  /*   260 */    75,   76,   77,   78,   79,   80,   81,   82,   16,  199,
00335  /*   270 */   123,  124,  125,  149,  146,  208,  209,   77,   78,  146,
00336  /*   280 */    88,  237,  146,   91,   92,   93,  216,  146,  218,  219,
00337  /*   290 */   154,    0,    1,    2,   42,  103,  168,  169,   21,  160,
00338  /*   300 */    23,  168,  169,  157,  168,  169,  160,  161,  162,  168,
00339  /*   310 */   169,   59,   60,   61,   62,   63,   64,   65,   66,   67,
00340  /*   320 */    68,   69,   70,   71,  188,   73,   74,   75,   76,   77,
00341  /*   330 */    78,   79,   80,   81,   82,  146,  146,   12,  199,  211,
00342  /*   340 */    16,  184,  185,  154,  211,  155,  156,  211,  224,   24,
00343  /*   350 */    88,  223,  228,   91,   92,   93,  223,  168,  169,  223,
00344  /*   360 */    20,  220,   37,   86,   39,  103,   42,  159,  146,  179,
00345  /*   370 */   180,  146,   18,  146,   49,  160,  168,  188,  184,  185,
00346  /*   380 */   155,  156,  130,   59,   60,   61,   62,   63,   64,   65,
00347  /*   390 */    66,   67,   68,   69,   70,   71,   90,   73,   74,   75,
00348  /*   400 */    76,   77,   78,   79,   80,   81,   82,  146,  102,  154,
00349  /*   410 */    16,  146,   16,  146,  199,   20,   20,  146,  185,  146,
00350  /*   420 */   167,   20,  163,  164,  165,    7,    8,    9,  175,  168,
00351  /*   430 */   169,  163,  164,  165,  212,  168,  169,   43,   42,  168,
00352  /*   440 */   169,  168,  169,  188,   22,  105,   92,  107,  108,   19,
00353  /*   450 */    23,  146,  187,   23,  130,   59,   60,   61,   62,   63,
00354  /*   460 */    64,   65,   66,   67,   68,   69,   70,   71,  213,   73,
00355  /*   470 */    74,   75,   76,   77,   78,   79,   80,   81,   82,   16,
00356  /*   480 */   209,  146,  215,   20,  223,  226,  132,  154,  215,  234,
00357  /*   490 */    23,   97,   23,   19,  226,   23,  102,   23,  109,   42,
00358  /*   500 */   105,   23,  107,  108,  146,   42,  105,  146,  107,  108,
00359  /*   510 */    23,  122,  207,   86,   87,  146,   86,   87,   96,   62,
00360  /*   520 */    63,  188,   59,   60,   61,   62,   63,   64,   65,   66,
00361  /*   530 */    67,   68,   69,   70,   71,   14,   73,   74,   75,   76,
00362  /*   540 */    77,   78,   79,   80,   81,   82,   16,   90,  146,  146,
00363  /*   550 */    20,   79,  146,   86,   87,   86,   87,   30,   86,   87,
00364  /*   560 */    86,   87,  146,   25,   86,   87,  105,   29,  107,  108,
00365  /*   570 */   168,  169,   42,   86,   53,  146,   55,   50,  146,   41,
00366  /*   580 */   113,  212,  113,  225,  168,  169,  146,  181,  144,   59,
00367  /*   590 */    60,   61,   62,   63,   64,   65,   66,   67,   68,   69,
00368  /*   600 */    70,   71,  146,   73,   74,   75,   76,   77,   78,   79,
00369  /*   610 */    80,   81,   82,   16,  146,   22,  187,   20,  190,  146,
00370  /*   620 */   109,  146,  146,  146,  168,  169,  146,  191,  101,  146,
00371  /*   630 */   146,  225,  146,  122,  198,  146,  168,  169,  129,   42,
00372  /*   640 */   131,  168,  169,  168,  169,  168,  169,  207,  168,  169,
00373  /*   650 */   154,  168,  169,  132,  168,  169,   59,   60,   61,   62,
00374  /*   660 */    63,   64,   65,   66,   67,   68,   69,   70,   71,  146,
00375  /*   670 */    73,   74,   75,   76,   77,   78,   79,   80,   81,   82,
00376  /*   680 */    16,  146,   27,  207,  188,   21,  146,  154,  146,   34,
00377  /*   690 */   146,  168,  169,  146,   20,  146,   22,  146,   98,   99,
00378  /*   700 */   100,  200,  201,  168,  169,  112,   42,   16,  168,  169,
00379  /*   710 */   168,  169,  168,  169,  146,  168,  169,  168,  169,  168,
00380  /*   720 */   169,  188,   22,   59,   60,   61,   62,   63,   64,   65,
00381  /*   730 */    66,   67,   68,   69,   70,   71,  146,   73,   74,   75,
00382  /*   740 */    76,   77,   78,   79,   80,   81,   82,   16,  146,  146,
00383  /*   750 */   146,  146,  146,  146,  146,  187,  146,   22,  168,  169,
00384  /*   760 */   146,   98,   99,  100,  146,  106,  146,  123,  124,  110,
00385  /*   770 */   168,  169,  160,   42,  168,  169,  168,  169,  168,  169,
00386  /*   780 */    43,   90,  168,  169,  181,  181,  168,  169,  168,  169,
00387  /*   790 */    59,   60,   61,   62,   63,   64,   65,   66,   67,   68,
00388  /*   800 */    69,   70,   71,  146,   73,   74,   75,   76,   77,   78,
00389  /*   810 */    79,   80,   81,   82,   16,  146,  146,  146,  146,  146,
00390  /*   820 */   120,  146,   87,  146,  202,  168,  169,  146,  225,  225,
00391  /*   830 */     7,    8,  146,   20,   97,   22,  146,  168,  169,  146,
00392  /*   840 */    42,  168,  169,  168,  169,  168,  169,  146,  113,  168,
00393  /*   850 */   169,  181,  181,  146,  168,  169,   79,   59,   60,   61,
00394  /*   860 */    62,   63,   64,   65,   66,   67,   68,   69,   70,   71,
00395  /*   870 */   146,   73,   74,   75,   76,   77,   78,   79,   80,   81,
00396  /*   880 */    82,   16,  146,  106,   89,   90,  146,  110,  146,   20,
00397  /*   890 */   146,   22,  168,  169,  146,  225,  225,   20,   20,   22,
00398  /*   900 */    22,   51,   52,  154,  168,  169,  177,   42,  168,  169,
00399  /*   910 */   168,  169,  168,  169,  146,  177,  168,  169,  146,  146,
00400  /*   920 */   146,  146,  146,   19,   16,   60,   61,   62,   63,   64,
00401  /*   930 */    65,   66,   67,   68,   69,   70,   71,  188,   73,   74,
00402  /*   940 */    75,   76,   77,   78,   79,   80,   81,   82,  177,   20,
00403  /*   950 */    42,   22,  146,   20,   20,   22,   22,  146,   20,  187,
00404  /*   960 */    22,  187,  187,  187,   20,   20,   22,   22,  146,   61,
00405  /*   970 */    62,   63,   64,   65,   66,   67,   68,   69,   70,   71,
00406  /*   980 */    19,   73,   74,   75,   76,   77,   78,   79,   80,   81,
00407  /*   990 */    82,   16,   17,  187,   19,  146,  230,  146,   23,  146,
00408  /*  1000 */   231,  146,  146,  146,  146,  146,   31,   16,   17,  146,
00409  /*  1010 */    19,  171,  146,  146,   23,  111,  146,  146,  190,  192,
00410  /*  1020 */   148,  227,   31,   48,  227,  222,  193,  193,   67,    6,
00411  /*  1030 */   176,  171,  171,   58,  172,  171,  145,  145,  145,   48,
00412  /*  1040 */   145,   22,  153,   97,  171,  170,  170,   40,   96,   58,
00413  /*  1050 */   170,  170,   77,   78,  172,  120,  188,  178,  117,  119,
00414  /*  1060 */    85,   86,   87,  221,  115,   90,  118,  193,   77,   78,
00415  /*  1070 */    79,  129,  151,  111,   95,   23,   85,   86,   87,   16,
00416  /*  1080 */    17,   90,   19,  195,  109,  159,   23,  197,  194,   97,
00417  /*  1090 */   151,  114,  196,  210,   31,  210,   19,  173,  123,  124,
00418  /*  1100 */   125,  126,  127,  128,  203,  178,  204,  204,  203,  210,
00419  /*  1110 */   210,   48,  159,  170,  123,  124,  125,  126,  127,  128,
00420  /*  1120 */   170,   58,    5,   15,  170,  151,  150,   10,   11,   12,
00421  /*  1130 */    13,  173,  151,  151,  151,   19,   38,  129,  232,   23,
00422  /*  1140 */    77,   78,  233,   26,  150,   28,  151,   59,   85,   86,
00423  /*  1150 */    87,  183,   35,   90,  183,   19,  193,   15,  186,  186,
00424  /*  1160 */   193,  214,  151,  183,   47,  214,   49,   33,  151,  151,
00425  /*  1170 */   186,   54,  235,   56,   58,  136,  174,  174,  158,    1,
00426  /*  1180 */    20,   32,   44,   19,  229,  111,  123,  124,  125,  126,
00427  /*  1190 */   127,  128,  235,   77,   78,  111,  111,  238,  111,   19,
00428  /*  1200 */    90,   20,   86,   20,   19,  106,   90,   11,   19,   22,
00429  /*  1210 */    20,   20,  116,  116,   22,   98,   99,  100,  113,   22,
00430  /*  1220 */    19,  104,   20,  111,   20,   19,  109,   20,   44,   19,
00431  /*  1230 */    19,   19,   44,   94,  102,   16,   21,   17,   97,  123,
00432  /*  1240 */   124,  125,   97,   45,   36,   22,  132,   19,   45,    5,
00433  /*  1250 */   133,    1,  101,   67,  121,   19,  112,   17,  112,  101,
00434  /*  1260 */    67,  121,   19,   14,  134,   20,   57,    3,  239,    4,
00435  /*  1270 */   135,
00436 };
00437 #define YY_SHIFT_USE_DFLT (-98)
00438 #define YY_SHIFT_MAX 369
00439 static const short yy_shift_ofst[] = {
00440  /*     0 */   137,  975, 1117,  -16,  975, 1063, 1063, 1063,   49,  -97,
00441  /*    10 */   118, 1063, 1063, 1063, 1063, 1063,  -45,  112,  131,  478,
00442  /*    20 */   487,  200,  200,   51,  185,  252,  324,  396,  463,  530,
00443  /*    30 */   597,  664,  731,  798,  731,  731,  731,  731,  731,  731,
00444  /*    40 */   731,  731,  731,  731,  731,  731,  731,  731,  731,  731,
00445  /*    50 */   731,  865,  908,  908,  991, 1063, 1063, 1063, 1063, 1063,
00446  /*    60 */  1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
00447  /*    70 */  1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
00448  /*    80 */  1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
00449  /*    90 */  1063, 1063, 1063,  -60,  -60,  -14,   27,   27,   94,   85,
00450  /*   100 */   394,  478,  478,  478,  478,  354,  478,  478,  478,  487,
00451  /*   110 */   -59,  -98,  -98,  -98, 1116,   53,  325,  325,  291,  277,
00452  /*   120 */   478,  277,  478,  478,  478,  478,  478,  478,  478,  478,
00453  /*   130 */   478,  478,  478,  478,  478,  389,  511,  -97,  -97,  -97,
00454  /*   140 */   -98,  -98,  147,  147,  192,  262,  340,  430,  395,  401,
00455  /*   150 */   195,  467,  469,  474,  472,  418,  427,  427,  777,  427,
00456  /*   160 */   427,   73,  427,  427,  735,  427,  427,  461,  735,  427,
00457  /*   170 */   427,  527,  527,  527,  427,  427,  461,  427,  427,  461,
00458  /*   180 */   427,  538,  600,  427,  427,  461,  427,  427,  427,  461,
00459  /*   190 */   427,  461,  461,  427,  427,  427,  427,  427,  427,  132,
00460  /*   200 */   655,  659,  593,  644,  644,  509,  655,  655,  737,  655,
00461  /*   210 */   655,  422,  700,  700, 1023, 1023, 1023, 1023, 1019,  946,
00462  /*   220 */   946, 1007,  946,  952,  946,  -97,  935,  941,  948,  949,
00463  /*   230 */   940,  942,  962,  979, 1052,  979,  962,  992,  977,  992,
00464  /*   240 */   977, 1077,  979,  979, 1052, 1007,  946,  946,  946, 1077,
00465  /*   250 */  1108,  962,  962,  962,  962, 1098, 1008, 1108,  962, 1088,
00466  /*   260 */  1088, 1136,  935, 1142, 1142, 1142,  935, 1088, 1136,  962,
00467  /*   270 */  1134, 1134,  962,  962, 1039,  -98,  -98,  -98,  -98,  457,
00468  /*   280 */   521,  663,  188,  306,  823,  904,  674,  691,  813,  869,
00469  /*   290 */   877,  795,  878,  929,  933,  850,  934,  938,  944,  945,
00470  /*   300 */   961, 1178, 1160, 1149, 1138, 1164, 1074, 1084, 1085, 1087,
00471  /*   310 */  1180, 1181, 1183, 1110, 1099, 1185, 1196, 1189, 1190, 1187,
00472  /*   320 */  1191, 1096, 1192, 1097, 1197, 1105, 1201, 1202, 1112, 1204,
00473  /*   330 */  1184, 1206, 1207, 1210, 1211, 1188, 1212, 1139, 1132, 1219,
00474  /*   340 */  1220, 1215, 1141, 1208, 1198, 1223, 1203, 1114, 1145, 1228,
00475  /*   350 */  1244, 1250, 1151, 1186, 1193, 1133, 1236, 1144, 1240, 1146,
00476  /*   360 */  1158, 1140, 1243, 1245, 1249, 1209, 1130, 1135, 1264, 1265,
00477 };
00478 #define YY_REDUCE_USE_DFLT (-216)
00479 #define YY_REDUCE_MAX 278
00480 static const short yy_reduce_ofst[] = {
00481  /*     0 */   -56,  136,   16,   70,  189,  128,   67,  133,  190,   15,
00482  /*    10 */     6,  141,  261,  271,  267,  273, -178,  255, -140,  -61,
00483  /*    20 */   146,  259,  268, -215, -215, -215, -215, -215, -215, -215,
00484  /*    30 */  -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
00485  /*    40 */  -215, -215, -215, -215, -215, -215, -215, -215, -215, -215,
00486  /*    50 */  -215, -215, -215, -215,  402,  416,  456,  468,  473,  475,
00487  /*    60 */   477,  480,  483,  486,  523,  535,  540,  542,  544,  547,
00488  /*    70 */   549,  551,  590,  602,  606,  608,  610,  614,  618,  620,
00489  /*    80 */   657,  669,  673,  675,  677,  681,  686,  724,  736,  740,
00490  /*    90 */   742,  744,  748, -215, -215,  -77, -215, -215, -215, -215,
00491  /*   100 */   -26,  406,  603,  604,  670,  124,  671,   44,  225,   78,
00492  /*   110 */  -215, -215, -215, -215,  208,  253,  157,  194,  -72,  139,
00493  /*   120 */   305,  215,  358,  265,  440,  222,  476,  429,  568,  772,
00494  /*   130 */   774,  775,  776,  369,  806,   69,  333,  496,  533,  749,
00495  /*   140 */   436,  501, -126, -112,  -81,  -12,   37,  227,   37,   37,
00496  /*   150 */   233,  335,  361,  403,  432,  444,  484,  489,  428,  432,
00497  /*   160 */   605,  612,  607,  672,  622,  690,  693,   37,  622,  701,
00498  /*   170 */   707,  729,  738,  771,  768,  773,   37,  811,  822,   37,
00499  /*   180 */   849,  766,  769,  851,  853,   37,  855,  856,  857,   37,
00500  /*   190 */   858,   37,   37,  859,  863,  866,  867,  870,  871,  872,
00501  /*   200 */   840,  828,  827,  794,  797,  803,  860,  861,  854,  864,
00502  /*   210 */   873,  862,  833,  834,  891,  892,  893,  895,  889,  875,
00503  /*   220 */   876,  879,  880,  882,  881,  868,  874,  894,  888,  896,
00504  /*   230 */   890,  842,  921,  883,  926,  885,  939,  901,  902,  905,
00505  /*   240 */   903,  924,  899,  900,  953,  927,  943,  950,  954,  958,
00506  /*   250 */   976,  974,  981,  982,  983,  906,  909,  994,  995,  968,
00507  /*   260 */   971,  947,  963,  972,  973,  984,  967,  980,  951, 1011,
00508  /*   270 */   937,  957, 1017, 1018,  959, 1020, 1002, 1003,  955,
00509 };
00510 static const YYACTIONTYPE yy_default[] = {
00511  /*     0 */   565,  789,  854,  680,  854,  789,  854,  789,  854,  684,
00512  /*    10 */   840,  785,  789,  854,  854,  854,  760,  854,  811,  854,
00513  /*    20 */   596,  811,  811,  715,  854,  854,  854,  854,  854,  854,
00514  /*    30 */   854,  854,  716,  854,  788,  784,  780,  782,  781,  717,
00515  /*    40 */   704,  713,  720,  696,  825,  722,  723,  728,  729,  841,
00516  /*    50 */   844,  750,  766,  749,  854,  854,  854,  854,  854,  854,
00517  /*    60 */   854,  854,  854,  854,  854,  854,  854,  854,  854,  854,
00518  /*    70 */   854,  854,  854,  854,  854,  854,  854,  854,  854,  854,
00519  /*    80 */   854,  854,  854,  854,  854,  854,  854,  854,  854,  854,
00520  /*    90 */   854,  854,  854,  752,  771,  589,  751,  759,  753,  754,
00521  /*   100 */   649,  854,  854,  854,  854,  584,  854,  854,  854,  854,
00522  /*   110 */   755,  756,  767,  768,  854,  854,  854,  854,  565,  680,
00523  /*   120 */   854,  680,  854,  854,  854,  854,  854,  854,  854,  854,
00524  /*   130 */   854,  854,  854,  854,  854,  854,  854,  854,  854,  854,
00525  /*   140 */   674,  684,  854,  854,  640,  854,  854,  854,  854,  854,
00526  /*   150 */   854,  854,  854,  854,  854,  572,  570,  854,  672,  854,
00527  /*   160 */   854,  598,  854,  854,  682,  854,  854,  687,  688,  854,
00528  /*   170 */   854,  854,  854,  854,  854,  854,  586,  854,  854,  661,
00529  /*   180 */   854,  817,  854,  854,  854,  832,  854,  854,  854,  830,
00530  /*   190 */   854,  663,  725,  799,  854,  854,  845,  847,  854,  854,
00531  /*   200 */   707,  672,  681,  854,  854,  783,  707,  707,  619,  707,
00532  /*   210 */   707,  622,  719,  719,  569,  569,  569,  569,  639,  651,
00533  /*   220 */   651,  636,  651,  622,  651,  854,  719,  710,  712,  700,
00534  /*   230 */   714,  854,  689,  708,  854,  708,  689,  697,  699,  697,
00535  /*   240 */   699,  793,  708,  708,  854,  636,  651,  651,  651,  793,
00536  /*   250 */   581,  689,  689,  689,  689,  821,  824,  581,  689,  653,
00537  /*   260 */   653,  730,  719,  660,  660,  660,  719,  653,  730,  689,
00538  /*   270 */   843,  843,  689,  689,  852,  606,  624,  624,  827,  854,
00539  /*   280 */   854,  854,  854,  854,  854,  737,  854,  854,  854,  854,
00540  /*   290 */   854,  854,  854,  854,  854,  854,  854,  854,  854,  854,
00541  /*   300 */   806,  854,  854,  854,  854,  854,  742,  738,  854,  739,
00542  /*   310 */   854,  854,  854,  854,  666,  854,  854,  854,  854,  854,
00543  /*   320 */   854,  854,  701,  854,  711,  854,  854,  854,  854,  854,
00544  /*   330 */   854,  854,  854,  854,  854,  854,  854,  854,  854,  854,
00545  /*   340 */   854,  854,  854,  854,  819,  820,  854,  854,  854,  854,
00546  /*   350 */   854,  854,  854,  854,  854,  854,  854,  854,  854,  854,
00547  /*   360 */   854,  854,  854,  854,  854,  851,  854,  854,  566,  854,
00548  /*   370 */   560,  563,  562,  564,  568,  571,  593,  594,  595,  573,
00549  /*   380 */   574,  575,  576,  577,  578,  579,  585,  587,  605,  607,
00550  /*   390 */   614,  652,  655,  656,  657,  835,  836,  837,  615,  634,
00551  /*   400 */   637,  638,  616,  623,  705,  706,  617,  670,  671,  734,
00552  /*   410 */   664,  665,  669,  736,  740,  741,  743,  744,  592,  599,
00553  /*   420 */   600,  603,  604,  807,  809,  808,  810,  602,  601,  745,
00554  /*   430 */   748,  757,  758,  764,  770,  773,  762,  763,  765,  769,
00555  /*   440 */   772,  667,  668,  776,  778,  779,  833,  834,  774,  786,
00556  /*   450 */   787,  690,  777,  761,  702,  591,  709,  703,  673,  683,
00557  /*   460 */   692,  693,  694,  695,  678,  679,  685,  698,  732,  733,
00558  /*   470 */   686,  675,  676,  677,  775,  735,  746,  747,  618,  625,
00559  /*   480 */   626,  627,  630,  631,  632,  633,  628,  629,  794,  795,
00560  /*   490 */   797,  796,  620,  621,  635,  608,  609,  610,  611,  742,
00561  /*   500 */   612,  613,  597,  590,  641,  644,  645,  646,  647,  648,
00562  /*   510 */   650,  642,  643,  588,  580,  582,  691,  813,  822,  823,
00563  /*   520 */   818,  814,  815,  816,  583,  790,  791,  654,  726,  727,
00564  /*   530 */   812,  826,  828,  731,  829,  831,  658,  659,  662,  798,
00565  /*   540 */   838,  718,  721,  724,  800,  801,  802,  803,  804,  805,
00566  /*   550 */   839,  842,  846,  848,  849,  850,  853,  567,  561,
00567 };
00568 #define YY_SZ_ACTTAB (sizeof(yy_action)/sizeof(yy_action[0]))
00569 
00570 /* The next table maps tokens into fallback tokens.  If a construct
00571 ** like the following:
00572 ** 
00573 **      %fallback ID X Y Z.
00574 **
00575 ** appears in the grammer, then ID becomes a fallback token for X, Y,
00576 ** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser
00577 ** but it does not parse, the type of the token is changed to ID and
00578 ** the parse is retried before an error is thrown.
00579 */
00580 #ifdef YYFALLBACK
00581 static const YYCODETYPE yyFallback[] = {
00582     0,  /*          $ => nothing */
00583     0,  /*       SEMI => nothing */
00584    23,  /*    EXPLAIN => ID */
00585    23,  /*      QUERY => ID */
00586    23,  /*       PLAN => ID */
00587    23,  /*      BEGIN => ID */
00588     0,  /* TRANSACTION => nothing */
00589    23,  /*   DEFERRED => ID */
00590    23,  /*  IMMEDIATE => ID */
00591    23,  /*  EXCLUSIVE => ID */
00592     0,  /*     COMMIT => nothing */
00593    23,  /*        END => ID */
00594     0,  /*   ROLLBACK => nothing */
00595     0,  /*     CREATE => nothing */
00596     0,  /*      TABLE => nothing */
00597    23,  /*         IF => ID */
00598     0,  /*        NOT => nothing */
00599     0,  /*     EXISTS => nothing */
00600    23,  /*       TEMP => ID */
00601     0,  /*         LP => nothing */
00602     0,  /*         RP => nothing */
00603     0,  /*         AS => nothing */
00604     0,  /*      COMMA => nothing */
00605     0,  /*         ID => nothing */
00606    23,  /*      ABORT => ID */
00607    23,  /*      AFTER => ID */
00608    23,  /*    ANALYZE => ID */
00609    23,  /*        ASC => ID */
00610    23,  /*     ATTACH => ID */
00611    23,  /*     BEFORE => ID */
00612    23,  /*    CASCADE => ID */
00613    23,  /*       CAST => ID */
00614    23,  /*   CONFLICT => ID */
00615    23,  /*   DATABASE => ID */
00616    23,  /*       DESC => ID */
00617    23,  /*     DETACH => ID */
00618    23,  /*       EACH => ID */
00619    23,  /*       FAIL => ID */
00620    23,  /*        FOR => ID */
00621    23,  /*     IGNORE => ID */
00622    23,  /*  INITIALLY => ID */
00623    23,  /*    INSTEAD => ID */
00624    23,  /*    LIKE_KW => ID */
00625    23,  /*      MATCH => ID */
00626    23,  /*        KEY => ID */
00627    23,  /*         OF => ID */
00628    23,  /*     OFFSET => ID */
00629    23,  /*     PRAGMA => ID */
00630    23,  /*      RAISE => ID */
00631    23,  /*    REPLACE => ID */
00632    23,  /*   RESTRICT => ID */
00633    23,  /*        ROW => ID */
00634    23,  /*  STATEMENT => ID */
00635    23,  /*    TRIGGER => ID */
00636    23,  /*     VACUUM => ID */
00637    23,  /*       VIEW => ID */
00638    23,  /*    REINDEX => ID */
00639    23,  /*     RENAME => ID */
00640    23,  /*   CTIME_KW => ID */
00641     0,  /*         OR => nothing */
00642     0,  /*        AND => nothing */
00643     0,  /*         IS => nothing */
00644     0,  /*    BETWEEN => nothing */
00645     0,  /*         IN => nothing */
00646     0,  /*     ISNULL => nothing */
00647     0,  /*    NOTNULL => nothing */
00648     0,  /*         NE => nothing */
00649     0,  /*         EQ => nothing */
00650     0,  /*         GT => nothing */
00651     0,  /*         LE => nothing */
00652     0,  /*         LT => nothing */
00653     0,  /*         GE => nothing */
00654     0,  /*     ESCAPE => nothing */
00655     0,  /*     BITAND => nothing */
00656     0,  /*      BITOR => nothing */
00657     0,  /*     LSHIFT => nothing */
00658     0,  /*     RSHIFT => nothing */
00659     0,  /*       PLUS => nothing */
00660     0,  /*      MINUS => nothing */
00661     0,  /*       STAR => nothing */
00662     0,  /*      SLASH => nothing */
00663     0,  /*        REM => nothing */
00664     0,  /*     CONCAT => nothing */
00665     0,  /*     UMINUS => nothing */
00666     0,  /*      UPLUS => nothing */
00667     0,  /*     BITNOT => nothing */
00668     0,  /*     STRING => nothing */
00669     0,  /*    JOIN_KW => nothing */
00670     0,  /* CONSTRAINT => nothing */
00671     0,  /*    DEFAULT => nothing */
00672     0,  /*       NULL => nothing */
00673     0,  /*    PRIMARY => nothing */
00674     0,  /*     UNIQUE => nothing */
00675     0,  /*      CHECK => nothing */
00676     0,  /* REFERENCES => nothing */
00677     0,  /*    COLLATE => nothing */
00678     0,  /*   AUTOINCR => nothing */
00679     0,  /*         ON => nothing */
00680     0,  /*     DELETE => nothing */
00681     0,  /*     UPDATE => nothing */
00682     0,  /*     INSERT => nothing */
00683     0,  /*        SET => nothing */
00684     0,  /* DEFERRABLE => nothing */
00685     0,  /*    FOREIGN => nothing */
00686     0,  /*       DROP => nothing */
00687     0,  /*      UNION => nothing */
00688     0,  /*        ALL => nothing */
00689     0,  /*     EXCEPT => nothing */
00690     0,  /*  INTERSECT => nothing */
00691     0,  /*     SELECT => nothing */
00692     0,  /*   DISTINCT => nothing */
00693     0,  /*        DOT => nothing */
00694     0,  /*       FROM => nothing */
00695     0,  /*       JOIN => nothing */
00696     0,  /*      USING => nothing */
00697     0,  /*      ORDER => nothing */
00698     0,  /*         BY => nothing */
00699     0,  /*      GROUP => nothing */
00700     0,  /*     HAVING => nothing */
00701     0,  /*      LIMIT => nothing */
00702     0,  /*      WHERE => nothing */
00703     0,  /*       INTO => nothing */
00704     0,  /*     VALUES => nothing */
00705     0,  /*    INTEGER => nothing */
00706     0,  /*      FLOAT => nothing */
00707     0,  /*       BLOB => nothing */
00708     0,  /*   REGISTER => nothing */
00709     0,  /*   VARIABLE => nothing */
00710     0,  /*       CASE => nothing */
00711     0,  /*       WHEN => nothing */
00712     0,  /*       THEN => nothing */
00713     0,  /*       ELSE => nothing */
00714     0,  /*      INDEX => nothing */
00715     0,  /*      ALTER => nothing */
00716     0,  /*         TO => nothing */
00717     0,  /*        ADD => nothing */
00718     0,  /*   COLUMNKW => nothing */
00719 };
00720 #endif /* YYFALLBACK */
00721 
00722 /* The following structure represents a single element of the
00723 ** parser's stack.  Information stored includes:
00724 **
00725 **   +  The state number for the parser at this level of the stack.
00726 **
00727 **   +  The value of the token stored at this level of the stack.
00728 **      (In other words, the "major" token.)
00729 **
00730 **   +  The semantic value stored at this level of the stack.  This is
00731 **      the information used by the action routines in the grammar.
00732 **      It is sometimes called the "minor" token.
00733 */
00734 struct yyStackEntry {
00735   int stateno;       /* The state-number */
00736   int major;         /* The major token value.  This is the code
00737                      ** number for the token at this stack level */
00738   YYMINORTYPE minor; /* The user-supplied minor token value.  This
00739                      ** is the value of the token  */
00740 };
00741 typedef struct yyStackEntry yyStackEntry;
00742 
00743 /* The state of the parser is completely contained in an instance of
00744 ** the following structure */
00745 struct yyParser {
00746   int yyidx;                    /* Index of top element in stack */
00747   int yyerrcnt;                 /* Shifts left before out of the error */
00748   sqlite3ParserARG_SDECL                /* A place to hold %extra_argument */
00749   yyStackEntry yystack[YYSTACKDEPTH];  /* The parser's stack */
00750 };
00751 typedef struct yyParser yyParser;
00752 
00753 #ifndef NDEBUG
00754 #include <stdio.h>
00755 static FILE *yyTraceFILE = 0;
00756 static char *yyTracePrompt = 0;
00757 #endif /* NDEBUG */
00758 
00759 #ifndef NDEBUG
00760 /* 
00761 ** Turn parser tracing on by giving a stream to which to write the trace
00762 ** and a prompt to preface each trace message.  Tracing is turned off
00763 ** by making either argument NULL 
00764 **
00765 ** Inputs:
00766 ** <ul>
00767 ** <li> A FILE* to which trace output should be written.
00768 **      If NULL, then tracing is turned off.
00769 ** <li> A prefix string written at the beginning of every
00770 **      line of trace output.  If NULL, then tracing is
00771 **      turned off.
00772 ** </ul>
00773 **
00774 ** Outputs:
00775 ** None.
00776 */
00777 void sqlite3ParserTrace(FILE *TraceFILE, char *zTracePrompt){
00778   yyTraceFILE = TraceFILE;
00779   yyTracePrompt = zTracePrompt;
00780   if( yyTraceFILE==0 ) yyTracePrompt = 0;
00781   else if( yyTracePrompt==0 ) yyTraceFILE = 0;
00782 }
00783 #endif /* NDEBUG */
00784 
00785 #ifndef NDEBUG
00786 /* For tracing shifts, the names of all terminals and nonterminals
00787 ** are required.  The following table supplies these names */
00788 static const char *const yyTokenName[] = { 
00789   "$",             "SEMI",          "EXPLAIN",       "QUERY",       
00790   "PLAN",          "BEGIN",         "TRANSACTION",   "DEFERRED",    
00791   "IMMEDIATE",     "EXCLUSIVE",     "COMMIT",        "END",         
00792   "ROLLBACK",      "CREATE",        "TABLE",         "IF",          
00793   "NOT",           "EXISTS",        "TEMP",          "LP",          
00794   "RP",            "AS",            "COMMA",         "ID",          
00795   "ABORT",         "AFTER",         "ANALYZE",       "ASC",         
00796   "ATTACH",        "BEFORE",        "CASCADE",       "CAST",        
00797   "CONFLICT",      "DATABASE",      "DESC",          "DETACH",      
00798   "EACH",          "FAIL",          "FOR",           "IGNORE",      
00799   "INITIALLY",     "INSTEAD",       "LIKE_KW",       "MATCH",       
00800   "KEY",           "OF",            "OFFSET",        "PRAGMA",      
00801   "RAISE",         "REPLACE",       "RESTRICT",      "ROW",         
00802   "STATEMENT",     "TRIGGER",       "VACUUM",        "VIEW",        
00803   "REINDEX",       "RENAME",        "CTIME_KW",      "OR",          
00804   "AND",           "IS",            "BETWEEN",       "IN",          
00805   "ISNULL",        "NOTNULL",       "NE",            "EQ",          
00806   "GT",            "LE",            "LT",            "GE",          
00807   "ESCAPE",        "BITAND",        "BITOR",         "LSHIFT",      
00808   "RSHIFT",        "PLUS",          "MINUS",         "STAR",        
00809   "SLASH",         "REM",           "CONCAT",        "UMINUS",      
00810   "UPLUS",         "BITNOT",        "STRING",        "JOIN_KW",     
00811   "CONSTRAINT",    "DEFAULT",       "NULL",          "PRIMARY",     
00812   "UNIQUE",        "CHECK",         "REFERENCES",    "COLLATE",     
00813   "AUTOINCR",      "ON",            "DELETE",        "UPDATE",      
00814   "INSERT",        "SET",           "DEFERRABLE",    "FOREIGN",     
00815   "DROP",          "UNION",         "ALL",           "EXCEPT",      
00816   "INTERSECT",     "SELECT",        "DISTINCT",      "DOT",         
00817   "FROM",          "JOIN",          "USING",         "ORDER",       
00818   "BY",            "GROUP",         "HAVING",        "LIMIT",       
00819   "WHERE",         "INTO",          "VALUES",        "INTEGER",     
00820   "FLOAT",         "BLOB",          "REGISTER",      "VARIABLE",    
00821   "CASE",          "WHEN",          "THEN",          "ELSE",        
00822   "INDEX",         "ALTER",         "TO",            "ADD",         
00823   "COLUMNKW",      "error",         "input",         "cmdlist",     
00824   "ecmd",          "cmdx",          "cmd",           "explain",     
00825   "transtype",     "trans_opt",     "nm",            "create_table",
00826   "create_table_args",  "temp",          "ifnotexists",   "dbnm",        
00827   "columnlist",    "conslist_opt",  "select",        "column",      
00828   "columnid",      "type",          "carglist",      "id",          
00829   "ids",           "typetoken",     "typename",      "signed",      
00830   "plus_num",      "minus_num",     "carg",          "ccons",       
00831   "term",          "expr",          "onconf",        "sortorder",   
00832   "autoinc",       "idxlist_opt",   "refargs",       "defer_subclause",
00833   "refarg",        "refact",        "init_deferred_pred_opt",  "conslist",    
00834   "tcons",         "idxlist",       "defer_subclause_opt",  "orconf",      
00835   "resolvetype",   "raisetype",     "ifexists",      "fullname",    
00836   "oneselect",     "multiselect_op",  "distinct",      "selcollist",  
00837   "from",          "where_opt",     "groupby_opt",   "having_opt",  
00838   "orderby_opt",   "limit_opt",     "sclp",          "as",          
00839   "seltablist",    "stl_prefix",    "joinop",        "on_opt",      
00840   "using_opt",     "seltablist_paren",  "joinop2",       "inscollist",  
00841   "sortlist",      "sortitem",      "collate",       "exprlist",    
00842   "setlist",       "insert_cmd",    "inscollist_opt",  "itemlist",    
00843   "likeop",        "escape",        "between_op",    "in_op",       
00844   "case_operand",  "case_exprlist",  "case_else",     "expritem",    
00845   "uniqueflag",    "idxitem",       "plus_opt",      "number",      
00846   "trigger_decl",  "trigger_cmd_list",  "trigger_time",  "trigger_event",
00847   "foreach_clause",  "when_clause",   "trigger_cmd",   "database_kw_opt",
00848   "key_opt",       "add_column_fullname",  "kwcolumn_opt",
00849 };
00850 #endif /* NDEBUG */
00851 
00852 #ifndef NDEBUG
00853 /* For tracing reduce actions, the names of all rules are required.
00854 */
00855 static const char *const yyRuleName[] = {
00856  /*   0 */ "input ::= cmdlist",
00857  /*   1 */ "cmdlist ::= cmdlist ecmd",
00858  /*   2 */ "cmdlist ::= ecmd",
00859  /*   3 */ "cmdx ::= cmd",
00860  /*   4 */ "ecmd ::= SEMI",
00861  /*   5 */ "ecmd ::= explain cmdx SEMI",
00862  /*   6 */ "explain ::=",
00863  /*   7 */ "explain ::= EXPLAIN",
00864  /*   8 */ "explain ::= EXPLAIN QUERY PLAN",
00865  /*   9 */ "cmd ::= BEGIN transtype trans_opt",
00866  /*  10 */ "trans_opt ::=",
00867  /*  11 */ "trans_opt ::= TRANSACTION",
00868  /*  12 */ "trans_opt ::= TRANSACTION nm",
00869  /*  13 */ "transtype ::=",
00870  /*  14 */ "transtype ::= DEFERRED",
00871  /*  15 */ "transtype ::= IMMEDIATE",
00872  /*  16 */ "transtype ::= EXCLUSIVE",
00873  /*  17 */ "cmd ::= COMMIT trans_opt",
00874  /*  18 */ "cmd ::= END trans_opt",
00875  /*  19 */ "cmd ::= ROLLBACK trans_opt",
00876  /*  20 */ "cmd ::= create_table create_table_args",
00877  /*  21 */ "create_table ::= CREATE temp TABLE ifnotexists nm dbnm",
00878  /*  22 */ "ifnotexists ::=",
00879  /*  23 */ "ifnotexists ::= IF NOT EXISTS",
00880  /*  24 */ "temp ::= TEMP",
00881  /*  25 */ "temp ::=",
00882  /*  26 */ "create_table_args ::= LP columnlist conslist_opt RP",
00883  /*  27 */ "create_table_args ::= AS select",
00884  /*  28 */ "columnlist ::= columnlist COMMA column",
00885  /*  29 */ "columnlist ::= column",
00886  /*  30 */ "column ::= columnid type carglist",
00887  /*  31 */ "columnid ::= nm",
00888  /*  32 */ "id ::= ID",
00889  /*  33 */ "ids ::= ID|STRING",
00890  /*  34 */ "nm ::= ID",
00891  /*  35 */ "nm ::= STRING",
00892  /*  36 */ "nm ::= JOIN_KW",
00893  /*  37 */ "type ::=",
00894  /*  38 */ "type ::= typetoken",
00895  /*  39 */ "typetoken ::= typename",
00896  /*  40 */ "typetoken ::= typename LP signed RP",
00897  /*  41 */ "typetoken ::= typename LP signed COMMA signed RP",
00898  /*  42 */ "typename ::= ids",
00899  /*  43 */ "typename ::= typename ids",
00900  /*  44 */ "signed ::= plus_num",
00901  /*  45 */ "signed ::= minus_num",
00902  /*  46 */ "carglist ::= carglist carg",
00903  /*  47 */ "carglist ::=",
00904  /*  48 */ "carg ::= CONSTRAINT nm ccons",
00905  /*  49 */ "carg ::= ccons",
00906  /*  50 */ "carg ::= DEFAULT term",
00907  /*  51 */ "carg ::= DEFAULT LP expr RP",
00908  /*  52 */ "carg ::= DEFAULT PLUS term",
00909  /*  53 */ "carg ::= DEFAULT MINUS term",
00910  /*  54 */ "carg ::= DEFAULT id",
00911  /*  55 */ "ccons ::= NULL onconf",
00912  /*  56 */ "ccons ::= NOT NULL onconf",
00913  /*  57 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc",
00914  /*  58 */ "ccons ::= UNIQUE onconf",
00915  /*  59 */ "ccons ::= CHECK LP expr RP",
00916  /*  60 */ "ccons ::= REFERENCES nm idxlist_opt refargs",
00917  /*  61 */ "ccons ::= defer_subclause",
00918  /*  62 */ "ccons ::= COLLATE id",
00919  /*  63 */ "autoinc ::=",
00920  /*  64 */ "autoinc ::= AUTOINCR",
00921  /*  65 */ "refargs ::=",
00922  /*  66 */ "refargs ::= refargs refarg",
00923  /*  67 */ "refarg ::= MATCH nm",
00924  /*  68 */ "refarg ::= ON DELETE refact",
00925  /*  69 */ "refarg ::= ON UPDATE refact",
00926  /*  70 */ "refarg ::= ON INSERT refact",
00927  /*  71 */ "refact ::= SET NULL",
00928  /*  72 */ "refact ::= SET DEFAULT",
00929  /*  73 */ "refact ::= CASCADE",
00930  /*  74 */ "refact ::= RESTRICT",
00931  /*  75 */ "defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt",
00932  /*  76 */ "defer_subclause ::= DEFERRABLE init_deferred_pred_opt",
00933  /*  77 */ "init_deferred_pred_opt ::=",
00934  /*  78 */ "init_deferred_pred_opt ::= INITIALLY DEFERRED",
00935  /*  79 */ "init_deferred_pred_opt ::= INITIALLY IMMEDIATE",
00936  /*  80 */ "conslist_opt ::=",
00937  /*  81 */ "conslist_opt ::= COMMA conslist",
00938  /*  82 */ "conslist ::= conslist COMMA tcons",
00939  /*  83 */ "conslist ::= conslist tcons",
00940  /*  84 */ "conslist ::= tcons",
00941  /*  85 */ "tcons ::= CONSTRAINT nm",
00942  /*  86 */ "tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf",
00943  /*  87 */ "tcons ::= UNIQUE LP idxlist RP onconf",
00944  /*  88 */ "tcons ::= CHECK LP expr RP onconf",
00945  /*  89 */ "tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt",
00946  /*  90 */ "defer_subclause_opt ::=",
00947  /*  91 */ "defer_subclause_opt ::= defer_subclause",
00948  /*  92 */ "onconf ::=",
00949  /*  93 */ "onconf ::= ON CONFLICT resolvetype",
00950  /*  94 */ "orconf ::=",
00951  /*  95 */ "orconf ::= OR resolvetype",
00952  /*  96 */ "resolvetype ::= raisetype",
00953  /*  97 */ "resolvetype ::= IGNORE",
00954  /*  98 */ "resolvetype ::= REPLACE",
00955  /*  99 */ "cmd ::= DROP TABLE ifexists fullname",
00956  /* 100 */ "ifexists ::= IF EXISTS",
00957  /* 101 */ "ifexists ::=",
00958  /* 102 */ "cmd ::= CREATE temp VIEW nm dbnm AS select",
00959  /* 103 */ "cmd ::= DROP VIEW ifexists fullname",
00960  /* 104 */ "cmd ::= select",
00961  /* 105 */ "select ::= oneselect",
00962  /* 106 */ "select ::= select multiselect_op oneselect",
00963  /* 107 */ "multiselect_op ::= UNION",
00964  /* 108 */ "multiselect_op ::= UNION ALL",
00965  /* 109 */ "multiselect_op ::= EXCEPT|INTERSECT",
00966  /* 110 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt",
00967  /* 111 */ "distinct ::= DISTINCT",
00968  /* 112 */ "distinct ::= ALL",
00969  /* 113 */ "distinct ::=",
00970  /* 114 */ "sclp ::= selcollist COMMA",
00971  /* 115 */ "sclp ::=",
00972  /* 116 */ "selcollist ::= sclp expr as",
00973  /* 117 */ "selcollist ::= sclp STAR",
00974  /* 118 */ "selcollist ::= sclp nm DOT STAR",
00975  /* 119 */ "as ::= AS nm",
00976  /* 120 */ "as ::= ids",
00977  /* 121 */ "as ::=",
00978  /* 122 */ "from ::=",
00979  /* 123 */ "from ::= FROM seltablist",
00980  /* 124 */ "stl_prefix ::= seltablist joinop",
00981  /* 125 */ "stl_prefix ::=",
00982  /* 126 */ "seltablist ::= stl_prefix nm dbnm as on_opt using_opt",
00983  /* 127 */ "seltablist ::= stl_prefix LP seltablist_paren RP as on_opt using_opt",
00984  /* 128 */ "seltablist_paren ::= select",
00985  /* 129 */ "seltablist_paren ::= seltablist",
00986  /* 130 */ "dbnm ::=",
00987  /* 131 */ "dbnm ::= DOT nm",
00988  /* 132 */ "fullname ::= nm dbnm",
00989  /* 133 */ "joinop ::= COMMA|JOIN",
00990  /* 134 */ "joinop ::= JOIN_KW JOIN",
00991  /* 135 */ "joinop ::= JOIN_KW nm JOIN",
00992  /* 136 */ "joinop ::= JOIN_KW nm nm JOIN",
00993  /* 137 */ "on_opt ::= ON expr",
00994  /* 138 */ "on_opt ::=",
00995  /* 139 */ "using_opt ::= USING LP inscollist RP",
00996  /* 140 */ "using_opt ::=",
00997  /* 141 */ "orderby_opt ::=",
00998  /* 142 */ "orderby_opt ::= ORDER BY sortlist",
00999  /* 143 */ "sortlist ::= sortlist COMMA sortitem collate sortorder",
01000  /* 144 */ "sortlist ::= sortitem collate sortorder",
01001  /* 145 */ "sortitem ::= expr",
01002  /* 146 */ "sortorder ::= ASC",
01003  /* 147 */ "sortorder ::= DESC",
01004  /* 148 */ "sortorder ::=",
01005  /* 149 */ "collate ::=",
01006  /* 150 */ "collate ::= COLLATE id",
01007  /* 151 */ "groupby_opt ::=",
01008  /* 152 */ "groupby_opt ::= GROUP BY exprlist",
01009  /* 153 */ "having_opt ::=",
01010  /* 154 */ "having_opt ::= HAVING expr",
01011  /* 155 */ "limit_opt ::=",
01012  /* 156 */ "limit_opt ::= LIMIT expr",
01013  /* 157 */ "limit_opt ::= LIMIT expr OFFSET expr",
01014  /* 158 */ "limit_opt ::= LIMIT expr COMMA expr",
01015  /* 159 */ "cmd ::= DELETE FROM fullname where_opt",
01016  /* 160 */ "where_opt ::=",
01017  /* 161 */ "where_opt ::= WHERE expr",
01018  /* 162 */ "cmd ::= UPDATE orconf fullname SET setlist where_opt",
01019  /* 163 */ "setlist ::= setlist COMMA nm EQ expr",
01020  /* 164 */ "setlist ::= nm EQ expr",
01021  /* 165 */ "cmd ::= insert_cmd INTO fullname inscollist_opt VALUES LP itemlist RP",
01022  /* 166 */ "cmd ::= insert_cmd INTO fullname inscollist_opt select",
01023  /* 167 */ "insert_cmd ::= INSERT orconf",
01024  /* 168 */ "insert_cmd ::= REPLACE",
01025  /* 169 */ "itemlist ::= itemlist COMMA expr",
01026  /* 170 */ "itemlist ::= expr",
01027  /* 171 */ "inscollist_opt ::=",
01028  /* 172 */ "inscollist_opt ::= LP inscollist RP",
01029  /* 173 */ "inscollist ::= inscollist COMMA nm",
01030  /* 174 */ "inscollist ::= nm",
01031  /* 175 */ "expr ::= term",
01032  /* 176 */ "expr ::= LP expr RP",
01033  /* 177 */ "term ::= NULL",
01034  /* 178 */ "expr ::= ID",
01035  /* 179 */ "expr ::= JOIN_KW",
01036  /* 180 */ "expr ::= nm DOT nm",
01037  /* 181 */ "expr ::= nm DOT nm DOT nm",
01038  /* 182 */ "term ::= INTEGER|FLOAT|BLOB",
01039  /* 183 */ "term ::= STRING",
01040  /* 184 */ "expr ::= REGISTER",
01041  /* 185 */ "expr ::= VARIABLE",
01042  /* 186 */ "expr ::= CAST LP expr AS typetoken RP",
01043  /* 187 */ "expr ::= ID LP distinct exprlist RP",
01044  /* 188 */ "expr ::= ID LP STAR RP",
01045  /* 189 */ "term ::= CTIME_KW",
01046  /* 190 */ "expr ::= expr AND expr",
01047  /* 191 */ "expr ::= expr OR expr",
01048  /* 192 */ "expr ::= expr LT|GT|GE|LE expr",
01049  /* 193 */ "expr ::= expr EQ|NE expr",
01050  /* 194 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr",
01051  /* 195 */ "expr ::= expr PLUS|MINUS expr",
01052  /* 196 */ "expr ::= expr STAR|SLASH|REM expr",
01053  /* 197 */ "expr ::= expr CONCAT expr",
01054  /* 198 */ "likeop ::= LIKE_KW",
01055  /* 199 */ "likeop ::= NOT LIKE_KW",
01056  /* 200 */ "escape ::= ESCAPE expr",
01057  /* 201 */ "escape ::=",
01058  /* 202 */ "expr ::= expr likeop expr escape",
01059  /* 203 */ "expr ::= expr ISNULL|NOTNULL",
01060  /* 204 */ "expr ::= expr IS NULL",
01061  /* 205 */ "expr ::= expr NOT NULL",
01062  /* 206 */ "expr ::= expr IS NOT NULL",
01063  /* 207 */ "expr ::= NOT|BITNOT expr",
01064  /* 208 */ "expr ::= MINUS expr",
01065  /* 209 */ "expr ::= PLUS expr",
01066  /* 210 */ "between_op ::= BETWEEN",
01067  /* 211 */ "between_op ::= NOT BETWEEN",
01068  /* 212 */ "expr ::= expr between_op expr AND expr",
01069  /* 213 */ "in_op ::= IN",
01070  /* 214 */ "in_op ::= NOT IN",
01071  /* 215 */ "expr ::= expr in_op LP exprlist RP",
01072  /* 216 */ "expr ::= LP select RP",
01073  /* 217 */ "expr ::= expr in_op LP select RP",
01074  /* 218 */ "expr ::= expr in_op nm dbnm",
01075  /* 219 */ "expr ::= EXISTS LP select RP",
01076  /* 220 */ "expr ::= CASE case_operand case_exprlist case_else END",
01077  /* 221 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr",
01078  /* 222 */ "case_exprlist ::= WHEN expr THEN expr",
01079  /* 223 */ "case_else ::= ELSE expr",
01080  /* 224 */ "case_else ::=",
01081  /* 225 */ "case_operand ::= expr",
01082  /* 226 */ "case_operand ::=",
01083  /* 227 */ "exprlist ::= exprlist COMMA expritem",
01084  /* 228 */ "exprlist ::= expritem",
01085  /* 229 */ "expritem ::= expr",
01086  /* 230 */ "expritem ::=",
01087  /* 231 */ "cmd ::= CREATE uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP",
01088  /* 232 */ "uniqueflag ::= UNIQUE",
01089  /* 233 */ "uniqueflag ::=",
01090  /* 234 */ "idxlist_opt ::=",
01091  /* 235 */ "idxlist_opt ::= LP idxlist RP",
01092  /* 236 */ "idxlist ::= idxlist COMMA idxitem collate sortorder",
01093  /* 237 */ "idxlist ::= idxitem collate sortorder",
01094  /* 238 */ "idxitem ::= nm",
01095  /* 239 */ "cmd ::= DROP INDEX ifexists fullname",
01096  /* 240 */ "cmd ::= VACUUM",
01097  /* 241 */ "cmd ::= VACUUM nm",
01098  /* 242 */ "cmd ::= PRAGMA nm dbnm EQ nm",
01099  /* 243 */ "cmd ::= PRAGMA nm dbnm EQ ON",
01100  /* 244 */ "cmd ::= PRAGMA nm dbnm EQ plus_num",
01101  /* 245 */ "cmd ::= PRAGMA nm dbnm EQ minus_num",
01102  /* 246 */ "cmd ::= PRAGMA nm dbnm LP nm RP",
01103  /* 247 */ "cmd ::= PRAGMA nm dbnm",
01104  /* 248 */ "plus_num ::= plus_opt number",
01105  /* 249 */ "minus_num ::= MINUS number",
01106  /* 250 */ "number ::= INTEGER|FLOAT",
01107  /* 251 */ "plus_opt ::= PLUS",
01108  /* 252 */ "plus_opt ::=",
01109  /* 253 */ "cmd ::= CREATE trigger_decl BEGIN trigger_cmd_list END",
01110  /* 254 */ "trigger_decl ::= temp TRIGGER nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause",
01111  /* 255 */ "trigger_time ::= BEFORE",
01112  /* 256 */ "trigger_time ::= AFTER",
01113  /* 257 */ "trigger_time ::= INSTEAD OF",
01114  /* 258 */ "trigger_time ::=",
01115  /* 259 */ "trigger_event ::= DELETE|INSERT",
01116  /* 260 */ "trigger_event ::= UPDATE",
01117  /* 261 */ "trigger_event ::= UPDATE OF inscollist",
01118  /* 262 */ "foreach_clause ::=",
01119  /* 263 */ "foreach_clause ::= FOR EACH ROW",
01120  /* 264 */ "foreach_clause ::= FOR EACH STATEMENT",
01121  /* 265 */ "when_clause ::=",
01122  /* 266 */ "when_clause ::= WHEN expr",
01123  /* 267 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI",
01124  /* 268 */ "trigger_cmd_list ::=",
01125  /* 269 */ "trigger_cmd ::= UPDATE orconf nm SET setlist where_opt",
01126  /* 270 */ "trigger_cmd ::= insert_cmd INTO nm inscollist_opt VALUES LP itemlist RP",
01127  /* 271 */ "trigger_cmd ::= insert_cmd INTO nm inscollist_opt select",
01128  /* 272 */ "trigger_cmd ::= DELETE FROM nm where_opt",
01129  /* 273 */ "trigger_cmd ::= select",
01130  /* 274 */ "expr ::= RAISE LP IGNORE RP",
01131  /* 275 */ "expr ::= RAISE LP raisetype COMMA nm RP",
01132  /* 276 */ "raisetype ::= ROLLBACK",
01133  /* 277 */ "raisetype ::= ABORT",
01134  /* 278 */ "raisetype ::= FAIL",
01135  /* 279 */ "cmd ::= DROP TRIGGER fullname",
01136  /* 280 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt",
01137  /* 281 */ "key_opt ::=",
01138  /* 282 */ "key_opt ::= KEY expr",
01139  /* 283 */ "database_kw_opt ::= DATABASE",
01140  /* 284 */ "database_kw_opt ::=",
01141  /* 285 */ "cmd ::= DETACH database_kw_opt expr",
01142  /* 286 */ "cmd ::= REINDEX",
01143  /* 287 */ "cmd ::= REINDEX nm dbnm",
01144  /* 288 */ "cmd ::= ANALYZE",
01145  /* 289 */ "cmd ::= ANALYZE nm dbnm",
01146  /* 290 */ "cmd ::= ALTER TABLE fullname RENAME TO nm",
01147  /* 291 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column",
01148  /* 292 */ "add_column_fullname ::= fullname",
01149  /* 293 */ "kwcolumn_opt ::=",
01150  /* 294 */ "kwcolumn_opt ::= COLUMNKW",
01151 };
01152 #endif /* NDEBUG */
01153 
01154 /*
01155 ** This function returns the symbolic name associated with a token
01156 ** value.
01157 */
01158 const char *sqlite3ParserTokenName(int tokenType){
01159 #ifndef NDEBUG
01160   if( tokenType>0 && tokenType<(sizeof(yyTokenName)/sizeof(yyTokenName[0])) ){
01161     return yyTokenName[tokenType];
01162   }else{
01163     return "Unknown";
01164   }
01165 #else
01166   return "";
01167 #endif
01168 }
01169 
01170 /* 
01171 ** This function allocates a new parser.
01172 ** The only argument is a pointer to a function which works like
01173 ** malloc.
01174 **
01175 ** Inputs:
01176 ** A pointer to the function used to allocate memory.
01177 **
01178 ** Outputs:
01179 ** A pointer to a parser.  This pointer is used in subsequent calls
01180 ** to sqlite3Parser and sqlite3ParserFree.
01181 */
01182 void *sqlite3ParserAlloc(void *(*mallocProc)(size_t)){
01183   yyParser *pParser;
01184   pParser = (yyParser*)(*mallocProc)( (size_t)sizeof(yyParser) );
01185   if( pParser ){
01186     pParser->yyidx = -1;
01187   }
01188   return pParser;
01189 }
01190 
01191 /* The following function deletes the value associated with a
01192 ** symbol.  The symbol can be either a terminal or nonterminal.
01193 ** "yymajor" is the symbol code, and "yypminor" is a pointer to
01194 ** the value.
01195 */
01196 static void yy_destructor(YYCODETYPE yymajor, YYMINORTYPE *yypminor){
01197   switch( yymajor ){
01198     /* Here is inserted the actions which take place when a
01199     ** terminal or non-terminal is destroyed.  This can happen
01200     ** when the symbol is popped from the stack during a
01201     ** reduce or during error processing or when a parser is 
01202     ** being destroyed before it is finished parsing.
01203     **
01204     ** Note: during a reduce, the only symbols destroyed are those
01205     ** which appear on the RHS of the rule, but which are not used
01206     ** inside the C code.
01207     */
01208     case 154:
01209     case 188:
01210     case 205:
01211 #line 371 "parse.y"
01212 {sqlite3SelectDelete((yypminor->yy239));}
01213 #line 1215 "parse.c"
01214       break;
01215     case 168:
01216     case 169:
01217     case 193:
01218     case 195:
01219     case 203:
01220     case 209:
01221     case 217:
01222     case 220:
01223     case 222:
01224     case 223:
01225     case 233:
01226 #line 628 "parse.y"
01227 {sqlite3ExprDelete((yypminor->yy178));}
01228 #line 1230 "parse.c"
01229       break;
01230     case 173:
01231     case 181:
01232     case 191:
01233     case 194:
01234     case 196:
01235     case 198:
01236     case 208:
01237     case 211:
01238     case 212:
01239     case 215:
01240     case 221:
01241 #line 859 "parse.y"
01242 {sqlite3ExprListDelete((yypminor->yy462));}
01243 #line 1245 "parse.c"
01244       break;
01245     case 187:
01246     case 192:
01247     case 200:
01248     case 201:
01249 #line 499 "parse.y"
01250 {sqlite3SrcListDelete((yypminor->yy285));}
01251 #line 1253 "parse.c"
01252       break;
01253     case 197:
01254 #line 560 "parse.y"
01255 {
01256   sqlite3ExprDelete((yypminor->yy270).pLimit);
01257   sqlite3ExprDelete((yypminor->yy270).pOffset);
01258 }
01259 #line 1261 "parse.c"
01260       break;
01261     case 204:
01262     case 207:
01263     case 214:
01264 #line 516 "parse.y"
01265 {sqlite3IdListDelete((yypminor->yy160));}
01266 #line 1268 "parse.c"
01267       break;
01268     case 229:
01269     case 234:
01270 #line 953 "parse.y"
01271 {sqlite3DeleteTriggerStep((yypminor->yy247));}
01272 #line 1274 "parse.c"
01273       break;
01274     case 231:
01275 #line 937 "parse.y"
01276 {sqlite3IdListDelete((yypminor->yy132).b);}
01277 #line 1279 "parse.c"
01278       break;
01279     case 236:
01280 #line 1021 "parse.y"
01281 {sqlite3ExprDelete((yypminor->yy292));}
01282 #line 1284 "parse.c"
01283       break;
01284     default:  break;   /* If no destructor action specified: do nothing */
01285   }
01286 }
01287 
01288 /*
01289 ** Pop the parser's stack once.
01290 **
01291 ** If there is a destructor routine associated with the token which
01292 ** is popped from the stack, then call it.
01293 **
01294 ** Return the major token number for the symbol popped.
01295 */
01296 static int yy_pop_parser_stack(yyParser *pParser){
01297   YYCODETYPE yymajor;
01298   yyStackEntry *yytos = &pParser->yystack[pParser->yyidx];
01299 
01300   if( pParser->yyidx<0 ) return 0;
01301 #ifndef NDEBUG
01302   if( yyTraceFILE && pParser->yyidx>=0 ){
01303     fprintf(yyTraceFILE,"%sPopping %s\n",
01304       yyTracePrompt,
01305       yyTokenName[yytos->major]);
01306   }
01307 #endif
01308   yymajor = yytos->major;
01309   yy_destructor( yymajor, &yytos->minor);
01310   pParser->yyidx--;
01311   return yymajor;
01312 }
01313 
01314 /* 
01315 ** Deallocate and destroy a parser.  Destructors are all called for
01316 ** all stack elements before shutting the parser down.
01317 **
01318 ** Inputs:
01319 ** <ul>
01320 ** <li>  A pointer to the parser.  This should be a pointer
01321 **       obtained from sqlite3ParserAlloc.
01322 ** <li>  A pointer to a function used to reclaim memory obtained
01323 **       from malloc.
01324 ** </ul>
01325 */
01326 void sqlite3ParserFree(
01327   void *p,                    /* The parser to be deleted */
01328   void (*freeProc)(void*)     /* Function used to reclaim memory */
01329 ){
01330   yyParser *pParser = (yyParser*)p;
01331   if( pParser==0 ) return;
01332   while( pParser->yyidx>=0 ) yy_pop_parser_stack(pParser);
01333   (*freeProc)((void*)pParser);
01334 }
01335 
01336 /*
01337 ** Find the appropriate action for a parser given the terminal
01338 ** look-ahead token iLookAhead.
01339 **
01340 ** If the look-ahead token is YYNOCODE, then check to see if the action is
01341 ** independent of the look-ahead.  If it is, return the action, otherwise
01342 ** return YY_NO_ACTION.
01343 */
01344 static int yy_find_shift_action(
01345   yyParser *pParser,        /* The parser */
01346   int iLookAhead            /* The look-ahead token */
01347 ){
01348   int i;
01349   int stateno = pParser->yystack[pParser->yyidx].stateno;
01350  
01351   if( stateno>YY_SHIFT_MAX || (i = yy_shift_ofst[stateno])==YY_SHIFT_USE_DFLT ){
01352     return yy_default[stateno];
01353   }
01354   if( iLookAhead==YYNOCODE ){
01355     return YY_NO_ACTION;
01356   }
01357   i += iLookAhead;
01358   if( i<0 || i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
01359 #ifdef YYFALLBACK
01360     int iFallback;            /* Fallback token */
01361     if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
01362            && (iFallback = yyFallback[iLookAhead])!=0 ){
01363 #ifndef NDEBUG
01364       if( yyTraceFILE ){
01365         fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
01366            yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
01367       }
01368 #endif
01369       return yy_find_shift_action(pParser, iFallback);
01370     }
01371 #endif
01372     return yy_default[stateno];
01373   }else{
01374     return yy_action[i];
01375   }
01376 }
01377 
01378 /*
01379 ** Find the appropriate action for a parser given the non-terminal
01380 ** look-ahead token iLookAhead.
01381 **
01382 ** If the look-ahead token is YYNOCODE, then check to see if the action is
01383 ** independent of the look-ahead.  If it is, return the action, otherwise
01384 ** return YY_NO_ACTION.
01385 */
01386 static int yy_find_reduce_action(
01387   int stateno,              /* Current state number */
01388   int iLookAhead            /* The look-ahead token */
01389 ){
01390   int i;
01391   /* int stateno = pParser->yystack[pParser->yyidx].stateno; */
01392  
01393   if( stateno>YY_REDUCE_MAX ||
01394       (i = yy_reduce_ofst[stateno])==YY_REDUCE_USE_DFLT ){
01395     return yy_default[stateno];
01396   }
01397   if( iLookAhead==YYNOCODE ){
01398     return YY_NO_ACTION;
01399   }
01400   i += iLookAhead;
01401   if( i<0 || i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
01402     return yy_default[stateno];
01403   }else{
01404     return yy_action[i];
01405   }
01406 }
01407 
01408 /*
01409 ** Perform a shift action.
01410 */
01411 static void yy_shift(
01412   yyParser *yypParser,          /* The parser to be shifted */
01413   int yyNewState,               /* The new state to shift in */
01414   int yyMajor,                  /* The major token to shift in */
01415   YYMINORTYPE *yypMinor         /* Pointer ot the minor token to shift in */
01416 ){
01417   yyStackEntry *yytos;
01418   yypParser->yyidx++;
01419   if( yypParser->yyidx>=YYSTACKDEPTH ){
01420      sqlite3ParserARG_FETCH;
01421      yypParser->yyidx--;
01422 #ifndef NDEBUG
01423      if( yyTraceFILE ){
01424        fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
01425      }
01426 #endif
01427      while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
01428      /* Here code is inserted which will execute if the parser
01429      ** stack every overflows */
01430 #line 43 "parse.y"
01431 
01432   sqlite3ErrorMsg(pParse, "parser stack overflow");
01433 #line 1436 "parse.c"
01434      sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument var */
01435      return;
01436   }
01437   yytos = &yypParser->yystack[yypParser->yyidx];
01438   yytos->stateno = yyNewState;
01439   yytos->major = yyMajor;
01440   yytos->minor = *yypMinor;
01441 #ifndef NDEBUG
01442   if( yyTraceFILE && yypParser->yyidx>0 ){
01443     int i;
01444     fprintf(yyTraceFILE,"%sShift %d\n",yyTracePrompt,yyNewState);
01445     fprintf(yyTraceFILE,"%sStack:",yyTracePrompt);
01446     for(i=1; i<=yypParser->yyidx; i++)
01447       fprintf(yyTraceFILE," %s",yyTokenName[yypParser->yystack[i].major]);
01448     fprintf(yyTraceFILE,"\n");
01449   }
01450 #endif
01451 }
01452 
01453 /* The following table contains information about every rule that
01454 ** is used during the reduce.
01455 */
01456 static const struct {
01457   YYCODETYPE lhs;         /* Symbol on the left-hand side of the rule */
01458   unsigned char nrhs;     /* Number of right-hand side symbols in the rule */
01459 } yyRuleInfo[] = {
01460   { 138, 1 },
01461   { 139, 2 },
01462   { 139, 1 },
01463   { 141, 1 },
01464   { 140, 1 },
01465   { 140, 3 },
01466   { 143, 0 },
01467   { 143, 1 },
01468   { 143, 3 },
01469   { 142, 3 },
01470   { 145, 0 },
01471   { 145, 1 },
01472   { 145, 2 },
01473   { 144, 0 },
01474   { 144, 1 },
01475   { 144, 1 },
01476   { 144, 1 },
01477   { 142, 2 },
01478   { 142, 2 },
01479   { 142, 2 },
01480   { 142, 2 },
01481   { 147, 6 },
01482   { 150, 0 },
01483   { 150, 3 },
01484   { 149, 1 },
01485   { 149, 0 },
01486   { 148, 4 },
01487   { 148, 2 },
01488   { 152, 3 },
01489   { 152, 1 },
01490   { 155, 3 },
01491   { 156, 1 },
01492   { 159, 1 },
01493   { 160, 1 },
01494   { 146, 1 },
01495   { 146, 1 },
01496   { 146, 1 },
01497   { 157, 0 },
01498   { 157, 1 },
01499   { 161, 1 },
01500   { 161, 4 },
01501   { 161, 6 },
01502   { 162, 1 },
01503   { 162, 2 },
01504   { 163, 1 },
01505   { 163, 1 },
01506   { 158, 2 },
01507   { 158, 0 },
01508   { 166, 3 },
01509   { 166, 1 },
01510   { 166, 2 },
01511   { 166, 4 },
01512   { 166, 3 },
01513   { 166, 3 },
01514   { 166, 2 },
01515   { 167, 2 },
01516   { 167, 3 },
01517   { 167, 5 },
01518   { 167, 2 },
01519   { 167, 4 },
01520   { 167, 4 },
01521   { 167, 1 },
01522   { 167, 2 },
01523   { 172, 0 },
01524   { 172, 1 },
01525   { 174, 0 },
01526   { 174, 2 },
01527   { 176, 2 },
01528   { 176, 3 },
01529   { 176, 3 },
01530   { 176, 3 },
01531   { 177, 2 },
01532   { 177, 2 },
01533   { 177, 1 },
01534   { 177, 1 },
01535   { 175, 3 },
01536   { 175, 2 },
01537   { 178, 0 },
01538   { 178, 2 },
01539   { 178, 2 },
01540   { 153, 0 },
01541   { 153, 2 },
01542   { 179, 3 },
01543   { 179, 2 },
01544   { 179, 1 },
01545   { 180, 2 },
01546   { 180, 7 },
01547   { 180, 5 },
01548   { 180, 5 },
01549   { 180, 10 },
01550   { 182, 0 },
01551   { 182, 1 },
01552   { 170, 0 },
01553   { 170, 3 },
01554   { 183, 0 },
01555   { 183, 2 },
01556   { 184, 1 },
01557   { 184, 1 },
01558   { 184, 1 },
01559   { 142, 4 },
01560   { 186, 2 },
01561   { 186, 0 },
01562   { 142, 7 },
01563   { 142, 4 },
01564   { 142, 1 },
01565   { 154, 1 },
01566   { 154, 3 },
01567   { 189, 1 },
01568   { 189, 2 },
01569   { 189, 1 },
01570   { 188, 9 },
01571   { 190, 1 },
01572   { 190, 1 },
01573   { 190, 0 },
01574   { 198, 2 },
01575   { 198, 0 },
01576   { 191, 3 },
01577   { 191, 2 },
01578   { 191, 4 },
01579   { 199, 2 },
01580   { 199, 1 },
01581   { 199, 0 },
01582   { 192, 0 },
01583   { 192, 2 },
01584   { 201, 2 },
01585   { 201, 0 },
01586   { 200, 6 },
01587   { 200, 7 },
01588   { 205, 1 },
01589   { 205, 1 },
01590   { 151, 0 },
01591   { 151, 2 },
01592   { 187, 2 },
01593   { 202, 1 },
01594   { 202, 2 },
01595   { 202, 3 },
01596   { 202, 4 },
01597   { 203, 2 },
01598   { 203, 0 },
01599   { 204, 4 },
01600   { 204, 0 },
01601   { 196, 0 },
01602   { 196, 3 },
01603   { 208, 5 },
01604   { 208, 3 },
01605   { 209, 1 },
01606   { 171, 1 },
01607   { 171, 1 },
01608   { 171, 0 },
01609   { 210, 0 },
01610   { 210, 2 },
01611   { 194, 0 },
01612   { 194, 3 },
01613   { 195, 0 },
01614   { 195, 2 },
01615   { 197, 0 },
01616   { 197, 2 },
01617   { 197, 4 },
01618   { 197, 4 },
01619   { 142, 4 },
01620   { 193, 0 },
01621   { 193, 2 },
01622   { 142, 6 },
01623   { 212, 5 },
01624   { 212, 3 },
01625   { 142, 8 },
01626   { 142, 5 },
01627   { 213, 2 },
01628   { 213, 1 },
01629   { 215, 3 },
01630   { 215, 1 },
01631   { 214, 0 },
01632   { 214, 3 },
01633   { 207, 3 },
01634   { 207, 1 },
01635   { 169, 1 },
01636   { 169, 3 },
01637   { 168, 1 },
01638   { 169, 1 },
01639   { 169, 1 },
01640   { 169, 3 },
01641   { 169, 5 },
01642   { 168, 1 },
01643   { 168, 1 },
01644   { 169, 1 },
01645   { 169, 1 },
01646   { 169, 6 },
01647   { 169, 5 },
01648   { 169, 4 },
01649   { 168, 1 },
01650   { 169, 3 },
01651   { 169, 3 },
01652   { 169, 3 },
01653   { 169, 3 },
01654   { 169, 3 },
01655   { 169, 3 },
01656   { 169, 3 },
01657   { 169, 3 },
01658   { 216, 1 },
01659   { 216, 2 },
01660   { 217, 2 },
01661   { 217, 0 },
01662   { 169, 4 },
01663   { 169, 2 },
01664   { 169, 3 },
01665   { 169, 3 },
01666   { 169, 4 },
01667   { 169, 2 },
01668   { 169, 2 },
01669   { 169, 2 },
01670   { 218, 1 },
01671   { 218, 2 },
01672   { 169, 5 },
01673   { 219, 1 },
01674   { 219, 2 },
01675   { 169, 5 },
01676   { 169, 3 },
01677   { 169, 5 },
01678   { 169, 4 },
01679   { 169, 4 },
01680   { 169, 5 },
01681   { 221, 5 },
01682   { 221, 4 },
01683   { 222, 2 },
01684   { 222, 0 },
01685   { 220, 1 },
01686   { 220, 0 },
01687   { 211, 3 },
01688   { 211, 1 },
01689   { 223, 1 },
01690   { 223, 0 },
01691   { 142, 11 },
01692   { 224, 1 },
01693   { 224, 0 },
01694   { 173, 0 },
01695   { 173, 3 },
01696   { 181, 5 },
01697   { 181, 3 },
01698   { 225, 1 },
01699   { 142, 4 },
01700   { 142, 1 },
01701   { 142, 2 },
01702   { 142, 5 },
01703   { 142, 5 },
01704   { 142, 5 },
01705   { 142, 5 },
01706   { 142, 6 },
01707   { 142, 3 },
01708   { 164, 2 },
01709   { 165, 2 },
01710   { 227, 1 },
01711   { 226, 1 },
01712   { 226, 0 },
01713   { 142, 5 },
01714   { 228, 10 },
01715   { 230, 1 },
01716   { 230, 1 },
01717   { 230, 2 },
01718   { 230, 0 },
01719   { 231, 1 },
01720   { 231, 1 },
01721   { 231, 3 },
01722   { 232, 0 },
01723   { 232, 3 },
01724   { 232, 3 },
01725   { 233, 0 },
01726   { 233, 2 },
01727   { 229, 3 },
01728   { 229, 0 },
01729   { 234, 6 },
01730   { 234, 8 },
01731   { 234, 5 },
01732   { 234, 4 },
01733   { 234, 1 },
01734   { 169, 4 },
01735   { 169, 6 },
01736   { 185, 1 },
01737   { 185, 1 },
01738   { 185, 1 },
01739   { 142, 3 },
01740   { 142, 6 },
01741   { 236, 0 },
01742   { 236, 2 },
01743   { 235, 1 },
01744   { 235, 0 },
01745   { 142, 3 },
01746   { 142, 1 },
01747   { 142, 3 },
01748   { 142, 1 },
01749   { 142, 3 },
01750   { 142, 6 },
01751   { 142, 6 },
01752   { 237, 1 },
01753   { 238, 0 },
01754   { 238, 1 },
01755 };
01756 
01757 static void yy_accept(yyParser*);  /* Forward Declaration */
01758 
01759 /*
01760 ** Perform a reduce action and the shift that must immediately
01761 ** follow the reduce.
01762 */
01763 static void yy_reduce(
01764   yyParser *yypParser,         /* The parser */
01765   int yyruleno                 /* Number of the rule by which to reduce */
01766 ){
01767   int yygoto;                     /* The next state */
01768   int yyact;                      /* The next action */
01769   YYMINORTYPE yygotominor;        /* The LHS of the rule reduced */
01770   yyStackEntry *yymsp;            /* The top of the parser's stack */
01771   int yysize;                     /* Amount to pop the stack */
01772   sqlite3ParserARG_FETCH;
01773   yymsp = &yypParser->yystack[yypParser->yyidx];
01774 #ifndef NDEBUG
01775   if( yyTraceFILE && yyruleno>=0 
01776         && yyruleno<sizeof(yyRuleName)/sizeof(yyRuleName[0]) ){
01777     fprintf(yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt,
01778       yyRuleName[yyruleno]);
01779   }
01780 #endif /* NDEBUG */
01781 
01782 #ifndef NDEBUG
01783   /* Silence complaints from purify about yygotominor being uninitialized
01784   ** in some cases when it is copied into the stack after the following
01785   ** switch.  yygotominor is uninitialized when a rule reduces that does
01786   ** not set the value of its left-hand side nonterminal.  Leaving the
01787   ** value of the nonterminal uninitialized is utterly harmless as long
01788   ** as the value is never used.  So really the only thing this code
01789   ** accomplishes is to quieten purify.  
01790   */
01791   memset(&yygotominor, 0, sizeof(yygotominor));
01792 #endif
01793 
01794   switch( yyruleno ){
01795   /* Beginning here are the reduction cases.  A typical example
01796   ** follows:
01797   **   case 0:
01798   **  #line <lineno> <grammarfile>
01799   **     { ... }           // User supplied code
01800   **  #line <lineno> <thisfile>
01801   **     break;
01802   */
01803       case 3:
01804 #line 98 "parse.y"
01805 { sqlite3FinishCoding(pParse); }
01806 #line 1809 "parse.c"
01807         break;
01808       case 6:
01809 #line 101 "parse.y"
01810 { sqlite3BeginParse(pParse, 0); }
01811 #line 1814 "parse.c"
01812         break;
01813       case 7:
01814 #line 103 "parse.y"
01815 { sqlite3BeginParse(pParse, 1); }
01816 #line 1819 "parse.c"
01817         break;
01818       case 8:
01819 #line 104 "parse.y"
01820 { sqlite3BeginParse(pParse, 2); }
01821 #line 1824 "parse.c"
01822         break;
01823       case 9:
01824 #line 110 "parse.y"
01825 {sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy230);}
01826 #line 1829 "parse.c"
01827         break;
01828       case 13:
01829 #line 115 "parse.y"
01830 {yygotominor.yy230 = TK_DEFERRED;}
01831 #line 1834 "parse.c"
01832         break;
01833       case 14:
01834       case 15:
01835       case 16:
01836       case 107:
01837       case 109:
01838 #line 116 "parse.y"
01839 {yygotominor.yy230 = yymsp[0].major;}
01840 #line 1843 "parse.c"
01841         break;
01842       case 17:
01843       case 18:
01844 #line 119 "parse.y"
01845 {sqlite3CommitTransaction(pParse);}
01846 #line 1849 "parse.c"
01847         break;
01848       case 19:
01849 #line 121 "parse.y"
01850 {sqlite3RollbackTransaction(pParse);}
01851 #line 1854 "parse.c"
01852         break;
01853       case 21:
01854 #line 126 "parse.y"
01855 {
01856    sqlite3StartTable(pParse,&yymsp[-1].minor.yy384,&yymsp[0].minor.yy384,yymsp[-4].minor.yy230,0,yymsp[-2].minor.yy230);
01857 }
01858 #line 1861 "parse.c"
01859         break;
01860       case 22:
01861       case 25:
01862       case 63:
01863       case 77:
01864       case 79:
01865       case 90:
01866       case 101:
01867       case 112:
01868       case 113:
01869       case 210:
01870       case 213:
01871 #line 130 "parse.y"
01872 {yygotominor.yy230 = 0;}
01873 #line 1876 "parse.c"
01874         break;
01875       case 23:
01876       case 24:
01877       case 64:
01878       case 78:
01879       case 100:
01880       case 111:
01881       case 211:
01882       case 214:
01883 #line 131 "parse.y"
01884 {yygotominor.yy230 = 1;}
01885 #line 1888 "parse.c"
01886         break;
01887       case 26:
01888 #line 137 "parse.y"
01889 {
01890   sqlite3EndTable(pParse,&yymsp[-1].minor.yy384,&yymsp[0].minor.yy0,0);
01891 }
01892 #line 1895 "parse.c"
01893         break;
01894       case 27:
01895 #line 140 "parse.y"
01896 {
01897   sqlite3EndTable(pParse,0,0,yymsp[0].minor.yy239);
01898   sqlite3SelectDelete(yymsp[0].minor.yy239);
01899 }
01900 #line 1903 "parse.c"
01901         break;
01902       case 30:
01903 #line 152 "parse.y"
01904 {
01905   yygotominor.yy384.z = yymsp[-2].minor.yy384.z;
01906   yygotominor.yy384.n = (pParse->sLastToken.z-yymsp[-2].minor.yy384.z) + pParse->sLastToken.n;
01907 }
01908 #line 1911 "parse.c"
01909         break;
01910       case 31:
01911 #line 156 "parse.y"
01912 {
01913   sqlite3AddColumn(pParse,&yymsp[0].minor.yy384);
01914   yygotominor.yy384 = yymsp[0].minor.yy384;
01915 }
01916 #line 1919 "parse.c"
01917         break;
01918       case 32:
01919       case 33:
01920       case 34:
01921       case 35:
01922       case 36:
01923       case 250:
01924 #line 166 "parse.y"
01925 {yygotominor.yy384 = yymsp[0].minor.yy0;}
01926 #line 1929 "parse.c"
01927         break;
01928       case 38:
01929 #line 225 "parse.y"
01930 {sqlite3AddColumnType(pParse,&yymsp[0].minor.yy384);}
01931 #line 1934 "parse.c"
01932         break;
01933       case 39:
01934       case 42:
01935       case 119:
01936       case 120:
01937       case 131:
01938       case 150:
01939       case 238:
01940       case 248:
01941       case 249:
01942 #line 226 "parse.y"
01943 {yygotominor.yy384 = yymsp[0].minor.yy384;}
01944 #line 1947 "parse.c"
01945         break;
01946       case 40:
01947 #line 227 "parse.y"
01948 {
01949   yygotominor.yy384.z = yymsp[-3].minor.yy384.z;
01950   yygotominor.yy384.n = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy384.z;
01951 }
01952 #line 1955 "parse.c"
01953         break;
01954       case 41:
01955 #line 231 "parse.y"
01956 {
01957   yygotominor.yy384.z = yymsp[-5].minor.yy384.z;
01958   yygotominor.yy384.n = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy384.z;
01959 }
01960 #line 1963 "parse.c"
01961         break;
01962       case 43:
01963 #line 237 "parse.y"
01964 {yygotominor.yy384.z=yymsp[-1].minor.yy384.z; yygotominor.yy384.n=yymsp[0].minor.yy384.n+(yymsp[0].minor.yy384.z-yymsp[-1].minor.yy384.z);}
01965 #line 1968 "parse.c"
01966         break;
01967       case 44:
01968 #line 239 "parse.y"
01969 { yygotominor.yy230 = atoi((char*)yymsp[0].minor.yy384.z); }
01970 #line 1973 "parse.c"
01971         break;
01972       case 45:
01973 #line 240 "parse.y"
01974 { yygotominor.yy230 = -atoi((char*)yymsp[0].minor.yy384.z); }
01975 #line 1978 "parse.c"
01976         break;
01977       case 50:
01978       case 52:
01979 #line 249 "parse.y"
01980 {sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy178);}
01981 #line 1984 "parse.c"
01982         break;
01983       case 51:
01984 #line 250 "parse.y"
01985 {sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy178);}
01986 #line 1989 "parse.c"
01987         break;
01988       case 53:
01989 #line 252 "parse.y"
01990 {
01991   Expr *p = sqlite3Expr(TK_UMINUS, yymsp[0].minor.yy178, 0, 0);
01992   sqlite3AddDefaultValue(pParse,p);
01993 }
01994 #line 1997 "parse.c"
01995         break;
01996       case 54:
01997 #line 256 "parse.y"
01998 {
01999   Expr *p = sqlite3Expr(TK_STRING, 0, 0, &yymsp[0].minor.yy384);
02000   sqlite3AddDefaultValue(pParse,p);
02001 }
02002 #line 2005 "parse.c"
02003         break;
02004       case 56:
02005 #line 265 "parse.y"
02006 {sqlite3AddNotNull(pParse, yymsp[0].minor.yy230);}
02007 #line 2010 "parse.c"
02008         break;
02009       case 57:
02010 #line 267 "parse.y"
02011 {sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy230,yymsp[0].minor.yy230,yymsp[-2].minor.yy230);}
02012 #line 2015 "parse.c"
02013         break;
02014       case 58:
02015 #line 268 "parse.y"
02016 {sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy230,0,0,0,0);}
02017 #line 2020 "parse.c"
02018         break;
02019       case 59:
02020 #line 269 "parse.y"
02021 {sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy178);}
02022 #line 2025 "parse.c"
02023         break;
02024       case 60:
02025 #line 271 "parse.y"
02026 {sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy384,yymsp[-1].minor.yy462,yymsp[0].minor.yy230);}
02027 #line 2030 "parse.c"
02028         break;
02029       case 61:
02030 #line 272 "parse.y"
02031 {sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy230);}
02032 #line 2035 "parse.c"
02033         break;
02034       case 62:
02035 #line 273 "parse.y"
02036 {sqlite3AddCollateType(pParse, (char*)yymsp[0].minor.yy384.z, yymsp[0].minor.yy384.n);}
02037 #line 2040 "parse.c"
02038         break;
02039       case 65:
02040 #line 286 "parse.y"
02041 { yygotominor.yy230 = OE_Restrict * 0x010101; }
02042 #line 2045 "parse.c"
02043         break;
02044       case 66:
02045 #line 287 "parse.y"
02046 { yygotominor.yy230 = (yymsp[-1].minor.yy230 & yymsp[0].minor.yy13.mask) | yymsp[0].minor.yy13.value; }
02047 #line 2050 "parse.c"
02048         break;
02049       case 67:
02050 #line 289 "parse.y"
02051 { yygotominor.yy13.value = 0;     yygotominor.yy13.mask = 0x000000; }
02052 #line 2055 "parse.c"
02053         break;
02054       case 68:
02055 #line 290 "parse.y"
02056 { yygotominor.yy13.value = yymsp[0].minor.yy230;     yygotominor.yy13.mask = 0x0000ff; }
02057 #line 2060 "parse.c"
02058         break;
02059       case 69:
02060 #line 291 "parse.y"
02061 { yygotominor.yy13.value = yymsp[0].minor.yy230<<8;  yygotominor.yy13.mask = 0x00ff00; }
02062 #line 2065 "parse.c"
02063         break;
02064       case 70:
02065 #line 292 "parse.y"
02066 { yygotominor.yy13.value = yymsp[0].minor.yy230<<16; yygotominor.yy13.mask = 0xff0000; }
02067 #line 2070 "parse.c"
02068         break;
02069       case 71:
02070 #line 294 "parse.y"
02071 { yygotominor.yy230 = OE_SetNull; }
02072 #line 2075 "parse.c"
02073         break;
02074       case 72:
02075 #line 295 "parse.y"
02076 { yygotominor.yy230 = OE_SetDflt; }
02077 #line 2080 "parse.c"
02078         break;
02079       case 73:
02080 #line 296 "parse.y"
02081 { yygotominor.yy230 = OE_Cascade; }
02082 #line 2085 "parse.c"
02083         break;
02084       case 74:
02085 #line 297 "parse.y"
02086 { yygotominor.yy230 = OE_Restrict; }
02087 #line 2090 "parse.c"
02088         break;
02089       case 75:
02090       case 76:
02091       case 91:
02092       case 93:
02093       case 95:
02094       case 96:
02095       case 167:
02096 #line 299 "parse.y"
02097 {yygotominor.yy230 = yymsp[0].minor.yy230;}
02098 #line 2101 "parse.c"
02099         break;
02100       case 80:
02101 #line 309 "parse.y"
02102 {yygotominor.yy384.n = 0; yygotominor.yy384.z = 0;}
02103 #line 2106 "parse.c"
02104         break;
02105       case 81:
02106 #line 310 "parse.y"
02107 {yygotominor.yy384 = yymsp[-1].minor.yy0;}
02108 #line 2111 "parse.c"
02109         break;
02110       case 86:
02111 #line 316 "parse.y"
02112 {sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy462,yymsp[0].minor.yy230,yymsp[-2].minor.yy230,0);}
02113 #line 2116 "parse.c"
02114         break;
02115       case 87:
02116 #line 318 "parse.y"
02117 {sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy462,yymsp[0].minor.yy230,0,0,0,0);}
02118 #line 2121 "parse.c"
02119         break;
02120       case 88:
02121 #line 319 "parse.y"
02122 {sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy178);}
02123 #line 2126 "parse.c"
02124         break;
02125       case 89:
02126 #line 321 "parse.y"
02127 {
02128     sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy462, &yymsp[-3].minor.yy384, yymsp[-2].minor.yy462, yymsp[-1].minor.yy230);
02129     sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy230);
02130 }
02131 #line 2134 "parse.c"
02132         break;
02133       case 92:
02134       case 94:
02135 #line 335 "parse.y"
02136 {yygotominor.yy230 = OE_Default;}
02137 #line 2140 "parse.c"
02138         break;
02139       case 97:
02140 #line 340 "parse.y"
02141 {yygotominor.yy230 = OE_Ignore;}
02142 #line 2145 "parse.c"
02143         break;
02144       case 98:
02145       case 168:
02146 #line 341 "parse.y"
02147 {yygotominor.yy230 = OE_Replace;}
02148 #line 2151 "parse.c"
02149         break;
02150       case 99:
02151 #line 345 "parse.y"
02152 {
02153   sqlite3DropTable(pParse, yymsp[0].minor.yy285, 0, yymsp[-1].minor.yy230);
02154 }
02155 #line 2158 "parse.c"
02156         break;
02157       case 102:
02158 #line 355 "parse.y"
02159 {
02160   sqlite3CreateView(pParse, &yymsp[-6].minor.yy0, &yymsp[-3].minor.yy384, &yymsp[-2].minor.yy384, yymsp[0].minor.yy239, yymsp[-5].minor.yy230);
02161 }
02162 #line 2165 "parse.c"
02163         break;
02164       case 103:
02165 #line 358 "parse.y"
02166 {
02167   sqlite3DropTable(pParse, yymsp[0].minor.yy285, 1, yymsp[-1].minor.yy230);
02168 }
02169 #line 2172 "parse.c"
02170         break;
02171       case 104:
02172 #line 365 "parse.y"
02173 {
02174   sqlite3Select(pParse, yymsp[0].minor.yy239, SRT_Callback, 0, 0, 0, 0, 0);
02175   sqlite3SelectDelete(yymsp[0].minor.yy239);
02176 }
02177 #line 2180 "parse.c"
02178         break;
02179       case 105:
02180       case 128:
02181 #line 375 "parse.y"
02182 {yygotominor.yy239 = yymsp[0].minor.yy239;}
02183 #line 2186 "parse.c"
02184         break;
02185       case 106:
02186 #line 377 "parse.y"
02187 {
02188   if( yymsp[0].minor.yy239 ){
02189     yymsp[0].minor.yy239->op = yymsp[-1].minor.yy230;
02190     yymsp[0].minor.yy239->pPrior = yymsp[-2].minor.yy239;
02191   }
02192   yygotominor.yy239 = yymsp[0].minor.yy239;
02193 }
02194 #line 2197 "parse.c"
02195         break;
02196       case 108:
02197 #line 386 "parse.y"
02198 {yygotominor.yy230 = TK_ALL;}
02199 #line 2202 "parse.c"
02200         break;
02201       case 110:
02202 #line 390 "parse.y"
02203 {
02204   yygotominor.yy239 = sqlite3SelectNew(yymsp[-6].minor.yy462,yymsp[-5].minor.yy285,yymsp[-4].minor.yy178,yymsp[-3].minor.yy462,yymsp[-2].minor.yy178,yymsp[-1].minor.yy462,yymsp[-7].minor.yy230,yymsp[0].minor.yy270.pLimit,yymsp[0].minor.yy270.pOffset);
02205 }
02206 #line 2209 "parse.c"
02207         break;
02208       case 114:
02209       case 235:
02210 #line 411 "parse.y"
02211 {yygotominor.yy462 = yymsp[-1].minor.yy462;}
02212 #line 2215 "parse.c"
02213         break;
02214       case 115:
02215       case 141:
02216       case 151:
02217       case 234:
02218 #line 412 "parse.y"
02219 {yygotominor.yy462 = 0;}
02220 #line 2223 "parse.c"
02221         break;
02222       case 116:
02223 #line 413 "parse.y"
02224 {
02225    yygotominor.yy462 = sqlite3ExprListAppend(yymsp[-2].minor.yy462,yymsp[-1].minor.yy178,yymsp[0].minor.yy384.n?&yymsp[0].minor.yy384:0);
02226 }
02227 #line 2230 "parse.c"
02228         break;
02229       case 117:
02230 #line 416 "parse.y"
02231 {
02232   yygotominor.yy462 = sqlite3ExprListAppend(yymsp[-1].minor.yy462, sqlite3Expr(TK_ALL, 0, 0, 0), 0);
02233 }
02234 #line 2237 "parse.c"
02235         break;
02236       case 118:
02237 #line 419 "parse.y"
02238 {
02239   Expr *pRight = sqlite3Expr(TK_ALL, 0, 0, 0);
02240   Expr *pLeft = sqlite3Expr(TK_ID, 0, 0, &yymsp[-2].minor.yy384);
02241   yygotominor.yy462 = sqlite3ExprListAppend(yymsp[-3].minor.yy462, sqlite3Expr(TK_DOT, pLeft, pRight, 0), 0);
02242 }
02243 #line 2246 "parse.c"
02244         break;
02245       case 121:
02246 #line 431 "parse.y"
02247 {yygotominor.yy384.n = 0;}
02248 #line 2251 "parse.c"
02249         break;
02250       case 122:
02251 #line 443 "parse.y"
02252 {yygotominor.yy285 = sqliteMalloc(sizeof(*yygotominor.yy285));}
02253 #line 2256 "parse.c"
02254         break;
02255       case 123:
02256 #line 444 "parse.y"
02257 {yygotominor.yy285 = yymsp[0].minor.yy285;}
02258 #line 2261 "parse.c"
02259         break;
02260       case 124:
02261 #line 449 "parse.y"
02262 {
02263    yygotominor.yy285 = yymsp[-1].minor.yy285;
02264    if( yygotominor.yy285 && yygotominor.yy285->nSrc>0 ) yygotominor.yy285->a[yygotominor.yy285->nSrc-1].jointype = yymsp[0].minor.yy230;
02265 }
02266 #line 2269 "parse.c"
02267         break;
02268       case 125:
02269 #line 453 "parse.y"
02270 {yygotominor.yy285 = 0;}
02271 #line 2274 "parse.c"
02272         break;
02273       case 126:
02274 #line 454 "parse.y"
02275 {
02276   yygotominor.yy285 = sqlite3SrcListAppend(yymsp[-5].minor.yy285,&yymsp[-4].minor.yy384,&yymsp[-3].minor.yy384);
02277   if( yymsp[-2].minor.yy384.n ) sqlite3SrcListAddAlias(yygotominor.yy285,&yymsp[-2].minor.yy384);
02278   if( yymsp[-1].minor.yy178 ){
02279     if( yygotominor.yy285 && yygotominor.yy285->nSrc>1 ){ yygotominor.yy285->a[yygotominor.yy285->nSrc-2].pOn = yymsp[-1].minor.yy178; }
02280     else { sqlite3ExprDelete(yymsp[-1].minor.yy178); }
02281   }
02282   if( yymsp[0].minor.yy160 ){
02283     if( yygotominor.yy285 && yygotominor.yy285->nSrc>1 ){ yygotominor.yy285->a[yygotominor.yy285->nSrc-2].pUsing = yymsp[0].minor.yy160; }
02284     else { sqlite3IdListDelete(yymsp[0].minor.yy160); }
02285   }
02286 }
02287 #line 2290 "parse.c"
02288         break;
02289       case 127:
02290 #line 468 "parse.y"
02291 {
02292     yygotominor.yy285 = sqlite3SrcListAppend(yymsp[-6].minor.yy285,0,0);
02293     yygotominor.yy285->a[yygotominor.yy285->nSrc-1].pSelect = yymsp[-4].minor.yy239;
02294     if( yymsp[-2].minor.yy384.n ) sqlite3SrcListAddAlias(yygotominor.yy285,&yymsp[-2].minor.yy384);
02295     if( yymsp[-1].minor.yy178 ){
02296       if( yygotominor.yy285 && yygotominor.yy285->nSrc>1 ){ yygotominor.yy285->a[yygotominor.yy285->nSrc-2].pOn = yymsp[-1].minor.yy178; }
02297       else { sqlite3ExprDelete(yymsp[-1].minor.yy178); }
02298     }
02299     if( yymsp[0].minor.yy160 ){
02300       if( yygotominor.yy285 && yygotominor.yy285->nSrc>1 ){ yygotominor.yy285->a[yygotominor.yy285->nSrc-2].pUsing = yymsp[0].minor.yy160; }
02301       else { sqlite3IdListDelete(yymsp[0].minor.yy160); }
02302     }
02303   }
02304 #line 2307 "parse.c"
02305         break;
02306       case 129:
02307 #line 489 "parse.y"
02308 {
02309      yygotominor.yy239 = sqlite3SelectNew(0,yymsp[0].minor.yy285,0,0,0,0,0,0,0);
02310   }
02311 #line 2314 "parse.c"
02312         break;
02313       case 130:
02314 #line 495 "parse.y"
02315 {yygotominor.yy384.z=0; yygotominor.yy384.n=0;}
02316 #line 2319 "parse.c"
02317         break;
02318       case 132:
02319 #line 500 "parse.y"
02320 {yygotominor.yy285 = sqlite3SrcListAppend(0,&yymsp[-1].minor.yy384,&yymsp[0].minor.yy384);}
02321 #line 2324 "parse.c"
02322         break;
02323       case 133:
02324 #line 504 "parse.y"
02325 { yygotominor.yy230 = JT_INNER; }
02326 #line 2329 "parse.c"
02327         break;
02328       case 134:
02329 #line 505 "parse.y"
02330 { yygotominor.yy230 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); }
02331 #line 2334 "parse.c"
02332         break;
02333       case 135:
02334 #line 506 "parse.y"
02335 { yygotominor.yy230 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy384,0); }
02336 #line 2339 "parse.c"
02337         break;
02338       case 136:
02339 #line 508 "parse.y"
02340 { yygotominor.yy230 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy384,&yymsp[-1].minor.yy384); }
02341 #line 2344 "parse.c"
02342         break;
02343       case 137:
02344       case 145:
02345       case 154:
02346       case 161:
02347       case 175:
02348       case 200:
02349       case 223:
02350       case 225:
02351       case 229:
02352 #line 512 "parse.y"
02353 {yygotominor.yy178 = yymsp[0].minor.yy178;}
02354 #line 2357 "parse.c"
02355         break;
02356       case 138:
02357       case 153:
02358       case 160:
02359       case 201:
02360       case 224:
02361       case 226:
02362       case 230:
02363 #line 513 "parse.y"
02364 {yygotominor.yy178 = 0;}
02365 #line 2368 "parse.c"
02366         break;
02367       case 139:
02368       case 172:
02369 #line 517 "parse.y"
02370 {yygotominor.yy160 = yymsp[-1].minor.yy160;}
02371 #line 2374 "parse.c"
02372         break;
02373       case 140:
02374       case 171:
02375 #line 518 "parse.y"
02376 {yygotominor.yy160 = 0;}
02377 #line 2380 "parse.c"
02378         break;
02379       case 142:
02380       case 152:
02381 #line 529 "parse.y"
02382 {yygotominor.yy462 = yymsp[0].minor.yy462;}
02383 #line 2386 "parse.c"
02384         break;
02385       case 143:
02386 #line 530 "parse.y"
02387 {
02388   yygotominor.yy462 = sqlite3ExprListAppend(yymsp[-4].minor.yy462,yymsp[-2].minor.yy178,yymsp[-1].minor.yy384.n>0?&yymsp[-1].minor.yy384:0);
02389   if( yygotominor.yy462 ) yygotominor.yy462->a[yygotominor.yy462->nExpr-1].sortOrder = yymsp[0].minor.yy230;
02390 }
02391 #line 2394 "parse.c"
02392         break;
02393       case 144:
02394 #line 534 "parse.y"
02395 {
02396   yygotominor.yy462 = sqlite3ExprListAppend(0,yymsp[-2].minor.yy178,yymsp[-1].minor.yy384.n>0?&yymsp[-1].minor.yy384:0);
02397   if( yygotominor.yy462 && yygotominor.yy462->a ) yygotominor.yy462->a[0].sortOrder = yymsp[0].minor.yy230;
02398 }
02399 #line 2402 "parse.c"
02400         break;
02401       case 146:
02402       case 148:
02403 #line 543 "parse.y"
02404 {yygotominor.yy230 = SQLITE_SO_ASC;}
02405 #line 2408 "parse.c"
02406         break;
02407       case 147:
02408 #line 544 "parse.y"
02409 {yygotominor.yy230 = SQLITE_SO_DESC;}
02410 #line 2413 "parse.c"
02411         break;
02412       case 149:
02413 #line 546 "parse.y"
02414 {yygotominor.yy384.z = 0; yygotominor.yy384.n = 0;}
02415 #line 2418 "parse.c"
02416         break;
02417       case 155:
02418 #line 564 "parse.y"
02419 {yygotominor.yy270.pLimit = 0; yygotominor.yy270.pOffset = 0;}
02420 #line 2423 "parse.c"
02421         break;
02422       case 156:
02423 #line 565 "parse.y"
02424 {yygotominor.yy270.pLimit = yymsp[0].minor.yy178; yygotominor.yy270.pOffset = 0;}
02425 #line 2428 "parse.c"
02426         break;
02427       case 157:
02428 #line 567 "parse.y"
02429 {yygotominor.yy270.pLimit = yymsp[-2].minor.yy178; yygotominor.yy270.pOffset = yymsp[0].minor.yy178;}
02430 #line 2433 "parse.c"
02431         break;
02432       case 158:
02433 #line 569 "parse.y"
02434 {yygotominor.yy270.pOffset = yymsp[-2].minor.yy178; yygotominor.yy270.pLimit = yymsp[0].minor.yy178;}
02435 #line 2438 "parse.c"
02436         break;
02437       case 159:
02438 #line 573 "parse.y"
02439 {sqlite3DeleteFrom(pParse,yymsp[-1].minor.yy285,yymsp[0].minor.yy178);}
02440 #line 2443 "parse.c"
02441         break;
02442       case 162:
02443 #line 584 "parse.y"
02444 {sqlite3Update(pParse,yymsp[-3].minor.yy285,yymsp[-1].minor.yy462,yymsp[0].minor.yy178,yymsp[-4].minor.yy230);}
02445 #line 2448 "parse.c"
02446         break;
02447       case 163:
02448 #line 590 "parse.y"
02449 {yygotominor.yy462 = sqlite3ExprListAppend(yymsp[-4].minor.yy462,yymsp[0].minor.yy178,&yymsp[-2].minor.yy384);}
02450 #line 2453 "parse.c"
02451         break;
02452       case 164:
02453 #line 591 "parse.y"
02454 {yygotominor.yy462 = sqlite3ExprListAppend(0,yymsp[0].minor.yy178,&yymsp[-2].minor.yy384);}
02455 #line 2458 "parse.c"
02456         break;
02457       case 165:
02458 #line 597 "parse.y"
02459 {sqlite3Insert(pParse, yymsp[-5].minor.yy285, yymsp[-1].minor.yy462, 0, yymsp[-4].minor.yy160, yymsp[-7].minor.yy230);}
02460 #line 2463 "parse.c"
02461         break;
02462       case 166:
02463 #line 599 "parse.y"
02464 {sqlite3Insert(pParse, yymsp[-2].minor.yy285, 0, yymsp[0].minor.yy239, yymsp[-1].minor.yy160, yymsp[-4].minor.yy230);}
02465 #line 2468 "parse.c"
02466         break;
02467       case 169:
02468       case 227:
02469 #line 609 "parse.y"
02470 {yygotominor.yy462 = sqlite3ExprListAppend(yymsp[-2].minor.yy462,yymsp[0].minor.yy178,0);}
02471 #line 2474 "parse.c"
02472         break;
02473       case 170:
02474       case 228:
02475 #line 610 "parse.y"
02476 {yygotominor.yy462 = sqlite3ExprListAppend(0,yymsp[0].minor.yy178,0);}
02477 #line 2480 "parse.c"
02478         break;
02479       case 173:
02480 #line 619 "parse.y"
02481 {yygotominor.yy160 = sqlite3IdListAppend(yymsp[-2].minor.yy160,&yymsp[0].minor.yy384);}
02482 #line 2485 "parse.c"
02483         break;
02484       case 174:
02485 #line 620 "parse.y"
02486 {yygotominor.yy160 = sqlite3IdListAppend(0,&yymsp[0].minor.yy384);}
02487 #line 2490 "parse.c"
02488         break;
02489       case 176:
02490 #line 631 "parse.y"
02491 {yygotominor.yy178 = yymsp[-1].minor.yy178; sqlite3ExprSpan(yygotominor.yy178,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); }
02492 #line 2495 "parse.c"
02493         break;
02494       case 177:
02495       case 182:
02496       case 183:
02497 #line 632 "parse.y"
02498 {yygotominor.yy178 = sqlite3Expr(yymsp[0].major, 0, 0, &yymsp[0].minor.yy0);}
02499 #line 2502 "parse.c"
02500         break;
02501       case 178:
02502       case 179:
02503 #line 633 "parse.y"
02504 {yygotominor.yy178 = sqlite3Expr(TK_ID, 0, 0, &yymsp[0].minor.yy0);}
02505 #line 2508 "parse.c"
02506         break;
02507       case 180:
02508 #line 635 "parse.y"
02509 {
02510   Expr *temp1 = sqlite3Expr(TK_ID, 0, 0, &yymsp[-2].minor.yy384);
02511   Expr *temp2 = sqlite3Expr(TK_ID, 0, 0, &yymsp[0].minor.yy384);
02512   yygotominor.yy178 = sqlite3Expr(TK_DOT, temp1, temp2, 0);
02513 }
02514 #line 2517 "parse.c"
02515         break;
02516       case 181:
02517 #line 640 "parse.y"
02518 {
02519   Expr *temp1 = sqlite3Expr(TK_ID, 0, 0, &yymsp[-4].minor.yy384);
02520   Expr *temp2 = sqlite3Expr(TK_ID, 0, 0, &yymsp[-2].minor.yy384);
02521   Expr *temp3 = sqlite3Expr(TK_ID, 0, 0, &yymsp[0].minor.yy384);
02522   Expr *temp4 = sqlite3Expr(TK_DOT, temp2, temp3, 0);
02523   yygotominor.yy178 = sqlite3Expr(TK_DOT, temp1, temp4, 0);
02524 }
02525 #line 2528 "parse.c"
02526         break;
02527       case 184:
02528 #line 649 "parse.y"
02529 {yygotominor.yy178 = sqlite3RegisterExpr(pParse, &yymsp[0].minor.yy0);}
02530 #line 2533 "parse.c"
02531         break;
02532       case 185:
02533 #line 650 "parse.y"
02534 {
02535   Token *pToken = &yymsp[0].minor.yy0;
02536   Expr *pExpr = yygotominor.yy178 = sqlite3Expr(TK_VARIABLE, 0, 0, pToken);
02537   sqlite3ExprAssignVarNumber(pParse, pExpr);
02538 }
02539 #line 2542 "parse.c"
02540         break;
02541       case 186:
02542 #line 656 "parse.y"
02543 {
02544   yygotominor.yy178 = sqlite3Expr(TK_CAST, yymsp[-3].minor.yy178, 0, &yymsp[-1].minor.yy384);
02545   sqlite3ExprSpan(yygotominor.yy178,&yymsp[-5].minor.yy0,&yymsp[0].minor.yy0);
02546 }
02547 #line 2550 "parse.c"
02548         break;
02549       case 187:
02550 #line 661 "parse.y"
02551 {
02552   yygotominor.yy178 = sqlite3ExprFunction(yymsp[-1].minor.yy462, &yymsp[-4].minor.yy0);
02553   sqlite3ExprSpan(yygotominor.yy178,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0);
02554   if( yymsp[-2].minor.yy230 && yygotominor.yy178 ){
02555     yygotominor.yy178->flags |= EP_Distinct;
02556   }
02557 }
02558 #line 2561 "parse.c"
02559         break;
02560       case 188:
02561 #line 668 "parse.y"
02562 {
02563   yygotominor.yy178 = sqlite3ExprFunction(0, &yymsp[-3].minor.yy0);
02564   sqlite3ExprSpan(yygotominor.yy178,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0);
02565 }
02566 #line 2569 "parse.c"
02567         break;
02568       case 189:
02569 #line 672 "parse.y"
02570 {
02571   /* The CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP values are
02572   ** treated as functions that return constants */
02573   yygotominor.yy178 = sqlite3ExprFunction(0,&yymsp[0].minor.yy0);
02574   if( yygotominor.yy178 ) yygotominor.yy178->op = TK_CONST_FUNC;  
02575 }
02576 #line 2579 "parse.c"
02577         break;
02578       case 190:
02579       case 191:
02580       case 192:
02581       case 193:
02582       case 194:
02583       case 195:
02584       case 196:
02585       case 197:
02586 #line 678 "parse.y"
02587 {yygotominor.yy178 = sqlite3Expr(yymsp[-1].major, yymsp[-2].minor.yy178, yymsp[0].minor.yy178, 0);}
02588 #line 2591 "parse.c"
02589         break;
02590       case 198:
02591 #line 688 "parse.y"
02592 {yygotominor.yy440.eOperator = yymsp[0].minor.yy0; yygotominor.yy440.not = 0;}
02593 #line 2596 "parse.c"
02594         break;
02595       case 199:
02596 #line 689 "parse.y"
02597 {yygotominor.yy440.eOperator = yymsp[0].minor.yy0; yygotominor.yy440.not = 1;}
02598 #line 2601 "parse.c"
02599         break;
02600       case 202:
02601 #line 694 "parse.y"
02602 {
02603   ExprList *pList;
02604   pList = sqlite3ExprListAppend(0, yymsp[-1].minor.yy178, 0);
02605   pList = sqlite3ExprListAppend(pList, yymsp[-3].minor.yy178, 0);
02606   if( yymsp[0].minor.yy178 ){
02607     pList = sqlite3ExprListAppend(pList, yymsp[0].minor.yy178, 0);
02608   }
02609   yygotominor.yy178 = sqlite3ExprFunction(pList, &yymsp[-2].minor.yy440.eOperator);
02610   if( yymsp[-2].minor.yy440.not ) yygotominor.yy178 = sqlite3Expr(TK_NOT, yygotominor.yy178, 0, 0);
02611   sqlite3ExprSpan(yygotominor.yy178, &yymsp[-3].minor.yy178->span, &yymsp[-1].minor.yy178->span);
02612 }
02613 #line 2616 "parse.c"
02614         break;
02615       case 203:
02616 #line 706 "parse.y"
02617 {
02618   yygotominor.yy178 = sqlite3Expr(yymsp[0].major, yymsp[-1].minor.yy178, 0, 0);
02619   sqlite3ExprSpan(yygotominor.yy178,&yymsp[-1].minor.yy178->span,&yymsp[0].minor.yy0);
02620 }
02621 #line 2624 "parse.c"
02622         break;
02623       case 204:
02624 #line 710 "parse.y"
02625 {
02626   yygotominor.yy178 = sqlite3Expr(TK_ISNULL, yymsp[-2].minor.yy178, 0, 0);
02627   sqlite3ExprSpan(yygotominor.yy178,&yymsp[-2].minor.yy178->span,&yymsp[0].minor.yy0);
02628 }
02629 #line 2632 "parse.c"
02630         break;
02631       case 205:
02632 #line 714 "parse.y"
02633 {
02634   yygotominor.yy178 = sqlite3Expr(TK_NOTNULL, yymsp[-2].minor.yy178, 0, 0);
02635   sqlite3ExprSpan(yygotominor.yy178,&yymsp[-2].minor.yy178->span,&yymsp[0].minor.yy0);
02636 }
02637 #line 2640 "parse.c"
02638         break;
02639       case 206:
02640 #line 718 "parse.y"
02641 {
02642   yygotominor.yy178 = sqlite3Expr(TK_NOTNULL, yymsp[-3].minor.yy178, 0, 0);
02643   sqlite3ExprSpan(yygotominor.yy178,&yymsp[-3].minor.yy178->span,&yymsp[0].minor.yy0);
02644 }
02645 #line 2648 "parse.c"
02646         break;
02647       case 207:
02648 #line 722 "parse.y"
02649 {
02650   yygotominor.yy178 = sqlite3Expr(yymsp[-1].major, yymsp[0].minor.yy178, 0, 0);
02651   sqlite3ExprSpan(yygotominor.yy178,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy178->span);
02652 }
02653 #line 2656 "parse.c"
02654         break;
02655       case 208:
02656 #line 726 "parse.y"
02657 {
02658   yygotominor.yy178 = sqlite3Expr(TK_UMINUS, yymsp[0].minor.yy178, 0, 0);
02659   sqlite3ExprSpan(yygotominor.yy178,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy178->span);
02660 }
02661 #line 2664 "parse.c"
02662         break;
02663       case 209:
02664 #line 730 "parse.y"
02665 {
02666   yygotominor.yy178 = sqlite3Expr(TK_UPLUS, yymsp[0].minor.yy178, 0, 0);
02667   sqlite3ExprSpan(yygotominor.yy178,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy178->span);
02668 }
02669 #line 2672 "parse.c"
02670         break;
02671       case 212:
02672 #line 737 "parse.y"
02673 {
02674   ExprList *pList = sqlite3ExprListAppend(0, yymsp[-2].minor.yy178, 0);
02675   pList = sqlite3ExprListAppend(pList, yymsp[0].minor.yy178, 0);
02676   yygotominor.yy178 = sqlite3Expr(TK_BETWEEN, yymsp[-4].minor.yy178, 0, 0);
02677   if( yygotominor.yy178 ){
02678     yygotominor.yy178->pList = pList;
02679   }else{
02680     sqlite3ExprListDelete(pList);
02681   } 
02682   if( yymsp[-3].minor.yy230 ) yygotominor.yy178 = sqlite3Expr(TK_NOT, yygotominor.yy178, 0, 0);
02683   sqlite3ExprSpan(yygotominor.yy178,&yymsp[-4].minor.yy178->span,&yymsp[0].minor.yy178->span);
02684 }
02685 #line 2688 "parse.c"
02686         break;
02687       case 215:
02688 #line 753 "parse.y"
02689 {
02690     yygotominor.yy178 = sqlite3Expr(TK_IN, yymsp[-4].minor.yy178, 0, 0);
02691     if( yygotominor.yy178 ){
02692       yygotominor.yy178->pList = yymsp[-1].minor.yy462;
02693     }else{
02694       sqlite3ExprListDelete(yymsp[-1].minor.yy462);
02695     }
02696     if( yymsp[-3].minor.yy230 ) yygotominor.yy178 = sqlite3Expr(TK_NOT, yygotominor.yy178, 0, 0);
02697     sqlite3ExprSpan(yygotominor.yy178,&yymsp[-4].minor.yy178->span,&yymsp[0].minor.yy0);
02698   }
02699 #line 2702 "parse.c"
02700         break;
02701       case 216:
02702 #line 763 "parse.y"
02703 {
02704     yygotominor.yy178 = sqlite3Expr(TK_SELECT, 0, 0, 0);
02705     if( yygotominor.yy178 ){
02706       yygotominor.yy178->pSelect = yymsp[-1].minor.yy239;
02707     }else{
02708       sqlite3SelectDelete(yymsp[-1].minor.yy239);
02709     }
02710     sqlite3ExprSpan(yygotominor.yy178,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
02711   }
02712 #line 2715 "parse.c"
02713         break;
02714       case 217:
02715 #line 772 "parse.y"
02716 {
02717     yygotominor.yy178 = sqlite3Expr(TK_IN, yymsp[-4].minor.yy178, 0, 0);
02718     if( yygotominor.yy178 ){
02719       yygotominor.yy178->pSelect = yymsp[-1].minor.yy239;
02720     }else{
02721       sqlite3SelectDelete(yymsp[-1].minor.yy239);
02722     }
02723     if( yymsp[-3].minor.yy230 ) yygotominor.yy178 = sqlite3Expr(TK_NOT, yygotominor.yy178, 0, 0);
02724     sqlite3ExprSpan(yygotominor.yy178,&yymsp[-4].minor.yy178->span,&yymsp[0].minor.yy0);
02725   }
02726 #line 2729 "parse.c"
02727         break;
02728       case 218:
02729 #line 782 "parse.y"
02730 {
02731     SrcList *pSrc = sqlite3SrcListAppend(0,&yymsp[-1].minor.yy384,&yymsp[0].minor.yy384);
02732     yygotominor.yy178 = sqlite3Expr(TK_IN, yymsp[-3].minor.yy178, 0, 0);
02733     if( yygotominor.yy178 ){
02734       yygotominor.yy178->pSelect = sqlite3SelectNew(0,pSrc,0,0,0,0,0,0,0);
02735     }else{
02736       sqlite3SrcListDelete(pSrc);
02737     }
02738     if( yymsp[-2].minor.yy230 ) yygotominor.yy178 = sqlite3Expr(TK_NOT, yygotominor.yy178, 0, 0);
02739     sqlite3ExprSpan(yygotominor.yy178,&yymsp[-3].minor.yy178->span,yymsp[0].minor.yy384.z?&yymsp[0].minor.yy384:&yymsp[-1].minor.yy384);
02740   }
02741 #line 2744 "parse.c"
02742         break;
02743       case 219:
02744 #line 793 "parse.y"
02745 {
02746     Expr *p = yygotominor.yy178 = sqlite3Expr(TK_EXISTS, 0, 0, 0);
02747     if( p ){
02748       p->pSelect = yymsp[-1].minor.yy239;
02749       sqlite3ExprSpan(p,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0);
02750     }else{
02751       sqlite3SelectDelete(yymsp[-1].minor.yy239);
02752     }
02753   }
02754 #line 2757 "parse.c"
02755         break;
02756       case 220:
02757 #line 805 "parse.y"
02758 {
02759   yygotominor.yy178 = sqlite3Expr(TK_CASE, yymsp[-3].minor.yy178, yymsp[-1].minor.yy178, 0);
02760   if( yygotominor.yy178 ){
02761     yygotominor.yy178->pList = yymsp[-2].minor.yy462;
02762   }else{
02763     sqlite3ExprListDelete(yymsp[-2].minor.yy462);
02764   }
02765   sqlite3ExprSpan(yygotominor.yy178, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0);
02766 }
02767 #line 2770 "parse.c"
02768         break;
02769       case 221:
02770 #line 816 "parse.y"
02771 {
02772   yygotominor.yy462 = sqlite3ExprListAppend(yymsp[-4].minor.yy462, yymsp[-2].minor.yy178, 0);
02773   yygotominor.yy462 = sqlite3ExprListAppend(yygotominor.yy462, yymsp[0].minor.yy178, 0);
02774 }
02775 #line 2778 "parse.c"
02776         break;
02777       case 222:
02778 #line 820 "parse.y"
02779 {
02780   yygotominor.yy462 = sqlite3ExprListAppend(0, yymsp[-2].minor.yy178, 0);
02781   yygotominor.yy462 = sqlite3ExprListAppend(yygotominor.yy462, yymsp[0].minor.yy178, 0);
02782 }
02783 #line 2786 "parse.c"
02784         break;
02785       case 231:
02786 #line 847 "parse.y"
02787 {
02788   sqlite3CreateIndex(pParse, &yymsp[-6].minor.yy384, &yymsp[-5].minor.yy384, sqlite3SrcListAppend(0,&yymsp[-3].minor.yy384,0), yymsp[-1].minor.yy462, yymsp[-9].minor.yy230,
02789                       &yymsp[-10].minor.yy0, &yymsp[0].minor.yy0, SQLITE_SO_ASC, yymsp[-7].minor.yy230);
02790 }
02791 #line 2794 "parse.c"
02792         break;
02793       case 232:
02794       case 277:
02795 #line 853 "parse.y"
02796 {yygotominor.yy230 = OE_Abort;}
02797 #line 2800 "parse.c"
02798         break;
02799       case 233:
02800 #line 854 "parse.y"
02801 {yygotominor.yy230 = OE_None;}
02802 #line 2805 "parse.c"
02803         break;
02804       case 236:
02805 #line 864 "parse.y"
02806 {
02807   Expr *p = 0;
02808   if( yymsp[-1].minor.yy384.n>0 ){
02809     p = sqlite3Expr(TK_COLUMN, 0, 0, 0);
02810     if( p ) p->pColl = sqlite3LocateCollSeq(pParse, (char*)yymsp[-1].minor.yy384.z, yymsp[-1].minor.yy384.n);
02811   }
02812   yygotominor.yy462 = sqlite3ExprListAppend(yymsp[-4].minor.yy462, p, &yymsp[-2].minor.yy384);
02813   if( yygotominor.yy462 ) yygotominor.yy462->a[yygotominor.yy462->nExpr-1].sortOrder = yymsp[0].minor.yy230;
02814 }
02815 #line 2818 "parse.c"
02816         break;
02817       case 237:
02818 #line 873 "parse.y"
02819 {
02820   Expr *p = 0;
02821   if( yymsp[-1].minor.yy384.n>0 ){
02822     p = sqlite3Expr(TK_COLUMN, 0, 0, 0);
02823     if( p ) p->pColl = sqlite3LocateCollSeq(pParse, (char*)yymsp[-1].minor.yy384.z, yymsp[-1].minor.yy384.n);
02824   }
02825   yygotominor.yy462 = sqlite3ExprListAppend(0, p, &yymsp[-2].minor.yy384);
02826   if( yygotominor.yy462 ) yygotominor.yy462->a[yygotominor.yy462->nExpr-1].sortOrder = yymsp[0].minor.yy230;
02827 }
02828 #line 2831 "parse.c"
02829         break;
02830       case 239:
02831 #line 887 "parse.y"
02832 {sqlite3DropIndex(pParse, yymsp[0].minor.yy285, yymsp[-1].minor.yy230);}
02833 #line 2836 "parse.c"
02834         break;
02835       case 240:
02836       case 241:
02837 #line 891 "parse.y"
02838 {sqlite3Vacuum(pParse);}
02839 #line 2842 "parse.c"
02840         break;
02841       case 242:
02842       case 244:
02843 #line 897 "parse.y"
02844 {sqlite3Pragma(pParse,&yymsp[-3].minor.yy384,&yymsp[-2].minor.yy384,&yymsp[0].minor.yy384,0);}
02845 #line 2848 "parse.c"
02846         break;
02847       case 243:
02848 #line 898 "parse.y"
02849 {sqlite3Pragma(pParse,&yymsp[-3].minor.yy384,&yymsp[-2].minor.yy384,&yymsp[0].minor.yy0,0);}
02850 #line 2853 "parse.c"
02851         break;
02852       case 245:
02853 #line 900 "parse.y"
02854 {
02855   sqlite3Pragma(pParse,&yymsp[-3].minor.yy384,&yymsp[-2].minor.yy384,&yymsp[0].minor.yy384,1);
02856 }
02857 #line 2860 "parse.c"
02858         break;
02859       case 246:
02860 #line 903 "parse.y"
02861 {sqlite3Pragma(pParse,&yymsp[-4].minor.yy384,&yymsp[-3].minor.yy384,&yymsp[-1].minor.yy384,0);}
02862 #line 2865 "parse.c"
02863         break;
02864       case 247:
02865 #line 904 "parse.y"
02866 {sqlite3Pragma(pParse,&yymsp[-1].minor.yy384,&yymsp[0].minor.yy384,0,0);}
02867 #line 2870 "parse.c"
02868         break;
02869       case 253:
02870 #line 916 "parse.y"
02871 {
02872   Token all;
02873   all.z = yymsp[-3].minor.yy384.z;
02874   all.n = (yymsp[0].minor.yy0.z - yymsp[-3].minor.yy384.z) + yymsp[0].minor.yy0.n;
02875   sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy247, &all);
02876 }
02877 #line 2880 "parse.c"
02878         break;
02879       case 254:
02880 #line 925 "parse.y"
02881 {
02882   sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy384, &yymsp[-6].minor.yy384, yymsp[-5].minor.yy230, yymsp[-4].minor.yy132.a, yymsp[-4].minor.yy132.b, yymsp[-2].minor.yy285, yymsp[-1].minor.yy230, yymsp[0].minor.yy178, yymsp[-9].minor.yy230);
02883   yygotominor.yy384 = (yymsp[-6].minor.yy384.n==0?yymsp[-7].minor.yy384:yymsp[-6].minor.yy384);
02884 }
02885 #line 2888 "parse.c"
02886         break;
02887       case 255:
02888       case 258:
02889 #line 931 "parse.y"
02890 { yygotominor.yy230 = TK_BEFORE; }
02891 #line 2894 "parse.c"
02892         break;
02893       case 256:
02894 #line 932 "parse.y"
02895 { yygotominor.yy230 = TK_AFTER;  }
02896 #line 2899 "parse.c"
02897         break;
02898       case 257:
02899 #line 933 "parse.y"
02900 { yygotominor.yy230 = TK_INSTEAD;}
02901 #line 2904 "parse.c"
02902         break;
02903       case 259:
02904       case 260:
02905 #line 938 "parse.y"
02906 {yygotominor.yy132.a = yymsp[0].major; yygotominor.yy132.b = 0;}
02907 #line 2910 "parse.c"
02908         break;
02909       case 261:
02910 #line 940 "parse.y"
02911 {yygotominor.yy132.a = TK_UPDATE; yygotominor.yy132.b = yymsp[0].minor.yy160;}
02912 #line 2915 "parse.c"
02913         break;
02914       case 262:
02915       case 263:
02916 #line 943 "parse.y"
02917 { yygotominor.yy230 = TK_ROW; }
02918 #line 2921 "parse.c"
02919         break;
02920       case 264:
02921 #line 945 "parse.y"
02922 { yygotominor.yy230 = TK_STATEMENT; }
02923 #line 2926 "parse.c"
02924         break;
02925       case 265:
02926 #line 949 "parse.y"
02927 { yygotominor.yy178 = 0; }
02928 #line 2931 "parse.c"
02929         break;
02930       case 266:
02931 #line 950 "parse.y"
02932 { yygotominor.yy178 = yymsp[0].minor.yy178; }
02933 #line 2936 "parse.c"
02934         break;
02935       case 267:
02936 #line 954 "parse.y"
02937 {
02938   if( yymsp[-2].minor.yy247 ){
02939     yymsp[-2].minor.yy247->pLast->pNext = yymsp[-1].minor.yy247;
02940   }else{
02941     yymsp[-2].minor.yy247 = yymsp[-1].minor.yy247;
02942   }
02943   yymsp[-2].minor.yy247->pLast = yymsp[-1].minor.yy247;
02944   yygotominor.yy247 = yymsp[-2].minor.yy247;
02945 }
02946 #line 2949 "parse.c"
02947         break;
02948       case 268:
02949 #line 963 "parse.y"
02950 { yygotominor.yy247 = 0; }
02951 #line 2954 "parse.c"
02952         break;
02953       case 269:
02954 #line 969 "parse.y"
02955 { yygotominor.yy247 = sqlite3TriggerUpdateStep(&yymsp[-3].minor.yy384, yymsp[-1].minor.yy462, yymsp[0].minor.yy178, yymsp[-4].minor.yy230); }
02956 #line 2959 "parse.c"
02957         break;
02958       case 270:
02959 #line 974 "parse.y"
02960 {yygotominor.yy247 = sqlite3TriggerInsertStep(&yymsp[-5].minor.yy384, yymsp[-4].minor.yy160, yymsp[-1].minor.yy462, 0, yymsp[-7].minor.yy230);}
02961 #line 2964 "parse.c"
02962         break;
02963       case 271:
02964 #line 977 "parse.y"
02965 {yygotominor.yy247 = sqlite3TriggerInsertStep(&yymsp[-2].minor.yy384, yymsp[-1].minor.yy160, 0, yymsp[0].minor.yy239, yymsp[-4].minor.yy230);}
02966 #line 2969 "parse.c"
02967         break;
02968       case 272:
02969 #line 981 "parse.y"
02970 {yygotominor.yy247 = sqlite3TriggerDeleteStep(&yymsp[-1].minor.yy384, yymsp[0].minor.yy178);}
02971 #line 2974 "parse.c"
02972         break;
02973       case 273:
02974 #line 984 "parse.y"
02975 {yygotominor.yy247 = sqlite3TriggerSelectStep(yymsp[0].minor.yy239); }
02976 #line 2979 "parse.c"
02977         break;
02978       case 274:
02979 #line 987 "parse.y"
02980 {
02981   yygotominor.yy178 = sqlite3Expr(TK_RAISE, 0, 0, 0); 
02982   if( yygotominor.yy178 ){
02983     yygotominor.yy178->iColumn = OE_Ignore;
02984     sqlite3ExprSpan(yygotominor.yy178, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0);
02985   }
02986 }
02987 #line 2990 "parse.c"
02988         break;
02989       case 275:
02990 #line 994 "parse.y"
02991 {
02992   yygotominor.yy178 = sqlite3Expr(TK_RAISE, 0, 0, &yymsp[-1].minor.yy384); 
02993   if( yygotominor.yy178 ) {
02994     yygotominor.yy178->iColumn = yymsp[-3].minor.yy230;
02995     sqlite3ExprSpan(yygotominor.yy178, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0);
02996   }
02997 }
02998 #line 3001 "parse.c"
02999         break;
03000       case 276:
03001 #line 1004 "parse.y"
03002 {yygotominor.yy230 = OE_Rollback;}
03003 #line 3006 "parse.c"
03004         break;
03005       case 278:
03006 #line 1006 "parse.y"
03007 {yygotominor.yy230 = OE_Fail;}
03008 #line 3011 "parse.c"
03009         break;
03010       case 279:
03011 #line 1011 "parse.y"
03012 {
03013   sqlite3DropTrigger(pParse,yymsp[0].minor.yy285);
03014 }
03015 #line 3018 "parse.c"
03016         break;
03017       case 280:
03018 #line 1017 "parse.y"
03019 {
03020   sqlite3Attach(pParse, yymsp[-3].minor.yy178, yymsp[-1].minor.yy178, yymsp[0].minor.yy292);
03021 }
03022 #line 3025 "parse.c"
03023         break;
03024       case 281:
03025 #line 1022 "parse.y"
03026 { yygotominor.yy292 = 0; }
03027 #line 3030 "parse.c"
03028         break;
03029       case 282:
03030 #line 1023 "parse.y"
03031 { yygotominor.yy292 = yymsp[0].minor.yy178; }
03032 #line 3035 "parse.c"
03033         break;
03034       case 285:
03035 #line 1029 "parse.y"
03036 {
03037   sqlite3Detach(pParse, yymsp[0].minor.yy178);
03038 }
03039 #line 3042 "parse.c"
03040         break;
03041       case 286:
03042 #line 1035 "parse.y"
03043 {sqlite3Reindex(pParse, 0, 0);}
03044 #line 3047 "parse.c"
03045         break;
03046       case 287:
03047 #line 1036 "parse.y"
03048 {sqlite3Reindex(pParse, &yymsp[-1].minor.yy384, &yymsp[0].minor.yy384);}
03049 #line 3052 "parse.c"
03050         break;
03051       case 288:
03052 #line 1041 "parse.y"
03053 {sqlite3Analyze(pParse, 0, 0);}
03054 #line 3057 "parse.c"
03055         break;
03056       case 289:
03057 #line 1042 "parse.y"
03058 {sqlite3Analyze(pParse, &yymsp[-1].minor.yy384, &yymsp[0].minor.yy384);}
03059 #line 3062 "parse.c"
03060         break;
03061       case 290:
03062 #line 1047 "parse.y"
03063 {
03064   sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy285,&yymsp[0].minor.yy384);
03065 }
03066 #line 3069 "parse.c"
03067         break;
03068       case 291:
03069 #line 1050 "parse.y"
03070 {
03071   sqlite3AlterFinishAddColumn(pParse, &yymsp[0].minor.yy384);
03072 }
03073 #line 3076 "parse.c"
03074         break;
03075       case 292:
03076 #line 1053 "parse.y"
03077 {
03078   sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy285);
03079 }
03080 #line 3083 "parse.c"
03081         break;
03082   };
03083   yygoto = yyRuleInfo[yyruleno].lhs;
03084   yysize = yyRuleInfo[yyruleno].nrhs;
03085   yypParser->yyidx -= yysize;
03086   yyact = yy_find_reduce_action(yymsp[-yysize].stateno,yygoto);
03087   if( yyact < YYNSTATE ){
03088 #ifdef NDEBUG
03089     /* If we are not debugging and the reduce action popped at least
03090     ** one element off the stack, then we can push the new element back
03091     ** onto the stack here, and skip the stack overflow test in yy_shift().
03092     ** That gives a significant speed improvement. */
03093     if( yysize ){
03094       yypParser->yyidx++;
03095       yymsp -= yysize-1;
03096       yymsp->stateno = yyact;
03097       yymsp->major = yygoto;
03098       yymsp->minor = yygotominor;
03099     }else
03100 #endif
03101     {
03102       yy_shift(yypParser,yyact,yygoto,&yygotominor);
03103     }
03104   }else if( yyact == YYNSTATE + YYNRULE + 1 ){
03105     yy_accept(yypParser);
03106   }
03107 }
03108 
03109 /*
03110 ** The following code executes when the parse fails
03111 */
03112 static void yy_parse_failed(
03113   yyParser *yypParser           /* The parser */
03114 ){
03115   sqlite3ParserARG_FETCH;
03116 #ifndef NDEBUG
03117   if( yyTraceFILE ){
03118     fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
03119   }
03120 #endif
03121   while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
03122   /* Here code is inserted which will be executed whenever the
03123   ** parser fails */
03124   sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
03125 }
03126 
03127 /*
03128 ** The following code executes when a syntax error first occurs.
03129 */
03130 static void yy_syntax_error(
03131   yyParser *yypParser,           /* The parser */
03132   int yymajor,                   /* The major type of the error token */
03133   YYMINORTYPE yyminor            /* The minor type of the error token */
03134 ){
03135   sqlite3ParserARG_FETCH;
03136 #define TOKEN (yyminor.yy0)
03137 #line 34 "parse.y"
03138 
03139   if( pParse->zErrMsg==0 ){
03140     if( TOKEN.z[0] ){
03141       sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
03142     }else{
03143       sqlite3ErrorMsg(pParse, "incomplete SQL statement");
03144     }
03145   }
03146 #line 3150 "parse.c"
03147   sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
03148 }
03149 
03150 /*
03151 ** The following is executed when the parser accepts
03152 */
03153 static void yy_accept(
03154   yyParser *yypParser           /* The parser */
03155 ){
03156   sqlite3ParserARG_FETCH;
03157 #ifndef NDEBUG
03158   if( yyTraceFILE ){
03159     fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
03160   }
03161 #endif
03162   while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
03163   /* Here code is inserted which will be executed whenever the
03164   ** parser accepts */
03165   sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
03166 }
03167 
03168 /* The main parser program.
03169 ** The first argument is a pointer to a structure obtained from
03170 ** "sqlite3ParserAlloc" which describes the current state of the parser.
03171 ** The second argument is the major token number.  The third is
03172 ** the minor token.  The fourth optional argument is whatever the
03173 ** user wants (and specified in the grammar) and is available for
03174 ** use by the action routines.
03175 **
03176 ** Inputs:
03177 ** <ul>
03178 ** <li> A pointer to the parser (an opaque structure.)
03179 ** <li> The major token number.
03180 ** <li> The minor token number.
03181 ** <li> An option argument of a grammar-specified type.
03182 ** </ul>
03183 **
03184 ** Outputs:
03185 ** None.
03186 */
03187 void sqlite3Parser(
03188   void *yyp,                   /* The parser */
03189   int yymajor,                 /* The major token code number */
03190   sqlite3ParserTOKENTYPE yyminor       /* The value for the token */
03191   sqlite3ParserARG_PDECL               /* Optional %extra_argument parameter */
03192 ){
03193   YYMINORTYPE yyminorunion;
03194   int yyact;            /* The parser action. */
03195   int yyendofinput;     /* True if we are at the end of input */
03196   int yyerrorhit = 0;   /* True if yymajor has invoked an error */
03197   yyParser *yypParser;  /* The parser */
03198 
03199   /* (re)initialize the parser, if necessary */
03200   yypParser = (yyParser*)yyp;
03201   if( yypParser->yyidx<0 ){
03202     /* if( yymajor==0 ) return; // not sure why this was here... */
03203     yypParser->yyidx = 0;
03204     yypParser->yyerrcnt = -1;
03205     yypParser->yystack[0].stateno = 0;
03206     yypParser->yystack[0].major = 0;
03207   }
03208   yyminorunion.yy0 = yyminor;
03209   yyendofinput = (yymajor==0);
03210   sqlite3ParserARG_STORE;
03211 
03212 #ifndef NDEBUG
03213   if( yyTraceFILE ){
03214     fprintf(yyTraceFILE,"%sInput %s\n",yyTracePrompt,yyTokenName[yymajor]);
03215   }
03216 #endif
03217 
03218   do{
03219     yyact = yy_find_shift_action(yypParser,yymajor);
03220     if( yyact<YYNSTATE ){
03221       yy_shift(yypParser,yyact,yymajor,&yyminorunion);
03222       yypParser->yyerrcnt--;
03223       if( yyendofinput && yypParser->yyidx>=0 ){
03224         yymajor = 0;
03225       }else{
03226         yymajor = YYNOCODE;
03227       }
03228     }else if( yyact < YYNSTATE + YYNRULE ){
03229       yy_reduce(yypParser,yyact-YYNSTATE);
03230     }else if( yyact == YY_ERROR_ACTION ){
03231       int yymx;
03232 #ifndef NDEBUG
03233       if( yyTraceFILE ){
03234         fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
03235       }
03236 #endif
03237 #ifdef YYERRORSYMBOL
03238       /* A syntax error has occurred.
03239       ** The response to an error depends upon whether or not the
03240       ** grammar defines an error token "ERROR".  
03241       **
03242       ** This is what we do if the grammar does define ERROR:
03243       **
03244       **  * Call the %syntax_error function.
03245       **
03246       **  * Begin popping the stack until we enter a state where
03247       **    it is legal to shift the error symbol, then shift
03248       **    the error symbol.
03249       **
03250       **  * Set the error count to three.
03251       **
03252       **  * Begin accepting and shifting new tokens.  No new error
03253       **    processing will occur until three tokens have been
03254       **    shifted successfully.
03255       **
03256       */
03257       if( yypParser->yyerrcnt<0 ){
03258         yy_syntax_error(yypParser,yymajor,yyminorunion);
03259       }
03260       yymx = yypParser->yystack[yypParser->yyidx].major;
03261       if( yymx==YYERRORSYMBOL || yyerrorhit ){
03262 #ifndef NDEBUG
03263         if( yyTraceFILE ){
03264           fprintf(yyTraceFILE,"%sDiscard input token %s\n",
03265              yyTracePrompt,yyTokenName[yymajor]);
03266         }
03267 #endif
03268         yy_destructor(yymajor,&yyminorunion);
03269         yymajor = YYNOCODE;
03270       }else{
03271          while(
03272           yypParser->yyidx >= 0 &&
03273           yymx != YYERRORSYMBOL &&
03274           (yyact = yy_find_reduce_action(
03275                         yypParser->yystack[yypParser->yyidx].stateno,
03276                         YYERRORSYMBOL)) >= YYNSTATE
03277         ){
03278           yy_pop_parser_stack(yypParser);
03279         }
03280         if( yypParser->yyidx < 0 || yymajor==0 ){
03281           yy_destructor(yymajor,&yyminorunion);
03282           yy_parse_failed(yypParser);
03283           yymajor = YYNOCODE;
03284         }else if( yymx!=YYERRORSYMBOL ){
03285           YYMINORTYPE u2;
03286           u2.YYERRSYMDT = 0;
03287           yy_shift(yypParser,yyact,YYERRORSYMBOL,&u2);
03288         }
03289       }
03290       yypParser->yyerrcnt = 3;
03291       yyerrorhit = 1;
03292 #else  /* YYERRORSYMBOL is not defined */
03293       /* This is what we do if the grammar does not define ERROR:
03294       **
03295       **  * Report an error message, and throw away the input token.
03296       **
03297       **  * If the input token is $, then fail the parse.
03298       **
03299       ** As before, subsequent error messages are suppressed until
03300       ** three input tokens have been successfully shifted.
03301       */
03302       if( yypParser->yyerrcnt<=0 ){
03303         yy_syntax_error(yypParser,yymajor,yyminorunion);
03304       }
03305       yypParser->yyerrcnt = 3;
03306       yy_destructor(yymajor,&yyminorunion);
03307       if( yyendofinput ){
03308         yy_parse_failed(yypParser);
03309       }
03310       yymajor = YYNOCODE;
03311 #endif
03312     }else{
03313       yy_accept(yypParser);
03314       yymajor = YYNOCODE;
03315     }
03316   }while( yymajor!=YYNOCODE && yypParser->yyidx>=0 );
03317   return;
03318 }