Implement lexer