- /** a sequence of input tokens; returns null when EOF is reached */
- public static interface Stream<Tok> {
- public Tok next(int numstates, int resets, int waits) throws IOException;
- public abstract Location getLocation();
- }
+ /** returns the location the input stream is currently at */
+ public Location<Token> getLocation();
+
+ /** <font color=purple>a location (position) in the input stream -- <i>between tokens</i></font> */
+ public static interface Location<Token> extends Comparable<Location> {
+
+ /** return the region between this location and <tt>loc</tt> */
+ public Region<Token> createRegion(Location<Token> loc);