Ross ROSS = Recommend OSS · open-source software intelligence for agents

kach/nearley

📜🔜🌲 Simple, fast, powerful parser toolkit for JavaScript. observed · 2026-08-28

github.com/kach/nearley · homepage · JavaScript · MIT (permissive) observed · 2026-08-28

Health v2 · maintenance only

23/100

  • Activity 0
  • Release rhythm 8
  • Longevity 100
How is this computed?

round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.

  • gap_med: n/a
  • age_days: 4574
  • days_rel: n/a
  • days_push: 658
  • n_releases_24m: 0

Full methodology

Adoption not part of the score

3742 stars · 235 forks observed · 2026-08-28

What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded

nearley is a JavaScript parser toolkit built on the Earley parsing algorithm, consisting of a BNF-based grammar DSL compiler and a lightweight streaming parser runtime. It handles any context-free grammar including left-recursive and ambiguous ones, works in Node.js and browsers, and ships with tooling for testing, unparser-based fuzzing, and railroad diagram generation.

Use cases

  • parse a custom DSL or configuration file format in JavaScript
  • build a compiler frontend for a programming language
  • parse file formats that PEG.js or Jison choke on, like left-recursive grammars
  • handle ambiguous grammars and get all possible parse trees
  • write a streaming parser for a REPL that consumes input incrementally
  • generate railroad diagrams to document a grammar
  • generate random valid strings from a grammar for fuzz testing
  • teach or study parsing algorithms and computational linguistics

When to choose

  • you need to parse arbitrary or ambiguous context-free grammars, including left recursion
  • you want a streaming parser with graceful error handling in Node or the browser
  • you need all possible parsings for an ambiguous grammar
  • you want tooling like fuzzers, railroad diagrams, and grammar tests out of the box
  • you're building a DSL, markup language, or small language compiler in JavaScript

When to avoid

  • you need maximum parsing speed on simple LL(k) grammars where hand-written or PEG parsers are faster
  • you want automatic AST generation with minimal boilerplate rather than writing postprocessors
  • you're parsing a well-known format like JSON where a dedicated parser is simpler
  • you need parser combinators or a runtime grammar-construction API instead of a compiled grammar file

Facets

library · maturity stable

parser compiler developer-tools parsers programming-languages developer-tools browser cross-platform earley-algorithm parser-generator grammar-dsl streaming-parser ambiguous-grammars lexer-integration railroad-diagrams fuzzing scannerless-parsing natural-language-processing nodejs javascript

10 sources

Member repositories

RepositoryRoleHealth v2
kach/nearleymain23

For agents

markdown · JSON · MCP: product_card(name="kach/nearley")

Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem