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:
Mark M. Hoffman committed 2006-11-12 18:36:15 +00:00
1 parent dcdd19ed72
commit 72889cb191
1 file changed
+7 -29
+7 -29
View File
@@ -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! */