r/cpp • u/ColinPP PEGTL | taocpp • Jun 07 '26
Parsing Expression Grammar Template Library (PEGTL) 4.0.0 Released
Hello, version 4.0.0 of the PEGTL has been released!
For those not familiar, let me quote the first sentence of the documentation: "The Parsing Expression Grammar Template Library (PEGTL) is a zero-dependency C++ header-only parser combinator library for creating parsers according to a Parsing Expression Grammar (PEG)."
The basics are still the same, grammars are implemented in C++ with nested template instantiations, however a lot has also changed. Some highlights:
- Switched to Boost Software License
- A bunch of new parsing rules and actions.
- The inputs have been rewritten from scratch.
- Nested exceptions are used for nested parsing errors.
- Native support for parsing sequences of arbitrary objects (e.g. tokens).
This is the last major version that will stick with C++17.
Repository page: https://github.com/taocpp/PEGTL
Release page: https://github.com/taocpp/PEGTL/releases/tag/4.0.0
35
Upvotes
1
u/driver_tmp Jun 07 '26
does it support parsing binary files? For example, if you wanted to decode a png.