SExpressions.jl

SExpressions.jl includes a roughly Racket-compatible parser for s-expressions.

Lists

SExpressions.Lists.islistMethod

Return true if the provided List is in fact a list, i.e., it is not improper.

This is the case if the list is a Nil (empty list) or a Cons with a proper list as its tail.

source
SExpressions.Lists.ConsType

An object which is essentially a pair of two objects.

The two objects are referred to, for historical reasons, as car and cdr.These abbreviations are not semantically relevant today, so can generally be thought of as the head object and the tail object. For Cons objects which are (proper) lists, the car (head) object will be the first element of the list, and the cdr (tail) object will be a list representing the remaining elements.

source
SExpressions.Lists.NilType

An object representing nothing, or an empty list.

The singleton instance of this type is called nil. This type is isomorphic to, and very similar, to Nothing. However, it is often useful to distinguish the nil used within many lisp dialects from a true Nothing, because nil is iterable and represents an empty list.

source

Core Parser Interface

SExpressions.Parser.parseFunction
parse(s::AbstractString)

Read the given string s as a single s-expression. The alternative vocabulary Base.parse(SExpression, s) is also supported and may be preferred.

source
parse(io::IO)

Read a single object from the given io stream.

source