[PATCH 1/2] wrc: Accept hyphens in identificators.
It is a bit more permissive than it should be, hyphens should be allowed in resource names, but not in filenames. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> --- I need it to add tests for vulkan-1. I would like to add some tests for structure conversion bugs. --- tools/wrc/parser.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/wrc/parser.l b/tools/wrc/parser.l index 32a231b5a2ea..0f46670288ce 100644 --- a/tools/wrc/parser.l +++ b/tools/wrc/parser.l @@ -402,7 +402,7 @@ static unsigned long xstrtoul(const char *nptr, char **endptr, int base) 0[oO][0-7]+[lL]? { parser_lval.num = xstrtoul(yytext+2, 0, 8); return (yytext[yyleng-1] == 'L' || yytext[yyleng-1] == 'l') ? tLNUMBER : tNUMBER; } -[A-Za-z_0-9./\\]+ { +[A-Za-z_0-9./\\][A-Za-z_0-9./\\\-]* { struct keyword *tok = iskeyword(yytext); if(tok) -- 2.16.4
participants (1)
-
Józef Kucia