• Masahiro Yamada's avatar
    kconfig: use specific tokens instead of T_ASSIGN for assignments · c3d22871
    Masahiro Yamada authored
    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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
    c3d22871
zconf.y 15.9 KB