Add new filetype detection and syntax file for Algol 68.
https://github.com/vim/vim/pull/19818
(4 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Thanks Doug, I was actually also going to create a PR for this, so thanks for taking care :)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@chrisbra commented on this pull request.
Thanks.
What is the issue with the many commented out lines in the syntax script? Can you please revert the changes to src/Makefile and runtime/syntax/sh.vim ?
Can you please also update the MAINTAINERS file?
In runtime/syntax/algol68.vim:
> +syn keyword algol68Operator SORT ELEMS
+syn keyword algol68Repeat FOR FROM BY UPTO DOWNTO TO WHILE DO UNTIL OD
+syn keyword algol68Statement PAR BEGIN END EXIT
+syn keyword algol68Struct STRUCT
+syn keyword algol68PreProc VECTOR
+syn keyword algol68Type FLEX HEAP LOC LONG REF SHORT
+syn keyword algol68Type VOID BOOL INT REAL COMPL CHAR STRING COMPLEX
+syn keyword algol68Type BITS BYTES FILE CHANNEL PIPE SEMA SOUND
+syn keyword algol68Type FORMAT STRUCT UNION
+
+ " 20011222az: Added new items.
+syn keyword algol68Todo contained TODO FIXME XXX DEBUG NOTE
+
+ " 20010723az: When wanted, highlight the trailing whitespace -- this is
+ " based on c_space_errors; to enable, use "algol68_space_errors".
+if exists("algol68_space_errors")
those settings should be documented
> @@ -831,7 +831,7 @@ endif
" Arithmetic Parenthesized Expressions: {{{1
"syn region shParen matchgroup=shArithRegion start='[^$]\zs(\%(\ze[^(]\|$\)' end=')' contains=@shArithParenList
-syn region shParen matchgroup=shArithRegion start='\$\@!(\%(\ze[^(]\|$\)' end=')' contains=@shArithParenList
+" syn region shParen matchgroup=shArithRegion start='\$\@!(\%(\ze[^(]\|$\)' end=')' contains=@shArithParenList
that probably does not belong here
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@dkearns pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@dkearns pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@dkearns pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@chrisbra, it's too early to be reviewing. As I mentioned in the mail thread it'll take a few days to finalise, I was just trying to put it in motion during the last minutes of the day.
Thanks. What is the issue with the many commented out lines in the syntax script?
These are in the original patch and appear to exclude the non-ASCII operators. I don't think there's any reason these can't eventually be supported. These commented-out lines are also apparent in version 0.2 from fifteen years ago.
There's also what looks like some experimentation with priorities of the operator patterns, tests would be useful to clean this up.
Can you please also update the MAINTAINERS file?
I doubt Janis, from comments in the mail thread, has a GitHub handle so I've just used mine for now.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@chrisbra, it's too early to be reviewing.
Ah okay, I'll hold off then, thanks for taking care
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@dkearns pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@dkearns pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
It looks GNU Algol is going to be utilising the SUPPER stropping regime which this file doesn't support. I don't suppose that's a blocker but it would be nice to support sooner rather than later.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@dkearns pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I've seen the hex-number fix and the change of the RE grouping parenthesis;
all fine with me.
Is there anything for me to do to complete Vim's syntax support for Algol 68?
There was I mention of testcases, but I'm unsure what to provide since that's
hard to regression test automatically in case of syntax highlighting.
All I could possibly provide (if it's necessary) is probably a file with all the
Algol 68 library prelude functions listed, maybe in more than one variant,
to visually inspect the correct highlighting function. - Please inform me if
there's a demand for that or something else to finish the incorporation.
Thanks!
Janis
________________________________________
Von: vim...@googlegroups.com <vim...@googlegroups.com> im Auftrag von dkearns <vim-dev...@256bit.org>
Gesendet: Dienstag, 31. März 2026 14:56
An: vim/vim
Cc: Push
Betreff: Re: [vim/vim] runtime(algol68): Add new syntax file and filetype detection (PR #19818)
—
View it on GitHub<https://github.com/vim/vim/pull/19818/changes/4fd060a4d24979f79e4c0ca581ae5b4aadf98d59..d38de117445507eb56d8d26f071cc591ec8e3bcb?email_source=notifications&email_token=ACY5DGCZHDR6UQBHLR2AND34TO565A5CNFSNUAF7M5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKB2XG2CON52GSZTJMNQXI2LPNYXVA5LMNQSTEMZTGQ2DINZRGY2DGNSCMVTG64TFEUZDGNDGMQYDMMDBGRSDENBZG44WMNZZMU2GGMDDME2TQMLBMU2WENDBMFSGMOJYMQ2TSQLGORSXEJJSGNSDGODEMUYTCNZUGQ2TKMBXMVRDKNTEHBSDENTGGA3TCY3DGU4TCZLDHBSTGYTDMJIHK43IMVSEC5BFGIZTCNZXGQ4TMMJXGE4VA5LTNBSXEJJSGMYTSMZSG2THEZLBONXW5JDQOVZWRJLFOZSW45FMMZXW65DFOJPWG3DJMNVQ>.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19818/before/4fd060a4d24979f79e4c0ca581ae5b4aadf98d59/after/d38de117445507eb56d8...@github.com>
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+u...@googlegroups.com<mailto:vim_dev+u...@googlegroups.com>.
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/19818/before/4fd060a4d24979f79e4c0ca581ae5b4aadf98d59/after/d38de117445507eb56d8d26f071cc591ec8e3bcb%40github.com<https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/19818/before/4fd060a4d24979f79e4c0ca581ae5b4aadf98d59/after/d38de117445507eb56d8d26f071cc591ec8e3bcb%40github.com?utm_medium=email&utm_source=footer>.
thanks for your quick replies!
I've just extracted all the ~2500+ keywords (including context duplicates)
from the Algol 68 Genie sources and visually inspected the highlighting.
There's some things I saw that need a fix.
I'm going to fix the missing matches and provide you then with the files
containing the keywords and information about the necessary changes
in the syntax file. - I hope that's okay for you to work with.
BTW, it would be good to be able to work on the version that Doug had
checked in and modified, but I don't know how to get the last version of
the changed source file from github/vim. Hints are welcome. - Thanks.
Regards,
Janis
________________________________________
Von: vim...@googlegroups.com <vim...@googlegroups.com> im Auftrag von Christian Brabandt <cbl...@256bit.org>
Gesendet: Mittwoch, 8. April 2026 14:17
An: vim...@googlegroups.com
Betreff: Re: [vim/vim] runtime(algol68): Add new syntax file and filetype detection (PR #19818)
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/adZHdTHMlkZIg7JR%40256bit.org.
I deposited information and updated files at http://algol68.gridbug.de/ for inclusion.
The files I uploaded are:
* The file with the Genie/Algol 68 identifiers for incorporation in the test environment
http://algol68.gridbug.de/all_preludes.txt
* The file I retrieved today from github/vim with the recent changes from Doug
http://algol68.gridbug.de/algol68_doug.vim
* The complete algol68.vim file I tested with all changes to fix the observed issues
http://algol68.gridbug.de/algol68_test.vim
* The diff-file between the previous two files containing only the necessary changes
http://algol68.gridbug.de/algol68.vim.diff
If there's anything else you need please let me know. - Thanks!
Janis
________________________________________
Von: vim...@googlegroups.com <vim...@googlegroups.com> im Auftrag von Christian Brabandt <cbl...@256bit.org>
Gesendet: Mittwoch, 8. April 2026 17:22
An: vim...@googlegroups.com
Betreff: Re: [vim/vim] runtime(algol68): Add new syntax file and filetype detection (PR #19818)
Hi Janis,
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/adZyn43yV%2BAtSn4v%40256bit.org.
________________________________________
Von: vim...@googlegroups.com <vim...@googlegroups.com> im Auftrag von Janis Papanagnou <janis_pa...@hotmail.com>
Gesendet: Mittwoch, 8. April 2026 20:04
An: vim...@googlegroups.com
Betreff: AW: [vim/vim] runtime(algol68): Add new syntax file and filetype detection (PR #19818)
Janis
Hi Janis,
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/DU0PR02MB10422C82D60C60FC0959D3BBBF35B2%40DU0PR02MB10422.eurprd02.prod.outlook.com.
@dkearns pushed 4 commits.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@dkearns pushed 8 commits.
You are receiving this because you are subscribed to this thread.![]()
I suggest to enhance one more detail (allow optional space) here:
< syn match algol68Function "\<curses\s*\%(green\|cyan\|red\|yellow\|magenta\|blue\|white\)\%(inverse\)\?\>"
---
> syn match algol68Function "\<curses\s*\%(green\|cyan\|red\|yellow\|magenta\|blue\|white\)\%(\s*inverse\)\?\>"
________________________________________
Von: vim...@googlegroups.com <vim...@googlegroups.com> im Auftrag von dkearns <vim-dev...@256bit.org>
Gesendet: Dienstag, 14. April 2026 12:54
An: vim/vim
Cc: Push
Betreff: Re: [vim/vim] runtime(algol68): Add new syntax file and filetype detection (PR #19818)
@dkearns<https://github.com/dkearns> pushed 8 commits.
* b3eaf62<https://github.com/vim/vim/commit/b3eaf6218a759dcfb4602e6d9f95f298ee21b91f> runtime(algol68): Add new syntax file and filetype detection
* a780a76<https://github.com/vim/vim/commit/a780a7607e05ffd7ac54817f0d623bb143901dfd> Replace all groups in patterns with the non-capturing variant \%(...\)
* ac1f922<https://github.com/vim/vim/commit/ac1f922d3e6ee59d23151404528110ed53b7c60c> Add a rudimentary ftplugin.
* 019a5a5<https://github.com/vim/vim/commit/019a5a5d44cb89a8218073104600a8f82663066a> Fix the radix-16 BITS denotation pattern
* a3f1b54<https://github.com/vim/vim/commit/a3f1b545ee396c26ab30186a608816f676432ad7> Improve number highlighting
* e93067b<https://github.com/vim/vim/commit/e93067ba9ea2bc424c194e92ce398944a85ca298> Merge Janis' updates.
* a3402f6<https://github.com/vim/vim/commit/a3402f65be9a9528b98723ab940b0d05b8550164> Remove Pascal string implementation.
* e55a234<https://github.com/vim/vim/commit/e55a2348861fda28d610a71162a0f771c900d804> Set 'include' to support read and include pragmats.
—
View it on GitHub<https://github.com/vim/vim/pull/19818/changes/927c1745ab79fa10b1df1260877174237ea2714f..e55a2348861fda28d610a71162a0f771c900d804> or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACY5DGH4DXV7QKNCSWEGP2L4VYKG5AVCNFSM6AAAAACW6YPNYGVHI2DSMVQWIX3LMV45UAFHKB2WY3CSMVYXKZLTORIHK43IJZXXI2LGNFRWC5DJN5XDWUDVNRWCGMZUGQ2DOMJWGQZTMQTFMZXXEZJDHEZDOYZRG42DKYLCG44WMYJRGBRDCZDGGEZDMMBYG43TCNZUGIZTOZLBGI3TCNDGIFTHIZLSENSTKNLBGIZTIOBYGYYWMZDBGI4GINRRGBQTOMJRGYZGCMDGG43TCYZZGAYGIOBQGRIHK43IMVSEC5BDGE3TONRRGY2DAMZQKB2XG2DFOIRTCOJTGI3A>.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19818/before/927c1745ab79fa10b1df1260877174237ea2714f/after/e55a2348861fda28d610...@github.com>
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+u...@googlegroups.com<mailto:vim_dev+u...@googlegroups.com>.
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/19818/before/927c1745ab79fa10b1df1260877174237ea2714f/after/e55a2348861fda28d610a71162a0f771c900d804%40github.com<https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/19818/before/927c1745ab79fa10b1df1260877174237ea2714f/after/e55a2348861fda28d610a71162a0f771c900d804%40github.com?utm_medium=email&utm_source=footer>.
The problem is as follows...
In these testcases
bitswidth
bits width
maxbits
max bits
all but the second one are correctly highlighted as predefined (yellow), where the
second one is blue (first word) and non-highlighted (second word) respectively.
The rule that should cover the first two entries is
syn match algol68Predefined "\<\%(\%(long\s*\)\?long\s*\)\?\%(bits\|bytes\|exp\|int\|real\)\s*width\>"
And according to the (later appearing!) rule
syn match algol68Function "\<\%(bits\|whole\|fixed\|float\|real\)\>"
the function 'bits' is highlighted (blue). - For a standalone 'bits' that's as desired!
So for 'bits width' the first rule seems to be overwritten/invalidated by the second.
And moving the latter rule above the former will "fix" the observable behavior.
But that's IMO not as it should be.
(Apparently there's no return "longest match" principle between different rules.)
A cleaner solution might need to formulate some context dependency?
But I'm not familiar enough with Vim's syntax rules to suggest something here.
Do you have an idea for a clean/cleaner solution to fix that?
Thanks!
Janis
With that test-file we can see that there's some issues of the sort reported below
(cf. 'bits' vs 'bits width'); as said, I'm not sure how to best fix these.
(I will provide a list of these identifiers soon as a followup.)
I also found some yet unsupported spaced versions that I intend to fix soon.
(I will send a proposed update soon.)
Thanks.
Janis
________________________________________
Von: vim...@googlegroups.com <vim...@googlegroups.com> im Auftrag von Janis Papanagnou <janis_pa...@hotmail.com>
Gesendet: Mittwoch, 15. April 2026 03:37
An: vim...@googlegroups.com
Betreff: AW: [vim/vim] runtime(algol68): Add new syntax file and filetype detection (PR #19818)
Thanks!
Janis
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/DU0PR02MB10422086D75D3FB2C22DC2E27F3222%40DU0PR02MB10422.eurprd02.prod.outlook.com.
The diff to fix some previously unsupported spaced variants:
http://algol68.gridbug.de/2026-04-15_algol68.vim.diff
(Note: the line numbers may not match your actual version.)
The remaining issues are based on the fact that some prefixes
(bits, exp, real, system, blank, newline) are already used on
their own; here I'd need your assistance how to best fix that:
http://algol68.gridbug.de/2026-04-15_blank_issues.txt
(Note: it probably could be fixed by reordering of lines, but
then the semantic grouping would get lost, so that's not
advisable if there's another cleaner solution existing. - I will
have a look at it myself, but that may need some time and
an acceptable outcome is not sure.)
Thanks.
Janis
________________________________________
Von: vim...@googlegroups.com <vim...@googlegroups.com> im Auftrag von Janis Papanagnou <janis_pa...@hotmail.com>
Gesendet: Mittwoch, 15. April 2026 10:53
Thanks.
Janis
Thanks!
Janis
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/DU0PR02MB104223DE4CD3CDDCD2618F23EF3222%40DU0PR02MB10422.eurprd02.prod.outlook.com.
________________________________________
To identify problems with spaces in identifiers as reported in my previous mail
I extended the test-file I had sent by a variant with spaces in identifiers added.
It can be retrieved here:
http://algol68.gridbug.de/all_preludes_w_sp.txt
[...]
> Latest match wins, by design. See :help :syn-priority
Yeah, I feared so.
Would it be a sensible request to ask for a vim-syntax change here?
(I'm aware that this could cause not only severe efforts but might also
have undesired influences on existing syntax files, unless it's an option
that could be chosen/activated in parallel.)
>> [ context dependency? ]
> Unfortunately there are no simple tag boundaries with whitespace as
> taggle separators so changing the priorities will only get us so far. [...]
Okay. - And I see the hassles and suboptimal workarounds. - So I'd
think that we better accept (for the moment) the infelicities with
that handful of tokens that produce inappropriate highlighting in
the special case of using spaces here.
> SUPPER stropping avoids this so things will be simpler there. I'd
> like to eventually support all stropping regimes so that even the
> ancient code can at least be read comfortably even if none of the
> modern compilers support it. However, it appears this file was only
> ever intended to support Genie's default UPPER stropping so I think
> it's fine to just target that for now.
Yes, and that would also be my suggestion to reach a milestone here.
> It would be nice if we could
> fully support ga68 for the release of GCC 16 but I suspect we're out
> of time.
This is actually a topic I intended to ask once we have the first
Algol 68 syntax-file ready and made publicly available...
How could Algol 68's files syntax highlighting be parameterized to
accept various stopping regimes. (I'm not sure but seem to recall
that the GNU Algol 68 project has also an '.a68' file extension but
uses a different stropping as default.) A solution might get tricky?
> What exactly is the "algol68_traditional" variable attempting to
> achieve? I assume the "traditional" refers to the highlighting and
> not the language? If so, that would normally be called something like
> "algol68_prelude".
Frankly, I cannot tell what that means. It's a remnant from Neville's
original version. - Personally I think the term is misleading, given
that all the matches are included in that section, and that there's
not only the "traditional" features supported but also the features
imported from those third-party libraries and all Genie extensions.
I think a subsequent "0.5" release (that might cover more stropping
regimes or not) could also be cleaned up by more strictly separating
the various feature sets, if possible by technical means (if-sections).
> I think I've merged all your latest changes.
Thanks! - When do you think will the Algol 68 support be available in
the repository for public use?
Janis
46a47,48
> " Genie extensions in addition to ROUND and ENTIER
> syn keyword algol68Operator FLOOR CEIL NINT TRUNC FRAC FIX
194c194
< syn match algol68Predefined "\<\%(blank\|formfeed\|newline\|null\|tab\)\s*char\%(acter\)\?\>"
---
> syn match algol68Predefined "\<\%(blank\|formfeed\|newline\|null\|tab\|eof\)\s*char\%(acter\)\?\>"
Thanks!
Regards,
Janis