TokenStreamComponents

open class TokenStreamComponents(source: Consumer<Reader>, result: TokenStream)

This class encapsulates the outer components of a token stream. It provides access to the source (a Reader and the outer end (sink), an instance of [ ] which also serves as the TokenStream returned by .

Constructors

Link copied to clipboard
constructor(source: Consumer<Reader>, result: TokenStream)
constructor(tokenizer: Tokenizer, result: TokenStream)

Creates a new TokenStreamComponents instance

constructor(tokenizer: Tokenizer)

Creates a new TokenStreamComponents from a Tokenizer

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Returns the component's source

Link copied to clipboard
fun setReader(reader: Reader)

Resets the encapsulated components with the given reader. If the components cannot be reset, an Exception should be thrown.