Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31706 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47717 invoked by uid 1010); 17 Aug 2007 17:33:36 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 47702 invoked from network); 17 Aug 2007 17:33:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Aug 2007 17:33:36 -0000 Authentication-Results: pb1.pair.com smtp.mail=greg@chiaraquartet.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=greg@chiaraquartet.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain chiaraquartet.net from 38.99.98.18 cause and error) X-PHP-List-Original-Sender: greg@chiaraquartet.net X-Host-Fingerprint: 38.99.98.18 beast.bluga.net Linux 2.6 Received: from [38.99.98.18] ([38.99.98.18:44130] helo=mail.bluga.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A5/50-45535-DEBD5C64 for ; Fri, 17 Aug 2007 13:33:34 -0400 Received: from mail.bluga.net (localhost.localdomain [127.0.0.1]) by mail.bluga.net (Postfix) with ESMTP id 19F28C0D334; Fri, 17 Aug 2007 10:33:31 -0700 (MST) Received: from [192.168.0.106] (CPE-76-84-1-170.neb.res.rr.com [76.84.1.170]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bluga.net (Postfix) with ESMTP id BF10FC0D331; Fri, 17 Aug 2007 10:33:29 -0700 (MST) Message-ID: <46C5DC6F.6070800@chiaraquartet.net> Date: Fri, 17 Aug 2007 12:35:43 -0500 User-Agent: Thunderbird 1.5.0.12 (X11/20070604) MIME-Version: 1.0 To: Ralph Schindler CC: Marcus Boerger , PHP Developers Mailing List References: <46C30190.2060106@pooteeweet.org> <1222090294.20070816222340@marcus-boerger.de> <46C5D1BB.8040007@smashlabs.com> In-Reply-To: <46C5D1BB.8040007@smashlabs.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: [PHP-DEV] reserved word alert From: greg@chiaraquartet.net (Gregory Beaver) Ralph Schindler wrote: > Hey David & Lucas, > I brought this up a year ago on the list here: > > http://marc.info/?t=114728193700003&r=1&w=2 > > Essentially, the trend will continue to be that as keyword requiring > features are added, the global naming space will continue to become > smaller and less safe for older applications written for older versions > of php. > > Until it becomes a goal of php-internals to add contextual awareness and > sensitivity to the compiler's tokenizer, this will always be a problem. > > Here is a more amusing list of method names that will also not work: > http://marc.info/?l=php-dev&m=114736739115429&w=2 > > And the general opinion summed up by Wez ;) > > http://marc.info/?l=php-dev&m=114764099400409&w=2 Hi, Doing this with flex is non-trivial. It's a lot easier with a re2c-based lexer, but porting the flex scanner to re2c is the definition of "oh-my-god-almighty" complex and until someone just does it, it ain't gonna happen. The other hackish alternative is to add rules to the parser with reserved words (T_FUNCTION T_IMPORT as well as T_FUNCTION T_STRING, etc. etc.), but this slows down the parser and adds unnecessary duplication. Greg