lpeg
« Back to VersTracker
Description:
Parsing Expression Grammars For Lua
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: parsing lua peg grammar text-processing parser-generator
Install: brew install lpeg
About:
Lpeg is a powerful pattern-matching library for Lua that implements Parsing Expression Grammars (PEGs). It allows developers to define complex text parsing rules using a clean, concise syntax that integrates seamlessly with Lua code. Unlike traditional regex, Lpeg provides superior composability and avoids many common pitfalls of regular expressions.
Key Features:
  • Parsing Expression Grammar (PEG) implementation
  • Composable pattern matching primitives
  • Direct integration with Lua tables and functions
  • High performance with memoization support
Use Cases:
  • Building custom parsers and compilers
  • Parsing and processing configuration files
  • Implementing domain-specific languages (DSLs)
  • Text processing and data extraction
Alternatives:
  • re – Lpeg's regex-like wrapper, less powerful than native Lpeg syntax
  • LPegLabel – Lpeg extension with labeled failures for better error reporting
Version History
Detected Version Rev Change Commit
Mar 6, 2026 4:24am 2 REVISION_ONLY 095386c7
Mar 4, 2026 2:16am 1 REVISION_ONLY 084ac4d4
May 14, 2023 9:50pm 0 VERSION_BUMP fb2ed68e
May 14, 2023 4:25pm 0 VERSION_BUMP bc56749c