summaryrefslogtreecommitdiffstats
path: root/public/prism/prism-ebnf.min.js
blob: 43c59fd22e828e9e229e30b5815092b05451bdd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
Prism.languages.ebnf = {
  comment: /\(\*[\s\S]*?\*\)/,
  string: { pattern: /"[^"\r\n]*"|'[^'\r\n]*'/, greedy: !0 },
  special: { pattern: /\?[^?\r\n]*\?/, greedy: !0, alias: 'class-name' },
  definition: {
    pattern: /^([\t ]*)[a-z]\w*(?:[ \t]+[a-z]\w*)*(?=\s*=)/im,
    lookbehind: !0,
    alias: ['rule', 'keyword'],
  },
  rule: /\b[a-z]\w*(?:[ \t]+[a-z]\w*)*\b/i,
  punctuation: /\([:/]|[:/]\)|[.,;()[\]{}]/,
  operator: /[-=|*/!]/,
};