dregex
package dregex
Main package for Dregex implementation. User-facing classes reside directly in the top-level package. The rest of the sub-packages contain implementation classes.
- Alphabetic
- By Inheritance
- dregex
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- class CompiledRegex extends Regex
A fully-compiled regular expression that was generated from a string literal.
- class InvalidRegexException extends Exception
- class ParsedRegex extends AnyRef
- trait Regex extends AnyRef
A regular expression, ready to be tested against strings, or to take part in an operation against another.
A regular expression, ready to be tested against strings, or to take part in an operation against another. Internally, instances of this type have a DFA (Deterministic Finite Automaton).
- class SynteticRegex extends Regex
A regular expression that was generated by an operation between others (not parsing a string), so it lacks a literal expression or NFA.
- class Universe extends AnyRef
The purpose of this class is to enforce that set operation between regular expressions are only done when it is legal to do so, that is, when the regex are compatible.
The purpose of this class is to enforce that set operation between regular expressions are only done when it is legal to do so, that is, when the regex are compatible.
The way this is enforced is that every compiled regular expression contains a reference to a Universe, and only expressions with the same universe are allowed to mix in set operation.
The same Universe ensures the same "alphabet" and normalization rules. Regular expressions compiled as a group will always have the same universe.
In general, dealing with this class or calling the constructor is not necessary; a call to one of the
compile
methods is simpler and more direct. However, there are cases in which the intermediate ParsedRegexs are needed. Most notably, when caching CompiledRegex instances (which are in general more expensive to create).
Dregex is a Scala/JVM library that implements a regular expression engine using deterministic finite automata (DFA). The range of features supported is an middle ground between Perl-style (slow) engines and DFA-based ones. Yet it retains the linear matching time offered by the latter.