Class LookaheadNIterator<E>
java.lang.Object
com.singularsys.jep.configurableparser.Lookahead2Iterator<E>
com.singularsys.jep.configurableparser.LookaheadNIterator<E>
A subclass of a Lookahead2Iterator which allows any number of character of lookahead.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LookaheadNIterator
-
-
Method Details
-
setInputIterator
Description copied from class:Lookahead2IteratorShould be called if the default constructor is used.- Overrides:
setInputIteratorin classLookahead2Iterator<E>- Parameters:
input- the new input iterator
-
peekNext
- Overrides:
peekNextin classLookahead2Iterator<E>
-
nextnext
- Overrides:
nextnextin classLookahead2Iterator<E>
-
lookahead
Look at character n places up the stream- Parameters:
n- number of characters to lookahead- Returns:
- the token n places ahead
-
prev
Description copied from class:Lookahead2IteratorReturn the token just consumed.- Overrides:
previn classLookahead2Iterator<E>- Returns:
- the token, or null if no token consumed.
-
consume
public void consume()Eat one token.- Overrides:
consumein classLookahead2Iterator<E>
-
toString
- Overrides:
toStringin classLookahead2Iterator<E>
-