Ability to provide own encoding #192
-
Currently lexy has static assertions that only allow predefined encodings. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Well, now I'm unsure if this exact feature is needed, maybe there's a better solution for my use case? Pseudo-code: struct production
{
static constexpr auto rule = []
{
return lexy::bytes<2>.range(65534, 65535);
}
} I want to read 2 bytes and validate that they are in the allowed range. Yes, it's possible to validate each byte, but this is unwanted :) |
Beta Was this translation helpful? Give feedback.
-
Custom encodings aren't supported, and I don't plan on supporting them. An input that consists of 2 byte words is still a byte input, you just want rules that read two bytes at a time. |
Beta Was this translation helpful? Give feedback.
Custom encodings aren't supported, and I don't plan on supporting them. An input that consists of 2 byte words is still a byte input, you just want rules that read two bytes at a time.