Author Topic: Parsing of '\' in a comment block  (Read 4287 times)

Offline Folco

  • Regular
  • ***
  • Posts: 343
    • Folco's blog (68k lover)
Parsing of '\' in a comment block
« on: April 24, 2010, 05:54:34 pm »
I think that the parsing of '\' in a comment block is bad (wrong color) :

But once I had moved my cursor around the '\', it became of the same color that the comment block. But I can't reproduce a reliable case where the color becomes right...
Kernel Extremist - PedroM power ©

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5916
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Parsing of '\' in a comment block
« Reply #1 on: April 25, 2010, 03:06:12 pm »
Hi, I guess this is a bug in scintilla control and not related to Codeblocks.( Codeblocks internally use scintilla Editor control).
I'm not sure which version of CB did you use? if it is the recent SVN version, then you should fire a bug to Sintilla control site. it is
http://www.scintilla.org/

Oh, it seems the scintilla is version 2.11 now, and I'm not sure the currently version used in Codeblocks source. :D
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Parsing of '\' in a comment block
« Reply #2 on: April 25, 2010, 03:59:14 pm »
It's definitely a scintilla bug, because it hapens also in scite and codelite.

Offline Folco

  • Regular
  • ***
  • Posts: 343
    • Folco's blog (68k lover)
Re: Parsing of '\' in a comment block
« Reply #3 on: May 01, 2010, 01:41:59 am »
Thank you.

I did the report, and got that answer : http://sourceforge.net/tracker/?func=detail&aid=2992750&group_id=2439&atid=102439

They think that it's not a scintilla bug, because it would be a normal highlight.
Nevertheless, I already saw this '\' correctly highlighted. I have looked in the Syntax Highlighting configuration, but I didn't see how to solve that...

What do you think ?
Kernel Extremist - PedroM power ©

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Parsing of '\' in a comment block
« Reply #4 on: May 01, 2010, 09:51:24 am »
I'm not sure whether they are right.

A javadoc comment block should start with "/**" and not with more than two asterisks in my opinion.
According to the doxygen-docs, you should use somthing like this "/**********//**", if you want to use a line of asterisks to make a comment block more visibly.
See here: http://www.stack.nl/~dimitri/doxygen/docblocks.html (listpoint 4.).

I just tested it with doxygen and it ignores blocks starting with more than two asterisks.

So it might be lexer error, but as written before I am not sure.
According to the javadoc-reference there must be a leading "/**" and a trailing "*/", but leading asterisks are allowed in each line, and if everything after "/**" is treated as line, all following asterisks in the first line should be ignored and it's a doxygen-bug not to do so.

But that's something that should be discussed at another place (doxygen, javadoc forum/mailing list perhaps).

Offline Folco

  • Regular
  • ***
  • Posts: 343
    • Folco's blog (68k lover)
Re: Parsing of '\' in a comment block
« Reply #5 on: May 01, 2010, 10:05:05 am »
Ok, many thanks. But I am beginner in C/C++, and I don't know anything about Java, doxygen etc... So I am not able to continue this discussion...
But it's not very important, just a color issue.

Thanks again for your explanations. :)
Kernel Extremist - PedroM power ©