[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Source type recognition
From: |
Shigio Yamaguchi |
Subject: |
Re: Source type recognition |
Date: |
Fri, 12 Apr 2002 23:58:43 +0900 |
Hi,
> actually global determines the type of a source code (C,C++,java...) by =
> a
> fixed set of file extensions. But there are some applications that use
> different extensions (*.CPP for instance is not recognizes as C++ =
> code). In
> our own product we implemented a C interpreter that uses *.sft file
> extension for header files and *.sfm for sources. To specify them in =
> the
> gtags.conf as suffixes is not sufficient because no tags are extracted =
> from
> this files.
> So I would suggest a more flexible way of defining file extensions in
> gtags.conf:
>
> :C-suffixes=3Dc,h,sfm,sft:\
> :C++-suffixes=3DH,hpp,c++,cpp,CPP,C:\
> ...
I agree with you.
But in GLOBAL, handler(gtags) and parser(gctags) are separated each other,
so that handler can treat various ctags's style parser.
How about adding --langmap option to gctags(1) like Exuberant Ctags?
For example,
% gctags --langmap=c:sfm,sft ...
Gctags accepts files which have suffix 'sfm' or 'sft' as C source files.
You can write this command line in gtags.conf (or $HOME/.globalrc).
+---------------------------
|....
| :GTAGS=gctags --langmap=c:sfm,sft %s:\
| :GRTAGS=gctags -r --langmap=c:sfm,sft %s:\
| :GSYMS=gctags -s --langmap=c:sfm,sft %s:\
|....
What do you think?
--
Shigio Yamaguchi - Tama Communications Corporation