The unparser can beautify code (or not) by inserting (or not inserting) indentation into the source to show the outline of execution blocks. It can also fully-parenthesize all expressions, or only parenthesize the expressions that are required due to operator precedence.
The unparser's interface is:
string *program; mixed *ast; int full_parens, do_indent; program = UNPARSER->main(ast, full_parens, do_indent);The unparser returns an array of strings containing the source program.
No intentional errors are ever generated by the parser. Unfortunately it has happened that the source code returned from the unparser is not semantically correct, due to parenthesization problems. As far as it is known, all of these problems have been corrected.