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