What I am Doing?
I am now constructing a comments segregator as a part of my simple IDE stimulator (Which will detect all the comments in the java code).
In that my task is to note down all the starting and ending positions of comments and documentations of all forms…
1. //
2. /*......*/
3. /**.......*/
(I am doing this using Deterministic Finite Automata.)
And I will give separate colors for comments and documentation.
Where my doubt is?
Though it is uncommon,
When code has a statement like this /***/, how should I interpret that code?
Whether I must treat it as comment or documentation?
Treat it as a comment since obviously there is no documentation to be communicated to anyone.
Edit:
Eclipse, for example, will treat
/***/as documentation. Taking cue from this site where Java grammar is explained,/**"documentation"*/also formally specifies that documentation is between/**and*/, even when length of its content is zero.Practically, I’d say: treat it as comments. Formally, treat it as documentation. Pick one.