-
Notifications
You must be signed in to change notification settings - Fork 629
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 missing Geany parsers #2105
Conversation
In addition to these parsers we also have a simple markdown parser which however just uses readLine() interface and isn't token-based so it's about equivalent to the regex-based parser in ctags (which generates more kinds and is simpler so better to use that one). Plus there are some more parsers inside c.c which however needs much more work to merge with ctags. I don't really know much about these parsers - some of them are for really obscure languages like abaqus but they have been in Geany for ages and seem to work. This commit uses the parsers from pull request geany/geany#2132 in which were some minor modifications so these parsers compile with upstream ctags.
In Geany we used to modify all parsers so all of them generated the same set of kinds which we then process internally the same way. Now it is possible in Geany to redefine the ctags kinds to whatever we need so these hacks are not necessary. This patch modifies the kind names and kind letters so they better match the real use in the affected parsers.
This commit adds unit tests we have in Geany for the new parsers. The existing quemuhx test had to be updated to use --language-force=QemuHX because the "hx" extension clashes with the "hx" extension of the new Haxe parser and the test was using the Haxe parser instead of quemuhx parser.
Add new parsers to news.rst. Update Geany section in other-projects.rst: 1. Remove parsers from this pull request plus other parsers which have already been added to ctags 2. Remove changes which have been merged section - there are many more than those listed, these are just kind of random
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add the pages about the languages in the commit log:
Abaqus (some obscure hardware definition language)
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)
to each parser source file?
I will add a selector for .hx file. |
Thank you very much. |
The commented-out code is unmaintained and it's hard to say what exactly it's supposed to do. If someone wants to improve the parser in the future, writing something like that shouldn't be hard so nothing of a value will be lost.
Based on the pull request information provided in geany/geany#81
Done, including Abaqus as well (which actually isn't a hardware-definition language as I thought but some simulation software language). |
docs/news.rst
Outdated
* ObjectiveC | ||
* Passwd *optlib* | ||
* PuppetManifest *optlib* | ||
* Perl6 | ||
* Pod *optlib* | ||
* Powershell |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very minor issue. Powershell should be PowerShell.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, including a few more capitalization problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
If there is no trouble at Geany side, I would like you to do one of following two: |
No problem, I guess A will be easier to do. |
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:
For more details see the individual commits.