Package eu.bandm.tools.lexic
Class LookaheadTokenSourceProxy<D,T,L>
java.lang.Object
eu.bandm.tools.lexic.LookaheadTokenSourceProxy<D,T,L>
- All Implemented Interfaces:
LookaheadTokenSource<D,,T, L> Closeable,AutoCloseable,Supplier<Token<D,T>>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this source and releases any resources associated with it.get()Clear the internal lookahead buffer and return its contents.voidvoidtakeOverLookahead(L lookaheadData) Fill the internal lookahead buffer with data.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface eu.bandm.tools.lexic.LookaheadTokenSource
forgetLookahead, removeTypes, removeTypes
-
Constructor Details
-
LookaheadTokenSourceProxy
public LookaheadTokenSourceProxy() -
LookaheadTokenSourceProxy
-
-
Method Details
-
setSource
-
get
-
relinquishLookahead
Clear the internal lookahead buffer and return its contents.- Specified by:
relinquishLookaheadin interfaceLookaheadTokenSource<D,T, L> - Returns:
- the former contents of the internal lookahead buffer
-
takeOverLookahead
Fill the internal lookahead buffer with data.The buffer must be empty before this method is invoked. After return, the given data will be consumed from the buffer before the usual input is considered.
- Specified by:
takeOverLookaheadin interfaceLookaheadTokenSource<D,T, L> - Parameters:
lookaheadData- the lookahead data to fill in
-
close
public void close()Closes this source and releases any resources associated with it.The default implementation does nothing.
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceLookaheadTokenSource<D,T, L>
-