# ohmjs/ohm

A library and language for building parsers, interpreters, compilers, etc.

Repository: https://github.com/ohmjs/ohm
Canonical: https://ross.abutalabs.com/products/ohm
Language: JavaScript
License: MIT
License Family: permissive
Topics: parsing, peg, grammars, parser, javascript, typescript, compiler
Last push: 2026-06-19T06:06:39+00:00

## Health v2 (maintenance only)
Score: 80/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 88, release rhythm 58, longevity 100
- inputs: {"age_days": 4122, "days_push": 75, "days_rel": 200, "gap_med": 53, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5543, forks 226 (observed 2026-08-28T04:09:22.224076+00:00)

## What it is
Ohm is a parsing toolkit consisting of a JavaScript library and a domain-specific language based on parsing expression grammars (PEGs). It is used to build parsers, interpreters, and compilers for custom file formats and programming languages.

## Use cases
- parse a custom file format in JavaScript
- build a DSL with a parser and interpreter
- create a programming language compiler
- define grammars with left-recursive rules
- prototype language syntax with an online grammar editor
- separate grammar definitions from semantic actions

## When to choose
- you need a parser for a custom language or file format in JavaScript/TypeScript
- you want modular separation of grammars and semantic actions
- you need natural support for left-recursive and left-associative rules
- you want to iteratively develop grammars with visual feedback

## When to avoid
- you need a parser in a language other than JavaScript
- you only need simple regex-based text matching
- you need maximum parsing performance for huge inputs

## Facets
- artifact type: library
- maturity: active
- function: parser, compiler, interpreter, programming-language
- domain: parsers, programming-languages, developer-tools, compilers
- platform: browser
- tags: peg, grammars, parsing-toolkit, dsl, semantic-actions, left-recursion, javascript, nodejs, typescript

## Member repositories
- ohmjs/ohm (main) score 80

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:22.224076+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:55:41.622502+00:00, confidence not recorded.
  - readme: https://github.com/ohmjs/ohm (fetched 2026-08-28T04:09:22.224076+00:00, sha 18d0d9bb7eab)
- Data as of 2026-08-30T08:39:29.467469+00:00.
