1 package antlr; 2 3 9 10 22 23 import java.io.Reader ; import java.io.IOException ; 25 26 29 public class CharBuffer extends InputBuffer { 30 transient Reader input; 32 33 34 public CharBuffer(Reader input_) { super(); 36 input = input_; 37 } 38 39 40 public void fill(int amount) throws CharStreamException { 41 try { 42 syncConsume(); 43 while (queue.nbrEntries < amount + markerOffset) { 45 queue.append((char)input.read()); 47 } 48 } 49 catch (IOException io) { 50 throw new CharStreamIOException(io); 51 } 52 } 53 } 54 | Popular Tags |