Skip to content

Commit 03b717d

Browse files
committed
Remove unused PHP_PROG_LEX macro
Since PHP 5.3 flex lexer has been replaced with re2c. Commit 0f9e2b1 made PHP_PROG_LEX macro still available for BC. In commit df6bd50 it was updated. Since this macro is entirely not used in PHP source code anymore from PHP 5.3 and up, this patch removes it together with some old traces of warnings suppression and comments.
1 parent 255e29f commit 03b717d

File tree

5 files changed

+2
-57
lines changed

5 files changed

+2
-57
lines changed

acinclude.m4

-51
Original file line numberDiff line numberDiff line change
@@ -2099,57 +2099,6 @@ AC_DEFUN([PHP_PROG_BISON], [
20992099
PHP_SUBST(YACC)
21002100
])
21012101

2102-
dnl
2103-
dnl PHP_PROG_LEX
2104-
dnl
2105-
dnl Search for (f)lex and check it's version
2106-
dnl
2107-
AC_DEFUN([PHP_PROG_LEX], [
2108-
dnl we only support certain flex versions
2109-
flex_version_list="2.5.4"
2110-
2111-
AC_PROG_LEX
2112-
dnl ## Make flex scanners use const if they can, even if __STDC__ is not
2113-
dnl ## true, for compilers like Sun's that only set __STDC__ true in
2114-
dnl ## "limit-to-ANSI-standard" mode, not in "ANSI-compatible" mode
2115-
AC_C_CONST
2116-
if test "$ac_cv_c_const" = "yes" ; then
2117-
LEX_CFLAGS="-DYY_USE_CONST"
2118-
fi
2119-
2120-
if test "$LEX" = "flex"; then
2121-
AC_CACHE_CHECK([for flex version], php_cv_flex_version, [
2122-
flex_version=`$LEX -V -v --version 2>/dev/null | $SED -e 's/^.* //'`
2123-
php_cv_flex_version=invalid
2124-
for flex_check_version in $flex_version_list; do
2125-
if test "$flex_version" = "$flex_check_version"; then
2126-
php_cv_flex_version="$flex_check_version (ok)"
2127-
fi
2128-
done
2129-
])
2130-
else
2131-
flex_version=none
2132-
fi
2133-
2134-
case $php_cv_flex_version in
2135-
""|invalid[)]
2136-
if test -f "$abs_srcdir/Zend/zend_language_scanner.c" && test -f "$abs_srcdir/Zend/zend_ini_scanner.c"; then
2137-
AC_MSG_WARN([flex versions supported for regeneration of the Zend/PHP parsers: $flex_version_list (found: $flex_version)])
2138-
else
2139-
flex_msg="Supported flex versions are: $flex_version_list"
2140-
if test "$flex_version" = "none"; then
2141-
flex_msg="flex not found. flex is required to generate the Zend/PHP parsers! $flex_msg"
2142-
else
2143-
flex_msg="Found invalid flex version: $flex_version. $flex_msg"
2144-
fi
2145-
AC_MSG_ERROR([$flex_msg])
2146-
fi
2147-
LEX="exit 0;"
2148-
;;
2149-
esac
2150-
PHP_SUBST(LEX)
2151-
])
2152-
21532102
dnl
21542103
dnl PHP_PROG_RE2C
21552104
dnl

build/build2.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ targets = $(TOUCH_FILES) configure $(config_h_in)
2727
PHP_AUTOCONF ?= 'autoconf'
2828
PHP_AUTOHEADER ?= 'autoheader'
2929

30-
SUPPRESS_WARNINGS ?= 2>&1 | (egrep -v '(AC_TRY_RUN called without default to allow cross compiling|AC_PROG_CXXCPP was called before AC_PROG_CXX|defined in acinclude.m4 but never used|AC_PROG_LEX invoked multiple times|AC_DECL_YYTEXT is expanded from...|the top level)'||true)
30+
SUPPRESS_WARNINGS ?= 2>&1 | (egrep -v '(AC_TRY_RUN called without default to allow cross compiling|AC_PROG_CXXCPP was called before AC_PROG_CXX|defined in acinclude.m4 but never used)'||true)
3131

3232
all: $(targets)
3333

makedist

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ for i in $LT_TARGETS; do
8585
fi
8686
done
8787

88-
# generate some files so people don't need bison, flex and autoconf
88+
# generate some files so people don't need bison, re2c and autoconf
8989
# to install
9090
set -x
9191
./buildconf --copy --force

sapi/phpdbg/phpdbg_parser.c

-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@
7676
/*
7777
* phpdbg_parser.y
7878
* (from php-src root)
79-
* flex sapi/phpdbg/dev/phpdbg_lexer.l
80-
* bison sapi/phpdbg/dev/phpdbg_parser.y
8179
*/
8280

8381
#include "phpdbg.h"

sapi/phpdbg/phpdbg_parser.y

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
/*
44
* phpdbg_parser.y
55
* (from php-src root)
6-
* flex sapi/phpdbg/dev/phpdbg_lexer.l
7-
* bison sapi/phpdbg/dev/phpdbg_parser.y
86
*/
97

108
#include "phpdbg.h"

0 commit comments

Comments
 (0)