Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- default_lexer :: SubsumesToken t => String -> [t]
- lexer :: SubsumesToken t => LexerSettings -> String -> [t]
- lexerEither :: SubsumesToken t => LexerSettings -> String -> Either String [t]
- data LexerSettings = LexerSettings {
- keychars :: [Char]
- keywords :: [String]
- whitespace :: Char -> Bool
- lineComment :: String
- blockCommentOpen :: String
- blockCommentClose :: String
- identifiers :: RE Char String
- altIdentifiers :: RE Char String
- tokens :: [(String, RE Char String)]
- signed_int_lits :: Bool
- emptyLanguage :: LexerSettings
- oneOf :: Eq t => [t] -> RE t t
- manyOf :: Eq t => [t] -> RE t [t]
- someOf :: Eq t => [t] -> RE t [t]
- baseToDec :: Int -> String -> Int
Documentation
default_lexer :: SubsumesToken t => String -> [t] Source #
A lexer using the default LexerSettings
.
lexer :: SubsumesToken t => LexerSettings -> String -> [t] Source #
Variant of lexerEither
that throws an error or returns the result otherwise
lexerEither :: SubsumesToken t => LexerSettings -> String -> Either String [t] Source #
A lexer parameterised by LexerSettings
.
data LexerSettings Source #
Settings for changing the behaviour of the builtin lexer lexer
.
Lexers are built using Text.Regex.Applicative.
LexerSettings | |
|
emptyLanguage :: LexerSettings Source #
The default LexerSettings
.