summaryrefslogtreecommitdiff
path: root/util/kconfig/lexer.l
diff options
context:
space:
mode:
Diffstat (limited to 'util/kconfig/lexer.l')
-rw-r--r--util/kconfig/lexer.l9
1 files changed, 5 insertions, 4 deletions
diff --git a/util/kconfig/lexer.l b/util/kconfig/lexer.l
index dcb5648e26..2a754a8f1e 100644
--- a/util/kconfig/lexer.l
+++ b/util/kconfig/lexer.l
@@ -85,8 +85,7 @@ static void warn_ignored_character(char chr)
n [A-Za-z0-9_-]
%%
- int str = 0;
- int ts, i;
+ char open_quote = 0;
#.* /* ignore comment */
[ \t]* /* whitespaces */
@@ -135,7 +134,7 @@ n [A-Za-z0-9_-]
":=" return T_COLON_EQUAL;
"+=" return T_PLUS_EQUAL;
\"|\' {
- str = yytext[0];
+ open_quote = yytext[0];
new_string();
BEGIN(STRING);
}
@@ -172,7 +171,7 @@ n [A-Za-z0-9_-]
append_string(yytext + 1, yyleng - 1);
}
\'|\" {
- if (str == yytext[0]) {
+ if (open_quote == yytext[0]) {
BEGIN(INITIAL);
yylval.string = text;
return T_WORD_QUOTE;
@@ -197,6 +196,8 @@ n [A-Za-z0-9_-]
<HELP>{
[ \t]+ {
+ int ts, i;
+
ts = 0;
for (i = 0; i < yyleng; i++) {
if (yytext[i] == '\t')