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

Name Description
advanceUntil See detailed documentation in std.experimental.xml.interfaces.isLexer
advanceUntilAny See detailed documentation in std.experimental.xml.interfaces.isLexer
dropWhile See detailed documentation in std.experimental.xml.interfaces.isLexer
empty See detailed documentation in std.experimental.xml.interfaces.isLexer
get See detailed documentation in std.experimental.xml.interfaces.isLexer
setSource See detailed documentation in std.experimental.xml.interfaces.isLexer
start See detailed documentation in std.experimental.xml.interfaces.isLexer
testAndAdvance See detailed documentation in std.experimental.xml.interfaces.isLexer

Aliases

Name Description
CharacterType See detailed documentation in std.experimental.xml.interfaces.isLexer
InputType See detailed documentation in std.experimental.xml.interfaces.isLexer

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 --

License

Boost License 1.0.