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, tokenStackToStringcanStepBack, getBottomLevelIntervalStartPos, getBottomLevelPosition, getErrorPosition, hasErrorPosition, intervalToString, parseStart, setErrorPosition, setIntervalPositionsgetMarkedStackSize, getResultStackSize, getStackMark, popResult, pushResult, resetStack, resultStackToString, setStackMarkpublic FlexibleTokenizer(IndexReader innerSource)
public int getPosition()
getPosition in interface ReaderInterfacegetPosition in class IndexReaderpublic void setPosition(int position)
IndexReadersetPosition in interface ReaderInterfacesetPosition in class IndexReaderposition - the position to set the markerpublic final boolean isEndOfBuffer()
isEndOfBuffer in interface ReaderInterfaceisEndOfBuffer in class IndexReaderpublic void skipSpace()
skipSpace in class IndexReaderpublic void setTokenSet(TokenSet tokenSet)
public Token read() throws ParseException
ReaderInterfaceread in interface ReaderInterfaceread in class IndexReaderParseExceptionpublic void stepBack()
IndexReaderstepBack in class IndexReaderpublic void clear()
IndexReaderpublic void switchParser(NTProductions newParser) throws ParseException
switchParser in class IndexReaderParseExceptionpublic IndexReader newReader()
IndexReadernewReader in class IndexReaderpublic SourcePosition toTextPosition(int position)
ReaderInterfacetoTextPosition in interface ReaderInterfacetoTextPosition in class IndexReaderposition - the position to transform into the text positionpublic int getBottomLevelPosition(int topLevelPosition)
getBottomLevelPosition in class IndexReaderpublic java.lang.String intervalToString(int startShift,
int endShift)
intervalToString in class IndexReaderpublic final int getIntervalStartPos()
getIntervalStartPos in class IndexReaderpublic void setIntervalStartPos(int startPos)
setIntervalStartPos in class IndexReaderpublic final int getIntervalEndPos()
getIntervalEndPos in class IndexReaderpublic void setIntervalEndPos(int endPos)
setIntervalEndPos in class IndexReaderpublic int getBufferSize()
getBufferSize in interface ReaderInterfacegetBufferSize in class IndexReader