Universal ctags

Get help with the installation and running of the Zeus IDE. Please do not post bug reports or feature requests here. When in doubt post your question here.
Post Reply
sturt
Posts: 31
Joined: Wed Mar 13, 2024 12:57 am

Universal ctags

Post by sturt »

I tried to follow the information in the Zeus help file z.chm (which incidentally has an incorrect shortcut in the start menu folder of the installation to zeus.chm which does not exist) about moving to Exuberant ctags which is described in the TagsOptionsDialog but none of it seems applicable to that dialog or the files in my Zeus installation directory. Many of the mentioned files are not there. Basically that help information seems very outdated relative to the present state of Zeus itself.

What is the current state of play with ctags? Does in make any sense for me to try to upgrade the situation to use the successor to Exuberant ctags, which is Universal ctags? And if so, is there an article I can look at?

Bear in mind I am programming in D with Zeus (hopefully, still trying to get Zeus to cooperate with this). Is there anything ctags related that I need to know about working with D? Is the existing setup for D documents adequate to gets started?
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Re: Universal ctags

Post by jussij »

Many of the mentioned files are not there. Basically that help information seems very outdated relative to the present state of Zeus itself.
That is 100% correct. There are many sections of the help are outdated.
What is the current state of play with ctags?
There are only two taggers that I know of.

Exuberant ctags: https://ctags.sourceforge.net/

Universal ctags: https://github.com/universal-ctags/ctags

As the Exuberant ctags page shows, that tagger is no longer in active development as the last release was back in 2009.

As to Universal ctags, the parsers folder does not show a parser for the D language: https://github.com/universal-ctags/ctag ... er/parsers

So I'm not sure if either of these taggers will work very well with the D language.

However, this is very easy to test. The Zeus tagger is just ctags.exe renamed to xtags.exe so any existing ctags.exe can be used by just renaming it to xtags.exe and placing that executable in the Zeus installation folder.

Built-in Zeus D Tags Support
The xtags.exe does include support for D as a D parser was specifically created for Zeus so that it could understand D code, and if I remember correctly, the code for that parser was also announced on the D language forum.

However, those changes were made at least a decade ago, so naturally that parser would be outdated.

But as can be seen from the image below, because of that parser code, Zeus comes with some 'out of the box' ctags support for the D language:
dtags.png
dtags.png (163.14 KiB) Viewed 3906 times
Tweaking Ctags to Support a Language
It is also possible to configure ctags to support a language using the features built into ctags itself.

More details on how to do this can be found here: viewtopic.php?f=5&t=3367

Cheers Jussi
sturt
Posts: 31
Joined: Wed Mar 13, 2024 12:57 am

Re: Universal ctags

Post by sturt »

Okay, I'll just go with that built-in machinery for now.
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Re: Universal ctags

Post by jussij »

I checked the Universal ctags used by Zeus and noticed it has very few changes made. I also found it does actually come with D language support.

So, if you finding issues with the D tagging it might be a good idea to update to the latest Universal ctags version.

Also, the code for the version of Universal ctags used by Zeus has been uploaded to here: https://www.zeusedit.com/z300/xtags.zip

Jussi
sturt
Posts: 31
Joined: Wed Mar 13, 2024 12:57 am

Re: Universal ctags

Post by sturt »

Great news! I'll investigate this.
Post Reply