Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52439 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59081 invoked from network); 17 May 2011 17:01:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 May 2011 17:01:42 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 74.125.83.170 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 74.125.83.170 mail-pv0-f170.google.com Received: from [74.125.83.170] ([74.125.83.170:33407] helo=mail-pv0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 18/31-53005-5F9A2DD4 for ; Tue, 17 May 2011 13:01:42 -0400 Received: by pvg16 with SMTP id 16so373859pvg.29 for ; Tue, 17 May 2011 10:01:38 -0700 (PDT) Received: by 10.68.57.235 with SMTP id l11mr1276532pbq.478.1305651698693; Tue, 17 May 2011 10:01:38 -0700 (PDT) Received: from [192.168.200.140] (c-76-126-236-132.hsd1.ca.comcast.net [76.126.236.132]) by mx.google.com with ESMTPS id u1sm476831pbm.41.2011.05.17.10.01.37 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 May 2011 10:01:37 -0700 (PDT) Message-ID: <4DD2A9F0.7060304@lerdorf.com> Date: Tue, 17 May 2011 10:01:36 -0700 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 MIME-Version: 1.0 To: Ferenc Kovacs CC: Stas Malyshev , internals References: <887FE7CFF6F8DE4BB3A9535F53AFD06A492D09D2@il-ex2.zend.net> <4DD2A731.9000400@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: [RFC] Improved parser error message From: rasmus@lerdorf.com (Rasmus Lerdorf) On 05/17/2011 09:58 AM, Ferenc Kovacs wrote: > On Tue, May 17, 2011 at 6:49 PM, Stas Malyshevwrote: > >> Hi! >> >> I think we need to keep token name in the message, since it makes it easier >> to understand what parser expected if you need to debug the parser (as >> opposed to your code). So I think we need to have both the human-readable >> name and the token name, as Andi suggested. >> > > on the sidenote, I don't think that many people out there would start > debuging the php src if they are presented with an error by the engine. > but I'm fine with Andi's suggestion. While that is true, I did run across some code a while back that used the tokenizer extension in conjunction with the error messages. If we decouple the error messages completely from the tokens there would be no way to write that same code. An edge case, but I don't think it hurts to keep the token name there. -Rasmus