Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69190 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74271 invoked from network); 18 Sep 2013 13:01:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Sep 2013 13:01:12 -0000 Authentication-Results: pb1.pair.com header.from=bobwei9@hotmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=bobwei9@hotmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain hotmail.com designates 157.55.1.170 as permitted sender) X-PHP-List-Original-Sender: bobwei9@hotmail.com X-Host-Fingerprint: 157.55.1.170 dub0-omc2-s31.dub0.hotmail.com Windows 2000 SP4, XP SP1 Received: from [157.55.1.170] ([157.55.1.170:4454] helo=dub0-omc2-s31.dub0.hotmail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 99/A6-43258-614A9325 for ; Wed, 18 Sep 2013 09:01:11 -0400 Received: from DUB405-EAS76 ([157.55.1.136]) by dub0-omc2-s31.dub0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 18 Sep 2013 06:01:07 -0700 X-TMN: [nKIxjRzKg1sD8WiTHbk7mRrlQfkQ3vqy] X-Originating-Email: [bobwei9@hotmail.com] Message-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable References: MIME-Version: 1.0 (1.0) In-Reply-To: Date: Wed, 18 Sep 2013 14:58:39 +0200 To: Nicolas Grekas CC: Developers PHP Mailing List X-OriginalArrivalTime: 18 Sep 2013 13:01:07.0984 (UTC) FILETIME=[2411D100:01CEB46F] Subject: Re: [PHP-DEV] [RFC] Keywords as identifiers From: bobwei9@hotmail.com (Bob Weinand) Am 18.09.2013 um 14:30 schrieb "Nicolas Grekas" : > Hi Bob, thanks for the RFC! >=20 > For those of us that use token_get_all(), will the newly allowed token > appear as T_STRING or as T_%KEYWORD%? > May I suggest you add a word about it in the RFC? >=20 > As Ryan pointed out in the other thread, a T_%KEYWORD% has a high chance t= o > break existing documentation generators or code parsers. >=20 > As Nikita remembered us, "default" in $a->default is emitted as a T_STRING= . > It might be consistent to also emit a T_STRING on the new cases that you > plan to allow? >=20 > Regards, > Nicolas Absolutely true; this will still emit a keyword token. The reason is some limitation of the lexer which allows me to switch to a mo= de after I have encountered for example a :: (e.g. lookbehind), but it doesn= 't allow me lookaheads. If you have an idea how to circumwent that; I'm open to any suggestions. Bob Weinand=