lib/ll1/_parse_lazy.js
function _parse_lazy(eof, productions, table, rule, tape, nonterminal, production) {
  var shallow_materialize =
  /*#__PURE__*/
  function () {
    var _ref = _asyncToGenerator(
    /*#__PURE__*/
    regeneratorRuntime.mark(function _callee(expected) {
      return regeneratorRuntime.wrap(function _callee$(_context) {
        while (1) {
          switch (_context.prev = _context.next) {
            case 0:
              _context.next = 2;
              return (0, _children_next_lazy2.default)(eof, productions, table, tape, expected);

            case 2:
              return _context.abrupt("return", _context.sent);

            case 3:
            case "end":
              return _context.stop();
          }
        }
      }, _callee, this);
    }));

    return function shallow_materialize(_x) {
      return _ref.apply(this, arguments);
    };
  }();

  var iterator = (0, _ast.rmap)(shallow_materialize, rule)[Symbol.asyncIterator]();
  return {
    'type': 'node',
    nonterminal: nonterminal,
    production: production,
    children: new _ast.Children(iterator, rule.length)
  };
}
function _parse_lazy(eof, productions, table, rule, tape, nonterminal, production) {
  var shallow_materialize =
  /*#__PURE__*/
  function () {
    var _ref = _asyncToGenerator(
    /*#__PURE__*/
    regeneratorRuntime.mark(function _callee(expected) {
      return regeneratorRuntime.wrap(function _callee$(_context) {
        while (1) {
          switch (_context.prev = _context.next) {
            case 0:
              _context.next = 2;
              return (0, _children_next_lazy2.default)(eof, productions, table, tape, expected);

            case 2:
              return _context.abrupt("return", _context.sent);

            case 3:
            case "end":
              return _context.stop();
          }
        }
      }, _callee, this);
    }));

    return function shallow_materialize(_x) {
      return _ref.apply(this, arguments);
    };
  }();

  var iterator = (0, _ast.rmap)(shallow_materialize, rule)[Symbol.asyncIterator]();
  return {
    'type': 'node',
    nonterminal: nonterminal,
    production: production,
    children: new _ast.Children(iterator, rule.length)
  };
}
function _parse_lazy ( eof , productions , table , rule , tape , nonterminal , production ) { var shallow_materialize = /*#__PURE__*/ function ( ) { var _ref = _asyncToGenerator ( /*#__PURE__*/ regeneratorRuntime . mark ( function _callee ( expected ) { return regeneratorRuntime . wrap ( function _callee$ ( _context ) { while ( 1 ) { switch ( _context . prev = _context . next ) { case 0 : _context . next = 2 ; return ( 0 , _children_next_lazy2 . default ) ( eof , productions , table , tape , expected ) ; case 2 : return _context . abrupt ( "return" , _context . sent ) ; case 3 : case "end" : return _context . stop ( ) ; } } } , _callee , this ) ; } ) ) ; return function shallow_materialize ( _x ) { return _ref . apply ( this , arguments ) ; } ; } ( ) ; var iterator = ( 0 , _ast . rmap ) ( shallow_materialize , rule ) [ Symbol . asyncIterator ] ( ) ; return { 'type' : 'node' , nonterminal : nonterminal , production : production , children : new _ast . Children ( iterator , rule . length ) } ; }
Table-driven predictive lazy parsing.

@param {Object} eof - The end-of-file symbol.
@param {Map} productions - The ll1 productions.
@param {Map} table - The symbol table.
@param {Array} rule - The production rule in use.
@param {Tape} tape - The tape from which to read the symbols from.
@param {String} nonterminal - The nonterminal that produced `rule`.
@param {String} production - The production that corresponds to `rule`.
@returns {Object} The root node of the parsed tree.
Table - driven predictive lazy parsing .