1 6 package tests.jfun.parsec.rfc822; 7 8 import jfun.parsec.FromString; 9 import jfun.parsec.Map; 10 import jfun.parsec.Map2; 11 12 17 public final class Utils { 18 static final FromString id = new FromString(){ 19 public Object fromString(int from, int len, final String w){ 20 return w; 21 } 22 }; 23 static final Map2 concat = new Map2(){ 24 public Object map(final Object o1, final Object o2){ 25 return o1.toString() + o2.toString(); 26 } 27 }; 28 static final Map to_string = new Map(){ 29 public Object map(Object o){return o.toString();} 30 }; 31 } 32 | Popular Tags |