+
+ public static class Region<Loc extends Location> /* implements Topology<Location<Tok>> */ {
+ public final Loc start;
+ public final Loc end;
+ public Region(Loc a, Loc b) {
+ switch(a.compareTo(b)) {
+ case -1:
+ case 0: start=a; end=b; return;
+ case 1: start=b; end=a; return;
+ default: throw new Error("impossible");
+ }
+ }
+ }