Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion misc/filehighlight.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
extensions=chm;css;ctl;diz;doc;docm;docx;dtd;fodg;fodp;fods;fodt;htm;html;json;letter;lsm;mail;man;markdown;md;me;mkd;msg;nroff;odg;odp;ods;odt;pdf;po;ppt;pptm;pptx;ps;rtf;sgml;shtml;tex;text;txt;xls;xlsm;xlsx;xml;xsd;xslt

[source]
extensions=ada;asm;awk;bash;c;c++;caml;cc;cgi;cpp;cxx;diff;erl;go;h;h++;hh;hi;hpp;hs;inc;jasm;jav;java;js;m4;mak;mjs;ml;mli;mll;mlp;mly;pas;patch;php;phps;pl;pm;prg;py;rb;s;sas;sh;sl;st;swift;tcl;tk;tsx;xq
extensions=ada;asm;awk;bash;bnf;ebnf;c;c++;caml;cc;cgi;cpp;cxx;diff;erl;go;h;h++;hh;hi;hpp;hs;inc;jasm;jav;java;js;m2;m2o;m4;mak;mjs;ml;mli;mll;mlp;mly;pas;patch;php;phps;pl;pm;prg;py;rb;s;sas;sh;sl;st;swift;tcl;tk;tm;tmo;tsx;xq

[media]
extensions=3gp;aac;ac3;ape;asf;avi;awb;dts;flac;flv;it;m3u;m4a;m4v;med;mid;midi;mkv;mod;mol;mov;mp2;mp3;mp4;mpeg;mpg;mpl;ogg;ogv;opus;s3m;ts;umx;vob;wav;webm;wma;wmv;xm;y4m
Expand Down
3 changes: 3 additions & 0 deletions misc/syntax/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ SYNTAXFILES = \
assembler.syntax \
awk.syntax \
b.syntax \
bnf.syntax \
c.syntax \
cabal.syntax \
caddyfile.syntax \
Expand Down Expand Up @@ -60,6 +61,7 @@ SYNTAXFILES = \
mail.syntax \
makefile.syntax \
markdown.syntax \
meta-ii.syntax \
ml.syntax \
meson.syntax \
muttrc.syntax \
Expand Down Expand Up @@ -97,6 +99,7 @@ SYNTAXFILES = \
tcl.syntax \
texinfo.syntax \
toml.syntax \
tree-meta.syntax \
ts.syntax \
tt.syntax \
unknown.syntax \
Expand Down
9 changes: 9 additions & 0 deletions misc/syntax/Syntax.in
Original file line number Diff line number Diff line change
Expand Up @@ -366,5 +366,14 @@ include caddyfile.syntax
file Dockerfile.\*$ Dockerfile
include dockerfile.syntax

file ..\*\\.(?i:e?bnf)$ BNF/EBNF/ABNF/WBNF\sMetasyntax
include bnf.syntax

file ..\*\\.(?i:m2o?)$ META\sII\sMetasyntax
include meta-ii.syntax

file ..\*\\.(?i:tmo?)$ TREE-META\sMetasyntax
include tree-meta.syntax

file .\* unknown
include unknown.syntax
128 changes: 128 additions & 0 deletions misc/syntax/bnf.syntax
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# BNF family (BNF, EBNF, ABNF, WBNF etc.) Syntax Highlighting Definition
# Version 3.0.1 2026-03-25
# See updates and changelog at https://github.com/jip/syntax-highlighting
#
# Backus-Naur form (BNF) is a notation technique for context-free grammars
#
# This file is part of GNU Midnight Commander
# https://midnight-commander.org/
#
# SPDX-FileCopyrightText: 2026 Igor Zhuravlov <zhuravlov.ip@ya.ru>
# SPDX-License-Identifier: GPL-3.0-or-later

