Struct RangeLexer
A lexer that takes an InputRange.
This lexer copies the needed characters from the input range to an internal buffer, returning slices of it. Whether the buffer is reused (and thus all previously returned slices invalidated) depends on the instantiation parameters.
This is the most flexible lexer, as it imposes very few requirements on its input, which only needs to be an InputRange. It is also the slowest lexer, as it copies characters one by one, so it shall not be used unless it's the only option.
Template arguments
struct RangeLexer(T, ErrorHandler, Alloc, std .typecons .Flag!("reuseBuffer") .Flag reuseBuffer)
if (isInputRange!T);
Methods
Aliases
Name | Description |
---|---|
CharacterType
|
See detailed documentation in
std
|
InputType
|
See detailed documentation in
std
|
Parameters
Name | Description |
---|---|
T | the InputRange to be used as input for this lexer |
ErrorHandler | a delegate type, used to report the impossibility to complete
operations like advanceUntil or advanceUntilAny |
Alloc | the allocator used to manage internal buffers |
reuseBuffer | if set to Yes (the default) this parser will always reuse
the same buffers, invalidating all previously returned slices |
Authors
Lodovico Giaretta
Copyright
Copyright Lodovico Giaretta 2016 --