Skip to content

Commit 5265fab

Browse files
akimdnikic
authored andcommitted
Use "%define parse.error verbose"
The YYERROR_VERBOSE macro will no longer be supported in Bison 3.6. It was superseded by the "%error-verbose" directive in Bison 1.875 (2003-01-01). Bison 2.6 (2012-07-19) clearly announced that support for YYERROR_VERBOSE would be removed. Note that since Bison 3.0 (2013-07-25), "%error-verbose" is deprecated in favor of "%define parse.error verbose". Closes GH-5125.
1 parent ce44cd3 commit 5265fab

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Zend/zend_ini_parser.y

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
%require "3.0"
12
%{
23
/*
34
+----------------------------------------------------------------------+
@@ -31,7 +32,6 @@
3132
#include "win32/syslog.h"
3233
#endif
3334

34-
#define YYERROR_VERBOSE
3535
#define YYSTYPE zval
3636

3737
int ini_parse(void);
@@ -290,6 +290,7 @@ static void zval_ini_dtor(zval *zv)
290290

291291
%expect 0
292292
%define api.pure full
293+
%define parse.error verbose
293294

294295
%token TC_SECTION
295296
%token TC_RAW

Zend/zend_language_parser.y

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
%require "3.0"
12
%{
23
/*
34
+----------------------------------------------------------------------+
@@ -32,7 +33,6 @@
3233
#define yytnamerr zend_yytnamerr
3334
static YYSIZE_T zend_yytnamerr(char*, const char*);
3435

35-
#define YYERROR_VERBOSE
3636
#define YYSTYPE zend_parser_stack_elem
3737

3838
#ifdef _MSC_VER
@@ -43,6 +43,7 @@ static YYSIZE_T zend_yytnamerr(char*, const char*);
4343
%}
4444

4545
%define api.pure full
46+
%define parse.error verbose
4647
%expect 0
4748

4849
%code requires {

0 commit comments

Comments
 (0)