GithubHelp home page GithubHelp logo

mpw / nail Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jbangert/nail

0.0 2.0 0.0 25.07 MB

A practical interface generator for data formats.

License: MIT License

Makefile 0.20% C++ 6.78% C 15.49% Shell 0.12% Roff 0.01% Haskell 0.09% Yacc 0.17% TeX 71.30% Perl 0.06% Python 5.26% HTML 0.51% Ruby 0.01%

nail's Introduction

Nail

\textit{Nail} is an interface generator that allows programmers to safely parse and generate protocols defined by a Parser-Expression based grammar. Nail also provides solutions for parsing common patterns such as length and offset fields within binary formats that are hard to process with existing parser generators.

Installation & Pre-requisites

The code generator (in /generator/) requires a C++ compiler and depends on boost. The code generator can either be invoked as ./nail foo.nail , which case it will emit C++ code (in foo.nail.cc and foo.nail.hh) , or as ./cnail foo.nail in which case it will emit a two-pass parser in C (in foo.nail.c and foo.nail.h) . Generated code has no dependencies (and does not even use the C++ or C standard library). longjmp.h/setjmp.h is used for handling out of memory errors.

Examples

Several examples are provided, pull requests for more are very welcome!

  • /dns - DNS server and resolver implemented in C. Used for older benchmarks
  • /dns_cpp - DNS server implemented in C++, used for newer benchmarks
  • /zip - ZIP extractor,compressor in C.
  • /protozip - Simplified 'pretend' zip, easier to grok
  • /utf16 - mini grammar for UTF-16 -- good starting point

Network stack

Nail has a (very prototype-y) network stack. Find it in /network/. The network stack depends on boost and (soon) Intel TBB and DPDK .

nail's People

Contributors

jbangert avatar zeldovich avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.