An implementation of interface CharStream, where the stream is assumed to
contain only ASCII characters (with java-like unicode escape processing).
bufpos
public int bufpos
Position in buffer.
staticFlag
public static final boolean staticFlag
Whether parser is static.
JavaCharStream
public JavaCharStream(java.io.InputStream dstream)
Constructor.
JavaCharStream
public JavaCharStream(java.io.InputStream dstream,
String encoding)
throws java.io.UnsupportedEncodingException
Constructor.
JavaCharStream
public JavaCharStream(java.io.InputStream dstream,
String encoding,
int startline,
int startcolumn)
throws java.io.UnsupportedEncodingException
Constructor.
JavaCharStream
public JavaCharStream(java.io.InputStream dstream,
String encoding,
int startline,
int startcolumn,
int buffersize)
throws java.io.UnsupportedEncodingException
Constructor.
JavaCharStream
public JavaCharStream(java.io.InputStream dstream,
int startline,
int startcolumn)
Constructor.
JavaCharStream
public JavaCharStream(java.io.InputStream dstream,
int startline,
int startcolumn,
int buffersize)
Constructor.
JavaCharStream
public JavaCharStream(java.io.Reader dstream)
Constructor.
JavaCharStream
public JavaCharStream(java.io.Reader dstream,
int startline,
int startcolumn)
Constructor.
JavaCharStream
public JavaCharStream(java.io.Reader dstream,
int startline,
int startcolumn,
int buffersize)
Constructor.
BeginToken
public char BeginToken()
throws java.io.IOException
- starting character for token.
Done
public void Done()
Set buffers back to null when finished.
ExpandBuff
protected void ExpandBuff(boolean wrapAround)
FillBuff
protected void FillBuff()
throws java.io.IOException
ReInit
public void ReInit(java.io.InputStream dstream)
Reinitialise.
ReInit
public void ReInit(java.io.InputStream dstream,
String encoding)
throws java.io.UnsupportedEncodingException
Reinitialise.
ReInit
public void ReInit(java.io.InputStream dstream,
String encoding,
int startline,
int startcolumn)
throws java.io.UnsupportedEncodingException
Reinitialise.
ReInit
public void ReInit(java.io.InputStream dstream,
String encoding,
int startline,
int startcolumn,
int buffersize)
throws java.io.UnsupportedEncodingException
Reinitialise.
ReInit
public void ReInit(java.io.InputStream dstream,
int startline,
int startcolumn)
Reinitialise.
ReInit
public void ReInit(java.io.InputStream dstream,
int startline,
int startcolumn,
int buffersize)
Reinitialise.
ReInit
public void ReInit(java.io.Reader dstream)
Reinitialise.
ReInit
public void ReInit(java.io.Reader dstream,
int startline,
int startcolumn)
Reinitialise.
ReInit
public void ReInit(java.io.Reader dstream,
int startline,
int startcolumn,
int buffersize)
Reinitialise.
ReadByte
protected char ReadByte()
throws java.io.IOException
adjustBeginLineColumn
public void adjustBeginLineColumn(int newLine,
int newCol)
Method to adjust line and column numbers for the start of a token.
backup
public void backup(int amount)
Retreat.
getBeginLine
public int getBeginLine()
- line number of token start
readChar
public char readChar()
throws java.io.IOException
Read a character.