|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.finalist.jag.template.parser.InputBuffer
Class InputBuffer
| Field Summary | |
protected int |
markerOffset
Field markerOffset |
protected int |
nMarkers
Field nMarkers |
protected int |
numToConsume
Field numToConsume |
protected CharQueue |
queue
Field queue |
| Constructor Summary | |
InputBuffer()
Create an input buffer |
|
| Method Summary | |
void |
commit()
This method updates the state of the input buffer so that the text matched since the most recent mark() is no longer held by the buffer. |
void |
consume()
Mark another character for deferred consumption |
abstract void |
fill(int amount)
Ensure that the input buffer is sufficiently full |
java.lang.String |
getCharsFromMark(int mark)
Method getCharsFromMark |
java.lang.String |
getLAChars()
Method getLAChars |
java.lang.String |
getMarkedChars()
Method getMarkedChars |
boolean |
isMarked()
Method isMarked |
char |
LA(int i)
Get a lookahead character |
java.lang.String |
LAChars(int n)
Method LAChars |
int |
mark()
Return an integer marker that can be used to rewind the buffer to its current state. |
void |
rewind(int mark)
Rewind the character buffer to a marker. |
protected void |
syncConsume()
Sync up deferred consumption |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int nMarkers
protected int markerOffset
protected int numToConsume
protected CharQueue queue
| Constructor Detail |
public InputBuffer()
| Method Detail |
public void commit()
public void consume()
public abstract void fill(int amount)
throws CharStreamException
amount -
CharStreamExceptionpublic java.lang.String getLAChars()
public java.lang.String getCharsFromMark(int mark)
mark -
public java.lang.String LAChars(int n)
throws CharStreamException
n -
CharStreamExceptionpublic java.lang.String getMarkedChars()
public boolean isMarked()
public char LA(int i)
throws CharStreamException
i -
CharStreamExceptionpublic int mark()
public void rewind(int mark)
mark - Marker returned previously from mark()protected void syncConsume()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||