diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2020-02-01 07:07:28 +0100 |
---|---|---|
committer | kocsismate <kocsismate@woohoolabs.com> | 2020-02-01 14:21:53 +0100 |
commit | 4cbffd89d9e82d81a26746aadca27ad061cab43a (patch) | |
tree | 5758a2142048208443671c486f0855cd2c72855c /win32 | |
parent | 2127a37b833a863e28a4692e7394613b89c89290 (diff) | |
download | php-git-4cbffd89d9e82d81a26746aadca27ad061cab43a.tar.gz |
Clean up the generation of the parsers
Prefer '%define api.value.type' to '#define YYSTYPE', so that Bison
know the type.
Use '%code requires' to declare what is needed to define the api.value.type
(that code is output in the generated header before the generated
definition of YYSTYPE).
Prefer '%define api.prefix' inside the grammar file to '-p' outside,
as anyway the functions defined in the file actually use this prefix.
Prefer `%param` to both `%parse-param` and `%lex-param`.
Closes GH-5138
Diffstat (limited to 'win32')
-rw-r--r-- | win32/build/Makefile | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/win32/build/Makefile b/win32/build/Makefile index a6b54c07ff..d0315f41c4 100644 --- a/win32/build/Makefile +++ b/win32/build/Makefile @@ -75,16 +75,16 @@ $(BUILD_DIR)\$(PHPDLL).def: $(PHP_DLL_DEF_SOURCES) type $(PHP_DLL_DEF_SOURCES) > $(BUILD_DIR)\$(PHPDLL).def Zend\zend_ini_parser.c Zend\zend_ini_parser.h: Zend\zend_ini_parser.y - $(BISON) --output=Zend/zend_ini_parser.c -v -d -p ini_ Zend/zend_ini_parser.y + $(BISON) --output=Zend/zend_ini_parser.c -v -d Zend/zend_ini_parser.y Zend\zend_language_parser.c Zend\zend_language_parser.h: Zend\zend_language_parser.y - $(BISON) --output=Zend/zend_language_parser.c -v -d -p zend Zend/zend_language_parser.y + $(BISON) --output=Zend/zend_language_parser.c -v -d Zend/zend_language_parser.y @if "$(SED)" neq "" $(SED) -i "s,^int zendparse\(.*\),ZEND_API int zendparse\1,g" Zend/zend_language_parser.c @if "$(SED)" neq "" $(SED) -i "s,^int zendparse\(.*\),ZEND_API int zendparse\1,g" Zend/zend_language_parser.h @if "$(SED)" neq "" $(SED) -i "s,^#ifndef YYTOKENTYPE,#include \"zend.h\"\n#ifndef YYTOKENTYPE,g" Zend/zend_language_parser.h sapi\phpdbg\phpdbg_parser.c sapi\phpdbg\phpdbg_parser.h: sapi\phpdbg\phpdbg_parser.y - $(BISON) --output=sapi/phpdbg/phpdbg_parser.c -v -d -p phpdbg_ sapi/phpdbg/phpdbg_parser.y + $(BISON) --output=sapi/phpdbg/phpdbg_parser.c -v -d sapi/phpdbg/phpdbg_parser.y !if $(RE2C) != "" Zend\zend_ini_scanner.c: Zend\zend_ini_scanner.l |