projects
/
linux-libre-firmware.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Makefile: Refer to ath9k_htc instead of ath9k_htc_firmware
[linux-libre-firmware.git]
/
carl9170fw
/
config
/
zconf.l
diff --git
a/carl9170fw/config/zconf.l
b/carl9170fw/config/zconf.l
index 04ee4431c3fe9d7868b0cdc104eb04bf38cad77d..9720530ed688d1593b2fe1ef72ce7d6b054a6a0d 100644
(file)
--- a/
carl9170fw/config/zconf.l
+++ b/
carl9170fw/config/zconf.l
@@
-27,8
+27,8
@@
static char *text;
static int text_size, text_asize;
struct buffer {
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;
};
struct buffer *current_buf;
@@
-66,10
+66,16
@@
static void alloc_string(const char *str, int size)
memcpy(text, str, size);
text[size] = 0;
}
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);
+}
%}
%}
-ws [ \n\t]
-n [A-Za-z0-9_]
+n [A-Za-z0-9_-]
%%
int str = 0;
%%
int str = 0;
@@
-107,7
+113,7
@@
n [A-Za-z0-9_]
zconflval.string = text;
return T_WORD;
}
zconflval.string = text;
return T_WORD;
}
- .
+ .
warn_ignored_character(*yytext);
\n {
BEGIN(INITIAL);
current_file->lineno++;
\n {
BEGIN(INITIAL);
current_file->lineno++;
@@
-123,14
+129,17
@@
n [A-Za-z0-9_]
"!" return T_NOT;
"=" return T_EQUAL;
"!=" return T_UNEQUAL;
"!" 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;
\"|\' {
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;
const struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
if (id && id->flags & TF_PARAM) {
zconflval.id = id;
@@
-142,7
+151,8
@@
n [A-Za-z0-9_]
}
#.* /* comment */
\\\n current_file->lineno++;
}
#.* /* comment */
\\\n current_file->lineno++;
- .
+ [[:blank:]]+
+ . warn_ignored_character(*yytext);
<<EOF>> {
BEGIN(INITIAL);
}
<<EOF>> {
BEGIN(INITIAL);
}