X-Git-Url: https://jxself.org/git/?p=carl9170fw.git;a=blobdiff_plain;f=config%2Fzconf.l;h=323fb5524fe54f4c48839d7e238262b31a0a22b9;hp=112a0ee1b0a0c2c6c33354aa24f1ed708066a700;hb=cc43c9e39b766069cad56a27764a283e10171d90;hpb=6b4d2c4d403607081898cef5ff722a9c6509087f diff --git a/config/zconf.l b/config/zconf.l index 112a0ee..323fb55 100644 --- a/config/zconf.l +++ b/config/zconf.l @@ -88,12 +88,6 @@ n [A-Za-z0-9_-] return T_EOL; } [ \t]*#.* - - -[ \t]+ { - BEGIN(COMMAND); -} - . { unput(yytext[0]); BEGIN(COMMAND); @@ -188,19 +182,9 @@ n [A-Za-z0-9_-] { "$".* 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 + 1, yyleng - 1); - yylval.string = text; - return T_WORD_QUOTE; - } \\.? { append_string(yytext + 1, yyleng - 1); } @@ -216,11 +200,15 @@ n [A-Za-z0-9_-] fprintf(stderr, "%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno()); + unput('\n'); BEGIN(INITIAL); - return T_EOL; + yylval.string = text; + return T_WORD_QUOTE; } <> { BEGIN(INITIAL); + yylval.string = text; + return T_WORD_QUOTE; } }