Re: tabs on otherwise empty lines

From: Roman Zippel (zippel@linux-m68k.org)
Date: Sun Dec 29 2002 - 21:37:14 EST


Hi,

On Sun, 29 Dec 2002, William Lee Irwin III wrote:

> The <HELP> state is willing to consume config options as part of help
> texts AFAICT:
>
> (1) [ \t]+ {
> (2) \n/[^ \t\n] {
> (3) [ \t]*\n {
> (4) [^ \t\n].* {
> (5) <<EOF>> {
>
> Now consider: "\tSome help text.\n\t\nconfig FOO\n\tdepends on BAR\n"

Try to change (2) into [ \t]*\n/[^ \t\n]
This should eat these empty lines correctly. I'll have to test it a bit
more. Thanks for finding this.

bye, Roman

--- linux/scripts/kconfig/zconf.l 2002-12-16 21:02:55.000000000 +0100
+++ linux/scripts/kconfig/zconf.l 2002-12-30 02:50:00.000000000 +0100
@@ -208,7 +208,7 @@
                 }

         }
- \n/[^ \t\n] {
+ [ \t]*\n/[^ \t\n] {
                 current_file->lineno++;
                 zconf_endhelp();
                 return T_HELPTEXT;
--- linux/scripts/kconfig/lex.zconf.c_shipped 2002-12-16 21:02:53.000000000 +0100
+++ linux/scripts/kconfig/lex.zconf.c_shipped 2002-12-30 02:50:06.000000000 +0100
@@ -853,10 +853,10 @@
     },

     {
- 11, -76, -76, -76, -76, -76, -76, -76, -76, -76,
- -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
- -76, -76, -76, -76, -76, -76, -76, -76, -76, -76,
- -76, -76, -76, -76, -76, -76, -76
+ 11, 77, -76, -76, 77, 77, 77, 77, 77, 77,
+ 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
+ 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
+ 77, 77, 77, 77, 77, 77, 77
     },

     {
@@ -2229,7 +2229,7 @@
         YY_BREAK
 case 53:
 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp = yy_bp + 1;
+yy_c_buf_p = yy_cp -= 1;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
 {

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Dec 31 2002 - 22:00:15 EST