Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35721 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88277 invoked by uid 1010); 22 Feb 2008 07:27:57 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 88262 invoked from network); 22 Feb 2008 07:27:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Feb 2008 07:27:57 -0000 Authentication-Results: pb1.pair.com header.from=mls@pooteeweet.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mls@pooteeweet.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pooteeweet.org from 85.10.196.195 cause and error) X-PHP-List-Original-Sender: mls@pooteeweet.org X-Host-Fingerprint: 85.10.196.195 serveforce1.backendmedia.com Linux 2.6 Received: from [85.10.196.195] ([85.10.196.195:50641] helo=serveforce1.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0E/A0-64513-B797EB74 for ; Fri, 22 Feb 2008 02:27:56 -0500 Received: from [192.168.0.151] (77-57-23-243.dclient.hispeed.ch [77.57.23.243]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client did not present a certificate) by serveforce1.backendmedia.com (Postfix) with ESMTP id 49B6112241A8; Fri, 22 Feb 2008 08:28:31 +0100 (CET) Cc: Christian Schneider , internals Mailing List Message-ID: <43751B88-74D8-42C5-B8D1-5E7DD7A6A504@pooteeweet.org> To: Gregory Beaver In-Reply-To: <47BE6413.6090507@chiaraquartet.net> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Fri, 22 Feb 2008 08:27:08 +0100 References: <47BD207C.2080905@chiaraquartet.net> <47BD928E.8080006@cschneid.com> <47BE6413.6090507@chiaraquartet.net> X-Mailer: Apple Mail (2.919.2) X-backendmedia-com-MailScanner-Information: Please contact the ISP for more information X-backendmedia-com-MailScanner: Found to be clean X-backendmedia-com-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=0.133, required 6, AWL 0.03, RDNS_DYNAMIC 0.10) X-backendmedia-com-MailScanner-From: mls@pooteeweet.org X-Spam-Status: No Subject: Re: [PHP-DEV] Re: Trait aliasing syntax suggestions From: mls@pooteeweet.org (Lukas Kahwe Smith) On 22.02.2008, at 06:56, Gregory Beaver wrote: > Another detail: The implementation of the parser changes should still >> >> allow a class or function called "trait", i.e. "trait" should only >> be a >> keyword at specific positions in the source to avoid unneccesary BC >> breaks. The current patch has this BC problem. > > This is not possible to implement, having tried to do a similar thing > for 'import' and 'namespace.' The reason is that we can encounter a > classname at any point thanks to "classname::whatever" syntax, so it > slows the lexer down a bit in that for every T_TRAIT we would have to > check to see if the next 2 characters are ::, and makes the lexer > uber-complicated. It's a big mess. Not yet at any rate. From what I hear the next step after migration to re2c [1] is to migrate to lemon, which should make stuff like this possible. However while re2c has a chance of making it into PHP 5.3, the lemon part seems a bit further off. regards, Lukas [1] http://blog.somabo.de/2008/02/php-on-re2c.html