# pegjs/pegjs

PEG.js: Parser generator for JavaScript

Repository: https://github.com/pegjs/pegjs
Canonical: https://ross.abutalabs.com/products/pegjs
Homepage: https://pegjs.org/
Language: JavaScript
License: MIT
License Family: permissive
Topics: pegjs, peg, javascript, parser-generator
Last push: 2021-11-08T18:35:39+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 5990, "days_push": 1759, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4903, forks 418 (observed 2026-08-28T04:09:02.144962+00:00)

## What it is
PEG.js is a parser generator for JavaScript that compiles PEG grammars into fast parsers with excellent error reporting. It is used to build interpreters, compilers, transformers, and tools that process structured data or computer languages.

## Use cases
- generate a parser from a grammar in javascript
- build a dsl interpreter in node
- parse custom config or query languages
- write a compiler frontend in javascript
- parse structured text with good error messages

## When to choose
- you want to define a grammar in PEG notation and generate a JavaScript parser
- you need clear error reporting for syntax errors
- you're building interpreters, transformers, or compilers in JS

## When to avoid
- you need a parser for an existing standard format with a maintained library
- you need active development or compatibility guarantees before 1.0
- you need runtime grammar modification rather than generated code

## Facets
- artifact type: library
- maturity: maintenance
- function: parser, compiler, developer-tools
- domain: parsers, programming-languages, developer-tools
- platform: browser
- tags: parser-generator, peg-grammar, dsl, code-generation, javascript, nodejs

## Member repositories
- pegjs/pegjs (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:02.144962+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-29T18:18:07.897167+00:00, confidence not recorded.
  - readme: https://github.com/pegjs/pegjs (fetched 2026-08-28T04:09:02.144962+00:00, sha 8bb156b14f86)
  - registry_npm: https://registry.npmjs.org/pegjs (fetched 2026-08-29T09:00:37.403108+00:00, sha 3386ab9ddc31)
- Data as of 2026-08-30T08:39:29.467469+00:00.
