Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c5a46ba9
Commit
c5a46ba9
authored
Aug 25, 2000
by
Bertho Stultiens
Committed by
Alexandre Julliard
Aug 25, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a LALR(2) problem while scanning usertype resources which had
identifiers for both name and type.
parent
9e0ae86d
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
16 deletions
+56
-16
.cvsignore
tools/wrc/.cvsignore
+5
-0
CHANGES
tools/wrc/CHANGES
+7
-0
README.wrc
tools/wrc/README.wrc
+2
-2
parser.y
tools/wrc/parser.y
+39
-11
wrc.h
tools/wrc/wrc.h
+2
-2
wrc.man
tools/wrc/wrc.man
+1
-1
No files found.
tools/wrc/.cvsignore
View file @
c5a46ba9
...
...
@@ -6,3 +6,8 @@ ppy.tab.h
wrc
y.tab.c
y.tab.h
ppy.tab.c
ppy.tab.h
y.output
ppy.output
lex.backup
tools/wrc/CHANGES
View file @
c5a46ba9
---------------------------------------------------------------------------
Version 1.1.8 (24-Aug-2000)
Bertho Stultiens <bertho@akhphd.au.dk>
- Fixed a LALR(2) problem while scanning usertype resources which
had identifiers for both name and type.
---------------------------------------------------------------------------
Version 1.1.7 (24-Jul-2000)
Bertho Stultiens <bertho@akhphd.au.dk>
...
...
tools/wrc/README.wrc
View file @
c5a46ba9
Release 1.1.
7 of wrc (24-Jul
-2000), the wine resource compiler.
Release 1.1.
8 of wrc (24-Aug
-2000), the wine resource compiler.
See the file CHANGES for differences between the version and what has been
corrected in the current version.
...
...
@@ -113,7 +113,7 @@ __DATE__ | "May 1 2000" | Datestring of compilation
__WRC__ 1 | Wrc's major version
__WRC_MINOR__ | 1 | Wrc's minor version
__WRC_MICRO__ | 7 | Wrc's minor version
__WRC_PATCH__ |
7
| Alias of __WRC_MICRO__
__WRC_PATCH__ |
8
| Alias of __WRC_MICRO__
Include-files are not read twice if they are protected with this scheme:
#ifndef SOME_DEFINE
...
...
tools/wrc/parser.y
View file @
c5a46ba9
...
...
@@ -435,7 +435,7 @@ cjunk : tTYPEDEF { strip_til_semicolon(); }
| tSTATIC { strip_til_semicolon(); }
| tINLINE { internal_error(__FILE__, __LINE__, "Don't yet know how to strip inline functions\n"); }
/* | tIDENT tIDENT { strip_til_semicolon(); } */
| tIDENT tIDENT '(' { strip_til_parenthesis(); }
/* | tIDENT tIDENT '(' { strip_til_parenthesis(); } See comments in 'resource' below */
/* | tIDENT '(' { strip_til_parenthesis(); } */
| tIDENT '*' { strip_til_semicolon(); }
| tNL /*
...
...
@@ -467,21 +467,49 @@ cjunk : tTYPEDEF { strip_til_semicolon(); }
/* Parse top level resource definitions etc. */
resource
:
nameid
usrcvt resource_definition {
:
expr
usrcvt resource_definition {
$$ = $3;
if($$)
{
$$->name = $1;
if($1->type == name_ord)
{
chat("Got %s (%d)",get_typename($3),$1->name.i_name);
}
else if($1->type == name_str)
{
chat("Got %s (%s)",get_typename($3),$1->name.s_name->str.cstr);
}
if($1 > 65535 || $1 < -32768)
yyerror("Resource's ID out of range (%d)", $1);
$$->name = new_name_id();
$$->name->type = name_ord;
$$->name->name.i_name = $1;
chat("Got %s (%d)", get_typename($3), $$->name->name.i_name);
}
}
| tIDENT usrcvt resource_definition {
$$ = $3;
if($$)
{
$$->name = new_name_id();
$$->name->type = name_str;
$$->name->name.s_name = $1;
chat("Got %s (%s)", get_typename($3), $$->name->name.s_name->str.cstr);
}
}
| tIDENT usrcvt tIDENT '(' { /* cjunk */ strip_til_parenthesis(); $$ = NULL; }
/* The above rule is inserted here with explicit tIDENT
* references to avoid a nasty LALR(2) problem when
* considering the 'cjunk' rules with respect to the usertype
* resources.
* A usertype resource can have two leading identifiers before
* it qualifies as shift into usertype rules. However, the
* cjunk scanner also has a rule of two leading identifiers.
* The problem occurs because the second identifier is at the
* second lookahead (hence LALR(2)) seen from the recursion
* rule 'resources'.
* Thus, the scanner will pick *one* of the rules in preference
* of the other (in this case it was 'cjunk') and generates a
* syntax error if the trailing context wasn't seen. The
* correct action would have been to rollback the stack and
* decent into the 'userres' rule, but this cannot be done
* because yacc only parses LALR(1).
* The problem is prevented from happening by making the decent
* into the cjunk-scanning obsolete and explicitly force the
* scanner to require no more than 1 lookahead.
*/
| stringtable {
/* Don't do anything, stringtables are converted to
* resource_t structures when we are finished parsing and
...
...
tools/wrc/wrc.h
View file @
c5a46ba9
...
...
@@ -16,8 +16,8 @@
#define WRC_MAJOR_VERSION 1
#define WRC_MINOR_VERSION 1
#define WRC_MICRO_VERSION
7
#define WRC_RELEASEDATE "(24-
Jul
-2000)"
#define WRC_MICRO_VERSION
8
#define WRC_RELEASEDATE "(24-
Aug
-2000)"
#define WRC_STRINGIZE(a) #a
#define WRC_EXP_STRINGIZE(a) WRC_STRINGIZE(a)
...
...
tools/wrc/wrc.man
View file @
c5a46ba9
.TH WRC 1 "
July 24, 2000" "Version 1.1.7
" "Wine Resource Compiler"
.TH WRC 1 "
August 24, 2000" "Version 1.1.8
" "Wine Resource Compiler"
.SH NAME
wrc \- Wine Resource Compiler
.SH SYNOPSIS
...
...
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