Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53446 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84163 invoked from network); 20 Jun 2011 19:56:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jun 2011 19:56:52 -0000 Authentication-Results: pb1.pair.com header.from=christopher.jones@oracle.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=christopher.jones@oracle.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain oracle.com from 148.87.113.121 cause and error) X-PHP-List-Original-Sender: christopher.jones@oracle.com X-Host-Fingerprint: 148.87.113.121 rcsinet10.oracle.com Received: from [148.87.113.121] ([148.87.113.121:23704] helo=rcsinet10.oracle.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C6/13-64171-F9F9FFD4 for ; Mon, 20 Jun 2011 15:29:36 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet10.oracle.com (Switch-3.4.4/Switch-3.4.2) with ESMTP id p5KJTVWF016338 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 20 Jun 2011 19:29:33 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p5KJTUIc014832 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 20 Jun 2011 19:29:31 GMT Received: from abhmt013.oracle.com (abhmt013.oracle.com [141.146.116.22]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p5KJTPVx006801 for ; Mon, 20 Jun 2011 14:29:25 -0500 Received: from [130.35.68.31] (/130.35.68.31) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 20 Jun 2011 12:29:25 -0700 Message-ID: <4DFF9F94.4010306@oracle.com> Date: Mon, 20 Jun 2011 12:29:24 -0700 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: internals@lists.php.net References: <4DFA7EDF.5050802@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090206.4DFF9F9D.007B:SCFMA922111,ss=1,re=-4.000,fgs=0 Subject: Re: [PHP-DEV] [RFC] 5.4 features for vote (long) From: christopher.jones@oracle.com (Christopher Jones) On 06/20/2011 08:50 AM, Derick Rethans wrote: > 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 > Having the script token text is a good idea. If messages are changing, can we feasibly strip the Bison "syntax error, " component? The "Command line code" component is arguably useless too. Or at least it could be lower cased to "command line", though changing this in php_cli.c may have an unwanted cascading effect (?) An example message: Parse error: unexpected 'quoted-string' (T_CONSTANT_ENCAPSED_STRING), expecting identifier or '(' on line 1 Chris -- Email: christopher.jones@oracle.com Tel: +1 650 506 8630 Blog: http://blogs.oracle.com/opal/