forked from heatherleaf/nearley
-
Notifications
You must be signed in to change notification settings - Fork 0
/
negatable.js
28 lines (28 loc) · 777 Bytes
/
negatable.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Generated automatically by nearley
// http://github.com/Hardmath123/nearley
(function () {
function id(x) {return x[0]; }
var grammar = {
ParserRules: [
{"name": "variable", "symbols": [" ebnf$1"], "postprocess":
function(d, pos, reject) {
if (d[0].join("") !== "if") {
return d[0].join("");
} else {
return reject;
}
}
},
{"name": " ebnf$1", "symbols": [/[a-z]/]},
{"name": " ebnf$1", "symbols": [/[a-z]/, " ebnf$1"], "postprocess": function (d) {
return [d[0]].concat(d[1]);
}}
]
, ParserStart: "variable"
}
if (typeof module !== 'undefined'&& typeof module.exports !== 'undefined') {
module.exports = grammar;
} else {
window.grammar = grammar;
}
})();