Module hir

Defines a high-level intermediate (HIR) representation for regular expressions.

The HIR is represented by the Hir type, and it principally constructed via translation from an Ast. Alternatively, users may use the smart constructors defined on Hir to build their own by hand. The smart constructors simultaneously simplify and "optimize" the HIR, and are also the same routines used by translation.

Most regex engines only have an HIR like this, and usually construct it directly from the concrete syntax. This crate however first parses the concrete syntax into an Ast, and only then creates the HIR from the Ast, as mentioned above. It's done this way to facilitate better error reporting, and to have a structured representation of a regex that faithfully represents its concrete syntax. Namely, while an Hir value can be converted back to an equivalent regex pattern string, it is unlikely to look like the original due to its simplified structure.

Modules

Structs

Enums

Traits

Functions