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 218503 - SQL parser fails on /**/ comments
Summary: SQL parser fails on /**/ comments
Status: RESOLVED DUPLICATE of bug 216174
Alias: None
Product: db
Classification: Unclassified
Component: SQL Editor (show other bugs)
Version: 7.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-18 07:22 UTC by honza.hubeny
Modified: 2012-09-18 18:04 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description honza.hubeny 2012-09-18 07:22:55 UTC

    
Comment 1 honza.hubeny 2012-09-18 07:28:03 UTC
The SQL parser has defect in syntax coloring block comments - /**/ 

Following code is colored well:
/**/
alter trigger ZAK_VYKRESY_AU
as
  declare variable xmontazni_cislo integer;
  declare variable xzmena_datumu smallint;
  declare variable xcharakter_skupiny varchar(1);
.....
_BUT_

Following code is _not_ colored well:
/***/
alter trigger ZAK_VYKRESY_AU
as
  declare variable xmontazni_cislo integer;
  declare variable xzmena_datumu smallint;
  declare variable xcharakter_skupiny varchar(1);
.....

The code after the /***/ comment is recognized as comments. When you add another asterisk *  to the block comment it is resolved well. It seems that odd number of asterisk in block comment is good and even not. So /**/ - good coloring, /***/ false, /****/ good and so on...
Comment 2 honza.hubeny 2012-09-18 07:33:29 UTC
This false behaviour was not in previous netbeans releases. On the same SQL source code there were not such errors in 7.1 and prior versions.
Comment 3 matthias42 2012-09-18 18:04:35 UTC
Nice catch and diagnosis - but vbeffa was faster ;-)

For details please see bug 216174

*** This bug has been marked as a duplicate of bug 216174 ***