- // FIXME: doesn't this require a tag?
- private class BracedNode extends ElementNode {
- public Seq body;
- public BracedNode(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);
- Union u2 = new Union(null, false);
- u2.add(Sequence.create(new Element[] {
- CharAtom.leftBrace,
- u,
- CharAtom.rightBrace
- }, 1));
- return u2;
- }
- }
-
- public Seq and2(Seq s, Seq a) { a.alwaysDrop = true; return s.and(a); }
- public Seq andnot2(Seq s, Seq a) { a.alwaysDrop = true; return s.andnot(a); }
-