Skip to content

Commit 2855b4c

Browse files
hyperpolymathclaude
andcommitted
feat: add TextMate grammars, Notepad++ UDL, and VS Code extension configs for A2ML and K9
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 60c7669 commit 2855b4c

6 files changed

Lines changed: 535 additions & 0 deletions

File tree

a2ml/editors/a2ml-notepadpp.xml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<!-- SPDX-License-Identifier: PMPL-1.0-or-later -->
2+
<!-- A2ML (Attested Markup Language) - Notepad++ User Defined Language -->
3+
<!--
4+
Install: Language → User Defined Language → Define your language → Import
5+
File extensions: .a2ml
6+
-->
7+
<NotepadPlus>
8+
<UserLang name="A2ML" ext="a2ml" udlVersion="2.1">
9+
<Settings>
10+
<Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
11+
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
12+
</Settings>
13+
<KeywordLists>
14+
<!-- Group 1: Directive names -->
15+
<Keywords name="Keywords1">abstract opaque fig ref include embed section metadata attestation signature proof import require export template override extend validate</Keywords>
16+
<!-- Group 2: TOML-like section/structural keywords -->
17+
<Keywords name="Keywords2">end true false null</Keywords>
18+
<!-- Group 3: Inline markup tokens (for reference) -->
19+
<Keywords name="Keywords3"></Keywords>
20+
<Keywords name="Keywords4"></Keywords>
21+
<Keywords name="Keywords5"></Keywords>
22+
<Keywords name="Keywords6"></Keywords>
23+
<Keywords name="Keywords7"></Keywords>
24+
<Keywords name="Keywords8"></Keywords>
25+
<!-- Delimiters: comments, strings, code spans -->
26+
<Keywords name="Delimiters">
27+
<!-- Delimiter 1: double-quoted strings -->
28+
00&quot; 01&quot; 02
29+
<!-- Delimiter 2: backtick inline code -->
30+
03` 04` 05
31+
<!-- Delimiter 3: unused -->
32+
06 07 08
33+
<!-- Delimiter 4: unused -->
34+
09 10 11
35+
<!-- Delimiter 5: unused -->
36+
12 13 14
37+
<!-- Delimiter 6: unused -->
38+
15 16 17
39+
<!-- Delimiter 7: unused -->
40+
18 19 20
41+
<!-- Delimiter 8: unused -->
42+
21 22 23
43+
</Keywords>
44+
<!-- Comment: # and // line comments -->
45+
<Keywords name="Comment">
46+
00# 01 02 03// 04
47+
</Keywords>
48+
<!-- Operators -->
49+
<Keywords name="Operators1">= | @</Keywords>
50+
<Keywords name="Operators2"></Keywords>
51+
<!-- Folder open/close: @directive ... @end -->
52+
<Keywords name="Folder+">@abstract: @opaque( @fig( @section( @metadata( @attestation( @signature( @proof( @include( @embed( @template( @override(</Keywords>
53+
<Keywords name="Folder-">@end</Keywords>
54+
</KeywordLists>
55+
<Styles>
56+
<WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
57+
<WordsStyle name="COMMENTS" fgColor="008000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
58+
<WordsStyle name="LINE COMMENTS" fgColor="008000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
59+
<WordsStyle name="NUMBERS" fgColor="FF8000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
60+
<WordsStyle name="KEYWORDS1" fgColor="0000FF" bgColor="FFFFFF" fontStyle="1" nesting="0" />
61+
<WordsStyle name="KEYWORDS2" fgColor="8000FF" bgColor="FFFFFF" fontStyle="1" nesting="0" />
62+
<WordsStyle name="KEYWORDS3" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
63+
<WordsStyle name="KEYWORDS4" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
64+
<WordsStyle name="KEYWORDS5" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
65+
<WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
66+
<WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
67+
<WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
68+
<WordsStyle name="OPERATORS" fgColor="800080" bgColor="FFFFFF" fontStyle="1" nesting="0" />
69+
<WordsStyle name="FOLDER IN CODE1" fgColor="0000FF" bgColor="FFFFFF" fontStyle="1" nesting="0" />
70+
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
71+
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
72+
<WordsStyle name="DELIMITERS1" fgColor="808080" bgColor="FFFFFF" fontStyle="0" nesting="0" />
73+
<WordsStyle name="DELIMITERS2" fgColor="FF0000" bgColor="F0F0F0" fontStyle="0" nesting="0" />
74+
<WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
75+
<WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
76+
<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
77+
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
78+
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
79+
<WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
80+
</Styles>
81+
</UserLang>
82+
</NotepadPlus>

a2ml/editors/a2ml.tmLanguage.json

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3+
"name": "A2ML",
4+
"scopeName": "source.a2ml",
5+
"comment": "SPDX-License-Identifier: PMPL-1.0-or-later",
6+
"fileTypes": ["a2ml"],
7+
"patterns": [
8+
{ "include": "#comment" },
9+
{ "include": "#heading" },
10+
{ "include": "#directive-block" },
11+
{ "include": "#inline-ref" },
12+
{ "include": "#section-header" },
13+
{ "include": "#key-value" },
14+
{ "include": "#code-block" },
15+
{ "include": "#inline" }
16+
],
17+
"repository": {
18+
"comment": {
19+
"patterns": [
20+
{
21+
"name": "comment.line.double-slash.a2ml",
22+
"match": "//.*$"
23+
},
24+
{
25+
"name": "comment.line.number-sign.a2ml",
26+
"comment": "Hash comments only at start of line (not headings)",
27+
"match": "^\\s*#(?!\\s*[A-Z#]).*$"
28+
}
29+
]
30+
},
31+
"heading": {
32+
"name": "markup.heading.a2ml",
33+
"match": "^(#{1,5})\\s+(.*)$",
34+
"captures": {
35+
"1": { "name": "punctuation.definition.heading.a2ml" },
36+
"2": { "name": "entity.name.section.a2ml" }
37+
}
38+
},
39+
"directive-block": {
40+
"patterns": [
41+
{
42+
"comment": "Opaque directive with lang attribute — treated as embedded raw content",
43+
"name": "meta.directive.opaque.a2ml",
44+
"begin": "^(@)(opaque)(\\([^)]*\\))?(:)\\s*$",
45+
"end": "^(@end)\\b",
46+
"beginCaptures": {
47+
"1": { "name": "punctuation.definition.directive.a2ml" },
48+
"2": { "name": "keyword.control.directive.a2ml" },
49+
"3": { "name": "entity.other.attribute-name.a2ml" },
50+
"4": { "name": "punctuation.separator.a2ml" }
51+
},
52+
"endCaptures": {
53+
"1": { "name": "keyword.control.directive.end.a2ml" }
54+
},
55+
"contentName": "string.quoted.other.opaque.a2ml"
56+
},
57+
{
58+
"comment": "Generic directive block: @name(attrs): ... @end",
59+
"name": "meta.directive.a2ml",
60+
"begin": "^(@)([A-Za-z][A-Za-z0-9:_-]*)(\\([^)]*\\))?(:)\\s*$",
61+
"end": "^(@end)\\b",
62+
"beginCaptures": {
63+
"1": { "name": "punctuation.definition.directive.a2ml" },
64+
"2": { "name": "keyword.control.directive.a2ml" },
65+
"3": { "name": "entity.name.function.a2ml" },
66+
"4": { "name": "punctuation.separator.a2ml" }
67+
},
68+
"endCaptures": {
69+
"1": { "name": "keyword.control.directive.end.a2ml" }
70+
},
71+
"patterns": [
72+
{ "include": "#inline" },
73+
{ "include": "#heading" },
74+
{ "include": "#comment" }
75+
]
76+
}
77+
]
78+
},
79+
"inline-ref": {
80+
"name": "variable.other.reference.a2ml",
81+
"match": "@ref\\([^)]+\\)",
82+
"captures": {
83+
"0": { "name": "variable.other.reference.a2ml" }
84+
}
85+
},
86+
"section-header": {
87+
"comment": "TOML-like [section] headers",
88+
"name": "entity.name.section.toml.a2ml",
89+
"match": "^\\[([A-Za-z][A-Za-z0-9:._-]*)\\]\\s*$",
90+
"captures": {
91+
"1": { "name": "entity.name.section.a2ml" }
92+
}
93+
},
94+
"key-value": {
95+
"comment": "key = \"value\" pairs",
96+
"match": "^\\s*([A-Za-z_][A-Za-z0-9_-]*)\\s*(=)\\s*(\"[^\"]*\"|'[^']*'|[^\\s#]+)?",
97+
"captures": {
98+
"1": { "name": "variable.other.key.a2ml" },
99+
"2": { "name": "keyword.operator.assignment.a2ml" },
100+
"3": { "name": "string.quoted.double.a2ml" }
101+
}
102+
},
103+
"code-block": {
104+
"comment": "Fenced code blocks",
105+
"begin": "^(```)([A-Za-z0-9_+-]*)?\\s*$",
106+
"end": "^(```)\\s*$",
107+
"beginCaptures": {
108+
"1": { "name": "punctuation.definition.code.fenced.a2ml" },
109+
"2": { "name": "entity.name.tag.language.a2ml" }
110+
},
111+
"endCaptures": {
112+
"1": { "name": "punctuation.definition.code.fenced.a2ml" }
113+
},
114+
"contentName": "markup.raw.block.a2ml"
115+
},
116+
"inline": {
117+
"patterns": [
118+
{
119+
"comment": "Bold text **...**",
120+
"name": "markup.bold.a2ml",
121+
"match": "\\*\\*([^*]+)\\*\\*"
122+
},
123+
{
124+
"comment": "Italic text *...*",
125+
"name": "markup.italic.a2ml",
126+
"match": "(?<!\\*)\\*([^*]+)\\*(?!\\*)"
127+
},
128+
{
129+
"comment": "Inline code `...`",
130+
"name": "markup.inline.raw.a2ml",
131+
"match": "`[^`]+`"
132+
},
133+
{
134+
"comment": "Link [text](url)",
135+
"name": "markup.underline.link.a2ml",
136+
"match": "\\[([^\\]]+)\\]\\(([^)]+)\\)",
137+
"captures": {
138+
"1": { "name": "string.other.link.title.a2ml" },
139+
"2": { "name": "markup.underline.link.a2ml" }
140+
}
141+
},
142+
{
143+
"comment": "String literals",
144+
"name": "string.quoted.double.a2ml",
145+
"match": "\"[^\"]*\""
146+
}
147+
]
148+
}
149+
}
150+
}

a2ml/editors/vscode/package.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "a2ml",
3+
"displayName": "A2ML (Attested Markup Language)",
4+
"description": "Syntax highlighting for A2ML — a lightweight markup format with a typed, formally verified core.",
5+
"version": "0.1.0",
6+
"license": "SEE LICENSE IN LICENSE",
7+
"publisher": "hyperpolymath",
8+
"author": {
9+
"name": "Jonathan D.A. Jewell",
10+
"email": "j.d.a.jewell@open.ac.uk"
11+
},
12+
"repository": {
13+
"type": "git",
14+
"url": "https://github.com/hyperpolymath/standards.git",
15+
"directory": "a2ml/editors/vscode"
16+
},
17+
"engines": {
18+
"vscode": "^1.75.0"
19+
},
20+
"categories": [
21+
"Programming Languages"
22+
],
23+
"contributes": {
24+
"languages": [
25+
{
26+
"id": "a2ml",
27+
"aliases": [
28+
"A2ML",
29+
"Attested Markup Language"
30+
],
31+
"extensions": [
32+
".a2ml"
33+
],
34+
"configuration": "./language-configuration.json"
35+
}
36+
],
37+
"grammars": [
38+
{
39+
"language": "a2ml",
40+
"scopeName": "source.a2ml",
41+
"path": "../a2ml.tmLanguage.json"
42+
}
43+
]
44+
}
45+
}

k9-svc/editors/k9-notepadpp.xml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<!-- SPDX-License-Identifier: PMPL-1.0-or-later -->
2+
<!-- K9-SVC - Notepad++ User Defined Language -->
3+
<!--
4+
Install: Language → User Defined Language → Define your language → Import
5+
File extensions: .k9, .k9.ncl
6+
-->
7+
<NotepadPlus>
8+
<UserLang name="K9" ext="k9 k9.ncl" udlVersion="2.1">
9+
<Settings>
10+
<Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
11+
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
12+
</Settings>
13+
<KeywordLists>
14+
<!-- Group 1: Control flow keywords -->
15+
<Keywords name="Keywords1">let in import std if then else match fun forall merge default optional</Keywords>
16+
<!-- Group 2: Security levels and boolean literals -->
17+
<Keywords name="Keywords2">Kennel Yard Hunt true false null</Keywords>
18+
<!-- Group 3: Pedigree and metadata field names -->
19+
<Keywords name="Keywords3">name version description author breed magic_number trust_level leash pedigree config schema_version component_type created k9_spec_version os is_edge requires_podman min_memory_mb allow_network allow_filesystem_write allow_subprocess signature</Keywords>
20+
<!-- Group 4: Recipe / lifecycle names -->
21+
<Keywords name="Keywords4">install validate deploy migrate rollback preflight postflight build test sign scan verify release package clean</Keywords>
22+
<Keywords name="Keywords5"></Keywords>
23+
<Keywords name="Keywords6"></Keywords>
24+
<Keywords name="Keywords7"></Keywords>
25+
<Keywords name="Keywords8"></Keywords>
26+
<!-- Delimiters: strings -->
27+
<Keywords name="Delimiters">
28+
<!-- Delimiter 1: double-quoted strings -->
29+
00&quot; 01&quot; 02
30+
<!-- Delimiter 2: multiline strings m%"..."% -->
31+
03m%&quot; 04&quot;% 05
32+
<!-- Delimiter 3: unused -->
33+
06 07 08
34+
<!-- Delimiter 4: unused -->
35+
09 10 11
36+
<!-- Delimiter 5: unused -->
37+
12 13 14
38+
<!-- Delimiter 6: unused -->
39+
15 16 17
40+
<!-- Delimiter 7: unused -->
41+
18 19 20
42+
<!-- Delimiter 8: unused -->
43+
21 22 23
44+
</Keywords>
45+
<!-- Comment: # line comments -->
46+
<Keywords name="Comment">
47+
00# 01 02 03 04
48+
</Keywords>
49+
<!-- Operators -->
50+
<Keywords name="Operators1">= | : ,</Keywords>
51+
<Keywords name="Operators2"></Keywords>
52+
<!-- Folder open/close: { ... } -->
53+
<Keywords name="Folder+">{ [</Keywords>
54+
<Keywords name="Folder-">} ]</Keywords>
55+
</KeywordLists>
56+
<Styles>
57+
<WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
58+
<WordsStyle name="COMMENTS" fgColor="008000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
59+
<WordsStyle name="LINE COMMENTS" fgColor="008000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
60+
<WordsStyle name="NUMBERS" fgColor="FF8000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
61+
<WordsStyle name="KEYWORDS1" fgColor="0000FF" bgColor="FFFFFF" fontStyle="1" nesting="0" />
62+
<WordsStyle name="KEYWORDS2" fgColor="CC0000" bgColor="FFFFFF" fontStyle="1" nesting="0" />
63+
<WordsStyle name="KEYWORDS3" fgColor="008080" bgColor="FFFFFF" fontStyle="0" nesting="0" />
64+
<WordsStyle name="KEYWORDS4" fgColor="800080" bgColor="FFFFFF" fontStyle="1" nesting="0" />
65+
<WordsStyle name="KEYWORDS5" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
66+
<WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
67+
<WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
68+
<WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
69+
<WordsStyle name="OPERATORS" fgColor="800080" bgColor="FFFFFF" fontStyle="1" nesting="0" />
70+
<WordsStyle name="FOLDER IN CODE1" fgColor="0000FF" bgColor="FFFFFF" fontStyle="1" nesting="0" />
71+
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
72+
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
73+
<WordsStyle name="DELIMITERS1" fgColor="808080" bgColor="FFFFFF" fontStyle="0" nesting="0" />
74+
<WordsStyle name="DELIMITERS2" fgColor="808080" bgColor="F5F5DC" fontStyle="0" nesting="0" />
75+
<WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
76+
<WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
77+
<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
78+
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
79+
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
80+
<WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
81+
</Styles>
82+
</UserLang>
83+
</NotepadPlus>

0 commit comments

Comments
 (0)