Skip to main content

Crate pax_language

Crate pax_language 

Source

Re-exports§

pub use deserializer::from_pax;
pub use interpreter::parse_pax_expression;
pub use interpreter::computable::Computable;
pub use interpreter::property_resolution::DependencyCollector;

Modules§

deserializer
formatting
helpers
interpreter

Structs§

Op
An operator that corresponds to a rule.
Pair
A matching pair of Tokens and everything between them.
Pairs
An iterator over Pairs. It is created by pest::state and Pair::into_inner.
PaxParser
Pest parser generated from the Pax grammar.
PrattParser
Struct containing operators and precedences, which can perform Pratt parsing on primary, prefix, postfix and infix expressions over Pairs. The tokens in Pairs should alternate in the order: prefix* ~ primary ~ postfix* ~ (infix ~ prefix* ~ primary ~ postfix*)*
Span
A span over a &str. It is created from either two Positions or from a Pair.

Enums§

Assoc
Associativity of an infix binary operator, used by Op::infix(Assoc).
Rule

Traits§

Computable
Trait for expression types that can be computed to a value
Parser
A trait with a single method that parses strings.

Functions§

get_pax_pratt_parser
Build the Pratt parser that encodes PAXEL operator precedence and associativity.
parse_pax_err
Parse a string against a Pax grammar rule, preserving the structured pest error.
parse_pax_pairs
Parse a string into pest pairs for a Pax grammar rule.
parse_pax_str
Parse a string against a single Pax grammar rule, returning a human-readable error string.

Derive Macros§

Parser
The main method that’s called by the proc macro (a wrapper around pest_generator::derive_parser)