Writing the lexer