Some question is close to origin: what tools exist for generating binary parsers, with the feel like parser generators works over grammar definitions (flex/ragel/antlr/..)?
I mean some tool generates Nim (or better ANSI C) code driven by the declarative binary format specification down to the level of a single bit, arbitrary-length bit fields, and byte-order variants? Maybe someone can advise me some lite tutorial how such alike parsers works, and how to implement binary DCG grammar parser ro code generator in Nim? (the best one is an infinite stream parser variant with error correction) [https://en.wikipedia.org/wiki/Definite_clause_grammar](https://en.wikipedia.org/wiki/Definite_clause_grammar)
