* tabs on otherwise empty lines
@ 2002-12-29 22:25 William Lee Irwin III
2002-12-30 2:37 ` Roman Zippel
0 siblings, 1 reply; 2+ messages in thread
From: William Lee Irwin III @ 2002-12-29 22:25 UTC (permalink / raw)
To: zippel; +Cc: linux-kernel
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"
"\tSome help text." is consumed by (1).
"\n" is consumed by (3).
"\t\n" is consumed by (3) again.
"config FOO" is consumed by (4), which resets first_ts to last_ts,
which does not actually change the value of first_ts.
"\tdepends on BAR\n" is consumed by (1), and does not zconf_endhelp()
as the indentation level is the same as for "\tSome help text."
Better boundary detection logic is needed here.
Thanks,
Bill
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: tabs on otherwise empty lines
2002-12-29 22:25 tabs on otherwise empty lines William Lee Irwin III
@ 2002-12-30 2:37 ` Roman Zippel
0 siblings, 0 replies; 2+ messages in thread
From: Roman Zippel @ 2002-12-30 2:37 UTC (permalink / raw)
To: William Lee Irwin III; +Cc: linux-kernel
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
{
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-12-30 2:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-29 22:25 tabs on otherwise empty lines William Lee Irwin III
2002-12-30 2:37 ` Roman Zippel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox