summaryrefslogtreecommitdiff
path: root/static/hl/languages/abnf.min.js
blob: 94c3be14bcd0353d355f5d9f924e7580dad5ef98 (plain)
1
2
3
4
5
6
7
8
9
hljs.registerLanguage("abnf",(()=>{"use strict";return s=>({
name:"Augmented Backus-Naur Form",illegal:"[!@#$^&',?+~`|:]",
keywords:"ALPHA BIT CHAR CR CRLF CTL DIGIT DQUOTE HEXDIG HTAB LF LWSP OCTET SP VCHAR WSP",
contains:[{className:"attribute",begin:"^[a-zA-Z][a-zA-Z0-9-]*(?=\\s*=)"
},s.COMMENT(";","$"),{className:"symbol",
begin:/%b[0-1]+(-[0-1]+|(\.[0-1]+)+){0,1}/},{className:"symbol",
begin:/%d[0-9]+(-[0-9]+|(\.[0-9]+)+){0,1}/},{className:"symbol",
begin:/%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+){0,1}/},{className:"symbol",
begin:/%[si]/},s.QUOTE_STRING_MODE,s.NUMBER_MODE]})})());