|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.umlv.tatoo.runtime.buffer.impl.AbstractLexerBuffer
public abstract class AbstractLexerBuffer
Abstract base class for buffer that can tracks line and column position in a text.
LocationProvider| Constructor Summary | |
|---|---|
AbstractLexerBuffer(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 AbstractLexerBuffer(LocationTracker locationTracker)
locationTracker - the location tracker may be null| Method 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 LexerBuffercount - the number of characters to unwindLexerBuffer.unwind(int)protected abstract void discardImpl()
public final void discard()
LexerBuffer
discard in interface LexerBufferprotected abstract void restartImpl()
public final void restart()
LexerBufferSimpleParser.push(Object)
for me details.
restart in interface LexerBufferprotected abstract int nextImpl()
IllegalStateException - when called while hasRemaining returns falseLexerBuffer.next()public final int next()
LexerBuffer
next in interface LexerBufferprotected abstract void resetImpl()
LexerBuffer.reset()public final void reset()
LexerBuffertokenizer.
reset in interface LexerBufferprotected final void locationClear()
LocationProviderpublic LocationTracker getLocationProvider()
getLocationProvider in interface LexerBuffer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||