husk-scheme-3.14: R5RS Scheme interpreter, compiler, and library.

Portabilityportable
Stabilityexperimental
Maintainergithub.com/justinethier
Safe HaskellSafe-Inferred

Language.Scheme.Parser

Contents

Description

This module implements parsing of Scheme code.

Synopsis

Documentation

lispDef :: LanguageDef ()Source

Language definition for Scheme

Higher level parsing

mainParser :: Parser LispValSource

Initial parser used by the high-level parse functions

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.

readExpr :: String -> ThrowsError LispValSource

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 LispValSource

Parse an expression

parseAtom :: Parser LispValSource

Parse an atom (scheme symbol)

parseBool :: Parser LispValSource

Parse a boolean

parseChar :: Parser LispValSource

Parse a character

parseOctalNumber :: Parser LispValSource

Parse an integer in octal notation, base 8

parseBinaryNumber :: Parser LispValSource

Parse an integer in binary notation, base 2

parseHexNumber :: Parser LispValSource

Parse an integer in hexadecimal notation, base 16

parseDecimalNumber :: Parser LispValSource

Parser for Integer, base 10

parseNumber :: Parser LispValSource

Parse an integer in any base

parseRealNumber :: Parser LispValSource

Parse a floating point number

parseRationalNumber :: Parser LispValSource

Parse a rational number

parseComplexNumber :: Parser LispValSource

Parse a complex number

parseEscapedChar :: forall st. GenParser Char st CharSource

Parse an escaped character

parseString :: Parser LispValSource

Parse a string

parseVector :: Parser LispValSource

Parse a vector

parseByteVector :: Parser LispValSource

Parse a bytevector

parseHashTable :: Parser LispValSource

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

parseList :: Parser LispValSource

Parse a list

parseDottedList :: Parser LispValSource

Parse a dotted list (scheme pair)

parseQuoted :: Parser LispValSource

Parse a quoted expression

parseQuasiQuoted :: Parser LispValSource

Parse a quasi-quoted expression

parseUnquoted :: Parser LispValSource

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

parseUnquoteSpliced :: Parser LispValSource

Parse an unquote-spliced expression