if (head.equals("Elements")) return seq2((ElementNode[])Reflection.rebuild(walkChildren(t), ElementNode[].class));
if (head.equals("NonTerminalReference")) return new ReferenceNode(stringifyChildren(t.child(0)));
//if (head.equals(")")) return new ReferenceNode(stringifyChildren(t.child(0)));
+ if (head.equals("{")) return new XTree((Seq)walk(t.child(0)));
if (head.equals("::")) return tag((String)walk(t.child(0)), (Seq)walk(t.child(1)));
if (head.equals("++")) return plusmax((ElementNode)walk(t.child(0)));
if (head.equals("+")) return plus((ElementNode)walk(t.child(0)));
}
- /*
- public class XTree extends ElementNode {
- public Seq body;
+ public class XTree extends ElementNode {
+ public Seq body;
+ public XTree(Seq seq) { this.body = seq; }
public Element build(Context cx, NonTerminalNode cnt, boolean dropall) {
Union u = new Union(null, false);
Sequence s = body.build(cx, u, null, dropall);
return u2;
}
}
- */
}