checkpoint
[sbp.git] / src / edu / berkeley / sbp / Input.java
1 package edu.berkeley.sbp;
2 import java.io.*;
3 import java.util.*;
4 import java.lang.reflect.*;
5 import java.lang.ref.*;
6 import edu.berkeley.sbp.*;
7 import edu.berkeley.sbp.util.*;
8
9 /** a stream of tokens to be parsed */
10 public interface Input<Token> {
11
12     /** returns the token just beyond the current location and advances beyond it */
13     public Token    next() throws IOException;
14
15     /** returns the location the input stream is currently at */
16     public Location getLocation();
17
18     /** a location *between tokens* in the input stream */
19     public static interface Location {
20         public String toString();
21     }
22 }
23
24