kconfig: begin PARAM state only when seeing a command keyword
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 28 May 2018 09:21:48 +0000 (18:21 +0900)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 10 Feb 2019 21:13:31 +0000 (22:13 +0100)
commit5b345dbb8935d88986224f18f63d605bfa64e12c
treef9991e67eb8833a67917d81bf7be6f9b37d9a5a9
parent2344a769a43b21f2a45a0397cc6d518b7cea7e33
kconfig: begin PARAM state only when seeing a command keyword

Currently, any statement line starts with a keyword with TF_COMMAND
flag.  So, the following three lines are dead code.

        alloc_string(yytext, yyleng);
        zconflval.string = text;
        return T_WORD;

If a T_WORD token is returned in this context, it will cause syntax
error in the parser anyway.

The next commit will support the assignment statement where a line
starts with an arbitrary identifier.  So, I want the lexer to switch
to the PARAM state only when it sees a command keyword.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
config/zconf.l