+ public static abstract class ElementNode {
+ public String getLabel() { return null; }
+ public String getOwnerTag() { return null; }
+ public boolean drop() { return false; }
+ public Atom toAtom(Context cx) { throw new Error("can't convert a " + this.getClass().getName() + " to an atom"); }
+ public abstract Element build(Context cx, NonTerminalNode cnt);
+ }
+
+ public static abstract class ElementNodeWrapper extends ElementNode {
+ protected ElementNode _e;
+ public ElementNodeWrapper(ElementNode e) { this._e = e; }
+ public String getLabel() { return _e.getLabel(); }
+ public String getOwnerTag() { return _e.getOwnerTag(); }
+ public boolean drop() { return _e.drop(); }
+ public Atom toAtom(Context cx) { return _e.toAtom(cx); }
+ public Element build(Context cx, NonTerminalNode cnt) { return _e.build(cx, cnt); }
+ }
+