husk-scheme-3.20: R5RS Scheme interpreter, compiler, and library.
CopyrightJustin Ethier
LicenseMIT (see LICENSE in the distribution)
Maintainergithub.com/justinethier
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Language.Scheme.Parser

Description

This module implements parsing of Scheme code.

Synopsis

Documentation

lispDef :: LanguageDef () Source #

Language definition for Scheme

Higher level parsing

mainParser :: Parser LispVal Source #

Initial parser used by the high-level parse functions

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.

readExpr :: String -> ThrowsError LispVal Source #

Parse an expression from a string of text

readExprList :: String -> ThrowsError [LispVal] Source #

Parse many expressions from a string of text

Low level parsing

parseExpr :: Parser LispVal Source #

Parse an expression

parseAtom :: Parser LispVal Source #

Parse an atom (scheme symbol)

parseBool :: Parser LispVal Source #

Parse a boolean

parseChar :: Parser LispVal Source #

Parse a character

parseOctalNumber :: Parser LispVal Source #

Parse an integer in octal notation, base 8

parseBinaryNumber :: Parser LispVal Source #

Parse an integer in binary notation, base 2

parseHexNumber :: Parser LispVal Source #

Parse an integer in hexadecimal notation, base 16

parseDecimalNumber :: Parser LispVal Source #

Parser for Integer, base 10

parseNumber :: Parser LispVal Source #

Parse an integer in any base

parseRealNumber :: Parser LispVal Source #

Parse a floating point number

parseRationalNumber :: Parser LispVal Source #

Parse a rational number

parseComplexNumber :: Parser LispVal Source #

Parse a complex number

parseEscapedChar :: forall st. GenParser Char st Char Source #

Parse an escaped character

parseString :: Parser LispVal Source #

Parse a string

parseVector :: Parser LispVal Source #

Parse a vector

parseByteVector :: Parser LispVal Source #

Parse a bytevector

parseHashTable :: Parser LispVal Source #

Parse a hash table. The table is either empty or is made up of an alist (associative list)

parseDottedList :: Parser LispVal Source #

Parse a dotted list (scheme pair)

parseQuoted :: Parser LispVal Source #

Parse a quoted expression

parseQuasiQuoted :: Parser LispVal Source #

Parse a quasi-quoted expression

parseUnquoted :: Parser LispVal Source #

Parse an unquoted expression (a quasiquotated expression preceded by a comma)

parseUnquoteSpliced :: Parser LispVal Source #

Parse an unquote-spliced expression