Implemented lexer.