Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62835 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22827 invoked from network); 5 Sep 2012 12:49:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Sep 2012 12:49:03 -0000 Authentication-Results: pb1.pair.com smtp.mail=packrat@nznet.gen.nz; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=packrat@nznet.gen.nz; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nznet.gen.nz from 210.54.141.251 cause and error) X-PHP-List-Original-Sender: packrat@nznet.gen.nz X-Host-Fingerprint: 210.54.141.251 mta04.xtra.co.nz Received: from [210.54.141.251] ([210.54.141.251:65413] helo=mta01.xtra.co.nz) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EB/A4-12568-83A47405 for ; Wed, 05 Sep 2012 08:49:01 -0400 Received: from [127.0.0.1] (really [125.237.151.145]) by mta01.xtra.co.nz with ESMTP id <20120905124853.IWMT19666.mta01.xtra.co.nz@[127.0.0.1]> for ; Thu, 6 Sep 2012 00:48:53 +1200 Message-ID: <50474A30.1090802@nznet.gen.nz> Date: Thu, 06 Sep 2012 00:48:48 +1200 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: PHP internals References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Moving to an AST-based parsing/compilation process From: packrat@nznet.gen.nz ("Morgan L. Owens") On 2012-09-05 07:57, Nikita Popov wrote: > Hey folks! > > Some people asked me what the advantages of using an AST-based > parsing/compilation process are, so I put together a few quick notes > in an RFC: > > https://wiki.php.net/rfc/ast_based_parsing_compilation_process > > It would be nice to get a few comments from other core devs on this. > > Nikita > I'm not a core dev, but I would like to add to the notes above that "third parties", such as myself, who want to do things with PHP source other than run it through a PHP interpreter would also appreciate such a separation of concerns. To date, I've been basing work, which exposes syntactic structure, on phc's maketea grammar (Phalanger's is more up to date, but also more complicated what with its provenance and the Linq and generics and all), but it's reverse-engineered and certainly wrong (oh, that reminds me...); the existing grammar is unsuitable because no-one wants to see _that_. Something authoritative that _by definition_ tracks the current version would be more reassuring as regards accuracy and compatibility (and be more likely to result in something that deserves to be let out into the world with confidence).