A library building and preparing expressions, for example boolean expressions such as (A | B) & !(C | D | E)
, which can be executed on dynamic contents.
An expression is built by calling the push_operator
, open_par
, close_par
and push_atom
functions.
It can then be evaluated with the eval
function which takes as parameters
Normal evaluation order is left to right but is modified with parenthesis.
bet is designed around separation of building, transformations, and evaluation, so that an expression can be efficiently applied on many inputs. bet is designed for very fast evaluation.
bet is used in broot to let users type composite queries on files.
bet is used in rhit to filter log lines.
bet is used in lfs to filter filesystems.
Usage and documentation: docs.rs/bet
If you wonder whether bet could be applied to your problems, don't hesitate to come and discuss. If you know a documented crate with overlapping use cases, tell me too so that I may list it here as alternative.