I\'m currently working on a scanner generator. The generator already works fine. But when using character classes the algorithm gets very slow.
The scanner generator pr
In this library (http://mtimmerm.github.io/dfalex/) I do it by putting a range of consecutive characters on each transition, instead of single characters. This is carried through all the steps of NFA constuction, NFA->DFA conversion, DFA minimization, and optimization.
It's quite compact, but it adds code complexity to every step.