govaluate - Arbitrary expression evaluation for golang

  •        40

Provides support for evaluating arbitrary C-like artithmetic/string expressions. Sometimes, you can't know ahead-of-time what an expression will look like, or you want those expressions to be configurable. Perhaps you've got a set of data running through your application, and you want to allow your users to specify some validations to run on it before committing it to a database. Or maybe you've written a monitoring framework which is capable of gathering a bunch of metrics, then evaluating a few expressions to see if any metrics should be alerted upon, but the conditions for alerting are different for each monitor.

https://github.com/Knetic/govaluate

Tags
Implementation
License
Platform

   




Related Projects

Nanocalc - Lightweight Scientific Calculator

  •    C++

Nanocalc - Lightweight Scientific Calculator is a simple to use, easy to integrate and extremely efficient and fast mathematical expression parsing and evaluation engine. The parsing engine supports various kinds of functional, logic processing semantics and is very easily ext...

PEGTL - Parsing Expression Grammar Template Library

  •    C++

The Parsing Expression Grammar Template Library (PEGTL) is a zero-dependency C++ header-only parser combinator library for creating parsers according to a Parsing Expression Grammar (PEG). Grammars are written as regular C++ code, created with template programming (not template meta programming), i.e. nested template instantiations that naturally correspond to the inductive definition of PEGs (and other parser-combinator approaches).

rust-peg - Parsing Expression Grammar (PEG) parser generator for Rust

  •    Rust

This is a simple parser generator based on Parsing Expression Grammars. Please see the release notes for updates.

Expression Evaluator + aggregate functions support

  •    CSharp

Simple library for expressions evaluation that supports variables in expression and aggregative functions to parse and evaluate expression against tabular data.

treetop - A Ruby-based parsing DSL based on parsing expression grammars.

  •    Ruby

A Ruby-based parsing DSL based on parsing expression grammars.


Fast Lightweight Expression Evaluator

  •    

A .NET expression parser and evaluator that uses a custom compiler and lightweight codegen to ensure that expression evaluation is fast and efficient.

peg - Peg, Parsing Expression Grammar, is an implementation of a Packrat parser generator.

  •    Go

Peg, Parsing Expression Grammar, is an implementation of a Packrat parser generator. A Packrat parser is a descent recursive parser capable of backtracking. The generated parser searches for the correct parsing of the input.

treetop - A Ruby-based parsing DSL based on parsing expression grammars.

  •    Ruby

Languages can be split into two components, their syntax and their semantics. It's your understanding of English syntax that tells you the stream of words "Sleep furiously green ideas colorless" is not a valid sentence. Semantics is deeper. Even if we rearrange the above sentence to be "Colorless green ideas sleep furiously", which is syntactically correct, it remains nonsensical on a semantic level. With Treetop, you'll be dealing with languages that are much simpler than English, but these basic concepts apply. Your programs will need to address both the syntax and the semantics of the languages they interpret. Treetop equips you with powerful tools for each of these two aspects of interpreter writing. You'll describe the syntax of your language with a parsing expression grammar. From this description, Treetop will generate a Ruby parser that transforms streams of characters written into your language into abstract syntax trees representing their structure. You'll then describe the semantics of your language in Ruby by defining methods on the syntax trees the parser generates.

neotoma - Erlang library and packrat parser-generator for parsing expression grammars.

  •    Erlang

Neotoma is a packrat parser-generator for Erlang for Parsing Expression Grammars (PEGs). It consists of a parsing-combinator library with memoization routines, a parser for PEGs, and a utility to generate parsers from PEGs. It is inspired by treetop, a Ruby library with similar aims, and parsec, the parser-combinator library for Haskell. Neotoma is licensed under the MIT License (see LICENSE).

tinyexpr - tiny recursive descent expression parser, compiler, and evaluation engine for math expressions

  •    C

TinyExpr is a very small recursive descent parser and evaluation engine for math expressions. It's handy when you want to add the ability to evaluation math expressions at runtime without adding a bunch of cruft to you project. In addition to the standard math operators and precedence, TinyExpr also supports the standard C math functions and runtime binding of variables.

jeelizWeboji - JavaScript/WebGL real-time face tracking and expression detection library

  •    Javascript

With this library, you can build your own animoji embedded in Javascript/WebGL applications. You do not need any specific device except a standard webcam. By default a webcam feedback image is displayed with the face detection frame. The face detection is quite robust to all lighting conditions, but the evaluation of expression can be noisy if the lighting is too directional, too weak or if there is an important backlight. So the webcam feedback image is useful to see the quality of the input video feed.

Lambda Expression Parser

  •    ASPNET

Light weight expression parser supports parsing runtime expression string compatible with C# 2.0 syntax to lambda expression.

pegkit - 'Parsing Expression Grammar' toolkit for Cocoa/Objective-C

  •    Objective-C

PEGKit is a 'Parsing Expression Grammar' toolkit for iOS and OS X written by Todd Ditchendorf in Objective-C and released under the MIT Open Source License. Always use the Xcode Workspace PEGKit.xcworkspace, NOT the Xcode Project.

Pegged - A Parsing Expression Grammar (PEG) module, using the D programming language.

  •    D

Pegged is a parsing expression grammar (PEG) generator implemented in the D programming language. The idea is to give the generator a PEG, with the syntax presented in the reference article . From this grammar definition a set of related parsers will be created, to be used at runtime or compile time.

pigeon - Command pigeon generates parsers in Go from a PEG grammar.

  •    Go

The pigeon command generates parsers based on a parsing expression grammar (PEG). Its grammar and syntax is inspired by the PEG.js project, while the implementation is loosely based on the parsing expression grammar for C# 3.0 article. It parses Unicode text encoded in UTF-8. See the godoc page for detailed usage. Also have a look at the Pigeon Wiki for additional information about Pigeon and PEG in general.

CExEv C Expression Evaluator in C++

  •    C++

This is a package of C++ classes intended to be used for evaluation of C-syntax expression strings. It is intended to be as simple as possible, portable and not depending on other libraries.

Basic Expression Evaluator C#

  •    

Mathematical Expression Evaluation with symbols and normal bodmas order of precedence. Supports basic arithmetic operations and access to a symbol dictionary

LExpress

  •    CSharp

Library for working with C#/F# expressions (System.Linq.Expressions, Microsoft.FSharp.Quotations). Building expressions, converting C# expressions to F# expressions, active patterns for C# expressions, expression evaluation, ect.

vsep

  •    

The Very Simple Expression Parser (and Solver) Library for C

bitlash - Bitlash: a programmable command shell for arduino

  •    C

Bitlash supports string constants in function argument lists, but until now there hasn't been a way to distinguish such string arguments from numeric arguments once you're inside the called function, making it easy to reference forbidden memory by mistake. NOTE: The changes consume a little space on the expression evaluation stack, so some complex expressions that formerly worked may see an expression overflow. Please report this if you see it.