Hi All, I got a bit tangled up with compiling the if-then-else blocks (the past two days of debugging ended up resolving to a couple of fixes and one typo that was causing the biggest problems). With the else block compiling now in place, the infrastructure is already laid out to do elseif's and it should be quite simple. (Very excited about this!). I've pasted in below a small python script I've been using that if you run csound with --new-parser and redirect text output to a file called out.txt, this script will find the AST as xml in its intial state and the printout from after doing expansion (where the tree gets rewritten to translate if-then's to simple if's and labels and where expressions are move out and up from args) and put them into two xml files. This is pretty handy if you want to see what's going on with the tree structure before and after expansion. Thanks! steven # python script to extract AST's from output f = open("out.txt", "r") mode = 0 astInitial = "" astExpanded = "" for line in f: if mode == 0: if line.startswith("AST - INITIAL"): mode = 1 elif line.startswith("AST - AFTER EXPANSION"): mode = 2 elif mode == 1: if line.startswith("Printing"): continue astInitial += line if line.startswith(""): mode = 0 elif mode == 2: if line.startswith("Printing"): continue astExpanded += line if line.startswith(""): mode = 0 f.close() finitial = open("ast_initial.xml", "w") finitial.write(astInitial) finitial.flush() finitial.close() fexpanded = open("ast_expanded.xml", "w") fexpanded.write(astExpanded) fexpanded.flush() fexpanded.close() ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net