>>106005608
>you'll likely end up with a DFA
charclasses are implemented very easily with bitvectors.
uint32_t charclass[32] = {0};
// make the charclass
uint8_t c = ...;
if (charclass[ c >> 3 ] & (1 << (c & 7)))
{
// character is in the charclass
}

some regex engines also use a 16 byte bitvectors when the charclass characters are all ascii