[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Ctags-devel] [Proposal] Combining of Exuberant Ctags and GNU GLOBAL
From: |
Shigio YAMAGUCHI |
Subject: |
Re: [Ctags-devel] [Proposal] Combining of Exuberant Ctags and GNU GLOBAL. |
Date: |
Wed, 5 Dec 2012 14:08:12 +0900 |
Hi,
On Wed, 05 Dec 2012 08:44:04 +0530
"Aneesh Kumar K.V" <address@hidden> wrote:
> I don't see makeSimpleReferenceTag getting called from any where. Did
> you miss part of the patch where we used this function ? Or is the patch
> partial ?
>
> -aneesh
I only made a mechanism for generating referece tags. You need to write
a parser using the mechanism, that is, makeSimpleReferenceTag().It's very easy.
For example, here is an example which treats references of Scheme language.
(You need to install the CVS version of GLOBAL.)
$ gtags
$ global -x current-line
current-line 37 scm/error.scm (define current-line #f) <=
definitions
$ global -xr current-line
current-line 40 scm/error.scm (set! current-line line)) <=
references
current-line 43 scm/error.scm (set! current-line #f))
Here is a patch to realize above.
*** ctags-5.8/scheme.c Thu Oct 12 12:26:40 2006
--- ctags-5.8.new/scheme.c Sun Nov 25 09:46:48 2012
***************
*** 76,81 ****
--- 76,83 ----
readIdentifier (name, cp);
makeSimpleTag (name, SchemeKinds, K_FUNCTION);
}
+ while (isspace (*cp))
+ cp++;
if (cp [0] == '(' &&
(cp [1] == 'S' || cp [1] == 's') &&
(cp [2] == 'E' || cp [2] == 'e') &&
***************
*** 89,95 ****
while (isspace (*cp))
cp++;
readIdentifier (name, cp);
! makeSimpleTag (name, SchemeKinds, K_SET);
}
}
vStringDelete (name);
--- 91,97 ----
while (isspace (*cp))
cp++;
readIdentifier (name, cp);
! makeSimpleReferenceTag (name, SchemeKinds, K_SET);
}
}
vStringDelete (name);
--
Shigio YAMAGUCHI <address@hidden>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663 C4B6 3CA5 BBB3 57BE DDA3