Implements the Lexer