mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-18 11:09:32 +00:00
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. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4236 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
dcdd19ed72
commit
72889cb191
1 file changed
+7
-29
+7
-29
@@ -152,7 +152,6 @@ ignore{BLANK}* {
|
||||
|
||||
[a-z]+ |
|
||||
. {
|
||||
yymore();
|
||||
BEGIN(ERR);
|
||||
strcpy(sensors_lex_error,"Invalid keyword");
|
||||
return ERROR;
|
||||
@@ -250,7 +249,6 @@ ignore{BLANK}* {
|
||||
. |
|
||||
[[:digit:]]*\. |
|
||||
\\{BLANK}* {
|
||||
yymore();
|
||||
BEGIN(ERR);
|
||||
return ERROR;
|
||||
}
|
||||
@@ -304,33 +302,13 @@ ignore{BLANK}* {
|
||||
return NAME;
|
||||
}
|
||||
|
||||
\\a {
|
||||
buffer_add_char("\a");
|
||||
}
|
||||
|
||||
\\b {
|
||||
buffer_add_char("\b");
|
||||
}
|
||||
|
||||
\\f {
|
||||
buffer_add_char("\f");
|
||||
}
|
||||
|
||||
\\n {
|
||||
buffer_add_char("\n");
|
||||
}
|
||||
|
||||
\\r {
|
||||
buffer_add_char("\r");
|
||||
}
|
||||
|
||||
\\t {
|
||||
buffer_add_char("\t");
|
||||
}
|
||||
|
||||
\\v {
|
||||
buffer_add_char("\v");
|
||||
}
|
||||
\\a buffer_add_char("\a");
|
||||
\\b buffer_add_char("\b");
|
||||
\\f buffer_add_char("\f");
|
||||
\\n buffer_add_char("\n");
|
||||
\\r buffer_add_char("\r");
|
||||
\\t buffer_add_char("\t");
|
||||
\\v buffer_add_char("\v");
|
||||
|
||||
/* We can't support \0, this would cause havoc! */
|
||||
|
||||
|
||||
Reference in new issue
Block a user