Tokenizer doubt

I am not able to understand this implementation , can you provide simpler explanation