]> luflow.net public git repositories - flow-web.git/blob - static/highlight/languages/bnf.js
Initial commit.
[flow-web.git] / static / highlight / languages / bnf.js
1 /*! `bnf` grammar compiled for Highlight.js 11.11.1 */
2 (function(){
3 var hljsGrammar = (function () {
4 'use strict';
5
6 /*
7 Language: Backus–Naur Form
8 Website: https://en.wikipedia.org/wiki/Backus–Naur_form
9 Category: syntax
10 Author: Oleg Efimov <efimovov@gmail.com>
11 */
12
13 /** @type LanguageFn */
14 function bnf(hljs) {
15 return {
16 name: 'Backus–Naur Form',
17 contains: [
18 // Attribute
19 {
20 className: 'attribute',
21 begin: /</,
22 end: />/
23 },
24 // Specific
25 {
26 begin: /::=/,
27 end: /$/,
28 contains: [
29 {
30 begin: /</,
31 end: />/
32 },
33 // Common
34 hljs.C_LINE_COMMENT_MODE,
35 hljs.C_BLOCK_COMMENT_MODE,
36 hljs.APOS_STRING_MODE,
37 hljs.QUOTE_STRING_MODE
38 ]
39 }
40 ]
41 };
42 }
43
44 return bnf;
45
46 })();
47
48 hljs.registerLanguage('bnf', hljsGrammar);
49 })();