/ Check-in [6195af49]
Login

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

Overview
Comment:Fix to token destructors in Lemon. This does not impact SQLite. Ticket #2175. (CVS 3753)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:6195af49828bf04b61d24f116339780d3eb926a1
User & Date: drh 2007-03-29 20:13:53
Context
2007-03-29
20:19
Assume any return code from fcntl() other than -1 is success. Formerly we only assumed that 0 was success. Ticket #2173. (CVS 3754) check-in: 8d0073c0 user: drh tags: trunk
20:13
Fix to token destructors in Lemon. This does not impact SQLite. Ticket #2175. (CVS 3753) check-in: 6195af49 user: drh tags: trunk
18:46
Add the sqlite3_clear_bindings() API to the loadable extension interface. Ticket #2135. (CVS 3752) check-in: 3111b43e user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to tool/lemon.c.

3192
3193
3194
3195
3196
3197
3198
3199





3200
3201
3202
3203
3204
3205
3206
3207
3208
  char *cp, *xp;
  int i;
  char lhsused = 0;    /* True if the LHS element has been used */
  char used[MAXRHS];   /* True for each RHS element which is used */

  for(i=0; i<rp->nrhs; i++) used[i] = 0;
  lhsused = 0;






  append_str(0,0,0,0);
  for(cp=(rp->code?rp->code:""); *cp; cp++){
    if( isalpha(*cp) && (cp==rp->code || (!isalnum(cp[-1]) && cp[-1]!='_')) ){
      char saved;
      for(xp= &cp[1]; isalnum(*xp) || *xp=='_'; xp++);
      saved = *xp;
      *xp = 0;
      if( rp->lhsalias && strcmp(cp,rp->lhsalias)==0 ){
        append_str("yygotominor.yy%d",0,rp->lhs->dtnum,0);








>
>
>
>
>

|







3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
  char *cp, *xp;
  int i;
  char lhsused = 0;    /* True if the LHS element has been used */
  char used[MAXRHS];   /* True for each RHS element which is used */

  for(i=0; i<rp->nrhs; i++) used[i] = 0;
  lhsused = 0;

  if( rp->code==0 ){
    rp->code = "\n";
    rp->line = rp->ruleline;
  }

  append_str(0,0,0,0);
  for(cp=rp->code; *cp; cp++){
    if( isalpha(*cp) && (cp==rp->code || (!isalnum(cp[-1]) && cp[-1]!='_')) ){
      char saved;
      for(xp= &cp[1]; isalnum(*xp) || *xp=='_'; xp++);
      saved = *xp;
      *xp = 0;
      if( rp->lhsalias && strcmp(cp,rp->lhsalias)==0 ){
        append_str("yygotominor.yy%d",0,rp->lhs->dtnum,0);