ISO-Share/node_modules/prismjs/components/prism-bnf.js
2024-11-26 21:16:11 +01:00

21 lines
383 B
JavaScript

Prism.languages.bnf = {
'string': {
pattern: /"[^\r\n"]*"|'[^\r\n']*'/
},
'definition': {
pattern: /<[^<>\r\n\t]+>(?=\s*::=)/,
alias: ['rule', 'keyword'],
inside: {
'punctuation': /^<|>$/
}
},
'rule': {
pattern: /<[^<>\r\n\t]+>/,
inside: {
'punctuation': /^<|>$/
}
},
'operator': /::=|[|()[\]{}*+?]|\.{3}/
};
Prism.languages.rbnf = Prism.languages.bnf;