X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=config%2Fzconf.l;h=112a0ee1b0a0c2c6c33354aa24f1ed708066a700;hb=6b4d2c4d403607081898cef5ff722a9c6509087f;hp=d0f5b132a9b39802680a3f07343d0c36bf83e4ee;hpb=dd88a7e5b482637a26c67ffa1cdf7ebed204161d;p=carl9170fw.git diff --git a/config/zconf.l b/config/zconf.l index d0f5b13..112a0ee 100644 --- a/config/zconf.l +++ b/config/zconf.l @@ -73,7 +73,7 @@ static void warn_ignored_character(char chr) { fprintf(stderr, "%s:%d:warning: ignoring unsupported character '%c'\n", - zconf_curname(), zconf_lineno(), chr); + current_file->name, yylineno, chr); } %} @@ -114,8 +114,16 @@ n [A-Za-z0-9_-] yylval.string = text; return T_VARIABLE; } + ({n}|$)+ { + /* this token includes at least one '$' */ + yylval.string = expand_token(yytext, yyleng); + if (strlen(yylval.string)) + return T_VARIABLE; + free(yylval.string); + } "=" { BEGIN(ASSIGN_VAL); yylval.flavor = VAR_RECURSIVE; return T_ASSIGN; } ":=" { BEGIN(ASSIGN_VAL); yylval.flavor = VAR_SIMPLE; return T_ASSIGN; } + "+=" { BEGIN(ASSIGN_VAL); yylval.flavor = VAR_APPEND; return T_ASSIGN; } [[:blank:]]+ . warn_ignored_character(*yytext); \n {