Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53420 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10129 invoked from network); 20 Jun 2011 15:50:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jun 2011 15:50:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:52451] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 33/F7-34681-94C6FFD4 for ; Mon, 20 Jun 2011 11:50:33 -0400 Received: from localhost (xdebug.org [127.0.0.1]) by xdebug.org (Postfix) with ESMTPS id 5EB2FDE13E; Mon, 20 Jun 2011 16:50:30 +0100 (BST) Date: Mon, 20 Jun 2011 16:50:30 +0100 (BST) X-X-Sender: derick@whisky To: Felipe Pena cc: Etienne Kneuss , Stas Malyshev , PHP Internals In-Reply-To: Message-ID: References: <4DFA7EDF.5050802@sugarcrm.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] [RFC] 5.4 features for vote (long) From: derick@php.net (Derick Rethans) On Mon, 20 Jun 2011, Felipe Pena wrote: > 2011/6/20 Etienne Kneuss > > > > I'd love to see the proposal from Felipe about the improved parse > > errors in that list. I believe that the patch was ready or almost > > ready? I can't find the RFC though, but maybe the RFC never existed... > > > > https://wiki.php.net/rfc/improved-parser-error-message I think this is good and helpful. I've two suggestions though: - Add the token name in parenthesis at the end of the string - Add '' around the token strings Examples: Parse error: syntax error, unexpected '<<=' (T_SL_EQUAL) in Command line code on line 1 Parse error: syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM) in Command line code on line 1 Parse error: syntax error, unexpected 'quoted-string' (T_CONSTANT_ENCAPSED_STRING), expecting identifier or '(' in Command line code on line 1 And we need to make sure to check for escaped < and > in HTML error messages :) cheers, Derick