Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53464 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96168 invoked from network); 21 Jun 2011 09:29:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jun 2011 09:29:48 -0000 Authentication-Results: pb1.pair.com header.from=ekneuss@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=ekneuss@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: ekneuss@gmail.com X-Host-Fingerprint: 209.85.214.42 mail-bw0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:57239] helo=mail-bw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F8/D1-18727-A84600E4 for ; Tue, 21 Jun 2011 05:29:47 -0400 Received: by bwz18 with SMTP id 18so3509114bwz.29 for ; Tue, 21 Jun 2011 02:29:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=hf00kWzNrVPex/9PuWmc5wx+dxUqKBUoSp33JJy+ExY=; b=jlwjwF9B/zs2U5sxyQ1kxjWjggfnie3ugd8dO1iVcHcrVKYYqrdB22eah/2f32It6w w/f6rg9N0DAlAHfpj5WHY9qm7/XXLKMIv8iHC33speccJ7qjLIdbpA2bcxN/JiAIHYk7 i1tfKl/qgVOaB9ATgUcOZskA4cvNaXCl1SxxY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=O2J5vYcBLm9E4tsj6XMtVWT0vZrKFFK4M8aJPSgJgAMWrwZLsvdgCH20/UScFDt7So bmEkmwhd9zNAr/emGsv84WjT20DCTMHzIV15J0aqriOBC6RD7kPuBAuz312m0DifCXM/ D5IwfFgA0C5ePVOhIRoSZvZXkJCCkGc+daYMk= MIME-Version: 1.0 Received: by 10.204.14.7 with SMTP id e7mr8427bka.31.1308648583147; Tue, 21 Jun 2011 02:29:43 -0700 (PDT) Sender: ekneuss@gmail.com Received: by 10.204.58.78 with HTTP; Tue, 21 Jun 2011 02:29:43 -0700 (PDT) In-Reply-To: <4E000D33.60400@php.net> References: <4DFA7EDF.5050802@sugarcrm.com> <4E000D33.60400@php.net> Date: Tue, 21 Jun 2011 11:29:43 +0200 X-Google-Sender-Auth: HBzNbDyZZwOeLWFJ5YqUIwmwg7I Message-ID: To: Rasmus Lerdorf Cc: Felipe Pena , Derick Rethans , Stas Malyshev , PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] 5.4 features for vote (long) From: colder@php.net (Etienne Kneuss) Hello, On Tue, Jun 21, 2011 at 05:17, Rasmus Lerdorf wrote: > On 06/20/2011 08:09 PM, Felipe Pena wrote: > >> I'm ok with this, I just think it's ugly to repeat the token name in >> the definition in the .y file. :P >> >> %token T_LNUMBER "'number' (T_LNUMBER)" >> %token T_STRING "'identifier' (T_STRING)" > > Why 'identifier' and not 'string' or 'string-literal' there? For people using php, a string or a string literal is "foo" or 'foo'. T_STRING does not represent "foo" nor 'foo'. identifier seems to adequatly describe what it encompass. IMHO, it would even be better if the unnexpect part displayed the actual content: i.e. function 1() => Unexpected number '1' ... or function 1() => Unexpected '1'... Best, > People know > what a string is. I am not sure that people know what an identifier is, > so in this case changing the error message from something that says > "expecting T_STRING" to "expecting identifier" isn't making the error > message any clearer as far as I am concerned. This is one of the reasons > that having the token name there is useful. It provides continuity with > the current error messages that people have grown used to. I think we > either need the token names, or we need more descriptive names printed. > > -Rasmus > -- Etienne Kneuss http://www.colder.ch