hitori crate hitori documentation Build status

Hitori is generic compile-time regular expressions library. It works by creating series of if-statements and for-loops for each expression.

See code samples along with the traits, impls and structs they expand to in [examples].

Limitations

Pattern matching is step-by-step. It is impossible to to detach last element of a repetition. For example, using [regex] one can rewrite a+ as a*a and it would still match any sequence of as longer than zero. With [hitori], however, a* would consume all the as, and the expression won't match.

Step-by step pattern matching also leads to diminished performance when matching large texts and an expression contains repetitions of frequent characters.

Crate features

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.