]> granicus.if.org Git - php/commitdiff
Upgrade deprecated directives and use non-posix bison
authorPeter Kokot <peterkokot@gmail.com>
Mon, 18 Mar 2019 23:33:53 +0000 (00:33 +0100)
committerPeter Kokot <peterkokot@gmail.com>
Tue, 19 Mar 2019 19:29:20 +0000 (20:29 +0100)
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
495a46aa1dc564656bf919cb49aae48a31ae15f4.

ext/json/json_parser.y
sapi/phpdbg/phpdbg_parser.y
scripts/dev/genfiles

index aa37c0365844303247aca75e42d8aa4c9826fc2f..c3d0976ad9bf93135fa0a8d6a6718a8c3711e4b7 100644 (file)
@@ -47,7 +47,7 @@ int json_yydebug = 1;
 }
 
 %pure-parser
-%name-prefix "php_json_yy"
+%define api.prefix {php_json_yy}
 %lex-param  { php_json_parser *parser  }
 %parse-param { php_json_parser *parser }
 
index 88baa010b28eff32a27036e118cc8d945fee6e8e..c4f6682fee54963160571995c35e5d39e2a2a946 100644 (file)
@@ -29,7 +29,7 @@ ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
 %}
 
 %pure-parser
-%error-verbose
+%define parse.error verbose
 
 %code requires {
 #include "phpdbg.h"
index 4e3a6d62e07838f58aa1acd1c5ed50c8692bb901..c633429e0f8a8d64807b15353428d055e22caf74 100755 (executable)
@@ -35,7 +35,7 @@
 
 # Parser generator
 YACC=${YACC:-bison}
-YACC="$YACC -y -l"
+YACC="$YACC -l"
 
 # Lexer generator
 RE2C=${RE2C:-re2c}