Split Lexer::lex into lex and lexWithCustomLexer.