/ Check-in [e059178b]
Login

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

Overview
Comment:Fix an unreachable branch in sqlite3ParserFallback()
Downloads: Tarball | ZIP archive | SQL 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
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: 4be6a23a user: drh tags: trunk
2019-08-28
11:49
Fix an unreachable branch in sqlite3ParserFallback() Closed-Leaf check-in: e059178b 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: 47d3e091 user: drh tags: lemon-optimization
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to tool/lempar.c.

  1060   1060   
  1061   1061   /*
  1062   1062   ** Return the fallback token corresponding to canonical token iToken, or
  1063   1063   ** 0 if iToken has no fallback.
  1064   1064   */
  1065   1065   int ParseFallback(int iToken){
  1066   1066   #ifdef YYFALLBACK
  1067         -  if( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) ){
  1068         -    return yyFallback[iToken];
  1069         -  }
         1067  +  assert( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) );
         1068  +  return yyFallback[iToken];
  1070   1069   #else
  1071   1070     (void)iToken;
  1072   1071   #endif
  1073   1072     return 0;
  1074   1073   }