diff options
Diffstat (limited to 'third_party/sqlite/src/tool/mkkeywordhash.c')
-rw-r--r-- | third_party/sqlite/src/tool/mkkeywordhash.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/third_party/sqlite/src/tool/mkkeywordhash.c b/third_party/sqlite/src/tool/mkkeywordhash.c index 58e10c8..509aeef 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; } |