grippo 0.3.0

Grok, regex, CEL and scrubbing on typed primitives. Up to 9 times faster than the stock Rust regex.
Documentation
// Project:   grippo
// File:      src/expr/mod.rs
// Purpose:   CEL predicates broken into grippo's primitives
// Language:  Rust
//
// License:   Apache-2.0
// Copyright: (c) 2026 HYPERI PTY LIMITED

//! CEL filter expressions lowered to prefix, suffix, substring, exact and
//! number checks over a [`crate::record::Record`], with no interpreter.
//!
//! The result is cel's, with each root field a variable holding that field's
//! value. Raw JSON bytes go straight to `eval`, and a raw line or a parser
//! chain's fields to `eval_record`. An expression outside the lowered subset is a [`Refusal`]
//! naming the first form that left it, so the caller runs its interpreter.
//! With the `expr-cel` feature and [`Fallback::Cel`], grippo runs that
//! text on cel-rust itself, and [`Program::engine`] says which ran.
//!
//! ```
//! use grippo::expr::{Outcome, Program};
//!
//! let p = Program::compile(r#"event.dns.type == "query" || event.dns.type == "answer""#)?;
//! assert_eq!(p.eval(br#"{"event":{"dns":{"type":"answer"}}}"#), Outcome::True);
//! assert!(!p.matches(b"{}"));
//! # Ok::<(), grippo::expr::Refusal>(())
//! ```

#[cfg(feature = "expr-cel")]
mod fallback;
mod lex;
mod names;
mod parse;
mod program;
mod set;
mod value;
mod valued;

pub use names::{Call, Names, names};
pub use parse::Refusal;
pub use program::{Engine, Fallback, MAX_FIELDS, Options, Outcome, Program};
pub use set::{MAX_SET_FIELDS, ProgramSet};
pub use value::ErrorKind;
pub use valued::{Value, ValueProgram};

#[cfg(test)]
mod oracle_tests;
#[cfg(test)]
mod tests;