Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Parser a = Parser {}
- parseChar :: Char -> Parser Char
- parseOr :: Parser a -> Parser a -> Parser a
- parseAnd :: Parser a -> Parser b -> Parser (a, b)
- parseAndWith :: (a -> b -> c) -> Parser a -> Parser b -> Parser c
- parseMany :: Parser a -> Parser [a]
- parseSome :: Parser a -> Parser [a]
- parseUInt :: Parser Int
- parseInt :: Parser Int
- parseAnyChar :: String -> Parser Char
- parseList :: Parser a -> String -> String -> Parser [a]
- parseString :: Parser String
- parseSign :: Parser Char
- parseDigit :: Parser Char
- parseBool :: Parser Ast
- parseAst :: Parser Ast
- parseElem :: Parser a -> Parser a
- parseValue :: Parser Ast
- parseLobster :: Parser [Ast]
- parseAnyString :: String -> Parser String
- parseCmpString :: String -> Parser String
- parseDefineValue :: Parser Ast
- parseProduct :: Parser Ast
- parseSum :: Parser Ast
- parseExpr :: Parser Ast
- parseTrue :: Parser Bool
- parseFalse :: Parser Bool
- parseAstString :: Parser Ast
- parseWhiteSpace :: Parser [Char]
- errorParsing :: (Int, Int) -> String
- parseDefineFn :: Parser Ast
- parseLambda :: Parser Ast
- parseCond :: Parser Ast
- parseFunctionValue :: Parser Ast
- parseBracket :: Parser Ast
- parseComment :: Parser Char
Documentation
parseChar :: Char -> Parser Char Source #
Parse a character c Takes the character that need to be parsed Returns a data Parser that contain the character and the rest of the string
parseOr :: Parser a -> Parser a -> Parser a Source #
Parse with the first or the second parser Takes two parsers Returns either the first parser or the second parser
parseAnd :: Parser a -> Parser b -> Parser (a, b) Source #
Parse with the first and the second parser Takes two parsers Returns either the first parser then use result for the second parser
parseAndWith :: (a -> b -> c) -> Parser a -> Parser b -> Parser c Source #
Parse with function after the two parsers Takes two parsers and a fh (x _ -> x) unction Returns the result of the function with the result of the parseAnd
parseMany :: Parser a -> Parser [a] Source #
Parse with a parser Takes a parser Returns the application of the parser (if nothing, returns an empty list)
parseSome :: Parser a -> Parser [a] Source #
Parse with a parser Takes a parser Returns the application of the parser at least one time or Returns Nothing
parseAnyChar :: String -> Parser Char Source #
Parse any character from a String Return a Parser that parse every character from a String
parseList :: Parser a -> String -> String -> Parser [a] Source #
Parse a list of element
Return a Parser of list element
that start with a '(' and end with a ')'
parseString :: Parser String Source #
Return a data Parser that parse a String
parseDigit :: Parser Char Source #
Return a data Parser that parse a digit
parseElem :: Parser a -> Parser a Source #
Parse with a parser and, if possible with a space Return a Parser that parse element with the given parser and, if possible with multiple space
parseValue :: Parser Ast Source #
Return a data Parser that parse a Int as a Value
parseLobster :: Parser [Ast] Source #
parseProduct :: Parser Ast Source #
parseFalse :: Parser Bool Source #
Return a PArser that parse a True (in lisp -> #f)
parseAstString :: Parser Ast Source #
Return a data Parser that parse a String as a Symbol
parseWhiteSpace :: Parser [Char] Source #
parseLambda :: Parser Ast Source #
parseBracket :: Parser Ast Source #