shin@sgtp.apple.juice (Shinichirou Sugou) (06/08/89)
Hello.
Emacs version is 18.53.
The source of etags seems to recognize 'struct/union/enum' datum. But, it
doesn't record them into TAGS file.
CAUTION: Reply-command supplied by your mail system may NOT generate
my address correctly.
Please use the following address instead.
shin%sgtp.apple.juice%lkbreth.foretune.junet@uunet.uu.net
---
Shinichirou Sugou shin%sgtp.apple.juice%lkbreth.foretune.junet@uunet.uu.netmosurm@pdx.mentor.com (Mosur Mohan) (12/01/89)
Emacs Version: GNU Emacs 18.52.1 of Thu Feb 16 1989 on daven (Domain/OS)
Etags Version: this etags.c has C++ support, and was sent to me by RMS
on 8 June 1989; it has the following header:
/* Tags file maker to go with GNUmacs
Copyright (C) 1984, 1987, 1988, 1989 Free Software Foundation, Inc. and Ken Arnold
[... copyleft ...]
* Authors:
* Ctags originally by Ken Arnold.
* FORTRAN added by Jim Kleckner.
* Ed Pelegri-Llopart added C typedefs.
* Gnu Emacs TAGS format and modifications by RMS?
* Sam Kendall added C++.
*/
This bug has to do with C++ header files. Etags has trouble
identifying function prototypes in header files; I traced the
problem down to the ';' character being included in the string
variable *notgd in etags.c. In function "consider_token", there is a
test:
if (! isgood (c))
goto badone;
where isgood (c) returns _gd[c], which is defined by the string *notgd
as follows in etags.c:
*notgd = ",;"; /* non-valid after-function chars */
From the documentation, my understanding is that isgood(c) returns
TRUE if character c is a valid character to follow a function's
parenthesised parm-list, and FALSE otherwise; this is used to
determine whether the token preceding the "(parm-list)" was a
function, and therefore whether to make a tag out of this token.
However, in a C++ header file, it is perfectly valid for the function
header to have the following construct:
void clear_set ();
// Remove all types from the set
In this example, () is followed by ';', but because ';' is in *notgd,
all such function declarations are not tagged by etags.
I would like to know whether there is any more up-to-date version
available before I do any hacking here. Thanks.
-- Mohan. {mosurm@pdx.mentor.com, uunet!mntgfx!mosurm}
{Mosur Mohan, Mentor Graphics, Beaverton, OR}
------------------------------------------------------------
"Cogito ergo sum" ==> "I think, therefore I add."