What is function of lexical analyzer in compiler design?

recognises tokens from the input stream and return them to the parser