atom feed23 messages in net.php.lists.internals[PHP-DEV] [RFC] Improved parser error...
FromSent OnAttachments
Felipe PenaMay 16, 2011 5:15 am 
Ferenc KovacsMay 16, 2011 5:30 am 
Felipe PenaMay 16, 2011 5:46 am 
Etienne KneussMay 16, 2011 7:33 am 
Pierrick CharronMay 16, 2011 7:36 am 
Florian AnderiaschMay 16, 2011 10:51 am 
Julien PauliMay 17, 2011 3:30 am 
Felipe PenaMay 17, 2011 7:17 am 
Andi GutmansMay 17, 2011 9:01 am 
Gustavo LopesMay 17, 2011 9:06 am 
Derick RethansMay 17, 2011 9:08 am 
Gustavo LopesMay 17, 2011 9:09 am 
Zeev SuraskiMay 17, 2011 9:13 am 
Ferenc KovacsMay 17, 2011 9:31 am 
Stas MalyshevMay 17, 2011 9:49 am 
Ferenc KovacsMay 17, 2011 9:57 am 
Rasmus LerdorfMay 17, 2011 10:01 am 
Gustavo LopesMay 18, 2011 1:41 am 
Felipe PenaJun 23, 2011 11:08 am 
Jordi BoggianoJun 23, 2011 11:15 am 
Stas MalyshevJun 23, 2011 11:16 am 
Paul DragoonisJun 23, 2011 11:20 am 
Sebastian BergmannJul 18, 2011 2:52 am 
Subject:[PHP-DEV] [RFC] Improved parser error message
From:Felipe Pena (feli@gmail.com)
Date:May 16, 2011 5:15:01 am
List:net.php.lists.internals

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.