docs: function _compile(productions) {
    var abc, phi, pho, FIRST, dflt, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _loop, _iterator, _step;
  
    return regeneratorRuntime.wrap(function _compile$(_context2) {
      while (1) {
        switch (_context2.prev = _context2.next) {
          case 0:
            abc = (0, _grammar.alphabet)(productions);
            phi = (0, _first3.default)(productions);
            pho = (0, _follow2.default)(phi, productions);
  
            FIRST = function FIRST(rule) {
              return (0, _first2.default)(phi, rule);
            };
  
            dflt = {}; // dummy object
  
            _iteratorNormalCompletion = true;
            _didIteratorError = false;
            _iteratorError = undefined;
            _context2.prev = 8;
            _loop =
            /*#__PURE__*/
            regeneratorRuntime.mark(function _loop() {
              var _step$value, A, rules, m, n;
  
              return regeneratorRuntime.wrap(function _loop$(_context) {
                while (1) {
                  switch (_context.prev = _context.next) {
                    case 0:
                      _step$value = _slicedToArray(_step.value, 2), A = _step$value[0], rules = _step$value[1];
                      m = (0, _jsItertools.map)(function (a) {
                        return [a, (0, _jsItertools.next)((0, _jsItertools.iter)((0, _jsItertools.filter)(function (r) {
                          return rules.get(r).length === 0;
                        }, rules.keys())), dflt)];
                      }, (0, _jsItertools.filter)(function (a) {
                        return pho.get(A).has(a) && !phi.get(A).has(a);
                      }, abc));
                      n = (0, _jsItertools.map)(function (a) {
                        return [a, (0, _jsItertools.next)((0, _jsItertools.iter)((0, _jsItertools.filter)(function (r) {
                          return FIRST(rules.get(r)).has(a);
                        }, rules.keys())), dflt)];
                      }, (0, _jsItertools.filter)(function (a) {
                        return a !== _grammar.EW;
                      }, abc));
                      _context.next = 5;
                      return [A, new Map((0, _jsItertools.filter)(function (_ref) {
                        var _ref2 = _slicedToArray(_ref, 2),
                            k = _ref2[0],
                            v = _ref2[1];
  
                        return v !== dflt;
                      }, (0, _jsItertools.chain)([m, n])))];
  
                    case 5:
                    case "end":
                      return _context.stop();
                  }
                }
              }, _loop, this);
            });
            _iterator = productions[Symbol.iterator]();
  
          case 11:
            if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
              _context2.next = 16;
              break;
            }
  
            return _context2.delegateYield(_loop(), "t0", 13);
  
          case 13:
            _iteratorNormalCompletion = true;
            _context2.next = 11;
            break;
  
          case 16:
            _context2.next = 22;
            break;
  
          case 18:
            _context2.prev = 18;
            _context2.t1 = _context2["catch"](8);
            _didIteratorError = true;
            _iteratorError = _context2.t1;
  
          case 22:
            _context2.prev = 22;
            _context2.prev = 23;
  
            if (!_iteratorNormalCompletion && _iterator.return != null) {
              _iterator.return();
            }
  
          case 25:
            _context2.prev = 25;
  
            if (!_didIteratorError) {
              _context2.next = 28;
              break;
            }
  
            throw _iteratorError;
  
          case 28:
            return _context2.finish(25);
  
          case 29:
            return _context2.finish(22);
  
          case 30:
          case "end":
            return _context2.stop();
        }
      }
    }, _marked, this, [[8, 18, 22, 30], [23,, 25, 29]]);
  }