Module tools

Source
Expand description

Parsing tools

This module provides the ParseTool trait and some parsing tools which incapsulates some basic algorithms which you can use to define more sofisticated ones.

Structs§

AnyTool
Matches any character.
CheckInvTool
Matches only if the provided tool doesn’t match.
CheckTool
Only checks the provided tool, without progressing.
EOFTool
Parses only the end of the input
GetChar
Get matched character in PredicateTool and PredicateRefTool.
LazyNoTerm
Unit struct for LazyRepeatTool in order to return a matching string without TERM.
LazyRepeatTool
Tool that matches repetitions lazily.
Or
Tool that matches at least one of many subtools.
PredicateRefTool
Tool that matches characters which satisfies the provided ref predicate.
PredicateTool
Tool that matches characters which satisfies the provided predicate.
RepeatTool
Tool that matches repetitions with separator requiring a minimum number of repetitions.
SeqTool
Tool that matches a sequence of subtools.
ToolResultErr
Error tyoe for ToolResult.
Transform
Transform the matched character in PredicateTool and PredicateRefTool.
TrueParser
Matches the empty string, therefore it always matches.

Enums§

ToolResult
Return type of a ParseTool.
ToolResultData
Return type of a ParseToolData.

Traits§

ParseTool
The main parsing trait
ParseToolData
A tool that can generate additional Data after a successful match.