Jacek Caban : wrc: Allow '/' and '\' in identifiers.
Alexandre Julliard
julliard at winehq.org
Tue Apr 23 13:52:23 CDT 2013
Module: wine
Branch: master
Commit: 0da8be91ef67284de63b90001d62adf7776d27bc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0da8be91ef67284de63b90001d62adf7776d27bc
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Apr 23 14:13:58 2013 +0200
wrc: Allow '/' and '\' in identifiers.
---
tools/wrc/parser.l | 10 +---------
tools/wrc/parser.y | 5 ++---
2 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/tools/wrc/parser.l b/tools/wrc/parser.l
index cf16ccc..8c50a8a 100644
--- a/tools/wrc/parser.l
+++ b/tools/wrc/parser.l
@@ -404,14 +404,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; }
- /*
- * The next two rules scan identifiers and filenames.
- * This is achieved by using the priority ruling
- * of the scanner where a '.' is valid in a filename
- * and *only* in a filename. In this case, the second
- * rule will be reduced because it is longer.
- */
-[A-Za-z_0-9.]+ {
+[A-Za-z_0-9./\\]+ {
struct keyword *tok = iskeyword(yytext);
if(tok)
@@ -430,7 +423,6 @@ static unsigned long xstrtoul(const char *nptr, char **endptr, int base)
return tIDENT;
}
}
-[A-Za-z_0-9./\\]+ parser_lval.str = make_string(yytext); return tFILENAME;
/*
* Wide string scanning
diff --git a/tools/wrc/parser.y b/tools/wrc/parser.y
index 4cc37ac..ad5fb98 100644
--- a/tools/wrc/parser.y
+++ b/tools/wrc/parser.y
@@ -268,7 +268,7 @@ static int rsrcid_to_token(int lookahead);
%token tNL
%token <num> tNUMBER tLNUMBER
-%token <str> tSTRING tIDENT tFILENAME
+%token <str> tSTRING tIDENT
%token <raw> tRAWDATA
%token tACCELERATORS tBITMAP tCURSOR tDIALOG tDIALOGEX tMENU tMENUEX tMESSAGETABLE
%token tRCDATA tVERSIONINFO tSTRINGTABLE tFONT tFONTDIR tICON tHTML
@@ -647,8 +647,7 @@ resource_definition
;
-filename: tFILENAME { $$ = make_filename($1); }
- | tIDENT { $$ = make_filename($1); }
+filename: tIDENT { $$ = make_filename($1); }
| tSTRING { $$ = make_filename($1); }
;
More information about the wine-cvs
mailing list