Crate wagon_parser
source ·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§
- The checker
- The parser
Macros§
- A macro that automatically expands to allow either a
wagon_lexer::Tokens::ProductionToken
, awagon_lexer::Tokens::MathToken
or awagon_lexer::Tokens::MetadataToken
. - A macro that automatically expands to allow either a
wagon_lexer::Tokens::ProductionToken
or awagon_lexer::Tokens::MathToken
with the same name. - The same as
either_token!
but as a reference.
Structs§
- A node is anything that implements
Parse
.SpannableNode
then, 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.Parse
is implemented on it in a way that automatically calculates the span information.
Traits§
- A trait for internal use to automatically convert between nodes and
SpannableNode
.
Functions§
- Parse an input string and check if the resulting WAG is valid.