checkpoint
[sbp.git] / src / edu / berkeley / sbp / misc / CharToken.java
index 93ae7bb..e73ccdd 100644 (file)
@@ -50,6 +50,8 @@ public class CharToken implements Token, IntegerTopology.IntegerMappable {
         return new CharRange(new IntegerTopology<CharToken>(new Range.Set(new Range((int)start, (int)end)).complement().intersect(all)));
     }
 
+    public static final CharToken left  = new CharToken((char)-3, 0, 0);
+    public static final CharToken right = new CharToken((char)-4, 0, 0);
     public static final Atom leftBrace  = new Atom(new IntegerTopology<CharToken>(-3)) { public String toString() { return "{"; } };
     public static final Atom rightBrace = new Atom(new IntegerTopology<CharToken>(-4)) { public String toString() { return "}"; } };
 
@@ -89,7 +91,7 @@ public class CharToken implements Token, IntegerTopology.IntegerMappable {
 
     public final char c;
     public final Location location;
-    CharToken(char c, int line, int col)   { this(c, new CartesianLocation(line, col)); }
+    public CharToken(char c, int line, int col)   { this(c, new CartesianLocation(line, col)); }
     private CharToken(char c, Location loc)        { this.c = c; this.location = loc; }
     public String result()                         { return c+""; }
     public Location getLocation()                  { return location; }