-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Request] TTCN-3 language support #2999
Comments
Just FYI, this is often a false assumption:
Many projects purposely use a subset of grammars (for size, speed, etc)... just adding a new grammar to core does not magically make it work with every tool that users our engine - many tools still have to decide to opt-in of their own accord. Also we don't merge new languages into core currently (back story). So if someone was to develop a grammar, it would need to be done as a 3rd party grammar module - and then Gerrit would need to decide to manually add support for it.
If you were serious about this mentioning an amount might help. $30 is quite different than $300, etc... As a policy we typically auto-close such requests, as the core team does not implement new languages and generally language requests die a slow death unless the person doing the requesting finds someone directly to do the work. https://github.com/highlightjs/highlight.js/blob/master/docs/language-requests.rst I will leave this open briefly (because of the mention of funding), but please clarify your offer of funding. You can also add this issue to the Wiki also (https://github.com/highlightjs/highlight.js/wiki/Grammar-Requests) |
I'm not saying it will magically work. For sure, gerrit upstream wold have to select support for that language/grammar. And until they do (or if they wouldn't do), it's relatively easy for anyone operating their own gerrit instance to simply replace/patch the highlight.js file in their gerrit instance.
That's sad to hear, but definitely thanks for the heads-up.
As I'm not sure what the effort estimate would be, it's hard to put a figure at it. Ideally somebody who understands the required work would make a proposal. For sure we don't have to talk about a two-digit USD amount here ;) It will certainly be multiple hours of work, and I have no illusions about hourly rates in the IT industry. So a few hundred bucks should certainly be a realistic order of magnitude.
Understood.
Thanks, will do. |
Or to add an extra JS From the snippet here it doesn't look like a super complex language (but perhaps that's a simple snippet). I see now its' the same snippet use on Wikipedia. Is there a LOT more to the language than what is shown syntactically?
Ah, well that's helpful to know. I've found when someone offers to pay for time online in a vague sense it can mean almost anything. :-) |
The full BNF definition of the syntax can be found in Annex A of https://www.etsi.org/deliver/etsi_es/201800_201899/20187301/04.12.01_60/es_20187301v041201p.pdf if you want to look at a reasonably large set of code written in TTCN-3, have a look at https://git.osmocom.org/osmo-ttcn3-hacks/tree/library
In the Eclipse TITAN Forum at https://www.eclipse.org/forums/index.php?t=msg&th=1106951&goto=1838021&#msg_1838021, Gabor (from the TITAN developer team at Ericsson) has stated that their internal gerrit has syntax highlighting for TTCN-3. So it looks like somebody may already have done the work but not bothered to release it. I'm keeping my fingers crossed. |
Well it might be simpler to follow up that lead and see if that code could simply be released OSS. :-) |
Does anyone on your team use the VS Code support? It's syntax grammar file looks pretty simple overall, which is a good sign IF TTCN-3 users would consider VS Code to have "good" highlighting support for TTCN-3. |
@laf0rge You should shoot me an email in mid-March if you get no other traction on this and still would like to pursue it. |
@laf0rge Does anyone on your team use the VS Code support? Is it's support good? (auto-closing) |
I don't think anyone in our team uses VS Code, sorry. |
I'm using this highlighter for Atom editor and it works well for me, in case it's useful: |
We (Osmocom/Sysmocom) ended up implementing the TTCN-3 language plugin ourselves: https://gitea.osmocom.org/fixeria/highlightjs-ttcn3 Here is little playground demonstrating the plugin in action: https://people.osmocom.org/fixeria/hljs_ttcn3_demo/ @joshgoebel would it be possible to host this plugin at https://github.com/highlightjs? It's not critical to us and we're fine hosting (and maintaining) it ourselves, but maybe it's easier for other people to find this one among with the other plugins already hosted there. |
If you wish - happy to add it to SUPPORTED_LANGUAGES either way, just let us know. |
Thanks. I've submitted a PR adding it to |
TTCN-3 is a domain specific programming language used particularly (but not only) in the telecom domain.
For more information see www.ttcn-3.org/
There are open source imlpementations of a TTCN3 compiler (https://projects.eclipse.org/projects/tools.titan) as well as a language server (https://github.com/nokia/vscode-ttcn3), and tools like the Eclipse IDE support syntax highlighting for it.
It would be great if highlight.js would get TTCN-3 language support, as plenty of TTCN-3 projects use gerrit for code review, and gerrit in turn uses highlight.js for its syntax highlighting.
As a FOSS developer for 25+ years, I know I should submit a patch. Unfortuantely I have zero to no knowledge about Javascript, so I really don't think I would be efficient doing it.
In case anyone is interested in implementing this, I might even be able to provide some funding.
The text was updated successfully, but these errors were encountered: