// ** This class was generated with DemFGen (vers:10/11/2008) package gen; import edu.neu.ccs.demeterf.control.Fields; import edu.neu.ccs.demeterf.demfgen.lib.ident; import edu.neu.ccs.demeterf.demfgen.lib.verbatim; import edu.neu.ccs.demeterf.demfgen.lib.*; import edu.neu.ccs.demeterf.*; public class Print extends edu.neu.ccs.demeterf.ID{ public static String PrintM(Object o){ return new edu.neu.ccs.demeterf.Traversal(new Print(),edu.neu.ccs.demeterf.Control.builtins()).traverse(o).toString(); } _LT combine(byte o){ return empty.append(new _S(""+o)); } _LT combine(short o){ return empty.append(new _S(""+o)); } _LT combine(int o){ return empty.append(new _S(""+o)); } _LT combine(long o){ return empty.append(new _S(""+o)); } _LT combine(float o){ return empty.append(new _S(""+o)); } _LT combine(double o){ return empty.append(new _S(""+o)); } _LT combine(char o){ return empty.append(new _S(""+o)); } _LT combine(boolean o){ return empty.append(new _S(""+o)); } _LT combine(String o){ return empty.append(new _S("\""+o+"\"")); } _LT combine(ident o){ return empty.append(new _S(""+o)); } _LT combine(verbatim o){ return empty.append(new _S(""+o)); } static _LT empty = new _LT(); public static class _LT{ edu.neu.ccs.demeterf.demfgen.lib.List<_T> l; public _LT(){ l = new edu.neu.ccs.demeterf.demfgen.lib.Empty<_T>(); } public _LT(edu.neu.ccs.demeterf.demfgen.lib.List<_T> ll){ l = ll; } public _LT push(_T t){ return new _LT(l.push(t)); } public _LT append(_T t){ return new _LT(l.append(t)); } public _LT append(_LT t){ return new _LT(l.append(t.l)); } public String toString(){ return l.fold(new _F(),""); } } public static class _T{} public static class _P extends _T{ public static _P p = new _P(); } public static class _M extends _T{ public static _M m = new _M(); } public static class _N extends _T{ public static _N n = new _N(); } public static class _S extends _T{ public String s; public _S(String ss){s = ss;} } public static class _F extends edu.neu.ccs.demeterf.demfgen.lib.List.Fold<_T,String>{ int idt = 0; public String fold(_T t, String s){ if(t == _P.p)plus(); else if(t == _M.m)minus(); else if(t == _N.n)s += "\n"+indent(); else s += ((_S)t).s; return s; } void plus(){ idt++; } void minus(){ idt--; } String indent(){ return indent(idt); } static String indent(int i){ return (i <= 0)?"":" "+indent(i-1); } } _LT combine(Some _h_, _LT just){ return new _LT().append(just); } _LT combine(None _h_){ return new _LT(); } _LT combine(Cons _h_, _LT first, _LT rest){ return new _LT().append(first).append(rest); } _LT combine(Empty _h_){ return new _LT(); } _LT combine(Entry _h_, _LT key, _LT val){ return new _LT().append(new _S("(")).append(key).append(new _S(" ")).append(new _S("->")).append(new _S(" ")).append(val).append(new _S(")")); } _LT combine(Map _h_, _LT map){ return new _LT().append(new _S("[")).append(new _S(" ")).append(map).append(new _S(" ")).append(new _S("]")); } _LT combine(RED _h_){ return new _LT(); } _LT combine(BLACK _h_){ return new _LT(); } _LT combine(RBNode _h_, _LT color, _LT data, _LT left, _LT right){ return new _LT().append(new _S(" ")).append(color).append(new _S(" ")).append(data).append(new _S(" ")).append(left).append(new _S(" ")).append(right); } _LT combine(RBLeaf _h_){ return new _LT(); } _LT combine(RawMaterial _h_, _LT constraints){ return new _LT().append(constraints); } _LT combine(Constraint _h_, _LT w, _LT r, _LT cs){ return new _LT().append(w).append(r).append(cs).append(_N.n); } _LT combine(Weight _h_, _LT v){ return new _LT().append(v).append(new _S(":")).append(new _S(" ")); } _LT combine(RelationNr _h_, _LT v){ return new _LT().append(v).append(new _S(" ")); } _LT combine(Variable _h_, _LT v){ return new _LT().append(v).append(new _S(" ")); } }