I'm making a modernized BNF-style metalanguage that supports grammars for text and binary formats, but unless there's some kind of outside review, I won't find any blind spots I have until long after release.
If you have experience in grammars or protocols (text or binary), could you take a quick look?
Note: I'm not aiming for perfect expressivity; just 80-90% of use cases without making things overcomplicated so that it can be used descriptively in documentation.
https://github.com/kstenerud/kbnf/blob/master/kbnf.md
Some examples of it in use:
* Internet Prodocol, version 4: https://github.com/kstenerud/kbnf/blob/master/ipv4.kbnf
* Concise Text Encoding: https://github.com/kstenerud/concise-encoding/blob/master/cte.kbnf
* Concise Binary Encoding: https://github.com/kstenerud/concise-encoding/blob/master/cbe.kbnf
* The KBNF grammar itself: https://github.com/kstenerud/kbnf/blob/master/kbnf.md#the-kbnf-grammar-in-kbnf
part = @bind(number, @uint(8,~)) & @uint(16,~) & number
Because if you are writing the grammar for a language you may have similar constructs.