SQLite

Check-in [93792bc58a]
Login

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
Timelines: family | ancestors | descendants | both | lemon-improvements
Files: files | file ages | folders
SHA3-256: 93792bc58a2eccc7e07b14307388350bb376db32c5055b79a44e4fa8ff91d58e
User & Date: drh 2017-12-27 15:21:16.478
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: 3fe964873d 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: 93792bc58a 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: 86e30fc284 user: drh tags: lemon-improvements)
Changes
Unified Diff Ignore Whitespace Patch
Changes to tool/lemon.c.
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
  printf(" inserted at %d\n", i);
#endif
  for(j=0; j<p->nLookahead; j++){
    k = p->aLookahead[j].lookahead - p->mnLookahead + i;
    p->aAction[k] = p->aLookahead[j];
    if( k>=p->nAction ) p->nAction = k+1;
  }
  if( makeItSafe && i+p->nterminal>p->nAction ) p->nAction = i+p->nterminal;
  p->nLookahead = 0;

  /* Return the offset that is added to the lookahead in order to get the
  ** index into yy_action of the action */
  return i - p->mnLookahead;
}








|







762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
  printf(" inserted at %d\n", i);
#endif
  for(j=0; j<p->nLookahead; j++){
    k = p->aLookahead[j].lookahead - p->mnLookahead + i;
    p->aAction[k] = p->aLookahead[j];
    if( k>=p->nAction ) p->nAction = k+1;
  }
  if( makeItSafe && i+p->nterminal>=p->nAction ) p->nAction = i+p->nterminal+1;
  p->nLookahead = 0;

  /* Return the offset that is added to the lookahead in order to get the
  ** index into yy_action of the action */
  return i - p->mnLookahead;
}