if (o.length <= 1) return o;
Object[] ret = new Object[o.length * 2 - 1];
for(int i=0; i<o.length; i++) {
- ret[i*2] = o[i];
+ Object oi = o[i];
+ //if (oi instanceof Rep) oi = ((Rep)oi).build(new MyDrop(sep));
+ ret[i*2] = oi;
if (i*2+1<ret.length) ret[i*2+1] = new MyDrop(sep);
}
return ret;
if (s instanceof String) s = CharToken.string((String)s);
return new Rep(r, (Element)s, false, false);
}
+ public Object _star__slash_(final Element r, Object s) {
+ if (s instanceof String) s = CharToken.string((String)s);
+ return new Rep(r, (Element)s, false, true);
+ }
//public Element _star__slash_(final Element r, Element s) { return Repeat.many0(r, s); }
//public Element _star__star_(final Element r, Element s) { return Repeat.maximal(Repeat.many0(r, s)); }
public Object _plus__plus_(final Element r) { return new Rep(r, null, true, false); }