=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wrc: Accept hyphens in identificators.

Alexandre Julliard julliard at winehq.org
Thu Jun 21 18:37:27 CDT 2018


Module: wine
Branch: master
Commit: 9269562a3ab2d9fa82cd12c12dfab33fbc73c267
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=9269562a3ab2d9fa82cd12c12dfab33fbc73c267

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Thu Jun 21 11:42:42 2018 +0200

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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 32a231b..0f46670 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)




More information about the wine-cvs mailing list