Construct an uninitialized iterator. For example:
Read a line of text, and return false when there's no further content available.
Scanner implementation for this iterator. Find a '\n', and eat any immediately preceeding '\r'.
The pattern scanner, implemented via subclasses.
Set the provided stream as the scanning source.
Return the current token as a slice of the content.
Iterate over the set of tokens. This should really provide read-only access to the tokens, but D does not support that at this time.
Iterate over a set of tokens, exposing a token count starting at zero.
Iterate over a set of tokens and delimiters, exposing a token count starting at zero.
Locate the next token. Returns the token if found, null otherwise. Null indicates an end of stream condition. To sweep a conduit for lines using method next():
Set the content of the current slice to the provided start and end points.
Set the content of the current slice to the provided start and end points, and delimiter to the segment between end & next (inclusive.)
Called when a scanner fails to find a matching pattern. This may cause more content to be loaded, and a rescan initiated.
Invoked when a scanner matches a pattern. The provided value should be the index of the last element of the matching pattern, which is converted back to a void[] index.
See if set of characters holds a particular instance.
Iterate across a set of text patterns.
Each pattern is exposed to the client as a slice of the original content, where the slice is transient. If you need to retain the exposed content, then you should .dup it appropriately.
The content exposed via an iterator is supposed to be entirely read-only. All current iterators abide by this rule, but it is possible a user could mutate the content through a get() slice. To enforce the desired read-only aspect, the code would have to introduce redundant copying or the compiler would have to support read-only arrays.
See Delimiters, Patterns, Quotes.