Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62874 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71030 invoked from network); 6 Sep 2012 18:42:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Sep 2012 18:42:23 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.42 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.215.42 mail-lpp01m010-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:35227] helo=mail-lpp01m010-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2E/BC-03079-E8EE8405 for ; Thu, 06 Sep 2012 14:42:22 -0400 Received: by lahl5 with SMTP id l5so1372810lah.29 for ; Thu, 06 Sep 2012 11:42:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xaciGgKJZijBAbA42fMkXRQewd0xIaqzT1s73jvoWg8=; b=wv4TKypMP0n0N8PnSjehNqMRmZAaJxJKqeywZQElZlUBJIp7PpsTV44Lq9qLdfBhDX v6SCBAaOmfr9A+1mIj2eV4ZX+vGHM08FrgI7uBkAoJicc8gJVFwbEGvNOfR2WCHCB/Zg UXf5LcXCgpc90ZkRdm5Q6o3UGdar2sZ6B/MbVw+zNWAcNotVX9WF+GWZTJxb61BPYCOW lThG0GTrN7gxM5FQ69VmKgvt+kw71eZ343yzTRJb4D+hNxZ31GuAbAs4b/61fKIu+w6q FVZ4I+c7MG7aLsZCh9O9DmNSz0iKwF66zNXUnCE829vzUOO33xZnmrQrnAKr2PufLaLf 4X2w== MIME-Version: 1.0 Received: by 10.152.108.146 with SMTP id hk18mr2076859lab.26.1346956939400; Thu, 06 Sep 2012 11:42:19 -0700 (PDT) Received: by 10.152.108.145 with HTTP; Thu, 6 Sep 2012 11:42:19 -0700 (PDT) In-Reply-To: <5048686E.5080800@sugarcrm.com> References: <504836A3.20904@zend.com> <50485647.1060102@hoa-project.net> <50485AA6.4090803@sugarcrm.com> <50486410.4010407@php.net> <5048686E.5080800@sugarcrm.com> Date: Thu, 6 Sep 2012 20:42:19 +0200 Message-ID: To: Stas Malyshev Cc: "internals@lists.php.net" , Sebastian Bergmann Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Moving to an AST-based parsing/compilation process From: nikita.ppv@gmail.com (Nikita Popov) On Thu, Sep 6, 2012 at 11:10 AM, Stas Malyshev wrote: > And if it's impossible to match behavior of the existing parser - do I > get it right that the proposed idea is to actually break real code that > people run now in PHP because it was too hard to parse for people that > write add-on tools to PHP? Somehow it does not sound like a good idea. > If we have doubt that we can match the existing PHP behavior then the > idea of changing parser becomes even less appealing, because for 99% of > PHP users it would be pure downside without upsides. The users don't > care if the parser is complex, they care if their code runs. The whole thing obviously only makes sense if we can retain full syntax compatibility. If we have to break syntax, then this is a no-go anyway. But I'm fairly certain that we indeed can keep full compatibility. I implemented an AST-emitting PHP parser in PHP and am fairly sure that it is compatible with any PHP 5.4 source code. I don't see issues from this side. Nikita