kconfig: use specific tokens instead of T_ASSIGN for assignments
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 11 Dec 2018 11:01:01 +0000 (20:01 +0900)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 10 Feb 2019 21:32:13 +0000 (22:32 +0100)
commitf858fba161a6e11efff702c43a3106984bd7fa2e
tree5a6ca37fbd7b896cab6589e252c529f069d160ec
parent7df515c55fa329c32734a5f93d251170a33f07f5
kconfig: use specific tokens instead of T_ASSIGN for assignments

Currently, the lexer returns T_ASSIGN for all of =, :=, and +=
associating yylval with the flavor.

I want to make the generated lexer as simple as possible. So, the
lexer should convert keywords to tokens without thinking about the
meaning.

   =  ->  T_EQUAL
  :=  ->  T_COLON_EQUAL
  +=  ->  T_PLUS_EQUAL

Unfortunately, Kconfig uses = instead of == for the equal operator.
So, the same token T_EQUAL is used for assignment and comparison.
The parser can still distinguish them from the context.

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