added ASTPrinter and fixed bug in Parser