Questions tagged [flee]

Flee is a .NET library that allows you to parse and evaluate arbitrary expressions.

Main feature of Flee that distinguishes it from other expression evaluators is that it uses a custom compiler to convert expressions into IL and then, using Lightweight CodeGen, emits the IL to a dynamic method at runtime. This means that expression evaluation is several orders of magnitude faster than when using interpretive expression evaluators. In fact, the entire design of the library and the expression language is geared towards making evaluation as fast as possible.

12 questions
1
vote
2 answers

how to replace sections of string enclosed by square brackets with data stored in an array?

I have created a program which takes a string (e.g "[2*4]x + [3/2]x"), isolates all the instances where there is text within square brackets and places them within an array 'matches'. It then strips off the square brackets and by some function (i am…
0
votes
0 answers

System.InvalidProgramException Common Language Runtime detected an invalid program for Reflection

System.InvalidProgramException : Common Language Runtime detected an invalid program. Seeing this error message whilst trying to check the expression's correctness and if it is the correct IL. The expression is "DateTimeA.GetType().Name", where we…
0
votes
0 answers

C# Flee Framework and Outsystems

So I am using the .NET flee expression evaluator and consuming it in Outsystems. It's working great but I have some custom specifications that I don't know I can achieve using this. Basically, I am building a custom exceptions builder for the…
0
votes
0 answers

How to improve performance on evaluating multiple mathematical expressions?

I'm developing an application that works like an excel sheet: the user types a few values, and a lot of consequent calculation is done, in Blazor. Right now I'm following this sequence (simplified code can be found at the end of question): Retrieve…
0
votes
3 answers

how to enforce the evaluation type of an expression to be double

how could I make sure that the expression is always evaluated as a double even if it has no double in it, I came across this website https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/floating-point-numeric-types, It…
yy uu
  • 11
  • 2
0
votes
0 answers

Using System.Reflection.Emit in UWP (with .NET Native Tool Chain)

The app that I am working on requires ".NET Native Tool Chain" to be enabled in project settings, as it will be distributed via the Microsoft Store. Part of the functionality of this app is that it will have calculations performed via a user-defined…
Mike Baxter
  • 6,868
  • 17
  • 67
  • 115
0
votes
0 answers

Nuget package (Flee) is outputting .dll for incorrect framework

In our solution, we have three relevant projects to this issue. Below is a diagram that displays them: Project A runs tests on C, which implements the Flee nuget package. This package apparently supports both .NET Framework and .NET Core. When I…
Mike Baxter
  • 6,868
  • 17
  • 67
  • 115
0
votes
1 answer

Is it possible to validate the formula in Ciloci.Flee without values

I have an ASP.net (C#) application (.net 3.5) using Ciloci.Flee by Muhammet Parlak (specifically Trove.Flee by Alan Dean through NuGet) that allows the user to enter a formula into an interface, and that formula is later used for calculations, based…
LBW
  • 111
  • 4
0
votes
1 answer

Using string literal comparison using flee

I am trying to do a string literal check using Flee, but I cannot get it to work, when I specify the string value I am trying to check it attempts to use a variable instead. Here's ny code: var context = new…
John
  • 263
  • 1
  • 15
0
votes
1 answer

Make object comparison to string invalid

I'm using the Flee library to evaluate expressions that the users enters. I'm using the fact that expressions don't compile to warn the user of invalid input. If I use an expression like var=="something" it will not compile if var is an int, because…
0
votes
2 answers

SyntaxError exception in Ciloci.Flee.ExpressionContext

While using Flee I got this exception message "SyntaxError: Unexpected character: I Line: 1, Column: 1" when I am trying to use I character in my expression string. ExpressionContext EC = new ExpressionContext(); EC.Variables.Add("I",…
tolga güler
  • 308
  • 1
  • 7
-2
votes
2 answers

How to get Predicate from string expressions at runtime

In Winform application using EntityFramework, I implement a generic Search / Filter UI Components using BindingSource of the BaseForm and build search/filter string expression dynamically from user inputs and properties of the DataSource of…
M.Hassan
  • 10,282
  • 5
  • 65
  • 84