If it's a Java AST, you can use the existing JavaEmitter code. I have a version that uses Java to walk the AST, and Terence has one that uses an ANTLR treewalker...take your pick. Both are available under "File Sharing" at antlr.org. Andy