Commit 5ab96f44 authored by Roman Zippel's avatar Roman Zippel Committed by Linus Torvalds

[PATCH] kconfig: fix T_STRING usage

T_STRING token was used twice, so quoted strings use now T_WORD_QUOTE.
parent 8a41374c
...@@ -2148,7 +2148,7 @@ YY_RULE_SETUP ...@@ -2148,7 +2148,7 @@ YY_RULE_SETUP
{ {
append_string(yytext, yyleng); append_string(yytext, yyleng);
zconflval.string = text; zconflval.string = text;
return T_STRING; return T_WORD_QUOTE;
} }
YY_BREAK YY_BREAK
case 47: case 47:
...@@ -2165,7 +2165,7 @@ YY_RULE_SETUP ...@@ -2165,7 +2165,7 @@ YY_RULE_SETUP
{ {
append_string(yytext + 1, yyleng - 1); append_string(yytext + 1, yyleng - 1);
zconflval.string = text; zconflval.string = text;
return T_STRING; return T_WORD_QUOTE;
} }
YY_BREAK YY_BREAK
case 49: case 49:
...@@ -2180,7 +2180,7 @@ YY_RULE_SETUP ...@@ -2180,7 +2180,7 @@ YY_RULE_SETUP
if (str == yytext[0]) { if (str == yytext[0]) {
BEGIN(PARAM); BEGIN(PARAM);
zconflval.string = text; zconflval.string = text;
return T_STRING; return T_WORD_QUOTE;
} else } else
append_string(yytext, 1); append_string(yytext, 1);
} }
......
...@@ -152,7 +152,7 @@ n [A-Za-z0-9_] ...@@ -152,7 +152,7 @@ n [A-Za-z0-9_]
[^'"\\\n]+/\n { [^'"\\\n]+/\n {
append_string(yytext, yyleng); append_string(yytext, yyleng);
zconflval.string = text; zconflval.string = text;
return T_STRING; return T_WORD_QUOTE;
} }
[^'"\\\n]+ { [^'"\\\n]+ {
append_string(yytext, yyleng); append_string(yytext, yyleng);
...@@ -160,7 +160,7 @@ n [A-Za-z0-9_] ...@@ -160,7 +160,7 @@ n [A-Za-z0-9_]
\\.?/\n { \\.?/\n {
append_string(yytext + 1, yyleng - 1); append_string(yytext + 1, yyleng - 1);
zconflval.string = text; zconflval.string = text;
return T_STRING; return T_WORD_QUOTE;
} }
\\.? { \\.? {
append_string(yytext + 1, yyleng - 1); append_string(yytext + 1, yyleng - 1);
...@@ -169,7 +169,7 @@ n [A-Za-z0-9_] ...@@ -169,7 +169,7 @@ n [A-Za-z0-9_]
if (str == yytext[0]) { if (str == yytext[0]) {
BEGIN(PARAM); BEGIN(PARAM);
zconflval.string = text; zconflval.string = text;
return T_STRING; return T_WORD_QUOTE;
} else } else
append_string(yytext, 1); append_string(yytext, 1);
} }
......
This diff is collapsed.
...@@ -57,10 +57,11 @@ struct symbol *symbol_hash[257]; ...@@ -57,10 +57,11 @@ struct symbol *symbol_hash[257];
%token T_DEFAULT %token T_DEFAULT
%token T_TRISTATE %token T_TRISTATE
%token T_BOOLEAN %token T_BOOLEAN
%token T_STRING
%token T_INT %token T_INT
%token T_HEX %token T_HEX
%token <string> T_WORD %token <string> T_WORD
%token <string> T_STRING %token <string> T_WORD_QUOTE
%token T_UNEQUAL %token T_UNEQUAL
%token T_EOF %token T_EOF
%token T_EOL %token T_EOL
...@@ -386,7 +387,7 @@ prompt_stmt_opt: ...@@ -386,7 +387,7 @@ prompt_stmt_opt:
}; };
prompt: T_WORD prompt: T_WORD
| T_STRING | T_WORD_QUOTE
; ;
end: T_ENDMENU { $$ = T_ENDMENU; } end: T_ENDMENU { $$ = T_ENDMENU; }
...@@ -411,7 +412,7 @@ expr: symbol { $$ = expr_alloc_symbol($1); } ...@@ -411,7 +412,7 @@ expr: symbol { $$ = expr_alloc_symbol($1); }
; ;
symbol: T_WORD { $$ = sym_lookup($1, 0); free($1); } symbol: T_WORD { $$ = sym_lookup($1, 0); free($1); }
| T_STRING { $$ = sym_lookup($1, 1); free($1); } | T_WORD_QUOTE { $$ = sym_lookup($1, 1); free($1); }
; ;
%% %%
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment