cpp-peglib
« Back to VersTracker
Description:
Header-only PEG (Parsing Expression Grammars) library for C++
Type: Formula  |  Latest Version: 1.9.1@0  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: c++ parsing parser-generator peg header-only
Install: brew install cpp-peglib
About:
cpp-peglib is a header-only C++ library that provides a PEG (Parsing Expression Grammar) parser generator. It allows developers to define grammars directly in C++ code, enabling the creation of parsers without external build steps. Its main value proposition is delivering powerful parsing capabilities with minimal dependencies and straightforward integration.
Key Features:
  • Header-only library for easy integration
  • Grammar definition directly in C++
  • Supports semantic actions and error recovery
  • Zero dependencies beyond the C++ standard library
Use Cases:
  • Implementing domain-specific languages (DSLs)
  • Parsing configuration files or data formats
  • Building language interpreters or compilers
  • Protocol message parsing
Alternatives:
  • Boost.Spirit – More comprehensive but heavier dependency and steeper learning curve.
  • ANTLR – Requires separate code generation step and runtime library.
License: MIT
Bottles available for: arm64_tahoe, arm64_sequoia, arm64_sonoma, arm64_ventura, sonoma, ventura, arm64_linux, x86_64_linux
Version History
Detected Version Rev Change Commit
Sep 14, 2025 2:30am 0 VERSION_BUMP 4f836c41