Create an empty list new lexer
Prepare for lexing. Returns the start position (end position of last valid token), and a lexing function that will append at most one token to the history at each call.