const nearley = require('nearley');
const grammar = require('./grammar/grammar');
const parser = new nearley.Parser(nearley.Grammar.fromCompiled(grammar));

module.exports = function parse(input) {
  return parser.feed(input);
}

const nearley = require('nearley');
const grammar = require('./grammar/grammar');

module.exports = function parse(input) {
  const parser = new nearley.Parser(nearley.Grammar.fromCompiled(grammar));
  return parser.feed(input).finish().results[0];
};

Fix issue with sharing states between different parsings
Fix issue with sharing states between different parsings
