Changeset 4156

Show
Ignore:
Timestamp:
09/15/06 13:08:39 (7 years ago)
Author:
mmh
Message:

Subtle bugfix: if a keyword is not followed by whitespace, we still need to
accept it as lexically correct (even though the parser will reject it anyway.)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/branches/scanner-opt-branch/lib/conf-lex.l

    r4148 r4156  
    106106                } 
    107107 
    108  /* Keywords must be followed by whitespace - eat that too */ 
    109  
    110 label{BLANK}+   { 
     108 /* 
     109  * Keywords must be followed by whitespace - eat that too. 
     110  * If there isn't trailing whitespace, we still need to 
     111  * accept it as lexically correct (even though the parser 
     112  * will reject it anyway.) 
     113  */ 
     114 
     115label{BLANK}*   { 
    111116                  sensors_yylval.line = sensors_yylineno; 
    112117                  BEGIN(MIDDLE); 
     
    114119                } 
    115120 
    116 set{BLANK}+     { 
     121set{BLANK}*     { 
    117122                  sensors_yylval.line = sensors_yylineno; 
    118123                  BEGIN(MIDDLE); 
     
    120125                } 
    121126 
    122 compute{BLANK}+ { 
     127compute{BLANK}* { 
    123128                  sensors_yylval.line = sensors_yylineno; 
    124129                  BEGIN(MIDDLE); 
     
    126131                } 
    127132 
    128 bus{BLANK}+     { 
     133bus{BLANK}*     { 
    129134                  sensors_yylval.line = sensors_yylineno; 
    130135                  BEGIN(MIDDLE); 
     
    132137                } 
    133138 
    134 chip{BLANK}+    { 
     139chip{BLANK}*    { 
    135140                  sensors_yylval.line = sensors_yylineno; 
    136141                  BEGIN(MIDDLE); 
     
    138143                } 
    139144 
    140 ignore{BLANK}+  { 
     145ignore{BLANK}*  { 
    141146                  sensors_yylval.line = sensors_yylineno; 
    142147                  BEGIN(MIDDLE);