[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help using exhuberant ctags as a parser

From: Shigio Yamaguchi
Subject: Re: Help using exhuberant ctags as a parser
Date: Fri, 25 May 2001 01:52:38 +0900

> I would like to use global to generate an HTML site of some COBOL code
> in my organization.  My plans were to use the exhuberant ctags as the
> parser since it will parse COBOL code and then use htags to generate the
> HTML files.  I've followed the suggestions in the tutorial for plugging
> in another parser, but it doesn't seem to be working.  Here's output
> from my ksh session. (Note, I'm using a local copy of ctags that I
> compiled myself after downloading from sourceforge).
> % cp ~/bin/ctags ~/bin/ctags-exuberant
> % GTAGSLABEL=ctags-exuberant; export GTAGSLABEL
> % gtags
> % ls -l G* | awk '{printf( "%d\t%s\n", $5, $9 )}'
> 16384   GPATH
> 0       GRTAGS
> 0       GSYMS
> 0       GTAGS
> %
> The only file with anything in it is the GPATH file.  I can get ctags to
> work using "ctags *.cob" with no problems, and it creates a very largs
> tags file.

Probably, you didn't add 'cob' suffix to variable 'suffixes' in global.conf.
Without it, gtags cannot pick up cobol's source files.

Please add 'cob' to suffixes.

ctags-emacs|ctags based on etags|GNU Emacs ctags:\
        :suffixes=el,s,a,sa,asm,C,H,cpp,cxx,hxx,cc,c,h,y,cob:\  <= add 'cob'
        :GTAGS=/usr/local/bin/ctags-emacs -x -d -T -w %s:

> Whenever I run the htags program, it creates a bunch of html files that
> don't show anything at all.  No source code, no tags, no anything.

To apply htags to other languages, you must modify the parser (ctags) so that
it can treat function (procedure) references.
When you have done it, you can write global.conf like this:

        :GTAGS=/usr/local/bin/ctags-emacs -x -d -T -w %s:\
        :GRTAGS=/usr/local/bin/ctags-emacs -r -x -d -T -w %s:
                                        new option: locate function references

By the way, I regret to say that it is difficult for htags to treat other
language without modification. For example, htags cannot understand cobol
style comment. Currently, I don't know what will be needed.

If you make 'Htags for COBOL', please let me know.
Shigio Yamaguchi - Tama Communications Corporation
Mail: address@hidden, (Spare mail: address@hidden)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]