Skip to main content

parse

Function parse 

pub fn parse(input: &str) -> MathExpr
Expand description

Parse a flat ASCII expression into a structured tree. Best-effort and total: anything it cannot classify is kept as literal Char atoms so the field never loses content (the engine reports semantic errors at plot time). Recognizes name(...) calls, (...) groups, ^ powers, sqrt(...)/root(i,x) radicals, and a/b fractions where a and b are simple immediate operands.