Completing lexer implementation