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

Summary: SQL parser fails on /**/ comments
Product: db Reporter: honza.hubeny
Component: SQL EditorAssignee: Jiri Rechtacek <jrechtacek>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 7.2   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

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 ***