Struct ForwardLexer
A lexer that takes a ForwardRange.
This lexer copies the needed characters from the forward 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 slightly faster than RangeLexer
, but shoudn't be used if a faster
lexer is available.
Template arguments
struct ForwardLexer(T, ErrorHandler, Alloc, std .typecons .Flag!("reuseBuffer") .Flag reuseBuffer)
if (isForwardRange!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 --