create_lexer() and create_formatter() have _very_ similar code.
create_lexer() and create_formatter() have very similar code.