protected class IncludingCharBuf.CharBuf extends Object
IncludingCharBuf, representing exactly
one source of character data, ie the original file or inserted expansions.| Modifier and Type | Field and Description |
|---|---|
protected int |
CHUNKSIZE |
protected char[] |
data
The complete data, read in when constructing the object.
|
protected IncludingCharBuf.CharBuf |
host
Chaining to calling
CharBuf object. |
protected int |
len
The length of the complete data, in characters.
|
protected int |
pos
Current read position.
|
| Constructor and Description |
|---|
CharBuf(char[] s,
IncludingCharBuf.CharBuf buf,
Location<D> loc)
see
#CharBuf(Reader,CharBuf,Location) |
CharBuf(Reader r,
IncludingCharBuf.CharBuf buf,
Location<D> loc)
Create a new buffer, link it via
host to the calling text,
and fill it with all character data from r. |
| Modifier and Type | Method and Description |
|---|---|
void |
consume()
Advance position counter and line number, if linefeed is detected.
|
void |
fill(Reader fr) |
protected boolean |
isNewline(char c)
Decide if the next character is a newline FIXME NOT COMPLETE !!
|
char |
LA(int k)
Look ahead to the next k-th character, either in its own data, or
in the caller.
|
protected char[] data
protected int len
protected final int CHUNKSIZE
protected int pos
protected IncludingCharBuf.CharBuf host
CharBuf object.public CharBuf(Reader r, IncludingCharBuf.CharBuf buf, Location<D> loc) throws IOException
host to the calling text,
and fill it with all character data from r.r - sourcebuf - calling predecessorloc - location of the start of the dataIOExceptionpublic CharBuf(char[] s,
IncludingCharBuf.CharBuf buf,
Location<D> loc)
#CharBuf(Reader,CharBuf,Location)public void fill(Reader fr) throws IOException
IOExceptionpublic char LA(int k)
public void consume()
IncludingCharBuf FIXME WARUM AUSKOMMENTIERT ????protected boolean isNewline(char c)
see also the complete user documentation .