cpp-peglib

Header-only PEG parsing library for C++ with no runtime dependencies

brewmacoslinux
Try with needOr install directly
Source

About

Header-only PEG (Parsing Expression Grammars) library for C++

Commands

cpp-peglib

Examples

Include the library in a C++ project to define a grammar$ g++ -std=c++17 -I$(brew --prefix cpp-peglib)/include main.cpp -o parser
Use PEG grammar to parse mathematical expressions$ cat > grammar.peg << 'EOF' Expression <- Number ('+' Number)* Number <- [0-9]+ EOF
Verify installation and check header location$ ls $(brew --prefix cpp-peglib)/include/peglib.h