# alecthomas/participle

A parser library for Go

Repository: https://github.com/alecthomas/participle
Canonical: https://ross.abutalabs.com/products/participle
Language: Go
License: MIT
License Family: permissive
Topics: go, parser, lexer, grammar, ast, parser-library, parser-framework, parser-api, golang, ebnf, participle
Last push: 2026-08-26T14:11:36+00:00

## Health v2 (maintenance only)
Score: 79/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 40, longevity 100
- inputs: {"age_days": 3718, "days_push": 7, "days_rel": 528, "gap_med": 3.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3878, forks 212 (observed 2026-08-28T04:08:27.944788+00:00)

## What it is
Participle is a parser and lexer library for Go that lets you define grammars declaratively using annotated Go struct tags, similar in style to encoding/json. It supports EBNF-style grammar syntax, custom lexers, union types, and detailed error reporting.

## Use cases
- parse a custom config file format in Go
- build a DSL parser in Go
- write a lexer and parser for a small language
- parse structured text into Go structs
- generate an AST from source text in Go
- implement an ini or expression parser

## When to choose
- you want idiomatic Go parsers defined via struct tags without code generation
- you need a lightweight parser library with good error reporting
- you are parsing a small-to-medium DSL or structured text format

## When to avoid
- you need extremely high-performance parsing of huge inputs
- you need a full production-grade compiler frontend with advanced grammar features
- your grammar requires features outside Participle's limitations, such as complex context-sensitive parsing

## Facets
- artifact type: library
- maturity: stable
- function: parser, developer-tools
- domain: parsers, developer-tools, programming-languages
- platform: go, cross-platform
- tags: lexer, grammar, ebnf, ast, struct-tags, parser-combinator

## Member repositories
- alecthomas/participle (main) score 79

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:27.944788+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:25:44.479557+00:00, confidence not recorded.
  - readme: https://github.com/alecthomas/participle (fetched 2026-08-28T04:08:27.944788+00:00, sha 0c7f10e76998)
- Data as of 2026-08-30T08:39:29.467469+00:00.
