X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fsbp%2FToken.java;h=551ee6d3c34d25bc801922fd43f36c3160164f53;hp=196f5cacdec082d01b3f88b33c4fa3cfaa627f03;hb=08aa6cdd07a882fdedf7a6d5c7bd0d754460965b;hpb=0a0227b9180534d2a431f3d6e08a398bde2244c4
diff --git a/src/edu/berkeley/sbp/Token.java b/src/edu/berkeley/sbp/Token.java
index 196f5ca..551ee6d 100644
--- a/src/edu/berkeley/sbp/Token.java
+++ b/src/edu/berkeley/sbp/Token.java
@@ -10,25 +10,19 @@ import edu.berkeley.sbp.*;
/** a token of input -- note that this represents an actual input token rather than an Element which matches a token */
public interface Token {
- // FIXME!!! remove this
- /** converts this Token into a standalone result (ie for a non-rewriting pattern) */
- public String result();
-
/** this is declared abstract as a way of forcing subclasses to provide a thoughtful implementation */
public abstract String toString();
- public abstract Location getLocation();
-
/** a sequence of input tokens; returns null when EOF is reached */
public static interface Stream {
- public T next() throws IOException;
+ public T next(int numstates) throws IOException;
+ public abstract Location getLocation();
}
- /** a location within the input stream */
+ /** a location *between tokens* in the input stream */
public static interface Location {
public String toString();
- public String getContext();
}
-
}
+