Skip to content

Commit

Permalink
cfg-lex.l: allow an underscore in identifier names
Browse files Browse the repository at this point in the history
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
  • Loading branch information
bazsi committed Jun 6, 2024
1 parent ee6232f commit 29d5716
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cfg-lex.l
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ filterx_word [^ \#'"/\(\)\{\}\[\]\\;\r\n\t,|\.@:]
<INITIAL>({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 */
<filterx>[a-zA-Z][_a-zA-Z0-9]* { return cfg_lexer_map_word_to_token(yyextra, yylval, yylloc, yytext); }
<filterx>[_a-zA-Z][_a-zA-Z0-9]* { return cfg_lexer_map_word_to_token(yyextra, yylval, yylloc, yytext); }
<filterx>\$\{([^}]+)\} { yylval->cptr = strndup(yytext+2, strlen(yytext) - 3); return LL_MESSAGE_REF; }
<INITIAL>\, ;
Expand Down

0 comments on commit 29d5716

Please sign in to comment.