1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-16 23:02:26 +03:00

Save a few bytes in the parser by using "int" instead of "u8" or "u16" for

all small integer types.

FossilOrigin-Name: 5dcd212bf6489f4698a0ed0f21497c78379f7c0f
This commit is contained in:
drh
2015-11-10 13:45:21 +00:00
parent 634b242ebe
commit 3334d08989
3 changed files with 12 additions and 13 deletions

View File

@@ -174,7 +174,7 @@ create_table_args ::= AS select(S). {
sqlite3EndTable(pParse,0,0,0,S);
sqlite3SelectDelete(pParse->db, S);
}
%type table_options {u8}
%type table_options {int}
table_options(A) ::= . {A = 0;}
table_options(A) ::= WITHOUT nm(X). {
if( X.n==5 && sqlite3_strnicmp(X.z,"rowid",5)==0 ){
@@ -376,12 +376,12 @@ defer_subclause_opt(A) ::= defer_subclause(X). {A = X;}
// default behavior when there is a constraint conflict.
//
%type onconf {int}
%type orconf {u8}
%type orconf {int}
%type resolvetype {int}
onconf(A) ::= . {A = OE_Default;}
onconf(A) ::= ON CONFLICT resolvetype(X). {A = X;}
orconf(A) ::= . {A = OE_Default;}
orconf(A) ::= OR resolvetype(X). {A = (u8)X;}
orconf(A) ::= OR resolvetype(X). {A = X;}
resolvetype(A) ::= raisetype(X). {A = X;}
resolvetype(A) ::= IGNORE. {A = OE_Ignore;}
resolvetype(A) ::= REPLACE. {A = OE_Replace;}
@@ -538,7 +538,7 @@ values(A) ::= values(X) COMMA LP exprlist(Y) RP. {
// The "distinct" nonterminal is true (1) if the DISTINCT keyword is
// present and false (0) if it is not.
//
%type distinct {u16}
%type distinct {int}
distinct(A) ::= DISTINCT. {A = SF_Distinct;}
distinct(A) ::= ALL. {A = SF_All;}
distinct(A) ::= . {A = 0;}
@@ -811,7 +811,7 @@ cmd ::= with(W) insert_cmd(R) INTO fullname(X) idlist_opt(F) DEFAULT VALUES.
sqlite3Insert(pParse, X, 0, F, R);
}
%type insert_cmd {u8}
%type insert_cmd {int}
insert_cmd(A) ::= INSERT orconf(R). {A = R;}
insert_cmd(A) ::= REPLACE. {A = OE_Replace;}