how to write a scripting language