www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D support in Exuberant Ctags 5.8 for Windows

reply "Gary Willoughby" <dev kalekold.net> writes:
I'm looking at this page and trying to download the latest CTags 
5.8 with D patch compiled for Windows but i'm getting a dead 
link. Does anyone else have this file or can point me to another 
link?

http://prowiki.org/wiki4d/wiki.cgi?ReferenceForTools/ExuberantCtags
Jul 26 2012
next sibling parent "dnewbie" <run3 myopera.com> writes:
On Thursday, 26 July 2012 at 22:06:08 UTC, Gary Willoughby wrote:
 I'm looking at this page and trying to download the latest 
 CTags 5.8 with D patch compiled for Windows but i'm getting a 
 dead link. Does anyone else have this file or can point me to 
 another link?

 http://prowiki.org/wiki4d/wiki.cgi?ReferenceForTools/ExuberantCtags

There is --ctags output in Dscanner https://github.com/Hackerpilot/Dscanner
Jul 26 2012
prev sibling next sibling parent "Brian Schott" <briancschott gmail.com> writes:
On Thursday, 26 July 2012 at 22:34:51 UTC, dnewbie wrote:
 There is --ctags output in Dscanner
 https://github.com/Hackerpilot/Dscanner

But be warned that I haven't tested it on Windows.
Jul 26 2012
prev sibling next sibling parent =?ISO-8859-1?Q?Jos=E9_Armando_Garc=EDa_Sancio?= <jsancio gmail.com> writes:
On Thu, Jul 26, 2012 at 3:34 PM, dnewbie <run3 myopera.com> wrote:
 There is --ctags output in Dscanner
 https://github.com/Hackerpilot/Dscanner

Very interesting. Is this Dscanner pluggable? I would be interesting to use Dscanner for localization. For example it would be nice if it could generate a list of all the strings that are passed to a specific function. This is how people generate localizable string to use for gettext. Thoughts? -Jose
Jul 26 2012
prev sibling next sibling parent "Brian Schott" <briancschott gmail.com> writes:
On Thursday, 26 July 2012 at 23:51:34 UTC, José Armando García 
Sancio wrote:
 On Thu, Jul 26, 2012 at 3:34 PM, dnewbie <run3 myopera.com> 
 wrote:
 There is --ctags output in Dscanner
 https://github.com/Hackerpilot/Dscanner

Very interesting. Is this Dscanner pluggable? I would be interesting to use Dscanner for localization. For example it would be nice if it could generate a list of all the strings that are passed to a specific function. This is how people generate localizable string to use for gettext. Thoughts? -Jose

Dscanner has a tokenizer for D code, so it would not be hard to make a program that uses the tokenizer to swap out string literals.
Jul 26 2012
prev sibling next sibling parent =?ISO-8859-1?Q?Jos=E9_Armando_Garc=EDa_Sancio?= <jsancio gmail.com> writes:
On Thu, Jul 26, 2012 at 4:59 PM, Brian Schott <briancschott gmail.com> wrot=
e:
 On Thursday, 26 July 2012 at 23:51:34 UTC, Jos=E9 Armando Garc=EDa Sancio=

 On Thu, Jul 26, 2012 at 3:34 PM, dnewbie <run3 myopera.com> wrote:
 There is --ctags output in Dscanner
 https://github.com/Hackerpilot/Dscanner

Very interesting. Is this Dscanner pluggable? I would be interesting to use Dscanner for localization. For example it would be nice if it could generate a list of all the strings that are passed to a specific function. This is how people generate localizable string to use for gettext. Thoughts? -Jose

Dscanner has a tokenizer for D code, so it would not be hard to make a program that uses the tokenizer to swap out string literals.

