Crate arithmetic_parser_kma
source ·Modules
- cli ia a modul with cli implementation.
- Traits, helpers, and type definitions for core I/O functionality.
Structs
- Struct containing operators and precedences, which can perform Pratt parsing on primary, prefix, postfix and infix expressions over
Pairs
. The tokens inPairs
should alternate in the order:prefix* ~ primary ~ postfix* ~ (infix ~ prefix* ~ primary ~ postfix*)*
Enums
- MyError is an error type used to return errors from the parser.
- Op describes a mathematical operation.
Traits
- A
BufRead
is a type ofRead
er which has an internal buffer, allowing it to perform extra ways of reading. - A trait with a single method that parses strings.
Functions
- Evaluate the given expression and return the result.
- Evaluate an expression from a string input and return the result.
- Parse the input pairs into an abstract syntax tree representing the expression.
Derive Macros
- The main method that’s called by the proc macro (a wrapper around
pest_generator::derive_parser
)