Filter language DSL in Elixir/Erlang

Hi All,

I have come to need to provide a requirement to users to filter a set of things based upon a custom expression. Something like JQL for jira, and while I could build a parser etc for such a thing I feel that maybe this is a solved problem.

Something that takes an expression and some kind of context map and will only evaluate to true/false.

Looking around I see things like https://github.com/joewalnes/filtrex for JavaScript. Is there something similar in Erlang/Elixir?

I think making such a language/DSL would be fairly trivial for the basic use cases I have, but I’m not wanting to reinvent the wheel.

Anyone seen anything like this in the wild?

Chris

Another “Filtrex” allows you to apply arbitrary filters:

@sasajuric gave a nice talk on building a parser from first principles in Elixir that would allow you to write a parser for your proposed DSL and populate the structure that Filtrex expects: https://www.youtube.com/watch?v=xNzoerDljjo

I don’t know if the two have been put together yet…

1 Like

Try this https://github.com/ympons/expreso

1 Like

Perfect, this is essentially what I was looking for.