| Copyright | (C) 2026 - Eitan Chatav |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Eitan Chatav <eitan.chatav@gmail.com> |
| Stability | provisional |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Control.Lens.Grammar.RegEx
Contents
Description
Regular expressions form a Kleene star algebra. See Kleene, Representation of Events in Nerve Nets and Finite Automata
RegEx
The RegExpression type forms the prototypical KleeneStarAlgebra.
It is also a TokenAlgebra and tokenClass acts homomorphically on disjunction.
RegExpressions may be understood as normalizations of
KleeneStarAlgebra expressions generated by lexical token expressions.
Constructors
| SeqEmpty | |
| Sequence (RegEx token) (RegEx token) [RegEx token] | Two or more items, none of them sequences or empty. |
| NonTerminal String | |
| KleeneStar (RegEx token) | |
| KleeneOpt (RegEx token) | |
| KleenePlus (RegEx token) | |
| RegExam (TokenExam token (RegEx token)) |