BufferedLexer

A lexer that takes an InputRange of slices from the input.

This lexer tries to merge the speed of direct slicing with the low memory requirements of ranges. Its input is a range whose elements are chunks of the input data; this lexer returns slices of the original chunks, unless the output is split between two chunks. If that's the case, a new array is allocated and returned. The various chunks may have different sizes.

The bigger the chunks are, the better is the performance and higher the memory usage, so finding the correct tradeoff is crucial for maximum performance. This lexer is suitable for very large files, which are read chunk by chunk from the file system.

Members

Aliases

BufferType
alias BufferType = ElementType!T
Undocumented in source.
CharacterType
alias CharacterType = ElementEncodingType!BufferType
InputType
alias InputType = T
advanceUntil
void advanceUntil(char c, bool included)
advanceUntilAny
size_t advanceUntilAny(string s, bool included)
dropWhile
void dropWhile(string s)

See detailed documentation in newxml.interfaces.isLexer

Functions

empty
bool empty()

See detailed documentation in newxml.interfaces.isLexer

get
CharacterType[] get()

See detailed documentation in newxml.interfaces.isLexer

popBuffer
void popBuffer()
Undocumented in source. Be warned that the author may not have intended to support it.
popBuffer
void popBuffer()
Undocumented in source. Be warned that the author may not have intended to support it.
save
auto save()
Undocumented in source. Be warned that the author may not have intended to support it.
setSource
void setSource(T input)
start
void start()
testAndAdvance
bool testAndAdvance(char c)

See detailed documentation in newxml.interfaces.isLexer

Parameters

T

the InputRange to be used as input for this lexer

Meta