Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52394 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85417 invoked from network); 16 May 2011 14:33:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 May 2011 14:33:36 -0000 Authentication-Results: pb1.pair.com header.from=colder@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=colder@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 94.103.100.39 as permitted sender) X-PHP-List-Original-Sender: colder@php.net X-Host-Fingerprint: 94.103.100.39 mailer.immomigsa.ch Linux 2.6 Received: from [94.103.100.39] ([94.103.100.39:33853] helo=mailer.immomigsa.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 26/C8-26716-FB531DD4 for ; Mon, 16 May 2011 10:33:36 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by mailer.immomigsa.ch (Postfix) with ESMTP id 9484C4B625CE; Mon, 16 May 2011 16:33:32 +0200 (CEST) X-Virus-Scanned: amavisd-new at immomigsa.ch Received: from mailer.immomigsa.ch ([127.0.0.1]) by localhost (mailer.immomigsa.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LSmhtJFqqUoJ; Mon, 16 May 2011 16:33:32 +0200 (CEST) Received: from crousti (vpn-b-195-223.epfl.ch [128.178.195.223]) by mailer.immomigsa.ch (Postfix) with ESMTPSA id 3E1CD4B625DE; Mon, 16 May 2011 16:33:31 +0200 (CEST) Received: by crousti (sSMTP sendmail emulation); Mon, 16 May 2011 16:33:34 +0200 Date: Mon, 16 May 2011 16:33:34 +0200 To: Felipe Pena Cc: internals Message-ID: <20110516143334.GA8469@crousti.epfl.ch> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: [PHP-DEV] [RFC] Improved parser error message From: colder@php.net (Etienne Kneuss) Hi Felipe, On May 16 9:15:24, 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? That's great, it will save millions of headaches. Best, > > Thanks. > > -- > Regards, > Felipe Pena