mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 03:04:47 +00:00
wrc: Add a workaround for older bison versions.
Bison < 3.6 doesn't apply api.prefix to YYEMPTY. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
599ecd97a8
commit
c09a5da157
|
@ -483,8 +483,7 @@ typedecl:
|
||||||
|
|
||||||
cppquote: tCPPQUOTE '(' aSTRING ')' { $$ = $3; }
|
cppquote: tCPPQUOTE '(' aSTRING ')' { $$ = $3; }
|
||||||
;
|
;
|
||||||
import_start: tIMPORT aSTRING ';' { assert(yychar == PARSER_EMPTY);
|
import_start: tIMPORT aSTRING ';' { $$ = xmalloc(sizeof(struct _import_t));
|
||||||
$$ = xmalloc(sizeof(struct _import_t));
|
|
||||||
$$->name = $2;
|
$$->name = $2;
|
||||||
$$->import_performed = do_import($2);
|
$$->import_performed = do_import($2);
|
||||||
if (!$$->import_performed) yychar = aEOF;
|
if (!$$->import_performed) yychar = aEOF;
|
||||||
|
|
|
@ -199,6 +199,9 @@ static resource_t *build_fontdirs(resource_t *tail);
|
||||||
static resource_t *build_fontdir(resource_t **fnt, int nfnt);
|
static resource_t *build_fontdir(resource_t **fnt, int nfnt);
|
||||||
static int rsrcid_to_token(int lookahead);
|
static int rsrcid_to_token(int lookahead);
|
||||||
|
|
||||||
|
/* bison >= 3.6 applies api.prefix also to YYEMPTY */
|
||||||
|
#define YYEMPTY (-2)
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%define api.prefix {parser_}
|
%define api.prefix {parser_}
|
||||||
|
@ -490,11 +493,11 @@ resource
|
||||||
* want_id because we already have a lookahead that
|
* want_id because we already have a lookahead that
|
||||||
* cannot be undone.
|
* cannot be undone.
|
||||||
*/
|
*/
|
||||||
if(yychar != PARSER_EMPTY && yychar != tNL)
|
if(yychar != YYEMPTY && yychar != tNL)
|
||||||
dont_want_id = 1;
|
dont_want_id = 1;
|
||||||
|
|
||||||
if(yychar == tNL)
|
if(yychar == tNL)
|
||||||
yychar = PARSER_EMPTY; /* Could use 'yyclearin', but we already need the*/
|
yychar = YYEMPTY; /* Could use 'yyclearin', but we already need the*/
|
||||||
/* direct access to yychar in rule 'usrcvt' below. */
|
/* direct access to yychar in rule 'usrcvt' below. */
|
||||||
else if(yychar == tIDENT)
|
else if(yychar == tIDENT)
|
||||||
parser_warning("LANGUAGE statement not delimited with newline; next identifier might be wrong\n");
|
parser_warning("LANGUAGE statement not delimited with newline; next identifier might be wrong\n");
|
||||||
|
@ -2725,7 +2728,7 @@ static int rsrcid_to_token(int lookahead)
|
||||||
int token;
|
int token;
|
||||||
|
|
||||||
/* Get a token if we don't have one yet */
|
/* Get a token if we don't have one yet */
|
||||||
if(lookahead == PARSER_EMPTY)
|
if(lookahead == YYEMPTY)
|
||||||
lookahead = yylex();
|
lookahead = yylex();
|
||||||
|
|
||||||
/* Only numbers are possibly interesting */
|
/* Only numbers are possibly interesting */
|
||||||
|
|
Loading…
Reference in a new issue