A simple extensible formula language for .NET
- Arithmetic: + - * % / ^ ( )
- Functions: FunctionName(Parameter, Parameter, ...)
- Variables: VariableName OR [Variable Name With Spaces]
- Ranges: VariableName|LowerExpr:UpperExpr| OR [Variable Name With Spaces]|LowerExpr:UpperExpr|
- Indices: VariableName|IndexExpr| OR [Variable Name With Spaces]|IndexExpr|
- Constants:
- Number: 123.0
- Boolean: true/false
- Text: "A string"
- Nothing: null
- Branching: IF Expr THEN Expr ELSE Expr
- Logical: = <> > < >= <= ! && ||
- (1 + 2) * 3
- SQRT(16)
- MyVar * 2
- From C#
- CsWrapper.InterpretFormula("Test * 2", new Dictionary<string, double>() { { "Test", 1 } }, DefaultFunctionProvider.Instance)
- CsWrapper.ParseFormula("Test * 2")
- From F#
- Formula.Parser.Parser.parseFormulaString
- Formula.Parser.Interpreter.interpretFormula
- IL emit based compiler
- ExtractExpressionDependenciesWithRanges bug fix for partially resolved ranges
- Bug fix for large expressions
- Constant folder supports folding functions with constant arguments
- Function implementations can declare they are deterministic
- EmptyFunctionProvider created
- Implicit cast from nullables fix/improvement
- Support for 'Nothing' data type
- Compiler & interpreter return an Option float value
- C# wrapper returns Nullable
- Handling of Nothing values in aggregation functions
- IFunctionProvider returns typed results
- 'null' keyword added
- Parser detection of ranges used outside of function parameters
- Remove implicit use of the first range value in operations
- Bug fix for duplicate dependencies being returned from DependencyExtractor
- Syntax support for offsets/indices on variables e.g. MyVar|1|
- FIRST, LAST, MIN, MAX functions
- Added FunctionValidator to validate function calls after parsing
- Support escaped characters in string literals
- Missing dependencies reported from dependency extractor with function defined ranges
- Better parser error reporting - new ParserException
- Position information reported from parser
- Position information reported by dependency extractor
- Syntax support for ranges on variables e.g. MyVar|1:5|
- Range support for variable providers
- Range dependency information
- SUM, AVG functions
- Typing changes to allow for typed function parameters - number, boolean, text
- Target .NETStandard 2.0
- Syntax changes
- Support for escaping identifiers between []
- Change function parameters to use ()
- Financial functions
- Dependency extractor
- Composite IVariableProvider
- Mutable IVariableProvider
- Testing enhancements
- Expression compiler
- Branching & logical operators
- Expression based IVariableProvider
- Composite IFunctionProvider
- Extension points for functions and variables
- IFunctionProvider
- IVariableProvider
- Modulus function & operator
- MOD
- %
- Support basic arithmetic
- Addition/Subtraction
- Multiplication/Division
- Exponentiation
- Negation
- Handful of functions
- SQRT
- PI
- POW
- COUNT
- Constant valued variables