From: Masahiro Yamada Date: Tue, 11 Dec 2018 11:00:50 +0000 (+0900) Subject: kconfig: clean up EOF handling in the lexer X-Git-Url: https://jxself.org/git/?p=carl9170fw.git;a=commitdiff_plain;h=32b7db1e81500db89a9d4565d49c8ec1eab21fd9;hp=6f9083050fd2aa04490cdd5fb6e52120fb3e74f8 kconfig: clean up EOF handling in the lexer A new file should always start in the INITIAL state. When the lexer bumps into EOF, the lexer must get back to the INITIAL state anyway. Remove the redundant <> pattern in the PARAM state. Signed-off-by: Masahiro Yamada Signed-off-by: Christian Lamparter --- diff --git a/config/zconf.l b/config/zconf.l index bbbef0c..5b0188a 100644 --- a/config/zconf.l +++ b/config/zconf.l @@ -178,9 +178,6 @@ n [A-Za-z0-9_-] \\\n ; [[:blank:]]+ . warn_ignored_character(*yytext); - <> { - BEGIN(INITIAL); - } } { @@ -262,6 +259,8 @@ n [A-Za-z0-9_-] } <> { + BEGIN(INITIAL); + if (current_file) { zconf_endfile(); return T_EOL;