Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53457 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40338 invoked from network); 21 Jun 2011 03:17:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jun 2011 03:17:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.160.42 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.160.42 mail-pw0-f42.google.com Received: from [209.85.160.42] ([209.85.160.42:65138] helo=mail-pw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5B/C0-31231-83D000E4 for ; Mon, 20 Jun 2011 23:17:13 -0400 Received: by pwi4 with SMTP id 4so351674pwi.29 for ; Mon, 20 Jun 2011 20:17:09 -0700 (PDT) Received: by 10.142.13.16 with SMTP id 16mr915030wfm.391.1308626229604; Mon, 20 Jun 2011 20:17:09 -0700 (PDT) Received: from [192.168.200.5] (c-50-131-46-20.hsd1.ca.comcast.net [50.131.46.20]) by mx.google.com with ESMTPS id v6sm6820699wfe.14.2011.06.20.20.17.08 (version=SSLv3 cipher=OTHER); Mon, 20 Jun 2011 20:17:08 -0700 (PDT) Sender: Rasmus Lerdorf Message-ID: <4E000D33.60400@php.net> Date: Mon, 20 Jun 2011 20:17:07 -0700 Organization: PHP Infrastructure team User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110516 Thunderbird/3.1.10 MIME-Version: 1.0 To: Felipe Pena CC: Derick Rethans , Etienne Kneuss , Stas Malyshev , PHP Internals References: <4DFA7EDF.5050802@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] 5.4 features for vote (long) From: systems@php.net (Rasmus Lerdorf) 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? 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