further work on ASTGenerator