-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update on 2024-12-31 from miRoox-m4F2aE
- Loading branch information
Showing
25 changed files
with
251 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
created: 20241231115058126 | ||
creator: miRoox | ||
modified: 20241231115925693 | ||
modifier: miRoox | ||
tags: [[GGML BNF]] | ||
title: GBNF示例:JSON | ||
tmap.id: 215b2ddd-7dbd-4557-829a-94e95d76721b | ||
type: text/vnd.tiddlywiki | ||
|
||
[[JSON|?]]的语法用[[GBNF|GGML BNF]]表达的示例: | ||
|
||
|
||
```gbnf | ||
root ::= object | ||
value ::= object | array | string | number | ("true" | "false" | "null") ws | ||
|
||
object ::= | ||
"{" ws ( | ||
string ":" ws value | ||
("," ws string ":" ws value)* | ||
)? "}" ws | ||
|
||
array ::= | ||
"[" ws ( | ||
value | ||
("," ws value)* | ||
)? "]" ws | ||
|
||
string ::= | ||
"\"" ( | ||
[^"\\\x7F\x00-\x1F] | | ||
"\\" (["\\bfnrt] | "u" [0-9a-fA-F]{4}) # escapes | ||
)* "\"" ws | ||
|
||
number ::= ("-"? ([0-9] | [1-9] [0-9]{0,15})) ("." [0-9]+)? ([eE] [-+]? [0-9] [1-9]{0,15})? ws | ||
|
||
# Optional space: by convention, applied in this grammar after literal chars when allowed | ||
ws ::= | " " | "\n" [ \t]{0,20} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/*! `bnf` grammar compiled for Highlight.js 11.4.0 */ | ||
(()=>{var e=(()=>{"use strict";return e=>({name:"Backus\u2013Naur Form", | ||
contains:[{className:"attribute",begin:/</,end:/>/},{begin:/::=/,end:/$/, | ||
contains:[{begin:/</,end:/>/ | ||
},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE] | ||
}]})})();hljs.registerLanguage("bnf",e)})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
created: 20241231112305745 | ||
creator: miRoox | ||
modified: 20241231113247322 | ||
modifier: miRoox | ||
module-type: highlight | ||
tags: $:/internal | ||
title: highlight-bnf.js | ||
tmap.id: 3c098a10-540e-4f08-b397-e17db234ec13 | ||
type: application/javascript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/*! `brainfuck` grammar compiled for Highlight.js 11.4.0 */ | ||
(()=>{var e=(()=>{"use strict";return e=>{const n={className:"literal", | ||
begin:/[+-]/,relevance:0};return{name:"Brainfuck",aliases:["bf"], | ||
contains:[e.COMMENT("[^\\[\\]\\.,\\+\\-<> \r\n]","[\\[\\]\\.,\\+\\-<> \r\n]",{ | ||
returnEnd:!0,relevance:0}),{className:"title",begin:"[\\[\\]]",relevance:0},{ | ||
className:"string",begin:"[\\.,]",relevance:0},{begin:/(?:\+\+|--)/,contains:[n] | ||
},n]}}})();hljs.registerLanguage("brainfuck",e)})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
created: 20241231114346615 | ||
creator: miRoox | ||
modified: 20241231114412286 | ||
modifier: miRoox | ||
module-type: highlight | ||
tags: $:/internal | ||
title: highlight-brainfuck.js | ||
tmap.id: 23c2c57c-23b1-4f19-85da-4706af3162ca | ||
type: application/javascript |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
created: 20241231113558407 | ||
creator: miRoox | ||
modified: 20241231113614592 | ||
modifier: miRoox | ||
module-type: highlight | ||
tags: $:/internal | ||
title: highlight-dos.js | ||
tmap.id: 54c991e6-1ecd-4592-a813-01c37b4bb492 | ||
type: application/javascript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/*! `ebnf` grammar compiled for Highlight.js 11.4.0 */ | ||
(()=>{var e=(()=>{"use strict";return e=>{const a=e.COMMENT(/\(\*/,/\*\)/) | ||
;return{name:"Extended Backus-Naur Form",illegal:/\S/,contains:[a,{ | ||
className:"attribute",begin:/^[ ]*[a-zA-Z]+([\s_-]+[a-zA-Z]+)*/},{begin:/=/, | ||
end:/[.;]/,contains:[a,{className:"meta",begin:/\?.*\?/},{className:"string", | ||
variants:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"`",end:"`"}]}]}]}}})() | ||
;hljs.registerLanguage("ebnf",e)})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
created: 20241231115249454 | ||
creator: miRoox | ||
modified: 20241231115308790 | ||
modifier: miRoox | ||
module-type: highlight | ||
tags: $:/internal | ||
title: highlight-ebnf.js | ||
tmap.id: 4c12789c-7037-4ca2-8e82-10f1c8464b73 | ||
type: application/javascript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/*! `gbnf` based on `ebnf` grammar compiled for Highlight.js 11.4.0 */ | ||
(()=>{var e=(()=>{"use strict";return e=>{const a=e.COMMENT(/#/,"\n") | ||
;return{name:"GGML Backus-Naur Form",illegal:/\S/,contains:[a,{ | ||
className:"attribute",begin:/^[ ]*[a-zA-Z]+([\s_-]+[a-zA-Z]+)*/},{begin:/=/, | ||
end:/[.;]/,contains:[a,{className:"meta",begin:/\?.*\?/},{className:"string", | ||
variants:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"`",end:"`"}]}]}]}}})() | ||
;hljs.registerLanguage("gbnf",e)})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
created: 20241231115812516 | ||
creator: miRoox | ||
modified: 20241231120118445 | ||
modifier: miRoox | ||
module-type: highlight | ||
tags: $:/internal | ||
title: highlight-gbnf.js | ||
tmap.id: f971e1a6-f18f-4661-9085-2251ebd54abd | ||
type: application/javascript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/*! `julia-repl` grammar compiled for Highlight.js 11.4.0 */ | ||
(()=>{var a=(()=>{"use strict";return a=>({name:"Julia REPL",contains:[{ | ||
className:"meta",begin:/^julia>/,relevance:10,starts:{end:/^(?![ ]{6})/, | ||
subLanguage:"julia"}}],aliases:["jldoctest"]})})() | ||
;hljs.registerLanguage("julia-repl",a)})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
created: 20241231114550659 | ||
creator: miRoox | ||
modified: 20241231114628206 | ||
modifier: miRoox | ||
module-type: highlight | ||
tags: $:/internal | ||
title: highlight-julia-repl.js | ||
tmap.id: da3da4e9-a22a-451c-9001-dde1377aa681 | ||
type: application/javascript |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
created: 20241231114521745 | ||
creator: miRoox | ||
modified: 20241231114544180 | ||
modifier: miRoox | ||
module-type: highlight | ||
tags: $:/internal | ||
title: highlight-julia.js | ||
tmap.id: cffd7fac-8421-4b59-b82b-6328895d843c | ||
type: application/javascript |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
created: 20241231113406338 | ||
creator: miRoox | ||
modified: 20241231113422916 | ||
modifier: miRoox | ||
module-type: highlight | ||
tags: $:/internal | ||
title: highlight-mathematica.js | ||
tmap.id: 26c5e394-29be-4de8-862a-6d89b9077c3e | ||
type: application/javascript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/*! `qml` grammar compiled for Highlight.js 11.4.0 */ | ||
(()=>{var e=(()=>{"use strict";return e=>{ | ||
const n="[a-zA-Z_][a-zA-Z0-9\\._]*",r={className:"attribute",begin:"\\bid\\s*:", | ||
starts:{className:"string",end:n,returnEnd:!1}},a={begin:n+"\\s*:", | ||
returnBegin:!0,contains:[{className:"attribute",begin:n,end:"\\s*:", | ||
excludeEnd:!0,relevance:0}],relevance:0},t={begin:e.regex.concat(n,/\s*\{/), | ||
end:/\{/,returnBegin:!0,relevance:0,contains:[e.inherit(e.TITLE_MODE,{begin:n})] | ||
};return{name:"QML",aliases:["qt"],case_insensitive:!1,keywords:{ | ||
keyword:"in of on if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await import", | ||
literal:"true false null undefined NaN Infinity", | ||
built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Behavior bool color coordinate date double enumeration font geocircle georectangle geoshape int list matrix4x4 parent point quaternion real rect size string url variant vector2d vector3d vector4d Promise" | ||
},contains:[{className:"meta",begin:/^\s*['"]use (strict|asm)['"]/ | ||
},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`", | ||
contains:[e.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"}] | ||
},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",variants:[{ | ||
begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}], | ||
relevance:0},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*", | ||
keywords:"return throw case", | ||
contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{begin:/</, | ||
end:/>\s*[);\]]/,relevance:0,subLanguage:"xml"}],relevance:0},{ | ||
className:"keyword",begin:"\\bsignal\\b",starts:{className:"string", | ||
end:"(\\(|:|=|;|,|//|/\\*|$)",returnEnd:!0}},{className:"keyword", | ||
begin:"\\bproperty\\b",starts:{className:"string",end:"(:|=|;|,|//|/\\*|$)", | ||
returnEnd:!0}},{className:"function",beginKeywords:"function",end:/\{/, | ||
excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/ | ||
}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0, | ||
contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}],illegal:/\[|%/},{ | ||
begin:"\\."+e.IDENT_RE,relevance:0},r,a,t],illegal:/#/}}})() | ||
;hljs.registerLanguage("qml",e)})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
created: 20241231150345783 | ||
creator: miRoox | ||
modified: 20241231150407576 | ||
modifier: miRoox | ||
module-type: highlight | ||
tags: $:/internal | ||
title: highlight-qml.js | ||
tmap.id: a19de668-6707-4a37-9e5f-2a38d5392c7a | ||
type: application/javascript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters