Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74438 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30983 invoked from network); 23 May 2014 01:44:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 May 2014 01:44:39 -0000 Authentication-Results: pb1.pair.com header.from=john@bafford.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=john@bafford.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain bafford.com from 96.241.205.2 cause and error) X-PHP-List-Original-Sender: john@bafford.com X-Host-Fingerprint: 96.241.205.2 nova.zort.net Received: from [96.241.205.2] ([96.241.205.2:56196] helo=nova.zort.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 87/F8-63132-508AE735 for ; Thu, 22 May 2014 21:44:38 -0400 Received: from [IPv6:::1] (nova.zort.net [96.241.205.2]) (authenticated bits=0) by nova.zort.net (8.14.5/8.14.5) with ESMTP id s4N1iTIE030244 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Thu, 22 May 2014 21:44:30 -0400 Content-Type: multipart/signed; boundary="Apple-Mail=_6D1DD741-C43A-44F5-8329-FBA9DBBCBA5B"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) In-Reply-To: <537EA42B.4000000@lerdorf.com> Date: Thu, 22 May 2014 20:44:29 -0500 Cc: internals@lists.php.net Message-ID: References: <2DC459EE-AE98-4CAE-977A-6FB918FDEF54@bafford.com> <537EA42B.4000000@lerdorf.com> To: Rasmus Lerdorf X-Mailer: Apple Mail (2.1878.2) Subject: Re: [PHP-DEV] Bison 3 support for PHP 5.5 From: john@bafford.com (John Bafford) --Apple-Mail=_6D1DD741-C43A-44F5-8329-FBA9DBBCBA5B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Hi Rasmus, On May 22, 2014, at 20:28, Rasmus Lerdorf wrote: > On 5/22/14, 6:01 PM, John Bafford wrote: >> Hi, >>=20 >> I=92ve submitted a PR (https://github.com/php/php-src/pull/683) to = add support for Bison 3.0 to PHP 5.5. >>=20 >> I=92ve run the tests on this patch, with no unexpected errors, with = Bison 2.4 (minimum version for PHP 5.5 and 5.6), 2.7, and 3.0, with and = without --enable-maintainer-zts against the current PHP-5.5 and (with = minor changes) master branches. >=20 > Could you explain your changes a bit? You removed %pure-parser, for > example, and you shuffled globals around. This looks like more than = just > adding support for Bison 3. >=20 > -Rasmus I replaced %pure-parser (which was deprecated) with %pure_parser (its = replacement). (Also, YYERROR_VERBOSE, which also was deprecated, with = %error-verbose.) Most of the changes in the PR revolve around this change in = Zend/zend_language_parser.y: -%code requires { -#ifdef ZTS -# define YYPARSE_PARAM tsrm_ls -# define YYLEX_PARAM tsrm_ls -#endif -} +%parse-param { void *tsrm_ls } +%lex-param { void *tsrm_ls } YYPARSE_PARAM and YYLEX_PARAM were deprecated, and then removed, and = replaced with %parse-param and %lex-param. However, you cannot (or I did = not see a way to) conditionally define parameters, as PHP was previously = doing here. So instead, I created the TSRMLS_DN and TSRMLS_CN macros which, in the = ZTS case, work like TSRMLS_D/TSRMLS_C, but when ZTS is off, still = resolve to a parameter (that must always be present), which is passed = NULL. -John --Apple-Mail=_6D1DD741-C43A-44F5-8329-FBA9DBBCBA5B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJTfqf9AAoJEHUs6HKhTmiHU0UH/2xybC3Ps3/BhEcqQSShCU6m sCrTlzUT9J+V6OzyUdhRe1LLN/y+TA+s7VFc8a8flav/Bi7F51QJKvG6Do4c1w8D CpxIBZWYKFZS+JB11dYV/EVZzoH8V5fruhbFQMIEVUeYXFUdbYoAoX69/7P7w2MI QHYlLuR2Bs4sdtbHAOu2fZUf9xgTHyKCb3BuLbq8OwEDHSRvhTiy/i6j/dOubtxZ ByvojJnq2MUuyOdZC6ufVQ3ys7n+OKqJFRE0ID4m4XcAw3xW/2/gqU22/P9VcFTH uvxyFDChoxKlqWG1hzvGsHVvdg9ALuAtoLBH5Bsvsbsnasye8/8FTO2KL1Phdwg= =eNcg -----END PGP SIGNATURE----- --Apple-Mail=_6D1DD741-C43A-44F5-8329-FBA9DBBCBA5B--