tags:

views:

59

answers:

1

I work in a multi-language environment and use Vim + ctags for navigating the code. However we also use CORBA and exuberant ctags does not parse IDL files.

Does anyone know of a ctags compatible tags generator for IDL?

+1  A: 

If you use a simple regexp parser then it is a fairly trivial exercise to extend Exuberant Ctags to support another language.

For example, below is an example of a regexp parser taken from the Exuberant Ctags parser page:

/***************************************************************************
 * make.c
 * Regex-based parser for makefile macros
 **************************************************************************/
/* INCLUDE FILES */
#include "general.h"    /* always include first */
#include "parse.h"      /* always include */

/* FUNCTION DEFINITIONS */

static void installMakefileRegex (const langType language)
{
    addTagRegex (language, "(^|[ \t])([A-Z0-9_]+)[ \t]*:?=", "\\2", "m,macro", "i");
}

/* Create parser definition stucture */
extern parserDefinition* MakefileParser (void)
{
    static const char *const patterns [] = { "[Mm]akefile", NULL };
    static const char *const extensions [] = { "mak", NULL };
    parserDefinition* const def = parserNew ("Makefile");
    def->patterns   = patterns;
    def->extensions = extensions;
    def->initialize = installMakefileRegex;
    def->regex      = TRUE;
    return def;
}
Blake7