# for the default (lightgray on blue)
define _alerthi lightgray red
define _alertmi gray yellow
define _alertlo gray cyan
define _assign white
define _comb yellow
define _comment brown
define _esc brightgreen
define _group brightcyan
define _lbl lightgray blue underline
define _num brightgreen
define _oper yellow
define _sep brightmagenta
define _special gray
define _str green
define _var lightgray

context default
# labels
keyword \{abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_\}\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._\]: _lbl
# nonterminals
keyword <\{abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_\}\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._\]> _var
keyword \{abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_\}\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._\] _var
# decimal integer numbers
keyword wholeleft 0 _num
keyword wholeleft \{123456789_\}\[0123456789_\] _num
keyword wholeleft -\{123456789_\}\[0123456789_\] _num
# repeaters (EBNF)
keyword (/ _group
keyword /) _group
keyword (: _group
keyword :) _group
# exclude from highlighting
keyword ::== lightgray blue
# assignments
keyword :≡ _assign
keyword :== _assign
keyword := _assign
keyword ::= _assign
keyword :: _assign
keyword : _assign
keyword => _assign
keyword = _assign
keyword <- _assign
keyword -> _assign
keyword <= _assign
keyword ← _assign
keyword → _assign
keyword ⇐ _assign
keyword ⇒ _assign
keyword ≜ _assign
# combinators
keyword | _comb
keyword / _comb
keyword \\ _comb
keyword - _comb
keyword , _comb
# operators
keyword ! _oper
keyword # _oper
keyword $ _oper
# keyword % _oper
keyword & _oper
keyword \* _oper
keyword \+ _oper
keyword ? _oper
keyword @ _oper
keyword ^ _oper
keyword ~ _oper
# grouping
keyword ( _group
keyword ) _group
keyword < _group
keyword > _group
keyword [ _group
keyword ] _group
keyword { _group
keyword } _group
# concatenator,separator,terminator
keyword \{.;\} _sep

# strings

context ' ' _str
keyword \\' _esc
keyword \\\\ _esc
keyword \\\{abtnvfr\} _esc
keyword \\x\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\} _esc
keyword \\u\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\} _esc
keyword \\U\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\} _esc

context " " _str
keyword \\" _esc
keyword \\\\ _esc
keyword \\\{abtnvfr\} _esc
keyword \\x\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\} _esc
keyword \\u\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\} _esc
keyword \\U\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\}\{0123456789abcdefABCDEF\} _esc

# special sequence

