|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.umlv.tatoo.runtime.buffer.impl.AbstractBufferWrapper
public abstract class AbstractBufferWrapper
Abstract base class for buffer that can tracks line and column position in a text.
LocationProvider
Constructor Summary | |
---|---|
AbstractBufferWrapper(LocationTracker locationTracker)
Create a buffer with a location tracker. |
Method Summary | |
---|---|
void |
discard()
Discards all characters already recognized by the lexer. |
protected abstract void |
discardImpl()
|
LocationTracker |
getLocationProvider()
Returns the location tracker. |
protected void |
locationClear()
Service method that can be called by the current buffer to update the underlying location tracker. |
int |
next()
Reads the next character from the buffer. |
protected abstract int |
nextImpl()
Returns next character in buffer without taking care of locations |
void |
reset()
Moves current position back to first non unwinded character |
protected abstract void |
resetImpl()
Moves current position back to first non unwinded character without taking care of locations |
void |
restart()
Moves current position back to first non discarded character |
protected abstract void |
restartImpl()
|
void |
unwind(int count)
Performs unwind operation on buffer without taking care of locations |
protected abstract void |
unwindImpl(int count)
Performs unwind operation on buffer without taking care of locations |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface fr.umlv.tatoo.runtime.buffer.LexerBuffer |
---|
hasRemaining, lastChar, previousWasNewLine, read |
Constructor Detail |
---|
public AbstractBufferWrapper(LocationTracker locationTracker)
locationTracker
- the location tracker may be nullMethod Detail |
---|
protected abstract void unwindImpl(int count)
count
- the number of characters to unwindLexerBuffer.unwind(int)
public final void unwind(int count)
unwind
in interface LexerBuffer
count
- the number of characters to unwindLexerBuffer.unwind(int)
protected abstract void discardImpl()
public final void discard()
LexerBuffer
discard
in interface LexerBuffer
protected abstract void restartImpl()
public final void restart()
LexerBuffer
restart
in interface LexerBuffer
protected abstract int nextImpl()
IllegalStateException
- when called while hasRemaining returns falseLexerBuffer.next()
public final int next()
LexerBuffer
next
in interface LexerBuffer
protected abstract void resetImpl()
LexerBuffer.reset()
public final void reset()
LexerBuffer
reset
in interface LexerBuffer
protected final void locationClear()
LocationProvider
public LocationTracker getLocationProvider()
getLocationProvider
in interface LexerBuffer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |