transcendental-lisp/src/scanner/LispInputStream.java

34 lines
737 B
Java
Raw Normal View History

2016-12-11 11:23:44 -05:00
package scanner;
import java.io.IOException;
2017-02-11 10:42:07 -05:00
import error.CriticalLispException;
2016-12-11 11:23:44 -05:00
public interface LispInputStream {
int read();
void unreadLastCharacter();
2017-02-11 10:42:07 -05:00
public static class MaximumUnreadsExceededException extends CriticalLispException {
2016-12-11 11:23:44 -05:00
private static final long serialVersionUID = 1L;
}
2017-02-11 10:42:07 -05:00
public static class UncheckedIOException extends CriticalLispException {
2016-12-11 11:23:44 -05:00
private static final long serialVersionUID = 1L;
private IOException ioException;
public UncheckedIOException(IOException ioException) {
this.ioException = ioException;
}
@Override
public String getMessage() {
return ioException.getMessage();
}
}
}