1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

In lemon: omit unused entries from the end of the yyFallback array. (CVS 6754)

FossilOrigin-Name: 9cfbe2ba68470a2850a7d7a64eb088f7b422a3e5
This commit is contained in:
drh
2009-06-12 12:50:50 +00:00
parent 994704d1cb
commit 1441f3e083
3 changed files with 10 additions and 8 deletions

View File

@ -3814,7 +3814,9 @@ int mhflag; /* Output in makeheaders format if true */
/* Generate the table of fallback tokens.
*/
if( lemp->has_fallback ){
for(i=0; i<lemp->nterminal; i++){
int mx = lemp->nterminal - 1;
while( mx>0 && lemp->symbols[mx]->fallback==0 ){ mx--; }
for(i=0; i<=mx; i++){
struct symbol *p = lemp->symbols[i];
if( p->fallback==0 ){
fprintf(out, " 0, /* %10s => nothing */\n", p->name);