ImHex-Patterns
ImHex-Patterns copied to clipboard
Hexpat2c
Is there already a hexpat to c/cpp compiler? Would be nice so that any pattern/parser can be integrated into existing projects natively
I don't see how it would be possible to write such a thing. Pattern language is dynamic by nature and allows constructs like
struct A {
u8 a;
if (a>127)
u8 b;
else
u16 b;
};
that just cannot be turned into c++ easily. More complex constructs make what you suggest impossible imo