aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/config/zconf.l
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2016-08-03 19:47:34 +0200
committerFelix Fietkau <nbd@nbd.name>2016-08-03 20:03:35 +0200
commit2d7e602381f3c473d6c8214e8e56bcf80ccf9fa5 (patch)
tree43bc0a7953f008fad5fbc793e8d2dfca2e540081 /scripts/config/zconf.l
parent7bf3695b0230d4cc4b6348f7c87b3c164314db8d (diff)
downloadupstream-2d7e602381f3c473d6c8214e8e56bcf80ccf9fa5.tar.gz
upstream-2d7e602381f3c473d6c8214e8e56bcf80ccf9fa5.tar.bz2
upstream-2d7e602381f3c473d6c8214e8e56bcf80ccf9fa5.zip
scripts/config: sync with latest linux upstream
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'scripts/config/zconf.l')
-rw-r--r--scripts/config/zconf.l21
1 files changed, 16 insertions, 5 deletions
diff --git a/scripts/config/zconf.l b/scripts/config/zconf.l
index 7c7baefda7..44d895fb24 100644
--- a/scripts/config/zconf.l
+++ b/scripts/config/zconf.l
@@ -68,9 +68,16 @@ static void alloc_string(const char *str, int size)
memcpy(text, str, size);
text[size] = 0;
}
+
+static void warn_ignored_character(char chr)
+{
+ fprintf(stderr,
+ "%s:%d:warning: ignoring unsupported character '%c'\n",
+ zconf_curname(), zconf_lineno(), chr);
+}
%}
-n [A-Za-z0-9_]
+n [A-Za-z0-9_-]
%%
int str = 0;
@@ -108,7 +115,7 @@ n [A-Za-z0-9_]
zconflval.string = text;
return T_WORD;
}
- .
+ . warn_ignored_character(*yytext);
\n {
BEGIN(INITIAL);
current_file->lineno++;
@@ -124,14 +131,17 @@ n [A-Za-z0-9_]
"!" return T_NOT;
"=" return T_EQUAL;
"!=" return T_UNEQUAL;
+ "<=" return T_LESS_EQUAL;
+ ">=" return T_GREATER_EQUAL;
+ "<" return T_LESS;
+ ">" return T_GREATER;
\"|\' {
str = yytext[0];
new_string();
BEGIN(STRING);
}
\n BEGIN(INITIAL); current_file->lineno++; return T_EOL;
- --- /* ignore */
- ({n}|[-/.])+ {
+ ({n}|[/.])+ {
const struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
if (id && id->flags & TF_PARAM) {
zconflval.id = id;
@@ -143,7 +153,8 @@ n [A-Za-z0-9_]
}
#.* /* comment */
\\\n current_file->lineno++;
- .
+ [[:blank:]]+
+ . warn_ignored_character(*yytext);
<<EOF>> {
BEGIN(INITIAL);
}