SQLite

Check-in [e059178b47]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix an unreachable branch in sqlite3ParserFallback()
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | lemon-optimization
Files: files | file ages | folders
SHA3-256: e059178b47109caee2c2211b2db6e594c014af636677118a64e10edf01ac017d
User & Date: drh 2019-08-28 11:49:45.616
Context
2019-08-29
00:27
Improve Lemon so that it enlarges some of its tables slightly in order to avoid having to index range checks on table lookups for a performance increase. (check-in: 4be6a23a18 user: drh tags: trunk)
2019-08-28
11:49
Fix an unreachable branch in sqlite3ParserFallback() (Closed-Leaf check-in: e059178b47 user: drh tags: lemon-optimization)
11:31
Further improvements to parser speed by enlarging lookup tables to eliminate the need to do range checking on the index prior to lookup. (check-in: 47d3e091ae user: drh tags: lemon-optimization)
Changes
Unified Diff Ignore Whitespace Patch
Changes to tool/lempar.c.
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074

/*
** Return the fallback token corresponding to canonical token iToken, or
** 0 if iToken has no fallback.
*/
int ParseFallback(int iToken){
#ifdef YYFALLBACK
  if( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) ){
    return yyFallback[iToken];
  }
#else
  (void)iToken;
#endif
  return 0;
}







|
|
<





1060
1061
1062
1063
1064
1065
1066
1067
1068

1069
1070
1071
1072
1073

/*
** Return the fallback token corresponding to canonical token iToken, or
** 0 if iToken has no fallback.
*/
int ParseFallback(int iToken){
#ifdef YYFALLBACK
  assert( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) );
  return yyFallback[iToken];

#else
  (void)iToken;
#endif
  return 0;
}