Crate yggdrasil_rt

Source
Expand description

§Yggdrasil Runtime

Shared runtime for yggdrasil grammar generator.

§Language Server Support

§Regex Support

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().
LinesSpan
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.
RegexCompiled
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.
TextSpan
A span over a &str. It is created from either two Positions or from a Pair.
TokenPair
A matching pair of Tokens and everything between them.
TokenStream
An iterator over Pairs. It is created by Pairs::flatten.
TokenTree
An iterator over Pairs. It is created by yggdrasil_rt::state and Pair::into_inner.
TokenTreeFilterRule
find tags in toke pair
TokenTreeFilterTag
find tags in toke pair
Tokens
An iterator over Tokens. It is created by Pair::tokens and Pairs::tokens.

Enums§

Lookahead
The current lookahead status of a ParserState.
MatchDirection
Match direction for the stack. Used in PEEK[a..b]/stack_match_peek_slice.
Token
A token generated by a Parser.
TokenQueue
This structure serves to improve performance over Token objects in two ways:

Traits§

YggdrasilNode
A typed ast node
YggdrasilParser
A trait with a single method that parses strings.
YggdrasilRule
Define rules subject to Yggdrasil

Functions§

merge_spans
Merges two spans into one.
state
Creates a ParserState from a &str, supplying it to a closure f.

Type Aliases§

AhoCorasick
Either
Type alias to simplify specifying the return value of chained closures.
OutputResult
Output result alias