Implement a part of lexer.