Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74445 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64759 invoked from network); 23 May 2014 11:59:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 May 2014 11:59:00 -0000 Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.173 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.128.173 mail-ve0-f173.google.com Received: from [209.85.128.173] ([209.85.128.173:41874] helo=mail-ve0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8C/CC-63132-3083F735 for ; Fri, 23 May 2014 07:58:59 -0400 Received: by mail-ve0-f173.google.com with SMTP id pa12so6130813veb.18 for ; Fri, 23 May 2014 04:58:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=IucsV7B5DKlCk14/vwWvXaTu5UpmHbhHHlnpRYS8O7M=; b=jtCtOGDC/CWs9QlNNh+SQ541a17Gqmd+HIG3BalByrpRSMz1x9fN46tFYEqR7iuhQs HhETtqNQx80cV0rtAKjJpcvIlH3YNgShPE49umMGfzwpOB0smO8yTsqSdIaPwFYzaS0v b/iS+LF75Y8ZhfPD1QUUDeXs3jokwQEwjlqoHSt0z5oIZJ9r83m1Wj+SikUnZ9YCzHeo rQB36TeCyBrBfCFIaYlhwSLY17unAnwsX/ta05tx9SCZHV+Zd3tZh6cnV95fd9/vmE7/ iQmepJ9Z3vI4XIyaAIPG9jV5YFSihY3DJO6r1Vqy0K1JH/e+qXv1yvNQS+y/Jl9Vz/6+ BIyA== X-Received: by 10.52.252.43 with SMTP id zp11mr730834vdc.44.1400846336079; Fri, 23 May 2014 04:58:56 -0700 (PDT) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.220.81.68 with HTTP; Fri, 23 May 2014 04:58:15 -0700 (PDT) In-Reply-To: References: <2DC459EE-AE98-4CAE-977A-6FB918FDEF54@bafford.com> <537EA42B.4000000@lerdorf.com> Date: Fri, 23 May 2014 13:58:15 +0200 X-Google-Sender-Auth: 1FZNLRFmAj6Nc0HkIceul9LHvqc Message-ID: To: Pierre Joye Cc: John Bafford , Rasmus Lerdorf , PHP internals , Ferenc Kovacs Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Bison 3 support for PHP 5.5 From: jpauli@php.net (Julien Pauli) On Fri, May 23, 2014 at 8:40 AM, Pierre Joye wrote: > Hi John, > > On Fri, May 23, 2014 at 3:44 AM, John Bafford wrote: >> Hi Rasmus, >> >> On May 22, 2014, at 20:28, Rasmus Lerdorf wrote: >> >>> On 5/22/14, 6:01 PM, John Bafford wrote: >>>> Hi, >>>> >>>> I=E2=80=99ve submitted a PR (https://github.com/php/php-src/pull/683) = to add support for Bison 3.0 to PHP 5.5. >>>> >>>> I=E2=80=99ve run the tests on this patch, with no unexpected errors, w= ith 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 mino= r changes) master branches. >>> >>> Could you explain your changes a bit? You removed %pure-parser, for >>> example, and you shuffled globals around. This looks like more than jus= t >>> adding support for Bison 3. >>> >>> -Rasmus >> >> I replaced %pure-parser (which was deprecated) with %pure_parser (its re= placement). (Also, YYERROR_VERBOSE, which also was deprecated, with %error-= verbose.) >> >> Most of the changes in the PR revolve around this change in Zend/zend_la= nguage_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 rep= laced with %parse-param and %lex-param. However, you cannot (or I did not s= ee a way to) conditionally define parameters, as PHP was previously doing h= ere. >> >> So instead, I created the TSRMLS_DN and TSRMLS_CN macros which, in the Z= TS 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. > > Thanks for your work, always good to support less archaic version of biso= n. > > Some comments: > > - does it still work with previous versions? If yes, do you know which > or which minimum version we should then require? > - 5.5 is stable, I am not sure it is a good idea to do these changes > there. 5.6 may be a good candidate (but has to be done quickly, RMs > can confirm if it is still possible) That's a no-go for 5.5. 5.5 is stable, 1year old (at this email date), and we should not change such a thing into this stable branch. For 5.6, we are actually in RC stage (with first RC to come soon). Seeing the comments saying that it's all compatible and tests have passed, I'm not against requiring bison 3.x for PHP 5.6. Waiting for Ferenc's answer ;-) Thank you for your patch and your support to make PHP better. Julien Pauli