context ` ` _special
keyword \\` _special

# comments

context % % _comment
keyword \\% _comment
keyword whole BUG _alerthi
keyword whole DEPRECATED _alertmi
keyword whole FIXME _alerthi
keyword whole NOTE _alertlo
keyword whole TEST _alertlo
keyword whole TODO _alertmi
keyword whole WARN _alertmi
spellcheck
156 changes: 117 additions & 39 deletions misc/syntax/j.syntax
Original file line number Diff line number Diff line change
@@ -1,42 +1,120 @@
# J syntax highlighting
# J language Syntax highlighting Definition
# Version 3.0.0 2026-03-18
# See updates and changelog at https://github.com/jip/syntax-highlighting
#
# J is a high-level, general-purpose programming language
# https://www.jsoftware.com
#
# This file is part of GNU Midnight Commander
# https://midnight-commander.org/
#
# SPDX-FileCopyrightText: 2009,2026 Igor Zhuravlov <zhuravlov.ip@ya.ru>
# SPDX-License-Identifier: GPL-3.0-or-later

# for the default (lightgray on blue)
define _adverb green blue bold
define _alerthi lightgray red
define _alertmi gray yellow
define _alertlo gray cyan
define _copulag white
define _copulal brown
define _comment gray
define _conj yellow blue bold
define _control brightred
define _noun cyan blue bold
define _nounblk lightgray brightblue
define _num green
define _paren brightgreen
define _str brightcyan
define _verb magenta blue bold

context default
# controls
wholechars {}
keyword {{ _control
keyword }} _control
wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789._
keyword wholeleft assert. _control
keyword wholeleft break. _control
keyword wholeleft case. _control
keyword wholeleft catch. _control
keyword wholeleft catch\{dt\}. _control
keyword wholeleft continue. _control
keyword wholeleft do. _control
keyword wholeleft else. _control
keyword wholeleft elseif. _control
keyword wholeleft end. _control
keyword wholeleft fcase. _control
keyword wholeleft for. _control
keyword wholeleft for_\{abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\}\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_\]. _control
keyword wholeleft goto_\{abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\}\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_\]. _control
keyword wholeleft if. _control
keyword wholeleft label_\{abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\}\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_\]. _control
keyword wholeleft return. _control
keyword wholeleft select. _control
keyword wholeleft throw. _control
keyword wholeleft try. _control
keyword wholeleft while. _control
keyword wholeleft whilst. _control
# comments
keyword wholeleft NB. _comment
# copula
keyword =: _copulag
keyword =. _copulal
# parenthesis
keyword \{()\} _paren
# actors
keyword {:: _verb
keyword &.: _conj
keyword __: _verb
keyword /.. _adverb
keyword \{<>\+\*-%$~|,#{}"\}\{.:\} _verb
keyword \{_;/\\[\}: _verb
keyword \{^?\}. _verb
keyword \{^`\}: _conj
keyword \{;[]\}. _conj
keyword \{!:@&\}\{.:\} _conj
keyword \{/\\\}. _adverb
keyword ]: _adverb
keyword \{=<>\+\*-%^$|,;#![]{?\} _verb
keyword \{~/\\}\} _adverb
keyword \{".:`@&\} _conj
keyword wholeleft \{AcCeEIjLorv\}. _verb
keyword wholeleft \{bfM\}. _adverb
keyword wholeleft \{Hmt\}. _conj
keyword wholeleft p.. _verb
keyword wholeleft \{ipu\}\{.:\} _verb
keyword wholeleft \{LS\}: _conj
keyword wholeleft \{qsxZ\}: _verb
keyword whole \{uv\} _verb
keyword wholeleft _\{123456789\}: _verb
keyword wholeleft \{0123456789\}: _verb
# numbers
keyword whole \{0123456789_\}\[abcdefghijklmnopqrstuvwxyz0123456789_.\] _num
# nouns
keyword whole a\{.:\} _noun
keyword whole \{mnxy\} _noun

# strings

context ' ' _str

# block nouns

context exclusive 0\s\[\s\t\]:\[\s\t\]0\[)\s\t\]\n linestart ) _nounblk

context exclusive whole Note linestart ) _nounblk

# comments

context exclusive linestart NB.\s\*\s \n _comment blue underline

keyword assert. brightred
keyword break. brightred
keyword case. brightred
keyword catch. brightred
keyword catchd. brightred
keyword catcht. brightred
keyword continue. brightred
keyword do. brightred
keyword else. brightred
keyword elseif. brightred
keyword end. brightred
keyword fcase. brightred
keyword for. brightred
keyword for_\{abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\}\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_\]. brightred
keyword goto_\{abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\}\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_\]. brightred
keyword if. brightred
keyword label_\{abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\}\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_\]. brightred
keyword return. brightred
keyword select. brightred
keyword throw. brightred
keyword trap. brightred
keyword try. brightred
keyword while. brightred
keyword whilst. brightred

keyword NB. green

keyword \{abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\}\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_\]\[\s\]=: white
keyword '\{abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\}\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_\s\]'\[\s\]=: white

context ' ' brightcyan
# spellcheck

context exclusive linestart NB.\s\*\s \n brightgreen
# spellcheck

context exclusive NB. \n green
# spellcheck
context exclusive NB. \n _comment
keyword whole BUG _alerthi
keyword whole DEPRECATED _alertmi
keyword whole FIXME _alerthi
keyword whole NOTE _alertlo
keyword whole TEST _alertlo
keyword whole TODO _alertmi
keyword whole WARN _alertmi
spellcheck
Loading