Overview of nearley parsing toolkit
masternearley is a fast, modular parsing toolkit for JavaScript that works in both Node.js and the browser. It uses the Earley parsing algorithm, which allows it to handle any grammar defined in BNF, including left-recursive grammars that typically cause other parser generators (like PEGjs or Jison) to fail.
Key features include:
- Streaming parsing: Supports streaming input.
- Error handling: Graceful error catching.
- Ambiguity support: Provides all possible parsings for ambiguous grammars.
- Lexer compatibility: Works with various lexers (the
moolexer is recommended). - Tooling: Includes tools for creating tests, railroad diagrams, and fuzzers.