Basic template tokenizer.