public class SourceReader extends IndexReader
Constructor and Description |
---|
SourceReader() |
SourceReader(java.nio.ByteBuffer buffer,
int bufferEnd) |
SourceReader(java.io.File file) |
SourceReader(java.lang.String source) |
Modifier and Type | Method and Description |
---|---|
boolean |
bufferOk() |
int |
getBottomLevelPosition(int topLevelPosition) |
IndexReader |
getBottomLevelSource() |
java.nio.ByteBuffer |
getBuffer() |
int |
getBufferSize() |
int |
getCurLine() |
int |
getCurPrior() |
java.lang.String |
getFilename() |
int |
getIntervalEndPos() |
int |
getIntervalStartPos() |
int |
getPosition() |
int |
getReadStartPosition() |
java.lang.String |
intervalToString(int startShift,
int endShift) |
boolean |
isEndOfBuffer() |
boolean |
isReadFromFile() |
SourceReader |
newReader()
Clones this Reader without copying the buffer itself
|
Index |
read()
Returns the next index in the source code and moves the marker.
|
char |
readChar() |
void |
readStart() |
void |
rewind() |
void |
setCurPrior(int curPrior) |
void |
setIntervalEndPos(int endPos) |
void |
setIntervalStartPos(int startPos) |
void |
setPosition(int position)
Sets the Position of the inner Buffer.
|
void |
skipSpace() |
void |
stepBack()
Makes one step back in the buffer.
|
java.lang.String |
toString() |
SourcePosition |
toTextPosition(int position)
Returns the position of the readable input source code.
|
canStepBack, clear, getBottomLevelIntervalStartPos, getBottomLevelPosition, getErrorPosition, hasErrorPosition, intervalToString, parseStart, setErrorPosition, setIntervalPositions, switchParser
getMarkedStackSize, getResultStackSize, getStackMark, popResult, pushResult, resetStack, resultStackToString, setStackMark
public SourceReader()
public SourceReader(java.nio.ByteBuffer buffer, int bufferEnd)
public SourceReader(java.lang.String source)
public SourceReader(java.io.File file)
public void rewind()
public int getCurLine()
public java.nio.ByteBuffer getBuffer()
public boolean bufferOk()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isEndOfBuffer()
isEndOfBuffer
in interface ReaderInterface
isEndOfBuffer
in class IndexReader
public int getBufferSize()
getBufferSize
in interface ReaderInterface
getBufferSize
in class IndexReader
public int getCurPrior()
public void setCurPrior(int curPrior)
public void readStart()
public int getReadStartPosition()
public int getPosition()
getPosition
in interface ReaderInterface
getPosition
in class IndexReader
public void setPosition(int position)
IndexReader
setPosition
in interface ReaderInterface
setPosition
in class IndexReader
position
- the position to set the markerpublic Index read()
ReaderInterface
read
in interface ReaderInterface
read
in class IndexReader
public void stepBack()
IndexReader
stepBack
in class IndexReader
public SourceReader newReader()
IndexReader
newReader
in class IndexReader
public java.lang.String intervalToString(int startShift, int endShift)
intervalToString
in class IndexReader
public final int getIntervalStartPos()
getIntervalStartPos
in class IndexReader
public void setIntervalStartPos(int startPos)
setIntervalStartPos
in class IndexReader
public final int getIntervalEndPos()
getIntervalEndPos
in class IndexReader
public void setIntervalEndPos(int endPos)
setIntervalEndPos
in class IndexReader
public char readChar()
public SourcePosition toTextPosition(int position)
ReaderInterface
toTextPosition
in interface ReaderInterface
toTextPosition
in class IndexReader
position
- the position to transform into the text positionpublic void skipSpace()
skipSpace
in class IndexReader
public java.lang.String getFilename()
getFilename
in interface ReaderInterface
getFilename
in class IndexReader
public boolean isReadFromFile()
public int getBottomLevelPosition(int topLevelPosition)
getBottomLevelPosition
in class IndexReader
public IndexReader getBottomLevelSource()
getBottomLevelSource
in class IndexReader