From: Masahiro Yamada Date: Tue, 11 Dec 2018 11:01:05 +0000 (+0900) Subject: kconfig: stop supporting '.' and '/' in unquoted words X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=342b243d70ea8bd00733d288f08fa89cf44a2773;p=carl9170fw.git kconfig: stop supporting '.' and '/' in unquoted words In my understanding, special characters such as '.' and '/' are supported in unquoted words to use bare file paths in the "source" statement. With the previous commit surrounding all file paths with double quotes, we can drop this. Signed-off-by: Masahiro Yamada Signed-off-by: Christian Lamparter --- diff --git a/config/preprocess.c b/config/preprocess.c index 5ca2df7..b028a48 100644 --- a/config/preprocess.c +++ b/config/preprocess.c @@ -555,8 +555,7 @@ char *expand_string(const char *in) static bool is_end_of_token(char c) { - /* Why are '.' and '/' valid characters for symbols? */ - return !(isalnum(c) || c == '_' || c == '-' || c == '.' || c == '/'); + return !(isalnum(c) || c == '_' || c == '-'); } /* diff --git a/config/zconf.l b/config/zconf.l index eec4a5a..3d8d861 100644 --- a/config/zconf.l +++ b/config/zconf.l @@ -160,7 +160,7 @@ n [A-Za-z0-9_-] BEGIN(STRING); } \n BEGIN(INITIAL); return T_EOL; - ({n}|[/.])+ { + {n}+ { const struct kconf_id *id = kconf_id_lookup(yytext, yyleng); if (id && id->flags & TF_PARAM) { yylval.id = id; @@ -170,7 +170,7 @@ n [A-Za-z0-9_-] yylval.string = text; return T_WORD; } - ({n}|[/.$])+ { + ({n}|$)+ { /* this token includes at least one '$' */ yylval.string = expand_token(yytext, yyleng); if (strlen(yylval.string))