A simple DFA regex engine used for lexing