2023-04-05

(sph lang scheme)

scheme parsing helpers including helpers for implicitly quasiquoted configuration files

part of sph-lib

module name

(sph lang scheme)

exported bindings

procedure: file->datums path [get-datum] ->
string procedure:reader -> list
read all scheme datums of a file specified by path
procedure: iq-file path [env] ->
string -> list
\"implicitly quasiquoted\".
read all scheme expressions from file like elements of a quasiquoted
list (quasiquote (file-content-expression ...)).
unquote can be used and will be evaluated.
example use case: configuration files
procedure: iq-file-hashtable path ->
string -> list
read file like iq-file and then convert the resulting list to an association list
by interpreting elements as key and value alternatingly
procedure: iq-file-lines path [env] ->
string -> ((line-expressions ...) ...)
like iq-file but keep the expressions of lines in separate lists
procedure: port->datums port [get-datum] ->
string procedure:reader -> list
read all scheme datums from a port
procedure: string->datum a [reader] ->
get the first scheme expression from a string
procedure: string->datums a [reader] ->
string -> list
get all scheme expression from a string