Expand description
WAGon Parser
A crate containing the Parser for the WAGon DSL as well as a checker and associated functions.
As long as you do not need any extensions to the WAGon DSL itself, this will likely be your main interface to the ecosystem.
After you have a parsed a full Wag tree, you can do with it whatever you require.
Modules§
Macros§
- any_
token - A macro that automatically expands to allow either a
wagon_lexer::Tokens::ProductionToken, awagon_lexer::Tokens::MathTokenor awagon_lexer::Tokens::MetadataToken. - either_
token - A macro that automatically expands to allow either a
wagon_lexer::Tokens::ProductionTokenor awagon_lexer::Tokens::MathTokenwith the same name. - either_
token_ ref - The same as
either_token!but as a reference.
Structs§
- Spannable
Node - A node is anything that implements
Parse.SpannableNodethen, is a wrapper around this node that holds span information about it. It is intended to be a mostly see-through wrapper around whatever the inner node is.Parseis implemented on it in a way that automatically calculates the span information.
Traits§
- Wrap
Spannable - A trait for internal use to automatically convert between nodes and
SpannableNode.
Functions§
- parse_
and_ check - Parse an input string and check if the resulting WAG is valid.