Skip to content
Snippets Groups Projects
Commit 9de07153 authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 2972666a
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment