/abnf2peg

Convert ABNF grammars to PEG grammars (sort of)

Primary LanguageDBoost Software License 1.0BSL-1.0

abnf2peg

This is an attempt to make a tool that can convert Augmented Backus-Naur Form (ABNF) grammars to Parsing Expression Grammar (PEG) grammars.

This is written in the D programming language and only converts to the PEG format understood by the Pegged D language module. Not everything is converted.

ABNF grammars are used in a number of RFCs to define communication protocols and some file formats.

How to build

To use, you need a D language compiler and the Dub tool that is used to build and manage D language packages. Just do "dub build" from the root of the project to generate the abnf2peg binary for your platform.

Caveats

  • ABNF prose-val will need hand-editing