diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-12-11 20:00:50 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-12-13 00:20:09 +0900 |
commit | 0bcc547ec4b03a0b66615694561cce9c5a9a1014 (patch) | |
tree | eeba0495dd1d97aea2f2270af7e821c86d55ee64 | |
parent | cc66bca775eeb81ef24456338bcd97e2e780c236 (diff) | |
download | linux-0bcc547ec4b03a0b66615694561cce9c5a9a1014.tar.gz linux-0bcc547ec4b03a0b66615694561cce9c5a9a1014.tar.bz2 linux-0bcc547ec4b03a0b66615694561cce9c5a9a1014.zip |
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 <<EOF>> pattern in the PARAM state.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-rw-r--r-- | scripts/kconfig/zconf.l | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index 847ba4248092..9038e9736bf0 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l @@ -178,9 +178,6 @@ n [A-Za-z0-9_-] \\\n ; [[:blank:]]+ . warn_ignored_character(*yytext); - <<EOF>> { - BEGIN(INITIAL); - } } <STRING>{ @@ -262,6 +259,8 @@ n [A-Za-z0-9_-] } <<EOF>> { + BEGIN(INITIAL); + if (current_file) { zconf_endfile(); return T_EOL; |