From 29d5716e49d39bddd85b47a4fc51c2141671d072 Mon Sep 17 00:00:00 2001 From: Balazs Scheidler Date: Thu, 6 Jun 2024 11:27:09 +0200 Subject: [PATCH] cfg-lex.l: allow an underscore in identifier names Signed-off-by: Balazs Scheidler --- lib/cfg-lex.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cfg-lex.l b/lib/cfg-lex.l index 45e1848c8f..09f9ef628a 100644 --- a/lib/cfg-lex.l +++ b/lib/cfg-lex.l @@ -347,7 +347,7 @@ filterx_word [^ \#'"/\(\)\{\}\[\]\\;\r\n\t,|\.@:] ({word}+(\.)?)*{word}+ { return cfg_lexer_map_word_to_token(yyextra, yylval, yylloc, yytext); } /* and this is the version in filterx, which only allows "traditional" identifiers */ -[a-zA-Z][_a-zA-Z0-9]* { return cfg_lexer_map_word_to_token(yyextra, yylval, yylloc, yytext); } +[_a-zA-Z][_a-zA-Z0-9]* { return cfg_lexer_map_word_to_token(yyextra, yylval, yylloc, yytext); } \$\{([^}]+)\} { yylval->cptr = strndup(yytext+2, strlen(yytext) - 3); return LL_MESSAGE_REF; } \, ;