public class ScanTokenizer extends Tokenizer
innerSource, tokenStack
Constructor and Description |
---|
ScanTokenizer(IndexReader innerSource) |
Modifier and Type | Method and Description |
---|---|
int |
getBottomLevelPosition(int position) |
int |
getBufferSize() |
int |
getIntervalEndPos() |
int |
getIntervalStartPos() |
int |
getPosition() |
java.lang.String |
intervalToString(int startShift,
int endShift) |
boolean |
isEndOfBuffer() |
IndexReader |
newReader()
Clones this Reader without copying the buffer itself
|
void |
parseStart(NTProductions startParser) |
Token |
read()
Returns the next index in the source code and moves the marker.
|
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.
|
clear, getBottomLevelSource, getFilename, isTokenStackEmpty, pollTokenValue, pushTokenValue, tokenStackToString
canStepBack, getBottomLevelIntervalStartPos, getBottomLevelPosition, getErrorPosition, hasErrorPosition, intervalToString, setErrorPosition, setIntervalPositions, switchParser
getMarkedStackSize, getResultStackSize, getStackMark, popResult, pushResult, resetStack, resultStackToString, setStackMark
public ScanTokenizer(IndexReader innerSource)
public boolean isEndOfBuffer()
isEndOfBuffer
in interface ReaderInterface
isEndOfBuffer
in class IndexReader
public Token read() throws ParseException
ReaderInterface
read
in interface ReaderInterface
read
in class IndexReader
ParseException
public void stepBack()
IndexReader
stepBack
in class IndexReader
public IndexReader newReader()
IndexReader
newReader
in class IndexReader
public void skipSpace()
skipSpace
in class IndexReader
public void parseStart(NTProductions startParser) throws ParseException
parseStart
in class IndexReader
ParseException
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 SourcePosition toTextPosition(int position)
ReaderInterface
toTextPosition
in interface ReaderInterface
toTextPosition
in class IndexReader
position
- the position to transform into the text positionpublic java.lang.String toString()
toString
in class java.lang.Object
public int getBottomLevelPosition(int position)
getBottomLevelPosition
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 java.lang.String intervalToString(int startShift, int endShift)
intervalToString
in class IndexReader
public int getBufferSize()
getBufferSize
in interface ReaderInterface
getBufferSize
in class IndexReader