lkml.org 
[lkml]   [2018]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 07/27] kconfig: clean up EOF handling in the lexer
Date
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>
---

scripts/kconfig/zconf.l | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l
index 847ba42..9038e97 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;
--
2.7.4
\
 
 \ /
  Last update: 2018-12-11 12:05    [W:0.282 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site