kconfig: don't silently ignore unhandled characters
[carl9170fw.git] / config / zconf.l
index 04ee4431c3fe9d7868b0cdc104eb04bf38cad77d..960b1e693ed748a88d20f9c57bb3f7f410084a2e 100644 (file)
@@ -27,8 +27,8 @@ static char *text;
 static int text_size, text_asize;
 
 struct buffer {
-        struct buffer *parent;
-        YY_BUFFER_STATE state;
+       struct buffer *parent;
+       YY_BUFFER_STATE state;
 };
 
 struct buffer *current_buf;
@@ -68,7 +68,6 @@ static void alloc_string(const char *str, int size)
 }
 %}
 
-ws     [ \n\t]
 n      [A-Za-z0-9_]
 
 %%
@@ -142,7 +141,12 @@ n  [A-Za-z0-9_]
        }
        #.*     /* comment */
        \\\n    current_file->lineno++;
-       .
+       [[:blank:]]+
+       .       {
+               fprintf(stderr,
+                       "%s:%d:warning: ignoring unsupported character '%c'\n",
+                       zconf_curname(), zconf_lineno(), *yytext);
+       }
        <<EOF>> {
                BEGIN(INITIAL);
        }