-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Geany parsers which are missing in ctags (rebased version) #2106
Conversation
This pull request adds the extra parsers we have in Geany except those defined in c.c and except the markdown parser which is readLine() based and not really superior to the regex-based parser ctags uses (we should probably use the ctags parser in Geany instead). The added parsers are: * Abaqus (https://en.wikipedia.org/wiki/Abaqus) * Abc (https://en.wikipedia.org/wiki/ABC_notation) * Docbook (https://en.wikipedia.org/wiki/DocBook) * Haskell (https://en.wikipedia.org/wiki/Haskell_(programming_language)) * Haxe (https://en.wikipedia.org/wiki/Haxe) * Nsis (https://en.wikipedia.org/wiki/Nullsoft_Scriptable_Install_System) * Powershell (https://en.wikipedia.org/wiki/PowerShell) * Txt2tags (https://en.wikipedia.org/wiki/Txt2tags) Some small cleanups were made to the Abc parser compared to Geany version - basically just commented code removal. The patch also adds simple unit tests from Geany. Because the added Haxe parser extension "hx" clashes with QemuHX file extension, --language-force=QemuHX had to be added to the args of QemuHX tests.
Currently, the methods guessing a proper parser file contents are implemented in C language. |
@techee, I changd my mind. |
Nsis parser is merged with many improvements. |
I hope to find some time for this soon. |
About DocBook parser, I'm thinking about rewriting it in XPath based. |
Docbook parser captures id=... It is good. However, I think the parser should capture <title>...</title>, too. Generally the parsers of ctags captures identifiers. The big exception is in parsers for documentation language like reStructuredText, and Markdown. Capturing titles of sections has higher priority than capturing identifiers. This is not my design. This direction of design is already taken by Exuberant-crags. I just follow the policy. (I myself think capturing identifiers is important than capruting titles.) To align the behaviour to other parsers for documents, Docbook parser should capture <title>...</title>. If our docbook parser is a subparser of XML barser, ids are captured automatically. |
The input is taken from universal-ctags#2106 submitted by @techee.
The input is taken from universal-ctags#2106 submitted by @techee.
I'm sorry to be late. Thank you for splitting this into pull requests. |
This pull request adds the extra parsers we have in Geany except
those defined in c.c and except the markdown parser which is readLine()
based and not really superior to the regex-based parser ctags uses
(we should probably use the ctags parser in Geany instead).
The added parsers are:
Some small cleanups were made to the Abc parser compared to Geany
version - basically just commented code removal.
The patch also adds simple unit tests from Geany. Because the added
Haxe parser extension "hx" clashes with QemuHX file extension,
--language-force=QemuHX had to be added to the args of QemuHX tests.