add scripts for tree drawing and code generation