UpstandingHackers / hammer

Parser combinators for binary formats, in C. Yes, in C. What? Don't look at me like that.
GNU General Public License v2.0
430 stars 40 forks source link

Bit constant fields #117

Open mrdomino opened 9 years ago

mrdomino commented 9 years ago

This can be hacked around with validations, but obviously results in grammars that don't appear context-free as far as hammer can tell when they otherwise might be. Syntax like h_bits_const(4, 0xa) would be desirable.

At the moment, this appears to be blocking compilation of grammars that make use of bit constants with any backends other than packrat.

mrdomino commented 9 years ago

h_one and h_zero would be desirable special cases of this.