if (!buffer)
output.flush();
}
+ private void doindent() {
+ for (int i = 0; i < indent; i++) {
+ output.print(" ");
+ }
+ }
void println(String s) {
if (buffer)
buffered.append(s+"\n");
//Print out declarations
for(Iterator it=vartable.keySet().iterator();it.hasNext();) {
String var=(String)it.next();
+ doindent();
output.println(((String)vartable.get(var))+" "+var+";");
}
output.print(buffered.toString());
craux.outputline(relation.getSafeSymbol() + "_hashinv = noargallocateSimpleHash();");
}
}
-
+ craux.outputline("return thisvar;");
craux.endblock();
crhead.outputline("};");
craux.outputline("void free"+name+"(struct "+ name +"* thisvar)");
crhead.outputline("void doanalysis(struct "+name+"_state *);");
craux.outputline("void doanalysis(struct "+name+"_state * thisvar)");
craux.startblock();
+ craux.outputline("int highmark;"); /* This declaration is special...need it to be first */
craux.startBuffer();
+
if (Compiler.TIME) {
craux.outputline("struct timeval _begin_time,_end_time;");
craux.outputline("gettimeofday(&_begin_time,NULL);");
craux.outputline("rebuildcount=0;");
craux.outputline("abstractcount=0;");
}
- craux.addDeclaration("int","highmark");
+
craux.addDeclaration("struct "+name+ " * ",oldmodel.getSafeSymbol());
craux.outputline(oldmodel.getSafeSymbol()+"=0;");