Indexing c/c++ comments and text files

Michael Sullivan <[email protected]> Mon, 19 Jul 2010 16:43:47 -0400
Newsgroups gmane.comp.gnu.global.general
Message-ID <[email protected]>
I would like to instruct global/gtags to index c/c++ comments (and potentially other text files).  For example, the following c++ comment text isn't currently indexed by global/gtags, but I would like it to be:

   // SOME_IMPORTANT_ENUM_1
   "Some corresponding text 1",
   
   // SOME_IMPORTANT_ENUM_2
   "Some corresponding text 2",
   
   etc.

The comment text refers to symbols that are indexed elsewhere and I want a cross-reference search to return references to the comment lines above.

When I used to use id-utils, I was able to achieve this by telling it that c/c++ files were actually text (e.g. set those extensions up to use the text parser in id-utils' langmap).  Although I found a langmap setting in the .globalrc file, it doesn't appear to have a "text" parser.

Is there a possibility of adding something like this?