public class SimpleCharStream
An implementation of interface CharStream, where the stream is assumed to contain only ASCII
characters (without unicode processing).
Static Fields
staticFlag
public static final boolean staticFlag
Whether parser is static.
Field Value
Constructors
public SimpleCharStream(InputStream dstream)
Parameter
public SimpleCharStream(InputStream dstream, int startline, int startcolumn)
Parameters
public SimpleCharStream(InputStream dstream, int startline, int startcolumn, int buffersize)
Parameters
public SimpleCharStream(InputStream dstream, String encoding)
Parameters
public SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn)
Parameters
public SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)
Parameters
SimpleCharStream(Reader dstream)
public SimpleCharStream(Reader dstream)
Parameter
SimpleCharStream(Reader dstream, int startline, int startcolumn)
public SimpleCharStream(Reader dstream, int startline, int startcolumn)
Parameters
SimpleCharStream(Reader dstream, int startline, int startcolumn, int buffersize)
public SimpleCharStream(Reader dstream, int startline, int startcolumn, int buffersize)
Parameters
Fields
bufcolumn
protected int[] bufcolumn
Field Value
buffer
Field Value
bufline
Field Value
bufpos
Field Value
column
Field Value
inBuf
Field Value
protected Reader inputStream
Field Value
line
Field Value
maxNextCharInd
protected int maxNextCharInd
Field Value
prevCharIsCR
protected boolean prevCharIsCR
Field Value
prevCharIsLF
protected boolean prevCharIsLF
Field Value
tabSize
Field Value
trackLineColumn
protected boolean trackLineColumn
Field Value
Methods
BeginToken()
Returns
Exceptions
Done()
Reset buffer when finished.
ExpandBuff(boolean wrapAround)
protected void ExpandBuff(boolean wrapAround)
Parameter
FillBuff()
protected void FillBuff()
Exceptions
GetImage()
Returns
GetSuffix(int len)
public char[] GetSuffix(int len)
Parameter
Returns
public void ReInit(InputStream dstream)
Parameter
public void ReInit(InputStream dstream, int startline, int startcolumn)
Parameters
public void ReInit(InputStream dstream, int startline, int startcolumn, int buffersize)
Parameters
public void ReInit(InputStream dstream, String encoding)
Parameters
Exceptions
public void ReInit(InputStream dstream, String encoding, int startline, int startcolumn)
Parameters
Exceptions
public void ReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)
Parameters
Exceptions
ReInit(Reader dstream)
public void ReInit(Reader dstream)
Parameter
ReInit(Reader dstream, int startline, int startcolumn)
public void ReInit(Reader dstream, int startline, int startcolumn)
Parameters
ReInit(Reader dstream, int startline, int startcolumn, int buffersize)
public void ReInit(Reader dstream, int startline, int startcolumn, int buffersize)
Parameters
UpdateLineColumn(char c)
protected void UpdateLineColumn(char c)
Parameter
adjustBeginLineColumn(int newLine, int newCol)
public void adjustBeginLineColumn(int newLine, int newCol)
Method to adjust line and column numbers for the start of a token.
Parameters
Name | Description |
newLine | int
|
newCol | int
|
backup(int amount)
public void backup(int amount)
Backup a number of characters.
Parameter
getBeginColumn()
public int getBeginColumn()
Get token beginning column number.
Returns
getBeginLine()
public int getBeginLine()
Get token beginning line number.
Returns
getColumn() (deprecated)
Returns
getEndColumn()
public int getEndColumn()
Get token end column number.
Returns
getEndLine()
Get token end line number.
Returns
getLine() (deprecated)
Returns
getTabSize()
Returns
readChar()
Returns
Exceptions
setTabSize(int i)
public void setTabSize(int i)
Parameter