|
PssMathParser
1.0.0
Parser of mathemathical expressions
|
Library for parsing math expression strings. More...
Classes | |
| class | Entity |
| Base class for math expression entities. More... | |
| class | Operator |
| Derived from Entity, used for storing pointers to math functions. More... | |
| class | Argument |
| Derived from Entity, used for all that is not Operator. More... | |
| class | Generator |
| Derived from Entity, used for intermediate steps of calcualtion. More... | |
| class | MathParser |
| The export point of this library. More... | |
| class | MathExpression |
| Main functionality of this library. More... | |
Enumerations | |
| enum | EntityType { None, Operator, OperatorInDoubleOutDouble, OperatorInIntOutInt, OperatorInDoubleDoubleOutDouble, OperatorInDoubleIntOutDouble, Argument, ArgumentConstant, ArgumentUserConstant, ArgumentVariable, ArgumentGenerated, ArgumentGeneratedFromOneArg, ArgumentGeneratedFromTwoArg } |
| Enum defines all the types of functions for the operator. | |
| enum | OperatorPrecedence { Function = 9, Multiplication = 6, Addition = 3 } |
| Enum defines precedence of operators. | |
Library for parsing math expression strings.
This library basicaly does what every other parser does: turn infix notation to Reverse Polish and than calculate the result. The additional feature is that this library creates a structure (map) of the Reverse Polish so that it can be later used as a function. The call to the function is performed by setting the variables to a prior constructed math expression object. The goal is to have a fast calculation as close as possible to the speed of a hardcoded function.