Functions to generate Deterministic Finite Automata from `Regex`es. The algorithm is a modified edition of the one found at ยง3.9.5 in "Compilers: Principles, Techniques and Tools" by Aho, Lam, Sethi & Ullman.
Function or value | Description | ||||
Full Usage:
buildRegexesToDFA prioritizeFixedLengthSymbols caseSensitive regexes
Parameters:
bool
-
Whether to prioritize
regexes that don't have stars over those that do in case of a conflict.
caseSensitive : bool
-
Whether the resulting DFA is case-sensitive.
regexes : (Regex * DFASymbol) list
-
The list of regexes, paired with the symbol they recognize.
Returns: Result<ImmutableArray<DFAState>, BuildError list>
An immutable array of the DFA states or a
list of the errors that were encountered.
|
Builds a DFA that recignizes one of the given regexes.
|
||||
Full Usage:
buildRegexesToDFAEx ct options prioritizeFixedLengthSymbols caseSensitive regexes
Parameters:
CancellationToken
-
Used to cancel the operation.
options : BuildOptions
-
Used to further configure the operation.
prioritizeFixedLengthSymbols : bool
-
Whether to prioritize
regexes that don't have stars over those that do in case of a conflict.
caseSensitive : bool
-
Whether the resulting DFA is case-sensitive.
regexes : (Regex * DFASymbol) list
-
The list of regexes, paired with the symbol they recognize.
Returns: Result<ImmutableArray<DFAState>, BuildError list>
An immutable array of the DFA states or a
list of the errors that were encountered.
|
Builds a DFA that recignizes one of the given regexes.
|
||||
|
|