[Github-comments] [geany/geany] Upstream or alternative solution for ctags regex parsers (#2119)

Jiří Techet notifications at xxxxx
Wed Apr 24 20:12:48 UTC 2019


> Could you write a short document about libctags internal?

There's not much to write. Basically we just need to:

* bypass some things from ctags main() which are irrelevant for us (command-line options etc.) - this is done in ctagsInit() inside ctags.api.c
* register our custom writer (done inside ctagsInit()) which unlike other writers doesn't write to the MIO (which is NULL in our case) but instead the writeEntry() passes the tag information to Geany
* be informed when re-parsing happens so we can invalidate the tags we passed to Geany - this is currently done in a hacky way but it could be nicer if there was a function for it in a writer
* be able to initiate parsing by ourselves - either from a file or from a char buffer - see ctagsParse() in ctags-api.c
* get some basic information about the registered parsers like kinds they provide etc. - see the rest of ctags-api.c

This is basically the main functionality, there are some other diffs where we for instance don't have fnmatch.h or where the parser list order has to correspond to the order specified in Geany which we could maybe change in Geany itself. But that's basically it.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2119#issuecomment-486407307
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20190424/0ea10ecb/attachment.html>


More information about the Github-comments mailing list