Swap out? Not sure what you mean by this. I don't want to localize the code. I just want to enumerate them all so that a localization team can provide a catalog that could be use to do the translation at runtime. In C/C++ a lot of teams do localization by providing a #define "_" that simply returns the string passed into it. In D this would be a template that could be compiled out. The cool thing about having this "_" macro is that then you can have a tool that can extract all occurrences of such a macro. Gettext has such a tool for C/C++. If we want to leverage gettext in D then we would have to build the equivalent of that tool for D. I was wondering if Dscanner can be extended to do this. Thanks, -Jose
Jul 26 2012
prev sibling next sibling parent "Brian Schott" <briancschott gmail.com> writes:
On Friday, 27 July 2012 at 00:19:37 UTC, José Armando García 
Sancio wrote:
 On Thu, Jul 26, 2012 at 4:59 PM, Brian Schott 
 <briancschott gmail.com> wrote:
 On Thursday, 26 July 2012 at 23:51:34 UTC, José Armando 
 García Sancio wrote:
 On Thu, Jul 26, 2012 at 3:34 PM, dnewbie <run3 myopera.com> 
 wrote:
 There is --ctags output in Dscanner
 https://github.com/Hackerpilot/Dscanner

Very interesting. Is this Dscanner pluggable? I would be interesting to use Dscanner for localization. For example it would be nice if it could generate a list of all the strings that are passed to a specific function. This is how people generate localizable string to use for gettext. Thoughts? -Jose

Dscanner has a tokenizer for D code, so it would not be hard to make a program that uses the tokenizer to swap out string literals.

Swap out? Not sure what you mean by this. I don't want to localize the code. I just want to enumerate them all so that a localization team can provide a catalog that could be use to do the translation at runtime. In C/C++ a lot of teams do localization by providing a #define "_" that simply returns the string passed into it. In D this would be a template that could be compiled out. The cool thing about having this "_" macro is that then you can have a tool that can extract all occurrences of such a macro. Gettext has such a tool for C/C++. If we want to leverage gettext in D then we would have to build the equivalent of that tool for D. I was wondering if Dscanner can be extended to do this. Thanks, -Jose

Something like this: writeln(tokenize(sourceCode).filter!("a.type > TokenType.STRINGS_BEGIN && a.type < TokenType.STRINGS_END")().map!("a.value")().joiner("\n")); I'm booted into Windows at the moment so I haven't tested that, but it should work if you just want a dump of all the strings. The line-of-code feature works in a similar way.
Jul 26 2012
prev sibling next sibling parent "p.crimsonsphere" <p.crimsonsphere gmail.com> writes:
Hi there.

So, anyway, have you found any live link to download Ctags 5.8
working for D programming language?

I found here
http://pastie.org/971968
and applied it to
http://dfrank.ru/ctags581

I downloaded compiler for Ctags, I mean, BCC32 and failed to
compile it.

If anyone has a Ctags 5.8 or 5.81 for D language, please~

Regards.
Sep 24 2012
prev sibling next sibling parent "ANtlord" <antlord92 gmail.com> writes:
Wake up dead topic! :)

On Tuesday, 25 September 2012 at 04:22:13 UTC, p.crimsonsphere 
wrote:
 Hi there.

 So, anyway, have you found any live link to download Ctags 5.8
 working for D programming language?

 I found here
 http://pastie.org/971968
 and applied it to
 http://dfrank.ru/ctags581

 I downloaded compiler for Ctags, I mean, BCC32 and failed to
 compile it.

 If anyone has a Ctags 5.8 or 5.81 for D language, please~

 Regards.

If it is actually, you can use that https://github.com/snosov1/ctags-d. I want to ask about Dscanner. Does it provide same formats as ctags. I use ctags with --excmd=pattern --fields=nksSa and output with them is different of Dscanner's output with key --ctags. Sorry, if my english is not clear.
Nov 11 2014
prev sibling next sibling parent "Sergei Nosov" <sergei.nosov gmail.com> writes:
On Tuesday, 11 November 2014 at 18:44:23 UTC, ANtlord wrote:
 Wake up dead topic! :)

 On Tuesday, 25 September 2012 at 04:22:13 UTC, p.crimsonsphere 
 wrote:
 Hi there.

 So, anyway, have you found any live link to download Ctags 5.8
 working for D programming language?

 I found here
 http://pastie.org/971968
 and applied it to
 http://dfrank.ru/ctags581

 I downloaded compiler for Ctags, I mean, BCC32 and failed to
 compile it.

 If anyone has a Ctags 5.8 or 5.81 for D language, please~

 Regards.

If it is actually, you can use that https://github.com/snosov1/ctags-d.

