nearley Parser Toolkit

JSON →
library 2.20.1 ·javascript
verified May 27, 2026

nearley is a comprehensive parsing toolkit for JavaScript that enables developers to define and parse custom languages. It utilizes the Earley parsing algorithm, making it capable of handling any context-free grammar, including notoriously difficult cases like left recursion, which often trip up other parser generators like PEG.js or Jison. The current stable version is 2.20.1, with releases synchronized to Zenodo for academic citation. Key differentiators include its streaming capabilities, graceful error handling, support for ambiguous grammars by providing all possible parsings, and compatibility with various lexers (e.g., moo). It also provides a robust toolchain for testing, railroad diagrams, and fuzzers, and works seamlessly in both Node.js and browser environments.

total hits 23
actors 7 distinct systems
last hit 9h ago human
MetaBot
4
GPTBot
2
Script
2
ClaudeBot
1
Search engines
1
Humans
2

top countries 🇨🇦 Canada · 🇺🇸 United States · 🇮🇳 India · 🇬🇧 United Kingdom · 🇩🇪 Germany