/ Check-in [0c2fb18d]
Login

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

Overview
Comment:In Lemon, when comparing the output to the *.h file to see if it has changed, make sure that the proposed new output and the preexisting output are the same size before deciding that they are the same.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:0c2fb18d25217ada7e75dcab8b342bbc632875d8
User & Date: drh 2012-06-16 15:26:31
Context
2012-06-18
20:52
Fix a problem with identifying white-space characters outside of the ascii range in the ICU tokenizer. check-in: 892b7411 user: dan tags: trunk
14:23
Add the ieee754() SQL function that interprets a blob as a big-endian double. Arrange for the quote() SQL function to emit ieee754() functions in its output so that floating-point values in the database are exactly preserved by a ".dump" command in the shell. Closed-Leaf check-in: 87597e98 user: drh tags: ieee754-func
08:00
Fix a few compilation issues that can occur with certain compilers (e.g. GCC 2.95.3, MSVC). check-in: f970a3de user: mistachkin tags: compiler-compat
2012-06-16
15:26
In Lemon, when comparing the output to the *.h file to see if it has changed, make sure that the proposed new output and the preexisting output are the same size before deciding that they are the same. check-in: 0c2fb18d user: drh tags: trunk
2012-06-11
02:05
Version 3.7.13 check-in: f5b5a13f user: drh tags: trunk, release, version-3.7.13
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to tool/lemon.c.

  4017   4017     char pattern[LINESIZE];
  4018   4018     int i;
  4019   4019   
  4020   4020     if( lemp->tokenprefix ) prefix = lemp->tokenprefix;
  4021   4021     else                    prefix = "";
  4022   4022     in = file_open(lemp,".h","rb");
  4023   4023     if( in ){
         4024  +    int nextChar;
  4024   4025       for(i=1; i<lemp->nterminal && fgets(line,LINESIZE,in); i++){
  4025   4026         sprintf(pattern,"#define %s%-30s %2d\n",prefix,lemp->symbols[i]->name,i);
  4026   4027         if( strcmp(line,pattern) ) break;
  4027   4028       }
         4029  +    nextChar = fgetc(in);
  4028   4030       fclose(in);
  4029         -    if( i==lemp->nterminal ){
         4031  +    if( i==lemp->nterminal && nextChar==EOF ){
  4030   4032         /* No change in the file.  Don't rewrite it. */
  4031   4033         return;
  4032   4034       }
  4033   4035     }
  4034   4036     out = file_open(lemp,".h","wb");
  4035   4037     if( out ){
  4036   4038       for(i=1; i<lemp->nterminal; i++){