Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52395 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87096 invoked from network); 16 May 2011 14:36:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 May 2011 14:36:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierrick@webstart.fr; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=pierrick@webstart.fr; sender-id=unknown Received-SPF: error (pb1.pair.com: domain webstart.fr from 74.125.83.170 cause and error) X-PHP-List-Original-Sender: pierrick@webstart.fr X-Host-Fingerprint: 74.125.83.170 mail-pv0-f170.google.com Received: from [74.125.83.170] ([74.125.83.170:38188] helo=mail-pv0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 07/19-26716-78631DD4 for ; Mon, 16 May 2011 10:36:56 -0400 Received: by pvg16 with SMTP id 16so2483339pvg.29 for ; Mon, 16 May 2011 07:36:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.14.167 with SMTP id q7mr238450pbc.430.1305556612953; Mon, 16 May 2011 07:36:52 -0700 (PDT) Received: by 10.68.56.2 with HTTP; Mon, 16 May 2011 07:36:52 -0700 (PDT) In-Reply-To: References: Date: Mon, 16 May 2011 10:36:52 -0400 Message-ID: To: Felipe Pena Cc: internals Content-Type: multipart/alternative; boundary=bcaec51f8fc526396c04a3659690 Subject: Re: [PHP-DEV] [RFC] Improved parser error message From: pierrick@webstart.fr (Pierrick Charron) --bcaec51f8fc526396c04a3659690 Content-Type: text/plain; charset=ISO-8859-1 +1 Regards Pierrick On 16 May 2011 08:15, Felipe Pena wrote: > Hi all, > As I have proposed previously in an old thread... What about we name all > the > tokens to have an improved parser error message? (i.e. anymore > T_PAAMAYIM_NEKUDOTAYIM, T_DOLLAR_OPEN_CURLY_BRACES in the messages etc) > > Some examples: > > $ sapi/cli/php -r 'function ""' > Patched: > Parse error: syntax error, unexpected quoted-string, expecting identifier > or > '(' in Command line code on line 1 > > Current: > Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting > T_STRING or '(' in Command line code on line 1 > > > $ sapi/cli/php -r 'echo ::a;' > Patched: > Parse error: syntax error, unexpected :: in Command line code on line 1 > > Current: > Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in Command > line > code on line 1 > > Other examples and patch at: > https://wiki.php.net/rfc/improved-parser-error-message > > Any thoughts? > > Thanks. > > -- > Regards, > Felipe Pena > --bcaec51f8fc526396c04a3659690--