Giter Club home page Giter Club logo

expressionevaluator's Introduction

ExpressionEvaluator Icon

ExpressionEvaluator

A Simple Math and Pseudo C# Expression Evaluator in One C# File.

And from version 1.2.0 can execute small C# like scripts

It is largely based on and inspired by the following resources this post on stackoverflow, NCalc, C# Operators and C# Statement Keywords

Status

Branch Status
master Build Status
dev Dev Status
nuget NuGet Status

Features

And with ScriptEvaluate method

  • Small C# like script evaluation (Multi expressions separated by ; )
  • Some conditional and loop blocks keywords (if, while, for, foreach ...)
  • Multi-line (multi expression) Lambda expressions. (Can be use as method See #72 Declare methods in scripts and the doc)

Resources

And more is coming

Similar projects

Free

  • NCalc
  • Jint Support scripting but with Javascript
  • NLua use Lua language in C#
  • DynamicExpresso
  • Flee
  • CS-Script Best alternative (I use it some times) -> Real C# scripts better than ExpressionEvaluator (But everything is compiled. Read the doc. Execution is faster but compilation can make it very slow. And if not done the right way, it can lead to memory leaks)
  • Roslyn The Microsoft official solution (For scripting see)
  • MathParser expression tree compiler and interpreter for math expressions. Heavily inspired by Roslyn.

Commercial

I would say every C# evaluation libraries have drawbacks and benefits, ExpressionEvaluator is not an exception so choose wisely (Read docs and licences).

The biggest difference of ExpressionEvaluator is that everything is evaluated on the fly, nothing is compiled or transpile nor in CLR/JIT/IL nor in lambda expressions nor in javascript or other languages stuffs. So it can be slower in some cases (sometimes not) but it also avoid a lot of memory leaks. It already allow to evaluate some small scripts. If you don't want an another .dll file in your project, you only need to copy one C# file in your project. And it's MIT licence

Donate

Expression Evaluator is free and will always be.
But if you want to say thanks for this lib with a donation or small sponsoring here you can :
Donate

Thank you anyway for using ExpressionEvaluator

expressionevaluator's People

Contributors

attilaszobonya avatar codingseb avatar dependabot[bot] avatar haering avatar israellot avatar jl0pd avatar kirillosenkov avatar lofcz avatar luandevecchi avatar phenx avatar stg609 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.