An implementation of interface CharStream, where the stream is assumed to
contain only ASCII characters (without unicode processing).
bufcolumn
protected int[] bufcolumn
buffer
protected char[] buffer
bufline
protected int[] bufline
bufpos
public int bufpos
Position in buffer.
column
protected int column
inputStream
protected java.io.Reader inputStream
maxNextCharInd
protected int maxNextCharInd
prevCharIsCR
protected boolean prevCharIsCR
prevCharIsLF
protected boolean prevCharIsLF
staticFlag
public static final boolean staticFlag
Whether parser is static.
tabSize
protected int tabSize
SimpleCharStream
public SimpleCharStream(java.io.InputStream dstream)
Constructor.
SimpleCharStream
public SimpleCharStream(java.io.InputStream dstream,
String encoding)
throws java.io.UnsupportedEncodingException
Constructor.
SimpleCharStream
public SimpleCharStream(java.io.InputStream dstream,
String encoding,
int startline,
int startcolumn)
throws java.io.UnsupportedEncodingException
Constructor.
SimpleCharStream
public SimpleCharStream(java.io.InputStream dstream,
String encoding,
int startline,
int startcolumn,
int buffersize)
throws java.io.UnsupportedEncodingException
Constructor.
SimpleCharStream
public SimpleCharStream(java.io.InputStream dstream,
int startline,
int startcolumn)
Constructor.
SimpleCharStream
public SimpleCharStream(java.io.InputStream dstream,
int startline,
int startcolumn,
int buffersize)
Constructor.
SimpleCharStream
public SimpleCharStream(java.io.Reader dstream)
Constructor.
SimpleCharStream
public SimpleCharStream(java.io.Reader dstream,
int startline,
int startcolumn)
Constructor.
SimpleCharStream
public SimpleCharStream(java.io.Reader dstream,
int startline,
int startcolumn,
int buffersize)
Constructor.
BeginToken
public char BeginToken()
throws java.io.IOException
Start.
Done
public void Done()
Reset buffer when finished.
ExpandBuff
protected void ExpandBuff(boolean wrapAround)
FillBuff
protected void FillBuff()
throws java.io.IOException
GetImage
public String GetImage()
Get token literal value.
GetSuffix
public char[] GetSuffix(int len)
Get the suffix.
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.
UpdateLineColumn
protected void UpdateLineColumn(char c)
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)
Backup a number of characters.
getBeginColumn
public int getBeginColumn()
Get token beginning column number.
getBeginLine
public int getBeginLine()
Get token beginning line number.
getColumn
public int getColumn()
getEndColumn
public int getEndColumn()
Get token end column number.
getEndLine
public int getEndLine()
Get token end line number.
getLine
public int getLine()
getTabSize
protected int getTabSize(int i)
readChar
public char readChar()
throws java.io.IOException
Read a character.
setTabSize
protected void setTabSize(int i)