This patch fixes a problem observed with exuberant
ctags 5.5.4, parsing multi-line comments,
i.e. /* ... */
My fix is in the verilog parser file only: If the
same bug applies to other languages (as I suspect it
might), it may be necessary to replicate this fix to
The problem is that if the last character of a multi-
line comment, immediately before the closing */
delimiter happens to be an asterisk (or any even-
number of consecutive asterisks), then the parser
mistakenly thinks that the comment has not ended.
It's easier to understand with an example. See
attached file example.v
I have attached a patch file showing the very minor
change that it took to fix the problem. (patch.txt)
The root cause is obvious by looking at the patch
- Patch file is attached.
- Example test file demonstrating the problem,
follows inline below:
// File example.v
// Below is an example of a comment that
// is mis-parsed by
// exuberant ctags.
// It uses the multi-line comment
// format, i.e. /* ... */
// except that in this case, the
// character sequence immediately
// preceeding the closing delimiter is
// an asterisk. (Any even
// number of asterisks would have the
// same problem.
// The line immediately afterwards
// is used to demonstrate the problem.
// the module name 'wahoo' isn't recognised,
// because the parser mistakenly
// thinks we are still in a multi-line comment.
// Try running:
// ctags -x example.v
// with and without my proposed fix,
// to see the difference.
* I am a multi-line comment
* I happen to end in a strange
* (but legal) way: **/
module wahoo ()
Log in to post a comment.
Sign up for the SourceForge newsletter:No, thanks