transcendental-lisp/src/scanner/LispInputStream.java

44 lines
925 B
Java
Raw Normal View History

2016-12-11 11:23:44 -05:00
package scanner;
import java.io.IOException;
2016-12-21 14:42:45 -05:00
import error.*;
2016-12-11 11:23:44 -05:00
public interface LispInputStream {
int read();
void unreadLastCharacter();
public static class MaximumUnreadsExceededException extends LispException {
private static final long serialVersionUID = 1L;
@Override
public int getSeverity() {
return ErrorManager.CRITICAL_LEVEL;
}
}
public static class UncheckedIOException extends LispException {
private static final long serialVersionUID = 1L;
private IOException ioException;
public UncheckedIOException(IOException ioException) {
this.ioException = ioException;
}
@Override
public int getSeverity() {
return ErrorManager.CRITICAL_LEVEL;
}
@Override
public String getMessage() {
return ioException.getMessage();
}
}
}