1
0
Fork 0

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>
hifive-unleashed-5.1
Masahiro Yamada 2018-12-11 20:00:50 +09:00
parent cc66bca775
commit 0bcc547ec4
1 changed files with 2 additions and 3 deletions

View File

@ -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;