blob: d53b9fa5205aef763c70e94a9fbc3f32941eeb83 (
plain)
1
2
3
4
5
6
7
|
hljs.registerLanguage("ebnf",(()=>{"use strict";return a=>{
const e=a.COMMENT(/\(\*/,/\*\)/);return{name:"Extended Backus-Naur Form",
illegal:/\S/,contains:[e,{className:"attribute",
begin:/^[ ]*[a-zA-Z][a-zA-Z_-]*([\s_-]+[a-zA-Z][a-zA-Z]*)*/},{begin:/=/,
end:/[.;]/,contains:[e,{className:"meta",begin:/\?.*\?/},{className:"string",
variants:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{begin:"`",end:"`"}]}]}]}}
})());
|