Changeset 4236

Show
Ignore:
Timestamp:
11/12/06 19:36:15 (7 years ago)
Author:
mmh
Message:

Two minor cleanups: 1) remove the yymore() calls, they're no longer necessary;
and 2) make the quoted escape sequence rules a little more compact. The first
cleanup is said to yield a slight speedup according to the flex manual - I
didn't bother to measure it.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/lib/conf-lex.l

    r4235 r4236  
    153153[a-z]+          | 
    154154.               { 
    155                   yymore(); 
    156155                  BEGIN(ERR); 
    157156                  strcpy(sensors_lex_error,"Invalid keyword"); 
     
    251250[[:digit:]]*\.  | 
    252251\\{BLANK}*      { 
    253                   yymore(); 
    254252                  BEGIN(ERR); 
    255253                  return ERROR; 
     
    305303                } 
    306304 
    307 \\a             { 
    308                   buffer_add_char("\a"); 
    309                 } 
    310  
    311 \\b             { 
    312                   buffer_add_char("\b"); 
    313                 } 
    314  
    315 \\f             { 
    316                   buffer_add_char("\f"); 
    317                 } 
    318  
    319 \\n             { 
    320                   buffer_add_char("\n"); 
    321                 } 
    322  
    323 \\r             { 
    324                   buffer_add_char("\r"); 
    325                 } 
    326  
    327 \\t             { 
    328                   buffer_add_char("\t"); 
    329                 } 
    330  
    331 \\v             { 
    332                   buffer_add_char("\v"); 
    333                 } 
     305\\a             buffer_add_char("\a"); 
     306\\b             buffer_add_char("\b"); 
     307\\f             buffer_add_char("\f"); 
     308\\n             buffer_add_char("\n"); 
     309\\r             buffer_add_char("\r"); 
     310\\t             buffer_add_char("\t"); 
     311\\v             buffer_add_char("\v"); 
    334312 
    335313 /* We can't support \0, this would cause havoc! */