| Copyright | (c) Karl Cronburg 2018 |
|---|---|
| License | BSD3 |
| Maintainer | karl@cs.tufts.edu |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | Haskell2010 |
Text.ANTLR.Lex.Regex
Description
Documentation
Regular expression data representation as used by the tokenizer.
Constructors
| Epsilon | Regex accepting the empty string |
| Symbol s | An individual symbol in the alphabet |
| Literal [s] | A literal sequence of symbols (concatenated together) |
| Class [s] | A set of alternative symbols (unioned together) |
| Union (Regex s) (Regex s) | Union of two arbitrary regular expressions |
| Concat [Regex s] | Concatenation of 2 or more regular expressions |
| Kleene (Regex s) | Kleene closure of a regex |
| PosClos (Regex s) | Positive closure |
| Question (Regex s) | 0 or 1 instances |
| MultiUnion [Regex s] | Union of two or more arbitrary regexs |
| NotClass [s] | Complement of a character class |
regex2nfa' :: forall s i. (Hashable i, Ord i, Hashable s, Eq s) => (i -> Int) -> (Int -> i) -> Regex s -> NFA s i Source #
Translation code of a regular expresion to an NFA.