Expand description
Re-exports§
pub use crate::errors::InvalidTag;pub use crate::errors::YggdrasilError;
Modules§
- errors
- input
- Provides trait constraints for parsing streaming input structures
- state
- Handle state transitions of parsed streams
Structs§
- Lines
- Line iterator for Spans, created by
Span::lines(). - Lines
Span - Line iterator for Spans, created by
Span::lines_span(). - Position
- A cursor position in a
&strwhich provides useful methods to manually parse that string. - Regex
- A regex matcher that works by composing several other regex matchers automatically.
- Regex
Compiled - A precompiled regular expression state machine
- Stack
- Implementation of a
Stackwhich maintains popped elements and length of previous states in order to rewind the stack to a previous state. - State
- The complete state of a
Parser. - Text
Span - A span over a
&str. It is created from either twoPositions or from aPair. - Token
Pair - A matching pair of
Tokens and everything between them. - Token
Stream - An iterator over
Pairs. It is created byPairs::flatten. - Token
Tree - An iterator over
Pairs. It is created byyggdrasil_rt::stateandPair::into_inner. - Token
Tree Filter Rule - find tags in toke pair
- Token
Tree Filter Tag - find tags in toke pair
- Tokens
- An iterator over
Tokens. It is created byPair::tokensandPairs::tokens.
Enums§
- Lookahead
- The current lookahead status of a
ParserState. - Match
Direction - Match direction for the stack. Used in
PEEK[a..b]/stack_match_peek_slice. - Token
- A token generated by a
Parser. - Token
Queue - This structure serves to improve performance over Token objects in two ways:
Traits§
- Yggdrasil
Node - A typed ast node
- Yggdrasil
Parser - A trait with a single method that parses strings.
- Yggdrasil
Rule - Define rules subject to Yggdrasil
Functions§
- merge_
spans - Merges two spans into one.
- state
- Creates a
ParserStatefrom a&str, supplying it to a closuref.
Type Aliases§
- AhoCorasick
- Either
- Type alias to simplify specifying the return value of chained closures.
- Output
Result - Output result alias