public final class CSSCharStream extends Object implements CharStream
CharStream, where the stream is
assumed to contain only ASCII characters (with java-like unicode escape
processing).| Constructor and Description |
|---|
CSSCharStream(Reader aReader) |
| Modifier and Type | Method and Description |
|---|---|
void |
adjustBeginLineColumn(int nNewLine,
int newCol)
Method to adjust line and column numbers for the start of a token.
|
void |
backup(int nAmount)
Retreat.
|
char |
BeginToken()
Returns the next character that marks the beginning of the next token.
|
void |
Done()
Set buffers back to null when finished.
|
int |
getBeginColumn()
Returns the column number of the first character for current token (being
matched after the last call to BeginTOken).
|
int |
getBeginLine()
Returns the line number of the first character for current token (being
matched after the last call to BeginTOken).
|
int |
getColumn()
Deprecated.
|
int |
getEndColumn()
Returns the column number of the last character for current token (being
matched after the last call to BeginTOken).
|
int |
getEndLine()
Returns the line number of the last character for current token (being
matched after the last call to BeginTOken).
|
String |
GetImage()
Returns a string made up of characters from the marked token beginning
to the current buffer position.
|
int |
getLine()
Deprecated.
|
char[] |
GetSuffix(int len)
Returns an array of characters that make up the suffix of length 'len' for
the currently matched token.
|
int |
getTabSize() |
boolean |
getTrackLineColumn() |
char |
readChar()
Read a character.
|
void |
setTabSize(int i) |
void |
setTrackLineColumn(boolean tlc) |
public void setTabSize(int i)
setTabSize in interface CharStreampublic int getTabSize()
getTabSize in interface CharStreampublic char BeginToken()
throws IOException
CharStreamBeginToken in interface CharStreamIOException - from readCharpublic char readChar()
throws IOException
readChar in interface CharStreamIOException - if an I/O error occurs@Deprecated public int getColumn()
getColumn in interface CharStream@Deprecated public int getLine()
getLine in interface CharStreampublic int getEndColumn()
CharStreamgetEndColumn in interface CharStreampublic int getEndLine()
CharStreamgetEndLine in interface CharStreampublic int getBeginColumn()
CharStreamgetBeginColumn in interface CharStreampublic int getBeginLine()
CharStreamgetBeginLine in interface CharStreampublic void backup(int nAmount)
backup in interface CharStreampublic String GetImage()
CharStreamGetImage in interface CharStreampublic char[] GetSuffix(int len)
CharStreamGetSuffix in interface CharStreampublic void Done()
Done in interface CharStreampublic void adjustBeginLineColumn(int nNewLine,
int newCol)
nNewLine - line indexnewCol - column indexpublic boolean getTrackLineColumn()
getTrackLineColumn in interface CharStreampublic void setTrackLineColumn(boolean tlc)
setTrackLineColumn in interface CharStreamCopyright © 2014–2016 Philip Helger. All rights reserved.