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
&str
which 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
Stack
which 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 twoPosition
s or from aPair
. - Token
Pair - A matching pair of
Token
s and everything between them. - Token
Stream - An iterator over
Pair
s. It is created byPairs::flatten
. - Token
Tree - An iterator over
Pair
s. It is created byyggdrasil_rt::state
andPair::into_inner
. - Token
Tree Filter Rule - find tags in toke pair
- Token
Tree Filter Tag - find tags in toke pair
- Tokens
- An iterator over
Token
s. It is created byPair::tokens
andPairs::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
ParserState
from 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