I wanted to suggest this link as well (snosov1 is me). It is ctags 5.8 with the aforementioned patch applied and few other fixes on top. It's not perfect, but works reasonable. I didn't use Dscanner for that functionality much, but I expect it to have better quality.
Nov 11 2014
prev sibling next sibling parent "ANtlord" <antlord92 gmail.com> writes:
On Tuesday, 11 November 2014 at 18:56:29 UTC, Sergei Nosov wrote:
 On Tuesday, 11 November 2014 at 18:44:23 UTC, ANtlord wrote:
 Wake up dead topic! :)

 On Tuesday, 25 September 2012 at 04:22:13 UTC, p.crimsonsphere 
 wrote:
 Hi there.

 So, anyway, have you found any live link to download Ctags 5.8
 working for D programming language?

 I found here
 http://pastie.org/971968
 and applied it to
 http://dfrank.ru/ctags581

 I downloaded compiler for Ctags, I mean, BCC32 and failed to
 compile it.

 If anyone has a Ctags 5.8 or 5.81 for D language, please~

 Regards.

If it is actually, you can use that https://github.com/snosov1/ctags-d.

I wanted to suggest this link as well (snosov1 is me). It is ctags 5.8 with the aforementioned patch applied and few other fixes on top. It's not perfect, but works reasonable. I didn't use Dscanner for that functionality much, but I expect it to have better quality.

I use your project right now, and I must say, that works very well. But it does not parse constructors. And it is important. I've created issue in your project about this. I think, it reasonable, talk about this on github.
Nov 11 2014
prev sibling next sibling parent "Jussi Jumppanen" <jussij zeusedit.com> writes:
On Thursday, 26 July 2012 at 22:06:08 UTC, Gary Willoughby wrote:

 I'm looking at this page and trying to download the latest 
 CTags 5.8 with D patch compiled for Windows but i'm getting a 
 dead link.

FYI the Zeus IDE uses ctags and many years ago I updated ctags to have some understanding of the D language. Those code changes where made against the last 5.8 version and they can be found here: http://www.zeusedit.com/z300/ctags_src.zip But as I said earlier those changes are quite old, so I don't know how well they work with the current D language.
Nov 12 2014
prev sibling next sibling parent "Brian Schott" <briancschott gmail.com> writes:
On Tuesday, 11 November 2014 at 18:44:23 UTC, ANtlord wrote:
 I want to ask about Dscanner. Does it provide same formats as 
 ctags. I use ctags with --excmd=pattern --fields=nksSa and 
 output with them is different of Dscanner's output with key 
 --ctags.

The ctags output is implemented in this file: https://github.com/Hackerpilot/Dscanner/blob/master/src/ctags.d. It's less than 200 lines long so you should be able to modify it easily.
Nov 12 2014
prev sibling next sibling parent "Gary Willoughby" <dev nomad.so> writes:
On Wednesday, 12 November 2014 at 20:33:32 UTC, Brian Schott 
wrote:
 On Tuesday, 11 November 2014 at 18:44:23 UTC, ANtlord wrote:
 I want to ask about Dscanner. Does it provide same formats as 
 ctags. I use ctags with --excmd=pattern --fields=nksSa and 
 output with them is different of Dscanner's output with key 
 --ctags.

The ctags output is implemented in this file: https://github.com/Hackerpilot/Dscanner/blob/master/src/ctags.d. It's less than 200 lines long so you should be able to modify it easily.

Is there any tutorial articles for Dscanner/libdparse, they look like awesome tools!
Nov 12 2014
prev sibling parent "ANtlord" <antlord92 gmail.com> writes:
On Wednesday, 12 November 2014 at 20:33:32 UTC, Brian Schott 
wrote:
 On Tuesday, 11 November 2014 at 18:44:23 UTC, ANtlord wrote:
 I want to ask about Dscanner. Does it provide same formats as 
 ctags. I use ctags with --excmd=pattern --fields=nksSa and 
 output with them is different of Dscanner's output with key 
 --ctags.

The ctags output is implemented in this file: https://github.com/Hackerpilot/Dscanner/blob/master/src/ctags.d. It's less than 200 lines long so you should be able to modify it easily.

It sounds good. I think, that I can figure out code and patch. Thank you)
Nov 14 2014