Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: third_party/sqlite/src/tool/mkkeywordhash.c

Issue 6990047: Import SQLite 3.7.6.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/tool/lempar.c ('k') | third_party/sqlite/src/tool/mksqlite3c.tcl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/tool/mkkeywordhash.c
diff --git a/third_party/sqlite/src/tool/mkkeywordhash.c b/third_party/sqlite/src/tool/mkkeywordhash.c
index 58e10c8246756b4a67ef9a1754d4a52a5036ea0c..509aeef9ea0a4e3b579e9bcf45004f8fbda9807f 100644
--- a/third_party/sqlite/src/tool/mkkeywordhash.c
+++ b/third_party/sqlite/src/tool/mkkeywordhash.c
@@ -16,7 +16,7 @@ static const char zHdr[] =
"**\n"
"** The code in this file has been automatically generated by\n"
"**\n"
- "** $Header: /home/drh/sqlite/trans/cvs/sqlite/sqlite/tool/mkkeywordhash.c,v 1.38 2009/06/09 14:27:41 drh Exp $\n"
+ "** sqlite/tool/mkkeywordhash.c\n"
"**\n"
"** The code in this file implements a function that determines whether\n"
"** or not a given identifier is really an SQL keyword. The same thing\n"
@@ -144,6 +144,7 @@ struct Keyword {
*/
static Keyword aKeywordTable[] = {
{ "ABORT", "TK_ABORT", CONFLICT|TRIGGER },
+ { "ACTION", "TK_ACTION", FKEY },
{ "ADD", "TK_ADD", ALTER },
{ "AFTER", "TK_AFTER", TRIGGER },
{ "ALL", "TK_ALL", ALWAYS },
@@ -218,6 +219,7 @@ static Keyword aKeywordTable[] = {
{ "LIMIT", "TK_LIMIT", ALWAYS },
{ "MATCH", "TK_MATCH", ALWAYS },
{ "NATURAL", "TK_JOIN_KW", ALWAYS },
+ { "NO", "TK_NO", FKEY },
{ "NOT", "TK_NOT", ALWAYS },
{ "NOTNULL", "TK_NOTNULL", ALWAYS },
{ "NULL", "TK_NULL", ALWAYS },
@@ -299,6 +301,7 @@ static int keywordCompare1(const void *a, const void *b){
if( n==0 ){
n = strcmp(pA->zName, pB->zName);
}
+ assert( n!=0 );
return n;
}
static int keywordCompare2(const void *a, const void *b){
@@ -308,12 +311,15 @@ static int keywordCompare2(const void *a, const void *b){
if( n==0 ){
n = strcmp(pA->zName, pB->zName);
}
+ assert( n!=0 );
return n;
}
static int keywordCompare3(const void *a, const void *b){
const Keyword *pA = (Keyword*)a;
const Keyword *pB = (Keyword*)b;
int n = pA->offset - pB->offset;
+ if( n==0 ) n = pB->id - pA->id;
+ assert( n!=0 );
return n;
}
@@ -590,6 +596,7 @@ int main(int argc, char **argv){
printf("int sqlite3KeywordCode(const unsigned char *z, int n){\n");
printf(" return keywordCode((char*)z, n);\n");
printf("}\n");
+ printf("#define SQLITE_N_KEYWORD %d\n", nKeyword);
return 0;
}
« no previous file with comments | « third_party/sqlite/src/tool/lempar.c ('k') | third_party/sqlite/src/tool/mksqlite3c.tcl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698