Commit 0da8be91 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wrc: Allow '/' and '\' in identifiers.

parent 68c4f61d
...@@ -404,14 +404,7 @@ static unsigned long xstrtoul(const char *nptr, char **endptr, int base) ...@@ -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); 0[oO][0-7]+[lL]? { parser_lval.num = xstrtoul(yytext+2, 0, 8);
return (yytext[yyleng-1] == 'L' || yytext[yyleng-1] == 'l') ? tLNUMBER : tNUMBER; } return (yytext[yyleng-1] == 'L' || yytext[yyleng-1] == 'l') ? tLNUMBER : tNUMBER; }
/* [A-Za-z_0-9./\\]+ {
* 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.]+ {
struct keyword *tok = iskeyword(yytext); struct keyword *tok = iskeyword(yytext);
if(tok) if(tok)
...@@ -430,7 +423,6 @@ static unsigned long xstrtoul(const char *nptr, char **endptr, int base) ...@@ -430,7 +423,6 @@ static unsigned long xstrtoul(const char *nptr, char **endptr, int base)
return tIDENT; return tIDENT;
} }
} }
[A-Za-z_0-9./\\]+ parser_lval.str = make_string(yytext); return tFILENAME;
/* /*
* Wide string scanning * Wide string scanning
......
...@@ -268,7 +268,7 @@ static int rsrcid_to_token(int lookahead); ...@@ -268,7 +268,7 @@ static int rsrcid_to_token(int lookahead);
%token tNL %token tNL
%token <num> tNUMBER tLNUMBER %token <num> tNUMBER tLNUMBER
%token <str> tSTRING tIDENT tFILENAME %token <str> tSTRING tIDENT
%token <raw> tRAWDATA %token <raw> tRAWDATA
%token tACCELERATORS tBITMAP tCURSOR tDIALOG tDIALOGEX tMENU tMENUEX tMESSAGETABLE %token tACCELERATORS tBITMAP tCURSOR tDIALOG tDIALOGEX tMENU tMENUEX tMESSAGETABLE
%token tRCDATA tVERSIONINFO tSTRINGTABLE tFONT tFONTDIR tICON tHTML %token tRCDATA tVERSIONINFO tSTRINGTABLE tFONT tFONTDIR tICON tHTML
...@@ -647,8 +647,7 @@ resource_definition ...@@ -647,8 +647,7 @@ resource_definition
; ;
filename: tFILENAME { $$ = make_filename($1); } filename: tIDENT { $$ = make_filename($1); }
| tIDENT { $$ = make_filename($1); }
| tSTRING { $$ = make_filename($1); } | tSTRING { $$ = make_filename($1); }
; ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment