/ Check-in [93792bc5]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:In LEMON, fix an off-by-one error that can make the lookahead table one byte too smal.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | lemon-improvements
Files: files | file ages | folders
SHA3-256: 93792bc58a2eccc7e07b14307388350bb376db32c5055b79a44e4fa8ff91d58e
User & Date: drh 2017-12-27 15:21:16
Context
2017-12-27
16:13
In the lemon-generated parser, do not report the End-of-input character and the wildcard character as missed coverage. check-in: 3fe96487 user: drh tags: lemon-improvements
15:21
In LEMON, fix an off-by-one error that can make the lookahead table one byte too smal. check-in: 93792bc5 user: drh tags: lemon-improvements
2017-12-26
18:32
Change the lemon-parser coverage report format to report all state/lookahead pairs and indicate on each whether it is hit or missed. check-in: 86e30fc2 user: drh tags: lemon-improvements
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to tool/lemon.c.

   762    762     printf(" inserted at %d\n", i);
   763    763   #endif
   764    764     for(j=0; j<p->nLookahead; j++){
   765    765       k = p->aLookahead[j].lookahead - p->mnLookahead + i;
   766    766       p->aAction[k] = p->aLookahead[j];
   767    767       if( k>=p->nAction ) p->nAction = k+1;
   768    768     }
   769         -  if( makeItSafe && i+p->nterminal>p->nAction ) p->nAction = i+p->nterminal;
          769  +  if( makeItSafe && i+p->nterminal>=p->nAction ) p->nAction = i+p->nterminal+1;
   770    770     p->nLookahead = 0;
   771    771   
   772    772     /* Return the offset that is added to the lookahead in order to get the
   773    773     ** index into yy_action of the action */
   774    774     return i - p->mnLookahead;
   775    775   }
   776    776