XUtils

hammer

Parser combinators for binary formats. [`GNU GPL2.1`](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)


Hammer is a parsing library. Like many modern parsing libraries, it provides a parser combinator interface for writing grammars as inline domain-specific languages, but Hammer also provides a variety of parsing backends. It’s also bit-oriented rather than character-oriented, making it ideal for parsing binary data such as images, network packets, audio, and executables.

Hammer is written in C, but will provide bindings for other languages. If you don’t see a language you’re interested in on the list, just ask.

Hammer currently builds under Linux and OS X. (Windows is coming.)

Build Status

Features

  • Bit-oriented – grammars can include single-bit flags or multi-bit constructs that span character boundaries, with no hassle
  • Thread-safe, reentrant
  • Benchmarking for parsing backends – determine empirically which backend will be most time-efficient for your grammar
  • Parsing backends:
    • Packrat parsing
    • LL(k)
    • GLR
    • LALR
    • Regular expressions
  • Language bindings:
    • C++
    • Java (not currently building; give us a few days)
    • Python
    • Ruby
    • Perl
    • Go
    • PHP
    • .NET

Installing

Prerequisites

  • SCons

Articles

  • coming soon...