pegtl

C++ library for parsing with Parsing Expression Grammars

brewmacoslinux
Try with needOr install directly
Source

About

Parsing Expression Grammar Template Library

Commands

pegtl

Examples

Include PEGTL headers in a C++ project to define grammar rules$ #include <tao/pegtl.hpp> using namespace tao::pegtl;
Define a simple grammar rule for parsing integers$ struct number : tao::pegtl::seq<tao::pegtl::digit, tao::pegtl::star<tao::pegtl::digit>> {};
Parse input string against defined grammar and handle results$ tao::pegtl::string_input<> input("12345", "example"); tao::pegtl::parse<number>(input);