Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52386 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59239 invoked from network); 16 May 2011 12:15:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 May 2011 12:15:47 -0000 Authentication-Results: pb1.pair.com header.from=felipensp@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=felipensp@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: felipensp@gmail.com X-Host-Fingerprint: 209.85.216.42 mail-qw0-f42.google.com Received: from [209.85.216.42] ([209.85.216.42:49799] helo=mail-qw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 90/45-26716-27511DD4 for ; Mon, 16 May 2011 08:15:47 -0400 Received: by qwi4 with SMTP id 4so2530898qwi.29 for ; Mon, 16 May 2011 05:15:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=bjPuTermAiLgpZLPUQhT0x15MUa/ZEPU4nDxX3ZAk5s=; b=FNTcIgVh/Kz80UVvnyT2jzNsThBfng2/TTraPOneWMxhQ8xKYqjOxUgh+O7njT0jQn 8HbzIqDjff2ew03CWGfNQ7SNRYep84waPDVixakUKviwycfQbhZjEcsj9mRjq+14nzZ3 pw/DJHq5GMSbRse9JJc8Zysnwu1O58EhwrIh4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=C3JAwH45zVGXRFyg9miiuqrDwB+lqGrQf7/a58ykl50x5QXptd43xF/LcLycBLejD1 PZo0p9mzPr7k80dPdh+3Zzwi63HuLfFnDWY62yfcCrH5EvI+aRLxmUWUFnRlgq7/H9j7 bmJ/0r3TH2ud8za2bQYyYiKZTX/mRm/TGFd0M= Received: by 10.229.118.72 with SMTP id u8mr3158750qcq.1.1305548144179; Mon, 16 May 2011 05:15:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.92.7 with HTTP; Mon, 16 May 2011 05:15:24 -0700 (PDT) Date: Mon, 16 May 2011 09:15:24 -0300 Message-ID: To: internals Content-Type: multipart/alternative; boundary=000e0cd5cff45efa9b04a3639d50 Subject: [RFC] Improved parser error message From: felipensp@gmail.com (Felipe Pena) --000e0cd5cff45efa9b04a3639d50 Content-Type: text/plain; charset=UTF-8 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 --000e0cd5cff45efa9b04a3639d50--