If you use the simple regexp parser, then this is a pretty trivial exercise to extend Exuberant Ctags to support another language.
For example, the following is an example of a regexp parser taken from the Exuberant Ctags parser page :
#include "general.h"
#include "parse.h"
static void installMakefileRegex (const langType language)
{
addTagRegex (language, "(^|[ \t])([A-Z0-9_]+)[ \t]*:?=", "\\2", "m,macro", "i");
}
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;
}
source
share