Back to index

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