temex 0.10.0

Regex-like temporal expressions for evaluating systems that change over time
Documentation
use crate::propform::{PropformErrorToken, PropformToken};
use thiserror::Error;

/// An error that occurred during the creation of a temex or temex trace,
/// or during a temex search.
#[derive(Error, Debug)]
pub enum TemexError {
    #[error(
        "Mismatched proposition labels: temex pattern uses {:?}, while trace uses {:?}",
        temex_labels,
        trace_labels
    )]
    MismatchedLabels {
        temex_labels: Vec<String>,
        trace_labels: Vec<String>,
    },
    #[error("Unlabeled proposition used in temex pattern: {}", 0)]
    UnexpectedLabelError(String),
    #[error("Unexpected character: {:?}", 0)]
    UnexpectedCharacter(char),
    #[error("Unexpected token: expected one of {:?}, found {:?}", 0, 1)]
    UnexpectedToken(Vec<PropformErrorToken>, PropformToken),
    #[error(transparent)]
    RegexError(#[from] regex::Error),
    #[error(transparent)]
    Io(#[from] std::io::Error),
    #[error("{}", 0)]
    Other(String),

    #[cfg(feature = "polars")]
    #[error(transparent)]
    PolarsError(#[from] polars::error::PolarsError),

    #[cfg(feature = "polars")]
    #[error("Nonboolean column in polars dataframe with name {}", 0)]
    PolarsNonBooleanColumn(String),
}