Struct SliceLexer
A lexer that takes a sliceable input.
This lexer will always return slices of the original input; thus, it does not
allocate memory and calls to start
don't invalidate the outputs of previous
calls to get
.
This is the fastest of all lexers, as it only performs very quick searches and slicing operations. It has the downside of requiring the entire input to be loaded in memory at the same time; as such, it is optimal for small file but not suitable for very big ones.
Template arguments
struct SliceLexer(T, ErrorHandler, Alloc, std .typecons .Flag!("reuseBuffer") .Flag reuseBuffer);
Methods
Aliases
Name | Description |
---|---|
CharacterType
|
See detailed documentation in
std
|
InputType
|
See detailed documentation in
std
|
Parameters
T = a sliceable type used as input for this lexer
ErrorHandler = a delegate type, used to report the impossibility to complete
operations like advanceUntil
or advanceUntilAny
Alloc = a dummy allocator parameter, never used; kept for uniformity with
the other lexers
reuseBuffer = a dummy flag, never used; kept for uniformity with the other
lexers
Authors
Lodovico Giaretta
Copyright
Copyright Lodovico Giaretta 2016 --