1 | hljs.registerLanguage("abnf",(()=>{"use strict";function e(...e){
|
2 | return e.map((e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t
|
3 | })).join("")}return t=>{const s=t.COMMENT(/;/,/$/);return{
|
4 | name:"Augmented Backus-Naur Form",illegal:/[!@#$^&',?+~`|:]/,
|
5 | keywords:["ALPHA","BIT","CHAR","CR","CRLF","CTL","DIGIT","DQUOTE","HEXDIG","HTAB","LF","LWSP","OCTET","SP","VCHAR","WSP"],
|
6 | contains:[{scope:"operator",match:/=\/?/},{scope:"attribute",
|
7 | match:e(/^[a-zA-Z][a-zA-Z0-9-]*/,/(?=\s*=)/)},s,{scope:"symbol",
|
8 | match:/%b[0-1]+(-[0-1]+|(\.[0-1]+)+)?/},{scope:"symbol",
|
9 | match:/%d[0-9]+(-[0-9]+|(\.[0-9]+)+)?/},{scope:"symbol",
|
10 | match:/%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+)?/},{scope:"symbol",
|
11 | match:/%[si](?=".*")/},t.QUOTE_STRING_MODE,t.NUMBER_MODE]}}})()); |
\ | No newline at end of file |