python script for outputting AST