Date: Wed, 8 Mar 2023 00:41:49 +0200
From: Dmitry Gutov<dgutov@yandex.ru>
Cc:stephen_leake@stephe-leake.org,john@yates-sheets.org,rms@gnu.org,
fgunbin@fastmail.fm,casouri@gmail.com,sbaugh@janestreet.com,
emacs-devel@gnu.org,azeng@janestreet.com
After 'sudo apt install universal-ctags', I can see this:
$ ctags --list-kinds=c
d macro definitions
e enumerators (values inside an enumeration)
f function definitions
g enumeration names
h included header files
l local variables [off]
m struct, and union members
p function prototypes [off]
s structure names
t typedefs
u union names
v variable definitions
x external and forward variable declarations [off]
z function parameters inside function or prototype definitions [off]
L goto labels [off]
D parameters inside macro definitions [off]
That seems to mean that it can distinguish "function prototypes" and
"forward variable declarations", although their scanning seems to be
disabled by default (can be toggled via --kinds-c=+p+x).
So I suppose the question here is how hard it would be to add to
existing etags parsers something like that, and whether we can extend
the TAGS format in a backward compatible way with this info.
How do you envision a backward-compatible extension of TAGS format to
support such flags? AFAIK, TAGS doesn't distinguish between the tags
by their kind, it just records all of them, and leaves the semantics
to the program which reads them. The current format of TAGS is
described in etc/ETAGS.EBNF, in case you didn't know.