Some code to generate quick lookup for XML character classes