Re: [RFC] 5.4 features for vote (long)
| From: | Christopher Jones | Date: | Mon, 20 Jun 2011 19:29:24 +0000 |
| Subject: | Re: [RFC] 5.4 features for vote (long) | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-53446@lists.php.net to get a copy of this message | ||
On 06/20/2011 08:50 AM, Derick Rethans wrote:
On Mon, 20 Jun 2011, Felipe Pena wrote: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/2011/6/20 Etienne Kneuss<colder@php.net>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, DerickI'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