Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53476 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20486 invoked from network); 21 Jun 2011 11:14:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jun 2011 11:14:03 -0000 Authentication-Results: pb1.pair.com header.from=felipensp@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=felipensp@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.83.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: felipensp@gmail.com X-Host-Fingerprint: 74.125.83.170 mail-pv0-f170.google.com Received: from [74.125.83.170] ([74.125.83.170:54515] helo=mail-pv0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 03/A1-12449-AFC700E4 for ; Tue, 21 Jun 2011 07:14:02 -0400 Received: by pvh10 with SMTP id 10so4518901pvh.29 for ; Tue, 21 Jun 2011 04:13:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=CIB0f/M6v79RSkdphIV+v6deTBo/W0rfXS7F5Xq2vwk=; b=mStAH3OCozcqlydD9h4o8Pn3XPzeOfXGFsGeIT/zLC3Z94d4OKd4k3N0+fTMVNhHtu Tmt28iBqpAYjowxlL5axN179m+sq6yh/LnJnQMuEU5PwW0k5VSKTJV1P+AA0BBIZbBSm 7aUdf6myk/cTVtIqjK+UQXkER8uPSXuJGGBUQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=kwfRkBz/xhqMzEjqAz/bNw27b6uJ5BKhfLZT4P0CJQT8zZCbH+jBXjGIyZCO2HrSe2 Vkt92n35EDlchP4QUs2nQ2c8H2BCODYmh1YOoTLL2vlUEOl0A+XUZ9efklu08WcYp/Gg /DVexag63i/UmcTYkpTvIjiiTJy8e8DASJ5Jw= Received: by 10.142.222.19 with SMTP id u19mr1084526wfg.413.1308654839074; Tue, 21 Jun 2011 04:13:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.125.4 with HTTP; Tue, 21 Jun 2011 04:13:39 -0700 (PDT) In-Reply-To: References: <4DFA7EDF.5050802@sugarcrm.com> <4E000D33.60400@php.net> Date: Tue, 21 Jun 2011 08:13:39 -0300 Message-ID: To: Etienne Kneuss Cc: Rasmus Lerdorf , 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: felipensp@gmail.com (Felipe Pena) 2011/6/21 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'... > Currently it's possible to do this, it'll only require a static variable in yytnamerr implementation. -- Regards, Felipe Pena