kconfig: clean up EOF handling in the lexer
[carl9170fw.git] / config / zconf.l
index bbbef0c9072c7ff185a6146c83a60b3bff5e489f..5b0188a7e9a6f57272d5914e750c112335dfccca 100644 (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;