This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 142922 - If a semicolon is missing, add "possibly missed semicolon" to the standard error message
Summary: If a semicolon is missing, add "possibly missed semicolon" to the standard er...
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
Depends on: 142917
Blocks:
  Show dependency tree
 
Reported: 2008-08-05 13:56 UTC by Vladimir Kvashin
Modified: 2009-06-02 14:43 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2008-08-05 13:56:03 UTC
This refers issue #142917, which propose to change ANTLR messages to something like "unexpected symbol".
In the case semicolon is missing it's worth adding "possibly missed semicolon".
Comment 1 Alexey Vladykin 2008-08-06 17:46:09 UTC
To implement this enhancement we need to change grammar significantly. With current grammar and the errors it reports
it's very hard to tell what is actually wrong. Consider the following code:

class A {} // missing semicolon
class B {};

The message we get from parser tells that "}" after "class A {" is unexpected, which is not quite correct. Much better
way to describe this syntax error is to report unexpected token "class" in the second line.
Comment 2 Alexey Vladykin 2008-11-13 14:25:30 UTC
Nikolay, could you please evaluate if it's possible to change the grammar to produce better error messages?