On 07/03/2015 12:46, Ulf Magnusson wrote: > > Except for scattered accidents like in the original message, which are > hopefully pretty rare and easy to fix, the only documented thing that depends > on that lexer sloppiness is the ---help--- "token". > > I'd just add "---help---" as another T_HELP alias (or get rid of it altogether, > but that's probably more work than it's worth). Tightening things up should be > safe after that. > > /Ulf > So we might want to do something like the attached patch, right? Unfortunately, when I generate the zconf.{hash,lex,tab}.c files on my machine, they have some notable differences to the _shipped versions: ruprecht@box:linux-next$ diff -u zconf.tab.c zconf.tab.c_shipped - return yyresult; + /* Make sure YYID is used. */ + return YYID (yyresult); and I can't find any Documentation on how to properly rebuild the _shipped files... Does anybody have a hint on that? Regards, Andreas
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index 200a3fe..84a5d05 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l @@ -106,7 +106,15 @@ n [A-Za-z0-9_] zconflval.string = text; return T_WORD; } - . + "---help---" { + /* Support old syntax for help statement */ + return T_HELP; + } + . { + fprintf(stderr, + "%s:%d:warning: ignoring unsupported character '%c'\n", + zconf_curname(), zconf_lineno(), *yytext); + } \n { BEGIN(INITIAL); current_file->lineno++; @@ -132,7 +140,6 @@ n [A-Za-z0-9_] BEGIN(STRING); } \n BEGIN(INITIAL); current_file->lineno++; return T_EOL; - --- /* ignore */ ({n}|[-/.])+ { const struct kconf_id *id = kconf_id_lookup(yytext, yyleng); if (id && id->flags & TF_PARAM) {