public class FlexibleTokenizer extends Tokenizer
innerSource, tokenStack
Constructor and Description |
---|
FlexibleTokenizer(IndexReader innerSource) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Deletes all the read information.
|
int |
getBottomLevelPosition(int topLevelPosition) |
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
|
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 |
setTokenSet(TokenSet tokenSet) |
void |
skipSpace() |
void |
stepBack()
Makes one step back in the buffer.
|
void |
switchParser(NTProductions newParser) |
SourcePosition |
toTextPosition(int position)
Returns the position of the readable input source code.
|
getBottomLevelSource, getFilename, isTokenStackEmpty, pollTokenValue, pushTokenValue, tokenStackToString
canStepBack, getBottomLevelIntervalStartPos, getBottomLevelPosition, getErrorPosition, hasErrorPosition, intervalToString, parseStart, setErrorPosition, setIntervalPositions
getMarkedStackSize, getResultStackSize, getStackMark, popResult, pushResult, resetStack, resultStackToString, setStackMark
public FlexibleTokenizer(IndexReader innerSource)
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 final boolean isEndOfBuffer()
isEndOfBuffer
in interface ReaderInterface
isEndOfBuffer
in class IndexReader
public void skipSpace()
skipSpace
in class IndexReader
public void setTokenSet(TokenSet tokenSet)
public Token read() throws ParseException
ReaderInterface
read
in interface ReaderInterface
read
in class IndexReader
ParseException
public void stepBack()
IndexReader
stepBack
in class IndexReader
public void clear()
IndexReader
public void switchParser(NTProductions newParser) throws ParseException
switchParser
in class IndexReader
ParseException
public IndexReader newReader()
IndexReader
newReader
in class IndexReader
public SourcePosition toTextPosition(int position)
ReaderInterface
toTextPosition
in interface ReaderInterface
toTextPosition
in class IndexReader
position
- the position to transform into the text positionpublic int getBottomLevelPosition(int topLevelPosition)
getBottomLevelPosition
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 int getBufferSize()
getBufferSize
in interface ReaderInterface
getBufferSize
in class IndexReader