From asimeqi@ccs.neu.edu Tue Nov 28 21:47:18 2000 Date: Tue, 28 Nov 2000 21:46:37 -0500 (EST) From: Artan Simeqi To: Doug Orleans Subject: Problem with PrintVisitor I have another problem, this time in DemeterJ. I am looking at the cd for Java written by Binoy Samuel some years ago, and trying to put the options for pretty printing. The piece of the code is this: ConstructorDeclaration = [ConstructorModifier] Identifier FormalParameters ["throws" NameList] *s "{" *l+ [*lookahead*(@_ExplicitConstructorInvocation()@) ExplicitConstructorInvocation] BlockStatements - "}" . The generated PrintVisitor Code is: public void after_namelist(ConstructorDeclaration source, NameList dest) { out.print(" "); needSpace = false; out.print("{"); needSpace = false; out.println(); for (int i = 0; i < indent; i++) out.print("\t"); needSpace = false; out.print("\t"); indent++; needSpace = false; } Obviously this is an edge method that will be called only if the constructor "throws" something. How can we force it to print always. Ok. Mail not sent. Problem solved. Added _Nothing before *s "{".