+// Copyright 2006 all rights reserved; see LICENSE file for BSD-style license
+
package edu.berkeley.sbp.chr;
import java.io.*;
import java.util.*;
public static final char left = (char)9998;
public static final char right = (char)9999;
- public static final Atom leftBrace = new CharAtom(left,left) { public String toString() { return "[{]"; } };
- public static final Atom rightBrace = new CharAtom(right,right) { public String toString() { return "[}]"; } };
- public static final Atom braces = new CharAtom(left,right) { public String toString() { return "[{}]"; } };
+ public static final Atom leftBrace = new CharAtom(left,left) { public String toString() { return "\\{"; } };
+ public static final Atom rightBrace = new CharAtom(right,right) { public String toString() { return "\\}"; } };
+ public static final Atom braces = new CharAtom(left,right) { public String toString() { return "[\\{\\}]"; } };
public static Atom set(Range.Set r) { return new CharAtom(new CharTopology(r)); }
-
public String toString() { return t.toString(); }
/** returns an element which exactly matches the string given */
public String toString() { return escapified; } };
Element[] refs = new Element[s.length()];
for(int i=0; i<refs.length; i++) refs[i] = new CharAtom(s.charAt(i));
- ret2.add(Sequence.constant(refs, s));
+ ret2.add(Sequence.create(refs, s));
ret = ret2;
}
return ret;
}
private static Union epsilon = new Union("()");
- static { epsilon.add(Sequence.empty); }
+ static { epsilon.add(Sequence.create()); }
public Topology<Atom<Character>> unwrap() { return this; }
public Topology<Atom<Character>> empty() { return new CharAtom(); }
- public Topology<Character> underlying() { return top(); }
+ public Topology<Character> getTokenTopology() { return top(); }
public boolean contains(Atom<Character> v) { return top().containsAll(((CharAtom)v).top()); }
public boolean disjoint(Topology<Atom<Character>> t) { return top().disjoint(((CharAtom)t).top()); }