Crate tinyexpr [−] [src]
TinyExpr is a tiny recursive descent expression parser, compiler, and evaluation engine for math expressions. This is a work in progress port of TinyExpr to Rust.
Current release only supports built-in system functions (trigonometry, algebraic operations, constants, etc.).
See the tests
module for more examples.
Quick Start
extern crate tinyexpr; fn main() { // parse the expression and fetch result let r = tinyexpr::interp("2+2*2").unwrap(); // should print "6" println!("{:?}", r); }
Modules
error |
Error type for tinyexpr crate. |
Constants
Functions
interp |
Interprets a string expression as a mathematical expresion, evaluates it and returns its result. |