leg

recursive-descent parser generators for C

Install

All systems
curl cmd.cat/leg.sh
Debian Debian
apt-get install peg
Ubuntu
apt-get install peg
Arch Arch Linux
pacman -S peg
image/svg+xml Kali Linux
apt-get install peg
Fedora
dnf install peg
Windows (WSL2)
sudo apt-get update sudo apt-get install peg
OS X
brew install peg
Raspbian
apt-get install peg

peg

recursive-descent parser generators for C

This package provides peg and leg, two utilities that read a Parsing Expression Grammar (PEG) and generate a recursive-descent parser for it. Unlike lex and yacc, peg and leg support unlimited backtracking, provide ordered choice as a means for disambiguation, and can combine scanning (lexical analysis) and parsing (syntactic analysis) into a single activity.