Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module parses the Relapse Grammar using the Parsec Library.
Synopsis
- parseGrammar :: String -> Either String Grammar
- parseGrammarWithUDFs :: MkFunc -> String -> Either String Grammar
- grammar :: MkFunc -> CharParser () Grammar
- pattern :: MkFunc -> CharParser () Pattern
- nameExpr :: CharParser () (Expr Bool)
- expr :: MkFunc -> CharParser () (Expr Bool)
- idLit :: CharParser () String
- bytesCastLit :: CharParser () ByteString
- stringLit :: CharParser () Text
- doubleCastLit :: CharParser () Double
- uintCastLit :: CharParser () Word
- intLit :: CharParser () Int
- ws :: CharParser () ()
Parse Grammar
parseGrammarWithUDFs :: MkFunc -> String -> Either String Grammar Source #
parseGrammarWithUDFs parses the Relapse Grammar with extra user defined functions.
Internal functions
These functions are exposed for testing purposes.
idLit :: CharParser () String Source #
For internal testing
bytesCastLit :: CharParser () ByteString Source #
For internal testing
stringLit :: CharParser () Text Source #
For internal testing
doubleCastLit :: CharParser () Double Source #
For internal testing
uintCastLit :: CharParser () Word Source #
For internal testing
intLit :: CharParser () Int Source #
For internal testing
ws :: CharParser () () Source #
For internal testing