I disagree. I think this is a bug in all these lexers, and we should
fix it.
\<ret> is the only special case that says "ignore both". In any other
case \<c> should translate into just the character <c>.
This \<whitespace> special case "it is an errors that a few people
will make, so fail when we encounter it" stuff is paranoid balony that
just causes more harm.
I may misunderstand, regardless,
$ cvs diff -u sbin/pfctl/parse.y
Index: sbin/pfctl/parse.y
===================================================================
RCS file: /cvs/src/sbin/pfctl/parse.y,v
retrieving revision 1.494
diff -u -r1.494 parse.y
--- sbin/pfctl/parse.y 17 Nov 2005 20:52:39 -0000 1.494
+++ sbin/pfctl/parse.y 22 May 2006 22:31:24 -0000
@@ -4718,14 +4718,11 @@
while ((c = getc(f)) == '\\') {
next = getc(f);
- if (next != '\n') {
- if (isspace(next))
- yyerror("whitespace after \\");
+ if (next == '\n') {
+ yylval.lineno = lineno;
+ lineno++;
+ } else
ungetc(next, f);
- break;
- }
- yylval.lineno = lineno;
- lineno++;
}
if (c == '\t' || c == ' ') {
/* Compress blanks to a single space. */