# pointlander/peg

Peg, Parsing Expression Grammar, is an implementation of a Packrat parser generator.

Repository: https://github.com/pointlander/peg
Canonical: https://ross.abutalabs.com/products/peg
Language: Go
License: BSD-3-Clause
License Family: permissive
Last push: 2026-05-24T22:49:47+00:00

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

## Adoption (not part of the score)
Stars 1116, forks 123 (observed 2026-08-28T04:03:38.475541+00:00)

## What it is
Peg is a Packrat parser generator for Parsing Expression Grammars (PEG), written in Go. It compiles .peg grammar files into Go source code via go:generate, supporting backtracking and negative look-ahead beyond regular expressions.

## Use cases
- generate a parser from a PEG grammar in Go
- parse a custom DSL or config file format
- build a recursive descent parser with backtracking
- replace regex-based parsing with a real grammar
- integrate grammar-based parsing into a Go build with go:generate

## When to choose
- you need a parser in Go with backtracking and look-ahead
- you want grammar definitions compiled to plain Go code
- you prefer Packrat memoization for deterministic parsing

## When to avoid
- you need LR/LALR-style parsing or ambiguous grammar support
- you are not working in Go
- you need runtime-modifiable grammars rather than generated code

## Facets
- artifact type: cli-tool
- maturity: active
- function: parser, compiler, developer-tools
- domain: parsers, programming-languages, developer-tools
- platform: go, cli, cross-platform
- tags: parsing-expression-grammar, packrat-parser, parser-generator, code-generation, go-generate

## Member repositories
- pointlander/peg (main) score 70

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:38.475541+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-30T06:41:59.335987+00:00, confidence not recorded.
  - readme: https://github.com/pointlander/peg (fetched 2026-08-28T04:03:38.475541+00:00, sha 0a4507ec2ff5)
- Data as of 2026-08-30T08:39:29.467469+00:00.
