Skip to content

Commit 864366e

Browse files
committed
Upgrade deprecated directives and use non-posix bison
With Bison 3.0 some directives are deprecated: - %name-prefix "x" should be %define api.prefix {x} - %error-verbose should be %define parse.error verbose Bison 3.3 also started emiting more warnings and since PHP souce parsers are not POSIX compliant this patch fixes this as pointed out via 495a46a.
1 parent 38b2244 commit 864366e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Diff for: ext/json/json_parser.y

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ int json_yydebug = 1;
4747
}
4848

4949
%pure-parser
50-
%name-prefix "php_json_yy"
50+
%define api.prefix {php_json_yy}
5151
%lex-param { php_json_parser *parser }
5252
%parse-param { php_json_parser *parser }
5353

Diff for: sapi/phpdbg/phpdbg_parser.y

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
2929
%}
3030

3131
%pure-parser
32-
%error-verbose
32+
%define parse.error verbose
3333

3434
%code requires {
3535
#include "phpdbg.h"

Diff for: scripts/dev/genfiles

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
# Parser generator
3737
YACC=${YACC:-bison}
38-
YACC="$YACC -y -l"
38+
YACC="$YACC -l"
3939

4040
# Lexer generator
4141
RE2C=${RE2C:-re2c}

0 commit comments

Comments
 (0)