code: function CFG(rules) {
    let arr = [];
  
    arr.__proto__ = CFG.prototype;
    if (Array.isArray(rules)) {
      rules.forEach(arr.rule.bind(arr));
    }
  
    return arr;
  }
docs: Constructs a new context-free grammar, which is just a container for
  production rules
  
  @class CFG
  @extends Array
  @constructor
  @param {rules=} - Optional array of {@link Rule}s to initialize the grammar
  with