Yann's tagging page
There are a number of programs allowing to do the job of
creating hypertexts of C/C++ source trees. However, none of them
give a perfect result yet. I'll put on this page the results of
my works in attempting to improve them.
GLOBAL is made of several parts: a tagger frontend (gtags)
which can use several backends (ctags, exuberant-ctags, etc.), a
tagger backend (gctags), and an hypertext generator (htags).
GLOBAL builds 3 tag databases (function definitions, function
references, and symbols), and only uses the "function tagfiles"
for hypertext building, which means that type definitions and
the like do not get cross-referenced, let alone variables.
Here are my resources related to GLOBAL:
- A hacked version of the provided exuberant-ctags support,
which allows definitions of types, classes, and global variables
to be indexed in the "function definitions tags db" (GTAGS), and
uses the "symbols tags db" (GSYMS) as if it were a "function
references tags db" (GRTAGS). This is quite successful in
producing a thoroughly cross-referenced source tree, although it
sometimes creates too many hrefs, especially on local variables
which share the same name as a global one, and which should not
appear (this is mainly a concern on large multi-binary source
trees, and such errors are quickly identified in C code when
looking at the definition of local vars - if they're
cross-linked, there's a namespace conflict).
- A patch to improve gtags processing speed. It does so by
using xargs to run less successive instances of the tagger,
and achieves sensible gains in speed, although it is still to
be improved.
It is still not ready for everyday use, though, as it does
not support any options of gtags, and does not produce a
correct GPATH file yet.
The Linux Cross-Referencing engine. Not as easy to use as
GLOBAL, but indexes types and variables by default. Not
investigated yet.
I believe it may be possible to write a "perfect C++ tagger"
with this engine (and maybe a "perfect java tagger" with its
friend OpenJava).
It could be plugged into one of the hypertext generators.
Yann Dirson
Last modified: Thu Aug 14 22:13:32 CEST 2003