pub enum Error {
UndefinedDerivative,
EmptyComplementaryClass,
AmbiguousCharSet,
BadClassId,
NonDisjointCharSets,
MissingDefaultSuccessor,
}
Expand description
Error codes produced by operations on partitions and regular expressions
Variants§
UndefinedDerivative
The derivative of R with respect to a character set C is not defined.
This means that C is not included in a derivative class of R (i.e., it overlaps several classes).
EmptyComplementaryClass
The complementary class of a regular expression R is empty
The deriv classes of R consists of a set of disjoint character intervals C0, … Cn-1 and an implicit complementary class equal to complement (Union(C0, …, Cn-1)). It’s an error to try to compute the derivative of R with respect to the complementary class if it is empty.
AmbiguousCharSet
The class id of a CharSet s
in a
CharPartition p
is not defined.
This means that s
overlaps a class of p
but is not contained in that class.
BadClassId
Bad class id for a CharPartition.
A bad class id is either of the form ClassId::Interval(i)
where i
is out of bound,
or ClassId::Complement
where the complementary class is empty.
NonDisjointCharSets
Error reported where a list of disjoint char sets is expected.
MissingDefaultSuccessor
No default successor specified for an automaton state when one is required.