Implement character lexing primitives