#StackBounty: #javascript #java #python #dsl #rule-engine Creating a DSL expressions parser / rules engine

Bounty: 150

I’m building an app which has a feature for embedding expressions/rules in a config yaml file. So for example user can reference a variable defined in yaml file like ${variables.name == 'John'} or ${is_equal(variables.name, 'John')}. I can probably get by with simple expressions but I want to support complex rules/expressions such ${variables.name == 'John'} and (${variables.age > 18} OR ${variables.adult == true})

I’m looking for a parsing/dsl/rules-engine library that can support these type of expressions and normalize it. I’m open using ruby, javascript, java, or python if anyone knows of a library for that languages.

One option I thought of was to just support javascript as conditons/rules and basically pass it through eval with the right context setup with access to variables and other reference-able vars.

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.