This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch jline3
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/jline3 by this push:
new 2edeeeed83 update theme files
2edeeeed83 is described below
commit 2edeeeed83b55b98649e9efddf5110a0650c4207
Author: Paul King <[email protected]>
AuthorDate: Sun Jun 29 22:38:04 2025 +1000
update theme files
---
.../src/main/resources/nanorc/args.nanorc | 15 +++++
.../src/main/resources/nanorc/command.nanorc | 15 +++++
.../src/main/resources/nanorc/css.nanorc | 46 +++++++++++++
.../src/main/resources/nanorc/csv.nanorc | 29 +++++++++
.../src/main/resources/nanorc/dark.nanorctheme | 13 ++++
.../src/main/resources/nanorc/gron.nanorc | 16 ++++-
.../src/main/resources/nanorc/javascript.nanorc | 37 +++++++++++
.../src/main/resources/nanorc/json.nanorc | 16 ++++-
.../src/main/resources/nanorc/sh-repl.nanorc | 23 +++++--
.../src/main/resources/nanorc/sql.nanorc | 75 +++++++++++++---------
.../src/main/resources/nanorc/toml.nanorc | 35 ++++++----
.../src/main/resources/nanorc/xml.nanorc | 36 +++++++----
.../src/main/resources/nanorc/yaml.nanorc | 62 +++++++++---------
13 files changed, 325 insertions(+), 93 deletions(-)
diff --git a/subprojects/groovy-groovysh/src/main/resources/nanorc/args.nanorc
b/subprojects/groovy-groovysh/src/main/resources/nanorc/args.nanorc
index 4fa311dc6f..7ea3f97347 100644
--- a/subprojects/groovy-groovysh/src/main/resources/nanorc/args.nanorc
+++ b/subprojects/groovy-groovysh/src/main/resources/nanorc/args.nanorc
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
syntax "ARGS"
NUMBER: "\<[-]?[0-9]*([Ee][+-]?[0-9]+)?\>" "\<[-]?[0](\.[0-9]+)?\>"
diff --git
a/subprojects/groovy-groovysh/src/main/resources/nanorc/command.nanorc
b/subprojects/groovy-groovysh/src/main/resources/nanorc/command.nanorc
index e1c2a9c534..dd9555dac3 100644
--- a/subprojects/groovy-groovysh/src/main/resources/nanorc/command.nanorc
+++ b/subprojects/groovy-groovysh/src/main/resources/nanorc/command.nanorc
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
syntax "COMMAND"
COMMAND: "/?[a-zA-Z]+[a-zA-Z0-9]*"
diff --git a/subprojects/groovy-groovysh/src/main/resources/nanorc/css.nanorc
b/subprojects/groovy-groovysh/src/main/resources/nanorc/css.nanorc
new file mode 100644
index 0000000000..ff363e23a1
--- /dev/null
+++ b/subprojects/groovy-groovysh/src/main/resources/nanorc/css.nanorc
@@ -0,0 +1,46 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+syntax "css" "\.s?css$"
+
+# Selectors
+TYPE:
"\<(a|abbr|address|area|article|aside|audio|b|base|bdo|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|eventsource|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|mark|map|menu|meta|meter|nav|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|ruby|rp|rt|samp|script|section|select|small|source|span|strong|
[...]
+OPERATOR: "[>+~*]"
+VARIABLE: "[.#][A-Za-z_][A-Za-z0-9_-]*"
+OPERATOR:
":(active|focus|hover|link|visited|first-child|lang|valid|invalid|not|selection)\>"
+OPERATOR: ":(after|before|first-line|first-letter|root|target)\>"
+STRING: "\[[^\[]*\]"
+PLAIN: start="\{" end="\}"
+
+SECTION: "(^|[[:space:]])@(include|mixin)\>"
+VARIABLE: "\$[A-Za-z0-9_-]+"
+
+SECTION: "(^|[[:space:]])@(charset|font-face|media|page|import)\>"
+OPERATOR: "[*]"
+BOOLEAN:
"\<(above|absolute|always|armenian|auto|avoid|baseline|behind|below|bidi-override|blink|block|bolder|bold|bottom|capitalize|center-left|center-right|center|circle|cjk-ideographic|close-quote|collapse|compact|condensed|continuous|crop|crosshair|cross|cue-after|cue-before|cursive|dashed|decimal|decimal-leading-zero|default|digits|disc|dotted|double|embed|e-resize|expanded|extra-condensed|extra-expanded|fantasy|far-left|far-right|faster|fast|fixed|fixed|georgian|groove|hebrew|help
[...]
+VARIABLE: ":[[:space:]]*(code|hidden|table|pre)\>"
+KEYWORD:
"\<(background-attachment|background-clip|background-color|background-image|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-radius|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|b
[...]
+WARNING: "-(ms|moz|apple|khtml|wap|webkit|o|xv)-[a-z][a-z-]+"
+PLAIN: "[:;,]"
+NUMBER: "\<(0|[\+-]?[1-9][0-9]*)"
+NUMBER:
"[\+-]?([0-9]+|[0-9]*\.[0-9]+)(%|e(m|x)|p(x|t|c)|in|ft|(m|c)m|k?Hz|deg|g?rad|m?s)"
+NUMBER: "#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})\>"
+OPERATOR: "\!important\>"
+FUNCTION: "[a-z-]*(-[a-z]+)?\(" "\(|\)"
+STRING: ""(\\.|[^"])*"|'(\\.|[^'])*'"
+COMMENT: "(^|[[:space:]])//.*"
+COMMENT: start="/\*" end="\*/"
+WHITESPACE: "[[:space:]]+$"
+WARNING: " + +| + +"
diff --git a/subprojects/groovy-groovysh/src/main/resources/nanorc/csv.nanorc
b/subprojects/groovy-groovysh/src/main/resources/nanorc/csv.nanorc
new file mode 100644
index 0000000000..919e3d3251
--- /dev/null
+++ b/subprojects/groovy-groovysh/src/main/resources/nanorc/csv.nanorc
@@ -0,0 +1,29 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+syntax "CSV" "\.csv$"
+
+RAINBOW1:
"^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?"
+RAINBOW2:
"^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?"
+RAINBOW3:
"^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?"
+RAINBOW4:
"^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?"
+RAINBOW5:
"^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?"
+RAINBOW6:
"^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?"
+RAINBOW7:
"^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?"
+RAINBOW8:
"^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?"
+RAINBOW9:
"^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?"
+RAINBOW10:
"^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,)?([^,]*,)?([^,]*,)?"
+RAINBOW11: "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,)?([^,]*,)?"
+RAINBOW12: "^("([^"]*"")*[^"]*",?)|^([^,]*,?))?"
diff --git
a/subprojects/groovy-groovysh/src/main/resources/nanorc/dark.nanorctheme
b/subprojects/groovy-groovysh/src/main/resources/nanorc/dark.nanorctheme
index 896ef9c59c..cb1e726bdc 100644
--- a/subprojects/groovy-groovysh/src/main/resources/nanorc/dark.nanorctheme
+++ b/subprojects/groovy-groovysh/src/main/resources/nanorc/dark.nanorctheme
@@ -27,6 +27,7 @@
PLAIN white
FUNCTION brightgreen
STRING brightcyan
+REGEXP magenta
COMMENT cyan
DOC_COMMENT brightcyan
TYPE brightblue
@@ -59,6 +60,18 @@ ROW_NUMBER bold,!blue,~grey7
ROW_STYLE ,~grey15
LIST_BACKGROUND ,~grey42
LIST_GROUP yellow
+RAINBOW1 brightmagenta
+RAINBOW2 brightcyan
+RAINBOW3 brightblue
+RAINBOW4 brightyellow
+RAINBOW5 brightgreen
+RAINBOW6 brightred
+RAINBOW7 magenta
+RAINBOW8 cyan
+RAINBOW9 blue
+RAINBOW10 yellow
+RAINBOW11 green
+RAINBOW12 red
#
# mixin
#
diff --git a/subprojects/groovy-groovysh/src/main/resources/nanorc/gron.nanorc
b/subprojects/groovy-groovysh/src/main/resources/nanorc/gron.nanorc
index ca36442b1b..4bb6595ec0 100644
--- a/subprojects/groovy-groovysh/src/main/resources/nanorc/gron.nanorc
+++ b/subprojects/groovy-groovysh/src/main/resources/nanorc/gron.nanorc
@@ -1,5 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
syntax "GRON" "\.gron$"
-#header "^\[$"
NUMBER: "\<[-]?[0-9]*([Ee][+-]?[0-9]+)?\>" "\<[-]?[0](\.[0-9]+)?\>"
STRING: "[a-zA-Z]+[a-zA-Z0-9]*"
diff --git
a/subprojects/groovy-groovysh/src/main/resources/nanorc/javascript.nanorc
b/subprojects/groovy-groovysh/src/main/resources/nanorc/javascript.nanorc
new file mode 100644
index 0000000000..4b45b35acf
--- /dev/null
+++ b/subprojects/groovy-groovysh/src/main/resources/nanorc/javascript.nanorc
@@ -0,0 +1,37 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+syntax "JavaScript" "\.js$"
+
+NUMBER:
"\<[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\>"
+NUMBER: "\<[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
+NUMBER: "\<[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
+FUNCTION: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
+PLAIN: "[(]"
+KEYWORD: "\<(break|case|catch|continue|default|delete|do|else|finally)\>"
+KEYWORD: "\<(for|function|get|if|in|instanceof|new|return|set|switch)\>"
+KEYWORD: "\<(switch|this|throw|try|typeof|var|void|while|with)\>"
+KEYWORD: "\<(null|undefined|NaN)\>"
+BOOLEAN: "\<(true|false)\>"
+TYPE: "\<(Array|Boolean|Date|Enumerator|Error|Function|Math)\>"
+TYPE: "\<(Number|Object|RegExp|String)\>"
+OPERATOR: "[-+/*=<>!~%?:&|]"
+REGEXP: "/[^*]([^/]|(\\/))*[^\\]/[gim]*"
+STRING: ""(\\.|[^"])*"|'(\\.|[^'])*'"
+ESCAPE: "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]"
+COMMENT: "(^|[[:space:]])//.*"
+COMMENT: start="/\*" end="\*/"
+WHITESPACE: "[[:space:]]+$"
+WARNING: " + +| + +"
diff --git a/subprojects/groovy-groovysh/src/main/resources/nanorc/json.nanorc
b/subprojects/groovy-groovysh/src/main/resources/nanorc/json.nanorc
index 11b6487fa9..8a8294d876 100644
--- a/subprojects/groovy-groovysh/src/main/resources/nanorc/json.nanorc
+++ b/subprojects/groovy-groovysh/src/main/resources/nanorc/json.nanorc
@@ -1,5 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
syntax "JSON" "\.json$"
-header "^\{$"
NUMBER: "\<[-]?[0-9]*([Ee][+-]?[0-9]+)?\>" "\<[-]?[0](\.[0-9]+)?\>"
NULL: "\<null\>"
diff --git
a/subprojects/groovy-groovysh/src/main/resources/nanorc/sh-repl.nanorc
b/subprojects/groovy-groovysh/src/main/resources/nanorc/sh-repl.nanorc
index f1191de33d..ea0ed8274c 100644
--- a/subprojects/groovy-groovysh/src/main/resources/nanorc/sh-repl.nanorc
+++ b/subprojects/groovy-groovysh/src/main/resources/nanorc/sh-repl.nanorc
@@ -1,15 +1,28 @@
-## Groovy REPL sh commands highlight.
-##
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
syntax "SH-REPL"
-## keywords:
+# keywords:
KEYWORD:
"\<(case|do|done|elif|else|esac|fi|for|function|if|in|select|then|time|until|while)\>"
OPERATOR: "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
OPTION: "-[Lldefgrtuwx]+\>"
OPERATOR: "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
-## builtins:
+# builtins:
FUNCTION:
"\<(alias|bg|bind|break|builtin|caller|cd|command|compgen|complete|compopt|continue|declare|dirs|disown|echo|enable|eval|exec|exit|export|false|fc|fg|getopts|hash|help|history|jobs|kill|let|local|logout|mapfile|popd|printf|pushd|pwd|read|readarray|readonly|return|set|shift|shopt|source|suspend|test|times|trap|true|type|typeset|ulimit|umask|unalias|unset|wait)\>"
-## not builtins:
+# not builtins:
FUNCTION:
"\<(cat|chmod|chown|cp|env|grep|install|ln|make|mkdir|mv|rm|sed|tar|touch|ls)\>"
~FUNCTION: "^\s+[0-9A-Z_]+\s+\(\)"
~VARIABLE: "\$\{?[0-9A-Z_!@#$*?-]+\}?"
diff --git a/subprojects/groovy-groovysh/src/main/resources/nanorc/sql.nanorc
b/subprojects/groovy-groovysh/src/main/resources/nanorc/sql.nanorc
index 1ebd57452e..26d11a3508 100644
--- a/subprojects/groovy-groovysh/src/main/resources/nanorc/sql.nanorc
+++ b/subprojects/groovy-groovysh/src/main/resources/nanorc/sql.nanorc
@@ -1,34 +1,49 @@
-syntax "SQL" "\.sql$" "sqliterc$"
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
-icolor cyan "\<(ALL|ASC|AS|ALTER|AND|ADD|AUTO_INCREMENT)\>"
-icolor cyan "\<(BETWEEN|BINARY|BOTH|BY|BOOLEAN)\>"
-icolor cyan "\<(CHANGE|CHECK|COLUMNS|COLUMN|CROSS|CREATE)\>"
-icolor cyan
"\<(DATABASES|DATABASE|DATA|DELAYED|DESCRIBE|DESC|DISTINCT|DELETE|DROP|DEFAULT)\>"
-icolor cyan "\<(ENCLOSED|ESCAPED|EXISTS|EXPLAIN)\>"
-icolor cyan "\<(FIELDS|FIELD|FLUSH|FOR|FOREIGN|FUNCTION|FROM)\>"
-icolor cyan "\<(GROUP|GRANT|HAVING)\>"
-icolor cyan "\<(IGNORE|INDEX|INFILE|INSERT|INNER|INTO|IDENTIFIED|IN|IS|IF)\>"
-icolor cyan "\<(JOIN|KEYS|KILL|KEY)\>"
-icolor cyan
"\<(LEADING|LIKE|LIMIT|LINES|LOAD|LOCAL|LOCK|LOW_PRIORITY|LEFT|LANGUAGE)\>"
-icolor cyan "\<(MODIFY|NATURAL|NOT|NULL|NEXTVAL)\>"
-icolor cyan "\<(OPTIMIZE|OPTION|OPTIONALLY|ORDER|OUTFILE|OR|OUTER|ON)\>"
-icolor cyan "\<(PROCEDURE|PROCEDURAL|PRIMARY)\>"
-icolor cyan
"\<(READ|REFERENCES|REGEXP|RENAME|REPLACE|RETURN|REVOKE|RLIKE|RIGHT)\>"
-icolor cyan "\<(SHOW|SONAME|STATUS|STRAIGHT_JOIN|SELECT|SETVAL|SET)\>"
-icolor cyan
"\<(TABLES|TERMINATED|TO|TRAILING|TRUNCATE|TABLE|TEMPORARY|TRIGGER|TRUSTED)\>"
-icolor cyan "\<(UNIQUE|UNLOCK|USE|USING|UPDATE|VALUES|VARIABLES|VIEW)\>"
-icolor cyan "\<(WITH|WRITE|WHERE|ZEROFILL|TYPE|XOR)\>"
-color green
"\<(VARCHAR|TINYINT|TEXT|DATE|SMALLINT|MEDIUMINT|INT|INTEGER|BIGINT|FLOAT|DOUBLE|DECIMAL|DATETIME|TIMESTAMP|TIME|YEAR|UNSIGNED|CHAR|TINYBLOB|TINYTEXT|BLOB|MEDIUMBLOB|MEDIUMTEXT|LONGBLOB|LONGTEXT|ENUM|BOOL|BINARY|VARBINARY)\>"
+syntax "sql" "\.sql$"
+
+~KEYWORD: "\<(ALL|ASC|AS|ALTER|AND|ADD|AUTO_INCREMENT)\>"
+~KEYWORD: "\<(BETWEEN|BINARY|BOTH|BY|BOOLEAN)\>"
+~KEYWORD: "\<(CHANGE|CHECK|COLUMNS|COLUMN|CROSS|CREATE)\>"
+~KEYWORD:
"\<(DATABASES|DATABASE|DATA|DELAYED|DESCRIBE|DESC|DISTINCT|DELETE|DROP|DEFAULT)\>"
+~KEYWORD: "\<(ENCLOSED|ESCAPED|EXISTS|EXPLAIN)\>"
+~KEYWORD: "\<(FIELDS|FIELD|FLUSH|FOR|FOREIGN|FUNCTION|FROM)\>"
+~KEYWORD: "\<(GROUP|GRANT|HAVING)\>"
+~KEYWORD: "\<(IGNORE|INDEX|INFILE|INSERT|INNER|INTO|IDENTIFIED|IN|IS|IF)\>"
+~KEYWORD: "\<(JOIN|KEYS|KILL|KEY)\>"
+~KEYWORD:
"\<(LEADING|LIKE|LIMIT|LINES|LOAD|LOCAL|LOCK|LOW_PRIORITY|LEFT|LANGUAGE)\>"
+~KEYWORD: "\<(MODIFY|NATURAL|NOT|NULL|NEXTVAL)\>"
+~KEYWORD: "\<(OPTIMIZE|OPTION|OPTIONALLY|ORDER|OUTFILE|OR|OUTER|ON)\>"
+~KEYWORD: "\<(PROCEDURE|PROCEDURAL|PRIMARY)\>"
+~KEYWORD:
"\<(READ|REFERENCES|REGEXP|RENAME|REPLACE|RETURN|REVOKE|RLIKE|RIGHT)\>"
+~KEYWORD: "\<(SHOW|SONAME|STATUS|STRAIGHT_JOIN|SELECT|SETVAL|SET)\>"
+~KEYWORD:
"\<(TABLES|TERMINATED|TO|TRAILING|TRUNCATE|TABLE|TEMPORARY|TRIGGER|TRUSTED)\>"
+~KEYWORD: "\<(UNIQUE|UNLOCK|USE|USING|UPDATE|VALUES|VARIABLES|VIEW)\>"
+~KEYWORD: "\<(WITH|WRITE|WHERE|ZEROFILL|TYPE|XOR)\>"
+TYPE:
"\<(VARCHAR|TINYINT|TEXT|DATE|SMALLINT|MEDIUMINT|INT|INTEGER|BIGINT|FLOAT|DOUBLE|DECIMAL|DATETIME|TIMESTAMP|TIME|YEAR|UNSIGNED|CHAR|TINYBLOB|TINYTEXT|BLOB|MEDIUMBLOB|MEDIUMTEXT|LONGBLOB|LONGTEXT|ENUM|BOOL|BINARY|VARBINARY)\>"
# SQLite meta commands
-icolor cyan "\.\<(databases|dump|echo|exit|explain|header(s)?|help)\>"
-icolor cyan "\.\<(import|indices|mode|nullvalue|output|prompt|quit|read)\>"
-icolor cyan "\.\<(schema|separator|show|tables|timeout|width)\>"
-color brightcyan "\<(ON|OFF)\>"
+~KEYWORD: "\.\<(databases|dump|echo|exit|explain|header(s)?|help)\>"
+~KEYWORD: "\.\<(import|indices|mode|nullvalue|output|prompt|quit|read)\>"
+~KEYWORD: "\.\<(schema|separator|show|tables|timeout|width)\>"
+BOOLEAN: "\<(ON|OFF)\>"
-color blue "\<([0-9]+)\>"
-color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
-color yellow "`(\\.|[^\\`])*`"
-color brightblack "\-\-.*$"
-color ,green "[[:space:]]+$"
-color ,red " + +| + +"
+NUMBER: "\<([0-9]+)\>"
+STRING: ""(\\.|[^"])*"|'(\\.|[^'])*'"
+STRING: "`(\\.|[^\\`])*`"
+COMMENT: "\-\-.*$"
+WHITESPACE: "[[:space:]]+$"
+WARNING: " + +| + +"
diff --git a/subprojects/groovy-groovysh/src/main/resources/nanorc/toml.nanorc
b/subprojects/groovy-groovysh/src/main/resources/nanorc/toml.nanorc
index 2ffd5c1401..a73cc05e59 100644
--- a/subprojects/groovy-groovysh/src/main/resources/nanorc/toml.nanorc
+++ b/subprojects/groovy-groovysh/src/main/resources/nanorc/toml.nanorc
@@ -1,16 +1,29 @@
-# Supports `TOML` files
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
syntax "TOML" "\.toml$"
-## Multiline
-icolor yellow start="\"\"\"" end="\"\"\""
-icolor yellow start="'''" end="'''"
-icolor yellow start="\[" end="\]"
+# Multiline
+STRING: start="\"\"\"" end="\"\"\""
+STRING: start="'''" end="'''"
+STRING: start="\[" end="\]"
-## Values
-icolor yellow "=.*"
+# Values
+STRING: "=.*"
-## Tables
-icolor red "^\s*\[.*\]$"
+# Tables
+ATTRIBUTE: "^\s*\[.*\]$"
-## Comments (keep at the end of this file!)
-icolor cyan "#.*$"
+$LINE_COMMENT: "#.*$"
diff --git a/subprojects/groovy-groovysh/src/main/resources/nanorc/xml.nanorc
b/subprojects/groovy-groovysh/src/main/resources/nanorc/xml.nanorc
index 080881318d..488ff41169 100644
--- a/subprojects/groovy-groovysh/src/main/resources/nanorc/xml.nanorc
+++ b/subprojects/groovy-groovysh/src/main/resources/nanorc/xml.nanorc
@@ -1,14 +1,26 @@
-## Support for xml files.
-##
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
-syntax "XML" ".*\.(xml|sgml?|rdf)$"
-color white "^.+$"
-color green start="<" end=">"
-color cyan "<[^> ]+"
-color cyan ">"
-color yellow start="<!DOCTYPE" end="[/]?>"
-color yellow start="<!--" end="-->"
-color red "&[^;]*;"
+syntax "xml" "\.(html?|sgml?|xml|xslt?|rdf)$"
-## Trailing spaces
-color ,green "[[:space:]]+$"
+SECTION: start="<" end=">"
+KEYWORD: " [a-z_-]+="
+STRING: ""(\\.|[^"])*"|'(\\.|[^'])*'"
+WARNING: "&"
+ESCAPE: "&(#[0-9]+|#x[0-9a-fA-F]+|[A-Za-z][A-Za-z0-9]*);"
+COMMENT: start="<!--" end="-->"
+COMMENT: start="<!DOCTYPE" end=">"
+WHITESPACE: "[[:space:]]+$"
+WARNING: " + +| + +"
diff --git a/subprojects/groovy-groovysh/src/main/resources/nanorc/yaml.nanorc
b/subprojects/groovy-groovysh/src/main/resources/nanorc/yaml.nanorc
index 36c0b5b86a..af7077f7d2 100644
--- a/subprojects/groovy-groovysh/src/main/resources/nanorc/yaml.nanorc
+++ b/subprojects/groovy-groovysh/src/main/resources/nanorc/yaml.nanorc
@@ -1,36 +1,32 @@
-# Supports `YAML` files
-syntax "YAML" "\.ya?ml$"
-header "^(---|===)" "%YAML"
-
-## Keys
-color magenta "^\s*[\$A-Za-z0-9_-]+\:"
-color brightmagenta "^\s*@[\$A-Za-z0-9_-]+\:"
-
-## Values
-color white ":\s.+$"
-## Booleans
-icolor brightcyan " (y|yes|n|no|true|false|on|off)$"
-## Numbers
-color brightred " [[:digit:]]+(\.[[:digit:]]+)?"
-## Arrays
-color red "\[" "\]" ":\s+[|>]" "^\s*- "
-## Reserved
-color green "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) "
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
-## Comments
-color brightwhite "#.*$"
-
-## Errors
-color ,red ":\w.+$"
-color ,red ":'.+$"
-color ,red ":".+$"
-color ,red "\s+$"
-
-## Non closed quote
-color ,red "['\"][^['\"]]*$"
+syntax "YAML" "\.ya?ml$"
-## Closed quotes
-color yellow "['\"].*['\"]"
+TYPE: "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) "
+BOOLEAN: "\<(YES|yes|Y|y|ON|on|NO|no|N|n|OFF|off|true|false)\>"
+OPERATOR: ":[[:space:]]" "\[" "\]" ":[[:space:]]+[|>]" "^[[:space:]]*- "
+VARIABLE: "[[:space:]][\*&][A-Za-z0-9]+"
+STRING: ""(\\.|[^"])*"|'(\\.|[^'])*'"
+$LINE_COMMENT: "(^|[[:space:]])#([^{].*)?$"
+~NUMBER: " [[:digit:]]+(\.[[:digit:]]+)?"
-## Equal sign
-color brightgreen ":( |$)"
+# Errors
+WARNING: ":\w.+$"
+WARNING: ":'.+$"
+WARNING: ":".+$"
+WARNING: "\s+$"
+# Non closed quote
+WARNING: "['\"][^['\"]]*$"