egison-2.1.2: An Interpreter for the Programming Language Egison

Safe HaskellSafe-Infered

Language.Egison.Parser

Synopsis

Documentation

parseDecimalNumber :: Parser EgisonExprSource

Parser for Integer, base 10

parseDecimalNumberMaybeExponent :: Parser EgisonExprSource

Parser for a base 10 Integer that will also check to see if the number is followed by an exponent (scientific notation). If so, the integer is converted to a float of the given magnitude.

parseNumber :: Parser EgisonExprSource

Parse an integer in any base

parseRealNumber :: Parser EgisonExprSource

Parse a floating point number

parseNumberExponent :: EgisonExpr -> Parser EgisonExprSource

Parse the exponent section of a floating point number in scientific notation. Eg e10 from 1.0e10

parseExpr :: Parser EgisonExprSource

Parse an expression

readOrThrow :: Parser a -> String -> ThrowsError aSource

Use a parser to parse the given text, throwing an error if there is a problem parsing the text.

readTopExpr :: String -> ThrowsError TopExprSource

Parse an top expression from a string of text

readExpr :: String -> ThrowsError EgisonExprSource

Parse an expression from a string of text

readTopExprList :: String -> ThrowsError [TopExpr]Source

Parse many top expressions from a string of text