Edit report at http://bugs.php.net/bug.php?id=53446&edit=1
ID: 53446 Updated by: johan...@php.net Reported by: ly...@php.net Summary: Missing } error message -Status: Open +Status: Bogus Type: Feature/Change Request Package: Scripting Engine problem Operating System: N/A PHP Version: 5.3.3 Block user comment: N Private report: N New Comment: Thee are quite a few options. Given class Foo { public function bar() {} the next thing might be a "}" or "public" or "var" or "const" or a comment or ... the parser can't know. The parser can only tell you what is not allowed. There's a project for a new parser which tries to improve error messages. Previous Comments: ------------------------------------------------------------------------ [2010-12-02 06:04:11] ahar...@php.net I suspect this would need Lemon, but I'll let the people who know about such things weigh in. ------------------------------------------------------------------------ [2010-12-02 05:52:51] ly...@php.net Description: ------------ Parse error: syntax error, unexpected $end 99 times out of a hundred this means they are missing a closing } How tricky would it be to make this message say what TOKEN is expected next, or something along the lines of "look for a missing '}', ')' or quote" or whatever gets the parser into this state?... Every newbie gets bit by this. Some of us got bit a lot. :-) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53446&edit=1