summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/conf-lex.l19
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/conf-lex.l b/lib/conf-lex.l
index 4c96f1ce..bee0b1b7 100644
--- a/lib/conf-lex.l
+++ b/lib/conf-lex.l
@@ -105,39 +105,44 @@ OCTESC (1[0-7]{0,2})|([2-7][0-7]?)|(0[1-7][0-7]?)|(00[1-7])
sensors_yylineno++;
}
- /* Keywords must be followed by whitespace - eat that too */
+ /*
+ * Keywords must be followed by whitespace - eat that too.
+ * If there isn't trailing whitespace, we still need to
+ * accept it as lexically correct (even though the parser
+ * will reject it anyway.)
+ */
-label{BLANK}+ {
+label{BLANK}* {
sensors_yylval.line = sensors_yylineno;
BEGIN(MIDDLE);
return LABEL;
}
-set{BLANK}+ {
+set{BLANK}* {
sensors_yylval.line = sensors_yylineno;
BEGIN(MIDDLE);
return SET;
}
-compute{BLANK}+ {
+compute{BLANK}* {
sensors_yylval.line = sensors_yylineno;
BEGIN(MIDDLE);
return COMPUTE;
}
-bus{BLANK}+ {
+bus{BLANK}* {
sensors_yylval.line = sensors_yylineno;
BEGIN(MIDDLE);
return BUS;
}
-chip{BLANK}+ {
+chip{BLANK}* {
sensors_yylval.line = sensors_yylineno;
BEGIN(MIDDLE);
return CHIP;
}
-ignore{BLANK}+ {
+ignore{BLANK}* {
sensors_yylval.line = sensors_yylineno;
BEGIN(MIDDLE);
return IGNORE;