下面是根据语法规则调用函数执行的隐射方式
switch( yyruleno ){
case 0: /* 0 "input ::= cmdlist",*/
break;
case 1: /* 1 "cmdlist ::= ecmd",*/
break;
case 2: /* 2 "cmdlist ::= cmdlist ecmd",*/
break;
case 3: /* 3 "ecmd ::= explain cmdx SEMI",*/
break;
case 4: /* 4 "ecmd ::= SEMI",*/
break;
case 5: /* 5 "cmdx ::= cmd",*/
{ sqliteExec(pParse); }
break;
case 6: /* 6 "explain ::= EXPLAIN",*/
{ sqliteBeginParse(pParse, 1); }
break;
case 7: /* 7 "explain ::=", */
{ sqliteBeginParse(pParse, 0); }
break;
case 8: /* 8 "cmd ::= BEGIN trans_opt onconf",*/
{sqliteBeginTransaction(pParse,yymsp[0].minor.yy52);}
break;
case 9:/* 9 "trans_opt ::=",*/
break;
case 10: /* 10 "trans_opt ::= TRANSACTION",*/
break;
case 11:/* 11 "trans_opt ::= TRANSACTION nm",*/
break;
case 12: /* 12 "cmd ::= COMMIT trans_opt",*/
{sqliteCommitTransaction(pParse);}
break;
case 13: /* 13 "cmd ::= END trans_opt",*/
{sqliteCommitTransaction(pParse);}
break;
case 14: /* 14 "cmd ::= ROLLBACK trans_opt",*/
{sqliteRollbackTransaction(pParse);}
break;
case 15:/* 15 "cmd ::= create_table create_table_args",*/
break;
case 16: /* 16 "create_table ::= CREATE temp TABLE nm",*/
{
sqliteStartTable(pParse,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy210,yymsp[-2].minor.yy52,0);
}
break;
case 17: /* 17 "temp ::= TEMP",*/
{yygotominor.yy52 = 1;}
break;
case 18: /* 18 "temp ::=",*/
{yygotominor.yy52 = 0;}
break;
case 19:/* 19 "create_table_args ::= LP columnlist conslist_opt RP",*/
{
sqliteEndTable(pParse,&yymsp[0].minor.yy0,0);
}
break;
case 20: /* 20 "create_table_args ::= AS select",*/
{
sqliteEndTable(pParse,0,yymsp[0].minor.yy11);
sqliteSelectDelete(yymsp[0].minor.yy11);
}
break;
case 21:/* 21 "columnlist ::= columnlist COMMA column",*/
break;
case 22: /* 22 "columnlist ::= column", */
break;
case 23: /* 23 "column ::= columnid type carglist", */
break;
case 24: /* 24 "columnid ::= nm", */
{sqliteAddColumn(pParse,&yymsp[0].minor.yy210);}
break;
case 25: /* 25 "id ::= ID", */
{yygotominor.yy210 = yymsp[0].minor.yy0;}
break;
case 26:/* 26 "ids ::= ID", */
{yygotominor.yy210 = yymsp[0].minor.yy0;}
break;
case 27: /* 27 "ids ::= STRING", */
{yygotominor.yy210 = yymsp[0].minor.yy0;}
break;
case 28: /* 28 "nm ::= ID", */
{yygotominor.yy210 = yymsp[0].minor.yy0;}
break;
case 29:/* 29 "nm ::= STRING", */
{yygotominor.yy210 = yymsp[0].minor.yy0;}
break;
case 30:/* 30 "nm ::= JOIN_KW", */
{yygotominor.yy210 = yymsp[0].minor.yy0;}
break;
case 31:/* 31 "type ::=",*/
break;
case 32:/* 32 "type ::= typename", */
{sqliteAddColumnType(pParse,&yymsp[0].minor.yy210,&yymsp[0].minor.yy210);}
break;
case 33:/* 33 "type ::= typename LP signed RP", */
{sqliteAddColumnType(pParse,&yymsp[-3].minor.yy210,&yymsp[0].minor.yy0);}
break;
case 34:/* 34 "type ::= typename LP signed COMMA signed RP", */
{sqliteAddColumnType(pParse,&yymsp[-5].minor.yy210,&yymsp[0].minor.yy0);}
break;
case 35:/* 35 "typename ::= ids",*/
{yygotominor.yy210 = yymsp[0].minor.yy210;}
break;
case 36:/* 36 "typename ::= typename ids", */
{yygotominor.yy210 = yymsp[-1].minor.yy210;}
break;
case 37:/* 37 "signed ::= INTEGER", */
{ yygotominor.yy52 = atoi(yymsp[0].minor.yy0.z); }
break;
case 38:/* 38 "signed ::= PLUS INTEGER", */
{ yygotominor.yy52 = atoi(yymsp[0].minor.yy0.z); }
break;
case 39:/* 39 "signed ::= MINUS INTEGER",*/
{ yygotominor.yy52 = -atoi(yymsp[0].minor.yy0.z); }
break;
case 40:/* 40 "carglist ::= carglist carg", */
break;
case 41:/* 41 "carglist ::=",*/
break;
case 42:/* 42 "carg ::= CONSTRAINT nm ccons",*/
break;
case 43:/* 43 "carg ::= ccons", */
break;
case 44:/* 44 "carg ::= DEFAULT STRING", */
{sqliteAddDefaultValue(pParse,&yymsp[0].minor.yy0,0);}
break;
case 45:/* 45 "carg ::= DEFAULT ID", */
{sqliteAddDefaultValue(pParse,&yymsp[0].minor.yy0,0);}
break;
case 46:/* 46 "carg ::= DEFAULT INTEGER",*/
{sqliteAddDefaultValue(pParse,&yymsp[0].minor.yy0,0);}
break;
case 47: /* 47 "carg ::= DEFAULT PLUS INTEGER", */
{sqliteAddDefaultValue(pParse,&yymsp[0].minor.yy0,0);}
break;
case 48:/* 48 "carg ::= DEFAULT MINUS INTEGER", */
{sqliteAddDefaultValue(pParse,&yymsp[0].minor.yy0,1);}
break;
case 49:/* 49 "carg ::= DEFAULT FLOAT", */
{sqliteAddDefaultValue(pParse,&yymsp[0].minor.yy0,0);}
break;
case 50:/* 50 "carg ::= DEFAULT PLUS FLOAT", */
{sqliteAddDefaultValue(pParse,&yymsp[0].minor.yy0,0);}
break;
case 51:/* 51 "carg ::= DEFAULT MINUS FLOAT",*/
{sqliteAddDefaultValue(pParse,&yymsp[0].minor.yy0,1);}
break;
case 52:/* 52 "carg ::= DEFAULT NULL", */
break;
case 53:/* 53 "ccons ::= NULL onconf", */
break;
case 54: /* 54 "ccons ::= NOT NULL onconf", */
{sqliteAddNotNull(pParse, yymsp[0].minor.yy52);}
break;
case 55:/* 55 "ccons ::= PRIMARY KEY sortorder onconf", */
{sqliteAddPrimaryKey(pParse,0,yymsp[0].minor.yy52);}
break;
case 56:/* 56 "ccons ::= UNIQUE onconf", */
{sqliteCreateIndex(pParse,0,0,0,yymsp[0].minor.yy52,0,0);}
break;
case 57:/* 57 "ccons ::= CHECK LP expr RP onconf", */
yy_destructor(157,&yymsp[-2].minor);
break;
case 58:/* 58 "ccons ::= REFERENCES nm idxlist_opt refargs", */
{sqliteCreateForeignKey(pParse,0,&yymsp[-2].minor.yy210,yymsp[-1].minor.yy92,yymsp[0].minor.yy52);}
break;
case 59:/* 59 "ccons ::= defer_subclause", */
{sqliteDeferForeignKey(pParse,yymsp[0].minor.yy52);}
break;
case 60:/* 60 "ccons ::= COLLATE id",*/
{
sqliteAddCollateType(pParse, sqliteCollateType(yymsp[0].minor.yy210.z, yymsp[0].minor.yy210.n));
}
break;
case 61:/* 61 "refargs ::=", */
{ yygotominor.yy52 = OE_Restrict * 0x010101; }
break;
case 62:/* 62 "refargs ::= refargs refarg", */
{ yygotominor.yy52 = (yymsp[-1].minor.yy52 & yymsp[0].minor.yy279.mask) | yymsp[0].minor.yy279.value; }
break;
case 63:/* 63 "refarg ::= MATCH nm", */
{ yygotominor.yy279.value = 0; yygotominor.yy279.mask = 0x000000; }
break;
case 64:/* 64 "refarg ::= ON DELETE refact", */
{ yygotominor.yy279.value = yymsp[0].minor.yy52; yygotominor.yy279.mask = 0x0000ff; }
break;
case 65:/* 65 "refarg ::= ON UPDATE refact", */
{ yygotominor.yy279.value = yymsp[0].minor.yy52<<8; yygotominor.yy279.mask = 0x00ff00; }
break;
case 66:/* 66 "refarg ::= ON INSERT refact", */
{ yygotominor.yy279.value = yymsp[0].minor.yy52<<16; yygotominor.yy279.mask = 0xff0000; }
break;
case 67:/* 67 "refact ::= SET NULL", */
{ yygotominor.yy52 = OE_SetNull; }
break;
case 68:/* 68 "refact ::= SET DEFAULT", */
{ yygotominor.yy52 = OE_SetDflt; }
break;
case 69:/* 69 "refact ::= CASCADE", */
{ yygotominor.yy52 = OE_Cascade; }
break;
case 70:/* 70 "refact ::= RESTRICT", */
{ yygotominor.yy52 = OE_Restrict; }
break;
case 71:/* 71 "defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt", */
{yygotominor.yy52 = yymsp[0].minor.yy52;}
break;
case 72:/* 72 "defer_subclause ::= DEFERRABLE init_deferred_pred_opt", */
{yygotominor.yy52 = yymsp[0].minor.yy52;}
break;
case 73:/* 73 "init_deferred_pred_opt ::=", */
{yygotominor.yy52 = 0;}
break;
case 74:/* 74 "init_deferred_pred_opt ::= INITIALLY DEFERRED", */
{yygotominor.yy52 = 1;}
break;
case 75:/* 75 "init_deferred_pred_opt ::= INITIALLY IMMEDIATE", */
{yygotominor.yy52 = 0;}
break;
case 76:/* 76 "conslist_opt ::=",*/
break;
case 77:/* 77 "conslist_opt ::= COMMA conslist", */
break;
case 78:/* 78 "conslist ::= conslist COMMA tcons", */
break;
case 79:/* 79 "conslist ::= conslist tcons", */
break;
case 80:/* 80 "conslist ::= tcons", */
break;
case 81:/* 81 "tcons ::= CONSTRAINT nm", */
break;
case 82:/* 82 "tcons ::= PRIMARY KEY LP idxlist RP onconf", */
{sqliteAddPrimaryKey(pParse,yymsp[-2].minor.yy92,yymsp[0].minor.yy52);}
break;
case 83:/* 83 "tcons ::= UNIQUE LP idxlist RP onconf", */
{sqliteCreateIndex(pParse,0,0,yymsp[-2].minor.yy92,yymsp[0].minor.yy52,0,0);}
break;
case 84:/* 84 "tcons ::= CHECK expr onconf", */
yy_destructor(157,&yymsp[-1].minor);
break;
case 85:/* 85 "tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt", */
{
sqliteCreateForeignKey(pParse, yymsp[-6].minor.yy92,
&yymsp[-3].minor.yy210, yymsp[-2].minor.yy92, yymsp[-1].minor.yy52);
sqliteDeferForeignKey(pParse, yymsp[0].minor.yy52);
}
break;
case 86:/* 86 "defer_subclause_opt ::=", */
{yygotominor.yy52 = 0;}
break;
case 87:/* 87 "defer_subclause_opt ::= defer_subclause", */
{yygotominor.yy52 = yymsp[0].minor.yy52;}
break;
case 88:/* 88 "onconf ::=", */
{ yygotominor.yy52 = OE_Default; }
break;
case 89:/* 89 "onconf ::= ON CONFLICT resolvetype", */
{ yygotominor.yy52 = yymsp[0].minor.yy52; }
break;
case 90:/* 90 "orconf ::=", */
{ yygotominor.yy52 = OE_Default; }
break;
case 91:/* 91 "orconf ::= OR resolvetype", */
{ yygotominor.yy52 = yymsp[0].minor.yy52; }
break;
case 92:/* 92 "resolvetype ::= ROLLBACK",*/
{ yygotominor.yy52 = OE_Rollback; }
break;
case 93:/* 93 "resolvetype ::= ABORT", */
{ yygotominor.yy52 = OE_Abort; }
break;
case 94:/* 94 "resolvetype ::= FAIL",*/
{ yygotominor.yy52 = OE_Fail; }
break;
case 95:/* 95 "resolvetype ::= IGNORE", */
{ yygotominor.yy52 = OE_Ignore; }
break;
case 96:/* 96 "resolvetype ::= REPLACE", */
{ yygotominor.yy52 = OE_Replace; }
break;
case 97:/* 97 "cmd ::= DROP TABLE nm", */
{sqliteDropTable(pParse,&yymsp[0].minor.yy210,0);}
break;
case 98:/* 98 "cmd ::= CREATE temp VIEW nm AS select", */
{
sqliteCreateView(pParse, &yymsp[-5].minor.yy0, &yymsp[-2].minor.yy210, yymsp[0].minor.yy11, yymsp[-4].minor.yy52);
}
break;
case 99:/* 99 "cmd ::= DROP VIEW nm",*/
{
sqliteDropTable(pParse, &yymsp[0].minor.yy210, 1);
}
break;
case 100:/* 100 "cmd ::= select", */
{
sqliteSelect(pParse, yymsp[0].minor.yy11, SRT_Callback, 0, 0, 0, 0);
sqliteSelectDelete(yymsp[0].minor.yy11);
}
break;
case 101:/* 101 "select ::= oneselect",*/
{yygotominor.yy11 = yymsp[0].minor.yy11;}
break;
case 102:/* 102 "select ::= select multiselect_op oneselect", */
{
if( yymsp[0].minor.yy11 ){
yymsp[0].minor.yy11->op = yymsp[-1].minor.yy52;
yymsp[0].minor.yy11->pPrior = yymsp[-2].minor.yy11;
}
yygotominor.yy11 = yymsp[0].minor.yy11;
}
break;
case 103:/* 103 "multiselect_op ::= UNION",*/
{yygotominor.yy52 = TK_UNION;}
break;
case 104:/* 104 "multiselect_op ::= UNION ALL",*/
{yygotominor.yy52 = TK_ALL;}
break;
case 105:/* 105 "multiselect_op ::= INTERSECT",*/
{yygotominor.yy52 = TK_INTERSECT;}
break;
case 106:/* 106 "multiselect_op ::= EXCEPT", */
{yygotominor.yy52 = TK_EXCEPT;}
break;
case 107:/* 107 "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt",*/
{
yygotominor.yy11 =
sqliteSelectNew(yymsp[-6].minor.yy62,yymsp[-5].minor.yy335,yymsp[-4].minor.yy334,yymsp[-3].minor.yy62,yymsp[-2].minor.yy334,yymsp[-1].minor.yy62,yymsp[-7].minor.yy52,yymsp[0].minor.yy280.limit,yymsp[0].minor.yy280.offset);
}
break;
case 108:/* 108 "distinct ::= DISTINCT", */
{yygotominor.yy52 = 1;}
break;
case 109:/* 109 "distinct ::= ALL",*/
{yygotominor.yy52 = 0;}
break;
case 110:/* 110 "distinct ::=",*/
{yygotominor.yy52 = 0;}
break;
case 111:/* 111 "sclp ::= selcollist COMMA", */
{yygotominor.yy62 = yymsp[-1].minor.yy62;}
break;
case 112:/* 112 "sclp ::=",*/
{yygotominor.yy62 = 0;}
break;
case 113:/* 113 "selcollist ::= sclp expr as", */
{
yygotominor.yy62 =
sqliteExprListAppend(yymsp[-2].minor.yy62,yymsp[-1].minor.yy334,yymsp[0].minor.yy210.n?&yymsp[0].minor.yy210:0);
}
break;
case 114:/* 114 "selcollist ::= sclp STAR",*/
{
yygotominor.yy62 = sqliteExprListAppend(yymsp[-1].minor.yy62, sqliteExpr(TK_ALL, 0, 0, 0), 0);
}
break;
case 115:/* 115 "selcollist ::= sclp nm DOT STAR", */
{
Expr *pRight = sqliteExpr(TK_ALL, 0, 0, 0);
Expr *pLeft = sqliteExpr(TK_ID, 0, 0, &yymsp[-2].minor.yy210);
yygotominor.yy62 = sqliteExprListAppend(yymsp[-3].minor.yy62, sqliteExpr(TK_DOT, pLeft, pRight, 0), 0);
}
break;
case 116:/* 116 "as ::= AS nm",*/
{ yygotominor.yy210 = yymsp[0].minor.yy210; }
break;
case 117:/* 117 "as ::= ids", */
{ yygotominor.yy210 = yymsp[0].minor.yy210; }
break;
case 118:/* 118 "as ::=", */
{ yygotominor.yy210.n = 0; }
break;
case 119:/* 119 "from ::=",*/
{yygotominor.yy335 = sqliteMalloc(sizeof(*yygotominor.yy335));}
break;
case 120:/* 120 "from ::= FROM seltablist",*/
{yygotominor.yy335 = yymsp[0].minor.yy335;}
break;
case 121:/* 121 "stl_prefix ::= seltablist joinop",*/
{
yygotominor.yy335 = yymsp[-1].minor.yy335;
if( yygotominor.yy335 && yygotominor.yy335->nSrc>0 )
yygotominor.yy335->a[yygotominor.yy335->nSrc-1].jointype =
yymsp[0].minor.yy52;
}
break;
case 122:/* 122 "stl_prefix ::=", */
{yygotominor.yy335 = 0;}
break;
case 123:/* 123 "seltablist ::= stl_prefix nm dbnm as on_opt using_opt", */
{
yygotominor.yy335 = sqliteSrcListAppend(yymsp[-5].minor.yy335,&yymsp[-4].minor.yy210,&yymsp[-3].minor.yy210);
if( yymsp[-2].minor.yy210.n ) sqliteSrcListAddAlias(yygotominor.yy335,&yymsp[-2].minor.yy210);
if( yymsp[-1].minor.yy334 ){
if( yygotominor.yy335 && yygotominor.yy335->nSrc>1 ){
yygotominor.yy335->a[yygotominor.yy335->nSrc-2].pOn =
yymsp[-1].minor.yy334; }
else { sqliteExprDelete(yymsp[-1].minor.yy334); }
}
if( yymsp[0].minor.yy92 ){
if( yygotominor.yy335 && yygotominor.yy335->nSrc>1 ){
yygotominor.yy335->a[yygotominor.yy335->nSrc-2].pUsing =
yymsp[0].minor.yy92; }
else { sqliteIdListDelete(yymsp[0].minor.yy92); }
}
}
break;
case 124:/* 124 "seltablist ::= stl_prefix LP select RP as on_opt using_opt", */
{
yygotominor.yy335 = sqliteSrcListAppend(yymsp[-6].minor.yy335,0,0);
yygotominor.yy335->a[yygotominor.yy335->nSrc-1].pSelect = yymsp[-4].minor.yy11;
if( yymsp[-2].minor.yy210.n ) sqliteSrcListAddAlias(yygotominor.yy335,&yymsp[-2].minor.yy210);
if( yymsp[-1].minor.yy334 ){
if( yygotominor.yy335 && yygotominor.yy335->nSrc>1 ){
yygotominor.yy335->a[yygotominor.yy335->nSrc-2].pOn =
yymsp[-1].minor.yy334; }
else { sqliteExprDelete(yymsp[-1].minor.yy334); }
}
if( yymsp[0].minor.yy92 ){
if( yygotominor.yy335 && yygotominor.yy335->nSrc>1 ){
yygotominor.yy335->a[yygotominor.yy335->nSrc-2].pUsing =
yymsp[0].minor.yy92; }
else { sqliteIdListDelete(yymsp[0].minor.yy92); }
}
}
break;
case 125:/* 125 "dbnm ::=",*/
{yygotominor.yy210.z=0; yygotominor.yy210.n=0;}
break;
case 126:/* 126 "dbnm ::= DOT nm", */
{yygotominor.yy210 = yymsp[0].minor.yy210;}
break;
case 127:/* 127 "joinop ::= COMMA",*/
{ yygotominor.yy52 = JT_INNER; }
break;
case 128:/* 128 "joinop ::= JOIN", */
{ yygotominor.yy52 = JT_INNER; }
break;
case 129:/* 129 "joinop ::= JOIN_KW JOIN", */
{ yygotominor.yy52 = sqliteJoinType(pParse,&yymsp[-1].minor.yy0,0,0); }
break;
case 130:/* 130 "joinop ::= JOIN_KW nm JOIN", */
{ yygotominor.yy52 = sqliteJoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy210,0); }
break;
case 131:/* 131 "joinop ::= JOIN_KW nm nm JOIN", */
{ yygotominor.yy52 = sqliteJoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy210,&yymsp[-1].minor.yy210); }
break;
case 132:/* 132 "on_opt ::= ON expr", */
{yygotominor.yy334 = yymsp[0].minor.yy334;}
break;
case 133:/* 133 "on_opt ::=", */
{yygotominor.yy334 = 0;}
break;
case 134:/* 134 "using_opt ::= USING LP idxlist RP", */
{yygotominor.yy92 = yymsp[-1].minor.yy92;}
break;
case 135:/* 135 "using_opt ::=", */
{yygotominor.yy92 = 0;}
break;
case 136:/* 136 "orderby_opt ::=", */
{yygotominor.yy62 = 0;}
break;
case 137:/* 137 "orderby_opt ::= ORDER BY sortlist", */
{yygotominor.yy62 = yymsp[0].minor.yy62;}
break;
case 138:/* 138 "sortlist ::= sortlist COMMA sortitem collate sortorder", */
{
yygotominor.yy62 = sqliteExprListAppend(yymsp[-4].minor.yy62,yymsp[-2].minor.yy334,0);
if( yygotominor.yy62 )
yygotominor.yy62->a[yygotominor.yy62->nExpr-1].sortOrder =
yymsp[-1].minor.yy52+yymsp[0].minor.yy52;
}
break;
case 139:/* 139 "sortlist ::= sortitem collate sortorder", */
{
yygotominor.yy62 = sqliteExprListAppend(0,yymsp[-2].minor.yy334,0);
if( yygotominor.yy62 ) yygotominor.yy62->a[0].sortOrder = yymsp[-1].minor.yy52+yymsp[0].minor.yy52;
}
break;
case 140:/* 140 "sortitem ::= expr", */
{yygotominor.yy334 = yymsp[0].minor.yy334;}
break;
case 141:/* 141 "sortorder ::= ASC", */
{yygotominor.yy52 = SQLITE_SO_ASC;}
break;
case 142:/* 142 "sortorder ::= DESC", */
{yygotominor.yy52 = SQLITE_SO_DESC;}
break;
case 143:/* 143 "sortorder ::=", */
{yygotominor.yy52 = SQLITE_SO_ASC;}
break;
case 144:/* 144 "collate ::=", */
{yygotominor.yy52 = SQLITE_SO_UNK;}
break;
case 145:/* 145 "collate ::= COLLATE id", */
{yygotominor.yy52 = sqliteCollateType(yymsp[0].minor.yy210.z, yymsp[0].minor.yy210.n);}
break;
case 146:/* 146 "groupby_opt ::=", */
{yygotominor.yy62 = 0;}
break;
case 147:/* 147 "groupby_opt ::= GROUP BY exprlist", */
{yygotominor.yy62 = yymsp[0].minor.yy62;}
break;
case 148:/* 148 "having_opt ::=", */
{yygotominor.yy334 = 0;}
break;
case 149:/* 149 "having_opt ::= HAVING expr", */
{yygotominor.yy334 = yymsp[0].minor.yy334;}
break;
case 150:/* 150 "limit_opt ::=", */
{yygotominor.yy280.limit = -1; yygotominor.yy280.offset = 0;}
break;
case 151:/* 151 "limit_opt ::= LIMIT signed", */
{yygotominor.yy280.limit = yymsp[0].minor.yy52; yygotominor.yy280.offset = 0;}
break;
case 152:/* 152 "limit_opt ::= LIMIT signed OFFSET signed",*/
{yygotominor.yy280.limit = yymsp[-2].minor.yy52; yygotominor.yy280.offset = yymsp[0].minor.yy52;}
break;
case 153:/* 153 "limit_opt ::= LIMIT signed COMMA signed", */
{yygotominor.yy280.limit = yymsp[0].minor.yy52; yygotominor.yy280.offset = yymsp[-2].minor.yy52;}
break;
case 154:/* 154 "cmd ::= DELETE FROM nm dbnm where_opt", */
{
sqliteDeleteFrom(pParse, sqliteSrcListAppend(0,&yymsp[-2].minor.yy210,&yymsp[-1].minor.yy210), yymsp[0].minor.yy334);
}
break;
case 155:/* 155 "where_opt ::=", */
{yygotominor.yy334 = 0;}
break;
case 156:/* 156 "where_opt ::= WHERE expr",*/
{yygotominor.yy334 = yymsp[0].minor.yy334;}
break;
case 157:/* 157 "cmd ::= UPDATE orconf nm dbnm SET setlist where_opt", */
{sqliteUpdate(pParse,sqliteSrcListAppend(0,&yymsp[-4].minor.yy210,&yymsp[-3].minor.yy210),yymsp[-1].minor.yy62,yymsp[0].minor.yy334,yymsp[-5].minor.yy52);}
break;
case 158:/* 158 "setlist ::= setlist COMMA nm EQ expr",*/
{yygotominor.yy62 = sqliteExprListAppend(yymsp[-4].minor.yy62,yymsp[0].minor.yy334,&yymsp[-2].minor.yy210);}
break;
case 159:/* 159 "setlist ::= nm EQ expr", */
{yygotominor.yy62 = sqliteExprListAppend(0,yymsp[0].minor.yy334,&yymsp[-2].minor.yy210);}
break;
case 160:/* 160 "cmd ::= insert_cmd INTO nm dbnm inscollist_opt VALUES LP itemlist RP",*/
{sqliteInsert(pParse,
sqliteSrcListAppend(0,&yymsp[-6].minor.yy210,&yymsp[-5].minor.yy210),
yymsp[-1].minor.yy62, 0, yymsp[-4].minor.yy92, yymsp[-8].minor.yy52);}
break;
case 161:/* 161 "cmd ::= insert_cmd INTO nm dbnm inscollist_opt select", */
{sqliteInsert(pParse,
sqliteSrcListAppend(0,&yymsp[-3].minor.yy210,&yymsp[-2].minor.yy210),
0, yymsp[0].minor.yy11, yymsp[-1].minor.yy92, yymsp[-5].minor.yy52);}
break;
case 162:/* 162 "insert_cmd ::= INSERT orconf",*/
{yygotominor.yy52 = yymsp[0].minor.yy52;}
break;
case 163:/* 163 "insert_cmd ::= REPLACE", */
{yygotominor.yy52 = OE_Replace;}
break;
case 164:/* 164 "itemlist ::= itemlist COMMA expr",*/
{yygotominor.yy62 = sqliteExprListAppend(yymsp[-2].minor.yy62,yymsp[0].minor.yy334,0);}
break;
case 165:/* 165 "itemlist ::= expr", */
{yygotominor.yy62 = sqliteExprListAppend(0,yymsp[0].minor.yy334,0);}
break;
case 166:/* 166 "inscollist_opt ::=", */
{yygotominor.yy92 = 0;}
break;
case 167:/* 167 "inscollist_opt ::= LP inscollist RP", */
{yygotominor.yy92 = yymsp[-1].minor.yy92;}
break;
case 168:/* 168 "inscollist ::= inscollist COMMA nm", */
{yygotominor.yy92 = sqliteIdListAppend(yymsp[-2].minor.yy92,&yymsp[0].minor.yy210);}
break;
case 169:/* 169 "inscollist ::= nm", */
{yygotominor.yy92 = sqliteIdListAppend(0,&yymsp[0].minor.yy210);}
break;
case 170:/* 170 "expr ::= LP expr RP", */
{yygotominor.yy334
= yymsp[-1].minor.yy334;
sqliteExprSpan(yygotominor.yy334,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
}
break;
case 171:/* 171 "expr ::= NULL", */
{yygotominor.yy334 = sqliteExpr(TK_NULL, 0, 0, &yymsp[0].minor.yy0);}
break;
case 172:/* 172 "expr ::= ID", */
{yygotominor.yy334 = sqliteExpr(TK_ID, 0, 0, &yymsp[0].minor.yy0);}
break;
case 173:/* 173 "expr ::= JOIN_KW",*/
{yygotominor.yy334 = sqliteExpr(TK_ID, 0, 0, &yymsp[0].minor.yy0);}
break;
case 174:/* 174 "expr ::= nm DOT nm", */
{
Expr *temp1 = sqliteExpr(TK_ID, 0, 0, &yymsp[-2].minor.yy210);
Expr *temp2 = sqliteExpr(TK_ID, 0, 0, &yymsp[0].minor.yy210);
yygotominor.yy334 = sqliteExpr(TK_DOT, temp1, temp2, 0);
}
break;
case 175:/* 175 "expr ::= nm DOT nm DOT nm", */
{
Expr *temp1 = sqliteExpr(TK_ID, 0, 0, &yymsp[-4].minor.yy210);
Expr *temp2 = sqliteExpr(TK_ID, 0, 0, &yymsp[-2].minor.yy210);
Expr *temp3 = sqliteExpr(TK_ID, 0, 0, &yymsp[0].minor.yy210);
Expr *temp4 = sqliteExpr(TK_DOT, temp2, temp3, 0);
yygotominor.yy334 = sqliteExpr(TK_DOT, temp1, temp4, 0);
}
break;
case 176:/* 176 "expr ::= INTEGER",*/
{yygotominor.yy334 = sqliteExpr(TK_INTEGER, 0, 0, &yymsp[0].minor.yy0);}
break;
case 177:/* 177 "expr ::= FLOAT", */
{yygotominor.yy334 = sqliteExpr(TK_FLOAT, 0, 0, &yymsp[0].minor.yy0);}
break;
case 178:/* 178 "expr ::= STRING", */
{yygotominor.yy334 = sqliteExpr(TK_STRING, 0, 0, &yymsp[0].minor.yy0);}
break;
case 179:/* 179 "expr ::= VARIABLE", */
{
yygotominor.yy334 = sqliteExpr(TK_VARIABLE, 0, 0, &yymsp[0].minor.yy0);
if( yygotominor.yy334 ) yygotominor.yy334->iTable = ++pParse->nVar;
}
break;
case 180:/* 180 "expr ::= ID LP exprlist RP", */
{
yygotominor.yy334 = sqliteExprFunction(yymsp[-1].minor.yy62, &yymsp[-3].minor.yy0);
sqliteExprSpan(yygotominor.yy334,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0);
}
break;
case 181:/* 181 "expr ::= ID LP STAR RP", */
{
yygotominor.yy334 = sqliteExprFunction(0, &yymsp[-3].minor.yy0);
sqliteExprSpan(yygotominor.yy334,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0);
}
break;
case 182:/* 182 "expr ::= expr AND expr", */
{yygotominor.yy334 = sqliteExpr(TK_AND, yymsp[-2].minor.yy334, yymsp[0].minor.yy334, 0);}
break;
case 183:/* 183 "expr ::= expr OR expr", */
{yygotominor.yy334 = sqliteExpr(TK_OR, yymsp[-2].minor.yy334, yymsp[0].minor.yy334, 0);}
break;
case 184:/* 184 "expr ::= expr LT expr", */
{yygotominor.yy334 = sqliteExpr(TK_LT, yymsp[-2].minor.yy334, yymsp[0].minor.yy334, 0);}
break;
case 185:/* 185 "expr ::= expr GT expr", */
{yygotominor.yy334 = sqliteExpr(TK_GT, yymsp[-2].minor.yy334, yymsp[0].minor.yy334, 0);}
break;
case 186:/* 186 "expr ::= expr LE expr", */
{yygotominor.yy334 = sqliteExpr(TK_LE, yymsp[-2].minor.yy334, yymsp[0].minor.yy334, 0);}
break;
case 187:/* 187 "expr ::= expr GE expr", */
{yygotominor.yy334 = sqliteExpr(TK_GE, yymsp[-2].minor.yy334, yymsp[0].minor.yy334, 0);}
break;
case 188:/* 188 "expr ::= expr NE expr", */
{yygotominor.yy334 = sqliteExpr(TK_NE, yymsp[-2].minor.yy334, yymsp[0].minor.yy334, 0);}
break;
case 189:/* 189 "expr ::= expr EQ expr", */
{yygotominor.yy334 = sqliteExpr(TK_EQ, yymsp[-2].minor.yy334, yymsp[0].minor.yy334, 0);}
break;
case 190:/* 190 "expr ::= expr BITAND expr", */
{yygotominor.yy334 = sqliteExpr(TK_BITAND, yymsp[-2].minor.yy334, yymsp[0].minor.yy334, 0);}
break;
case 191:/* 191 "expr ::= expr BITOR expr",*/
{yygotominor.yy334 = sqliteExpr(TK_BITOR, yymsp[-2].minor.yy334, yymsp[0].minor.yy334, 0);}
break;
case 192:/* 192 "expr ::= expr LSHIFT expr", */
{yygotominor.yy334 = sqliteExpr(TK_LSHIFT, yymsp[-2].minor.yy334, yymsp[0].minor.yy334, 0);}
break;
case 193:/* 193 "expr ::= expr RSHIFT expr", */
{yygotominor.yy334 = sqliteExpr(TK_RSHIFT, yymsp[-2].minor.yy334, yymsp[0].minor.yy334, 0);}
break;
case 194:/* 194 "expr ::= expr likeop expr", */
{
ExprList *pList = sqliteExprListAppend(0, yymsp[0].minor.yy334, 0);
pList = sqliteExprListAppend(pList, yymsp[-2].minor.yy334, 0);
yygotominor.yy334 = sqliteExprFunction(pList, 0);
if( yygotominor.yy334 ) yygotominor.yy334->op = yymsp[-1].minor.yy52;
sqliteExprSpan(yygotominor.yy334, &yymsp[-2].minor.yy334->span, &yymsp[0].minor.yy334->span);
}
break;
case 195:/* 195 "expr ::= expr NOT likeop expr", */
{
ExprList *pList = sqliteExprListAppend(0, yymsp[0].minor.yy334, 0);
pList = sqliteExprListAppend(pList, yymsp[-3].minor.yy334, 0);
yygotominor.yy334 = sqliteExprFunction(pList, 0);
if( yygotominor.yy334 ) yygotominor.yy334->op = yymsp[-1].minor.yy52;
yygotominor.yy334 = sqliteExpr(TK_NOT, yygotominor.yy334, 0, 0);
sqliteExprSpan(yygotominor.yy334,&yymsp[-3].minor.yy334->span,&yymsp[0].minor.yy334->span);
}
break;
case 196:/* 196 "likeop ::= LIKE", */
{yygotominor.yy52 = TK_LIKE;}
break;
case 197:/* 197 "likeop ::= GLOB", */
{yygotominor.yy52 = TK_GLOB;}
break;
case 198:/* 198 "expr ::= expr PLUS expr", */
{yygotominor.yy334 = sqliteExpr(TK_PLUS, yymsp[-2].minor.yy334, yymsp[0].minor.yy334, 0);}
break;
case 199:/* 199 "expr ::= expr MINUS expr",*/
{yygotominor.yy334 = sqliteExpr(TK_MINUS, yymsp[-2].minor.yy334, yymsp[0].minor.yy334, 0);}
break;
case 200:/* 200 "expr ::= expr STAR expr", */
{yygotominor.yy334 = sqliteExpr(TK_STAR, yymsp[-2].minor.yy334, yymsp[0].minor.yy334, 0);}
break;
case 201:/* 201 "expr ::= expr SLASH expr",*/
{yygotominor.yy334 = sqliteExpr(TK_SLASH, yymsp[-2].minor.yy334, yymsp[0].minor.yy334, 0);}
break;
case 202:/* 202 "expr ::= expr REM expr", */
{yygotominor.yy334 = sqliteExpr(TK_REM, yymsp[-2].minor.yy334, yymsp[0].minor.yy334, 0);}
break;
case 203:/* 203 "expr ::= expr CONCAT expr", */
{yygotominor.yy334 = sqliteExpr(TK_CONCAT, yymsp[-2].minor.yy334, yymsp[0].minor.yy334, 0);}
break;
case 204:/* 204 "expr ::= expr ISNULL",*/
{
yygotominor.yy334 = sqliteExpr(TK_ISNULL, yymsp[-1].minor.yy334, 0, 0);
sqliteExprSpan(yygotominor.yy334,&yymsp[-1].minor.yy334->span,&yymsp[0].minor.yy0);
}
break;
case 205:/* 205 "expr ::= expr IS NULL", */
{
yygotominor.yy334 = sqliteExpr(TK_ISNULL, yymsp[-2].minor.yy334, 0, 0);
sqliteExprSpan(yygotominor.yy334,&yymsp[-2].minor.yy334->span,&yymsp[0].minor.yy0);
}
break;
case 206:/* 206 "expr ::= expr NOTNULL", */
{
yygotominor.yy334 = sqliteExpr(TK_NOTNULL, yymsp[-1].minor.yy334, 0, 0);
sqliteExprSpan(yygotominor.yy334,&yymsp[-1].minor.yy334->span,&yymsp[0].minor.yy0);
}
break;
case 207:/* 207 "expr ::= expr NOT NULL", */
{
yygotominor.yy334 = sqliteExpr(TK_NOTNULL, yymsp[-2].minor.yy334, 0, 0);
sqliteExprSpan(yygotominor.yy334,&yymsp[-2].minor.yy334->span,&yymsp[0].minor.yy0);
}
break;
case 208:/* 208 "expr ::= expr IS NOT NULL", */
{
yygotominor.yy334 = sqliteExpr(TK_NOTNULL, yymsp[-3].minor.yy334, 0, 0);
sqliteExprSpan(yygotominor.yy334,&yymsp[-3].minor.yy334->span,&yymsp[0].minor.yy0);
}
break;
case 209:/* 209 "expr ::= NOT expr", */
{
yygotominor.yy334 = sqliteExpr(TK_NOT, yymsp[0].minor.yy334, 0, 0);
sqliteExprSpan(yygotominor.yy334,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy334->span);
}
break;
case 210: /* 210 "expr ::= BITNOT expr",*/
{
yygotominor.yy334 = sqliteExpr(TK_BITNOT, yymsp[0].minor.yy334, 0, 0);
sqliteExprSpan(yygotominor.yy334,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy334->span);
}
break;
case 211:/* 211 "expr ::= MINUS expr", */
{
yygotominor.yy334 = sqliteExpr(TK_UMINUS, yymsp[0].minor.yy334, 0, 0);
sqliteExprSpan(yygotominor.yy334,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy334->span);
}
break;
case 212:/* 212 "expr ::= PLUS expr", */
{
yygotominor.yy334 = sqliteExpr(TK_UPLUS, yymsp[0].minor.yy334, 0, 0);
sqliteExprSpan(yygotominor.yy334,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy334->span);
}
break;
case 213:/* 213 "expr ::= LP select RP", */
{
yygotominor.yy334 = sqliteExpr(TK_SELECT, 0, 0, 0);
if( yygotominor.yy334 ) yygotominor.yy334->pSelect = yymsp[-1].minor.yy11;
sqliteExprSpan(yygotominor.yy334,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
}
break;
case 214:/* 214 "expr ::= expr BETWEEN expr AND expr", */
{
ExprList *pList = sqliteExprListAppend(0, yymsp[-2].minor.yy334, 0);
pList = sqliteExprListAppend(pList, yymsp[0].minor.yy334, 0);
yygotominor.yy334 = sqliteExpr(TK_BETWEEN, yymsp[-4].minor.yy334, 0, 0);
if( yygotominor.yy334 ) yygotominor.yy334->pList = pList;
sqliteExprSpan(yygotominor.yy334,&yymsp[-4].minor.yy334->span,&yymsp[0].minor.yy334->span);
}
break;
case 215:/* 215 "expr ::= expr NOT BETWEEN expr AND expr", */
{
ExprList *pList = sqliteExprListAppend(0, yymsp[-2].minor.yy334, 0);
pList = sqliteExprListAppend(pList, yymsp[0].minor.yy334, 0);
yygotominor.yy334 = sqliteExpr(TK_BETWEEN, yymsp[-5].minor.yy334, 0, 0);
if( yygotominor.yy334 ) yygotominor.yy334->pList = pList;
yygotominor.yy334 = sqliteExpr(TK_NOT, yygotominor.yy334, 0, 0);
sqliteExprSpan(yygotominor.yy334,&yymsp[-5].minor.yy334->span,&yymsp[0].minor.yy334->span);
}
break;
case 216:/* 216 "expr ::= expr IN LP exprlist RP", */
{
yygotominor.yy334 = sqliteExpr(TK_IN, yymsp[-4].minor.yy334, 0, 0);
if( yygotominor.yy334 ) yygotominor.yy334->pList = yymsp[-1].minor.yy62;
sqliteExprSpan(yygotominor.yy334,&yymsp[-4].minor.yy334->span,&yymsp[0].minor.yy0);
}
break;
case 217:/* 217 "expr ::= expr IN LP select RP", */
{
yygotominor.yy334 = sqliteExpr(TK_IN, yymsp[-4].minor.yy334, 0, 0);
if( yygotominor.yy334 ) yygotominor.yy334->pSelect = yymsp[-1].minor.yy11;
sqliteExprSpan(yygotominor.yy334,&yymsp[-4].minor.yy334->span,&yymsp[0].minor.yy0);
}
break;
case 218:/* 218 "expr ::= expr NOT IN LP exprlist RP", */
{
yygotominor.yy334 = sqliteExpr(TK_IN, yymsp[-5].minor.yy334, 0, 0);
if( yygotominor.yy334 ) yygotominor.yy334->pList = yymsp[-1].minor.yy62;
yygotominor.yy334 = sqliteExpr(TK_NOT, yygotominor.yy334, 0, 0);
sqliteExprSpan(yygotominor.yy334,&yymsp[-5].minor.yy334->span,&yymsp[0].minor.yy0);
}
break;
case 219:/* 219 "expr ::= expr NOT IN LP select RP", */
{
yygotominor.yy334 = sqliteExpr(TK_IN, yymsp[-5].minor.yy334, 0, 0);
if( yygotominor.yy334 ) yygotominor.yy334->pSelect = yymsp[-1].minor.yy11;
yygotominor.yy334 = sqliteExpr(TK_NOT, yygotominor.yy334, 0, 0);
sqliteExprSpan(yygotominor.yy334,&yymsp[-5].minor.yy334->span,&yymsp[0].minor.yy0);
}
break;
case 220:/* 220 "expr ::= CASE case_operand case_exprlist case_else END", */
{
yygotominor.yy334 = sqliteExpr(TK_CASE, yymsp[-3].minor.yy334, yymsp[-1].minor.yy334, 0);
if( yygotominor.yy334 ) yygotominor.yy334->pList = yymsp[-2].minor.yy62;
sqliteExprSpan(yygotominor.yy334, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0);
}
break;
case 221:/* 221 "case_exprlist ::= case_exprlist WHEN expr THEN expr", */
{
yygotominor.yy62 = sqliteExprListAppend(yymsp[-4].minor.yy62, yymsp[-2].minor.yy334, 0);
yygotominor.yy62 = sqliteExprListAppend(yygotominor.yy62, yymsp[0].minor.yy334, 0);
}
break;
case 222:/* 222 "case_exprlist ::= WHEN expr THEN expr", */
{
yygotominor.yy62 = sqliteExprListAppend(0, yymsp[-2].minor.yy334, 0);
yygotominor.yy62 = sqliteExprListAppend(yygotominor.yy62, yymsp[0].minor.yy334, 0);
}
break;
case 223:/* 223 "case_else ::= ELSE expr", */
{yygotominor.yy334 = yymsp[0].minor.yy334;}
break;
case 224:/* 224 "case_else ::=", */
{yygotominor.yy334 = 0;}
break;
case 225:/* 225 "case_operand ::= expr", */
{yygotominor.yy334 = yymsp[0].minor.yy334;}
break;
case 226:/* 226 "case_operand ::=",*/
{yygotominor.yy334 = 0;}
break;
case 227:/* 227 "exprlist ::= exprlist COMMA expritem",*/
{yygotominor.yy62 = sqliteExprListAppend(yymsp[-2].minor.yy62,yymsp[0].minor.yy334,0);}
break;
case 228:/* 228 "exprlist ::= expritem", */
{yygotominor.yy62 = sqliteExprListAppend(0,yymsp[0].minor.yy334,0);}
break;
case 229:/* 229 "expritem ::= expr", */
{yygotominor.yy334 = yymsp[0].minor.yy334;}
break;
case 230:/* 230 "expritem ::=",*/
{yygotominor.yy334 = 0;}
break;
case 231:/* 231 "cmd ::= CREATE uniqueflag INDEX nm ON nm dbnm LP idxlist RP onconf", */
{
SrcList *pSrc = sqliteSrcListAppend(0, &yymsp[-5].minor.yy210, &yymsp[-4].minor.yy210);
if( yymsp[-9].minor.yy52!=OE_None ) yymsp[-9].minor.yy52 = yymsp[0].minor.yy52;
if( yymsp[-9].minor.yy52==OE_Default) yymsp[-9].minor.yy52 = OE_Abort;
sqliteCreateIndex(pParse, &yymsp[-7].minor.yy210, pSrc,
yymsp[-2].minor.yy92, yymsp[-9].minor.yy52, &yymsp[-10].minor.yy0,
&yymsp[-1].minor.yy0);
}
break;
case 232:/* 232 "uniqueflag ::= UNIQUE", */
{ yygotominor.yy52 = OE_Abort; }
break;
case 233:/* 233 "uniqueflag ::=", */
{ yygotominor.yy52 = OE_None; }
break;
case 234:/* 234 "idxlist_opt ::=", */
{yygotominor.yy92 = 0;}
break;
case 235:/* 235 "idxlist_opt ::= LP idxlist RP", */
{yygotominor.yy92 = yymsp[-1].minor.yy92;}
break;
case 236:/* 236 "idxlist ::= idxlist COMMA idxitem", */
{yygotominor.yy92 = sqliteIdListAppend(yymsp[-2].minor.yy92,&yymsp[0].minor.yy210);}
break;
case 237:/* 237 "idxlist ::= idxitem", */
{yygotominor.yy92 = sqliteIdListAppend(0,&yymsp[0].minor.yy210);}
break;
case 238:/* 238 "idxitem ::= nm sortorder",*/
{yygotominor.yy210 = yymsp[-1].minor.yy210;}
break;
case 239:/* 239 "cmd ::= DROP INDEX nm dbnm", */
{
sqliteDropIndex(pParse, sqliteSrcListAppend(0,&yymsp[-1].minor.yy210,&yymsp[0].minor.yy210));
}
break;
case 240:/* 240 "cmd ::= COPY orconf nm dbnm FROM nm USING DELIMITERS STRING", */
{sqliteCopy(pParse,sqliteSrcListAppend(0,&yymsp[-6].minor.yy210,&yymsp[-5].minor.yy210),&yymsp[-3].minor.yy210,&yymsp[0].minor.yy0,yymsp[-7].minor.yy52);}
break;
case 241:/* 241 "cmd ::= COPY orconf nm dbnm FROM nm", */
{sqliteCopy(pParse,sqliteSrcListAppend(0,&yymsp[-3].minor.yy210,&yymsp[-2].minor.yy210),&yymsp[0].minor.yy210,0,yymsp[-4].minor.yy52);}
break;
case 242:/* 242 "cmd ::= VACUUM", */
{sqliteVacuum(pParse,0);}
break;
case 243:/* 243 "cmd ::= VACUUM nm", */
{sqliteVacuum(pParse,&yymsp[0].minor.yy210);}
break;
case 244:/* 244 "cmd ::= PRAGMA ids EQ nm",*/
{sqlitePragma(pParse,&yymsp[-2].minor.yy210,&yymsp[0].minor.yy210,0);}
break;
case 245:/* 245 "cmd ::= PRAGMA ids EQ ON",*/
{sqlitePragma(pParse,&yymsp[-2].minor.yy210,&yymsp[0].minor.yy0,0);}
break;
case 246:/* 246 "cmd ::= PRAGMA ids EQ plus_num", */
{sqlitePragma(pParse,&yymsp[-2].minor.yy210,&yymsp[0].minor.yy210,0);}
break;
case 247:/* 247 "cmd ::= PRAGMA ids EQ minus_num", */
{sqlitePragma(pParse,&yymsp[-2].minor.yy210,&yymsp[0].minor.yy210,1);}
break;
case 248:/* 248 "cmd ::= PRAGMA ids LP nm RP", */
{sqlitePragma(pParse,&yymsp[-3].minor.yy210,&yymsp[-1].minor.yy210,0);}
break;
case 249:/* 249 "cmd ::= PRAGMA ids", */
{sqlitePragma(pParse,&yymsp[0].minor.yy210,&yymsp[0].minor.yy210,0);}
break;
case 250: /* 250 "plus_num ::= plus_opt number",*/
{yygotominor.yy210 = yymsp[0].minor.yy210;}
break;
case 251:/* 251 "minus_num ::= MINUS number", */
{yygotominor.yy210 = yymsp[0].minor.yy210;}
break;
case 252:/* 252 "number ::= INTEGER", */
{yygotominor.yy210 = yymsp[0].minor.yy0;}
break;
case 253:/* 253 "number ::= FLOAT",*/
{yygotominor.yy210 = yymsp[0].minor.yy0;}
break;
case 254:/* 254 "plus_opt ::= PLUS", */
break;
case 255:/* 255 "plus_opt ::=",*/
break;
case 256:/* 256 "cmd ::= CREATE trigger_decl BEGIN trigger_cmd_list END", */
{
Token all;
all.z = yymsp[-4].minor.yy0.z;
all.n = (yymsp[0].minor.yy0.z - yymsp[-4].minor.yy0.z) + yymsp[0].minor.yy0.n;
sqliteFinishTrigger(pParse, yymsp[-1].minor.yy347, &all);
}
break;
case 257:/* 257 "trigger_decl ::= temp TRIGGER nm trigger_time trigger_event ON nm dbnm foreach_clause when_clause", */
{
SrcList *pTab = sqliteSrcListAppend(0, &yymsp[-3].minor.yy210, &yymsp[-2].minor.yy210);
sqliteBeginTrigger(pParse, &yymsp[-7].minor.yy210,
yymsp[-6].minor.yy52, yymsp[-5].minor.yy234.a, yymsp[-5].minor.yy234.b,
pTab, yymsp[-1].minor.yy52, yymsp[0].minor.yy270, yymsp[-9].minor.yy52);
}
break;
case 258:/* 258 "trigger_time ::= BEFORE", */
{ yygotominor.yy52 = TK_BEFORE; }
break;
case 259:/* 259 "trigger_time ::= AFTER", */
{ yygotominor.yy52 = TK_AFTER; }
break;
case 260:/* 260 "trigger_time ::= INSTEAD OF", */
{ yygotominor.yy52 = TK_INSTEAD;}
break;
case 261:/* 261 "trigger_time ::=",*/
{ yygotominor.yy52 = TK_BEFORE; }
break;
case 262:/* 262 "trigger_event ::= DELETE",*/
{ yygotominor.yy234.a = TK_DELETE; yygotominor.yy234.b = 0; }
break;
case 263:/* 263 "trigger_event ::= INSERT",*/
{ yygotominor.yy234.a = TK_INSERT; yygotominor.yy234.b = 0; }
break;
case 264:/* 264 "trigger_event ::= UPDATE",*/
{ yygotominor.yy234.a = TK_UPDATE; yygotominor.yy234.b = 0;}
break;
case 265:/* 265 "trigger_event ::= UPDATE OF inscollist", */
{yygotominor.yy234.a = TK_UPDATE; yygotominor.yy234.b = yymsp[0].minor.yy92; }
break;
case 266:/* 266 "foreach_clause ::=", */
{ yygotominor.yy52 = TK_ROW; }
break;
case 267:/* 267 "foreach_clause ::= FOR EACH ROW", */
{ yygotominor.yy52 = TK_ROW; }
break;
case 268:/* 268 "foreach_clause ::= FOR EACH STATEMENT", */
{ yygotominor.yy52 = TK_STATEMENT; }
break;
case 269:/* 269 "when_clause ::=", */
{ yygotominor.yy270 = 0; }
break;
case 270:/* 270 "when_clause ::= WHEN expr", */
{ yygotominor.yy270 = yymsp[0].minor.yy334; }
break;
case 271:/* 271 "trigger_cmd_list ::= trigger_cmd SEMI trigger_cmd_list", */
{
yymsp[-2].minor.yy347->pNext = yymsp[0].minor.yy347;
yygotominor.yy347 = yymsp[-2].minor.yy347;
}
break;
case 272:/* 272 "trigger_cmd_list ::=",*/
{ yygotominor.yy347 = 0; }
break;
case 273:/* 273 "trigger_cmd ::= UPDATE orconf nm SET setlist where_opt", */
{
yygotominor.yy347 = sqliteTriggerUpdateStep(&yymsp[-3].minor.yy210,
yymsp[-1].minor.yy62, yymsp[0].minor.yy334, yymsp[-4].minor.yy52); }
break;
case 274:/* 274 "trigger_cmd ::= INSERT orconf INTO nm inscollist_opt VALUES LP itemlist RP", */
{yygotominor.yy347
= sqliteTriggerInsertStep(&yymsp[-5].minor.yy210,
yymsp[-4].minor.yy92, yymsp[-1].minor.yy62, 0, yymsp[-7].minor.yy52);}
break;
case 275:/* 275 "trigger_cmd ::= INSERT orconf INTO nm inscollist_opt select", */
{yygotominor.yy347
= sqliteTriggerInsertStep(&yymsp[-2].minor.yy210,
yymsp[-1].minor.yy92, 0, yymsp[0].minor.yy11, yymsp[-4].minor.yy52);}
break;
case 276:/* 276 "trigger_cmd ::= DELETE FROM nm where_opt",*/
{yygotominor.yy347 = sqliteTriggerDeleteStep(&yymsp[-1].minor.yy210, yymsp[0].minor.yy334);}
break;
case 277:/* 277 "trigger_cmd ::= select", */
{yygotominor.yy347 = sqliteTriggerSelectStep(yymsp[0].minor.yy11); }
break;
case 278:/* 278 "expr ::= RAISE LP IGNORE RP", */
{
yygotominor.yy334 = sqliteExpr(TK_RAISE, 0, 0, 0);
yygotominor.yy334->iColumn = OE_Ignore;
sqliteExprSpan(yygotominor.yy334, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0);
}
break;
case 279:/* 279 "expr ::= RAISE LP ROLLBACK COMMA nm RP", */
{
yygotominor.yy334 = sqliteExpr(TK_RAISE, 0, 0, &yymsp[-1].minor.yy210);
yygotominor.yy334->iColumn = OE_Rollback;
sqliteExprSpan(yygotominor.yy334, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0);
}
break;
case 280:/* 280 "expr ::= RAISE LP ABORT COMMA nm RP", */
{
yygotominor.yy334 = sqliteExpr(TK_RAISE, 0, 0, &yymsp[-1].minor.yy210);
yygotominor.yy334->iColumn = OE_Abort;
sqliteExprSpan(yygotominor.yy334, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0);
}
break;
case 281:/* 281 "expr ::= RAISE LP FAIL COMMA nm RP", */
{
yygotominor.yy334 = sqliteExpr(TK_RAISE, 0, 0, &yymsp[-1].minor.yy210);
yygotominor.yy334->iColumn = OE_Fail;
sqliteExprSpan(yygotominor.yy334, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0);
}
break;
case 282:/* 282 "cmd ::= DROP TRIGGER nm dbnm",*/
{
sqliteDropTrigger(pParse,sqliteSrcListAppend(0,&yymsp[-1].minor.yy210,&yymsp[0].minor.yy210));
}
break;
case 283:/* 283 "cmd ::= ATTACH database_kw_opt ids AS nm",*/
{
sqliteAttach(pParse, &yymsp[-2].minor.yy210, &yymsp[0].minor.yy210);
}
break;
case 284:/* 284 "database_kw_opt ::= DATABASE",*/
break;
case 285:/* 285 "database_kw_opt ::=", */
break;
case 286:/* 286 "cmd ::= DETACH database_kw_opt nm", */
{
sqliteDetach(pParse, &yymsp[0].minor.yy210);
}
break;
};