egison-2.0.3: An Interpreter for the Programming Language Egison

Safe HaskellSafe-Inferred
LanguageHaskell98

Language.Egison.Parser

Synopsis

Documentation

parseDecimalNumber :: Parser EgisonExpr Source

Parser for Integer, base 10

parseDecimalNumberMaybeExponent :: Parser EgisonExpr Source

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 EgisonExpr Source

Parse an integer in any base

parseRealNumber :: Parser EgisonExpr Source

Parse a floating point number

parseNumberExponent :: EgisonExpr -> Parser EgisonExpr Source

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

parseExpr :: Parser EgisonExpr Source

Parse an expression

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

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

readTopExpr :: String -> ThrowsError TopExpr Source

Parse an top expression from a string of text

readExpr :: String -> ThrowsError EgisonExpr Source

Parse an expression from a string of text

readTopExprList :: String -> ThrowsError [TopExpr] Source

Parse many top expressions from a string of text