The state of the engine is represented as a "regex object" of type
ReObject s r, where s is the type of symbols and r is the
result type (as in the RE type). Think of ReObject as a collection of
Threads ordered by priority. E.g. threads generated by the left part of
<|> come before the threads generated by the right part.
Moduleregex-applicative-0.3.4Haskell2010
Text.Regex.Applicative.Object
This is a low-level interface to the regex engine.
- 3 types
- 12 values
- Packageregex-applicative-0.3.4
- Exports15
- LanguageHaskell2010
- LicenceMIT
- SourceObject.hs
Compile a regular expression into a regular expression object
Empty object (with no threads)
A thread either is a result or corresponds to a symbol in the regular expression, which is expected by that thread.
List of all threads of an object. Each non-result thread has a unique id.
Check if the object has no threads. In that case it never will produce any new threads as a result of step.
Check whether a thread is a result thread
Return the result of a result thread, or Nothing if it's not a result thread
Extract the result values from all the result threads of an object
Feed a symbol into a regex object
Feed a symbol into a non-result thread. It is an error to call stepThread on a result thread.
Create an object from a list of threads. It is recommended that all threads come from the same ReObject, unless you know what you're doing. However, it should be safe to filter out or rearrange threads.
Add a thread to an object. The new thread will have lower priority than the threads which are already in the object.
If a (non-result) thread with the same id already exists in the object, the object is not changed.