Tokenizer for script parsing