Currently this is missing. I would be able to help with this (providing language information like reserved words) but seek someone "knowledgable" who would be able to place it correctly in the syntax definition file and can commit that. The first question would be what dialect and reference-format to support (or deciding to have for example 2 definitions). Background for the later: there is the "commonly used" and "historical" format which has (normally) up to 80 columns, where only column 8-72 contain "code" (column 6 is a marker for line comments and similar, named "indicator", column 1-6,73+ ignored there) and the modern "free-form reference-format" (no marker line, code everywhere). I don't know if the framework allows to use a reference, like "based on X" in which case variants may be possible. In general - because this is still what is used most - I'd be mainly interested in "fixed-form reference-format" (the one with the "indicator"). As a starter: that would be the comment definition: <DetectChar attribute="Comment" context="comment" char="*" column="6"/> <DetectChar attribute="Comment" context="comment" char="/" column="6"/> <Detect2Chars attribute="Comment" context="comment" char="*" char2=">"/> extension (ACUCOBOL-GT, can be added in "general" definitions as it would be otherwise invalid outside of a string literal): <DetectChar attribute="Comment" context="comment" char="|" />
https://invent.kde.org/frameworks/syntax-highlighting/-/blob/master/README.md has some hints how to add stuff. Given we have no definition at all ATM I think you can decide which format to support.
(In reply to Christoph Cullmann from comment #1) > Given we have no definition at all ATM I think you can decide which format > to support. The main question is: What would be accepted :-) along with "is there an option to 'base' a definition on another" (if for example a separate "cobolfree" and "cobolfixed" [like with a bunch of markdown highlighters] could be send in)?
Just found https://github.com/KDE/syntax-highlighting/compare/master...MihailJP:syntax-highlighting:cobol, this might be a good start (or possibly also a simple pull?)
(In reply to Simon Sobisch from comment #3) > Just found > https://github.com/KDE/syntax-highlighting/compare/master...MihailJP:syntax- > highlighting:cobol, this might be a good start (or possibly also a simple > pull?) If you can get this MIT licensed, sure.
(In reply to Christoph Cullmann from comment #4) > (In reply to Simon Sobisch from comment #3) > > Just found > > https://github.com/KDE/syntax-highlighting/compare/master...MihailJP:syntax- > > highlighting:cobol, this might be a good start (or possibly also a simple > > pull?) > > If you can get this MIT licensed, sure. Just have seen that you've asked before: https://gist.github.com/MihailJP/4424622 - I've just sent a mail checking with the author and also suggesting some changes which could be done here otherwise. I'll drop a note when I've got a response.
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/417
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/418
Git commit d0363ba274fade404de41b898aed03e43c2b6b1f by Christoph Cullmann, on behalf of jonathan poelen. Committed on 08/01/2023 at 18:26. Pushed by cullmann into branch 'master'. Add COBOL syntax I took what was proposed on bugs.kde.org: https://bugs.kde.org/show_bug.cgi?id=462944#c3 and made several changes. However, I don't know what to do about the license, when can it be considered as a new creation? For the moment I added `author="Jonathan Poelen (jonathan.poelen@gmail.com);github.com/MihailJP" license="MIT"`. So there are 2 authors, is it a problem? A +105 -0 autotests/folding/highlight.cbl.fold A +112 -0 autotests/html/highlight.cbl.dark.html A +112 -0 autotests/html/highlight.cbl.html A +105 -0 autotests/input/highlight.cbl A +105 -0 autotests/reference/highlight.cbl.ref A +733 -0 data/syntax/cobol.xml https://invent.kde.org/frameworks/syntax-highlighting/commit/d0363ba274fade404de41b898aed03e43c2b6b1f
Git commit b7c89c7820e826a3d1e6b865b5ef0d611ae7c81d by Christoph Cullmann, on behalf of jonathan poelen. Committed on 14/01/2023 at 19:00. Pushed by cullmann into branch 'kf5'. Add COBOL syntax I took what was proposed on bugs.kde.org: https://bugs.kde.org/show_bug.cgi?id=462944#c3 and made several changes. However, I don't know what to do about the license, when can it be considered as a new creation? For the moment I added `author="Jonathan Poelen (jonathan.poelen@gmail.com);github.com/MihailJP" license="MIT"`. So there are 2 authors, is it a problem? A +105 -0 autotests/folding/highlight.cbl.fold A +112 -0 autotests/html/highlight.cbl.dark.html A +112 -0 autotests/html/highlight.cbl.html A +105 -0 autotests/input/highlight.cbl A +105 -0 autotests/reference/highlight.cbl.ref A +733 -0 data/syntax/cobol.xml https://invent.kde.org/frameworks/syntax-highlighting/commit/b7c89c7820e826a3d1e6b865b5ef0d611ae7c81d