kconfig: narrow the scope of variables in the lexer

The variables, "ts" and "i", are used locally in the action of
the [ \t]+ pattern in the <HELP> start state.

Define them where they are used.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
Masahiro Yamada 2021-09-27 21:54:36 +09:00
parent d05377e184
commit 65017d8381
1 changed files with 2 additions and 1 deletions

View File

@ -85,7 +85,6 @@ n [A-Za-z0-9_-]
%%
int str = 0;
int ts, i;
#.* /* ignore comment */
[ \t]* /* whitespaces */
@ -196,6 +195,8 @@ n [A-Za-z0-9_-]
<HELP>{
[ \t]+ {
int ts, i;
ts = 0;
for (i = 0; i < yyleng; i++) {
if (yytext[i] == '\t')