Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0da8be91
Commit
0da8be91
authored
Apr 23, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 23, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrc: Allow '/' and '\' in identifiers.
parent
68c4f61d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
12 deletions
+3
-12
parser.l
tools/wrc/parser.l
+1
-9
parser.y
tools/wrc/parser.y
+2
-3
No files found.
tools/wrc/parser.l
View file @
0da8be91
...
@@ -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
...
...
tools/wrc/parser.y
View file @
0da8be91
...
@@ -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);
}
;
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment