1 package edu.berkeley.sbp.chr;
4 import java.lang.reflect.*;
5 import java.lang.ref.*;
6 import edu.berkeley.sbp.*;
7 import edu.berkeley.sbp.util.*;
8 import edu.berkeley.sbp.misc.*;
9 import edu.berkeley.sbp.Input.Location;
11 public class CharInput extends CartesianInput<Character> {
12 private final Reader r;
14 public CharInput(String s) { this(new StringReader(s)); }
15 public CharInput(Reader r) { this(r, null); }
16 public CharInput(Reader r, String s) { this.r = r; }
17 public CharInput(InputStream i) { this(i, null); }
18 public CharInput(InputStream i, String s) { this(new InputStreamReader(i), s); }
21 public boolean isCR() { return cr; }
22 public Character next() throws IOException {
25 if (i==-1) return null;