ParserFunction-0.0.7: Utilities for parsing and evaluating mathematical expressions.

Safe HaskellSafe-Infered




data Expr Source

The Expr data type provides a basis for ordering mathematical operations.


evalString :: String -> [(Variable, Complex Double)] -> Maybe (Complex Double)Source

evalString evaluates a string-expression using a list of variable definitions with values.

evalExpr :: Expr -> [(Variable, Complex Double)] -> Maybe (Complex Double)Source

evalExpr evaluates an expression tree using a list of variable definitions with values.

stringToExpr :: String -> Maybe ExprSource

stringToExpr parses a string-expression and returns a maybe expression tree.

eval :: Map Variable (Complex Double) -> Maybe Expr -> Maybe (Complex Double)Source

eval takes a map of variable definitions and values, and a maybe expression tree, to produce maybe a numerical value.