kconfig: begin PARAM state only when seeing a command keyword
[carl9170fw.git] / config / zconf.l
index 3c3f52a7537e1f51841bb92c82cbdfe8239c8607..fde86ba2d0372c3e91713db262adff7b9fa705f1 100644 (file)
@@ -102,10 +102,10 @@ n [A-Za-z0-9_-]
 <COMMAND>{
        {n}+    {
                const struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
-               BEGIN(PARAM);
                current_pos.file = current_file;
                current_pos.lineno = yylineno;
                if (id && id->flags & TF_COMMAND) {
+                       BEGIN(PARAM);
                        yylval.id = id;
                        return id->token;
                }