A basic lexer toolkit