Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Text.Tokenify.DSL
Description
The DSL for creating a grammar/tokenizer definition for tokenizer
- fails :: Regex s -> Token s a
- ignore :: Regex s -> Token s a
- insert :: Regex s -> (Pos -> a) -> Token s a
- evaluate :: Regex s -> (s -> Pos -> a) -> Token s a
- string :: s -> Regex s
- char :: Char -> Regex s
- range :: Char -> Char -> Regex s
- alt :: Regex s -> Regex s -> Regex s
- any :: [Regex s] -> Regex s
- append :: Regex s -> Regex s -> Regex s
- concat :: [Regex s] -> Regex s
- option :: Regex s -> Regex s
- repeat :: Regex s -> Regex s
- repeat1 :: Regex s -> Regex s
Response Constructors
insert :: Regex s -> (Pos -> a) -> Token s a Source
Creates a response which consumes the text position
evaluate :: Regex s -> (s -> Pos -> a) -> Token s a Source
Creates a response which consumes the captures CharSeq
and the text position
Regex Constructors
alt :: Regex s -> Regex s -> Regex s Source
Creates a regex that will attmpt to make the regex on the left, if that fails it will attmpt to match the regex on the right
any :: [Regex s] -> Regex s Source
Creates a regex that will attmpt to match a Sequence of regex's in a sequencial order