Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Grammar () {
- this.StartSymbol = undefined;
- this.terminals = [];
- this.nonTerminals = [];
- this.productions = new Object(null);
- getProductions = function (productionsArray) {
- productions = {}
- for (p in productionsArray) {
- var production = p.split(/[ ]+->[ ]+/);
- var header = production[0];
- var rules = production[1].split(/[ ]+\|[ ]+/);
- }
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement