1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Use the sqlite3CtypeMap[] to improve the speed and reduce the size of the

logic in the tokenizer that recognizes identifiers.

FossilOrigin-Name: 1c9243b0760741f48b15efb0da661255177aed8b
This commit is contained in:
drh
2009-11-16 15:11:51 +00:00
parent d93a8b276d
commit af2b572028
5 changed files with 41 additions and 43 deletions

View File

@@ -24,8 +24,7 @@
*/
#ifndef SQLITE_AMALGAMATION
#ifdef SQLITE_ASCII
extern const char sqlite3IsAsciiIdChar[];
#define IdChar(C) (((c=C)&0x80)!=0 || (c>0x1f && sqlite3IsAsciiIdChar[c-0x20]))
#define IdChar(C) ((sqlite3CtypeMap[(unsigned char)C]&0x46)!=0)
#endif
#ifdef SQLITE_EBCDIC
extern const char sqlite3IsEbcdicIdChar[];
@@ -182,7 +181,9 @@ int sqlite3_complete(const char *zSql){
break;
}
default: {
int c;
#ifdef SQLITE_EBCDIC
unsigned char c;
#endif
if( IdChar((u8)*zSql) ){
/* Keywords and unquoted identifiers */
int nId;