projects
/
carl9170fw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kconfig: refactor pattern matching in STRING state
[carl9170fw.git]
/
config
/
zconf.l
diff --git
a/config/zconf.l
b/config/zconf.l
index 289813deb8cb7775583236c612bc1e27e86f30b3..323fb5524fe54f4c48839d7e238262b31a0a22b9 100644
(file)
--- a/
config/zconf.l
+++ b/
config/zconf.l
@@
-182,19
+182,9
@@
n [A-Za-z0-9_-]
<STRING>{
"$".* append_expanded_string(yytext);
<STRING>{
"$".* append_expanded_string(yytext);
- [^$'"\\\n]+/\n {
- append_string(yytext, yyleng);
- yylval.string = text;
- return T_WORD_QUOTE;
- }
[^$'"\\\n]+ {
append_string(yytext, yyleng);
}
[^$'"\\\n]+ {
append_string(yytext, yyleng);
}
- \\.?/\n {
- append_string(yytext + 1, yyleng - 1);
- yylval.string = text;
- return T_WORD_QUOTE;
- }
\\.? {
append_string(yytext + 1, yyleng - 1);
}
\\.? {
append_string(yytext + 1, yyleng - 1);
}
@@
-210,8
+200,10
@@
n [A-Za-z0-9_-]
fprintf(stderr,
"%s:%d:warning: multi-line strings not supported\n",
zconf_curname(), zconf_lineno());
fprintf(stderr,
"%s:%d:warning: multi-line strings not supported\n",
zconf_curname(), zconf_lineno());
+ unput('\n');
BEGIN(INITIAL);
BEGIN(INITIAL);
- return T_EOL;
+ yylval.string = text;
+ return T_WORD_QUOTE;
}
<<EOF>> {
BEGIN(INITIAL);
}
<<EOF>> {
BEGIN(INITIAL);