Req #53446 [Opn->Bgs]: Missing } error message
| From: | johannes@php.net | Date: | Thu, 02 Dec 2010 10:45:13 +0000 |
| Subject: | Req #53446 [Opn->Bgs]: Missing } error message | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-156688@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53446&edit=1
ID: 53446
Updated by: johannes@php.net
Reported by: lynch@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] aharvey@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] lynch@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