Try to fix Bison portability issue
YYEOF works as a token for "end of file" on my dev box but fails in CI. I assume it must be a Bison version difference. Based on the Bison manual, I'm trying this fix (which also works on my dev box).
This commit is contained in:
parent
f0c0816cde
commit
bb011e28a9
1 changed files with 4 additions and 1 deletions
|
|
@ -1587,6 +1587,9 @@ static String *add_qualifier_to_declarator(SwigType *type, SwigType *qualifier)
|
|||
Node *node;
|
||||
};
|
||||
|
||||
// Define special token END for end of input.
|
||||
%token END 0
|
||||
|
||||
%token <id> ID
|
||||
%token <str> HBLOCK
|
||||
%token <id> POUND
|
||||
|
|
@ -2010,7 +2013,7 @@ constant_directive : CONSTANT identifier EQUAL definetype SEMI {
|
|||
Swig_warning(WARN_PARSE_BAD_VALUE,cparse_file,cparse_line,"Bad constant value (ignored).\n");
|
||||
$$ = 0;
|
||||
}
|
||||
| CONSTANT error YYEOF {
|
||||
| CONSTANT error END {
|
||||
Swig_error(cparse_file,cparse_line,"Missing ';' after %%constant.\n");
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue