eles 1.0.0

ELES; Extensible Logical Expression Solver
Documentation
  • Coverage
  • 0%
    0 out of 18 items documented0 out of 0 items with examples
  • Size
  • Source code size: 24.5 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 406.42 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • usagi/eles
    1 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • usagi

githubcrates-iodocs-rs Build Status

ELES; Extensible Logical Expression Solver

If you have an existing parser that outputs a single boolean value and you want to add support for AND, OR, XOR, and parentheses, ELES can be of great help. For example, if you already have a system that interprets string syntax to determine/search data for a single item, and you want to support AND/OR searches for multiple items or complex conditions assembled using parentheses, ELES is the usefull library for you.

Example

// The simplest example
fn main()
{
 let input = "true && (( false ^^ true && !! false )) || false";
 let literal_parser = |literal: &str| Ok(literal.parse::<bool>().unwrap_or_default());
 let r = eles::solve(&input, literal_parser);
 println!("{:?}", r);
}

More examples are here:

And these tests might be usefull that study usage:

LICENSE

Author