# taocpp/PEGTL

Parsing Expression Grammar Template Library

Repository: https://github.com/taocpp/PEGTL
Canonical: https://ross.abutalabs.com/products/pegtl
Language: C++
License: BSL-1.0
License Family: other
Topics: peg, header-only, cpp, parsing, cpp17, cpp11, grammar, parsing-expression-grammars, pegtl, parsing-expression-grammar, parser-combinators
Last push: 2026-08-17T20:22:03+00:00

## Health v2 (maintenance only)
Score: 86/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 64, longevity 100
- inputs: {"age_days": 4271, "days_push": 16, "days_rel": 31, "gap_med": 343.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 2153, forks 247 (observed 2026-08-28T04:06:19.476470+00:00)

## What it is
PEGTL is a zero-dependency, header-only C++ library for building parsers with Parsing Expression Grammars using parser combinators expressed as nested template instantiations. Grammars are written as ordinary C++ code with a comprehensive, extensible set of parser rules.

## Use cases
- parse a custom DSL in C++
- write a parser for a config file format
- build a lexer and parser without external dependencies
- define a grammar as C++ template code
- parse structured text like JSON or INI in C++
- create a compiler frontend parser

## When to choose
- you need a header-only, zero-dependency C++ parsing library
- you want grammars expressed directly as C++ code
- your language fits a PEG (no ambiguous grammars needed)
- you need fine-grained control over parsing actions and error reporting

## When to avoid
- you need ambiguous or context-sensitive parsing beyond PEG capabilities
- you want parser generators that emit standalone code (e.g. yacc/ANTLR style)
- you are not working in C++11 or newer

## Facets
- artifact type: library
- maturity: stable
- function: parser, developer-tools
- domain: parsers, programming-languages, developer-tools
- platform: cpp, cross-platform, windows
- tags: header-only, parser-combinators, parsing-expression-grammar, peg, zero-dependency, template-library, linux, macos, android

## Member repositories
- taocpp/PEGTL (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:19.476470+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-30T02:50:38.571512+00:00, confidence not recorded.
  - readme: https://github.com/taocpp/PEGTL (fetched 2026-08-28T04:06:19.476470+00:00, sha 0362a2a0e08c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
