[comp.sources.wanted] PD ctags program wanted

pete@tsc (Pete Schmitt) (07/24/88)

I'm looking for a PD ctags program.  If anyone can point to one
for me I'd appreciate it.  Thanks.


-- 
           \\\!///		Peter Schmitt
            _   _ 		UUCP: decwrl!tsc.dnet!pete
          ( Q   Q )		ARPA: pete%tsc.dec.com@decwrl.dec.com
---,,,,-------U-------,,,,--- 

rkxyv@mergvax.UUCP (Robert Kedoin) (07/26/88)

There is a PD program similar to ctags called mkid which creates databases
of identifiers.  The program was written by Greg Mcgary of Sun
(gmcgary@ecd.sun.com).  

*mkid* is available from the comp.sources.unix archives.

DISCLAIMER:  I have no connection with the author...I just use the program.

The following excerpt from the TUTORIAL file should give you an idea for the
functionality of mkid:

This is a program identifier database package.  These tools provide a
logical extension to ctags. (which is limited in that it only stores the
location of function and type *definitions*a)  The ID facility
stores the locations for all uses of identifiers, pre-processor
names, and numbers. (in decimal, octal or hex)

...

The following types of queries supported:

* name lookup
	list all the files where an identifier occurs.  The name
	may be a regular expression.

* name apropos
	list all the files for all identifiers that have the sub-string
	name in them.  Matches are done in a case-insensitive mammer.

* name `grep'
	search for an identifier in all the files where it occurs.
	This is an optimized `grep' over all the sources--we only
	search on files that contain the identifier.

* name edit
	invoke an editor on the files where an identifier occurs,
	and use the identifier as an initial search string.

* file lookup
	list all identifiers that occur in a file, or list
	the identifiers that are common between two files.

* non-unique names
	list the names of all indentifiers whose names are non-unique
	within some number of characters.  This is useful when porting
	a program from a `flexnames' system to one more limited names.

* solo
	list all identifiers that occur exactly once in a software
	system.  This may be useful for locating identifiers that are
	declared but never used, or library functions that are used
	but never declared.
	

The first four queries are handled by one program.  The type of query
is determined by the name the program was invoked with.  The four links
are lid(1) for `lookup id', aid(1) for `apropos id', gid(1) for `grep
id' and eid(1) for `edit id'.  One or more identifiers may be passed on
the command line.  The identifiers may be literal strings or regular
expressions.  Here are some examples:

$ lid FILE
FILE           extern.h {fid,gets0,getsFF,idx,init,lid,mkid,opensrc,scan-asm,scan-c}.c

$ lid FILE$
AF_FILE        mkid.c
AF_IDFILE      mkid.c
FILE           extern.h {fid,gets0,getsFF,idx,init,lid,mkid,opensrc,scan-asm,scan-c}.c
IDFILE         id.h {fid,lid,mkid}.c
IdFILE         {fid,lid}.c
argFILE        mkid.c
gidFILE        lid.c
idFILE         {init,mkid}.c
inFILE         {gets0,getsFF,scan-asm,scan-c}.c
openSrcFILE    extern.h {idx,mkid,opensrc}.c
srcFILE        {idx,mkid,opensrc}.c

...

		-Rob Kedoin

UUCP:	...{philabs,motown,icus}\!mergvax\!rkxyv
ARPA:	rkxyv%mergvax.UUCP@uunet.uu.net
BITNET:	rkxyv%mergvax.UUCP@uunet.uu.net.BITNET
SNAIL-mail: Linotype Company - R&D 425 Oser Avenue Hauppauge, NY 11788
VOICE: (516) 434 - 2729