maskforge_core/structured/
mod.rs1mod canonical;
4pub(crate) mod lexer;
5mod limits;
6mod matcher;
7mod pattern;
8mod plan;
9#[cfg(any(test, feature = "bench-internals"))]
10mod reference;
11mod state;
12mod validator;
13
14pub use matcher::{
15 try_accepts, try_can_continue, StructuredMatcher, StructuredMatcherError, StructuredProgram,
16};
17pub(crate) use pattern::{build_search_pattern, leading_fragment_pattern};
18#[cfg(test)]
19pub(crate) use reference::accepts as oracle_accepts;
20
21#[cfg(test)]
23pub fn accepts(ir: &crate::ir::SchemaIR, bytes: &[u8]) -> bool {
24 try_accepts(std::sync::Arc::new(ir.clone()), bytes).unwrap_or(false)
25}
26
27#[cfg(test)]
29pub fn can_continue(ir: &crate::ir::SchemaIR, bytes: &[u8]) -> bool {
30 try_can_continue(std::sync::Arc::new(ir.clone()), bytes).unwrap_or(false)
31}