Crate arithmetic_parser_kma Copy item path Source cli cli ia a modul with cli implementation. io Traits, helpers, and type definitions for core I/O functionality. MyParser Pairs An iterator over Pair
s. It is created by pest::state
and Pair::into_inner
. 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*)*
Expr MyError MyError is an error type used to return errors from the parser. Op Op describes a mathematical operation. Rule BufRead A BufRead
is a type of Read
er which has an internal buffer, allowing it
to perform extra ways of reading. Parser A trait with a single method that parses strings. eval_expr Evaluate the given expression and return the result. eval_expr_from_string Evaluate an expression from a string input and return the result. parse_expr Parse the input pairs into an abstract syntax tree representing the expression. Error Parser The main method that’s called by the proc macro
(a wrapper around pest_generator::derive_parser
)